Current Path : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/main/amcharts/3.21/ |
Current File : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/main/amcharts/3.21/amcharts.min.js |
(function(){var t;window.AmCharts?t=window.AmCharts:(t={},window.AmCharts=t,t.themes={},t.maps={},t.inheriting={},t.charts=[],t.onReadyArray=[],t.useUTC=!1,t.updateRate=60,t.uid=0,t.lang={},t.translations={},t.mapTranslations={},t.windows={},t.initHandlers=[],t.amString="am",t.pmString="pm");t.Class=function(e){var i=function(){arguments[0]!==t.inheriting&&(this.events={},this.construct.apply(this,arguments))};e.inherits?(i.prototype=new e.inherits(t.inheriting),i.base=e.inherits.prototype,delete e.inherits):(i.prototype.createEvents=function(){for(var t=0;t<arguments.length;t++)this.events[arguments[t]]=[]},i.prototype.listenTo=function(t,e,i){this.removeListener(t,e,i);t.events[e].push({handler:i,scope:this})},i.prototype.addListener=function(t,e,i){this.removeListener(this,t,e);t&&this.events[t]&&this.events[t].push({handler:e,scope:i})},i.prototype.removeListener=function(t,e,i){if(t&&t.events&&(t=t.events[e]))for(e=t.length-1;0<=e;e--)t[e].handler===i&&t.splice(e,1)},i.prototype.fire=function(t){for(var e=this.events[t.type],i=0;i<e.length;i++){var s=e[i];s.handler.call(s.scope,t)}});for(var s in e)i.prototype[s]=e[s];return i};t.addChart=function(e){window.requestAnimationFrame?t.animationRequested||(t.animationRequested=!0,window.requestAnimationFrame(t.update)):t.updateInt||(t.updateInt=setInterval(function(){t.update()},Math.round(1e3/t.updateRate)));t.charts.push(e)};t.removeChart=function(e){for(var i=t.charts,s=i.length-1;0<=s;s--)i[s]==e&&i.splice(s,1);0===i.length&&(t.requestAnimation&&(window.cancelAnimationFrame(t.requestAnimation),t.animationRequested=!1),t.updateInt&&(clearInterval(t.updateInt),t.updateInt=NaN))};t.isModern=!0;t.getIEVersion=function(){var t=0,e,i;"Microsoft Internet Explorer"==navigator.appName&&(e=navigator.userAgent,i=/MSIE ([0-9]{1,}[.0-9]{0,})/,null!==i.exec(e)&&(t=parseFloat(RegExp.$1)));return t};t.applyLang=function(e,i){var s=t.translations;i.dayNames=t.extend({},t.dayNames);i.shortDayNames=t.extend({},t.shortDayNames);i.monthNames=t.extend({},t.monthNames);i.shortMonthNames=t.extend({},t.shortMonthNames);i.amString="am";i.pmString="pm";s&&(s=s[e])&&(t.lang=s,i.langObj=s,s.monthNames&&(i.dayNames=t.extend({},s.dayNames),i.shortDayNames=t.extend({},s.shortDayNames),i.monthNames=t.extend({},s.monthNames),i.shortMonthNames=t.extend({},s.shortMonthNames)),s.am&&(i.amString=s.am),s.pm&&(i.pmString=s.pm));t.amString=i.amString;t.pmString=i.pmString};t.IEversion=t.getIEVersion();9>t.IEversion&&0<t.IEversion&&(t.isModern=!1,t.isIE=!0);t.dx=0;t.dy=0;if(document.addEventListener||window.opera)t.isNN=!0,t.isIE=!1,t.dx=.5,t.dy=.5;document.attachEvent&&(t.isNN=!1,t.isIE=!0,t.isModern||(t.dx=0,t.dy=0));window.chrome&&(t.chrome=!0);t.handleMouseUp=function(e){for(var i=t.charts,s=0;s<i.length;s++){var a=i[s];a&&a.handleReleaseOutside&&a.handleReleaseOutside(e)}};t.handleMouseMove=function(e){for(var i=t.charts,s=0;s<i.length;s++){var a=i[s];a&&a.handleMouseMove&&a.handleMouseMove(e)}};t.handleWheel=function(e){for(var i=t.charts,s=0;s<i.length;s++){var a=i[s];if(a&&a.mouseIsOver){(a.mouseWheelScrollEnabled||a.mouseWheelZoomEnabled)&&a.handleWheel&&a.handleWheel(e);break}}};t.resetMouseOver=function(){for(var e=t.charts,i=0;i<e.length;i++){var s=e[i];s&&(s.mouseIsOver=!1)}};t.ready=function(e){t.onReadyArray.push(e)};t.handleLoad=function(){t.isReady=!0;for(var e=t.onReadyArray,i=0;i<e.length;i++){var s=e[i];isNaN(t.processDelay)?s():setTimeout(s,t.processDelay*i)}};t.addInitHandler=function(e,i){t.initHandlers.push({method:e,types:i})};t.callInitHandler=function(e){var i=t.initHandlers;if(t.initHandlers)for(var s=0;s<i.length;s++){var a=i[s];a.types?t.isInArray(a.types,e.type)&&a.method(e):a.method(e)}};t.getUniqueId=function(){t.uid++;return"AmChartsEl-"+t.uid};t.isNN&&(document.addEventListener("mousemove",t.handleMouseMove),document.addEventListener("mouseup",t.handleMouseUp,!0),window.addEventListener("load",t.handleLoad,!0));t.isIE&&(document.attachEvent("onmousemove",t.handleMouseMove),document.attachEvent("onmouseup",t.handleMouseUp),window.attachEvent("onload",t.handleLoad));t.addWheelListeners=function(){t.wheelIsListened||(t.isNN&&(window.addEventListener("DOMMouseScroll",t.handleWheel,!0),document.addEventListener("mousewheel",t.handleWheel,!0)),t.isIE&&document.attachEvent("onmousewheel",t.handleWheel));t.wheelIsListened=!0};t.clear=function(){var e=t.charts;if(e)for(var i=e.length-1;0<=i;i--)e[i].clear();t.updateInt&&clearInterval(t.updateInt);t.requestAnimation&&window.cancelAnimationFrame(t.requestAnimation);t.charts=[];t.isNN&&(document.removeEventListener("mousemove",t.handleMouseMove,!0),document.removeEventListener("mouseup",t.handleMouseUp,!0),window.removeEventListener("load",t.handleLoad,!0),window.removeEventListener("DOMMouseScroll",t.handleWheel,!0),document.removeEventListener("mousewheel",t.handleWheel,!0));t.isIE&&(document.detachEvent("onmousemove",t.handleMouseMove),document.detachEvent("onmouseup",t.handleMouseUp),window.detachEvent("onload",t.handleLoad))};t.makeChart=function(e,i,s){var a=i.type,h=i.theme;t.isString(h)&&(h=t.themes[h],i.theme=h);var r;switch(a){case"serial":r=new t.AmSerialChart(h);break;case"xy":r=new t.AmXYChart(h);break;case"pie":r=new t.AmPieChart(h);break;case"radar":r=new t.AmRadarChart(h);break;case"gauge":r=new t.AmAngularGauge(h);break;case"funnel":r=new t.AmFunnelChart(h);break;case"map":r=new t.AmMap(h);break;case"stock":r=new t.AmStockChart(h);break;case"gantt":r=new t.AmGanttChart(h)}t.extend(r,i);t.isReady?isNaN(s)?r.write(e):setTimeout(function(){t.realWrite(r,e)},s):t.ready(function(){isNaN(s)?r.write(e):setTimeout(function(){t.realWrite(r,e)},s)});return r};t.realWrite=function(t,e){t.write(e)};t.updateCount=0;t.validateAt=Math.round(t.updateRate/10);t.update=function(){var e=t.charts;t.updateCount++;var i=!1;t.updateCount==t.validateAt&&(i=!0,t.updateCount=0);if(e)for(var s=e.length-1;0<=s;s--)e[s].update&&e[s].update(),i&&(e[s].autoResize?e[s].validateSize&&e[s].validateSize():e[s].premeasure&&e[s].premeasure());window.requestAnimationFrame&&(t.requestAnimation=window.requestAnimationFrame(t.update))};"complete"==document.readyState&&t.handleLoad()})();(function(){var t=window.AmCharts;t.toBoolean=function(t,e){if(void 0===t)return e;switch(String(t).toLowerCase()){case"true":case"yes":case"1":return!0;case"false":case"no":case"0":case null:return!1;default:return!!t}};t.removeFromArray=function(t,e){var i;if(void 0!==e&&void 0!==t)for(i=t.length-1;0<=i;i--)t[i]==e&&t.splice(i,1)};t.getPath=function(){var t=document.getElementsByTagName("script");if(t)for(var e=0;e<t.length;e++){var i=t[e].src;if(-1!==i.search(/\/(amcharts|ammap)\.js/))return i.replace(/\/(amcharts|ammap)\.js.*/,"/")}};t.normalizeUrl=function(t){return""!==t&&-1===t.search(/\/$/)?t+"/":t};t.isAbsolute=function(t){return 0===t.search(/^http[s]?:|^\//)};t.isInArray=function(t,e){for(var i=0;i<t.length;i++)if(t[i]==e)return!0;return!1};t.getDecimals=function(t){var e=0;isNaN(t)||(t=String(t),-1!=t.indexOf("e-")?e=Number(t.split("-")[1]):-1!=t.indexOf(".")&&(e=t.split(".")[1].length));return e};t.wordwrap=function(e,i,s,a){var h,r,n,o;e+="";if(1>i)return e;h=-1;for(e=(o=e.split(/\r\n|\n|\r/)).length;++h<e;o[h]+=n){n=o[h];for(o[h]="";n.length>i;o[h]+=t.trim(n.slice(0,r))+((n=n.slice(r)).length?s:""))r=2==a||(r=n.slice(0,i+1).match(/\S*(\s)?$/))[1]?i:r.input.length-r[0].length||1==a&&i||r.input.length+(r=n.slice(i).match(/^\S*/))[0].length;n=t.trim(n)}return o.join(s)};t.trim=function(t){return t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};t.wrappedText=function(e,i,s,a,h,r,n,o){var l=t.text(e,i,s,a,h,r,n);if(l){var d=l.getBBox();if(d.width>o){var u="\n";t.isModern||(u="<br>");o=Math.floor(o/(d.width/i.length));2<o&&(o-=2);i=t.wordwrap(i,o,u,!0);l.remove();l=t.text(e,i,s,a,h,r,n)}}return l};t.getStyle=function(t,e){var i="";if(document.defaultView&&document.defaultView.getComputedStyle)try{i=document.defaultView.getComputedStyle(t,"").getPropertyValue(e)}catch(s){}else t.currentStyle&&(e=e.replace(/\-(\w)/g,function(t,e){return e.toUpperCase()}),i=t.currentStyle[e]);return i};t.removePx=function(t){if(void 0!==t)return Number(t.substring(0,t.length-2))};t.getURL=function(e,i){if(e)if("_self"!=i&&i)if("_top"==i&&window.top)window.top.location.href=e;else if("_parent"==i&&window.parent)window.parent.location.href=e;else if("_blank"==i)window.open(e);else{var s=document.getElementsByName(i)[0];s?s.src=e:(s=t.windows[i])?s.opener&&!s.opener.closed?s.location.href=e:t.windows[i]=window.open(e):t.windows[i]=window.open(e)}else window.location.href=e};t.ifArray=function(t){return t&&"object"==typeof t&&0<t.length?!0:!1};t.callMethod=function(t,e){var i;for(i=0;i<e.length;i++){var s=e[i];if(s){if(s[t])s[t]();var a=s.length;if(0<a){var h;for(h=0;h<a;h++){var r=s[h];if(r&&r[t])r[t]()}}}}};t.toNumber=function(t){return"number"==typeof t?t:Number(String(t).replace(/[^0-9\-.]+/g,""))};t.toColor=function(t){if(""!==t&&void 0!==t)if(-1!=t.indexOf(",")){t=t.split(",");var e;for(e=0;e<t.length;e++){var i=t[e].substring(t[e].length-6,t[e].length);t[e]="#"+i}}else t=t.substring(t.length-6,t.length),t="#"+t;return t};t.toCoordinate=function(t,e,i){var s;void 0!==t&&(t=String(t),i&&i<e&&(e=i),s=Number(t),-1!=t.indexOf("!")&&(s=e-Number(t.substr(1))),-1!=t.indexOf("%")&&(s=e*Number(t.substr(0,t.length-1))/100));return s};t.fitToBounds=function(t,e,i){t<e&&(t=e);t>i&&(t=i);return t};t.isDefined=function(t){return void 0===t?!1:!0};t.stripNumbers=function(t){return t.replace(/[0-9]+/g,"")};t.roundTo=function(t,e){if(0>e)return t;var i=Math.pow(10,e);return Math.round(t*i)/i};t.toFixed=function(t,e){var i=String(Math.round(t*Math.pow(10,e)));if(0<e){var s=i.length;if(s<e){var a;for(a=0;a<e-s;a++)i="0"+i}s=i.substring(0,i.length-e);""===s&&(s=0);return s+"."+i.substring(i.length-e,i.length)}return String(i)};t.formatDuration=function(e,i,s,a,h,r){var n=t.intervals,o=r.decimalSeparator;if(e>=n[i].contains){var l=e-Math.floor(e/n[i].contains)*n[i].contains;"ss"==i?(l=t.formatNumber(l,r),1==l.split(o)[0].length&&(l="0"+l)):l=t.roundTo(l,r.precision);("mm"==i||"hh"==i)&&10>l&&(l="0"+l);s=l+""+a[i]+""+s;e=Math.floor(e/n[i].contains);i=n[i].nextInterval;return t.formatDuration(e,i,s,a,h,r)}"ss"==i&&(e=t.formatNumber(e,r),1==e.split(o)[0].length&&(e="0"+e));("mm"==i||"hh"==i)&&10>e&&(e="0"+e);s=e+""+a[i]+""+s;if(n[h].count>n[i].count)for(e=n[i].count;e<n[h].count;e++)i=n[i].nextInterval,"ss"==i||"mm"==i||"hh"==i?s="00"+a[i]+""+s:"DD"==i&&(s="0"+a[i]+""+s);":"==s.charAt(s.length-1)&&(s=s.substring(0,s.length-1));return s};t.formatNumber=function(e,i,s,a,h){e=t.roundTo(e,i.precision);isNaN(s)&&(s=i.precision);var r=i.decimalSeparator;i=i.thousandsSeparator;var n;n=0>e?"-":"";e=Math.abs(e);var o=String(e),l=!1;-1!=o.indexOf("e")&&(l=!0);0<=s&&!l&&(o=t.toFixed(e,s));var d="";if(l)d=o;else{var o=o.split("."),l=String(o[0]),u;for(u=l.length;0<=u;u-=3)d=u!=l.length?0!==u?l.substring(u-3,u)+i+d:l.substring(u-3,u)+d:l.substring(u-3,u);void 0!==o[1]&&(d=d+r+o[1]);void 0!==s&&0<s&&"0"!=d&&(d=t.addZeroes(d,r,s))}d=n+d;""===n&&!0===a&&0!==e&&(d="+"+d);!0===h&&(d+="%");return d};t.addZeroes=function(e,i,s){e=e.split(i);void 0===e[1]&&0<s&&(e[1]="0");return e[1].length<s?(e[1]+="0",t.addZeroes(e[0]+i+e[1],i,s)):void 0!==e[1]?e[0]+i+e[1]:e[0]};t.scientificToNormal=function(t){var e;t=String(t).split("e");var i;if("-"==t[1].substr(0,1)){e="0.";for(i=0;i<Math.abs(Number(t[1]))-1;i++)e+="0";e+=t[0].split(".").join("")}else{var s=0;e=t[0].split(".");e[1]&&(s=e[1].length);e=t[0].split(".").join("");for(i=0;i<Math.abs(Number(t[1]))-s;i++)e+="0"}return e};t.toScientific=function(t,e){if(0===t)return"0";var i=Math.floor(Math.log(Math.abs(t))*Math.LOG10E),s=String(s).split(".").join(e);return String(s)+"e"+i};t.randomColor=function(){return"#"+("00000"+(16777216*Math.random()<<0).toString(16)).substr(-6)};t.hitTest=function(e,i,s){var a=!1,h=e.x,r=e.x+e.width,n=e.y,o=e.y+e.height,l=t.isInRectangle;a||(a=l(h,n,i));a||(a=l(h,o,i));a||(a=l(r,n,i));a||(a=l(r,o,i));a||!0===s||(a=t.hitTest(i,e,!0));return a};t.isInRectangle=function(t,e,i){return t>=i.x-5&&t<=i.x+i.width+5&&e>=i.y-5&&e<=i.y+i.height+5?!0:!1};t.isPercents=function(t){if(-1!=String(t).indexOf("%"))return!0};t.formatValue=function(e,i,s,a,h,r,n,o){if(i){void 0===h&&(h="");var l;for(l=0;l<s.length;l++){var d=s[l],u=i[d];void 0!==u&&(u=r?t.addPrefix(u,o,n,a):t.formatNumber(u,a),e=e.replace(new RegExp("\\[\\["+h+""+d+"\\]\\]","g"),u))}}return e};t.formatDataContextValue=function(t,e){if(t){var i=t.match(/\[\[.*?\]\]/g),s;for(s=0;s<i.length;s++){var a=i[s],a=a.substr(2,a.length-4);void 0!==e[a]&&(t=t.replace(new RegExp("\\[\\["+a+"\\]\\]","g"),e[a]))}}return t};t.massReplace=function(t,e){for(var i in e)if(e.hasOwnProperty(i)){var s=e[i];void 0===s&&(s="");t=t.replace(i,s)}return t};t.cleanFromEmpty=function(t){return t.replace(/\[\[[^\]]*\]\]/g,"")};t.addPrefix=function(e,i,s,a,h){var r=t.formatNumber(e,a),n="",o,l,d;if(0===e)return"0";0>e&&(n="-");e=Math.abs(e);if(1<e)for(o=i.length-1;-1<o;o--){if(e>=i[o].number&&(l=e/i[o].number,d=Number(a.precision),1>d&&(d=1),s=t.roundTo(l,d),d=t.formatNumber(s,{precision:-1,decimalSeparator:a.decimalSeparator,thousandsSeparator:a.thousandsSeparator}),!h||l==s)){r=n+""+d+""+i[o].prefix;break}}else for(o=0;o<s.length;o++)if(e<=s[o].number){l=e/s[o].number;d=Math.abs(Math.floor(Math.log(l)*Math.LOG10E));l=t.roundTo(l,d);r=n+""+l+""+s[o].prefix;break}return r};t.remove=function(t){t&&t.remove()};t.getEffect=function(t){">"==t&&(t="easeOutSine");"<"==t&&(t="easeInSine");"elastic"==t&&(t="easeOutElastic");return t};t.getObjById=function(t,e){var i,s;for(s=0;s<t.length;s++){var a=t[s];if(a.id==e){i=a;break}}return i};t.applyTheme=function(e,i,s){i||(i=t.theme);try{i=JSON.parse(JSON.stringify(i))}catch(a){}i&&i[s]&&t.extend(e,i[s])};t.isString=function(t){return"string"==typeof t?!0:!1};t.extend=function(t,e,i){var s;t||(t={});for(s in e)i?t.hasOwnProperty(s)||(t[s]=e[s]):t[s]=e[s];return t};t.copyProperties=function(t,e){for(var i in t)t.hasOwnProperty(i)&&"events"!=i&&void 0!==t[i]&&"function"!=typeof t[i]&&"cname"!=i&&(e[i]=t[i])};t.processObject=function(e,i,s,a){if(!1===e instanceof i&&(e=a?t.extend(new i(s),e):t.extend(e,new i(s),!0),e.listeners))for(var h in e.listeners)i=e.listeners[h],e.addListener(i.event,i.method);return e};t.fixNewLines=function(t){var e=RegExp("\\n","g");t&&(t=t.replace(e,"<br />"));return t};t.fixBrakes=function(e){if(t.isModern){var i=RegExp("<br>","g");e&&(e=e.replace(i,"\n"))}else e=t.fixNewLines(e);return e};t.deleteObject=function(e,i){if(e){if(void 0===i||null===i)i=20;if(0!==i)if("[object Array]"===Object.prototype.toString.call(e))for(var s=0;s<e.length;s++)t.deleteObject(e[s],i-1),e[s]=null;else if(e&&!e.tagName)try{for(s in e.theme=null,e)e[s]&&("object"==typeof e[s]&&t.deleteObject(e[s],i-1),"function"!=typeof e[s]&&(e[s]=null))}catch(a){}}};t.bounce=function(t,e,i,s,a){return(e/=a)<1/2.75?7.5625*s*e*e+i:e<2/2.75?s*(7.5625*(e-=1.5/2.75)*e+.75)+i:e<2.5/2.75?s*(7.5625*(e-=2.25/2.75)*e+.9375)+i:s*(7.5625*(e-=2.625/2.75)*e+.984375)+i};t.easeInOutQuad=function(t,e,i,s,a){e/=a/2;if(1>e)return s/2*e*e+i;e--;return-s/2*(e*(e-2)-1)+i};t.easeInSine=function(t,e,i,s,a){return-s*Math.cos(e/a*(Math.PI/2))+s+i};t.easeOutSine=function(t,e,i,s,a){return s*Math.sin(e/a*(Math.PI/2))+i};t.easeOutElastic=function(t,e,i,s,a){t=1.70158;var h=0,r=s;if(0===e)return i;if(1==(e/=a))return i+s;h||(h=.3*a);r<Math.abs(s)?(r=s,t=h/4):t=h/(2*Math.PI)*Math.asin(s/r);return r*Math.pow(2,-10*e)*Math.sin(2*(e*a-t)*Math.PI/h)+s+i};t.fixStepE=function(e){e=e.toExponential(0).split("e");var i=Number(e[1]);9==Number(e[0])&&i++;return t.generateNumber(1,i)};t.generateNumber=function(t,e){var i="",s;s=0>e?Math.abs(e)-1:Math.abs(e);var a;for(a=0;a<s;a++)i+="0";return 0>e?Number("0."+i+String(t)):Number(String(t)+i)};t.setCN=function(t,e,i,s){if(t.addClassNames&&e&&(e=e.node)&&i){var a=e.getAttribute("class");t=t.classNamePrefix+"-";s&&(t="");a?e.setAttribute("class",a+" "+t+i):e.setAttribute("class",t+i)}};t.removeCN=function(t,e,i){e&&(e=e.node)&&i&&(e=e.classList)&&e.remove(t.classNamePrefix+"-"+i)};t.parseDefs=function(e,i){for(var s in e){var a=typeof e[s];if(0<e[s].length&&"object"==a)for(var h=0;h<e[s].length;h++)a=document.createElementNS(t.SVG_NS,s),i.appendChild(a),t.parseDefs(e[s][h],a);else"object"==a?(a=document.createElementNS(t.SVG_NS,s),i.appendChild(a),t.parseDefs(e[s],a)):i.setAttribute(s,e[s])}}})();(function(){var t=window.AmCharts;t.AxisBase=t.Class({construct:function(e){this.createEvents("clickItem","rollOverItem","rollOutItem","rollOverGuide","rollOutGuide","clickGuide");this.titleDY=this.y=this.x=this.dy=this.dx=0;this.axisThickness=1;this.axisColor="#000000";this.axisAlpha=1;this.gridCount=this.tickLength=5;this.gridAlpha=.15;this.gridThickness=1;this.gridColor="#000000";this.dashLength=0;this.labelFrequency=1;this.showLastLabel=this.showFirstLabel=!0;this.fillColor="#FFFFFF";this.fillAlpha=0;this.labelsEnabled=!0;this.labelRotation=0;this.autoGridCount=!0;this.offset=0;this.guides=[];this.visible=!0;this.counter=0;this.guides=[];this.ignoreAxisWidth=this.inside=!1;this.minHorizontalGap=75;this.minVerticalGap=35;this.titleBold=!0;this.minorGridEnabled=!1;this.minorGridAlpha=.07;this.autoWrap=!1;this.titleAlign="middle";this.labelOffset=0;this.bcn="axis-";this.centerLabels=!1;this.firstDayOfWeek=1;this.centerLabelOnFullPeriod=this.markPeriodChange=this.boldPeriodBeginning=!0;this.periods=[{period:"fff",count:1},{period:"fff",count:5},{period:"fff",count:10},{period:"fff",count:50},{period:"fff",count:100},{period:"fff",count:500},{period:"ss",count:1},{period:"ss",count:5},{period:"ss",count:10},{period:"ss",count:30},{period:"mm",count:1},{period:"mm",count:5},{period:"mm",count:10},{period:"mm",count:30},{period:"hh",count:1},{period:"hh",count:3},{period:"hh",count:6},{period:"hh",count:12},{period:"DD",count:1},{period:"DD",count:2},{period:"DD",count:3},{period:"DD",count:4},{period:"DD",count:5},{period:"WW",count:1},{period:"MM",count:1},{period:"MM",count:2},{period:"MM",count:3},{period:"MM",count:6},{period:"YYYY",count:1},{period:"YYYY",count:2},{period:"YYYY",count:5},{period:"YYYY",count:10},{period:"YYYY",count:50},{period:"YYYY",count:100}];this.dateFormats=[{period:"fff",format:"NN:SS.QQQ"},{period:"ss",format:"JJ:NN:SS"},{period:"mm",format:"JJ:NN"},{period:"hh",format:"JJ:NN"},{period:"DD",format:"MMM DD"},{period:"WW",format:"MMM DD"},{period:"MM",format:"MMM"},{period:"YYYY",format:"YYYY"}];this.nextPeriod={fff:"ss",ss:"mm",mm:"hh",hh:"DD",DD:"MM",MM:"YYYY"};t.applyTheme(this,e,"AxisBase")},zoom:function(t,e){this.start=t;this.end=e;this.dataChanged=!0;this.draw()},fixAxisPosition:function(){var t=this.position;"H"==this.orientation?("left"==t&&(t="bottom"),"right"==t&&(t="top")):("bottom"==t&&(t="left"),"top"==t&&(t="right"));this.position=t},init:function(){this.createBalloon()},draw:function(){var t=this.chart;this.prevBY=this.prevBX=NaN;this.allLabels=[];this.counter=0;this.destroy();this.fixAxisPosition();this.setBalloonBounds();this.labels=[];var e=t.container,i=e.set();t.gridSet.push(i);this.set=i;e=e.set();t.axesLabelsSet.push(e);this.labelsSet=e;this.axisLine=new this.axisRenderer(this);this.autoGridCount?("V"==this.orientation?(t=this.height/this.minVerticalGap,3>t&&(t=3)):t=this.width/this.minHorizontalGap,this.gridCountR=Math.max(t,1)):this.gridCountR=this.gridCount;this.axisWidth=this.axisLine.axisWidth;this.addTitle()},setOrientation:function(t){this.orientation=t?"H":"V"},addTitle:function(){var e=this.title;this.titleLabel=null;if(e){var i=this.chart,s=this.titleColor;void 0===s&&(s=i.color);var a=this.titleFontSize;isNaN(a)&&(a=i.fontSize+1);e=t.text(i.container,e,s,i.fontFamily,a,this.titleAlign,this.titleBold);t.setCN(i,e,this.bcn+"title");this.titleLabel=e}},positionTitle:function(){var e=this.titleLabel;if(e){var i,s,a=this.labelsSet,h={};0<a.length()?h=a.getBBox():(h.x=0,h.y=0,h.width=this.width,h.height=this.height,t.VML&&(h.y+=this.y,h.x+=this.x));a.push(e);var a=h.x,r=h.y;t.VML&&(r-=this.y,a-=this.x);var n=h.width,h=h.height,o=this.width,l=this.height,d=0,u=e.getBBox().height/2,c=this.inside,p=this.titleAlign;switch(this.position){case"top":i="left"==p?-1:"right"==p?o:o/2;s=r-10-u;break;case"bottom":i="left"==p?-1:"right"==p?o:o/2;s=r+h+10+u;break;case"left":i=a-10-u;c&&(i-=5);d=-90;s=("left"==p?l+1:"right"==p?-1:l/2)+this.titleDY;break;case"right":i=a+n+10+u,c&&(i+=7),s=("left"==p?l+2:"right"==p?-2:l/2)+this.titleDY,d=-90}this.marginsChanged?(e.translate(i,s),this.tx=i,this.ty=s):e.translate(this.tx,this.ty);this.marginsChanged=!1;isNaN(this.titleRotation)||(d=this.titleRotation);0!==d&&e.rotate(d)}},pushAxisItem:function(t,e){var i=this,s=t.graphics();0<s.length()&&(e?i.labelsSet.push(s):i.set.push(s));if(s=t.getLabel())i.labelsSet.push(s),s.click(function(e){i.handleMouse(e,t,"clickItem")}).touchend(function(e){i.handleMouse(e,t,"clickItem")}).mouseover(function(e){i.handleMouse(e,t,"rollOverItem")}).mouseout(function(e){i.handleMouse(e,t,"rollOutItem")})},handleMouse:function(t,e,i){this.fire({type:i,value:e.value,serialDataItem:e.serialDataItem,axis:this,target:e.label,chart:this.chart,event:t})},addGuide:function(e){for(var i=this.guides,s=!1,a=i.length,h=0;h<i.length;h++)i[h]==e&&(s=!0,a=h);e=t.processObject(e,t.Guide,this.theme);e.id||(e.id="guideAuto"+a+"_"+(new Date).getTime());s||i.push(e)},removeGuide:function(t){var e=this.guides,i;for(i=0;i<e.length;i++)e[i]==t&&e.splice(i,1)},handleGuideOver:function(t){clearTimeout(this.chart.hoverInt);var e=t.graphics.getBBox(),i=this.x+e.x+e.width/2,e=this.y+e.y+e.height/2,s=t.fillColor;void 0===s&&(s=t.lineColor);this.chart.showBalloon(t.balloonText,s,!0,i,e);this.fire({type:"rollOverGuide",guide:t,chart:this.chart})},handleGuideOut:function(t){this.chart.hideBalloon();this.fire({type:"rollOutGuide",guide:t,chart:this.chart})},handleGuideClick:function(t){this.chart.hideBalloon();this.fire({type:"clickGuide",guide:t,chart:this.chart})},addEventListeners:function(t,e){var i=this;t.mouseover(function(){i.handleGuideOver(e)});t.mouseup(function(){i.handleGuideClick(e)});t.touchstart(function(){i.handleGuideOver(e)});t.mouseout(function(){i.handleGuideOut(e)})},getBBox:function(){var e;this.labelsSet&&(e=this.labelsSet.getBBox());e?t.VML||(e={x:e.x+this.x,y:e.y+this.y,width:e.width,height:e.height}):e={x:0,y:0,width:0,height:0};return e},destroy:function(){t.remove(this.set);t.remove(this.labelsSet);var e=this.axisLine;e&&t.remove(e.axisSet);t.remove(this.grid0)},chooseMinorFrequency:function(t){for(var e=10;0<e;e--)if(t/e==Math.round(t/e))return t/e},parseDatesDraw:function(){var e,i=this.chart,s=this.showFirstLabel,a=this.showLastLabel,h,r="",n=t.extractPeriod(this.minPeriod),o=t.getPeriodDuration(n.period,n.count),l,d,u,c,p,m=this.firstDayOfWeek,f=this.boldPeriodBeginning;e=this.minorGridEnabled;var g,v=this.gridAlpha,b,x=this.choosePeriod(0),N=x.period,x=x.count,C=t.getPeriodDuration(N,x);C<o&&(N=n.period,x=n.count,C=o);n=N;"WW"==n&&(n="DD");this.stepWidth=this.getStepWidth(this.timeDifference);var y=Math.ceil(this.timeDifference/C)+5,w=l=t.resetDateToMin(new Date(this.startTime-C),N,x,m).getTime();if(n==N&&1==x&&this.centerLabelOnFullPeriod||this.autoWrap||this.centerLabels)u=C*this.stepWidth,this.autoWrap&&!this.centerLabels&&(u=-u);this.cellWidth=o*this.stepWidth;c=Math.round(l/C);o=-1;c/2==Math.round(c/2)&&(o=-2,l-=C);c=this.firstTime;var M=0,A=0;e&&1<x&&(g=this.chooseMinorFrequency(x),b=t.getPeriodDuration(N,g),"DD"==N&&(b+=t.getPeriodDuration("hh")),"fff"==N&&(b=1));if(0<this.gridCountR)for(y-5-o>this.autoRotateCount&&!isNaN(this.autoRotateAngle)&&(this.labelRotationR=this.autoRotateAngle),e=o;e<=y;e++){p=c+C*(e+Math.floor((w-c)/C))-M;"DD"==N&&(p+=36e5);p=t.resetDateToMin(new Date(p),N,x,m).getTime();"MM"==N&&(h=(p-l)/C,1.5<=(p-l)/C&&(p=p-(h-1)*C+t.getPeriodDuration("DD",3),p=t.resetDateToMin(new Date(p),N,1).getTime(),M+=C));h=(p-this.startTime)*this.stepWidth;if("radar"==i.type){if(h=this.axisWidth-h,0>h||h>this.axisWidth)continue}else this.rotate?"date"==this.type&&"middle"==this.gridPosition&&(A=-C*this.stepWidth/2):"date"==this.type&&(h=this.axisWidth-h);r=!1;this.nextPeriod[n]&&(r=this.checkPeriodChange(this.nextPeriod[n],1,p,l,n));l=!1;r&&this.markPeriodChange?(r=this.dateFormatsObject[this.nextPeriod[n]],this.twoLineMode&&(r=this.dateFormatsObject[n]+"\n"+r,r=t.fixBrakes(r)),l=!0):r=this.dateFormatsObject[n];f||(l=!1);this.currentDateFormat=r;r=t.formatDate(new Date(p),r,i);if(e==o&&!s||e==y&&!a)r=" ";this.labelFunction&&(r=this.labelFunction(r,new Date(p),this,N,x,d).toString());this.boldLabels&&(l=!0);d=new this.axisItemRenderer(this,h,r,!1,u,A,!1,l);this.pushAxisItem(d);d=l=p;if(!isNaN(g))for(h=1;h<x;h+=g)this.gridAlpha=this.minorGridAlpha,r=p+b*h,r=t.resetDateToMin(new Date(r),N,g,m).getTime(),r=new this.axisItemRenderer(this,(r-this.startTime)*this.stepWidth,void 0,void 0,void 0,void 0,void 0,void 0,void 0,!0),this.pushAxisItem(r);this.gridAlpha=v}},choosePeriod:function(e){var i=t.getPeriodDuration(this.periods[e].period,this.periods[e].count),s=this.periods;return this.timeDifference<i&&0<e?s[e-1]:Math.ceil(this.timeDifference/i)<=this.gridCountR?s[e]:e+1<s.length?this.choosePeriod(e+1):s[e]},getStepWidth:function(t){var e;this.startOnAxis?(e=this.axisWidth/(t-1),1==t&&(e=this.axisWidth)):e=this.axisWidth/t;return e},timeZoom:function(t,e){this.startTime=t;this.endTime=e},minDuration:function(){var e=t.extractPeriod(this.minPeriod);return t.getPeriodDuration(e.period,e.count)},checkPeriodChange:function(e,i,s,a,h){s=new Date(s);var r=new Date(a),n=this.firstDayOfWeek;a=i;"DD"==e&&(i=1);s=t.resetDateToMin(s,e,i,n).getTime();i=t.resetDateToMin(r,e,i,n).getTime();return"DD"==e&&"hh"!=h&&s-i<t.getPeriodDuration(e,a)-t.getPeriodDuration("hh",1)?!1:s!=i?!0:!1},generateDFObject:function(){this.dateFormatsObject={};var t;for(t=0;t<this.dateFormats.length;t++){var e=this.dateFormats[t];this.dateFormatsObject[e.period]=e.format}},hideBalloon:function(){this.balloon&&this.balloon.hide&&this.balloon.hide();this.prevBY=this.prevBX=NaN},formatBalloonText:function(t){return t},showBalloon:function(t,e,i,s){var a=this.offset;switch(this.position){case"bottom":e=this.height+a;break;case"top":e=-a;break;case"left":t=-a;break;case"right":t=this.width+a}i||(i=this.currentDateFormat);if("V"==this.orientation){if(0>e||e>this.height)return;if(isNaN(e)){this.hideBalloon();return}e=this.adjustBalloonCoordinate(e,s);s=this.coordinateToValue(e)}else{if(0>t||t>this.width)return;if(isNaN(t)){this.hideBalloon();return}t=this.adjustBalloonCoordinate(t,s);s=this.coordinateToValue(t)}var h;if(a=this.chart.chartCursor)h=a.index;if(this.balloon&&void 0!==s&&this.balloon.enabled){if(this.balloonTextFunction){if("date"==this.type||!0===this.parseDates)s=new Date(s);s=this.balloonTextFunction(s)}else this.balloonText?s=this.formatBalloonText(this.balloonText,h,i):isNaN(s)||(s=this.formatValue(s,i));if(t!=this.prevBX||e!=this.prevBY)this.balloon.setPosition(t,e),this.prevBX=t,this.prevBY=e,s&&this.balloon.showBalloon(s)}},adjustBalloonCoordinate:function(t){return t},createBalloon:function(){var e=this.chart,i=e.chartCursor;i&&(i=i.cursorPosition,"mouse"!=i&&(this.stickBalloonToCategory=!0),"start"==i&&(this.stickBalloonToStart=!0),"ValueAxis"==this.cname&&(this.stickBalloonToCategory=!1));this.balloon&&(this.balloon.destroy&&this.balloon.destroy(),t.extend(this.balloon,e.balloon,!0))},setBalloonBounds:function(){var t=this.balloon;if(t){var e=this.chart;t.cornerRadius=0;t.shadowAlpha=0;t.borderThickness=1;t.borderAlpha=1;t.adjustBorderColor=!1;t.showBullet=!1;this.balloon=t;t.chart=e;t.mainSet=e.plotBalloonsSet;t.pointerWidth=this.tickLength;if(this.parseDates||"date"==this.type)t.pointerWidth=0;t.className=this.id;e="V";"V"==this.orientation&&(e="H");this.stickBalloonToCategory||(t.animationDuration=0);var i,s,a,h,r=this.inside,n=this.width,o=this.height;switch(this.position){case"bottom":i=0;s=n;r?(a=0,h=o):(a=o,h=o+1e3);break;case"top":i=0;s=n;r?(a=0,h=o):(a=-1e3,h=0);break;case"left":a=0;h=o;r?(i=0,s=n):(i=-1e3,s=0);break;case"right":a=0,h=o,r?(i=0,s=n):(i=n,s=n+1e3)}t.drop||(t.pointerOrientation=e);t.setBounds(i,a,s,h)}}})})();(function(){var t=window.AmCharts;t.ValueAxis=t.Class({inherits:t.AxisBase,construct:function(e){this.cname="ValueAxis";this.createEvents("axisChanged","logarithmicAxisFailed","axisZoomed","axisIntZoomed");t.ValueAxis.base.construct.call(this,e);this.dataChanged=!0;this.stackType="none";this.position="left";this.unitPosition="right";this.includeAllValues=this.recalculateToPercents=this.includeHidden=this.includeGuidesInMinMax=this.integersOnly=!1;this.durationUnits={DD:"d. ",hh:":",mm:":",ss:""};this.scrollbar=!1;this.baseValue=0;this.radarCategoriesEnabled=!0;this.axisFrequency=1;this.gridType="polygons";this.useScientificNotation=!1;this.axisTitleOffset=10;this.pointPosition="axis";this.minMaxMultiplier=1;this.logGridLimit=2;this.totalTextOffset=this.treatZeroAs=0;this.minPeriod="ss";this.relativeStart=0;this.relativeEnd=1;t.applyTheme(this,e,this.cname)},updateData:function(){0>=this.gridCountR&&(this.gridCountR=1);this.totals=[];this.data=this.chart.chartData;var e=this.chart;"xy"!=e.type&&(this.stackGraphs("smoothedLine"),this.stackGraphs("line"),this.stackGraphs("column"),this.stackGraphs("step"));this.recalculateToPercents&&this.recalculate();this.synchronizationMultiplier&&this.synchronizeWith?(t.isString(this.synchronizeWith)&&(this.synchronizeWith=e.getValueAxisById(this.synchronizeWith)),this.synchronizeWith&&(this.synchronizeWithAxis(this.synchronizeWith),this.foundGraphs=!0)):(this.foundGraphs=!1,this.getMinMax(),0===this.start&&this.end==this.data.length-1&&isNaN(this.minZoom)&&isNaN(this.maxZoom)&&(this.fullMin=this.min,this.fullMax=this.max,"date"!=this.type&&this.strictMinMax&&(isNaN(this.minimum)||(this.fullMin=this.minimum),isNaN(this.maximum)||(this.fullMax=this.maximum)),this.logarithmic&&(this.fullMin=this.logMin,0===this.fullMin&&(this.fullMin=this.treatZeroAs)),"date"==this.type&&(this.minimumDate||(this.fullMin=this.minRR),this.maximumDate||(this.fullMax=this.maxRR),this.strictMinMax&&(this.minimumDate&&(this.fullMin=this.minimumDate.getTime()),this.maximumDate&&(this.fullMax=this.maximumDate.getTime())))))},draw:function(){t.ValueAxis.base.draw.call(this);var e=this.chart,i=this.set;this.labelRotationR=this.labelRotation;t.setCN(e,this.set,"value-axis value-axis-"+this.id);t.setCN(e,this.labelsSet,"value-axis value-axis-"+this.id);t.setCN(e,this.axisLine.axisSet,"value-axis value-axis-"+this.id);var s=this.type;"duration"==s&&(this.duration="ss");!0===this.dataChanged&&(this.updateData(),this.dataChanged=!1);"date"==s&&(this.logarithmic=!1,this.min=this.minRR,this.max=this.maxRR,this.reversed=!1,this.getDateMinMax());if(this.logarithmic){var a=this.treatZeroAs,h=this.getExtremes(0,this.data.length-1).min;!isNaN(this.minimum)&&this.minimum<h&&(h=this.minimum);this.logMin=h;this.minReal<h&&(this.minReal=h);isNaN(this.minReal)&&(this.minReal=h);0<a&&0===h&&(this.minReal=h=a);if(0>=h||0>=this.minimum){this.fire({type:"logarithmicAxisFailed",chart:e});return}}this.grid0=null;var r,n,o=e.dx,l=e.dy,a=!1,h=this.logarithmic;if(isNaN(this.min)||isNaN(this.max)||!this.foundGraphs||Infinity==this.min||-Infinity==this.max)a=!0;else{"date"==this.type&&this.min==this.max&&(this.max+=this.minDuration(),this.min-=this.minDuration());var d=this.labelFrequency,u=this.showFirstLabel,c=this.showLastLabel,p=1,m=0;this.minCalc=this.min;this.maxCalc=this.max;if(this.strictMinMax&&(isNaN(this.minimum)||(this.min=this.minimum),isNaN(this.maximum)||(this.max=this.maximum),this.min==this.max))return;isNaN(this.minZoom)||(this.minReal=this.min=this.minZoom);isNaN(this.maxZoom)||(this.max=this.maxZoom);if(this.logarithmic){n=this.fullMin;var f=this.fullMax;isNaN(this.minimum)||(n=this.minimum);isNaN(this.maximum)||(f=this.maximum);var f=Math.log(f)*Math.LOG10E-Math.log(n)*Math.LOG10E,g=Math.log(this.max)/Math.LN10-Math.log(n)*Math.LOG10E;this.relativeStart=t.roundTo((Math.log(this.minReal)/Math.LN10-Math.log(n)*Math.LOG10E)/f,5); this.relativeEnd=t.roundTo(g/f,5)}else this.relativeStart=t.roundTo(t.fitToBounds((this.min-this.fullMin)/(this.fullMax-this.fullMin),0,1),5),this.relativeEnd=t.roundTo(t.fitToBounds((this.max-this.fullMin)/(this.fullMax-this.fullMin),0,1),5);var f=Math.round((this.maxCalc-this.minCalc)/this.step)+1,v;!0===h?(v=Math.log(this.max)*Math.LOG10E-Math.log(this.minReal)*Math.LOG10E,this.stepWidth=this.axisWidth/v,v>this.logGridLimit&&(f=Math.ceil(Math.log(this.max)*Math.LOG10E)+1,m=Math.round(Math.log(this.minReal)*Math.LOG10E),f>this.gridCountR&&(p=Math.ceil(f/this.gridCountR)))):this.stepWidth=this.axisWidth/(this.max-this.min);var b=0;1>this.step&&-1<this.step&&(b=t.getDecimals(this.step));this.integersOnly&&(b=0);b>this.maxDecCount&&(b=this.maxDecCount);g=this.precision;isNaN(g)||(b=g);isNaN(this.maxZoom)&&(this.max=t.roundTo(this.max,this.maxDecCount),this.min=t.roundTo(this.min,this.maxDecCount));n={};n.precision=b;n.decimalSeparator=e.nf.decimalSeparator;n.thousandsSeparator=e.nf.thousandsSeparator;this.numberFormatter=n;var x;this.exponential=!1;for(n=m;n<f;n+=p){var N=t.roundTo(this.step*n+this.min,b);-1!=String(N).indexOf("e")&&(this.exponential=!0)}this.duration&&(this.maxInterval=t.getMaxInterval(this.max,this.duration));var b=this.step,C,N=this.minorGridAlpha;this.minorGridEnabled&&(C=this.getMinorGridStep(b,this.stepWidth*b));if(this.autoGridCount||0!==this.gridCount)if("date"==s)this.generateDFObject(),this.timeDifference=this.max-this.min,this.maxTime=this.lastTime=this.max,this.startTime=this.firstTime=this.min,this.parseDatesDraw();else for(f>=this.autoRotateCount&&!isNaN(this.autoRotateAngle)&&(this.labelRotationR=this.autoRotateAngle),s=this.minCalc,h&&(f++,s=this.maxCalc-f*b),this.gridCountReal=f,n=this.startCount=m;n<f;n+=p)if(m=b*n+s,m=t.roundTo(m,this.maxDecCount+1),!this.integersOnly||Math.round(m)==m)if(isNaN(g)||Number(t.toFixed(m,g))==m){if(!0===h)if(v>this.logGridLimit)m=Math.pow(10,n);else if(0>=m&&(m=s+b*n+b/2,0>=m))continue;x=this.formatValue(m,!1,n);Math.round(n/d)!=n/d&&(x=void 0);if(0===n&&!u||n==f-1&&!c)x=" ";r=this.getCoordinate(m);var y;this.rotate&&this.autoWrap&&(y=this.stepWidth*b-10);x=new this.axisItemRenderer(this,r,x,void 0,y,void 0,void 0,this.boldLabels);this.pushAxisItem(x);if(m==this.baseValue&&"radar"!=e.type){var w,M,A=this.width,S=this.height;"H"==this.orientation?0<=r&&r<=A+1&&(w=[r,r,r+o],M=[S,0,l]):0<=r&&r<=S+1&&(w=[0,A,A+o],M=[r,r,r+l]);w&&(r=t.fitToBounds(2*this.gridAlpha,0,1),isNaN(this.zeroGridAlpha)||(r=this.zeroGridAlpha),r=t.line(e.container,w,M,this.gridColor,r,1,this.dashLength),r.translate(this.x,this.y),this.grid0=r,e.axesSet.push(r),r.toBack(),t.setCN(e,r,this.bcn+"zero-grid-"+this.id),t.setCN(e,r,this.bcn+"zero-grid"))}if(!isNaN(C)&&0<N&&n<f-1){r=b/C;h&&(C=b*(n+p)+this.minCalc,C=t.roundTo(C,this.maxDecCount+1),v>this.logGridLimit&&(C=Math.pow(10,n+p)),r=9,C=(C-m)/r);A=this.gridAlpha;this.gridAlpha=this.minorGridAlpha;for(S=1;S<r;S++){var D=this.getCoordinate(m+C*S),D=new this.axisItemRenderer(this,D,"",!1,0,0,!1,!1,0,!0);this.pushAxisItem(D)}this.gridAlpha=A}}v=this.guides;y=v.length;if(0<y){w=this.fillAlpha;for(n=this.fillAlpha=0;n<y;n++)M=v[n],o=NaN,C=M.above,isNaN(M.toValue)||(o=this.getCoordinate(M.toValue),x=new this.axisItemRenderer(this,o,"",!0,NaN,NaN,M),this.pushAxisItem(x,C)),l=NaN,isNaN(M.value)||(l=this.getCoordinate(M.value),x=new this.axisItemRenderer(this,l,M.label,!0,NaN,(o-l)/2,M),this.pushAxisItem(x,C)),isNaN(o)&&(l-=3,o=l+3),x&&(d=x.label)&&this.addEventListeners(d,M),isNaN(o-l)||0>l&&0>o||(o=new this.guideFillRenderer(this,l,o,M),this.pushAxisItem(o,C),C=o.graphics(),M.graphics=C,this.addEventListeners(C,M));this.fillAlpha=w}x=this.baseValue;this.min>this.baseValue&&this.max>this.baseValue&&(x=this.min);this.min<this.baseValue&&this.max<this.baseValue&&(x=this.max);h&&x<this.minReal&&(x=this.minReal);this.baseCoord=this.getCoordinate(x,!0);x={type:"axisChanged",target:this,chart:e};x.min=h?this.minReal:this.min;x.max=this.max;this.fire(x);this.axisCreated=!0}h=this.axisLine.set;x=this.labelsSet;i.translate(this.x,this.y);x.translate(this.x,this.y);this.positionTitle();"radar"!=e.type&&h.toFront();!this.visible||a?(i.hide(),h.hide(),x.hide()):(i.show(),h.show(),x.show());this.axisY=this.y;this.axisX=this.x},getDateMinMax:function(){this.minimumDate&&(this.minimumDate instanceof Date||(this.minimumDate=t.getDate(this.minimumDate,this.chart.dataDateFormat,"fff")),this.min=this.minimumDate.getTime());this.maximumDate&&(this.maximumDate instanceof Date||(this.maximumDate=t.getDate(this.maximumDate,this.chart.dataDateFormat,"fff")),this.max=this.maximumDate.getTime())},formatValue:function(e,i,s){var a=this.exponential,h=this.logarithmic,r=this.numberFormatter,n=this.chart;if(r)return!0===this.logarithmic&&(a=-1!=String(e).indexOf("e")?!0:!1),this.useScientificNotation&&(a=!0),this.usePrefixes&&(a=!1),a?(s=-1==String(e).indexOf("e")?e.toExponential(15):String(e),a=s.split("e"),s=Number(a[0]),a=Number(a[1]),s=t.roundTo(s,14),i||isNaN(this.precision)||(s=t.roundTo(s,this.precision)),10==s&&(s=1,a+=1),s=s+"e"+a,0===e&&(s="0"),1==e&&(s="1")):(h&&(a=String(e).split("."),a[1]?(r.precision=a[1].length,0>s&&(r.precision=Math.abs(s)),i&&1<e&&(r.precision=0),i||isNaN(this.precision)||(r.precision=this.precision)):r.precision=-1),s=this.usePrefixes?t.addPrefix(e,n.prefixesOfBigNumbers,n.prefixesOfSmallNumbers,r,!i):t.formatNumber(e,r,r.precision)),this.duration&&(i&&(r.precision=0),s=t.formatDuration(e,this.duration,"",this.durationUnits,this.maxInterval,r)),"date"==this.type&&(s=t.formatDate(new Date(e),this.currentDateFormat,n)),this.recalculateToPercents?s+="%":(i=this.unit)&&(s="left"==this.unitPosition?i+s:s+i),this.labelFunction&&(s="date"==this.type?this.labelFunction(s,new Date(e),this).toString():this.labelFunction(e,s,this).toString()),s},getMinorGridStep:function(t,e){var i=[5,4,2];60>e&&i.shift();for(var s=Math.floor(Math.log(Math.abs(t))*Math.LOG10E),a=0;a<i.length;a++){var h=t/i[a],r=Math.floor(Math.log(Math.abs(h))*Math.LOG10E);if(!(1<Math.abs(s-r)))if(1>t){if(r=Math.pow(10,-r)*h,r==Math.round(r))return h}else if(h==Math.round(h))return h}},stackGraphs:function(e){var i=this.stackType;"stacked"==i&&(i="regular");"line"==i&&(i="none");"100% stacked"==i&&(i="100%");this.stackType=i;var s=[],a=[],h=[],r=[],n,o=this.chart.graphs,l,d,u,c,p,m=this.baseValue,f=!1;if("line"==e||"step"==e||"smoothedLine"==e)f=!0;if(f&&("regular"==i||"100%"==i))for(c=0;c<o.length;c++)u=o[c],u.stackGraph=null,u.hidden||(d=u.type,u.chart==this.chart&&u.valueAxis==this&&e==d&&u.stackable&&(l&&(u.stackGraph=l),l=u));u=this.start-10;l=this.end+10;c=this.data.length-1;u=t.fitToBounds(u,0,c);l=t.fitToBounds(l,0,c);for(p=u;p<=l;p++){var g=0;for(c=0;c<o.length;c++)if(u=o[c],u.hidden)u.newStack&&(h[p]=NaN,a[p]=NaN);else if(d=u.type,u.chart==this.chart&&u.valueAxis==this&&e==d&&u.stackable)if(d=this.data[p].axes[this.id].graphs[u.id],n=d.values.value,isNaN(n))u.newStack&&(h[p]=NaN,a[p]=NaN);else{var v=t.getDecimals(n);g<v&&(g=v);isNaN(r[p])?r[p]=Math.abs(n):r[p]+=Math.abs(n);r[p]=t.roundTo(r[p],g);v=u.fillToGraph;f&&v&&(v=this.data[p].axes[this.id].graphs[v.id])&&(d.values.open=v.values.value);"regular"==i&&(f&&(isNaN(s[p])?(s[p]=n,d.values.close=n,d.values.open=this.baseValue):(isNaN(n)?d.values.close=s[p]:d.values.close=n+s[p],d.values.open=s[p],s[p]=d.values.close)),"column"==e&&(u.newStack&&(h[p]=NaN,a[p]=NaN),d.values.close=n,0>n?(d.values.close=n,isNaN(a[p])?d.values.open=m:(d.values.close+=a[p],d.values.open=a[p]),a[p]=d.values.close):(d.values.close=n,isNaN(h[p])?d.values.open=m:(d.values.close+=h[p],d.values.open=h[p]),h[p]=d.values.close)))}}for(p=this.start;p<=this.end;p++)for(c=0;c<o.length;c++)(u=o[c],u.hidden)?u.newStack&&(h[p]=NaN,a[p]=NaN):(d=u.type,u.chart==this.chart&&u.valueAxis==this&&e==d&&u.stackable&&(d=this.data[p].axes[this.id].graphs[u.id],n=d.values.value,isNaN(n)||(s=n/r[p]*100,d.values.percents=s,d.values.total=r[p],u.newStack&&(h[p]=NaN,a[p]=NaN),"100%"==i&&(isNaN(a[p])&&(a[p]=0),isNaN(h[p])&&(h[p]=0),0>s?(d.values.close=t.fitToBounds(s+a[p],-100,100),d.values.open=a[p],a[p]=d.values.close):(d.values.close=t.fitToBounds(s+h[p],-100,100),d.values.open=h[p],h[p]=d.values.close)))))},recalculate:function(){var e=this.chart,i=e.graphs,s;for(s=0;s<i.length;s++){var a=i[s];if(a.valueAxis==this){var h="value";if("candlestick"==a.type||"ohlc"==a.type)h="open";var r,n,o=this.end+2,o=t.fitToBounds(this.end+1,0,this.data.length-1),l=this.start;0<l&&l--;var d;n=this.start;a.compareFromStart&&(n=0);if(!isNaN(e.startTime)&&(d=e.categoryAxis)){var u=d.minDuration(),u=new Date(e.startTime+u/2),c=t.resetDateToMin(new Date(e.startTime),d.minPeriod).getTime();t.resetDateToMin(new Date(u),d.minPeriod).getTime()>c&&n++}if(d=e.recalculateFromDate)d=t.getDate(d,e.dataDateFormat,"fff"),n=e.getClosestIndex(e.chartData,"time",d.getTime(),!0,0,e.chartData.length),o=e.chartData.length-1;for(d=n;d<=o&&(n=this.data[d].axes[this.id].graphs[a.id],r=n.values[h],a.recalculateValue&&(r=n.dataContext[a.valueField+a.recalculateValue]),isNaN(r));d++);this.recBaseValue=r;for(h=l;h<=o;h++){n=this.data[h].axes[this.id].graphs[a.id];n.percents={};var l=n.values,p;for(p in l)n.percents[p]="percents"!=p?l[p]/r*100-100:l[p]}}}},getMinMax:function(){var e=!1,i=this.chart,s=i.graphs,a;for(a=0;a<s.length;a++){var h=s[a].type;("line"==h||"step"==h||"smoothedLine"==h)&&this.expandMinMax&&(e=!0)}e&&(0<this.start&&this.start--,this.end<this.data.length-1&&this.end++);"serial"==i.type&&(!0!==i.categoryAxis.parseDates||e||this.end<this.data.length-1&&this.end++);this.includeAllValues&&(this.start=0,this.end=this.data.length-1);e=this.minMaxMultiplier;i=this.getExtremes(this.start,this.end);this.min=i.min;this.max=i.max;this.minRR=this.min;this.maxRR=this.max;e=(this.max-this.min)*(e-1);this.min-=e;this.max+=e;e=this.guides.length;if(this.includeGuidesInMinMax&&0<e)for(i=0;i<e;i++)s=this.guides[i],s.toValue<this.min&&(this.min=s.toValue),s.value<this.min&&(this.min=s.value),s.toValue>this.max&&(this.max=s.toValue),s.value>this.max&&(this.max=s.value);isNaN(this.minimum)||(this.min=this.minimum);isNaN(this.maximum)||(this.max=this.maximum);"date"==this.type&&this.getDateMinMax();this.min>this.max&&(e=this.max,this.max=this.min,this.min=e);isNaN(this.minZoom)||(this.min=this.minZoom);isNaN(this.maxZoom)||(this.max=this.maxZoom);this.minCalc=this.min;this.maxCalc=this.max;this.minReal=this.min;this.maxReal=this.max;0===this.min&&0===this.max&&(this.max=9);this.min>this.max&&(this.min=this.max-1);e=this.min;i=this.max;s=this.max-this.min;a=0===s?Math.pow(10,Math.floor(Math.log(Math.abs(this.max))*Math.LOG10E))/10:Math.pow(10,Math.floor(Math.log(Math.abs(s))*Math.LOG10E))/10;isNaN(this.maximum)&&(this.max=Math.ceil(this.max/a)*a+a);isNaN(this.minimum)&&(this.min=Math.floor(this.min/a)*a-a);0>this.min&&0<=e&&(this.min=0);0<this.max&&0>=i&&(this.max=0);"100%"==this.stackType&&(this.min=0>this.min?-100:0,this.max=0>this.max?0:100);s=this.max-this.min;a=Math.pow(10,Math.floor(Math.log(Math.abs(s))*Math.LOG10E))/10;this.step=Math.ceil(s/this.gridCountR/a)*a;s=Math.pow(10,Math.floor(Math.log(Math.abs(this.step))*Math.LOG10E));s=t.fixStepE(s);a=Math.ceil(this.step/s);5<a&&(a=10);5>=a&&2<a&&(a=5);this.step=Math.ceil(this.step/(s*a))*s*a;isNaN(this.setStep)||(this.step=this.setStep);1>s?(this.maxDecCount=Math.abs(Math.log(Math.abs(s))*Math.LOG10E),this.maxDecCount=Math.round(this.maxDecCount),this.step=t.roundTo(this.step,this.maxDecCount+1)):this.maxDecCount=0;this.min=this.step*Math.floor(this.min/this.step);this.max=this.step*Math.ceil(this.max/this.step);0>this.min&&0<=e&&(this.min=0);0<this.max&&0>=i&&(this.max=0);1<this.minReal&&1<this.max-this.minReal&&(this.minReal=Math.floor(this.minReal));s=Math.pow(10,Math.floor(Math.log(Math.abs(this.minReal))*Math.LOG10E));0===this.min&&(this.minReal=s);0===this.min&&1<this.minReal&&(this.minReal=1);0<this.min&&0<this.minReal-this.step&&(this.minReal=this.min+this.step<this.minReal?this.min+this.step:this.min);this.logarithmic&&(2<Math.log(i)*Math.LOG10E-Math.log(e)*Math.LOG10E?(this.minReal=this.min=Math.pow(10,Math.floor(Math.log(Math.abs(e))*Math.LOG10E)),this.maxReal=this.max=Math.pow(10,Math.ceil(Math.log(Math.abs(i))*Math.LOG10E))):(e=Math.pow(10,Math.floor(Math.log(Math.abs(e))*Math.LOG10E))/10,Math.pow(10,Math.floor(Math.log(Math.abs(this.min))*Math.LOG10E))/10<e&&(this.minReal=this.min=10*e)))},getExtremes:function(t,e){var i,s,a;for(a=t;a<=e;a++){var h=this.data[a].axes[this.id].graphs,r;for(r in h)if(h.hasOwnProperty(r)){var n=this.chart.graphsById[r];if(n.includeInMinMax&&(!n.hidden||this.includeHidden)){isNaN(i)&&(i=Infinity);isNaN(s)&&(s=-Infinity);this.foundGraphs=!0;n=h[r].values;this.recalculateToPercents&&(n=h[r].percents);var o;if(this.minMaxField)o=n[this.minMaxField],o<i&&(i=o),o>s&&(s=o);else for(var l in n)n.hasOwnProperty(l)&&"percents"!=l&&"total"!=l&&"error"!=l&&(o=n[l],o<i&&(i=o),o>s&&(s=o))}}}return{min:i,max:s}},zoomOut:function(t){this.maxZoom=this.minZoom=NaN;this.zoomToRelativeValues(0,1,t)},zoomToRelativeValues:function(t,e,i){if(this.reversed){var s=t;t=1-e;e=1-s}var a=this.fullMax,s=this.fullMin,h=s+(a-s)*t,r=s+(a-s)*e;0<=this.minimum&&0>h&&(h=0);this.logarithmic&&(isNaN(this.minimum)||(s=this.minimum),isNaN(this.maximum)||(a=this.maximum),a=Math.log(a)*Math.LOG10E-Math.log(s)*Math.LOG10E,h=Math.pow(10,a*t+Math.log(s)*Math.LOG10E),r=Math.pow(10,a*e+Math.log(s)*Math.LOG10E));return this.zoomToValues(h,r,i)},zoomToValues:function(e,i,s){if(i<e){var a=i;i=e;e=a}var h=this.fullMax,a=this.fullMin;this.relativeStart=t.roundTo((e-a)/(h-a),9);this.relativeEnd=t.roundTo((i-a)/(h-a),9);if(this.logarithmic){isNaN(this.minimum)||(a=this.minimum);isNaN(this.maximum)||(h=this.maximum);var h=Math.log(h)*Math.LOG10E-Math.log(a)*Math.LOG10E,r=Math.log(i)/Math.LN10-Math.log(a)*Math.LOG10E;this.relativeStart=t.roundTo((Math.log(e)/Math.LN10-Math.log(a)*Math.LOG10E)/h,9);this.relativeEnd=t.roundTo(r/h,9)}if(this.minZoom!=e||this.maxZoom!=i)return this.minZoom=e,this.maxZoom=i,a={type:"axisZoomed"},a.chart=this.chart,a.valueAxis=this,a.startValue=e,a.endValue=i,a.relativeStart=this.relativeStart,a.relativeEnd=this.relativeEnd,this.prevStartValue==e&&this.prevEndValue==i||this.fire(a),this.prevStartValue=e,this.prevEndValue=i,s||(e={},t.copyProperties(a,e),e.type="axisIntZoomed",this.fire(e)),0===this.relativeStart&&1==this.relativeEnd&&(this.maxZoom=this.minZoom=NaN),!0},coordinateToValue:function(t){if(isNaN(t))return NaN;var e=this.axisWidth,i=this.stepWidth,s=this.reversed,a=this.rotate,h=this.min,r=this.minReal;return!0===this.logarithmic?Math.pow(10,(a?!0===s?(e-t)/i:t/i:!0===s?t/i:(e-t)/i)+Math.log(r)*Math.LOG10E):!0===s?a?h-(t-e)/i:t/i+h:a?t/i+h:h-(t-e)/i},getCoordinate:function(t,e){if(isNaN(t))return NaN;var i=this.rotate,s=this.reversed,a=this.axisWidth,h=this.stepWidth,r=this.min,n=this.minReal;!0===this.logarithmic?(0===t&&(t=this.treatZeroAs),r=Math.log(t)*Math.LOG10E-Math.log(n)*Math.LOG10E,i=i?!0===s?a-h*r:h*r:!0===s?h*r:a-h*r):i=!0===s?i?a-h*(t-r):h*(t-r):i?h*(t-r):a-h*(t-r);1e7<Math.abs(i)&&(i=i/Math.abs(i)*1e7);e||(i=Math.round(i));return i},synchronizeWithAxis:function(t){this.synchronizeWith=t;this.listenTo(this.synchronizeWith,"axisChanged",this.handleSynchronization)},handleSynchronization:function(){if(this.synchronizeWith){t.isString(this.synchronizeWith)&&(this.synchronizeWith=this.chart.getValueAxisById(this.synchronizeWith));var e=this.synchronizeWith,i=e.min,s=e.max,e=e.step,a=this.synchronizationMultiplier;a&&(this.min=i*a,this.max=s*a,this.step=e*a,i=Math.abs(Math.log(Math.abs(Math.pow(10,Math.floor(Math.log(Math.abs(this.step))*Math.LOG10E))))*Math.LOG10E),this.maxDecCount=i=Math.round(i),this.draw())}}})})();(function(){var t=window.AmCharts;t.RecAxis=t.Class({construct:function(e){var i=e.chart,s=e.axisThickness,a=e.axisColor,h=e.axisAlpha,r=e.offset,n=e.dx,o=e.dy,l=e.x,d=e.y,u=e.height,c=e.width,p=i.container;"H"==e.orientation?(a=t.line(p,[0,c],[0,0],a,h,s),this.axisWidth=e.width,"bottom"==e.position?(o=s/2+r+u+d-1,s=l):(o=-s/2-r+d+o,s=n+l)):(this.axisWidth=e.height,"right"==e.position?(a=t.line(p,[0,0,-n],[0,u,u-o],a,h,s),o=d+o,s=s/2+r+n+c+l-1):(a=t.line(p,[0,0],[0,u],a,h,s),o=d,s=-s/2-r+l));a.translate(s,o);s=i.container.set();s.push(a);i.axesSet.push(s);t.setCN(i,a,e.bcn+"line");this.axisSet=s;this.set=a}})})();(function(){var t=window.AmCharts;t.RecItem=t.Class({construct:function(e,i,s,a,h,r,n,o,l,d,u,c){i=Math.round(i);var p=e.chart;this.value=s;void 0==s&&(s="");l||(l=0);void 0==a&&(a=!0);var m=p.fontFamily,f=e.fontSize;void 0==f&&(f=p.fontSize);var g=e.color;void 0==g&&(g=p.color);void 0!==u&&(g=u);var v=e.chart.container,b=v.set();this.set=b;var x=e.axisThickness,N=e.axisColor,C=e.axisAlpha,y=e.tickLength,w=e.gridAlpha,M=e.gridThickness,A=e.gridColor,S=e.dashLength,D=e.fillColor,T=e.fillAlpha,L=e.labelsEnabled;u=e.labelRotationR;var k=e.counter,B=e.inside,R=e.labelOffset,O=e.dx,E=e.dy,I=e.orientation,G=e.position,F=e.previousCoord,z=e.height,P=e.width,W=e.offset,Y,H;n?(void 0!==n.id&&(c=p.classNamePrefix+"-guide-"+n.id),L=!0,isNaN(n.tickLength)||(y=n.tickLength),void 0!=n.lineColor&&(A=n.lineColor),void 0!=n.color&&(g=n.color),isNaN(n.lineAlpha)||(w=n.lineAlpha),isNaN(n.dashLength)||(S=n.dashLength),isNaN(n.lineThickness)||(M=n.lineThickness),!0===n.inside&&(B=!0,0<W&&(W=0)),isNaN(n.labelRotation)||(u=n.labelRotation),isNaN(n.fontSize)||(f=n.fontSize),n.position&&(G=n.position),void 0!==n.boldLabel&&(o=n.boldLabel),isNaN(n.labelOffset)||(R=n.labelOffset)):""===s&&(y=0);d&&!isNaN(e.minorTickLength)&&(y=e.minorTickLength);var V="start";0<h&&(V="middle");e.centerLabels&&(V="middle");var X=u*Math.PI/180,U,j,Z=0,q=0,_=0,K=U=0,J=0;"V"==I&&(u=0);var Q;L&&""!==s&&(Q=e.autoWrap&&0===u?t.wrappedText(v,s,g,m,f,V,o,Math.abs(h),0):t.text(v,s,g,m,f,V,o),V=Q.getBBox(),K=V.width,J=V.height);if("H"==I){if(0<=i&&i<=P+1&&(0<y&&0<C&&i+l<=P+1&&(Y=t.line(v,[i+l,i+l],[0,y],N,C,M),b.push(Y)),0<w&&(H=t.line(v,[i,i+O,i+O],[z,z+E,E],A,w,M,S),b.push(H))),q=0,Z=i,n&&90==u&&B&&(Z-=f),!1===a?(V="start",q="bottom"==G?B?q+y:q-y:B?q-y:q+y,Z+=3,0<h&&(Z+=h/2-3,V="middle"),0<u&&(V="middle")):V="middle",1==k&&0<T&&!n&&!d&&F<P&&(a=t.fitToBounds(i,0,P),F=t.fitToBounds(F,0,P),U=a-F,0<U&&(j=t.rect(v,U,e.height,D,T),j.translate(a-U+O,E),b.push(j))),"bottom"==G?(q+=z+f/2+W,B?(0<u?(q=z-K/2*Math.sin(X)-y-3,e.centerRotatedLabels||(Z+=K/2*Math.cos(X)-4+2)):0>u?(q=z+K*Math.sin(X)-y-3+2,Z+=-K*Math.cos(X)-J*Math.sin(X)-4):q-=y+f+3+3,q-=R):(0<u?(q=z+K/2*Math.sin(X)+y+3,e.centerRotatedLabels||(Z-=K/2*Math.cos(X))):0>u?(q=z+y+3-K/2*Math.sin(X)+2,Z+=K/2*Math.cos(X)):q+=y+x+3+3,q+=R)):(q+=E+f/2-W,Z+=O,B?(0<u?(q=K/2*Math.sin(X)+y+3,e.centerRotatedLabels||(Z-=K/2*Math.cos(X))):q+=y+3,q+=R):(0<u?(q=-(K/2)*Math.sin(X)-y-6,e.centerRotatedLabels||(Z+=K/2*Math.cos(X))):q-=y+f+3+x+3,q-=R)),"bottom"==G?U=(B?z-y-1:z+x-1)+W:(_=O,U=(B?E:E-y-x+1)-W),r&&(Z+=r),f=Z,0<u&&(f+=K/2*Math.cos(X)),Q&&(r=0,B&&(r=K/2*Math.cos(X)),f+r>P+2||0>f))Q.remove(),Q=null}else{0<=i&&i<=z+1&&(0<y&&0<C&&i+l<=z+1&&(Y=t.line(v,[0,y+1],[i+l,i+l],N,C,M),b.push(Y)),0<w&&(H=t.line(v,[0,O,P+O],[i,i+E,i+E],A,w,M,S),b.push(H)));V="end";if(!0===B&&"left"==G||!1===B&&"right"==G)V="start";q=i-J/2+2;1==k&&0<T&&!n&&!d&&(a=t.fitToBounds(i,0,z),F=t.fitToBounds(F,0,z),X=a-F,j=t.polygon(v,[0,e.width,e.width,0],[0,0,X,X],D,T),j.translate(O,a-X+E),b.push(j));q+=f/2;"right"==G?(Z+=O+P+W,q+=E,B?(r||(q-=f/2+3),Z=Z-(y+4)-R):(Z+=y+4+x,q-=2,Z+=R)):B?(Z+=y+4-W,r||(q-=f/2+3),n&&(Z+=O,q+=E),Z+=R):(Z+=-y-x-4-2-W,q-=2,Z-=R);Y&&("right"==G?(_+=O+W+P-1,U+=E,_=B?_-x:_+x):(_-=W,B||(_-=y+x)));r&&(q+=r);B=-3;"right"==G&&(B+=E);Q&&(q>z+1||q<B-f/10)&&(Q.remove(),Q=null)}Y&&(Y.translate(_,U),t.setCN(p,Y,e.bcn+"tick"),t.setCN(p,Y,c,!0),n&&t.setCN(p,Y,"guide"));!1===e.visible&&(Y&&Y.remove(),Q&&(Q.remove(),Q=null));Q&&(Q.attr({"text-anchor":V}),Q.translate(Z,q,NaN,!0),0!==u&&Q.rotate(-u,e.chart.backgroundColor),e.allLabels.push(Q),this.label=Q,t.setCN(p,Q,e.bcn+"label"),t.setCN(p,Q,c,!0),n&&t.setCN(p,Q,"guide"));H&&(t.setCN(p,H,e.bcn+"grid"),t.setCN(p,H,c,!0),n&&t.setCN(p,H,"guide"));j&&(t.setCN(p,j,e.bcn+"fill"),t.setCN(p,j,c,!0));d?H&&t.setCN(p,H,e.bcn+"grid-minor"):(e.counter=0===k?1:0,e.previousCoord=i);0===this.set.node.childNodes.length&&this.set.remove()},graphics:function(){return this.set},getLabel:function(){return this.label}})})();(function(){var t=window.AmCharts;t.RecFill=t.Class({construct:function(e,i,s,a){var h=e.dx,r=e.dy,n=e.orientation,o=0;if(s<i){var l=i;i=s;s=l}var d=a.fillAlpha;isNaN(d)&&(d=0);var l=e.chart.container,u=a.fillColor;"V"==n?(i=t.fitToBounds(i,0,e.height),s=t.fitToBounds(s,0,e.height)):(i=t.fitToBounds(i,0,e.width),s=t.fitToBounds(s,0,e.width));s-=i;isNaN(s)&&(s=4,o=2,d=0);0>s&&"object"==typeof u&&(u=u.join(",").split(",").reverse());"V"==n?(n=t.rect(l,e.width,s,u,d),n.translate(h,i-o+r)):(n=t.rect(l,s,e.height,u,d),n.translate(i-o+h,r));t.setCN(e.chart,n,"guide-fill");a.id&&t.setCN(e.chart,n,"guide-fill-"+a.id);this.set=l.set([n])},graphics:function(){return this.set},getLabel:function(){}})})();(function(){var t=window.AmCharts;t.AmChart=t.Class({construct:function(e){this.svgIcons=this.tapToActivate=!0;this.theme=e;this.classNamePrefix="amcharts";this.addClassNames=!1;this.version="3.21.2";t.addChart(this);this.createEvents("buildStarted","dataUpdated","init","rendered","drawn","failed","resized","animationFinished");this.height=this.width="100%";this.dataChanged=!0;this.chartCreated=!1;this.previousWidth=this.previousHeight=0;this.backgroundColor="#FFFFFF";this.borderAlpha=this.backgroundAlpha=0;this.color=this.borderColor="#000000";this.fontFamily="Verdana";this.fontSize=11;this.usePrefixes=!1;this.autoResize=!0;this.autoDisplay=!1;this.addCodeCredits=this.accessible=!0;this.touchStartTime=this.touchClickDuration=0;this.precision=-1;this.percentPrecision=2;this.decimalSeparator=".";this.thousandsSeparator=",";this.labels=[];this.allLabels=[];this.titles=[];this.marginRight=this.marginLeft=this.autoMarginOffset=0;this.timeOuts=[];this.creditsPosition="top-left";var i=document.createElement("div"),s=i.style;s.overflow="hidden";s.position="relative";s.textAlign="left";this.chartDiv=i;i=document.createElement("div");s=i.style;s.overflow="hidden";s.position="relative";s.textAlign="left";this.legendDiv=i;this.titleHeight=0;this.hideBalloonTime=150;this.handDrawScatter=2;this.cssScale=this.handDrawThickness=1;this.cssAngle=0;this.prefixesOfBigNumbers=[{number:1e3,prefix:"k"},{number:1e6,prefix:"M"},{number:1e9,prefix:"G"},{number:1e12,prefix:"T"},{number:1e15,prefix:"P"},{number:1e18,prefix:"E"},{number:1e21,prefix:"Z"},{number:1e24,prefix:"Y"}];this.prefixesOfSmallNumbers=[{number:1e-24,prefix:"y"},{number:1e-21,prefix:"z"},{number:1e-18,prefix:"a"},{number:1e-15,prefix:"f"},{number:1e-12,prefix:"p"},{number:1e-9,prefix:"n"},{number:1e-6,prefix:"μ"},{number:.001,prefix:"m"}];this.panEventsEnabled=!0;this.product="amcharts";this.animations=[];this.balloon=new t.AmBalloon(this.theme);this.balloon.chart=this;this.processTimeout=0;this.processCount=1e3;this.animatable=[];this.langObj={};t.applyTheme(this,e,"AmChart")},drawChart:function(){0<this.realWidth&&0<this.realHeight&&(this.drawBackground(),this.redrawLabels(),this.drawTitles(),this.brr(),this.renderFix(),this.chartDiv&&(this.boundingRect=this.chartDiv.getBoundingClientRect()))},makeAccessible:function(t,e,i){this.accessible&&t&&(i&&t.setAttr("role",i),t.setAttr("aria-label",e))},drawBackground:function(){t.remove(this.background);var e=this.container,i=this.backgroundColor,s=this.backgroundAlpha,a=this.set;t.isModern||0!==s||(s=.001);var h=this.updateWidth();this.realWidth=h;var r=this.updateHeight();this.realHeight=r;i=t.polygon(e,[0,h-1,h-1,0],[0,0,r-1,r-1],i,s,1,this.borderColor,this.borderAlpha);t.setCN(this,i,"bg");this.background=i;a.push(i);if(i=this.backgroundImage)e=e.image(i,0,0,h,r),t.setCN(this,i,"bg-image"),this.bgImg=e,a.push(e)},drawTitles:function(e){var i=this.titles;this.titleHeight=0;if(t.ifArray(i)){var s=20,a;for(a=0;a<i.length;a++){var h=i[a],h=t.processObject(h,t.Title,this.theme);if(!1!==h.enabled){var r=h.color;void 0===r&&(r=this.color);var n=h.size;isNaN(n)&&(n=this.fontSize+2);isNaN(h.alpha);var o=this.marginLeft,l=!0;void 0!==h.bold&&(l=h.bold);r=t.wrappedText(this.container,h.text,r,this.fontFamily,n,"middle",l,this.realWidth-35-this.marginRight-o);r.translate(o+(this.realWidth-this.marginRight-o)/2,s);r.node.style.pointerEvents="none";h.sprite=r;void 0!==h.tabIndex&&r.setAttr("tabindex",h.tabIndex);t.setCN(this,r,"title");h.id&&t.setCN(this,r,"title-"+h.id);r.attr({opacity:h.alpha});s+=r.getBBox().height+5;e?r.remove():this.freeLabelsSet.push(r)}}this.titleHeight=s-10}},write:function(t){var e=this;if(e.listeners)for(var i=0;i<e.listeners.length;i++){var s=e.listeners[i];e.addListener(s.event,s.method)}e.fire({type:"buildStarted",chart:e});e.afterWriteTO&&clearTimeout(e.afterWriteTO);0<e.processTimeout?e.afterWriteTO=setTimeout(function(){e.afterWrite.call(e,t)},e.processTimeout):e.afterWrite(t)},afterWrite:function(e){var i;if(i="object"!=typeof e?document.getElementById(e):e){for(;i.firstChild;)i.removeChild(i.firstChild);this.div=i;i.style.overflow="hidden";i.style.textAlign="left";e=this.chartDiv;var s=this.legendDiv,a=this.legend,h=s.style,r=e.style;this.measure();this.previousHeight=this.divRealHeight;this.previousWidth=this.divRealWidth;var n,o=document.createElement("div");n=o.style;n.position="relative";this.containerDiv=o;o.className=this.classNamePrefix+"-main-div";e.className=this.classNamePrefix+"-chart-div";i.appendChild(o);(i=this.exportConfig)&&t.AmExport&&!this.AmExport&&(this.AmExport=new t.AmExport(this,i));this.amExport&&t.AmExport&&(this.AmExport=t.extend(this.amExport,new t.AmExport(this),!0));this.AmExport&&this.AmExport.init&&this.AmExport.init();if(a){a=this.addLegend(a,a.divId);if(a.enabled)switch(h.left=null,h.top=null,h.right=null,r.left=null,r.right=null,r.top=null,h.position="relative",r.position="relative",n.width="100%",n.height="100%",a.position){case"bottom":o.appendChild(e);o.appendChild(s);break;case"top":o.appendChild(s);o.appendChild(e);break;case"absolute":h.position="absolute";r.position="absolute";void 0!==a.left&&(h.left=a.left+"px");void 0!==a.right&&(h.right=a.right+"px");void 0!==a.top&&(h.top=a.top+"px");void 0!==a.bottom&&(h.bottom=a.bottom+"px");a.marginLeft=0;a.marginRight=0;o.appendChild(e);o.appendChild(s);break;case"right":h.position="relative";r.position="absolute";o.appendChild(e);o.appendChild(s);break;case"left":h.position="absolute";r.position="relative";o.appendChild(e);o.appendChild(s);break;case"outside":o.appendChild(e)}else o.appendChild(e);this.prevLegendPosition=a.position}else o.appendChild(e);this.listenersAdded||(this.addListeners(),this.listenersAdded=!0);(this.mouseWheelScrollEnabled||this.mouseWheelZoomEnabled)&&t.addWheelListeners();this.initChart()}},createLabelsSet:function(){t.remove(this.labelsSet);this.labelsSet=this.container.set();this.freeLabelsSet.push(this.labelsSet)},initChart:function(){this.balloon=t.processObject(this.balloon,t.AmBalloon,this.theme);window.AmCharts_path&&(this.path=window.AmCharts_path);void 0===this.path&&(this.path=t.getPath());void 0===this.path&&(this.path="amcharts/");this.path=t.normalizeUrl(this.path);void 0===this.pathToImages&&(this.pathToImages=this.path+"images/");this.initHC||(t.callInitHandler(this),this.initHC=!0);t.applyLang(this.language,this);var e=this.numberFormatter;e&&(isNaN(e.precision)||(this.precision=e.precision),void 0!==e.thousandsSeparator&&(this.thousandsSeparator=e.thousandsSeparator),void 0!==e.decimalSeparator&&(this.decimalSeparator=e.decimalSeparator));(e=this.percentFormatter)&&!isNaN(e.precision)&&(this.percentPrecision=e.precision);this.nf={precision:this.precision,thousandsSeparator:this.thousandsSeparator,decimalSeparator:this.decimalSeparator};this.pf={precision:this.percentPrecision,thousandsSeparator:this.thousandsSeparator,decimalSeparator:this.decimalSeparator};this.destroy();(e=this.container)?(e.container.innerHTML="",e.width=this.realWidth,e.height=this.realHeight,e.addDefs(this),this.chartDiv.appendChild(e.container)):e=new t.AmDraw(this.chartDiv,this.realWidth,this.realHeight,this);this.container=e;this.extension=".png";this.svgIcons&&t.SVG&&(this.extension=".svg");this.checkDisplay();this.checkTransform(this.div);e.chart=this;t.VML||t.SVG?(e.handDrawn=this.handDrawn,e.handDrawScatter=this.handDrawScatter,e.handDrawThickness=this.handDrawThickness,t.remove(this.set),this.set=e.set(),t.remove(this.gridSet),this.gridSet=e.set(),t.remove(this.cursorLineSet),this.cursorLineSet=e.set(),t.remove(this.graphsBehindSet),this.graphsBehindSet=e.set(),t.remove(this.bulletBehindSet),this.bulletBehindSet=e.set(),t.remove(this.columnSet),this.columnSet=e.set(),t.remove(this.graphsSet),this.graphsSet=e.set(),t.remove(this.trendLinesSet),this.trendLinesSet=e.set(),t.remove(this.axesSet),this.axesSet=e.set(),t.remove(this.cursorSet),this.cursorSet=e.set(),t.remove(this.scrollbarsSet),this.scrollbarsSet=e.set(),t.remove(this.bulletSet),this.bulletSet=e.set(),t.remove(this.freeLabelsSet),this.freeLabelsSet=e.set(),t.remove(this.axesLabelsSet),this.axesLabelsSet=e.set(),t.remove(this.balloonsSet),this.balloonsSet=e.set(),t.remove(this.plotBalloonsSet),this.plotBalloonsSet=e.set(),t.remove(this.zoomButtonSet),this.zoomButtonSet=e.set(),t.remove(this.zbSet),this.zbSet=null,t.remove(this.linkSet),this.linkSet=e.set()):this.fire({type:"failed",chart:this})},premeasure:function(){var t=this.div;if(t){try{this.boundingRect=this.chartDiv.getBoundingClientRect()}catch(e){}var i=t.offsetWidth,s=t.offsetHeight;t.clientHeight&&(i=t.clientWidth,s=t.clientHeight);if(i!=this.mw||s!=this.mh)this.mw=i,this.mh=s,this.measure()}},measure:function(){var e=this.div;if(e){var i=this.chartDiv,s=e.offsetWidth,a=e.offsetHeight,h=this.container;e.clientHeight&&(s=e.clientWidth,a=e.clientHeight);var a=Math.round(a),s=Math.round(s),e=Math.round(t.toCoordinate(this.width,s)),r=Math.round(t.toCoordinate(this.height,a));(s!=this.previousWidth||a!=this.previousHeight)&&0<e&&0<r&&(i.style.width=e+"px",i.style.height=r+"px",i.style.padding=0,h&&h.setSize(e,r),this.balloon=t.processObject(this.balloon,t.AmBalloon,this.theme));this.balloon&&this.balloon.setBounds&&this.balloon.setBounds(2,2,e-2,r);this.updateWidth();this.balloon.chart=this;this.realWidth=e;this.realHeight=r;this.divRealWidth=s;this.divRealHeight=a}},checkDisplay:function(){if(this.autoDisplay&&this.container){var e=t.rect(this.container,10,10),i=e.getBBox();0===i.width&&0===i.height&&(this.divRealHeight=this.divRealWidth=this.realHeight=this.realWidth=0,this.previousWidth=this.previousHeight=NaN);e.remove()}},checkTransform:function(t){if(this.autoTransform&&window.getComputedStyle&&t){if(t.style){var e=window.getComputedStyle(t,null);if(e&&(e=e.getPropertyValue("-webkit-transform")||e.getPropertyValue("-moz-transform")||e.getPropertyValue("-ms-transform")||e.getPropertyValue("-o-transform")||e.getPropertyValue("transform"))&&"none"!==e){var i=e.split("(")[1].split(")")[0].split(","),e=i[0],i=i[1],e=Math.sqrt(e*e+i*i);isNaN(e)||(this.cssScale*=e)}}t.parentNode&&this.checkTransform(t.parentNode)}},destroy:function(){this.chartDiv.innerHTML="";this.clearTimeOuts();this.legend&&this.legend.destroy()},clearTimeOuts:function(){var t=this.timeOuts;if(t){var e;for(e=0;e<t.length;e++)clearTimeout(t[e])}this.timeOuts=[]},clear:function(e){try{document.removeEventListener("touchstart",this.docfn1,!0),document.removeEventListener("touchend",this.docfn2,!0)}catch(i){}t.callMethod("clear",[this.chartScrollbar,this.scrollbarV,this.scrollbarH,this.chartCursor]);this.chartCursor=this.scrollbarH=this.scrollbarV=this.chartScrollbar=null;this.clearTimeOuts();this.container&&(this.container.remove(this.chartDiv),this.container.remove(this.legendDiv));e||t.removeChart(this);if(e=this.div)for(;e.firstChild;)e.removeChild(e.firstChild);this.legend&&this.legend.destroy();this.AmExport&&this.AmExport.clear&&this.AmExport.clear()},setMouseCursor:function(e){ "auto"==e&&t.isNN&&(e="default");this.chartDiv.style.cursor=e;this.legendDiv.style.cursor=e},redrawLabels:function(){this.labels=[];var t=this.allLabels;this.createLabelsSet();var e;for(e=0;e<t.length;e++)this.drawLabel(t[e])},drawLabel:function(e){var i=this;if(i.container&&!1!==e.enabled){e=t.processObject(e,t.Label,i.theme);var s=e.y,a=e.text,h=e.align,r=e.size,n=e.color,o=e.rotation,l=e.alpha,d=e.bold,u=t.toCoordinate(e.x,i.realWidth),s=t.toCoordinate(s,i.realHeight);u||(u=0);s||(s=0);void 0===n&&(n=i.color);isNaN(r)&&(r=i.fontSize);h||(h="start");"left"==h&&(h="start");"right"==h&&(h="end");"center"==h&&(h="middle",o?s=i.realHeight-s+s/2:u=i.realWidth/2-u);void 0===l&&(l=1);void 0===o&&(o=0);s+=r/2;a=t.text(i.container,a,n,i.fontFamily,r,h,d,l);a.translate(u,s);void 0!==e.tabIndex&&a.setAttr("tabindex",e.tabIndex);t.setCN(i,a,"label");e.id&&t.setCN(i,a,"label-"+e.id);0!==o&&a.rotate(o);e.url?(a.setAttr("cursor","pointer"),a.click(function(){t.getURL(e.url,i.urlTarget)})):a.node.style.pointerEvents="none";i.labelsSet.push(a);i.labels.push(a)}},addLabel:function(t,e,i,s,a,h,r,n,o,l){t={x:t,y:e,text:i,align:s,size:a,color:h,alpha:n,rotation:r,bold:o,url:l,enabled:!0};this.container&&this.drawLabel(t);this.allLabels.push(t)},clearLabels:function(){var t=this.labels,e;for(e=t.length-1;0<=e;e--)t[e].remove();this.labels=[];this.allLabels=[]},updateHeight:function(){var t=this.divRealHeight,e=this.legend;if(e){var i=this.legendDiv.offsetHeight,e=e.position;if("top"==e||"bottom"==e){t-=i;if(0>t||isNaN(t))t=0;this.chartDiv.style.height=t+"px"}}return t},updateWidth:function(){var t=this.divRealWidth,e=this.divRealHeight,i=this.legend;if(i){var s=this.legendDiv,a=s.offsetWidth;isNaN(i.width)||(a=i.width);i.ieW&&(a=i.ieW);var h=s.offsetHeight,s=s.style,r=this.chartDiv.style,n=i.position;if(("right"==n||"left"==n)&&void 0===i.divId){t-=a;if(0>t||isNaN(t))t=0;r.width=t+"px";this.balloon&&this.balloon.setBounds&&this.balloon.setBounds(2,2,t-2,this.realHeight);"left"==n?(r.left=a+"px",s.left="0px"):(r.left="0px",s.left=t+"px");e>h&&(s.top=(e-h)/2+"px")}}return t},getTitleHeight:function(){this.drawTitles(!0);return this.titleHeight},addTitle:function(t,e,i,s,a){isNaN(e)&&(e=this.fontSize+2);t={text:t,size:e,color:i,alpha:s,bold:a,enabled:!0};this.titles.push(t);return t},handleWheel:function(t){var e=0;t||(t=window.event);t.wheelDelta?e=t.wheelDelta/120:t.detail&&(e=-t.detail/3);e&&this.handleWheelReal(e,t.shiftKey);t.preventDefault&&t.preventDefault()},handleWheelReal:function(){},handleDocTouchStart:function(){this.handleMouseMove();this.tmx=this.mouseX;this.tmy=this.mouseY;this.touchStartTime=(new Date).getTime()},handleDocTouchEnd:function(){-.5<this.tmx&&this.tmx<this.divRealWidth+1&&0<this.tmy&&this.tmy<this.divRealHeight?(this.handleMouseMove(),4>Math.abs(this.mouseX-this.tmx)&&4>Math.abs(this.mouseY-this.tmy)?(this.tapped=!0,this.panRequired&&this.panEventsEnabled&&this.chartDiv&&(this.chartDiv.style.msTouchAction="none",this.chartDiv.style.touchAction="none")):this.mouseIsOver||this.resetTouchStyle()):(this.tapped=!1,this.resetTouchStyle())},resetTouchStyle:function(){this.panEventsEnabled&&this.chartDiv&&(this.chartDiv.style.msTouchAction="auto",this.chartDiv.style.touchAction="auto")},checkTouchDuration:function(t){var e=this,i=(new Date).getTime();if(t)if(t.touches)e.isTouchEvent=!0;else if(!e.isTouchEvent)return!0;if(i-e.touchStartTime>e.touchClickDuration)return!0;setTimeout(function(){e.resetTouchDuration()},300)},resetTouchDuration:function(){this.isTouchEvent=!1},checkTouchMoved:function(){if(4<Math.abs(this.mouseX-this.tmx)||4<Math.abs(this.mouseY-this.tmy))return!0},addListeners:function(){var t=this,e=t.chartDiv;document.addEventListener?("ontouchstart"in document.documentElement&&(e.addEventListener("touchstart",function(e){t.handleTouchStart.call(t,e)},!0),e.addEventListener("touchmove",function(e){t.handleMouseMove.call(t,e)},!0),e.addEventListener("touchend",function(e){t.handleTouchEnd.call(t,e)},!0),t.docfn1=function(e){t.handleDocTouchStart.call(t,e)},t.docfn2=function(e){t.handleDocTouchEnd.call(t,e)},document.addEventListener("touchstart",t.docfn1,!0),document.addEventListener("touchend",t.docfn2,!0)),e.addEventListener("mousedown",function(e){t.mouseIsOver=!0;t.handleMouseMove.call(t,e);t.handleMouseDown.call(t,e);t.handleDocTouchStart.call(t,e)},!0),e.addEventListener("mouseover",function(e){t.handleMouseOver.call(t,e)},!0),e.addEventListener("mouseout",function(e){t.handleMouseOut.call(t,e)},!0),e.addEventListener("mouseup",function(e){t.handleDocTouchEnd.call(t,e)},!0)):(e.attachEvent("onmousedown",function(e){t.handleMouseDown.call(t,e)}),e.attachEvent("onmouseover",function(e){t.handleMouseOver.call(t,e)}),e.attachEvent("onmouseout",function(e){t.handleMouseOut.call(t,e)}))},dispDUpd:function(){this.skipEvents||(this.dispatchDataUpdated&&(this.dispatchDataUpdated=!1,this.fire({type:"dataUpdated",chart:this})),this.chartCreated||(this.chartCreated=!0,this.fire({type:"init",chart:this})),this.chartRendered||(this.fire({type:"rendered",chart:this}),this.chartRendered=!0),this.fire({type:"drawn",chart:this}));this.skipEvents=!1},validateSize:function(){var t=this;t.premeasure();t.checkDisplay();t.cssScale=1;t.cssAngle=0;t.checkTransform(t.div);if(t.divRealWidth!=t.previousWidth||t.divRealHeight!=t.previousHeight){var e=t.legend;if(0<t.realWidth&&0<t.realHeight){t.sizeChanged=!0;if(e){t.legendInitTO&&clearTimeout(t.legendInitTO);var i=setTimeout(function(){e.invalidateSize()},10);t.timeOuts.push(i);t.legendInitTO=i}t.marginsUpdated=!1;clearTimeout(t.initTO);i=setTimeout(function(){t.initChart()},10);t.timeOuts.push(i);t.initTO=i}t.renderFix();e&&e.renderFix&&e.renderFix();clearTimeout(t.resizedTO);t.resizedTO=setTimeout(function(){t.fire({type:"resized",chart:t})},10);t.previousHeight=t.divRealHeight;t.previousWidth=t.divRealWidth}},invalidateSize:function(){this.previousHeight=this.previousWidth=NaN;this.invalidateSizeReal()},invalidateSizeReal:function(){var t=this;t.marginsUpdated=!1;clearTimeout(t.validateTO);var e=setTimeout(function(){t.validateSize()},5);t.timeOuts.push(e);t.validateTO=e},validateData:function(t){this.chartCreated&&(this.dataChanged=!0,this.marginsUpdated=!1,this.initChart(t))},validateNow:function(t,e){this.initTO&&clearTimeout(this.initTO);t&&(this.dataChanged=!0,this.marginsUpdated=!1);this.skipEvents=e;this.chartRendered=!1;var i=this.legend;i&&i.position!=this.prevLegendPosition&&(this.previousWidth=this.mw=0,i.invalidateSize&&(i.invalidateSize(),this.validateSize()));this.write(this.div)},showItem:function(t){t.hidden=!1;this.initChart()},hideItem:function(t){t.hidden=!0;this.initChart()},hideBalloon:function(){var t=this;clearTimeout(t.hoverInt);clearTimeout(t.balloonTO);t.hoverInt=setTimeout(function(){t.hideBalloonReal.call(t)},t.hideBalloonTime)},cleanChart:function(){},hideBalloonReal:function(){var t=this.balloon;t&&t.hide&&t.hide()},showBalloon:function(t,e,i,s,a){var h=this;clearTimeout(h.balloonTO);clearTimeout(h.hoverInt);h.balloonTO=setTimeout(function(){h.showBalloonReal.call(h,t,e,i,s,a)},1)},showBalloonReal:function(t,e,i,s,a){this.handleMouseMove();var h=this.balloon;h.enabled&&(h.followCursor(!1),h.changeColor(e),!i||h.fixedPosition?(h.setPosition(s,a),isNaN(s)||isNaN(a)?h.followCursor(!0):h.followCursor(!1)):h.followCursor(!0),t&&h.showBalloon(t))},handleMouseOver:function(){this.outTO&&clearTimeout(this.outTO);t.resetMouseOver();this.mouseIsOver=!0},handleMouseOut:function(){var e=this;t.resetMouseOver();e.outTO&&clearTimeout(e.outTO);e.outTO=setTimeout(function(){e.handleMouseOutReal()},10)},handleMouseOutReal:function(){this.mouseIsOver=!1},handleMouseMove:function(t){t||(t=window.event);this.mouse2Y=this.mouse2X=NaN;var e,i,s,a;if(t){if(t.touches){var h=t.touches.item(1);h&&this.panEventsEnabled&&this.boundingRect&&(s=h.clientX-this.boundingRect.left,a=h.clientY-this.boundingRect.top);t=t.touches.item(0);if(!t)return}else this.wasTouched=!1;this.boundingRect&&t.clientX&&(e=t.clientX-this.boundingRect.left,i=t.clientY-this.boundingRect.top);isNaN(s)?this.mouseX=e:(this.mouseX=Math.min(e,s),this.mouse2X=Math.max(e,s));isNaN(a)?this.mouseY=i:(this.mouseY=Math.min(i,a),this.mouse2Y=Math.max(i,a));this.autoTransform&&(this.mouseX/=this.cssScale,this.mouseY/=this.cssScale)}},handleTouchStart:function(t){this.hideBalloonReal();t&&(t.touches&&this.tapToActivate&&!this.tapped||!this.panRequired)||(this.handleMouseMove(t),this.handleMouseDown(t))},handleTouchEnd:function(e){this.wasTouched=!0;this.handleMouseMove(e);t.resetMouseOver();this.handleReleaseOutside(e)},handleReleaseOutside:function(){this.handleDocTouchEnd.call(this)},handleMouseDown:function(e){t.resetMouseOver();this.mouseIsOver=!0;e&&e.preventDefault&&(this.panEventsEnabled?e.preventDefault():e.touches||e.preventDefault())},addLegend:function(e,i){e=t.processObject(e,t.AmLegend,this.theme);e.divId=i;e.ieW=0;var s;s="object"!=typeof i&&i?document.getElementById(i):i;this.legend=e;e.chart=this;s?(e.div=s,e.position="outside",e.autoMargins=!1):e.div=this.legendDiv;return e},removeLegend:function(){this.legend=void 0;this.previousWidth=0;this.legendDiv.innerHTML=""},handleResize:function(){(t.isPercents(this.width)||t.isPercents(this.height))&&this.invalidateSizeReal();this.renderFix()},renderFix:function(){if(!t.VML){var e=this.container;e&&e.renderFix()}},getSVG:function(){if(t.hasSVG)return this.container},animate:function(e,i,s,a,h,r,n){e["an_"+i]&&t.removeFromArray(this.animations,e["an_"+i]);s={obj:e,frame:0,attribute:i,from:s,to:a,time:h,effect:r,suffix:n};e["an_"+i]=s;this.animations.push(s);return s},setLegendData:function(t){var e=this.legend;e&&e.setData(t)},stopAnim:function(e){t.removeFromArray(this.animations,e)},updateAnimations:function(){var e;this.container&&this.container.update();if(this.animations)for(e=this.animations.length-1;0<=e;e--){var i=this.animations[e],s=t.updateRate*i.time,a=i.frame+1,h=i.obj,r=i.attribute;if(a<=s){i.frame++;var n=Number(i.from),o=Number(i.to)-n,s=t[i.effect](0,a,n,o,s);0===o?(this.animations.splice(e,1),h.node.style[r]=Number(i.to)+i.suffix):h.node.style[r]=s+i.suffix}else h.node.style[r]=Number(i.to)+i.suffix,h.animationFinished=!0,this.animations.splice(e,1)}},update:function(){this.updateAnimations();var t=this.animatable;if(0<t.length){for(var e=!0,i=t.length-1;0<=i;i--){var s=t[i];s&&(s.animationFinished?t.splice(i,1):e=!1)}e&&(this.fire({type:"animationFinished",chart:this}),this.animatable=[])}},inIframe:function(){try{return window.self!==window.top}catch(t){return!0}},brr:function(){}});t.Slice=t.Class({construct:function(){}});t.SerialDataItem=t.Class({construct:function(){}});t.GraphDataItem=t.Class({construct:function(){}});t.Guide=t.Class({construct:function(e){this.cname="Guide";t.applyTheme(this,e,this.cname)}});t.Title=t.Class({construct:function(e){this.cname="Title";t.applyTheme(this,e,this.cname)}});t.Label=t.Class({construct:function(e){this.cname="Label";t.applyTheme(this,e,this.cname)}})})();(function(){var t=window.AmCharts;t.AmGraph=t.Class({construct:function(e){this.cname="AmGraph";this.createEvents("rollOverGraphItem","rollOutGraphItem","clickGraphItem","doubleClickGraphItem","rightClickGraphItem","clickGraph","rollOverGraph","rollOutGraph");this.type="line";this.stackable=!0;this.columnCount=1;this.columnIndex=0;this.centerCustomBullets=this.showBalloon=!0;this.maxBulletSize=50;this.minBulletSize=4;this.balloonText="[[value]]";this.hidden=this.scrollbar=this.animationPlayed=!1;this.pointPosition="middle";this.depthCount=1;this.includeInMinMax=!0;this.negativeBase=0;this.visibleInLegend=!0;this.showAllValueLabels=!1;this.showBulletsAt=this.showBalloonAt="close";this.lineThickness=1;this.dashLength=0;this.connect=!0;this.lineAlpha=1;this.bullet="none";this.bulletBorderThickness=2;this.bulletBorderAlpha=0;this.bulletAlpha=1;this.bulletSize=8;this.cornerRadiusTop=this.hideBulletsCount=this.bulletOffset=0;this.cursorBulletAlpha=1;this.gradientOrientation="vertical";this.dy=this.dx=0;this.periodValue="";this.clustered=!0;this.periodSpan=1;this.accessibleLabel="[[title]] [[category]] [[value]]";this.accessibleSkipText="Press enter to skip [[title]]";this.y=this.x=0;this.switchable=!0;this.tcc=this.minDistance=1;this.labelRotation=0;this.labelAnchor="auto";this.labelOffset=3;this.bcn="graph-";this.dateFormat="MMM DD, YYYY";this.noRounding=!0;t.applyTheme(this,e,this.cname)},init:function(){this.createBalloon()},draw:function(){var e=this.chart;e.isRolledOverBullet=!1;var i=e.type;if(e.drawGraphs){isNaN(this.precision)||(this.numberFormatter?this.numberFormatter.precision=this.precision:this.numberFormatter={precision:this.precision,decimalSeparator:e.decimalSeparator,thousandsSeparator:e.thousandsSeparator});var s=e.container;this.container=s;this.destroy();var a=s.set();this.set=a;a.translate(this.x,this.y);var h=s.set();this.bulletSet=h;h.translate(this.x,this.y);this.behindColumns?(e.graphsBehindSet.push(a),e.bulletBehindSet.push(h)):(e.graphsSet.push(a),e.bulletSet.push(h));var r=this.bulletAxis;t.isString(r)&&(this.bulletAxis=e.getValueAxisById(r));s=s.set();t.remove(this.columnsSet);this.columnsSet=s;t.setCN(e,a,"graph-"+this.type);t.setCN(e,a,"graph-"+this.id);t.setCN(e,h,"graph-"+this.type);t.setCN(e,h,"graph-"+this.id);this.columnsArray=[];this.ownColumns=[];this.allBullets=[];this.animationArray=[];h=this.labelPosition;h||(r=this.valueAxis.stackType,h="top","column"==this.type&&(e.rotate&&(h="right"),"100%"==r||"regular"==r)&&(h="middle"),this.labelPosition=h);t.ifArray(this.data)&&(e=!1,"xy"==i?this.xAxis.axisCreated&&this.yAxis.axisCreated&&(e=!0):this.valueAxis.axisCreated&&(e=!0),!this.hidden&&e&&this.createGraph());a.push(s)}},createGraph:function(){var e=this,i=e.chart;e.startAlpha=i.startAlpha;e.seqAn=i.sequencedAnimation;e.baseCoord=e.valueAxis.baseCoord;void 0===e.fillAlphas&&(e.fillAlphas=0);e.bulletColorR=e.bulletColor;void 0===e.bulletColorR&&(e.bulletColorR=e.lineColorR,e.bulletColorNegative=e.negativeLineColor);void 0===e.bulletAlpha&&(e.bulletAlpha=e.lineAlpha);if("step"==s||t.VML)e.noRounding=!1;var s=i.type;"gantt"==s&&(s="serial");clearTimeout(e.playedTO);if(!isNaN(e.valueAxis.min)&&!isNaN(e.valueAxis.max)){switch(s){case"serial":e.categoryAxis&&(e.createSerialGraph(),"candlestick"==e.type&&1>e.valueAxis.minMaxMultiplier&&e.positiveClip(e.set));break;case"radar":e.createRadarGraph();break;case"xy":e.createXYGraph()}e.playedTO=setTimeout(function(){e.setAnimationPlayed.call(e)},500*e.chart.startDuration)}},setAnimationPlayed:function(){this.animationPlayed=!0},createXYGraph:function(){var t=[],e=[],i=this.xAxis,s=this.yAxis;this.pmh=s.height;this.pmw=i.width;this.pmy=this.pmx=0;var a;for(a=this.start;a<=this.end;a++){var h=this.data[a].axes[i.id].graphs[this.id],r=h.values,n=r.x,o=r.y,r=i.getCoordinate(n,this.noRounding),l=s.getCoordinate(o,this.noRounding);if(!isNaN(n)&&!isNaN(o)&&(t.push(r),e.push(l),h.x=r,h.y=l,n=this.createBullet(h,r,l,a),o=this.labelText)){var o=this.createLabel(h,o),d=0;n&&(d=n.size);this.positionLabel(h,r,l,o,d)}}this.drawLineGraph(t,e);this.launchAnimation()},createRadarGraph:function(){var t=this.valueAxis.stackType,e=[],i=[],s=[],a=[],h,r,n,o,l;for(l=this.start;l<=this.end;l++){var d=this.data[l].axes[this.valueAxis.id].graphs[this.id],u,c;"none"==t||"3d"==t?u=d.values.value:(u=d.values.close,c=d.values.open);if(isNaN(u))this.connect||(this.drawLineGraph(e,i,s,a),e=[],i=[],s=[],a=[]);else{var p=this.valueAxis.getCoordinate(u,this.noRounding)-this.height,p=p*this.valueAxis.rMultiplier,m=-360/(this.end-this.start+1)*l;"middle"==this.valueAxis.pointPosition&&(m-=180/(this.end-this.start+1));u=p*Math.sin(m/180*Math.PI);p*=Math.cos(m/180*Math.PI);e.push(u);i.push(p);if(!isNaN(c)){var f=this.valueAxis.getCoordinate(c,this.noRounding)-this.height,f=f*this.valueAxis.rMultiplier,g=f*Math.sin(m/180*Math.PI),m=f*Math.cos(m/180*Math.PI);s.push(g);a.push(m);isNaN(n)&&(n=g);isNaN(o)&&(o=m)}m=this.createBullet(d,u,p,l);d.x=u;d.y=p;if(g=this.labelText)g=this.createLabel(d,g),f=0,m&&(f=m.size),this.positionLabel(d,u,p,g,f);isNaN(h)&&(h=u);isNaN(r)&&(r=p)}}e.push(h);i.push(r);isNaN(n)||(s.push(n),a.push(o));this.drawLineGraph(e,i,s,a);this.launchAnimation()},positionLabel:function(t,e,i,s,a){if(s){var h=this.chart,r=this.valueAxis,n="middle",o=!1,l=this.labelPosition,d=s.getBBox(),u=this.chart.rotate,c=t.isNegative,p=this.fontSize;void 0===p&&(p=this.chart.fontSize);i-=d.height/2-p/2-1;void 0!==t.labelIsNegative&&(c=t.labelIsNegative);switch(l){case"right":l=u?c?"left":"right":"right";break;case"top":l=u?"top":c?"bottom":"top";break;case"bottom":l=u?"bottom":c?"top":"bottom";break;case"left":l=u?c?"right":"left":"left"}var p=t.columnGraphics,m=0,f=0;p&&(m=p.x,f=p.y);var g=this.labelOffset;switch(l){case"right":n="start";e+=a/2+g;break;case"top":i=r.reversed?i+(a/2+d.height/2+g):i-(a/2+d.height/2+g);break;case"bottom":i=r.reversed?i-(a/2+d.height/2+g):i+(a/2+d.height/2+g);break;case"left":n="end";e-=a/2+g;break;case"inside":"column"==this.type&&(o=!0,u?c?(n="end",e=m-3-g):(n="start",e=m+3+g):i=c?f+7+g:f-10-g);break;case"middle":"column"==this.type&&(o=!0,u?e-=(e-m)/2+g-3:i-=(i-f)/2+g-3)}"auto"!=this.labelAnchor&&(n=this.labelAnchor);s.attr({"text-anchor":n});this.labelRotation&&s.rotate(this.labelRotation);s.translate(e,i);!this.showAllValueLabels&&p&&o&&(d=s.getBBox(),d.height>t.columnHeight||d.width>t.columnWidth)&&(s.remove(),s=null);if(s&&"radar"!=h.type)if(u){if(0>i||i>this.height)s.remove(),s=null;!this.showAllValueLabels&&s&&(0>e||e>this.width)&&(s.remove(),s=null)}else{if(0>e||e>this.width)s.remove(),s=null;!this.showAllValueLabels&&s&&(0>i||i>this.height)&&(s.remove(),s=null)}s&&this.allBullets.push(s);return s}},getGradRotation:function(){var t=270;"horizontal"==this.gradientOrientation&&(t=0);return this.gradientRotation=t},createSerialGraph:function(){this.dashLengthSwitched=this.fillColorsSwitched=this.lineColorSwitched=void 0;var e=this.chart,i=this.id,s=this.index,a=this.data,h=this.chart.container,r=this.valueAxis,n=this.type,o=this.columnWidthReal,l=this.showBulletsAt;isNaN(this.columnWidth)||(o=this.columnWidth);isNaN(o)&&(o=.8);var d=this.useNegativeColorIfDown,u=this.width,c=this.height,p=this.y,m=this.rotate,f=this.columnCount,g=t.toCoordinate(this.cornerRadiusTop,o/2),v=this.connect,b=[],x=[],N,C,y,w,M=this.chart.graphs.length,A,S=this.dx/this.tcc,D=this.dy/this.tcc,T=r.stackType,L=this.start,k=this.end,B=this.scrollbar,R="graph-column-";B&&(R="scrollbar-graph-column-");var O=this.categoryAxis,E=this.baseCoord,I=this.negativeBase,G=this.columnIndex,F=this.lineThickness,z=this.lineAlpha,P=this.lineColorR,W=this.dashLength,Y=this.set,H,V=this.getGradRotation(),X=this.chart.columnSpacing,U=O.cellWidth,j=(U*o-f)/f;X>j&&(X=j);var Z,q,_,K=c,J=u,Q=0,$=0,tt=0,et=0,it=0,st=0,at=this.fillColorsR,ht=this.negativeFillColors,rt=this.negativeLineColor,nt=this.fillAlphas,ot=this.negativeFillAlphas;"object"==typeof nt&&(nt=nt[0]);"object"==typeof ot&&(ot=ot[0]);var lt=this.noRounding;"step"==n&&(lt=!1);var dt=r.getCoordinate(r.min);r.logarithmic&&(dt=r.getCoordinate(r.minReal));this.minCoord=dt;this.resetBullet&&(this.bullet="none");if(!(B||"line"!=n&&"smoothedLine"!=n&&"step"!=n||(1==a.length&&"step"!=n&&"none"==this.bullet&&(this.bullet="round",this.resetBullet=!0),!ht&&void 0==rt||d))){var ut=I;ut>r.max&&(ut=r.max);ut<r.min&&(ut=r.min);r.logarithmic&&(ut=r.minReal);var ct=r.getCoordinate(ut),pt=r.getCoordinate(r.max);m?(K=c,J=Math.abs(pt-ct),tt=c,et=Math.abs(dt-ct),st=$=0,r.reversed?(Q=0,it=ct):(Q=ct,it=0)):(J=u,K=Math.abs(pt-ct),et=u,tt=Math.abs(dt-ct),it=Q=0,r.reversed?(st=p,$=ct):st=ct)}var mt=Math.round;this.pmx=mt(Q);this.pmy=mt($);this.pmh=mt(K);this.pmw=mt(J);this.nmx=mt(it);this.nmy=mt(st);this.nmh=mt(tt);this.nmw=mt(et);t.isModern||(this.nmy=this.nmx=0,this.nmh=this.height);this.clustered||(f=1);o="column"==n?(U*o-X*(f-1))/f:U*o;1>o&&(o=1);var ft=this.fixedColumnWidth;isNaN(ft)||(o=ft);var gt;if("line"==n||"step"==n||"smoothedLine"==n){if(0<L){for(gt=L-1;-1<gt;gt--)if(Z=a[gt],q=Z.axes[r.id].graphs[i],_=q.values.value,!isNaN(_)){L=gt;break}if(this.lineColorField)for(gt=L;-1<gt;gt--)if(Z=a[gt],q=Z.axes[r.id].graphs[i],q.lineColor){this.lineColorSwitched=q.lineColor;void 0===this.bulletColor&&(this.bulletColorSwitched=this.lineColorSwitched);break}if(this.fillColorsField)for(gt=L;-1<gt;gt--)if(Z=a[gt],q=Z.axes[r.id].graphs[i],q.fillColors){this.fillColorsSwitched=q.fillColors;break}if(this.dashLengthField)for(gt=L;-1<gt;gt--)if(Z=a[gt],q=Z.axes[r.id].graphs[i],!isNaN(q.dashLength)){this.dashLengthSwitched=q.dashLength;break}}if(k<a.length-1)for(gt=k+1;gt<a.length;gt++)if(Z=a[gt],q=Z.axes[r.id].graphs[i],_=q.values.value,!isNaN(_)){k=gt;break}}k<a.length-1&&k++;var vt=[],bt=[],xt=!1;if("line"==n||"step"==n||"smoothedLine"==n)if(this.stackable&&"regular"==T||"100%"==T||this.fillToGraph)xt=!0;var Nt=this.noStepRisers,Ct=-1e3,yt=-1e3,wt=this.minDistance,Mt=!0,At=!1;for(gt=L;gt<=k;gt++){Z=a[gt];q=Z.axes[r.id].graphs[i];q.index=gt;var St,Dt=NaN;if(d&&void 0==this.openField)for(var Tt=gt+1;Tt<a.length&&(!a[Tt]||!(St=a[gt+1].axes[r.id].graphs[i])||!St.values||(Dt=St.values.value,isNaN(Dt)));Tt++);var Lt,kt,Bt,Rt,Ot=NaN,Et=NaN,It=NaN,Gt=NaN,Ft=NaN,zt=NaN,Pt=NaN,Wt=NaN,Yt=NaN,Ht=NaN,Vt=NaN,Xt=NaN,Ut=NaN,jt=NaN,Zt=NaN,qt=NaN,_t=NaN,Kt=void 0,Jt=at,Qt=nt,$t=P,te,ee,ie=this.proCandlesticks,se=this.topRadius,ae=c-1,he=u-1,re=this.pattern;void 0!=q.pattern&&(re=q.pattern);isNaN(q.alpha)||(Qt=q.alpha);isNaN(q.dashLength)||(W=q.dashLength);var ne=q.values;r.recalculateToPercents&&(ne=q.percents);"none"==T&&(G=isNaN(q.columnIndex)?this.columnIndex:q.columnIndex);if(ne){jt=this.stackable&&"none"!=T&&"3d"!=T?ne.close:ne.value;if("candlestick"==n||"ohlc"==n)jt=ne.close,qt=ne.low,Pt=r.getCoordinate(qt),Zt=ne.high,Yt=r.getCoordinate(Zt);_t=ne.open;It=r.getCoordinate(jt,lt);isNaN(_t)||(Ft=r.getCoordinate(_t,lt),d&&"regular"!=T&&"100%"!=T&&(Dt=_t,_t=Ft=NaN));d&&(void 0==this.openField?St&&(St.isNegative=Dt<jt?!0:!1,isNaN(Dt)&&(q.isNegative=!Mt)):q.isNegative=Dt>jt?!0:!1);if(!B)switch(this.showBalloonAt){case"close":q.y=It;break;case"open":q.y=Ft;break;case"high":q.y=Yt;break;case"low":q.y=Pt}var Ot=Z.x[O.id],oe=this.periodSpan-1;"step"!=n||isNaN(Z.cellWidth)||(U=Z.cellWidth);var le=Math.floor(U/2)+Math.floor(oe*U/2),de=le,ue=0;"left"==this.stepDirection&&(ue=(2*U+oe*U)/2,Ot-=ue);"center"==this.stepDirection&&(ue=U/2,Ot-=ue);"start"==this.pointPosition&&(Ot-=U/2+Math.floor(oe*U/2),le=0,de=Math.floor(U)+Math.floor(oe*U));"end"==this.pointPosition&&(Ot+=U/2+Math.floor(oe*U/2),le=Math.floor(U)+Math.floor(oe*U),de=0);if(Nt){var ce=this.columnWidth;isNaN(ce)||(le*=ce,de*=ce)}B||(q.x=Ot);-1e5>Ot&&(Ot=-1e5);Ot>u+1e5&&(Ot=u+1e5);m?(Et=It,Gt=Ft,Ft=It=Ot,isNaN(_t)&&!this.fillToGraph&&(Gt=E),zt=Pt,Wt=Yt):(Gt=Et=Ot,isNaN(_t)&&!this.fillToGraph&&(Ft=E));if(!ie&&jt<_t||ie&&jt<H)q.isNegative=!0,ht&&(Jt=ht),ot&&(Qt=ot),void 0!=rt&&($t=rt);At=!1;isNaN(jt)||(d?jt>Dt?(Mt&&(At=!0),Mt=!1):(Mt||(At=!0),Mt=!0):q.isNegative=jt<I?!0:!1,H=jt);var pe=!1;B&&e.chartScrollbar.ignoreCustomColors&&(pe=!0);pe||(void 0!=q.color&&(Jt=q.color),q.fillColors&&(Jt=q.fillColors));It=t.fitToBounds(It,-3e4,3e4);switch(n){case"line":if(isNaN(jt))v||(this.drawLineGraph(b,x,vt,bt),b=[],x=[],vt=[],bt=[]);else{if(Math.abs(Et-Ct)>=wt||Math.abs(It-yt)>=wt)b.push(Et),x.push(It),Ct=Et,yt=It;Ht=Et;Vt=It;Xt=Et;Ut=It;!xt||isNaN(Ft)||isNaN(Gt)||(vt.push(Gt),bt.push(Ft));if(At||void 0!=q.lineColor&&q.lineColor!=this.lineColorSwitched||void 0!=q.fillColors&&q.fillColors!=this.fillColorsSwitched||!isNaN(q.dashLength))this.drawLineGraph(b,x,vt,bt),b=[Et],x=[It],vt=[],bt=[],!xt||isNaN(Ft)||isNaN(Gt)||(vt.push(Gt),bt.push(Ft)),d?(Mt?(this.lineColorSwitched=P,this.fillColorsSwitched=at):(this.lineColorSwitched=rt,this.fillColorsSwitched=ht),void 0===this.bulletColor&&(this.bulletColorSwitched=P)):(this.lineColorSwitched=q.lineColor,this.fillColorsSwitched=q.fillColors,void 0===this.bulletColor&&(this.bulletColorSwitched=this.lineColorSwitched)),this.dashLengthSwitched=q.dashLength;q.gap&&(this.drawLineGraph(b,x,vt,bt),b=[],x=[],vt=[],bt=[])}break;case"smoothedLine":if(isNaN(jt))v||(this.drawSmoothedGraph(b,x,vt,bt),b=[],x=[],vt=[],bt=[]);else{if(Math.abs(Et-Ct)>=wt||Math.abs(It-yt)>=wt)b.push(Et),x.push(It),Ct=Et,yt=It;Ht=Et;Vt=It;Xt=Et;Ut=It;!xt||isNaN(Ft)||isNaN(Gt)||(vt.push(Gt),bt.push(Ft));void 0==q.lineColor&&void 0==q.fillColors&&isNaN(q.dashLength)||(this.drawSmoothedGraph(b,x,vt,bt),b=[Et],x=[It],vt=[],bt=[],!xt||isNaN(Ft)||isNaN(Gt)||(vt.push(Gt),bt.push(Ft)),this.lineColorSwitched=q.lineColor,this.fillColorsSwitched=q.fillColors,this.dashLengthSwitched=q.dashLength);q.gap&&(this.drawSmoothedGraph(b,x,vt,bt),b=[],x=[],vt=[],bt=[])}break;case"step":if(!isNaN(jt)){m?(isNaN(N)||(b.push(N),x.push(It-le)),x.push(It-le),b.push(Et),x.push(It+de),b.push(Et),!xt||isNaN(Ft)||isNaN(Gt)||(isNaN(y)||(vt.push(y),bt.push(Ft-le)),vt.push(Gt),bt.push(Ft-le),vt.push(Gt),bt.push(Ft+de))):(isNaN(C)||(x.push(C),b.push(Et-le)),b.push(Et-le),x.push(It),b.push(Et+de),x.push(It),!xt||isNaN(Ft)||isNaN(Gt)||(isNaN(w)||(vt.push(Gt-le),bt.push(w)),vt.push(Gt-le),bt.push(Ft),vt.push(Gt+de),bt.push(Ft)));N=Et;C=It;y=Gt;w=Ft;Ht=Et;Vt=It;Xt=Et;Ut=It;if(At||void 0!=q.lineColor||void 0!=q.fillColors||!isNaN(q.dashLength)){var me=b[b.length-2],fe=x[x.length-2];b.pop();x.pop();vt.pop();bt.pop();this.drawLineGraph(b,x,vt,bt);b=[me];x=[fe];vt=[];bt=[];xt&&(vt=[me,me+le+de],bt=[w,w]);m?(x.push(It+de),b.push(Et)):(b.push(Et+de),x.push(It));this.lineColorSwitched=q.lineColor;this.fillColorsSwitched=q.fillColors;this.dashLengthSwitched=q.dashLength;d&&(Mt?(this.lineColorSwitched=P,this.fillColorsSwitched=at):(this.lineColorSwitched=rt,this.fillColorsSwitched=ht))}if(Nt||q.gap)N=C=NaN,this.drawLineGraph(b,x,vt,bt),b=[],x=[],vt=[],bt=[]}else if(!v){if(1>=this.periodSpan||1<this.periodSpan&&Et-N>le+de)N=C=NaN;this.drawLineGraph(b,x,vt,bt);b=[];x=[];vt=[];bt=[]}break;case"column":te=$t;void 0!=q.lineColor&&(te=q.lineColor);if(!isNaN(jt)){d||(q.isNegative=jt<I?!0:!1);q.isNegative&&(ht&&(Jt=ht),void 0!=rt&&(te=rt));var ge=r.min,ve=r.max,be=_t;isNaN(be)&&(be=I);if(!(jt<ge&&be<ge||jt>ve&&be>ve)){var xe;if(m){"3d"==T?(kt=It-(f/2-this.depthCount+1)*(o+X)+X/2+D*G,Lt=Gt+S*G,xe=G):(kt=Math.floor(It-(f/2-G)*(o+X)+X/2),Lt=Gt,xe=0);Bt=o;Ht=Et;Vt=kt+o/2;Xt=Et;Ut=kt+o/2;kt+Bt>c+xe*D&&(Bt=c-kt+xe*D);kt<xe*D&&(Bt+=kt,kt=xe*D);Rt=Et-Gt;var Ne=Lt;Lt=t.fitToBounds(Lt,0,u);Rt+=Ne-Lt;Rt=t.fitToBounds(Rt,-Lt,u-Lt+S*G);q.labelIsNegative=0>Rt?!0:!1;0===Rt&&1/jt===1/-0&&(q.labelIsNegative=!0);isNaN(Z.percentWidthValue)||(Bt=this.height*Z.percentWidthValue/100,kt=Ot-Bt/2,Vt=kt+Bt/2);Bt=t.roundTo(Bt,2);Rt=t.roundTo(Rt,2);kt<c&&0<Bt&&(Kt=new t.Cuboid(h,Rt,Bt,S-e.d3x,D-e.d3y,Jt,Qt,F,te,z,V,g,m,W,re,se,R),q.columnWidth=Math.abs(Rt),q.columnHeight=Math.abs(Bt))}else{"3d"==T?(Lt=Et-(f/2-this.depthCount+1)*(o+X)+X/2+S*G,kt=Ft+D*G,xe=G):(Lt=Et-(f/2-G)*(o+X)+X/2,kt=Ft,xe=0);Bt=o;Ht=Lt+o/2;Vt=It;Xt=Lt+o/2;Ut=It;Lt+Bt>u+xe*S&&(Bt=u-Lt+xe*S);Lt<xe*S&&(Bt+=Lt-xe*S,Lt=xe*S);Rt=It-Ft;q.labelIsNegative=0<Rt?!0:!1;0===Rt&&1/jt!==1/Math.abs(jt)&&(q.labelIsNegative=!0);var Ce=kt;kt=t.fitToBounds(kt,this.dy,c);Rt+=Ce-kt;Rt=t.fitToBounds(Rt,-kt+D*xe,c-kt);isNaN(Z.percentWidthValue)||(Bt=this.width*Z.percentWidthValue/100,Lt=Ot-Bt/2,Ht=Lt+Bt/2);Bt=t.roundTo(Bt,2);Rt=t.roundTo(Rt,2);Lt<u+G*S&&0<Bt&&(this.showOnAxis&&(kt-=D/2),Kt=new t.Cuboid(h,Bt,Rt,S-e.d3x,D-e.d3y,Jt,Qt,F,te,this.lineAlpha,V,g,m,W,re,se,R),q.columnHeight=Math.abs(Rt),q.columnWidth=Math.abs(Bt))}}if(Kt){ee=Kt.set;t.setCN(e,Kt.set,"graph-"+this.type);t.setCN(e,Kt.set,"graph-"+this.id);q.className&&t.setCN(e,Kt.set,q.className,!0);q.columnGraphics=ee;Lt=t.roundTo(Lt,2);kt=t.roundTo(kt,2);ee.translate(Lt,kt);(q.url||this.showHandOnHover)&&ee.setAttr("cursor","pointer");if(!B){"none"==T&&(A=m?(this.end+1-gt)*M-s:M*gt+s);"3d"==T&&(m?(A=(this.end+1-gt)*M-s-1e3*this.depthCount,Ht+=S*G,Xt+=S*G,q.y+=S*G):(A=(M-s)*(gt+1)+1e3*this.depthCount,Vt+=D*G,Ut+=D*G,q.y+=D*G));if("regular"==T||"100%"==T)A=m?0<ne.value?(this.end+1-gt)*M+s:(this.end+1-gt)*M-s:0<ne.value?M*gt+s:M*gt-s;this.columnsArray.push({column:Kt,depth:A});q.x=m?kt+Bt/2:Lt+Bt/2;this.ownColumns.push(Kt);this.animateColumns(Kt,gt,Et,Gt,It,Ft);this.addListeners(ee,q);void 0!==this.tabIndex&&ee.setAttr("tabindex",this.tabIndex)}this.columnsSet.push(ee)}}break;case"candlestick":if(!isNaN(_t)&&!isNaN(jt)){var ye,we;te=$t;void 0!=q.lineColor&&(te=q.lineColor);Ht=Et;Ut=Vt=It;Xt=Et;if(m){"open"==l&&(Xt=Gt);"high"==l&&(Xt=Wt);"low"==l&&(Xt=zt);Et=t.fitToBounds(Et,0,he);Gt=t.fitToBounds(Gt,0,he);zt=t.fitToBounds(zt,0,he);Wt=t.fitToBounds(Wt,0,he);if(0===Et&&0===Gt&&0===zt&&0===Wt)continue;if(Et==he&&Gt==he&&zt==he&&Wt==he)continue;kt=It-o/2;Lt=Gt;Bt=o;kt+Bt>c&&(Bt=c-kt);0>kt&&(Bt+=kt,kt=0);if(kt<c&&0<Bt){var Me,Ae;jt>_t?(Me=[Et,Wt],Ae=[Gt,zt]):(Me=[Gt,Wt],Ae=[Et,zt]);!isNaN(Wt)&&!isNaN(zt)&&It<c&&0<It&&(ye=t.line(h,Me,[It,It],te,z,F),we=t.line(h,Ae,[It,It],te,z,F));Rt=Et-Gt;Kt=new t.Cuboid(h,Rt,Bt,S,D,Jt,nt,F,te,z,V,g,m,W,re,se,R)}}else{"open"==l&&(Ut=Ft);"high"==l&&(Ut=Yt);"low"==l&&(Ut=Pt);It=t.fitToBounds(It,0,ae);Ft=t.fitToBounds(Ft,0,ae);Pt=t.fitToBounds(Pt,0,ae);Yt=t.fitToBounds(Yt,0,ae);if(0===It&&0===Ft&&0===Pt&&0===Yt)continue;if(It==ae&&Ft==ae&&Pt==ae&&Yt==ae)continue;Lt=Et-o/2;kt=Ft+F/2;Bt=o;Lt+Bt>u&&(Bt=u-Lt);0>Lt&&(Bt+=Lt,Lt=0);Rt=It-Ft;if(Lt<u&&0<Bt){ie&&jt>=_t&&(Qt=0);var Kt=new t.Cuboid(h,Bt,Rt,S,D,Jt,Qt,F,te,z,V,g,m,W,re,se,R),Se,De;jt>_t?(Se=[It,Yt],De=[Ft,Pt]):(Se=[Ft,Yt],De=[It,Pt]);!isNaN(Yt)&&!isNaN(Pt)&&Et<u&&0<Et&&(ye=t.line(h,[Et,Et],Se,te,z,F),we=t.line(h,[Et,Et],De,te,z,F),t.setCN(e,ye,this.bcn+"line-high"),q.className&&t.setCN(e,ye,q.className,!0),t.setCN(e,we,this.bcn+"line-low"),q.className&&t.setCN(e,we,q.className,!0))}}Kt&&(ee=Kt.set,q.columnGraphics=ee,Y.push(ee),ee.translate(Lt,kt-F/2),(q.url||this.showHandOnHover)&&ee.setAttr("cursor","pointer"),ye&&(Y.push(ye),Y.push(we)),B||(q.x=m?kt+Bt/2:Lt+Bt/2,this.animateColumns(Kt,gt,Et,Gt,It,Ft),this.addListeners(ee,q),void 0!==this.tabIndex&&ee.setAttr("tabindex",this.tabIndex)))}break;case"ohlc":if(!(isNaN(_t)||isNaN(Zt)||isNaN(qt)||isNaN(jt))){var Te=h.set();Y.push(Te);jt<_t&&(q.isNegative=!0,void 0!=rt&&($t=rt));void 0!=q.lineColor&&($t=q.lineColor);var Le,ke,Be;if(m){Ut=It;Xt=Et;"open"==l&&(Xt=Gt);"high"==l&&(Xt=Wt);"low"==l&&(Xt=zt);zt=t.fitToBounds(zt,0,he);Wt=t.fitToBounds(Wt,0,he);if(0===Et&&0===Gt&&0===zt&&0===Wt)continue;if(Et==he&&Gt==he&&zt==he&&Wt==he)continue;var Re=It-o/2,Re=t.fitToBounds(Re,0,c),Oe=t.fitToBounds(It,0,c),Ee=It+o/2,Ee=t.fitToBounds(Ee,0,c);0<=Gt&&Gt<=he&&(ke=t.line(h,[Gt,Gt],[Re,Oe],$t,z,F,W));0<It&&It<c&&(Le=t.line(h,[zt,Wt],[It,It],$t,z,F,W));0<=Et&&Et<=he&&(Be=t.line(h,[Et,Et],[Oe,Ee],$t,z,F,W))}else{Ut=It;"open"==l&&(Ut=Ft);"high"==l&&(Ut=Yt);"low"==l&&(Ut=Pt);var Xt=Et,Pt=t.fitToBounds(Pt,0,ae),Yt=t.fitToBounds(Yt,0,ae),Ie=Et-o/2,Ie=t.fitToBounds(Ie,0,u),Ge=t.fitToBounds(Et,0,u),Fe=Et+o/2,Fe=t.fitToBounds(Fe,0,u);0<=Ft&&Ft<=ae&&(ke=t.line(h,[Ie,Ge],[Ft,Ft],$t,z,F,W));0<Et&&Et<u&&(Le=t.line(h,[Et,Et],[Pt,Yt],$t,z,F,W));0<=It&&It<=ae&&(Be=t.line(h,[Ge,Fe],[It,It],$t,z,F,W))}Y.push(ke);Y.push(Le);Y.push(Be);t.setCN(e,ke,this.bcn+"stroke-open");t.setCN(e,Be,this.bcn+"stroke-close");t.setCN(e,Le,this.bcn+"stroke");q.className&&t.setCN(e,Te,q.className,!0);Ht=Et;Vt=It}}if(!B&&!isNaN(jt)){var ze=this.hideBulletsCount;if(this.end-this.start<=ze||0===ze){var Pe=this.createBullet(q,Xt,Ut,gt),We=this.labelText;if(We&&!isNaN(Ht)&&!isNaN(Ht)){var Ye=this.createLabel(q,We),He=0;Pe&&(He=Pe.size);this.positionLabel(q,Ht,Vt,Ye,He)}if("regular"==T||"100%"==T){var Ve=r.totalText;if(Ve){var Xe=this.createLabel(q,Ve,r.totalTextColor);t.setCN(e,Xe,this.bcn+"label-total");this.allBullets.push(Xe);if(Xe){var Ue=Xe.getBBox(),je=Ue.width,Ze=Ue.height,qe,_e,Ke=r.totalTextOffset,Je=r.totals[gt];Je&&Je.remove();var Qe=0;"column"!=n&&(Qe=this.bulletSize);m?(_e=Vt,qe=0>jt?Et-je/2-2-Qe-Ke:Et+je/2+3+Qe+Ke):(qe=Ht,_e=0>jt?It+Ze/2+Qe+Ke:It-Ze/2-3-Qe-Ke);Xe.translate(qe,_e);r.totals[gt]=Xe;m?(0>_e||_e>c)&&Xe.remove():(0>qe||qe>u)&&Xe.remove(); }}}}}}}this.lastDataItem=q;if("line"==n||"step"==n||"smoothedLine"==n)"smoothedLine"==n?this.drawSmoothedGraph(b,x,vt,bt):this.drawLineGraph(b,x,vt,bt),B||this.launchAnimation();this.bulletsHidden&&this.hideBullets();this.customBulletsHidden&&this.hideCustomBullets()},animateColumns:function(t,e){var i=this,s=i.chart.startDuration;0<s&&!i.animationPlayed&&(i.seqAn?(t.set.hide(),i.animationArray.push(t),s=setTimeout(function(){i.animate.call(i)},s/(i.end-i.start+1)*(e-i.start)*1e3),i.timeOuts.push(s)):i.animate(t),i.chart.animatable.push(t))},createLabel:function(e,i,s){var a=this.chart,h=e.labelColor;h||(h=this.color);h||(h=a.color);s&&(h=s);s=this.fontSize;void 0===s&&(this.fontSize=s=a.fontSize);var r=this.labelFunction;i=a.formatString(i,e);i=t.cleanFromEmpty(i);r&&(i=r(e,i));if(void 0!==i&&""!==i)return e=t.text(this.container,i,h,a.fontFamily,s),e.node.style.pointerEvents="none",t.setCN(a,e,this.bcn+"label"),this.bulletSet.push(e),e},positiveClip:function(t){t.clipRect(this.pmx,this.pmy,this.pmw,this.pmh)},negativeClip:function(t){t.clipRect(this.nmx,this.nmy,this.nmw,this.nmh)},drawLineGraph:function(e,i,s,a){var h=this;if(1<e.length){var r=h.noRounding,n=h.set,o=h.chart,l=h.container,d=l.set(),u=l.set();n.push(u);n.push(d);var c=h.lineAlpha,p=h.lineThickness,n=h.fillAlphas,m=h.lineColorR,f=h.negativeLineAlpha;isNaN(f)&&(f=c);var g=h.lineColorSwitched;g&&(m=g);var g=h.fillColorsR,v=h.fillColorsSwitched;v&&(g=v);var b=h.dashLength;(v=h.dashLengthSwitched)&&(b=v);var v=h.negativeLineColor,x=h.negativeFillColors,N=h.negativeFillAlphas,C=h.baseCoord;0!==h.negativeBase&&(C=h.valueAxis.getCoordinate(h.negativeBase,r),C>h.height&&(C=h.height),0>C&&(C=0));c=t.line(l,e,i,m,c,p,b,!1,!0,r);c.node.setAttribute("stroke-linejoin","round");t.setCN(o,c,h.bcn+"stroke");d.push(c);d.click(function(t){h.handleGraphEvent(t,"clickGraph")}).mouseover(function(t){h.handleGraphEvent(t,"rollOverGraph")}).mouseout(function(t){h.handleGraphEvent(t,"rollOutGraph")}).touchmove(function(t){h.chart.handleMouseMove(t)}).touchend(function(t){h.chart.handleTouchEnd(t)});void 0===v||h.useNegativeColorIfDown||(p=t.line(l,e,i,v,f,p,b,!1,!0,r),p.node.setAttribute("stroke-linejoin","round"),t.setCN(o,p,h.bcn+"stroke"),t.setCN(o,p,h.bcn+"stroke-negative"),u.push(p));if(0<n||0<N)if(p=e.join(";").split(";"),f=i.join(";").split(";"),c=o.type,"serial"==c||"radar"==c?0<s.length?(s.reverse(),a.reverse(),p=e.concat(s),f=i.concat(a)):"radar"==c?(f.push(0),p.push(0)):h.rotate?(f.push(f[f.length-1]),p.push(C),f.push(f[0]),p.push(C),f.push(f[0]),p.push(p[0])):(p.push(p[p.length-1]),f.push(C),p.push(p[0]),f.push(C),p.push(e[0]),f.push(f[0])):"xy"==c&&(i=h.fillToAxis)&&(t.isString(i)&&(i=o.getValueAxisById(i)),"H"==i.orientation?(C="top"==i.position?0:i.height,p.push(p[p.length-1]),f.push(C),p.push(p[0]),f.push(C),p.push(e[0]),f.push(f[0])):(C="left"==i.position?0:i.width,f.push(f[f.length-1]),p.push(C),f.push(f[0]),p.push(C),f.push(f[0]),p.push(p[0]))),e=h.gradientRotation,0<n&&(i=t.polygon(l,p,f,g,n,1,"#000",0,e,r),i.pattern(h.pattern,NaN,o.path),t.setCN(o,i,h.bcn+"fill"),d.push(i)),x||void 0!==v)isNaN(N)&&(N=n),x||(x=v),r=t.polygon(l,p,f,x,N,1,"#000",0,e,r),t.setCN(o,r,h.bcn+"fill"),t.setCN(o,r,h.bcn+"fill-negative"),r.pattern(h.pattern,NaN,o.path),u.push(r),u.click(function(t){h.handleGraphEvent(t,"clickGraph")}).mouseover(function(t){h.handleGraphEvent(t,"rollOverGraph")}).mouseout(function(t){h.handleGraphEvent(t,"rollOutGraph")}).touchmove(function(t){h.chart.handleMouseMove(t)}).touchend(function(t){h.chart.handleTouchEnd(t)});h.applyMask(u,d)}},applyMask:function(t,e){var i=t.length();"serial"!=this.chart.type||this.scrollbar||(this.positiveClip(e),0<i&&this.negativeClip(t))},drawSmoothedGraph:function(e,i,s,a){if(1<e.length){var h=this.set,r=this.chart,n=this.container,o=n.set(),l=n.set();h.push(l);h.push(o);var d=this.lineAlpha,u=this.lineThickness,h=this.dashLength,c=this.fillAlphas,p=this.lineColorR,m=this.fillColorsR,f=this.negativeLineColor,g=this.negativeFillColors,v=this.negativeFillAlphas,b=this.baseCoord,x=this.lineColorSwitched;x&&(p=x);(x=this.fillColorsSwitched)&&(m=x);var N=this.negativeLineAlpha;isNaN(N)&&(N=d);x=this.getGradRotation();d=new t.Bezier(n,e,i,p,d,u,m,0,h,void 0,x);t.setCN(r,d,this.bcn+"stroke");o.push(d.path);void 0!==f&&(u=new t.Bezier(n,e,i,f,N,u,m,0,h,void 0,x),t.setCN(r,u,this.bcn+"stroke"),t.setCN(r,u,this.bcn+"stroke-negative"),l.push(u.path));0<c&&(u=e.join(";").split(";"),d=i.join(";").split(";"),p="",0<s.length?(s.push("M"),a.push("M"),s.reverse(),a.reverse(),u=e.concat(s),d=i.concat(a)):(this.rotate?(p+=" L"+b+","+i[i.length-1],p+=" L"+b+","+i[0]):(p+=" L"+e[e.length-1]+","+b,p+=" L"+e[0]+","+b),p+=" L"+e[0]+","+i[0]),e=new t.Bezier(n,u,d,NaN,0,0,m,c,h,p,x),t.setCN(r,e,this.bcn+"fill"),e.path.pattern(this.pattern,NaN,r.path),o.push(e.path),g||void 0!==f)&&(v||(v=c),g||(g=f),n=new t.Bezier(n,u,d,NaN,0,0,g,v,h,p,x),n.path.pattern(this.pattern,NaN,r.path),t.setCN(r,n,this.bcn+"fill"),t.setCN(r,n,this.bcn+"fill-negative"),l.push(n.path));this.applyMask(l,o)}},launchAnimation:function(){var e=this,i=e.chart.startDuration;if(0<i&&!e.animationPlayed){var s=e.set,a=e.bulletSet;t.VML||(s.attr({opacity:e.startAlpha}),a.attr({opacity:e.startAlpha}));s.hide();a.hide();e.seqAn?(i=setTimeout(function(){e.animateGraphs.call(e)},e.index*i*1e3),e.timeOuts.push(i)):e.animateGraphs()}},animateGraphs:function(){var t=this.chart,e=this.set,i=this.bulletSet,s=this.x,a=this.y;e.show();i.show();var h=t.startDuration,r=t.startEffect;e&&(this.rotate?(e.translate(-1e3,a),i.translate(-1e3,a)):(e.translate(s,-1e3),i.translate(s,-1e3)),e.animate({opacity:1,translate:s+","+a},h,r),i.animate({opacity:1,translate:s+","+a},h,r),t.animatable.push(e))},animate:function(e){var i=this.chart,s=this.animationArray;!e&&0<s.length&&(e=s[0],s.shift());s=t[t.getEffect(i.startEffect)];i=i.startDuration;e&&(this.rotate?e.animateWidth(i,s):e.animateHeight(i,s),e.set.show())},legendKeyColor:function(){var t=this.legendColor,e=this.lineAlpha;void 0===t&&(t=this.lineColorR,0===e&&(e=this.fillColorsR)&&(t="object"==typeof e?e[0]:e));return t},legendKeyAlpha:function(){var t=this.legendAlpha;void 0===t&&(t=this.lineAlpha,this.fillAlphas>t&&(t=this.fillAlphas),0===t&&(t=this.bulletAlpha),0===t&&(t=1));return t},createBullet:function(e,i,s){if(!isNaN(i)&&!isNaN(s)&&("none"!=this.bullet||this.customBullet||e.bullet||e.customBullet)){var a=this.chart,h=this.container,r=this.bulletOffset,n=this.bulletSize;isNaN(e.bulletSize)||(n=e.bulletSize);var o=e.values.value,l=this.maxValue,d=this.minValue,u=this.maxBulletSize,c=this.minBulletSize;isNaN(l)||(isNaN(o)||(n=(o-d)/(l-d)*(u-c)+c),d==l&&(n=u));l=n;this.bulletAxis&&(n=e.values.error,isNaN(n)||(o=n),n=this.bulletAxis.stepWidth*o);n<this.minBulletSize&&(n=this.minBulletSize);this.rotate?i=e.isNegative?i-r:i+r:s=e.isNegative?s+r:s-r;c=this.bulletColorR;e.lineColor&&void 0===this.bulletColor&&(this.bulletColorSwitched=e.lineColor);this.bulletColorSwitched&&(c=this.bulletColorSwitched);e.isNegative&&void 0!==this.bulletColorNegative&&(c=this.bulletColorNegative);void 0!==e.color&&(c=e.color);var p;"xy"==a.type&&this.valueField&&(p=this.pattern,e.pattern&&(p=e.pattern));r=this.bullet;e.bullet&&(r=e.bullet);var o=this.bulletBorderThickness,d=this.bulletBorderColorR,u=this.bulletBorderAlpha,m=this.bulletAlpha;d||(d=c);this.useLineColorForBulletBorder&&(d=this.lineColorR,e.isNegative&&this.negativeLineColor&&(d=this.negativeLineColor),this.lineColorSwitched&&(d=this.lineColorSwitched));var f=e.alpha;isNaN(f)||(m=f);p=t.bullet(h,r,n,c,m,o,d,u,l,0,p,a.path);l=this.customBullet;e.customBullet&&(l=e.customBullet);l&&(p&&p.remove(),"function"==typeof l?(l=new l,l.chart=a,e.bulletConfig&&(l.availableSpace=s,l.graph=this,l.graphDataItem=e,l.bulletY=s,e.bulletConfig.minCoord=this.minCoord-s,l.bulletConfig=e.bulletConfig),l.write(h),p&&l.showBullet&&l.set.push(p),e.customBulletGraphics=l.cset,p=l.set):(p=h.set(),l=h.image(l,0,0,n,n),p.push(l),this.centerCustomBullets&&l.translate(-n/2,-n/2)));if(p){(e.url||this.showHandOnHover)&&p.setAttr("cursor","pointer");if("serial"==a.type||"gantt"==a.type)if(-.5>i||i>this.width||s<-n/2||s>this.height)p.remove(),p=null;p&&(this.bulletSet.push(p),p.translate(i,s),this.addListeners(p,e),this.allBullets.push(p));e.bx=i;e.by=s;t.setCN(a,p,this.bcn+"bullet");e.className&&t.setCN(a,p,e.className,!0)}if(p){p.size=n||0;if(a=this.bulletHitAreaSize)h=t.circle(h,a,"#FFFFFF",.001,0),h.translate(i,s),e.hitBullet=h,this.bulletSet.push(h),this.addListeners(h,e);e.bulletGraphics=p;void 0!==this.tabIndex&&p.setAttr("tabindex",this.tabIndex)}else p={size:0};p.graphDataItem=e;return p}},showBullets:function(){var t=this.allBullets,e;this.bulletsHidden=!1;for(e=0;e<t.length;e++)t[e].show()},hideBullets:function(){var t=this.allBullets,e;this.bulletsHidden=!0;for(e=0;e<t.length;e++)t[e].hide()},showCustomBullets:function(){var t=this.allBullets,e;this.customBulletsHidden=!1;for(e=0;e<t.length;e++){var i=t[e].graphDataItem;i&&i.customBulletGraphics&&i.customBulletGraphics.show()}},hideCustomBullets:function(){var t=this.allBullets,e;this.customBulletsHidden=!0;for(e=0;e<t.length;e++){var i=t[e].graphDataItem;i&&i.customBulletGraphics&&i.customBulletGraphics.hide()}},addListeners:function(t,e){var i=this;t.mouseover(function(t){i.handleRollOver(e,t)}).mouseout(function(t){i.handleRollOut(e,t)}).touchend(function(t){i.handleRollOver(e,t);i.chart.panEventsEnabled&&i.handleClick(e,t)}).touchstart(function(t){i.handleRollOver(e,t)}).click(function(t){i.handleClick(e,t)}).dblclick(function(t){i.handleDoubleClick(e,t)}).contextmenu(function(t){i.handleRightClick(e,t)});var s=i.chart;if(s.accessible&&i.accessibleLabel){var a=s.formatString(i.accessibleLabel,e);s.makeAccessible(t,a)}},handleRollOver:function(t,e){this.handleGraphEvent(e,"rollOverGraph");if(t){var i=this.chart;t.bulletConfig&&(i.isRolledOverBullet=!0);var s={type:"rollOverGraphItem",item:t,index:t.index,graph:this,target:this,chart:this.chart,event:e};this.fire(s);i.fire(s);clearTimeout(i.hoverInt);(i=i.chartCursor)&&i.valueBalloonsEnabled||this.showGraphBalloon(t,"V",!0)}},handleRollOut:function(t,e){var i=this.chart;if(t){var s={type:"rollOutGraphItem",item:t,index:t.index,graph:this,target:this,chart:this.chart,event:e};this.fire(s);i.fire(s);i.isRolledOverBullet=!1}this.handleGraphEvent(e,"rollOutGraph");(i=i.chartCursor)&&i.valueBalloonsEnabled||this.hideBalloon()},handleClick:function(e,i){if(!this.chart.checkTouchMoved()&&this.chart.checkTouchDuration(i)){if(e){var s={type:"clickGraphItem",item:e,index:e.index,graph:this,target:this,chart:this.chart,event:i};this.fire(s);this.chart.fire(s);t.getURL(e.url,this.urlTarget)}this.handleGraphEvent(i,"clickGraph")}},handleGraphEvent:function(t,e){var i={type:e,graph:this,target:this,chart:this.chart,event:t};this.fire(i);this.chart.fire(i)},handleRightClick:function(t,e){if(t){var i={type:"rightClickGraphItem",item:t,index:t.index,graph:this,target:this,chart:this.chart,event:e};this.fire(i);this.chart.fire(i)}},handleDoubleClick:function(t,e){if(t){var i={type:"doubleClickGraphItem",item:t,index:t.index,graph:this,target:this,chart:this.chart,event:e};this.fire(i);this.chart.fire(i)}},zoom:function(t,e){this.start=t;this.end=e;this.draw()},changeOpacity:function(t){var e=this.set;e&&e.setAttr("opacity",t);if(e=this.ownColumns){var i;for(i=0;i<e.length;i++){var s=e[i].set;s&&s.setAttr("opacity",t)}}(e=this.bulletSet)&&e.setAttr("opacity",t)},destroy:function(){t.remove(this.set);t.remove(this.bulletSet);var e=this.timeOuts;if(e){var i;for(i=0;i<e.length;i++)clearTimeout(e[i])}this.timeOuts=[]},createBalloon:function(){var e=this.chart;this.balloon?this.balloon.destroy&&this.balloon.destroy():this.balloon={};var i=this.balloon;t.extend(i,e.balloon,!0);i.chart=e;i.mainSet=e.plotBalloonsSet;i.className=this.id},hideBalloon:function(){var t=this,e=t.chart;e.chartCursor?e.chartCursor.valueBalloonsEnabled||e.hideBalloon():e.hideBalloon();clearTimeout(t.hoverInt);t.hoverInt=setTimeout(function(){t.hideBalloonReal.call(t)},e.hideBalloonTime)},hideBalloonReal:function(){this.balloon&&this.balloon.hide();this.fixBulletSize()},fixBulletSize:function(){if(t.isModern){var e=this.resizedDItem;if(e){var i=e.bulletGraphics;if(i&&!i.doNotScale){i.translate(e.bx,e.by,1);var s=this.bulletAlpha;isNaN(e.alpha)||(s=e.alpha);i.setAttr("fill-opacity",s);i.setAttr("stroke-opacity",this.bulletBorderAlpha)}}this.resizedDItem=null}},showGraphBalloon:function(e,i,s,a,h){if(e){var r=this.chart,n=this.balloon,o=0,l=0,d=r.chartCursor,u=!0;d?d.valueBalloonsEnabled||(n=r.balloon,o=this.x,l=this.y,u=!1):(n=r.balloon,o=this.x,l=this.y,u=!1);clearTimeout(this.hoverInt);if(r.chartCursor&&(this.currentDataItem=e,"serial"==r.type&&r.isRolledOverBullet&&r.chartCursor.valueBalloonsEnabled)){this.hideBalloonReal();return}this.resizeBullet(e,a,h);if(n&&n.enabled&&this.showBalloon&&!this.hidden){var d=r.formatString(this.balloonText,e,!0),c=this.balloonFunction;c&&(d=c(e,e.graph));d&&(d=t.cleanFromEmpty(d));d&&""!==d?(a=r.getBalloonColor(this,e),n.drop||(n.pointerOrientation=i),i=e.x,h=e.y,r.rotate&&(i=e.y,h=e.x),i+=o,h+=l,isNaN(i)||isNaN(h)?this.hideBalloonReal():(e=this.width,c=this.height,u&&n.setBounds(o,l,e+o,c+l),n.changeColor(a),n.setPosition(i,h),n.fixPrevious(),n.fixedPosition&&(s=!1),!s&&"radar"!=r.type&&(i<o||i>e+o||h<l-.5||h>c+l)?(n.showBalloon(d),n.hide(0)):(n.followCursor(s),n.showBalloon(d)))):(this.hideBalloonReal(),n.hide(),this.resizeBullet(e,a,h))}else this.hideBalloonReal()}},resizeBullet:function(e,i,s){this.fixBulletSize();if(e&&t.isModern&&(1!=i||!isNaN(s))){var a=e.bulletGraphics;a&&!a.doNotScale&&(a.translate(e.bx,e.by,i),isNaN(s)||(a.setAttr("fill-opacity",s),a.setAttr("stroke-opacity",s)),this.resizedDItem=e)}}})})();(function(){var t=window.AmCharts;t.ChartCursor=t.Class({construct:function(e){this.cname="ChartCursor";this.createEvents("changed","zoomed","onHideCursor","onShowCursor","draw","selected","moved","panning","zoomStarted");this.enabled=!0;this.cursorAlpha=1;this.selectionAlpha=.2;this.cursorColor="#CC0000";this.categoryBalloonAlpha=1;this.color="#FFFFFF";this.type="cursor";this.zoomed=!1;this.zoomable=!0;this.pan=!1;this.categoryBalloonDateFormat="MMM DD, YYYY";this.categoryBalloonText="[[category]]";this.categoryBalloonEnabled=this.valueBalloonsEnabled=!0;this.rolledOver=!1;this.cursorPosition="middle";this.bulletsEnabled=this.skipZoomDispatch=!1;this.bulletSize=8;this.selectWithoutZooming=this.oneBalloonOnly=!1;this.graphBulletSize=1.7;this.animationDuration=.3;this.zooming=!1;this.adjustment=0;this.avoidBalloonOverlapping=!0;this.leaveCursor=!1;this.leaveAfterTouch=!0;this.valueZoomable=!1;this.balloonPointerOrientation="horizontal";this.hLineEnabled=this.vLineEnabled=!0;this.vZoomEnabled=this.hZoomEnabled=!1;t.applyTheme(this,e,this.cname)},draw:function(){this.destroy();var e=this.chart;e.panRequired=!0;var i=e.container;this.rotate=e.rotate;this.container=i;this.prevLineHeight=this.prevLineWidth=NaN;i=i.set();i.translate(this.x,this.y);this.set=i;e.cursorSet.push(i);this.createElements();t.isString(this.limitToGraph)&&(this.limitToGraph=t.getObjById(e.graphs,this.limitToGraph),this.fullWidth=!1,this.cursorPosition="middle");this.pointer=this.balloonPointerOrientation.substr(0,1).toUpperCase();this.isHidden=!1;this.hideLines();this.valueLineAxis||(this.valueLineAxis=e.valueAxes[0])},createElements:function(){var e=this,i=e.chart,s=i.dx,a=i.dy,h=e.width,r=e.height,n,o,l=e.cursorAlpha,d=e.valueLineAlpha;e.rotate?(n=d,o=l):(o=d,n=l);"xy"==i.type&&(o=l,void 0!==d&&(o=d),n=l);e.vvLine=t.line(e.container,[s,0,0],[a,0,r],e.cursorColor,n,1);t.setCN(i,e.vvLine,"cursor-line");t.setCN(i,e.vvLine,"cursor-line-vertical");e.hhLine=t.line(e.container,[0,h,h+s],[0,0,a],e.cursorColor,o,1);t.setCN(i,e.hhLine,"cursor-line");t.setCN(i,e.hhLine,"cursor-line-horizontal");e.vLine=e.rotate?e.vvLine:e.hhLine;e.set.push(e.vvLine);e.set.push(e.hhLine);e.set.node.style.pointerEvents="none";e.fullLines=e.container.set();i=i.cursorLineSet;i.push(e.fullLines);i.translate(e.x,e.y);i.clipRect(-1,-1,h+2,r+2);void 0!==e.tabIndex&&(i.setAttr("tabindex",e.tabIndex),i.keyup(function(t){e.handleKeys(t)}).focus(function(t){e.showCursor()}).blur(function(t){e.hideCursor()}));e.set.clipRect(0,0,h,r)},handleKeys:function(e){var i=this.prevIndex,s=this.chart;if(s){var a=s.chartData;a&&(isNaN(i)&&(i=a.length-1),37!=e.keyCode&&40!=e.keyCode||i--,39!=e.keyCode&&38!=e.keyCode||i++,i=t.fitToBounds(i,s.startIndex,s.endIndex),(e=this.chart.chartData[i])&&this.setPosition(e.x.categoryAxis),this.prevIndex=i)}},update:function(){var t=this.chart;if(t){var e=t.mouseX-this.x,i=t.mouseY-this.y;this.mouseX=e;this.mouseY=i;this.mouse2X=t.mouse2X-this.x;this.mouse2Y=t.mouse2Y-this.y;var s;if(t.chartData&&0<t.chartData.length){this.mouseIsOver()?(this.hideGraphBalloons=!1,this.rolledOver=s=!0,this.updateDrawing(),this.vvLine&&isNaN(this.fx)&&(t.rotate||!this.limitToGraph)&&this.vvLine.translate(e,0),!this.hhLine||!isNaN(this.fy)||t.rotate&&this.limitToGraph||this.hhLine.translate(0,i),isNaN(this.mouse2X)?this.dispatchMovedEvent(e,i):s=!1):this.forceShow||this.hideCursor();if(this.zooming){if(!isNaN(this.mouse2X)){isNaN(this.mouse2X0)||this.dispatchPanEvent();return}if(this.pan){this.dispatchPanEvent();return}(this.hZoomEnabled||this.vZoomEnabled)&&this.zooming&&this.updateSelection()}s&&this.showCursor()}}},updateDrawing:function(){this.drawing&&this.chart.setMouseCursor("crosshair");if(this.drawingNow&&(t.remove(this.drawingLine),1<Math.abs(this.drawStartX-this.mouseX)||1<Math.abs(this.drawStartY-this.mouseY))){var e=this.chart,i=e.marginTop,e=e.marginLeft;this.drawingLine=t.line(this.container,[this.drawStartX+e,this.mouseX+e],[this.drawStartY+i,this.mouseY+i],this.cursorColor,1,1)}},fixWidth:function(e){if(this.fullWidth&&this.prevLineWidth!=e){var i=this.vvLine,s=0;i&&(i.remove(),s=i.x);i=this.container.set();i.translate(s,0);s=t.rect(this.container,e,this.height,this.cursorColor,this.cursorAlpha,this.cursorAlpha,this.cursorColor);t.setCN(this.chart,s,"cursor-fill");s.translate(-e/2-1,0);i.push(s);this.vvLine=i;this.fullLines.push(i);this.prevLineWidth=e}},fixHeight:function(e){if(this.fullWidth&&this.prevLineHeight!=e){var i=this.hhLine,s=0;i&&(i.remove(),s=i.y);i=this.container.set();i.translate(0,s);s=t.rect(this.container,this.width,e,this.cursorColor,this.cursorAlpha);s.translate(0,-e/2);i.push(s);this.fullLines.push(i);this.hhLine=i;this.prevLineHeight=e}},fixVLine:function(t,e){if(!isNaN(t)){if(isNaN(this.prevLineX)){var i=0,s=this.mouseX;if(this.limitToGraph){var a=this.chart.categoryAxis;a&&(this.chart.rotate||(i="bottom"==a.position?this.height:-this.height),s=t)}this.vvLine.translate(s,i)}else this.prevLineX!=t&&this.vvLine.translate(this.prevLineX,this.prevLineY);this.fx=t;this.prevLineX!=t&&(i=this.animationDuration,this.zooming&&(i=0),this.vvLine.stop(),this.vvLine.animate({translate:t+","+e},i,"easeOutSine"),this.prevLineX=t,this.prevLineY=e)}},fixHLine:function(t,e){if(!isNaN(t)){if(isNaN(this.prevLineY)){var i=0,s=this.mouseY;if(this.limitToGraph){var a=this.chart.categoryAxis;a&&(this.chart.rotate&&(i="right"==a.position?this.width:-this.width),s=t)}this.hhLine.translate(i,s)}else this.prevLineY!=t&&this.hhLine.translate(this.prevLineX,this.prevLineY);this.fy=t;this.prevLineY!=t&&(i=this.animationDuration,this.zooming&&(i=0),this.hhLine.stop(),this.hhLine.animate({translate:e+","+t},i,"easeOutSine"),this.prevLineY=t,this.prevLineX=e)}},hideCursor:function(t){this.forceShow=!1;this.chart.wasTouched&&this.leaveAfterTouch||this.isHidden||this.leaveCursor||(this.hideCursorReal(),t?this.chart.handleCursorHide():this.fire({target:this,chart:this.chart,type:"onHideCursor"}),this.chart.setMouseCursor("auto"))},hideCursorReal:function(){this.hideLines();this.isHidden=!0;this.index=this.prevLineY=this.prevLineX=this.mouseY0=this.mouseX0=this.fy=this.fx=NaN},hideLines:function(){this.vvLine&&this.vvLine.hide();this.hhLine&&this.hhLine.hide();this.fullLines&&this.fullLines.hide();this.isHidden=!0;this.chart.handleCursorHide()},showCursor:function(t){!this.drawing&&this.enabled&&(this.vLineEnabled&&this.vvLine&&this.vvLine.show(),this.hLineEnabled&&this.hhLine&&this.hhLine.show(),this.isHidden=!1,this.updateFullLine(),t||this.fire({target:this,chart:this.chart,type:"onShowCursor"}),this.pan&&this.chart.setMouseCursor("move"))},updateFullLine:function(){this.zooming&&this.fullWidth&&this.selection&&(this.rotate?0<this.selection.height&&this.hhLine.hide():0<this.selection.width&&this.vvLine.hide())},updateSelection:function(){if(!this.pan&&this.enabled){var e=this.mouseX,i=this.mouseY;isNaN(this.fx)||(e=this.fx);isNaN(this.fy)||(i=this.fy);this.clearSelection();var s=this.mouseX0,a=this.mouseY0,h=this.width,r=this.height,e=t.fitToBounds(e,0,h),i=t.fitToBounds(i,0,r),n;e<s&&(n=e,e=s,s=n);i<a&&(n=i,i=a,a=n);this.hZoomEnabled?h=e-s:s=0;this.vZoomEnabled?r=i-a:a=0;isNaN(this.mouse2X)&&0<Math.abs(h)&&0<Math.abs(r)&&(e=this.chart,i=t.rect(this.container,h,r,this.cursorColor,this.selectionAlpha),t.setCN(e,i,"cursor-selection"),i.width=h,i.height=r,i.translate(s,a),this.set.push(i),this.selection=i);this.updateFullLine()}},mouseIsOver:function(){var t=this.mouseX,e=this.mouseY;if(this.justReleased)return this.justReleased=!1,!0;if(this.mouseIsDown)return!0;if(!this.chart.mouseIsOver)return this.handleMouseOut(),!1;if(0<t&&t<this.width&&0<e&&e<this.height)return!0;this.handleMouseOut()},fixPosition:function(){this.prevY=this.prevX=NaN},handleMouseDown:function(){this.update();if(this.mouseIsOver())if(this.mouseIsDown=!0,this.mouseX0=this.mouseX,this.mouseY0=this.mouseY,this.mouse2X0=this.mouse2X,this.mouse2Y0=this.mouse2Y,this.drawing)this.drawStartY=this.mouseY,this.drawStartX=this.mouseX,this.drawingNow=!0;else if(this.dispatchMovedEvent(this.mouseX,this.mouseY),!this.pan&&isNaN(this.mouse2X0)&&(isNaN(this.fx)||(this.mouseX0=this.fx),isNaN(this.fy)||(this.mouseY0=this.fy)),this.hZoomEnabled||this.vZoomEnabled){this.zooming=!0;var t={chart:this.chart,target:this,type:"zoomStarted"};t.x=this.mouseX/this.width;t.y=this.mouseY/this.height;this.index0=t.index=this.index;this.timestamp0=this.timestamp;this.fire(t)}},registerInitialMouse:function(){},handleReleaseOutside:function(){this.mouseIsDown=!1;if(this.drawingNow){this.drawingNow=!1;t.remove(this.drawingLine);var e=this.drawStartX,i=this.drawStartY,s=this.mouseX,a=this.mouseY,h=this.chart;(2<Math.abs(e-s)||2<Math.abs(i-a))&&this.fire({type:"draw",target:this,chart:h,initialX:e,initialY:i,finalX:s,finalY:a})}this.zooming&&(this.zooming=!1,this.selectWithoutZooming?this.dispatchZoomEvent("selected"):(this.hZoomEnabled||this.vZoomEnabled)&&this.dispatchZoomEvent("zoomed"),this.rolledOver&&this.dispatchMovedEvent(this.mouseX,this.mouseY));this.mouse2Y0=this.mouse2X0=this.mouseY0=this.mouseX0=NaN},dispatchZoomEvent:function(t){if(!this.pan){var e=this.selection;if(e&&3<Math.abs(e.width)&&3<Math.abs(e.height)){var i=Math.min(this.index,this.index0),s=Math.max(this.index,this.index0),a=i,h=s,r=this.chart,n=r.chartData,o=r.categoryAxis;o&&o.parseDates&&!o.equalSpacing&&(a=n[i]?n[i].time:Math.min(this.timestamp0,this.timestamp),h=n[s]?r.getEndTime(n[s].time):Math.max(this.timestamp0,this.timestamp));var e={type:t,chart:this.chart,target:this,end:h,start:a,startIndex:i,endIndex:s,selectionHeight:e.height,selectionWidth:e.width,selectionY:e.y,selectionX:e.x},l;this.hZoomEnabled&&4<Math.abs(this.mouseX0-this.mouseX)&&(e.startX=this.mouseX0/this.width,e.endX=this.mouseX/this.width,l=!0);this.vZoomEnabled&&4<Math.abs(this.mouseY0-this.mouseY)&&(e.startY=1-this.mouseY0/this.height,e.endY=1-this.mouseY/this.height,l=!0);l&&(this.prevY=this.prevX=NaN,this.fire(e),"selected"!=t&&this.clearSelection());this.hideCursor()}}},dispatchMovedEvent:function(t,e,i,s){t=Math.round(t);e=Math.round(e);if(!this.isHidden&&(t!=this.prevX||e!=this.prevY||"changed"==i)){i||(i="moved");var a=this.fx,h=this.fy;isNaN(a)&&(a=t);isNaN(h)&&(h=e);var r=!1;this.zooming&&this.pan&&(r=!0);r={hidden:this.isHidden,type:i,chart:this.chart,target:this,x:t,y:e,finalX:a,finalY:h,zooming:this.zooming,panning:r,mostCloseGraph:this.mostCloseGraph,index:this.index,skip:s,hideBalloons:this.hideGraphBalloons};this.prevIndex=this.index;this.rotate?(r.position=e,r.finalPosition=h):(r.position=t,r.finalPosition=a);this.prevX=t;this.prevY=e;s?this.chart.handleCursorMove(r):(this.fire(r),"changed"==i&&this.chart.fire(r))}},dispatchPanEvent:function(){if(this.mouseIsDown){var e=t.roundTo((this.mouseX-this.mouseX0)/this.width,3),i=t.roundTo((this.mouseY-this.mouseY0)/this.height,3),s=t.roundTo((this.mouse2X-this.mouse2X0)/this.width,3),a=t.roundTo((this.mouse2Y-this.mouse2Y0)/this.height,2),h=!1;0!==Math.abs(e)&&0!==Math.abs(i)&&(h=!0);if(this.prevDeltaX==e||this.prevDeltaY==i)h=!1;isNaN(s)||isNaN(a)||(0!==Math.abs(s)&&0!==Math.abs(a)&&(h=!0),this.prevDelta2X!=s&&this.prevDelta2Y!=a)||(h=!1);h&&(this.hideLines(),this.fire({type:"panning",chart:this.chart,target:this,deltaX:e,deltaY:i,delta2X:s,delta2Y:a,index:this.index}),this.prevDeltaX=e,this.prevDeltaY=i,this.prevDelta2X=s,this.prevDelta2Y=a)}},clearSelection:function(){var t=this.selection;t&&(t.width=0,t.height=0,t.remove())},destroy:function(){this.clear();t.remove(this.selection);this.selection=null;clearTimeout(this.syncTO);t.remove(this.set)},clear:function(){},setTimestamp:function(t){this.timestamp=t},setIndex:function(t,e){t!=this.index&&(this.index=t,e||this.isHidden||this.dispatchMovedEvent(this.mouseX,this.mouseY,"changed"))},handleMouseOut:function(){this.enabled&&this.rolledOver&&(this.leaveCursor||this.setIndex(void 0),this.forceShow=!1,this.hideCursor(),this.rolledOver=!1)},showCursorAt:function(t){var e=this.chart.categoryAxis;e&&this.setPosition(e.categoryToCoordinate(t),t)},setPosition:function(t,e){var i=this.chart,s=i.categoryAxis;if(s){var a,h;void 0===e&&(e=s.coordinateToValue(t));s.showBalloonAt(e,t);this.forceShow=!0;s.stickBalloonToCategory?i.rotate?this.fixHLine(t,0):this.fixVLine(t,0):(this.showCursor(),i.rotate?this.hhLine.translate(0,t):this.vvLine.translate(t,0));i.rotate?a=t:h=t;i.rotate?(this.vvLine&&this.vvLine.hide(),this.hhLine&&this.hhLine.show()):(this.hhLine&&this.hhLine.hide(),this.vvLine&&this.vvLine.show());this.updateFullLine();this.isHidden=!1;this.dispatchMovedEvent(h,a,"moved",!0)}},enableDrawing:function(t){this.enabled=!t;this.hideCursor();this.drawing=t},syncWithCursor:function(t,e){clearTimeout(this.syncTO);t&&(t.isHidden?this.hideCursor(!0):this.syncWithCursorReal(t,e))},isZooming:function(t){this.zooming=t},syncWithCursorReal:function(t,e){var i=t.vvLine,s=t.hhLine;this.index=t.index;this.forceShow=!0;this.zooming&&this.pan||this.showCursor(!0);this.hideGraphBalloons=e;this.justReleased=t.justReleased;this.zooming=t.zooming;this.index0=t.index0;this.mouseX0=t.mouseX0;this.mouseY0=t.mouseY0;this.mouse2X0=t.mouse2X0;this.mouse2Y0=t.mouse2Y0;this.timestamp0=t.timestamp0;this.prevDeltaX=t.prevDeltaX;this.prevDeltaY=t.prevDeltaY;this.prevDelta2X=t.prevDelta2X;this.prevDelta2Y=t.prevDelta2Y;this.fx=t.fx;this.fy=t.fy;t.zooming&&this.updateSelection();var a=t.mouseX,h=t.mouseY;this.rotate?(a=NaN,this.vvLine&&this.vvLine.hide(),this.hhLine&&s&&(isNaN(t.fy)?this.hhLine.translate(0,t.mouseY):this.fixHLine(t.fy,0))):(h=NaN,this.hhLine&&this.hhLine.hide(),this.vvLine&&i&&(isNaN(t.fx)?this.vvLine.translate(t.mouseX,0):this.fixVLine(t.fx,0)));this.dispatchMovedEvent(a,h,"moved",!0)}})})();(function(){var t=window.AmCharts;t.SimpleChartScrollbar=t.Class({construct:function(e){this.createEvents("zoomed","zoomStarted","zoomEnded");this.backgroundColor="#D4D4D4";this.backgroundAlpha=1;this.selectedBackgroundColor="#EFEFEF";this.scrollDuration=this.selectedBackgroundAlpha=1;this.resizeEnabled=!0;this.hideResizeGrips=!1;this.scrollbarHeight=20;this.updateOnReleaseOnly=!1;9>document.documentMode&&(this.updateOnReleaseOnly=!0);this.dragIconHeight=this.dragIconWidth=35;this.dragIcon="dragIconRoundBig";this.dragCursorHover="cursor: move; cursor: grab; cursor: -moz-grab; cursor: -webkit-grab;";this.dragCursorDown="cursor: move; cursor: grab; cursor: -moz-grabbing; cursor: -webkit-grabbing;";this.vResizeCursor="ns-resize";this.hResizeCursor="ew-resize";this.enabled=!0;this.percentStart=this.offset=0;this.percentEnd=1;t.applyTheme(this,e,"SimpleChartScrollbar")},getPercents:function(){var t=this.getDBox(),e=t.x,i=t.y,s=t.width,t=t.height;this.rotate?(e=1-i/this.height,i=1-(i+t)/this.height):(i=e/this.width,e=(e+s)/this.width);this.percentStart=i;this.percentEnd=e},draw:function(){var e=this;e.destroy();if(e.enabled){var i=e.chart.container,s=e.rotate,a=e.chart;a.panRequired=!0;var h=i.set();e.set=h;s?t.setCN(a,h,"scrollbar-vertical"):t.setCN(a,h,"scrollbar-horizontal");a.scrollbarsSet.push(h);var r,n;s?(r=e.scrollbarHeight,n=a.plotAreaHeight):(n=e.scrollbarHeight,r=a.plotAreaWidth);e.width=r;if((e.height=n)&&r){var o=t.rect(i,r,n,e.backgroundColor,e.backgroundAlpha,1,e.backgroundColor,e.backgroundAlpha);t.setCN(a,o,"scrollbar-bg");e.bg=o;h.push(o);o=t.rect(i,r,n,"#000",.005);h.push(o);e.invisibleBg=o;o.click(function(){e.handleBgClick()}).mouseover(function(){e.handleMouseOver()}).mouseout(function(){e.handleMouseOut()}).touchend(function(){e.handleBgClick()});o=t.rect(i,r,n,e.selectedBackgroundColor,e.selectedBackgroundAlpha);t.setCN(a,o,"scrollbar-bg-selected");e.selectedBG=o;h.push(o);r=t.rect(i,r,n,"#000",.005);e.dragger=r;h.push(r);r.mousedown(function(t){e.handleDragStart(t)}).mouseup(function(){e.handleDragStop()}).mouseover(function(){e.handleDraggerOver()}).mouseout(function(){e.handleMouseOut()}).touchstart(function(t){e.handleDragStart(t)}).touchend(function(){e.handleDragStop()});n=a.pathToImages;var l,o=e.dragIcon.replace(/\.[a-z]*$/i,"");t.isAbsolute(o)&&(n="");s?(l=n+o+"H"+a.extension,n=e.dragIconWidth,s=e.dragIconHeight):(l=n+o+a.extension,s=e.dragIconWidth,n=e.dragIconHeight);o=i.image(l,0,0,s,n);t.setCN(a,o,"scrollbar-grip-left");l=i.image(l,0,0,s,n);t.setCN(a,l,"scrollbar-grip-right");var d=10,u=20;a.panEventsEnabled&&(d=25,u=e.scrollbarHeight);var c=t.rect(i,d,u,"#000",.005),p=t.rect(i,d,u,"#000",.005);p.translate(-(d-s)/2,-(u-n)/2);c.translate(-(d-s)/2,-(u-n)/2);s=i.set([o,p]);i=i.set([l,c]);e.iconLeft=s;h.push(e.iconLeft);e.iconRight=i;h.push(i);e.updateGripCursor(!1);a.makeAccessible(s,e.accessibleLabel);a.makeAccessible(i,e.accessibleLabel);a.makeAccessible(r,e.accessibleLabel);s.setAttr("role","menuitem");i.setAttr("role","menuitem");r.setAttr("role","menuitem");void 0!==e.tabIndex&&(s.setAttr("tabindex",e.tabIndex),s.keyup(function(t){e.handleKeys(t,1,0)}));void 0!==e.tabIndex&&(r.setAttr("tabindex",e.tabIndex),r.keyup(function(t){e.handleKeys(t,1,1)}));void 0!==e.tabIndex&&(i.setAttr("tabindex",e.tabIndex),i.keyup(function(t){e.handleKeys(t,0,1)}));s.mousedown(function(){e.leftDragStart()}).mouseup(function(){e.leftDragStop()}).mouseover(function(){e.iconRollOver()}).mouseout(function(){e.iconRollOut()}).touchstart(function(){e.leftDragStart()}).touchend(function(){e.leftDragStop()});i.mousedown(function(){e.rightDragStart()}).mouseup(function(){e.rightDragStop()}).mouseover(function(){e.iconRollOver()}).mouseout(function(){e.iconRollOut()}).touchstart(function(){e.rightDragStart()}).touchend(function(){e.rightDragStop()});t.ifArray(a.chartData)?h.show():h.hide();e.hideDragIcons();e.clipDragger(!1)}h.translate(e.x,e.y);h.node.style.msTouchAction="none";h.node.style.touchAction="none"}},handleKeys:function(t,e,i){this.getPercents();var s=this.percentStart,a=this.percentEnd;if(this.rotate)var h=a,a=s,s=h;if(37==t.keyCode||40==t.keyCode)s-=.02*e,a-=.02*i;if(39==t.keyCode||38==t.keyCode)s+=.02*e,a+=.02*i;this.rotate&&(t=a,a=s,s=t);isNaN(a)||isNaN(s)||this.percentZoom(s,a,!0)},updateScrollbarSize:function(t,e){if(!isNaN(t)&&!isNaN(e)){t=Math.round(t);e=Math.round(e);var i=this.dragger,s,a,h,r,n;this.rotate?(s=0,a=t,h=this.width+1,r=e-t,i.setAttr("height",e-t),i.setAttr("y",a)):(s=t,a=0,h=e-t,r=this.height+1,n=e-t,i.setAttr("x",s),i.setAttr("width",n));this.clipAndUpdate(s,a,h,r); }},update:function(){var t,e=!1,i,s,a=this.x,h=this.y,r=this.dragger,n=this.getDBox();if(n){i=n.x+a;s=n.y+h;var o=n.width,n=n.height,l=this.rotate,d=this.chart,u=this.width,c=this.height,p=d.mouseX,d=d.mouseY;t=this.initialMouse;this.forceClip&&this.clipDragger(!0);if(this.dragging){var m=this.initialCoord;l?(t=m+(d-t),0>t&&(t=0),m=c-n,t>m&&(t=m),r.setAttr("y",t)):(t=m+(p-t),0>t&&(t=0),m=u-o,t>m&&(t=m),r.setAttr("x",t));this.clipDragger(!0)}if(this.resizingRight){if(l)if(t=d-s,!isNaN(this.maxHeight)&&t>this.maxHeight&&(t=this.maxHeight),t+s>c+h&&(t=c-s+h),0>t)this.resizingRight=!1,e=this.resizingLeft=!0;else{if(0===t||isNaN(t))t=.1;r.setAttr("height",t)}else if(t=p-i,!isNaN(this.maxWidth)&&t>this.maxWidth&&(t=this.maxWidth),t+i>u+a&&(t=u-i+a),0>t)this.resizingRight=!1,e=this.resizingLeft=!0;else{if(0===t||isNaN(t))t=.1;r.setAttr("width",t)}this.clipDragger(!0)}if(this.resizingLeft){if(l)if(i=s,s=d,s<h&&(s=h),isNaN(s)&&(s=h),s>c+h&&(s=c+h),t=!0===e?i-s:n+i-s,!isNaN(this.maxHeight)&&t>this.maxHeight&&(t=this.maxHeight,s=i),0>t)this.resizingRight=!0,this.resizingLeft=!1,r.setAttr("y",i+n-h);else{if(0===t||isNaN(t))t=.1;r.setAttr("y",s-h);r.setAttr("height",t)}else if(s=p,s<a&&(s=a),isNaN(s)&&(s=a),s>u+a&&(s=u+a),t=!0===e?i-s:o+i-s,!isNaN(this.maxWidth)&&t>this.maxWidth&&(t=this.maxWidth,s=i),0>t)this.resizingRight=!0,this.resizingLeft=!1,r.setAttr("x",i+o-a);else{if(0===t||isNaN(t))t=.1;r.setAttr("x",s-a);r.setAttr("width",t)}this.clipDragger(!0)}}},stopForceClip:function(){this.animating=this.forceClip=!1},clipDragger:function(t){var e=this.getDBox();if(e){var i=e.x,s=e.y,a=e.width,e=e.height,h=!1;if(this.rotate){if(i=0,a=this.width+1,this.clipY!=s||this.clipH!=e)h=!0}else if(s=0,e=this.height+1,this.clipX!=i||this.clipW!=a)h=!0;h&&(this.clipAndUpdate(i,s,a,e),t&&(this.updateOnReleaseOnly||this.dispatchScrollbarEvent()))}},maskGraphs:function(){},clipAndUpdate:function(t,e,i,s){this.clipX=t;this.clipY=e;this.clipW=i;this.clipH=s;this.selectedBG.setAttr("width",i);this.selectedBG.setAttr("height",s);this.selectedBG.translate(t,e);this.updateDragIconPositions();this.maskGraphs(t,e,i,s)},dispatchScrollbarEvent:function(){if(this.skipEvent)this.skipEvent=!1;else{var t=this.chart;t.hideBalloon();var e=this.getDBox(),i=e.x,s=e.y,a=e.width,e=e.height;this.getPercents();this.rotate?(i=s,a=this.height/e):a=this.width/a;this.fire({type:"zoomed",position:i,chart:t,target:this,multiplier:a,relativeStart:this.percentStart,relativeEnd:this.percentEnd})}},updateDragIconPositions:function(){var t=this.getDBox(),e=t.x,i=t.y,s=this.iconLeft,a=this.iconRight,h,r,n=this.scrollbarHeight;this.rotate?(h=this.dragIconWidth,r=this.dragIconHeight,s.translate((n-r)/2,i-h/2),a.translate((n-r)/2,i+t.height-h/2)):(h=this.dragIconHeight,r=this.dragIconWidth,s.translate(e-r/2,(n-h)/2),a.translate(e-r/2+t.width,(n-h)/2))},showDragIcons:function(){this.resizeEnabled&&(this.iconLeft.show(),this.iconRight.show())},hideDragIcons:function(){if(!this.resizingLeft&&!this.resizingRight&&!this.dragging){if(this.hideResizeGrips||!this.resizeEnabled)this.iconLeft.hide(),this.iconRight.hide();this.removeCursors()}},removeCursors:function(){this.chart.setMouseCursor("auto")},fireZoomEvent:function(t){this.fire({type:t,chart:this.chart,target:this})},percentZoom:function(e,i,s){e=t.fitToBounds(e,0,i);i=t.fitToBounds(i,e,1);if(this.dragger&&this.enabled){this.dragger.stop();isNaN(e)&&(e=0);isNaN(i)&&(i=1);var a,h;this.rotate?(a=this.height,i=a-a*i,h=a-a*e):(a=this.width,h=a*i,i=a*e);this.updateScrollbarSize(i,h);this.clipDragger(!1);this.getPercents();s&&this.dispatchScrollbarEvent()}},destroy:function(){this.clear();t.remove(this.set);t.remove(this.iconRight);t.remove(this.iconLeft)},clear:function(){},handleDragStart:function(){if(this.enabled){this.fireZoomEvent("zoomStarted");var e=this.chart;this.dragger.stop();this.removeCursors();t.isModern&&(this.dragger.node.style.cssText=this.dragCursorDown);this.dragging=!0;var i=this.getDBox();this.rotate?(this.initialCoord=i.y,this.initialMouse=e.mouseY):(this.initialCoord=i.x,this.initialMouse=e.mouseX)}},handleDragStop:function(){this.updateOnReleaseOnly&&(this.update(),this.skipEvent=!1,this.dispatchScrollbarEvent());this.dragging=!1;this.mouseIsOver&&this.removeCursors();t.isModern&&(this.dragger.node.style.cssText=this.dragCursorHover);this.update();this.fireZoomEvent("zoomEnded")},handleDraggerOver:function(){this.handleMouseOver();t.isModern&&(this.dragger.node.style.cssText=this.dragCursorHover)},leftDragStart:function(){this.fireZoomEvent("zoomStarted");this.dragger.stop();this.resizingLeft=!0;this.updateGripCursor(!0)},updateGripCursor:function(e){t.isModern&&(e=this.rotate?e?this.vResizeCursorDown:this.vResizeCursorHover:e?this.hResizeCursorDown:this.hResizeCursorHover)&&(this.iconRight&&(this.iconRight.node.style.cssText=e),this.iconLeft&&(this.iconLeft.node.style.cssText=e))},leftDragStop:function(){this.resizingLeft&&(this.resizingLeft=!1,this.mouseIsOver||this.removeCursors(),this.updateOnRelease(),this.fireZoomEvent("zoomEnded"));this.updateGripCursor(!1)},rightDragStart:function(){this.fireZoomEvent("zoomStarted");this.dragger.stop();this.resizingRight=!0;this.updateGripCursor(!0)},rightDragStop:function(){this.resizingRight&&(this.resizingRight=!1,this.mouseIsOver||this.removeCursors(),this.updateOnRelease(),this.fireZoomEvent("zoomEnded"));this.updateGripCursor(!1)},iconRollOut:function(){this.removeCursors()},iconRollOver:function(){this.rotate?this.vResizeCursor&&this.chart.setMouseCursor(this.vResizeCursor):this.hResizeCursor&&this.chart.setMouseCursor(this.hResizeCursor);this.handleMouseOver()},getDBox:function(){if(this.dragger)return this.dragger.getBBox()},handleBgClick:function(){var e=this;if(!e.resizingRight&&!e.resizingLeft){e.zooming=!0;var i,s,a=e.scrollDuration,h=e.dragger;i=e.getDBox();var r=i.height,n=i.width;s=e.chart;var o=e.y,l=e.x,d=e.rotate;d?(i="y",s=s.mouseY-r/2-o,s=t.fitToBounds(s,0,e.height-r)):(i="x",s=s.mouseX-n/2-l,s=t.fitToBounds(s,0,e.width-n));e.updateOnReleaseOnly?(e.skipEvent=!1,h.setAttr(i,s),e.dispatchScrollbarEvent(),e.clipDragger()):(e.animating=!0,s=Math.round(s),d?h.animate({y:s},a,">"):h.animate({x:s},a,">"),e.forceClip=!0,clearTimeout(e.forceTO),e.forceTO=setTimeout(function(){e.stopForceClip.call(e)},5e3*a))}},updateOnRelease:function(){this.updateOnReleaseOnly&&(this.update(),this.skipEvent=!1,this.dispatchScrollbarEvent())},handleReleaseOutside:function(){if(this.set){if(this.resizingLeft||this.resizingRight||this.dragging)this.dragging=this.resizingRight=this.resizingLeft=!1,this.updateOnRelease(),this.removeCursors();this.animating=this.mouseIsOver=!1;this.hideDragIcons();this.update()}},handleMouseOver:function(){this.mouseIsOver=!0;this.showDragIcons()},handleMouseOut:function(){this.mouseIsOver=!1;this.hideDragIcons();this.removeCursors()}})})();(function(){var t=window.AmCharts;t.ChartScrollbar=t.Class({inherits:t.SimpleChartScrollbar,construct:function(e){this.cname="ChartScrollbar";t.ChartScrollbar.base.construct.call(this,e);this.graphLineColor="#BBBBBB";this.graphLineAlpha=0;this.graphFillColor="#BBBBBB";this.graphFillAlpha=1;this.selectedGraphLineColor="#888888";this.selectedGraphLineAlpha=0;this.selectedGraphFillColor="#888888";this.selectedGraphFillAlpha=1;this.gridCount=0;this.gridColor="#FFFFFF";this.gridAlpha=.7;this.skipEvent=this.autoGridCount=!1;this.color="#FFFFFF";this.scrollbarCreated=!1;this.oppositeAxis=!0;this.accessibleLabel="Zoom chart using cursor arrows";t.applyTheme(this,e,this.cname)},init:function(){var e=this.categoryAxis,i=this.chart,s=this.gridAxis;e||("CategoryAxis"==this.gridAxis.cname?(this.catScrollbar=!0,e=new t.CategoryAxis,e.id="scrollbar"):(e=new t.ValueAxis,e.data=i.chartData,e.id=s.id,e.type=s.type,e.maximumDate=s.maximumDate,e.minimumDate=s.minimumDate,e.minPeriod=s.minPeriod,e.minMaxField=s.minMaxField),this.categoryAxis=e);e.chart=i;var a=i.categoryAxis;a&&(e.firstDayOfWeek=a.firstDayOfWeek);e.dateFormats=s.dateFormats;e.markPeriodChange=s.markPeriodChange;e.boldPeriodBeginning=s.boldPeriodBeginning;e.labelFunction=s.labelFunction;e.axisItemRenderer=t.RecItem;e.axisRenderer=t.RecAxis;e.guideFillRenderer=t.RecFill;e.inside=!0;e.fontSize=this.fontSize;e.tickLength=0;e.axisAlpha=0;t.isString(this.graph)&&(this.graph=t.getObjById(i.graphs,this.graph));(e=this.graph)&&this.catScrollbar&&(s=this.valueAxis,s||(this.valueAxis=s=new t.ValueAxis,s.visible=!1,s.scrollbar=!0,s.axisItemRenderer=t.RecItem,s.axisRenderer=t.RecAxis,s.guideFillRenderer=t.RecFill,s.labelsEnabled=!1,s.chart=i),i=this.unselectedGraph,i||(i=new t.AmGraph,i.scrollbar=!0,this.unselectedGraph=i,i.negativeBase=e.negativeBase,i.noStepRisers=e.noStepRisers),i=this.selectedGraph,i||(i=new t.AmGraph,i.scrollbar=!0,this.selectedGraph=i,i.negativeBase=e.negativeBase,i.noStepRisers=e.noStepRisers));this.scrollbarCreated=!0},draw:function(){var e=this;t.ChartScrollbar.base.draw.call(e);if(e.enabled){e.scrollbarCreated||e.init();var i=e.chart,s=i.chartData,a=e.categoryAxis,h=e.rotate,r=e.x,n=e.y,o=e.width,l=e.height,d=e.gridAxis,u=e.set;a.setOrientation(!h);a.parseDates=d.parseDates;"ValueAxis"==e.categoryAxis.cname&&(a.rotate=!h);a.equalSpacing=d.equalSpacing;a.minPeriod=d.minPeriod;a.startOnAxis=d.startOnAxis;a.width=o-1;a.height=l;a.gridCount=e.gridCount;a.gridColor=e.gridColor;a.gridAlpha=e.gridAlpha;a.color=e.color;a.tickLength=0;a.axisAlpha=0;a.autoGridCount=e.autoGridCount;a.parseDates&&!a.equalSpacing&&a.timeZoom(i.firstTime,i.lastTime);a.minimum=e.gridAxis.fullMin;a.maximum=e.gridAxis.fullMax;a.strictMinMax=!0;a.zoom(0,s.length-1);if((d=e.graph)&&e.catScrollbar){var c=e.valueAxis,p=d.valueAxis;c.id=p.id;c.rotate=h;c.setOrientation(h);c.width=o;c.height=l;c.dataProvider=s;c.reversed=p.reversed;c.logarithmic=p.logarithmic;c.gridAlpha=0;c.axisAlpha=0;u.push(c.set);h?(c.y=n,c.x=0):(c.x=r,c.y=0);var r=Infinity,n=-Infinity,m;for(m=0;m<s.length;m++){var f=s[m].axes[p.id].graphs[d.id].values,g;for(g in f)if(f.hasOwnProperty(g)&&"percents"!=g&&"total"!=g){var v=f[g];v<r&&(r=v);v>n&&(n=v)}}Infinity!=r&&(c.minimum=r);-Infinity!=n&&(c.maximum=n+.1*(n-r));r==n&&(--c.minimum,c.maximum+=1);void 0!==e.minimum&&(c.minimum=e.minimum);void 0!==e.maximum&&(c.maximum=e.maximum);c.zoom(0,s.length-1);g=e.unselectedGraph;g.id=d.id;g.bcn="scrollbar-graph-";g.rotate=h;g.chart=i;g.data=s;g.valueAxis=c;g.chart=d.chart;g.categoryAxis=e.categoryAxis;g.periodSpan=d.periodSpan;g.valueField=d.valueField;g.openField=d.openField;g.closeField=d.closeField;g.highField=d.highField;g.lowField=d.lowField;g.lineAlpha=e.graphLineAlpha;g.lineColorR=e.graphLineColor;g.fillAlphas=e.graphFillAlpha;g.fillColorsR=e.graphFillColor;g.connect=d.connect;g.hidden=d.hidden;g.width=o;g.height=l;g.pointPosition=d.pointPosition;g.stepDirection=d.stepDirection;g.periodSpan=d.periodSpan;p=e.selectedGraph;p.id=d.id;p.bcn=g.bcn+"selected-";p.rotate=h;p.chart=i;p.data=s;p.valueAxis=c;p.chart=d.chart;p.categoryAxis=a;p.periodSpan=d.periodSpan;p.valueField=d.valueField;p.openField=d.openField;p.closeField=d.closeField;p.highField=d.highField;p.lowField=d.lowField;p.lineAlpha=e.selectedGraphLineAlpha;p.lineColorR=e.selectedGraphLineColor;p.fillAlphas=e.selectedGraphFillAlpha;p.fillColorsR=e.selectedGraphFillColor;p.connect=d.connect;p.hidden=d.hidden;p.width=o;p.height=l;p.pointPosition=d.pointPosition;p.stepDirection=d.stepDirection;p.periodSpan=d.periodSpan;i=e.graphType;i||(i=d.type);g.type=i;p.type=i;s=s.length-1;g.zoom(0,s);p.zoom(0,s);p.set.click(function(){e.handleBackgroundClick()}).mouseover(function(){e.handleMouseOver()}).mouseout(function(){e.handleMouseOut()});g.set.click(function(){e.handleBackgroundClick()}).mouseover(function(){e.handleMouseOver()}).mouseout(function(){e.handleMouseOut()});u.push(g.set);u.push(p.set)}u.push(a.set);u.push(a.labelsSet);e.bg.toBack();e.invisibleBg.toFront();e.dragger.toFront();e.iconLeft.toFront();e.iconRight.toFront()}},timeZoom:function(e,i,s){this.startTime=e;this.endTime=i;this.timeDifference=i-e;this.skipEvent=!t.toBoolean(s);this.zoomScrollbar();this.dispatchScrollbarEvent()},zoom:function(t,e){this.start=t;this.end=e;this.skipEvent=!0;this.zoomScrollbar()},dispatchScrollbarEvent:function(){if(this.categoryAxis&&"ValueAxis"==this.categoryAxis.cname)t.ChartScrollbar.base.dispatchScrollbarEvent.call(this);else if(this.skipEvent)this.skipEvent=!1;else{var e=this.chart.chartData,i,s,a=this.dragger.getBBox();i=a.x;var h=a.y,r=a.width,a=a.height,n=this.chart;this.rotate?(i=h,s=a):s=r;r={type:"zoomed",target:this};r.chart=n;var o=this.categoryAxis,l=this.stepWidth,h=n.minSelectedTime,a=n.maxSelectedTime,d=!1;if(o.parseDates&&!o.equalSpacing){if(e=n.lastTime,n=n.firstTime,o=Math.round(i/l)+n,i=this.dragging?o+this.timeDifference:Math.round((i+s)/l)+n,o>i&&(o=i),0<h&&i-o<h&&(i=Math.round(o+(i-o)/2),d=Math.round(h/2),o=i-d,i+=d,d=!0),0<a&&i-o>a&&(i=Math.round(o+(i-o)/2),d=Math.round(a/2),o=i-d,i+=d,d=!0),i>e&&(i=e),i-h<o&&(o=i-h),o<n&&(o=n),o+h>i&&(i=o+h),o!=this.startTime||i!=this.endTime)this.startTime=o,this.endTime=i,r.start=o,r.end=i,r.startDate=new Date(o),r.endDate=new Date(i),this.fire(r)}else{o.startOnAxis||(i+=l/2);s-=this.stepWidth/2;h=o.xToIndex(i);i=o.xToIndex(i+s);if(h!=this.start||this.end!=i)o.startOnAxis&&(this.resizingRight&&h==i&&i++,this.resizingLeft&&h==i&&(0<h?h--:i=1)),this.start=h,this.end=this.dragging?this.start+this.difference:i,r.start=this.start,r.end=this.end,o.parseDates&&(e[this.start]&&(r.startDate=new Date(e[this.start].time)),e[this.end]&&(r.endDate=new Date(e[this.end].time))),this.fire(r);this.percentStart=h;this.percentEnd=i}d&&this.zoomScrollbar(!0)}},zoomScrollbar:function(t){if((!(this.dragging||this.resizingLeft||this.resizingRight||this.animating)||t)&&this.dragger&&this.enabled){var e,i,s=this.chart;t=s.chartData;var a=this.categoryAxis;a.parseDates&&!a.equalSpacing?(t=a.stepWidth,i=s.firstTime,e=t*(this.startTime-i),i=t*(this.endTime-i)):(t[this.start]&&(e=t[this.start].x[a.id]),t[this.end]&&(i=t[this.end].x[a.id]),t=a.stepWidth,a.startOnAxis||(s=t/2,e-=s,i+=s));this.stepWidth=t;isNaN(e)||isNaN(i)||this.updateScrollbarSize(e,i)}},maskGraphs:function(t,e,i,s){var a=this.selectedGraph;a&&a.set.clipRect(t,e,i,s)},handleDragStart:function(){t.ChartScrollbar.base.handleDragStart.call(this);this.difference=this.end-this.start;this.timeDifference=this.endTime-this.startTime;0>this.timeDifference&&(this.timeDifference=0)},handleBackgroundClick:function(){t.ChartScrollbar.base.handleBackgroundClick.call(this);this.dragging||(this.difference=this.end-this.start,this.timeDifference=this.endTime-this.startTime,0>this.timeDifference&&(this.timeDifference=0))}})})();(function(){var t=window.AmCharts;t.AmBalloon=t.Class({construct:function(e){this.cname="AmBalloon";this.enabled=!0;this.fillColor="#FFFFFF";this.fillAlpha=.8;this.borderThickness=2;this.borderColor="#FFFFFF";this.borderAlpha=1;this.cornerRadius=0;this.maxWidth=220;this.horizontalPadding=8;this.verticalPadding=4;this.pointerWidth=6;this.pointerOrientation="V";this.color="#000000";this.adjustBorderColor=!0;this.show=this.follow=this.showBullet=!1;this.bulletSize=3;this.shadowAlpha=.4;this.shadowColor="#000000";this.fadeOutDuration=this.animationDuration=.3;this.fixedPosition=!0;this.offsetY=6;this.offsetX=1;this.textAlign="center";this.disableMouseEvents=!0;this.deltaSignX=this.deltaSignY=1;t.isModern||(this.offsetY*=1.5);this.sdy=this.sdx=0;t.applyTheme(this,e,this.cname)},draw:function(){var e=this.pointToX,i=this.pointToY;t.isModern||(this.drop=!1);var s=this.chart;t.VML&&(this.fadeOutDuration=0);this.xAnim&&s.stopAnim(this.xAnim);this.yAnim&&s.stopAnim(this.yAnim);this.sdy=this.sdx=0;if(!isNaN(e)){var a=this.follow,h=s.container,r=this.set;t.remove(r);this.removeDiv();r=h.set();r.node.style.pointerEvents="none";this.set=r;this.mainSet?(this.mainSet.push(this.set),this.sdx=this.mainSet.x,this.sdy=this.mainSet.y):s.balloonsSet.push(r);if(this.show){var n=this.l,o=this.t,l=this.r,d=this.b,u=this.balloonColor,c=this.fillColor,p=this.borderColor,m=c;void 0!=u&&(this.adjustBorderColor?m=p=u:c=u);var f=this.horizontalPadding,g=this.verticalPadding,v=this.pointerWidth,b=this.pointerOrientation,x=this.cornerRadius,N=s.fontFamily,C=this.fontSize;void 0==C&&(C=s.fontSize);var u=document.createElement("div"),y=s.classNamePrefix;u.className=y+"-balloon-div";this.className&&(u.className=u.className+" "+y+"-balloon-div-"+this.className);y=u.style;this.disableMouseEvents&&(y.pointerEvents="none");y.position="absolute";var w=this.minWidth,M=document.createElement("div");u.appendChild(M);var A=M.style;isNaN(w)||(A.minWidth=w-2*f+"px");A.textAlign=this.textAlign;A.maxWidth=this.maxWidth+"px";A.fontSize=C+"px";A.color=this.color;A.fontFamily=N;M.innerHTML=this.text;s.chartDiv.appendChild(u);this.textDiv=u;var A=u.offsetWidth,S=u.offsetHeight;u.clientHeight&&(A=u.clientWidth,S=u.clientHeight);N=S+2*g;M=A+2*f;!isNaN(w)&&M<w&&(M=w);window.opera&&(N+=2);var D=!1,C=this.offsetY;s.handDrawn&&(C+=s.handDrawScatter+2);"H"!=b?(w=e-M/2,i<o+N+10&&"down"!=b?(D=!0,a&&(i+=C),C=i+v,this.deltaSignY=-1):(a&&(i-=C),C=i-N-v,this.deltaSignY=1)):(2*v>N&&(v=N/2),C=i-N/2,e<n+(l-n)/2?(w=e+v,this.deltaSignX=-1):(w=e-M-v,this.deltaSignX=1));C+N>=d&&(C=d-N);C<o&&(C=o);w<n&&(w=n);w+M>l&&(w=l-M);var o=C+g,d=w+f,T=this.shadowAlpha,L=this.shadowColor,f=this.borderThickness,k=this.bulletSize,B,g=this.fillAlpha,R=this.borderAlpha;this.showBullet&&(B=t.circle(h,k,m,g),r.push(B));this.drop?(n=M/1.6,l=0,"V"==b&&(b="down"),"H"==b&&(b="left"),"down"==b&&(w=e+1,C=i-n-n/3),"up"==b&&(l=180,w=e+1,C=i+n+n/3),"left"==b&&(l=270,w=e+n+n/3+2,C=i),"right"==b&&(l=90,w=e-n-n/3+2,C=i),o=C-S/2+1,d=w-A/2-1,c=t.drop(h,n,l,c,g,f,p,R)):0<x||0===v?(0<T&&(e=t.rect(h,M,N,c,0,f+1,L,T,x),t.isModern?e.translate(1,1):e.translate(4,4),r.push(e)),c=t.rect(h,M,N,c,g,f,p,R,x)):(m=[],x=[],"H"!=b?(n=e-w,n>M-v&&(n=M-v),n<v&&(n=v),m=[0,n-v,e-w,n+v,M,M,0,0],x=D?[0,0,i-C,0,0,N,N,0]:[N,N,i-C,N,N,0,0,N]):(b=i-C,b>N-v&&(b=N-v),b<v&&(b=v),x=[0,b-v,i-C,b+v,N,N,0,0],m=e<n+(l-n)/2?[0,0,w<e?0:e-w,0,0,M,M,0]:[M,M,w+M>e?M:e-w,M,M,0,0,M]),0<T&&(e=t.polygon(h,m,x,c,0,f,L,T),e.translate(1,1),r.push(e)),c=t.polygon(h,m,x,c,g,f,p,R));this.bg=c;r.push(c);c.toFront();t.setCN(s,c,"balloon-bg");this.className&&t.setCN(s,c,"balloon-bg-"+this.className);h=1*this.deltaSignX;d+=this.sdx;o+=this.sdy;y.left=d+"px";y.top=o+"px";r.translate(w-h,C,1,!0);c=c.getBBox();this.bottom=C+N+1;this.yPos=c.y+C;B&&B.translate(this.pointToX-w+h,i-C);i=this.animationDuration;0<this.animationDuration&&!a&&!isNaN(this.prevX)&&(r.translate(this.prevX,this.prevY,NaN,!0),r.animate({translate:w-h+","+C},i,"easeOutSine"),u&&(y.left=this.prevTX+"px",y.top=this.prevTY+"px",this.xAnim=s.animate({node:u},"left",this.prevTX,d,i,"easeOutSine","px"),this.yAnim=s.animate({node:u},"top",this.prevTY,o,i,"easeOutSine","px")));this.prevX=w-h;this.prevY=C;this.prevTX=d;this.prevTY=o}}},fixPrevious:function(){this.rPrevX=this.prevX;this.rPrevY=this.prevY;this.rPrevTX=this.prevTX;this.rPrevTY=this.prevTY},restorePrevious:function(){this.prevX=this.rPrevX;this.prevY=this.rPrevY;this.prevTX=this.rPrevTX;this.prevTY=this.rPrevTY},followMouse:function(){if(this.follow&&this.show){var t=this.chart.mouseX-this.offsetX*this.deltaSignX-this.sdx,e=this.chart.mouseY-this.sdy;this.pointToX=t;this.pointToY=e;if(t!=this.previousX||e!=this.previousY)if(this.previousX=t,this.previousY=e,0===this.cornerRadius)this.draw();else{var i=this.set;if(i){var s=i.getBBox(),t=t-s.width/2,a=e-s.height-10;t<this.l&&(t=this.l);t>this.r-s.width&&(t=this.r-s.width);a<this.t&&(a=e+10);i.translate(t,a);e=this.textDiv.style;e.left=t+this.horizontalPadding+"px";e.top=a+this.verticalPadding+"px"}}}},changeColor:function(t){this.balloonColor=t},setBounds:function(t,e,i,s){this.l=t;this.t=e;this.r=i;this.b=s;this.destroyTO&&clearTimeout(this.destroyTO)},showBalloon:function(t){if(this.text!=t||this.positionChanged)this.text=t,this.isHiding=!1,this.show=!0,this.destroyTO&&clearTimeout(this.destroyTO),t=this.chart,this.fadeAnim1&&t.stopAnim(this.fadeAnim1),this.fadeAnim2&&t.stopAnim(this.fadeAnim2),this.draw(),this.positionChanged=!1},hide:function(t){var e=this;e.text=void 0;isNaN(t)&&(t=e.fadeOutDuration);var i=e.chart;if(0<t&&!e.isHiding){e.isHiding=!0;e.destroyTO&&clearTimeout(e.destroyTO);e.destroyTO=setTimeout(function(){e.destroy.call(e)},1e3*t);e.follow=!1;e.show=!1;var s=e.set;s&&(s.setAttr("opacity",e.fillAlpha),e.fadeAnim1=s.animate({opacity:0},t,"easeInSine"));e.textDiv&&(e.fadeAnim2=i.animate({node:e.textDiv},"opacity",1,0,t,"easeInSine",""))}else e.show=!1,e.follow=!1,e.destroy()},setPosition:function(t,e){if(t!=this.pointToX||e!=this.pointToY)this.previousX=this.pointToX,this.previousY=this.pointToY,this.pointToX=t,this.pointToY=e,this.positionChanged=!0},followCursor:function(t){var e=this;e.follow=t;clearInterval(e.interval);var i=e.chart.mouseX-e.sdx,s=e.chart.mouseY-e.sdy;!isNaN(i)&&t&&(e.pointToX=i-e.offsetX*e.deltaSignX,e.pointToY=s,e.followMouse(),e.interval=setInterval(function(){e.followMouse.call(e)},40))},removeDiv:function(){if(this.textDiv){var t=this.textDiv.parentNode;t&&t.removeChild(this.textDiv)}},destroy:function(){clearInterval(this.interval);t.remove(this.set);this.removeDiv();this.set=null}})})();(function(){var t=window.AmCharts;t.AmCoordinateChart=t.Class({inherits:t.AmChart,construct:function(e){t.AmCoordinateChart.base.construct.call(this,e);this.theme=e;this.createEvents("rollOverGraphItem","rollOutGraphItem","clickGraphItem","doubleClickGraphItem","rightClickGraphItem","clickGraph","rollOverGraph","rollOutGraph");this.startAlpha=1;this.startDuration=0;this.startEffect="elastic";this.sequencedAnimation=!0;this.colors="#FF6600 #FCD202 #B0DE09 #0D8ECF #2A0CD0 #CD0D74 #CC0000 #00CC00 #0000CC #DDDDDD #999999 #333333 #990000".split(" ");this.balloonDateFormat="MMM DD, YYYY";this.valueAxes=[];this.graphs=[];this.guides=[];this.gridAboveGraphs=!1;t.applyTheme(this,e,"AmCoordinateChart")},initChart:function(){t.AmCoordinateChart.base.initChart.call(this);this.drawGraphs=!0;var e=this.categoryAxis;e&&(this.categoryAxis=t.processObject(e,t.CategoryAxis,this.theme));this.processValueAxes();this.createValueAxes();this.processGraphs();this.processGuides();t.VML&&(this.startAlpha=1);this.setLegendData(this.graphs);this.gridAboveGraphs&&(this.gridSet.toFront(),this.bulletSet.toFront(),this.balloonsSet.toFront())},createValueAxes:function(){if(0===this.valueAxes.length){var e=new t.ValueAxis;this.addValueAxis(e)}},parseData:function(){this.processValueAxes();this.processGraphs()},parseSerialData:function(t){this.chartData=[];if(t)if(0<this.processTimeout){1>this.processCount&&(this.processCount=1);var e=t.length/this.processCount;this.parseCount=Math.ceil(e)-1;for(var i=0;i<e;i++)this.delayParseSerialData(t,i)}else this.parseCount=0,this.parsePartSerialData(t,0,t.length,0);else this.onDataUpdated()},delayParseSerialData:function(t,e){var i=this,s=i.processCount;setTimeout(function(){i.parsePartSerialData.call(i,t,e*s,(e+1)*s,e)},i.processTimeout)},parsePartSerialData:function(e,i,s,a){s>e.length&&(s=e.length);var h=this.graphs,r={},n=this.seriesIdField;n||(n=this.categoryField);var o=!1,l,d=this.categoryAxis,u,c,p;d&&(o=d.parseDates,u=d.forceShowField,p=d.classNameField,c=d.labelColorField,l=d.categoryFunction);var m,f,g={},v;o&&(m=t.extractPeriod(d.minPeriod),f=m.period,m=m.count,v=t.getPeriodDuration(f,m));var b={};this.lookupTable=b;var x,N=this.dataDateFormat,C={};for(x=i;x<s;x++){var y={},w=e[x];i=w[this.categoryField];y.dataContext=w;y.category=l?l(i,w,d):String(i);u&&(y.forceShow=w[u]);p&&(y.className=w[p]);c&&(y.labelColor=w[c]);b[w[n]]=y;if(o&&(d.categoryFunction?i=d.categoryFunction(i,w,d):(!N||i instanceof Date||(i=i.toString()+" |"),i=t.getDate(i,N,d.minPeriod)),i=t.resetDateToMin(i,f,m,d.firstDayOfWeek),y.category=i,y.time=i.getTime(),isNaN(y.time)))continue;var M=this.valueAxes;y.axes={};y.x={};var A;for(A=0;A<M.length;A++){var S=M[A].id;y.axes[S]={};y.axes[S].graphs={};var D;for(D=0;D<h.length;D++){i=h[D];var T=i.id,L=1.1;isNaN(i.gapPeriod)||(L=i.gapPeriod);var k=i.periodValue;if(i.valueAxis.id==S){y.axes[S].graphs[T]={};var B={};B.index=x;var R=w;i.dataProvider&&(R=r);B.values=this.processValues(R,i,k);if(!i.connect||i.forceGap&&!isNaN(i.gapPeriod))if(C&&C[T]&&0<L&&y.time-g[T]>=v*L&&(C[T].gap=!0),i.forceGap){var L=0,O;for(O in B.values)L++;0<L&&(g[T]=y.time,C[T]=B)}else g[T]=y.time,C[T]=B;this.processFields(i,B,R);B.category=y.category;B.serialDataItem=y;B.graph=i;y.axes[S].graphs[T]=B}}}this.chartData[x]=y}if(this.parseCount==a){for(e=0;e<h.length;e++)i=h[e],i.dataProvider&&this.parseGraphData(i);this.dataChanged=!1;this.dispatchDataUpdated=!0;this.onDataUpdated()}},processValues:function(e,i,s){var a={},h,r=!1;"candlestick"!=i.type&&"ohlc"!=i.type||""===s||(r=!0);for(var n="value error open close low high".split(" "),o=0;o<n.length;o++){var l=n[o];"value"!=l&&"error"!=l&&r&&(s=l.charAt(0).toUpperCase()+l.slice(1));var d=e[i[l+"Field"]+s];null!==d&&(h=Number(d),isNaN(h)||(a[l]=h),"date"==i.valueAxis.type&&void 0!==d&&(h=t.getDate(d,i.chart.dataDateFormat),a[l]=h.getTime()))}return a},parseGraphData:function(t){var e=t.dataProvider,i=t.seriesIdField;i||(i=this.seriesIdField);i||(i=this.categoryField);var s;for(s=0;s<e.length;s++){var a=e[s],h=this.lookupTable[String(a[i])],r=t.valueAxis.id;h&&(r=h.axes[r].graphs[t.id],r.serialDataItem=h,r.values=this.processValues(a,t,t.periodValue),this.processFields(t,r,a))}},addValueAxis:function(t){t.chart=this;this.valueAxes.push(t);this.validateData()},removeValueAxesAndGraphs:function(){var t=this.valueAxes,e;for(e=t.length-1;-1<e;e--)this.removeValueAxis(t[e])},removeValueAxis:function(t){var e=this.graphs,i;for(i=e.length-1;0<=i;i--){var s=e[i];s&&s.valueAxis==t&&this.removeGraph(s)}e=this.valueAxes;for(i=e.length-1;0<=i;i--)e[i]==t&&e.splice(i,1);this.validateData()},addGraph:function(t){this.graphs.push(t);this.chooseGraphColor(t,this.graphs.length-1);this.validateData()},removeGraph:function(t){var e=this.graphs,i;for(i=e.length-1;0<=i;i--)e[i]==t&&(e.splice(i,1),t.destroy());this.validateData()},handleValueAxisZoom:function(){},processValueAxes:function(){var e=this.valueAxes,i;for(i=0;i<e.length;i++){var s=e[i],s=t.processObject(s,t.ValueAxis,this.theme);e[i]=s;s.chart=this;s.init();this.listenTo(s,"axisIntZoomed",this.handleValueAxisZoom);s.id||(s.id="valueAxisAuto"+i+"_"+(new Date).getTime());void 0===s.usePrefixes&&(s.usePrefixes=this.usePrefixes)}},processGuides:function(){var e=this.guides,i=this.categoryAxis;if(e)for(var s=0;s<e.length;s++){var a=e[s];(void 0!==a.category||void 0!==a.date)&&i&&i.addGuide(a);a.id||(a.id="guideAuto"+s+"_"+(new Date).getTime());var h=a.valueAxis;h?(t.isString(h)&&(h=this.getValueAxisById(h)),h?h.addGuide(a):this.valueAxes[0].addGuide(a)):isNaN(a.value)||this.valueAxes[0].addGuide(a)}},processGraphs:function(){var e=this.graphs,i;this.graphsById={};for(i=0;i<e.length;i++){var s=e[i],s=t.processObject(s,t.AmGraph,this.theme);e[i]=s;this.chooseGraphColor(s,i);s.chart=this;s.init();t.isString(s.valueAxis)&&(s.valueAxis=this.getValueAxisById(s.valueAxis));s.valueAxis||(s.valueAxis=this.valueAxes[0]);s.id||(s.id="graphAuto"+i+"_"+(new Date).getTime());this.graphsById[s.id]=s}},formatString:function(e,i,s){var a=i.graph,h=a.valueAxis;h.duration&&i.values.value&&(h=t.formatDuration(i.values.value,h.duration,"",h.durationUnits,h.maxInterval,h.numberFormatter),e=e.split("[[value]]").join(h));e=t.massReplace(e,{"[[title]]":a.title,"[[description]]":i.description});e=s?t.fixNewLines(e):t.fixBrakes(e);return e=t.cleanFromEmpty(e)},getBalloonColor:function(e,i,s){var a=e.lineColor,h=e.balloonColor;s&&(h=a);s=e.fillColorsR;"object"==typeof s?a=s[0]:void 0!==s&&(a=s);i.isNegative&&(s=e.negativeLineColor,e=e.negativeFillColors,"object"==typeof e?s=e[0]:void 0!==e&&(s=e),void 0!==s&&(a=s));void 0!==i.color&&(a=i.color);void 0!==i.lineColor&&(a=i.lineColor);i=i.fillColors;void 0!==i&&(a=i,t.ifArray(i)&&(a=i[0]));void 0===h&&(h=a);return h},getGraphById:function(e){return t.getObjById(this.graphs,e)},getValueAxisById:function(e){return t.getObjById(this.valueAxes,e)},processFields:function(e,i,s){if(e.itemColors){var a=e.itemColors,h=i.index;i.color=h<a.length?a[h]:t.randomColor()}a="lineColor color alpha fillColors description bullet customBullet bulletSize bulletConfig url labelColor dashLength pattern gap className columnIndex".split(" ");for(h=0;h<a.length;h++){var r=a[h],n=e[r+"Field"];n&&(n=s[n],t.isDefined(n)&&(i[r]=n))}i.dataContext=s},chooseGraphColor:function(e,i){if(e.lineColor)e.lineColorR=e.lineColor;else{var s;s=this.colors.length>i?this.colors[i]:e.lineColorR?e.lineColorR:t.randomColor();e.lineColorR=s}e.fillColorsR=e.fillColors?e.fillColors:e.lineColorR;e.bulletBorderColorR=e.bulletBorderColor?e.bulletBorderColor:e.useLineColorForBulletBorder?e.lineColorR:e.bulletColor;e.bulletColorR=e.bulletColor?e.bulletColor:e.lineColorR;if(s=this.patterns)e.pattern=s[i]},handleLegendEvent:function(t){var e=t.type;if(t=t.dataItem){var i=t.hidden,s=t.showBalloon;switch(e){case"clickMarker":this.textClickEnabled&&(s?this.hideGraphsBalloon(t):this.showGraphsBalloon(t));break;case"clickLabel":s?this.hideGraphsBalloon(t):this.showGraphsBalloon(t);break;case"rollOverItem":i||this.highlightGraph(t);break;case"rollOutItem":i||this.unhighlightGraph();break;case"hideItem":this.hideGraph(t);break;case"showItem":this.showGraph(t)}}},highlightGraph:function(t){var e=this.graphs;if(e){var i,s=.2;this.legend&&(s=this.legend.rollOverGraphAlpha);if(1!=s)for(i=0;i<e.length;i++){var a=e[i];a!=t&&a.changeOpacity(s)}}},unhighlightGraph:function(){var t;this.legend&&(t=this.legend.rollOverGraphAlpha);if(1!=t){t=this.graphs;var e;for(e=0;e<t.length;e++)t[e].changeOpacity(1)}},showGraph:function(t){t.switchable&&(t.hidden=!1,this.dataChanged=!0,"xy"!=this.type&&(this.marginsUpdated=!1),this.chartCreated&&this.initChart())},hideGraph:function(t){t.switchable&&(this.dataChanged=!0,"xy"!=this.type&&(this.marginsUpdated=!1),t.hidden=!0,this.chartCreated&&this.initChart())},hideGraphsBalloon:function(t){t.showBalloon=!1;this.updateLegend()},showGraphsBalloon:function(t){t.showBalloon=!0;this.updateLegend()},updateLegend:function(){this.legend&&this.legend.invalidateSize()},resetAnimation:function(){var t=this.graphs;if(t){var e;for(e=0;e<t.length;e++)t[e].animationPlayed=!1}},animateAgain:function(){this.resetAnimation();this.validateNow()}})})();(function(){var t=window.AmCharts;t.TrendLine=t.Class({construct:function(e){this.cname="TrendLine";this.createEvents("click","rollOver","rollOut");this.isProtected=!1;this.dashLength=0;this.lineColor="#00CC00";this.lineThickness=this.lineAlpha=1;t.applyTheme(this,e,this.cname)},draw:function(){var e=this;e.destroy();var i=e.chart,s=i.container,a,h,r,n,o=e.categoryAxis,l=e.initialDate,d=e.initialCategory,u=e.finalDate,c=e.finalCategory,p=e.valueAxis,m=e.valueAxisX,f=e.initialXValue,g=e.finalXValue,v=e.initialValue,b=e.finalValue,x=p.recalculateToPercents,N=i.dataDateFormat;o&&(l&&(l=t.getDate(l,N,"fff"),e.initialDate=l,a=o.dateToCoordinate(l)),d&&(a=o.categoryToCoordinate(d)),u&&(u=t.getDate(u,N,"fff"),e.finalDate=u,h=o.dateToCoordinate(u)),c&&(h=o.categoryToCoordinate(c)));m&&!x&&(isNaN(f)||(a=m.getCoordinate(f)),isNaN(g)||(h=m.getCoordinate(g)));p&&!x&&(isNaN(v)||(r=p.getCoordinate(v)),isNaN(b)||(n=p.getCoordinate(b)));if(!(isNaN(a)||isNaN(h)||isNaN(r)||isNaN(r))){i.rotate?(o=[r,n],n=[a,h]):(o=[a,h],n=[r,n]);l=e.lineColor;r=t.line(s,o,n,l,e.lineAlpha,e.lineThickness,e.dashLength);a=o;h=n;c=o[1]-o[0];p=n[1]-n[0];0===c&&(c=.01);0===p&&(p=.01);d=c/Math.abs(c);u=p/Math.abs(p);p=90*Math.PI/180-Math.asin(c/(c*p/Math.abs(c*p)*Math.sqrt(Math.pow(c,2)+Math.pow(p,2))));c=Math.abs(5*Math.cos(p));p=Math.abs(5*Math.sin(p));a.push(o[1]-d*p,o[0]-d*p);h.push(n[1]+u*c,n[0]+u*c);n=t.polygon(s,a,h,l,.005,0);s=s.set([n,r]);s.translate(i.marginLeftReal,i.marginTopReal);i.trendLinesSet.push(s);t.setCN(i,r,"trend-line");t.setCN(i,r,"trend-line-"+e.id);e.line=r;e.set=s;if(r=e.initialImage)r=t.processObject(r,t.Image,e.theme),r.chart=i, r.draw(),r.translate(a[0]+r.offsetX,h[0]+r.offsetY),s.push(r.set);if(r=e.finalImage)r=t.processObject(r,t.Image,e.theme),r.chart=i,r.draw(),r.translate(a[1]+r.offsetX,h[1]+r.offsetY),s.push(r.set);n.mouseup(function(){e.handleLineClick()}).mouseover(function(){e.handleLineOver()}).mouseout(function(){e.handleLineOut()});n.touchend&&n.touchend(function(){e.handleLineClick()});s.clipRect(0,0,i.plotAreaWidth,i.plotAreaHeight)}},handleLineClick:function(){this.fire({type:"click",trendLine:this,chart:this.chart})},handleLineOver:function(){var t=this.rollOverColor;void 0!==t&&this.line.attr({stroke:t});this.balloonText&&(clearTimeout(this.chart.hoverInt),t=this.line.getBBox(),this.chart.showBalloon(this.balloonText,this.lineColor,!0,this.x+t.x+t.width/2,this.y+t.y+t.height/2));this.fire({type:"rollOver",trendLine:this,chart:this.chart})},handleLineOut:function(){this.line.attr({stroke:this.lineColor});this.balloonText&&this.chart.hideBalloon();this.fire({type:"rollOut",trendLine:this,chart:this.chart})},destroy:function(){t.remove(this.set)}})})();(function(){var t=window.AmCharts;t.Image=t.Class({construct:function(e){this.cname="Image";this.height=this.width=20;this.rotation=this.offsetY=this.offsetX=0;this.balloonColor=this.color="#000000";this.opacity=1;t.applyTheme(this,e,this.cname)},draw:function(){var t=this;t.set&&t.set.remove();var e=t.chart.container;t.set=e.set();var i,s;t.url?(i=e.image(t.url,0,0,t.width,t.height),s=1):t.svgPath&&(i=e.path(t.svgPath),i.setAttr("fill",t.color),i.setAttr("stroke",t.outlineColor),e=i.getBBox(),s=Math.min(t.width/e.width,t.height/e.height));i&&(i.setAttr("opacity",t.opacity),t.set.rotate(t.rotation),i.translate(-t.width/2,-t.height/2,s),t.balloonText&&i.mouseover(function(){t.chart.showBalloon(t.balloonText,t.balloonColor,!0)}).mouseout(function(){t.chart.hideBalloon()}).touchend(function(){t.chart.hideBalloon()}).touchstart(function(){t.chart.showBalloon(t.balloonText,t.balloonColor,!0)}),t.set.push(i))},translate:function(t,e){this.set&&this.set.translate(t,e)}})})();(function(){var t=window.AmCharts;t.circle=function(e,i,s,a,h,r,n,o,l){0>=i&&(i=.001);if(void 0==h||0===h)h=.01;void 0===r&&(r="#000000");void 0===n&&(n=0);a={fill:s,stroke:r,"fill-opacity":a,"stroke-width":h,"stroke-opacity":n};e=isNaN(l)?e.circle(0,0,i).attr(a):e.ellipse(0,0,i,l).attr(a);o&&e.gradient("radialGradient",[s,t.adjustLuminosity(s,-.6)]);return e};t.text=function(e,i,s,a,h,r,n,o){r||(r="middle");"right"==r&&(r="end");"left"==r&&(r="start");isNaN(o)&&(o=1);void 0!==i&&(i=String(i),t.isIE&&!t.isModern&&(i=i.replace("&","&"),i=i.replace("&","&")));s={fill:s,"font-family":a,"font-size":h+"px",opacity:o};!0===n&&(s["font-weight"]="bold");s["text-anchor"]=r;return e.text(i,s)};t.polygon=function(e,i,s,a,h,r,n,o,l,d,u){isNaN(r)&&(r=.01);isNaN(o)&&(o=h);var c=a,p=!1;"object"==typeof c&&1<c.length&&(p=!0,c=c[0]);void 0===n&&(n=c);h={fill:c,stroke:n,"fill-opacity":h,"stroke-width":r,"stroke-opacity":o};void 0!==u&&0<u&&(h["stroke-dasharray"]=u);u=t.dx;r=t.dy;e.handDrawn&&(s=t.makeHD(i,s,e.handDrawScatter),i=s[0],s=s[1]);n=Math.round;d&&(i[m]=t.roundTo(i[m],5),s[m]=t.roundTo(s[m],5),n=Number);o="M"+(n(i[0])+u)+","+(n(s[0])+r);for(var m=1;m<i.length;m++)d&&(i[m]=t.roundTo(i[m],5),s[m]=t.roundTo(s[m],5)),o+=" L"+(n(i[m])+u)+","+(n(s[m])+r);e=e.path(o+" Z").attr(h);p&&e.gradient("linearGradient",a,l);return e};t.rect=function(e,i,s,a,h,r,n,o,l,d,u){if(isNaN(i)||isNaN(s))return e.set();isNaN(r)&&(r=0);void 0===l&&(l=0);void 0===d&&(d=270);isNaN(h)&&(h=0);var c=a,p=!1;"object"==typeof c&&(c=c[0],p=!0);void 0===n&&(n=c);void 0===o&&(o=h);i=Math.round(i);s=Math.round(s);var m=0,f=0;0>i&&(i=Math.abs(i),m=-i);0>s&&(s=Math.abs(s),f=-s);m+=t.dx;f+=t.dy;h={fill:c,stroke:n,"fill-opacity":h,"stroke-opacity":o};void 0!==u&&0<u&&(h["stroke-dasharray"]=u);e=e.rect(m,f,i,s,l,r).attr(h);p&&e.gradient("linearGradient",a,d);return e};t.bullet=function(e,i,s,a,h,r,n,o,l,d,u,c,p){var m;"circle"==i&&(i="round");switch(i){case"round":m=t.circle(e,s/2,a,h,r,n,o);break;case"square":m=t.polygon(e,[-s/2,s/2,s/2,-s/2],[s/2,s/2,-s/2,-s/2],a,h,r,n,o,d-180,void 0,p);break;case"rectangle":m=t.polygon(e,[-s,s,s,-s],[s/2,s/2,-s/2,-s/2],a,h,r,n,o,d-180,void 0,p);break;case"diamond":m=t.polygon(e,[-s/2,0,s/2,0],[0,-s/2,0,s/2],a,h,r,n,o);break;case"triangleUp":m=t.triangle(e,s,0,a,h,r,n,o);break;case"triangleDown":m=t.triangle(e,s,180,a,h,r,n,o);break;case"triangleLeft":m=t.triangle(e,s,270,a,h,r,n,o);break;case"triangleRight":m=t.triangle(e,s,90,a,h,r,n,o);break;case"bubble":m=t.circle(e,s/2,a,h,r,n,o,!0);break;case"line":m=t.line(e,[-s/2,s/2],[0,0],a,h,r,n,o);break;case"yError":m=e.set();m.push(t.line(e,[0,0],[-s/2,s/2],a,h,r));m.push(t.line(e,[-l,l],[-s/2,-s/2],a,h,r));m.push(t.line(e,[-l,l],[s/2,s/2],a,h,r));break;case"xError":m=e.set(),m.push(t.line(e,[-s/2,s/2],[0,0],a,h,r)),m.push(t.line(e,[-s/2,-s/2],[-l,l],a,h,r)),m.push(t.line(e,[s/2,s/2],[-l,l],a,h,r))}m&&m.pattern(u,NaN,c);return m};t.triangle=function(t,e,i,s,a,h,r,n){if(void 0===h||0===h)h=1;void 0===r&&(r="#000");void 0===n&&(n=0);s={fill:s,stroke:r,"fill-opacity":a,"stroke-width":h,"stroke-opacity":n};e/=2;var o;0===i&&(o=" M"+-e+","+e+" L0,"+-e+" L"+e+","+e+" Z");180==i&&(o=" M"+-e+","+-e+" L0,"+e+" L"+e+","+-e+" Z");90==i&&(o=" M"+-e+","+-e+" L"+e+",0 L"+-e+","+e+" Z");270==i&&(o=" M"+-e+",0 L"+e+","+e+" L"+e+","+-e+" Z");return t.path(o).attr(s)};t.line=function(e,i,s,a,h,r,n,o,l,d,u){if(e.handDrawn&&!u)return t.handDrawnLine(e,i,s,a,h,r,n,o,l,d,u);r={fill:"none","stroke-width":r};void 0!==n&&0<n&&(r["stroke-dasharray"]=n);isNaN(h)||(r["stroke-opacity"]=h);a&&(r.stroke=a);a=Math.round;d&&(a=Number,i[0]=t.roundTo(i[0],5),s[0]=t.roundTo(s[0],5));d=t.dx;h=t.dy;n="M"+(a(i[0])+d)+","+(a(s[0])+h);for(o=1;o<i.length;o++)i[o]=t.roundTo(i[o],5),s[o]=t.roundTo(s[o],5),n+=" L"+(a(i[o])+d)+","+(a(s[o])+h);if(t.VML)return e.path(n,void 0,!0).attr(r);l&&(n+=" M0,0 L0,0");return e.path(n).attr(r)};t.makeHD=function(t,e,i){for(var s=[],a=[],h=1;h<t.length;h++)for(var r=Number(t[h-1]),n=Number(e[h-1]),o=Number(t[h]),l=Number(e[h]),d=Math.round(Math.sqrt(Math.pow(o-r,2)+Math.pow(l-n,2))/50)+1,o=(o-r)/d,l=(l-n)/d,u=0;u<=d;u++){var c=n+u*l+Math.random()*i;s.push(r+u*o+Math.random()*i);a.push(c)}return[s,a]};t.handDrawnLine=function(e,i,s,a,h,r,n,o,l,d){var u,c=e.set();for(u=1;u<i.length;u++)for(var p=[i[u-1],i[u]],m=[s[u-1],s[u]],m=t.makeHD(p,m,e.handDrawScatter),p=m[0],m=m[1],f=1;f<p.length;f++)c.push(t.line(e,[p[f-1],p[f]],[m[f-1],m[f]],a,h,r+Math.random()*e.handDrawThickness-e.handDrawThickness/2,n,o,l,d,!0));return c};t.doNothing=function(t){return t};t.drop=function(t,e,i,s,a,h,r,n){var o=1/180*Math.PI,l=i-20,d=Math.sin(l*o)*e,u=Math.cos(l*o)*e,c=Math.sin((l+40)*o)*e,p=Math.cos((l+40)*o)*e,m=.8*e,f=-e/3,g=e/3;0===i&&(f=-f,g=0);180==i&&(g=0);90==i&&(f=0);270==i&&(f=0,g=-g);i={fill:s,stroke:r,"stroke-width":h,"stroke-opacity":n,"fill-opacity":a};e="M"+d+","+u+" A"+e+","+e+",0,1,1,"+c+","+p+(" A"+m+","+m+",0,0,0,"+(Math.sin((l+20)*o)*e+g)+","+(Math.cos((l+20)*o)*e+f));e+=" A"+m+","+m+",0,0,0,"+d+","+u;return t.path(e,void 0,void 0,"1000,1000").attr(i)};t.wedge=function(e,i,s,a,h,r,n,o,l,d,u,c,p,m){var f=Math.round;r=f(r);n=f(n);o=f(o);var g=f(n/r*o),v=t.VML,b=359.5+r/100;359.94<b&&(b=359.94);h>=b&&(h=b);var x=1/180*Math.PI,b=i+Math.sin(a*x)*o,N=s-Math.cos(a*x)*g,C=i+Math.sin(a*x)*r,y=s-Math.cos(a*x)*n,w=i+Math.sin((a+h)*x)*r,M=s-Math.cos((a+h)*x)*n,A=i+Math.sin((a+h)*x)*o,x=s-Math.cos((a+h)*x)*g,S={fill:t.adjustLuminosity(d.fill,-.2),"stroke-opacity":0,"fill-opacity":d["fill-opacity"]},D=0;180<Math.abs(h)&&(D=1);a=e.set();var T;v&&(b=f(10*b),C=f(10*C),w=f(10*w),A=f(10*A),N=f(10*N),y=f(10*y),M=f(10*M),x=f(10*x),i=f(10*i),l=f(10*l),s=f(10*s),r*=10,n*=10,o*=10,g*=10,1>Math.abs(h)&&1>=Math.abs(w-C)&&1>=Math.abs(M-y)&&(T=!0));h="";var L;c&&(S["fill-opacity"]=0,S["stroke-opacity"]=d["stroke-opacity"]/2,S.stroke=d.stroke);if(0<l){L=" M"+b+","+(N+l)+" L"+C+","+(y+l);v?(T||(L+=" A"+(i-r)+","+(l+s-n)+","+(i+r)+","+(l+s+n)+","+C+","+(y+l)+","+w+","+(M+l)),L+=" L"+A+","+(x+l),0<o&&(T||(L+=" B"+(i-o)+","+(l+s-g)+","+(i+o)+","+(l+s+g)+","+A+","+(l+x)+","+b+","+(l+N)))):(L+=" A"+r+","+n+",0,"+D+",1,"+w+","+(M+l)+" L"+A+","+(x+l),0<o&&(L+=" A"+o+","+g+",0,"+D+",0,"+b+","+(N+l)));L+=" Z";var k=l;v&&(k/=10);for(var B=0;B<k;B+=10){var R=e.path(L,void 0,void 0,"1000,1000").attr(S);a.push(R);R.translate(0,-B)}L=e.path(" M"+b+","+N+" L"+b+","+(N+l)+" L"+C+","+(y+l)+" L"+C+","+y+" L"+b+","+N+" Z",void 0,void 0,"1000,1000").attr(S);l=e.path(" M"+w+","+M+" L"+w+","+(M+l)+" L"+A+","+(x+l)+" L"+A+","+x+" L"+w+","+M+" Z",void 0,void 0,"1000,1000").attr(S);a.push(L);a.push(l)}v?(T||(h=" A"+f(i-r)+","+f(s-n)+","+f(i+r)+","+f(s+n)+","+f(C)+","+f(y)+","+f(w)+","+f(M)),n=" M"+f(b)+","+f(N)+" L"+f(C)+","+f(y)+h+" L"+f(A)+","+f(x)):n=" M"+b+","+N+" L"+C+","+y+(" A"+r+","+n+",0,"+D+",1,"+w+","+M)+" L"+A+","+x;0<o&&(v?T||(n+=" B"+(i-o)+","+(s-g)+","+(i+o)+","+(s+g)+","+A+","+x+","+b+","+N):n+=" A"+o+","+g+",0,"+D+",0,"+b+","+N);e.handDrawn&&(o=t.line(e,[b,C],[N,y],d.stroke,d.thickness*Math.random()*e.handDrawThickness,d["stroke-opacity"]),a.push(o));e=e.path(n+" Z",void 0,void 0,"1000,1000").attr(d);if(u){o=[];for(g=0;g<u.length;g++)o.push(t.adjustLuminosity(d.fill,u[g]));"radial"!=m||t.isModern||(o=[]);0<o.length&&e.gradient(m+"Gradient",o)}t.isModern&&"radial"==m&&e.grad&&(e.grad.setAttribute("gradientUnits","userSpaceOnUse"),e.grad.setAttribute("r",r),e.grad.setAttribute("cx",i),e.grad.setAttribute("cy",s));e.pattern(c,NaN,p);a.wedge=e;a.push(e);return a};t.rgb2hex=function(t){return(t=t.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===t.length?"#"+("0"+parseInt(t[1],10).toString(16)).slice(-2)+("0"+parseInt(t[2],10).toString(16)).slice(-2)+("0"+parseInt(t[3],10).toString(16)).slice(-2):""};t.adjustLuminosity=function(e,i){e&&-1!=e.indexOf("rgb")&&(e=t.rgb2hex(e));e=String(e).replace(/[^0-9a-f]/gi,"");6>e.length&&(e=String(e[0])+String(e[0])+String(e[1])+String(e[1])+String(e[2])+String(e[2]));i=i||0;var s="#",a,h;for(h=0;3>h;h++)a=parseInt(e.substr(2*h,2),16),a=Math.round(Math.min(Math.max(0,a+a*i),255)).toString(16),s+=("00"+a).substr(a.length);return s}})();(function(){var t=window.AmCharts;t.Bezier=t.Class({construct:function(e,i,s,a,h,r,n,o,l,d,u){var c=e.chart,p=t.bezierX,m=t.bezierY;isNaN(c.bezierX)||(p=c.bezierX);isNaN(c.bezierY)||(m=c.bezierY);isNaN(p)&&(c.rotate?(p=20,m=4):(m=20,p=4));var f,g;"object"==typeof n&&1<n.length&&(g=!0,f=n,n=n[0]);"object"==typeof o&&(o=o[0]);0===o&&(n="none");r={fill:n,"fill-opacity":o,"stroke-width":r};void 0!==l&&0<l&&(r["stroke-dasharray"]=l);isNaN(h)||(r["stroke-opacity"]=h);a&&(r.stroke=a);a="M"+Math.round(i[0])+","+Math.round(s[0])+" ";h=[];for(l=0;l<i.length;l++)isNaN(i[l])||isNaN(s[l])?(a+=this.drawSegment(h,p,m),l<i.length-1&&(a+="L"+i[l+1]+","+s[l+1]+" "),h=[]):h.push({x:Number(i[l]),y:Number(s[l])});a+=this.drawSegment(h,p,m);d?a+=d:t.VML||(a+="M0,0 L0,0");this.path=e.path(a).attr(r);this.node=this.path.node;g&&this.path.gradient("linearGradient",f,u)},drawSegment:function(t,e,i){var s="";if(2<t.length)for(var a=0;a<t.length-1;a++){var h=[],r=t[a-1],n=t[a],o=t[a+1],l=t[a+2];0===a?(h.push({x:n.x,y:n.y}),h.push({x:n.x,y:n.y}),h.push({x:o.x,y:o.y}),h.push({x:l.x,y:l.y})):a>=t.length-2?(h.push({x:r.x,y:r.y}),h.push({x:n.x,y:n.y}),h.push({x:o.x,y:o.y}),h.push({x:o.x,y:o.y})):(h.push({x:r.x,y:r.y}),h.push({x:n.x,y:n.y}),h.push({x:o.x,y:o.y}),h.push({x:l.x,y:l.y}));r=[];n=Math.round;r.push({x:n(h[1].x),y:n(h[1].y)});r.push({x:n((-h[0].x+e*h[1].x+h[2].x)/e),y:n((-h[0].y+i*h[1].y+h[2].y)/i)});r.push({x:n((h[1].x+e*h[2].x-h[3].x)/e),y:n((h[1].y+i*h[2].y-h[3].y)/i)});r.push({x:n(h[2].x),y:n(h[2].y)});s+="C"+r[1].x+","+r[1].y+","+r[2].x+","+r[2].y+","+r[3].x+","+r[3].y+" "}else 1<t.length&&(s+="L"+t[1].x+","+t[1].y);return s}})})();(function(){var t=window.AmCharts;t.AmDraw=t.Class({construct:function(e,i,s,a){t.SVG_NS="http://www.w3.org/2000/svg";t.SVG_XLINK="http://www.w3.org/1999/xlink";t.hasSVG=!!document.createElementNS&&!!document.createElementNS(t.SVG_NS,"svg").createSVGRect;1>i&&(i=10);1>s&&(s=10);this.div=e;this.width=i;this.height=s;this.rBin=document.createElement("div");t.hasSVG?(t.SVG=!0,i=this.createSvgElement("svg"),e.appendChild(i),this.container=i,this.addDefs(a),this.R=new t.SVGRenderer(this)):t.isIE&&t.VMLRenderer&&(t.VML=!0,t.vmlStyleSheet||(document.namespaces.add("amvml","urn:schemas-microsoft-com:vml"),31>document.styleSheets.length?(i=document.createStyleSheet(),i.addRule(".amvml","behavior:url(#default#VML); display:inline-block; antialias:true"),t.vmlStyleSheet=i):document.styleSheets[0].addRule(".amvml","behavior:url(#default#VML); display:inline-block; antialias:true")),this.container=e,this.R=new t.VMLRenderer(this,a),this.R.disableSelection(e))},createSvgElement:function(e){return document.createElementNS(t.SVG_NS,e)},circle:function(e,i,s,a){var h=new t.AmDObject("circle",this);h.attr({r:s,cx:e,cy:i});this.addToContainer(h.node,a);return h},ellipse:function(e,i,s,a,h){var r=new t.AmDObject("ellipse",this);r.attr({rx:s,ry:a,cx:e,cy:i});this.addToContainer(r.node,h);return r},setSize:function(t,e){0<t&&0<e&&(this.container.style.width=t+"px",this.container.style.height=e+"px")},rect:function(e,i,s,a,h,r,n){var o=new t.AmDObject("rect",this);t.VML&&(h=Math.round(100*h/Math.min(s,a)),s+=2*r,a+=2*r,o.bw=r,o.node.style.marginLeft=-r,o.node.style.marginTop=-r);1>s&&(s=1);1>a&&(a=1);o.attr({x:e,y:i,width:s,height:a,rx:h,ry:h,"stroke-width":r});this.addToContainer(o.node,n);return o},image:function(e,i,s,a,h,r){var n=new t.AmDObject("image",this);n.attr({x:i,y:s,width:a,height:h});this.R.path(n,e);this.addToContainer(n.node,r);return n},addToContainer:function(t,e){e||(e=this.container);e.appendChild(t)},text:function(t,e,i){return this.R.text(t,e,i)},path:function(e,i,s,a){var h=new t.AmDObject("path",this);a||(a="100,100");h.attr({cs:a});s?h.attr({dd:e}):h.attr({d:e});this.addToContainer(h.node,i);return h},set:function(t){return this.R.set(t)},remove:function(t){if(t){var e=this.rBin;e.appendChild(t);e.innerHTML=""}},renderFix:function(){var t=this.container,e=t.style;e.top="0px";e.left="0px";try{var i=t.getBoundingClientRect(),s=i.left-Math.round(i.left),a=i.top-Math.round(i.top);s&&(e.left=s+"px");a&&(e.top=a+"px")}catch(h){}},update:function(){this.R.update()},addDefs:function(e){if(t.hasSVG){var i=this.createSvgElement("desc"),s=this.container;s.setAttribute("version","1.1");s.style.position="absolute";this.setSize(this.width,this.height);if(e.accessibleTitle){var a=this.createSvgElement("text");s.appendChild(a);a.innerHTML=e.accessibleTitle;a.style.opacity=0}t.rtl&&(s.setAttribute("direction","rtl"),s.style.left="auto",s.style.right="0px");e&&(e.addCodeCredits&&i.appendChild(document.createTextNode("JavaScript chart by amCharts "+e.version)),s.appendChild(i),e.defs&&(i=this.createSvgElement("defs"),s.appendChild(i),t.parseDefs(e.defs,i),this.defs=i))}}})})();(function(){var t=window.AmCharts;t.AmDObject=t.Class({construct:function(t,e){this.D=e;this.R=e.R;this.node=this.R.create(this,t);this.y=this.x=0;this.scale=1},attr:function(t){this.R.attr(this,t);return this},getAttr:function(t){return this.node.getAttribute(t)},setAttr:function(t,e){this.R.setAttr(this,t,e);return this},clipRect:function(t,e,i,s){this.R.clipRect(this,t,e,i,s)},translate:function(t,e,i,s){s||(t=Math.round(t),e=Math.round(e));this.R.move(this,t,e,i);this.x=t;this.y=e;this.scale=i;this.angle&&this.rotate(this.angle)},rotate:function(t,e){this.R.rotate(this,t,e);this.angle=t},animate:function(e,i,s){for(var a in e)if(e.hasOwnProperty(a)){var h=a,r=e[a];s=t.getEffect(s);this.R.animate(this,h,r,i,s)}},push:function(t){if(t){var e=this.node;e.appendChild(t.node);var i=t.clipPath;i&&e.appendChild(i);(t=t.grad)&&e.appendChild(t)}},text:function(t){this.R.setText(this,t)},remove:function(){this.stop();this.R.remove(this)},clear:function(){var t=this.node;if(t.hasChildNodes())for(;1<=t.childNodes.length;)t.removeChild(t.firstChild)},hide:function(){this.setAttr("visibility","hidden")},show:function(){this.setAttr("visibility","visible")},getBBox:function(){return this.R.getBBox(this)},toFront:function(){var t=this.node;if(t){this.prevNextNode=t.nextSibling;var e=t.parentNode;e&&e.appendChild(t)}},toPrevious:function(){var t=this.node;t&&this.prevNextNode&&(t=t.parentNode)&&t.insertBefore(this.prevNextNode,null)},toBack:function(){var t=this.node;if(t){this.prevNextNode=t.nextSibling;var e=t.parentNode;if(e){var i=e.firstChild;i&&e.insertBefore(t,i)}}},mouseover:function(t){this.R.addListener(this,"mouseover",t);return this},mouseout:function(t){this.R.addListener(this,"mouseout",t);return this},click:function(t){this.R.addListener(this,"click",t);return this},dblclick:function(t){this.R.addListener(this,"dblclick",t);return this},mousedown:function(t){this.R.addListener(this,"mousedown",t);return this},mouseup:function(t){this.R.addListener(this,"mouseup",t);return this},touchmove:function(t){this.R.addListener(this,"touchmove",t);return this},touchstart:function(t){this.R.addListener(this,"touchstart",t);return this},touchend:function(t){this.R.addListener(this,"touchend",t);return this},keyup:function(t){this.R.addListener(this,"keyup",t);return this},focus:function(t){this.R.addListener(this,"focus",t);return this},blur:function(t){this.R.addListener(this,"blur",t);return this},contextmenu:function(t){this.node.addEventListener?this.node.addEventListener("contextmenu",t,!0):this.R.addListener(this,"contextmenu",t);return this},stop:function(){t.removeFromArray(this.R.animations,this.an_translate);t.removeFromArray(this.R.animations,this.an_y);t.removeFromArray(this.R.animations,this.an_x)},length:function(){return this.node.childNodes.length},gradient:function(t,e,i){this.R.gradient(this,t,e,i)},pattern:function(t,e,i){t&&this.R.pattern(this,t,e,i)}})})();(function(){var t=window.AmCharts;t.VMLRenderer=t.Class({construct:function(t,e){this.chart=e;this.D=t;this.cNames={circle:"oval",ellipse:"oval",rect:"roundrect",path:"shape"};this.styleMap={x:"left",y:"top",width:"width",height:"height","font-family":"fontFamily","font-size":"fontSize",visibility:"visibility"}},create:function(t,e){var i;if("group"==e)i=document.createElement("div"),t.type="div";else if("text"==e)i=document.createElement("div"),t.type="text";else if("image"==e)i=document.createElement("img"),t.type="image";else{t.type="shape";t.shapeType=this.cNames[e];i=document.createElement("amvml:"+this.cNames[e]);var s=document.createElement("amvml:stroke");i.appendChild(s);t.stroke=s;var a=document.createElement("amvml:fill");i.appendChild(a);t.fill=a;a.className="amvml";s.className="amvml";i.className="amvml"}i.style.position="absolute";i.style.top=0;i.style.left=0;return i},path:function(t,e){t.node.setAttribute("src",e)},setAttr:function(e,i,s){if(void 0!==s){var a;8===document.documentMode&&(a=!0);var h=e.node,r=e.type,n=h.style;"r"==i&&(n.width=2*s,n.height=2*s);"oval"==e.shapeType&&("rx"==i&&(n.width=2*s),"ry"==i&&(n.height=2*s));"roundrect"==e.shapeType&&("width"!=i&&"height"!=i||--s);"cursor"==i&&(n.cursor=s);"cx"==i&&(n.left=s-t.removePx(n.width)/2);"cy"==i&&(n.top=s-t.removePx(n.height)/2);var o=this.styleMap[i];"width"==o&&0>s&&(s=0);void 0!==o&&(n[o]=s);"text"==r&&("text-anchor"==i&&(e.anchor=s,o=h.clientWidth,"end"==s&&(n.marginLeft=-o+"px"),"middle"==s&&(n.marginLeft=-(o/2)+"px",n.textAlign="center"),"start"==s&&(n.marginLeft="0px")),"fill"==i&&(n.color=s),"font-weight"==i&&(n.fontWeight=s));if(n=e.children)for(o=0;o<n.length;o++)n[o].setAttr(i,s);if("shape"==r){"cs"==i&&(h.style.width="100px",h.style.height="100px",h.setAttribute("coordsize",s));"d"==i&&h.setAttribute("path",this.svgPathToVml(s));"dd"==i&&h.setAttribute("path",s);r=e.stroke;e=e.fill;"stroke"==i&&(a?r.color=s:r.setAttribute("color",s));"stroke-width"==i&&(a?r.weight=s:r.setAttribute("weight",s));"stroke-opacity"==i&&(a?r.opacity=s:r.setAttribute("opacity",s));"stroke-dasharray"==i&&(n="solid",0<s&&3>s&&(n="dot"),3<=s&&6>=s&&(n="dash"),6<s&&(n="longdash"),a?r.dashstyle=n:r.setAttribute("dashstyle",n));if("fill-opacity"==i||"opacity"==i)0===s?a?e.on=!1:e.setAttribute("on",!1):a?e.opacity=s:e.setAttribute("opacity",s);"fill"==i&&(a?e.color=s:e.setAttribute("color",s));"rx"==i&&(a?h.arcSize=s+"%":h.setAttribute("arcsize",s+"%"))}}},attr:function(t,e){for(var i in e)e.hasOwnProperty(i)&&this.setAttr(t,i,e[i])},text:function(e,i,s){var a=new t.AmDObject("text",this.D),h=a.node;h.style.whiteSpace="pre";h.innerHTML=e;this.D.addToContainer(h,s);this.attr(a,i);return a},getBBox:function(t){return this.getBox(t.node)},getBox:function(t){var e=t.offsetLeft,i=t.offsetTop,s=t.offsetWidth,a=t.offsetHeight,h;if(t.hasChildNodes()){var r,n,o;for(o=0;o<t.childNodes.length;o++){h=this.getBox(t.childNodes[o]);var l=h.x;isNaN(l)||(isNaN(r)?r=l:l<r&&(r=l));var d=h.y;isNaN(d)||(isNaN(n)?n=d:d<n&&(n=d));l=h.width+l;isNaN(l)||(s=Math.max(s,l));h=h.height+d;isNaN(h)||(a=Math.max(a,h))}0>r&&(e+=r);0>n&&(i+=n)}return{x:e,y:i,width:s,height:a}},setText:function(t,e){var i=t.node;i&&(i.innerHTML=e);this.setAttr(t,"text-anchor",t.anchor)},addListener:function(t,e,i){t.node["on"+e]=i},move:function(e,i,s){var a=e.node,h=a.style;"text"==e.type&&(s-=t.removePx(h.fontSize)/2-1);"oval"==e.shapeType&&(i-=t.removePx(h.width)/2,s-=t.removePx(h.height)/2);e=e.bw;isNaN(e)||(i-=e,s-=e);isNaN(i)||isNaN(s)||(a.style.left=i+"px",a.style.top=s+"px")},svgPathToVml:function(t){var e=t.split(" ");t="";var i,s=Math.round,a;for(a=0;a<e.length;a++){var h=e[a],r=h.substring(0,1),h=h.substring(1),n=h.split(","),o=s(n[0])+","+s(n[1]);"M"==r&&(t+=" m "+o);"L"==r&&(t+=" l "+o);"Z"==r&&(t+=" x e");if("Q"==r){var l=i.length,d=i[l-1],u=n[0],c=n[1],o=n[2],p=n[3];i=s(i[l-2]/3+2/3*u);d=s(d/3+2/3*c);u=s(2/3*u+o/3);c=s(2/3*c+p/3);t+=" c "+i+","+d+","+u+","+c+","+o+","+p}"C"==r&&(t+=" c "+n[0]+","+n[1]+","+n[2]+","+n[3]+","+n[4]+","+n[5]);"A"==r&&(t+=" wa "+h);"B"==r&&(t+=" at "+h);i=n}return t},animate:function(t,e,i,s,a){var h=t.node,r=this.chart;t.animationFinished=!1;if("translate"==e){e=i.split(",");i=e[1];var n=h.offsetTop;r.animate(t,"left",h.offsetLeft,e[0],s,a,"px");r.animate(t,"top",n,i,s,a,"px")}},clipRect:function(t,e,i,s,a){t=t.node;0===e&&0===i?(t.style.width=s+"px",t.style.height=a+"px",t.style.overflow="hidden"):t.style.clip="rect("+i+"px "+(e+s)+"px "+(i+a)+"px "+e+"px)"},rotate:function(e,i,s){if(0!==Number(i)){var a=e.node;e=a.style;s||(s=this.getBGColor(a.parentNode));e.backgroundColor=s;e.paddingLeft=1;s=i*Math.PI/180;var h=Math.cos(s),r=Math.sin(s),n=t.removePx(e.left),o=t.removePx(e.top),l=a.offsetWidth,a=a.offsetHeight;i/=Math.abs(i);e.left=n+l/2-l/2*Math.cos(s)-i*a/2*Math.sin(s)+3;e.top=o-i*l/2*Math.sin(s)+i*a/2*Math.sin(s);e.cssText=e.cssText+"; filter:progid:DXImageTransform.Microsoft.Matrix(M11='"+h+"', M12='"+-r+"', M21='"+r+"', M22='"+h+"', sizingmethod='auto expand');"}},getBGColor:function(t){var e="#FFFFFF";if(t.style){var i=t.style.backgroundColor;""!==i?e=i:t.parentNode&&(e=this.getBGColor(t.parentNode))}return e},set:function(e){var i=new t.AmDObject("group",this.D);this.D.container.appendChild(i.node);if(e){var s;for(s=0;s<e.length;s++)i.push(e[s])}return i},gradient:function(t,e,i,s){var a="";"radialGradient"==e&&(e="gradientradial",i.reverse());"linearGradient"==e&&(e="gradient");var h;for(h=0;h<i.length;h++)a+=Math.round(100*h/(i.length-1))+"% "+i[h],h<i.length-1&&(a+=",");t=t.fill;90==s?s=0:270==s?s=180:180==s?s=90:0===s&&(s=270);8===document.documentMode?(t.type=e,t.angle=s):(t.setAttribute("type",e),t.setAttribute("angle",s));a&&(t.colors.value=a)},remove:function(t){t.clipPath&&this.D.remove(t.clipPath);this.D.remove(t.node)},disableSelection:function(t){t.onselectstart=function(){return!1};t.style.cursor="default"},pattern:function(e,i,s,a){s=e.node;e=e.fill;var h="none";i.color&&(h=i.color);s.fillColor=h;i=i.url;t.isAbsolute(i)||(i=a+i);8===document.documentMode?(e.type="tile",e.src=i):(e.setAttribute("type","tile"),e.setAttribute("src",i))},update:function(){}})})();(function(){var t=window.AmCharts;t.SVGRenderer=t.Class({construct:function(t){this.D=t;this.animations=[]},create:function(e,i){return document.createElementNS(t.SVG_NS,i)},attr:function(t,e){for(var i in e)e.hasOwnProperty(i)&&this.setAttr(t,i,e[i])},setAttr:function(t,e,i){void 0!==i&&t.node.setAttribute(e,i)},animate:function(e,i,s,a,h){e.animationFinished=!1;var r=e.node;e["an_"+i]&&t.removeFromArray(this.animations,e["an_"+i]);"translate"==i?(r=(r=r.getAttribute("transform"))?String(r).substring(10,r.length-1):"0,0",r=r.split(", ").join(" "),r=r.split(" ").join(","),0===r&&(r="0,0")):r=Number(r.getAttribute(i));s={obj:e,frame:0,attribute:i,from:r,to:s,time:a,effect:h};this.animations.push(s);e["an_"+i]=s},update:function(){var e,i=this.animations;for(e=i.length-1;0<=e;e--){var s=i[e],a=s.time*t.updateRate,h=s.frame+1,r=s.obj,n=s.attribute,o,l,d;if(h<=a){s.frame++;if("translate"==n){o=s.from.split(",");n=Number(o[0]);o=Number(o[1]);isNaN(o)&&(o=0);l=s.to.split(",");d=Number(l[0]);l=Number(l[1]);d=0===d-n?d:Math.round(t[s.effect](0,h,n,d-n,a));s=0===l-o?l:Math.round(t[s.effect](0,h,o,l-o,a));n="transform";if(isNaN(d)||isNaN(s))continue;s="translate("+d+","+s+")"}else l=Number(s.from),o=Number(s.to),d=o-l,s=t[s.effect](0,h,l,d,a),isNaN(s)&&(s=o),0===d&&this.animations.splice(e,1);this.setAttr(r,n,s)}else"translate"==n?(l=s.to.split(","),d=Number(l[0]),l=Number(l[1]),r.translate(d,l)):(o=Number(s.to),this.setAttr(r,n,o)),r.animationFinished=!0,this.animations.splice(e,1)}},getBBox:function(t){if(t=t.node)try{return t.getBBox()}catch(e){}return{width:0,height:0,x:0,y:0}},path:function(e,i){e.node.setAttributeNS(t.SVG_XLINK,"xlink:href",i)},clipRect:function(e,i,s,a,h){var r=e.node,n=e.clipPath;n&&this.D.remove(n);var o=r.parentNode;o&&(r=document.createElementNS(t.SVG_NS,"clipPath"),n=t.getUniqueId(),r.setAttribute("id",n),this.D.rect(i,s,a,h,0,0,r),o.appendChild(r),i="#",t.baseHref&&!t.isIE&&(i=this.removeTarget(window.location.href)+i),this.setAttr(e,"clip-path","url("+i+n+")"),this.clipPathC++,e.clipPath=r)},text:function(e,i,s){var a=new t.AmDObject("text",this.D);e=String(e).split("\n");var h=t.removePx(i["font-size"]),r;for(r=0;r<e.length;r++){var n=this.create(null,"tspan");n.appendChild(document.createTextNode(e[r]));n.setAttribute("y",(h+2)*r+Math.round(h/2));n.setAttribute("x",0);a.node.appendChild(n)}a.node.setAttribute("y",Math.round(h/2));this.attr(a,i);this.D.addToContainer(a.node,s);return a},setText:function(t,e){var i=t.node;i&&(i.removeChild(i.firstChild),i.appendChild(document.createTextNode(e)))},move:function(t,e,i,s){isNaN(e)&&(e=0);isNaN(i)&&(i=0);e="translate("+e+","+i+")";s&&(e=e+" scale("+s+")");this.setAttr(t,"transform",e)},rotate:function(t,e){var i=t.node.getAttribute("transform"),s="rotate("+e+")";i&&(s=i+" "+s);this.setAttr(t,"transform",s)},set:function(e){var i=new t.AmDObject("g",this.D);this.D.container.appendChild(i.node);if(e){var s;for(s=0;s<e.length;s++)i.push(e[s])}return i},addListener:function(t,e,i){t.node["on"+e]=i},gradient:function(e,i,s,a){var h=e.node,r=e.grad;r&&this.D.remove(r);i=document.createElementNS(t.SVG_NS,i);r=t.getUniqueId();i.setAttribute("id",r);if(!isNaN(a)){var n=0,o=0,l=0,d=0;90==a?l=100:270==a?d=100:180==a?n=100:0===a&&(o=100);i.setAttribute("x1",n+"%");i.setAttribute("x2",o+"%");i.setAttribute("y1",l+"%");i.setAttribute("y2",d+"%")}for(a=0;a<s.length;a++)n=document.createElementNS(t.SVG_NS,"stop"),o=100*a/(s.length-1),0===a&&(o=0),n.setAttribute("offset",o+"%"),n.setAttribute("stop-color",s[a]),i.appendChild(n);h.parentNode.appendChild(i);s="#";t.baseHref&&!t.isIE&&(s=this.removeTarget(window.location.href)+s);h.setAttribute("fill","url("+s+r+")");e.grad=i},removeTarget:function(t){return t.split("#")[0]},pattern:function(e,i,s,a){var h=e.node;isNaN(s)&&(s=1);var r=e.patternNode;r&&this.D.remove(r);var r=document.createElementNS(t.SVG_NS,"pattern"),n=t.getUniqueId(),o=i;i.url&&(o=i.url);t.isAbsolute(o)||-1!=o.indexOf("data:image")||(o=a+o);a=Number(i.width);isNaN(a)&&(a=4);var l=Number(i.height);isNaN(l)&&(l=4);a/=s;l/=s;s=i.x;isNaN(s)&&(s=0);var d=-Math.random()*Number(i.randomX);isNaN(d)||(s=d);d=i.y;isNaN(d)&&(d=0);var u=-Math.random()*Number(i.randomY);isNaN(u)||(d=u);r.setAttribute("id",n);r.setAttribute("width",a);r.setAttribute("height",l);r.setAttribute("patternUnits","userSpaceOnUse");r.setAttribute("xlink:href",o);i.color&&(u=document.createElementNS(t.SVG_NS,"rect"),u.setAttributeNS(null,"height",a),u.setAttributeNS(null,"width",l),u.setAttributeNS(null,"fill",i.color),r.appendChild(u));this.D.image(o,0,0,a,l,r).translate(s,d);o="#";t.baseHref&&!t.isIE&&(o=this.removeTarget(window.location.href)+o);h.setAttribute("fill","url("+o+n+")");e.patternNode=r;h.parentNode.appendChild(r)},remove:function(t){t.clipPath&&this.D.remove(t.clipPath);t.grad&&this.D.remove(t.grad);t.patternNode&&this.D.remove(t.patternNode);this.D.remove(t.node)}})})();(function(){var t=window.AmCharts;t.AmLegend=t.Class({construct:function(e){this.enabled=!0;this.cname="AmLegend";this.createEvents("rollOverMarker","rollOverItem","rollOutMarker","rollOutItem","showItem","hideItem","clickMarker","clickLabel");this.position="bottom";this.borderColor=this.color="#000000";this.borderAlpha=0;this.markerLabelGap=5;this.verticalGap=10;this.align="left";this.horizontalGap=0;this.spacing=10;this.markerDisabledColor="#AAB3B3";this.markerType="square";this.markerSize=16;this.markerBorderThickness=this.markerBorderAlpha=1;this.marginBottom=this.marginTop=0;this.marginLeft=this.marginRight=20;this.autoMargins=!0;this.valueWidth=50;this.switchable=!0;this.switchType="x";this.switchColor="#FFFFFF";this.rollOverColor="#CC0000";this.reversedOrder=!1;this.labelText="[[title]]";this.valueText="[[value]]";this.accessibleLabel="[[title]]";this.useMarkerColorForLabels=!1;this.rollOverGraphAlpha=1;this.textClickEnabled=!1;this.equalWidths=!0;this.backgroundColor="#FFFFFF";this.backgroundAlpha=0;this.useGraphSettings=!1;this.showEntries=!0;this.labelDx=0;t.applyTheme(this,e,this.cname)},setData:function(t){this.legendData=t;this.invalidateSize()},invalidateSize:function(){this.destroy();this.entries=[];this.valueLabels=[];var e=this.legendData;this.enabled&&(t.ifArray(e)||t.ifArray(this.data))&&this.drawLegend()},drawLegend:function(){var e=this.chart,i=this.position,s=this.width,a=e.divRealWidth,h=e.divRealHeight,r=this.div,n=this.legendData;this.data&&(n=this.combineLegend?this.legendData.concat(this.data):this.data);isNaN(this.fontSize)&&(this.fontSize=e.fontSize);this.maxColumnsReal=this.maxColumns;if("right"==i||"left"==i)this.maxColumnsReal=1,this.autoMargins&&(this.marginLeft=this.marginRight=10);else if(this.autoMargins){this.marginRight=e.marginRight;this.marginLeft=e.marginLeft;var o=e.autoMarginOffset;"bottom"==i?(this.marginBottom=o,this.marginTop=0):(this.marginTop=o,this.marginBottom=0)}s=void 0!==s?t.toCoordinate(s,a):"right"!=i&&"left"!=i?e.realWidth:0<this.ieW?this.ieW:e.realWidth;"outside"==i?(s=r.offsetWidth,h=r.offsetHeight,r.clientHeight&&(s=r.clientWidth,h=r.clientHeight)):(isNaN(s)||(r.style.width=s+"px"),r.className="amChartsLegend "+e.classNamePrefix+"-legend-div");this.divWidth=s;(i=this.container)?(i.container.innerHTML="",r.appendChild(i.container),i.width=s,i.height=h,i.setSize(s,h),i.addDefs(e)):i=new t.AmDraw(r,s,h,e);this.container=i;this.lx=0;this.ly=8;h=this.markerSize;h>this.fontSize&&(this.ly=h/2-1);0<h&&(this.lx+=h+this.markerLabelGap);this.titleWidth=0;if(h=this.title)h=t.text(this.container,h,this.color,e.fontFamily,this.fontSize,"start",!0),t.setCN(e,h,"legend-title"),h.translate(this.marginLeft,this.marginTop+this.verticalGap+this.ly+1),e=h.getBBox(),this.titleWidth=e.width+15,this.titleHeight=e.height+6;this.index=this.maxLabelWidth=0;if(this.showEntries){for(e=0;e<n.length;e++)this.createEntry(n[e]);for(e=this.index=0;e<n.length;e++)this.createValue(n[e])}this.arrangeEntries();this.updateValues()},arrangeEntries:function(){var e=this.position,i=this.marginLeft+this.titleWidth,s=this.marginRight,a=this.marginTop,h=this.marginBottom,r=this.horizontalGap,n=this.div,o=this.divWidth,l=this.maxColumnsReal,d=this.verticalGap,u=this.spacing,c=o-s-i,p=0,m=0,f=this.container; this.set&&this.set.remove();var g=f.set();this.set=g;var v=f.set();g.push(v);var b=this.entries,x,N;for(N=0;N<b.length;N++){x=b[N].getBBox();var C=x.width;C>p&&(p=C);x=x.height;x>m&&(m=x)}var C=m=0,y=r,w=0,M=0;for(N=0;N<b.length;N++){var A=b[N];this.reversedOrder&&(A=b[b.length-N-1]);x=A.getBBox();var S;this.equalWidths?S=C*(p+u+this.markerLabelGap):(S=y,y=y+x.width+r+u);S+x.width>c&&0<N&&0!==C&&(m++,S=C=0,y=S+x.width+r+u,w=w+M+d,M=0);x.height>M&&(M=x.height);A.translate(S,w);C++;!isNaN(l)&&C>=l&&(C=0,m++,w=w+M+d,y=r,M=0);v.push(A)}x=v.getBBox();l=x.height+2*d-1;"left"==e||"right"==e?(u=x.width+2*r,o=u+i+s,n.style.width=o+"px",this.ieW=o):u=o-i-s-1;s=t.polygon(this.container,[0,u,u,0],[0,0,l,l],this.backgroundColor,this.backgroundAlpha,1,this.borderColor,this.borderAlpha);t.setCN(this.chart,s,"legend-bg");g.push(s);g.translate(i,a);s.toBack();i=r;if("top"==e||"bottom"==e||"absolute"==e||"outside"==e)"center"==this.align?i=r+(u-x.width)/2:"right"==this.align&&(i=r+u-x.width);v.translate(i,d+1);this.titleHeight>l&&(l=this.titleHeight);a=l+a+h+1;0>a&&(a=0);"absolute"!=e&&"outside"!=e&&a>this.chart.divRealHeight&&(n.style.top="0px");n.style.height=Math.round(a)+"px";f.setSize(this.divWidth,a)},createEntry:function(e){if(!1!==e.visibleInLegend&&!e.hideFromLegend){var i=this,s=i.chart,a=i.useGraphSettings,h=e.markerType;h&&(a=!1);e.legendEntryWidth=i.markerSize;h||(h=i.markerType);var r=e.color,n=e.alpha;e.legendKeyColor&&(r=e.legendKeyColor());e.legendKeyAlpha&&(n=e.legendKeyAlpha());var o;!0===e.hidden&&(o=r=i.markerDisabledColor);var l=e.pattern,d,u=e.customMarker;u||(u=i.customMarker);var c=i.container,p=i.markerSize,m=0,f=0,g=p/2;if(a){a=e.type;i.switchType=void 0;if("line"==a||"step"==a||"smoothedLine"==a||"ohlc"==a)d=c.set(),e.hidden||(r=e.lineColorR,o=e.bulletBorderColorR),m=t.line(c,[0,2*p],[p/2,p/2],r,e.lineAlpha,e.lineThickness,e.dashLength),t.setCN(s,m,"graph-stroke"),d.push(m),e.bullet&&(e.hidden||(r=e.bulletColorR),m=t.bullet(c,e.bullet,e.bulletSize,r,e.bulletAlpha,e.bulletBorderThickness,o,e.bulletBorderAlpha))&&(t.setCN(s,m,"graph-bullet"),m.translate(p+1,p/2),d.push(m)),g=0,m=p,f=p/3;else{e.getGradRotation&&(d=e.getGradRotation(),0===d&&(d=180));m=e.fillColorsR;!0===e.hidden&&(m=r);if(d=i.createMarker("rectangle",m,e.fillAlphas,e.lineThickness,r,e.lineAlpha,d,l,e.dashLength))g=p,d.translate(g,p/2);m=p}t.setCN(s,d,"graph-"+a);t.setCN(s,d,"graph-"+e.id)}else if(u)d=c.image(u,0,0,p,p);else{var v;isNaN(i.gradientRotation)||(v=180+i.gradientRotation);(d=i.createMarker(h,r,n,void 0,void 0,void 0,v,l))&&d.translate(p/2,p/2)}t.setCN(s,d,"legend-marker");i.addListeners(d,e);c=c.set([d]);i.switchable&&e.switchable&&c.setAttr("cursor","pointer");void 0!==e.id&&t.setCN(s,c,"legend-item-"+e.id);t.setCN(s,c,e.className,!0);o=i.switchType;var b;o&&"none"!=o&&0<p&&("x"==o?(b=i.createX(),b.translate(p/2,p/2)):b=i.createV(),b.dItem=e,!0!==e.hidden?"x"==o?b.hide():b.show():"x"!=o&&b.hide(),i.switchable||b.hide(),i.addListeners(b,e),e.legendSwitch=b,c.push(b),t.setCN(s,b,"legend-switch"));o=i.color;e.showBalloon&&i.textClickEnabled&&void 0!==i.selectedColor&&(o=i.selectedColor);i.useMarkerColorForLabels&&!l&&(o=r);!0===e.hidden&&(o=i.markerDisabledColor);r=t.massReplace(i.labelText,{"[[title]]":e.title});void 0!==i.tabIndex&&(c.setAttr("tabindex",i.tabIndex),c.setAttr("role","menuitem"),c.keyup(function(t){13==t.keyCode&&i.clickMarker(e,t)}));s.accessible&&i.accessibleLabel&&(l=t.massReplace(i.accessibleLabel,{"[[title]]":e.title}),s.makeAccessible(c,l));l=i.fontSize;d&&(p<=l&&(p=p/2+i.ly-l/2+(l+2-p)/2-f,d.translate(g,p),b&&b.translate(b.x,p)),e.legendEntryWidth=d.getBBox().width);var x;r&&(r=t.fixBrakes(r),e.legendTextReal=r,x=i.labelWidth,x=isNaN(x)?t.text(i.container,r,o,s.fontFamily,l,"start"):t.wrappedText(i.container,r,o,s.fontFamily,l,"start",!1,x,0),t.setCN(s,x,"legend-label"),x.translate(i.lx+m,i.ly),c.push(x),i.labelDx=m,s=x.getBBox().width,i.maxLabelWidth<s&&(i.maxLabelWidth=s));i.entries[i.index]=c;e.legendEntry=i.entries[i.index];e.legendMarker=d;e.legendLabel=x;i.index++}},addListeners:function(t,e){var i=this;t&&t.mouseover(function(t){i.rollOverMarker(e,t)}).mouseout(function(t){i.rollOutMarker(e,t)}).click(function(t){i.clickMarker(e,t)})},rollOverMarker:function(t,e){this.switchable&&this.dispatch("rollOverMarker",t,e);this.dispatch("rollOverItem",t,e)},rollOutMarker:function(t,e){this.switchable&&this.dispatch("rollOutMarker",t,e);this.dispatch("rollOutItem",t,e)},clickMarker:function(t,e){this.switchable&&(!0===t.hidden?this.dispatch("showItem",t,e):this.dispatch("hideItem",t,e));this.dispatch("clickMarker",t,e)},rollOverLabel:function(t,e){t.hidden||this.textClickEnabled&&t.legendLabel&&t.legendLabel.attr({fill:this.rollOverColor});this.dispatch("rollOverItem",t,e)},rollOutLabel:function(t,e){if(!t.hidden&&this.textClickEnabled&&t.legendLabel){var i=this.color;void 0!==this.selectedColor&&t.showBalloon&&(i=this.selectedColor);this.useMarkerColorForLabels&&(i=t.lineColor,void 0===i&&(i=t.color));t.legendLabel.attr({fill:i})}this.dispatch("rollOutItem",t,e)},clickLabel:function(t,e){this.textClickEnabled?t.hidden||this.dispatch("clickLabel",t,e):this.switchable&&(!0===t.hidden?this.dispatch("showItem",t,e):this.dispatch("hideItem",t,e))},dispatch:function(t,e,i){t={type:t,dataItem:e,target:this,event:i,chart:this.chart};this.chart&&this.chart.handleLegendEvent(t);this.fire(t)},createValue:function(e){var i=this,s=i.fontSize,a=i.chart;if(!1!==e.visibleInLegend&&!e.hideFromLegend){var h=i.maxLabelWidth;i.forceWidth&&(h=i.labelWidth);i.equalWidths||(i.valueAlign="left");"left"==i.valueAlign&&e.legendLabel&&(h=e.legendLabel.getBBox().width);var r=h;if(i.valueText&&0<i.valueWidth){var n=i.color;i.useMarkerColorForValues&&(n=e.color,e.legendKeyColor&&(n=e.legendKeyColor()));!0===e.hidden&&(n=i.markerDisabledColor);var o=i.valueText,h=h+i.lx+i.labelDx+i.markerLabelGap+i.valueWidth,l="end";"left"==i.valueAlign&&(h-=i.valueWidth,l="start");n=t.text(i.container,o,n,i.chart.fontFamily,s,l);t.setCN(a,n,"legend-value");n.translate(h,i.ly);i.entries[i.index].push(n);r+=i.valueWidth+2*i.markerLabelGap;n.dItem=e;i.valueLabels.push(n)}i.index++;a=i.markerSize;a<s+7&&(a=s+7,t.VML&&(a+=3));s=i.container.rect(e.legendEntryWidth,0,r,a,0,0).attr({stroke:"none",fill:"#fff","fill-opacity":.005});s.dItem=e;i.entries[i.index-1].push(s);s.mouseover(function(t){i.rollOverLabel(e,t)}).mouseout(function(t){i.rollOutLabel(e,t)}).click(function(t){i.clickLabel(e,t)})}},createV:function(){var e=this.markerSize;return t.polygon(this.container,[e/5,e/2,e-e/5,e/2],[e/3,e-e/5,e/5,e/1.7],this.switchColor)},createX:function(){var e=(this.markerSize-4)/2,i={stroke:this.switchColor,"stroke-width":3},s=this.container,a=t.line(s,[-e,e],[-e,e]).attr(i),e=t.line(s,[-e,e],[e,-e]).attr(i);return this.container.set([a,e])},createMarker:function(e,i,s,a,h,r,n,o,l){var d=this.markerSize,u=this.container;h||(h=this.markerBorderColor);h||(h=i);isNaN(a)&&(a=this.markerBorderThickness);isNaN(r)&&(r=this.markerBorderAlpha);return t.bullet(u,e,d,i,s,a,h,r,d,n,o,this.chart.path,l)},validateNow:function(){this.invalidateSize()},updateValues:function(){var e=this.valueLabels,i=this.chart,s,a=this.data;if(e)for(s=0;s<e.length;s++){var h=e[s],r=h.dItem;r.periodDataItem=void 0;r.periodPercentDataItem=void 0;var n=" ";if(a)r.value?h.text(r.value):h.text("");else{var o=null;if(void 0!==r.type){var o=r.currentDataItem,l=this.periodValueText;r.legendPeriodValueText&&(l=r.legendPeriodValueText);r.legendPeriodValueTextR&&(l=r.legendPeriodValueTextR);o?(n=this.valueText,r.legendValueText&&(n=r.legendValueText),n=i.formatString(n,o)):l&&i.formatPeriodString&&(l=t.massReplace(l,{"[[title]]":r.title}),n=i.formatPeriodString(l,r))}else n=i.formatString(this.valueText,r);l=r;o&&(l=o);var d=this.valueFunction;d&&(n=d(l,n,i.periodDataItem));var u;this.useMarkerColorForLabels&&!o&&r.lastDataItem&&(o=r.lastDataItem);o?u=i.getBalloonColor(r,o):r.legendKeyColor&&(u=r.legendKeyColor());r.legendColorFunction&&(u=r.legendColorFunction(l,n,r.periodDataItem,r.periodPercentDataItem));h.text(n);if(!r.pattern&&(this.useMarkerColorForValues&&h.setAttr("fill",u),this.useMarkerColorForLabels)){if(h=r.legendMarker)h.setAttr("fill",u),h.setAttr("stroke",u);(r=r.legendLabel)&&r.setAttr("fill",u)}}}},renderFix:function(){if(!t.VML&&this.enabled){var e=this.container;e&&e.renderFix()}},destroy:function(){this.div.innerHTML="";t.remove(this.set)}})})();(function(){var t=window.AmCharts;t.formatMilliseconds=function(t,e){if(-1!=t.indexOf("fff")){var i=e.getMilliseconds(),s=String(i);10>i&&(s="00"+i);10<=i&&100>i&&(s="0"+i);t=t.replace(/fff/g,s)}return t};t.extractPeriod=function(e){var i=t.stripNumbers(e),s=1;i!=e&&(s=Number(e.slice(0,e.indexOf(i))));return{period:i,count:s}};t.getDate=function(e,i,s){return e instanceof Date?t.newDate(e,s):i&&isNaN(e)?t.stringToDate(e,i):new Date(e)};t.daysInMonth=function(t){return new Date(t.getYear(),t.getMonth()+1,0).getDate()};t.newDate=function(t,e){return e&&-1==e.indexOf("fff")?new Date(t):new Date(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds())};t.resetDateToMin=function(e,i,s,a){void 0===a&&(a=1);var h,r,n,o,l,d,u;t.useUTC?(h=e.getUTCFullYear(),r=e.getUTCMonth(),n=e.getUTCDate(),o=e.getUTCHours(),l=e.getUTCMinutes(),d=e.getUTCSeconds(),u=e.getUTCMilliseconds(),e=e.getUTCDay()):(h=e.getFullYear(),r=e.getMonth(),n=e.getDate(),o=e.getHours(),l=e.getMinutes(),d=e.getSeconds(),u=e.getMilliseconds(),e=e.getDay());switch(i){case"YYYY":h=Math.floor(h/s)*s;r=0;n=1;u=d=l=o=0;break;case"MM":r=Math.floor(r/s)*s;n=1;u=d=l=o=0;break;case"WW":n=e>=a?n-e+a:n-(7+e)+a;u=d=l=o=0;break;case"DD":u=d=l=o=0;break;case"hh":o=Math.floor(o/s)*s;u=d=l=0;break;case"mm":l=Math.floor(l/s)*s;u=d=0;break;case"ss":d=Math.floor(d/s)*s;u=0;break;case"fff":u=Math.floor(u/s)*s}t.useUTC?(e=new Date,e.setUTCFullYear(h,r,n),e.setUTCHours(o,l,d,u)):e=new Date(h,r,n,o,l,d,u);return e};t.getPeriodDuration=function(t,e){void 0===e&&(e=1);var i;switch(t){case"YYYY":i=316224e5;break;case"MM":i=26784e5;break;case"WW":i=6048e5;break;case"DD":i=864e5;break;case"hh":i=36e5;break;case"mm":i=6e4;break;case"ss":i=1e3;break;case"fff":i=1}return i*e};t.intervals={s:{nextInterval:"ss",contains:1e3},ss:{nextInterval:"mm",contains:60,count:0},mm:{nextInterval:"hh",contains:60,count:1},hh:{nextInterval:"DD",contains:24,count:2},DD:{nextInterval:"",contains:Infinity,count:3}};t.getMaxInterval=function(e,i){var s=t.intervals;return e>=s[i].contains?(e=Math.round(e/s[i].contains),i=s[i].nextInterval,t.getMaxInterval(e,i)):"ss"==i?s[i].nextInterval:i};t.dayNames="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ");t.shortDayNames="Sun Mon Tue Wed Thu Fri Sat".split(" ");t.monthNames="January February March April May June July August September October November December".split(" ");t.shortMonthNames="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ");t.getWeekNumber=function(t){t=new Date(t);t.setHours(0,0,0);t.setDate(t.getDate()+4-(t.getDay()||7));var e=new Date(t.getFullYear(),0,1);return Math.ceil(((t-e)/864e5+1)/7)};t.stringToDate=function(e,i){var s={},a=[{pattern:"YYYY",period:"year"},{pattern:"YY",period:"year"},{pattern:"MM",period:"month"},{pattern:"M",period:"month"},{pattern:"DD",period:"date"},{pattern:"D",period:"date"},{pattern:"JJ",period:"hours"},{pattern:"J",period:"hours"},{pattern:"HH",period:"hours"},{pattern:"H",period:"hours"},{pattern:"KK",period:"hours"},{pattern:"K",period:"hours"},{pattern:"LL",period:"hours"},{pattern:"L",period:"hours"},{pattern:"NN",period:"minutes"},{pattern:"N",period:"minutes"},{pattern:"SS",period:"seconds"},{pattern:"S",period:"seconds"},{pattern:"QQQ",period:"milliseconds"},{pattern:"QQ",period:"milliseconds"},{pattern:"Q",period:"milliseconds"}],h=!0,r=i.indexOf("AA");-1!=r&&(e.substr(r,2),"pm"==e.toLowerCase&&(h=!1));var r=i,n,o,l;for(l=0;l<a.length;l++)o=a[l].period,s[o]=0,"date"==o&&(s[o]=1);for(l=0;l<a.length;l++)if(n=a[l].pattern,o=a[l].period,-1!=i.indexOf(n)){var d=t.getFromDateString(n,e,r);i=i.replace(n,"");if("KK"==n||"K"==n||"LL"==n||"L"==n)h||(d+=12);s[o]=d}t.useUTC?(a=new Date,a.setUTCFullYear(s.year,s.month,s.date),a.setUTCHours(s.hours,s.minutes,s.seconds,s.milliseconds)):a=new Date(s.year,s.month,s.date,s.hours,s.minutes,s.seconds,s.milliseconds);return a};t.getFromDateString=function(t,e,i){if(void 0!==e)return i=i.indexOf(t),e=String(e),e=e.substr(i,t.length),"0"==e.charAt(0)&&(e=e.substr(1,e.length-1)),e=Number(e),isNaN(e)&&(e=0),-1!=t.indexOf("M")&&e--,e};t.formatDate=function(e,i,s){s||(s=t);var a,h,r,n,o,l,d,u,c=t.getWeekNumber(e);t.useUTC?(a=e.getUTCFullYear(),h=e.getUTCMonth(),r=e.getUTCDate(),n=e.getUTCDay(),o=e.getUTCHours(),l=e.getUTCMinutes(),d=e.getUTCSeconds(),u=e.getUTCMilliseconds()):(a=e.getFullYear(),h=e.getMonth(),r=e.getDate(),n=e.getDay(),o=e.getHours(),l=e.getMinutes(),d=e.getSeconds(),u=e.getMilliseconds());var p=String(a).substr(2,2),m="0"+n;i=i.replace(/W/g,c);c=o;24==c&&(c=0);var f=c;10>f&&(f="0"+f);i=i.replace(/JJ/g,f);i=i.replace(/J/g,c);f=o;0===f&&(f=24,-1!=i.indexOf("H")&&(r--,0===r&&(a=new Date(e),a.setDate(a.getDate()-1),h=a.getMonth(),r=a.getDate(),a=a.getFullYear())));e=h+1;9>h&&(e="0"+e);c=r;10>r&&(c="0"+r);var g=f;10>g&&(g="0"+g);i=i.replace(/HH/g,g);i=i.replace(/H/g,f);f=o;11<f&&(f-=12);g=f;10>g&&(g="0"+g);i=i.replace(/KK/g,g);i=i.replace(/K/g,f);f=o;0===f&&(f=12);12<f&&(f-=12);g=f;10>g&&(g="0"+g);i=i.replace(/LL/g,g);i=i.replace(/L/g,f);f=l;10>f&&(f="0"+f);i=i.replace(/NN/g,f);i=i.replace(/N/g,l);l=d;10>l&&(l="0"+l);i=i.replace(/SS/g,l);i=i.replace(/S/g,d);d=u;10>d?d="00"+d:100>d&&(d="0"+d);l=u;10>l&&(l="00"+l);i=i.replace(/A/g,"@A@");i=i.replace(/QQQ/g,d);i=i.replace(/QQ/g,l);i=i.replace(/Q/g,u);i=i.replace(/YYYY/g,"@IIII@");i=i.replace(/YY/g,"@II@");i=i.replace(/MMMM/g,"@XXXX@");i=i.replace(/MMM/g,"@XXX@");i=i.replace(/MM/g,"@XX@");i=i.replace(/M/g,"@X@");i=i.replace(/DD/g,"@RR@");i=i.replace(/D/g,"@R@");i=i.replace(/EEEE/g,"@PPPP@");i=i.replace(/EEE/g,"@PPP@");i=i.replace(/EE/g,"@PP@");i=i.replace(/E/g,"@P@");i=i.replace(/@IIII@/g,a);i=i.replace(/@II@/g,p);i=i.replace(/@XXXX@/g,s.monthNames[h]);i=i.replace(/@XXX@/g,s.shortMonthNames[h]);i=i.replace(/@XX@/g,e);i=i.replace(/@X@/g,h+1);i=i.replace(/@RR@/g,c);i=i.replace(/@R@/g,r);i=i.replace(/@PPPP@/g,s.dayNames[n]);i=i.replace(/@PPP@/g,s.shortDayNames[n]);i=i.replace(/@PP@/g,m);i=i.replace(/@P@/g,n);return i=12>o?i.replace(/@A@/g,s.amString):i.replace(/@A@/g,s.pmString)};t.changeDate=function(e,i,s,a,h){if(t.useUTC)return t.changeUTCDate(e,i,s,a,h);var r=-1;void 0===a&&(a=!0);void 0===h&&(h=!1);!0===a&&(r=1);switch(i){case"YYYY":e.setFullYear(e.getFullYear()+s*r);a||h||e.setDate(e.getDate()+1);break;case"MM":i=e.getMonth();e.setMonth(e.getMonth()+s*r);e.getMonth()>i+s*r&&e.setDate(e.getDate()-1);a||h||e.setDate(e.getDate()+1);break;case"DD":e.setDate(e.getDate()+s*r);break;case"WW":e.setDate(e.getDate()+s*r*7);break;case"hh":e.setHours(e.getHours()+s*r);break;case"mm":e.setMinutes(e.getMinutes()+s*r);break;case"ss":e.setSeconds(e.getSeconds()+s*r);break;case"fff":e.setMilliseconds(e.getMilliseconds()+s*r)}return e};t.changeUTCDate=function(t,e,i,s,a){var h=-1;void 0===s&&(s=!0);void 0===a&&(a=!1);!0===s&&(h=1);switch(e){case"YYYY":t.setUTCFullYear(t.getUTCFullYear()+i*h);s||a||t.setUTCDate(t.getUTCDate()+1);break;case"MM":e=t.getUTCMonth();t.setUTCMonth(t.getUTCMonth()+i*h);t.getUTCMonth()>e+i*h&&t.setUTCDate(t.getUTCDate()-1);s||a||t.setUTCDate(t.getUTCDate()+1);break;case"DD":t.setUTCDate(t.getUTCDate()+i*h);break;case"WW":t.setUTCDate(t.getUTCDate()+i*h*7);break;case"hh":t.setUTCHours(t.getUTCHours()+i*h);break;case"mm":t.setUTCMinutes(t.getUTCMinutes()+i*h);break;case"ss":t.setUTCSeconds(t.getUTCSeconds()+i*h);break;case"fff":t.setUTCMilliseconds(t.getUTCMilliseconds()+i*h)}return t}})(); //# sourceMappingURL=amcharts.map.js