/*
 CanvasJS HTML5 & JavaScript StockCharts - v1.6.2 GA - https://canvasjs.com/ 
 Copyright 2022 fenopix

  --------------------- License Information --------------------
 CanvasJS is a commercial product which requires purchase of license. Without a commercial license you can use it for evaluation purposes for upto 30 days. Please refer to the following link for further details.
     https://canvasjs.com/license/

*/
/*eslint-disable*/
/*jshint ignore:start*/
(function(){function ia(k,A){k.prototype=ob(A.prototype);k.prototype.constructor=k;k.base=A.prototype}function ob(k){function A(){}A.prototype=k;return new A}function bb(k,A,g){"millisecond"===g?k.setMilliseconds(k.getMilliseconds()+1*A):"second"===g?k.setSeconds(k.getSeconds()+1*A):"minute"===g?k.setMinutes(k.getMinutes()+1*A):"hour"===g?k.setHours(k.getHours()+1*A):"day"===g?k.setDate(k.getDate()+1*A):"week"===g?k.setDate(k.getDate()+7*A):"month"===g?k.setMonth(k.getMonth()+1*A):"year"===g&&k.setFullYear(k.getFullYear()+
1*A);return k}function pa(k,A){var g=!1;0>k&&(g=!0,k*=-1);k=""+k;for(A=A?A:1;k.length<A;)k="0"+k;return g?"-"+k:k}function Oa(k){if(!k)return k;k=k.replace(/^\s\s*/,"");for(var A=/\s/,g=k.length;A.test(k.charAt(--g)););return k.slice(0,g+1)}function Ga(k){k.roundRect=function(k,g,u,F,ja,z,r,D){r&&(this.fillStyle=r);D&&(this.strokeStyle=D);"undefined"===typeof ja&&(ja=5);this.lineWidth=z;this.beginPath();this.moveTo(k+ja,g);this.lineTo(k+u-ja,g);this.quadraticCurveTo(k+u,g,k+u,g+ja);this.lineTo(k+
u,g+F-ja);this.quadraticCurveTo(k+u,g+F,k+u-ja,g+F);this.lineTo(k+ja,g+F);this.quadraticCurveTo(k,g+F,k,g+F-ja);this.lineTo(k,g+ja);this.quadraticCurveTo(k,g,k+ja,g);this.closePath();r&&this.fill();D&&0<z&&this.stroke()}}function Wa(k,A){return k-A}function cb(k,A,g){if(k&&A&&g){g=g+"."+A;var u="image/"+A;k=k.toDataURL(u);var F=!1,ja=document.createElement("a");ja.download=g;ja.href=k;if("undefined"!==typeof Blob&&new Blob){for(var z=k.replace(/^data:[a-z\/]*;base64,/,""),z=atob(z),r=new ArrayBuffer(z.length),
r=new Uint8Array(r),D=0;D<z.length;D++)r[D]=z.charCodeAt(D);A=new Blob([r.buffer],{type:"image/"+A});try{window.navigator.msSaveBlob(A,g),F=!0}catch(N){ja.dataset.downloadurl=[u,ja.download,ja.href].join(":"),ja.href=window.URL.createObjectURL(A)}}if(!F)try{event=document.createEvent("MouseEvents"),event.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),ja.dispatchEvent?ja.dispatchEvent(event):ja.fireEvent&&ja.fireEvent("onclick")}catch(G){A=window.open(),A.document.write("<img src='"+
k+"'></img><div>Please right click on the image and save it to your device</div>"),A.document.close()}}}function S(k){var A=((k&16711680)>>16).toString(16),g=((k&65280)>>8).toString(16);k=((k&255)>>0).toString(16);A=2>A.length?"0"+A:A;g=2>g.length?"0"+g:g;k=2>k.length?"0"+k:k;return"#"+A+g+k}function pb(k,A){var g=this.length>>>0,u=Number(A)||0,u=0>u?Math.ceil(u):Math.floor(u);for(0>u&&(u+=g);u<g;u++)if(u in this&&this[u]===k)return u;return-1}function g(k){return null===k||"undefined"===typeof k}
function Da(k){k.indexOf||(k.indexOf=pb);return k}function qb(k){if(ka.fSDec)k[wa("`eeDwdouMhrudods")](wa("e`u`@ohl`uhnoHuds`uhnoDoe"),function(){ka._fTWm&&ka._fTWm(k)})}function db(k,A,g){g=g||"normal";var u=k+"_"+A+"_"+g,F=eb[u];if(isNaN(F)){try{if(!Ea){var ja=document.body;Ea=document.createElement("span");Ea.innerHTML="";var z=document.createTextNode("Mpgyi");Ea.appendChild(z);ja.appendChild(Ea)}Ea.style.display="";O(Ea,{position:"absolute",left:"0px",top:"-20000px",padding:"0px",margin:"0px",
border:"none",whiteSpace:"pre",lineHeight:"normal",fontFamily:k,fontSize:A+"px",fontWeight:g});F=Math.round(Ea.offsetHeight);Ea.style.display="none"}catch(r){F=Math.ceil(1.1*A)}F=Math.max(F,A);eb[u]=F}return F}function R(k,A){var g=[];if(g={solid:[],shortDash:[3,1],shortDot:[1,1],shortDashDot:[3,1,1,1],shortDashDotDot:[3,1,1,1,1,1],dot:[1,2],dash:[4,2],dashDot:[4,2,1,2],longDash:[8,2],longDashDot:[8,2,1,2],longDashDotDot:[8,2,1,2,1,2]}[k||"solid"])for(var u=0;u<g.length;u++)g[u]*=A;else g=[];return g}
function D(k,A,Z,u,F){u=u||[];F=g(F)?rb?{passive:!1,capture:!1}:!1:F;u.push([k,A,Z,F]);return k.addEventListener?(k.addEventListener(A,Z,F),Z):k.attachEvent?(u=function(A){A=A||window.event;A.preventDefault=A.preventDefault||function(){A.returnValue=!1};A.stopPropagation=A.stopPropagation||function(){A.cancelBubble=!0};Z.call(k,A)},k.attachEvent("on"+A,u),u):!1}function fb(k,A,g,u){u=u||!1;if(k.removeEventListener)k.removeEventListener(A,g,u);else if(k.detachEvent)k.detachEvent("on"+A,g);else return!1}
function gb(k,A){if("createEvent"in document){var g=document.createEvent("HTMLEvents");g.initEvent(A,!1,!0);k.dispatchEvent(g)}else k.fireEvent("on"+A)}function hb(k){if(k._menuButton)k.exportEnabled?(O(k._menuButton,{backgroundColor:k.toolbar.itemBackgroundColor,color:k.toolbar.fontColor}),Ra(k._menuButton),k._menuButton.title=k._cultureInfo.menuText):ya(k._menuButton);else if(k.exportEnabled&&u){var A=!1;k._menuButton=document.createElement("button");Ba(k,k._menuButton,"menu");k._toolBar.appendChild(k._menuButton);
D(k._menuButton,"touchstart",function(k){A=!0},k.allDOMEventHandlers);D(k._menuButton,"click",function(){"none"!==k._dropdownMenu.style.display||k._dropDownCloseTime&&500>=(new Date).getTime()-k._dropDownCloseTime.getTime()||(k._dropdownMenu.style.display="block",k._menuButton.blur(),k._dropdownMenu.focus())},k.allDOMEventHandlers,!0);D(k._menuButton,"mousemove",function(){A||(O(k._menuButton,{backgroundColor:k.toolbar.itemBackgroundColorOnHover,color:k.toolbar.fontColorOnHover}),0>=navigator.userAgent.search("MSIE")&&
O(k._menuButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},k.allDOMEventHandlers,!0);D(k._menuButton,"mouseout",function(){A||(O(k._menuButton,{backgroundColor:k.toolbar.itemBackgroundColor,color:k.toolbar.fontColor}),0>=navigator.userAgent.search("MSIE")&&O(k._menuButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}))},k.allDOMEventHandlers,!0)}if(k.exportEnabled&&k._dropdownMenu){O(k._dropdownMenu,{backgroundColor:k.toolbar.itemBackgroundColor,color:k.toolbar.fontColor});
for(var g=k._dropdownMenu.childNodes,L=[k._cultureInfo.printText,k._cultureInfo.saveJPGText,k._cultureInfo.savePNGText],F=0;F<g.length;F++)O(g[F],{backgroundColor:k.toolbar.itemBackgroundColor,color:k.toolbar.fontColor}),g[F].innerHTML=L[F]}else!k._dropdownMenu&&(k.exportEnabled&&u)&&(A=!1,k._dropdownMenu=document.createElement("div"),k._dropdownMenu.setAttribute("tabindex",-1),g=-1!==k.theme.indexOf("dark")?"black":"#888888",O(k._dropdownMenu,{position:"absolute",zIndex:1,userSelect:"none",MozUserSeelct:"none",
WebkitUserSelect:"none",msUserSelect:"none",cursor:"pointer",right:"0px",top:"25px",minWidth:"120px",outline:0,fontSize:"14px",fontFamily:"Arial, Helvetica, sans-serif",padding:"5px 0px 5px 0px",textAlign:"left",lineHeight:"10px",backgroundColor:k.toolbar.itemBackgroundColor,boxShadow:"2px 2px 10px"+g}),k._dropdownMenu.style.display="none",k._toolBar.appendChild(k._dropdownMenu),D(k._dropdownMenu,"blur",function(){ya(k._dropdownMenu);k._dropDownCloseTime=new Date},k.allDOMEventHandlers,!0),g=document.createElement("div"),
O(g,{padding:"12px 8px 12px 8px"}),g.innerHTML=k._cultureInfo.printText,g.style.backgroundColor=k.toolbar.itemBackgroundColor,g.style.color=k.toolbar.fontColor,k._dropdownMenu.appendChild(g),D(g,"touchstart",function(k){A=!0},k.allDOMEventHandlers),D(g,"mousemove",function(){A||(this.style.backgroundColor=k.toolbar.itemBackgroundColorOnHover,this.style.color=k.toolbar.fontColorOnHover)},k.allDOMEventHandlers,!0),D(g,"mouseout",function(){A||(this.style.backgroundColor=k.toolbar.itemBackgroundColor,
this.style.color=k.toolbar.fontColor)},k.allDOMEventHandlers,!0),D(g,"click",function(){k.print();ya(k._dropdownMenu)},k.allDOMEventHandlers,!0),g=document.createElement("div"),O(g,{padding:"12px 8px 12px 8px"}),g.innerHTML=k._cultureInfo.saveJPGText,g.style.backgroundColor=k.toolbar.itemBackgroundColor,g.style.color=k.toolbar.fontColor,k._dropdownMenu.appendChild(g),D(g,"touchstart",function(k){A=!0},k.allDOMEventHandlers),D(g,"mousemove",function(){A||(this.style.backgroundColor=k.toolbar.itemBackgroundColorOnHover,
this.style.color=k.toolbar.fontColorOnHover)},k.allDOMEventHandlers,!0),D(g,"mouseout",function(){A||(this.style.backgroundColor=k.toolbar.itemBackgroundColor,this.style.color=k.toolbar.fontColor)},k.allDOMEventHandlers,!0),D(g,"click",function(){k.exportChart({format:"jpeg",fileName:k.exportFileName});ya(k._dropdownMenu)},k.allDOMEventHandlers,!0),g=document.createElement("div"),O(g,{padding:"12px 8px 12px 8px"}),g.innerHTML=k._cultureInfo.savePNGText,g.style.backgroundColor=k.toolbar.itemBackgroundColor,
g.style.color=k.toolbar.fontColor,k._dropdownMenu.appendChild(g),D(g,"touchstart",function(k){A=!0},k.allDOMEventHandlers),D(g,"mousemove",function(){A||(this.style.backgroundColor=k.toolbar.itemBackgroundColorOnHover,this.style.color=k.toolbar.fontColorOnHover)},k.allDOMEventHandlers,!0),D(g,"mouseout",function(){A||(this.style.backgroundColor=k.toolbar.itemBackgroundColor,this.style.color=k.toolbar.fontColor)},k.allDOMEventHandlers,!0),D(g,"click",function(){k.exportChart({format:"png",fileName:k.exportFileName});
ya(k._dropdownMenu)},k.allDOMEventHandlers,!0))}function ib(k,A,g){k*=la;A*=la;k=g.getImageData(k,A,2,2).data;A=!0;for(g=0;4>g;g++)if(k[g]!==k[g+4]|k[g]!==k[g+8]|k[g]!==k[g+12]){A=!1;break}return A?k[0]<<16|k[1]<<8|k[2]:0}function sa(k,A,g){return k in A?A[k]:g[k]}function Sa(k,A,g){if(u&&jb){var L=k.getContext("2d");Ta=L.webkitBackingStorePixelRatio||L.mozBackingStorePixelRatio||L.msBackingStorePixelRatio||L.oBackingStorePixelRatio||L.backingStorePixelRatio||1;la=Xa/Ta;k.width=A*la;k.height=g*la;
Xa!==Ta&&(k.style.width=A+"px",k.style.height=g+"px",L.scale(la,la))}else k.width=A,k.height=g}function sb(k){if(!tb){var A=!1,g=!1;"undefined"===typeof ea.Chart.creditHref?(k.creditHref=wa("iuuqr;..b`ow`rkr/bnl."),k.creditText=wa("B`ow`rKR/bnl")):(A=k.updateOption("creditText"),g=k.updateOption("creditHref"));if(k.creditHref&&k.creditText){k._creditLink||(k._creditLink=document.createElement("a"),k._creditLink.setAttribute("class","canvasjs-chart-credit"),k._creditLink.setAttribute("title","JavaScript Charts"),
O(k._creditLink,{outline:"none",margin:"0px",position:"absolute",right:"2px",top:k.height-14+"px",color:"dimgrey",textDecoration:"none",fontSize:"11px",fontFamily:"Calibri, Lucida Grande, Lucida Sans Unicode, Arial, sans-serif"}),k._creditLink.setAttribute("tabIndex",-1),k._creditLink.setAttribute("target","_blank"));if(0===k.renderCount||A||g)k._creditLink.setAttribute("href",k.creditHref),k._creditLink.innerHTML=k.creditText;k._creditLink&&k.creditHref&&k.creditText?(k._creditLink.parentElement||
k._canvasJSContainer.appendChild(k._creditLink),k._creditLink.style.top=k.height-14+"px"):k._creditLink.parentElement&&k._canvasJSContainer.removeChild(k._creditLink)}}}function ta(k,A){La&&(this.canvasCount|=0,window.console.log(++this.canvasCount));var g=document.createElement("canvas");g.setAttribute("class","canvasjs-chart-canvas");Sa(g,k,A);u||"undefined"===typeof G_vmlCanvasManager||G_vmlCanvasManager.initElement(g);return g}function O(k,g){for(var u in g)k.style[u]=g[u]}function Ba(k,g,u){g.getAttribute("state")||
(g.style.backgroundColor=k.toolbar.itemBackgroundColor,g.style.color=k.toolbar.fontColor,g.style.border="none",O(g,{WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"}));g.getAttribute("state")!==u&&(g.setAttribute("state",u),g.setAttribute("type","button"),O(g,{padding:"5px 12px",cursor:"pointer","float":"left",width:"40px",height:"25px",outline:"0px",verticalAlign:"baseline",lineHeight:"0"}),g.setAttribute("title",k._cultureInfo[u+"Text"]),g.innerHTML="<img src='"+
ub[u].image+"' alt='"+k._cultureInfo[u+"Text"]+"' />",O(g.childNodes[0],{height:"95%",pointerEvents:"none"}))}function Ra(){for(var k=null,g=0;g<arguments.length;g++)k=arguments[g],k.style&&(k.style.display="inline")}function ya(){for(var k=null,g=0;g<arguments.length;g++)(k=arguments[g])&&k.style&&(k.style.display="none")}function Ya(k){if(null===k||"object"!==typeof k)return k;if(k instanceof Date)return new Date(k.getTime());Array.isArray||(Array.isArray=function(k){return"[object Array]"===Object.prototype.toString.call(k)});
if(Array.isArray(k)){for(var g=[],u=0;u<k.length;u++)g.push(Ya(k[u]));return g}g=new k.constructor;for(u in k)k.hasOwnProperty(u)&&(g[u]=Ya(k[u]));return g}function Ua(k,g,u,L,F){if(null===k||"undefined"===typeof k)return"undefined"===typeof u?g:u;k=parseFloat(k.toString())*(0<=k.toString().indexOf("%")?g/100:1);"undefined"!==typeof L&&(k=Math.min(L,k),"undefined"!==typeof F&&(k=Math.max(F,k)));return!isNaN(k)&&k<=g&&0<=k?k:"undefined"===typeof u?g:u}function aa(k,A,u,L,F){this._defaultsKey=k;this._themeOptionsKey=
A;this._index=L;this.parent=F;this._eventListeners=[];k={};this.theme&&g(this.parent)&&g(A)&&g(L)?k=g(this.predefinedThemes[this.theme])?this.predefinedThemes.light1:this.predefinedThemes[this.theme]:this.parent&&(this.parent.themeOptions&&this.parent.themeOptions[A])&&(null===L?k=this.parent.themeOptions[A]:0<this.parent.themeOptions[A].length&&(L=Math.min(this.parent.themeOptions[A].length-1,L),k=this.parent.themeOptions[A][L]));this.themeOptions=k;this.options=u?u:{_isPlaceholder:!0};this.setOptions(this.options,
k)}function Ka(k,g,u,L,F){"undefined"===typeof F&&(F=0);this._padding=F;this._x1=k;this._y1=g;this._x2=u;this._y2=L;this._rightOccupied=this._leftOccupied=this._bottomOccupied=this._topOccupied=this._padding}function oa(k,g){oa.base.constructor.call(this,"TextBlock",null,g,null,null);this.ctx=k;this._isDirty=!0;this._wrappedText=null;this._initialize()}function Va(k,g){Va.base.constructor.call(this,"Toolbar","toolbar",g,null,k);this.chart=k;this.canvas=k.canvas;this.ctx=this.chart.ctx;this.optionsName=
"toolbar"}function Ha(k,A){Ha.base.constructor.call(this,"Title","title",A,null,k);this.chart=k;this.canvas=k.canvas;this.ctx=this.chart.ctx;this.optionsName="title";if(g(this.options.margin)&&k.options.subtitles)for(var u=k.options.subtitles,L=0;L<u.length;L++)if((g(u[L].horizontalAlign)&&"center"===this.horizontalAlign||u[L].horizontalAlign===this.horizontalAlign)&&(g(u[L].verticalAlign)&&"top"===this.verticalAlign||u[L].verticalAlign===this.verticalAlign)&&!u[L].dockInsidePlotArea===!this.dockInsidePlotArea){this.margin=
0;break}"undefined"===typeof this.options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize));this.height=this.width=null;this.bounds={x1:null,y1:null,x2:null,y2:null}}function Ma(k,g,u){Ma.base.constructor.call(this,"Subtitle","subtitles",g,u,k);this.chart=k;this.canvas=k.canvas;this.ctx=this.chart.ctx;this.optionsName="subtitles";this.isOptionsInArray=!0;"undefined"===typeof this.options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize));this.height=this.width=null;
this.bounds={x1:null,y1:null,x2:null,y2:null}}function Za(){this.pool=[]}function Na(k){var g;k&&Pa[k]&&(g=Pa[k]);Na.base.constructor.call(this,"CultureInfo",null,g,null,null)}var La=!1,ka={},u=!!document.createElement("canvas").getContext,ea={Chart:{width:500,height:400,zoomEnabled:!1,zoomType:"x",backgroundColor:"white",theme:"light1",animationEnabled:!1,animationDuration:1200,dataPointWidth:null,dataPointMinWidth:null,dataPointMaxWidth:null,colorSet:"colorSet1",culture:"en",creditHref:"",creditText:"CanvasJS",
interactivityEnabled:!0,exportEnabled:!1,exportFileName:"Chart",rangeChanging:null,rangeChanged:null,publicProperties:{title:"readWrite",subtitles:"readWrite",toolbar:"readWrite",toolTip:"readWrite",legend:"readWrite",axisX:"readWrite",axisY:"readWrite",axisX2:"readWrite",axisY2:"readWrite",data:"readWrite",options:"readWrite",bounds:"readOnly",container:"readOnly",selectedColorSet:"readOnly"}},Title:{padding:0,text:null,verticalAlign:"top",horizontalAlign:"center",fontSize:20,fontFamily:"Calibri",
fontWeight:"normal",fontColor:"black",fontStyle:"normal",borderThickness:0,borderColor:"black",cornerRadius:0,backgroundColor:u?"transparent":null,margin:5,wrap:!0,maxWidth:null,dockInsidePlotArea:!1,publicProperties:{options:"readWrite",bounds:"readOnly",chart:"readOnly"}},Subtitle:{padding:0,text:null,verticalAlign:"top",horizontalAlign:"center",fontSize:14,fontFamily:"Calibri",fontWeight:"normal",fontColor:"black",fontStyle:"normal",borderThickness:0,borderColor:"black",cornerRadius:0,backgroundColor:null,
margin:2,wrap:!0,maxWidth:null,dockInsidePlotArea:!1,publicProperties:{options:"readWrite",bounds:"readOnly",chart:"readOnly"}},Toolbar:{itemBackgroundColor:"white",itemBackgroundColorOnHover:"#2196f3",buttonBorderColor:"#2196f3",buttonBorderThickness:1,fontColor:"black",fontColorOnHover:"white",publicProperties:{options:"readWrite",chart:"readOnly"}},Legend:{name:null,verticalAlign:"center",horizontalAlign:"right",fontSize:14,fontFamily:"calibri",fontWeight:"normal",fontColor:"black",fontStyle:"normal",
cursor:null,itemmouseover:null,itemmouseout:null,itemmousemove:null,itemclick:null,dockInsidePlotArea:!1,reversed:!1,backgroundColor:u?"transparent":null,borderColor:u?"transparent":null,borderThickness:0,cornerRadius:0,maxWidth:null,maxHeight:null,markerMargin:null,itemMaxWidth:null,itemWidth:null,itemWrap:!0,itemTextFormatter:null,publicProperties:{options:"readWrite",bounds:"readOnly",chart:"readOnly"}},ToolTip:{enabled:!0,shared:!1,animationEnabled:!0,content:null,contentFormatter:null,reversed:!1,
backgroundColor:u?"rgba(255,255,255,.9)":"rgb(255,255,255)",borderColor:null,borderThickness:2,cornerRadius:5,fontSize:14,fontColor:"black",fontFamily:"Calibri, Arial, Georgia, serif;",fontWeight:"normal",fontStyle:"italic",updated:null,hidden:null,publicProperties:{options:"readWrite",chart:"readOnly"}},Axis:{minimum:null,maximum:null,viewportMinimum:null,viewportMaximum:null,interval:null,intervalType:null,reversed:!1,logarithmic:!1,logarithmBase:10,title:null,titleFontColor:"black",titleFontSize:20,
titleFontFamily:"arial",titleFontWeight:"normal",titleFontStyle:"normal",titleWrap:!0,titleMaxWidth:null,titleBackgroundColor:u?"transparent":null,titleBorderColor:u?"transparent":null,titleBorderThickness:0,titleCornerRadius:0,labelAngle:0,labelFontFamily:"arial",labelFontColor:"black",labelFontSize:12,labelFontWeight:"normal",labelFontStyle:"normal",labelAutoFit:!0,labelWrap:!0,labelMaxWidth:null,labelFormatter:null,labelBackgroundColor:u?"transparent":null,labelBorderColor:u?"transparent":null,
labelBorderThickness:0,labelCornerRadius:0,labelPlacement:"outside",labelTextAlign:"left",prefix:"",suffix:"",includeZero:!1,tickLength:5,tickColor:"black",tickThickness:1,tickPlacement:"outside",lineColor:"black",lineThickness:1,lineDashType:"solid",gridColor:"#A0A0A0",gridThickness:0,gridDashType:"solid",interlacedColor:u?"transparent":null,valueFormatString:null,margin:2,publicProperties:{options:"readWrite",stripLines:"readWrite",scaleBreaks:"readWrite",crosshair:"readWrite",bounds:"readOnly",
chart:"readOnly"}},StripLine:{value:null,startValue:null,endValue:null,color:"orange",opacity:null,thickness:2,lineDashType:"solid",label:"",labelPlacement:"inside",labelAlign:"far",labelWrap:!0,labelMaxWidth:null,labelBackgroundColor:null,labelBorderColor:u?"transparent":null,labelBorderThickness:0,labelCornerRadius:0,labelFontFamily:"arial",labelFontColor:"orange",labelFontSize:12,labelFontWeight:"normal",labelFontStyle:"normal",labelFormatter:null,showOnTop:!1,publicProperties:{options:"readWrite",
axis:"readOnly",bounds:"readOnly",chart:"readOnly"}},ScaleBreaks:{autoCalculate:!1,collapsibleThreshold:"25%",maxNumberOfAutoBreaks:2,spacing:8,type:"straight",color:"#FFFFFF",fillOpacity:0.9,lineThickness:2,lineColor:"#E16E6E",lineDashType:"solid",publicProperties:{options:"readWrite",customBreaks:"readWrite",axis:"readOnly",autoBreaks:"readOnly",bounds:"readOnly",chart:"readOnly"}},Break:{startValue:null,endValue:null,spacing:8,type:"straight",color:"#FFFFFF",fillOpacity:0.9,lineThickness:2,lineColor:"#E16E6E",
lineDashType:"solid",publicProperties:{options:"readWrite",scaleBreaks:"readOnly",bounds:"readOnly",chart:"readOnly"}},Crosshair:{enabled:!1,snapToDataPoint:!1,color:"grey",opacity:null,thickness:2,lineDashType:"solid",label:"",labelWrap:!0,labelMaxWidth:null,labelBackgroundColor:u?"grey":null,labelBorderColor:u?"grey":null,labelBorderThickness:0,labelCornerRadius:0,labelFontFamily:u?"Calibri, Optima, Candara, Verdana, Geneva, sans-serif":"calibri",labelFontSize:12,labelFontColor:"#fff",labelFontWeight:"normal",
labelFontStyle:"normal",labelFormatter:null,valueFormatString:null,updated:null,hidden:null,publicProperties:{options:"readWrite",axis:"readOnly",bounds:"readOnly",chart:"readOnly"}},DataSeries:{name:null,dataPoints:null,label:"",bevelEnabled:!1,highlightEnabled:!0,cursor:"default",indexLabel:"",indexLabelPlacement:"auto",indexLabelOrientation:"horizontal",indexLabelTextAlign:"left",indexLabelFontColor:"black",indexLabelFontSize:12,indexLabelFontStyle:"normal",indexLabelFontFamily:"Arial",indexLabelFontWeight:"normal",
indexLabelBackgroundColor:null,indexLabelLineColor:"gray",indexLabelLineThickness:1,indexLabelLineDashType:"solid",indexLabelMaxWidth:null,indexLabelWrap:!0,indexLabelFormatter:null,lineThickness:2,lineDashType:"solid",connectNullData:!1,nullDataLineDashType:"dash",color:null,lineColor:null,risingColor:"white",fallingColor:"red",fillOpacity:null,startAngle:0,radius:null,innerRadius:null,neckHeight:null,neckWidth:null,reversed:!1,valueRepresents:null,linkedDataSeriesIndex:null,whiskerThickness:2,whiskerDashType:"solid",
whiskerColor:null,whiskerLength:null,stemThickness:2,stemColor:null,stemDashType:"solid",upperBoxColor:"white",lowerBoxColor:"white",type:"column",xValueType:"number",axisXType:"primary",axisYType:"primary",axisXIndex:0,axisYIndex:0,xValueFormatString:null,yValueFormatString:null,zValueFormatString:null,percentFormatString:null,showInLegend:null,legendMarkerType:null,legendMarkerColor:null,legendText:null,legendMarkerBorderColor:u?"transparent":null,legendMarkerBorderThickness:0,markerType:"circle",
markerColor:null,markerSize:null,markerBorderColor:u?"transparent":null,markerBorderThickness:0,mouseover:null,mouseout:null,mousemove:null,click:null,toolTipContent:null,visible:!0,publicProperties:{options:"readWrite",axisX:"readWrite",axisY:"readWrite",chart:"readOnly"}},TextBlock:{x:0,y:0,width:null,height:null,maxWidth:null,maxHeight:null,padding:0,angle:0,text:"",horizontalAlign:"center",textAlign:"left",fontSize:12,fontFamily:"calibri",fontWeight:"normal",fontColor:"black",fontStyle:"normal",
borderThickness:0,borderColor:"black",cornerRadius:0,backgroundColor:null,textBaseline:"top"},CultureInfo:{decimalSeparator:".",digitGroupSeparator:",",zoomText:"Zoom",panText:"Pan",resetText:"Reset",menuText:"More Options",saveJPGText:"Save as JPEG",savePNGText:"Save as PNG",printText:"Print",days:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),shortDays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),months:"January February March April May June July August September October November December".split(" "),
shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" ")}},Pa={en:{}},r=u?"Trebuchet MS, Helvetica, sans-serif":"Arial",za=u?"Impact, Charcoal, sans-serif":"Arial",xa={colorSet1:"#4F81BC #C0504E #9BBB58 #23BFAA #8064A1 #4AACC5 #F79647 #7F6084 #77A033 #33558B #E59566".split(" "),colorSet2:"#6D78AD #51CDA0 #DF7970 #4C9CA0 #AE7D99 #C9D45C #5592AD #DF874D #52BCA8 #8E7AA3 #E3CB64 #C77B85 #C39762 #8DD17E #B57952 #FCC26C".split(" "),colorSet3:"#8CA1BC #36845C #017E82 #8CB9D0 #708C98 #94838D #F08891 #0366A7 #008276 #EE7757 #E5BA3A #F2990B #03557B #782970".split(" ")},
I,Y,M,X,ua;Y="#333333";M="#000000";I="#666666";ua=X="#000000";var ma=20,G=14,Fa={colorSet:"colorSet1",backgroundColor:"#FFFFFF",title:{fontFamily:za,fontSize:32,fontColor:Y,fontWeight:"normal",verticalAlign:"top",margin:5},subtitles:[{fontFamily:za,fontSize:G,fontColor:Y,fontWeight:"normal",verticalAlign:"top",margin:5}],data:[{indexLabelFontFamily:r,indexLabelFontSize:G,indexLabelFontColor:Y,indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:r,titleFontSize:ma,titleFontColor:Y,
titleFontWeight:"normal",labelFontFamily:r,labelFontSize:G,labelFontColor:M,labelFontWeight:"normal",lineThickness:1,lineColor:I,tickThickness:1,tickColor:I,gridThickness:0,gridColor:I,stripLines:[{labelFontFamily:r,labelFontSize:G,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:r,labelFontSize:G,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:ua,color:X,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",
spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisX2:[{titleFontFamily:r,titleFontSize:ma,titleFontColor:Y,titleFontWeight:"normal",labelFontFamily:r,labelFontSize:G,labelFontColor:M,labelFontWeight:"normal",lineThickness:1,lineColor:I,tickThickness:1,tickColor:I,gridThickness:0,gridColor:I,stripLines:[{labelFontFamily:r,labelFontSize:G,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:r,
labelFontSize:G,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:ua,color:X,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY:[{titleFontFamily:r,titleFontSize:ma,titleFontColor:Y,titleFontWeight:"normal",labelFontFamily:r,labelFontSize:G,labelFontColor:M,labelFontWeight:"normal",lineThickness:1,lineColor:I,tickThickness:1,tickColor:I,gridThickness:1,gridColor:I,stripLines:[{labelFontFamily:r,
labelFontSize:G,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:r,labelFontSize:G,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:ua,color:X,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY2:[{titleFontFamily:r,titleFontSize:ma,titleFontColor:Y,titleFontWeight:"normal",labelFontFamily:r,labelFontSize:G,
labelFontColor:M,labelFontWeight:"normal",lineThickness:1,lineColor:I,tickThickness:1,tickColor:I,gridThickness:1,gridColor:I,stripLines:[{labelFontFamily:r,labelFontSize:G,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:r,labelFontSize:G,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:ua,color:X,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,
lineDashType:"solid"}}],legend:{fontFamily:r,fontSize:14,fontColor:Y,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:r,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1},toolbar:{itemBackgroundColor:"white",itemBackgroundColorOnHover:"#2196f3",buttonBorderColor:"#2196f3",buttonBorderThickness:1,fontColor:"black",fontColorOnHover:"white"}};I="#2A2A2A";M=Y="#F5F5F5";I="#FFFFFF";X="#40BAF1";ua="#F5F5F5";var ma=20,G=14,Ia={colorSet:"colorSet2",title:{fontFamily:r,
fontSize:33,fontColor:"#3A3A3A",fontWeight:"bold",verticalAlign:"top",margin:5},subtitles:[{fontFamily:r,fontSize:G,fontColor:"#3A3A3A",fontWeight:"normal",verticalAlign:"top",margin:5}],data:[{indexLabelFontFamily:r,indexLabelFontSize:G,indexLabelFontColor:"#666666",indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:r,titleFontSize:ma,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:r,labelFontSize:G,labelFontColor:"#666666",labelFontWeight:"normal",
lineThickness:1,lineColor:"#BBBBBB",tickThickness:1,tickColor:"#BBBBBB",gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:r,labelFontSize:G,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:r,labelFontSize:G,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,
lineDashType:"solid"}}],axisX2:[{titleFontFamily:r,titleFontSize:ma,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:r,labelFontSize:G,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:1,lineColor:"#BBBBBB",tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:r,labelFontSize:G,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:r,labelFontSize:G,
labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY:[{titleFontFamily:r,titleFontSize:ma,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:r,labelFontSize:G,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:0,lineColor:"#BBBBBB",tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",
stripLines:[{labelFontFamily:r,labelFontSize:G,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:r,labelFontSize:G,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY2:[{titleFontFamily:r,titleFontSize:ma,titleFontColor:"#666666",titleFontWeight:"normal",
labelFontFamily:r,labelFontSize:G,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:0,lineColor:"#BBBBBB",tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:r,labelFontSize:G,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:r,labelFontSize:G,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:"black",color:"black",thickness:1,lineDashType:"dot"},
scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],legend:{fontFamily:r,fontSize:14,fontColor:"#3A3A3A",fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:r,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1},toolbar:{itemBackgroundColor:"white",itemBackgroundColorOnHover:"#2196f3",buttonBorderColor:"#2196f3",buttonBorderThickness:1,fontColor:"black",fontColorOnHover:"white"}};M=Y="#F5F5F5";I="#FFFFFF";
X="#40BAF1";ua="#F5F5F5";ma=20;G=14;za={colorSet:"colorSet12",backgroundColor:"#2A2A2A",title:{fontFamily:za,fontSize:32,fontColor:Y,fontWeight:"normal",verticalAlign:"top",margin:5},subtitles:[{fontFamily:za,fontSize:G,fontColor:Y,fontWeight:"normal",verticalAlign:"top",margin:5}],toolbar:{itemBackgroundColor:"#666666",itemBackgroundColorOnHover:"#FF7372",buttonBorderColor:"#FF7372",buttonBorderThickness:1,fontColor:"#F5F5F5",fontColorOnHover:"#F5F5F5"},data:[{indexLabelFontFamily:r,indexLabelFontSize:G,
indexLabelFontColor:M,indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:r,titleFontSize:ma,titleFontColor:M,titleFontWeight:"normal",labelFontFamily:r,labelFontSize:G,labelFontColor:M,labelFontWeight:"normal",lineThickness:1,lineColor:I,tickThickness:1,tickColor:I,gridThickness:0,gridColor:I,stripLines:[{labelFontFamily:r,labelFontSize:G,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:r,
labelFontSize:G,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ua,color:X,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisX2:[{titleFontFamily:r,titleFontSize:ma,titleFontColor:M,titleFontWeight:"normal",labelFontFamily:r,labelFontSize:G,labelFontColor:M,labelFontWeight:"normal",lineThickness:1,lineColor:I,tickThickness:1,tickColor:I,gridThickness:0,gridColor:I,stripLines:[{labelFontFamily:r,
labelFontSize:G,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:r,labelFontSize:G,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ua,color:X,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY:[{titleFontFamily:r,titleFontSize:ma,titleFontColor:M,titleFontWeight:"normal",labelFontFamily:r,
labelFontSize:G,labelFontColor:M,labelFontWeight:"normal",lineThickness:1,lineColor:I,tickThickness:1,tickColor:I,gridThickness:1,gridColor:I,stripLines:[{labelFontFamily:r,labelFontSize:G,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:r,labelFontSize:G,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ua,color:X,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",
lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY2:[{titleFontFamily:r,titleFontSize:ma,titleFontColor:M,titleFontWeight:"normal",labelFontFamily:r,labelFontSize:G,labelFontColor:M,labelFontWeight:"normal",lineThickness:1,lineColor:I,tickThickness:1,tickColor:I,gridThickness:1,gridColor:I,stripLines:[{labelFontFamily:r,labelFontSize:G,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:r,labelFontSize:G,labelFontColor:"#000000",
labelFontWeight:"normal",labelBackgroundColor:ua,color:X,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],legend:{fontFamily:r,fontSize:14,fontColor:Y,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:r,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1,fontColor:M,backgroundColor:"rgba(0, 0, 0, .7)"}};I="#FFFFFF";M=Y="#FAFAFA";X="#40BAF1";ua="#F5F5F5";
ma=20;G=14;X={colorSet:"colorSet2",backgroundColor:"#32373A",title:{fontFamily:r,fontSize:32,fontColor:Y,fontWeight:"normal",verticalAlign:"top",margin:5},subtitles:[{fontFamily:r,fontSize:G,fontColor:Y,fontWeight:"normal",verticalAlign:"top",margin:5}],toolbar:{itemBackgroundColor:"#666666",itemBackgroundColorOnHover:"#FF7372",buttonBorderColor:"#FF7372",buttonBorderThickness:1,fontColor:"#F5F5F5",fontColorOnHover:"#F5F5F5"},data:[{indexLabelFontFamily:r,indexLabelFontSize:G,indexLabelFontColor:M,
indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:r,titleFontSize:ma,titleFontColor:M,titleFontWeight:"normal",labelFontFamily:r,labelFontSize:G,labelFontColor:M,labelFontWeight:"normal",lineThickness:1,lineColor:I,tickThickness:1,tickColor:I,gridThickness:0,gridColor:I,stripLines:[{labelFontFamily:r,labelFontSize:G,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:r,labelFontSize:G,
labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ua,color:X,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisX2:[{titleFontFamily:r,titleFontSize:ma,titleFontColor:M,titleFontWeight:"normal",labelFontFamily:r,labelFontSize:G,labelFontColor:M,labelFontWeight:"normal",lineThickness:1,lineColor:I,tickThickness:1,tickColor:I,gridThickness:0,gridColor:I,stripLines:[{labelFontFamily:r,
labelFontSize:G,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:r,labelFontSize:G,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ua,color:X,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY:[{titleFontFamily:r,titleFontSize:ma,titleFontColor:M,titleFontWeight:"normal",labelFontFamily:r,
labelFontSize:G,labelFontColor:M,labelFontWeight:"normal",lineThickness:0,lineColor:I,tickThickness:1,tickColor:I,gridThickness:1,gridColor:I,stripLines:[{labelFontFamily:r,labelFontSize:G,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:r,labelFontSize:G,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:ua,color:X,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",
lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY2:[{titleFontFamily:r,titleFontSize:ma,titleFontColor:M,titleFontWeight:"normal",labelFontFamily:r,labelFontSize:G,labelFontColor:M,labelFontWeight:"normal",lineThickness:0,lineColor:I,tickThickness:1,tickColor:I,gridThickness:1,gridColor:I,stripLines:[{labelFontFamily:r,labelFontSize:G,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:r,labelFontSize:G,labelFontColor:"#000000",
labelFontWeight:"normal",labelBackgroundColor:ua,color:X,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],legend:{fontFamily:r,fontSize:14,fontColor:Y,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:r,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1,fontColor:M,backgroundColor:"rgba(0, 0, 0, .7)"}};var $a={light1:Fa,light2:Ia,dark1:za,dark2:X,theme1:Fa,
theme2:Ia,theme3:Fa},W={numberDuration:1,yearDuration:314496E5,monthDuration:2592E6,weekDuration:6048E5,dayDuration:864E5,hourDuration:36E5,minuteDuration:6E4,secondDuration:1E3,millisecondDuration:1,dayOfWeekFromInt:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" ")};(function(){ka.fSDec=function(k){for(var g="",u=0;u<k.length;u++)g+=String.fromCharCode(Math.ceil(k.length/57/5)^k.charCodeAt(u));return g};delete ea[ka.fSDec("Bi`su")][ka.fSDec("bsdehuIsdg")];ka.pro={sCH:ea[ka.fSDec("Bi`su")][ka.fSDec("bsdehuIsdg")]};
ka.pos=["cm","cs","um"];ka._fTWm=function(k){if("undefined"===typeof ka.pro.sCH&&!kb)try{var g=(new Date).getMonth()%3,u,L,F=k[ka.fSDec("buy")];F[ka.fSDec("udyuC`rdmhod")]=ka.fSDec("unq");F[ka.fSDec("gnou")]=11+ka.fSDec("qy!B`mhcsh-!Mtbhe`!Fs`oed-!Mtbhe`!R`or!Tohbned-!@sh`m-!r`or,rdshg");F[ka.fSDec("ghmmRuxmd")]=ka.fSDec("fsdx");u="cm"===ka.pos[g]||"um"===ka.pos[g]?0:k.width-F[ka.fSDec("ld`rtsdUdyu")](ka.fSDec("B`ow`rKR!Ush`m")).width;L="um"===ka.pos[g]?0:k.height-11;F[ka.fSDec("ghmmUdyu")](ka.fSDec("B`ow`rKR!Ush`m"),
u,L);"cs"===ka.pos[g]&&(k[ka.fSDec("^bsdehuMhoj")].style.right=ka.fSDec("`tun"))}catch(ja){}}})();var rb=function(){var k=!1;try{var g=Object.defineProperty&&Object.defineProperty({},"passive",{get:function(){k=!0;return!1}});window.addEventListener&&(window.addEventListener("test",null,g),window.removeEventListener("test",null,g))}catch(u){k=!1}return k}(),eb={},Ea=null,lb=function(k){var g=0,u=0;this.options.width?g=this.width:this.width=g=0<this.container.clientWidth?this.container.clientWidth:
this.width;this.options.height?u=this.height:this.height=u=0<this.container.clientHeight?this.container.clientHeight:this.height;if(this.canvas.width!==g*la||this.canvas.height!==u*la){for(var L=0;L<k.length;L++)Sa(k[L],g,u);this.bounds={x1:0,y1:0,x2:this.width,y2:this.height,width:this.width,height:this.height};return!0}return!1},mb=function(){this.ctx.clearRect(0,0,this.width,this.height);this.backgroundColor&&(this.ctx.fillStyle=this.backgroundColor,this.ctx.fillRect(0,0,this.width,this.height))},
Ca=function(k){k.width=1;k.height=1;k.getContext("2d")&&k.getContext("2d").clearRect(0,0,1,1)},nb=function(k,g,u){g=Math.min(this.width,this.height);return Math.max("theme4"===this.theme?0:300<=g?12:11,Math.round(g*(k/400)))},fa=function(){var k=/D{1,4}|M{1,4}|Y{1,4}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|f{1,3}|t{1,2}|T{1,2}|K|z{1,3}|"[^"]*"|'[^']*'/g,g="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),u="Sun Mon Tue Wed Thu Fri Sat".split(" "),L="January February March April May June July August September October November December".split(" "),
F="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),ja=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,z=/[^-+\dA-Z]/g;return function(r,D,N){var G=N?N.days:g,I=N?N.months:L,R=N?N.shortDays:u,M=N?N.shortMonths:F;N="";var d=!1;r=r&&r.getTime?r:r?new Date(r):new Date;if(isNaN(r))throw SyntaxError("invalid date");"UTC:"===D.slice(0,4)&&(D=D.slice(4),d=!0);N=d?"getUTC":"get";var t=r[N+"Date"](),x=r[N+"Day"](),
s=r[N+"Month"](),a=r[N+"FullYear"](),f=r[N+"Hours"](),c=r[N+"Minutes"](),b=r[N+"Seconds"](),e=r[N+"Milliseconds"](),h=d?0:r.getTimezoneOffset();return N=D.replace(k,function(C){switch(C){case "D":return t;case "DD":return pa(t,2);case "DDD":return R[x];case "DDDD":return G[x];case "M":return s+1;case "MM":return pa(s+1,2);case "MMM":return M[s];case "MMMM":return I[s];case "Y":return parseInt(String(a).slice(-2));case "YY":return pa(String(a).slice(-2),2);case "YYY":return pa(String(a).slice(-3),
3);case "YYYY":return pa(a,4);case "h":return f%12||12;case "hh":return pa(f%12||12,2);case "H":return f;case "HH":return pa(f,2);case "m":return c;case "mm":return pa(c,2);case "s":return b;case "ss":return pa(b,2);case "f":return pa(String(e),3).slice(0,1);case "ff":return pa(String(e),3).slice(0,2);case "fff":return pa(String(e),3).slice(0,3);case "t":return 12>f?"a":"p";case "tt":return 12>f?"am":"pm";case "T":return 12>f?"A":"P";case "TT":return 12>f?"AM":"PM";case "K":return d?"UTC":(String(r).match(ja)||
[""]).pop().replace(z,"");case "z":return(0<h?"-":"+")+Math.floor(Math.abs(h)/60);case "zz":return(0<h?"-":"+")+pa(Math.floor(Math.abs(h)/60),2);case "zzz":return(0<h?"-":"+")+pa(Math.floor(Math.abs(h)/60),2)+pa(Math.abs(h)%60,2);default:return C.slice(1,C.length-1)}})}}(),$=function(k,g,u){if(null===k)return"";if(!isFinite(k))return k;k=Number(k);var L=0>k?!0:!1;L&&(k*=-1);var F=u?u.decimalSeparator:".",r=u?u.digitGroupSeparator:",",z="";g=String(g);var z=1,D=u="",G=-1,N=[],I=[],R=0,M=0,S=0,d=!1,
t=0,D=g.match(/"[^"]*"|'[^']*'|[eE][+-]*[0]+|[,]+[.]|\u2030|./g);g=null;for(var x=0;D&&x<D.length;x++)if(g=D[x],"."===g&&0>G)G=x;else{if("%"===g)z*=100;else if("\u2030"===g){z*=1E3;continue}else if(","===g[0]&&"."===g[g.length-1]){z/=Math.pow(1E3,g.length-1);G=x+g.length-1;continue}else"E"!==g[0]&&"e"!==g[0]||"0"!==g[g.length-1]||(d=!0);0>G?(N.push(g),"#"===g||"0"===g?R++:","===g&&S++):(I.push(g),"#"!==g&&"0"!==g||M++)}d&&(g=Math.floor(k),D=-Math.floor(Math.log(k)/Math.LN10+1),t=0===k?0:0===g?-(R+
D):String(g).length-R,z/=Math.pow(10,t));0>G&&(G=x);z=(k*z).toFixed(M);g=z.split(".");z=(g[0]+"").split("");k=(g[1]+"").split("");z&&"0"===z[0]&&z.shift();for(d=D=x=M=G=0;0<N.length;)if(g=N.pop(),"#"===g||"0"===g)if(G++,G===R){var s=z,z=[];if("0"===g)for(g=R-M-(s?s.length:0);0<g;)s.unshift("0"),g--;for(;0<s.length;)u=s.pop()+u,d++,0===d%D&&(x===S&&0<s.length)&&(u=r+u)}else 0<z.length?(u=z.pop()+u,M++,d++):"0"===g&&(u="0"+u,M++,d++),0===d%D&&(x===S&&0<z.length)&&(u=r+u);else"E"!==g[0]&&"e"!==g[0]||
"0"!==g[g.length-1]||!/[eE][+-]*[0]+/.test(g)?","===g?(x++,D=d,d=0,0<z.length&&(u=r+u)):u=1<g.length&&('"'===g[0]&&'"'===g[g.length-1]||"'"===g[0]&&"'"===g[g.length-1])?g.slice(1,g.length-1)+u:g+u:(g=0>t?g.replace("+","").replace("-",""):g.replace("-",""),u+=g.replace(/[0]+/,function(a){return pa(t,a.length)}));r="";for(N=!1;0<I.length;)g=I.shift(),"#"===g||"0"===g?0<k.length&&0!==Number(k.join(""))?(r+=k.shift(),N=!0):"0"===g&&(r+="0",N=!0):1<g.length&&('"'===g[0]&&'"'===g[g.length-1]||"'"===g[0]&&
"'"===g[g.length-1])?r+=g.slice(1,g.length-1):"E"!==g[0]&&"e"!==g[0]||"0"!==g[g.length-1]||!/[eE][+-]*[0]+/.test(g)?r+=g:(g=0>t?g.replace("+","").replace("-",""):g.replace("-",""),r+=g.replace(/[0]+/,function(a){return pa(t,a.length)}));u+=(N?F:"")+r;return L?"-"+u:u},Aa=function(g){var u=0,Z=0;g=g||window.event;g.offsetX||0===g.offsetX?(u=g.offsetX,Z=g.offsetY):g.layerX||0==g.layerX?(u=g.layerX,Z=g.layerY):(u=g.pageX-g.target.offsetLeft,Z=g.pageY-g.target.offsetTop);return{x:u,y:Z}},jb=!0,Xa=window.devicePixelRatio||
1,Ta=1,la=jb?Xa/Ta:1,ba=function(g,u,Z,r,F,D,z,G,I,N,R,M,S){"undefined"===typeof S&&(S=1);z=z||0;G=G||"black";var O=15<r-u&&15<F-Z?8:0.35*Math.min(r-u,F-Z);g.beginPath();g.moveTo(u,Z);g.save();g.fillStyle=D;g.globalAlpha=S;g.fillRect(u,Z,r-u,F-Z);g.globalAlpha=1;0<z&&(S=0===z%2?0:0.5,g.beginPath(),g.lineWidth=z,g.strokeStyle=G,g.moveTo(u,Z),g.rect(u-S,Z-S,r-u+2*S,F-Z+2*S),g.stroke());g.restore();!0===I&&(g.save(),g.beginPath(),g.moveTo(u,Z),g.lineTo(u+O,Z+O),g.lineTo(r-O,Z+O),g.lineTo(r,Z),g.closePath(),
z=g.createLinearGradient((r+u)/2,Z+O,(r+u)/2,Z),z.addColorStop(0,D),z.addColorStop(1,"rgba(255, 255, 255, .4)"),g.fillStyle=z,g.fill(),g.restore());!0===N&&(g.save(),g.beginPath(),g.moveTo(u,F),g.lineTo(u+O,F-O),g.lineTo(r-O,F-O),g.lineTo(r,F),g.closePath(),z=g.createLinearGradient((r+u)/2,F-O,(r+u)/2,F),z.addColorStop(0,D),z.addColorStop(1,"rgba(255, 255, 255, .4)"),g.fillStyle=z,g.fill(),g.restore());!0===R&&(g.save(),g.beginPath(),g.moveTo(u,Z),g.lineTo(u+O,Z+O),g.lineTo(u+O,F-O),g.lineTo(u,F),
g.closePath(),z=g.createLinearGradient(u+O,(F+Z)/2,u,(F+Z)/2),z.addColorStop(0,D),z.addColorStop(1,"rgba(255, 255, 255, 0.1)"),g.fillStyle=z,g.fill(),g.restore());!0===M&&(g.save(),g.beginPath(),g.moveTo(r,Z),g.lineTo(r-O,Z+O),g.lineTo(r-O,F-O),g.lineTo(r,F),z=g.createLinearGradient(r-O,(F+Z)/2,r,(F+Z)/2),z.addColorStop(0,D),z.addColorStop(1,"rgba(255, 255, 255, 0.1)"),g.fillStyle=z,z.addColorStop(0,D),z.addColorStop(1,"rgba(255, 255, 255, 0.1)"),g.fillStyle=z,g.fill(),g.closePath(),g.restore())},
wa=function(g){for(var u="",Z=0;Z<g.length;Z++)u+=String.fromCharCode(Math.ceil(g.length/57/5)^g.charCodeAt(Z));return u},kb=window&&window[wa("mnb`uhno")]&&window[wa("mnb`uhno")].href&&window[wa("mnb`uhno")].href.indexOf&&(-1!==window[wa("mnb`uhno")].href.indexOf(wa("b`ow`rkr/bnl"))||-1!==window[wa("mnb`uhno")].href.indexOf(wa("gdonqhy/bnl"))||-1!==window[wa("mnb`uhno")].href.indexOf(wa("gheemd"))),tb=kb&&-1===window[wa("mnb`uhno")].href.indexOf(wa("gheemd")),ub={reset:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAeCAYAAABJ/8wUAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAPjSURBVFhHxVdJaFNRFP1J/jwkP5MxsbaC1WJEglSxOFAXIsFpVRE3ggi1K90obioRRBA33XXnQnciirhQcMCdorgQxBkXWlREkFKsWkv5npvckp/XnzRpKh64kLw733fffe9L/wrL0+mVUdO8uTSZ3MBL/we2qg4rkuSpodCELstXE46ziVkLQ6FQcGOmeSSq6wd4aV50d3drWjj8kQKZJTUc9kxFGenv79dZrDksTSTWWJp2QYtEPiErysyzdX0LsxsCQR8keX8gs6RHIk8ysdgKFg2G53mhuOPsshTlBjKaFo1g7SqLNoShKLdFXT8huQ/paLSbxatYnc2mHMM4hr18Vi8TIvCmXF3vYrW6cF23gGTOk0M1wA4RKvOmq6vLZRVJipvmSWT6tZ6CSEYkco5V50VPT4+D7RwOqi6RiSZm0fJ+vggSqkeoypdsNmuyelNwbXsbgvkWYMtzDWNvWaijoyOBqE+hVK8abcssUeXQ/YfKyi0gFYv1Ipgfoj34fYGTJLOYJA0ODirok32GLN8XhUWCwSes1hIwBg6LydJ/tEeRRapAdUp+wSAiZchtZZWWgAZ+JNpD8peYXQVK9UwUxNpzOK8pq97kURZhYTCKBwPD7h2zK+js7Myi7D8Fod+0TkMI8+EMAngLGc/WtBFWawkFHFnoj/t9KLgGmF0B3QfkxC+EarxkdhnFYlFLY06USqUwL7UMjICHfh/wOc2sCqhpxGbCkLvL7EUDbF73+6DkmVWB6zi7xUDQSLeYvWjAILvm9zEnkJhlbRcDQZcv6Kg2AipyT/Axw6wKlqVSqxDdjF8Izfod13qURdrG/nxehY+xGh+h0CSzKygGvSNQIcc097BI24jb9hax6kj2E7OrMFX1il+ICEf2NrPbhiXLl+fYl+U7zK4iYdsDcyLGf+ofFlkwcN+s10KhmpuYhhtm0hCLVIFL0MDsqNlDIqy9x2CLs1jL6OvrI7vPRbtohXG6eFmsFnHDGAp6n9AgyuVySRZrGvROxRgIfLXhzjrNYnNBUxNX/dMgRWT1mt4XLDovaApD53E9W3ilNX5M55LJHpRtIsgAvciR4WWcgK2Dvb1YqgXevmF8z2zEBTcKG39EfSKsT9EbhVUaI2FZO+oZIqImxol6j66/hcAu4sSN4vc1ZPoKeoE6RGhYL2YYA+ymOSSi0Z0wWntbtkGUWCvfSDXIxONraZ/FY90KUfNTpfC5spnNLgxoYNnR9RO4F8ofXEHOgogCQE99w+fF2Xw+b7O59rEOsyRqGEfpVoaDMQQ1CZrG46bcM6AZ0C/wPqNfHliqejyTySxh9TqQpL+xmbIlkB9SlAAAAABJRU5ErkJggg=="},
pan:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAICSURBVEhLxZbPahNRGMUn/5MpuAiBEAIufQGfzr5E40YptBXajYzudCEuGqS+gGlrFwquDGRTutBdYfydzJ3LzeQmJGZue+Dw/Z17Mnfmu5Pof9Hr9Z61Wq0bWZMKj263O6xWq99wU9lOpzPMKgEhEcRucNOcioOK+0RzBhNvt9tPV4nmVF19+OWhVqt9xXgFXZq+8lCv119UKpUJ7iX2FmvFTKz8RH34YdBsNk8wVtjE4fGYwm8wrrDi3WBG5oKXZGRSS9hGuNFojLTe2lFz5xThWZIktayyiE2FdT3rzXBXz7krKiL8c17wAKFDjCus2AvW+YGZ9y2JF0VFRuMPfI//rsCE/C+s26s4gQu9ul7r4NteKx7H8XOC724xNNGbaNu++IrBqbOV7Tj3FgMRvc/YKOr3+3sE47wgEt/Bl/gaK5cHbNU11vYSXylfpK7XOvjuumPp4Wcoipu30Qsez2uMXYz4lfI+mOmwothY+SLiXJy7mKVpWs3Si0CoOMfeI9Od43Wic+jO+ZVv+crsm9QSNhUW9LXSeoPBYLXopthGuFQgdIxxhY+UDwlt1x5CZ1hX+NTUdt/OIvjKaDSmuOJfaIVNPKX+W18j/PLA2/kR44p5Sd8HbHngT/yTfNRWUXX14ZcL3wmX0+TLf8YO7CGT8yFE5zB3/gney25/OETRP9CtPDFe5jShAAAAAElFTkSuQmCC"},
zoom:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAALWSURBVEhLvZZLaBNRFIabyftBIgEfqCCBoCC6MYqiXYiIj4U76U4X7sUHbhQhUBfixhZEUBDB16YuFERaUaQLK7ooCOJj4UKtYEFU0EptShO/A9Ph3js3k8lo/eHnP7n3nP/M3LlzMz1hkUwmNziOcyKRSFyFt+LxeD/c2Wq1Ym7Kv0M2m11Os1OxWGycn1OwZXCGuXfwIhezkd9/jRgNT2L4ldhs1pbkX5OLJe4euVxuGQaPCa3mnUjtJx7BDuKusJTCV6jVVGHTMuYRjxma7yIOhTgFY6jNaAKew2xPKpVay9ganmkvj+M448/MfJdT5K5Gg4HJacRngPFgqVRaRNwW1B4i7yehWfsEDdz1K+A01AoxPIqGAiuwGfkOTY8+1A6u7AyiFTB2Hu0KPIrdiOnzHLWDybeImvy+Wq2mZa5bUHsD0Zpz+KxHdWQymV6kAb1ElqeORgJLvgnRdj1+R1AfzkIvSUjxVjQSarVakrueIPT8+H1F5jSUy+WXiJrUYBVWyVxU4PEU8TzhfaijUqnMIWrjaY492eWRwdKOIqrnIxnXwLLeRLwk2GQzrEMjg0avEbXxkIxr4OoOImpj2QwyFgms1koa/SZUG8s+0iGnEhNfCNXEhzIXBVz0McTzEvJ+70P9oNFtxEzei3aFYrFYxmuSUPWSv9Yi9IMm2xE1We56Mp1OV4nDwqFmBDV9gk9AEh4gZtFHNt8W4kAUCoXF5MorY9Z/kDni9nDv7hc0i2fhgLvTtX8a99PoMPPagTFPxofRzmDJ9yM+AyEmTfgGysYbQcfhDzPPJDmX0c7gDg4gs9BqFIWhm/Nct5H8gtBq1I7UfIbtvmIuoaGQcp+fdpbbSM43eEH5wrwLbXmhm/fU63VHXjcuok7hEByFY/AeHGC8L5/PL3HT5xGH1uYwfPOICGo+CBcU0vwO1BqzUqILDl/z/9VYIMfpddiAc47jDP8BsUpb13wOLRwAAAAASUVORK5CYII="},
menu:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACQAAAAeCAYAAABE4bxTAAAAIGNIUk0AAHolAACAgwAA+f8AAIDpAAB1MAAA6mAAADqYAAAXb5JfxUYAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADoSURBVFhH7dc9CsJAFATgRxIIBCwCqZKATX5sbawsY2MvWOtF9AB6AU8gguAJbD2AnZ2VXQT/Ko2TYGCL2OYtYQc+BuYA+1hCtnCVwMm27SGaXpDJIAiCvCkVR05hGOZNN3HkFMdx3nQRR06+76/R1IcFLJlNQEWlmWlBTwJtKLKHynehZqnjOGM0PYWRVXk61C37p7xlZ3Hk5HneCk1dmMH811xGoKLSzDiQwIBZB4ocoPJdqNkDt2yKlueWRVGUtzy3rPwo3sWRU3nLjuLI6OO67oZM00wMw3hrmpZx0XU9syxrR0T0BeMpb9dneSR2AAAAAElFTkSuQmCC"}};
aa.prototype.setOptions=function(g,u){if(ea[this._defaultsKey]){var Z=ea[this._defaultsKey],r;for(r in Z)"publicProperties"!==r&&Z.hasOwnProperty(r)&&(this[r]=g&&r in g?g[r]:u&&r in u?u[r]:Z[r])}else La&&window.console&&console.log("defaults not set")};aa.prototype.get=function(g){var u=ea[this._defaultsKey];if("options"===g)return this.options&&this.options._isPlaceholder?null:this.options;if(u.hasOwnProperty(g)||u.publicProperties&&u.publicProperties.hasOwnProperty(g))return this[g];window.console&&
window.console.log('Property "'+g+"\" doesn't exist. Please check for typo.")};aa.prototype.set=function(g,u,r){r="undefined"===typeof r?!0:r;var L=ea[this._defaultsKey];if("options"===g)this.createUserOptions(u);else if(L.hasOwnProperty(g)||L.publicProperties&&L.publicProperties.hasOwnProperty(g)&&"readWrite"===L.publicProperties[g])this.options._isPlaceholder&&this.createUserOptions(),this.options[g]=u;else{window.console&&(L.publicProperties&&L.publicProperties.hasOwnProperty(g)&&"readOnly"===
L.publicProperties[g]?window.console.log('Property "'+g+'" is read-only.'):window.console.log('Property "'+g+"\" doesn't exist. Please check for typo."));return}r&&(this.stockChart||this.chart||this).render()};aa.prototype.addTo=function(g,u,r,L){L="undefined"===typeof L?!0:L;var F=ea[this._defaultsKey];F.hasOwnProperty(g)||F.publicProperties&&F.publicProperties.hasOwnProperty(g)&&"readWrite"===F.publicProperties[g]?(this.options._isPlaceholder&&this.createUserOptions(),"undefined"===typeof this.options[g]&&
(this.options[g]=[]),g=this.options[g],r="undefined"===typeof r||null===r?g.length:r,g.splice(r,0,u),L&&(this.stockChart||this.chart||this).render()):window.console&&(F.publicProperties&&F.publicProperties.hasOwnProperty(g)&&"readOnly"===F.publicProperties[g]?window.console.log('Property "'+g+'" is read-only.'):window.console.log('Property "'+g+"\" doesn't exist. Please check for typo."))};aa.prototype.createUserOptions=function(g){if("undefined"!==typeof g||this.options._isPlaceholder)if(this.parent.options._isPlaceholder&&
this.parent.createUserOptions(),this.isOptionsInArray){this.parent.options[this.optionsName]||(this.parent.options[this.optionsName]=[]);var u=this.parent.options[this.optionsName],r=u.length;this.options._isPlaceholder||(Da(u),r=u.indexOf(this.options));this.options="undefined"===typeof g?{}:g;u[r]=this.options}else this.options="undefined"===typeof g?{}:g,g=this.parent.options,this.optionsName?u=this.optionsName:(u=this._defaultsKey)&&0!==u.length?(r=u.charAt(0).toLowerCase(),1<u.length&&(r=r.concat(u.slice(1))),
u=r):u=void 0,g[u]=this.options};aa.prototype.remove=function(g){g="undefined"===typeof g?!0:g;if(this.isOptionsInArray){var u=this.parent.options[this.optionsName];Da(u);var r=u.indexOf(this.options);0<=r&&u.splice(r,1)}else delete this.parent.options[this.optionsName];g&&(this.stockChart||this.chart||this).render()};aa.prototype.updateOption=function(k){!ea[this._defaultsKey]&&(La&&window.console)&&console.log("defaults not set");var u=ea[this._defaultsKey],r={},L=this[k],F=this._themeOptionsKey,
D=this._index;this.theme&&g(this.parent)&&g(F)&&g(D)?r=g(this.predefinedThemes[this.theme])?this.predefinedThemes.light1:this.predefinedThemes[this.theme]:this.parent&&(this.parent.themeOptions&&this.parent.themeOptions[F])&&(null===D?r=this.parent.themeOptions[F]:0<this.parent.themeOptions[F].length&&(r=Math.min(this.parent.themeOptions[F].length-1,D),r=this.parent.themeOptions[F][r]));this.themeOptions=r;k in u&&(L=k in this.options?this.options[k]:r&&k in r?r[k]:u[k]);if(L===this[k])return!1;this[k]=
L;return!0};aa.prototype.trackChanges=function(g){if(!this.sessionVariables)throw"Session Variable Store not set";this.sessionVariables[g]=this.options[g]};aa.prototype.isBeingTracked=function(g){this.options._oldOptions||(this.options._oldOptions={});return this.options._oldOptions[g]?!0:!1};aa.prototype.hasOptionChanged=function(g){if(!this.sessionVariables)throw"Session Variable Store not set";return this.sessionVariables[g]!==this.options[g]};aa.prototype.addEventListener=function(g,u,r){g&&u&&
(this._eventListeners[g]=this._eventListeners[g]||[],this._eventListeners[g].push({context:r||this,eventHandler:u}))};aa.prototype.removeEventListener=function(g,u){if(g&&u&&this._eventListeners[g])for(var r=this._eventListeners[g],L=0;L<r.length;L++)if(r[L].eventHandler===u){r[L].splice(L,1);break}};aa.prototype.removeAllEventListeners=function(){this._eventListeners=[]};aa.prototype.dispatchEvent=function(g,u,r){if(g&&this._eventListeners[g]){u=u||{};for(var L=this._eventListeners[g],F=0;F<L.length;F++)L[F].eventHandler.call(L[F].context,
u)}"function"===typeof this[g]&&this[g].call(r||this.chart,u)};Ka.prototype.registerSpace=function(g,u){"top"===g?this._topOccupied+=u.height:"bottom"===g?this._bottomOccupied+=u.height:"left"===g?this._leftOccupied+=u.width:"right"===g&&(this._rightOccupied+=u.width)};Ka.prototype.unRegisterSpace=function(g,u){"top"===g?this._topOccupied-=u.height:"bottom"===g?this._bottomOccupied-=u.height:"left"===g?this._leftOccupied-=u.width:"right"===g&&(this._rightOccupied-=u.width)};Ka.prototype.getFreeSpace=
function(){return{x1:this._x1+this._leftOccupied,y1:this._y1+this._topOccupied,x2:this._x2-this._rightOccupied,y2:this._y2-this._bottomOccupied,width:this._x2-this._x1-this._rightOccupied-this._leftOccupied,height:this._y2-this._y1-this._bottomOccupied-this._topOccupied}};Ka.prototype.reset=function(){this._rightOccupied=this._leftOccupied=this._bottomOccupied=this._topOccupied=this._padding};ia(oa,aa);oa.prototype._initialize=function(){g(this.padding)||"object"!==typeof this.padding?this.topPadding=
this.rightPadding=this.bottomPadding=this.leftPadding=Number(this.padding)|0:(this.topPadding=g(this.padding.top)?0:Number(this.padding.top)|0,this.rightPadding=g(this.padding.right)?0:Number(this.padding.right)|0,this.bottomPadding=g(this.padding.bottom)?0:Number(this.padding.bottom)|0,this.leftPadding=g(this.padding.left)?0:Number(this.padding.left)|0)};oa.prototype.render=function(g){if(0!==this.fontSize){g&&this.ctx.save();var u=this.ctx.font;this.ctx.textBaseline=this.textBaseline;var r=0;this._isDirty&&
this.measureText(this.ctx);this.ctx.translate(this.x,this.y+r);"middle"===this.textBaseline&&(r=-this._lineHeight/2);this.ctx.font=this._getFontString();this.ctx.rotate(Math.PI/180*this.angle);var L=0,F=this.topPadding,D=null;this.ctx.roundRect||Ga(this.ctx);(0<this.borderThickness&&this.borderColor||this.backgroundColor)&&this.ctx.roundRect(0,r,this.width,this.height,this.cornerRadius,this.borderThickness,this.backgroundColor,this.borderColor);this.ctx.fillStyle=this.fontColor;for(r=0;r<this._wrappedText.lines.length;r++){D=
this._wrappedText.lines[r];if("right"===this.horizontalAlign||"right"===this.textAlign)L=this.width-D.width-this.rightPadding;else if("left"===this.horizontalAlign||"left"===this.textAlign)L=this.leftPadding;else if("center"===this.horizontalAlign||"center"===this.textAlign)L=(this.width-(this.leftPadding+this.rightPadding))/2-D.width/2+this.leftPadding;this.ctx.fillText(D.text,L,F);F+=D.height}this.ctx.font=u;g&&this.ctx.restore()}};oa.prototype.setText=function(g){this.text=g;this._isDirty=!0;this._wrappedText=
null};oa.prototype.measureText=function(){this._lineHeight=db(this.fontFamily,this.fontSize,this.fontWeight);if(null===this.maxWidth)throw"Please set maxWidth and height for TextBlock";this._wrapText(this.ctx);this._isDirty=!1;return{width:this.width,height:this.height}};oa.prototype._getLineWithWidth=function(g,u,r){g=String(g);if(!g)return{text:"",width:0};var D=r=0,F=g.length-1,G=Infinity;for(this.ctx.font=this._getFontString();D<=F;){var G=Math.floor((D+F)/2),z=g.substr(0,G+1);r=this.ctx.measureText(z).width;
if(r<u)D=G+1;else if(r>u)F=G-1;else break}r>u&&1<z.length&&(z=z.substr(0,z.length-1),r=this.ctx.measureText(z).width);u=!0;if(z.length===g.length||" "===g[z.length])u=!1;u&&(g=z.split(" "),1<g.length&&g.pop(),z=g.join(" "),r=this.ctx.measureText(z).width);return{text:z,width:r}};oa.prototype._wrapText=function(){var g=new String(Oa(String(this.text))),u=[],r=this.ctx.font,D=0,F=0;this.ctx.font=this._getFontString();if(0===this.frontSize)F=D=0;else for(;0<g.length;){var G=this.maxHeight-(this.topPadding+
this.bottomPadding),z=this._getLineWithWidth(g,this.maxWidth-(this.leftPadding+this.rightPadding),!1);z.height=this._lineHeight;u.push(z);var I=F,F=Math.max(F,z.width),D=D+z.height,g=Oa(g.slice(z.text.length,g.length));G&&D>G&&(z=u.pop(),D-=z.height,F=I)}this._wrappedText={lines:u,width:F,height:D};this.width=F+(this.leftPadding+this.rightPadding);this.height=D+(this.topPadding+this.bottomPadding);this.ctx.font=r};oa.prototype._getFontString=function(){var g;g=""+(this.fontStyle?this.fontStyle+" ":
"");g+=this.fontWeight?this.fontWeight+" ":"";g+=this.fontSize?this.fontSize+"px ":"";var A=this.fontFamily?this.fontFamily+"":"";!u&&A&&(A=A.split(",")[0],"'"!==A[0]&&'"'!==A[0]&&(A="'"+A+"'"));return g+=A};ia(Va,aa);ia(Ha,aa);Ha.prototype.setLayout=function(){if(this.text){var u=this.dockInsidePlotArea?this.chart.plotArea:this.chart,A=u.layoutManager.getFreeSpace(),r=A.x1,D=A.y1,F=0,G=0,z=this.chart._menuButton&&this.chart.exportEnabled&&"top"===this.verticalAlign?22:0,I,O;"top"===this.verticalAlign||
"bottom"===this.verticalAlign?(null===this.maxWidth&&(this.maxWidth=A.width-4-z*("center"===this.horizontalAlign?2:1)),G=0.5*A.height-this.margin-2,F=0):"center"===this.verticalAlign&&("left"===this.horizontalAlign||"right"===this.horizontalAlign?(null===this.maxWidth&&(this.maxWidth=A.height-4),G=0.5*A.width-this.margin-2):"center"===this.horizontalAlign&&(null===this.maxWidth&&(this.maxWidth=A.width-4),G=0.5*A.height-4));var N;g(this.padding)||"number"!==typeof this.padding?g(this.padding)||"object"!==
typeof this.padding||(N=this.padding.top?this.padding.top:this.padding.bottom?this.padding.bottom:0,N+=this.padding.bottom?this.padding.bottom:this.padding.top?this.padding.top:0):N=2*this.padding;this.wrap||(G=Math.min(G,1.5*this.fontSize+N));G=new oa(this.ctx,{fontSize:this.fontSize,fontFamily:this.fontFamily,fontColor:this.fontColor,fontStyle:this.fontStyle,fontWeight:this.fontWeight,horizontalAlign:this.horizontalAlign,verticalAlign:this.verticalAlign,borderColor:this.borderColor,borderThickness:this.borderThickness,
backgroundColor:this.backgroundColor,maxWidth:this.maxWidth,maxHeight:G,cornerRadius:this.cornerRadius,text:this.text,padding:this.padding,textBaseline:"top"});N=G.measureText();"top"===this.verticalAlign||"bottom"===this.verticalAlign?("top"===this.verticalAlign?(D=A.y1+2,O="top"):"bottom"===this.verticalAlign&&(D=A.y2-2-N.height,O="bottom"),"left"===this.horizontalAlign?r=A.x1+2:"center"===this.horizontalAlign?r=A.x1+A.width/2-N.width/2:"right"===this.horizontalAlign&&(r=A.x2-2-N.width-z),I=this.horizontalAlign,
this.width=N.width,this.height=N.height):"center"===this.verticalAlign&&("left"===this.horizontalAlign?(r=A.x1+2,D=A.y2-2-(this.maxWidth/2-N.width/2),F=-90,O="left",this.width=N.height,this.height=N.width):"right"===this.horizontalAlign?(r=A.x2-2,D=A.y1+2+(this.maxWidth/2-N.width/2),F=90,O="right",this.width=N.height,this.height=N.width):"center"===this.horizontalAlign&&(D=u.y1+(u.height/2-N.height/2),r=u.x1+(u.width/2-N.width/2),O="center",this.width=N.width,this.height=N.height),I="center");G.x=
r;G.y=D;G.angle=F;G.horizontalAlign=I;this._textBlock=G;u.layoutManager.registerSpace(O,{width:this.width+("left"===O||"right"===O?this.margin+2:0),height:this.height+("top"===O||"bottom"===O?this.margin+2:0)});this.bounds={x1:r,y1:D,x2:r+this.width,y2:D+this.height};this.ctx.textBaseline="top"}};Ha.prototype.render=function(){this._textBlock&&this._textBlock.render(!0)};ia(Ma,aa);Ma.prototype.setLayout=Ha.prototype.setLayout;Ma.prototype.render=Ha.prototype.render;Za.prototype.get=function(g,u){var r=
null;0<this.pool.length?(r=this.pool.pop(),Sa(r,g,u)):r=ta(g,u);return r};Za.prototype.release=function(g){this.pool.push(g)};ia(Na,aa);var Qa={addTheme:function(g,u){$a[g]=u},addColorSet:function(g,u){xa[g]=u},addCultureInfo:function(g,u){Pa[g]=u},formatNumber:function(g,u,r){r=r||"en";if(Pa[r])return $(g,u||"#,##0.##",new Na(r));throw"Unknown Culture Name";},formatDate:function(g,u,r){r=r||"en";if(Pa[r])return fa(g,u||"DD MMM YYYY",new Na(r));throw"Unknown Culture Name";}};"undefined"!==typeof module&&
"undefined"!==typeof module.exports?module.exports=Qa:"function"===typeof define&&define.amd?define([],function(){return Qa}):(window.CanvasJS&&window.console&&window.console.log("CanvasJS namespace already exists. If you are loading both chart and stockchart scripts, just load stockchart alone as it includes all chart features."),window.CanvasJS=window.CanvasJS?window.CanvasJS:Qa);var Ja=Qa.Chart=function(){function k(a,f){return a.x-f.x}function r(a,f,c){f=f||{};g(c)?(this.predefinedThemes=$a,this.optionsName=
this.parent=this.index=null):(this.parent=c.parent,this.index=c.index,this.predefinedThemes=c.predefinedThemes,this.optionsName=c.optionsName,this.stockChart=c.stockChart,this.panel=a,this.isOptionsInArray=c.isOptionsInArray);this.theme=g(f.theme)||g(this.predefinedThemes[f.theme])?"light1":f.theme;r.base.constructor.call(this,"Chart",this.optionsName,f,this.index,this.parent);var b=this;this._containerId=a;this._objectsInitialized=!1;this.overlaidCanvasCtx=this.ctx=null;this._indexLabels=[];this._panTimerId=
0;this._lastTouchEventType="";this._lastTouchData=null;this.isAnimating=!1;this.renderCount=0;this.disableToolTip=this.animatedRender=!1;this.canvasPool=new Za;this.allDOMEventHandlers=[];this.panEnabled=!1;this._defaultCursor="default";this.plotArea={canvas:null,ctx:null,x1:0,y1:0,x2:0,y2:0,width:0,height:0};this._dataInRenderedOrder=[];(this.container="string"===typeof this._containerId?document.getElementById(this._containerId):this._containerId)?(this.container.innerHTML="",f=a=0,a=this.options.width?
this.width:0<this.container.clientWidth?this.container.clientWidth:this.width,f=this.options.height?this.height:0<this.container.clientHeight?this.container.clientHeight:this.height,this.width=a,this.height=f,this.x1=this.y1=0,this.x2=this.width,this.y2=this.height,this.selectedColorSet="undefined"!==typeof xa[this.colorSet]?xa[this.colorSet]:xa.colorSet1,this._canvasJSContainer=document.createElement("div"),this._canvasJSContainer.setAttribute("class","canvasjs-chart-container"),this._canvasJSContainer.style.position=
"relative",this._canvasJSContainer.style.textAlign="left",this._canvasJSContainer.style.cursor="auto",this._canvasJSContainer.style.direction="ltr",u||(this._canvasJSContainer.style.height="0px"),this.container.appendChild(this._canvasJSContainer),this.canvas=ta(a,f),this._preRenderCanvas=ta(a,f),this.canvas.style.position="absolute",this.canvas.style.WebkitUserSelect="none",this.canvas.style.MozUserSelect="none",this.canvas.style.msUserSelect="none",this.canvas.style.userSelect="none",this.canvas.getContext&&
(this._canvasJSContainer.appendChild(this.canvas),this.ctx=this.canvas.getContext("2d"),this.ctx.textBaseline="top",Ga(this.ctx),this._preRenderCtx=this._preRenderCanvas.getContext("2d"),this._preRenderCtx.textBaseline="top",Ga(this._preRenderCtx),u?this.plotArea.ctx=this.ctx:(this.plotArea.canvas=ta(a,f),this.plotArea.canvas.style.position="absolute",this.plotArea.canvas.setAttribute("class","plotAreaCanvas"),this._canvasJSContainer.appendChild(this.plotArea.canvas),this.plotArea.ctx=this.plotArea.canvas.getContext("2d")),
this.overlaidCanvas=ta(a,f),this.overlaidCanvas.style.position="absolute",this.overlaidCanvas.style.webkitTapHighlightColor="transparent",this.overlaidCanvas.style.WebkitUserSelect="none",this.overlaidCanvas.style.MozUserSelect="none",this.overlaidCanvas.style.msUserSelect="none",this.overlaidCanvas.style.userSelect="none",this.overlaidCanvas.getContext&&(this._canvasJSContainer.appendChild(this.overlaidCanvas),this.overlaidCanvasCtx=this.overlaidCanvas.getContext("2d"),this.overlaidCanvasCtx.textBaseline=
"top",Ga(this.overlaidCanvasCtx)),this._eventManager=new ea(this),this.windowResizeHandler=D(window,"resize",function(){b._updateSize()&&b.render()},this.allDOMEventHandlers),this._toolBar=document.createElement("div"),this._toolBar.setAttribute("class","canvasjs-chart-toolbar"),O(this._toolBar,{position:"absolute",right:"1px",top:"1px"}),this._canvasJSContainer.appendChild(this._toolBar),this.bounds={x1:0,y1:0,x2:this.width,y2:this.height},D(this.overlaidCanvas,"click",function(a){b._mouseEventHandler(a)},
this.allDOMEventHandlers),D(this.overlaidCanvas,"mousemove",function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),D(this.overlaidCanvas,"mouseup",function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),D(this.overlaidCanvas,"mousedown",function(a){b._mouseEventHandler(a);ya(b._dropdownMenu)},this.allDOMEventHandlers),D(this.overlaidCanvas,"mouseout",function(a){b._mouseEventHandler(a)},this.allDOMEventHandlers),D(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerDown":
"touchstart",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),D(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerMove":"touchmove",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),D(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerUp":"touchend",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),D(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerCancel":"touchcancel",function(a){b._touchEventHandler(a)},this.allDOMEventHandlers),
this.toolTip=new ra(this,this.options.toolTip),this.data=null,this.axisX=[],this.axisX2=[],this.axisY=[],this.axisY2=[],this.sessionVariables={axisX:[],axisX2:[],axisY:[],axisY2:[]})):window.console&&window.console.log('CanvasJS Error: Chart Container with id "'+this._containerId+'" was not found')}function G(a,f){for(var c=[],b,e=0;e<a.length;e++)if(0==e)c.push(a[0]);else{var h,C,g;g=e-1;h=0===g?0:g-1;C=g===a.length-1?g:g+1;b=Math.abs((a[C].x-a[h].x)/(0===a[C].x-a[g].x?0.01:a[C].x-a[g].x))*(f-1)/
2+1;var d=(a[C].x-a[h].x)/b;b=(a[C].y-a[h].y)/b;c[c.length]=a[g].x>a[h].x&&0<d||a[g].x<a[h].x&&0>d?{x:a[g].x+d/3,y:a[g].y+b/3}:{x:a[g].x,y:a[g].y+b/9};g=e;h=0===g?0:g-1;C=g===a.length-1?g:g+1;b=Math.abs((a[C].x-a[h].x)/(0===a[g].x-a[h].x?0.01:a[g].x-a[h].x))*(f-1)/2+1;d=(a[C].x-a[h].x)/b;b=(a[C].y-a[h].y)/b;c[c.length]=a[g].x>a[h].x&&0<d||a[g].x<a[h].x&&0>d?{x:a[g].x-d/3,y:a[g].y-b/3}:{x:a[g].x,y:a[g].y-b/9};c[c.length]=a[e]}return c}function L(a,f,c,b,e,h,C,g,d,m){var n=0;m?(C.color=h,g.color=h):
m=1;n=d?Math.abs(e-c):Math.abs(b-f);n=0<C.trimLength?Math.abs(n*C.trimLength/100):Math.abs(n-C.length);d?(c+=n/2,e-=n/2):(f+=n/2,b-=n/2);var n=1===Math.round(C.thickness)%2?0.5:0,p=1===Math.round(g.thickness)%2?0.5:0;a.save();a.globalAlpha=m;a.strokeStyle=g.color||h;a.lineWidth=g.thickness||2;a.setLineDash&&a.setLineDash(R(g.dashType,g.thickness));a.beginPath();d&&0<g.thickness?(a.moveTo(b-C.thickness/2,Math.round((c+e)/2)-p),a.lineTo(f+C.thickness/2,Math.round((c+e)/2)-p)):0<g.thickness&&(a.moveTo(Math.round((f+
b)/2)-p,c+C.thickness/2),a.lineTo(Math.round((f+b)/2)-p,e-C.thickness/2));a.stroke();a.strokeStyle=C.color||h;a.lineWidth=C.thickness||2;a.setLineDash&&a.setLineDash(R(C.dashType,C.thickness));a.beginPath();d&&0<C.thickness?(a.moveTo(b-n,c),a.lineTo(b-n,e),a.moveTo(f+n,c),a.lineTo(f+n,e)):0<C.thickness&&(a.moveTo(f,c+n),a.lineTo(b,c+n),a.moveTo(f,e-n),a.lineTo(b,e-n));a.stroke();a.restore()}function F(a,f){F.base.constructor.call(this,"Legend","legend",f,null,a);this.chart=a;this.canvas=a.canvas;
this.ctx=this.chart.ctx;this.ghostCtx=this.chart._eventManager.ghostCtx;this.items=[];this.optionsName="legend";this.height=this.width=0;this.orientation=null;this.dataSeries=[];this.bounds={x1:null,y1:null,x2:null,y2:null};"undefined"===typeof this.options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize));this.lineHeight=db(this.fontFamily,this.fontSize,this.fontWeight);this.horizontalSpacing=this.fontSize}function I(a,f,c,b){I.base.constructor.call(this,"DataSeries","data",f,c,
a);this.chart=a;this.canvas=a.canvas;this._ctx=a.canvas.ctx;this.index=c;this.noDataPointsInPlotArea=0;this.id=b;this.chart._eventManager.objectMap[b]={id:b,objectType:"dataSeries",dataSeriesIndex:c};a=f.dataPoints?f.dataPoints.length:0;this.dataPointEOs=[];for(f=0;f<a;f++)this.dataPointEOs[f]={};this.dataPointIds=[];this.plotUnit=[];this.axisY=this.axisX=null;this.optionsName="data";this.isOptionsInArray=!0;null===this.fillOpacity&&(this.type.match(/area/i)?this.fillOpacity=0.7:this.fillOpacity=
1);this.axisPlacement=this.getDefaultAxisPlacement();"undefined"===typeof this.options.indexLabelFontSize&&(this.indexLabelFontSize=this.chart.getAutoFontSize(this.indexLabelFontSize))}function z(a,f,c,b,e,h){z.base.constructor.call(this,"Axis",f,c,b,a);this.chart=a;this.canvas=a.canvas;this.ctx=a.ctx;this.intervalStartPosition=this.maxHeight=this.maxWidth=0;this.labels=[];this.dataSeries=[];this._stripLineLabels=this._ticks=this._labels=null;this.dataInfo={min:Infinity,max:-Infinity,viewPortMin:Infinity,
viewPortMax:-Infinity,minDiff:Infinity};this.isOptionsInArray=!0;"axisX"===e?("left"===h||"bottom"===h?(this.optionsName="axisX",g(this.chart.sessionVariables.axisX[b])&&(this.chart.sessionVariables.axisX[b]={}),this.sessionVariables=this.chart.sessionVariables.axisX[b]):(this.optionsName="axisX2",g(this.chart.sessionVariables.axisX2[b])&&(this.chart.sessionVariables.axisX2[b]={}),this.sessionVariables=this.chart.sessionVariables.axisX2[b]),this.options.interval||(this.intervalType=null)):"left"===
h||"bottom"===h?(this.optionsName="axisY",g(this.chart.sessionVariables.axisY[b])&&(this.chart.sessionVariables.axisY[b]={}),this.sessionVariables=this.chart.sessionVariables.axisY[b]):(this.optionsName="axisY2",g(this.chart.sessionVariables.axisY2[b])&&(this.chart.sessionVariables.axisY2[b]={}),this.sessionVariables=this.chart.sessionVariables.axisY2[b]);"undefined"===typeof this.options.titleFontSize&&(this.titleFontSize=this.chart.getAutoFontSize(this.titleFontSize));"undefined"===typeof this.options.labelFontSize&&
(this.labelFontSize=this.chart.getAutoFontSize(this.labelFontSize));this.type=e;"axisX"!==e||c&&"undefined"!==typeof c.gridThickness||(this.gridThickness=0);this._position=h;this.lineCoordinates={x1:null,y1:null,x2:null,y2:null,width:null};this.labelAngle=(this.labelAngle%360+360)%360;90<this.labelAngle&&270>this.labelAngle?this.labelAngle-=180:270<=this.labelAngle&&360>=this.labelAngle&&(this.labelAngle-=360);this.options.scaleBreaks&&(this.scaleBreaks=new M(this.chart,this.options.scaleBreaks,++this.chart._eventManager.lastObjectId,
this));this.stripLines=[];if(this.options.stripLines&&0<this.options.stripLines.length)for(a=0;a<this.options.stripLines.length;a++)this.stripLines.push(new N(this.chart,this.options.stripLines[a],a,++this.chart._eventManager.lastObjectId,this));this.options.crosshair&&(this.crosshair=new X(this.chart,this.options.crosshair,this));this._titleTextBlock=null;this.hasOptionChanged("viewportMinimum")&&null===this.viewportMinimum&&(this.options.viewportMinimum=void 0,this.sessionVariables.viewportMinimum=
null);this.hasOptionChanged("viewportMinimum")||isNaN(this.sessionVariables.newViewportMinimum)||null===this.sessionVariables.newViewportMinimum?this.sessionVariables.newViewportMinimum=null:this.viewportMinimum=this.sessionVariables.newViewportMinimum;this.hasOptionChanged("viewportMaximum")&&null===this.viewportMaximum&&(this.options.viewportMaximum=void 0,this.sessionVariables.viewportMaximum=null);this.hasOptionChanged("viewportMaximum")||isNaN(this.sessionVariables.newViewportMaximum)||null===
this.sessionVariables.newViewportMaximum?this.sessionVariables.newViewportMaximum=null:this.viewportMaximum=this.sessionVariables.newViewportMaximum;null!==this.minimum&&null!==this.viewportMinimum&&(this.viewportMinimum=Math.max(this.viewportMinimum,this.minimum));null!==this.maximum&&null!==this.viewportMaximum&&(this.viewportMaximum=Math.min(this.viewportMaximum,this.maximum));this.trackChanges("viewportMinimum");this.trackChanges("viewportMaximum")}function M(a,f,c,b){M.base.constructor.call(this,
"ScaleBreaks","scaleBreaks",f,null,b);this.id=c;this.chart=a;this.ctx=this.chart.ctx;this.axis=b;this.optionsName="scaleBreaks";this.isOptionsInArray=!1;this._appliedBreaks=[];this.customBreaks=[];this.autoBreaks=[];"string"===typeof this.spacing?(this.spacing=parseFloat(this.spacing),this.spacing=isNaN(this.spacing)?8:(10<this.spacing?10:this.spacing)+"%"):"number"!==typeof this.spacing&&(this.spacing=8);this.autoCalculate&&(this.maxNumberOfAutoBreaks=Math.min(this.maxNumberOfAutoBreaks,5));if(this.options.customBreaks&&
0<this.options.customBreaks.length){for(a=0;a<this.options.customBreaks.length;a++)this.customBreaks.push(new Y(this.chart,"customBreaks",this.options.customBreaks[a],a,++this.chart._eventManager.lastObjectId,this)),"number"===typeof this.customBreaks[a].startValue&&("number"===typeof this.customBreaks[a].endValue&&this.customBreaks[a].endValue!==this.customBreaks[a].startValue)&&this._appliedBreaks.push(this.customBreaks[a]);this._appliedBreaks.sort(function(a,b){return a.startValue-b.startValue});
for(a=0;a<this._appliedBreaks.length-1;a++)this._appliedBreaks[a].endValue>=this._appliedBreaks[a+1].startValue&&(this._appliedBreaks[a].endValue=Math.max(this._appliedBreaks[a].endValue,this._appliedBreaks[a+1].endValue),window.console&&window.console.log("CanvasJS Error: Breaks "+a+" and "+(a+1)+" are overlapping."),this._appliedBreaks.splice(a,2),a--)}}function Y(a,f,c,b,e,h){Y.base.constructor.call(this,"Break",f,c,b,h);this.id=e;this.chart=a;this.ctx=this.chart.ctx;this.scaleBreaks=h;this.optionsName=
f;this.isOptionsInArray=!0;this.type=c.type?this.type:h.type;this.fillOpacity=g(c.fillOpacity)?h.fillOpacity:this.fillOpacity;this.lineThickness=g(c.lineThickness)?h.lineThickness:this.lineThickness;this.color=c.color?this.color:h.color;this.lineColor=c.lineColor?this.lineColor:h.lineColor;this.lineDashType=c.lineDashType?this.lineDashType:h.lineDashType;!g(this.startValue)&&this.startValue.getTime&&(this.startValue=this.startValue.getTime());!g(this.endValue)&&this.endValue.getTime&&(this.endValue=
this.endValue.getTime());"number"===typeof this.startValue&&("number"===typeof this.endValue&&this.endValue<this.startValue)&&(a=this.startValue,this.startValue=this.endValue,this.endValue=a);this.spacing="undefined"===typeof c.spacing?h.spacing:c.spacing;"string"===typeof this.options.spacing?(this.spacing=parseFloat(this.spacing),this.spacing=isNaN(this.spacing)?0:(10<this.spacing?10:this.spacing)+"%"):"number"!==typeof this.options.spacing&&(this.spacing=h.spacing);this.size=h.parent.logarithmic?
1:0}function N(a,f,c,b,e){N.base.constructor.call(this,"StripLine","stripLines",f,c,e);this.id=b;this.chart=a;this.ctx=this.chart.ctx;this.label=this.label;this.axis=e;this.optionsName="stripLines";this.isOptionsInArray=!0;this._thicknessType="pixel";null!==this.startValue&&null!==this.endValue&&(this.value=e.logarithmic?Math.sqrt((this.startValue.getTime?this.startValue.getTime():this.startValue)*(this.endValue.getTime?this.endValue.getTime():this.endValue)):((this.startValue.getTime?this.startValue.getTime():
this.startValue)+(this.endValue.getTime?this.endValue.getTime():this.endValue))/2,this._thicknessType=null)}function X(a,f,c){X.base.constructor.call(this,"Crosshair","crosshair",f,null,c);this.chart=a;this.ctx=this.chart.ctx;this.axis=c;this.optionsName="crosshair";this._thicknessType="pixel"}function ra(a,f){ra.base.constructor.call(this,"ToolTip","toolTip",f,null,a);this.chart=a;this.canvas=a.canvas;this.ctx=this.chart.ctx;this.currentDataPointIndex=this.currentSeriesIndex=-1;this._prevY=this._prevX=
NaN;this.containerTransitionDuration=0.1;this.mozContainerTransition=this.getContainerTransition(this.containerTransitionDuration);this.optionsName="toolTip";this._initialize()}function ea(a){this.chart=a;this.lastObjectId=0;this.objectMap=[];this.rectangularRegionEventSubscriptions=[];this.previousDataPointEventObject=null;this.ghostCanvas=ta(this.chart.width,this.chart.height);this.ghostCtx=this.ghostCanvas.getContext("2d");this.mouseoveredObjectMaps=[]}function ma(a){this.chart=a;this.ctx=this.chart.plotArea.ctx;
this.animations=[];this.animationRequestId=null}ia(r,aa);r.prototype.destroy=function(){var a=this.allDOMEventHandlers;this._animator&&this._animator.cancelAllAnimations();this._panTimerId&&clearTimeout(this._panTimerId);for(var f=0;f<a.length;f++)fb(a[f][0],a[f][1],a[f][2],a[f][3]);this.allDOMEventHandlers=[];for(this.removeAllEventListeners();this._canvasJSContainer&&this._canvasJSContainer.hasChildNodes();)this._canvasJSContainer.removeChild(this._canvasJSContainer.lastChild);for(;this.container&&
this.container.hasChildNodes();)this.container.removeChild(this.container.lastChild);for(;this._dropdownMenu&&this._dropdownMenu.hasChildNodes();)this._dropdownMenu.removeChild(this._dropdownMenu.lastChild);this.container=this._canvasJSContainer=null;this.toolTip.container=null;this.canvas&&Ca(this.canvas);this.overlaidCanvas&&Ca(this.overlaidCanvas);this._preRenderCanvas&&Ca(this._preRenderCanvas);this._breaksCanvas&&Ca(this._breaksCanvas);this._eventManager&&this._eventManager.ghostCanvas&&Ca(this._eventManager.ghostCanvas);
this._toolBar=this._dropdownMenu=this._menuButton=this._resetButton=this._zoomButton=null};r.prototype._updateOptions=function(){var a=this;this.updateOption("width");this.updateOption("height");this.updateOption("dataPointWidth");this.updateOption("dataPointMinWidth");this.updateOption("dataPointMaxWidth");this.updateOption("interactivityEnabled");this.updateOption("theme");this.updateOption("colorSet")&&(this.selectedColorSet="undefined"!==typeof xa[this.colorSet]?xa[this.colorSet]:xa.colorSet1);
this.updateOption("backgroundColor");this.backgroundColor||(this.backgroundColor="rgba(0,0,0,0)");this.updateOption("culture");this._cultureInfo=new Na(this.options.culture);this.updateOption("animationEnabled");this.animationEnabled=this.animationEnabled&&u;this.updateOption("animationDuration");this.updateOption("rangeChanging");this.updateOption("rangeChanged");this.updateOption("exportEnabled");this.updateOption("exportFileName");this.updateOption("zoomType");this.toolbar=new Va(this,this.options.toolbar);
if(this.options.zoomEnabled||this.panEnabled){if(this._zoomButton)O(this._zoomButton,{borderRight:this.toolbar.buttonBorderThickness+"px solid "+this.toolbar.buttonBorderColor,backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor}),this._zoomButton.title=this._cultureInfo.zoomText;else{var f=!1;ya(this._zoomButton=document.createElement("button"));Ba(this,this._zoomButton,"pan");this._zoomButton.title=this._cultureInfo.panText;this._toolBar.appendChild(this._zoomButton);this._zoomButton.style.borderRight=
this.toolbar.buttonBorderThickness+"px solid "+this.toolbar.buttonBorderColor;D(this._zoomButton,"touchstart",function(a){f=!0},this.allDOMEventHandlers);D(this._zoomButton,"click",function(){a.zoomEnabled?(a.zoomEnabled=!1,a.panEnabled=!0,Ba(a,a._zoomButton,"zoom")):(a.zoomEnabled=!0,a.panEnabled=!1,Ba(a,a._zoomButton,"pan"));a.render()},this.allDOMEventHandlers);D(this._zoomButton,"mousemove",function(){f?f=!1:(O(a._zoomButton,{backgroundColor:a.toolbar.itemBackgroundColorOnHover,color:a.toolbar.fontColorOnHover,
transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&O(a._zoomButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},this.allDOMEventHandlers);D(this._zoomButton,"mouseout",function(){f||(O(a._zoomButton,{backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&O(a._zoomButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}))},this.allDOMEventHandlers)}this._resetButton?
(O(this._resetButton,{borderRight:this.toolbar.buttonBorderThickness+"px solid "+this.toolbar.buttonBorderColor,backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor}),this._resetButton.title=this._cultureInfo.resetText):(f=!1,ya(this._resetButton=document.createElement("button")),Ba(this,this._resetButton,"reset"),this._resetButton.style.borderRight=(this.exportEnabled?this.toolbar.buttonBorderThickness:0)+"px solid "+this.toolbar.buttonBorderColor,this._toolBar.appendChild(this._resetButton),
D(this._resetButton,"touchstart",function(a){f=!0},this.allDOMEventHandlers),D(this._resetButton,"click",function(){a.toolTip.hide();a.toolTip&&a.toolTip.enabled&&a.toolTip.dispatchEvent("hidden",{chart:a,toolTip:a.toolTip},a.toolTip);a.zoomEnabled||a.panEnabled?(a.zoomEnabled=!0,a.panEnabled=!1,Ba(a,a._zoomButton,"pan"),a._defaultCursor="default",a.overlaidCanvas.style.cursor=a._defaultCursor):(a.zoomEnabled=!1,a.panEnabled=!1);if(a.sessionVariables.axisX)for(var b=0;b<a.sessionVariables.axisX.length;b++)a.sessionVariables.axisX[b].newViewportMinimum=
null,a.sessionVariables.axisX[b].newViewportMaximum=null;if(a.sessionVariables.axisX2)for(b=0;b<a.sessionVariables.axisX2.length;b++)a.sessionVariables.axisX2[b].newViewportMinimum=null,a.sessionVariables.axisX2[b].newViewportMaximum=null;if(a.sessionVariables.axisY)for(b=0;b<a.sessionVariables.axisY.length;b++)a.sessionVariables.axisY[b].newViewportMinimum=null,a.sessionVariables.axisY[b].newViewportMaximum=null;if(a.sessionVariables.axisY2)for(b=0;b<a.sessionVariables.axisY2.length;b++)a.sessionVariables.axisY2[b].newViewportMinimum=
null,a.sessionVariables.axisY2[b].newViewportMaximum=null;a.resetOverlayedCanvas();0>=navigator.userAgent.search("MSIE")&&O(a._resetButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"});ya(a._zoomButton,a._resetButton);a.stockChart&&(a.stockChart._rangeEventParameter={stockChart:a.stockChart,source:"chart",index:a.stockChart.charts.indexOf(a),minimum:null,maximum:null});a._dispatchRangeEvent("rangeChanging","reset");a.stockChart&&(a.stockChart._rangeEventParameter.type="rangeChanging",
a.stockChart.dispatchEvent("rangeChanging",a.stockChart._rangeEventParameter,a.stockChart));a.render();a.syncCharts&&a.syncCharts(null,null);a._dispatchRangeEvent("rangeChanged","reset");a.stockChart&&(a.stockChart._rangeEventParameter.type="rangeChanged",a.stockChart.dispatchEvent("rangeChanged",a.stockChart._rangeEventParameter,a.stockChart))},this.allDOMEventHandlers),D(this._resetButton,"mousemove",function(){f||(O(a._resetButton,{backgroundColor:a.toolbar.itemBackgroundColorOnHover,color:a.toolbar.fontColorOnHover,
transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&O(a._resetButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))},this.allDOMEventHandlers),D(this._resetButton,"mouseout",function(){f||(O(a._resetButton,{backgroundColor:a.toolbar.itemBackgroundColor,color:a.toolbar.fontColor,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&O(a._resetButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}))},this.allDOMEventHandlers),
this.overlaidCanvas.style.cursor=a._defaultCursor);this.zoomEnabled||this.panEnabled||(this._zoomButton?(a._zoomButton.getAttribute("state")===a._cultureInfo.zoomText?(this.panEnabled=!0,this.zoomEnabled=!1):(this.zoomEnabled=!0,this.panEnabled=!1),Ra(a._zoomButton,a._resetButton)):(this.zoomEnabled=!0,this.panEnabled=!1))}else this.panEnabled=this.zoomEnabled=!1;hb(this);"none"!==this._toolBar.style.display&&this._zoomButton&&(this.panEnabled?Ba(a,a._zoomButton,"zoom"):Ba(a,a._zoomButton,"pan"),
a._resetButton.getAttribute("state")!==a._cultureInfo.resetText&&Ba(a,a._resetButton,"reset"));this.options.toolTip&&this.toolTip.options!==this.options.toolTip&&(this.toolTip.options=this.options.toolTip);for(var c in this.toolTip.options)this.toolTip.options.hasOwnProperty(c)&&this.toolTip.updateOption(c)};r.prototype._updateSize=function(){return lb.call(this,[this.canvas,this.overlaidCanvas,this._eventManager.ghostCanvas])};r.prototype._initialize=function(){this.isNavigator=g(this.parent)||g(this.parent._defaultsKey)||
"Navigator"!==this.parent._defaultsKey?!1:!0;this._animator?this._animator.cancelAllAnimations():this._animator=new ma(this);this.removeAllEventListeners();this.disableToolTip=!1;this._axes=[];this.funnelPyramidClickHandler=this.pieDoughnutClickHandler=null;this._updateOptions();this.animatedRender=u&&this.animationEnabled&&0===this.renderCount;this._updateSize();this.clearCanvas();this.ctx.beginPath();this.axisX=[];this.axisX2=[];this.axisY=[];this.axisY2=[];this._indexLabels=[];this._dataInRenderedOrder=
[];this._events=[];this._eventManager&&this._eventManager.reset();this.plotInfo={axisPlacement:null,plotTypes:[]};this.layoutManager=new Ka(0,0,this.width,this.height,this.isNavigator?0:2);this.plotArea.layoutManager&&this.plotArea.layoutManager.reset();this.data=[];this.title=null;this.subtitles=[];var a=0,f=null;if(this.options.data){for(var c=0;c<this.options.data.length;c++)if(a++,!this.options.data[c].type||0<=r._supportedChartTypes.indexOf(this.options.data[c].type)){var b=new I(this,this.options.data[c],
a-1,++this._eventManager.lastObjectId);"error"===b.type&&(b.linkedDataSeriesIndex=g(this.options.data[c].linkedDataSeriesIndex)?c-1:this.options.data[c].linkedDataSeriesIndex,0>b.linkedDataSeriesIndex||b.linkedDataSeriesIndex>=this.options.data.length||"number"!==typeof b.linkedDataSeriesIndex||"error"===this.options.data[b.linkedDataSeriesIndex].type)&&(b.linkedDataSeriesIndex=null);null===b.name&&(b.name="DataSeries "+a);null===b.color?1<this.options.data.length?(b._colorSet=[this.selectedColorSet[b.index%
this.selectedColorSet.length]],b.color=this.selectedColorSet[b.index%this.selectedColorSet.length]):b._colorSet="line"===b.type||"stepLine"===b.type||"spline"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"stackedArea"===b.type||"stackedArea100"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type||"candlestick"===b.type||"ohlc"===b.type||"waterfall"===b.type||"boxAndWhisker"===b.type?[this.selectedColorSet[0]]:this.selectedColorSet:b._colorSet=[b.color];null===b.markerSize&&
(("line"===b.type||"stepLine"===b.type||"spline"===b.type||0<=b.type.toLowerCase().indexOf("area"))&&b.dataPoints&&b.dataPoints.length<this.width/16||"scatter"===b.type)&&(b.markerSize=8);"bubble"!==b.type&&"scatter"!==b.type||!b.dataPoints||(b.dataPoints.some?b.dataPoints.some(function(a){return a.x})&&b.dataPoints.sort(k):b.dataPoints.sort(k));this.data.push(b);var e=b.axisPlacement,f=f||e,h;"normal"===e?"xySwapped"===this.plotInfo.axisPlacement?h='You cannot combine "'+b.type+'" with bar chart':
"none"===this.plotInfo.axisPlacement?h='You cannot combine "'+b.type+'" with pie chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="normal"):"xySwapped"===e?"normal"===this.plotInfo.axisPlacement?h='You cannot combine "'+b.type+'" with line, area, column or pie chart':"none"===this.plotInfo.axisPlacement?h='You cannot combine "'+b.type+'" with pie chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="xySwapped"):"none"===e?"normal"===this.plotInfo.axisPlacement?
h='You cannot combine "'+b.type+'" with line, area, column or bar chart':"xySwapped"===this.plotInfo.axisPlacement?h='You cannot combine "'+b.type+'" with bar chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="none"):null===e&&"none"===this.plotInfo.axisPlacement&&(h='You cannot combine "'+b.type+'" with pie chart');if(h&&window.console){window.console.log(h);return}}for(c=0;c<this.data.length;c++){if("none"==f&&"error"===this.data[c].type&&window.console){window.console.log('You cannot combine "'+
b.type+'" with error chart');return}"error"===this.data[c].type&&(this.data[c].axisPlacement=this.plotInfo.axisPlacement=f||"normal",this.data[c]._linkedSeries=null===this.data[c].linkedDataSeriesIndex?null:this.data[this.data[c].linkedDataSeriesIndex])}}this._objectsInitialized=!0;this._plotAreaElements=[]};r._supportedChartTypes=Da("line stepLine spline column area stepArea splineArea bar bubble scatter stackedColumn stackedColumn100 stackedBar stackedBar100 stackedArea stackedArea100 candlestick ohlc boxAndWhisker rangeColumn error rangeBar rangeArea rangeSplineArea pie doughnut funnel pyramid waterfall".split(" "));
r.prototype.setLayout=function(){for(var a=this._plotAreaElements,f=0;f<this.data.length;f++)if("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement){if(!this.data[f].axisYType||"primary"===this.data[f].axisYType)if(this.options.axisY&&0<this.options.axisY.length){if(!this.axisY.length)for(var c=0;c<this.options.axisY.length;c++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY[c]=new z(this,"axisY",this.options.axisY[c],c,"axisY","left")):"xySwapped"===
this.plotInfo.axisPlacement&&this._axes.push(this.axisY[c]=new z(this,"axisY",this.options.axisY[c],c,"axisY","bottom"));this.data[f].axisY=this.axisY[0<=this.data[f].axisYIndex&&this.data[f].axisYIndex<this.axisY.length?this.data[f].axisYIndex:0];this.axisY[0<=this.data[f].axisYIndex&&this.data[f].axisYIndex<this.axisY.length?this.data[f].axisYIndex:0].dataSeries.push(this.data[f])}else this.axisY.length||("normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY[0]=new z(this,"axisY",this.options.axisY,
0,"axisY","left")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY[0]=new z(this,"axisY",this.options.axisY,0,"axisY","bottom"))),this.data[f].axisY=this.axisY[0],this.axisY[0].dataSeries.push(this.data[f]);if("secondary"===this.data[f].axisYType)if(this.options.axisY2&&0<this.options.axisY2.length){if(!this.axisY2.length)for(c=0;c<this.options.axisY2.length;c++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY2[c]=new z(this,"axisY2",this.options.axisY2[c],c,
"axisY","right")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY2[c]=new z(this,"axisY2",this.options.axisY2[c],c,"axisY","top"));this.data[f].axisY=this.axisY2[0<=this.data[f].axisYIndex&&this.data[f].axisYIndex<this.axisY2.length?this.data[f].axisYIndex:0];this.axisY2[0<=this.data[f].axisYIndex&&this.data[f].axisYIndex<this.axisY2.length?this.data[f].axisYIndex:0].dataSeries.push(this.data[f])}else this.axisY2.length||("normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY2[0]=
new z(this,"axisY2",this.options.axisY2,0,"axisY","right")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY2[0]=new z(this,"axisY2",this.options.axisY2,0,"axisY","top"))),this.data[f].axisY=this.axisY2[0],this.axisY2[0].dataSeries.push(this.data[f]);if(!this.data[f].axisXType||"primary"===this.data[f].axisXType)if(this.options.axisX&&0<this.options.axisX.length){if(!this.axisX.length)for(c=0;c<this.options.axisX.length;c++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisX[c]=
new z(this,"axisX",this.options.axisX[c],c,"axisX","bottom")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX[c]=new z(this,"axisX",this.options.axisX[c],c,"axisX","left"));this.data[f].axisX=this.axisX[0<=this.data[f].axisXIndex&&this.data[f].axisXIndex<this.axisX.length?this.data[f].axisXIndex:0];this.axisX[0<=this.data[f].axisXIndex&&this.data[f].axisXIndex<this.axisX.length?this.data[f].axisXIndex:0].dataSeries.push(this.data[f])}else this.axisX.length||("normal"===this.plotInfo.axisPlacement?
this._axes.push(this.axisX[0]=new z(this,"axisX",this.options.axisX,0,"axisX","bottom")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX[0]=new z(this,"axisX",this.options.axisX,0,"axisX","left"))),this.data[f].axisX=this.axisX[0],this.axisX[0].dataSeries.push(this.data[f]);if("secondary"===this.data[f].axisXType)if(this.options.axisX2&&0<this.options.axisX2.length){if(!this.axisX2.length)for(c=0;c<this.options.axisX2.length;c++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisX2[c]=
new z(this,"axisX2",this.options.axisX2[c],c,"axisX","top")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX2[c]=new z(this,"axisX2",this.options.axisX2[c],c,"axisX","right"));this.data[f].axisX=this.axisX2[0<=this.data[f].axisXIndex&&this.data[f].axisXIndex<this.axisX2.length?this.data[f].axisXIndex:0];this.axisX2[0<=this.data[f].axisXIndex&&this.data[f].axisXIndex<this.axisX2.length?this.data[f].axisXIndex:0].dataSeries.push(this.data[f])}else this.axisX2.length||("normal"===
this.plotInfo.axisPlacement?this._axes.push(this.axisX2[0]=new z(this,"axisX2",this.options.axisX2,0,"axisX","top")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX2[0]=new z(this,"axisX2",this.options.axisX2,0,"axisX","right"))),this.data[f].axisX=this.axisX2[0],this.axisX2[0].dataSeries.push(this.data[f])}if(this.axisY){for(c=1;c<this.axisY.length;c++)"undefined"===typeof this.axisY[c].options.gridThickness&&(this.axisY[c].gridThickness=0);for(c=0;c<this.axisY.length-1;c++)"undefined"===
typeof this.axisY[c].options.margin&&(this.axisY[c].margin=10)}if(this.axisY2){for(c=1;c<this.axisY2.length;c++)"undefined"===typeof this.axisY2[c].options.gridThickness&&(this.axisY2[c].gridThickness=0);for(c=0;c<this.axisY2.length-1;c++)"undefined"===typeof this.axisY2[c].options.margin&&(this.axisY2[c].margin=10)}this.axisY&&0<this.axisY.length&&(this.axisY2&&0<this.axisY2.length)&&(0<this.axisY[0].gridThickness&&"undefined"===typeof this.axisY2[0].options.gridThickness?this.axisY2[0].gridThickness=
0:0<this.axisY2[0].gridThickness&&"undefined"===typeof this.axisY[0].options.gridThickness&&(this.axisY[0].gridThickness=0));if(this.axisX)for(c=0;c<this.axisX.length;c++)"undefined"===typeof this.axisX[c].options.gridThickness&&(this.axisX[c].gridThickness=0);if(this.axisX2)for(c=0;c<this.axisX2.length;c++)"undefined"===typeof this.axisX2[c].options.gridThickness&&(this.axisX2[c].gridThickness=0);this.axisX&&0<this.axisX.length&&(this.axisX2&&0<this.axisX2.length)&&(0<this.axisX[0].gridThickness&&
"undefined"===typeof this.axisX2[0].options.gridThickness?this.axisX2[0].gridThickness=0:0<this.axisX2[0].gridThickness&&"undefined"===typeof this.axisX[0].options.gridThickness&&(this.axisX[0].gridThickness=0));c=!1;if(0<this._axes.length&&this.options.zoomEnabled&&(this.zoomEnabled||this.panEnabled))for(f=0;f<this._axes.length;f++)if(!g(this._axes[f].viewportMinimum)||!g(this._axes[f].viewportMaximum)){c=!0;break}c?(Ra(this._zoomButton,this._resetButton),this._toolBar.style.border=this.toolbar.buttonBorderThickness+
"px solid "+this.toolbar.buttonBorderColor,this._zoomButton.style.borderRight=this.toolbar.buttonBorderThickness+"px solid "+this.toolbar.buttonBorderColor,this._resetButton.style.borderRight=(this.exportEnabled?this.toolbar.buttonBorderThickness:0)+"px solid "+this.toolbar.buttonBorderColor):(ya(this._zoomButton,this._resetButton),this._toolBar.style.border=this.toolbar.buttonBorderThickness+"px solid transparent",this.options.zoomEnabled&&(this.zoomEnabled=!0,this.panEnabled=!1));qb(this);this._processData();
this.options.title&&(this.title=new Ha(this,this.options.title),this.title.dockInsidePlotArea?a.push(this.title):this.title.setLayout());if(this.options.subtitles)for(f=0;f<this.options.subtitles.length;f++)c=new Ma(this,this.options.subtitles[f],f),this.subtitles.push(c),c.dockInsidePlotArea?a.push(c):c.setLayout();this.legend=new F(this,this.options.legend);for(f=0;f<this.data.length;f++)(this.data[f].showInLegend||"pie"===this.data[f].type||"doughnut"===this.data[f].type||"funnel"===this.data[f].type||
"pyramid"===this.data[f].type)&&this.legend.dataSeries.push(this.data[f]);this.legend.dockInsidePlotArea?a.push(this.legend):this.legend.setLayout();for(f=0;f<this._axes.length;f++)if(this._axes[f].scaleBreaks&&this._axes[f].scaleBreaks._appliedBreaks.length){u?(this._breaksCanvas=ta(this.width,this.height,!0),this._breaksCanvasCtx=this._breaksCanvas.getContext("2d")):(this._breaksCanvas=this.canvas,this._breaksCanvasCtx=this.ctx);break}this._preRenderCanvas=ta(this.width,this.height);this._preRenderCtx=
this._preRenderCanvas.getContext("2d");"normal"!==this.plotInfo.axisPlacement&&"xySwapped"!==this.plotInfo.axisPlacement||z.setLayout(this.axisX,this.axisX2,this.axisY,this.axisY2,this.plotInfo.axisPlacement,this.layoutManager.getFreeSpace())};r.prototype.renderElements=function(){var a=this._plotAreaElements;this.title&&!this.title.dockInsidePlotArea&&this.title.render();for(var f=0;f<this.subtitles.length;f++)this.subtitles[f].dockInsidePlotArea||this.subtitles[f].render();this.legend.dockInsidePlotArea||
this.legend.render();if("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement)z.render(this.axisX,this.axisX2,this.axisY,this.axisY2,this.plotInfo.axisPlacement);else if("none"===this.plotInfo.axisPlacement)this.preparePlotArea();else return;for(f=0;f<a.length;f++)a[f].setLayout(),a[f].render();var c=[];if(this.animatedRender){var b=ta(this.width,this.height);b.getContext("2d").drawImage(this.canvas,0,0,this.width,this.height)}sb(this);var a=this.ctx.miterLimit,e;this.ctx.miterLimit=
3;u&&this._breaksCanvas&&(this._preRenderCtx.drawImage(this.canvas,0,0,this.width,this.height),this._preRenderCtx.drawImage(this._breaksCanvas,0,0,this.width,this.height),this._breaksCanvasCtx.globalCompositeOperation="source-atop",this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),this._preRenderCtx.clearRect(0,0,this.width,this.height));for(f=0;f<this.plotInfo.plotTypes.length;f++)for(var h=this.plotInfo.plotTypes[f],C=0;C<h.plotUnits.length;C++){var g=h.plotUnits[C],
d=null;g.targetCanvas&&Ca(g.targetCanvas);g.targetCanvas=null;this.animatedRender&&(g.targetCanvas=ta(this.width,this.height),g.targetCanvasCtx=g.targetCanvas.getContext("2d"),e=g.targetCanvasCtx.miterLimit,g.targetCanvasCtx.miterLimit=3);"line"===g.type?d=this.renderLine(g):"stepLine"===g.type?d=this.renderStepLine(g):"spline"===g.type?d=this.renderSpline(g):"column"===g.type?d=this.renderColumn(g):"bar"===g.type?d=this.renderBar(g):"area"===g.type?d=this.renderArea(g):"stepArea"===g.type?d=this.renderStepArea(g):
"splineArea"===g.type?d=this.renderSplineArea(g):"stackedColumn"===g.type?d=this.renderStackedColumn(g):"stackedColumn100"===g.type?d=this.renderStackedColumn100(g):"stackedBar"===g.type?d=this.renderStackedBar(g):"stackedBar100"===g.type?d=this.renderStackedBar100(g):"stackedArea"===g.type?d=this.renderStackedArea(g):"stackedArea100"===g.type?d=this.renderStackedArea100(g):"bubble"===g.type?d=d=this.renderBubble(g):"scatter"===g.type?d=this.renderScatter(g):"pie"===g.type?this.renderPie(g):"doughnut"===
g.type?this.renderPie(g):"funnel"===g.type?d=this.renderFunnel(g):"pyramid"===g.type?d=this.renderFunnel(g):"candlestick"===g.type?d=this.renderCandlestick(g):"ohlc"===g.type?d=this.renderCandlestick(g):"rangeColumn"===g.type?d=this.renderRangeColumn(g):"error"===g.type?d=this.renderError(g):"rangeBar"===g.type?d=this.renderRangeBar(g):"rangeArea"===g.type?d=this.renderRangeArea(g):"rangeSplineArea"===g.type?d=this.renderRangeSplineArea(g):"waterfall"===g.type?d=this.renderWaterfall(g):"boxAndWhisker"===
g.type&&(d=this.renderBoxAndWhisker(g));for(var m=0;m<g.dataSeriesIndexes.length;m++)this._dataInRenderedOrder.push(this.data[g.dataSeriesIndexes[m]]);this.animatedRender&&(g.targetCanvasCtx.miterLimit=e,d&&c.push(d))}this.ctx.miterLimit=a;this.animatedRender&&this._breaksCanvasCtx&&c.push({source:this._breaksCanvasCtx,dest:this.plotArea.ctx,animationCallback:x.fadeInAnimation,easingFunction:x.easing.easeInQuad,animationBase:0,startTimePercent:0.7});this.animatedRender&&0<this._indexLabels.length&&
(e=ta(this.width,this.height).getContext("2d"),c.push(this.renderIndexLabels(e)));var n=this;if(0<c.length)n.disableToolTip=!0,n._animator.animate(200,n.animationDuration,function(a){n.ctx.clearRect(0,0,n.width,n.height);n.ctx.drawImage(b,0,0,Math.floor(n.width*la),Math.floor(n.height*la),0,0,n.width,n.height);for(var f=0;f<c.length;f++)d=c[f],1>a&&"undefined"!==typeof d.startTimePercent?a>=d.startTimePercent&&d.animationCallback(d.easingFunction(a-d.startTimePercent,0,1,1-d.startTimePercent),d):
d.animationCallback(d.easingFunction(a,0,1,1),d);n.dispatchEvent("dataAnimationIterationEnd",{chart:n})},function(){c=[];for(var a=0;a<n.plotInfo.plotTypes.length;a++)for(var f=n.plotInfo.plotTypes[a],e=0;e<f.plotUnits.length;e++){var h=f.plotUnits[e];h.targetCanvas&&Ca(h.targetCanvas);h.targetCanvas=null}b=null;n.disableToolTip=!1;n.dispatchEvent("dataAnimationEnd",{chart:n})});else{if(n._breaksCanvas)if(u)n.plotArea.ctx.drawImage(n._breaksCanvas,0,0,this.width,this.height);else for(m=0;m<n._axes.length;m++)n._axes[m].createMask();
0<n._indexLabels.length&&n.renderIndexLabels();n.dispatchEvent("dataAnimationIterationEnd",{chart:n});n.dispatchEvent("dataAnimationEnd",{chart:n})}this.attachPlotAreaEventHandlers();this.zoomEnabled||(this.panEnabled||!this._zoomButton||"none"===this._zoomButton.style.display)||ya(this._zoomButton,this._resetButton);this.toolTip._updateToolTip();this.renderCount++;La&&(n=this,setTimeout(function(){var a=document.getElementById("ghostCanvasCopy");a&&(Sa(a,n.width,n.height),a.getContext("2d").drawImage(n._eventManager.ghostCanvas,
0,0))},2E3));this._breaksCanvas&&(delete this._breaksCanvas,delete this._breaksCanvasCtx);for(m=0;m<this._axes.length;m++)this._axes[m].maskCanvas&&(delete this._axes[m].maskCanvas,delete this._axes[m].maskCtx)};r.prototype.render=function(a){a&&(this.options=a);this._initialize();this.setLayout();this.renderElements();this._preRenderCanvas&&Ca(this._preRenderCanvas)};r.prototype.attachPlotAreaEventHandlers=function(){this.attachEvent({context:this,chart:this,mousedown:this._plotAreaMouseDown,mouseup:this._plotAreaMouseUp,
mousemove:this._plotAreaMouseMove,cursor:this.panEnabled?"move":"default",capture:!0,bounds:this.plotArea})};r.prototype.categoriseDataSeries=function(){for(var a="",f=0;f<this.data.length;f++)if(a=this.data[f],a.dataPoints&&(0!==a.dataPoints.length&&a.visible)&&0<=r._supportedChartTypes.indexOf(a.type)){for(var c=null,b=!1,e=null,h=!1,C=0;C<this.plotInfo.plotTypes.length;C++)if(this.plotInfo.plotTypes[C].type===a.type){b=!0;c=this.plotInfo.plotTypes[C];break}b||(c={type:a.type,totalDataSeries:0,
plotUnits:[]},this.plotInfo.plotTypes.push(c));for(C=0;C<c.plotUnits.length;C++)if(c.plotUnits[C].axisYType===a.axisYType&&c.plotUnits[C].axisXType===a.axisXType&&c.plotUnits[C].axisYIndex===a.axisYIndex&&c.plotUnits[C].axisXIndex===a.axisXIndex){h=!0;e=c.plotUnits[C];break}h||(e={type:a.type,previousDataSeriesCount:0,index:c.plotUnits.length,plotType:c,axisXType:a.axisXType,axisYType:a.axisYType,axisYIndex:a.axisYIndex,axisXIndex:a.axisXIndex,axisY:"primary"===a.axisYType?this.axisY[0<=a.axisYIndex&&
a.axisYIndex<this.axisY.length?a.axisYIndex:0]:this.axisY2[0<=a.axisYIndex&&a.axisYIndex<this.axisY2.length?a.axisYIndex:0],axisX:"primary"===a.axisXType?this.axisX[0<=a.axisXIndex&&a.axisXIndex<this.axisX.length?a.axisXIndex:0]:this.axisX2[0<=a.axisXIndex&&a.axisXIndex<this.axisX2.length?a.axisXIndex:0],dataSeriesIndexes:[],yTotals:[],yAbsTotals:[]},c.plotUnits.push(e));c.totalDataSeries++;e.dataSeriesIndexes.push(f);a.plotUnit=e}for(f=0;f<this.plotInfo.plotTypes.length;f++)for(c=this.plotInfo.plotTypes[f],
C=a=0;C<c.plotUnits.length;C++)c.plotUnits[C].previousDataSeriesCount=a,a+=c.plotUnits[C].dataSeriesIndexes.length};r.prototype.assignIdToDataPoints=function(){for(var a=0;a<this.data.length;a++){var f=this.data[a];if(f.dataPoints)for(var c=f.dataPoints.length,b=0;b<c;b++)f.dataPointIds[b]=++this._eventManager.lastObjectId}};r.prototype._processData=function(){this.assignIdToDataPoints();this.categoriseDataSeries();for(var a=0;a<this.plotInfo.plotTypes.length;a++)for(var f=this.plotInfo.plotTypes[a],
c=0;c<f.plotUnits.length;c++){var b=f.plotUnits[c];"line"===b.type||"stepLine"===b.type||"spline"===b.type||"column"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"bar"===b.type||"bubble"===b.type||"scatter"===b.type?this._processMultiseriesPlotUnit(b):"stackedColumn"===b.type||"stackedBar"===b.type||"stackedArea"===b.type?this._processStackedPlotUnit(b):"stackedColumn100"===b.type||"stackedBar100"===b.type||"stackedArea100"===b.type?this._processStacked100PlotUnit(b):"candlestick"===
b.type||"ohlc"===b.type||"rangeColumn"===b.type||"rangeBar"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type||"error"===b.type||"boxAndWhisker"===b.type?this._processMultiYPlotUnit(b):"waterfall"===b.type&&this._processSpecificPlotUnit(b)}this.calculateAutoBreaks()};r.prototype._processMultiseriesPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var f=a.axisY.dataInfo,c=a.axisX.dataInfo,b,e,h=!1,C=0;C<a.dataSeriesIndexes.length;C++){var g=this.data[a.dataSeriesIndexes[C]],
d=0,m=!1,n=!1,p;if("normal"===g.axisPlacement||"xySwapped"===g.axisPlacement)var q=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:this.options.axisX&&this.options.axisX.viewportMinimum?this.options.axisX.viewportMinimum:this.options.axisX&&this.options.axisX.minimum?this.options.axisX.minimum:a.axisX.logarithmic?0:-Infinity,l=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:this.options.axisX&&this.options.axisX.viewportMaximum?
this.options.axisX.viewportMaximum:this.options.axisX&&this.options.axisX.maximum?this.options.axisX.maximum:Infinity;if(g.dataPoints[d].x&&g.dataPoints[d].x.getTime||"dateTime"===g.xValueType)h=!0;for(d=0;d<g.dataPoints.length;d++){"undefined"===typeof g.dataPoints[d].x&&(g.dataPoints[d].x=d+(a.axisX.logarithmic?1:0));g.dataPoints[d].x.getTime?(h=!0,b=g.dataPoints[d].x.getTime()):b=g.dataPoints[d].x;e=g.dataPoints[d].y;b<c.min&&(c.min=b);b>c.max&&(c.max=b);e<f.min&&"number"===typeof e&&(f.min=e);
e>f.max&&"number"===typeof e&&(f.max=e);if(0<d){if(a.axisX.logarithmic){var w=b/g.dataPoints[d-1].x;1>w&&(w=1/w);c.minDiff>w&&1!==w&&(c.minDiff=w)}else w=b-g.dataPoints[d-1].x,0>w&&(w*=-1),c.minDiff>w&&0!==w&&(c.minDiff=w);null!==e&&null!==g.dataPoints[d-1].y&&(a.axisY.logarithmic?(w=e/g.dataPoints[d-1].y,1>w&&(w=1/w),f.minDiff>w&&1!==w&&(f.minDiff=w)):(w=e-g.dataPoints[d-1].y,0>w&&(w*=-1),f.minDiff>w&&0!==w&&(f.minDiff=w)))}if(b<q&&!m)null!==e&&(p=b);else{if(!m&&(m=!0,0<d)){d-=2;continue}if(b>l&&
!n)n=!0;else if(b>l&&n)continue;g.dataPoints[d].label&&(a.axisX.labels[b]=g.dataPoints[d].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);null===e?c.viewPortMin===b&&p<b&&(c.viewPortMin=p):(e<f.viewPortMin&&"number"===typeof e&&(f.viewPortMin=e),e>f.viewPortMax&&"number"===typeof e&&(f.viewPortMax=e))}}g.axisX.valueType=g.xValueType=h?"dateTime":"number"}};r.prototype._processStackedPlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){for(var f=
a.axisY.dataInfo,c=a.axisX.dataInfo,b,e,h=!1,C=[],d=[],K=Infinity,m=-Infinity,n=0;n<a.dataSeriesIndexes.length;n++){var p=this.data[a.dataSeriesIndexes[n]],q=0,l=!1,w=!1,x;if("normal"===p.axisPlacement||"xySwapped"===p.axisPlacement)var u=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:this.options.axisX&&this.options.axisX.viewportMinimum?this.options.axisX.viewportMinimum:this.options.axisX&&this.options.axisX.minimum?this.options.axisX.minimum:-Infinity,
v=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:this.options.axisX&&this.options.axisX.viewportMaximum?this.options.axisX.viewportMaximum:this.options.axisX&&this.options.axisX.maximum?this.options.axisX.maximum:Infinity;if(p.dataPoints[q].x&&p.dataPoints[q].x.getTime||"dateTime"===p.xValueType)h=!0;for(q=0;q<p.dataPoints.length;q++){"undefined"===typeof p.dataPoints[q].x&&(p.dataPoints[q].x=q+(a.axisX.logarithmic?1:0));p.dataPoints[q].x.getTime?(h=!0,b=p.dataPoints[q].x.getTime()):
b=p.dataPoints[q].x;e=g(p.dataPoints[q].y)?0:p.dataPoints[q].y;b<c.min&&(c.min=b);b>c.max&&(c.max=b);if(0<q){if(a.axisX.logarithmic){var y=b/p.dataPoints[q-1].x;1>y&&(y=1/y);c.minDiff>y&&1!==y&&(c.minDiff=y)}else y=b-p.dataPoints[q-1].x,0>y&&(y*=-1),c.minDiff>y&&0!==y&&(c.minDiff=y);null!==e&&null!==p.dataPoints[q-1].y&&(a.axisY.logarithmic?0<e&&(y=e/p.dataPoints[q-1].y,1>y&&(y=1/y),f.minDiff>y&&1!==y&&(f.minDiff=y)):(y=e-p.dataPoints[q-1].y,0>y&&(y*=-1),f.minDiff>y&&0!==y&&(f.minDiff=y)))}if(b<u&&
!l)null!==p.dataPoints[q].y&&(x=b);else{if(!l&&(l=!0,0<q)){q-=2;continue}if(b>v&&!w)w=!0;else if(b>v&&w)continue;p.dataPoints[q].label&&(a.axisX.labels[b]=p.dataPoints[q].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);null===p.dataPoints[q].y?c.viewPortMin===b&&x<b&&(c.viewPortMin=x):(a.yTotals[b]=(a.yTotals[b]?a.yTotals[b]:0)+e,a.yAbsTotals[b]=(a.yAbsTotals[b]?a.yAbsTotals[b]:0)+Math.abs(e),0<=e?C[b]?C[b]+=e:(C[b]=e,K=Math.min(e,K)):d[b]?d[b]+=e:(d[b]=e,m=Math.max(e,
m)))}}a.axisY.scaleBreaks&&(a.axisY.scaleBreaks.autoCalculate&&1<=a.axisY.scaleBreaks.maxNumberOfAutoBreaks)&&(f.dataPointYPositiveSums?(f.dataPointYPositiveSums.push.apply(f.dataPointYPositiveSums,C),f.dataPointYNegativeSums.push.apply(f.dataPointYPositiveSums,d)):(f.dataPointYPositiveSums=C,f.dataPointYNegativeSums=d));p.axisX.valueType=p.xValueType=h?"dateTime":"number"}for(q in C)C.hasOwnProperty(q)&&!isNaN(q)&&(a=C[q],a<f.min&&(f.min=Math.min(a,K)),a>f.max&&(f.max=a),q<c.viewPortMin||q>c.viewPortMax||
(a<f.viewPortMin&&(f.viewPortMin=Math.min(a,K)),a>f.viewPortMax&&(f.viewPortMax=a)));for(q in d)d.hasOwnProperty(q)&&!isNaN(q)&&(a=d[q],a<f.min&&(f.min=a),a>f.max&&(f.max=Math.max(a,m)),q<c.viewPortMin||q>c.viewPortMax||(a<f.viewPortMin&&(f.viewPortMin=a),a>f.viewPortMax&&(f.viewPortMax=Math.max(a,m))))}};r.prototype._processStacked100PlotUnit=function(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){for(var f=a.axisY.dataInfo,c=a.axisX.dataInfo,b,e,h=!1,C=!1,d=!1,K=[],m=0;m<a.dataSeriesIndexes.length;m++){var n=
this.data[a.dataSeriesIndexes[m]],p=0,q=!1,l=!1,w;if("normal"===n.axisPlacement||"xySwapped"===n.axisPlacement)var x=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:this.options.axisX&&this.options.axisX.viewportMinimum?this.options.axisX.viewportMinimum:this.options.axisX&&this.options.axisX.minimum?this.options.axisX.minimum:-Infinity,u=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:this.options.axisX&&this.options.axisX.viewportMaximum?
this.options.axisX.viewportMaximum:this.options.axisX&&this.options.axisX.maximum?this.options.axisX.maximum:Infinity;if(n.dataPoints[p].x&&n.dataPoints[p].x.getTime||"dateTime"===n.xValueType)h=!0;for(p=0;p<n.dataPoints.length;p++){"undefined"===typeof n.dataPoints[p].x&&(n.dataPoints[p].x=p+(a.axisX.logarithmic?1:0));n.dataPoints[p].x.getTime?(h=!0,b=n.dataPoints[p].x.getTime()):b=n.dataPoints[p].x;e=g(n.dataPoints[p].y)?null:n.dataPoints[p].y;b<c.min&&(c.min=b);b>c.max&&(c.max=b);if(0<p){if(a.axisX.logarithmic){var v=
b/n.dataPoints[p-1].x;1>v&&(v=1/v);c.minDiff>v&&1!==v&&(c.minDiff=v)}else v=b-n.dataPoints[p-1].x,0>v&&(v*=-1),c.minDiff>v&&0!==v&&(c.minDiff=v);g(e)||null===n.dataPoints[p-1].y||(a.axisY.logarithmic?0<e&&(v=e/n.dataPoints[p-1].y,1>v&&(v=1/v),f.minDiff>v&&1!==v&&(f.minDiff=v)):(v=e-n.dataPoints[p-1].y,0>v&&(v*=-1),f.minDiff>v&&0!==v&&(f.minDiff=v)))}if(b<x&&!q)null!==e&&(w=b);else{if(!q&&(q=!0,0<p)){p-=2;continue}if(b>u&&!l)l=!0;else if(b>u&&l)continue;n.dataPoints[p].label&&(a.axisX.labels[b]=n.dataPoints[p].label);
b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);null===e?c.viewPortMin===b&&w<b&&(c.viewPortMin=w):(a.yTotals[b]=(a.yTotals[b]?a.yTotals[b]:0)+e,a.yAbsTotals[b]=(a.yAbsTotals[b]?a.yAbsTotals[b]:0)+Math.abs(e),0<=e?C=!0:0>e&&(d=!0),K[b]=K[b]?K[b]+Math.abs(e):Math.abs(e))}}n.axisX.valueType=n.xValueType=h?"dateTime":"number"}a.axisY.logarithmic?(f.max=g(f.viewPortMax)?99*Math.pow(a.axisY.logarithmBase,-0.05):Math.max(f.viewPortMax,99*Math.pow(a.axisY.logarithmBase,-0.05)),f.min=
g(f.viewPortMin)?1:Math.min(f.viewPortMin,1)):C&&!d?(f.max=g(f.viewPortMax)?99:Math.max(f.viewPortMax,99),f.min=g(f.viewPortMin)?1:Math.min(f.viewPortMin,1)):C&&d?(f.max=g(f.viewPortMax)?99:Math.max(f.viewPortMax,99),f.min=g(f.viewPortMin)?-99:Math.min(f.viewPortMin,-99)):!C&&d&&(f.max=g(f.viewPortMax)?-1:Math.max(f.viewPortMax,-1),f.min=g(f.viewPortMin)?-99:Math.min(f.viewPortMin,-99));f.viewPortMin=f.min;f.viewPortMax=f.max;a.dataPointYSums=K}};r.prototype._processMultiYPlotUnit=function(a){if(a.dataSeriesIndexes&&
!(1>a.dataSeriesIndexes.length))for(var f=a.axisY.dataInfo,c=a.axisX.dataInfo,b,e,h,C,g=!1,d=0;d<a.dataSeriesIndexes.length;d++){var m=this.data[a.dataSeriesIndexes[d]],n=0,p=!1,q=!1,l,w,x;if("normal"===m.axisPlacement||"xySwapped"===m.axisPlacement)var u=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:this.options.axisX&&this.options.axisX.viewportMinimum?this.options.axisX.viewportMinimum:this.options.axisX&&this.options.axisX.minimum?this.options.axisX.minimum:
a.axisX.logarithmic?0:-Infinity,v=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:this.options.axisX&&this.options.axisX.viewportMaximum?this.options.axisX.viewportMaximum:this.options.axisX&&this.options.axisX.maximum?this.options.axisX.maximum:Infinity;if(m.dataPoints[n].x&&m.dataPoints[n].x.getTime||"dateTime"===m.xValueType)g=!0;for(n=0;n<m.dataPoints.length;n++){"undefined"===typeof m.dataPoints[n].x&&(m.dataPoints[n].x=n+(a.axisX.logarithmic?1:0));m.dataPoints[n].x.getTime?
(g=!0,b=m.dataPoints[n].x.getTime()):b=m.dataPoints[n].x;if((e=m.dataPoints[n].y)&&e.length){h=Math.min.apply(null,e);C=Math.max.apply(null,e);w=!0;for(var y=0;y<e.length;y++)null===e.k&&(w=!1);w&&(p||(x=l),l=b)}b<c.min&&(c.min=b);b>c.max&&(c.max=b);h<f.min&&(f.min=h);C>f.max&&(f.max=C);0<n&&(a.axisX.logarithmic?(w=b/m.dataPoints[n-1].x,1>w&&(w=1/w),c.minDiff>w&&1!==w&&(c.minDiff=w)):(w=b-m.dataPoints[n-1].x,0>w&&(w*=-1),c.minDiff>w&&0!==w&&(c.minDiff=w)),e&&(null!==e[0]&&m.dataPoints[n-1].y&&null!==
m.dataPoints[n-1].y[0])&&(a.axisY.logarithmic?(w=e[0]/m.dataPoints[n-1].y[0],1>w&&(w=1/w),f.minDiff>w&&1!==w&&(f.minDiff=w)):(w=e[0]-m.dataPoints[n-1].y[0],0>w&&(w*=-1),f.minDiff>w&&0!==w&&(f.minDiff=w))));if(!(b<u)||p){if(!p&&(p=!0,0<n)){n-=2;l=x;continue}if(b>v&&!q)q=!0;else if(b>v&&q)continue;m.dataPoints[n].label&&(a.axisX.labels[b]=m.dataPoints[n].label);b<c.viewPortMin&&(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);if(c.viewPortMin===b&&e)for(y=0;y<e.length;y++)if(null===e[y]&&l<b){c.viewPortMin=
l;break}null===e?c.viewPortMin===b&&l<b&&(c.viewPortMin=l):(h<f.viewPortMin&&(f.viewPortMin=h),C>f.viewPortMax&&(f.viewPortMax=C))}}m.axisX.valueType=m.xValueType=g?"dateTime":"number"}};r.prototype._processSpecificPlotUnit=function(a){if("waterfall"===a.type&&a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length))for(var f=a.axisY.dataInfo,c=a.axisX.dataInfo,b,e,h=!1,C=0;C<a.dataSeriesIndexes.length;C++){var g=this.data[a.dataSeriesIndexes[C]],d=0,m=!1,n=!1,p=b=0;if("normal"===g.axisPlacement||"xySwapped"===
g.axisPlacement)var q=a.axisX.sessionVariables.newViewportMinimum?a.axisX.sessionVariables.newViewportMinimum:this.options.axisX&&this.options.axisX.viewportMinimum?this.options.axisX.viewportMinimum:this.options.axisX&&this.options.axisX.minimum?this.options.axisX.minimum:a.axisX.logarithmic?0:-Infinity,l=a.axisX.sessionVariables.newViewportMaximum?a.axisX.sessionVariables.newViewportMaximum:this.options.axisX&&this.options.axisX.viewportMaximum?this.options.axisX.viewportMaximum:this.options.axisX&&
this.options.axisX.maximum?this.options.axisX.maximum:Infinity;if(g.dataPoints[d].x&&g.dataPoints[d].x.getTime||"dateTime"===g.xValueType)h=!0;for(d=0;d<g.dataPoints.length;d++)"undefined"!==typeof g.dataPoints[d].isCumulativeSum&&!0===g.dataPoints[d].isCumulativeSum?(g.dataPointEOs[d].cumulativeSumYStartValue=0,g.dataPointEOs[d].cumulativeSum=0===d?0:g.dataPointEOs[d-1].cumulativeSum,g.dataPoints[d].y=0===d?0:g.dataPointEOs[d-1].cumulativeSum):"undefined"!==typeof g.dataPoints[d].isIntermediateSum&&
!0===g.dataPoints[d].isIntermediateSum?(g.dataPointEOs[d].cumulativeSumYStartValue=p,g.dataPointEOs[d].cumulativeSum=0===d?0:g.dataPointEOs[d-1].cumulativeSum,g.dataPoints[d].y=0===d?0:b,p=0===d?0:g.dataPointEOs[d-1].cumulativeSum,b=0):(e="number"!==typeof g.dataPoints[d].y?0:g.dataPoints[d].y,g.dataPointEOs[d].cumulativeSumYStartValue=0===d?0:g.dataPointEOs[d-1].cumulativeSum,g.dataPointEOs[d].cumulativeSum=0===d?e:g.dataPointEOs[d-1].cumulativeSum+e,b+=e);for(d=0;d<g.dataPoints.length;d++)if("undefined"===
typeof g.dataPoints[d].x&&(g.dataPoints[d].x=d+(a.axisX.logarithmic?1:0)),g.dataPoints[d].x.getTime?(h=!0,b=g.dataPoints[d].x.getTime()):b=g.dataPoints[d].x,e=g.dataPoints[d].y,b<c.min&&(c.min=b),b>c.max&&(c.max=b),g.dataPointEOs[d].cumulativeSum<f.min&&(f.min=g.dataPointEOs[d].cumulativeSum),g.dataPointEOs[d].cumulativeSum>f.max&&(f.max=g.dataPointEOs[d].cumulativeSum),0<d&&(a.axisX.logarithmic?(p=b/g.dataPoints[d-1].x,1>p&&(p=1/p),c.minDiff>p&&1!==p&&(c.minDiff=p)):(p=b-g.dataPoints[d-1].x,0>p&&
(p*=-1),c.minDiff>p&&0!==p&&(c.minDiff=p)),null!==e&&null!==g.dataPoints[d-1].y&&(a.axisY.logarithmic?(e=g.dataPointEOs[d].cumulativeSum/g.dataPointEOs[d-1].cumulativeSum,1>e&&(e=1/e),f.minDiff>e&&1!==e&&(f.minDiff=e)):(e=g.dataPointEOs[d].cumulativeSum-g.dataPointEOs[d-1].cumulativeSum,0>e&&(e*=-1),f.minDiff>e&&0!==e&&(f.minDiff=e)))),!(b<q)||m){if(!m&&(m=!0,0<d)){d-=2;continue}if(b>l&&!n)n=!0;else if(b>l&&n)continue;g.dataPoints[d].label&&(a.axisX.labels[b]=g.dataPoints[d].label);b<c.viewPortMin&&
(c.viewPortMin=b);b>c.viewPortMax&&(c.viewPortMax=b);0<d&&(g.dataPointEOs[d-1].cumulativeSum<f.viewPortMin&&(f.viewPortMin=g.dataPointEOs[d-1].cumulativeSum),g.dataPointEOs[d-1].cumulativeSum>f.viewPortMax&&(f.viewPortMax=g.dataPointEOs[d-1].cumulativeSum));g.dataPointEOs[d].cumulativeSum<f.viewPortMin&&(f.viewPortMin=g.dataPointEOs[d].cumulativeSum);g.dataPointEOs[d].cumulativeSum>f.viewPortMax&&(f.viewPortMax=g.dataPointEOs[d].cumulativeSum)}g.axisX.valueType=g.xValueType=h?"dateTime":"number"}};
r.prototype.calculateAutoBreaks=function(){function a(a,b,c,f){if(f)return c=Math.pow(Math.min(c*a/b,b/a),0.2),1>=c&&(c=Math.pow(1>a?1/a:Math.min(b/a,a),0.25)),{startValue:a*c,endValue:b/c};c=0.2*Math.min(c-b+a,b-a);0>=c&&(c=0.25*Math.min(b-a,Math.abs(a)));return{startValue:a+c,endValue:b-c}}function f(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)){var b=a.axisX.scaleBreaks&&a.axisX.scaleBreaks.autoCalculate&&1<=a.axisX.scaleBreaks.maxNumberOfAutoBreaks,c=a.axisY.scaleBreaks&&a.axisY.scaleBreaks.autoCalculate&&
1<=a.axisY.scaleBreaks.maxNumberOfAutoBreaks;if(b||c)for(var f=a.axisY.dataInfo,h=a.axisX.dataInfo,l,C=h.min,m=h.max,d=f.min,n=f.max,h=h._dataRanges,f=f._dataRanges,p,q=0,qa=0;qa<a.dataSeriesIndexes.length;qa++){var x=e.data[a.dataSeriesIndexes[qa]];if(!(4>x.dataPoints.length))for(q=0;q<x.dataPoints.length;q++)if(b&&(p=(m+1-C)*Math.max(parseFloat(a.axisX.scaleBreaks.collapsibleThreshold)||10,10)/100,l=x.dataPoints[q].x.getTime?x.dataPoints[q].x.getTime():x.dataPoints[q].x,p=Math.floor((l-C)/p),l<
h[p].min&&(h[p].min=l),l>h[p].max&&(h[p].max=l)),c){var K=(n+1-d)*Math.max(parseFloat(a.axisY.scaleBreaks.collapsibleThreshold)||10,10)/100;if((l="waterfall"===a.type?x.dataPointEOs[q].cumulativeSum:x.dataPoints[q].y)&&l.length)for(var u=0;u<l.length;u++)p=Math.floor((l[u]-d)/K),l[u]<f[p].min&&(f[p].min=l[u]),l[u]>f[p].max&&(f[p].max=l[u]);else g(l)||(p=Math.floor((l-d)/K),l<f[p].min&&(f[p].min=l),l>f[p].max&&(f[p].max=l))}}}}function c(a){if(a.dataSeriesIndexes&&!(1>a.dataSeriesIndexes.length)&&
a.axisX.scaleBreaks&&a.axisX.scaleBreaks.autoCalculate&&1<=a.axisX.scaleBreaks.maxNumberOfAutoBreaks)for(var b=a.axisX.dataInfo,c=b.min,f=b.max,h=b._dataRanges,l,C=0,m=0;m<a.dataSeriesIndexes.length;m++){var g=e.data[a.dataSeriesIndexes[m]];if(!(4>g.dataPoints.length))for(C=0;C<g.dataPoints.length;C++)l=(f+1-c)*Math.max(parseFloat(a.axisX.scaleBreaks.collapsibleThreshold)||10,10)/100,b=g.dataPoints[C].x.getTime?g.dataPoints[C].x.getTime():g.dataPoints[C].x,l=Math.floor((b-c)/l),b<h[l].min&&(h[l].min=
b),b>h[l].max&&(h[l].max=b)}}for(var b,e=this,h=!1,C=0;C<this._axes.length;C++)if(this._axes[C].scaleBreaks&&this._axes[C].scaleBreaks.autoCalculate&&1<=this._axes[C].scaleBreaks.maxNumberOfAutoBreaks){h=!0;this._axes[C].dataInfo._dataRanges=[];for(var d=0;d<100/Math.max(parseFloat(this._axes[C].scaleBreaks.collapsibleThreshold)||10,10);d++)this._axes[C].dataInfo._dataRanges.push({min:Infinity,max:-Infinity})}if(h){for(C=0;C<this.plotInfo.plotTypes.length;C++)for(h=this.plotInfo.plotTypes[C],d=0;d<
h.plotUnits.length;d++)b=h.plotUnits[d],"line"===b.type||"stepLine"===b.type||"spline"===b.type||"column"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"bar"===b.type||"bubble"===b.type||"scatter"===b.type||"candlestick"===b.type||"ohlc"===b.type||"rangeColumn"===b.type||"rangeBar"===b.type||"rangeArea"===b.type||"rangeSplineArea"===b.type||"waterfall"===b.type||"error"===b.type||"boxAndWhisker"===b.type?f(b):0<=b.type.indexOf("stacked")&&c(b);for(C=0;C<this._axes.length;C++)if(this._axes[C].dataInfo._dataRanges){var x=
this._axes[C].dataInfo.min;b=(this._axes[C].dataInfo.max+1-x)*Math.max(parseFloat(this._axes[C].scaleBreaks.collapsibleThreshold)||10,10)/100;var m=this._axes[C].dataInfo._dataRanges,n,p,h=[];if(this._axes[C].dataInfo.dataPointYPositiveSums){var q=this._axes[C].dataInfo.dataPointYPositiveSums;n=m;for(d in q)if(q.hasOwnProperty(d)&&!isNaN(d)&&(p=q[d],!g(p))){var l=Math.floor((p-x)/b);p<n[l].min&&(n[l].min=p);p>n[l].max&&(n[l].max=p)}delete this._axes[C].dataInfo.dataPointYPositiveSums}if(this._axes[C].dataInfo.dataPointYNegativeSums){q=
this._axes[C].dataInfo.dataPointYNegativeSums;n=m;for(d in q)q.hasOwnProperty(d)&&!isNaN(d)&&(p=-1*q[d],g(p)||(l=Math.floor((p-x)/b),p<n[l].min&&(n[l].min=p),p>n[l].max&&(n[l].max=p)));delete this._axes[C].dataInfo.dataPointYNegativeSums}for(d=0;d<m.length-1;d++)if(n=m[d].max,isFinite(n))for(;d<m.length-1;)if(x=m[d+1].min,isFinite(x)){p=x-n;p>b&&h.push({diff:p,start:n,end:x});break}else d++;if(this._axes[C].scaleBreaks.customBreaks)for(d=0;d<this._axes[C].scaleBreaks.customBreaks.length;d++)for(b=
0;b<h.length;b++)if(this._axes[C].scaleBreaks.customBreaks[d].startValue<=h[b].start&&h[b].start<=this._axes[C].scaleBreaks.customBreaks[d].endValue||this._axes[C].scaleBreaks.customBreaks[d].startValue<=h[b].start&&h[b].start<=this._axes[C].scaleBreaks.customBreaks[d].endValue||h[b].start<=this._axes[C].scaleBreaks.customBreaks[d].startValue&&this._axes[C].scaleBreaks.customBreaks[d].startValue<=h[b].end||h[b].start<=this._axes[C].scaleBreaks.customBreaks[d].endValue&&this._axes[C].scaleBreaks.customBreaks[d].endValue<=
h[b].end)h.splice(b,1),b--;h.sort(function(a,b){return b.diff-a.diff});for(d=0;d<Math.min(h.length,this._axes[C].scaleBreaks.maxNumberOfAutoBreaks);d++)b=a(h[d].start,h[d].end,this._axes[C].logarithmic?this._axes[C].dataInfo.max/this._axes[C].dataInfo.min:this._axes[C].dataInfo.max-this._axes[C].dataInfo.min,this._axes[C].logarithmic),this._axes[C].scaleBreaks.autoBreaks.push(new Y(this,"autoBreaks",b,d,++this._eventManager.lastObjectId,this._axes[C].scaleBreaks)),this._axes[C].scaleBreaks._appliedBreaks.push(this._axes[C].scaleBreaks.autoBreaks[this._axes[C].scaleBreaks.autoBreaks.length-
1]);this._axes[C].scaleBreaks._appliedBreaks.sort(function(a,b){return a.startValue-b.startValue})}}};r.prototype.renderCrosshairs=function(a){for(var f=0;f<this.axisX.length;f++)this.axisX[f]!=a&&(this.axisX[f].crosshair&&this.axisX[f].crosshair.enabled&&!this.axisX[f].crosshair._hidden)&&this.axisX[f].showCrosshair(this.axisX[f].crosshair._updatedValue);for(f=0;f<this.axisX2.length;f++)this.axisX2[f]!=a&&(this.axisX2[f].crosshair&&this.axisX2[f].crosshair.enabled&&!this.axisX2[f].crosshair._hidden)&&
this.axisX2[f].showCrosshair(this.axisX2[f].crosshair._updatedValue);for(f=0;f<this.axisY.length;f++)this.axisY[f]!=a&&(this.axisY[f].crosshair&&this.axisY[f].crosshair.enabled&&!this.axisY[f].crosshair._hidden)&&this.axisY[f].showCrosshair(this.axisY[f].crosshair._updatedValue);for(f=0;f<this.axisY2.length;f++)this.axisY2[f]!=a&&(this.axisY2[f].crosshair&&this.axisY2[f].crosshair.enabled&&!this.axisY2[f].crosshair._hidden)&&this.axisY2[f].showCrosshair(this.axisY2[f].crosshair._updatedValue)};r.prototype.getDataPointAtXY=
function(a,f,c){c=c||!1;for(var b=[],e=this._dataInRenderedOrder.length-1;0<=e;e--){var h=null;(h=this._dataInRenderedOrder[e].getDataPointAtXY(a,f,c))&&b.push(h)}a=null;f=!1;for(c=0;c<b.length;c++)if("line"===b[c].dataSeries.type||"stepLine"===b[c].dataSeries.type||"area"===b[c].dataSeries.type||"stepArea"===b[c].dataSeries.type)if(e=sa("markerSize",b[c].dataPoint,b[c].dataSeries)||8,b[c].distance<=e/2){f=!0;break}for(c=0;c<b.length;c++)f&&"line"!==b[c].dataSeries.type&&"stepLine"!==b[c].dataSeries.type&&
"area"!==b[c].dataSeries.type&&"stepArea"!==b[c].dataSeries.type||(a?b[c].distance<=a.distance&&(a=b[c]):a=b[c]);return a};r.prototype.getObjectAtXY=function(a,f,c){var b=null;if(c=this.getDataPointAtXY(a,f,c||!1))b=c.dataSeries.dataPointIds[c.dataPointIndex];else if(u)b=ib(a,f,this._eventManager.ghostCtx);else for(c=0;c<this.legend.items.length;c++){var e=this.legend.items[c];a>=e.x1&&(a<=e.x2&&f>=e.y1&&f<=e.y2)&&(b=e.id)}return b};r.prototype.getAutoFontSize=nb;r.prototype.resetOverlayedCanvas=
function(){this.overlaidCanvasCtx.clearRect(0,0,this.width,this.height)};r.prototype.clearCanvas=mb;r.prototype.attachEvent=function(a){this._events.push(a)};r.prototype._touchEventHandler=function(a){if(a.changedTouches&&this.interactivityEnabled){var f=[],c=a.changedTouches,b=c?c[0]:a,e=null;switch(a.type){case "touchstart":case "MSPointerDown":f=["mousemove","mousedown"];this._lastTouchData=Aa(b);this._lastTouchData.time=new Date;break;case "touchmove":case "MSPointerMove":f=["mousemove"];break;
case "touchend":case "MSPointerUp":var h=this._lastTouchData&&this._lastTouchData.time?new Date-this._lastTouchData.time:0,f="touchstart"===this._lastTouchEventType||"MSPointerDown"===this._lastTouchEventType||300>h?["mouseup","click"]:["mouseup"];break;default:return}if(!(c&&1<c.length)){e=Aa(b);e.time=new Date;try{var C=e.y-this._lastTouchData.y,h=e.time-this._lastTouchData.time;if(1<Math.abs(C)&&this._lastTouchData.scroll||5<Math.abs(C)&&250>h)this._lastTouchData.scroll=!0}catch(d){}this._lastTouchEventType=
a.type;if(this._lastTouchData.scroll&&this.zoomEnabled)this.isDrag&&this.resetOverlayedCanvas(),this.isDrag=!1;else for(c=0;c<f.length;c++)if(e=f[c],C=document.createEvent("MouseEvent"),C.initMouseEvent(e,!0,!0,window,1,b.screenX,b.screenY,b.clientX,b.clientY,!1,!1,!1,!1,0,null),b.target.dispatchEvent(C),!g(this._lastTouchData.scroll)&&!this._lastTouchData.scroll||!this._lastTouchData.scroll&&250<h||"click"===e)a.preventManipulation&&a.preventManipulation(),a.preventDefault&&a.cancelable&&a.preventDefault()}}};
r.prototype._dispatchRangeEvent=function(a,f){var c={chart:this};c.type=a;c.trigger=f;var b=[];this.axisX&&0<this.axisX.length&&b.push("axisX");this.axisX2&&0<this.axisX2.length&&b.push("axisX2");this.axisY&&0<this.axisY.length&&b.push("axisY");this.axisY2&&0<this.axisY2.length&&b.push("axisY2");for(var e=0;e<b.length;e++)if(g(c[b[e]])&&(c[b[e]]=[]),"axisY"===b[e])for(var h=0;h<this.axisY.length;h++)c[b[e]].push({viewportMinimum:this[b[e]][h].sessionVariables.newViewportMinimum,viewportMaximum:this[b[e]][h].sessionVariables.newViewportMaximum});
else if("axisY2"===b[e])for(h=0;h<this.axisY2.length;h++)c[b[e]].push({viewportMinimum:this[b[e]][h].sessionVariables.newViewportMinimum,viewportMaximum:this[b[e]][h].sessionVariables.newViewportMaximum});else if("axisX"===b[e])for(h=0;h<this.axisX.length;h++)c[b[e]].push({viewportMinimum:this[b[e]][h].sessionVariables.newViewportMinimum,viewportMaximum:this[b[e]][h].sessionVariables.newViewportMaximum});else if("axisX2"===b[e])for(h=0;h<this.axisX2.length;h++)c[b[e]].push({viewportMinimum:this[b[e]][h].sessionVariables.newViewportMinimum,
viewportMaximum:this[b[e]][h].sessionVariables.newViewportMaximum});this.dispatchEvent(a,c,this)};r.prototype._mouseEventHandler=function(a){"undefined"===typeof a.target&&a.srcElement&&(a.target=a.srcElement);var f=Aa(a),c=a.type,b,e;a.which?e=3==a.which:a.button&&(e=2==a.button);r.capturedEventParam&&(b=r.capturedEventParam,"mouseup"===c&&(r.capturedEventParam=null,b.chart.overlaidCanvas.releaseCapture?b.chart.overlaidCanvas.releaseCapture():document.documentElement.removeEventListener("mouseup",
b.chart._mouseEventHandler,!1)),b.hasOwnProperty(c)&&("mouseup"!==c||b.chart.overlaidCanvas.releaseCapture?a.target!==b.chart.overlaidCanvas&&u||b[c].call(b.context,f.x,f.y):a.target!==b.chart.overlaidCanvas&&(b.chart.isDrag=!1)));if(this.interactivityEnabled)if(this._ignoreNextEvent)this._ignoreNextEvent=!1;else if(a.preventManipulation&&a.preventManipulation(),a.preventDefault&&a.preventDefault(),La&&window.console&&(window.console.log(c+" --\x3e x: "+f.x+"; y:"+f.y),e&&window.console.log(a.which),
"mouseup"===c&&window.console.log("mouseup")),!e){if(!r.capturedEventParam&&this._events){for(var h=0;h<this._events.length;h++)if(this._events[h].hasOwnProperty(c))if(b=this._events[h],e=b.bounds,f.x>=e.x1&&f.x<=e.x2&&f.y>=e.y1&&f.y<=e.y2){b[c].call(b.context,f.x,f.y);"mousedown"===c&&!0===b.capture?(r.capturedEventParam=b,this.overlaidCanvas.setCapture?this.overlaidCanvas.setCapture():document.documentElement.addEventListener("mouseup",this._mouseEventHandler,!1)):"mouseup"===c&&(b.chart.overlaidCanvas.releaseCapture?
b.chart.overlaidCanvas.releaseCapture():document.documentElement.removeEventListener("mouseup",this._mouseEventHandler,!1));break}else b=null;a.target.style.cursor=b&&b.cursor?b.cursor:this._defaultCursor}c=this.plotArea;if(f.x<c.x1||f.x>c.x2||f.y<c.y1||f.y>c.y2){this.toolTip&&this.toolTip.enabled?(this.toolTip.hide(),this.toolTip.dispatchEvent("hidden",{chart:this,toolTip:this.toolTip},this.toolTip)):this.resetOverlayedCanvas();for(h=0;h<this.axisX.length;h++)this.axisX[h].crosshair&&this.axisX[h].crosshair.enabled&&
(this.axisX[h].crosshair.hide(),this.axisX[h].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisX[h].options},this.axisX[h].crosshair));for(h=0;h<this.axisX2.length;h++)this.axisX2[h].crosshair&&this.axisX2[h].crosshair.enabled&&(this.axisX2[h].crosshair.hide(),this.axisX2[h].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisX2[h].options},this.axisX2[h].crosshair));for(h=0;h<this.axisY.length;h++)this.axisY[h].crosshair&&this.axisY[h].crosshair.enabled&&(this.axisY[h].crosshair.hide(),
this.axisY[h].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisY[h].options},this.axisY[h].crosshair));for(h=0;h<this.axisY2.length;h++)this.axisY2[h].crosshair&&this.axisY2[h].crosshair.enabled&&(this.axisY2[h].crosshair.hide(),this.axisY2[h].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisY2[h].options},this.axisY2[h].crosshair))}this.isDrag&&this.zoomEnabled||!this._eventManager||this._eventManager.mouseEventHandler(a)}};r.prototype._plotAreaMouseDown=function(a,f){this.isDrag=
!0;this.dragStartPoint={x:a,y:f}};r.prototype._plotAreaMouseUp=function(a,f){if(("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement)&&this.isDrag){var c=f-this.dragStartPoint.y,b=a-this.dragStartPoint.x,e=0<=this.zoomType.indexOf("x"),h=0<=this.zoomType.indexOf("y"),C=!1;this.resetOverlayedCanvas();if("xySwapped"===this.plotInfo.axisPlacement)var g=h,h=e,e=g;if(this.panEnabled||this.zoomEnabled){if(this.panEnabled)for(e=h=0;e<this._axes.length;e++)c=this._axes[e],c.logarithmic?
c.viewportMinimum<c.minimum?(h=c.minimum/c.viewportMinimum,c.sessionVariables.newViewportMinimum=c.viewportMinimum*h,c.sessionVariables.newViewportMaximum=c.viewportMaximum*h,C=!0):c.viewportMaximum>c.maximum&&(h=c.viewportMaximum/c.maximum,c.sessionVariables.newViewportMinimum=c.viewportMinimum/h,c.sessionVariables.newViewportMaximum=c.viewportMaximum/h,C=!0):c.viewportMinimum<c.minimum?(h=c.minimum-c.viewportMinimum,c.sessionVariables.newViewportMinimum=c.viewportMinimum+h,c.sessionVariables.newViewportMaximum=
c.viewportMaximum+h,C=!0):c.viewportMaximum>c.maximum&&(h=c.viewportMaximum-c.maximum,c.sessionVariables.newViewportMinimum=c.viewportMinimum-h,c.sessionVariables.newViewportMaximum=c.viewportMaximum-h,C=!0);else if((!e||2<Math.abs(b))&&(!h||2<Math.abs(c))&&this.zoomEnabled){if(!this.dragStartPoint)return;c=e?this.dragStartPoint.x:this.plotArea.x1;b=h?this.dragStartPoint.y:this.plotArea.y1;e=e?a:this.plotArea.x2;h=h?f:this.plotArea.y2;2<Math.abs(c-e)&&2<Math.abs(b-h)&&this._zoomPanToSelectedRegion(c,
b,e,h)&&(C=!0)}C&&(this._ignoreNextEvent=!0,this._dispatchRangeEvent("rangeChanging","zoom"),this.stockChart&&(this.stockChart.navigator&&this.stockChart.navigator.enabled)&&(this.stockChart._rangeEventParameter||(this.stockChart._rangeEventParameter={stockChart:this.stockChart,source:"chart",index:this.stockChart.charts.indexOf(this),minimum:this.stockChart.sessionVariables._axisXMin,maximum:this.stockChart.sessionVariables._axisXMax}),this.stockChart._rangeEventParameter.type="rangeChanging",this.stockChart.dispatchEvent("rangeChanging",
this.stockChart._rangeEventParameter,this.stockChart)),this.render(),this._dispatchRangeEvent("rangeChanged","zoom"),this.stockChart&&(this.stockChart.navigator&&this.stockChart.navigator.enabled)&&(this.stockChart._rangeEventParameter.type="rangeChanged",this.stockChart.dispatchEvent("rangeChanged",this.stockChart._rangeEventParameter,this.stockChart)),C&&(this.zoomEnabled&&"none"===this._zoomButton.style.display)&&(Ra(this._zoomButton,this._resetButton),Ba(this,this._zoomButton,"pan"),Ba(this,this._resetButton,
"reset")))}}this.isDrag=!1;if("none"!==this.plotInfo.axisPlacement){this.resetOverlayedCanvas();if(this.axisX&&0<this.axisX.length)for(C=0;C<this.axisX.length;C++)this.axisX[C].crosshair&&this.axisX[C].crosshair.enabled&&this.axisX[C].renderCrosshair(a,f);if(this.axisX2&&0<this.axisX2.length)for(C=0;C<this.axisX2.length;C++)this.axisX2[C].crosshair&&this.axisX2[C].crosshair.enabled&&this.axisX2[C].renderCrosshair(a,f);if(this.axisY&&0<this.axisY.length)for(C=0;C<this.axisY.length;C++)this.axisY[C].crosshair&&
this.axisY[C].crosshair.enabled&&this.axisY[C].renderCrosshair(a,f);if(this.axisY2&&0<this.axisY2.length)for(C=0;C<this.axisY2.length;C++)this.axisY2[C].crosshair&&this.axisY2[C].crosshair.enabled&&this.axisY2[C].renderCrosshair(a,f);if(this.axisX&&0<this.axisX.length)for(C=0;C<this.axisX.length;C++)this.axisX[C].crosshair&&this.axisX[C].crosshair.enabled&&this.axisX[C].crosshair.renderLabel();if(this.axisX2&&0<this.axisX2.length)for(C=0;C<this.axisX2.length;C++)this.axisX2[C].crosshair&&this.axisX2[C].crosshair.enabled&&
this.axisX2[C].crosshair.renderLabel();if(this.axisY&&0<this.axisY.length)for(C=0;C<this.axisY.length;C++)this.axisY[C].crosshair&&this.axisY[C].crosshair.enabled&&this.axisY[C].crosshair.renderLabel();if(this.axisY2&&0<this.axisY2.length)for(C=0;C<this.axisY2.length;C++)this.axisY2[C].crosshair&&this.axisY2[C].crosshair.enabled&&this.axisY2[C].crosshair.renderLabel()}};r.prototype._plotAreaMouseMove=function(a,f){if(this.isDrag&&"none"!==this.plotInfo.axisPlacement){var c=0,b=0,e=c=null,e=0<=this.zoomType.indexOf("x"),
h=0<=this.zoomType.indexOf("y"),C=this;"xySwapped"===this.plotInfo.axisPlacement&&(c=h,h=e,e=c);c=this.dragStartPoint.x-a;b=this.dragStartPoint.y-f;if(2<Math.abs(c)&&8>Math.abs(c)&&(this.panEnabled||this.zoomEnabled)){this.toolTip.hide();this.toolTip&&this.toolTip.enabled&&this.toolTip.dispatchEvent("hidden",{chart:this,toolTip:this.toolTip},this.toolTip);for(var g=0;g<this.axisX.length;g++)this.axisX[g].crosshair&&this.axisX[g].crosshair.enabled&&(this.axisX[g].crosshair.hide(),this.axisX[g].crosshair.dispatchEvent("hidden",
{chart:this,axis:this.axisX[g].options},this.axisX[g].crosshair));for(g=0;g<this.axisX2.length;g++)this.axisX2[g].crosshair&&this.axisX2[g].crosshair.enabled&&(this.axisX2[g].crosshair.hide(),this.axisX2[g].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisX2[g].options},this.axisX2[g].crosshair));for(g=0;g<this.axisY.length;g++)this.axisY[g].crosshair&&this.axisY[g].crosshair.enabled&&(this.axisY[g].crosshair.hide(),this.axisY[g].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisY[g].options},
this.axisY[g].crosshair));for(g=0;g<this.axisY2.length;g++)this.axisY2[g].crosshair&&this.axisY2[g].crosshair.enabled&&(this.axisY2[g].crosshair.hide(),this.axisY2[g].crosshair.dispatchEvent("hidden",{chart:this,axis:this.axisY2[g].options},this.axisY2[g].crosshair))}else this.panEnabled||this.zoomEnabled||this.toolTip.mouseMoveHandler(a,f);if((!e||2<Math.abs(c)||!h||2<Math.abs(b))&&(this.panEnabled||this.zoomEnabled))if(this.panEnabled)e={x1:e?this.plotArea.x1+c:this.plotArea.x1,y1:h?this.plotArea.y1+
b:this.plotArea.y1,x2:e?this.plotArea.x2+c:this.plotArea.x2,y2:h?this.plotArea.y2+b:this.plotArea.y2},clearTimeout(C._panTimerId),C._panTimerId=setTimeout(function(b,c,e,h){return function(){C._zoomPanToSelectedRegion(b,c,e,h,!0)&&(C._dispatchRangeEvent("rangeChanging","pan"),C.stockChart&&(C.stockChart.navigator&&C.stockChart.navigator.enabled)&&(C.stockChart._rangeEventParameter.type="rangeChanging",C.stockChart.dispatchEvent("rangeChanging",C.stockChart._rangeEventParameter,C.stockChart)),C.render(),
C._dispatchRangeEvent("rangeChanged","pan"),C.stockChart&&(C.stockChart.navigator&&C.stockChart.navigator.enabled)&&(C.stockChart._rangeEventParameter.type="rangeChanged",C.stockChart.dispatchEvent("rangeChanged",C.stockChart._rangeEventParameter,C.stockChart)),C.dragStartPoint.x=a,C.dragStartPoint.y=f)}}(e.x1,e.y1,e.x2,e.y2),0);else if(this.zoomEnabled){this.resetOverlayedCanvas();c=this.overlaidCanvasCtx.globalAlpha;this.overlaidCanvasCtx.fillStyle="#A89896";var b=e?this.dragStartPoint.x:this.plotArea.x1,
g=h?this.dragStartPoint.y:this.plotArea.y1,d=e?a-this.dragStartPoint.x:this.plotArea.x2-this.plotArea.x1,m=h?f-this.dragStartPoint.y:this.plotArea.y2-this.plotArea.y1;this.validateRegion(b,g,e?a:this.plotArea.x2-this.plotArea.x1,h?f:this.plotArea.y2-this.plotArea.y1,"xy"!==this.zoomType).isValid&&(this.resetOverlayedCanvas(),this.overlaidCanvasCtx.fillStyle="#99B2B5");this.overlaidCanvasCtx.globalAlpha=0.7;this.overlaidCanvasCtx.fillRect(b,g,d,m);this.overlaidCanvasCtx.globalAlpha=c}}else if(this.toolTip.mouseMoveHandler(a,
f),"none"!==this.plotInfo.axisPlacement){if(this.axisX&&0<this.axisX.length)for(e=0;e<this.axisX.length;e++)this.axisX[e].crosshair&&this.axisX[e].crosshair.enabled&&this.axisX[e].renderCrosshair(a,f);if(this.axisX2&&0<this.axisX2.length)for(e=0;e<this.axisX2.length;e++)this.axisX2[e].crosshair&&this.axisX2[e].crosshair.enabled&&this.axisX2[e].renderCrosshair(a,f);if(this.axisY&&0<this.axisY.length)for(e=0;e<this.axisY.length;e++)this.axisY[e].crosshair&&this.axisY[e].crosshair.enabled&&this.axisY[e].renderCrosshair(a,
f);if(this.axisY2&&0<this.axisY2.length)for(e=0;e<this.axisY2.length;e++)this.axisY2[e].crosshair&&this.axisY2[e].crosshair.enabled&&this.axisY2[e].renderCrosshair(a,f);if(this.axisX&&0<this.axisX.length)for(e=0;e<this.axisX.length;e++)this.axisX[e].crosshair&&this.axisX[e].crosshair.enabled&&this.axisX[e].crosshair.renderLabel();if(this.axisX2&&0<this.axisX2.length)for(e=0;e<this.axisX2.length;e++)this.axisX2[e].crosshair&&this.axisX2[e].crosshair.enabled&&this.axisX2[e].crosshair.renderLabel();
if(this.axisY&&0<this.axisY.length)for(e=0;e<this.axisY.length;e++)this.axisY[e].crosshair&&this.axisY[e].crosshair.enabled&&this.axisY[e].crosshair.renderLabel();if(this.axisY2&&0<this.axisY2.length)for(e=0;e<this.axisY2.length;e++)this.axisY2[e].crosshair&&this.axisY2[e].crosshair.enabled&&this.axisY2[e].crosshair.renderLabel()}};r.prototype._zoomPanToSelectedRegion=function(a,f,c,b,e){a=this.validateRegion(a,f,c,b,e);f=a.axesWithValidRange;c=a.axesRanges;if(a.isValid)for(b=0;b<f.length;b++)e=c[b],
f[b].setViewPortRange(e.val1,e.val2),this.syncCharts&&"y"!=this.zoomType&&this.syncCharts(e.val1,e.val2),this.stockChart&&(this.stockChart._rangeEventParameter={stockChart:this.stockChart,source:"chart",index:this.stockChart.charts.indexOf(this),minimum:e.val1,maximum:e.val2});return a.isValid};r.prototype.validateRegion=function(a,f,c,b,e){e=e||!1;for(var h=0<=this.zoomType.indexOf("x"),C=0<=this.zoomType.indexOf("y"),g=!1,d=[],m=[],n=[],p=0;p<this._axes.length;p++)("axisX"===this._axes[p].type&&
h||"axisY"===this._axes[p].type&&C)&&m.push(this._axes[p]);for(C=0;C<m.length;C++){var p=m[C],h=!1,q=p.convertPixelToValue({x:a,y:f}),l=p.convertPixelToValue({x:c,y:b});if(q>l)var w=l,l=q,q=w;if(p.scaleBreaks)for(w=0;!h&&w<p.scaleBreaks._appliedBreaks.length;w++)h=p.scaleBreaks._appliedBreaks[w].startValue<=q&&p.scaleBreaks._appliedBreaks[w].endValue>=l;if(isFinite(p.dataInfo.minDiff))if(w=p.getApparentDifference(q,l,null,!0),!(h||!(this.panEnabled&&p.scaleBreaks&&p.scaleBreaks._appliedBreaks.length)&&
(p.logarithmic&&w<Math.pow(p.dataInfo.minDiff,3)||!p.logarithmic&&w<3*Math.abs(p.dataInfo.minDiff))||q<p.minimum||l>p.maximum))d.push(p),n.push({val1:q,val2:l}),g=!0;else if(!e){g=!1;break}}return{isValid:g,axesWithValidRange:d,axesRanges:n}};r.prototype.preparePlotArea=function(){var a=this.plotArea;!u&&(0<a.x1||0<a.y1)&&a.ctx.translate(a.x1,a.y1);if((this.axisX[0]||this.axisX2[0])&&(this.axisY[0]||this.axisY2[0])){var f=this.axisX[0]?this.axisX[0].lineCoordinates:this.axisX2[0].lineCoordinates;
if(this.axisY&&0<this.axisY.length&&this.axisY[0]){var c=this.axisY[0];a.x1=f.x1<f.x2?f.x1:c.lineCoordinates.x1;a.y1=f.y1<c.lineCoordinates.y1?f.y1:c.lineCoordinates.y1;a.x2=f.x2>c.lineCoordinates.x2?f.x2:c.lineCoordinates.x2;a.y2=f.y2>f.y1?f.y2:c.lineCoordinates.y2;a.width=a.x2-a.x1;a.height=a.y2-a.y1}this.axisY2&&0<this.axisY2.length&&this.axisY2[0]&&(c=this.axisY2[0],a.x1=f.x1<f.x2?f.x1:c.lineCoordinates.x1,a.y1=f.y1<c.lineCoordinates.y1?f.y1:c.lineCoordinates.y1,a.x2=f.x2>c.lineCoordinates.x2?
f.x2:c.lineCoordinates.x2,a.y2=f.y2>f.y1?f.y2:c.lineCoordinates.y2,a.width=a.x2-a.x1,a.height=a.y2-a.y1)}else f=this.layoutManager.getFreeSpace(),a.x1=f.x1,a.x2=f.x2,a.y1=f.y1,a.y2=f.y2,a.width=f.width,a.height=f.height;u||(a.canvas.width=a.width,a.canvas.height=a.height,a.canvas.style.left=a.x1+"px",a.canvas.style.top=a.y1+"px",(0<a.x1||0<a.y1)&&a.ctx.translate(-a.x1,-a.y1));a.layoutManager=new Ka(a.x1,a.y1,a.x2,a.y2,2)};r.prototype.renderIndexLabels=function(a){var f=a||this.plotArea.ctx,c=this.plotArea,
b=0,e=0,h=0,C=h=e=0,d=0,K=b=0,m=0;for(a=0;a<this._indexLabels.length;a++){var n=this._indexLabels[a],p=n.chartType.toLowerCase(),q,l,C=sa("indexLabelFontColor",n.dataPoint,n.dataSeries),w=sa("indexLabelFontSize",n.dataPoint,n.dataSeries),d=sa("indexLabelFontFamily",n.dataPoint,n.dataSeries),K=sa("indexLabelFontStyle",n.dataPoint,n.dataSeries),m=sa("indexLabelFontWeight",n.dataPoint,n.dataSeries),s=sa("indexLabelBackgroundColor",n.dataPoint,n.dataSeries);q=sa("indexLabelMaxWidth",n.dataPoint,n.dataSeries);
l=sa("indexLabelWrap",n.dataPoint,n.dataSeries);var ha=sa("indexLabelLineDashType",n.dataPoint,n.dataSeries),v=sa("indexLabelLineColor",n.dataPoint,n.dataSeries),y=g(n.dataPoint.indexLabelLineThickness)?g(n.dataSeries.options.indexLabelLineThickness)?0:n.dataSeries.options.indexLabelLineThickness:n.dataPoint.indexLabelLineThickness,b=0<y?Math.min(10,("normal"===this.plotInfo.axisPlacement?this.plotArea.height:this.plotArea.width)<<0):0,k={percent:null,total:null},t=null;if(0<=n.dataSeries.type.indexOf("stacked")||
"pie"===n.dataSeries.type||"doughnut"===n.dataSeries.type)k=this.getPercentAndTotal(n.dataSeries,n.dataPoint);if(n.dataSeries.indexLabelFormatter||n.dataPoint.indexLabelFormatter)t={chart:this,dataSeries:n.dataSeries,dataPoint:n.dataPoint,index:n.indexKeyword,total:k.total,percent:k.percent};var r=n.dataPoint.indexLabelFormatter?n.dataPoint.indexLabelFormatter(t):n.dataPoint.indexLabel?this.replaceKeywordsWithValue(n.dataPoint.indexLabel,n.dataPoint,n.dataSeries,null,n.indexKeyword):n.dataSeries.indexLabelFormatter?
n.dataSeries.indexLabelFormatter(t):n.dataSeries.indexLabel?this.replaceKeywordsWithValue(n.dataSeries.indexLabel,n.dataPoint,n.dataSeries,null,n.indexKeyword):null;if(null!==r&&""!==r){var k=sa("indexLabelPlacement",n.dataPoint,n.dataSeries),t=sa("indexLabelOrientation",n.dataPoint,n.dataSeries),B=sa("indexLabelTextAlign",n.dataPoint,n.dataSeries),z=n.direction,e=n.dataSeries.axisX,h=n.dataSeries.axisY,A=!1,s=new oa(f,{x:0,y:0,maxWidth:q?q:0.5*this.width,maxHeight:l?5*w:1.5*w,angle:"horizontal"===
t?0:-90,text:r,padding:0,backgroundColor:s,textAlign:B,fontSize:w,fontFamily:d,fontWeight:m,fontColor:C,fontStyle:K,textBaseline:"middle"});s.measureText();n.dataSeries.indexLabelMaxWidth=s.maxWidth;if("stackedarea100"===p){if(n.point.x<c.x1||n.point.x>c.x2||n.point.y<c.y1-1||n.point.y>c.y2+1)continue}else if("rangearea"===p||"rangesplinearea"===p){if(n.dataPoint.x<e.viewportMinimum||n.dataPoint.x>e.viewportMaximum||Math.max.apply(null,n.dataPoint.y)<h.viewportMinimum||Math.min.apply(null,n.dataPoint.y)>
h.viewportMaximum)continue}else if(0<=p.indexOf("line")||0<=p.indexOf("area")||0<=p.indexOf("bubble")||0<=p.indexOf("scatter")){if(n.dataPoint.x<e.viewportMinimum||n.dataPoint.x>e.viewportMaximum||n.dataPoint.y<h.viewportMinimum||n.dataPoint.y>h.viewportMaximum)continue}else if(0<=p.indexOf("column")||"waterfall"===p||"error"===p&&!n.axisSwapped){if(n.dataPoint.x<e.viewportMinimum||n.dataPoint.x>e.viewportMaximum||n.bounds.y1>c.y2||n.bounds.y2<c.y1)continue}else if(0<=p.indexOf("bar")||"error"===
p){if(n.dataPoint.x<e.viewportMinimum||n.dataPoint.x>e.viewportMaximum||n.bounds.x1>c.x2||n.bounds.x2<c.x1)continue}else if("candlestick"===p||"ohlc"===p){if(n.dataPoint.x<e.viewportMinimum||n.dataPoint.x>e.viewportMaximum||Math.max.apply(null,n.dataPoint.y)<h.viewportMinimum||Math.min.apply(null,n.dataPoint.y)>h.viewportMaximum)continue}else if(n.dataPoint.x<e.viewportMinimum||n.dataPoint.x>e.viewportMaximum)continue;C=d=2;"horizontal"===t?(K=s.width,m=s.height):(m=s.width,K=s.height);if("normal"===
this.plotInfo.axisPlacement){if(0<=p.indexOf("line")||0<=p.indexOf("area"))k="auto",d=4;else if(0<=p.indexOf("stacked"))"auto"===k&&(k="inside");else if("bubble"===p||"scatter"===p)k="inside";q=n.point.x-("horizontal"===t?K/2:K/2-w/2);"inside"!==k?(e=c.y1,h=c.y2,0<z?(l=n.point.y+("horizontal"===t?w/2:0)-m-d-b,l<e&&(l="auto"===k?Math.max(n.point.y,e)+w/2+d:e+w/2+d,A=l+m>n.point.y)):(l=n.point.y+w/2+d+b,l>h-m&&(l="auto"===k?Math.min(n.point.y,h)+w/2-m-d:h+w/2-m,A=l<n.point.y))):(e=Math.max(n.bounds.y1,
c.y1),h=Math.min(n.bounds.y2,c.y2-m+w/2),b=0<=p.indexOf("range")||"error"===p?0<z?Math.max(n.bounds.y1,c.y1)+w/2+d:Math.min(n.bounds.y2,c.y2)+w/2-m+d:(Math.max(n.bounds.y1,c.y1)+Math.min(n.bounds.y2,c.y2))/2-m/2+w/2+("horizontal"===t?d:0),0<z?(l=Math.max(n.point.y,b),l<e&&("bubble"===p||"scatter"===p)&&(l=Math.max(n.point.y-m-d,c.y1+d))):(l=Math.min(n.point.y,b),l>h-m-d&&("bubble"===p||"scatter"===p)&&(l=Math.min(n.point.y+d,c.y2-m-d))),l=Math.min(l,h))}else 0<=p.indexOf("line")||0<=p.indexOf("area")||
0<=p.indexOf("scatter")?(k="auto",C=4):0<=p.indexOf("stacked")?"auto"===k&&(k="inside"):"bubble"===p&&(k="inside"),l=n.point.y+w/2-m/2+d,"inside"!==k?(e=c.x1,h=c.x2,0>z?(q=n.point.x-("horizontal"===t?K:K-w/2)-C-b,q<e&&(q="auto"===k?Math.max(n.point.x,e)+C:e+C,A=q+K>n.point.x)):(q=n.point.x+("horizontal"===t?0:w/2)+C+b,q>h-K-C-b&&(q="auto"===k?Math.min(n.point.x,h)-("horizontal"===t?K:K/2)-C:h-K-C,A=q<n.point.x))):(e=Math.max(n.bounds.x1,c.x1),Math.min(n.bounds.x2,c.x2),b=0<=p.indexOf("range")||"error"===
p?0>z?Math.max(n.bounds.x1,c.x1)+w/2+C:Math.min(n.bounds.x2,c.x2)-K/2-C+("horizontal"===t?0:w/2):(Math.max(n.bounds.x1,c.x1)+Math.min(n.bounds.x2,c.x2))/2+("horizontal"===t?0:w/2),q=0>z?Math.max(n.point.x,b)-("horizontal"===t?K/2:0):Math.min(n.point.x,b)-K/2,q=Math.max(q,e));"vertical"===t&&(l+=m-w/2);s.x=q;s.y=l;s.render(!0);y&&("inside"!==k&&(0>p.indexOf("bar")&&("error"!==p||!n.axisSwapped)&&n.point.x>c.x1&&n.point.x<c.x2||!A)&&(0>p.indexOf("column")&&("error"!==p||n.axisSwapped)&&n.point.y>c.y1&&
n.point.y<c.y2||!A))&&(f.lineWidth=y,f.strokeStyle=v?v:"gray",f.setLineDash&&f.setLineDash(R(ha,y)),f.beginPath(),f.moveTo(n.point.x,n.point.y),0<=p.indexOf("bar")||"error"===p&&n.axisSwapped?f.lineTo(q+(0<n.direction?-C:K+C)+("vertical"===t?-w/2:0),l+("vertical"===t?-m/2:m/2-w/2)-d):0<=p.indexOf("column")||"error"===p&&!n.axisSwapped?f.lineTo(q+K/2-("horizontal"===t?0:w/2),l+("vertical"===t?(l-m<n.point.y?0:-m)+d:(l-w/2<n.point.y?m:0)-w/2)):f.lineTo(q+K/2-("horizontal"===t?0:w/2),l+("vertical"===
t?l-m<n.point.y?0:-m:(l-w/2<n.point.y?m:0)-w/2)),f.stroke())}}f={source:f,dest:this.plotArea.ctx,animationCallback:x.fadeInAnimation,easingFunction:x.easing.easeInQuad,animationBase:0,startTimePercent:0.7};for(a=0;a<this._indexLabels.length;a++)n=this._indexLabels[a],s=sa("indexLabelBackgroundColor",n.dataPoint,n.dataSeries),n.dataSeries.indexLabelBackgroundColor=g(s)?u?"transparent":null:s;return f};r.prototype.renderLine=function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,c=u?this._preRenderCtx:
f;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;c.save();var e=this.plotArea;c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();for(var h=[],g,d=0;d<a.dataSeriesIndexes.length;d++){var K=a.dataSeriesIndexes[d],m=this.data[K];c.lineWidth=m.lineThickness;var n=m.dataPoints,p="solid";if(c.setLineDash){var q=R(m.nullDataLineDashType,m.lineThickness),p=m.lineDashType,l=R(p,m.lineThickness);c.setLineDash(l)}var w=m.id;this._eventManager.objectMap[w]={objectType:"dataSeries",
dataSeriesIndex:K};w=S(w);b.strokeStyle=w;b.lineWidth=0<m.lineThickness?Math.max(m.lineThickness,4):0;var w=m._colorSet,k=w=m.lineColor=m.options.lineColor?m.options.lineColor:w[0];c.strokeStyle=w;var ha=!0,v=0,y,t;c.beginPath();if(0<n.length){for(var r=!1,v=0;v<n.length;v++)if(y=n[v].x.getTime?n[v].x.getTime():n[v].x,!(y<a.axisX.dataInfo.viewPortMin||y>a.axisX.dataInfo.viewPortMax&&(!m.connectNullData||!r)))if("number"!==typeof n[v].y)0<v&&!(m.connectNullData||r||ha)&&(c.stroke(),u&&b.stroke()),
r=!0;else{y=a.axisX.convertValueToPixel(y);t=a.axisY.convertValueToPixel(n[v].y);var E=m.dataPointIds[v];this._eventManager.objectMap[E]={id:E,objectType:"dataPoint",dataSeriesIndex:K,dataPointIndex:v,x1:y,y1:t};ha||r?(!ha&&m.connectNullData?(c.setLineDash&&(m.options.nullDataLineDashType||p===m.lineDashType&&m.lineDashType!==m.nullDataLineDashType)&&(c.stroke(),c.beginPath(),c.moveTo(g.x,g.y),p=m.nullDataLineDashType,c.setLineDash(q)),c.lineTo(y,t),u&&b.lineTo(y,t)):(c.beginPath(),c.moveTo(y,t),
u&&(b.beginPath(),b.moveTo(y,t))),r=ha=!1):(c.lineTo(y,t),u&&b.lineTo(y,t),0==v%500&&(c.stroke(),c.beginPath(),c.moveTo(y,t),u&&(b.stroke(),b.beginPath(),b.moveTo(y,t))));g={x:y,y:t};v<n.length-1&&(k!==(n[v].lineColor||w)||p!==(n[v].lineDashType||m.lineDashType))&&(c.stroke(),c.beginPath(),c.moveTo(y,t),k=n[v].lineColor||w,c.strokeStyle=k,c.setLineDash&&(n[v].lineDashType?(p=n[v].lineDashType,c.setLineDash(R(p,m.lineThickness))):(p=m.lineDashType,c.setLineDash(l))));if(0<n[v].markerSize||0<m.markerSize){var B=
m.getMarkerProperties(v,y,t,c);h.push(B);E=S(E);u&&h.push({x:y,y:t,ctx:b,type:B.type,size:B.size,color:E,borderColor:E,borderThickness:B.borderThickness})}(n[v].indexLabel||m.indexLabel||n[v].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"line",dataPoint:n[v],dataSeries:m,point:{x:y,y:t},direction:0>n[v].y===a.axisY.reversed?1:-1,color:w})}c.stroke();u&&b.stroke()}}s.drawMarkers(h);u&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation=
"source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),b.beginPath());c.restore();c.beginPath();return{source:f,dest:this.plotArea.ctx,animationCallback:x.xClipAnimation,easingFunction:x.easing.linear,animationBase:0}}};r.prototype.renderStepLine=
function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,c=u?this._preRenderCtx:f;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx;c.save();var e=this.plotArea;c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();for(var h=[],g,d=0;d<a.dataSeriesIndexes.length;d++){var K=a.dataSeriesIndexes[d],m=this.data[K];c.lineWidth=m.lineThickness;var n=m.dataPoints,p="solid";if(c.setLineDash){var q=R(m.nullDataLineDashType,m.lineThickness),p=m.lineDashType,l=R(p,m.lineThickness);c.setLineDash(l)}var w=
m.id;this._eventManager.objectMap[w]={objectType:"dataSeries",dataSeriesIndex:K};w=S(w);b.strokeStyle=w;b.lineWidth=0<m.lineThickness?Math.max(m.lineThickness,4):0;var w=m._colorSet,k=w=m.lineColor=m.options.lineColor?m.options.lineColor:w[0];c.strokeStyle=w;var ha=!0,v=0,y,t;c.beginPath();if(0<n.length){for(var r=!1,v=0;v<n.length;v++)if(y=n[v].getTime?n[v].x.getTime():n[v].x,!(y<a.axisX.dataInfo.viewPortMin||y>a.axisX.dataInfo.viewPortMax&&(!m.connectNullData||!r)))if("number"!==typeof n[v].y)0<
v&&!(m.connectNullData||r||ha)&&(c.stroke(),u&&b.stroke()),r=!0;else{var E=t;y=a.axisX.convertValueToPixel(y);t=a.axisY.convertValueToPixel(n[v].y);var B=m.dataPointIds[v];this._eventManager.objectMap[B]={id:B,objectType:"dataPoint",dataSeriesIndex:K,dataPointIndex:v,x1:y,y1:t};ha||r?(!ha&&m.connectNullData?(c.setLineDash&&(m.options.nullDataLineDashType||p===m.lineDashType&&m.lineDashType!==m.nullDataLineDashType)&&(c.stroke(),c.beginPath(),c.moveTo(g.x,g.y),p=m.nullDataLineDashType,c.setLineDash(q)),
c.lineTo(y,E),c.lineTo(y,t),u&&(b.lineTo(y,E),b.lineTo(y,t))):(c.beginPath(),c.moveTo(y,t),u&&(b.beginPath(),b.moveTo(y,t))),r=ha=!1):(c.lineTo(y,E),u&&b.lineTo(y,E),c.lineTo(y,t),u&&b.lineTo(y,t),0==v%500&&(c.stroke(),c.beginPath(),c.moveTo(y,t),u&&(b.stroke(),b.beginPath(),b.moveTo(y,t))));g={x:y,y:t};v<n.length-1&&(k!==(n[v].lineColor||w)||p!==(n[v].lineDashType||m.lineDashType))&&(c.stroke(),c.beginPath(),c.moveTo(y,t),k=n[v].lineColor||w,c.strokeStyle=k,c.setLineDash&&(n[v].lineDashType?(p=n[v].lineDashType,
c.setLineDash(R(p,m.lineThickness))):(p=m.lineDashType,c.setLineDash(l))));if(0<n[v].markerSize||0<m.markerSize)E=m.getMarkerProperties(v,y,t,c),h.push(E),B=S(B),u&&h.push({x:y,y:t,ctx:b,type:E.type,size:E.size,color:B,borderColor:B,borderThickness:E.borderThickness});(n[v].indexLabel||m.indexLabel||n[v].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"stepLine",dataPoint:n[v],dataSeries:m,point:{x:y,y:t},direction:0>n[v].y===a.axisY.reversed?1:-1,color:w})}c.stroke();
u&&b.stroke()}}s.drawMarkers(h);u&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),b.beginPath());c.restore();c.beginPath();return{source:f,dest:this.plotArea.ctx,
animationCallback:x.xClipAnimation,easingFunction:x.easing.linear,animationBase:0}}};r.prototype.renderSpline=function(a){function f(a){a=G(a,2);if(0<a.length){b.beginPath();u&&e.beginPath();b.moveTo(a[0].x,a[0].y);a[0].newStrokeStyle&&(b.strokeStyle=a[0].newStrokeStyle);a[0].newLineDashArray&&b.setLineDash(a[0].newLineDashArray);u&&e.moveTo(a[0].x,a[0].y);for(var c=0;c<a.length-3;c+=3)if(b.bezierCurveTo(a[c+1].x,a[c+1].y,a[c+2].x,a[c+2].y,a[c+3].x,a[c+3].y),u&&e.bezierCurveTo(a[c+1].x,a[c+1].y,a[c+
2].x,a[c+2].y,a[c+3].x,a[c+3].y),0<c&&0===c%3E3||a[c+3].newStrokeStyle||a[c+3].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(a[c+3].x,a[c+3].y),a[c+3].newStrokeStyle&&(b.strokeStyle=a[c+3].newStrokeStyle),a[c+3].newLineDashArray&&b.setLineDash(a[c+3].newLineDashArray),u&&(e.stroke(),e.beginPath(),e.moveTo(a[c+3].x,a[c+3].y));b.stroke();u&&e.stroke()}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=u?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx;b.save();
var h=this.plotArea;b.beginPath();b.rect(h.x1,h.y1,h.width,h.height);b.clip();for(var g=[],d=0;d<a.dataSeriesIndexes.length;d++){var K=a.dataSeriesIndexes[d],m=this.data[K];b.lineWidth=m.lineThickness;var n=m.dataPoints,p="solid";if(b.setLineDash){var q=R(m.nullDataLineDashType,m.lineThickness),p=m.lineDashType,l=R(p,m.lineThickness);b.setLineDash(l)}var w=m.id;this._eventManager.objectMap[w]={objectType:"dataSeries",dataSeriesIndex:K};w=S(w);e.strokeStyle=w;e.lineWidth=0<m.lineThickness?Math.max(m.lineThickness,
4):0;var w=m._colorSet,k=w=m.lineColor=m.options.lineColor?m.options.lineColor:w[0];b.strokeStyle=w;var ha=0,v,y,t=[];b.beginPath();if(0<n.length)for(y=!1,ha=0;ha<n.length;ha++)if(v=n[ha].getTime?n[ha].x.getTime():n[ha].x,!(v<a.axisX.dataInfo.viewPortMin||v>a.axisX.dataInfo.viewPortMax&&(!m.connectNullData||!y)))if("number"!==typeof n[ha].y)0<ha&&!y&&(m.connectNullData?b.setLineDash&&(0<t.length&&(m.options.nullDataLineDashType||!n[ha-1].lineDashType))&&(t[t.length-1].newLineDashArray=q,p=m.nullDataLineDashType):
(f(t),t=[])),y=!0;else{v=a.axisX.convertValueToPixel(v);y=a.axisY.convertValueToPixel(n[ha].y);var r=m.dataPointIds[ha];this._eventManager.objectMap[r]={id:r,objectType:"dataPoint",dataSeriesIndex:K,dataPointIndex:ha,x1:v,y1:y};t[t.length]={x:v,y:y};ha<n.length-1&&(k!==(n[ha].lineColor||w)||p!==(n[ha].lineDashType||m.lineDashType))&&(k=n[ha].lineColor||w,t[t.length-1].newStrokeStyle=k,b.setLineDash&&(n[ha].lineDashType?(p=n[ha].lineDashType,t[t.length-1].newLineDashArray=R(p,m.lineThickness)):(p=
m.lineDashType,t[t.length-1].newLineDashArray=l)));if(0<n[ha].markerSize||0<m.markerSize){var E=m.getMarkerProperties(ha,v,y,b);g.push(E);r=S(r);u&&g.push({x:v,y:y,ctx:e,type:E.type,size:E.size,color:r,borderColor:r,borderThickness:E.borderThickness})}(n[ha].indexLabel||m.indexLabel||n[ha].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"spline",dataPoint:n[ha],dataSeries:m,point:{x:v,y:y},direction:0>n[ha].y===a.axisY.reversed?1:-1,color:w});y=!1}f(t)}s.drawMarkers(g);
u&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(h.x1,h.y1,h.width,h.height),e.beginPath());b.restore();b.beginPath();return{source:c,dest:this.plotArea.ctx,animationCallback:x.xClipAnimation,
easingFunction:x.easing.linear,animationBase:0}}};r.prototype.renderColumn=function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,c=u?this._preRenderCtx:f;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,h=0,g,d,K,m=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),h=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,n=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:
Math.min(0.15*this.width,0.9*(this.plotArea.width/a.plotType.totalDataSeries))<<0,p=a.axisX.dataInfo.minDiff;isFinite(p)||(p=0.3*Math.abs(a.axisX.range));p=this.dataPointWidth=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.width*(a.axisX.logarithmic?Math.log(p)/Math.log(a.axisX.range):Math.abs(p)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&h>n&&(h=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,n));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&
n<h)&&(n=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,h));p<h&&(p=h);p>n&&(p=n);c.save();u&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(n=0;n<a.dataSeriesIndexes.length;n++){var q=a.dataSeriesIndexes[n],l=this.data[q],w=l.dataPoints;if(0<w.length)for(var k=5<p&&l.bevelEnabled?!0:!1,h=
0;h<w.length;h++)if(w[h].getTime?K=w[h].x.getTime():K=w[h].x,!(K<a.axisX.dataInfo.viewPortMin||K>a.axisX.dataInfo.viewPortMax)&&"number"===typeof w[h].y){g=a.axisX.convertValueToPixel(K);d=a.axisY.convertValueToPixel(w[h].y);g=a.axisX.reversed?g+a.plotType.totalDataSeries*p/2-(a.previousDataSeriesCount+n)*p<<0:g-a.plotType.totalDataSeries*p/2+(a.previousDataSeriesCount+n)*p<<0;var s=a.axisX.reversed?g-p<<0:g+p<<0,v;0<=w[h].y?v=m:(v=d,d=m);d>v&&(b=d,d=v,v=b);b=w[h].color?w[h].color:l._colorSet[h%l._colorSet.length];
ba(c,g,d,s,v,b,0,null,k&&0<=w[h].y,0>w[h].y&&k,!1,!1,l.fillOpacity);b=l.dataPointIds[h];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:h,x1:g,y1:d,x2:s,y2:v};b=S(b);u&&ba(this._eventManager.ghostCtx,g,d,s,v,b,0,null,!1,!1,!1,!1);(w[h].indexLabel||l.indexLabel||w[h].indexLabelFormatter||l.indexLabelFormatter)&&this._indexLabels.push({chartType:"column",dataPoint:w[h],dataSeries:l,point:{x:g+(s-g)/2,y:0>w[h].y===a.axisY.reversed?d:v},direction:0>w[h].y===
a.axisY.reversed?1:-1,bounds:{x1:g,y1:Math.min(d,v),x2:s,y2:Math.max(d,v)},color:b})}}u&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());
c.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:x.yScaleAnimation,easingFunction:x.easing.easeOutQuart,animationBase:m<a.axisY.bounds.y1?a.axisY.bounds.y1:m>a.axisY.bounds.y2?a.axisY.bounds.y2:m}}};r.prototype.renderStackedColumn=function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,c=u?this._preRenderCtx:f;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,h=[],g=[],d=[],K=[],m=0,n,p,q=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),m=
this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;n=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.width<<0;var l=a.axisX.dataInfo.minDiff;isFinite(l)||(l=0.3*Math.abs(a.axisX.range));l=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.width*(a.axisX.logarithmic?Math.log(l)/Math.log(a.axisX.range):Math.abs(l)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&
m>n&&(m=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,n));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&n<m)&&(n=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,m));l<m&&(l=m);l>n&&(l=n);c.save();u&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(var w=0;w<a.dataSeriesIndexes.length;w++){var k=
a.dataSeriesIndexes[w],s=this.data[k],v=s.dataPoints;if(0<v.length){var t=5<l&&s.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(m=0;m<v.length;m++)if(b=v[m].x.getTime?v[m].x.getTime():v[m].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof v[m].y){n=a.axisX.convertValueToPixel(b);var r=n-a.plotType.plotUnits.length*l/2+a.index*l<<0,U=r+l<<0,E;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0<v[m].y)d[b]=v[m].y+(d[b]?d[b]:
0),0<d[b]&&(p=a.axisY.convertValueToPixel(d[b]),E="undefined"!==typeof h[b]?h[b]:q,h[b]=p);else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=v[m].y)K[b]=v[m].y+(K[b]?K[b]:0),E=a.axisY.convertValueToPixel(K[b]),p="undefined"!==typeof g[b]?g[b]:q,g[b]=E;else if(p=a.axisY.convertValueToPixel(v[m].y),0<=v[m].y){var B="undefined"!==typeof h[b]?h[b]:0;p-=B;E=q-B;h[b]=B+(E-p)}else B=g[b]?g[b]:0,E=p+B,p=q+B,g[b]=B+(E-p);b=v[m].color?v[m].color:s._colorSet[m%s._colorSet.length];
ba(c,r,p,U,E,b,0,null,t&&0<=v[m].y,0>v[m].y&&t,!1,!1,s.fillOpacity);b=s.dataPointIds[m];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:k,dataPointIndex:m,x1:r,y1:p,x2:U,y2:E};b=S(b);u&&ba(this._eventManager.ghostCtx,r,p,U,E,b,0,null,!1,!1,!1,!1);(v[m].indexLabel||s.indexLabel||v[m].indexLabelFormatter||s.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedColumn",dataPoint:v[m],dataSeries:s,point:{x:n,y:0<=v[m].y?p:E},direction:0>v[m].y===a.axisY.reversed?
1:-1,bounds:{x1:r,y1:Math.min(p,E),x2:U,y2:Math.max(p,E)},color:b})}}}u&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());
c.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:x.yScaleAnimation,easingFunction:x.easing.easeOutQuart,animationBase:q<a.axisY.bounds.y1?a.axisY.bounds.y1:q>a.axisY.bounds.y2?a.axisY.bounds.y2:q}}};r.prototype.renderStackedColumn100=function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,c=u?this._preRenderCtx:f;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,h=[],g=[],d=[],K=[],m=0,n,p,q=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),
m=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;n=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.width<<0;var l=a.axisX.dataInfo.minDiff;isFinite(l)||(l=0.3*Math.abs(a.axisX.range));l=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.width*(a.axisX.logarithmic?Math.log(l)/Math.log(a.axisX.range):Math.abs(l)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&
m>n&&(m=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,n));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&n<m)&&(n=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,m));l<m&&(l=m);l>n&&(l=n);c.save();u&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(var w=0;w<a.dataSeriesIndexes.length;w++){var s=
a.dataSeriesIndexes[w],k=this.data[s],v=k.dataPoints;if(0<v.length)for(var t=5<l&&k.bevelEnabled?!0:!1,m=0;m<v.length;m++)if(b=v[m].x.getTime?v[m].x.getTime():v[m].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof v[m].y){n=a.axisX.convertValueToPixel(b);p=0!==a.dataPointYSums[b]?100*(v[m].y/a.dataPointYSums[b]):0;var r=n-a.plotType.plotUnits.length*l/2+a.index*l<<0,U=r+l<<0,E;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&
0<v[m].y){d[b]=p+("undefined"!==typeof d[b]?d[b]:0);if(0>=d[b])continue;p=a.axisY.convertValueToPixel(d[b]);E=h[b]?h[b]:q;h[b]=p}else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=v[m].y)K[b]=p+("undefined"!==typeof K[b]?K[b]:0),E=a.axisY.convertValueToPixel(K[b]),p=g[b]?g[b]:q,g[b]=E;else if(p=a.axisY.convertValueToPixel(p),0<=v[m].y){var B="undefined"!==typeof h[b]?h[b]:0;p-=B;E=q-B;a.dataSeriesIndexes.length-1===w&&1>=Math.abs(e.y1-p)&&(p=e.y1);h[b]=B+(E-p)}else B="undefined"!==
typeof g[b]?g[b]:0,E=p+B,p=q+B,a.dataSeriesIndexes.length-1===w&&1>=Math.abs(e.y2-E)&&(E=e.y2),g[b]=B+(E-p);b=v[m].color?v[m].color:k._colorSet[m%k._colorSet.length];ba(c,r,p,U,E,b,0,null,t&&0<=v[m].y,0>v[m].y&&t,!1,!1,k.fillOpacity);b=k.dataPointIds[m];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:s,dataPointIndex:m,x1:r,y1:p,x2:U,y2:E};b=S(b);u&&ba(this._eventManager.ghostCtx,r,p,U,E,b,0,null,!1,!1,!1,!1);(v[m].indexLabel||k.indexLabel||v[m].indexLabelFormatter||k.indexLabelFormatter)&&
this._indexLabels.push({chartType:"stackedColumn100",dataPoint:v[m],dataSeries:k,point:{x:n,y:0<=v[m].y?p:E},direction:0>v[m].y===a.axisY.reversed?1:-1,bounds:{x1:r,y1:Math.min(p,E),x2:U,y2:Math.max(p,E)},color:b})}}u&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&
this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:x.yScaleAnimation,easingFunction:x.easing.easeOutQuart,animationBase:q<a.axisY.bounds.y1?a.axisY.bounds.y1:q>a.axisY.bounds.y2?a.axisY.bounds.y2:q}}};r.prototype.renderBar=function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,c=u?this._preRenderCtx:f;if(!(0>=a.dataSeriesIndexes.length)){var b=
null,e=this.plotArea,h=0,g,d,K,m=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),h=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,n=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.height,0.9*(this.plotArea.height/a.plotType.totalDataSeries))<<0,p=a.axisX.dataInfo.minDiff;isFinite(p)||(p=0.3*Math.abs(a.axisX.range));p=this.options.dataPointWidth?
this.dataPointWidth:0.9*(e.height*(a.axisX.logarithmic?Math.log(p)/Math.log(a.axisX.range):Math.abs(p)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&h>n&&(h=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,n));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&n<h)&&(n=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,h));p<h&&(p=h);p>n&&(p=n);c.save();u&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);
c.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(n=0;n<a.dataSeriesIndexes.length;n++){var q=a.dataSeriesIndexes[n],l=this.data[q],w=l.dataPoints;if(0<w.length){var k=5<p&&l.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(h=0;h<w.length;h++)if(w[h].getTime?K=w[h].x.getTime():K=w[h].x,!(K<a.axisX.dataInfo.viewPortMin||K>a.axisX.dataInfo.viewPortMax)&&"number"===typeof w[h].y){d=a.axisX.convertValueToPixel(K);
g=a.axisY.convertValueToPixel(w[h].y);d=a.axisX.reversed?d+a.plotType.totalDataSeries*p/2-(a.previousDataSeriesCount+n)*p<<0:d-a.plotType.totalDataSeries*p/2+(a.previousDataSeriesCount+n)*p<<0;var s=a.axisX.reversed?d-p<<0:d+p<<0,v;0<=w[h].y?v=m:(v=g,g=m);b=w[h].color?w[h].color:l._colorSet[h%l._colorSet.length];ba(c,v,d,g,s,b,0,null,k,!1,!1,!1,l.fillOpacity);b=l.dataPointIds[h];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:h,x1:v,y1:d,x2:g,y2:s};b=
S(b);u&&ba(this._eventManager.ghostCtx,v,d,g,s,b,0,null,!1,!1,!1,!1);(w[h].indexLabel||l.indexLabel||w[h].indexLabelFormatter||l.indexLabelFormatter)&&this._indexLabels.push({chartType:"bar",dataPoint:w[h],dataSeries:l,point:{x:0<=w[h].y?g:v,y:d+(s-d)/2},direction:0>w[h].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(v,g),y1:d,x2:Math.max(v,g),y2:s},color:b})}}}u&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,
0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:x.xScaleAnimation,easingFunction:x.easing.easeOutQuart,animationBase:m<a.axisY.bounds.x1?a.axisY.bounds.x1:m>a.axisY.bounds.x2?a.axisY.bounds.x2:
m}}};r.prototype.renderStackedBar=function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,c=u?this._preRenderCtx:f;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,h=[],g=[],d=[],K=[],m=0,n,p,q=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),m=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;p=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.height<<
0;var l=a.axisX.dataInfo.minDiff;isFinite(l)||(l=0.3*Math.abs(a.axisX.range));l=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.height*(a.axisX.logarithmic?Math.log(l)/Math.log(a.axisX.range):Math.abs(l)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&m>p&&(m=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,p));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&p<m)&&(p=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,m));l<
m&&(l=m);l>p&&(l=p);c.save();u&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(var w=0;w<a.dataSeriesIndexes.length;w++){var s=a.dataSeriesIndexes[w],k=this.data[s],v=k.dataPoints;if(0<v.length){var t=5<l&&k.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(m=0;m<v.length;m++)if(b=v[m].x.getTime?v[m].x.getTime():
v[m].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&"number"===typeof v[m].y){p=a.axisX.convertValueToPixel(b);var r=p-a.plotType.plotUnits.length*l/2+a.index*l<<0,U=r+l<<0,E;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0<v[m].y)d[b]=v[m].y+(d[b]?d[b]:0),0<d[b]&&(E=h[b]?h[b]:q,h[b]=n=a.axisY.convertValueToPixel(d[b]));else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=v[m].y)K[b]=v[m].y+(K[b]?K[b]:0),n=g[b]?
g[b]:q,g[b]=E=a.axisY.convertValueToPixel(K[b]);else if(n=a.axisY.convertValueToPixel(v[m].y),0<=v[m].y){var B=h[b]?h[b]:0;E=q+B;n+=B;h[b]=B+(n-E)}else B=g[b]?g[b]:0,E=n-B,n=q-B,g[b]=B+(n-E);b=v[m].color?v[m].color:k._colorSet[m%k._colorSet.length];ba(c,E,r,n,U,b,0,null,t,!1,!1,!1,k.fillOpacity);b=k.dataPointIds[m];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:s,dataPointIndex:m,x1:E,y1:r,x2:n,y2:U};b=S(b);u&&ba(this._eventManager.ghostCtx,E,r,n,U,b,0,null,!1,!1,!1,
!1);(v[m].indexLabel||k.indexLabel||v[m].indexLabelFormatter||k.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar",dataPoint:v[m],dataSeries:k,point:{x:0<=v[m].y?n:E,y:p},direction:0>v[m].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(E,n),y1:r,x2:Math.max(E,n),y2:U},color:b})}}}u&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&
c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:x.xScaleAnimation,easingFunction:x.easing.easeOutQuart,animationBase:q<a.axisY.bounds.x1?a.axisY.bounds.x1:q>a.axisY.bounds.x2?a.axisY.bounds.x2:q}}};r.prototype.renderStackedBar100=function(a){var f=
a.targetCanvasCtx||this.plotArea.ctx,c=u?this._preRenderCtx:f;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,h=[],g=[],d=[],K=[],m=0,n,p,q=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),m=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;p=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.15*this.height<<0;var l=a.axisX.dataInfo.minDiff;isFinite(l)||
(l=0.3*Math.abs(a.axisX.range));l=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.height*(a.axisX.logarithmic?Math.log(l)/Math.log(a.axisX.range):Math.abs(l)/Math.abs(a.axisX.range))/a.plotType.plotUnits.length)<<0;this.dataPointMaxWidth&&m>p&&(m=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,p));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&p<m)&&(p=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,m));l<m&&(l=m);l>p&&(l=p);c.save();u&&this._eventManager.ghostCtx.save();
c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(var w=0;w<a.dataSeriesIndexes.length;w++){var k=a.dataSeriesIndexes[w],s=this.data[k],v=s.dataPoints;if(0<v.length){var t=5<l&&s.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(m=0;m<v.length;m++)if(b=v[m].x.getTime?v[m].x.getTime():v[m].x,!(b<a.axisX.dataInfo.viewPortMin||b>a.axisX.dataInfo.viewPortMax)&&
"number"===typeof v[m].y){p=a.axisX.convertValueToPixel(b);var r;r=0!==a.dataPointYSums[b]?100*(v[m].y/a.dataPointYSums[b]):0;var U=p-a.plotType.plotUnits.length*l/2+a.index*l<<0,E=U+l<<0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0<v[m].y){d[b]=r+(d[b]?d[b]:0);if(0>=d[b])continue;r=h[b]?h[b]:q;h[b]=n=a.axisY.convertValueToPixel(d[b])}else if(a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length&&0>=v[m].y)K[b]=r+(K[b]?K[b]:0),n=g[b]?g[b]:
q,g[b]=r=a.axisY.convertValueToPixel(K[b]);else if(n=a.axisY.convertValueToPixel(r),0<=v[m].y){var B=h[b]?h[b]:0;r=q+B;n+=B;a.dataSeriesIndexes.length-1===w&&1>=Math.abs(e.x2-n)&&(n=e.x2);h[b]=B+(n-r)}else B=g[b]?g[b]:0,r=n-B,n=q-B,a.dataSeriesIndexes.length-1===w&&1>=Math.abs(e.x1-r)&&(r=e.x1),g[b]=B+(n-r);b=v[m].color?v[m].color:s._colorSet[m%s._colorSet.length];ba(c,r,U,n,E,b,0,null,t,!1,!1,!1,s.fillOpacity);b=s.dataPointIds[m];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:k,
dataPointIndex:m,x1:r,y1:U,x2:n,y2:E};b=S(b);u&&ba(this._eventManager.ghostCtx,r,U,n,E,b,0,null,!1,!1,!1,!1);(v[m].indexLabel||s.indexLabel||v[m].indexLabelFormatter||s.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar100",dataPoint:v[m],dataSeries:s,point:{x:0<=v[m].y?n:r,y:p},direction:0>v[m].y===a.axisY.reversed?1:-1,bounds:{x1:Math.min(r,n),y1:U,x2:Math.max(r,n),y2:E},color:b})}}}u&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",
a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:x.xScaleAnimation,easingFunction:x.easing.easeOutQuart,animationBase:q<a.axisY.bounds.x1?a.axisY.bounds.x1:
q>a.axisY.bounds.x2?a.axisY.bounds.x2:q}}};r.prototype.renderArea=function(a){var f,c;function b(){E&&(0<l.lineThickness&&h.stroke(),a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?U=r:0>a.axisY.viewportMaximum?U=d.y1:0<a.axisY.viewportMinimum&&(U=r),h.lineTo(t,U),h.lineTo(E.x,U),h.closePath(),h.globalAlpha=l.fillOpacity,h.fill(),h.globalAlpha=1,u&&(g.lineTo(t,U),g.lineTo(E.x,U),g.closePath(),g.fill()),h.beginPath(),h.moveTo(t,v),g.beginPath(),g.moveTo(t,v),E={x:t,y:v})}
var e=a.targetCanvasCtx||this.plotArea.ctx,h=u?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var g=this._eventManager.ghostCtx,d=a.axisY.lineCoordinates,K=[],m=this.plotArea,n;h.save();u&&g.save();h.beginPath();h.rect(m.x1,m.y1,m.width,m.height);h.clip();u&&(g.beginPath(),g.rect(m.x1,m.y1,m.width,m.height),g.clip());for(var p=0;p<a.dataSeriesIndexes.length;p++){var q=a.dataSeriesIndexes[p],l=this.data[q],w=l.dataPoints,K=l.id;this._eventManager.objectMap[K]={objectType:"dataSeries",dataSeriesIndex:q};
K=S(K);g.fillStyle=K;K=[];f=!0;var k=0,t,v,y,r=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),U,E=null;if(0<w.length){var B=l._colorSet[k%l._colorSet.length],z=l.lineColor=l.options.lineColor||B,A=z;h.fillStyle=B;h.strokeStyle=z;h.lineWidth=l.lineThickness;c="solid";if(h.setLineDash){var Q=R(l.nullDataLineDashType,l.lineThickness);c=l.lineDashType;var da=R(c,l.lineThickness);h.setLineDash(da)}for(var ga=!0;k<w.length;k++)if(y=w[k].x.getTime?w[k].x.getTime():w[k].x,!(y<
a.axisX.dataInfo.viewPortMin||y>a.axisX.dataInfo.viewPortMax&&(!l.connectNullData||!ga)))if("number"!==typeof w[k].y)l.connectNullData||(ga||f)||b(),ga=!0;else{t=a.axisX.convertValueToPixel(y);v=a.axisY.convertValueToPixel(w[k].y);f||ga?(!f&&l.connectNullData?(h.setLineDash&&(l.options.nullDataLineDashType||c===l.lineDashType&&l.lineDashType!==l.nullDataLineDashType)&&(f=t,c=v,t=n.x,v=n.y,b(),h.moveTo(n.x,n.y),t=f,v=c,E=n,c=l.nullDataLineDashType,h.setLineDash(Q)),h.lineTo(t,v),u&&g.lineTo(t,v)):
(h.beginPath(),h.moveTo(t,v),u&&(g.beginPath(),g.moveTo(t,v)),E={x:t,y:v}),ga=f=!1):(h.lineTo(t,v),u&&g.lineTo(t,v),0==k%250&&b());n={x:t,y:v};k<w.length-1&&(A!==(w[k].lineColor||z)||c!==(w[k].lineDashType||l.lineDashType))&&(b(),A=w[k].lineColor||z,h.strokeStyle=A,h.setLineDash&&(w[k].lineDashType?(c=w[k].lineDashType,h.setLineDash(R(c,l.lineThickness))):(c=l.lineDashType,h.setLineDash(da))));var ca=l.dataPointIds[k];this._eventManager.objectMap[ca]={id:ca,objectType:"dataPoint",dataSeriesIndex:q,
dataPointIndex:k,x1:t,y1:v};0!==w[k].markerSize&&(0<w[k].markerSize||0<l.markerSize)&&(y=l.getMarkerProperties(k,t,v,h),K.push(y),ca=S(ca),u&&K.push({x:t,y:v,ctx:g,type:y.type,size:y.size,color:ca,borderColor:ca,borderThickness:y.borderThickness}));(w[k].indexLabel||l.indexLabel||w[k].indexLabelFormatter||l.indexLabelFormatter)&&this._indexLabels.push({chartType:"area",dataPoint:w[k],dataSeries:l,point:{x:t,y:v},direction:0>w[k].y===a.axisY.reversed?1:-1,color:B})}b();s.drawMarkers(K)}}u&&(e.drawImage(this._preRenderCanvas,
0,0,this.width,this.height),h.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&h.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&h.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),h.clearRect(m.x1,m.y1,m.width,m.height),this._eventManager.ghostCtx.restore());h.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:x.xClipAnimation,easingFunction:x.easing.linear,
animationBase:0}}};r.prototype.renderSplineArea=function(a){function f(){var c=G(y,2);if(0<c.length){if(0<n.lineThickness){b.beginPath();b.moveTo(c[0].x,c[0].y);c[0].newStrokeStyle&&(b.strokeStyle=c[0].newStrokeStyle);c[0].newLineDashArray&&b.setLineDash(c[0].newLineDashArray);for(var f=0;f<c.length-3;f+=3)if(b.bezierCurveTo(c[f+1].x,c[f+1].y,c[f+2].x,c[f+2].y,c[f+3].x,c[f+3].y),u&&e.bezierCurveTo(c[f+1].x,c[f+1].y,c[f+2].x,c[f+2].y,c[f+3].x,c[f+3].y),c[f+3].newStrokeStyle||c[f+3].newLineDashArray)b.stroke(),
b.beginPath(),b.moveTo(c[f+3].x,c[f+3].y),c[f+3].newStrokeStyle&&(b.strokeStyle=c[f+3].newStrokeStyle),c[f+3].newLineDashArray&&b.setLineDash(c[f+3].newLineDashArray);b.stroke()}b.beginPath();b.moveTo(c[0].x,c[0].y);u&&(e.beginPath(),e.moveTo(c[0].x,c[0].y));for(f=0;f<c.length-3;f+=3)b.bezierCurveTo(c[f+1].x,c[f+1].y,c[f+2].x,c[f+2].y,c[f+3].x,c[f+3].y),u&&e.bezierCurveTo(c[f+1].x,c[f+1].y,c[f+2].x,c[f+2].y,c[f+3].x,c[f+3].y);a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?
t=k:0>a.axisY.viewportMaximum?t=h.y1:0<a.axisY.viewportMinimum&&(t=k);v={x:c[0].x,y:c[0].y};b.lineTo(c[c.length-1].x,t);b.lineTo(v.x,t);b.closePath();b.globalAlpha=n.fillOpacity;b.fill();b.globalAlpha=1;u&&(e.lineTo(c[c.length-1].x,t),e.lineTo(v.x,t),e.closePath(),e.fill())}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=u?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx,h=a.axisY.lineCoordinates,g=[],d=this.plotArea;b.save();u&&e.save();b.beginPath();b.rect(d.x1,
d.y1,d.width,d.height);b.clip();u&&(e.beginPath(),e.rect(d.x1,d.y1,d.width,d.height),e.clip());for(var K=0;K<a.dataSeriesIndexes.length;K++){var m=a.dataSeriesIndexes[K],n=this.data[m],p=n.dataPoints,g=n.id;this._eventManager.objectMap[g]={objectType:"dataSeries",dataSeriesIndex:m};g=S(g);e.fillStyle=g;var g=[],q=0,l,w,k=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),t,v=null,y=[];if(0<p.length){var r=n._colorSet[q%n._colorSet.length],U=n.lineColor=n.options.lineColor||
r,E=U;b.fillStyle=r;b.strokeStyle=U;b.lineWidth=n.lineThickness;var B="solid";if(b.setLineDash){var z=R(n.nullDataLineDashType,n.lineThickness),B=n.lineDashType,A=R(B,n.lineThickness);b.setLineDash(A)}for(w=!1;q<p.length;q++)if(l=p[q].x.getTime?p[q].x.getTime():p[q].x,!(l<a.axisX.dataInfo.viewPortMin||l>a.axisX.dataInfo.viewPortMax&&(!n.connectNullData||!w)))if("number"!==typeof p[q].y)0<q&&!w&&(n.connectNullData?b.setLineDash&&(0<y.length&&(n.options.nullDataLineDashType||!p[q-1].lineDashType))&&
(y[y.length-1].newLineDashArray=z,B=n.nullDataLineDashType):(f(),y=[])),w=!0;else{l=a.axisX.convertValueToPixel(l);w=a.axisY.convertValueToPixel(p[q].y);var Q=n.dataPointIds[q];this._eventManager.objectMap[Q]={id:Q,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:q,x1:l,y1:w};y[y.length]={x:l,y:w};q<p.length-1&&(E!==(p[q].lineColor||U)||B!==(p[q].lineDashType||n.lineDashType))&&(E=p[q].lineColor||U,y[y.length-1].newStrokeStyle=E,b.setLineDash&&(p[q].lineDashType?(B=p[q].lineDashType,y[y.length-
1].newLineDashArray=R(B,n.lineThickness)):(B=n.lineDashType,y[y.length-1].newLineDashArray=A)));if(0!==p[q].markerSize&&(0<p[q].markerSize||0<n.markerSize)){var da=n.getMarkerProperties(q,l,w,b);g.push(da);Q=S(Q);u&&g.push({x:l,y:w,ctx:e,type:da.type,size:da.size,color:Q,borderColor:Q,borderThickness:da.borderThickness})}(p[q].indexLabel||n.indexLabel||p[q].indexLabelFormatter||n.indexLabelFormatter)&&this._indexLabels.push({chartType:"splineArea",dataPoint:p[q],dataSeries:n,point:{x:l,y:w},direction:0>
p[q].y===a.axisY.reversed?1:-1,color:r});w=!1}f();s.drawMarkers(g)}}u&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());
b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:x.xClipAnimation,easingFunction:x.easing.linear,animationBase:0}}};r.prototype.renderStepArea=function(a){var f,c;function b(){E&&(0<l.lineThickness&&h.stroke(),a.axisY.logarithmic||0>=a.axisY.viewportMinimum&&0<=a.axisY.viewportMaximum?U=r:0>a.axisY.viewportMaximum?U=d.y1:0<a.axisY.viewportMinimum&&(U=r),h.lineTo(t,U),h.lineTo(E.x,U),h.closePath(),h.globalAlpha=l.fillOpacity,h.fill(),h.globalAlpha=1,u&&(g.lineTo(t,U),g.lineTo(E.x,
U),g.closePath(),g.fill()),h.beginPath(),h.moveTo(t,v),g.beginPath(),g.moveTo(t,v),E={x:t,y:v})}var e=a.targetCanvasCtx||this.plotArea.ctx,h=u?this._preRenderCtx:e;if(!(0>=a.dataSeriesIndexes.length)){var g=this._eventManager.ghostCtx,d=a.axisY.lineCoordinates,K=[],m=this.plotArea,n;h.save();u&&g.save();h.beginPath();h.rect(m.x1,m.y1,m.width,m.height);h.clip();u&&(g.beginPath(),g.rect(m.x1,m.y1,m.width,m.height),g.clip());for(var p=0;p<a.dataSeriesIndexes.length;p++){var q=a.dataSeriesIndexes[p],
l=this.data[q],w=l.dataPoints,K=l.id;this._eventManager.objectMap[K]={objectType:"dataSeries",dataSeriesIndex:q};K=S(K);g.fillStyle=K;K=[];f=!0;var k=0,t,v,y,r=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),U,E=null;c=!1;if(0<w.length){var B=l._colorSet[k%l._colorSet.length],z=l.lineColor=l.options.lineColor||B,A=z;h.fillStyle=B;h.strokeStyle=z;h.lineWidth=l.lineThickness;var Q="solid";if(h.setLineDash){var da=R(l.nullDataLineDashType,l.lineThickness),Q=l.lineDashType,
ga=R(Q,l.lineThickness);h.setLineDash(ga)}for(;k<w.length;k++)if(y=w[k].x.getTime?w[k].x.getTime():w[k].x,!(y<a.axisX.dataInfo.viewPortMin||y>a.axisX.dataInfo.viewPortMax&&(!l.connectNullData||!c))){var ca=v;"number"!==typeof w[k].y?(l.connectNullData||(c||f)||b(),c=!0):(t=a.axisX.convertValueToPixel(y),v=a.axisY.convertValueToPixel(w[k].y),f||c?(!f&&l.connectNullData?(h.setLineDash&&(l.options.nullDataLineDashType||Q===l.lineDashType&&l.lineDashType!==l.nullDataLineDashType)&&(f=t,c=v,t=n.x,v=n.y,
b(),h.moveTo(n.x,n.y),t=f,v=c,E=n,Q=l.nullDataLineDashType,h.setLineDash(da)),h.lineTo(t,ca),h.lineTo(t,v),u&&(g.lineTo(t,ca),g.lineTo(t,v))):(h.beginPath(),h.moveTo(t,v),u&&(g.beginPath(),g.moveTo(t,v)),E={x:t,y:v}),c=f=!1):(h.lineTo(t,ca),u&&g.lineTo(t,ca),h.lineTo(t,v),u&&g.lineTo(t,v),0==k%250&&b()),n={x:t,y:v},k<w.length-1&&(A!==(w[k].lineColor||z)||Q!==(w[k].lineDashType||l.lineDashType))&&(b(),A=w[k].lineColor||z,h.strokeStyle=A,h.setLineDash&&(w[k].lineDashType?(Q=w[k].lineDashType,h.setLineDash(R(Q,
l.lineThickness))):(Q=l.lineDashType,h.setLineDash(ga)))),y=l.dataPointIds[k],this._eventManager.objectMap[y]={id:y,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:k,x1:t,y1:v},0!==w[k].markerSize&&(0<w[k].markerSize||0<l.markerSize)&&(ca=l.getMarkerProperties(k,t,v,h),K.push(ca),y=S(y),u&&K.push({x:t,y:v,ctx:g,type:ca.type,size:ca.size,color:y,borderColor:y,borderThickness:ca.borderThickness})),(w[k].indexLabel||l.indexLabel||w[k].indexLabelFormatter||l.indexLabelFormatter)&&this._indexLabels.push({chartType:"stepArea",
dataPoint:w[k],dataSeries:l,point:{x:t,y:v},direction:0>w[k].y===a.axisY.reversed?1:-1,color:B}))}b();s.drawMarkers(K)}}u&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),h.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&h.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&h.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),h.clearRect(m.x1,
m.y1,m.width,m.height),this._eventManager.ghostCtx.restore());h.restore();return{source:e,dest:this.plotArea.ctx,animationCallback:x.xClipAnimation,easingFunction:x.easing.linear,animationBase:0}}};r.prototype.renderStackedArea=function(a){function f(){if(!(1>m.length)){for(0<B.lineThickness&&b.stroke();0<m.length;){var a=m.pop();b.lineTo(a.x,a.y);u&&r.lineTo(a.x,a.y)}b.closePath();b.globalAlpha=B.fillOpacity;b.fill();b.globalAlpha=1;b.beginPath();u&&(r.closePath(),r.fill(),r.beginPath());m=[]}}var c=
a.targetCanvasCtx||this.plotArea.ctx,b=u?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=null,h=null,g=[],d=this.plotArea,k=[],m=[],n=[],p=[],q=0,l,w,t=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),r=this._eventManager.ghostCtx,v,y,P;u&&r.beginPath();b.save();u&&r.save();b.beginPath();b.rect(d.x1,d.y1,d.width,d.height);b.clip();u&&(r.beginPath(),r.rect(d.x1,d.y1,d.width,d.height),r.clip());for(var e=[],U=0;U<a.dataSeriesIndexes.length;U++){var E=a.dataSeriesIndexes[U],
B=this.data[E],z=B.dataPoints;B.dataPointIndexes=[];for(q=0;q<z.length;q++)E=z[q].x.getTime?z[q].x.getTime():z[q].x,B.dataPointIndexes[E]=q,e[E]||(n.push(E),e[E]=!0);n.sort(Wa)}for(U=0;U<a.dataSeriesIndexes.length;U++){E=a.dataSeriesIndexes[U];B=this.data[E];z=B.dataPoints;y=!0;m=[];q=B.id;this._eventManager.objectMap[q]={objectType:"dataSeries",dataSeriesIndex:E};q=S(q);r.fillStyle=q;if(0<n.length){var e=B._colorSet[0],A=B.lineColor=B.options.lineColor||e,Q=A;b.fillStyle=e;b.strokeStyle=A;b.lineWidth=
B.lineThickness;P="solid";if(b.setLineDash){var da=R(B.nullDataLineDashType,B.lineThickness);P=B.lineDashType;var ga=R(P,B.lineThickness);b.setLineDash(ga)}for(var ca=!0,q=0;q<n.length;q++){var h=n[q],na=null,na=0<=B.dataPointIndexes[h]?z[B.dataPointIndexes[h]]:{x:h,y:null};if(!(h<a.axisX.dataInfo.viewPortMin||h>a.axisX.dataInfo.viewPortMax&&(!B.connectNullData||!ca)))if("number"!==typeof na.y)B.connectNullData||(ca||y)||f(),ca=!0;else{l=a.axisX.convertValueToPixel(h);var va=k[h]?k[h]:0;if(a.axisY.logarithmic||
a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length){p[h]=na.y+(p[h]?p[h]:0);if(0>=p[h]&&a.axisY.logarithmic)continue;w=a.axisY.convertValueToPixel(p[h])}else w=a.axisY.convertValueToPixel(na.y),w-=va;m.push({x:l,y:t-va});k[h]=t-w;y||ca?(!y&&B.connectNullData?(b.setLineDash&&(B.options.nullDataLineDashType||P===B.lineDashType&&B.lineDashType!==B.nullDataLineDashType)&&(y=m.pop(),P=m[m.length-1],f(),b.moveTo(v.x,v.y),m.push(P),m.push(y),P=B.nullDataLineDashType,b.setLineDash(da)),b.lineTo(l,
w),u&&r.lineTo(l,w)):(b.beginPath(),b.moveTo(l,w),u&&(r.beginPath(),r.moveTo(l,w))),ca=y=!1):(b.lineTo(l,w),u&&r.lineTo(l,w),0==q%250&&(f(),b.moveTo(l,w),u&&r.moveTo(l,w),m.push({x:l,y:t-va})));v={x:l,y:w};q<z.length-1&&(Q!==(z[q].lineColor||A)||P!==(z[q].lineDashType||B.lineDashType))&&(f(),b.beginPath(),b.moveTo(l,w),m.push({x:l,y:t-va}),Q=z[q].lineColor||A,b.strokeStyle=Q,b.setLineDash&&(z[q].lineDashType?(P=z[q].lineDashType,b.setLineDash(R(P,B.lineThickness))):(P=B.lineDashType,b.setLineDash(ga))));
if(0<=B.dataPointIndexes[h]){var D=B.dataPointIds[B.dataPointIndexes[h]];this._eventManager.objectMap[D]={id:D,objectType:"dataPoint",dataSeriesIndex:E,dataPointIndex:B.dataPointIndexes[h],x1:l,y1:w}}0<=B.dataPointIndexes[h]&&0!==na.markerSize&&(0<na.markerSize||0<B.markerSize)&&(va=B.getMarkerProperties(B.dataPointIndexes[h],l,w,b),g.push(va),h=S(D),u&&g.push({x:l,y:w,ctx:r,type:va.type,size:va.size,color:h,borderColor:h,borderThickness:va.borderThickness}));(na.indexLabel||B.indexLabel||na.indexLabelFormatter||
B.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedArea",dataPoint:na,dataSeries:B,point:{x:l,y:w},direction:0>z[q].y===a.axisY.reversed?1:-1,color:e})}}f();b.moveTo(l,w);u&&r.moveTo(l,w)}delete B.dataPointIndexes}s.drawMarkers(g);u&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),
this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(d.x1,d.y1,d.width,d.height),r.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:x.xClipAnimation,easingFunction:x.easing.linear,animationBase:0}}};r.prototype.renderStackedArea100=function(a){function f(){for(0<B.lineThickness&&b.stroke();0<m.length;){var a=m.pop();b.lineTo(a.x,a.y);u&&P.lineTo(a.x,a.y)}b.closePath();b.globalAlpha=B.fillOpacity;b.fill();
b.globalAlpha=1;b.beginPath();u&&(P.closePath(),P.fill(),P.beginPath());m=[]}var c=a.targetCanvasCtx||this.plotArea.ctx,b=u?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=null,h=null,g=this.plotArea,d=[],k=[],m=[],n=[],p=[],q=0,l,w,t,r,v,y=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),P=this._eventManager.ghostCtx;b.save();u&&P.save();b.beginPath();b.rect(g.x1,g.y1,g.width,g.height);b.clip();u&&(P.beginPath(),P.rect(g.x1,g.y1,g.width,g.height),P.clip());
for(var e=[],U=0;U<a.dataSeriesIndexes.length;U++){var E=a.dataSeriesIndexes[U],B=this.data[E],z=B.dataPoints;B.dataPointIndexes=[];for(q=0;q<z.length;q++)E=z[q].x.getTime?z[q].x.getTime():z[q].x,B.dataPointIndexes[E]=q,e[E]||(n.push(E),e[E]=!0);n.sort(Wa)}for(U=0;U<a.dataSeriesIndexes.length;U++){E=a.dataSeriesIndexes[U];B=this.data[E];z=B.dataPoints;r=!0;e=B.id;this._eventManager.objectMap[e]={objectType:"dataSeries",dataSeriesIndex:E};e=S(e);P.fillStyle=e;m=[];if(0<n.length){var e=B._colorSet[q%
B._colorSet.length],A=B.lineColor=B.options.lineColor||e,Q=A;b.fillStyle=e;b.strokeStyle=A;b.lineWidth=B.lineThickness;v="solid";if(b.setLineDash){var da=R(B.nullDataLineDashType,B.lineThickness);v=B.lineDashType;var ga=R(v,B.lineThickness);b.setLineDash(ga)}for(var ca=!0,q=0;q<n.length;q++){var h=n[q],na=null,na=0<=B.dataPointIndexes[h]?z[B.dataPointIndexes[h]]:{x:h,y:null};if(!(h<a.axisX.dataInfo.viewPortMin||h>a.axisX.dataInfo.viewPortMax&&(!B.connectNullData||!ca)))if("number"!==typeof na.y)B.connectNullData||
(ca||r)||f(),ca=!0;else{var va;va=0!==a.dataPointYSums[h]?100*(na.y/a.dataPointYSums[h]):0;l=a.axisX.convertValueToPixel(h);var D=k[h]?k[h]:0;if(a.axisY.logarithmic||a.axisY.scaleBreaks&&0<a.axisY.scaleBreaks._appliedBreaks.length){p[h]=va+(p[h]?p[h]:0);if(0>=p[h]&&a.axisY.logarithmic)continue;w=a.axisY.convertValueToPixel(p[h])}else w=a.axisY.convertValueToPixel(va),w-=D;m.push({x:l,y:y-D});k[h]=y-w;r||ca?(!r&&B.connectNullData?(b.setLineDash&&(B.options.nullDataLineDashType||v===B.lineDashType&&
B.lineDashType!==B.nullDataLineDashType)&&(r=m.pop(),v=m[m.length-1],f(),b.moveTo(t.x,t.y),m.push(v),m.push(r),v=B.nullDataLineDashType,b.setLineDash(da)),b.lineTo(l,w),u&&P.lineTo(l,w)):(b.beginPath(),b.moveTo(l,w),u&&(P.beginPath(),P.moveTo(l,w))),ca=r=!1):(b.lineTo(l,w),u&&P.lineTo(l,w),0==q%250&&(f(),b.moveTo(l,w),u&&P.moveTo(l,w),m.push({x:l,y:y-D})));t={x:l,y:w};q<z.length-1&&(Q!==(z[q].lineColor||A)||v!==(z[q].lineDashType||B.lineDashType))&&(f(),b.beginPath(),b.moveTo(l,w),m.push({x:l,y:y-
D}),Q=z[q].lineColor||A,b.strokeStyle=Q,b.setLineDash&&(z[q].lineDashType?(v=z[q].lineDashType,b.setLineDash(R(v,B.lineThickness))):(v=B.lineDashType,b.setLineDash(ga))));if(0<=B.dataPointIndexes[h]){var H=B.dataPointIds[B.dataPointIndexes[h]];this._eventManager.objectMap[H]={id:H,objectType:"dataPoint",dataSeriesIndex:E,dataPointIndex:B.dataPointIndexes[h],x1:l,y1:w}}0<=B.dataPointIndexes[h]&&0!==na.markerSize&&(0<na.markerSize||0<B.markerSize)&&(D=B.getMarkerProperties(q,l,w,b),d.push(D),h=S(H),
u&&d.push({x:l,y:w,ctx:P,type:D.type,size:D.size,color:h,borderColor:h,borderThickness:D.borderThickness}));(na.indexLabel||B.indexLabel||na.indexLabelFormatter||B.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedArea100",dataPoint:na,dataSeries:B,point:{x:l,y:w},direction:0>z[q].y===a.axisY.reversed?1:-1,color:e})}}f();b.moveTo(l,w);u&&P.moveTo(l,w)}delete B.dataPointIndexes}s.drawMarkers(d);u&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation=
"source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(g.x1,g.y1,g.width,g.height),P.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:x.xClipAnimation,easingFunction:x.easing.linear,animationBase:0}}};r.prototype.renderBubble=function(a){var f=
a.targetCanvasCtx||this.plotArea.ctx,c=u?this._preRenderCtx:f;if(!(0>=a.dataSeriesIndexes.length)){var b=this.plotArea,e=0,h,g;c.save();u&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(b.x1,b.y1,b.width,b.height);c.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.clip());for(var d=-Infinity,k=Infinity,m=0;m<a.dataSeriesIndexes.length;m++)for(var n=a.dataSeriesIndexes[m],p=this.data[n],q=p.dataPoints,
l=0,e=0;e<q.length;e++)h=q[e].getTime?h=q[e].x.getTime():h=q[e].x,h<a.axisX.dataInfo.viewPortMin||h>a.axisX.dataInfo.viewPortMax||"undefined"===typeof q[e].z||(l=q[e].z,l>d&&(d=l),l<k&&(k=l));for(var w=25*Math.PI,t=Math.max(Math.pow(0.25*Math.min(b.height,b.width)/2,2)*Math.PI,w),m=0;m<a.dataSeriesIndexes.length;m++)if(n=a.dataSeriesIndexes[m],p=this.data[n],q=p.dataPoints,0<q.length)for(c.strokeStyle="#4572A7 ",e=0;e<q.length;e++)if(h=q[e].getTime?h=q[e].x.getTime():h=q[e].x,!(h<a.axisX.dataInfo.viewPortMin||
h>a.axisX.dataInfo.viewPortMax)&&"number"===typeof q[e].y){h=a.axisX.convertValueToPixel(h);g=a.axisY.convertValueToPixel(q[e].y);var l=q[e].z,r=2*Math.max(Math.sqrt((d===k?t/2:w+(t-w)/(d-k)*(l-k))/Math.PI)<<0,1),l=p.getMarkerProperties(e,c);l.size=r;c.globalAlpha=p.fillOpacity;s.drawMarker(h,g,c,l.type,l.size,l.color,l.borderColor,l.borderThickness);c.globalAlpha=1;var v=p.dataPointIds[e];this._eventManager.objectMap[v]={id:v,objectType:"dataPoint",dataSeriesIndex:n,dataPointIndex:e,x1:h,y1:g,size:r};
r=S(v);u&&s.drawMarker(h,g,this._eventManager.ghostCtx,l.type,l.size,r,r,l.borderThickness);(q[e].indexLabel||p.indexLabel||q[e].indexLabelFormatter||p.indexLabelFormatter)&&this._indexLabels.push({chartType:"bubble",dataPoint:q[e],dataSeries:p,point:{x:h,y:g},direction:1,bounds:{x1:h-l.size/2,y1:g-l.size/2,x2:h+l.size/2,y2:g+l.size/2},color:null})}u&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,
0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.restore());c.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:x.fadeInAnimation,easingFunction:x.easing.easeInQuad,animationBase:0}}};r.prototype.renderScatter=function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,
c=u?this._preRenderCtx:f;if(!(0>=a.dataSeriesIndexes.length)){var b=this.plotArea,e=0,h,g;c.save();u&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(b.x1,b.y1,b.width,b.height);c.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.clip());for(var d=0;d<a.dataSeriesIndexes.length;d++){var k=a.dataSeriesIndexes[d],m=this.data[k],n=m.dataPoints;if(0<n.length){c.strokeStyle="#4572A7 ";Math.pow(0.3*Math.min(b.height,
b.width)/2,2);for(var p=0,q=0,e=0;e<n.length;e++)if(h=n[e].getTime?h=n[e].x.getTime():h=n[e].x,!(h<a.axisX.dataInfo.viewPortMin||h>a.axisX.dataInfo.viewPortMax)&&"number"===typeof n[e].y){h=a.axisX.convertValueToPixel(h);g=a.axisY.convertValueToPixel(n[e].y);var l=m.getMarkerProperties(e,h,g,c);c.globalAlpha=m.fillOpacity;s.drawMarker(l.x,l.y,l.ctx,l.type,l.size,l.color,l.borderColor,l.borderThickness);c.globalAlpha=1;Math.sqrt((p-h)*(p-h)+(q-g)*(q-g))<Math.min(l.size,5)&&n.length>Math.min(this.plotArea.width,
this.plotArea.height)||(p=m.dataPointIds[e],this._eventManager.objectMap[p]={id:p,objectType:"dataPoint",dataSeriesIndex:k,dataPointIndex:e,x1:h,y1:g},p=S(p),u&&s.drawMarker(l.x,l.y,this._eventManager.ghostCtx,l.type,l.size,p,p,l.borderThickness),(n[e].indexLabel||m.indexLabel||n[e].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"scatter",dataPoint:n[e],dataSeries:m,point:{x:h,y:g},direction:1,bounds:{x1:h-l.size/2,y1:g-l.size/2,x2:h+l.size/2,y2:g+l.size/2},color:null}),
p=h,q=g)}}}u&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(b.x1,b.y1,b.width,b.height),this._eventManager.ghostCtx.restore());c.restore();return{source:f,dest:this.plotArea.ctx,
animationCallback:x.fadeInAnimation,easingFunction:x.easing.easeInQuad,animationBase:0}}};r.prototype.renderCandlestick=function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,c=u?this._preRenderCtx:f,b=this._eventManager.ghostCtx;if(!(0>=a.dataSeriesIndexes.length)){var e=null,h=null,d=this.plotArea,k=0,t,m,n,p,q,l,e=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,h=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?
this.dataPointWidth:0.015*this.width,w=a.axisX.dataInfo.minDiff;isFinite(w)||(w=0.3*Math.abs(a.axisX.range));w=this.options.dataPointWidth?this.dataPointWidth:0.7*d.width*(a.axisX.logarithmic?Math.log(w)/Math.log(a.axisX.range):Math.abs(w)/Math.abs(a.axisX.range))<<0;this.dataPointMaxWidth&&e>h&&(e=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,h));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&h<e)&&(h=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,e));w<
e&&(w=e);w>h&&(w=h);c.save();u&&b.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();u&&(b.beginPath(),b.rect(d.x1,d.y1,d.width,d.height),b.clip());for(var s=0;s<a.dataSeriesIndexes.length;s++){var r=a.dataSeriesIndexes[s],v=this.data[r],y=v.dataPoints;if(0<y.length)for(var P=5<w&&v.bevelEnabled?!0:!1,k=0;k<y.length;k++)if(y[k].getTime?l=y[k].x.getTime():l=y[k].x,!(l<a.axisX.dataInfo.viewPortMin||l>a.axisX.dataInfo.viewPortMax)&&!g(y[k].y)&&y[k].y.length&&"number"===typeof y[k].y[0]&&
"number"===typeof y[k].y[1]&&"number"===typeof y[k].y[2]&&"number"===typeof y[k].y[3]){t=a.axisX.convertValueToPixel(l);m=a.axisY.convertValueToPixel(y[k].y[0]);n=a.axisY.convertValueToPixel(y[k].y[1]);p=a.axisY.convertValueToPixel(y[k].y[2]);q=a.axisY.convertValueToPixel(y[k].y[3]);var U=t-w/2<<0,E=U+w<<0,h=v.options.fallingColor?v.fallingColor:v._colorSet[0],e=y[k].color?y[k].color:v._colorSet[0],B=Math.round(Math.max(1,0.15*w)),z=0===B%2?0:0.5,A=v.dataPointIds[k];this._eventManager.objectMap[A]=
{id:A,objectType:"dataPoint",dataSeriesIndex:r,dataPointIndex:k,x1:U,y1:m,x2:E,y2:n,x3:t,y3:p,x4:t,y4:q,borderThickness:B,color:e};c.strokeStyle=e;c.beginPath();c.lineWidth=B;b.lineWidth=Math.max(B,4);"candlestick"===v.type?(c.moveTo(t-z,n),c.lineTo(t-z,Math.min(m,q)),c.stroke(),c.moveTo(t-z,Math.max(m,q)),c.lineTo(t-z,p),c.stroke(),ba(c,U,Math.min(m,q),E,Math.max(m,q),y[k].y[0]<=y[k].y[3]?v.risingColor:h,B,e,P,P,!1,!1,v.fillOpacity),u&&(e=S(A),b.strokeStyle=e,b.moveTo(t-z,n),b.lineTo(t-z,Math.min(m,
q)),b.stroke(),b.moveTo(t-z,Math.max(m,q)),b.lineTo(t-z,p),b.stroke(),ba(b,U,Math.min(m,q),E,Math.max(m,q),e,0,null,!1,!1,!1,!1))):"ohlc"===v.type&&(c.moveTo(t-z,n),c.lineTo(t-z,p),c.stroke(),c.beginPath(),c.moveTo(t,m),c.lineTo(U,m),c.stroke(),c.beginPath(),c.moveTo(t,q),c.lineTo(E,q),c.stroke(),u&&(e=S(A),b.strokeStyle=e,b.moveTo(t-z,n),b.lineTo(t-z,p),b.stroke(),b.beginPath(),b.moveTo(t,m),b.lineTo(U,m),b.stroke(),b.beginPath(),b.moveTo(t,q),b.lineTo(E,q),b.stroke()));(y[k].indexLabel||v.indexLabel||
y[k].indexLabelFormatter||v.indexLabelFormatter)&&this._indexLabels.push({chartType:v.type,dataPoint:y[k],dataSeries:v,point:{x:U+(E-U)/2,y:a.axisY.reversed?p:n},direction:1,bounds:{x1:U,y1:Math.min(n,p),x2:E,y2:Math.max(n,p)},color:e})}}u&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),
this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(d.x1,d.y1,d.width,d.height),b.restore());c.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:x.fadeInAnimation,easingFunction:x.easing.easeInQuad,animationBase:0}}};r.prototype.renderBoxAndWhisker=function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,c=u?this._preRenderCtx:f,b=this._eventManager.ghostCtx;if(!(0>=a.dataSeriesIndexes.length)){var e=null,h=this.plotArea,
d=0,k,t,m,n,p,q,l,e=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,d=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.015*this.width,w=a.axisX.dataInfo.minDiff;isFinite(w)||(w=0.3*Math.abs(a.axisX.range));w=this.options.dataPointWidth?this.dataPointWidth:0.7*h.width*(a.axisX.logarithmic?Math.log(w)/Math.log(a.axisX.range):Math.abs(w)/Math.abs(a.axisX.range))<<0;this.dataPointMaxWidth&&e>
d&&(e=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,d));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&d<e)&&(d=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,e));w<e&&(w=e);w>d&&(w=d);c.save();u&&b.save();c.beginPath();c.rect(h.x1,h.y1,h.width,h.height);c.clip();u&&(b.beginPath(),b.rect(h.x1,h.y1,h.width,h.height),b.clip());for(var s=!1,s=!!a.axisY.reversed,r=0;r<a.dataSeriesIndexes.length;r++){var v=a.dataSeriesIndexes[r],y=this.data[v],P=y.dataPoints;
if(0<P.length)for(var z=5<w&&y.bevelEnabled?!0:!1,d=0;d<P.length;d++)if(P[d].getTime?l=P[d].x.getTime():l=P[d].x,!(l<a.axisX.dataInfo.viewPortMin||l>a.axisX.dataInfo.viewPortMax)&&!g(P[d].y)&&P[d].y.length&&"number"===typeof P[d].y[0]&&"number"===typeof P[d].y[1]&&"number"===typeof P[d].y[2]&&"number"===typeof P[d].y[3]&&"number"===typeof P[d].y[4]&&5===P[d].y.length){k=a.axisX.convertValueToPixel(l);t=a.axisY.convertValueToPixel(P[d].y[0]);m=a.axisY.convertValueToPixel(P[d].y[1]);n=a.axisY.convertValueToPixel(P[d].y[2]);
p=a.axisY.convertValueToPixel(P[d].y[3]);q=a.axisY.convertValueToPixel(P[d].y[4]);var E=k-w/2<<0,B=k+w/2<<0,e=P[d].color?P[d].color:y._colorSet[0],A=Math.round(Math.max(1,0.15*w)),D=0===A%2?0:0.5,Q=P[d].whiskerColor?P[d].whiskerColor:P[d].color?y.whiskerColor?y.whiskerColor:P[d].color:y.whiskerColor?y.whiskerColor:e,da="number"===typeof P[d].whiskerThickness?P[d].whiskerThickness:"number"===typeof y.options.whiskerThickness?y.whiskerThickness:A,ga=P[d].whiskerDashType?P[d].whiskerDashType:y.whiskerDashType,
ca=g(P[d].whiskerLength)?g(y.options.whiskerLength)?w:y.whiskerLength:P[d].whiskerLength,ca="number"===typeof ca?0>=ca?0:ca>=w?w:ca:"string"===typeof ca?parseInt(ca)*w/100>w?w:parseInt(ca)*w/100:w,na=1===Math.round(da)%2?0.5:0,va=P[d].stemColor?P[d].stemColor:P[d].color?y.stemColor?y.stemColor:P[d].color:y.stemColor?y.stemColor:e,F="number"===typeof P[d].stemThickness?P[d].stemThickness:"number"===typeof y.options.stemThickness?y.stemThickness:A,H=1===Math.round(F)%2?0.5:0,G=P[d].stemDashType?P[d].stemDashType:
y.stemDashType,L=P[d].lineColor?P[d].lineColor:P[d].color?y.lineColor?y.lineColor:P[d].color:y.lineColor?y.lineColor:e,I="number"===typeof P[d].lineThickness?P[d].lineThickness:"number"===typeof y.options.lineThickness?y.lineThickness:A,O=P[d].lineDashType?P[d].lineDashType:y.lineDashType,T=1===Math.round(I)%2?0.5:0,Z=y.upperBoxColor,N=y.lowerBoxColor,M=g(y.options.fillOpacity)?1:y.fillOpacity,V=y.dataPointIds[d];this._eventManager.objectMap[V]={id:V,objectType:"dataPoint",dataSeriesIndex:v,dataPointIndex:d,
x1:E,y1:t,x2:B,y2:m,x3:k,y3:n,x4:k,y4:p,y5:q,borderThickness:A,color:e,stemThickness:F,stemColor:va,whiskerThickness:da,whiskerLength:ca,whiskerColor:Q,lineThickness:I,lineColor:L};c.save();0<F&&(c.beginPath(),c.strokeStyle=va,c.lineWidth=F,c.setLineDash&&c.setLineDash(R(G,F)),c.moveTo(k-H,m),c.lineTo(k-H,t),c.stroke(),c.moveTo(k-H,p),c.lineTo(k-H,n),c.stroke());c.restore();b.lineWidth=Math.max(A,4);c.beginPath();ba(c,E,Math.min(q,m),B,Math.max(m,q),N,0,e,s?z:!1,s?!1:z,!1,!1,M);c.beginPath();ba(c,
E,Math.min(n,q),B,Math.max(q,n),Z,0,e,s?!1:z,s?z:!1,!1,!1,M);c.beginPath();c.lineWidth=A;c.strokeStyle=e;c.rect(E-D,Math.min(m,n)-D,B-E+2*D,Math.max(m,n)-Math.min(m,n)+2*D);c.stroke();c.save();0<I&&(c.beginPath(),c.globalAlpha=1,c.setLineDash&&c.setLineDash(R(O,I)),c.strokeStyle=L,c.lineWidth=I,c.moveTo(E,q-T),c.lineTo(B,q-T),c.stroke());c.restore();c.save();0<da&&(c.beginPath(),c.setLineDash&&c.setLineDash(R(ga,da)),c.strokeStyle=Q,c.lineWidth=da,c.moveTo(k-ca/2<<0,p-na),c.lineTo(k+ca/2<<0,p-na),
c.stroke(),c.moveTo(k-ca/2<<0,t+na),c.lineTo(k+ca/2<<0,t+na),c.stroke());c.restore();u&&(e=S(V),b.strokeStyle=e,b.lineWidth=F,0<F&&(b.moveTo(k-D-H,m),b.lineTo(k-D-H,Math.max(t,p)),b.stroke(),b.moveTo(k-D-H,Math.min(t,p)),b.lineTo(k-D-H,n),b.stroke()),ba(b,E,Math.max(m,n),B,Math.min(m,n),e,0,null,!1,!1,!1,!1),0<da&&(b.beginPath(),b.lineWidth=da,b.moveTo(k+ca/2,p-na),b.lineTo(k-ca/2,p-na),b.stroke(),b.moveTo(k+ca/2,t+na),b.lineTo(k-ca/2,t+na),b.stroke()));(P[d].indexLabel||y.indexLabel||P[d].indexLabelFormatter||
y.indexLabelFormatter)&&this._indexLabels.push({chartType:y.type,dataPoint:P[d],dataSeries:y,point:{x:E+(B-E)/2,y:a.axisY.reversed?t:p},direction:1,bounds:{x1:E,y1:Math.min(t,p),x2:B,y2:Math.max(t,p)},color:e})}}u&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,
0,0,this.width,this.height),c.clearRect(h.x1,h.y1,h.width,h.height),b.restore());c.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:x.fadeInAnimation,easingFunction:x.easing.easeInQuad,animationBase:0}}};r.prototype.renderRangeColumn=function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,c=u?this._preRenderCtx:f;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,h=0,d,k,t,h=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:
1;d=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:0.03*this.width;var m=a.axisX.dataInfo.minDiff;isFinite(m)||(m=0.3*Math.abs(a.axisX.range));m=this.options.dataPointWidth?this.dataPointWidth:0.9*(e.width*(a.axisX.logarithmic?Math.log(m)/Math.log(a.axisX.range):Math.abs(m)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&h>d&&(h=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,d));!this.dataPointMaxWidth&&
(this.dataPointMinWidth&&d<h)&&(d=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,h));m<h&&(m=h);m>d&&(m=d);c.save();u&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(var n=0;n<a.dataSeriesIndexes.length;n++){var p=a.dataSeriesIndexes[n],q=this.data[p],l=q.dataPoints;if(0<l.length)for(var w=
5<m&&q.bevelEnabled?!0:!1,h=0;h<l.length;h++)if(l[h].getTime?t=l[h].x.getTime():t=l[h].x,!(t<a.axisX.dataInfo.viewPortMin||t>a.axisX.dataInfo.viewPortMax)&&!g(l[h].y)&&l[h].y.length&&"number"===typeof l[h].y[0]&&"number"===typeof l[h].y[1]){b=a.axisX.convertValueToPixel(t);d=a.axisY.convertValueToPixel(l[h].y[0]);k=a.axisY.convertValueToPixel(l[h].y[1]);var s=a.axisX.reversed?b+a.plotType.totalDataSeries*m/2-(a.previousDataSeriesCount+n)*m<<0:b-a.plotType.totalDataSeries*m/2+(a.previousDataSeriesCount+
n)*m<<0,r=a.axisX.reversed?s-m<<0:s+m<<0,b=l[h].color?l[h].color:q._colorSet[h%q._colorSet.length];if(d>k){var v=d;d=k;k=v}v=q.dataPointIds[h];this._eventManager.objectMap[v]={id:v,objectType:"dataPoint",dataSeriesIndex:p,dataPointIndex:h,x1:s,y1:d,x2:r,y2:k};ba(c,s,d,r,k,b,0,b,w,w,!1,!1,q.fillOpacity);b=S(v);u&&ba(this._eventManager.ghostCtx,s,d,r,k,b,0,null,!1,!1,!1,!1);if(l[h].indexLabel||q.indexLabel||l[h].indexLabelFormatter||q.indexLabelFormatter)this._indexLabels.push({chartType:"rangeColumn",
dataPoint:l[h],dataSeries:q,indexKeyword:0,point:{x:s+(r-s)/2,y:l[h].y[1]>=l[h].y[0]?k:d},direction:l[h].y[1]>=l[h].y[0]?-1:1,bounds:{x1:s,y1:Math.min(d,k),x2:r,y2:Math.max(d,k)},color:b}),this._indexLabels.push({chartType:"rangeColumn",dataPoint:l[h],dataSeries:q,indexKeyword:1,point:{x:s+(r-s)/2,y:l[h].y[1]>=l[h].y[0]?d:k},direction:l[h].y[1]>=l[h].y[0]?1:-1,bounds:{x1:s,y1:Math.min(d,k),x2:r,y2:Math.max(d,k)},color:b})}}u&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation=
"source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:x.fadeInAnimation,easingFunction:x.easing.easeInQuad,animationBase:0}}};r.prototype.renderError=
function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,c=u?this._preRenderCtx:f,b=a.axisY._position?"left"===a.axisY._position||"right"===a.axisY._position?!1:!0:!1;if(!(0>=a.dataSeriesIndexes.length)){var e=null,h=!1,d=this.plotArea,k=0,t,m,n,p,q,l,w,s=a.axisX.dataInfo.minDiff;isFinite(s)||(s=0.3*Math.abs(a.axisX.range));c.save();u&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(d.x1,d.y1,d.width,d.height);c.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(d.x1,
d.y1,d.width,d.height),this._eventManager.ghostCtx.clip());for(var r=0,v=0;v<this.data.length;v++)!this.data[v].type.match(/(bar|column)/ig)||!this.data[v].visible||this.data[v].type.match(/(stacked)/ig)&&r||r++;for(var y=0;y<a.dataSeriesIndexes.length;y++){var P=a.dataSeriesIndexes[y],z=this.data[P],E=z.dataPoints,B=g(z._linkedSeries)?!1:z._linkedSeries.type.match(/(bar|column)/ig)&&z._linkedSeries.visible?!0:!1,A=0;if(B)for(e=z._linkedSeries.id,v=0;v<e;v++)!this.data[v].type.match(/(bar|column)/ig)||
!this.data[v].visible||this.data[v].type.match(/(stacked)/ig)&&A||(this.data[v].type.match(/(range)/ig)&&(h=!0),A++);e=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;k=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:b?Math.min(0.15*this.height,0.9*(this.plotArea.height/(B?r:1)))<<0:0.3*this.width;h&&(k=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:
b?Math.min(0.15*this.height,0.9*(this.plotArea.height/(B?r:1)))<<0:0.03*this.width);v=this.options.dataPointWidth?this.dataPointWidth:0.9*((b?d.height:d.width)*(a.axisX.logarithmic?Math.log(s)/Math.log(a.axisX.range):Math.abs(s)/Math.abs(a.axisX.range))/(B?r:1))<<0;this.dataPointMaxWidth&&e>k&&(e=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,k));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&k<e)&&(k=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,e));v<e&&
(v=e);v>k&&(v=k);if(0<E.length)for(var D=z._colorSet,k=0;k<E.length;k++){var e=z.lineColor=z.options.color?z.options.color:D[0],Q={color:E[k].whiskerColor?E[k].whiskerColor:E[k].color?z.whiskerColor?z.whiskerColor:E[k].color:z.whiskerColor?z.whiskerColor:e,thickness:g(E[k].whiskerThickness)?z.whiskerThickness:E[k].whiskerThickness,dashType:E[k].whiskerDashType?E[k].whiskerDashType:z.whiskerDashType,length:g(E[k].whiskerLength)?g(z.options.whiskerLength)?v:z.options.whiskerLength:E[k].whiskerLength,
trimLength:g(E[k].whiskerLength)?g(z.options.whiskerLength)?50:0:0};Q.length="number"===typeof Q.length?0>=Q.length?0:Q.length>=v?v:Q.length:"string"===typeof Q.length?parseInt(Q.length)*v/100>v?v:parseInt(Q.length)*v/100>v:v;Q.thickness="number"===typeof Q.thickness?0>Q.thickness?0:Math.round(Q.thickness):2;var da={color:E[k].stemColor?E[k].stemColor:E[k].color?z.stemColor?z.stemColor:E[k].color:z.stemColor?z.stemColor:e,thickness:E[k].stemThickness?E[k].stemThickness:z.stemThickness,dashType:E[k].stemDashType?
E[k].stemDashType:z.stemDashType};da.thickness="number"===typeof da.thickness?0>da.thickness?0:Math.round(da.thickness):2;E[k].getTime?w=E[k].x.getTime():w=E[k].x;if(!(w<a.axisX.dataInfo.viewPortMin||w>a.axisX.dataInfo.viewPortMax)&&!g(E[k].y)&&E[k].y.length&&"number"===typeof E[k].y[0]&&"number"===typeof E[k].y[1]){var ga=a.axisX.convertValueToPixel(w);b?m=ga:t=ga;ga=a.axisY.convertValueToPixel(E[k].y[0]);b?n=ga:q=ga;ga=a.axisY.convertValueToPixel(E[k].y[1]);b?p=ga:l=ga;b?(q=a.axisX.reversed?m+(B?
r:1)*v/2-(B?A-1:0)*v<<0:m-(B?r:1)*v/2+(B?A-1:0)*v<<0,l=a.axisX.reversed?q-v<<0:q+v<<0):(n=a.axisX.reversed?t+(B?r:1)*v/2-(B?A-1:0)*v<<0:t-(B?r:1)*v/2+(B?A-1:0)*v<<0,p=a.axisX.reversed?n-v<<0:n+v<<0);!b&&q>l&&(ga=q,q=l,l=ga);b&&n>p&&(ga=n,n=p,p=ga);ga=z.dataPointIds[k];this._eventManager.objectMap[ga]={id:ga,objectType:"dataPoint",dataSeriesIndex:P,dataPointIndex:k,x1:Math.min(n,p),y1:Math.min(q,l),x2:Math.max(p,n),y2:Math.max(l,q),isXYSwapped:b,stemProperties:da,whiskerProperties:Q};L(c,Math.min(n,
p),Math.min(q,l),Math.max(p,n),Math.max(l,q),e,Q,da,b);u&&L(this._eventManager.ghostCtx,n,q,p,l,e,Q,da,b);if(E[k].indexLabel||z.indexLabel||E[k].indexLabelFormatter||z.indexLabelFormatter)this._indexLabels.push({chartType:"error",dataPoint:E[k],dataSeries:z,indexKeyword:0,point:{x:b?E[k].y[1]>=E[k].y[0]?n:p:n+(p-n)/2,y:b?q+(l-q)/2:E[k].y[1]>=E[k].y[0]?l:q},direction:E[k].y[1]>=E[k].y[0]?-1:1,bounds:{x1:b?Math.min(n,p):n,y1:b?q:Math.min(q,l),x2:b?Math.max(n,p):p,y2:b?l:Math.max(q,l)},color:e,axisSwapped:b}),
this._indexLabels.push({chartType:"error",dataPoint:E[k],dataSeries:z,indexKeyword:1,point:{x:b?E[k].y[1]>=E[k].y[0]?p:n:n+(p-n)/2,y:b?q+(l-q)/2:E[k].y[1]>=E[k].y[0]?q:l},direction:E[k].y[1]>=E[k].y[0]?1:-1,bounds:{x1:b?Math.min(n,p):n,y1:b?q:Math.min(q,l),x2:b?Math.max(n,p):p,y2:b?l:Math.max(q,l)},color:e,axisSwapped:b})}}}u&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),
a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(d.x1,d.y1,d.width,d.height),this._eventManager.ghostCtx.restore());c.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:x.fadeInAnimation,easingFunction:x.easing.easeInQuad,animationBase:0}}};r.prototype.renderRangeBar=function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,c=u?this._preRenderCtx:
f;if(!(0>=a.dataSeriesIndexes.length)){var b=null,e=this.plotArea,h=0,d,k,t,m,h=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;d=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.height,0.9*(this.plotArea.height/a.plotType.totalDataSeries))<<0;var n=a.axisX.dataInfo.minDiff;isFinite(n)||(n=0.3*Math.abs(a.axisX.range));n=this.options.dataPointWidth?this.dataPointWidth:0.9*
(e.height*(a.axisX.logarithmic?Math.log(n)/Math.log(a.axisX.range):Math.abs(n)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&h>d&&(h=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,d));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&d<h)&&(d=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,h));n<h&&(n=h);n>d&&(n=d);c.save();u&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(e.x1,e.y1,e.width,e.height);c.clip();u&&(this._eventManager.ghostCtx.beginPath(),
this._eventManager.ghostCtx.rect(e.x1,e.y1,e.width,e.height),this._eventManager.ghostCtx.clip());for(var p=0;p<a.dataSeriesIndexes.length;p++){var q=a.dataSeriesIndexes[p],l=this.data[q],w=l.dataPoints;if(0<w.length){var s=5<n&&l.bevelEnabled?!0:!1;c.strokeStyle="#4572A7 ";for(h=0;h<w.length;h++)if(w[h].getTime?m=w[h].x.getTime():m=w[h].x,!(m<a.axisX.dataInfo.viewPortMin||m>a.axisX.dataInfo.viewPortMax)&&!g(w[h].y)&&w[h].y.length&&"number"===typeof w[h].y[0]&&"number"===typeof w[h].y[1]){d=a.axisY.convertValueToPixel(w[h].y[0]);
k=a.axisY.convertValueToPixel(w[h].y[1]);t=a.axisX.convertValueToPixel(m);t=a.axisX.reversed?t+a.plotType.totalDataSeries*n/2-(a.previousDataSeriesCount+p)*n<<0:t-a.plotType.totalDataSeries*n/2+(a.previousDataSeriesCount+p)*n<<0;var r=a.axisX.reversed?t-n<<0:t+n<<0;d>k&&(b=d,d=k,k=b);b=w[h].color?w[h].color:l._colorSet[h%l._colorSet.length];ba(c,d,t,k,r,b,0,null,s,!1,!1,!1,l.fillOpacity);b=l.dataPointIds[h];this._eventManager.objectMap[b]={id:b,objectType:"dataPoint",dataSeriesIndex:q,dataPointIndex:h,
x1:d,y1:t,x2:k,y2:r};b=S(b);u&&ba(this._eventManager.ghostCtx,d,t,k,r,b,0,null,!1,!1,!1,!1);if(w[h].indexLabel||l.indexLabel||w[h].indexLabelFormatter||l.indexLabelFormatter)this._indexLabels.push({chartType:"rangeBar",dataPoint:w[h],dataSeries:l,indexKeyword:0,point:{x:w[h].y[1]>=w[h].y[0]?d:k,y:t+(r-t)/2},direction:w[h].y[1]>=w[h].y[0]?-1:1,bounds:{x1:Math.min(d,k),y1:t,x2:Math.max(d,k),y2:r},color:b}),this._indexLabels.push({chartType:"rangeBar",dataPoint:w[h],dataSeries:l,indexKeyword:1,point:{x:w[h].y[1]>=
w[h].y[0]?k:d,y:t+(r-t)/2},direction:w[h].y[1]>=w[h].y[0]?1:-1,bounds:{x1:Math.min(d,k),y1:t,x2:Math.max(d,k),y2:r},color:b})}}}u&&(f.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(e.x1,
e.y1,e.width,e.height),this._eventManager.ghostCtx.restore());c.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:x.fadeInAnimation,easingFunction:x.easing.easeInQuad,animationBase:0}}};r.prototype.renderRangeArea=function(a){function f(){if(y){for(var a=null,c=k.length-1;0<=c;c--)a=k[c],b.lineTo(a.x,a.y2),e.lineTo(a.x,a.y2);b.closePath();b.globalAlpha=n.fillOpacity;b.fill();b.globalAlpha=1;e.fill();if(0<n.lineThickness){b.beginPath();b.moveTo(a.x,a.y2);for(c=0;c<k.length;c++)a=k[c],
b.lineTo(a.x,a.y2);b.moveTo(k[0].x,k[0].y1);for(c=0;c<k.length;c++)a=k[c],b.lineTo(a.x,a.y1);b.stroke()}b.beginPath();b.moveTo(w,t);e.beginPath();e.moveTo(w,t);y={x:w,y:t};k=[];k.push({x:w,y1:t,y2:r})}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=u?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx,h=[],g=this.plotArea;b.save();u&&e.save();b.beginPath();b.rect(g.x1,g.y1,g.width,g.height);b.clip();u&&(e.beginPath(),e.rect(g.x1,g.y1,g.width,g.height),e.clip());
for(var d=0;d<a.dataSeriesIndexes.length;d++){var k=[],m=a.dataSeriesIndexes[d],n=this.data[m],p=n.dataPoints,h=n.id;this._eventManager.objectMap[h]={objectType:"dataSeries",dataSeriesIndex:m};h=S(h);e.fillStyle=h;var h=[],q=!0,l=0,w,t,r,v,y=null;if(0<p.length){var z=n._colorSet[l%n._colorSet.length],A=n.lineColor=n.options.lineColor||z,E=A;b.fillStyle=z;b.strokeStyle=A;b.lineWidth=n.lineThickness;var B="solid";if(b.setLineDash){var D=R(n.nullDataLineDashType,n.lineThickness),B=n.lineDashType,F=R(B,
n.lineThickness);b.setLineDash(F)}for(var Q=!0;l<p.length;l++)if(v=p[l].x.getTime?p[l].x.getTime():p[l].x,!(v<a.axisX.dataInfo.viewPortMin||v>a.axisX.dataInfo.viewPortMax&&(!n.connectNullData||!Q)))if(null!==p[l].y&&p[l].y.length&&"number"===typeof p[l].y[0]&&"number"===typeof p[l].y[1]){w=a.axisX.convertValueToPixel(v);t=a.axisY.convertValueToPixel(p[l].y[0]);r=a.axisY.convertValueToPixel(p[l].y[1]);q||Q?(n.connectNullData&&!q?(b.setLineDash&&(n.options.nullDataLineDashType||B===n.lineDashType&&
n.lineDashType!==n.nullDataLineDashType)&&(k[k.length-1].newLineDashArray=F,B=n.nullDataLineDashType,b.setLineDash(D)),b.lineTo(w,t),u&&e.lineTo(w,t),k.push({x:w,y1:t,y2:r})):(b.beginPath(),b.moveTo(w,t),y={x:w,y:t},k=[],k.push({x:w,y1:t,y2:r}),u&&(e.beginPath(),e.moveTo(w,t))),Q=q=!1):(b.lineTo(w,t),k.push({x:w,y1:t,y2:r}),u&&e.lineTo(w,t),0==l%250&&f());v=n.dataPointIds[l];this._eventManager.objectMap[v]={id:v,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:l,x1:w,y1:t,y2:r};l<p.length-
1&&(E!==(p[l].lineColor||A)||B!==(p[l].lineDashType||n.lineDashType))&&(f(),E=p[l].lineColor||A,k[k.length-1].newStrokeStyle=E,b.strokeStyle=E,b.setLineDash&&(p[l].lineDashType?(B=p[l].lineDashType,k[k.length-1].newLineDashArray=R(B,n.lineThickness),b.setLineDash(k[k.length-1].newLineDashArray)):(B=n.lineDashType,k[k.length-1].newLineDashArray=F,b.setLineDash(F))));if(0!==p[l].markerSize&&(0<p[l].markerSize||0<n.markerSize)){var da=n.getMarkerProperties(l,w,r,b);h.push(da);var ga=S(v);u&&h.push({x:w,
y:r,ctx:e,type:da.type,size:da.size,color:ga,borderColor:ga,borderThickness:da.borderThickness});da=n.getMarkerProperties(l,w,t,b);h.push(da);ga=S(v);u&&h.push({x:w,y:t,ctx:e,type:da.type,size:da.size,color:ga,borderColor:ga,borderThickness:da.borderThickness})}if(p[l].indexLabel||n.indexLabel||p[l].indexLabelFormatter||n.indexLabelFormatter)this._indexLabels.push({chartType:"rangeArea",dataPoint:p[l],dataSeries:n,indexKeyword:0,point:{x:w,y:t},direction:p[l].y[0]>p[l].y[1]===a.axisY.reversed?-1:
1,color:z}),this._indexLabels.push({chartType:"rangeArea",dataPoint:p[l],dataSeries:n,indexKeyword:1,point:{x:w,y:r},direction:p[l].y[0]>p[l].y[1]===a.axisY.reversed?1:-1,color:z})}else Q||q||f(),Q=!0;f();s.drawMarkers(h)}}u&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&
this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(g.x1,g.y1,g.width,g.height),this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:x.xClipAnimation,easingFunction:x.easing.linear,animationBase:0}}};r.prototype.renderRangeSplineArea=function(a){function f(a,c){var f=G(t,2);if(0<f.length){if(0<m.lineThickness){b.strokeStyle=c;b.setLineDash&&b.setLineDash(a);b.beginPath();b.moveTo(f[0].x,f[0].y);for(var h=
0;h<f.length-3;h+=3){if(f[h].newStrokeStyle||f[h].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(f[h].x,f[h].y),f[h].newStrokeStyle&&(b.strokeStyle=f[h].newStrokeStyle),f[h].newLineDashArray&&b.setLineDash(f[h].newLineDashArray);b.bezierCurveTo(f[h+1].x,f[h+1].y,f[h+2].x,f[h+2].y,f[h+3].x,f[h+3].y)}}b.beginPath();b.moveTo(f[0].x,f[0].y);u&&(e.beginPath(),e.moveTo(f[0].x,f[0].y));for(h=0;h<f.length-3;h+=3)b.bezierCurveTo(f[h+1].x,f[h+1].y,f[h+2].x,f[h+2].y,f[h+3].x,f[h+3].y),u&&e.bezierCurveTo(f[h+
1].x,f[h+1].y,f[h+2].x,f[h+2].y,f[h+3].x,f[h+3].y);f=G(r,2);b.lineTo(r[r.length-1].x,r[r.length-1].y);for(h=f.length-1;2<h;h-=3)b.bezierCurveTo(f[h-1].x,f[h-1].y,f[h-2].x,f[h-2].y,f[h-3].x,f[h-3].y),u&&e.bezierCurveTo(f[h-1].x,f[h-1].y,f[h-2].x,f[h-2].y,f[h-3].x,f[h-3].y);b.closePath();b.globalAlpha=m.fillOpacity;b.fill();u&&(e.closePath(),e.fill());b.globalAlpha=1;if(0<m.lineThickness){b.strokeStyle=c;b.setLineDash&&b.setLineDash(a);b.beginPath();b.moveTo(f[0].x,f[0].y);for(var l=h=0;h<f.length-
3;h+=3,l++){if(t[l].newStrokeStyle||t[l].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(f[h].x,f[h].y),t[l].newStrokeStyle&&(b.strokeStyle=t[l].newStrokeStyle),t[l].newLineDashArray&&b.setLineDash(t[l].newLineDashArray);b.bezierCurveTo(f[h+1].x,f[h+1].y,f[h+2].x,f[h+2].y,f[h+3].x,f[h+3].y)}f=G(t,2);b.moveTo(f[0].x,f[0].y);for(l=h=0;h<f.length-3;h+=3,l++){if(t[l].newStrokeStyle||t[l].newLineDashArray)b.stroke(),b.beginPath(),b.moveTo(f[h].x,f[h].y),t[l].newStrokeStyle&&(b.strokeStyle=t[l].newStrokeStyle),
t[l].newLineDashArray&&b.setLineDash(t[l].newLineDashArray);b.bezierCurveTo(f[h+1].x,f[h+1].y,f[h+2].x,f[h+2].y,f[h+3].x,f[h+3].y)}b.stroke()}b.beginPath()}}var c=a.targetCanvasCtx||this.plotArea.ctx,b=u?this._preRenderCtx:c;if(!(0>=a.dataSeriesIndexes.length)){var e=this._eventManager.ghostCtx,h=[],g=this.plotArea;b.save();u&&e.save();b.beginPath();b.rect(g.x1,g.y1,g.width,g.height);b.clip();u&&(e.beginPath(),e.rect(g.x1,g.y1,g.width,g.height),e.clip());for(var d=0;d<a.dataSeriesIndexes.length;d++){var k=
a.dataSeriesIndexes[d],m=this.data[k],n=m.dataPoints,h=m.id;this._eventManager.objectMap[h]={objectType:"dataSeries",dataSeriesIndex:k};h=S(h);e.fillStyle=h;var h=[],p=0,q,l,w,t=[],r=[];if(0<n.length){var v=m._colorSet[p%m._colorSet.length],y=m.lineColor=m.options.lineColor||v,z=y;b.fillStyle=v;b.lineWidth=m.lineThickness;var A="solid",E;if(b.setLineDash){var B=R(m.nullDataLineDashType,m.lineThickness),A=m.lineDashType;E=R(A,m.lineThickness)}for(l=!1;p<n.length;p++)if(q=n[p].x.getTime?n[p].x.getTime():
n[p].x,!(q<a.axisX.dataInfo.viewPortMin||q>a.axisX.dataInfo.viewPortMax&&(!m.connectNullData||!l)))if(null!==n[p].y&&n[p].y.length&&"number"===typeof n[p].y[0]&&"number"===typeof n[p].y[1]){q=a.axisX.convertValueToPixel(q);l=a.axisY.convertValueToPixel(n[p].y[0]);w=a.axisY.convertValueToPixel(n[p].y[1]);var D=m.dataPointIds[p];this._eventManager.objectMap[D]={id:D,objectType:"dataPoint",dataSeriesIndex:k,dataPointIndex:p,x1:q,y1:l,y2:w};t[t.length]={x:q,y:l};r[r.length]={x:q,y:w};p<n.length-1&&(z!==
(n[p].lineColor||y)||A!==(n[p].lineDashType||m.lineDashType))&&(z=n[p].lineColor||y,t[t.length-1].newStrokeStyle=z,b.setLineDash&&(n[p].lineDashType?(A=n[p].lineDashType,t[t.length-1].newLineDashArray=R(A,m.lineThickness)):(A=m.lineDashType,t[t.length-1].newLineDashArray=E)));if(0!==n[p].markerSize&&(0<n[p].markerSize||0<m.markerSize)){var F=m.getMarkerProperties(p,q,l,b);h.push(F);var Q=S(D);u&&h.push({x:q,y:l,ctx:e,type:F.type,size:F.size,color:Q,borderColor:Q,borderThickness:F.borderThickness});
F=m.getMarkerProperties(p,q,w,b);h.push(F);Q=S(D);u&&h.push({x:q,y:w,ctx:e,type:F.type,size:F.size,color:Q,borderColor:Q,borderThickness:F.borderThickness})}if(n[p].indexLabel||m.indexLabel||n[p].indexLabelFormatter||m.indexLabelFormatter)this._indexLabels.push({chartType:"rangeSplineArea",dataPoint:n[p],dataSeries:m,indexKeyword:0,point:{x:q,y:l},direction:n[p].y[0]<=n[p].y[1]?-1:1,color:v}),this._indexLabels.push({chartType:"rangeSplineArea",dataPoint:n[p],dataSeries:m,indexKeyword:1,point:{x:q,
y:w},direction:n[p].y[0]<=n[p].y[1]?1:-1,color:v});l=!1}else 0<p&&!l&&(m.connectNullData?b.setLineDash&&(0<t.length&&(m.options.nullDataLineDashType||!n[p-1].lineDashType))&&(t[t.length-1].newLineDashArray=B,A=m.nullDataLineDashType):(f(E,y),t=[],r=[])),l=!0;f(E,y);s.drawMarkers(h)}}u&&(c.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&b.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&b.drawImage(a.axisY.maskCanvas,
0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),b.clearRect(g.x1,g.y1,g.width,g.height),this._eventManager.ghostCtx.restore());b.restore();return{source:c,dest:this.plotArea.ctx,animationCallback:x.xClipAnimation,easingFunction:x.easing.linear,animationBase:0}}};r.prototype.renderWaterfall=function(a){var f=a.targetCanvasCtx||this.plotArea.ctx,c=u?this._preRenderCtx:f;if(!(0>=a.dataSeriesIndexes.length)){var b=this._eventManager.ghostCtx,
e=null,h=this.plotArea,g=0,d,k,m,n,p=a.axisY.convertValueToPixel(a.axisY.logarithmic?a.axisY.viewportMinimum:0),g=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;k=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(0.15*this.width,0.9*(this.plotArea.width/a.plotType.totalDataSeries))<<0;var q=a.axisX.dataInfo.minDiff;isFinite(q)||(q=0.3*Math.abs(a.axisX.range));q=this.options.dataPointWidth?
this.dataPointWidth:0.6*(h.width*(a.axisX.logarithmic?Math.log(q)/Math.log(a.axisX.range):Math.abs(q)/Math.abs(a.axisX.range))/a.plotType.totalDataSeries)<<0;this.dataPointMaxWidth&&g>k&&(g=Math.min(this.options.dataPointWidth?this.dataPointWidth:Infinity,k));!this.dataPointMaxWidth&&(this.dataPointMinWidth&&k<g)&&(k=Math.max(this.options.dataPointWidth?this.dataPointWidth:-Infinity,g));q<g&&(q=g);q>k&&(q=k);c.save();u&&this._eventManager.ghostCtx.save();c.beginPath();c.rect(h.x1,h.y1,h.width,h.height);
c.clip();u&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(h.x1,h.y1,h.width,h.height),this._eventManager.ghostCtx.clip());for(var l=0;l<a.dataSeriesIndexes.length;l++){var w=a.dataSeriesIndexes[l],t=this.data[w],s=t.dataPoints,e=t._colorSet[0];t.risingColor=t.options.risingColor?t.options.risingColor:e;t.fallingColor=t.options.fallingColor?t.options.fallingColor:"#e40a0a";var v="number"===typeof t.options.lineThickness?Math.round(t.lineThickness):1,r=1===Math.round(v)%
2?-0.5:0;if(0<s.length)for(var z=5<q&&t.bevelEnabled?!0:!1,A=!1,E=null,B=null,g=0;g<s.length;g++)if(s[g].getTime?n=s[g].x.getTime():n=s[g].x,"number"!==typeof s[g].y){if(0<g&&!A&&t.connectNullData)var D=t.options.nullDataLineDashType||!s[g-1].lineDashType?t.nullDataLineDashType:s[g-1].lineDashType;A=!0}else{d=a.axisX.convertValueToPixel(n);k=0===t.dataPointEOs[g].cumulativeSum?p:a.axisY.convertValueToPixel(t.dataPointEOs[g].cumulativeSum);m=0===t.dataPointEOs[g].cumulativeSumYStartValue?p:a.axisY.convertValueToPixel(t.dataPointEOs[g].cumulativeSumYStartValue);
d=a.axisX.reversed?d+a.plotType.totalDataSeries*q/2-(a.previousDataSeriesCount+l)*q<<0:d-a.plotType.totalDataSeries*q/2+(a.previousDataSeriesCount+l)*q<<0;var F=a.axisX.reversed?d-q<<0:d+q<<0;k>m&&(e=k,k=m,m=e);a.axisY.reversed&&(e=k,k=m,m=e);e=t.dataPointIds[g];this._eventManager.objectMap[e]={id:e,objectType:"dataPoint",dataSeriesIndex:w,dataPointIndex:g,x1:d,y1:k,x2:F,y2:m};var Q=s[g].color?s[g].color:0<s[g].y?t.risingColor:t.fallingColor;ba(c,d,k,F,m,Q,0,Q,z,z,!1,!1,t.fillOpacity);e=S(e);u&&ba(this._eventManager.ghostCtx,
d,k,F,m,e,0,null,!1,!1,!1,!1);var da,Q=d;da="undefined"!==typeof s[g].isIntermediateSum&&!0===s[g].isIntermediateSum||"undefined"!==typeof s[g].isCumulativeSum&&!0===s[g].isCumulativeSum?0<s[g].y?k:m:0<s[g].y?m:k;0<g&&E&&(!A||t.connectNullData)&&(A&&c.setLineDash&&c.setLineDash(R(D,v)),c.beginPath(),c.moveTo(E,B-r),c.lineTo(Q,da-r),0<v&&c.stroke(),u&&(b.beginPath(),b.moveTo(E,B-r),b.lineTo(Q,da-r),0<v&&b.stroke()));A=!1;E=F;B=0<s[g].y?k:m;Q=s[g].lineDashType?s[g].lineDashType:t.options.lineDashType?
t.options.lineDashType:"shortDash";c.strokeStyle=s[g].lineColor?s[g].lineColor:t.options.lineColor?t.options.lineColor:"#9e9e9e";c.lineWidth=v;c.setLineDash&&(Q=R(Q,v),c.setLineDash(Q));(s[g].indexLabel||t.indexLabel||s[g].indexLabelFormatter||t.indexLabelFormatter)&&this._indexLabels.push({chartType:"waterfall",dataPoint:s[g],dataSeries:t,point:{x:d+(F-d)/2,y:0<=s[g].y?k:m},direction:0>s[g].y===a.axisY.reversed?1:-1,bounds:{x1:d,y1:Math.min(k,m),x2:F,y2:Math.max(k,m)},color:e})}}u&&(f.drawImage(this._preRenderCanvas,
0,0,this.width,this.height),c.globalCompositeOperation="source-atop",a.axisX.maskCanvas&&c.drawImage(a.axisX.maskCanvas,0,0,this.width,this.height),a.axisY.maskCanvas&&c.drawImage(a.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),c.clearRect(h.x1,h.y1,h.width,h.height),this._eventManager.ghostCtx.restore());c.restore();return{source:f,dest:this.plotArea.ctx,animationCallback:x.fadeInAnimation,easingFunction:x.easing.easeInQuad,
animationBase:0}}};var d=function(a,f,c,b,e,h,g,d,k){if(!(0>c)){"undefined"===typeof d&&(d=1);if(!u){var m=Number((g%(2*Math.PI)).toFixed(8));Number((h%(2*Math.PI)).toFixed(8))===m&&(g-=1E-4)}a.save();a.globalAlpha=d;"pie"===e?(a.beginPath(),a.moveTo(f.x,f.y),a.arc(f.x,f.y,c,h,g,!1),a.fillStyle=b,a.strokeStyle="white",a.lineWidth=2,a.closePath(),a.fill()):"doughnut"===e&&(a.beginPath(),a.arc(f.x,f.y,c,h,g,!1),0<=k&&a.arc(f.x,f.y,k*c,g,h,!0),a.closePath(),a.fillStyle=b,a.strokeStyle="white",a.lineWidth=
2,a.fill());a.globalAlpha=1;a.restore()}};r.prototype.renderPie=function(a){function f(){if(m&&n){for(var a=0,b=0,c=0,f=0,e=0;e<n.length;e++){var h=n[e],d=m.dataPointIds[e];l[e].id=d;l[e].objectType="dataPoint";l[e].dataPointIndex=e;l[e].dataSeriesIndex=0;var p=l[e],k={percent:null,total:null},C=null,k=t.getPercentAndTotal(m,h);if(m.indexLabelFormatter||h.indexLabelFormatter)C={chart:t.options,dataSeries:m,dataPoint:h,total:k.total,percent:k.percent};k=h.indexLabelFormatter?h.indexLabelFormatter(C):
h.indexLabel?t.replaceKeywordsWithValue(h.indexLabel,h,m,e):m.indexLabelFormatter?m.indexLabelFormatter(C):m.indexLabel?t.replaceKeywordsWithValue(m.indexLabel,h,m,e):h.label?h.label:"";t._eventManager.objectMap[d]=p;p.center={x:r.x,y:r.y};p.y=h.y;p.radius=B;p.percentInnerRadius=D;p.indexLabelText=k;p.indexLabelPlacement=m.indexLabelPlacement;p.indexLabelLineColor=h.indexLabelLineColor?h.indexLabelLineColor:m.options.indexLabelLineColor?m.options.indexLabelLineColor:h.color?h.color:m._colorSet[e%
m._colorSet.length];p.indexLabelLineThickness=g(h.indexLabelLineThickness)?m.indexLabelLineThickness:h.indexLabelLineThickness;p.indexLabelLineDashType=h.indexLabelLineDashType?h.indexLabelLineDashType:m.indexLabelLineDashType;p.indexLabelFontColor=h.indexLabelFontColor?h.indexLabelFontColor:m.indexLabelFontColor;p.indexLabelFontStyle=h.indexLabelFontStyle?h.indexLabelFontStyle:m.indexLabelFontStyle;p.indexLabelFontWeight=h.indexLabelFontWeight?h.indexLabelFontWeight:m.indexLabelFontWeight;p.indexLabelFontSize=
g(h.indexLabelFontSize)?m.indexLabelFontSize:h.indexLabelFontSize;p.indexLabelFontFamily=h.indexLabelFontFamily?h.indexLabelFontFamily:m.indexLabelFontFamily;p.indexLabelBackgroundColor=h.indexLabelBackgroundColor?h.indexLabelBackgroundColor:m.options.indexLabelBackgroundColor?m.options.indexLabelBackgroundColor:m.indexLabelBackgroundColor;p.indexLabelMaxWidth=h.indexLabelMaxWidth?h.indexLabelMaxWidth:m.indexLabelMaxWidth?m.indexLabelMaxWidth:0.33*q.width;p.indexLabelWrap="undefined"!==typeof h.indexLabelWrap?
h.indexLabelWrap:m.indexLabelWrap;p.indexLabelTextAlign=h.indexLabelTextAlign?h.indexLabelTextAlign:m.indexLabelTextAlign?m.indexLabelTextAlign:"left";p.startAngle=0===e?m.startAngle?m.startAngle/180*Math.PI:0:l[e-1].endAngle;p.startAngle=(p.startAngle+2*Math.PI)%(2*Math.PI);p.endAngle=p.startAngle+2*Math.PI/z*Math.abs(h.y);h=(p.endAngle+p.startAngle)/2;h=(h+2*Math.PI)%(2*Math.PI);p.midAngle=h;if(p.midAngle>Math.PI/2-v&&p.midAngle<Math.PI/2+v){if(0===a||l[c].midAngle>p.midAngle)c=e;a++}else if(p.midAngle>
3*Math.PI/2-v&&p.midAngle<3*Math.PI/2+v){if(0===b||l[f].midAngle>p.midAngle)f=e;b++}p.hemisphere=h>Math.PI/2&&h<=3*Math.PI/2?"left":"right";p.indexLabelTextBlock=new oa(t.plotArea.ctx,{fontSize:p.indexLabelFontSize,fontFamily:p.indexLabelFontFamily,fontColor:p.indexLabelFontColor,fontStyle:p.indexLabelFontStyle,fontWeight:p.indexLabelFontWeight,textAlign:p.indexLabelTextAlign,backgroundColor:p.indexLabelBackgroundColor,maxWidth:p.indexLabelMaxWidth,maxHeight:p.indexLabelWrap?5*p.indexLabelFontSize:
1.5*p.indexLabelFontSize,text:p.indexLabelText,padding:0,textBaseline:"top"});p.indexLabelTextBlock.measureText()}d=h=0;k=!1;for(e=0;e<n.length;e++)p=l[(c+e)%n.length],1<a&&(p.midAngle>Math.PI/2-v&&p.midAngle<Math.PI/2+v)&&(h<=a/2&&!k?(p.hemisphere="right",h++):(p.hemisphere="left",k=!0));k=!1;for(e=0;e<n.length;e++)p=l[(f+e)%n.length],1<b&&(p.midAngle>3*Math.PI/2-v&&p.midAngle<3*Math.PI/2+v)&&(d<=b/2&&!k?(p.hemisphere="left",d++):(p.hemisphere="right",k=!0))}}function c(a){var b=t.plotArea.ctx;b.clearRect(q.x1,
q.y1,q.width,q.height);b.fillStyle=t.backgroundColor;b.fillRect(q.x1,q.y1,q.width,q.height);for(b=0;b<n.length;b++){var c=l[b].startAngle,f=l[b].endAngle;if(f>c){var e=0.07*B*Math.cos(l[b].midAngle),h=0.07*B*Math.sin(l[b].midAngle),g=!1;if(n[b].exploded){if(1E-9<Math.abs(l[b].center.x-(r.x+e))||1E-9<Math.abs(l[b].center.y-(r.y+h)))l[b].center.x=r.x+e*a,l[b].center.y=r.y+h*a,g=!0}else if(0<Math.abs(l[b].center.x-r.x)||0<Math.abs(l[b].center.y-r.y))l[b].center.x=r.x+e*(1-a),l[b].center.y=r.y+h*(1-a),
g=!0;g&&(e={},e.dataSeries=m,e.dataPoint=m.dataPoints[b],e.index=b,t.toolTip.highlightObjects([e]));d(t.plotArea.ctx,l[b].center,l[b].radius,n[b].color?n[b].color:m._colorSet[b%m._colorSet.length],m.type,c,f,m.fillOpacity,l[b].percentInnerRadius)}}a=t.plotArea.ctx;a.save();a.fillStyle="black";a.strokeStyle="grey";a.textBaseline="middle";a.lineJoin="round";for(b=b=0;b<n.length;b++)c=l[b],c.indexLabelText&&(c.indexLabelTextBlock.y-=c.indexLabelTextBlock.height/2,f=0,f="left"===c.hemisphere?"inside"!==
m.indexLabelPlacement?-(c.indexLabelTextBlock.width+p):-c.indexLabelTextBlock.width/2:"inside"!==m.indexLabelPlacement?p:-c.indexLabelTextBlock.width/2,c.indexLabelTextBlock.x+=f,c.indexLabelTextBlock.render(!0),c.indexLabelTextBlock.x-=f,c.indexLabelTextBlock.y+=c.indexLabelTextBlock.height/2,"inside"!==c.indexLabelPlacement&&0<c.indexLabelLineThickness&&(f=c.center.x+B*Math.cos(c.midAngle),e=c.center.y+B*Math.sin(c.midAngle),a.strokeStyle=c.indexLabelLineColor,a.lineWidth=c.indexLabelLineThickness,
a.setLineDash&&a.setLineDash(R(c.indexLabelLineDashType,c.indexLabelLineThickness)),a.beginPath(),a.moveTo(f,e),a.lineTo(c.indexLabelTextBlock.x,c.indexLabelTextBlock.y),a.lineTo(c.indexLabelTextBlock.x+("left"===c.hemisphere?-p:p),c.indexLabelTextBlock.y),a.stroke()),a.lineJoin="miter");a.save()}function b(a,b){var c=0,c=a.indexLabelTextBlock.y-a.indexLabelTextBlock.height/2,f=a.indexLabelTextBlock.y+a.indexLabelTextBlock.height/2,e=b.indexLabelTextBlock.y-b.indexLabelTextBlock.height/2,h=b.indexLabelTextBlock.y+
b.indexLabelTextBlock.height/2;return c=b.indexLabelTextBlock.y>a.indexLabelTextBlock.y?e-f:c-h}function e(a){for(var c=null,f=1;f<n.length;f++)if(c=(a+f+l.length)%l.length,l[c].hemisphere!==l[a].hemisphere){c=null;break}else if(l[c].indexLabelText&&c!==a&&(0>b(l[c],l[a])||("right"===l[a].hemisphere?l[c].indexLabelTextBlock.y>=l[a].indexLabelTextBlock.y:l[c].indexLabelTextBlock.y<=l[a].indexLabelTextBlock.y)))break;else c=null;return c}function h(a,c,f){f=(f||0)+1;if(1E3<f)return 0;c=c||0;var g=0,
d=r.y-1*x,m=r.y+1*x;if(0<=a&&a<n.length){var p=l[a];if(0>c&&p.indexLabelTextBlock.y<d||0<c&&p.indexLabelTextBlock.y>m)return 0;var q=0,k=0,k=q=q=0;0>c?p.indexLabelTextBlock.y-p.indexLabelTextBlock.height/2>d&&p.indexLabelTextBlock.y-p.indexLabelTextBlock.height/2+c<d&&(c=-(d-(p.indexLabelTextBlock.y-p.indexLabelTextBlock.height/2+c))):p.indexLabelTextBlock.y+p.indexLabelTextBlock.height/2<d&&p.indexLabelTextBlock.y+p.indexLabelTextBlock.height/2+c>m&&(c=p.indexLabelTextBlock.y+p.indexLabelTextBlock.height/
2+c-m);c=p.indexLabelTextBlock.y+c;d=0;d="right"===p.hemisphere?r.x+Math.sqrt(Math.pow(x,2)-Math.pow(c-r.y,2)):r.x-Math.sqrt(Math.pow(x,2)-Math.pow(c-r.y,2));k=r.x+B*Math.cos(p.midAngle);q=r.y+B*Math.sin(p.midAngle);q=Math.sqrt(Math.pow(d-k,2)+Math.pow(c-q,2));k=Math.acos(B/x);q=Math.acos((x*x+B*B-q*q)/(2*B*x));c=q<k?c-p.indexLabelTextBlock.y:0;d=null;for(m=1;m<n.length;m++)if(d=(a-m+l.length)%l.length,l[d].hemisphere!==l[a].hemisphere){d=null;break}else if(l[d].indexLabelText&&l[d].hemisphere===
l[a].hemisphere&&d!==a&&(0>b(l[d],l[a])||("right"===l[a].hemisphere?l[d].indexLabelTextBlock.y<=l[a].indexLabelTextBlock.y:l[d].indexLabelTextBlock.y>=l[a].indexLabelTextBlock.y)))break;else d=null;k=d;q=e(a);m=d=0;0>c?(m="right"===p.hemisphere?k:q,g=c,null!==m&&(k=-c,c=p.indexLabelTextBlock.y-p.indexLabelTextBlock.height/2-(l[m].indexLabelTextBlock.y+l[m].indexLabelTextBlock.height/2),c-k<w&&(d=-k,m=h(m,d,f+1),+m.toFixed(u)>+d.toFixed(u)&&(g=c>w?-(c-w):-(k-(m-d)))))):0<c&&(m="right"===p.hemisphere?
q:k,g=c,null!==m&&(k=c,c=l[m].indexLabelTextBlock.y-l[m].indexLabelTextBlock.height/2-(p.indexLabelTextBlock.y+p.indexLabelTextBlock.height/2),c-k<w&&(d=k,m=h(m,d,f+1),+m.toFixed(u)<+d.toFixed(u)&&(g=c>w?c-w:k-(d-m)))));g&&(f=p.indexLabelTextBlock.y+g,c=0,c="right"===p.hemisphere?r.x+Math.sqrt(Math.pow(x,2)-Math.pow(f-r.y,2)):r.x-Math.sqrt(Math.pow(x,2)-Math.pow(f-r.y,2)),p.midAngle>Math.PI/2-v&&p.midAngle<Math.PI/2+v?(d=(a-1+l.length)%l.length,d=l[d],a=l[(a+1+l.length)%l.length],"left"===p.hemisphere&&
"right"===d.hemisphere&&c>d.indexLabelTextBlock.x?c=d.indexLabelTextBlock.x-15:"right"===p.hemisphere&&("left"===a.hemisphere&&c<a.indexLabelTextBlock.x)&&(c=a.indexLabelTextBlock.x+15)):p.midAngle>3*Math.PI/2-v&&p.midAngle<3*Math.PI/2+v&&(d=(a-1+l.length)%l.length,d=l[d],a=l[(a+1+l.length)%l.length],"right"===p.hemisphere&&"left"===d.hemisphere&&c<d.indexLabelTextBlock.x?c=d.indexLabelTextBlock.x+15:"left"===p.hemisphere&&("right"===a.hemisphere&&c>a.indexLabelTextBlock.x)&&(c=a.indexLabelTextBlock.x-
15)),p.indexLabelTextBlock.y=f,p.indexLabelTextBlock.x=c,p.indexLabelAngle=Math.atan2(p.indexLabelTextBlock.y-r.y,p.indexLabelTextBlock.x-r.x))}return g}function C(){var a=t.plotArea.ctx;a.fillStyle="grey";a.strokeStyle="grey";a.font="16px Arial";a.textBaseline="middle";for(var c=a=0,f=0,g=!0,c=0;10>c&&(1>c||0<f);c++){if(m.radius||!m.radius&&"undefined"!==typeof m.innerRadius&&null!==m.innerRadius&&B-f<=A)g=!1;g&&(B-=f);f=0;if("inside"!==m.indexLabelPlacement){x=B*s;for(a=0;a<n.length;a++){var d=
l[a];d.indexLabelTextBlock.x=r.x+x*Math.cos(d.midAngle);d.indexLabelTextBlock.y=r.y+x*Math.sin(d.midAngle);d.indexLabelAngle=d.midAngle;d.radius=B;d.percentInnerRadius=D}for(var k,C,a=0;a<n.length;a++){var d=l[a],v=e(a);if(null!==v){k=l[a];C=l[v];var z=0,z=b(k,C)-w;if(0>z){for(var qa=C=0,E=0;E<n.length;E++)E!==a&&l[E].hemisphere===d.hemisphere&&(l[E].indexLabelTextBlock.y<d.indexLabelTextBlock.y?C++:qa++);C=z/(C+qa||1)*qa;var qa=-1*(z-C),U=E=0;"right"===d.hemisphere?(E=h(a,C),qa=-1*(z-E),U=h(v,qa),
+U.toFixed(u)<+qa.toFixed(u)&&+E.toFixed(u)<=+C.toFixed(u)&&h(a,-(qa-U))):(E=h(v,C),qa=-1*(z-E),U=h(a,qa),+U.toFixed(u)<+qa.toFixed(u)&&+E.toFixed(u)<=+C.toFixed(u)&&h(v,-(qa-U)))}}}}else for(a=0;a<n.length;a++)d=l[a],x="pie"===m.type?0.7*B:0.8*B,v=r.x+x*Math.cos(d.midAngle),C=r.y+x*Math.sin(d.midAngle),d.indexLabelTextBlock.x=v,d.indexLabelTextBlock.y=C;for(a=0;a<n.length;a++)if(d=l[a],v=d.indexLabelTextBlock.measureText(),0!==v.height&&0!==v.width)v=v=0,"right"===d.hemisphere?(v=q.x2-(d.indexLabelTextBlock.x+
d.indexLabelTextBlock.width+p),v*=-1):v=q.x1-(d.indexLabelTextBlock.x-d.indexLabelTextBlock.width-p),0<v&&(!g&&d.indexLabelText&&(C="right"===d.hemisphere?q.x2-d.indexLabelTextBlock.x:d.indexLabelTextBlock.x-q.x1,0.3*d.indexLabelTextBlock.maxWidth>C?d.indexLabelText="":d.indexLabelTextBlock.maxWidth=0.85*C,0.3*d.indexLabelTextBlock.maxWidth<C&&(d.indexLabelTextBlock.x-="right"===d.hemisphere?2:-2)),Math.abs(d.indexLabelTextBlock.y-d.indexLabelTextBlock.height/2-r.y)<B||Math.abs(d.indexLabelTextBlock.y+
d.indexLabelTextBlock.height/2-r.y)<B)&&(v/=Math.abs(Math.cos(d.indexLabelAngle)),9<v&&(v*=0.3),v>f&&(f=v)),v=v=0,0<d.indexLabelAngle&&d.indexLabelAngle<Math.PI?(v=q.y2-(d.indexLabelTextBlock.y+d.indexLabelTextBlock.height/2+5),v*=-1):v=q.y1-(d.indexLabelTextBlock.y-d.indexLabelTextBlock.height/2-5),0<v&&(!g&&d.indexLabelText&&(C=0<d.indexLabelAngle&&d.indexLabelAngle<Math.PI?-1:1,0===h(a,v*C)&&h(a,2*C)),Math.abs(d.indexLabelTextBlock.x-r.x)<B&&(v/=Math.abs(Math.sin(d.indexLabelAngle)),9<v&&(v*=0.3),
v>f&&(f=v)));var F=function(a,b,c){for(var f=[],e=0;f.push(l[b]),b!==c;b=(b+1+n.length)%n.length);f.sort(function(a,b){return a.y-b.y});for(b=0;b<f.length;b++)if(c=f[b],e<0.7*a)e+=c.indexLabelTextBlock.height,c.indexLabelTextBlock.text="",c.indexLabelText="",c.indexLabelTextBlock.measureText();else break};(function(){for(var a=-1,c=-1,f=0,h=!1,d=0;d<n.length;d++)if(h=!1,k=l[d],k.indexLabelText){var g=e(d);if(null!==g){var m=l[g];z=0;z=b(k,m);var q;if(q=0>z){q=k.indexLabelTextBlock.x;var C=k.indexLabelTextBlock.y-
k.indexLabelTextBlock.height/2,t=k.indexLabelTextBlock.y+k.indexLabelTextBlock.height/2,w=m.indexLabelTextBlock.y-m.indexLabelTextBlock.height/2,v=m.indexLabelTextBlock.x+m.indexLabelTextBlock.width,x=m.indexLabelTextBlock.y+m.indexLabelTextBlock.height/2;q=k.indexLabelTextBlock.x+k.indexLabelTextBlock.width<m.indexLabelTextBlock.x-p||q>v+p||C>x+p||t<w-p?!1:!0}q?(0>a&&(a=d),g!==a&&(c=g,f+=-z),0===d%Math.max(n.length/10,3)&&(h=!0)):h=!0;h&&(0<f&&0<=a&&0<=c)&&(F(f,a,c),c=a=-1,f=0)}}0<f&&F(f,a,c)})()}}
function k(){t.plotArea.layoutManager.reset();t.title&&(t.title.dockInsidePlotArea||"center"===t.title.horizontalAlign&&"center"===t.title.verticalAlign)&&t.title.render();if(t.subtitles)for(var a=0;a<t.subtitles.length;a++){var b=t.subtitles[a];(b.dockInsidePlotArea||"center"===b.horizontalAlign&&"center"===b.verticalAlign)&&b.render()}t.legend&&(t.legend.dockInsidePlotArea||"center"===t.legend.horizontalAlign&&"center"===t.legend.verticalAlign)&&(t.legend.setLayout(),t.legend.render())}var t=this;
if(!(0>=a.dataSeriesIndexes.length)){var m=this.data[a.dataSeriesIndexes[0]],n=m.dataPoints,p=10,q=this.plotArea,l=m.dataPointEOs,w=2,x,s=1.3,v=20/180*Math.PI,u=6,r={x:(q.x2+q.x1)/2,y:(q.y2+q.y1)/2},z=0;a=!1;for(var E=0;E<n.length;E++)z+=Math.abs(n[E].y),!a&&("undefined"!==typeof n[E].indexLabel&&null!==n[E].indexLabel&&0<n[E].indexLabel.toString().length)&&(a=!0),!a&&("undefined"!==typeof n[E].label&&null!==n[E].label&&0<n[E].label.toString().length)&&(a=!0);if(0!==z){a=a||"undefined"!==typeof m.indexLabel&&
null!==m.indexLabel&&0<m.indexLabel.toString().length;var B="inside"!==m.indexLabelPlacement&&a?0.75*Math.min(q.width,q.height)/2:0.92*Math.min(q.width,q.height)/2;m.radius&&(B=Ua(m.radius,B));var A="undefined"!==typeof m.innerRadius&&null!==m.innerRadius?Ua(m.innerRadius,B):0.7*B;m.radius=B;"doughnut"===m.type&&(m.innerRadius=A);var D=Math.min(A/B,(B-1)/B);this.pieDoughnutClickHandler=function(a){t.isAnimating||!g(a.dataSeries.explodeOnClick)&&!a.dataSeries.explodeOnClick||(a=a.dataPoint,a.exploded=
a.exploded?!1:!0,1<this.dataPoints.length&&t._animator.animate(0,500,function(a){c(a);k();t.dispatchEvent("dataAnimationIterationEnd",{chart:t});t.dispatchEvent("dataAnimationEnd",{chart:t})}))};f();C();C();C();C();this.disableToolTip=!0;this._animator.animate(0,this.animatedRender?this.animationDuration:0,function(a){var b=t.plotArea.ctx;b.clearRect(q.x1,q.y1,q.width,q.height);b.fillStyle=t.backgroundColor;b.fillRect(q.x1,q.y1,q.width,q.height);for(var b=l[0].startAngle+2*Math.PI*a,c=0;c<n.length;c++){var f=
0===c?l[c].startAngle:e,e=f+(l[c].endAngle-l[c].startAngle),h=!1;e>b&&(e=b,h=!0);var g=n[c].color?n[c].color:m._colorSet[c%m._colorSet.length];e>f&&d(t.plotArea.ctx,l[c].center,l[c].radius,g,m.type,f,e,m.fillOpacity,l[c].percentInnerRadius);if(h)break}k();t.dispatchEvent("dataAnimationIterationEnd",{chart:t});1<=a&&t.dispatchEvent("dataAnimationEnd",{chart:t})},function(){t.disableToolTip=!1;t._animator.animate(0,t.animatedRender?500:0,function(a){c(a);k();t.dispatchEvent("dataAnimationIterationEnd",
{chart:t})});t.dispatchEvent("dataAnimationEnd",{chart:t})})}}};var t=function(a,f,c,b){"undefined"===typeof c&&(c=1);0>=Math.round(f.y4-f.y1)||(a.save(),a.globalAlpha=c,a.beginPath(),a.moveTo(Math.round(f.x1),Math.round(f.y1)),a.lineTo(Math.round(f.x2),Math.round(f.y2)),a.lineTo(Math.round(f.x3),Math.round(f.y3)),a.lineTo(Math.round(f.x4),Math.round(f.y4)),"undefined"!==f.x5&&(a.lineTo(Math.round(f.x5),Math.round(f.y5)),a.lineTo(Math.round(f.x6),Math.round(f.y6))),a.closePath(),a.fillStyle=b?b:f.color,
a.fill(),a.globalAplha=1,a.restore())};r.prototype.renderFunnel=function(a){function f(){for(var a=0,b=[],c=0;c<y.length;c++){if("undefined"===typeof y[c].y)return-1;y[c].y="number"===typeof y[c].y?y[c].y:0;a+=Math.abs(y[c].y)}if(0===a)return-1;for(c=b[0]=0;c<y.length;c++)b.push(Math.abs(y[c].y)*F/a);return b}function c(){var a=aa,b=Y,c=T,f=ja,e,h;e=O;h=Z-M;f=Math.abs((h-e)*(b-a+(f-c))/2);c=ja-T;e=h-e;h=c*(h-Z);h=Math.abs(h);h=f+h;for(var f=[],l=0,d=0;d<y.length;d++){if("undefined"===typeof y[d].y)return-1;
y[d].y="number"===typeof y[d].y?y[d].y:0;l+=Math.abs(y[d].y)}if(0===l)return-1;for(var g=f[0]=0,m=0,p,n,b=b-a,g=!1,d=0;d<y.length;d++)a=Math.abs(y[d].y)*h/l,g?p=0==Number(c.toFixed(3))?0:a/c:(n=ia*ia*b*b-4*Math.abs(ia)*a,0>n?(n=c,g=(b+n)*(e-m)/2,a-=g,p=e-m,m+=e-m,p+=0==n?0:a/n,m+=a/n,g=!0):(p=(Math.abs(ia)*b-Math.sqrt(n))/2,n=b-2*p/Math.abs(ia),m+=p,m>e&&(m-=p,n=c,g=(b+n)*(e-m)/2,a-=g,p=e-m,m+=e-m,p+=a/n,m+=a/n,g=!0),b=n)),f.push(p);return f}function b(){if(v&&y){for(var a,b,c,f,e,h,d,m,p,n,q,k,C,
t,w,x=[],s=[],r={percent:null,total:null},K=null,B=0;B<y.length;B++)w=V[B],w="undefined"!==typeof w.x5?(w.y2+w.y4)/2:(w.y2+w.y3)/2,w=l(w).x2+1,x[B]=L-w-S;w=0.5*S;for(var B=0,qa=y.length-1;B<y.length||0<=qa;B++,qa--){b=v.reversed?y[qa]:y[B];a=b.color?b.color:v.reversed?v._colorSet[(y.length-1-B)%v._colorSet.length]:v._colorSet[B%v._colorSet.length];c=b.indexLabelPlacement||v.indexLabelPlacement||"outside";t=b.indexLabelTextAlign||v.indexLabelTextAlign||"left";f=b.indexLabelBackgroundColor||v.indexLabelBackgroundColor||
(u?"transparent":null);e=b.indexLabelFontColor||v.indexLabelFontColor||"#979797";h=g(b.indexLabelFontSize)?v.indexLabelFontSize:b.indexLabelFontSize;d=b.indexLabelFontStyle||v.indexLabelFontStyle||"normal";m=b.indexLabelFontFamily||v.indexLabelFontFamily||"arial";p=b.indexLabelFontWeight||v.indexLabelFontWeight||"normal";a=b.indexLabelLineColor||v.options.indexLabelLineColor||a;n="number"===typeof b.indexLabelLineThickness?b.indexLabelLineThickness:"number"===typeof v.indexLabelLineThickness?v.indexLabelLineThickness:
2;q=b.indexLabelLineDashType||v.indexLabelLineDashType||"solid";k="undefined"!==typeof b.indexLabelWrap?b.indexLabelWrap:"undefined"!==typeof v.indexLabelWrap?v.indexLabelWrap:!0;C=v.dataPointIds[B];z._eventManager.objectMap[C]={id:C,objectType:"dataPoint",dataPointIndex:B,dataSeriesIndex:0,funnelSection:V[v.reversed?y.length-1-B:B]};"inside"===v.indexLabelPlacement&&(x[B]=B!==ea?v.reversed?V[B].x2-V[B].x1:V[B].x3-V[B].x4:V[B].x3-V[B].x6,20>x[B]&&(x[B]=B!==ea?v.reversed?V[B].x3-V[B].x4:V[B].x2-V[B].x1:
V[B].x2-V[B].x1,x[B]/=2));C=b.indexLabelMaxWidth?b.indexLabelMaxWidth:v.options.indexLabelMaxWidth?v.indexLabelMaxWidth:x[B];if(C>x[B]||0>C)C=x[B];s[B]="inside"===v.indexLabelPlacement?V[B].height:!1;r=z.getPercentAndTotal(v,b);if(v.indexLabelFormatter||b.indexLabelFormatter)K={chart:z.options,dataSeries:v,dataPoint:b,total:r.total,percent:r.percent};b=b.indexLabelFormatter?b.indexLabelFormatter(K):b.indexLabel?z.replaceKeywordsWithValue(b.indexLabel,b,v,B):v.indexLabelFormatter?v.indexLabelFormatter(K):
v.indexLabel?z.replaceKeywordsWithValue(v.indexLabel,b,v,B):b.label?b.label:"";0>=n&&(n=0);1E3>C&&1E3-C<w&&(C+=1E3-C);N.roundRect||Ga(N);c=new oa(N,{fontSize:h,fontFamily:m,fontColor:e,fontStyle:d,fontWeight:p,horizontalAlign:c,textAlign:t,backgroundColor:f,maxWidth:C,maxHeight:!1===s[B]?k?4.28571429*h:1.5*h:s[B],text:b,padding:la});c.measureText();J.push({textBlock:c,id:v.reversed?qa:B,isDirty:!1,lineColor:a,lineThickness:n,lineDashType:q,height:c.height<c.maxHeight?c.height:c.maxHeight,width:c.width<
c.maxWidth?c.width:c.maxWidth})}}}function e(){var a,b,c,f,e,h=[];e=!1;c=0;for(var d,l=L-Y-S/2,l=v.options.indexLabelMaxWidth?v.indexLabelMaxWidth>l?l:v.indexLabelMaxWidth:l,g=J.length-1;0<=g;g--){d=y[J[g].id];c=J[g];f=c.textBlock;b=(a=q(g)<V.length?J[q(g)]:null)?a.textBlock:null;c=c.height;a&&f.y+c+la>b.y&&(e=!0);c=d.indexLabelMaxWidth||l;if(c>l||0>c)c=l;h.push(c)}if(e)for(g=J.length-1;0<=g;g--)a=V[g],J[g].textBlock.maxWidth=h[h.length-(g+1)],J[g].textBlock.measureText(),J[g].textBlock.x=L-l,c=J[g].textBlock.height<
J[g].textBlock.maxHeight?J[g].textBlock.height:J[g].textBlock.maxHeight,e=J[g].textBlock.width<J[g].textBlock.maxWidth?J[g].textBlock.width:J[g].textBlock.maxWidth,J[g].height=c,J[g].width=e,c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,J[g].textBlock.y=c-J[g].height/2,v.reversed?(J[g].textBlock.y+J[g].height>W+D&&(J[g].textBlock.y=W+D-J[g].height),J[g].textBlock.y<$-D&&(J[g].textBlock.y=$-D)):(J[g].textBlock.y<W-D&&(J[g].textBlock.y=W-D),J[g].textBlock.y+J[g].height>$+D&&(J[g].textBlock.y=
$+D-J[g].height))}function h(){var a,b,c,f;if("inside"!==v.indexLabelPlacement)for(var e=0;e<V.length;e++)0==J[e].textBlock.text.length?J[e].isDirty=!0:(a=V[e],c="undefined"!==typeof a.x5?(a.y2+a.y4)/2:(a.y2+a.y3)/2,b=v.reversed?"undefined"!==typeof a.x5?c>ba?l(c).x2+1:(a.x2+a.x3)/2+1:(a.x2+a.x3)/2+1:"undefined"!==typeof a.x5?c<ba?l(c).x2+1:(a.x4+a.x3)/2+1:(a.x2+a.x3)/2+1,J[e].textBlock.x=b+S,J[e].textBlock.y=c-J[e].height/2,v.reversed?(J[e].textBlock.y+J[e].height>W+D&&(J[e].textBlock.y=W+D-J[e].height),
J[e].textBlock.y<$-D&&(J[e].textBlock.y=$-D)):(J[e].textBlock.y<W-D&&(J[e].textBlock.y=W-D),J[e].textBlock.y+J[e].height>$+D&&(J[e].textBlock.y=$+D-J[e].height)));else for(e=0;e<V.length;e++)0==J[e].textBlock.text.length?J[e].isDirty=!0:(a=V[e],b=a.height,c=J[e].height,f=J[e].width,b>=c?(b=e!=ea?(a.x4+a.x3)/2-f/2:(a.x5+a.x4)/2-f/2,c=e!=ea?(a.y1+a.y3)/2-c/2:(a.y1+a.y4)/2-c/2,J[e].textBlock.x=b,J[e].textBlock.y=c):J[e].isDirty=!0)}function d(){function a(b,c){var f;if(0>b||b>=J.length)return 0;var e,
h=J[b].textBlock;if(0>c){c*=-1;e=p(b);f=k(e,b);if(f>=c)return h.y-=c,c;if(0==b)return 0<f&&(h.y-=f),f;f+=a(e,-(c-f));0<f&&(h.y-=f);return f}e=q(b);f=k(b,e);if(f>=c)return h.y+=c,c;if(b==V.length-1)return 0<f&&(h.y+=f),f;f+=a(e,c-f);0<f&&(h.y+=f);return f}function b(){var a,f,e,h,g=0,l;h=(Z-O+2*D)/n;l=n;for(var d,m=1;m<l;m++){e=m*h;for(var k=J.length-1;0<=k;k--)!J[k].isDirty&&(J[k].textBlock.y<e&&J[k].textBlock.y+J[k].height>e)&&(d=q(k),!(d>=J.length-1)&&J[k].textBlock.y+J[k].height+la>J[d].textBlock.y&&
(J[k].textBlock.y=J[k].textBlock.y+J[k].height-e>e-J[k].textBlock.y?e+1:e-J[k].height-1))}for(d=V.length-1;0<d;d--)if(!J[d].isDirty){e=p(d);if(0>e&&(e=0,J[e].isDirty))break;if(J[d].textBlock.y<J[e].textBlock.y+J[e].height){f=f||d;h=d;for(l=0;J[h].textBlock.y<J[e].textBlock.y+J[e].height+la;){a=a||J[h].textBlock.y+J[h].height;l+=J[h].height;l+=la;h=e;if(0>=h){h=0;l+=J[h].height;break}e=p(h);if(0>e){h=0;l+=J[h].height;break}}if(h!=d){g=J[h].textBlock.y;a-=g;a=l-a;g=c(a,f,h);break}}}return g}function c(a,
b,f){var e=[],h=0,g=0;for(a=Math.abs(a);f<=b;f++)e.push(V[f]);e.sort(function(a,b){return a.height-b.height});for(f=0;f<e.length;f++)if(b=e[f],h<a)g++,h+=J[b.id].height+la,J[b.id].textBlock.text="",J[b.id].indexLabelText="",J[b.id].isDirty=!0,J[b.id].textBlock.measureText();else break;return g}for(var f,e,h,g,l,m,n=1,C=0;C<2*n;C++){for(var t=J.length-1;0<=t&&!(0<=p(t)&&p(t),h=J[t],g=h.textBlock,m=(l=q(t)<V.length?J[q(t)]:null)?l.textBlock:null,f=+h.height.toFixed(6),e=+g.y.toFixed(6),!h.isDirty&&
(l&&e+f+la>+m.y.toFixed(6))&&(f=g.y+f+la-m.y,e=a(t,-f),e<f&&(0<e&&(f-=e),e=a(q(t),f),e!=f)));t--);b()}}function k(a,b){return(b<V.length?J[b].textBlock.y:v.reversed?W+D:$+D)-(0>a?v.reversed?$-D:W-D:J[a].textBlock.y+J[a].height+la)}function s(a,b,c){var f,e,g,l=[],d=D,p=[];-1!==b&&(0<=fa.indexOf(b)?(e=fa.indexOf(b),fa.splice(e,1)):(fa.push(b),fa=fa.sort(function(a,b){return a-b})));if(0===fa.length)l=pa;else{e=D*(1!=fa.length||0!=fa[0]&&fa[0]!=V.length-1?2:1)/m();for(var q=0;q<V.length;q++){if(1==
fa.length&&0==fa[0]){if(0===q){l.push(pa[q]);f=d;continue}}else 0===q&&(f=-1*d);l.push(pa[q]+f);if(0<=fa.indexOf(q)||q<V.length&&0<=fa.indexOf(q+1))f+=e}}g=function(){for(var a=[],b=0;b<V.length;b++)a.push(l[b]-V[b].y1);return a}();var k={startTime:(new Date).getTime(),duration:c||500,easingFunction:function(a,b,c,f){return x.easing.easeOutQuart(a,b,c,f)},changeSection:function(a){for(var b,c,f=0;f<V.length;f++)b=g[f],c=V[f],b*=a,"undefined"===typeof p[f]&&(p[f]=0),0>p&&(p*=-1),c.y1+=b-p[f],c.y2+=
b-p[f],c.y3+=b-p[f],c.y4+=b-p[f],c.y5&&(c.y5+=b-p[f],c.y6+=b-p[f]),p[f]=b}};a._animator.animate(0,c,function(c){var f=a.plotArea.ctx||a.ctx;ra=!0;f.clearRect(A.x1,A.y1,A.x2-A.x1,A.y2-A.y1);f.fillStyle=a.backgroundColor;f.fillRect(A.x1,A.y1,A.width,A.height);k.changeSection(c,b);var e={};e.dataSeries=v;e.dataPoint=v.reversed?v.dataPoints[y.length-1-b]:v.dataPoints[b];e.index=v.reversed?y.length-1-b:b;a.toolTip.highlightObjects([e]);for(e=0;e<V.length;e++)t(f,V[e],v.fillOpacity);r(f);Q&&("inside"!==
v.indexLabelPlacement?n(f):h(),w(f));1<=c&&(ra=!1)},null,x.easing.easeOutQuart)}function m(){for(var a=0,b=0;b<V.length-1;b++)(0<=fa.indexOf(b)||0<=fa.indexOf(b+1))&&a++;return a}function n(a){for(var b,c,f,e,h=0;h<V.length;h++)e=1===J[h].lineThickness%2?0.5:0,c=((V[h].y2+V[h].y4)/2<<0)+e,b=l(c).x2-1,f=J[h].textBlock.x,e=(J[h].textBlock.y+J[h].height/2<<0)+e,J[h].isDirty||0==J[h].lineThickness||(a.strokeStyle=J[h].lineColor,a.lineWidth=J[h].lineThickness,a.setLineDash&&a.setLineDash(R(J[h].lineDashType,
J[h].lineThickness)),a.beginPath(),a.moveTo(b,c),a.lineTo(f,e),a.stroke())}function p(a){for(a-=1;-1<=a&&-1!=a&&J[a].isDirty;a--);return a}function q(a){for(a+=1;a<=V.length&&a!=V.length&&J[a].isDirty;a++);return a}function l(a){for(var b,c=0;c<y.length;c++)if(V[c].y1<a&&V[c].y4>a){b=V[c];break}return b?(a=b.y6?a>b.y6?b.x3+(b.x4-b.x3)/(b.y4-b.y3)*(a-b.y3):b.x2+(b.x3-b.x2)/(b.y3-b.y2)*(a-b.y2):b.x2+(b.x3-b.x2)/(b.y3-b.y2)*(a-b.y2),{x1:a,x2:a}):-1}function w(a){for(var b=0;b<V.length;b++)J[b].isDirty||
(a&&(J[b].textBlock.ctx=a),J[b].textBlock.render(!0))}function r(a){z.plotArea.layoutManager.reset();a.roundRect||Ga(a);z.title&&(z.title.dockInsidePlotArea||"center"===z.title.horizontalAlign&&"center"===z.title.verticalAlign)&&(z.title.ctx=a,z.title.render());if(z.subtitles)for(var b=0;b<z.subtitles.length;b++){var c=z.subtitles[b];if(c.dockInsidePlotArea||"center"===c.horizontalAlign&&"center"===c.verticalAlign)z.subtitles.ctx=a,c.render()}z.legend&&(z.legend.dockInsidePlotArea||"center"===z.legend.horizontalAlign&&
"center"===z.legend.verticalAlign)&&(z.legend.ctx=a,z.legend.setLayout(),z.legend.render());ka.fNg&&ka.fNg(z)}var z=this;if(!(0>=a.dataSeriesIndexes.length)){for(var v=this.data[a.dataSeriesIndexes[0]],y=v.dataPoints,A=this.plotArea,D=0.025*A.width,E=0.01*A.width,B=0,F=A.height-2*D,G=Math.min(A.width-2*E,2.8*A.height),Q=!1,I=0;I<y.length;I++)if(!Q&&("undefined"!==typeof y[I].indexLabel&&null!==y[I].indexLabel&&0<y[I].indexLabel.toString().length)&&(Q=!0),!Q&&("undefined"!==typeof y[I].label&&null!==
y[I].label&&0<y[I].label.toString().length)&&(Q=!0),!Q&&"function"===typeof v.indexLabelFormatter||"function"===typeof y[I].indexLabelFormatter)Q=!0;Q=Q||"undefined"!==typeof v.indexLabel&&null!==v.indexLabel&&0<v.indexLabel.toString().length;"inside"!==v.indexLabelPlacement&&Q||(E=(A.width-0.75*G)/2);var I=A.x1+E,L=A.x2-E,O=A.y1+D,Z=A.y2-D,N=a.targetCanvasCtx||this.plotArea.ctx||this.ctx;if(0!=v.length&&(v.dataPoints&&v.visible)&&0!==y.length){var M,H;a=75*G/100;var S=30*(L-a)/100;"funnel"===v.type?
(M=g(v.options.neckHeight)?0.35*F:v.neckHeight,H=g(v.options.neckWidth)?0.25*a:v.neckWidth,"string"===typeof M&&M.match(/%$/)?(M=parseInt(M),M=M*F/100):M=parseInt(M),"string"===typeof H&&H.match(/%$/)?(H=parseInt(H),H=H*a/100):H=parseInt(H),M>F?M=F:0>=M&&(M=0),H>a?H=a-0.5:0>=H&&(H=0)):"pyramid"===v.type&&(H=M=0,v.reversed=v.reversed?!1:!0);var E=I+a/2,aa=I,Y=I+a,W=v.reversed?Z:O,T=E-H/2,ja=E+H/2,ba=v.reversed?O+M:Z-M,$=v.reversed?O:Z;a=[];var E=[],V=[],G=[],X=O,ea,ia=(ba-W)/(T-aa),ma=-ia,I="area"===
(v.valueRepresents?v.valueRepresents:"height")?c():f();if(-1!==I){if(v.reversed)for(G.push(X),H=I.length-1;0<H;H--)X+=I[H],G.push(X);else for(H=0;H<I.length;H++)X+=I[H],G.push(X);if(v.reversed)for(H=0;H<I.length;H++)G[H]<ba?(a.push(T),E.push(ja),ea=H):(a.push((G[H]-W+ia*aa)/ia),E.push((G[H]-W+ma*Y)/ma));else for(H=0;H<I.length;H++)G[H]<ba?(a.push((G[H]-W+ia*aa)/ia),E.push((G[H]-W+ma*Y)/ma),ea=H):(a.push(T),E.push(ja));for(H=0;H<I.length-1;H++)X=v.reversed?y[y.length-1-H].color?y[y.length-1-H].color:
v._colorSet[(y.length-1-H)%v._colorSet.length]:y[H].color?y[H].color:v._colorSet[H%v._colorSet.length],H===ea?V.push({x1:a[H],y1:G[H],x2:E[H],y2:G[H],x3:ja,y3:ba,x4:E[H+1],y4:G[H+1],x5:a[H+1],y5:G[H+1],x6:T,y6:ba,id:H,height:G[H+1]-G[H],color:X}):V.push({x1:a[H],y1:G[H],x2:E[H],y2:G[H],x3:E[H+1],y3:G[H+1],x4:a[H+1],y4:G[H+1],id:H,height:G[H+1]-G[H],color:X});var la=2,J=[],ra=!1,fa=[],pa=[],I=!1;a=a=0;Da(fa);for(H=0;H<y.length;H++)y[H].exploded&&(I=!0,v.reversed?fa.push(y.length-1-H):fa.push(H));N.clearRect(A.x1,
A.y1,A.width,A.height);N.fillStyle=z.backgroundColor;N.fillRect(A.x1,A.y1,A.width,A.height);if(Q&&v.visible&&(b(),h(),e(),"inside"!==v.indexLabelPlacement)){d();for(H=0;H<y.length;H++)J[H].isDirty||(a=J[H].textBlock.x+J[H].width,a=(L-a)/2,0==H&&(B=a),B>a&&(B=a));for(H=0;H<V.length;H++)V[H].x1+=B,V[H].x2+=B,V[H].x3+=B,V[H].x4+=B,V[H].x5&&(V[H].x5+=B,V[H].x6+=B),J[H].textBlock.x+=B}for(H=0;H<V.length;H++)B=V[H],t(N,B,v.fillOpacity),pa.push(B.y1);r(N);Q&&v.visible&&("inside"===v.indexLabelPlacement||
z.animationEnabled||n(N),z.animationEnabled||w());if(!Q)for(H=0;H<y.length;H++)B=v.dataPointIds[H],a={id:B,objectType:"dataPoint",dataPointIndex:H,dataSeriesIndex:0,funnelSection:V[v.reversed?y.length-1-H:H]},z._eventManager.objectMap[B]=a;!z.animationEnabled&&I?s(z,-1,0):z.animationEnabled&&!z.animatedRender&&s(z,-1,0);this.funnelPyramidClickHandler=function(a){var b=-1;if(!ra&&!z.isAnimating&&(g(a.dataSeries.explodeOnClick)||a.dataSeries.explodeOnClick)&&(b=v.reversed?y.length-1-a.dataPointIndex:
a.dataPointIndex,0<=b)){a=b;if("funnel"===v.type||"pyramid"===v.type)v.reversed?y[y.length-1-a].exploded=y[y.length-1-a].exploded?!1:!0:y[a].exploded=y[a].exploded?!1:!0;s(z,b,500)}};return{source:N,dest:this.plotArea.ctx,animationCallback:function(a,b){x.fadeInAnimation(a,b);1<=a&&(s(z,-1,500),r(z.plotArea.ctx||z.ctx))},easingFunction:x.easing.easeInQuad,animationBase:0}}}}};r.prototype.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||
window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){window.setTimeout(a,1E3/60)}}();r.prototype.cancelRequestAnimFrame=window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||clearTimeout;r.prototype.set=function(a,f,c){c="undefined"===typeof c?!0:c;"options"===a?(this.options=f,c&&this.render()):r.base.set.call(this,a,f,c)};r.prototype.exportChart=
function(a){a="undefined"===typeof a?{}:a;var f=a.format?a.format:"png",c=a.fileName?a.fileName:this.exportFileName;if(a.toDataURL)return this.canvas.toDataURL("image/"+f);cb(this.canvas,f,c)};r.prototype.print=function(){var a=this.exportChart({toDataURL:!0}),f=document.createElement("iframe");f.setAttribute("class","canvasjs-chart-print-frame");O(f,{position:"absolute",width:"100%",border:"0px",margin:"0px 0px 0px 0px",padding:"0px 0px 0px 0px"});f.style.height=this.height+"px";this._canvasJSContainer.appendChild(f);
var c=this,b=f.contentWindow||f.contentDocument.document||f.contentDocument;b.document.open();b.document.write('<!DOCTYPE HTML>\n<html><body><img src="'+a+'"/><body/></html>');b.document.body&&b.document.body.style&&(b.document.body.style.margin="0px 0px 0px 0px",b.document.body.style.padding="0px 0px 0px 0px");b.document.close();setTimeout(function(){b.focus();b.print();setTimeout(function(){c._canvasJSContainer.removeChild(f)},1E3)},500)};r.prototype.getPercentAndTotal=function(a,f){var c=null,
b=null,e=c=null;if(0<=a.type.indexOf("stacked"))b=0,c=f.x.getTime?f.x.getTime():f.x,c in a.plotUnit.yTotals&&(b=a.plotUnit.yTotals[c],c=a.plotUnit.yAbsTotals[c],e=isNaN(f.y)?0:0===c?0:100*(f.y/c));else if("pie"===a.type||"doughnut"===a.type||"funnel"===a.type||"pyramid"===a.type){for(c=b=0;c<a.dataPoints.length;c++)isNaN(a.dataPoints[c].y)||(b+=a.dataPoints[c].y);e=isNaN(f.y)?0:100*(f.y/b)}return{percent:e,total:b}};r.prototype.replaceKeywordsWithValue=function(a,f,c,b,e){var h=this;e="undefined"===
typeof e?0:e;if((0<=c.type.indexOf("stacked")||"pie"===c.type||"doughnut"===c.type||"funnel"===c.type||"pyramid"===c.type)&&(0<=a.indexOf("#percent")||0<=a.indexOf("#total"))){var g="#percent",d="#total",k=this.getPercentAndTotal(c,f),d=isNaN(k.total)?d:k.total,g=isNaN(k.percent)?g:k.percent;do{k="";if(c.percentFormatString)k=c.percentFormatString;else{var k="#,##0.",m=Math.max(Math.ceil(Math.log(1/Math.abs(g))/Math.LN10),2);if(isNaN(m)||!isFinite(m))m=2;for(var n=0;n<m;n++)k+="#";c.percentFormatString=
k}a=a.replace("#percent",$(g,k,h._cultureInfo));a=a.replace("#total",$(d,c.yValueFormatString?c.yValueFormatString:"#,##0.########",h._cultureInfo))}while(0<=a.indexOf("#percent")||0<=a.indexOf("#total"))}return a.replace(/\{.*?\}|"[^"]*"|'[^']*'/g,function(a){if('"'===a[0]&&'"'===a[a.length-1]||"'"===a[0]&&"'"===a[a.length-1])return a.slice(1,a.length-1);a=Oa(a.slice(1,a.length-1));a=a.replace("#index",e);var g=null;try{var l=a.match(/(.*?)\s*\[\s*(.*?)\s*\]/);l&&0<l.length&&(g=Oa(l[2]),a=Oa(l[1]))}catch(d){}l=
null;if("color"===a)return"waterfall"===c.type?f.color?f.color:0<f.y?c.risingColor:c.fallingColor:"error"===c.type?c.color?c.color:c._colorSet[g%c._colorSet.length]:f.color?f.color:c.color?c.color:c._colorSet[b%c._colorSet.length];if(f.hasOwnProperty(a))l=f;else if(c.hasOwnProperty(a))l=c;else return"";l=l[a];null!==g&&(l=l[g]);if("x"===a)if(c.axisX&&"dateTime"===c.axisX.valueType||"dateTime"===c.xValueType||f.x&&f.x.getTime){if(!c.axisX.logarithmic)return fa(l,f.xValueFormatString?f.xValueFormatString:
c.xValueFormatString?c.xValueFormatString:c.xValueFormatString=h.axisX&&h.axisX.autoValueFormatString?h.axisX.autoValueFormatString:"DD MMM YY",h._cultureInfo)}else return $(l,f.xValueFormatString?f.xValueFormatString:c.xValueFormatString?c.xValueFormatString:c.xValueFormatString="#,##0.########",h._cultureInfo);else return"y"===a?$(l,f.yValueFormatString?f.yValueFormatString:c.yValueFormatString?c.yValueFormatString:c.yValueFormatString="#,##0.########",h._cultureInfo):"z"===a?$(l,f.zValueFormatString?
f.zValueFormatString:c.zValueFormatString?c.zValueFormatString:c.zValueFormatString="#,##0.########",h._cultureInfo):l})};ia(F,aa);F.prototype.setLayout=function(){var a=this.dockInsidePlotArea?this.chart.plotArea:this.chart,f=a.layoutManager.getFreeSpace(),c=null,b=0,e=0,h=0,d=0,k=this.markerMargin=this.chart.options.legend&&!g(this.chart.options.legend.markerMargin)?this.chart.options.legend.markerMargin:0.3*this.fontSize;this.height=0;var t=[],m=[];if("top"===this.verticalAlign||"bottom"===this.verticalAlign)this.orientation=
"horizontal",c=this.verticalAlign,h=this.maxWidth=null!==this.maxWidth?this.maxWidth:f.width,d=this.maxHeight=null!==this.maxHeight?this.maxHeight:0.5*f.height;else if("center"===this.verticalAlign){this.orientation="vertical";if("left"===this.horizontalAlign||"center"===this.horizontalAlign||"right"===this.horizontalAlign)c=this.horizontalAlign;h=this.maxWidth=null!==this.maxWidth?this.maxWidth:0.5*f.width;d=this.maxHeight=null!==this.maxHeight?this.maxHeight:f.height}this.errorMarkerColor=[];for(var n=
0;n<this.dataSeries.length;n++){var p=this.dataSeries[n];if(p.dataPoints&&p.dataPoints.length)if("pie"!==p.type&&"doughnut"!==p.type&&"funnel"!==p.type&&"pyramid"!==p.type){var q=p.legendMarkerType=p.legendMarkerType?p.legendMarkerType:"line"!==p.type&&"stepLine"!==p.type&&"spline"!==p.type&&"scatter"!==p.type&&"bubble"!==p.type||!p.markerType?"error"===p.type&&p._linkedSeries?p._linkedSeries.legendMarkerType?p._linkedSeries.legendMarkerType:I.getDefaultLegendMarker(p._linkedSeries.type):I.getDefaultLegendMarker(p.type):
p.markerType,l=p.legendText?p.legendText:this.itemTextFormatter?this.itemTextFormatter({chart:this.chart,legend:this.options,dataSeries:p,dataPoint:null}):p.name,w=p.legendMarkerColor=p.legendMarkerColor?p.legendMarkerColor:p.markerColor?p.markerColor:"error"===p.type?g(p.whiskerColor)?p._colorSet[0]:p.whiskerColor:p._colorSet[0],x=p.markerSize||"line"!==p.type&&"stepLine"!==p.type&&"spline"!==p.type?0.75*this.lineHeight:0,s=p.legendMarkerBorderColor?p.legendMarkerBorderColor:p.markerBorderColor,
v=p.legendMarkerBorderThickness?p.legendMarkerBorderThickness:p.markerBorderThickness?Math.max(1,Math.round(0.2*x)):0;"error"===p.type&&this.errorMarkerColor.push(w);l=this.chart.replaceKeywordsWithValue(l,p.dataPoints[0],p,n);q={markerType:q,markerColor:w,text:l,textBlock:null,chartType:p.type,markerSize:x,lineColor:p._colorSet[0],dataSeriesIndex:p.index,dataPointIndex:null,markerBorderColor:s,markerBorderThickness:v};t.push(q)}else for(var r=0;r<p.dataPoints.length;r++){var u=p.dataPoints[r],q=
u.legendMarkerType?u.legendMarkerType:p.legendMarkerType?p.legendMarkerType:I.getDefaultLegendMarker(p.type),l=u.legendText?u.legendText:p.legendText?p.legendText:this.itemTextFormatter?this.itemTextFormatter({chart:this.chart,legend:this.options,dataSeries:p,dataPoint:u}):u.name?u.name:"DataPoint: "+(r+1),w=u.legendMarkerColor?u.legendMarkerColor:p.legendMarkerColor?p.legendMarkerColor:u.color?u.color:p.color?p.color:p._colorSet[r%p._colorSet.length],x=0.75*this.lineHeight,s=u.legendMarkerBorderColor?
u.legendMarkerBorderColor:p.legendMarkerBorderColor?p.legendMarkerBorderColor:u.markerBorderColor?u.markerBorderColor:p.markerBorderColor,v=u.legendMarkerBorderThickness?u.legendMarkerBorderThickness:p.legendMarkerBorderThickness?p.legendMarkerBorderThickness:u.markerBorderThickness||p.markerBorderThickness?Math.max(1,Math.round(0.2*x)):0,l=this.chart.replaceKeywordsWithValue(l,u,p,r),q={markerType:q,markerColor:w,text:l,textBlock:null,chartType:p.type,markerSize:x,dataSeriesIndex:n,dataPointIndex:r,
markerBorderColor:s,markerBorderThickness:v};(u.showInLegend||p.showInLegend&&!1!==u.showInLegend)&&t.push(q)}}!0===this.reversed&&t.reverse();if(0<t.length){p=null;w=l=u=r=0;u=null!==this.itemWidth?null!==this.itemMaxWidth?Math.min(this.itemWidth,this.itemMaxWidth,h):this.itemMaxWidth=Math.min(this.itemWidth,h):null!==this.itemMaxWidth?Math.min(this.itemMaxWidth,h):this.itemMaxWidth=h;x=0===x?0.75*this.lineHeight:x;u-=x+k;for(n=0;n<t.length;n++){q=t[n];s=u;if("line"===q.chartType||"spline"===q.chartType||
"stepLine"===q.chartType)s-=2*0.1*this.lineHeight;if(!(0>=d||"undefined"===typeof d||0>=s||"undefined"===typeof s)){if("horizontal"===this.orientation){q.textBlock=new oa(this.ctx,{x:0,y:0,maxWidth:s,maxHeight:this.itemWrap?d:this.lineHeight,angle:0,text:q.text,horizontalAlign:"left",fontSize:this.fontSize,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"middle"});q.textBlock.measureText();null!==this.itemWidth&&(q.textBlock.width=
this.itemWidth-(x+k+("line"===q.chartType||"spline"===q.chartType||"stepLine"===q.chartType?2*0.1*this.lineHeight:0)));if(!p||p.width+Math.round(q.textBlock.width+x+k+(0===p.width?0:this.horizontalSpacing)+("line"===q.chartType||"spline"===q.chartType||"stepLine"===q.chartType?2*0.1*this.lineHeight:0))>h)p={items:[],width:0},m.push(p),this.height+=l,l=0;l=Math.max(l,q.textBlock.height)}else q.textBlock=new oa(this.ctx,{x:0,y:0,maxWidth:u,maxHeight:!0===this.itemWrap?d:1.5*this.fontSize,angle:0,text:q.text,
horizontalAlign:"left",fontSize:this.fontSize,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"middle"}),q.textBlock.measureText(),null!==this.itemWidth&&(q.textBlock.width=this.itemWidth-(x+k+("line"===q.chartType||"spline"===q.chartType||"stepLine"===q.chartType?2*0.1*this.lineHeight:0))),this.height<d-this.lineHeight?(p={items:[],width:0},m.push(p)):(p=m[r],r=(r+1)%m.length),this.height+=q.textBlock.height;q.textBlock.x=p.width;
q.textBlock.y=0;p.width+=Math.round(q.textBlock.width+x+k+(0===p.width?0:this.horizontalSpacing)+("line"===q.chartType||"spline"===q.chartType||"stepLine"===q.chartType?2*0.1*this.lineHeight:0));p.items.push(q);this.width=Math.max(p.width,this.width);w=q.textBlock.width+(x+k+("line"===q.chartType||"spline"===q.chartType||"stepLine"===q.chartType?2*0.1*this.lineHeight:0))}}this.itemWidth=w;this.height=!1===this.itemWrap?m.length*this.lineHeight:this.height+l;this.height=Math.min(d,this.height);this.width=
Math.min(h,this.width)}"top"===this.verticalAlign?(e="left"===this.horizontalAlign?f.x1:"right"===this.horizontalAlign?f.x2-this.width:f.x1+f.width/2-this.width/2,b=f.y1):"center"===this.verticalAlign?(e="left"===this.horizontalAlign?f.x1:"right"===this.horizontalAlign?f.x2-this.width:f.x1+f.width/2-this.width/2,b=f.y1+f.height/2-this.height/2):"bottom"===this.verticalAlign&&(e="left"===this.horizontalAlign?f.x1:"right"===this.horizontalAlign?f.x2-this.width:f.x1+f.width/2-this.width/2,b=f.y2-this.height);
this.items=t;for(n=0;n<this.items.length;n++)q=t[n],q.id=++this.chart._eventManager.lastObjectId,this.chart._eventManager.objectMap[q.id]={id:q.id,objectType:"legendItem",legendItemIndex:n,dataSeriesIndex:q.dataSeriesIndex,dataPointIndex:q.dataPointIndex};this.markerSize=x;this.rows=m;0<t.length&&a.layoutManager.registerSpace(c,{width:this.width+2+2,height:this.height+5+5});this.bounds={x1:e,y1:b,x2:e+this.width,y2:b+this.height}};F.prototype.render=function(){var a=this.bounds.x1,f=this.bounds.y1,
c=this.markerMargin,b=this.maxWidth,e=this.maxHeight,h=this.markerSize,g=this.rows;(0<this.borderThickness&&this.borderColor||this.backgroundColor)&&this.ctx.roundRect(a,f,this.width,this.height,this.cornerRadius,this.borderThickness,this.backgroundColor,this.borderColor);for(var d=0,k=0;k<g.length;k++){for(var m=g[k],n=0,p=0;p<m.items.length;p++){var q=m.items[p],l=q.textBlock.x+a+(0===p?0.2*h:this.horizontalSpacing),t=f+d,x=l;this.chart.data[q.dataSeriesIndex].visible||(this.ctx.globalAlpha=0.5);
this.ctx.save();this.ctx.beginPath();this.ctx.rect(a,f,b,Math.max(e-e%this.lineHeight,0));this.ctx.clip();if("line"===q.chartType||"stepLine"===q.chartType||"spline"===q.chartType)this.ctx.strokeStyle=q.lineColor,this.ctx.lineWidth=Math.ceil(this.lineHeight/8),this.ctx.beginPath(),this.ctx.moveTo(l-0.1*this.lineHeight,t+this.lineHeight/2),this.ctx.lineTo(l+0.85*this.lineHeight,t+this.lineHeight/2),this.ctx.stroke(),x-=0.1*this.lineHeight;if("error"===q.chartType){this.ctx.strokeStyle=this.errorMarkerColor[0];
this.ctx.lineWidth=h/8;this.ctx.beginPath();var u=l-0.08*this.lineHeight+0.1*this.lineHeight,v=t+0.15*this.lineHeight,r=0.7*this.lineHeight,z=r+0.02*this.lineHeight;this.ctx.moveTo(u,v);this.ctx.lineTo(u+r,v);this.ctx.stroke();this.ctx.beginPath();this.ctx.moveTo(u+r/2,v);this.ctx.lineTo(u+r/2,v+z);this.ctx.stroke();this.ctx.beginPath();this.ctx.moveTo(u,v+z);this.ctx.lineTo(u+r,v+z);this.ctx.stroke();this.errorMarkerColor.shift()}s.drawMarker(l+h/2,t+this.lineHeight/2,this.ctx,q.markerType,"error"===
q.chartType||"line"===q.chartType||"spline"===q.chartType?q.markerSize/2:q.markerSize,q.markerColor,q.markerBorderColor,q.markerBorderThickness);q.textBlock.x=l+c+h;if("line"===q.chartType||"stepLine"===q.chartType||"spline"===q.chartType)q.textBlock.x+=0.1*this.lineHeight;q.textBlock.y=Math.round(t+this.lineHeight/2);q.textBlock.render(!0);this.ctx.restore();n=0<p?Math.max(n,q.textBlock.height):q.textBlock.height;this.chart.data[q.dataSeriesIndex].visible||(this.ctx.globalAlpha=1);l=S(q.id);this.ghostCtx.fillStyle=
l;this.ghostCtx.beginPath();this.ghostCtx.fillRect(x,q.textBlock.y-this.lineHeight/2,q.textBlock.x+q.textBlock.width-x,q.textBlock.height);q.x1=this.chart._eventManager.objectMap[q.id].x1=x;q.y1=this.chart._eventManager.objectMap[q.id].y1=q.textBlock.y-this.lineHeight/2;q.x2=this.chart._eventManager.objectMap[q.id].x2=q.textBlock.x+q.textBlock.width;q.y2=this.chart._eventManager.objectMap[q.id].y2=q.textBlock.y+q.textBlock.height-this.lineHeight/2}d+=n}};ia(I,aa);I.prototype.getDefaultAxisPlacement=
function(){var a=this.type;if("column"===a||"line"===a||"stepLine"===a||"spline"===a||"area"===a||"stepArea"===a||"splineArea"===a||"stackedColumn"===a||"stackedLine"===a||"bubble"===a||"scatter"===a||"stackedArea"===a||"stackedColumn100"===a||"stackedLine100"===a||"stackedArea100"===a||"candlestick"===a||"ohlc"===a||"rangeColumn"===a||"rangeArea"===a||"rangeSplineArea"===a||"boxAndWhisker"===a||"waterfall"===a)return"normal";if("bar"===a||"stackedBar"===a||"stackedBar100"===a||"rangeBar"===a)return"xySwapped";
if("pie"===a||"doughnut"===a||"funnel"===a||"pyramid"===a)return"none";"error"!==a&&window.console.log("Unknown Chart Type: "+a);return null};I.getDefaultLegendMarker=function(a){if("column"===a||"stackedColumn"===a||"stackedLine"===a||"bar"===a||"stackedBar"===a||"stackedBar100"===a||"bubble"===a||"scatter"===a||"stackedColumn100"===a||"stackedLine100"===a||"stepArea"===a||"candlestick"===a||"ohlc"===a||"rangeColumn"===a||"rangeBar"===a||"rangeArea"===a||"rangeSplineArea"===a||"boxAndWhisker"===
a||"waterfall"===a)return"square";if("line"===a||"stepLine"===a||"spline"===a||"pie"===a||"doughnut"===a)return"circle";if("area"===a||"splineArea"===a||"stackedArea"===a||"stackedArea100"===a||"funnel"===a||"pyramid"===a)return"triangle";if("error"===a)return"none";window.console.log("Unknown Chart Type: "+a);return null};I.prototype.getDataPointAtX=function(a,f){if(!this.dataPoints||0===this.dataPoints.length)return null;var c={dataPoint:null,distance:Infinity,index:NaN},b=null,e=0,h=0,g=1,d=Infinity,
k=0,m=0,n=0;"none"!==this.chart.plotInfo.axisPlacement&&(this.axisX.logarithmic?(n=Math.log(this.dataPoints[this.dataPoints.length-1].x/this.dataPoints[0].x),n=1<n?Math.min(Math.max((this.dataPoints.length-1)/n*Math.log(a/this.dataPoints[0].x)>>0,0),this.dataPoints.length):0):(n=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x,n=0<n?Math.min(Math.max((this.dataPoints.length-1)/n*(a-this.dataPoints[0].x)>>0,0),this.dataPoints.length):0));for(;;){h=0<g?n+e:n-e;if(0<=h&&h<this.dataPoints.length){var b=
this.dataPoints[h],p=this.axisX.logarithmic?b.x>a?b.x/a:a/b.x:Math.abs(b.x-a);p<c.distance&&(c.dataPoint=b,c.distance=p,c.index=h);b=p;b<=d?d=b:0<g?k++:m++;if(1E3<k&&1E3<m)break}else if(0>n-e&&n+e>=this.dataPoints.length)break;-1===g?(e++,g=1):g=-1}return f||(c.dataPoint.x.getTime?c.dataPoint.x.getTime():c.dataPoint.x)!==(a.getTime?a.getTime():a)?f&&null!==c.dataPoint?c:null:c};I.prototype.getDataPointAtXY=function(a,f,c){if(!this.dataPoints||0===this.dataPoints.length||a<this.chart.plotArea.x1||
a>this.chart.plotArea.x2||f<this.chart.plotArea.y1||f>this.chart.plotArea.y2)return null;c=c||!1;var b=[],e=0,h=0,g=1,d=!1,k=Infinity,m=0,n=0,p=0;if("none"!==this.chart.plotInfo.axisPlacement)if(p=(this.chart.axisX[0]?this.chart.axisX[0]:this.chart.axisX2[0]).getXValueAt({x:a,y:f}),this.axisX.logarithmic)var q=Math.log(this.dataPoints[this.dataPoints.length-1].x/this.dataPoints[0].x),p=1<q?Math.min(Math.max((this.dataPoints.length-1)/q*Math.log(p/this.dataPoints[0].x)>>0,0),this.dataPoints.length):
0;else q=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x,p=0<q?Math.min(Math.max((this.dataPoints.length-1)/q*(p-this.dataPoints[0].x)>>0,0),this.dataPoints.length):0;for(;;){h=0<g?p+e:p-e;if(0<=h&&h<this.dataPoints.length){var q=this.chart._eventManager.objectMap[this.dataPointIds[h]],l=this.dataPoints[h],t=null;if(q){switch(this.type){case "column":case "stackedColumn":case "stackedColumn100":case "bar":case "stackedBar":case "stackedBar100":case "rangeColumn":case "rangeBar":case "waterfall":case "error":a>=
q.x1&&(a<=q.x2&&f>=q.y1&&f<=q.y2)&&(b.push({dataPoint:l,dataPointIndex:h,dataSeries:this,distance:Math.min(Math.abs(q.x1-a),Math.abs(q.x2-a),Math.abs(q.y1-f),Math.abs(q.y2-f))}),d=!0);break;case "line":case "stepLine":case "spline":case "area":case "stepArea":case "stackedArea":case "stackedArea100":case "splineArea":case "scatter":var x=sa("markerSize",l,this)||4,s=c?20:x,t=Math.sqrt(Math.pow(q.x1-a,2)+Math.pow(q.y1-f,2));t<=s&&b.push({dataPoint:l,dataPointIndex:h,dataSeries:this,distance:t});q=
Math.abs(q.x1-a);q<=k?k=q:0<g?m++:n++;t<=x/2&&(d=!0);break;case "rangeArea":case "rangeSplineArea":x=sa("markerSize",l,this)||4;s=c?20:x;t=Math.min(Math.sqrt(Math.pow(q.x1-a,2)+Math.pow(q.y1-f,2)),Math.sqrt(Math.pow(q.x1-a,2)+Math.pow(q.y2-f,2)));t<=s&&b.push({dataPoint:l,dataPointIndex:h,dataSeries:this,distance:t});q=Math.abs(q.x1-a);q<=k?k=q:0<g?m++:n++;t<=x/2&&(d=!0);break;case "bubble":x=q.size;t=Math.sqrt(Math.pow(q.x1-a,2)+Math.pow(q.y1-f,2));t<=x/2&&(b.push({dataPoint:l,dataPointIndex:h,dataSeries:this,
distance:t}),d=!0);break;case "pie":case "doughnut":x=q.center;s="doughnut"===this.type?q.percentInnerRadius*q.radius:0;t=Math.sqrt(Math.pow(x.x-a,2)+Math.pow(x.y-f,2));t<q.radius&&t>s&&(t=Math.atan2(f-x.y,a-x.x),0>t&&(t+=2*Math.PI),t=Number(((180*(t/Math.PI)%360+360)%360).toFixed(12)),x=Number(((180*(q.startAngle/Math.PI)%360+360)%360).toFixed(12)),s=Number(((180*(q.endAngle/Math.PI)%360+360)%360).toFixed(12)),0===s&&1<q.endAngle&&(s=360),x>=s&&0!==l.y&&(s+=360,t<x&&(t+=360)),t>x&&t<s&&(b.push({dataPoint:l,
dataPointIndex:h,dataSeries:this,distance:0}),d=!0));break;case "funnel":case "pyramid":t=q.funnelSection;f>t.y1&&f<t.y4&&(t.y6?f>t.y6?(h=t.x6+(t.x5-t.x6)/(t.y5-t.y6)*(f-t.y6),t=t.x3+(t.x4-t.x3)/(t.y4-t.y3)*(f-t.y3)):(h=t.x1+(t.x6-t.x1)/(t.y6-t.y1)*(f-t.y1),t=t.x2+(t.x3-t.x2)/(t.y3-t.y2)*(f-t.y2)):(h=t.x1+(t.x4-t.x1)/(t.y4-t.y1)*(f-t.y1),t=t.x2+(t.x3-t.x2)/(t.y3-t.y2)*(f-t.y2)),a>h&&a<t&&(b.push({dataPoint:l,dataPointIndex:q.dataPointIndex,dataSeries:this,distance:0}),d=!0));break;case "boxAndWhisker":if(a>=
q.x1-q.borderThickness/2&&a<=q.x2+q.borderThickness/2&&f>=q.y4-q.borderThickness/2&&f<=q.y1+q.borderThickness/2||Math.abs(q.x2-a+q.x1-a)<q.borderThickness&&f>=q.y1&&f<=q.y4)b.push({dataPoint:l,dataPointIndex:h,dataSeries:this,distance:Math.min(Math.abs(q.x1-a),Math.abs(q.x2-a),Math.abs(q.y2-f),Math.abs(q.y3-f))}),d=!0;break;case "candlestick":if(a>=q.x1-q.borderThickness/2&&a<=q.x2+q.borderThickness/2&&f>=q.y2-q.borderThickness/2&&f<=q.y3+q.borderThickness/2||Math.abs(q.x2-a+q.x1-a)<q.borderThickness&&
f>=q.y1&&f<=q.y4)b.push({dataPoint:l,dataPointIndex:h,dataSeries:this,distance:Math.min(Math.abs(q.x1-a),Math.abs(q.x2-a),Math.abs(q.y2-f),Math.abs(q.y3-f))}),d=!0;break;case "ohlc":if(Math.abs(q.x2-a+q.x1-a)<q.borderThickness&&f>=q.y2&&f<=q.y3||a>=q.x1&&a<=(q.x2+q.x1)/2&&f>=q.y1-q.borderThickness/2&&f<=q.y1+q.borderThickness/2||a>=(q.x1+q.x2)/2&&a<=q.x2&&f>=q.y4-q.borderThickness/2&&f<=q.y4+q.borderThickness/2)b.push({dataPoint:l,dataPointIndex:h,dataSeries:this,distance:Math.min(Math.abs(q.x1-a),
Math.abs(q.x2-a),Math.abs(q.y2-f),Math.abs(q.y3-f))}),d=!0}if(d||1E3<m&&1E3<n)break}}else if(0>p-e&&p+e>=this.dataPoints.length)break;-1===g?(e++,g=1):g=-1}a=null;for(f=0;f<b.length;f++)a?b[f].distance<=a.distance&&(a=b[f]):a=b[f];return a};I.prototype.getMarkerProperties=function(a,f,c,b){var e=this.dataPoints;return{x:f,y:c,ctx:b,type:e[a].markerType?e[a].markerType:this.markerType,size:e[a].markerSize?e[a].markerSize:this.markerSize,color:e[a].markerColor?e[a].markerColor:this.markerColor?this.markerColor:
e[a].color?e[a].color:this.color?this.color:this._colorSet[a%this._colorSet.length],borderColor:e[a].markerBorderColor?e[a].markerBorderColor:this.markerBorderColor?this.markerBorderColor:null,borderThickness:e[a].markerBorderThickness?e[a].markerBorderThickness:this.markerBorderThickness?this.markerBorderThickness:null}};ia(z,aa);z.prototype.createExtraLabelsForLog=function(a){a=(a||0)+1;if(!(5<a)){var f=this.logLabelValues[0]||this.intervalStartPosition;if(Math.log(this.range)/Math.log(f/this.viewportMinimum)<
this.noTicks-1){for(var c=z.getNiceNumber((f-this.viewportMinimum)/Math.min(Math.max(2,this.noTicks-this.logLabelValues.length),3),!0),b=Math.ceil(this.viewportMinimum/c)*c;b<f;b+=c)b<this.viewportMinimum||this.logLabelValues.push(b);this.logLabelValues.sort(Wa);this.createExtraLabelsForLog(a)}}};z.prototype.createLabels=function(){var a,f,c=0,b=0,e,h=0,d=0,b=0,b=this.interval,k=0,t,m=0.6*this.chart.height,n;a=!1;var p=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[],q=p.length?g(this.scaleBreaks.firstBreakIndex)?
0:this.scaleBreaks.firstBreakIndex:0;if("axisX"!==this.type||"dateTime"!==this.valueType||this.logarithmic){e=this.viewportMaximum;if(this.labels){a=Math.ceil(b);for(var b=Math.ceil(this.intervalStartPosition),l=!1,c=b;c<this.viewportMaximum;c+=a)if(this.labels[c])l=!0;else{l=!1;break}l&&(this.interval=a,this.intervalStartPosition=b)}if(this.logarithmic&&!this.equidistantInterval)for(this.logLabelValues||(this.logLabelValues=[],this.createExtraLabelsForLog()),b=0,l=q;b<this.logLabelValues.length;b++)if(c=
this.logLabelValues[b],c<this.viewportMinimum)b++;else{for(;l<p.length&&c>p[l].endValue;l++);a=l<p.length&&c>=p[l].startValue&&c<=p[l].endValue;n=c;a||(a=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:n,label:this.labels[n]?this.labels[n]:null}):"axisX"===this.type&&this.labels[n]?this.labels[n]:$(n,this.valueFormatString,this.chart._cultureInfo),a=new oa(this.ctx,{x:0,y:0,maxWidth:h,maxHeight:d,angle:this.labelAngle,text:this.prefix+a+this.suffix,backgroundColor:this.labelBackgroundColor,
borderColor:this.labelBorderColor,cornerRadius:this.labelCornerRadius,textAlign:this.labelTextAlign,fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle",borderThickness:0}),this._labels.push({position:n,textBlock:a,effectiveHeight:null}))}l=q;for(c=this.intervalStartPosition;c<=e;c=parseFloat(1E-12>this.interval?this.logarithmic&&this.equidistantInterval?c*Math.pow(this.logarithmBase,
this.interval):c+this.interval:(this.logarithmic&&this.equidistantInterval?c*Math.pow(this.logarithmBase,this.interval):c+this.interval).toFixed(12))){for(;l<p.length&&c>p[l].endValue;l++);a=l<p.length&&c>=p[l].startValue&&c<=p[l].endValue;n=c;a||(a=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:n,label:this.labels[n]?this.labels[n]:null}):"axisX"===this.type&&this.labels[n]?this.labels[n]:$(n,this.valueFormatString,this.chart._cultureInfo),a=new oa(this.ctx,{x:0,
y:0,maxWidth:h,maxHeight:d,angle:this.labelAngle,text:this.prefix+a+this.suffix,textAlign:this.labelTextAlign,backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,borderThickness:this.labelBorderThickness,cornerRadius:this.labelCornerRadius,fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle"}),this._labels.push({position:n,textBlock:a,effectiveHeight:null}))}}else for(this.intervalStartPosition=
this.getLabelStartPoint(new Date(this.viewportMinimum),this.intervalType,this.interval),e=bb(new Date(this.viewportMaximum),this.interval,this.intervalType),l=q,c=this.intervalStartPosition;c<e;bb(c,b,this.intervalType)){for(a=c.getTime();l<p.length&&a>p[l].endValue;l++);n=a;a=l<p.length&&a>=p[l].startValue&&a<=p[l].endValue;a||(a=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:new Date(n),label:this.labels[n]?this.labels[n]:null}):"axisX"===this.type&&this.labels[n]?
this.labels[n]:fa(n,this.valueFormatString,this.chart._cultureInfo),a=new oa(this.ctx,{x:0,y:0,maxWidth:h,backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,borderThickness:this.labelBorderThickness,cornerRadius:this.labelCornerRadius,maxHeight:d,angle:this.labelAngle,text:this.prefix+a+this.suffix,textAlign:this.labelTextAlign,fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,
textBaseline:"middle"}),this._labels.push({position:n,textBlock:a,effectiveHeight:null,breaksLabelType:void 0}))}if("bottom"===this._position||"top"===this._position)k=this.logarithmic&&!this.equidistantInterval&&2<=this._labels.length?this.lineCoordinates.width*Math.log(Math.min(this._labels[this._labels.length-1].position/this._labels[this._labels.length-2].position,this._labels[1].position/this._labels[0].position))/Math.log(this.range):this.lineCoordinates.width/(this.logarithmic&&this.equidistantInterval?
Math.log(this.range)/Math.log(this.logarithmBase):Math.abs(this.range))*W[this.intervalType+"Duration"]*this.interval,h="undefined"===typeof this.options.labelMaxWidth?0.5*this.chart.width>>0:this.options.labelMaxWidth,this.chart.panEnabled||(d="undefined"===typeof this.options.labelWrap||this.labelWrap?0.8*this.chart.height>>0:1.5*this.labelFontSize);else if("left"===this._position||"right"===this._position)k=this.logarithmic&&!this.equidistantInterval&&2<=this._labels.length?this.lineCoordinates.height*
Math.log(Math.min(this._labels[this._labels.length-1].position/this._labels[this._labels.length-2].position,this._labels[1].position/this._labels[0].position))/Math.log(this.range):this.lineCoordinates.height/(this.logarithmic&&this.equidistantInterval?Math.log(this.range)/Math.log(this.logarithmBase):Math.abs(this.range))*W[this.intervalType+"Duration"]*this.interval,this.chart.panEnabled||(h="undefined"===typeof this.options.labelMaxWidth?0.3*this.chart.width>>0:this.options.labelMaxWidth),d="undefined"===
typeof this.options.labelWrap||this.labelWrap?0.3*this.chart.height>>0:1.5*this.labelFontSize;for(b=0;b<this._labels.length;b++){a=this._labels[b].textBlock;a.maxWidth=h;a.maxHeight=d;var x=a.measureText();t=x.height}e=[];q=p=0;if(this.labelAutoFit||this.options.labelAutoFit)if(g(this.labelAngle)||(this.labelAngle=(this.labelAngle%360+360)%360,90<this.labelAngle&&270>this.labelAngle?this.labelAngle-=180:270<=this.labelAngle&&360>=this.labelAngle&&(this.labelAngle-=360)),"bottom"===this._position||
"top"===this._position)if(h=0.9*k>>0,q=0,!this.chart.panEnabled&&1<=this._labels.length){this.sessionVariables.labelFontSize=this.labelFontSize;this.sessionVariables.labelMaxWidth=h;this.sessionVariables.labelMaxHeight=d;this.sessionVariables.labelAngle=this.labelAngle;this.sessionVariables.labelWrap=this.labelWrap;for(c=0;c<this._labels.length;c++)if(!this._labels[c].breaksLabelType){a=this._labels[c].textBlock;for(var s,l=a.text.split(" "),b=0;b<l.length;b++)n=l[b],this.ctx.font=a.fontStyle+" "+
a.fontWeight+" "+a.fontSize+"px "+a.fontFamily,n=this.ctx.measureText(n),n.width>q&&(s=c,q=n.width)}c=0;for(c=this.intervalStartPosition<this.viewportMinimum?1:0;c<this._labels.length;c++)if(!this._labels[c].breaksLabelType){a=this._labels[c].textBlock;x=a.measureText();for(l=c+1;l<this._labels.length;l++)if(!this._labels[l].breaksLabelType){f=this._labels[l].textBlock;f=f.measureText();break}e.push(a.height);this.sessionVariables.labelMaxHeight=Math.max.apply(Math,e);Math.cos(Math.PI/180*Math.abs(this.labelAngle));
Math.sin(Math.PI/180*Math.abs(this.labelAngle));b=h*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+(d-a.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle));if(g(this.options.labelAngle)&&isNaN(this.options.labelAngle)&&0!==this.options.labelAngle)if(this.sessionVariables.labelMaxHeight=0===this.labelAngle?d:Math.min((b-h*Math.cos(Math.PI/180*Math.abs(this.labelAngle)))/Math.sin(Math.PI/180*Math.abs(this.labelAngle)),b),n=(m-(t+a.fontSize/2)*Math.cos(Math.PI/180*Math.abs(-25)))/Math.sin(Math.PI/
180*Math.abs(-25)),!g(this.options.labelWrap))this.labelWrap?g(this.options.labelMaxWidth)?(this.sessionVariables.labelMaxWidth=Math.min(Math.max(h,q),n),this.sessionVariables.labelWrap=this.labelWrap,f&&x.width+f.width>>0>2*h&&(this.sessionVariables.labelAngle=-25)):(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelAngle=this.sessionVariables.labelMaxWidth>h?-25:this.sessionVariables.labelAngle):g(this.options.labelMaxWidth)?
(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxHeight=d,this.sessionVariables.labelMaxWidth=h,f&&x.width+f.width>>0>2*h&&(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=n)):(this.sessionVariables.labelAngle=this.sessionVariables.labelMaxWidth>h?-25:this.sessionVariables.labelAngle,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelMaxHeight=d,this.sessionVariables.labelWrap=this.labelWrap);else{if(g(this.options.labelWrap))if(!g(this.options.labelMaxWidth))this.options.labelMaxWidth<
h?(this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelMaxHeight=b):(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelMaxHeight=d);else if(!g(f))if(b=x.width+f.width>>0,l=this.labelFontSize,q<h)b-2*h>p&&(p=b-2*h,b>=2*h&&b<2.2*h?(this.sessionVariables.labelMaxWidth=h,g(this.options.labelFontSize)&&12<l&&(l=Math.floor(12/13*l),a.measureText()),this.sessionVariables.labelFontSize=g(this.options.labelFontSize)?
l:this.options.labelFontSize,this.sessionVariables.labelAngle=this.labelAngle):b>=2.2*h&&b<2.8*h?(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=n,this.sessionVariables.labelFontSize=l):b>=2.8*h&&b<3.2*h?(this.sessionVariables.labelMaxWidth=Math.max(h,q),this.sessionVariables.labelWrap=!0,g(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelFontSize=g(this.options.labelFontSize)?
l:this.options.labelFontSize,this.sessionVariables.labelAngle=this.labelAngle):b>=3.2*h&&b<3.6*h?(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelMaxWidth=n,this.sessionVariables.labelFontSize=this.labelFontSize):b>3.6*h&&b<5*h?(g(this.options.labelFontSize)&&12<l&&(l=Math.floor(12/13*l),a.measureText()),this.sessionVariables.labelFontSize=g(this.options.labelFontSize)?l:this.options.labelFontSize,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelAngle=
-25,this.sessionVariables.labelMaxWidth=n):b>5*h&&(this.sessionVariables.labelWrap=!0,this.sessionVariables.labelMaxWidth=h,this.sessionVariables.labelFontSize=l,this.sessionVariables.labelMaxHeight=d,this.sessionVariables.labelAngle=this.labelAngle));else if(s===c&&(0===s&&q+this._labels[s+1].textBlock.measureText().width-2*h>p||s===this._labels.length-1&&q+this._labels[s-1].textBlock.measureText().width-2*h>p||0<s&&s<this._labels.length-1&&q+this._labels[s+1].textBlock.measureText().width-2*h>p&&
q+this._labels[s-1].textBlock.measureText().width-2*h>p))p=0===s?q+this._labels[s+1].textBlock.measureText().width-2*h:q+this._labels[s-1].textBlock.measureText().width-2*h,this.sessionVariables.labelFontSize=g(this.options.labelFontSize)?l:this.options.labelFontSize,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=n;else if(0===p)for(this.sessionVariables.labelFontSize=g(this.options.labelFontSize)?l:this.options.labelFontSize,this.sessionVariables.labelWrap=
!0,b=0;b<this._labels.length;b++)a=this._labels[b].textBlock,a.maxWidth=this.sessionVariables.labelMaxWidth=Math.min(Math.max(h,q),n),x=a.measureText(),b<this._labels.length-1&&(l=b+1,f=this._labels[l].textBlock,f.maxWidth=this.sessionVariables.labelMaxWidth=Math.min(Math.max(h,q),n),f=f.measureText(),x.width+f.width>>0>2*h&&(this.sessionVariables.labelAngle=-25))}else(this.sessionVariables.labelAngle=this.labelAngle,this.sessionVariables.labelMaxHeight=0===this.labelAngle?d:Math.min((b-h*Math.cos(Math.PI/
180*Math.abs(this.labelAngle)))/Math.sin(Math.PI/180*Math.abs(this.labelAngle)),b),n=0!=this.labelAngle?(m-(t+a.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle)))/Math.sin(Math.PI/180*Math.abs(this.labelAngle)):h,this.sessionVariables.labelMaxHeight=this.labelWrap?(m-n*Math.sin(Math.PI/180*Math.abs(this.labelAngle)))/Math.cos(Math.PI/180*Math.abs(this.labelAngle)):1.5*this.labelFontSize,g(this.options.labelWrap))?g(this.options.labelWrap)&&(this.labelWrap&&!g(this.options.labelMaxWidth)?
(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:n,this.sessionVariables.labelMaxHeight=d):(this.sessionVariables.labelAngle=this.labelAngle,this.sessionVariables.labelMaxWidth=n,this.sessionVariables.labelMaxHeight=b<0.9*k?0.9*k:b,this.sessionVariables.labelWrap=this.labelWrap)):(this.options.labelWrap?(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?
this.options.labelMaxWidth:n):(g(this.options.labelMaxWidth),this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:n,this.sessionVariables.labelWrap=this.labelWrap),this.sessionVariables.labelMaxHeight=d)}for(b=0;b<this._labels.length;b++)a=this._labels[b].textBlock,a.maxWidth=this.labelMaxWidth=this.sessionVariables.labelMaxWidth,a.fontSize=this.sessionVariables.labelFontSize,a.angle=this.labelAngle=this.sessionVariables.labelAngle,a.wrap=this.labelWrap=this.sessionVariables.labelWrap,
a.maxHeight=this.sessionVariables.labelMaxHeight,a.measureText()}else for(c=0;c<this._labels.length;c++)a=this._labels[c].textBlock,a.maxWidth=this.labelMaxWidth=g(this.options.labelMaxWidth)?g(this.sessionVariables.labelMaxWidth)?this.sessionVariables.labelMaxWidth=h:this.sessionVariables.labelMaxWidth:this.options.labelMaxWidth,a.fontSize=this.labelFontSize=g(this.options.labelFontSize)?g(this.sessionVariables.labelFontSize)?this.sessionVariables.labelFontSize=this.labelFontSize:this.sessionVariables.labelFontSize:
this.options.labelFontSize,a.angle=this.labelAngle=g(this.options.labelAngle)?g(this.sessionVariables.labelAngle)?this.sessionVariables.labelAngle=this.labelAngle:this.sessionVariables.labelAngle:this.labelAngle,a.wrap=this.labelWrap=g(this.options.labelWrap)?g(this.sessionVariables.labelWrap)?this.sessionVariables.labelWrap=this.labelWrap:this.sessionVariables.labelWrap:this.options.labelWrap,a.maxHeight=g(this.sessionVariables.labelMaxHeight)?this.sessionVariables.labelMaxHeight=d:this.sessionVariables.labelMaxHeight,
a.measureText();else if("left"===this._position||"right"===this._position)if(h=g(this.options.labelMaxWidth)?0.3*this.chart.width>>0:this.options.labelMaxWidth,d="undefined"===typeof this.options.labelWrap||this.labelWrap?0.3*this.chart.height>>0:1.5*this.labelFontSize,!this.chart.panEnabled&&1<=this._labels.length){this.sessionVariables.labelFontSize=this.labelFontSize;this.sessionVariables.labelMaxWidth=h;this.sessionVariables.labelMaxHeight=d;this.sessionVariables.labelAngle=g(this.sessionVariables.labelAngle)?
0:this.sessionVariables.labelAngle;this.sessionVariables.labelWrap=this.labelWrap;for(c=0;c<this._labels.length;c++)if(!this._labels[c].breaksLabelType){a=this._labels[c].textBlock;x=a.measureText();for(l=c+1;l<this._labels.length;l++)if(!this._labels[l].breaksLabelType){f=this._labels[l].textBlock;f=f.measureText();break}e.push(a.height);this.sessionVariables.labelMaxHeight=Math.max.apply(Math,e);b=h*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+(d-a.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle));
Math.cos(Math.PI/180*Math.abs(this.labelAngle));Math.sin(Math.PI/180*Math.abs(this.labelAngle));g(this.options.labelAngle)&&isNaN(this.options.labelAngle)&&0!==this.options.labelAngle?g(this.options.labelWrap)?g(this.options.labelWrap)&&(g(this.options.labelMaxWidth)?g(f)||(k=x.height+f.height>>0,k-2*d>q&&(q=k-2*d,k>=2*d&&k<2.4*d?(g(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelMaxHeight=d,this.sessionVariables.labelFontSize=
g(this.options.labelFontSize)?this.labelFontSize:this.options.labelFontSize):k>=2.4*d&&k<2.8*d?(this.sessionVariables.labelMaxHeight=b,this.sessionVariables.labelFontSize=this.labelFontSize,this.sessionVariables.labelWrap=!0):k>=2.8*d&&k<3.2*d?(this.sessionVariables.labelMaxHeight=d,this.sessionVariables.labelWrap=!0,g(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelFontSize=g(this.options.labelFontSize)?
this.labelFontSize:this.options.labelFontSize,this.sessionVariables.labelAngle=g(this.sessionVariables.labelAngle)?0:this.sessionVariables.labelAngle):k>=3.2*d&&k<3.6*d?(this.sessionVariables.labelMaxHeight=b,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelFontSize=this.labelFontSize):k>3.6*d&&k<10*d?(g(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelFontSize=g(this.options.labelFontSize)?
this.labelFontSize:this.options.labelFontSize,this.sessionVariables.labelMaxWidth=h,this.sessionVariables.labelMaxHeight=d,this.sessionVariables.labelAngle=g(this.sessionVariables.labelAngle)?0:this.sessionVariables.labelAngle):k>10*d&&k<50*d&&(g(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),a.measureText()),this.sessionVariables.labelFontSize=g(this.options.labelFontSize)?this.labelFontSize:this.options.labelFontSize,this.sessionVariables.labelMaxHeight=
d,this.sessionVariables.labelMaxWidth=h,this.sessionVariables.labelAngle=g(this.sessionVariables.labelAngle)?0:this.sessionVariables.labelAngle))):(this.sessionVariables.labelMaxHeight=d,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth)):(this.sessionVariables.labelMaxWidth=this.labelWrap?this.options.labelMaxWidth?this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth:this.labelMaxWidth?this.options.labelMaxWidth?
this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth:h,this.sessionVariables.labelMaxHeight=d):(this.sessionVariables.labelAngle=this.labelAngle,this.sessionVariables.labelMaxWidth=0===this.labelAngle?h:Math.min((b-d*Math.sin(Math.PI/180*Math.abs(this.labelAngle)))/Math.cos(Math.PI/180*Math.abs(this.labelAngle)),d),g(this.options.labelWrap))?g(this.options.labelWrap)&&(this.labelWrap&&!g(this.options.labelMaxWidth)?(this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:
this.sessionVariables.labelMaxWidth,this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxHeight=b):(this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:h,this.sessionVariables.labelMaxHeight=0===this.labelAngle?d:b,g(this.options.labelMaxWidth)&&(this.sessionVariables.labelAngle=this.labelAngle))):this.options.labelWrap?(this.sessionVariables.labelMaxHeight=0===this.labelAngle?d:b,this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=
h):(this.sessionVariables.labelMaxHeight=d,g(this.options.labelMaxWidth),this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth,this.sessionVariables.labelWrap=this.labelWrap)}for(b=0;b<this._labels.length;b++)a=this._labels[b].textBlock,a.maxWidth=this.labelMaxWidth=this.sessionVariables.labelMaxWidth,a.fontSize=this.labelFontSize=this.sessionVariables.labelFontSize,a.angle=this.labelAngle=this.sessionVariables.labelAngle,a.wrap=
this.labelWrap=this.sessionVariables.labelWrap,a.maxHeight=this.sessionVariables.labelMaxHeight,a.measureText()}else for(c=0;c<this._labels.length;c++)a=this._labels[c].textBlock,a.maxWidth=this.labelMaxWidth=g(this.options.labelMaxWidth)?g(this.sessionVariables.labelMaxWidth)?this.sessionVariables.labelMaxWidth=h:this.sessionVariables.labelMaxWidth:this.options.labelMaxWidth,a.fontSize=this.labelFontSize=g(this.options.labelFontSize)?g(this.sessionVariables.labelFontSize)?this.sessionVariables.labelFontSize=
this.labelFontSize:this.sessionVariables.labelFontSize:this.options.labelFontSize,a.angle=this.labelAngle=g(this.options.labelAngle)?g(this.sessionVariables.labelAngle)?this.sessionVariables.labelAngle=this.labelAngle:this.sessionVariables.labelAngle:this.labelAngle,a.wrap=this.labelWrap=g(this.options.labelWrap)?g(this.sessionVariables.labelWrap)?this.sessionVariables.labelWrap=this.labelWrap:this.sessionVariables.labelWrap:this.options.labelWrap,a.maxHeight=g(this.sessionVariables.labelMaxHeight)?
this.sessionVariables.labelMaxHeight=d:this.sessionVariables.labelMaxHeight,a.measureText();for(c=0;c<this.stripLines.length;c++){var h=this.stripLines[c],r;if("outside"===h.labelPlacement){d=this.sessionVariables.labelMaxWidth;if("bottom"===this._position||"top"===this._position)g(h.options.labelWrap)&&!g(this.sessionVariables.stripLineLabelMaxHeight)?r=this.sessionVariables.stripLineLabelMaxHeight:this.sessionVariables.stripLineLabelMaxHeight=r=h.labelWrap?0.8*this.chart.height>>0:1.5*this.labelFontSize;
if("left"===this._position||"right"===this._position)g(h.options.labelWrap)&&!g(this.sessionVariables.stripLineLabelMaxHeight)?r=this.sessionVariables.stripLineLabelMaxHeight:this.sessionVariables.stripLineLabelMaxHeight=r=h.labelWrap?0.8*this.chart.width>>0:1.5*this.labelFontSize;g(h.labelBackgroundColor)&&(h.labelBackgroundColor="#EEEEEE")}else d="bottom"===this._position||"top"===this._position?0.9*this.chart.width>>0:0.9*this.chart.height>>0,r=g(h.options.labelWrap)||h.labelWrap?"bottom"===this._position||
"top"===this._position?0.8*this.chart.width>>0:0.8*this.chart.height>>0:1.5*this.labelFontSize,g(h.labelBackgroundColor)&&(g(h.startValue)&&0!==h.startValue?h.labelBackgroundColor=u?"transparent":null:h.labelBackgroundColor="#EEEEEE");a=new oa(this.ctx,{x:0,y:0,backgroundColor:h.labelBackgroundColor,borderColor:h.labelBorderColor,borderThickness:h.labelBorderThickness,cornerRadius:h.labelCornerRadius,maxWidth:h.options.labelMaxWidth?h.options.labelMaxWidth:d,maxHeight:r,angle:this.labelAngle,text:h.labelFormatter?
h.labelFormatter({chart:this.chart,axis:this,stripLine:h}):h.label,textAlign:this.labelTextAlign,fontSize:"outside"===h.labelPlacement?h.options.labelFontSize?h.labelFontSize:this.labelFontSize:h.labelFontSize,fontFamily:"outside"===h.labelPlacement?h.options.labelFontFamily?h.labelFontFamily:this.labelFontFamily:h.labelFontFamily,fontWeight:"outside"===h.labelPlacement?h.options.labelFontWeight?h.labelFontWeight:this.labelFontWeight:h.labelFontWeight,fontColor:h.labelFontColor||h.color,fontStyle:"outside"===
h.labelPlacement?h.options.labelFontStyle?h.labelFontStyle:this.fontWeight:h.labelFontStyle,textBaseline:"middle"});this._stripLineLabels.push({position:h.value,textBlock:a,effectiveHeight:null,stripLine:h})}};z.prototype.createLabelsAndCalculateWidth=function(){var a=0,f=0;this._labels=[];this._stripLineLabels=[];var c=this.chart.isNavigator?0:5;if("left"===this._position||"right"===this._position){this.createLabels();if("inside"!=this.labelPlacement||"inside"===this.labelPlacement&&0<this._index)for(f=
0;f<this._labels.length;f++){var b=this._labels[f].textBlock,e=b.measureText(),h=0,h=0===this.labelAngle?e.width:e.width*Math.cos(Math.PI/180*Math.abs(this.labelAngle))+(e.height-b.fontSize/2)*Math.sin(Math.PI/180*Math.abs(this.labelAngle));a<h&&(a=h);this._labels[f].effectiveWidth=h}for(f=0;f<this._stripLineLabels.length;f++)"outside"===this._stripLineLabels[f].stripLine.labelPlacement&&(this._stripLineLabels[f].stripLine.value>=this.viewportMinimum&&this._stripLineLabels[f].stripLine.value<=this.viewportMaximum)&&
(b=this._stripLineLabels[f].textBlock,e=b.measureText(),h=0===this.labelAngle?e.width:e.width*Math.cos(Math.PI/180*Math.abs(this.labelAngle))+(e.height-b.fontSize/2)*Math.sin(Math.PI/180*Math.abs(this.labelAngle)),a<h&&(a=h),this._stripLineLabels[f].effectiveWidth=h)}return(this.title?this._titleTextBlock.measureText().height+2:0)+a+("inside"===this.tickPlacement?0:this.tickLength)+c};z.prototype.createLabelsAndCalculateHeight=function(){var a=0;this._labels=[];this._stripLineLabels=[];var f,c=0,
b=this.chart.isNavigator?0:5;if("bottom"===this._position||"top"===this._position){this.createLabels();if("inside"!=this.labelPlacement||"inside"===this.labelPlacement&&0<this._index)for(c=0;c<this._labels.length;c++){f=this._labels[c].textBlock;var e=f.measureText(),h=0,h=0===this.labelAngle?e.height:e.width*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+(e.height-f.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle));a<h&&(a=h);this._labels[c].effectiveHeight=h}for(c=0;c<this._stripLineLabels.length;c++)"outside"===
this._stripLineLabels[c].stripLine.labelPlacement&&(this._stripLineLabels[c].stripLine.value>=this.viewportMinimum&&this._stripLineLabels[c].stripLine.value<=this.viewportMaximum)&&(f=this._stripLineLabels[c].textBlock,e=f.measureText(),h=0===this.labelAngle?e.height:e.width*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+(e.height-f.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle)),a<h&&(a=h),this._stripLineLabels[c].effectiveHeight=h)}return(this.title?this._titleTextBlock.measureText().height+
2:0)+a+("inside"===this.tickPlacement?0:this.tickLength)+b};z.setLayout=function(a,f,c,b,e,h){var d,k,t,m,n=a[0]?a[0].chart:f[0].chart,p=n.isNavigator?0:10,q=n._axes;if(a&&0<a.length)for(var l=0;l<a.length;l++)a[l]&&a[l].calculateAxisParameters();if(f&&0<f.length)for(l=0;l<f.length;l++)f[l].calculateAxisParameters();if(c&&0<c.length)for(l=0;l<c.length;l++)c[l].calculateAxisParameters();if(b&&0<b.length)for(l=0;l<b.length;l++)b[l].calculateAxisParameters();for(l=0;l<q.length;l++)if(q[l]&&q[l].scaleBreaks&&
q[l].scaleBreaks._appliedBreaks.length)for(var x=q[l].scaleBreaks._appliedBreaks,s=0;s<x.length&&!(x[s].startValue>q[l].viewportMaximum);s++)x[s].endValue<q[l].viewportMinimum||(g(q[l].scaleBreaks.firstBreakIndex)&&(q[l].scaleBreaks.firstBreakIndex=s),x[s].startValue>=q[l].viewPortMinimum&&(q[l].scaleBreaks.lastBreakIndex=s));for(var r=s=0,v=0,u=0,z=0,A=0,E=0,B,D,F=k=0,G,I,L,x=G=I=L=!1,l=0;l<q.length;l++)q[l]&&q[l].title&&(q[l]._titleTextBlock=new oa(q[l].ctx,{text:q[l].title,horizontalAlign:"center",
fontSize:q[l].titleFontSize,fontFamily:q[l].titleFontFamily,fontWeight:q[l].titleFontWeight,fontColor:q[l].titleFontColor,fontStyle:q[l].titleFontStyle,borderColor:q[l].titleBorderColor,borderThickness:q[l].titleBorderThickness,backgroundColor:q[l].titleBackgroundColor,cornerRadius:q[l].titleCornerRadius,textBaseline:"top"}));for(l=0;l<q.length;l++)if(q[l].title)switch(q[l]._position){case "left":q[l]._titleTextBlock.maxWidth=q[l].titleMaxWidth||h.height;q[l]._titleTextBlock.maxHeight=q[l].titleWrap?
0.8*h.width:1.5*q[l].titleFontSize;q[l]._titleTextBlock.angle=-90;break;case "right":q[l]._titleTextBlock.maxWidth=q[l].titleMaxWidth||h.height;q[l]._titleTextBlock.maxHeight=q[l].titleWrap?0.8*h.width:1.5*q[l].titleFontSize;q[l]._titleTextBlock.angle=90;break;default:q[l]._titleTextBlock.maxWidth=q[l].titleMaxWidth||h.width,q[l]._titleTextBlock.maxHeight=q[l].titleWrap?0.8*h.height:1.5*q[l].titleFontSize,q[l]._titleTextBlock.angle=0}if("normal"===e){for(var u=[],z=[],A=[],E=[],N=[],O=[],M=[],Z=[];4>
s;){var H=0,S=0,R=0,W=0,$=e=0,T=0,aa=0,X=0,Y=0,V=0,ba=0;if(c&&0<c.length)for(A=[],l=V=0;l<c.length;l++)A.push(Math.ceil(c[l]?c[l].createLabelsAndCalculateWidth():0)),V+=A[l],T+=c[l]&&!n.isNavigator?c[l].margin:0;else A.push(Math.ceil(c[0]?c[0].createLabelsAndCalculateWidth():0));M.push(A);if(b&&0<b.length)for(E=[],l=ba=0;l<b.length;l++)E.push(Math.ceil(b[l]?b[l].createLabelsAndCalculateWidth():0)),ba+=E[l],aa+=b[l]?b[l].margin:0;else E.push(Math.ceil(b[0]?b[0].createLabelsAndCalculateWidth():0));
Z.push(E);d=Math.round(h.x1+V+T);t=Math.round(h.x2-ba-aa>n.width-p?n.width-p:h.x2-ba-aa);if(a&&0<a.length)for(u=[],l=X=0;l<a.length;l++)a[l]&&(a[l].lineCoordinates={}),a[l].lineCoordinates.width=Math.abs(t-d),a[l].title&&(a[l]._titleTextBlock.maxWidth=0<a[l].titleMaxWidth&&a[l].titleMaxWidth<a[l].lineCoordinates.width?a[l].titleMaxWidth:a[l].lineCoordinates.width),u.push(Math.ceil(a[l]?a[l].createLabelsAndCalculateHeight():0)),X+=u[l],e+=a[l]&&!n.isNavigator?a[l].margin:0;else u.push(Math.ceil(a[0]?
a[0].createLabelsAndCalculateHeight():0));N.push(u);if(f&&0<f.length)for(z=[],l=Y=0;l<f.length;l++)f[l]&&(f[l].lineCoordinates={}),f[l].lineCoordinates.width=Math.abs(t-d),f[l].title&&(f[l]._titleTextBlock.maxWidth=0<f[l].titleMaxWidth&&f[l].titleMaxWidth<f[l].lineCoordinates.width?f[l].titleMaxWidth:f[l].lineCoordinates.width),z.push(Math.ceil(f[l]?f[l].createLabelsAndCalculateHeight():0)),Y+=z[l],$+=f[l]&&!n.isNavigator?f[l].margin:0;else z.push(Math.ceil(f[0]?f[0].createLabelsAndCalculateHeight():
0));O.push(z);if(a&&0<a.length)for(l=0;l<a.length;l++)a[l]&&(a[l].lineCoordinates.x1=d,t=Math.round(h.x2-ba-aa>n.width-p?n.width-p:h.x2-ba-aa),a[l]._labels&&1<a[l]._labels.length&&(k=m=0,m=a[l]._labels[1],k="dateTime"===a[l].valueType?a[l]._labels[a[l]._labels.length-2]:a[l]._labels[a[l]._labels.length-1],r=m.textBlock.width*Math.cos(Math.PI/180*Math.abs(m.textBlock.angle))+(m.textBlock.height-k.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(m.textBlock.angle)),v=k.textBlock.width*Math.cos(Math.PI/
180*Math.abs(k.textBlock.angle))+(k.textBlock.height-k.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle))),!a[l]||(!a[l].labelAutoFit||g(B)||g(D)||n.isNavigator||n.stockChart)||(k=0,0<a[l].labelAngle?D+v>t&&(k+=0<a[l].labelAngle?D+v-t-ba:0):0>a[l].labelAngle?B-r<d&&B-r<a[l].viewportMinimum&&(F=d-(T+a[l].tickLength+A+B-r+a[l].labelFontSize/2)):0===a[l].labelAngle&&(D+v>t&&(k=D+v/2-t-ba),B-r<d&&B-r<a[l].viewportMinimum&&(F=d-T-a[l].tickLength-A-B+r/2)),a[l].viewportMaximum===a[l].maximum&&
a[l].viewportMinimum===a[l].minimum&&0<a[l].labelAngle&&0<k?t-=k:a[l].viewportMaximum===a[l].maximum&&a[l].viewportMinimum===a[l].minimum&&0>a[l].labelAngle&&0<F?d+=F:a[l].viewportMaximum===a[l].maximum&&a[l].viewportMinimum===a[l].minimum&&0===a[l].labelAngle&&(0<F&&(d+=F),0<k&&(t-=k))),n.panEnabled?X=g(n.sessionVariables.axisX.height)?n.sessionVariables.axisX.height=X:n.sessionVariables.axisX.height:n.sessionVariables.axisX.height=X,k=Math.round(h.y2-X-e+H),m=Math.round(h.y2),a[l].lineCoordinates.x2=
t,a[l].lineCoordinates.width=t-d,a[l].lineCoordinates.y1=k,a[l].lineCoordinates.y2=k+a[l].lineThickness/2,"inside"===a[l].labelPlacement&&0<l&&(a[l].lineCoordinates.y1=a[l].lineCoordinates.y1+u[l]-(a[l]._titleTextBlock?a[l]._titleTextBlock.height:0)-("inside"===a[l].tickPlacement?a[l].tickLength:0),a[l].lineCoordinates.y2=a[l].lineCoordinates.y1+a[l].lineThickness/2),a[l].bounds={x1:d,y1:k,x2:t,y2:m-(X+e-u[l]-H),width:t-d,height:m-k}),H+=u[l]+a[l].margin;if(f&&0<f.length)for(l=0;l<f.length;l++)f[l].lineCoordinates.x1=
Math.round(h.x1+V+T),f[l].lineCoordinates.x2=Math.round(h.x2-ba-aa>n.width-p?n.width-p:h.x2-ba-aa),f[l].lineCoordinates.width=Math.abs(t-d),f[l]._labels&&1<f[l]._labels.length&&(m=f[l]._labels[1],k="dateTime"===f[l].valueType?f[l]._labels[f[l]._labels.length-2]:f[l]._labels[f[l]._labels.length-1],r=m.textBlock.width*Math.cos(Math.PI/180*Math.abs(m.textBlock.angle))+(m.textBlock.height-k.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(m.textBlock.angle)),v=k.textBlock.width*Math.cos(Math.PI/180*
Math.abs(k.textBlock.angle))+(k.textBlock.height-k.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle))),n.panEnabled?Y=g(n.sessionVariables.axisX2.height)?n.sessionVariables.axisX2.height=Y:n.sessionVariables.axisX2.height:n.sessionVariables.axisX2.height=Y,k=Math.round(h.y1),m=Math.round(h.y2+f[l].margin),f[l].lineCoordinates.y1=k+Y+$-S,f[l].lineCoordinates.y2=k,"inside"===f[l].labelPlacement&&0<l&&(f[l].lineCoordinates.y1=f[l-1].bounds.y1-z[l]+(f[l]._titleTextBlock?f[l]._titleTextBlock.height:
0)),f[l].bounds={x1:d,y1:k+(Y+$-z[l]-S),x2:t,y2:m,width:t-d,height:m-k},S+=z[l]+f[l].margin;if(c&&0<c.length)for(l=0;l<c.length;l++)T=n.isNavigator?0:10,c[l]&&(d=Math.round(a[0]?a[0].lineCoordinates.x1:f[0].lineCoordinates.x1),T=c[l]._labels&&0<c[l]._labels.length?c[l]._labels[c[l]._labels.length-1].textBlock.height/2:p,k=Math.round(h.y1+Y+$<Math.max(T,p)?Math.max(T,p):h.y1+Y+$),t=Math.round(a[0]?a[0].lineCoordinates.x1:f[0].lineCoordinates.x1),T=0<a.length?0:c[l]._labels&&0<c[l]._labels.length?c[l]._labels[0].textBlock.height/
2:p,m=Math.round(h.y2-X-e-T),c[l].lineCoordinates={x1:d-R,y1:k,x2:t-R,y2:m,height:Math.abs(m-k)},"inside"===c[l].labelPlacement&&0<l&&(c[l].lineCoordinates.x1=c[l].lineCoordinates.x1-(A[l]-(c[l]._titleTextBlock?c[l]._titleTextBlock.height:0))+("outside"===c[l].tickPlacement?c[l].tickLength:0),c[l].lineCoordinates.x2=c[l].lineCoordinates.x1+c[l].lineThickness/2),c[l].bounds={x1:d-(A[l]+R),y1:k,x2:t,y2:m,width:t-d,height:m-k},c[l].title&&(c[l]._titleTextBlock.maxWidth=0<c[l].titleMaxWidth&&c[l].titleMaxWidth<
c[l].lineCoordinates.height?c[l].titleMaxWidth:c[l].lineCoordinates.height),R+=A[l]+c[l].margin);if(b&&0<b.length)for(l=0;l<b.length;l++)b[l]&&(d=Math.round(a[0]?a[0].lineCoordinates.x2:f[0].lineCoordinates.x2),t=Math.round(d),T=b[l]._labels&&0<b[l]._labels.length?b[l]._labels[b[l]._labels.length-1].textBlock.height/2:0,k=Math.round(h.y1+Y+$<Math.max(T,p)?Math.max(T,p):h.y1+Y+$),T=0<a.length?0:b[l]._labels&&0<b[l]._labels.length?b[l]._labels[0].textBlock.height/2:0,m=Math.round(h.y2-(X+e+T)),b[l].lineCoordinates=
{x1:d+W,y1:k,x2:d+W,y2:m,height:Math.abs(m-k)},"inside"===b[l].labelPlacement&&0<l&&(b[l].lineCoordinates.x1=b[l].lineCoordinates.x1+(E[l]-(b[l]._titleTextBlock?b[l]._titleTextBlock.height:0))-("outside"===b[l].tickPlacement?b[l].tickLength:0)-2,b[l].lineCoordinates.x2=b[l].lineCoordinates.x1+b[l].lineThickness/2),b[l].bounds={x1:d,y1:k,x2:t+(E[l]+W),y2:m,width:t-d,height:m-k},b[l].title&&(b[l]._titleTextBlock.maxWidth=0<b[l].titleMaxWidth&&b[l].titleMaxWidth<b[l].lineCoordinates.height?b[l].titleMaxWidth:
b[l].lineCoordinates.height),W+=E[l]+b[l].margin);if(a&&0<a.length)for(l=0;l<a.length;l++)a[l]&&(a[l].calculateValueToPixelConversionParameters(),a[l].calculateBreaksSizeInValues(),a[l]._labels&&1<a[l]._labels.length&&(B=(a[l].logarithmic?Math.log(a[l]._labels[1].position/a[l].viewportMinimum)/a[l].conversionParameters.lnLogarithmBase:a[l]._labels[1].position-a[l].viewportMinimum)*Math.abs(a[l].conversionParameters.pixelPerUnit)+a[l].lineCoordinates.x1,d=a[l]._labels[a[l]._labels.length-("dateTime"===
a[l].valueType?2:1)].position,d=a[l].getApparentDifference(a[l].viewportMinimum,d),D=a[l].logarithmic?(1<d?Math.log(d)/a[l].conversionParameters.lnLogarithmBase*Math.abs(a[l].conversionParameters.pixelPerUnit):0)+a[l].lineCoordinates.x1:(0<d?d*Math.abs(a[l].conversionParameters.pixelPerUnit):0)+a[l].lineCoordinates.x1));if(f&&0<f.length)for(l=0;l<f.length;l++)f[l].calculateValueToPixelConversionParameters(),f[l].calculateBreaksSizeInValues(),f[l]._labels&&1<f[l]._labels.length&&(B=(f[l].logarithmic?
Math.log(f[l]._labels[1].position/f[l].viewportMinimum)/f[l].conversionParameters.lnLogarithmBase:f[l]._labels[1].position-f[l].viewportMinimum)*Math.abs(f[l].conversionParameters.pixelPerUnit)+f[l].lineCoordinates.x1,d=f[l]._labels[f[l]._labels.length-("dateTime"===f[l].valueType?2:1)].position,d=f[l].getApparentDifference(f[l].viewportMinimum,d),D=f[l].logarithmic?(1<d?Math.log(d)/f[l].conversionParameters.lnLogarithmBase*Math.abs(f[l].conversionParameters.pixelPerUnit):0)+f[l].lineCoordinates.x1:
(0<d?d*Math.abs(f[l].conversionParameters.pixelPerUnit):0)+f[l].lineCoordinates.x1);for(l=0;l<q.length;l++)"axisY"===q[l].type&&(q[l].calculateValueToPixelConversionParameters(),q[l].calculateBreaksSizeInValues());if(0<s){if(a&&0<a.length)for(l=0;l<a.length;l++)x=N[s-1][l]===N[s][l]?!0:!1;else x=!0;if(f&&0<f.length)for(l=0;l<f.length;l++)G=O[s-1][l]===O[s][l]?!0:!1;else G=!0;if(c&&0<c.length)for(l=0;l<c.length;l++)I=M[s-1][l]===M[s][l]?!0:!1;else I=!0;if(b&&0<b.length)for(l=0;l<b.length;l++)L=Z[s-
1][l]===Z[s][l]?!0:!1;else L=!0}if(x&&G&&I&&L)break;s++}if(a&&0<a.length)for(l=0;l<a.length;l++)a[l].calculateStripLinesThicknessInValues(),a[l].calculateBreaksInPixels();if(f&&0<f.length)for(l=0;l<f.length;l++)f[l].calculateStripLinesThicknessInValues(),f[l].calculateBreaksInPixels();if(c&&0<c.length)for(l=0;l<c.length;l++)c[l].calculateStripLinesThicknessInValues(),c[l].calculateBreaksInPixels();if(b&&0<b.length)for(l=0;l<b.length;l++)b[l].calculateStripLinesThicknessInValues(),b[l].calculateBreaksInPixels()}else{p=
[];B=[];F=[];r=[];D=[];v=[];N=[];for(O=[];4>s;){X=W=S=R=aa=T=$=e=Z=M=H=Y=0;if(a&&0<a.length)for(F=[],l=W=0;l<a.length;l++)F.push(Math.ceil(a[l]?a[l].createLabelsAndCalculateWidth():0)),W+=F[l],e+=a[l]&&!n.isNavigator?a[l].margin:0;else F.push(Math.ceil(a[0]?a[0].createLabelsAndCalculateWidth():0));N.push(F);if(f&&0<f.length)for(r=[],l=X=0;l<f.length;l++)r.push(Math.ceil(f[l]?f[l].createLabelsAndCalculateWidth():0)),X+=r[l],$+=f[l]?f[l].margin:0;else r.push(Math.ceil(f[0]?f[0].createLabelsAndCalculateWidth():
0));O.push(r);if(c&&0<c.length)for(l=0;l<c.length;l++)c[l].lineCoordinates={},d=Math.round(h.x1+W+e),t=Math.round(h.x2-X-$>n.width-10?n.width-10:h.x2-X-$),c[l].labelAutoFit&&!g(u)&&(0<!a.length&&(d=0>c[l].labelAngle?Math.max(d,u):0===c[l].labelAngle?Math.max(d,u/2):d),0<!f.length&&(t=0<c[l].labelAngle?t-z/2:0===c[l].labelAngle?t-z/2:t)),c[l].lineCoordinates.x1=d,c[l].lineCoordinates.x2=t,c[l].lineCoordinates.width=Math.abs(t-d),c[l].title&&(c[l]._titleTextBlock.maxWidth=0<c[l].titleMaxWidth&&c[l].titleMaxWidth<
c[l].lineCoordinates.width?c[l].titleMaxWidth:c[l].lineCoordinates.width);if(b&&0<b.length)for(l=0;l<b.length;l++)b[l].lineCoordinates={},d=Math.round(h.x1+W+e),t=Math.round(h.x2-X-$>b[l].chart.width-10?b[l].chart.width-10:h.x2-X-$),b[l]&&b[l].labelAutoFit&&!g(A)&&(0<!a.length&&(d=0<b[l].labelAngle?Math.max(d,A):0===b[l].labelAngle?Math.max(d,A/2):d),0<!f.length&&(t-=E/2)),b[l].lineCoordinates.x1=d,b[l].lineCoordinates.x2=t,b[l].lineCoordinates.width=Math.abs(t-d),b[l].title&&(b[l]._titleTextBlock.maxWidth=
0<b[l].titleMaxWidth&&b[l].titleMaxWidth<b[l].lineCoordinates.width?b[l].titleMaxWidth:b[l].lineCoordinates.width);if(c&&0<c.length)for(p=[],l=R=0;l<c.length;l++)p.push(Math.ceil(c[l]?c[l].createLabelsAndCalculateHeight():0)),R+=p[l]+c[l].margin,T+=c[l].margin;else p.push(Math.ceil(c[0]?c[0].createLabelsAndCalculateHeight():0));D.push(p);if(b&&0<b.length)for(B=[],l=S=0;l<b.length;l++)B.push(Math.ceil(b[l]?b[l].createLabelsAndCalculateHeight():0)),S+=B[l],aa+=b[l].margin;else B.push(Math.ceil(b[0]?
b[0].createLabelsAndCalculateHeight():0));v.push(B);if(c&&0<c.length)for(l=0;l<c.length;l++)0<c[l]._labels.length&&(m=c[l]._labels[0],k=c[l]._labels[c[l]._labels.length-1],u=m.textBlock.width*Math.cos(Math.PI/180*Math.abs(m.textBlock.angle))+(m.textBlock.height-k.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(m.textBlock.angle)),z=k.textBlock.width*Math.cos(Math.PI/180*Math.abs(k.textBlock.angle))+(k.textBlock.height-k.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle)));
if(b&&0<b.length)for(l=0;l<b.length;l++)b[l]&&0<b[l]._labels.length&&(m=b[l]._labels[0],k=b[l]._labels[b[l]._labels.length-1],A=m.textBlock.width*Math.cos(Math.PI/180*Math.abs(m.textBlock.angle))+(m.textBlock.height-k.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(m.textBlock.angle)),E=k.textBlock.width*Math.cos(Math.PI/180*Math.abs(k.textBlock.angle))+(k.textBlock.height-k.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(k.textBlock.angle)));if(n.panEnabled)for(l=0;l<c.length;l++)p[l]=g(n.sessionVariables.axisY.height)?
n.sessionVariables.axisY.height=p[l]:n.sessionVariables.axisY.height;else for(l=0;l<c.length;l++)n.sessionVariables.axisY.height=p[l];if(c&&0<c.length)for(l=c.length-1;0<=l;l--)k=Math.round(h.y2),m=Math.round(h.y2>c[l].chart.height?c[l].chart.height:h.y2),c[l].lineCoordinates.y1=k-(p[l]+c[l].margin+Y),c[l].lineCoordinates.y2=k-(p[l]+c[l].margin+Y),"inside"===c[l].labelPlacement&&0<l&&(c[l].lineCoordinates.y1=c[l].lineCoordinates.y1+p[l]-(c[l]._titleTextBlock?c[l]._titleTextBlock.height:0)-("inside"===
c[l].tickPlacement?c[l].tickLength:0),c[l].lineCoordinates.y2=c[l].lineCoordinates.y1+c[l].lineThickness/2),c[l].bounds={x1:d,y1:k-(p[l]+Y+c[l].margin),x2:t,y2:m-(Y+c[l].margin),width:t-d,height:p[l]},c[l].title&&(c[l]._titleTextBlock.maxWidth=0<c[l].titleMaxWidth&&c[l].titleMaxWidth<c[l].lineCoordinates.width?c[l].titleMaxWidth:c[l].lineCoordinates.width),Y+=p[l]+c[l].margin;if(b&&0<b.length)for(l=b.length-1;0<=l;l--)b[l]&&(k=Math.round(h.y1),m=Math.round(h.y1+(B[l]+b[l].margin+H)),b[l].lineCoordinates.y1=
m,b[l].lineCoordinates.y2=m,"inside"===b[l].labelPlacement&&0<l&&(b[l].lineCoordinates.y1=m-B[l]+(b[l]._titleTextBlock?b[l]._titleTextBlock.height:0)),b[l].bounds={x1:d,y1:k+(b[l].margin+H),x2:t,y2:m,width:t-d,height:S},b[l].title&&(b[l]._titleTextBlock.maxWidth=0<b[l].titleMaxWidth&&b[l].titleMaxWidth<b[l].lineCoordinates.width?b[l].titleMaxWidth:b[l].lineCoordinates.width),H+=B[l]+b[l].margin);if(a&&0<a.length)for(l=0;l<a.length;l++){T=a[l]._labels&&0<a[l]._labels.length?a[l]._labels[0].textBlock.fontSize/
2:0;d=Math.round(h.x1+e);k=b&&0<b.length?Math.round(b[0]?b[0].lineCoordinates.y2:h.y1<Math.max(T,10)?Math.max(T,10):h.y1):h.y1<Math.max(T,10)?Math.max(T,10):h.y1;t=Math.round(h.x1+W+e);m=c&&0<c.length?Math.round(c[0]?c[0].lineCoordinates.y1:h.y2-R>n.height-Math.max(T,10)?n.height-Math.max(T,10):h.y2-R):h.y2>n.height-Math.max(T,10)?n.height-Math.max(T,10):h.y2;if(c&&0<c.length)for(T=0;T<c.length;T++)c[T]&&c[T].labelAutoFit&&(t=0>c[T].labelAngle?Math.max(t,u):0===c[T].labelAngle?Math.max(t,u/2):t,d=
0>c[T].labelAngle||0===c[T].labelAngle?t-W:d);if(b&&0<b.length)for(T=0;T<b.length;T++)b[T]&&b[T].labelAutoFit&&(t=b[T].lineCoordinates.x1,d=t-W);a[l].lineCoordinates={x1:t-M,y1:k,x2:t-M,y2:m,height:Math.abs(m-k)};"inside"===a[l].labelPlacement&&0<l&&(a[l].lineCoordinates.x1=a[l].lineCoordinates.x1-(F[l]-(a[l]._titleTextBlock?a[l]._titleTextBlock.height:0))+("outside"===a[l].tickPlacement?a[l].tickLength:0),a[l].lineCoordinates.x2=a[l].lineCoordinates.x1+a[l].lineThickness/2);a[l].bounds={x1:t-(F[l]+
M),y1:k,x2:t,y2:m,width:t-d,height:m-k};a[l].title&&(a[l]._titleTextBlock.maxWidth=0<a[l].titleMaxWidth&&a[l].titleMaxWidth<a[l].lineCoordinates.height?a[l].titleMaxWidth:a[l].lineCoordinates.height);a[l].calculateValueToPixelConversionParameters();a[l].calculateBreaksSizeInValues();M+=F[l]+a[l].margin}if(f&&0<f.length)for(l=0;l<f.length;l++){T=f[l]._labels&&0<f[l]._labels.length?f[l]._labels[0].textBlock.fontSize/2:0;d=Math.round(h.x1-e);k=b&&0<b.length?Math.round(b[0]?b[0].lineCoordinates.y2:h.y1<
Math.max(T,10)?Math.max(T,10):h.y1):h.y1<Math.max(T,10)?Math.max(T,10):h.y1;t=Math.round(h.x2-X-$);m=c&&0<c.length?Math.round(c[0]?c[0].lineCoordinates.y1:h.y2-R>n.height-Math.max(T,10)?n.height-Math.max(T,10):h.y2-R):h.y2>n.height-Math.max(T,10)?n.height-Math.max(T,10):h.y2;if(c&&0<c.length)for(T=0;T<c.length;T++)c[T]&&c[T].labelAutoFit&&(t=0>c[T].labelAngle?Math.max(t,u):0===c[T].labelAngle?Math.max(t,u/2):t,d=0>c[T].labelAngle||0===c[T].labelAngle?t-X:d);if(b&&0<b.length)for(T=0;T<b.length;T++)b[T]&&
b[T].labelAutoFit&&(t=b[T].lineCoordinates.x2,d=t-X);f[l].lineCoordinates={x1:t+Z,y1:k,x2:t+Z,y2:m,height:Math.abs(m-k)};"inside"===f[l].labelPlacement&&0<l&&(f[l].lineCoordinates.x1=f[l].lineCoordinates.x1+(r[l]-(f[l]._titleTextBlock?f[l]._titleTextBlock.height:0)-2)-("outside"===f[l].tickPlacement?f[l].tickLength:0),f[l].lineCoordinates.x2=f[l].lineCoordinates.x1+f[l].lineThickness/2);f[l].bounds={x1:f[l].lineCoordinates.x1,y1:k,x2:t+r[l]+Z,y2:m,width:t-d,height:m-k};f[l].title&&(f[l]._titleTextBlock.maxWidth=
0<f[l].titleMaxWidth&&f[l].titleMaxWidth<f[l].lineCoordinates.height?f[l].titleMaxWidth:f[l].lineCoordinates.height);f[l].calculateValueToPixelConversionParameters();f[l].calculateBreaksSizeInValues();Z+=r[l]+f[l].margin}for(l=0;l<q.length;l++)"axisY"===q[l].type&&(q[l].calculateValueToPixelConversionParameters(),q[l].calculateBreaksSizeInValues());if(0<s){if(a&&0<a.length)for(l=0;l<a.length;l++)x=N[s-1][l]===N[s][l]?!0:!1;else x=!0;if(f&&0<f.length)for(l=0;l<f.length;l++)G=O[s-1][l]===O[s][l]?!0:
!1;else G=!0;if(c&&0<c.length)for(l=0;l<c.length;l++)I=D[s-1][l]===D[s][l]?!0:!1;else I=!0;if(b&&0<b.length)for(l=0;l<b.length;l++)L=v[s-1][l]===v[s][l]?!0:!1;else L=!0}if(x&&G&&I&&L)break;s++}if(c&&0<c.length)for(l=0;l<c.length;l++)c[l].calculateStripLinesThicknessInValues(),c[l].calculateBreaksInPixels();if(b&&0<b.length)for(l=0;l<b.length;l++)b[l].calculateStripLinesThicknessInValues(),b[l].calculateBreaksInPixels();if(a&&0<a.length)for(l=0;l<a.length;l++)a[l].calculateStripLinesThicknessInValues(),
a[l].calculateBreaksInPixels();if(f&&0<f.length)for(l=0;l<f.length;l++)f[l].calculateStripLinesThicknessInValues(),f[l].calculateBreaksInPixels()}};z.render=function(a,f,c,b,e){var h=a[0]?a[0].chart:f[0].chart;e=h.ctx;h.alignVerticalAxes&&h.alignVerticalAxes();e.save();e.beginPath();a[0]&&e.rect(5,a[0].bounds.y1,a[0].chart.width-10,a[0].bounds.height);f[0]&&e.rect(5,f[f.length-1].bounds.y1,f[0].chart.width-10,f[0].bounds.height);e.clip();if(a&&0<a.length)for(var d=0;d<a.length;d++)a[d].renderLabelsTicksAndTitle();
if(f&&0<f.length)for(d=0;d<f.length;d++)f[d].renderLabelsTicksAndTitle();e.restore();if(c&&0<c.length)for(d=0;d<c.length;d++)c[d].renderLabelsTicksAndTitle();if(b&&0<b.length)for(d=0;d<b.length;d++)b[d].renderLabelsTicksAndTitle();h.preparePlotArea();h=h.plotArea;e.save();e.beginPath();e.rect(h.x1,h.y1,Math.abs(h.x2-h.x1),Math.abs(h.y2-h.y1));e.clip();if(a&&0<a.length)for(d=0;d<a.length;d++)a[d].renderStripLinesOfThicknessType("value");if(f&&0<f.length)for(d=0;d<f.length;d++)f[d].renderStripLinesOfThicknessType("value");
if(c&&0<c.length)for(d=0;d<c.length;d++)c[d].renderStripLinesOfThicknessType("value");if(b&&0<b.length)for(d=0;d<b.length;d++)b[d].renderStripLinesOfThicknessType("value");if(a&&0<a.length)for(d=0;d<a.length;d++)a[d].renderInterlacedColors();if(f&&0<f.length)for(d=0;d<f.length;d++)f[d].renderInterlacedColors();if(c&&0<c.length)for(d=0;d<c.length;d++)c[d].renderInterlacedColors();if(b&&0<b.length)for(d=0;d<b.length;d++)b[d].renderInterlacedColors();e.restore();if(a&&0<a.length)for(d=0;d<a.length;d++)a[d].renderGrid(),
u&&(a[d].createMask(),a[d].renderBreaksBackground());if(f&&0<f.length)for(d=0;d<f.length;d++)f[d].renderGrid(),u&&(f[d].createMask(),f[d].renderBreaksBackground());if(c&&0<c.length)for(d=0;d<c.length;d++)c[d].renderGrid(),u&&(c[d].createMask(),c[d].renderBreaksBackground());if(b&&0<b.length)for(d=0;d<b.length;d++)b[d].renderGrid(),u&&(b[d].createMask(),b[d].renderBreaksBackground());if(a&&0<a.length)for(d=0;d<a.length;d++)a[d].renderAxisLine();if(f&&0<f.length)for(d=0;d<f.length;d++)f[d].renderAxisLine();
if(c&&0<c.length)for(d=0;d<c.length;d++)c[d].renderAxisLine();if(b&&0<b.length)for(d=0;d<b.length;d++)b[d].renderAxisLine();if(a&&0<a.length)for(d=0;d<a.length;d++)a[d].renderStripLinesOfThicknessType("pixel");if(f&&0<f.length)for(d=0;d<f.length;d++)f[d].renderStripLinesOfThicknessType("pixel");if(c&&0<c.length)for(d=0;d<c.length;d++)c[d].renderStripLinesOfThicknessType("pixel");if(b&&0<b.length)for(d=0;d<b.length;d++)b[d].renderStripLinesOfThicknessType("pixel")};z.prototype.calculateStripLinesThicknessInValues=
function(){for(var a=0;a<this.stripLines.length;a++)if(null!==this.stripLines[a].startValue&&null!==this.stripLines[a].endValue){var f=Math.min(this.stripLines[a].startValue,this.stripLines[a].endValue),c=Math.max(this.stripLines[a].startValue,this.stripLines[a].endValue),f=this.getApparentDifference(f,c);this.stripLines[a].value=this.logarithmic?this.stripLines[a].value*Math.sqrt(Math.log(Math.max(this.stripLines[a].startValue,this.stripLines[a].endValue)/Math.min(this.stripLines[a].startValue,this.stripLines[a].endValue))/
Math.log(f)):this.stripLines[a].value+(Math.abs(this.stripLines[a].endValue-this.stripLines[a].startValue)-f)/2;this.stripLines[a].thickness=f;this.stripLines[a]._thicknessType="value"}};z.prototype.calculateBreaksSizeInValues=function(){for(var a="left"===this._position||"right"===this._position?this.lineCoordinates.height||this.chart.height:this.lineCoordinates.width||this.chart.width,f=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[],c=this.conversionParameters.pixelPerUnit||a/(this.logarithmic?
this.conversionParameters.maximum/this.conversionParameters.minimum:this.conversionParameters.maximum-this.conversionParameters.minimum),b=this.scaleBreaks&&!g(this.scaleBreaks.options.spacing),e,d=0;d<f.length;d++)e=b||!g(f[d].options.spacing),f[d].spacing=Ua(f[d].spacing,a,8,e?0.1*a:8,e?0:3)<<0,f[d].size=0>f[d].spacing?0:Math.abs(f[d].spacing/c),this.logarithmic&&(f[d].size=Math.pow(this.logarithmBase,f[d].size))};z.prototype.calculateBreaksInPixels=function(){if(!(this.scaleBreaks&&0>=this.scaleBreaks._appliedBreaks.length)){var a=
this.scaleBreaks?this.scaleBreaks._appliedBreaks:[];a.length&&(this.scaleBreaks.firstBreakIndex=this.scaleBreaks.lastBreakIndex=null);for(var f=0;f<a.length&&!(a[f].startValue>this.conversionParameters.maximum);f++)a[f].endValue<this.conversionParameters.minimum||(g(this.scaleBreaks.firstBreakIndex)&&(this.scaleBreaks.firstBreakIndex=f),a[f].startValue>=this.conversionParameters.minimum&&(a[f].startPixel=this.convertValueToPixel(a[f].startValue),this.scaleBreaks.lastBreakIndex=f),a[f].endValue<=this.conversionParameters.maximum&&
(a[f].endPixel=this.convertValueToPixel(a[f].endValue)))}};z.prototype.renderLabelsTicksAndTitle=function(){var a=this,f=!1,c=0,b=0,e=1,d=0;0!==this.labelAngle&&360!==this.labelAngle&&(e=1.2);if("undefined"===typeof this.options.interval){if("bottom"===this._position||"top"===this._position)if(this.logarithmic&&!this.equidistantInterval&&this.labelAutoFit){for(var c=[],e=0!==this.labelAngle&&360!==this.labelAngle?1:1.2,g,k=this.viewportMaximum,t=this.lineCoordinates.width/Math.log(this.range),m=this._labels.length-
1;0<=m;m--){p=this._labels[m];if(p.position<this.viewportMinimum)break;p.position>this.viewportMaximum||!(m===this._labels.length-1||g<Math.log(k/p.position)*t/e)||(c.push(p),k=p.position,g=p.textBlock.width*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+p.textBlock.height*Math.abs(Math.sin(Math.PI/180*this.labelAngle)))}this._labels=c}else{for(m=0;m<this._labels.length;m++)p=this._labels[m],p.position<this.viewportMinimum||(g=p.textBlock.width*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+p.textBlock.height*
Math.abs(Math.sin(Math.PI/180*this.labelAngle)),c+=g);c>this.lineCoordinates.width*e&&this.labelAutoFit&&(f=!0)}if("left"===this._position||"right"===this._position)if(this.logarithmic&&!this.equidistantInterval&&this.labelAutoFit){for(var c=[],n,k=this.viewportMaximum,t=this.lineCoordinates.height/Math.log(this.range),m=this._labels.length-1;0<=m;m--){p=this._labels[m];if(p.position<this.viewportMinimum)break;p.position>this.viewportMaximum||!(m===this._labels.length-1||n<Math.log(k/p.position)*
t)||(c.push(p),k=p.position,n=p.textBlock.height*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+p.textBlock.width*Math.abs(Math.sin(Math.PI/180*this.labelAngle)))}this._labels=c}else{for(m=0;m<this._labels.length;m++)p=this._labels[m],p.position<this.viewportMinimum||(n=p.textBlock.height*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+p.textBlock.width*Math.abs(Math.sin(Math.PI/180*this.labelAngle)),b+=n);b>this.lineCoordinates.height*e&&this.labelAutoFit&&(f=!0)}}this.logarithmic&&(!this.equidistantInterval&&
this.labelAutoFit)&&this._labels.sort(function(a,b){return a.position-b.position});var m=0,p,q;if("bottom"===this._position){for(m=0;m<this._labels.length;m++)p=this._labels[m],p.position<this.viewportMinimum||p.position>this.viewportMaximum||(q=this.getPixelCoordinatesOnAxis(p.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0,this.ctx.beginPath(),this.ctx.moveTo(b,q.y<<
0),this.ctx.lineTo(b,q.y+this.tickLength<<0),this.ctx.stroke()),f&&0!==d++%2&&this.labelAutoFit||(0===p.textBlock.angle?(q.x-=p.textBlock.width/2,q.y="inside"===this.labelPlacement?q.y-(("inside"===this.tickPlacement?this.tickLength:0)+p.textBlock.height-p.textBlock.fontSize/2):q.y+("inside"===this.tickPlacement?0:this.tickLength)+p.textBlock.fontSize/2+5):(q.x="inside"===this.labelPlacement?0>this.labelAngle?q.x:q.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):q.x-(0>this.labelAngle?p.textBlock.width*
Math.cos(Math.PI/180*this.labelAngle):0),q.y="inside"===this.labelPlacement?0>this.labelAngle?q.y-("inside"===this.tickPlacement?this.tickLength:0)-5:q.y-("inside"===this.tickPlacement?this.tickLength:0)-Math.abs(p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)+5):q.y+("inside"===this.tickPlacement?0:this.tickLength)+Math.abs(0>this.labelAngle?p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-5:5)),p.textBlock.x=q.x,p.textBlock.y=q.y));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationEnd",
function(){for(m=0;m<a._labels.length;m++)if(p=a._labels[m],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(b,q.y<<0);a.ctx.lineTo(b,q.y-a.tickLength<<0);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+
this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y2-this._titleTextBlock.height-3,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("top"===this._position){for(m=0;m<this._labels.length;m++)p=this._labels[m],p.position<this.viewportMinimum||p.position>this.viewportMaximum||(q=this.getPixelCoordinatesOnAxis(p.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=
this.tickColor,b=1===this.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0,this.ctx.beginPath(),this.ctx.moveTo(b,q.y<<0),this.ctx.lineTo(b,q.y-this.tickLength<<0),this.ctx.stroke()),f&&0!==d++%2&&this.labelAutoFit||(0===p.textBlock.angle?(q.x-=p.textBlock.width/2,q.y="inside"===this.labelPlacement?q.y+this.labelFontSize/2+("inside"===this.tickPlacement?this.tickLength:0)+5:q.y-(("inside"===this.tickPlacement?0:this.tickLength)+p.textBlock.height-p.textBlock.fontSize/2)):(q.x="inside"===this.labelPlacement?0<
this.labelAngle?q.x:q.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):q.x+(p.textBlock.height-this.labelFontSize)*Math.sin(Math.PI/180*this.labelAngle)-(0<this.labelAngle?p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0),q.y="inside"===this.labelPlacement?0<this.labelAngle?q.y+("inside"===this.tickPlacement?this.tickLength:0)+5:q.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?this.tickLength:0)+5:q.y-(("inside"===this.tickPlacement?0:this.tickLength)+
((p.textBlock.height-p.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle)+(0<this.labelAngle?p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):0)))),p.textBlock.x=q.x,p.textBlock.y=q.y));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationEnd",function(){for(m=0;m<a._labels.length;m++)if(p=a._labels[m],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=
a.tickColor;var b=1===a.ctx.lineWidth%2?(q.x<<0)+0.5:q.x<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(b,q.y<<0);a.ctx.lineTo(b,q.y+a.tickLength<<0);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.lineCoordinates.x1+this.lineCoordinates.width/2-this._titleTextBlock.width/2,this._titleTextBlock.y=this.bounds.y1+1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("left"===this._position){for(m=
0;m<this._labels.length;m++)p=this._labels[m],p.position<this.viewportMinimum||p.position>this.viewportMaximum||(q=this.getPixelCoordinatesOnAxis(p.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(q.y<<0)+0.5:q.y<<0,this.ctx.beginPath(),this.ctx.moveTo(q.x<<0,b),this.ctx.lineTo(q.x-this.tickLength<<0,b),this.ctx.stroke()),f&&0!==d++%2&&this.labelAutoFit||(0===this.labelAngle?(p.textBlock.y=
q.y,p.textBlock.x="inside"===this.labelPlacement?q.x+("inside"===this.tickPlacement?this.tickLength:0)+5:q.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?0:this.tickLength)-5):(p.textBlock.y="inside"===this.labelPlacement?q.y:q.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),p.textBlock.x="inside"===this.labelPlacement?q.x+("inside"===this.tickPlacement?this.tickLength:0)+5:0<this.labelAngle?q.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-
("inside"===this.tickPlacement?0:this.tickLength)-5:q.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)+(p.textBlock.height-p.textBlock.fontSize/2-5)*Math.sin(Math.PI/180*this.labelAngle)-("inside"===this.tickPlacement?0:this.tickLength))));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationEnd",function(){for(m=0;m<a._labels.length;m++)if(p=a._labels[m],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(p.position),a.tickThickness)){a.ctx.lineWidth=
a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(q.y<<0)+0.5:q.y<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(q.x<<0,b);a.ctx.lineTo(q.x+a.tickLength<<0,b);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x1+1,this._titleTextBlock.y=this.lineCoordinates.height/2+this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}else if("right"===
this._position){for(m=0;m<this._labels.length;m++)p=this._labels[m],p.position<this.viewportMinimum||p.position>this.viewportMaximum||(q=this.getPixelCoordinatesOnAxis(p.position),this.tickThickness&&"inside"!=this.tickPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,b=1===this.ctx.lineWidth%2?(q.y<<0)+0.5:q.y<<0,this.ctx.beginPath(),this.ctx.moveTo(q.x<<0,b),this.ctx.lineTo(q.x+this.tickLength<<0,b),this.ctx.stroke()),f&&0!==d++%2&&this.labelAutoFit||(0===this.labelAngle?
(p.textBlock.y=q.y,p.textBlock.x="inside"===this.labelPlacement?q.x-p.textBlock.width-("inside"===this.tickPlacement?this.tickLength:0)-5:q.x+("inside"===this.tickPlacement?0:this.tickLength)+5):(p.textBlock.y="inside"===this.labelPlacement?q.y-p.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):0>this.labelAngle?q.y:q.y-(p.textBlock.height-p.textBlock.fontSize/2-5)*Math.cos(Math.PI/180*this.labelAngle),p.textBlock.x="inside"===this.labelPlacement?q.x-p.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-
("inside"===this.tickPlacement?this.tickLength:0)-5:0<this.labelAngle?q.x+(p.textBlock.height-p.textBlock.fontSize/2-5)*Math.sin(Math.PI/180*this.labelAngle)+("inside"===this.tickPlacement?0:this.tickLength):q.x+("inside"===this.tickPlacement?0:this.tickLength)+5)));"inside"===this.tickPlacement&&this.chart.addEventListener("dataAnimationEnd",function(){for(m=0;m<a._labels.length;m++)if(p=a._labels[m],!(p.position<a.viewportMinimum||p.position>a.viewportMaximum)&&(q=a.getPixelCoordinatesOnAxis(p.position),
a.tickThickness)){a.ctx.lineWidth=a.tickThickness;a.ctx.strokeStyle=a.tickColor;var b=1===a.ctx.lineWidth%2?(q.y<<0)+0.5:q.y<<0;a.ctx.save();a.ctx.beginPath();a.ctx.moveTo(q.x<<0,b);a.ctx.lineTo(q.x-a.tickLength<<0,b);a.ctx.stroke();a.ctx.restore()}},this);this.title&&(this._titleTextBlock.measureText(),this._titleTextBlock.x=this.bounds.x2-1,this._titleTextBlock.y=this.lineCoordinates.height/2-this._titleTextBlock.width/2+this.lineCoordinates.y1,this.titleMaxWidth=this._titleTextBlock.maxWidth,this._titleTextBlock.render(!0))}d=
0;if("inside"===this.labelPlacement)this.chart.addEventListener("dataAnimationEnd",function(){for(m=0;m<a._labels.length;m++)p=a._labels[m],p.position<a.viewportMinimum||(p.position>a.viewportMaximum||f&&0!==d++%2&&a.labelAutoFit)||(a.ctx.save(),a.ctx.beginPath(),p.textBlock.render(!0),a.ctx.restore())},this);else for(m=0;m<this._labels.length;m++)p=this._labels[m],p.position<this.viewportMinimum||(p.position>this.viewportMaximum||f&&0!==d++%2&&this.labelAutoFit)||p.textBlock.render(!0)};z.prototype.renderInterlacedColors=
function(){var a=this.chart.plotArea.ctx,f,c,b=this.chart.plotArea,e=0;f=!0;if(("bottom"===this._position||"top"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,e=0;e<this._labels.length;e++)f?(f=this.getPixelCoordinatesOnAxis(this._labels[e].position),c=e+1>this._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[e+1].position),a.fillRect(Math.min(c.x,f.x),b.y1,Math.abs(c.x-f.x),Math.abs(b.y1-b.y2)),f=!1):
f=!0;else if(("left"===this._position||"right"===this._position)&&this.interlacedColor)for(a.fillStyle=this.interlacedColor,e=0;e<this._labels.length;e++)f?(c=this.getPixelCoordinatesOnAxis(this._labels[e].position),f=e+1>this._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[e+1].position),a.fillRect(b.x1,Math.min(c.y,f.y),Math.abs(b.x1-b.x2),Math.abs(f.y-c.y)),f=!1):f=!0;a.beginPath()};z.prototype.renderStripLinesOfThicknessType=function(a){if(this.stripLines&&
0<this.stripLines.length&&a){for(var f=this,c,b=0,e=0,d=!1,k=!1,t=[],x=[],k=!1,b=0;b<this.stripLines.length;b++){var m=this.stripLines[b];m._thicknessType===a&&("pixel"===a&&(m.value<this.viewportMinimum||m.value>this.viewportMaximum||g(m.value)||isNaN(this.range))||"value"===a&&(m.startValue<=this.viewportMinimum&&m.endValue<=this.viewportMinimum||m.startValue>=this.viewportMaximum&&m.endValue>=this.viewportMaximum||g(m.startValue)||g(m.endValue)||isNaN(this.range))||t.push(m))}for(b=0;b<this._stripLineLabels.length;b++)if(m=
this.stripLines[b],c=this._stripLineLabels[b],!(c.position<this.viewportMinimum||c.position>this.viewportMaximum||isNaN(this.range))){a=this.getPixelCoordinatesOnAxis(c.position);if("outside"===c.stripLine.labelPlacement)if(m&&(this.ctx.strokeStyle=m.color,"pixel"===m._thicknessType&&(this.ctx.lineWidth=m.thickness)),"bottom"===this._position){var n=1===this.ctx.lineWidth%2?(a.x<<0)+0.5:a.x<<0;this.ctx.beginPath();this.ctx.moveTo(n,a.y<<0);this.ctx.lineTo(n,a.y+this.tickLength<<0);this.ctx.stroke();
0===this.labelAngle?(a.x-=c.textBlock.width/2,a.y+=this.tickLength+c.textBlock.fontSize/2+5):(a.x-=0>this.labelAngle?c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,a.y+=this.tickLength+Math.abs(0>this.labelAngle?c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-5:5))}else"top"===this._position?(n=1===this.ctx.lineWidth%2?(a.x<<0)+0.5:a.x<<0,this.ctx.beginPath(),this.ctx.moveTo(n,a.y<<0),this.ctx.lineTo(n,a.y-this.tickLength<<0),this.ctx.stroke(),0===this.labelAngle?(a.x-=c.textBlock.width/
2,a.y-=this.tickLength+c.textBlock.height-c.textBlock.fontSize/2):(a.x+=(c.textBlock.height-this.tickLength-this.labelFontSize/2)*Math.sin(Math.PI/180*this.labelAngle)-(0<this.labelAngle?c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0),a.y-=this.tickLength+(c.textBlock.height*Math.cos(Math.PI/180*this.labelAngle)+(0<this.labelAngle?c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):0)))):"left"===this._position?(n=1===this.ctx.lineWidth%2?(a.y<<0)+0.5:a.y<<0,this.ctx.beginPath(),this.ctx.moveTo(a.x<<
0,n),this.ctx.lineTo(a.x-this.tickLength<<0,n),this.ctx.stroke(),0===this.labelAngle?a.x=a.x-c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-this.tickLength-5:(a.y-=c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),a.x=0<this.labelAngle?a.x-c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-this.tickLength-5:a.x-c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)+(c.textBlock.height-c.textBlock.fontSize/2-5)*Math.sin(Math.PI/180*this.labelAngle)-this.tickLength)):"right"===
this._position&&(n=1===this.ctx.lineWidth%2?(a.y<<0)+0.5:a.y<<0,this.ctx.beginPath(),this.ctx.moveTo(a.x<<0,n),this.ctx.lineTo(a.x+this.tickLength<<0,n),this.ctx.stroke(),0===this.labelAngle?a.x=a.x+this.tickLength+5:(a.y=0>this.labelAngle?a.y:a.y-(c.textBlock.height-c.textBlock.fontSize/2-5)*Math.cos(Math.PI/180*this.labelAngle),a.x=0<this.labelAngle?a.x+(c.textBlock.height-c.textBlock.fontSize/2-5)*Math.sin(Math.PI/180*this.labelAngle)+this.tickLength:a.x+this.tickLength+5));else c.textBlock.angle=
-90,"bottom"===this._position?(c.textBlock.maxWidth=this.options.stripLines[b].labelMaxWidth?this.options.stripLines[b].labelMaxWidth:this.chart.plotArea.height-3,c.textBlock.measureText(),a.x-c.textBlock.height>this.chart.plotArea.x1?g(m.startValue)?a.x-=c.textBlock.height-c.textBlock.fontSize/2:a.x-=c.textBlock.height/2-c.textBlock.fontSize/2+3:(c.textBlock.angle=90,g(m.startValue)?a.x+=c.textBlock.height-c.textBlock.fontSize/2:a.x+=c.textBlock.height/2-c.textBlock.fontSize/2+3),a.y=-90===c.textBlock.angle?
"near"===c.stripLine.labelAlign?this.chart.plotArea.y2-3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1+c.textBlock.width)/2:this.chart.plotArea.y1+c.textBlock.width+3:"near"===c.stripLine.labelAlign?this.chart.plotArea.y2-c.textBlock.width-3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1-c.textBlock.width)/2:this.chart.plotArea.y1+3):"top"===this._position?(c.textBlock.maxWidth=this.options.stripLines[b].labelMaxWidth?this.options.stripLines[b].labelMaxWidth:
this.chart.plotArea.height-3,c.textBlock.measureText(),a.x-c.textBlock.height>this.chart.plotArea.x1?g(m.startValue)?a.x-=c.textBlock.height-c.textBlock.fontSize/2:a.x-=c.textBlock.height/2-c.textBlock.fontSize/2+3:(c.textBlock.angle=90,g(m.startValue)?a.x+=c.textBlock.height-c.textBlock.fontSize/2:a.x+=c.textBlock.height/2-c.textBlock.fontSize/2+3),a.y=-90===c.textBlock.angle?"near"===c.stripLine.labelAlign?this.chart.plotArea.y1+c.textBlock.width+3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.y2+
this.chart.plotArea.y1+c.textBlock.width)/2:this.chart.plotArea.y2-3:"near"===c.stripLine.labelAlign?this.chart.plotArea.y1+3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1-c.textBlock.width)/2:this.chart.plotArea.y2-c.textBlock.width-3):"left"===this._position?(c.textBlock.maxWidth=this.options.stripLines[b].labelMaxWidth?this.options.stripLines[b].labelMaxWidth:this.chart.plotArea.width-3,c.textBlock.angle=0,c.textBlock.measureText(),a.y-c.textBlock.height>this.chart.plotArea.y1?
g(m.startValue)?a.y-=c.textBlock.height-c.textBlock.fontSize/2:a.y-=c.textBlock.height/2-c.textBlock.fontSize+3:a.y-c.textBlock.height<this.chart.plotArea.y2?a.y+=c.textBlock.fontSize/2+3:g(m.startValue)?a.y-=c.textBlock.height-c.textBlock.fontSize/2:a.y-=c.textBlock.height/2-c.textBlock.fontSize+3,a.x="near"===c.stripLine.labelAlign?this.chart.plotArea.x1+3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.x2+this.chart.plotArea.x1)/2-c.textBlock.width/2:this.chart.plotArea.x2-c.textBlock.width-
3):"right"===this._position&&(c.textBlock.maxWidth=this.options.stripLines[b].labelMaxWidth?this.options.stripLines[b].labelMaxWidth:this.chart.plotArea.width-3,c.textBlock.angle=0,c.textBlock.measureText(),a.y-+c.textBlock.height>this.chart.plotArea.y1?g(m.startValue)?a.y-=c.textBlock.height-c.textBlock.fontSize/2:a.y-=c.textBlock.height/2-c.textBlock.fontSize/2-3:a.y-c.textBlock.height<this.chart.plotArea.y2?a.y+=c.textBlock.fontSize/2+3:g(m.startValue)?a.y-=c.textBlock.height-c.textBlock.fontSize/
2:a.y-=c.textBlock.height/2-c.textBlock.fontSize/2+3,a.x="near"===c.stripLine.labelAlign?this.chart.plotArea.x2-c.textBlock.width-3:"center"===c.stripLine.labelAlign?(this.chart.plotArea.x2+this.chart.plotArea.x1)/2-c.textBlock.width/2:this.chart.plotArea.x1+3);c.textBlock.x=a.x;c.textBlock.y=a.y;x.push(c)}if(!k){k=!1;this.ctx.save();this.ctx.beginPath();this.ctx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height);this.ctx.clip();for(b=0;b<t.length;b++)m=
t[b],m.showOnTop?d||(d=!0,this.chart.addEventListener("dataAnimationIterationEnd",function(){this.ctx.save();this.ctx.beginPath();this.ctx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height);this.ctx.clip();for(e=0;e<t.length;e++)m=t[e],m.showOnTop&&m.render();this.ctx.restore()},m)):m.render();for(b=0;b<x.length;b++)c=x[b],c.stripLine.showOnTop?k||(k=!0,this.chart.addEventListener("dataAnimationIterationEnd",function(){for(e=0;e<x.length;e++)c=
x[e],"inside"===c.stripLine.labelPlacement&&c.stripLine.showOnTop&&(f.ctx.save(),f.ctx.beginPath(),f.ctx.rect(f.chart.plotArea.x1,f.chart.plotArea.y1,f.chart.plotArea.width,f.chart.plotArea.height),f.ctx.clip(),c.textBlock.render(!0),f.ctx.restore())},c.textBlock)):"inside"===c.stripLine.labelPlacement&&c.textBlock.render(!0);this.ctx.restore();k=!0}if(k)for(k=!1,b=0;b<x.length;b++)c=x[b],"outside"===c.stripLine.labelPlacement&&c.textBlock.render(!0)}};z.prototype.renderBreaksBackground=function(){this.chart._breaksCanvas&&
(this.scaleBreaks&&0<this.scaleBreaks._appliedBreaks.length&&this.maskCanvas)&&(this.chart._breaksCanvasCtx.save(),this.chart._breaksCanvasCtx.beginPath(),this.chart._breaksCanvasCtx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height),this.chart._breaksCanvasCtx.clip(),this.chart._breaksCanvasCtx.drawImage(this.maskCanvas,0,0,this.chart.width,this.chart.height),this.chart._breaksCanvasCtx.restore())};z.prototype.createMask=function(){if(this.scaleBreaks&&
0<this.scaleBreaks._appliedBreaks.length){var a=this.scaleBreaks._appliedBreaks;u?(this.maskCanvas=ta(this.chart.width,this.chart.height),this.maskCtx=this.maskCanvas.getContext("2d")):(this.maskCanvas=this.chart.plotArea.canvas,this.maskCtx=this.chart.plotArea.ctx);this.maskCtx.save();this.maskCtx.beginPath();this.maskCtx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height);this.maskCtx.clip();for(var f=0;f<a.length;f++)a[f].endValue<this.viewportMinimum||
(a[f].startValue>this.viewportMaximum||isNaN(this.range))||a[f].render(this.maskCtx);this.maskCtx.restore()}};z.prototype.renderCrosshair=function(a,f){isFinite(this.minimum)&&isFinite(this.maximum)&&(this.crosshair.render(a,f),this.crosshair.dispatchEvent("updated",{chart:this.chart,crosshair:this.options,axis:this,value:this.crosshair.value},this))};z.prototype.showCrosshair=function(a){g(a)||(a<this.viewportMinimum||a>this.viewportMaximum)||("top"===this._position||"bottom"===this._position?this.crosshair.render(this.convertValueToPixel(a),
null,a):this.crosshair.render(null,this.convertValueToPixel(a),a))};z.prototype.renderGrid=function(){if(this.gridThickness&&0<this.gridThickness){var a=this.chart.ctx;a.save();var f,c=this.chart.plotArea;a.lineWidth=this.gridThickness;a.strokeStyle=this.gridColor;a.setLineDash&&a.setLineDash(R(this.gridDashType,this.gridThickness));if("bottom"===this._position||"top"===this._position)for(b=0;b<this._labels.length;b++)this._labels[b].position<this.viewportMinimum||(this._labels[b].position>this.viewportMaximum||
this._labels[b].breaksLabelType)||(a.beginPath(),f=this.getPixelCoordinatesOnAxis(this._labels[b].position),f=1===a.lineWidth%2?(f.x<<0)+0.5:f.x<<0,a.moveTo(f,c.y1<<0),a.lineTo(f,c.y2<<0),a.stroke());else if("left"===this._position||"right"===this._position)for(var b=0;b<this._labels.length;b++)this._labels[b].position<this.viewportMinimum||(this._labels[b].position>this.viewportMaximum||this._labels[b].breaksLabelType)||(a.beginPath(),f=this.getPixelCoordinatesOnAxis(this._labels[b].position),f=
1===a.lineWidth%2?(f.y<<0)+0.5:f.y<<0,a.moveTo(c.x1<<0,f),a.lineTo(c.x2<<0,f),a.stroke());a.restore()}};z.prototype.renderAxisLine=function(){var a=this.chart.ctx,f=u?this.chart._preRenderCtx:a,c=Math.ceil(this.tickThickness/(this.reversed?-2:2)),b=Math.ceil(this.tickThickness/(this.reversed?2:-2)),e,d;f.save();if("bottom"===this._position||"top"===this._position){if(this.lineThickness){this.reversed?(e=this.lineCoordinates.x2,d=this.lineCoordinates.x1):(e=this.lineCoordinates.x1,d=this.lineCoordinates.x2);
f.lineWidth=this.lineThickness;f.strokeStyle=this.lineColor?this.lineColor:"black";f.setLineDash&&f.setLineDash(R(this.lineDashType,this.lineThickness));var k=1===this.lineThickness%2?(this.lineCoordinates.y1<<0)+0.5:this.lineCoordinates.y1<<0;f.beginPath();if(this.scaleBreaks&&!g(this.scaleBreaks.firstBreakIndex))if(g(this.scaleBreaks.lastBreakIndex))e=this.scaleBreaks._appliedBreaks[this.scaleBreaks.firstBreakIndex].endPixel+b;else for(var t=this.scaleBreaks.firstBreakIndex;t<=this.scaleBreaks.lastBreakIndex;t++)f.moveTo(e,
k),f.lineTo(this.scaleBreaks._appliedBreaks[t].startPixel+c,k),e=this.scaleBreaks._appliedBreaks[t].endPixel+b;e&&(f.moveTo(e,k),f.lineTo(d,k));f.stroke()}}else if(("left"===this._position||"right"===this._position)&&this.lineThickness){this.reversed?(e=this.lineCoordinates.y1,d=this.lineCoordinates.y2):(e=this.lineCoordinates.y2,d=this.lineCoordinates.y1);f.lineWidth=this.lineThickness;f.strokeStyle=this.lineColor;f.setLineDash&&f.setLineDash(R(this.lineDashType,this.lineThickness));k=1===this.lineThickness%
2?(this.lineCoordinates.x1<<0)+0.5:this.lineCoordinates.x1<<0;f.beginPath();if(this.scaleBreaks&&!g(this.scaleBreaks.firstBreakIndex))if(g(this.scaleBreaks.lastBreakIndex))e=this.scaleBreaks._appliedBreaks[this.scaleBreaks.firstBreakIndex].endPixel+c;else for(t=this.scaleBreaks.firstBreakIndex;t<=this.scaleBreaks.lastBreakIndex;t++)f.moveTo(k,e),f.lineTo(k,this.scaleBreaks._appliedBreaks[t].startPixel+b),e=this.scaleBreaks._appliedBreaks[t].endPixel+c;e&&(f.moveTo(k,e),f.lineTo(k,d));f.stroke()}u&&
(a.drawImage(this.chart._preRenderCanvas,0,0,this.chart.width,this.chart.height),this.chart._breaksCanvasCtx&&this.chart._breaksCanvasCtx.drawImage(this.chart._preRenderCanvas,0,0,this.chart.width,this.chart.height),f.clearRect(0,0,this.chart.width,this.chart.height));f.restore()};z.prototype.getPixelCoordinatesOnAxis=function(a){var f={};if("bottom"===this._position||"top"===this._position)f.x=this.convertValueToPixel(a),f.y=this.lineCoordinates.y1;if("left"===this._position||"right"===this._position)f.y=
this.convertValueToPixel(a),f.x=this.lineCoordinates.x2;return f};z.prototype.convertPixelToValue=function(a){if("undefined"===typeof a)return null;var f=0,c=0,b,f=!0,e=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[],c="number"===typeof a?a:"left"===this._position||"right"===this._position?a.y:a.x;if(this.logarithmic){a=b=Math.pow(this.logarithmBase,(c-this.conversionParameters.reference)/this.conversionParameters.pixelPerUnit);if(c<=this.conversionParameters.reference===("left"===this._position||
"right"===this._position)!==this.reversed)for(c=0;c<e.length;c++){if(!(e[c].endValue<this.conversionParameters.minimum))if(f)if(e[c].startValue<this.conversionParameters.minimum){if(1<e[c].size&&this.conversionParameters.minimum*Math.pow(e[c].endValue/e[c].startValue,Math.log(b)/Math.log(e[c].size))<e[c].endValue){a=Math.pow(e[c].endValue/e[c].startValue,Math.log(b)/Math.log(e[c].size));break}else a*=e[c].endValue/this.conversionParameters.minimum/Math.pow(e[c].size,Math.log(e[c].endValue/this.conversionParameters.minimum)/
Math.log(e[c].endValue/e[c].startValue)),b/=Math.pow(e[c].size,Math.log(e[c].endValue/this.conversionParameters.minimum)/Math.log(e[c].endValue/e[c].startValue));f=!1}else if(b>e[c].startValue/this.conversionParameters.minimum){b/=e[c].startValue/this.conversionParameters.minimum;if(b<e[c].size){a*=Math.pow(e[c].endValue/e[c].startValue,1===e[c].size?1:Math.log(b)/Math.log(e[c].size))/b;break}else a*=e[c].endValue/e[c].startValue/e[c].size;b/=e[c].size;f=!1}else break;else if(b>e[c].startValue/e[c-
1].endValue){b/=e[c].startValue/e[c-1].endValue;if(b<e[c].size){a*=Math.pow(e[c].endValue/e[c].startValue,1===e[c].size?1:Math.log(b)/Math.log(e[c].size))/b;break}else a*=e[c].endValue/e[c].startValue/e[c].size;b/=e[c].size}else break}else for(c=e.length-1;0<=c;c--)if(!(e[c].startValue>this.conversionParameters.minimum))if(f)if(e[c].endValue>this.conversionParameters.minimum){if(1<e[c].size&&this.conversionParameters.minimum*Math.pow(e[c].endValue/e[c].startValue,Math.log(b)/Math.log(e[c].size))>
e[c].startValue){a=Math.pow(e[c].endValue/e[c].startValue,Math.log(b)/Math.log(e[c].size));break}else a*=e[c].startValue/this.conversionParameters.minimum*Math.pow(e[c].size,Math.log(e[c].startValue/this.conversionParameters.minimum)/Math.log(e[c].endValue/e[c].startValue))*b,b*=Math.pow(e[c].size,Math.log(this.conversionParameters.minimum/e[c].startValue)/Math.log(e[c].endValue/e[c].startValue));f=!1}else if(b<e[c].endValue/this.conversionParameters.minimum){b/=e[c].endValue/this.conversionParameters.minimum;
if(b>1/e[c].size){a*=Math.pow(e[c].endValue/e[c].startValue,1>=e[c].size?1:Math.log(b)/Math.log(e[c].size))*b;break}else a/=e[c].endValue/e[c].startValue/e[c].size;b*=e[c].size;f=!1}else break;else if(b<e[c].endValue/e[c+1].startValue){b/=e[c].endValue/e[c+1].startValue;if(b>1/e[c].size){a*=Math.pow(e[c].endValue/e[c].startValue,1>=e[c].size?1:Math.log(b)/Math.log(e[c].size))*b;break}else a/=e[c].endValue/e[c].startValue/e[c].size;b*=e[c].size}else break;f=a*this.viewportMinimum}else{a=b=(c-this.conversionParameters.reference)/
this.conversionParameters.pixelPerUnit;if(c<=this.conversionParameters.reference===("left"===this._position||"right"===this._position)!==this.reversed)for(c=0;c<e.length;c++){if(!(e[c].endValue<this.conversionParameters.minimum))if(f)if(e[c].startValue<this.conversionParameters.minimum){if(e[c].size&&this.conversionParameters.minimum+b*(e[c].endValue-e[c].startValue)/e[c].size<e[c].endValue){a=0>=e[c].size?0:b*(e[c].endValue-e[c].startValue)/e[c].size;break}else a+=e[c].endValue-this.conversionParameters.minimum-
e[c].size*(e[c].endValue-this.conversionParameters.minimum)/(e[c].endValue-e[c].startValue),b-=e[c].size*(e[c].endValue-this.conversionParameters.minimum)/(e[c].endValue-e[c].startValue);f=!1}else if(b>e[c].startValue-this.conversionParameters.minimum){b-=e[c].startValue-this.conversionParameters.minimum;if(b<e[c].size){a+=(e[c].endValue-e[c].startValue)*(0===e[c].size?1:b/e[c].size)-b;break}else a+=e[c].endValue-e[c].startValue-e[c].size;b-=e[c].size;f=!1}else break;else if(b>e[c].startValue-e[c-
1].endValue){b-=e[c].startValue-e[c-1].endValue;if(b<e[c].size){a+=(e[c].endValue-e[c].startValue)*(0===e[c].size?1:b/e[c].size)-b;break}else a+=e[c].endValue-e[c].startValue-e[c].size;b-=e[c].size}else break}else for(c=e.length-1;0<=c;c--)if(!(e[c].startValue>this.conversionParameters.minimum))if(f)if(e[c].endValue>this.conversionParameters.minimum)if(e[c].size&&this.conversionParameters.minimum+b*(e[c].endValue-e[c].startValue)/e[c].size>e[c].startValue){a=0>=e[c].size?0:b*(e[c].endValue-e[c].startValue)/
e[c].size;break}else a+=e[c].startValue-this.conversionParameters.minimum+e[c].size*(this.conversionParameters.minimum-e[c].startValue)/(e[c].endValue-e[c].startValue),b+=e[c].size*(this.conversionParameters.minimum-e[c].startValue)/(e[c].endValue-e[c].startValue),f=!1;else if(b<e[c].endValue-this.conversionParameters.minimum){b-=e[c].endValue-this.conversionParameters.minimum;if(b>-1*e[c].size){a+=(e[c].endValue-e[c].startValue)*(0===e[c].size?1:b/e[c].size)+b;break}else a-=e[c].endValue-e[c].startValue-
e[c].size;b+=e[c].size;f=!1}else break;else if(b<e[c].endValue-e[c+1].startValue){b-=e[c].endValue-e[c+1].startValue;if(b>-1*e[c].size){a+=(e[c].endValue-e[c].startValue)*(0===e[c].size?1:b/e[c].size)+b;break}else a-=e[c].endValue-e[c].startValue-e[c].size;b+=e[c].size}else break;f=this.conversionParameters.minimum+a}return f};z.prototype.convertValueToPixel=function(a){a=this.getApparentDifference(this.conversionParameters.minimum,a,a);return this.logarithmic?this.conversionParameters.reference+
this.conversionParameters.pixelPerUnit*Math.log(a/this.conversionParameters.minimum)/this.conversionParameters.lnLogarithmBase+0.5<<0:"axisX"===this.type?this.conversionParameters.reference+this.conversionParameters.pixelPerUnit*(a-this.conversionParameters.minimum)+0.5<<0:this.conversionParameters.reference+this.conversionParameters.pixelPerUnit*(a-this.conversionParameters.minimum)+0.5};z.prototype.getApparentDifference=function(a,f,c,b){var e=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[];
if(this.logarithmic){c=g(c)?f/a:c;for(var d=0;d<e.length&&!(f<e[d].startValue);d++)a>e[d].endValue||(a<=e[d].startValue&&f>=e[d].endValue?c=c/e[d].endValue*e[d].startValue*e[d].size:a>=e[d].startValue&&f>=e[d].endValue?c=c/e[d].endValue*a*Math.pow(e[d].size,Math.log(e[d].endValue/a)/Math.log(e[d].endValue/e[d].startValue)):a<=e[d].startValue&&f<=e[d].endValue?c=c/f*e[d].startValue*Math.pow(e[d].size,Math.log(f/e[d].startValue)/Math.log(e[d].endValue/e[d].startValue)):!b&&(a>e[d].startValue&&f<e[d].endValue)&&
(c=a*Math.pow(e[d].size,Math.log(f/a)/Math.log(e[d].endValue/e[d].startValue))))}else for(c=g(c)?Math.abs(f-a):c,d=0;d<e.length&&!(f<e[d].startValue);d++)a>e[d].endValue||(a<=e[d].startValue&&f>=e[d].endValue?c=c-e[d].endValue+e[d].startValue+e[d].size:a>e[d].startValue&&f>=e[d].endValue?c=c-e[d].endValue+a+e[d].size*(e[d].endValue-a)/(e[d].endValue-e[d].startValue):a<=e[d].startValue&&f<e[d].endValue?c=c-f+e[d].startValue+e[d].size*(f-e[d].startValue)/(e[d].endValue-e[d].startValue):!b&&(a>e[d].startValue&&
f<e[d].endValue)&&(c=a+e[d].size*(f-a)/(e[d].endValue-e[d].startValue)));return c};z.prototype.setViewPortRange=function(a,f){this.sessionVariables.newViewportMinimum=this.viewportMinimum=Math.min(a,f);this.sessionVariables.newViewportMaximum=this.viewportMaximum=Math.max(a,f)};z.prototype.getXValueAt=function(a){if(!a)return null;var f=null;"left"===this._position?f=this.convertPixelToValue(a.y):"bottom"===this._position&&(f=this.convertPixelToValue(a.x));return f};z.prototype.calculateValueToPixelConversionParameters=
function(a){a=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[];var f={pixelPerUnit:null,minimum:null,reference:null},c=this.lineCoordinates.width,b=this.lineCoordinates.height,c="bottom"===this._position||"top"===this._position?c:b,b=Math.abs(this.range);if(this.logarithmic)for(var e=0;e<a.length&&!(this.viewportMaximum<a[e].startValue);e++)this.viewportMinimum>a[e].endValue||(this.viewportMinimum>=a[e].startValue&&this.viewportMaximum<=a[e].endValue?c=0:this.viewportMinimum<=a[e].startValue&&
this.viewportMaximum>=a[e].endValue?(b=b/a[e].endValue*a[e].startValue,c=0<a[e].spacing.toString().indexOf("%")?c*(1-parseFloat(a[e].spacing)/100):c-Math.min(a[e].spacing,0.1*c)):this.viewportMinimum>a[e].startValue&&this.viewportMaximum>=a[e].endValue?(b=b/a[e].endValue*this.viewportMinimum,c=0<a[e].spacing.toString().indexOf("%")?c*(1-parseFloat(a[e].spacing)/100*Math.log(a[e].endValue/this.viewportMinimum)/Math.log(a[e].endValue/a[e].startValue)):c-Math.min(a[e].spacing,0.1*c)*Math.log(a[e].endValue/
this.viewportMinimum)/Math.log(a[e].endValue/a[e].startValue)):this.viewportMinimum<=a[e].startValue&&this.viewportMaximum<a[e].endValue&&(b=b/this.viewportMaximum*a[e].startValue,c=0<a[e].spacing.toString().indexOf("%")?c*(1-parseFloat(a[e].spacing)/100*Math.log(this.viewportMaximum/a[e].startValue)/Math.log(a[e].endValue/a[e].startValue)):c-Math.min(a[e].spacing,0.1*c)*Math.log(this.viewportMaximum/a[e].startValue)/Math.log(a[e].endValue/a[e].startValue)));else for(e=0;e<a.length&&!(this.viewportMaximum<
a[e].startValue);e++)this.viewportMinimum>a[e].endValue||(this.viewportMinimum>=a[e].startValue&&this.viewportMaximum<=a[e].endValue?c=0:this.viewportMinimum<=a[e].startValue&&this.viewportMaximum>=a[e].endValue?(b=b-a[e].endValue+a[e].startValue,c=0<a[e].spacing.toString().indexOf("%")?c*(1-parseFloat(a[e].spacing)/100):c-Math.min(a[e].spacing,0.1*c)):this.viewportMinimum>a[e].startValue&&this.viewportMaximum>=a[e].endValue?(b=b-a[e].endValue+this.viewportMinimum,c=0<a[e].spacing.toString().indexOf("%")?
c*(1-parseFloat(a[e].spacing)/100*(a[e].endValue-this.viewportMinimum)/(a[e].endValue-a[e].startValue)):c-Math.min(a[e].spacing,0.1*c)*(a[e].endValue-this.viewportMinimum)/(a[e].endValue-a[e].startValue)):this.viewportMinimum<=a[e].startValue&&this.viewportMaximum<a[e].endValue&&(b=b-this.viewportMaximum+a[e].startValue,c=0<a[e].spacing.toString().indexOf("%")?c*(1-parseFloat(a[e].spacing)/100*(this.viewportMaximum-a[e].startValue)/(a[e].endValue-a[e].startValue)):c-Math.min(a[e].spacing,0.1*c)*(this.viewportMaximum-
a[e].startValue)/(a[e].endValue-a[e].startValue)));f.minimum=this.viewportMinimum;f.maximum=this.viewportMaximum;f.range=b;if("bottom"===this._position||"top"===this._position)this.logarithmic?(f.lnLogarithmBase=Math.log(this.logarithmBase),f.pixelPerUnit=(this.reversed?-1:1)*c*f.lnLogarithmBase/Math.log(Math.abs(b))):f.pixelPerUnit=(this.reversed?-1:1)*c/Math.abs(b),f.reference=this.reversed?this.lineCoordinates.x2:this.lineCoordinates.x1;if("left"===this._position||"right"===this._position)this.logarithmic?
(f.lnLogarithmBase=Math.log(this.logarithmBase),f.pixelPerUnit=(this.reversed?1:-1)*c*f.lnLogarithmBase/Math.log(Math.abs(b))):f.pixelPerUnit=(this.reversed?1:-1)*c/Math.abs(b),f.reference=this.reversed?this.lineCoordinates.y1:this.lineCoordinates.y2;this.conversionParameters=f};z.prototype.calculateAxisParameters=function(){if(this.logarithmic)this.calculateLogarithmicAxisParameters();else{var a=this.chart.layoutManager.getFreeSpace(),f=!1,c=!1;"bottom"===this._position||"top"===this._position?(this.maxWidth=
a.width,this.maxHeight=a.height):(this.maxWidth=a.height,this.maxHeight=a.width);var a="axisX"===this.type?"xySwapped"===this.chart.plotInfo.axisPlacement?62:70:"xySwapped"===this.chart.plotInfo.axisPlacement?50:40,b=4;"axisX"===this.type&&(b=600>this.maxWidth?8:6);var a=Math.max(b,Math.floor(this.maxWidth/a)),e,d,k,b=0;!g(this.options.viewportMinimum)&&(!g(this.options.viewportMaximum)&&this.options.viewportMinimum>=this.options.viewportMaximum)&&(this.viewportMinimum=this.viewportMaximum=null);
if(g(this.options.viewportMinimum)&&!g(this.sessionVariables.newViewportMinimum)&&!isNaN(this.sessionVariables.newViewportMinimum))this.viewportMinimum=this.sessionVariables.newViewportMinimum;else if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum=this.minimum;if(g(this.options.viewportMaximum)&&!g(this.sessionVariables.newViewportMaximum)&&!isNaN(this.sessionVariables.newViewportMaximum))this.viewportMaximum=this.sessionVariables.newViewportMaximum;else if(null===this.viewportMaximum||
isNaN(this.viewportMaximum))this.viewportMaximum=this.maximum;if(this.scaleBreaks)for(b=0;b<this.scaleBreaks._appliedBreaks.length;b++)if((!g(this.sessionVariables.newViewportMinimum)&&this.sessionVariables.newViewportMinimum>=this.scaleBreaks._appliedBreaks[b].startValue||!g(this.options.minimum)&&this.options.minimum>=this.scaleBreaks._appliedBreaks[b].startValue||!g(this.options.viewportMinimum)&&this.viewportMinimum>=this.scaleBreaks._appliedBreaks[b].startValue)&&(!g(this.sessionVariables.newViewportMaximum)&&
this.sessionVariables.newViewportMaximum<=this.scaleBreaks._appliedBreaks[b].endValue||!g(this.options.maximum)&&this.options.maximum<=this.scaleBreaks._appliedBreaks[b].endValue||!g(this.options.viewportMaximum)&&this.viewportMaximum<=this.scaleBreaks._appliedBreaks[b].endValue)){this.scaleBreaks._appliedBreaks.splice(b,1);break}if("axisX"===this.type){if(this.dataSeries&&0<this.dataSeries.length)for(e=0;e<this.dataSeries.length;e++)"dateTime"===this.dataSeries[e].xValueType&&(c=!0);e=null!==this.viewportMinimum?
this.viewportMinimum:this.dataInfo.viewPortMin;d=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax;0===d-e&&(b="undefined"===typeof this.options.interval?0.4:this.options.interval,d+=b,e-=b);Infinity!==this.dataInfo.minDiff?k=this.dataInfo.minDiff:1<d-e?k=0.5*Math.abs(d-e):(k=1,c&&(f=!0))}else"axisY"===this.type&&(e=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin,d=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax,isFinite(e)||
isFinite(d)?isFinite(e)?isFinite(d)||(d=e):e=d:(d="undefined"===typeof this.options.interval?-Infinity:this.options.interval,e="undefined"!==typeof this.options.interval||isFinite(this.dataInfo.minDiff)?0:Infinity),0===e&&0===d?(d+=9,e=0):0===d-e?(b=Math.min(Math.abs(0.01*Math.abs(d)),5),d+=b,e-=b):e>d?(b=Math.min(0.01*Math.abs(this.getApparentDifference(d,e,null,!0)),5),0<=d?e=d-b:d=isFinite(e)?e+b:0):(b=Math.min(0.01*Math.abs(this.getApparentDifference(e,d,null,!0)),0.05),0!==d&&(d+=b),0!==e&&(e-=
b)),k=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:1<d-e?0.5*Math.abs(d-e):1,this.includeZero&&(null===this.viewportMinimum||isNaN(this.viewportMinimum))&&0<e&&(e=0),this.includeZero&&(null===this.viewportMaximum||isNaN(this.viewportMaximum))&&0>d&&(d=0));b=this.getApparentDifference(isNaN(this.viewportMinimum)||null===this.viewportMinimum?e:this.viewportMinimum,isNaN(this.viewportMaximum)||null===this.viewportMaximum?d:this.viewportMaximum,null,!0);if("axisX"===this.type&&c){this.intervalType||
(b/1<=a?(this.interval=1,this.intervalType="millisecond"):b/2<=a?(this.interval=2,this.intervalType="millisecond"):b/5<=a?(this.interval=5,this.intervalType="millisecond"):b/10<=a?(this.interval=10,this.intervalType="millisecond"):b/20<=a?(this.interval=20,this.intervalType="millisecond"):b/50<=a?(this.interval=50,this.intervalType="millisecond"):b/100<=a?(this.interval=100,this.intervalType="millisecond"):b/200<=a?(this.interval=200,this.intervalType="millisecond"):b/250<=a?(this.interval=250,this.intervalType=
"millisecond"):b/300<=a?(this.interval=300,this.intervalType="millisecond"):b/400<=a?(this.interval=400,this.intervalType="millisecond"):b/500<=a?(this.interval=500,this.intervalType="millisecond"):b/(1*W.secondDuration)<=a?(this.interval=1,this.intervalType="second"):b/(2*W.secondDuration)<=a?(this.interval=2,this.intervalType="second"):b/(5*W.secondDuration)<=a?(this.interval=5,this.intervalType="second"):b/(10*W.secondDuration)<=a?(this.interval=10,this.intervalType="second"):b/(15*W.secondDuration)<=
a?(this.interval=15,this.intervalType="second"):b/(20*W.secondDuration)<=a?(this.interval=20,this.intervalType="second"):b/(30*W.secondDuration)<=a?(this.interval=30,this.intervalType="second"):b/(1*W.minuteDuration)<=a?(this.interval=1,this.intervalType="minute"):b/(2*W.minuteDuration)<=a?(this.interval=2,this.intervalType="minute"):b/(5*W.minuteDuration)<=a?(this.interval=5,this.intervalType="minute"):b/(10*W.minuteDuration)<=a?(this.interval=10,this.intervalType="minute"):b/(15*W.minuteDuration)<=
a?(this.interval=15,this.intervalType="minute"):b/(20*W.minuteDuration)<=a?(this.interval=20,this.intervalType="minute"):b/(30*W.minuteDuration)<=a?(this.interval=30,this.intervalType="minute"):b/(1*W.hourDuration)<=a?(this.interval=1,this.intervalType="hour"):b/(2*W.hourDuration)<=a?(this.interval=2,this.intervalType="hour"):b/(3*W.hourDuration)<=a?(this.interval=3,this.intervalType="hour"):b/(6*W.hourDuration)<=a?(this.interval=6,this.intervalType="hour"):b/(1*W.dayDuration)<=a?(this.interval=1,
this.intervalType="day"):b/(2*W.dayDuration)<=a?(this.interval=2,this.intervalType="day"):b/(4*W.dayDuration)<=a?(this.interval=4,this.intervalType="day"):b/(1*W.weekDuration)<=a?(this.interval=1,this.intervalType="week"):b/(2*W.weekDuration)<=a?(this.interval=2,this.intervalType="week"):b/(3*W.weekDuration)<=a?(this.interval=3,this.intervalType="week"):b/(1*W.monthDuration)<=a?(this.interval=1,this.intervalType="month"):b/(2*W.monthDuration)<=a?(this.interval=2,this.intervalType="month"):b/(3*W.monthDuration)<=
a?(this.interval=3,this.intervalType="month"):b/(6*W.monthDuration)<=a?(this.interval=6,this.intervalType="month"):(this.interval=b/(1*W.yearDuration)<=a?1:b/(2*W.yearDuration)<=a?2:b/(4*W.yearDuration)<=a?4:Math.floor(z.getNiceNumber(b/(a-1),!0)/W.yearDuration),this.intervalType="year"));if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum=e-k/2;if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum=d+k/2;f?this.autoValueFormatString="MMM DD YYYY HH:mm":
"year"===this.intervalType?this.autoValueFormatString="YYYY":"month"===this.intervalType?this.autoValueFormatString="MMM YYYY":"week"===this.intervalType?this.autoValueFormatString="MMM DD YYYY":"day"===this.intervalType?this.autoValueFormatString="MMM DD YYYY":"hour"===this.intervalType?this.autoValueFormatString="hh:mm TT":"minute"===this.intervalType?this.autoValueFormatString="hh:mm TT":"second"===this.intervalType?this.autoValueFormatString="hh:mm:ss TT":"millisecond"===this.intervalType&&(this.autoValueFormatString=
"fff'ms'");this.valueFormatString||(this.valueFormatString=this.autoValueFormatString)}else{this.intervalType="number";b=z.getNiceNumber(b,!1);this.interval=this.options&&0<this.options.interval?this.options.interval:z.getNiceNumber(b/(a-1),!0);if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum="axisX"===this.type?e-k/2:Math.floor(e/this.interval)*this.interval;if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum="axisX"===this.type?d+k/2:
Math.ceil(d/this.interval)*this.interval;0===this.viewportMaximum&&0===this.viewportMinimum&&(0===this.options.viewportMinimum?this.viewportMaximum+=10:0===this.options.viewportMaximum&&(this.viewportMinimum-=10),this.options&&"undefined"===typeof this.options.interval&&(this.interval=z.getNiceNumber((this.viewportMaximum-this.viewportMinimum)/(a-1),!0)))}if(null===this.minimum||null===this.maximum)if("axisX"===this.type?(e=null!==this.minimum?this.minimum:this.dataInfo.min,d=null!==this.maximum?
this.maximum:this.dataInfo.max,0===d-e&&(b="undefined"===typeof this.options.interval?0.4:this.options.interval,d+=b,e-=b),k=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:1<d-e?0.5*Math.abs(d-e):1):"axisY"===this.type&&(e=null!==this.minimum?this.minimum:this.dataInfo.min,d=null!==this.maximum?this.maximum:this.dataInfo.max,isFinite(e)||isFinite(d)?0===e&&0===d?(d+=9,e=0):0===d-e?(b=Math.min(Math.abs(0.01*Math.abs(d)),5),d+=b,e-=b):e>d?(b=Math.min(0.01*Math.abs(this.getApparentDifference(d,
e,null,!0)),5),0<=d?e=d-b:d=isFinite(e)?e+b:0):(b=Math.min(0.01*Math.abs(this.getApparentDifference(e,d,null,!0)),0.05),0!==d&&(d+=b),0!==e&&(e-=b)):(d="undefined"===typeof this.options.interval?-Infinity:this.options.interval,e="undefined"!==typeof this.options.interval||isFinite(this.dataInfo.minDiff)?0:Infinity),k=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:1<d-e?0.5*Math.abs(d-e):1,this.includeZero&&(null===this.minimum||isNaN(this.minimum))&&0<e&&(e=0),this.includeZero&&(null===this.maximum||
isNaN(this.maximum))&&0>d&&(d=0)),Math.abs(this.getApparentDifference(e,d,null,!0)),"axisX"===this.type&&c){this.valueType="dateTime";if(null===this.minimum||isNaN(this.minimum))this.minimum=e-k/2,this.minimum=Math.min(this.minimum,null===this.sessionVariables.viewportMinimum||isNaN(this.sessionVariables.viewportMinimum)?Infinity:this.sessionVariables.viewportMinimum);if(null===this.maximum||isNaN(this.maximum))this.maximum=d+k/2,this.maximum=Math.max(this.maximum,null===this.sessionVariables.viewportMaximum||
isNaN(this.sessionVariables.viewportMaximum)?-Infinity:this.sessionVariables.viewportMaximum)}else this.intervalType=this.valueType="number",null===this.minimum&&(this.minimum="axisX"===this.type?e-k/2:Math.floor(e/this.interval)*this.interval,this.minimum=Math.min(this.minimum,null===this.sessionVariables.viewportMinimum||isNaN(this.sessionVariables.viewportMinimum)?Infinity:this.sessionVariables.viewportMinimum)),null===this.maximum&&(this.maximum="axisX"===this.type?d+k/2:Math.ceil(d/this.interval)*
this.interval,this.maximum=Math.max(this.maximum,null===this.sessionVariables.viewportMaximum||isNaN(this.sessionVariables.viewportMaximum)?-Infinity:this.sessionVariables.viewportMaximum)),0===this.maximum&&0===this.minimum&&(0===this.options.minimum?this.maximum+=10:0===this.options.maximum&&(this.minimum-=10));g(this.sessionVariables.newViewportMinimum)&&(this.viewportMinimum=Math.max(this.viewportMinimum,this.minimum));g(this.sessionVariables.newViewportMaximum)&&(this.viewportMaximum=Math.min(this.viewportMaximum,
this.maximum));this.range=this.viewportMaximum-this.viewportMinimum;this.intervalStartPosition="axisX"===this.type&&c?this.getLabelStartPoint(new Date(this.viewportMinimum),this.intervalType,this.interval):Math.floor((this.viewportMinimum+0.2*this.interval)/this.interval)*this.interval;this.valueFormatString||(this.valueFormatString=z.generateValueFormatString(this.range,2))}};z.prototype.calculateLogarithmicAxisParameters=function(){var a=this.chart.layoutManager.getFreeSpace(),f=Math.log(this.logarithmBase),
c;"bottom"===this._position||"top"===this._position?(this.maxWidth=a.width,this.maxHeight=a.height):(this.maxWidth=a.height,this.maxHeight=a.width);var a="axisX"===this.type?500>this.maxWidth?7:Math.max(7,Math.floor(this.maxWidth/100)):Math.max(Math.floor(this.maxWidth/50),3),b,d,h,k;k=1;if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum=this.minimum;if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum=this.maximum;if(this.scaleBreaks)for(k=
0;k<this.scaleBreaks._appliedBreaks.length;k++)if((!g(this.sessionVariables.newViewportMinimum)&&this.sessionVariables.newViewportMinimum>=this.scaleBreaks._appliedBreaks[k].startValue||!g(this.options.minimum)&&this.options.minimum>=this.scaleBreaks._appliedBreaks[k].startValue||!g(this.options.viewportMinimum)&&this.viewportMinimum>=this.scaleBreaks._appliedBreaks[k].startValue)&&(!g(this.sessionVariables.newViewportMaximum)&&this.sessionVariables.newViewportMaximum<=this.scaleBreaks._appliedBreaks[k].endValue||
!g(this.options.maximum)&&this.options.maximum<=this.scaleBreaks._appliedBreaks[k].endValue||!g(this.options.viewportMaximum)&&this.viewportMaximum<=this.scaleBreaks._appliedBreaks[k].endValue)){this.scaleBreaks._appliedBreaks.splice(k,1);break}"axisX"===this.type?(b=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin,d=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax,1===d/b&&(k=Math.pow(this.logarithmBase,"undefined"===typeof this.options.interval?
0.4:this.options.interval),d*=k,b/=k),h=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:d/b>this.logarithmBase?d/b*Math.pow(this.logarithmBase,0.5):this.logarithmBase):"axisY"===this.type&&(b=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin,d=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax,0>=b&&!isFinite(d)?(d="undefined"===typeof this.options.interval?0:this.options.interval,b=1):0>=b?b=d:isFinite(d)||(d=b),1===b&&1===d?(d*=this.logarithmBase-
1/this.logarithmBase,b=1):1===d/b?(k=Math.min(d*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,5)),d*=k,b/=k):b>d?(k=Math.min(b/d*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,5)),1<=d?b=d/k:d=b*k):(k=Math.min(d/b*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,0.04)),1!==d&&(d*=k),1!==b&&(b/=k)),h=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:d/b>this.logarithmBase?d/b*Math.pow(this.logarithmBase,0.5):this.logarithmBase,this.includeZero&&(null===
this.viewportMinimum||isNaN(this.viewportMinimum))&&1<b&&(b=1),this.includeZero&&(null===this.viewportMaximum||isNaN(this.viewportMaximum))&&1>d&&(d=1));k=(isNaN(this.viewportMaximum)||null===this.viewportMaximum?d:this.viewportMaximum)/(isNaN(this.viewportMinimum)||null===this.viewportMinimum?b:this.viewportMinimum);var t=(isNaN(this.viewportMaximum)||null===this.viewportMaximum?d:this.viewportMaximum)-(isNaN(this.viewportMinimum)||null===this.viewportMinimum?b:this.viewportMinimum);this.intervalType=
"number";k=Math.pow(this.logarithmBase,z.getNiceNumber(Math.abs(Math.log(k)/f),!1));this.options&&0<this.options.interval?this.interval=this.options.interval:(this.interval=z.getNiceExponent(Math.log(k)/f/(a-1),!0),c=z.getNiceNumber(t/(a-1),!0));if(null===this.viewportMinimum||isNaN(this.viewportMinimum))this.viewportMinimum="axisX"===this.type?b/Math.sqrt(h):Math.pow(this.logarithmBase,this.interval*Math.floor(Math.log(b)/f/this.interval));if(null===this.viewportMaximum||isNaN(this.viewportMaximum))this.viewportMaximum=
"axisX"===this.type?d*Math.sqrt(h):Math.pow(this.logarithmBase,this.interval*Math.ceil(Math.log(d)/f/this.interval));1===this.viewportMaximum&&1===this.viewportMinimum&&(1===this.options.viewportMinimum?this.viewportMaximum*=this.logarithmBase-1/this.logarithmBase:1===this.options.viewportMaximum&&(this.viewportMinimum/=this.logarithmBase-1/this.logarithmBase),this.options&&"undefined"===typeof this.options.interval&&(this.interval=z.getNiceExponent(Math.ceil(Math.log(k)/f)/(a-1)),c=z.getNiceNumber((this.viewportMaximum-
this.viewportMinimum)/(a-1),!0)));if(null===this.minimum||null===this.maximum)"axisX"===this.type?(b=null!==this.minimum?this.minimum:this.dataInfo.min,d=null!==this.maximum?this.maximum:this.dataInfo.max,1===d/b&&(k=Math.pow(this.logarithmBase,"undefined"===typeof this.options.interval?0.4:this.options.interval),d*=k,b/=k),h=Infinity!==this.dataInfo.minDiff?this.dataInfo.minDiff:d/b>this.logarithmBase?d/b*Math.pow(this.logarithmBase,0.5):this.logarithmBase):"axisY"===this.type&&(b=null!==this.minimum?
this.minimum:this.dataInfo.min,d=null!==this.maximum?this.maximum:this.dataInfo.max,isFinite(b)||isFinite(d)?1===b&&1===d?(d*=this.logarithmBase,b/=this.logarithmBase):1===d/b?(k=Math.pow(this.logarithmBase,this.interval),d*=k,b/=k):b>d?(k=Math.min(0.01*(b/d),5),1<=d?b=d/k:d=b*k):(k=Math.min(d/b*Math.pow(this.logarithmBase,0.01),Math.pow(this.logarithmBase,0.04)),1!==d&&(d*=k),1!==b&&(b/=k)):(d="undefined"===typeof this.options.interval?0:this.options.interval,b=1),h=Infinity!==this.dataInfo.minDiff?
this.dataInfo.minDiff:d/b>this.logarithmBase?d/b*Math.pow(this.logarithmBase,0.5):this.logarithmBase,this.includeZero&&(null===this.minimum||isNaN(this.minimum))&&1<b&&(b=1),this.includeZero&&(null===this.maximum||isNaN(this.maximum))&&1>d&&(d=1)),this.intervalType="number",null===this.minimum&&(this.minimum="axisX"===this.type?b/Math.sqrt(h):Math.pow(this.logarithmBase,this.interval*Math.floor(Math.log(b)/f/this.interval)),g(null===this.sessionVariables.viewportMinimum||isNaN(this.sessionVariables.viewportMinimum)?
"undefined"===typeof this.sessionVariables.newViewportMinimum?Infinity:this.sessionVariables.newViewportMinimum:this.sessionVariables.viewportMinimum)||(this.minimum=Math.min(this.minimum,null===this.sessionVariables.viewportMinimum||isNaN(this.sessionVariables.viewportMinimum)?"undefined"===typeof this.sessionVariables.newViewportMinimum?Infinity:this.sessionVariables.newViewportMinimum:this.sessionVariables.viewportMinimum))),null===this.maximum&&(this.maximum="axisX"===this.type?d*Math.sqrt(h):
Math.pow(this.logarithmBase,this.interval*Math.ceil(Math.log(d)/f/this.interval)),g(null===this.sessionVariables.viewportMaximum||isNaN(this.sessionVariables.viewportMaximum)?"undefined"===typeof this.sessionVariables.newViewportMaximum?0:this.sessionVariables.newViewportMaximum:this.sessionVariables.viewportMaximum)||(this.maximum=Math.max(this.maximum,null===this.sessionVariables.viewportMaximum||isNaN(this.sessionVariables.viewportMaximum)?"undefined"===typeof this.sessionVariables.newViewportMaximum?
0:this.sessionVariables.newViewportMaximum:this.sessionVariables.viewportMaximum))),1===this.maximum&&1===this.minimum&&(1===this.options.minimum?this.maximum*=this.logarithmBase-1/this.logarithmBase:1===this.options.maximum&&(this.minimum/=this.logarithmBase-1/this.logarithmBase));this.viewportMinimum=Math.max(this.viewportMinimum,this.minimum);this.viewportMaximum=Math.min(this.viewportMaximum,this.maximum);this.viewportMinimum>this.viewportMaximum&&(!this.options.viewportMinimum&&!this.options.minimum||
this.options.viewportMaximum||this.options.maximum?this.options.viewportMinimum||this.options.minimum||!this.options.viewportMaximum&&!this.options.maximum||(this.viewportMinimum=this.minimum=(this.options.viewportMaximum||this.options.maximum)/Math.pow(this.logarithmBase,2*Math.ceil(this.interval))):this.viewportMaximum=this.maximum=this.options.viewportMinimum||this.options.minimum);b=Math.pow(this.logarithmBase,Math.floor(Math.log(this.viewportMinimum)/(f*this.interval)+0.2)*this.interval);this.range=
this.viewportMaximum/this.viewportMinimum;this.noTicks=a;if(!this.options.interval&&this.range<Math.pow(this.logarithmBase,8>this.viewportMaximum||3>a?2:3)){for(f=Math.floor(this.viewportMinimum/c+0.5)*c;f<this.viewportMinimum;)f+=c;this.equidistantInterval=!1;this.intervalStartPosition=f;this.interval=c}else this.options.interval||(c=Math.ceil(this.interval),this.range>this.interval&&(this.interval=c,b=Math.pow(this.logarithmBase,Math.floor(Math.log(this.viewportMinimum)/(f*this.interval)+0.2)*this.interval))),
this.equidistantInterval=!0,this.intervalStartPosition=b;if(!this.valueFormatString&&(this.valueFormatString="#,##0.##",1>this.viewportMinimum)){f=Math.floor(Math.abs(Math.log(this.viewportMinimum)/Math.LN10))+2;if(isNaN(f)||!isFinite(f))f=2;if(2<f)for(k=0;k<f-2;k++)this.valueFormatString+="#"}};z.generateValueFormatString=function(a,f){var c="#,##0.",b=f;1>a&&(b+=Math.floor(Math.abs(Math.log(a)/Math.LN10)),isNaN(b)||!isFinite(b))&&(b=f);for(var d=0;d<b;d++)c+="#";return c};z.getNiceExponent=function(a,
f){var c=Math.floor(Math.log(a)/Math.LN10),b=a/Math.pow(10,c),b=0>c?1>=b?1:5>=b?5:10:Math.max(Math.floor(b),1);return-20>c?Number(b*Math.pow(10,c)):Number((b*Math.pow(10,c)).toFixed(20))};z.getNiceNumber=function(a,f){var c=Math.floor(Math.log(a)/Math.LN10),b=a/Math.pow(10,c),b=f?1.5>b?1:3>b?2:7>b?5:10:1>=b?1:2>=b?2:5>=b?5:10;return-20>c?Number(b*Math.pow(10,c)):Number((b*Math.pow(10,c)).toFixed(20))};z.prototype.getLabelStartPoint=function(){var a=W[this.intervalType+"Duration"]*this.interval,a=
new Date(Math.floor(this.viewportMinimum/a)*a);if("millisecond"!==this.intervalType)if("second"===this.intervalType)0<a.getMilliseconds()&&(a.setSeconds(a.getSeconds()+1),a.setMilliseconds(0));else if("minute"===this.intervalType){if(0<a.getSeconds()||0<a.getMilliseconds())a.setMinutes(a.getMinutes()+1),a.setSeconds(0),a.setMilliseconds(0)}else if("hour"===this.intervalType){if(0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())a.setHours(a.getHours()+1),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else if("day"===
this.intervalType){if(0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())a.setDate(a.getDate()+1),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else if("week"===this.intervalType){if(0<a.getDay()||0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())a.setDate(a.getDate()+(7-a.getDay())),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else if("month"===this.intervalType){if(1<a.getDate()||0<a.getHours()||0<a.getMinutes()||
0<a.getSeconds()||0<a.getMilliseconds())a.setMonth(a.getMonth()+1),a.setDate(1),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0)}else"year"===this.intervalType&&(0<a.getMonth()||1<a.getDate()||0<a.getHours()||0<a.getMinutes()||0<a.getSeconds()||0<a.getMilliseconds())&&(a.setFullYear(a.getFullYear()+1),a.setMonth(0),a.setDate(1),a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0));return a};ia(M,aa);ia(Y,aa);Y.prototype.createUserOptions=function(a){if("undefined"!==
typeof a||this.options._isPlaceholder){var f=0;this.parent.options._isPlaceholder&&this.parent.createUserOptions();this.options._isPlaceholder||(Da(this.parent[this.optionsName]),f=this.parent.options[this.optionsName].indexOf(this.options));this.options="undefined"===typeof a?{}:a;this.parent.options[this.optionsName][f]=this.options}};Y.prototype.render=function(a){if(0!==this.spacing||0!==this.options.lineThickness&&("undefined"!==typeof this.options.lineThickness||0!==this.parent.lineThickness)){var f=
this.ctx,c=this.ctx.globalAlpha;this.ctx=a||this.ctx;this.ctx.save();this.ctx.beginPath();this.ctx.rect(this.chart.plotArea.x1,this.chart.plotArea.y1,this.chart.plotArea.width,this.chart.plotArea.height);this.ctx.clip();var b=this.scaleBreaks.parent.getPixelCoordinatesOnAxis(this.startValue),d=this.scaleBreaks.parent.getPixelCoordinatesOnAxis(this.endValue);this.ctx.strokeStyle=this.lineColor;this.ctx.fillStyle=this.color;this.ctx.beginPath();this.ctx.globalAlpha=1;S(this.id);var h,g,k,t,m,n;a=Math.max(this.spacing,
3);var p=Math.max(0,this.lineThickness);this.ctx.lineWidth=p;this.ctx.setLineDash&&this.ctx.setLineDash(R(this.lineDashType,p));if("bottom"===this.scaleBreaks.parent._position||"top"===this.scaleBreaks.parent._position)if(b=1===p%2?(b.x<<0)+0.5:b.x<<0,g=1===p%2?(d.x<<0)+0.5:d.x<<0,"top"===this.scaleBreaks.parent._position?(d=this.chart.plotArea.y1,k=this.chart.plotArea.y2+p/2+0.5<<0):(d=this.chart.plotArea.y2,k=this.chart.plotArea.y1-p/2+0.5<<0,a*=-1),this.bounds={x1:b-p/2,y1:d,x2:g+p/2,y2:k},this.ctx.moveTo(b,
d),"straight"===this.type||"top"===this.scaleBreaks.parent._position&&0>=a||"bottom"===this.scaleBreaks.parent._position&&0<=a)this.ctx.lineTo(b,k),this.ctx.lineTo(g,k),this.ctx.lineTo(g,d);else if("wavy"===this.type){t=b;m=d;h=0.5;n=(k-m)/a/3;for(var q=0;q<n;q++)this.ctx.bezierCurveTo(t+h*a,m+a,t+h*a,m+2*a,t,m+3*a),m+=3*a,h*=-1;this.ctx.bezierCurveTo(t+h*a,m+a,t+h*a,m+2*a,t,m+3*a);t=g;h*=-1;this.ctx.lineTo(t,m);for(q=0;q<n;q++)this.ctx.bezierCurveTo(t+h*a,m-a,t+h*a,m-2*a,t,m-3*a),m-=3*a,h*=-1}else{if("zigzag"===
this.type){h=-1;m=d+a;t=b+a;n=(k-m)/a/2;for(q=0;q<n;q++)this.ctx.lineTo(t,m),t+=2*h*a,m+=2*a,h*=-1;this.ctx.lineTo(t,m);t+=g-b;for(q=0;q<n+1;q++)this.ctx.lineTo(t,m),t+=2*h*a,m-=2*a,h*=-1;this.ctx.lineTo(t+h*a,m+a)}}else if("left"===this.scaleBreaks.parent._position||"right"===this.scaleBreaks.parent._position)if(d=1===p%2?(d.y<<0)+0.5:d.y<<0,k=1===p%2?(b.y<<0)+0.5:b.y<<0,"left"===this.scaleBreaks.parent._position?(b=this.chart.plotArea.x1,g=this.chart.plotArea.x2+p/2+0.5<<0):(b=this.chart.plotArea.x2,
g=this.chart.plotArea.x1-p/2+0.5<<0,a*=-1),this.bounds={x1:b,y1:d-p/2,x2:g,y2:k+p/2},this.ctx.moveTo(b,d),"straight"===this.type||"left"===this.scaleBreaks.parent._position&&0>=a||"right"===this.scaleBreaks.parent._position&&0<=a)this.ctx.lineTo(g,d),this.ctx.lineTo(g,k),this.ctx.lineTo(b,k);else if("wavy"===this.type){t=b;m=d;h=0.5;n=(g-t)/a/3;for(q=0;q<n;q++)this.ctx.bezierCurveTo(t+a,m+h*a,t+2*a,m+h*a,t+3*a,m),t+=3*a,h*=-1;this.ctx.bezierCurveTo(t+a,m+h*a,t+2*a,m+h*a,t+3*a,m);m=k;h*=-1;this.ctx.lineTo(t,
m);for(q=0;q<n;q++)this.ctx.bezierCurveTo(t-a,m+h*a,t-2*a,m+h*a,t-3*a,m),t-=3*a,h*=-1}else if("zigzag"===this.type){h=1;m=d-a;t=b+a;n=(g-t)/a/2;for(q=0;q<n;q++)this.ctx.lineTo(t,m),m+=2*h*a,t+=2*a,h*=-1;this.ctx.lineTo(t,m);m+=k-d;for(q=0;q<n+1;q++)this.ctx.lineTo(t,m),m+=2*h*a,t-=2*a,h*=-1;this.ctx.lineTo(t+a,m+h*a)}0<p&&this.ctx.stroke();this.ctx.closePath();this.ctx.globalAlpha=this.fillOpacity;this.ctx.globalCompositeOperation="destination-over";this.ctx.fill();this.ctx.restore();this.ctx.globalAlpha=
c;this.ctx=f}};ia(N,aa);N.prototype.createUserOptions=function(a){if("undefined"!==typeof a||this.options._isPlaceholder){var d=0;this.parent.options._isPlaceholder&&this.parent.createUserOptions();this.options._isPlaceholder||(Da(this.parent.stripLines),d=this.parent.options.stripLines.indexOf(this.options));this.options="undefined"===typeof a?{}:a;this.parent.options.stripLines[d]=this.options}};N.prototype.render=function(){this.ctx.save();var a=this.parent.getPixelCoordinatesOnAxis(this.value),
d=Math.abs("pixel"===this._thicknessType?this.thickness:Math.abs(this.parent.convertValueToPixel(this.endValue)-this.parent.convertValueToPixel(this.startValue)));if(0<d){var c=null===this.opacity?1:this.opacity;this.ctx.strokeStyle=this.color;this.ctx.beginPath();var b=this.ctx.globalAlpha;this.ctx.globalAlpha=c;S(this.id);var e,h,g,k;this.ctx.lineWidth=d;this.ctx.setLineDash&&this.ctx.setLineDash(R(this.lineDashType,d));if("bottom"===this.parent._position||"top"===this.parent._position)e=h=1===
this.ctx.lineWidth%2?(a.x<<0)+0.5:a.x<<0,g=this.chart.plotArea.y1,k=this.chart.plotArea.y2,this.bounds={x1:e-d/2,y1:g,x2:h+d/2,y2:k};else if("left"===this.parent._position||"right"===this.parent._position)g=k=1===this.ctx.lineWidth%2?(a.y<<0)+0.5:a.y<<0,e=this.chart.plotArea.x1,h=this.chart.plotArea.x2,this.bounds={x1:e,y1:g-d/2,x2:h,y2:k+d/2};this.ctx.moveTo(e,g);this.ctx.lineTo(h,k);this.ctx.stroke();this.ctx.globalAlpha=b}this.ctx.restore()};ia(X,aa);X.prototype.showAt=function(a){if(!this.enabled)return!1;
var d=this.chart,c=!1;d.resetOverlayedCanvas();d.clearedOverlayedCanvas=this.parent.type;this.chart.renderCrosshairs(this.parent);if("xySwapped"===d.plotInfo.axisPlacement)if("bottom"===this.parent._position)for(var b=0;b<d.axisY.length;b++)this.parent===d.axisY[b]&&(d.axisY[b]._crosshairValue=a>=d.axisY[b].viewportMinimum&&a<=d.axisY[b].viewportMaximum?a:null);else if("top"===this.parent._position)for(b=0;b<d.axisY2.length;b++)this.parent===d.axisY2[b]&&(d.axisY2[b]._crosshairValue=a>=d.axisY2[b].viewportMinimum&&
a<=d.axisY2[b].viewportMaximum?a:null);else if("left"===this.parent._position)for(b=0;b<d.axisX.length;b++)this.parent===d.axisX[b]&&(d.axisX[b]._crosshairValue=a>=d.axisX[b].viewportMinimum&&a<=d.axisX[b].viewportMaximum?a:null);else{if("right"===this.parent._position)for(b=0;b<d.axisX2.length;b++)this.parent===d.axisX2[b]&&(d.axisX2[b]._crosshairValue=a>=d.axisX2[b].viewportMinimum&&a<=d.axisX2[b].viewportMaximum?a:null)}else if("bottom"===this.parent._position)for(b=0;b<d.axisX.length;b++)this.parent===
d.axisX[b]&&(d.axisX[b]._crosshairValue=a>=d.axisX[b].viewportMinimum&&a<=d.axisX[b].viewportMaximum?a:null);else if("top"===this.parent._position)for(b=0;b<d.axisX2.length;b++)this.parent===d.axisX2[b]&&(d.axisX2[b]._crosshairValue=a>=d.axisX2[b].viewportMinimum&&a<=d.axisX2[b].viewportMaximum?a:null);else if("left"===this.parent._position)for(b=0;b<d.axisY.length;b++)this.parent===d.axisY[b]&&(d.axisY[b]._crosshairValue=a>=d.axisY[b].viewportMinimum&&a<=d.axisY[b].viewportMaximum?a:null);else if("right"===
this.parent._position)for(b=0;b<d.axisY2.length;b++)this.parent===d.axisY2[b]&&(d.axisY2[b]._crosshairValue=a>=d.axisY2[b].viewportMinimum&&a<=d.axisY2[b].viewportMaximum?a:null);for(b=0;b<d.axisX.length;b++)a=d.axisX[b]._crosshairValue,d.axisX[b].crosshair&&(d.axisX[b].crosshair.enabled&&!g(a)&&a>=d.axisX[b].viewportMinimum&&a<=d.axisX[b].viewportMaximum)&&(d.axisX[b].showCrosshair(a),d.axisX[b].crosshair._updatedValue=a,this===d.axisX[b].crosshair&&(c=!0));for(b=0;b<d.axisX2.length;b++)a=d.axisX2[b]._crosshairValue,
d.axisX2[b].crosshair&&(d.axisX2[b].crosshair.enabled&&!g(a)&&a>=d.axisX2[b].viewportMinimum&&a<=d.axisX2[b].viewportMaximum)&&(d.axisX2[b].showCrosshair(a),d.axisX2[b].crosshair._updatedValue=a,this===d.axisX2[b].crosshair&&(c=!0));for(b=0;b<d.axisY.length;b++)a=d.axisY[b]._crosshairValue,d.axisY[b].crosshair&&(d.axisY[b].crosshair.enabled&&!g(a)&&a>=d.axisY[b].viewportMinimum&&a<=d.axisY[b].viewportMaximum)&&(d.axisY[b].showCrosshair(a),d.axisY[b].crosshair._updatedValue=a,this===d.axisY[b].crosshair&&
(c=!0));for(b=0;b<d.axisY2.length;b++)a=d.axisY2[b]._crosshairValue,d.axisY2[b].crosshair&&(d.axisY2[b].crosshair.enabled&&!g(a)&&a>=d.axisY2[b].viewportMinimum&&a<=d.axisY2[b].viewportMaximum)&&(d.axisY2[b].showCrosshair(a),d.axisY2[b].crosshair._updatedValue=a,this===d.axisY2[b].crosshair&&(c=!0));this.chart.toolTip&&this.chart.toolTip._entries&&this.chart.toolTip.highlightObjects(this.chart.toolTip._entries);return c};X.prototype.hide=function(){this.chart.resetOverlayedCanvas();this.chart.renderCrosshairs(this.parent);
this._hidden=!0};X.prototype.render=function(a,d,c){var b,e,h,k,t=null,x=null,m=null,n="";if(!this.valueFormatString)if("dateTime"===this.parent.valueType)this.valueFormatString=this.parent.valueFormatString;else{var p=0,p="xySwapped"===this.chart.plotInfo.axisPlacement?50<this.parent.range?0:500<this.chart.width&&25>this.parent.range?2:Math.floor(Math.abs(Math.log(this.parent.range)/Math.LN10))+(5>this.parent.range?2:10>this.parent.range?1:0):50<this.parent.range?0:Math.floor(Math.abs(Math.log(this.parent.range)/
Math.LN10))+(5>this.parent.range?2:10>this.parent.range?1:0);this.valueFormatString=z.generateValueFormatString(this.parent.range,p)}var m=null===this.opacity?1:this.opacity,p=Math.abs("pixel"===this._thicknessType?this.thickness:this.parent.conversionParameters.pixelPerUnit*this.thickness),q=this.chart.overlaidCanvasCtx,l=q.globalAlpha;q.globalAlpha=m;q.beginPath();q.strokeStyle=this.color;q.lineWidth=p;q.save();this.labelFontSize=Math.abs(g(this.options.labelFontSize)?this.parent.labelFontSize:
this.labelFontSize);this.labelMaxWidth=g(this.options.labelMaxWidth)?0.3*this.chart.width:this.labelMaxWidth;this.labelMaxHeight=g(this.options.labelWrap)||this.labelWrap?0.3*this.chart.height:2*this.labelFontSize;0<p&&q.setLineDash&&q.setLineDash(R(this.lineDashType,p));m=new oa(q,{x:0,y:0,padding:{top:2,right:3,bottom:2,left:4},backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,borderThickness:this.labelBorderThickness,cornerRadius:this.labelCornerRadius,maxWidth:this.labelMaxWidth,
maxHeight:this.labelMaxHeight,angle:this.labelAngle,text:n,horizontalAlign:"left",fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle"});if(this.snapToDataPoint){var s=0,n=[];if("xySwapped"===this.chart.plotInfo.axisPlacement){var r=null;if("bottom"===this.parent._position||"top"===this.parent._position)s=this.parent.dataSeries[0].axisX.convertPixelToValue({y:d});else if("left"===
this.parent._position||"right"===this.parent._position)s=this.parent.convertPixelToValue({y:d});for(var u=0;u<this.parent.dataSeries.length;u++)(r=this.parent.dataSeries[u].getDataPointAtX(s,!0))&&0<=r.index&&(r.dataSeries=this.parent.dataSeries[u],null!==r.dataPoint.y&&r.dataSeries.visible&&n.push(r));r=null;if(0===n.length)return;n.sort(function(a,b){return a.distance-b.distance});r=Math.abs(a-this.parent.convertValueToPixel(n[0].dataPoint.y));u=0;if("rangeBar"===n[0].dataSeries.type||"error"===
n[0].dataSeries.type)for(var r=Math.abs(a-this.parent.convertValueToPixel(n[u].dataPoint.y[0])),v=0,s=0;s<n.length;s++)if(n[s].dataPoint.y&&n[s].dataPoint.y.length)for(var y=0;y<n[s].dataPoint.y.length;y++)v=Math.abs(a-this.parent.convertValueToPixel(n[s].dataPoint.y[y])),v<r&&(r=v,u=s);else v=Math.abs(a-this.parent.convertValueToPixel(n[s].dataPoint.y)),v<r&&(r=v,u=s);else if("stackedBar"===n[0].dataSeries.type)for(var r=Math.abs(a-this.parent.convertValueToPixel(n[0].dataPoint.y)),A=v=0,s=u=0;s<
n.length;s++)if(n[s].dataPoint.y&&n[s].dataPoint.y.length)for(y=0;y<n[s].dataPoint.y.length;y++)v=Math.abs(a-this.parent.convertValueToPixel(n[s].dataPoint.y[y])),v<r&&(r=v,u=s);else A+=n[s].dataPoint.y,v=Math.abs(a-this.parent.convertValueToPixel(A)),v<r&&(r=v,u=s);else if("stackedBar100"===n[0].dataSeries.type)for(var r=Math.abs(a-this.parent.convertValueToPixel(n[0].dataPoint.y)),D=A=v=0,s=0;s<n.length;s++)if(n[s].dataPoint.y&&n[s].dataPoint.y.length)for(y=0;y<n[s].dataPoint.y.length;y++)v=Math.abs(a-
this.parent.convertValueToPixel(n[s].dataPoint.y[y])),v<r&&(r=v,u=s);else A+=n[s].dataPoint.y,D=n[s].dataPoint.x.getTime?n[s].dataPoint.x.getTime():n[s].dataPoint.x,D=100*(A/n[s].dataSeries.plotUnit.dataPointYSums[D]),v=Math.abs(a-this.parent.convertValueToPixel(D)),v<r&&(r=v,u=s);else for(r=Math.abs(a-this.parent.convertValueToPixel(n[0].dataPoint.y)),s=u=v=0;s<n.length;s++)if(n[s].dataPoint.y&&n[s].dataPoint.y.length)for(y=0;y<n[s].dataPoint.y.length;y++)v=Math.abs(a-this.parent.convertValueToPixel(n[s].dataPoint.y[y])),
v<r&&(r=v,u=s);else v=Math.abs(a-this.parent.convertValueToPixel(n[s].dataPoint.y)),v<r&&(r=v,u=s);y=n[u];if("bottom"===this.parent._position||"top"===this.parent._position){b=0;if("rangeBar"===this.parent.dataSeries[u].type||"error"===this.parent.dataSeries[u].type){r=Math.abs(a-this.parent.convertValueToPixel(y.dataPoint.y[0]));for(s=v=0;s<y.dataPoint.y.length;s++)v=Math.abs(a-this.parent.convertValueToPixel(y.dataPoint.y[s])),v<r&&(r=v,b=s);t=1===q.lineWidth%2?(this.parent.convertValueToPixel(y.dataPoint.y[b])<<
0)+0.5:this.parent.convertValueToPixel(y.dataPoint.y[b])<<0;this.value=y.dataPoint.y[b];m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:y.dataPoint.y[b]}):g(this.options.label)?$(c?c:y.dataPoint.y[b],this.valueFormatString,this.chart._cultureInfo):this.label}else if("stackedBar"===this.parent.dataSeries[u].type){r=Math.abs(a-this.parent.convertValueToPixel(n[0].dataPoint.y));A=v=0;for(s=u;0<=s;s--)A+=n[s].dataPoint.y,v=Math.abs(a-
this.parent.convertValueToPixel(A)),v<r&&(r=v,b=s);t=1===q.lineWidth%2?(this.parent.convertValueToPixel(A)<<0)+0.5:this.parent.convertValueToPixel(A)<<0;this.value=A;m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:y.dataPoint.y}):g(this.options.label)?$(c?c:y.dataPoint.y,this.valueFormatString,this.chart._cultureInfo):this.label}else if("stackedBar100"===this.parent.dataSeries[u].type){r=Math.abs(a-this.parent.convertValueToPixel(n[0].dataPoint.y));
D=A=v=0;for(s=u;0<=s;s--)A+=n[s].dataPoint.y,D=n[s].dataPoint.x.getTime?n[s].dataPoint.x.getTime():n[s].dataPoint.x,D=100*(A/n[s].dataSeries.plotUnit.dataPointYSums[D]),v=Math.abs(a-this.parent.convertValueToPixel(D)),v<r&&(r=v,b=s);t=1===q.lineWidth%2?(this.parent.convertValueToPixel(D)<<0)+0.5:this.parent.convertValueToPixel(D)<<0;this.value=D;m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:D}):g(this.options.label)?$(c?c:D,
this.valueFormatString,this.chart._cultureInfo):this.label}else t=1===q.lineWidth%2?(this.parent.convertValueToPixel(y.dataPoint.y)<<0)+0.5:this.parent.convertValueToPixel(y.dataPoint.y)<<0,this.value=y.dataPoint.y,m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:y.dataPoint.y}):g(this.options.label)?$(c?c:y.dataPoint.y,this.valueFormatString,this.chart._cultureInfo):this.label;b=e=t;h=this.chart.plotArea.y1;k=this.chart.plotArea.y2;
this.bounds={x1:b-p/2,y1:h,x2:e+p/2,y2:k};m.x=b-m.measureText().width/2;m.x+m.width>this.chart.bounds.x2?m.x=this.chart.bounds.x2-m.width:m.x<this.chart.bounds.x1&&(m.x=this.chart.bounds.x1);m.y=this.parent.lineCoordinates.y2+("top"===this.parent._position?-m.height+this.parent.tickLength:m.fontSize/2)+2;m.y+m.height>this.chart.bounds.y2?m.y=this.chart.bounds.y2-m.height:m.y<this.chart.bounds.y1&&(m.y=this.chart.bounds.y1)}else if("left"===this.parent._position||"right"===this.parent._position){h=
k=x=1===q.lineWidth%2?(this.parent.convertValueToPixel(y.dataPoint.x)<<0)+0.5:this.parent.convertValueToPixel(y.dataPoint.x)<<0;b=this.chart.plotArea.x1;e=this.chart.plotArea.x2;this.bounds={x1:b,y1:h-p/2,x2:e,y2:k+p/2};D=!1;if(this.parent.labels)for(n=Math.ceil(this.parent.interval),s=0;s<this.parent.viewportMaximum;s+=n)if(this.parent.labels[s])D=!0;else{D=!1;break}if(D){if("axisX"===this.parent.type)for(s=this.parent.convertPixelToValue({y:d}),r=null,u=0;u<this.parent.dataSeries.length;u++)(r=
this.parent.dataSeries[u].getDataPointAtX(s,!0))&&0<=r.index&&(m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:y.dataPoint.x}):g(this.options.label)?r.dataPoint.label:this.label)}else"dateTime"===this.parent.valueType?m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:y.dataPoint.x}):g(this.options.label)?fa(y.dataPoint.x,this.valueFormatString,this.chart._cultureInfo):
this.label:"number"===this.parent.valueType&&(m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:y.dataPoint.x}):g(this.options.label)?$(y.dataPoint.x,this.valueFormatString,this.chart._cultureInfo):this.label);this.value=y.dataPoint.x;m.y=k+m.fontSize/2-m.measureText().height/2+2;m.y-m.fontSize/2<this.chart.bounds.y1?m.y=this.chart.bounds.y1+m.fontSize/2+2:m.y+m.measureText().height-m.fontSize/2>this.chart.bounds.y2&&(m.y=this.chart.bounds.y2-
m.measureText().height+m.fontSize/2);"left"===this.parent._position?m.x=this.parent.lineCoordinates.x2-m.measureText().width:"right"===this.parent._position&&(m.x=this.parent.lineCoordinates.x2)}}else if("bottom"===this.parent._position||"top"===this.parent._position){s=this.parent.convertPixelToValue({x:a});for(u=0;u<this.parent.dataSeries.length;u++)(r=this.parent.dataSeries[u].getDataPointAtX(s,!0))&&0<=r.index&&(r.dataSeries=this.parent.dataSeries[u],null!==r.dataPoint.y&&r.dataSeries.visible&&
n.push(r));if(0===n.length)return;n.sort(function(a,b){return a.distance-b.distance});y=n[0];b=e=t=1===q.lineWidth%2?(this.parent.convertValueToPixel(y.dataPoint.x)<<0)+0.5:this.parent.convertValueToPixel(y.dataPoint.x)<<0;h=this.chart.plotArea.y1;k=this.chart.plotArea.y2;this.bounds={x1:b-p/2,y1:h,x2:e+p/2,y2:k};D=!1;if(this.parent.labels)for(n=Math.ceil(this.parent.interval),s=0;s<this.parent.viewportMaximum;s+=n)if(this.parent.labels[s])D=!0;else{D=!1;break}if(D){if("axisX"===this.parent.type)for(s=
this.parent.convertPixelToValue({x:a}),r=null,u=0;u<this.parent.dataSeries.length;u++)(r=this.parent.dataSeries[u].getDataPointAtX(s,!0))&&0<=r.index&&(m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:y.dataPoint.x}):g(this.options.label)?r.dataPoint.label:this.label)}else"dateTime"===this.parent.valueType?m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:y.dataPoint.x}):
g(this.options.label)?fa(y.dataPoint.x,this.valueFormatString,this.chart._cultureInfo):this.label:"number"===this.parent.valueType&&(m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:y.dataPoint.x}):g(this.options.label)?$(y.dataPoint.x,this.valueFormatString,this.chart._cultureInfo):this.label);this.value=y.dataPoint.x;m.x=b-m.measureText().width/2;m.x+m.width>this.chart.bounds.x2&&(m.x=this.chart.bounds.x2-m.width);m.x<this.chart.bounds.x1&&
(m.x=this.chart.bounds.x1);"bottom"===this.parent._position?m.y=this.parent.lineCoordinates.y2+m.fontSize/2+2:"top"===this.parent._position&&(m.y=this.parent.lineCoordinates.y1-m.height+m.fontSize/2+2)}else if("left"===this.parent._position||"right"===this.parent._position){!g(this.parent.dataSeries)&&0<this.parent.dataSeries.length&&(s=this.parent.dataSeries[0].axisX.convertPixelToValue({x:a}));for(u=0;u<this.parent.dataSeries.length;u++)(r=this.parent.dataSeries[u].getDataPointAtX(s,!0))&&0<=r.index&&
(r.dataSeries=this.parent.dataSeries[u],null!==r.dataPoint.y&&r.dataSeries.visible&&n.push(r));if(0===n.length)return;n.sort(function(a,b){return a.distance-b.distance});u=0;if("rangeColumn"===n[0].dataSeries.type||"rangeArea"===n[0].dataSeries.type||"error"===n[0].dataSeries.type||"rangeSplineArea"===n[0].dataSeries.type||"candlestick"===n[0].dataSeries.type||"ohlc"===n[0].dataSeries.type||"boxAndWhisker"===n[0].dataSeries.type)for(r=Math.abs(d-this.parent.convertValueToPixel(n[0].dataPoint.y[0])),
s=v=0;s<n.length;s++)if(n[s].dataPoint.y&&n[s].dataPoint.y.length)for(y=0;y<n[s].dataPoint.y.length;y++)v=Math.abs(d-this.parent.convertValueToPixel(n[s].dataPoint.y[y])),v<r&&(r=v,u=s);else v=Math.abs(d-this.parent.convertValueToPixel(n[s].dataPoint.y)),v<r&&(r=v,u=s);else if("stackedColumn"===n[0].dataSeries.type||"stackedArea"===n[0].dataSeries.type)for(r=Math.abs(d-this.parent.convertValueToPixel(n[0].dataPoint.y)),s=A=v=0;s<n.length;s++)if(n[s].dataPoint.y&&n[s].dataPoint.y.length)for(y=0;y<
n[s].dataPoint.y.length;y++)v=Math.abs(d-this.parent.convertValueToPixel(n[s].dataPoint.y[y])),v<r&&(r=v,u=s);else A+=n[s].dataPoint.y,v=Math.abs(d-this.parent.convertValueToPixel(A)),v<r&&(r=v,u=s);else if("stackedColumn100"===n[0].dataSeries.type||"stackedArea100"===n[0].dataSeries.type)for(r=Math.abs(d-this.parent.convertValueToPixel(n[0].dataPoint.y)),s=D=A=v=0;s<n.length;s++)if(n[s].dataPoint.y&&n[s].dataPoint.y.length)for(y=0;y<n[s].dataPoint.y.length;y++)v=Math.abs(d-this.parent.convertValueToPixel(n[s].dataPoint.y[y])),
v<r&&(r=v,u=s);else A+=n[s].dataPoint.y,D=n[s].dataPoint.x.getTime?n[s].dataPoint.x.getTime():n[s].dataPoint.x,D=100*(A/n[s].dataSeries.plotUnit.dataPointYSums[D]),v=Math.abs(d-this.parent.convertValueToPixel(D)),v<r&&(r=v,u=s);else for(r=Math.abs(d-this.parent.convertValueToPixel(n[0].dataPoint.y)),s=v=0;s<n.length;s++)if(n[s].dataPoint.y&&n[s].dataPoint.y.length)for(y=0;y<n[s].dataPoint.y.length;y++)v=Math.abs(d-this.parent.convertValueToPixel(n[s].dataPoint.y[y])),v<r&&(r=v,u=s);else v=Math.abs(d-
this.parent.convertValueToPixel(n[s].dataPoint.y)),v<r&&(r=v,u=s);y=n[u];b=0;if("rangeColumn"===this.parent.dataSeries[u].type||"rangeArea"===this.parent.dataSeries[u].type||"error"===this.parent.dataSeries[u].type||"rangeSplineArea"===this.parent.dataSeries[u].type||"candlestick"===this.parent.dataSeries[u].type||"ohlc"===this.parent.dataSeries[u].type||"boxAndWhisker"===this.parent.dataSeries[u].type){r=Math.abs(d-this.parent.convertValueToPixel(y.dataPoint.y[0]));for(s=v=0;s<y.dataPoint.y.length;s++)v=
Math.abs(d-this.parent.convertValueToPixel(y.dataPoint.y[s])),v<r&&(r=v,b=s);x=1===q.lineWidth%2?(this.parent.convertValueToPixel(y.dataPoint.y[b])<<0)+0.5:this.parent.convertValueToPixel(y.dataPoint.y[b])<<0;m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:y.dataPoint.y[b]}):g(this.options.label)?$(c?c:y.dataPoint.y[b],this.valueFormatString,this.chart._cultureInfo):this.label;this.value=y.dataPoint.y[b]}else if("stackedColumn"===
this.parent.dataSeries[u].type||"stackedArea"===this.parent.dataSeries[u].type){r=Math.abs(d-this.parent.convertValueToPixel(n[0].dataPoint.y));A=v=0;for(s=u;0<=s;s--)A+=n[s].dataPoint.y,v=Math.abs(d-this.parent.convertValueToPixel(A)),v<r&&(r=v,b=s);x=1===q.lineWidth%2?(this.parent.convertValueToPixel(A)<<0)+0.5:this.parent.convertValueToPixel(A)<<0;m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:y.dataPoint.y}):g(this.options.label)?
$(c?c:y.dataPoint.y,this.valueFormatString,this.chart._cultureInfo):this.label;this.value=A}else if("stackedColumn100"===this.parent.dataSeries[u].type||"stackedArea100"===this.parent.dataSeries[u].type){r=Math.abs(d-this.parent.convertValueToPixel(n[0].dataPoint.y));A=v=0;for(s=u;0<=s;s--)A+=n[s].dataPoint.y,D=n[s].dataPoint.x.getTime?n[s].dataPoint.x.getTime():n[s].dataPoint.x,D=100*(A/n[s].dataSeries.plotUnit.dataPointYSums[D]),v=Math.abs(d-this.parent.convertValueToPixel(D)),v<r&&(r=v,b=s);x=
1===q.lineWidth%2?(this.parent.convertValueToPixel(D)<<0)+0.5:this.parent.convertValueToPixel(D)<<0;m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:D}):g(this.options.label)?$(c?c:D,this.valueFormatString,this.chart._cultureInfo):this.label;this.value=D}else"waterfall"===this.parent.dataSeries[u].type?(x=1===q.lineWidth%2?(this.parent.convertValueToPixel(y.dataSeries.dataPointEOs[y.index].cumulativeSum)<<0)+0.5:this.parent.convertValueToPixel(y.dataSeries.dataPointEOs[y.index].cumulativeSum)<<
0,m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:y.dataSeries.dataPointEOs[y.index].cumulativeSum}):g(this.options.label)?$(c?c:y.dataSeries.dataPointEOs[y.index].cumulativeSum,this.valueFormatString,this.chart._cultureInfo):this.label,this.value=y.dataSeries.dataPointEOs[y.index].cumulativeSum):(x=1===q.lineWidth%2?(g(a)?d:this.parent.convertValueToPixel(y.dataPoint.y)<<0)+0.5:g(a)?d:this.parent.convertValueToPixel(y.dataPoint.y)<<
0,m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:c?c:y.dataPoint.y}):g(this.options.label)?$(c?c:y.dataPoint.y,this.valueFormatString,this.chart._cultureInfo):this.label,this.value=y.dataPoint.y);h=k=x;b=this.chart.plotArea.x1;e=this.chart.plotArea.x2;this.bounds={x1:b,y1:h-p/2,x2:e,y2:k+p/2};m.y=k+m.fontSize/2-m.measureText().height/2+2;m.y-m.fontSize/2<this.chart.bounds.y1?m.y=this.chart.bounds.y1+m.fontSize/2+2:m.y+m.measureText().height-
m.fontSize/2>this.chart.bounds.y2&&(m.y=this.chart.bounds.y2-m.measureText().height+m.fontSize/2);"left"===this.parent._position?m.x=this.parent.lineCoordinates.x2-m.measureText().width:"right"===this.parent._position&&(m.x=this.parent.lineCoordinates.x2)}n=null;if("bottom"===this.parent._position||"top"===this.parent._position)"top"===this.parent._position&&m.y-m.fontSize/2<this.chart.bounds.y1&&(m.y=this.chart.bounds.y1+m.fontSize/2),"bottom"===this.parent._position&&this.parent.lineCoordinates.y2-
m.fontSize/2+m.measureText().height>this.chart.bounds.y2&&(m.y=this.chart.bounds.y2-m.height+m.fontSize/2+2),b>=this.parent.convertValueToPixel(this.parent.reversed?this.parent.viewportMaximum:this.parent.viewportMinimum)&&e<=this.parent.convertValueToPixel(this.parent.reversed?this.parent.viewportMinimum:this.parent.viewportMaximum)&&(0<p&&(q.moveTo(b,h),q.lineTo(e,k),q.stroke(),this._hidden=!1),q.restore());if("left"===this.parent._position||"right"===this.parent._position)"left"===this.parent._position&&
m.x<this.chart.bounds.x1&&(m.x=this.chart.bounds.x1),"right"===this.parent._position&&m.x+m.measureText().width>this.chart.bounds.x2&&(m.x=this.chart.bounds.x2-m.measureText().width),k>=this.parent.convertValueToPixel(this.parent.reversed?this.parent.viewportMinimum:this.parent.viewportMaximum)&&h<=this.parent.convertValueToPixel(this.parent.reversed?this.parent.viewportMaximum:this.parent.viewportMinimum)&&(0<p&&(q.moveTo(b,h),q.lineTo(e,k),q.stroke(),this._hidden=!1),q.restore())}else{if("bottom"===
this.parent._position||"top"===this.parent._position)b=e=t=1===q.lineWidth%2?(a<<0)+0.5:a<<0,h=this.chart.plotArea.y1,k=this.chart.plotArea.y2,this.bounds={x1:b-p/2,y1:h,x2:e+p/2,y2:k};else if("left"===this.parent._position||"right"===this.parent._position)h=k=x=1===q.lineWidth%2?(d<<0)+0.5:d<<0,b=this.chart.plotArea.x1,e=this.chart.plotArea.x2,this.bounds={x1:b,y1:h-p/2,x2:e,y2:k+p/2};if("xySwapped"===this.chart.plotInfo.axisPlacement)if("left"===this.parent._position||"right"===this.parent._position){D=
!1;if(this.parent.labels)for(n=Math.ceil(this.parent.interval),s=0;s<this.parent.viewportMaximum;s+=n)if(this.parent.labels[s])D=!0;else{D=!1;break}if(D){if("axisX"===this.parent.type)for(s=this.parent.convertPixelToValue({y:d}),r=null,u=0;u<this.parent.dataSeries.length;u++)(r=this.parent.dataSeries[u].getDataPointAtX(s,!0))&&0<=r.index&&(m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:c?c:this.parent.convertPixelToValue(a)}):
g(this.options.label)?r.dataPoint.label:this.label)}else"dateTime"===this.parent.valueType?m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:c?c:this.parent.convertPixelToValue(d)}):g(this.options.label)?fa(c?c:this.parent.convertPixelToValue(d),this.valueFormatString,this.chart._cultureInfo):this.label:"number"===this.parent.valueType&&(m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,
value:c?c:this.parent.convertPixelToValue(d)}):g(this.options.label)?$(c?c:this.parent.convertPixelToValue(d),this.valueFormatString,this.chart._cultureInfo):this.label);m.y=d+m.fontSize/2-m.measureText().height/2+2;m.y-m.fontSize/2<this.chart.bounds.y1?m.y=this.chart.bounds.y1+m.fontSize/2+2:m.y+m.measureText().height-m.fontSize/2>this.chart.bounds.y2&&(m.y=this.chart.bounds.y2-m.measureText().height+m.fontSize/2);"left"===this.parent._position?m.x=this.parent.lineCoordinates.x1-m.measureText().width:
"right"===this.parent._position&&(m.x=this.parent.lineCoordinates.x2)}else{if("bottom"===this.parent._position||"top"===this.parent._position)m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:c?c:this.parent.convertPixelToValue(a)}):g(this.options.label)?$(c?c:this.parent.convertPixelToValue(a),this.valueFormatString,this.chart._cultureInfo):this.label,m.x=b-m.measureText().width/2,m.x+m.width>this.chart.bounds.x2&&(m.x=this.chart.bounds.x2-
m.width),m.x<this.chart.bounds.x1&&(m.x=this.chart.bounds.x1),"bottom"===this.parent._position?m.y=this.parent.lineCoordinates.y2+m.fontSize/2+2:"top"===this.parent._position&&(m.y=this.parent.lineCoordinates.y1-m.height+m.fontSize/2+2)}else if("bottom"===this.parent._position||"top"===this.parent._position){D=!1;n="";if(this.parent.labels)for(n=Math.ceil(this.parent.interval),s=0;s<this.parent.viewportMaximum;s+=n)if(this.parent.labels[s])D=!0;else{D=!1;break}if(D){if("axisX"===this.parent.type)for(s=
this.parent.convertPixelToValue({x:a}),r=null,u=0;u<this.parent.dataSeries.length;u++)(r=this.parent.dataSeries[u].getDataPointAtX(s,!0))&&0<=r.index&&(m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:c?c:this.parent.convertPixelToValue(a)}):g(this.options.label)?c?c:r.dataPoint.label:this.label)}else"dateTime"===this.parent.valueType?m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,
value:c?c:this.parent.convertPixelToValue(a)}):g(this.options.label)?fa(c?c:this.parent.convertPixelToValue(a),this.valueFormatString,this.chart._cultureInfo):this.label:"number"===this.parent.valueType&&(m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:c?c:0<this.parent.dataSeries.length?this.parent.convertPixelToValue(a):""}):g(this.options.label)?$(c?c:this.parent.convertPixelToValue(a),this.valueFormatString,this.chart._cultureInfo):
this.label);m.x=b-m.measureText().width/2;m.x+m.width>this.chart.bounds.x2&&(m.x=this.chart.bounds.x2-m.width);m.x<this.chart.bounds.x1&&(m.x=this.chart.bounds.x1);"bottom"===this.parent._position?m.y=this.parent.lineCoordinates.y2+m.fontSize/2+2:"top"===this.parent._position&&(m.y=this.parent.lineCoordinates.y1-m.height+m.fontSize/2+2)}else if("left"===this.parent._position||"right"===this.parent._position)m.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,
crosshair:this.options,value:c?c:this.parent.convertPixelToValue(d)}):g(this.options.label)?$(c?c:this.parent.convertPixelToValue(d),this.valueFormatString,this.chart._cultureInfo):this.label,m.y=d+m.fontSize/2-m.measureText().height/2+2,m.y-m.fontSize/2<this.chart.bounds.y1?m.y=this.chart.bounds.y1+m.fontSize/2+2:m.y+m.measureText().height-m.fontSize/2>this.chart.bounds.y2&&(m.y=this.chart.bounds.y2-m.measureText().height+m.fontSize/2),"left"===this.parent._position?m.x=this.parent.lineCoordinates.x2-
m.measureText().width:"right"===this.parent._position&&(m.x=this.parent.lineCoordinates.x2);"left"===this.parent._position&&m.x<this.chart.bounds.x1?m.x=this.chart.bounds.x1:"right"===this.parent._position&&m.x+m.measureText().width>this.chart.bounds.x2?m.x=this.chart.bounds.x2-m.measureText().width:"top"===this.parent._position&&m.y-m.fontSize/2<this.chart.bounds.y1?m.y=this.chart.bounds.y1+m.fontSize/2:"bottom"===this.parent._position&&this.parent.lineCoordinates.y2-m.fontSize/2+m.measureText().height>
this.chart.bounds.y2&&(m.y=this.chart.bounds.y2-m.height+m.fontSize/2+2);0<p&&(q.moveTo(b,h),q.lineTo(e,k),q.stroke(),this._hidden=!1);q.restore();this.value="bottom"===this.parent._position||"top"===this.parent._position?this.parent.convertPixelToValue(a):this.parent.convertPixelToValue(d)}if("bottom"===this.parent._position||"top"===this.parent._position)this._updatedValue=this.parent.convertPixelToValue(t);if("left"===this.parent._position||"right"===this.parent._position)this._updatedValue=this.parent.convertPixelToValue(x);
this._textBlock=m;g(c)||this.renderLabel();q.globalAlpha=l};X.prototype.renderLabel=function(){g(this._textBlock)||(g(this._textBlock.text)||!("number"===typeof this._textBlock.text.valueOf()||0<this._textBlock.text.length)||this._hidden)||this._textBlock.render(!0)};ia(ra,aa);ra.prototype._initialize=function(){this.updateOption("updated");this.updateOption("hidden");if(this.enabled){this.container=document.createElement("div");this.container.setAttribute("class","canvasjs-chart-tooltip");this.container.style.position=
"absolute";this.container.style.height="auto";this.container.style.boxShadow="1px 1px 2px 2px rgba(0,0,0,0.1)";this.container.style.zIndex="1000";this.container.style.pointerEvents="none";this.container.style.display="none";var a=document.createElement("div");a.style.width="auto";a.style.height="auto";a.style.minWidth="50px";a.style.lineHeight="normal";a.style.margin="0px 0px 0px 0px";a.style.padding="5px";a.style.fontFamily="Calibri, Arial, Georgia, serif";a.style.fontWeight="normal";a.style.fontStyle=
u?"italic":"normal";a.style.fontSize="14px";a.style.color="#000000";a.style.textShadow="1px 1px 1px rgba(0, 0, 0, 0.1)";a.style.textAlign="left";a.style.border="2px solid gray";a.style.background=u?"rgba(255,255,255,.9)":"rgb(255,255,255)";a.style.textIndent="0px";a.style.whiteSpace="nowrap";a.style.borderRadius="5px";a.style.MozUserSelect="none";a.style.WebkitUserSelect="none";a.style.msUserSelect="none";a.style.userSelect="none";u||(a.style.filter="alpha(opacity = 90)",a.style.filter="progid:DXImageTransform.Microsoft.Shadow(Strength=3, Direction=135, Color='#666666')");
a.innerText="Sample Tooltip";this.container.appendChild(a);this.contentDiv=this.container.firstChild;this.container.style.borderRadius=this.contentDiv.style.borderRadius;this.chart._canvasJSContainer.appendChild(this.container)}};ra.prototype.mouseMoveHandler=function(a,d){this._lastUpdated&&4>(new Date).getTime()-this._lastUpdated||(this._lastUpdated=(new Date).getTime(),this.chart.resetOverlayedCanvas(),this._updateToolTip(a,d))};ra.prototype._updateToolTip=function(a,d,c){c="undefined"===typeof c?
!0:c;this.container||this._initialize();this.enabled||this.hide();if(!this.chart.disableToolTip){if("undefined"===typeof a||"undefined"===typeof d){if(isNaN(this._prevX)||isNaN(this._prevY))return;a=this._prevX;d=this._prevY}else this._prevX=a,this._prevY=d;var b=null,e=null,h=[],k=0;if(this.shared&&this.enabled&&"none"!==this.chart.plotInfo.axisPlacement){if("xySwapped"===this.chart.plotInfo.axisPlacement){var t=[];if(this.chart.axisX)for(var s=0;s<this.chart.axisX.length;s++){for(var k=this.chart.axisX[s].convertPixelToValue({y:d}),
m=null,b=0;b<this.chart.axisX[s].dataSeries.length;b++)(m=this.chart.axisX[s].dataSeries[b].getDataPointAtX(k,c))&&0<=m.index&&(m.dataSeries=this.chart.axisX[s].dataSeries[b],null!==m.dataPoint.y&&t.push(m));m=null}if(this.chart.axisX2)for(s=0;s<this.chart.axisX2.length;s++){k=this.chart.axisX2[s].convertPixelToValue({y:d});m=null;for(b=0;b<this.chart.axisX2[s].dataSeries.length;b++)(m=this.chart.axisX2[s].dataSeries[b].getDataPointAtX(k,c))&&0<=m.index&&(m.dataSeries=this.chart.axisX2[s].dataSeries[b],
null!==m.dataPoint.y&&t.push(m));m=null}}else{t=[];if(this.chart.axisX)for(s=0;s<this.chart.axisX.length;s++)for(k=this.chart.axisX[s].convertPixelToValue({x:a}),m=null,b=0;b<this.chart.axisX[s].dataSeries.length;b++)(m=this.chart.axisX[s].dataSeries[b].getDataPointAtX(k,c))&&0<=m.index&&(m.dataSeries=this.chart.axisX[s].dataSeries[b],null!==m.dataPoint.y&&t.push(m));if(this.chart.axisX2)for(s=0;s<this.chart.axisX2.length;s++)for(k=this.chart.axisX2[s].convertPixelToValue({x:a}),m=null,b=0;b<this.chart.axisX2[s].dataSeries.length;b++)(m=
this.chart.axisX2[s].dataSeries[b].getDataPointAtX(k,c))&&0<=m.index&&(m.dataSeries=this.chart.axisX2[s].dataSeries[b],null!==m.dataPoint.y&&t.push(m))}if(0===t.length)return;t.sort(function(a,b){return a.distance-b.distance});c=t[0];for(b=0;b<t.length;b++)t[b].dataPoint.x.valueOf()===c.dataPoint.x.valueOf()&&h.push(t[b]);t=null}else{if(b=this.chart.getDataPointAtXY(a,d,c))this.currentDataPointIndex=b.dataPointIndex,this.currentSeriesIndex=b.dataSeries.index;else if(u)if(b=ib(a,d,this.chart._eventManager.ghostCtx),
0<b&&"undefined"!==typeof this.chart._eventManager.objectMap[b]){b=this.chart._eventManager.objectMap[b];if("legendItem"===b.objectType)return;this.currentSeriesIndex=b.dataSeriesIndex;this.currentDataPointIndex=0<=b.dataPointIndex?b.dataPointIndex:-1}else this.currentDataPointIndex=-1;else this.currentDataPointIndex=-1;if(0<=this.currentSeriesIndex){e=this.chart.data[this.currentSeriesIndex];m={};if(0<=this.currentDataPointIndex)b=e.dataPoints[this.currentDataPointIndex],m.dataSeries=e,m.dataPoint=
b,m.index=this.currentDataPointIndex,m.distance=Math.abs(b.x-k),"waterfall"===e.type&&(m.cumulativeSumYStartValue=e.dataPointEOs[this.currentDataPointIndex].cumulativeSumYStartValue,m.cumulativeSum=e.dataPointEOs[this.currentDataPointIndex].cumulativeSum);else{if(!this.enabled||"line"!==e.type&&"stepLine"!==e.type&&"spline"!==e.type&&"area"!==e.type&&"stepArea"!==e.type&&"splineArea"!==e.type&&"stackedArea"!==e.type&&"stackedArea100"!==e.type&&"rangeArea"!==e.type&&"rangeSplineArea"!==e.type&&"candlestick"!==
e.type&&"ohlc"!==e.type&&"boxAndWhisker"!==e.type)return;k=e.axisX.convertPixelToValue({x:a});m=e.getDataPointAtX(k,c);g(m)||(m.dataSeries=e,this.currentDataPointIndex=m.index,b=m.dataPoint)}if(!g(m)&&!g(m.dataPoint)&&!g(m.dataPoint.y))if(m.dataSeries.axisY)if(0<m.dataPoint.y.length){for(b=c=0;b<m.dataPoint.y.length;b++)m.dataPoint.y[b]<m.dataSeries.axisY.viewportMinimum?c--:m.dataPoint.y[b]>m.dataSeries.axisY.viewportMaximum&&c++;c<m.dataPoint.y.length&&c>-m.dataPoint.y.length&&h.push(m)}else"column"===
e.type||"bar"===e.type?0>m.dataPoint.y?0>m.dataSeries.axisY.viewportMinimum&&m.dataSeries.axisY.viewportMaximum>=m.dataPoint.y&&h.push(m):m.dataSeries.axisY.viewportMinimum<=m.dataPoint.y&&0<=m.dataSeries.axisY.viewportMaximum&&h.push(m):"bubble"===e.type?(c=this.chart._eventManager.objectMap[e.dataPointIds[m.index]].size/2,m.dataPoint.y>=m.dataSeries.axisY.viewportMinimum-c&&m.dataPoint.y<=m.dataSeries.axisY.viewportMaximum+c&&h.push(m)):"waterfall"===e.type?(c=0,m.cumulativeSumYStartValue<m.dataSeries.axisY.viewportMinimum?
c--:m.cumulativeSumYStartValue>m.dataSeries.axisY.viewportMaximum&&c++,m.cumulativeSum<m.dataSeries.axisY.viewportMinimum?c--:m.cumulativeSum>m.dataSeries.axisY.viewportMaximum&&c++,2>c&&-2<c&&h.push(m)):(0<=m.dataSeries.type.indexOf("100")||"stackedColumn"===e.type||"stackedBar"===e.type||m.dataPoint.y>=m.dataSeries.axisY.viewportMinimum&&m.dataPoint.y<=m.dataSeries.axisY.viewportMaximum)&&h.push(m);else h.push(m)}}if(0<h.length){if(this.highlightObjects(h),this.enabled){c="";c=this.getToolTipInnerHTML({entries:h});
if(null!==c){this.contentDiv.innerHTML=c;if(this.isToolTipDefinedInData&&g(this.options.content)&&g(this.options.contentFormatter))for(k=this.contentDiv.getElementsByTagName("span"),b=0;b<h.length;b++)k[b]&&(k[b].style.color=this.chart.replaceKeywordsWithValue("{color}",h[b].dataPoint,h[b].dataSeries,h[b].index));k=!1;"none"===this.container.style.display&&(k=!0,this.container.style.display="block");try{this.contentDiv.style.background=this.backgroundColor?this.backgroundColor:u?"rgba(255,255,255,.9)":
"rgb(255,255,255)",this.borderColor="waterfall"===h[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:h[0].dataPoint.color?h[0].dataPoint.color:0<h[0].dataPoint.y?h[0].dataSeries.risingColor:h[0].dataSeries.fallingColor:"error"===h[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?
this.options.borderColor:h[0].dataSeries.color?h[0].dataSeries.color:h[0].dataSeries._colorSet[e.index%h[0].dataSeries._colorSet.length]:this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:h[0].dataPoint.color?h[0].dataPoint.color:h[0].dataSeries.color?h[0].dataSeries.color:h[0].dataSeries._colorSet[h[0].index%h[0].dataSeries._colorSet.length],this.contentDiv.style.borderWidth=this.borderThickness||
0===this.borderThickness?this.borderThickness+"px":"2px",this.contentDiv.style.borderRadius=this.cornerRadius||0===this.cornerRadius?this.cornerRadius+"px":"5px",this.container.style.borderRadius=this.contentDiv.style.borderRadius,this.contentDiv.style.fontSize=this.fontSize||0===this.fontSize?this.fontSize+"px":"14px",this.contentDiv.style.color=this.fontColor?this.fontColor:"#000000",this.contentDiv.style.fontFamily=this.fontFamily?this.fontFamily:"Calibri, Arial, Georgia, serif;",this.contentDiv.style.fontWeight=
this.fontWeight?this.fontWeight:"normal",this.contentDiv.style.fontStyle=this.fontStyle?this.fontStyle:u?"italic":"normal"}catch(n){}"pie"===h[0].dataSeries.type||"doughnut"===h[0].dataSeries.type||"funnel"===h[0].dataSeries.type||"pyramid"===h[0].dataSeries.type||"bar"===h[0].dataSeries.type||"rangeBar"===h[0].dataSeries.type||"stackedBar"===h[0].dataSeries.type||"stackedBar100"===h[0].dataSeries.type?a=a-10-this.container.clientWidth:(a=h[0].dataSeries.axisX.convertValueToPixel(h[0].dataPoint.x)-
this.container.clientWidth<<0,a-=10);0>a&&(a+=this.container.clientWidth+20);a+this.container.clientWidth>Math.max(this.chart.container.clientWidth,this.chart.width)&&(a=Math.max(0,Math.max(this.chart.container.clientWidth,this.chart.width)-this.container.clientWidth));d=1!==h.length||this.shared||"line"!==h[0].dataSeries.type&&"stepLine"!==h[0].dataSeries.type&&"spline"!==h[0].dataSeries.type&&"area"!==h[0].dataSeries.type&&"stepArea"!==h[0].dataSeries.type&&"splineArea"!==h[0].dataSeries.type?"bar"===
h[0].dataSeries.type||"rangeBar"===h[0].dataSeries.type||"stackedBar"===h[0].dataSeries.type||"stackedBar100"===h[0].dataSeries.type?h[0].dataSeries.axisX.convertValueToPixel(h[0].dataPoint.x):d:h[0].dataSeries.axisY.convertValueToPixel(h[0].dataPoint.y);d=-d+10;0<d+this.container.clientHeight+5&&(d-=d+this.container.clientHeight+5-0);this.fixMozTransitionDelay(a,d);!this.animationEnabled||k?this.disableAnimation():(this.enableAnimation(),this.container.style.MozTransition=this.mozContainerTransition);
this.positionLeft=a;this.positionBottom=d;this.container.style.left=a+"px";this.container.style.bottom=d+"px"}else this.hide(!1),this.enabled&&this.dispatchEvent("hidden",{chart:this.chart,toolTip:this},this);d=[];for(b=0;b<h.length;b++)d.push({xValue:h[b].dataPoint.x,dataPoint:h[b].dataPoint,dataSeries:h[b].dataSeries,dataPointIndex:h[b].index,dataSeriesIndex:h[b].dataSeries._index});d={chart:this.chart,toolTip:this.options,content:c,entries:d};this._entries=h;this.dispatchEvent("updated",d,this)}}else this.hide(),
this.enabled&&this.dispatchEvent("hidden",{chart:this.chart,toolTip:this},this)}};ra.prototype.highlightObjects=function(a){var f=this.chart.overlaidCanvasCtx;if(g(this.chart.clearedOverlayedCanvas)||"toolTip"===this.chart.clearedOverlayedCanvas)this.chart.resetOverlayedCanvas(),f.clearRect(0,0,this.chart.width,this.chart.height),this.chart.clearedOverlayedCanvas="toolTip";f.save();var c=this.chart.plotArea,b=0;f.beginPath();f.rect(c.x1,c.y1,c.x2-c.x1,c.y2-c.y1);f.clip();for(c=0;c<a.length;c++){var e=
a[c];if((e=this.chart._eventManager.objectMap[e.dataSeries.dataPointIds[e.index]])&&e.objectType&&"dataPoint"===e.objectType){var b=this.chart.data[e.dataSeriesIndex],h=b.dataPoints[e.dataPointIndex],k=e.dataPointIndex;!1===h.highlightEnabled||!0!==b.highlightEnabled&&!0!==h.highlightEnabled||("line"===b.type||"stepLine"===b.type||"spline"===b.type||"scatter"===b.type||"area"===b.type||"stepArea"===b.type||"splineArea"===b.type||"stackedArea"===b.type||"stackedArea100"===b.type||"rangeArea"===b.type||
"rangeSplineArea"===b.type?(h=b.getMarkerProperties(k,e.x1,e.y1,this.chart.overlaidCanvasCtx),h.size=Math.max(1.5*h.size<<0,10),h.borderColor=h.borderColor||"#FFFFFF",h.borderThickness=h.borderThickness||Math.ceil(0.1*h.size),s.drawMarkers([h]),"undefined"!==typeof e.y2&&(h=b.getMarkerProperties(k,e.x1,e.y2,this.chart.overlaidCanvasCtx),h.size=Math.max(1.5*h.size<<0,10),h.borderColor=h.borderColor||"#FFFFFF",h.borderThickness=h.borderThickness||Math.ceil(0.1*h.size),s.drawMarkers([h]))):"bubble"===
b.type?(h=b.getMarkerProperties(k,e.x1,e.y1,this.chart.overlaidCanvasCtx),h.size=e.size,h.color="white",h.borderColor="white",f.globalAlpha=0.3,s.drawMarkers([h]),f.globalAlpha=1):"column"===b.type||"stackedColumn"===b.type||"stackedColumn100"===b.type||"bar"===b.type||"rangeBar"===b.type||"stackedBar"===b.type||"stackedBar100"===b.type||"rangeColumn"===b.type||"waterfall"===b.type?ba(f,e.x1,e.y1,e.x2,e.y2,"white",0,null,!1,!1,!1,!1,0.3):"pie"===b.type||"doughnut"===b.type?d(f,e.center,e.radius,"white",
b.type,e.startAngle,e.endAngle,0.3,e.percentInnerRadius):"funnel"===b.type||"pyramid"===b.type?t(f,e.funnelSection,0.3,"white"):"candlestick"===b.type?(f.globalAlpha=1,f.strokeStyle=e.color,f.lineWidth=2*e.borderThickness,b=0===f.lineWidth%2?0:0.5,f.beginPath(),f.moveTo(e.x3-b,Math.min(e.y2,e.y3)),f.lineTo(e.x3-b,Math.min(e.y1,e.y4)),f.stroke(),f.beginPath(),f.moveTo(e.x3-b,Math.max(e.y1,e.y4)),f.lineTo(e.x3-b,Math.max(e.y2,e.y3)),f.stroke(),ba(f,e.x1,Math.min(e.y1,e.y4),e.x2,Math.max(e.y1,e.y4),
"transparent",2*e.borderThickness,e.color,!1,!1,!1,!1),f.globalAlpha=1):"ohlc"===b.type?(f.globalAlpha=1,f.strokeStyle=e.color,f.lineWidth=2*e.borderThickness,b=0===f.lineWidth%2?0:0.5,f.beginPath(),f.moveTo(e.x3-b,e.y2),f.lineTo(e.x3-b,e.y3),f.stroke(),f.beginPath(),f.moveTo(e.x3,e.y1),f.lineTo(e.x1,e.y1),f.stroke(),f.beginPath(),f.moveTo(e.x3,e.y4),f.lineTo(e.x2,e.y4),f.stroke(),f.globalAlpha=1):"boxAndWhisker"===b.type?(f.save(),f.globalAlpha=1,f.strokeStyle=e.stemColor,f.lineWidth=2*e.stemThickness,
0<e.stemThickness&&(f.beginPath(),f.moveTo(e.x3,e.y2+e.borderThickness/2),f.lineTo(e.x3,e.y1+e.whiskerThickness/2),f.stroke(),f.beginPath(),f.moveTo(e.x3,e.y4-e.whiskerThickness/2),f.lineTo(e.x3,e.y3-e.borderThickness/2),f.stroke()),f.beginPath(),ba(f,e.x1-e.borderThickness/2,Math.max(e.y2+e.borderThickness/2,e.y3+e.borderThickness/2),e.x2+e.borderThickness/2,Math.min(e.y2-e.borderThickness/2,e.y3-e.borderThickness/2),"transparent",e.borderThickness,e.color,!1,!1,!1,!1),f.globalAlpha=1,f.strokeStyle=
e.whiskerColor,f.lineWidth=2*e.whiskerThickness,0<e.whiskerThickness&&(f.beginPath(),f.moveTo(Math.floor(e.x3-e.whiskerLength/2),e.y4),f.lineTo(Math.ceil(e.x3+e.whiskerLength/2),e.y4),f.stroke(),f.beginPath(),f.moveTo(Math.floor(e.x3-e.whiskerLength/2),e.y1),f.lineTo(Math.ceil(e.x3+e.whiskerLength/2),e.y1),f.stroke()),f.globalAlpha=1,f.strokeStyle=e.lineColor,f.lineWidth=2*e.lineThickness,0<e.lineThickness&&(f.beginPath(),f.moveTo(e.x1,e.y5),f.lineTo(e.x2,e.y5),f.stroke()),f.restore(),f.globalAlpha=
1):"error"===b.type&&L(f,e.x1,e.y1,e.x2,e.y2,"white",e.whiskerProperties,e.stemProperties,e.isXYSwapped,0.3))}}f.restore();f.globalAlpha=1;f.beginPath()};ra.prototype.getToolTipInnerHTML=function(a){a=a.entries;var d=null,c=null,b=null,e=0,h="";this.isToolTipDefinedInData=!0;for(var g=0;g<a.length;g++)if(a[g].dataSeries.toolTipContent||a[g].dataPoint.toolTipContent){this.isToolTipDefinedInData=!1;break}if(this.isToolTipDefinedInData&&(this.content&&"function"===typeof this.content||this.contentFormatter))a=
{chart:this.chart,toolTip:this.options,entries:a},d=this.contentFormatter?this.contentFormatter(a):this.content(a);else if(this.shared&&"none"!==this.chart.plotInfo.axisPlacement){for(var k=null,t="",g=0;g<a.length;g++)c=a[g].dataSeries,b=a[g].dataPoint,e=a[g].index,h="",0===g&&(this.isToolTipDefinedInData&&!this.content)&&(this.chart.axisX&&0<this.chart.axisX.length?t+="undefined"!==typeof this.chart.axisX[0].labels[b.x]?this.chart.axisX[0].labels[b.x]:"{x}":this.chart.axisX2&&0<this.chart.axisX2.length&&
(t+="undefined"!==typeof this.chart.axisX2[0].labels[b.x]?this.chart.axisX2[0].labels[b.x]:"{x}"),t+="</br>",t=this.chart.replaceKeywordsWithValue(t,b,c,e)),null===b.toolTipContent||"undefined"===typeof b.toolTipContent&&null===c.options.toolTipContent||("line"===c.type||"stepLine"===c.type||"spline"===c.type||"area"===c.type||"stepArea"===c.type||"splineArea"===c.type||"column"===c.type||"bar"===c.type||"scatter"===c.type||"stackedColumn"===c.type||"stackedColumn100"===c.type||"stackedBar"===c.type||
"stackedBar100"===c.type||"stackedArea"===c.type||"stackedArea100"===c.type||"waterfall"===c.type?(this.chart.axisX&&1<this.chart.axisX.length&&(h+=k!=c.axisXIndex?c.axisX.title?c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),h+=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span>{name}:</span>&nbsp;&nbsp;{y}",k=c.axisXIndex):"bubble"===c.type?(this.chart.axisX&&1<this.chart.axisX.length&&(h+=k!=c.axisXIndex?c.axisX.title?
c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),h+=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span>{name}:</span>&nbsp;&nbsp;{y}, &nbsp;&nbsp;{z}"):"rangeColumn"===c.type||"rangeBar"===c.type||"rangeArea"===c.type||"rangeSplineArea"===c.type||"error"===c.type?(this.chart.axisX&&1<this.chart.axisX.length&&(h+=k!=c.axisXIndex?c.axisX.title?c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),h+=b.toolTipContent?b.toolTipContent:
c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span>{name}:</span>&nbsp;&nbsp;{y[0]},&nbsp;{y[1]}"):"candlestick"===c.type||"ohlc"===c.type?(this.chart.axisX&&1<this.chart.axisX.length&&(h+=k!=c.axisXIndex?c.axisX.title?c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),h+=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span>{name}:</span><br/>Open: &nbsp;&nbsp;{y[0]}<br/>High: &nbsp;&nbsp;&nbsp;{y[1]}<br/>Low:&nbsp;&nbsp;&nbsp;{y[2]}<br/>Close: &nbsp;&nbsp;{y[3]}"):
"boxAndWhisker"===c.type&&(this.chart.axisX&&1<this.chart.axisX.length&&(h+=k!=c.axisXIndex?c.axisX.title?c.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),h+=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span>{name}:</span><br/>Minimum: &nbsp;&nbsp;{y[0]}<br/>Q1: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{y[1]}<br/>Q2: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{y[4]}<br/>Q3: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{y[2]}<br/>Maximum: &nbsp;{y[3]}"),
null===d&&(d=""),!0===this.reversed?(d=this.chart.replaceKeywordsWithValue(h,b,c,e)+d,g<a.length-1&&(d="</br>"+d)):(d+=this.chart.replaceKeywordsWithValue(h,b,c,e),g<a.length-1&&(d+="</br>")));null!==d&&(d=t+d)}else{c=a[0].dataSeries;b=a[0].dataPoint;e=a[0].index;if(null===b.toolTipContent||"undefined"===typeof b.toolTipContent&&null===c.options.toolTipContent)return null;"line"===c.type||"stepLine"===c.type||"spline"===c.type||"area"===c.type||"stepArea"===c.type||"splineArea"===c.type||"column"===
c.type||"bar"===c.type||"scatter"===c.type||"stackedColumn"===c.type||"stackedColumn100"===c.type||"stackedBar"===c.type||"stackedBar100"===c.type||"stackedArea"===c.type||"stackedArea100"===c.type||"waterfall"===c.type?h=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span>"+(b.label?"{label}":"{x}")+":</span>&nbsp;&nbsp;{y}":"bubble"===c.type?h=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&
"function"!==typeof this.content?this.content:"<span>"+(b.label?"{label}":"{x}")+":</span>&nbsp;&nbsp;{y}, &nbsp;&nbsp;{z}":"pie"===c.type||"doughnut"===c.type||"funnel"===c.type||"pyramid"===c.type?h=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span>"+(b.name?"{name}:</span>&nbsp;&nbsp;":b.label?"{label}:</span>&nbsp;&nbsp;":"</span>")+"{y}":"rangeColumn"===c.type||"rangeBar"===c.type||"rangeArea"===c.type||"rangeSplineArea"===
c.type||"error"===c.type?h=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span>"+(b.label?"{label}":"{x}")+" :</span>&nbsp;&nbsp;{y[0]}, &nbsp;{y[1]}":"candlestick"===c.type||"ohlc"===c.type?h=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span>"+(b.label?"{label}":"{x}")+"</span><br/>Open: &nbsp;&nbsp;{y[0]}<br/>High: &nbsp;&nbsp;&nbsp;{y[1]}<br/>Low: &nbsp;&nbsp;&nbsp;&nbsp;{y[2]}<br/>Close: &nbsp;&nbsp;{y[3]}":
"boxAndWhisker"===c.type&&(h=b.toolTipContent?b.toolTipContent:c.toolTipContent?c.toolTipContent:this.content&&"function"!==typeof this.content?this.content:"<span>"+(b.label?"{label}":"{x}")+"</span><br/>Minimum: &nbsp;&nbsp;{y[0]}<br/>Q1: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{y[1]}<br/>Q2: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{y[4]}<br/>Q3: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{y[2]}<br/>Maximum: &nbsp;{y[3]}");
null===d&&(d="");d+=this.chart.replaceKeywordsWithValue(h,b,c,e)}return d};ra.prototype.enableAnimation=function(){if(!this.container.style.WebkitTransition){var a=this.getContainerTransition(this.containerTransitionDuration);this.container.style.WebkitTransition=a;this.container.style.MsTransition=a;this.container.style.transition=a;this.container.style.MozTransition=this.mozContainerTransition}};ra.prototype.disableAnimation=function(){this.container.style.WebkitTransition&&(this.container.style.WebkitTransition=
"",this.container.style.MozTransition="",this.container.style.MsTransition="",this.container.style.transition="")};ra.prototype.hide=function(a){this.container&&(this.container.style.display="none",this.currentSeriesIndex=-1,this._prevY=this._prevX=NaN,("undefined"===typeof a||a)&&this.chart.resetOverlayedCanvas())};ra.prototype.show=function(a,d,c){this._updateToolTip(a,d,"undefined"===typeof c?!1:c)};ra.prototype.showAtIndex=function(a,d){};ra.prototype.showAtX=function(a,d){if(!this.enabled)return!1;
this.chart.clearedOverlayedCanvas=null;var c,b,e,h=[];e=!1;d=!g(d)&&0<=d&&d<this.chart.data.length?d:0;if(this.shared)for(var k=0;k<this.chart.data.length;k++)c=this.chart.data[k],(b=c.getDataPointAtX(a,!1))&&(b.dataPoint&&!g(b.dataPoint.y)&&c.visible)&&(b.dataSeries=c,h.push(b));else c=this.chart.data[d],(b=c.getDataPointAtX(a,!1))&&(b.dataPoint&&!g(b.dataPoint.y)&&c.visible)&&(b.dataSeries=c,h.push(b));if(0<h.length){for(k=0;k<h.length;k++)if(b=h[k],b.dataPoint.x<b.dataSeries.axisX.viewportMinimum||
b.dataPoint.x>b.dataSeries.axisX.viewportMaximum||b.dataPoint.y<b.dataSeries.axisY.viewportMinimum||b.dataPoint.y>b.dataSeries.axisY.viewportMaximum)e=!0;else{e=!1;break}if(e)return this.hide(),!1;this.highlightObjects(h);this._entries=h;k="";k=this.getToolTipInnerHTML({entries:h});if(null!==k){this.contentDiv.innerHTML=k;if(this.isToolTipDefinedInData&&g(this.options.content)&&g(this.options.contentFormatter))for(b=this.contentDiv.getElementsByTagName("span"),k=0;k<h.length;k++)b[k]&&(b[k].style.color=
this.chart.replaceKeywordsWithValue("{color}",h[k].dataPoint,h[k].dataSeries,h[k].index));k=!1;"none"===this.container.style.display&&(k=!0,this.container.style.display="block");try{this.contentDiv.style.background=this.backgroundColor?this.backgroundColor:u?"rgba(255,255,255,.9)":"rgb(255,255,255)",this.borderColor="waterfall"===h[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:
h[0].dataPoint.color?h[0].dataPoint.color:0<h[0].dataPoint.y?h[0].dataSeries.risingColor:h[0].dataSeries.fallingColor:"error"===h[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:h[0].dataSeries.color?h[0].dataSeries.color:h[0].dataSeries._colorSet[c.index%h[0].dataSeries._colorSet.length]:this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=
this.options.borderColor?this.options.borderColor:h[0].dataPoint.color?h[0].dataPoint.color:h[0].dataSeries.color?h[0].dataSeries.color:h[0].dataSeries._colorSet[h[0].index%h[0].dataSeries._colorSet.length],this.contentDiv.style.borderWidth=this.borderThickness||0===this.borderThickness?this.borderThickness+"px":"2px",this.contentDiv.style.borderRadius=this.cornerRadius||0===this.cornerRadius?this.cornerRadius+"px":"5px",this.container.style.borderRadius=this.contentDiv.style.borderRadius,this.contentDiv.style.fontSize=
this.fontSize||0===this.fontSize?this.fontSize+"px":"14px",this.contentDiv.style.color=this.fontColor?this.fontColor:"#000000",this.contentDiv.style.fontFamily=this.fontFamily?this.fontFamily:"Calibri, Arial, Georgia, serif;",this.contentDiv.style.fontWeight=this.fontWeight?this.fontWeight:"normal",this.contentDiv.style.fontStyle=this.fontStyle?this.fontStyle:u?"italic":"normal"}catch(t){}"pie"===h[0].dataSeries.type||"doughnut"===h[0].dataSeries.type||"funnel"===h[0].dataSeries.type||"pyramid"===
h[0].dataSeries.type?c=mouseX-10-this.container.clientWidth:(c="bar"===h[0].dataSeries.type||"rangeBar"===h[0].dataSeries.type||"stackedBar"===h[0].dataSeries.type||"stackedBar100"===h[0].dataSeries.type?h[0].dataSeries.axisY.convertValueToPixel(h[0].dataPoint.y)-this.container.clientWidth<<0:h[0].dataSeries.axisX.convertValueToPixel(h[0].dataPoint.x)-this.container.clientWidth<<0,c-=10);0>c&&(c+=this.container.clientWidth+20);c+this.container.clientWidth>Math.max(this.chart.container.clientWidth,
this.chart.width)&&(c=Math.max(0,Math.max(this.chart.container.clientWidth,this.chart.width)-this.container.clientWidth));h=1!==h.length||this.shared||"line"!==h[0].dataSeries.type&&"stepLine"!==h[0].dataSeries.type&&"spline"!==h[0].dataSeries.type&&"area"!==h[0].dataSeries.type&&"stepArea"!==h[0].dataSeries.type&&"splineArea"!==h[0].dataSeries.type?"bar"===h[0].dataSeries.type||"rangeBar"===h[0].dataSeries.type||"stackedBar"===h[0].dataSeries.type||"stackedBar100"===h[0].dataSeries.type?h[0].dataSeries.axisX.convertValueToPixel(h[0].dataPoint.x):
h[0].dataSeries.axisY.convertValueToPixel(h[0].dataPoint.y):h[0].dataSeries.axisY.convertValueToPixel(h[0].dataPoint.y);h=-h+10;0<h+this.container.clientHeight+5&&(h-=h+this.container.clientHeight+5-0);this.fixMozTransitionDelay(c,h);!this.animationEnabled||k?this.disableAnimation():(this.enableAnimation(),this.container.style.MozTransition=this.mozContainerTransition);this.container.style.left=c+"px";this.container.style.bottom=h+"px"}else return this.hide(!1),!1}else return this.hide(),!1;return!0};
ra.prototype.fixMozTransitionDelay=function(a,d){if(20<this.chart._eventManager.lastObjectId)this.mozContainerTransition=this.getContainerTransition(0);else{var c=parseFloat(this.container.style.left),c=isNaN(c)?0:c,b=parseFloat(this.container.style.bottom),b=isNaN(b)?0:b;10<Math.sqrt(Math.pow(c-a,2)+Math.pow(b-d,2))?this.mozContainerTransition=this.getContainerTransition(0.1):this.mozContainerTransition=this.getContainerTransition(0)}};ra.prototype.getContainerTransition=function(a){return"left "+
a+"s ease-out 0s, bottom "+a+"s ease-out 0s"};ea.prototype.reset=function(){this.lastObjectId=0;this.objectMap=[];this.rectangularRegionEventSubscriptions=[];this.previousDataPointEventObject=null;this.eventObjects=[];u&&(this.ghostCtx.clearRect(0,0,this.chart.width,this.chart.height),this.ghostCtx.beginPath())};ea.prototype.getNewObjectTrackingId=function(){return++this.lastObjectId};ea.prototype.mouseEventHandler=function(a){if("mousemove"===a.type||"click"===a.type){var d=[],c=Aa(a),b=null;if((b=
this.chart.getObjectAtXY(c.x,c.y,!1))&&"undefined"!==typeof this.objectMap[b])if(b=this.objectMap[b],"dataPoint"===b.objectType){var e=this.chart.data[b.dataSeriesIndex],h=e.dataPoints[b.dataPointIndex],g=b.dataPointIndex;b.eventParameter={x:c.x,y:c.y,dataPoint:h,dataSeries:e.options,dataPointIndex:g,dataSeriesIndex:e.index,chart:this.chart};b.eventContext={context:h,userContext:h,mouseover:"mouseover",mousemove:"mousemove",mouseout:"mouseout",click:"click"};d.push(b);b=this.objectMap[e.id];b.eventParameter=
{x:c.x,y:c.y,dataPoint:h,dataSeries:e.options,dataPointIndex:g,dataSeriesIndex:e.index,chart:this.chart};b.eventContext={context:e,userContext:e.options,mouseover:"mouseover",mousemove:"mousemove",mouseout:"mouseout",click:"click"};d.push(this.objectMap[e.id])}else"legendItem"===b.objectType&&(e=this.chart.data[b.dataSeriesIndex],h=null!==b.dataPointIndex?e.dataPoints[b.dataPointIndex]:null,b.eventParameter={x:c.x,y:c.y,dataSeries:e.options,dataPoint:h,dataPointIndex:b.dataPointIndex,dataSeriesIndex:b.dataSeriesIndex,
chart:this.chart},b.eventContext={context:this.chart.legend,userContext:this.chart.legend.options,mouseover:"itemmouseover",mousemove:"itemmousemove",mouseout:"itemmouseout",click:"itemclick"},d.push(b));e=[];for(c=0;c<this.mouseoveredObjectMaps.length;c++){h=!0;for(b=0;b<d.length;b++)if(d[b].id===this.mouseoveredObjectMaps[c].id){h=!1;break}h?this.fireEvent(this.mouseoveredObjectMaps[c],"mouseout",a):e.push(this.mouseoveredObjectMaps[c])}this.mouseoveredObjectMaps=e;for(c=0;c<d.length;c++){e=!1;
for(b=0;b<this.mouseoveredObjectMaps.length;b++)if(d[c].id===this.mouseoveredObjectMaps[b].id){e=!0;break}e||(this.fireEvent(d[c],"mouseover",a),this.mouseoveredObjectMaps.push(d[c]));"click"===a.type?this.fireEvent(d[c],"click",a):"mousemove"===a.type&&this.fireEvent(d[c],"mousemove",a)}}};ea.prototype.fireEvent=function(a,d,c){if(a&&d){var b=a.eventParameter,e=a.eventContext,h=a.eventContext.userContext;h&&(e&&h[e[d]])&&h[e[d]].call(h,b);"mouseout"!==d?h.cursor&&h.cursor!==c.target.style.cursor&&
(c.target.style.cursor=h.cursor):(c.target.style.cursor=this.chart._defaultCursor,delete a.eventParameter,delete a.eventContext);"click"===d&&("dataPoint"===a.objectType&&this.chart.pieDoughnutClickHandler)&&this.chart.pieDoughnutClickHandler.call(this.chart.data[a.dataSeriesIndex],b);"click"===d&&("dataPoint"===a.objectType&&this.chart.funnelPyramidClickHandler)&&this.chart.funnelPyramidClickHandler.call(this.chart.data[a.dataSeriesIndex],b)}};ma.prototype.animate=function(a,d,c,b,e){var h=this;
this.chart.isAnimating=!0;e=e||x.easing.linear;c&&this.animations.push({startTime:(new Date).getTime()+(a?a:0),duration:d,animationCallback:c,onComplete:b});for(a=[];0<this.animations.length;)if(d=this.animations.shift(),c=(new Date).getTime(),b=0,d.startTime<=c&&(b=e(Math.min(c-d.startTime,d.duration),0,1,d.duration),b=Math.min(b,1),isNaN(b)||!isFinite(b))&&(b=1),1>b&&a.push(d),d.animationCallback(b),1<=b&&d.onComplete)d.onComplete();this.animations=a;0<this.animations.length?this.animationRequestId=
this.chart.requestAnimFrame.call(window,function(){h.animate.call(h)}):this.chart.isAnimating=!1};ma.prototype.cancelAllAnimations=function(){this.animations=[];this.animationRequestId&&this.chart.cancelRequestAnimFrame.call(window,this.animationRequestId);this.animationRequestId=null;this.chart.isAnimating=!1};var x={yScaleAnimation:function(a,d){if(0!==a){var c=d.dest,b=d.source.canvas,e=d.animationBase;c.drawImage(b,0,0,b.width,b.height,0,e-e*a,c.canvas.width/la,a*c.canvas.height/la)}},xScaleAnimation:function(a,
d){if(0!==a){var c=d.dest,b=d.source.canvas,e=d.animationBase;c.drawImage(b,0,0,b.width,b.height,e-e*a,0,a*c.canvas.width/la,c.canvas.height/la)}},xClipAnimation:function(a,d){if(0!==a){var c=d.dest,b=d.source.canvas;c.save();0<a&&c.drawImage(b,0,0,b.width*a,b.height,0,0,b.width*a/la,b.height/la);c.restore()}},fadeInAnimation:function(a,d){if(0!==a){var c=d.dest,b=d.source.canvas;c.save();c.globalAlpha=a;c.drawImage(b,0,0,b.width,b.height,0,0,c.canvas.width/la,c.canvas.height/la);c.restore()}},easing:{linear:function(a,
d,c,b){return c*a/b+d},easeOutQuad:function(a,d,c,b){return-c*(a/=b)*(a-2)+d},easeOutQuart:function(a,d,c,b){return-c*((a=a/b-1)*a*a*a-1)+d},easeInQuad:function(a,d,c,b){return c*(a/=b)*a+d},easeInQuart:function(a,d,c,b){return c*(a/=b)*a*a*a+d}}},s={drawMarker:function(a,d,c,b,e,h,g,k){if(c){var t=1;c.fillStyle=h?h:"#000000";c.strokeStyle=g?g:"#000000";c.lineWidth=k?k:0;c.setLineDash&&c.setLineDash(R("solid",k));"circle"===b?(c.moveTo(a,d),c.beginPath(),c.arc(a,d,e/2,0,2*Math.PI,!1),h&&c.fill(),
k&&(g?c.stroke():(t=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=t))):"square"===b?(c.beginPath(),c.rect(a-e/2,d-e/2,e,e),h&&c.fill(),k&&(g?c.stroke():(t=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=t))):"triangle"===b?(c.beginPath(),c.moveTo(a-e/2,d+e/2),c.lineTo(a+e/2,d+e/2),c.lineTo(a,d-e/2),c.closePath(),h&&c.fill(),k&&(g?c.stroke():(t=c.globalAlpha,c.globalAlpha=0.15,c.strokeStyle="black",c.stroke(),c.globalAlpha=t)),c.beginPath()):
"cross"===b&&(c.strokeStyle=h,c.lineWidth=e/4,c.beginPath(),c.moveTo(a-e/2,d-e/2),c.lineTo(a+e/2,d+e/2),c.stroke(),c.moveTo(a+e/2,d-e/2),c.lineTo(a-e/2,d+e/2),c.stroke())}},drawMarkers:function(a){for(var d=0;d<a.length;d++){var c=a[d];s.drawMarker(c.x,c.y,c.ctx,c.type,c.size,c.color,c.borderColor,c.borderThickness)}}};return r}();Ja.version="v3.6.1 GA";window.CanvasJS&&(Ja&&!window.CanvasJS.Chart)&&(window.CanvasJS.Chart=Ja);ea.StockChart={width:500,height:600,backgroundColor:"white",theme:"light1",
animationEnabled:!1,animationDuration:1200,culture:"en",creditHref:"",creditText:"CanvasJS",exportEnabled:!1,exportFileName:"StockChart",colorSet:"colorSet1",rangeChanging:null,rangeChanged:null,publicProperties:{title:"readWrite",subtitles:"readWrite",toolbar:"readWrite",navigator:"readWrite",rangeSelector:"readWrite",charts:"readWrite",options:"readWrite",bounds:"readOnly",container:"readOnly",selectedColorSet:"readOnly"}};ea.Navigator={enabled:!0,width:500,height:70,verticalAlign:"bottom",horizontalAlign:"center",
dynamicUpdate:!0,backgroundColor:"#fff",animationEnabled:!1,animationDuration:1200,theme:"light1",publicProperties:{slider:"readWrite",backgroundColor:"readWrite",animationEnabled:"readWrite",animationDuration:"readWrite",theme:"readWrite",axisX:"readWrite",axisY:"readWrite",axisX2:"readWrite",axisY2:"readWrite",data:"readWrite",options:"readWrite",bounds:"readOnly"}};ea.RangeSelector={enabled:!0,width:500,height:35,label:"Range",verticalAlign:"top",horizontalAlign:"center",selectedRangeButtonIndex:null,
publicProperties:{options:"readWrite",buttons:"readWrite",inputFields:"readWrite",buttonStyle:"readWrite",bounds:"readOnly"}};ea.RangeButton={range:null,rangeType:null,label:null,style:"position: inline; margin: 5px 0;text-align:center;cursor: pointer;",backgroundColorDisabled:"#ddd",publicProperties:{options:"readWrite",bounds:"readOnly"}};ea.ButtonStyle={backgroundColor:"#fff",backgroundColorOnHover:"#2196f3",backgroundColorOnSelect:"#2196f3",borderColor:"#2196f3",borderThickness:2,labelFontColor:"#000",
labelFontColorOnHover:"#fff",labelFontSize:14,labelFontStyle:"normal",labelFontFamily:u?"Trebuchet MS, Helvetica, sans-serif":"Arial",labelFontWeight:"normal",width:null,maxWidth:null,padding:{left:5,right:5,top:2,bottom:2},spacing:5,cursor:"pointer",publicProperties:{options:"readWrite"}};ea.InputFields={enabled:!0,startValue:null,endValue:null,valueType:"dateTime",valueFormatString:"MMM DD YYYY",publicProperties:{style:"readWrite",options:"readWrite"}};ea.Style={backgroundColor:"#fff",borderColor:"#2196f3",
borderColorOnFocus:"#008eff",borderThickness:2,fontColor:"#000",fontSize:12,fontStyle:"normal",fontFamily:u?"Trebuchet MS, Helvetica, sans-serif":"Arial",fontWeight:"normal",width:null,maxWidth:null,padding:{left:5,right:5,top:2,bottom:2},spacing:5,cursor:"text",publicProperties:{options:"readWrite"}};ea.Slider={maskColor:"#d9e8f9",maskInverted:!1,maskOpacity:0.7,handleColor:"#ddd",handleBorderColor:"#aaa",handleBorderThickness:1,handleWidth:8,handleHeight:18,minimum:null,maximum:null,outlineThickness:1,
outlineColor:"#666",outlineInverted:!1,publicProperties:{options:"readWrite"}};ea.CultureInfo.rangeSelector={fromText:"From",toText:"To",rangeText:"Range"};I="#FFFFFF";Y="#333333";M="#000000";Fa={colorSet:"colorSet1",backgroundColor:I,title:Fa.title,subtitles:Fa.subtitles,charts:[Fa],rangeSelector:{buttonStyle:{backgroundColor:"#FEFEFE",backgroundColorOnHover:"#41a5f5",backgroundColorOnSelect:"#2196f3",borderColor:"#2196f3",borderThickness:1,labelFontColor:M,labelFontColorOnHover:"#ffffff",labelFontSize:14,
labelFontStyle:"normal",labelFontFamily:r,labelFontWeight:"normal",spacing:0},inputFields:{style:{backgroundColor:"#ffffff",borderColor:"#2196f3",borderColorOnFocus:"#2196f3",borderThickness:1,fontColor:M,fontSize:14,fontStyle:"normal",fontFamily:r,fontWeight:"normal"}}},navigator:{backgroundColor:I,slider:{maskColor:"#d9e8f9",maskOpacity:0.6,handleColor:"#efefef",handleBorderColor:"#666666",handleBorderThickness:1,outlineColor:"#666666",outlineThickness:1}},toolbar:Fa.toolbar};I="#FFFFFF";Y="#3A3A3A";
M="#666666";Ia={colorSet:"colorSet2",backgroundColor:I,title:Ia.title,subtitles:Ia.subtitles,charts:[Ia],rangeSelector:{buttonStyle:{backgroundColor:"#FEFEFE",backgroundColorOnHover:"#41a5f5",backgroundColorOnSelect:"#2196f3",borderColor:"#2196f3",borderThickness:1,labelFontColor:M,labelFontColorOnHover:"#ffffff",labelFontSize:14,labelFontStyle:"normal",labelFontFamily:r,labelFontWeight:"normal",spacing:0},inputFields:{style:{backgroundColor:"#ffffff",borderColor:"#2196f3",borderColorOnFocus:"#2196f3",
borderThickness:1,fontColor:M,fontSize:14,fontStyle:"normal",fontFamily:r,fontWeight:"normal"}}},navigator:{backgroundColor:I,slider:{maskColor:"#D9E8F9",maskOpacity:0.6,handleColor:"#EFEFEF",handleBorderColor:"#BBBBBB",handleBorderThickness:1,outlineColor:"#BBBBBB",outlineThickness:1}},toolbar:Ia.toolbar};I="#2A2A2A";M=Y="#F5F5F5";za={colorSet:"colorSet1",backgroundColor:I,title:za.title,subtitles:za.subtitles,charts:[za],rangeSelector:{buttonStyle:{backgroundColor:"#666666",backgroundColorOnHover:"#FF7372",
backgroundColorOnSelect:"#FF7372",borderColor:"#FF7372",borderThickness:1,labelFontColor:M,labelFontColorOnHover:"#F5F5F5",labelFontSize:14,labelFontStyle:"normal",labelFontFamily:r,labelFontWeight:"normal",spacing:0},inputFields:{style:{backgroundColor:"#666666",borderColor:"#FF7372",borderColorOnFocus:"#FF7372",borderThickness:1,fontColor:M,fontSize:14,fontStyle:"normal",fontFamily:r,fontWeight:"normal"}}},navigator:{backgroundColor:I,slider:{maskColor:"#d9e8f9",maskOpacity:0.6,handleColor:"#efefef",
handleBorderColor:"#666666",handleBorderThickness:1,outlineColor:"#FFFFFF",outlineThickness:1}},toolbar:za.toolbar};I="#32373A";M=Y="#FAFAFA";var ab={light1:Fa,light2:Ia,dark1:za,dark2:{colorSet:"colorSet2",backgroundColor:I,title:X.title,subtitles:X.subtitles,charts:[X],rangeSelector:{buttonStyle:{backgroundColor:"#666666",backgroundColorOnHover:"#FF7372",backgroundColorOnSelect:"#FF7372",borderColor:"#FF7372",borderThickness:1,labelFontColor:M,labelFontColorOnHover:"#F5F5F5",labelFontSize:14,labelFontStyle:"normal",
labelFontFamily:r,labelFontWeight:"normal",spacing:0},inputFields:{style:{backgroundColor:"#666666",borderColor:"#FF7372",borderColorOnFocus:"#FF7372",borderThickness:1,fontColor:M,fontSize:14,fontStyle:"normal",fontFamily:r,fontWeight:"normal"}}},navigator:{backgroundColor:I,slider:{maskColor:"#d9e8f9",maskOpacity:0.6,handleColor:"#efefef",handleBorderColor:"#666666",handleBorderThickness:1,outlineColor:"#FFFFFF",outlineThickness:1}},toolbar:X.toolbar}};Y=Qa.StockChart=function(){function k(d){var g;
g=document.createElement("div");g.setAttribute("class",d);O(g,{position:"absolute",textAlign:"left",cursor:"auto",webkitTapHighlightColor:"transparent"});return g}function A(d,k,x){d=document.createElement(d);d.setAttribute("class",k);O(d,{webkitTapHighlightColor:"transparent"});g(x)||d.setAttribute("type",x);return d}function G(d,k){k=k||{};this.theme=g(k.theme)||g($a[k.theme])?"light1":k.theme;this.predefinedThemes=ab;G.base.constructor.call(this,"StockChart",null,k,null,null);this.optionsName=
"stockChart";var x=this;this.sessionVariables={};this._axisXMax=this._axisXMin=null;this._containerId=d;this._objectsInitialized=!1;this.ctx=null;this.plotArea={canvas:null,ctx:null,x1:0,y1:0,x2:0,y2:0,width:0,height:0};this._dataInRenderedOrder=[];this.allDOMEventHandlers=[];if(this.container="string"===typeof this._containerId?document.getElementById(this._containerId):this._containerId){this.container.innerHTML="";var s=0,a=0;this._defaultCursor="default";s=this.options.width?this.width:0<this.container.clientWidth?
this.container.clientWidth:this.width;a=this.options.height?this.height:0<this.container.clientHeight?this.container.clientHeight:this.height;this.width=s;this.height=a;this.x1=this.y1=0;this.x2=this.width;this.y2=this.height;this.selectedColorSet="undefined"!==typeof xa[this.colorSet]?xa[this.colorSet]:xa.colorSet1;this._canvasJSContainer=document.createElement("div");this._canvasJSContainer.setAttribute("class","canvasjs-stock-container");this._canvasJSContainer.style.position="relative";this._canvasJSContainer.style.userSelect=
this._canvasJSContainer.style.WebkitUserSelect=this._canvasJSContainer.style.MozUserSelect=this._canvasJSContainer.style.msUserSelect="none";this._canvasJSContainer.style.textAlign="left";this._canvasJSContainer.style.cursor="auto";this._canvasJSContainer.style.direction="ltr";this._canvasJSContainer.style.fontFamily=r;u||(this._canvasJSContainer.style.height="0px");this.container.appendChild(this._canvasJSContainer);this.canvas=ta(s,a);this.canvas.style.position="absolute";this.canvas.getContext&&
(this._canvasJSContainer.appendChild(this.canvas),this.ctx=this.canvas.getContext("2d"),this.ctx.textBaseline="top",Ga(this.ctx),this.overlaidCanvas=ta(s,a),this.overlaidCanvas.style.position="absolute",this.overlaidCanvas.style.webkitTapHighlightColor="transparent",this.overlaidCanvas.getContext&&(this._canvasJSContainer.appendChild(this.overlaidCanvas),this.overlaidCanvasCtx=this.overlaidCanvas.getContext("2d"),this.overlaidCanvasCtx.textBaseline="top",Ga(this.overlaidCanvasCtx)),u?this.plotArea.ctx=
this.ctx:(this.plotArea.canvas=ta(s,a),this.plotArea.canvas.style.position="absolute",this.plotArea.canvas.setAttribute("class","plotAreaCanvas"),this._canvasJSContainer.appendChild(this.plotArea.canvas),this.plotArea.ctx=this.plotArea.canvas.getContext("2d")),this._toolBar=document.createElement("div"),this._toolBar.setAttribute("class","canvasjs-chart-toolbar"),O(this._toolBar,{position:"absolute",right:"1px",top:"1px",zIndex:999}),this._canvasJSContainer.appendChild(this._toolBar),this.bounds=
{x1:0,y1:0,x2:this.width,y2:this.height},this.charts=[],Da(this.charts),this._eventManager=new M(this),D(this.overlaidCanvas,"click",function(a){x._mouseEventHandler(a)},this.allDOMEventHandlers),D(this.overlaidCanvas,"mousemove",function(a){x._mouseEventHandler(a)},this.allDOMEventHandlers),D(this.overlaidCanvas,"mouseup",function(a){x._mouseEventHandler(a)},this.allDOMEventHandlers),D(this.overlaidCanvas,"mousedown",function(a){x._mouseEventHandler(a);ya(x._dropdownMenu)},this.allDOMEventHandlers),
D(this.overlaidCanvas,"mouseout",function(a){x._mouseEventHandler(a)},this.allDOMEventHandlers),D(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerDown":"touchstart",function(a){x._touchEventHandler(a)},this.allDOMEventHandlers),D(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerMove":"touchmove",function(a){x._touchEventHandler(a)},this.allDOMEventHandlers),D(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerUp":"touchend",function(a){x._touchEventHandler(a)},
this.allDOMEventHandlers),D(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerCancel":"touchcancel",function(a){x._touchEventHandler(a)},this.allDOMEventHandlers),this.windowResizeHandler=D(window,"resize",function(){x._updateSize()&&x.render()},this.allDOMEventHandlers))}else window.console&&window.console.log('CanvasJS Error: StockChart Container with id "'+this._containerId+'" was not found')}function I(d,g){I.base.constructor.call(this,d,g);this.options=g;this.dockInsidePlotArea=
!1}function F(d,g,k){F.base.constructor.call(this,d,g,k);this.options=g;this.dockInsidePlotArea=!1}function M(d){this.stockChart=d;this.lastObjectId=0;this.objectMap=[];this.rectangularRegionEventSubscriptions=[];this.ghostCanvas=ta(this.stockChart.width,this.stockChart.height);this.ghostCtx=this.ghostCanvas.getContext("2d");this.mouseoveredObjectMaps=[]}function z(d,g){g=g||{};this.optionsName="navigator";z.base.constructor.call(this,"Navigator","navigator",g,null,d);this.parent=this.stockChart=
d}function R(d,t){this.panel=k("canvasjs-slider-panel");this.parent=this.navigator=d;this.stockChart=d.stockChart;this.navigator.panel.appendChild(this.panel);R.base.constructor.call(this,"Slider","slider",t,null,d);this.options=g(t.navigator)||g(t.navigator.slider)?{}:t.navigator.slider;this.optionsName="slider";this.panMode=!1;this.sessionVariables={}}function S(d,k){S.base.constructor.call(this,"RangeSelector","rangeSelector",k,null,d);this.parent=this.stockChart=d;this.options=g(k)||g(k.rangeSelector)?
{}:k.rangeSelector;this.optionsName="rangeSelector";this.ctx=d.ctx}function N(d,k,x){N.base.constructor.call(this,"RangeButton","rangeButton",x,k,d.rangeSelector);this.stockChart=d;this.parent=this.rangeSelector=d.rangeSelector;this.options=g(x)?{}:x;this.optionsName="rangeButton";this.enabled=!1;this.state="off"}function W(d,k){W.base.constructor.call(this,"InputFields","inputFields",k,null,d.rangeSelector);this.stockChart=d;this.options=g(k)||g(k.inputFields)?{}:k.inputFields;this.parent=this.rangeSelector=
d.rangeSelector;this.elements=[];this._textBlocks=[];this.optionsName="inputFields";this.elements.push(A("input","canvasjs-input-field","text"));this.elements.push(A("input","canvasjs-input-field","text"));for(var x=0;x<this.elements.length;x++)this.stockChart._canvasJSContainer.appendChild(this.elements[x]);var s=this,a=null,f=null;D(this.elements[0],"focus",function(){s.enabled&&(s.elements[0].focused=!0,s._textBlocks[0].borderColor=s.style.borderColorOnFocus,s._textBlocks[0].render(!0))},this.rangeSelector.stockChart.allDOMEventHandlers);
D(this.elements[0],"focusout",function(){if(s.enabled){s.elements[0].focused=!1;var a;s.stockChart.charts&&s.stockChart.charts.length&&(a=s.stockChart.charts[0].axisX&&s.stockChart.charts[0].axisX.length?s.stockChart.charts[0].axisX[0]:s.stockChart.charts[0].axisX2[0]);this.value="dateTime"===s.valueType?fa(a?a.viewportMinimum:null,"YYYY-MM-DD",s.stockChart._cultureInfo):$(a?a.viewportMinimum:null,s.valueFormatString,s.stockChart._cultureInfo);this.style.display="none";s._textBlocks[0].borderColor=
s.style.borderColor;s._textBlocks[0].render(!0)}},this.rangeSelector.stockChart.allDOMEventHandlers);D(this.elements[1],"focus",function(){s.enabled&&(s.elements[1].focused=!0,s._textBlocks[1].borderColor=s.style.borderColorOnFocus,s._textBlocks[1].render(!0))},this.rangeSelector.stockChart.allDOMEventHandlers);D(this.elements[1],"focusout",function(){if(s.enabled){s.elements[1].focused=!1;var a;s.stockChart.charts&&s.stockChart.charts.length&&(a=s.stockChart.charts[0].axisX&&s.stockChart.charts[0].axisX.length?
s.stockChart.charts[0].axisX[0]:s.stockChart.charts[0].axisX2[0]);this.value="dateTime"===s.valueType?fa(a?a.viewportMaximum:null,"YYYY-MM-DD",s.stockChart._cultureInfo):$(a?a.viewportMaximum:null,s.valueFormatString,s.stockChart._cultureInfo);this.style.display="none";s._textBlocks[1].borderColor=s.style.borderColor;s._textBlocks[1].render(!0)}},this.rangeSelector.stockChart.allDOMEventHandlers);D(this.elements[0],"change",function(c){if(s.enabled){var b,d;s.stockChart.charts&&s.stockChart.charts.length&&
(s.stockChart.navigator&&s.stockChart.navigator.enabled&&(d=s.stockChart.navigator&&s.stockChart.navigator.chart&&s.stockChart.navigator.chart.axisX?s.stockChart.navigator.chart.axisX[0]:s.stockChart.navigator.chart.axisX2[0]),b=s.stockChart.charts[0].axisX&&s.stockChart.charts[0].axisX.length?s.stockChart.charts[0].axisX[0]:s.stockChart.charts[0].axisX2[0]);c="dateTime"===s.valueType?isNaN((new Date(this.value.replace(/-/g,"/"))).getTime())?null:(new Date(this.value.replace(/-/g,"/"))).getTime():
this.value;a=g(d)?!g(c)&&c<(g(b)?null:b.maximum)?Math.max(g(b)?null:b.minimum,c):g(b)?null:b.minimum:!g(c)&&c<(g(d)?null:d.maximum)?Math.max(g(d)?null:d.minimum,c):g(d)?null:d.minimum;f=g(b)?null:b.viewportMaximum;s.stockChart._rangeEventParameter={stockChart:s.stockChart,source:"inputFields",index:null,minimum:a,maximum:f};s.stockChart._rangeEventParameter.type="rangeChanging";s.stockChart.dispatchEvent("rangeChanging",s.stockChart._rangeEventParameter,s.stockChart);s.stockChart.sessionVariables._axisXMin=
a;s.stockChart.sessionVariables._axisXMax=f;s.stockChart._syncCharts(a,f);s.stockChart._rangeEventParameter.type="rangeChanged";s.stockChart.dispatchEvent("rangeChanged",s.stockChart._rangeEventParameter,s.stockChart);s.stockChart.rangeSelector&&s.stockChart.rangeSelector.resetRangeButtons()}},this.rangeSelector.stockChart.allDOMEventHandlers);D(this.elements[1],"change",function(c){if(s.enabled){var b,d;s.stockChart.charts&&s.stockChart.charts.length&&(s.stockChart.navigator&&s.stockChart.navigator.enabled&&
(d=s.stockChart.navigator&&s.stockChart.navigator.chart&&s.stockChart.navigator.chart.axisX?s.stockChart.navigator.chart.axisX[0]:s.stockChart.navigator.chart.axisX2[0]),b=s.stockChart.charts[0].axisX&&s.stockChart.charts[0].axisX.length?s.stockChart.charts[0].axisX[0]:s.stockChart.charts[0].axisX2[0]);c="dateTime"===s.valueType?isNaN((new Date(this.value.replace(/-/g,"/"))).getTime())?null:(new Date(this.value.replace(/-/g,"/"))).getTime():this.value;a=b?b.viewportMinimum:null;f=g(d)?!g(c)&&c>(b?
b.minimum:null)?Math.min(b?b.maximum:null,c):b?b.maximum:null:!g(c)&&c>(d?d.minimum:null)?Math.min(d?d.maximum:null,c):d?d.maximum:null;s.stockChart._rangeEventParameter={stockChart:s.stockChart,source:"inputFields",index:null,minimum:a,maximum:f};s.stockChart._rangeEventParameter.type="rangeChanging";s.stockChart.dispatchEvent("rangeChanging",s.stockChart._rangeEventParameter,s.stockChart);s.stockChart.sessionVariables._axisXMin=a;s.stockChart.sessionVariables._axisXMax=f;s.stockChart._syncCharts(a,
f);s.stockChart._rangeEventParameter.type="rangeChanged";s.stockChart.dispatchEvent("rangeChanged",s.stockChart._rangeEventParameter,s.stockChart);s.stockChart.rangeSelector&&s.stockChart.rangeSelector.resetRangeButtons()}},this.rangeSelector.stockChart.allDOMEventHandlers);D(this.elements[0],"keydown",function(a){if(s.enabled&&13===a.keyCode){var b="dateTime"===s.valueType?fa(s.startValue,"YYYY-MM-DD"):$(s.startValue,s.valueFormatString);this.value!=b&&gb(this,"change");this.blur();a.preventDefault&&
a.preventDefault()}},this.rangeSelector.stockChart.allDOMEventHandlers);D(this.elements[1],"keydown",function(a){if(s.enabled&&13===a.keyCode){var b="dateTime"===s.valueType?fa(s.endValue,"YYYY-MM-DD"):$(s.endValue,s.valueFormatString);this.value!=b&&gb(this,"change");this.blur();a.preventDefault&&a.preventDefault()}},this.rangeSelector.stockChart.allDOMEventHandlers)}function X(d,k){X.base.constructor.call(this,"ButtonStyle","buttonStyle",k,null,d.rangeSelector);this.stockChart=d;this.parent=this.rangeSelector=
d.rangeSelector;this.options=g(k)||g(k.buttonStyle)?{}:k.buttonStyle;this.optionsName="buttonStyle"}function Y(d,k){Y.base.constructor.call(this,"Style","style",k,null,d.rangeSelector.inputFields);this.stockChart=d;this.parent=this.inputFields=d.rangeSelector.inputFields;this.options=g(k)||g(k.style)?{}:k.style;this.optionsName="style"}var ea=!0;ia(G,aa);G.prototype._updateOptions=function(){this.updateOption("width");this.updateOption("height");this.updateOption("theme");this.updateOption("colorSet")&&
(this.selectedColorSet="undefined"!==typeof xa[this.colorSet]?xa[this.colorSet]:xa.colorSet1);this.updateOption("backgroundColor");this.backgroundColor||(this.backgroundColor="rgba(0,0,0,0)");this.updateOption("exportEnabled");this.updateOption("exportFileName");this.updateOption("creditHref");this.updateOption("creditHref");this.updateOption("culture");this._cultureInfo=new Na(this.options.culture);this.updateOption("animationEnabled");this.updateOption("animationDuration");this.updateOption("rangeChanging");
this.updateOption("rangeChanged");this.toolbar=new Va(this,this.options.toolbar);hb(this)};G._supportedChartTypes=Da("line stepLine spline column area stepArea splineArea bubble scatter stackedColumn stackedColumn100 stackedArea stackedArea100 candlestick ohlc boxAndWhisker rangeColumn error rangeArea rangeSplineArea waterfall".split(" "));G.prototype._initialize=function(){this._updateOptions();this.animationEnabled=this.animationEnabled&&u;this._updateSize();this.clearCanvas();this.ctx.beginPath();
var d,t=g(this.options.charts)?[]:this.options.charts;Da(t);for(var x=0;x<this.charts.length;x++)d=this.charts[x],0>t.indexOf(d.options)&&(this.charts.splice(x,1),d.destroy(),this._canvasJSContainer.removeChild(d.panel),x--);this.layoutManager=new Ka(0,0,this.width,this.height,2);this.plotArea.layoutManager&&this.plotArea.layoutManager.reset();this.title=null;this.subtitles=[];this.options.title&&(this.title=new I(this,this.options.title),this.title.setLayout());if(this.options.subtitles)for(x=0;x<
this.options.subtitles.length;x++)d=new F(this,this.options.subtitles[x],x),this.subtitles.push(d),d.setLayout();this.navigator=this.navigator||new z(this,this.options.navigator);this.navigator._initialize();if(this.navigator.enabled){d={theme:this.options.navigator&&this.options.navigator.theme?this.options.navigator.theme:this.theme,animationEnabled:this.options.navigator&&!g(this.options.navigator.animationEnabled)?this.options.navigator.animationEnabled:this.animationEnabled,animationDuration:this.options.navigator&&
this.options.navigator.animationDuration?this.options.navigator.animationDuration:this.animationDuration,culture:this.options.navigator&&this.options.navigator.culture?this.options.navigator.culture:this.culture,zoomEnabled:!1,data:this.options.navigator&&this.options.navigator.data?this.options.navigator.data:this.options.charts&&this.options.charts[0]&&this.options.charts[0].data?Ya(this.options.charts[0].data):[],axisX:this.options.navigator&&this.options.navigator.axisX?this.options.navigator.axisX:
{},axisY:this.options.navigator&&this.options.navigator.axisY?this.options.navigator.axisY:{},axisX2:this.options.navigator&&this.options.navigator.axisX2?this.options.navigator.axisX2:{},axisY2:this.options.navigator&&this.options.navigator.axisY2?this.options.navigator.axisY2:{},interactivityEnabled:!1,exportEnabled:!1};for(x=0;x<d.data.length;x++)!g(this.navigator.options.data)||!g(d.data[x].type)&&(g(d.data[x].type)||0<=d.data[x].type.indexOf("range")||0<=d.data[x].type.indexOf("ohlc")||0<=d.data[x].type.indexOf("candlestick")||
0<=d.data[x].type.indexOf("error"))?this.navigator.options.data&&g(this.navigator.options.data[x].type)&&(d.data[x].type="splineArea"):d.data[x].type="splineArea";if(d.axisX.length)for(x=0;x<d.axisX.length;x++)d.axisX[x].titleFontSize=g(d.axisX[x].titleFontSize)?1:d.axisX[x].titleFontSize,d.axisX[x].labelFontSize=g(d.axisX[x].labelFontSize)?12:d.axisX[x].labelFontSize,d.axisX[x].labelAngle=g(d.axisX[x].labelAngle)?0:d.axisX[x].labelAngle,d.axisX[x].labelPlacement=g(d.axisX[x].labelPlacement)?"inside":
d.axisX[x].labelPlacement,d.axisX[x].tickLength=g(d.axisX[x].tickLength)?0:d.axisX[x].tickLength,d.axisX[x].lineThickness=g(d.axisX[x].lineThickness)?0:d.axisX[x].lineThickness,d.axisX[x].tickThickness=g(d.axisX[x].tickThickness)?0:d.axisX[x].tickThickness,d.axisX[x].gridThickness=g(d.axisX[x].gridThickness)?1:d.axisX[x].gridThickness;else d.axisX.titleFontSize=this.options.navigator&&this.options.navigator.axisX&&!g(this.options.navigator.axisX.titleFontSize)?this.options.navigator.axisX.titleFontSize:
u?0:1,d.axisX.labelFontSize=this.options.navigator&&this.options.navigator.axisX&&!g(this.options.navigator.axisX.labelFontSize)?this.options.navigator.axisX.labelFontSize:12,d.axisX.labelAngle=this.options.navigator&&this.options.navigator.axisX&&!g(this.options.navigator.axisX.labelAngle)?this.options.navigator.axisX.labelAngle:0,d.axisX.labelPlacement=this.options.navigator&&this.options.navigator.axisX&&!g(this.options.navigator.axisX.labelPlacement)?this.options.navigator.axisX.labelPlacement:
"inside",d.axisX.tickLength=this.options.navigator&&this.options.navigator.axisX&&!g(this.options.navigator.axisX.tickLength)?this.options.navigator.axisX.tickLength:0,d.axisX.lineThickness=this.options.navigator&&this.options.navigator.axisX&&!g(this.options.navigator.axisX.lineThickness)?this.options.navigator.axisX.lineThickness:0,d.axisX.tickThickness=this.options.navigator&&this.options.navigator.axisX&&!g(this.options.navigator.axisX.tickThickness)?this.options.navigator.axisX.tickThickness:
0,d.axisX.gridThickness=this.options.navigator&&this.options.navigator.axisX&&!g(this.options.navigator.axisX.gridThickness)?this.options.navigator.axisX.gridThickness:1;if(d.axisY.length)for(x=0;x<d.axisY.length;x++)d.axisY[x].titleFontSize=d.axisY[x].titleFontSize?d.axisY[x].titleFontSize:u?0:1,d.axisY[x].labelFontSize=d.axisY[x].labelFontSize?d.axisY[x].labelFontSize:u?0:1,d.axisY[x].labelPlacement=d.axisY[x].labelPlacement?d.axisY[x].labelPlacement:"inside",d.axisY[x].includeZero=!1,d.axisY[x].lineThickness=
0,d.axisY[x].tickThickness=0,d.axisY[x].tickLength=0,d.axisY[x].gridThickness=0;else d.axisY.titleFontSize=this.options.navigator&&this.options.navigator.axisY&&this.options.navigator.axisY.titleFontSize?this.options.navigator.axisY.titleFontSize:u?0:1,d.axisY.labelFontSize=this.options.navigator&&this.options.navigator.axisY&&this.options.navigator.axisY.labelFontSize?this.options.navigator.axisY.labelFontSize:u?0:1,d.axisY.labelPlacement=this.options.navigator&&this.options.navigator.axisY&&this.options.navigator.axisY.labelPlacement?
this.options.navigator.axisY.labelPlacement:"inside",d.axisY.includeZero=!1,d.axisY.lineThickness=0,d.axisY.tickThickness=0,d.axisY.tickLength=0,d.axisY.gridThickness=0;if(d.axisX2.length)for(x=0;x<d.axisX2.length;x++)d.axisX2[x].titleFontSize=d.axisX2[x].titleFontSize?d.axisX2[x].titleFontSize:u?0:1,d.axisX2[x].labelFontSize=d.axisX2[x].labelFontSize?d.axisX2[x].labelFontSize:12,d.axisX2[x].labelAngle=g(d.axisX2[x].labelAngle)?0:d.axisX2[x].labelAngle,d.axisX2[x].labelPlacement=d.axisX2[x].labelPlacement?
d.axisX2[x].labelPlacement:"inside",d.axisX2[x].tickLength=g(d.axisX2[x].tickLength)?0:d.axisX2[x].tickLength,d.axisX2[x].lineThickness=d.axisX2[x].lineThickness?d.axisX2[x].lineThickness:0,d.axisX2[x].tickThickness=d.axisX2[x].tickThickness?d.axisX2[x].tickThickness:1,d.axisX2[x].gridThickness=g(d.axisX2[x].gridThickness)?1:d.axisX2[x].gridThickness;else d.axisX2.titleFontSize=this.options.navigator&&this.options.navigator.axisX2&&this.options.navigator.axisX2.titleFontSize?this.options.navigator.axisX2.titleFontSize:
u?0:1,d.axisX2.labelFontSize=this.options.navigator&&this.options.navigator.axisX2&&this.options.navigator.axisX2.labelFontSize?this.options.navigator.axisX2.labelFontSize:12,d.axisX2.labelAngle=this.options.navigator&&this.options.navigator.axisX2&&this.options.navigator.axisX2.labelAngle?this.options.navigator.axisX2.labelAngle:0,d.axisX2.labelPlacement=this.options.navigator&&this.options.navigator.axisX2&&this.options.navigator.axisX2.labelPlacement?this.options.navigator.axisX2.labelPlacement:
"inside",d.axisX2.tickLength=this.options.navigator&&this.options.navigator.axisX2&&this.options.navigator.axisX2.tickLength?this.options.navigator.axisX2.tickLength:0,d.axisX2.lineThickness=this.options.navigator&&this.options.navigator.axisX2&&this.options.navigator.axisX2.lineThickness?this.options.navigator.axisX2.lineThickness:0,d.axisX2.tickThickness=this.options.navigator&&this.options.navigator.axisX2&&this.options.navigator.axisX2.tickThickness?this.options.navigator.axisX2.tickThickness:
1,d.axisX2.gridThickness=this.options.navigator&&this.options.navigator.axisX2&&this.options.navigator.axisX2.gridThickness?this.options.navigator.axisX2.gridThickness:1;if(d.axisY2.length)for(x=0;x<d.axisY2.length;x++)d.axisY2[x].titleFontSize=d.axisY2[x].titleFontSize?d.axisY2[x].titleFontSize:u?0:1,d.axisY2[x].labelFontSize=d.axisY2[x].labelFontSize?d.axisY2[x].labelFontSize:u?0:1,d.axisY2[x].labelPlacement=d.axisY2[x].labelPlacement?d.axisY2[x].labelPlacement:"inside",d.axisY2[x].includeZero=
!1,d.axisY2[x].lineThickness=0,d.axisY2[x].margin=0,d.axisY2[x].tickLength=0,d.axisY2[x].tickThickness=0,d.axisY2[x].gridThickness=0;else d.axisY2.titleFontSize=this.options.navigator&&this.options.navigator.axisY2&&this.options.navigator.axisY2.titleFontSize?this.options.navigator.axisY2.titleFontSize:u?0:1,d.axisY2.labelFontSize=this.options.navigator&&this.options.navigator.axisY2&&this.options.navigator.axisY2.labelFontSize?this.options.navigator.axisY2.labelFontSize:u?0:1,d.axisY2.labelPlacement=
this.options.navigator&&this.options.navigator.axisY2&&this.options.navigator.axisY2.labelPlacement?this.options.navigator.axisY2.labelPlacement:"inside",d.axisY2.includeZero=!1,d.axisY2.lineThickness=0,d.axisY2.margin=0,d.axisY2.tickLength=0,d.axisY2.tickThickness=0,d.axisY2.gridThickness=0;d.backgroundColor=this.navigator.backgroundColor;for(x=0;x<d.data.length;x++)d.data[x].markerSize=d.data[x].markerSize?d.data[x].markerSize:0;if(!this.navigator.chart){var s=k("canvasjs-chart-panel");this.navigator.panel.appendChild(s);
s.style.height=this.navigator.height+"px";s.style.width=this.navigator.width+"px"}this.navigator.chart&&(this.navigator.chart.panel.style.width=this.navigator.width+"px");this.navigator.chart=this.navigator.chart||new Ja(s,d,{parent:this.navigator,isOptionsInArray:!1,index:null,predefinedThemes:ab,optionsName:"navigator",stockChart:this});this.navigator.chart._initialize();this.navigator.chart.setLayout();this.navigator.chart.selectedColorSet=this.selectedColorSet;this.navigator._chartOptions=d;this.navigator.slider=
this.navigator.slider||new R(this.navigator,this.options);this.navigator.slider._initialize()}this.rangeSelector=this.rangeSelector||new S(this,this.options);this.rangeSelector.buttonStyle=this.rangeSelector.buttonStyle||new X(this,this.rangeSelector.options);this.rangeSelector.inputFields=this.rangeSelector.inputFields||new W(this,this.rangeSelector.options);this.rangeSelector.inputFields.style=new Y(this,this.rangeSelector.inputFields.options);this.rangeSelector.inputFields.style._updateOptions();
this.rangeSelector.inputFields._initialize();if(this.rangeSelector.inputFields&&this.rangeSelector.inputFields.enabled)for(this.rangeSelector.inputFields._textBlocks=[],this.rangeSelector.inputFields._labels=[],this.rangeSelector.inputFieldsWidth=0,s=this.rangeSelector.inputFields.style.maxWidth=this.rangeSelector.inputFields.style.options.maxWidth?this.rangeSelector.inputFields.style.options.maxWidth:this.rangeSelector.stockChart.width/2,x=0;x<this.rangeSelector.inputFields.elements.length;x++){d=
new oa(this.rangeSelector.ctx,{x:0,y:0,backgroundColor:this.rangeSelector.inputFields.style.backgroundColor,borderColor:this.rangeSelector.inputFields.style.borderColor,borderThickness:this.rangeSelector.inputFields.style.borderThickness,cornerRadius:0,maxWidth:g(this.rangeSelector.inputFields.style.options.width)?s:this.rangeSelector.inputFields.style.width,maxHeight:2*this.rangeSelector.inputFields.style.fontSize,angle:0,padding:this.rangeSelector.inputFields.style.padding,text:this.rangeSelector.inputFields.valueFormatString,
horizontalAlign:"center",textAlign:"center",fontSize:this.rangeSelector.inputFields.style.fontSize,fontFamily:this.rangeSelector.inputFields.style.fontFamily,fontWeight:this.rangeSelector.inputFields.style.fontWeight,fontColor:this.rangeSelector.inputFields.style.fontColor,fontStyle:this.rangeSelector.inputFields.style.fontStyle,textBaseline:"middle"});var t=d.measureText(),a=new oa(this.rangeSelector.ctx,{x:0,y:0,backgroundColor:u?"transparent":null,borderColor:this.rangeSelector.inputFields.style.borderColor,
borderThickness:0,cornerRadius:0,maxWidth:this.rangeSelector.inputFields.style.maxWidth,maxHeight:2*this.rangeSelector.inputFields.style.fontSize,angle:0,padding:this.rangeSelector.inputFields.style.padding,text:"From",horizontalAlign:"left",fontSize:this.rangeSelector.inputFields.style.fontSize,fontFamily:this.rangeSelector.inputFields.style.fontFamily,fontWeight:this.rangeSelector.inputFields.style.fontWeight,fontColor:this.rangeSelector.inputFields.style.fontColor,fontStyle:this.rangeSelector.inputFields.style.fontStyle,
textBaseline:"middle"});this.rangeSelector.inputFields._textBlocks.push(d);this.rangeSelector.inputFields._labels.push(a);this.rangeSelector.inputFields._textBlocks[x].bounds={x1:null,x2:null,y1:null,y2:null,width:null,height:null};this.rangeSelector.inputFields._labels[x].bounds={x1:null,x2:null,y1:null,y2:null,width:null,height:null};this.rangeSelector.inputFieldsWidth+=t.width+this.rangeSelector.inputFields.style.spacing+a.measureText().width;this.rangeSelector.inputFieldsHeight=this.rangeSelector.inputFieldsHeight<
t.height?t.height:this.rangeSelector.inputFieldsHeight;d=this.rangeSelector.inputFields._textBlocks[x];d.id=++this.rangeSelector.stockChart._eventManager.lastObjectId;this.rangeSelector.stockChart._eventManager.objectMap[d.id]={id:d.id,objectType:"inputFields",inputFieldIndex:x}}this.rangeSelector.buttonStyle._updateOptions();this.rangeSelector._initialize();this._objectsInitialized=!0};G.prototype.render=function(d){var t=this;d&&(this.options=d);this._initialize();this.title&&this.title.render();
if(this.subtitles)for(d=0;d<this.subtitles.length;d++)this.subtitles[d].render();var x;if(this.options.charts){x=Array(this.options.charts.length);var s=this.layoutManager.getFreeSpace(),a=s.height,s=s.height,f=this.options.charts.length;for(d=0;d<this.options.charts.length;d++)!g(this.options.charts[d].height)&&parseFloat(this.options.charts[d].height)&&(x[d]=0<=this.options.charts[d].height.toString().indexOf("%")?Ua(this.options.charts[d].height,a,Math.floor(s/f),this.height,0):this.options.charts[d].height,
s-=x[d],f--);s=Math.floor(s/f);for(d=0;d<this.options.charts.length;d++)g(x[d])&&(x[d]=s);var c,f=this.options.charts,b=this.charts;this.charts=[];for(d=0;d<f.length;d++){s=this.layoutManager.getFreeSpace();a=f[d];a.theme=f[d].theme?f[d].theme:this.options.theme?this.options.theme:this.theme;a.animationEnabled=g(f[d].animationEnabled)?this.animationEnabled:f[d].animationEnabled;a.animationDuration=f[d].animationDuration?f[d].animationDuration:this.animationDuration;a.culture=f[d].culture?f[d].culture:
this.culture;a.height=f[d].height?x[d]:null;g(f.backgroundColor)?g(this.options.backgroundColor)||(a.backgroundColor=this.backgroundColor):a.backgroundColor=this.options.charts[d].backgroundColor;for(c=b.length;0<c--&&b[c].options!==a;);0<=c?(this.charts[d]=b[c],this.charts[d].options=a):(c=k("canvasjs-chart-panel"),c.style.height=x[d]+"px",this._canvasJSContainer.appendChild(c),this.charts[d]=new Ja(c,a,{parent:this,isOptionsInArray:!0,index:d,predefinedThemes:ab,optionsName:"charts",stockChart:this}));
this.charts[d].panel.style.width=s.width+"px";this.charts[d].panel.style.top=s.y1+"px";this.charts[d].panel.style.left=s.x1+"px";this.charts[d].panel.style.height=x[d]+"px";this.charts[d].height=a.height?a.height:x[d];this.layoutManager.registerSpace("top",{width:s.width,height:x[d]})}b=null;for(d=0;d<this.charts.length;d++)if(!g(this.options.charts[d].data))for(c=0;c<this.options.charts[d].data.length;c++)x=this.options.charts[d].data[c],0<=G._supportedChartTypes.indexOf(x.type)||g(x.type)||(ea=
!1,window.console&&window.console.log("CanvasJS Error: "+x.type+" Chart is not Supported in StockChart"));if(!ea)return;this.setChartsLayout();for(d=x=0;d<this.charts.length;d++)if(g(this.charts[d].options.colorSet)){this.charts[d].selectedColorSet=[];for(c=x;c<x+this.charts[d].data.length;c++)this.charts[d].selectedColorSet.push(this.selectedColorSet[c%this.selectedColorSet.length]);x+=this.charts[d].data.length}if(this.navigator&&this.navigator.enabled)if(this.navigator.options.data){this.navigator.chart.selectedColorSet=
[];for(c=x;c<x+this.navigator.chart.data.length;c++)this.navigator.chart.selectedColorSet.push(this.selectedColorSet[c%this.selectedColorSet.length]);x+=this.navigator.chart.data.length}else this.navigator.chart.selectedColorSet=this.charts[0].selectedColorSet}if(this.navigator&&this.navigator.enabled){for(d=0;d<this.navigator.chart.data.length;d++)0<=G._supportedChartTypes.indexOf(this.navigator.chart.data[d].type)||(ea=!1,window.console&&window.console.log("CanvasJS Error: "+this.navigator.chart.data[d].type+
" Chart is not Supported in Navigator"));if(ea){var e=this.navigator.chart.axisX&&this.navigator.chart.axisX.length?this.navigator.chart.axisX[0]:this.navigator.chart.axisX2[0];e.bounds.x1>this._chartsPlotAreaX1&&(this._chartsPlotAreaX1=e.bounds.x1);this.navigator.width=this.navigator.chart.width=this.navigator.slider.fullWidth=this.navigator.options.width?this.navigator.options.width:this._chartsPlotAreaX2-this._chartsPlotAreaX1+e.bounds.x1;this.navigator.panel.style.left=this._chartsPlotAreaX1+
this.layoutManager.getFreeSpace().x1-e.bounds.x1+"px";this.navigator.panel.style.width=this.navigator.chart.panel.style.width=this.navigator.options.width?this.navigator.options.width:this._chartsPlotAreaX2-this._chartsPlotAreaX1+e.bounds.x1+"px";this.navigator.chart.render(this.navigator._chartOptions);this.navigator.backgroundColor=this.navigator.chart.backgroundColor;this.navigator.animationEnabled=this.navigator.chart.animationEnabled;this.navigator.animationDuration=this.navigator.chart.animationDuration;
this.navigator.theme=this.navigator.chart.theme;this.navigator.axisX=this.navigator.chart.axisX;this.navigator.axisX2=this.navigator.chart.axisX2;this.navigator.axisY=this.navigator.chart.axisY;this.navigator.axisY2=this.navigator.chart.axisY2;this.navigator.data=this.navigator.chart.data}}s=x=null;c=0;f=a=null;for(d=0;d<this.charts.length;d++)for(b=this.charts[d].axisX&&this.charts[d].axisX.length?this.charts[d].axisX:this.charts[d].axisX2,x=x||(b&&0<b.length?b[0].minimum:null),s=s||(b&&0<b.length?
b[0].maximum:null),c=0;c<b.length;c++)e=b[c],e.minimum<x&&(x=e.minimum),e.maximum>s&&(s=e.maximum);var h;this.navigator&&(this.navigator.chart&&ea)&&(h=this.navigator.chart.axisX&&0<this.navigator.chart.axisX.length?this.navigator.chart.axisX[0]:this.navigator.chart.axisX2[0],this._axisXMin=this.navigator.slider.minimum=g(this.navigator.options.slider)||g(this.navigator.options.slider.minimum)?null:Math.max(h.minimum,this.navigator.slider.minimum),this._axisXMax=this.navigator.slider.maximum=g(this.navigator.options.slider)||
g(this.navigator.options.slider.maximum)?null:Math.min(h.maximum,this.navigator.slider.maximum));if(this.rangeSelector&&this.rangeSelector.enabled){c=h?h.maximum-h.minimum:s-x;this.charts&&this.charts.length&&(e=this.charts[0].axisX&&this.charts[0].axisX.length?this.charts[0].axisX[0]:this.charts[0].axisX2[0]);for(d=0;d<this.rangeSelector.buttons.length;d++){var r=null,b=this.rangeSelector.buttons[d];"year"===b.rangeType?r=31104E6*b.range:"ytd"===b.rangeType?r="ytd":"month"===b.rangeType?r=2592E6*
b.range:"week"===b.rangeType?r=6048E5*b.range:"day"===b.rangeType?r=864E5*b.range:"hour"===b.rangeType?r=36E5*b.range:"minute"===b.rangeType?r=6E4*b.range:"second"===b.rangeType?r=1E3*b.range:"millisecond"===b.rangeType?r=b.range:"all"===b.rangeType?r=null:"number"===b.rangeType&&(r=b.range);if("ytd"===b.rangeType||r<c)b.enabled=!0;b.enabled?(b.cursor=this.rangeSelector.buttonStyle.cursor,"on"===b.state&&((g(this._axisXMin)&&g(this._axisXMax)&&(b.textBlock.fontWeight="bold",b.textBlock.fontColor=
this.rangeSelector.buttonStyle.labelFontColorOnHover,b.textBlock.backgroundColor=this.rangeSelector.buttonStyle.backgroundColorOnSelect),"ytd"===b.rangeType&&e)?(a=new Date(e.viewportMaximum),a.setDate(1),a.setMonth(0),a=a.getTime()):g(r)?h?(a=h.minimum,f=h.maximum):e&&(a=e.minimum,f=e.maximum):e.viewportMaximum-r<(h?h.minimum:e.minimum)?(f=h.minimum-(e.viewportMaximum-r),a=h.minimum,f=Math.min(h.maximum,e.viewportMaximum+f)):(a=e.viewportMaximum-r,f=e.viewportMaximum)),g(this._axisXMin)&&g(this._axisXMax)||
(b.state="off"),this._axisXMin=g(this._axisXMin)?a:this._axisXMin,this._axisXMax=g(this._axisXMax)?f:this._axisXMax):b.cursor="not-allowed";b.mousemove=function(a){this.enabled&&"off"===this.state&&(this.textBlock.backgroundColor=a.stockChart.rangeSelector.buttonStyle.backgroundColorOnHover,this.textBlock.fontColor=a.stockChart.rangeSelector.buttonStyle.labelFontColorOnHover,this.textBlock.render(!0))};b.mouseover=function(a){this.enabled&&"off"===this.state&&(this.textBlock.backgroundColor=a.stockChart.rangeSelector.buttonStyle.backgroundColorOnHover,
this.textBlock.fontColor=a.stockChart.rangeSelector.buttonStyle.labelFontColorOnHover,this.textBlock.render(!0))};b.mouseout=function(a){this.enabled&&"off"===this.state&&(this.textBlock.backgroundColor=a.stockChart.rangeSelector.buttonStyle.backgroundColor,this.textBlock.fontColor=a.stockChart.rangeSelector.buttonStyle.labelFontColor,this.textBlock.render(!0))};b.click=function(a){if(this.enabled){for(var b=0,c=null,d=null,e=0;e<t.rangeSelector.buttons.length;e++)t.rangeSelector.buttons[e]!=this&&
(t.rangeSelector.buttons[e].state="off"),t.rangeSelector.buttons[e].textBlock.fontWeight=t.rangeSelector.buttonStyle.labelFontWeight,t.rangeSelector.buttons[e].textBlock.fontColor=a.stockChart.rangeSelector.buttonStyle.labelFontColor,t.rangeSelector.buttons[e].textBlock.backgroundColor=a.stockChart.rangeSelector.buttonStyle.backgroundColor,t.rangeSelector.buttons[e].textBlock.render(!0);var f;t.charts&&t.charts.length&&(f=t.charts[0].axisX&&t.charts[0].axisX.length?t.charts[0].axisX[0]:t.charts[0].axisX2[0]);
var h;t.navigator&&t.navigator.chart&&(h=t.navigator.chart.axisX?t.navigator.chart.axisX[0]:t.navigator.chart.axisX2[0]);"year"===this.rangeType?b=31104E6*this.range:"month"===this.rangeType?b=2592E6*this.range:"week"===this.rangeType?b=6048E5*this.range:"day"===this.rangeType?b=864E5*this.range:"hour"===this.rangeType?b=36E5*this.range:"minute"===this.rangeType?b=6E4*this.range:"second"===this.rangeType?b=1E3*this.range:"millisecond"===this.rangeType?b=this.range:"all"===this.rangeType?b=null:"number"===
this.rangeType&&(b=this.range);"ytd"===this.rangeType&&f?(c=new Date(f.viewportMaximum),c.setDate(1),c.setMonth(0),b=c.getTime(),c=Math.max(b,h?h.minimum:f.minimum),d=f.viewportMaximum):g(b)?h?(c=h.minimum,d=h.maximum):f&&(c=f.minimum,d=f.maximum):h&&f.viewportMaximum-b<(h?h.minimum:f.minimum)?(h=t.navigator.chart.axisX[0].minimum-(f.viewportMaximum-b),c=t.navigator.chart.axisX[0].minimum,d=Math.min(t.navigator.chart.axisX[0].maximum,f.viewportMaximum+h)):(c=f.viewportMaximum-b,d=f.viewportMaximum);
t._rangeEventParameter={stockChart:t,source:"buttons",index:this._index,minimum:c,maximum:d};"on"!=this.state&&(t._rangeEventParameter.type="rangeChanging",t.dispatchEvent("rangeChanging",t._rangeEventParameter,t),t._syncCharts(c,d),t.sessionVariables._axisXMin=c,t.sessionVariables._axisXMax=d,t._rangeEventParameter.type="rangeChanged",t.dispatchEvent("rangeChanged",t._rangeEventParameter,t),this.state="on");this.textBlock.fontWeight="bold";this.textBlock.fontColor=a.stockChart.rangeSelector.buttonStyle.labelFontColorOnHover;
this.textBlock.backgroundColor=a.stockChart.rangeSelector.buttonStyle.backgroundColorOnSelect;this.textBlock.render(!0)}}}if(this.rangeSelector.inputFields&&this.rangeSelector.inputFields.enabled){this.rangeSelector.inputFields.valueType=this.options.rangeSelector&&this.options.rangeSelector.inputFields&&this.options.rangeSelector.inputFields.valueType?this.options.rangeSelector.inputFields.valueType:this.isDateTime?"dateTime":"number";for(d=0;d<this.rangeSelector.inputFields._textBlocks.length;d++)e=
this.rangeSelector.inputFields._textBlocks[d],e.mousemove=function(a){t.rangeSelector&&t.rangeSelector.inputFields&&!t.rangeSelector.inputFields.enabled||(a.inputField.cursor=a.stockChart.rangeSelector.inputFields.style.cursor)},e.mouseover=function(a){t.rangeSelector&&t.rangeSelector.inputFields&&!t.rangeSelector.inputFields.enabled||(a.inputField.cursor=a.stockChart.rangeSelector.inputFields.style.cursor)},e.mouseout=function(a){t.rangeSelector&&t.rangeSelector.inputFields&&!t.rangeSelector.inputFields.enabled||
(a.inputField.cursor="auto")},e.click=function(a){t.rangeSelector&&t.rangeSelector.inputFields&&!t.rangeSelector.inputFields.enabled||(a.stockChart.rangeSelector.inputFields.elements[a.inputFieldIndex].style.display="inline",a.stockChart.rangeSelector.inputFields.elements[a.inputFieldIndex].focus())};if(isFinite(x)&&isFinite(s)){"dateTime"===this.rangeSelector.inputFields.valueType?(this.rangeSelector.inputFields.valueFormatString=this.options.rangeSelector&&this.options.rangeSelector.inputFields&&
this.options.rangeSelector.inputFields.valueFormatString?this.options.rangeSelector.inputFields.valueFormatString:"MMM DD YYYY",this.rangeSelector.inputFields.startValue=g(this.rangeSelector.inputFields.options.startValue)?g(a)?x:a:fa(this.rangeSelector.inputFields.options.startValue,this.rangeSelector.inputFields.valueFormatString),this.rangeSelector.inputFields.endValue=g(this.rangeSelector.inputFields.options.endValue)?g(f)?s:f:fa(this.rangeSelector.inputFields.options.endValue,this.rangeSelector.inputFields.valueFormatString)):
(this.rangeSelector.inputFields.valueFormatString=this.options.rangeSelector&&this.options.rangeSelector.inputFields&&this.options.rangeSelector.inputFields.valueFormatString?this.options.rangeSelector.inputFields.valueFormatString:"#,##0.##",this.rangeSelector.inputFields.startValue=g(this.rangeSelector.inputFields.options.startValue)?g(a)?x:a:this.rangeSelector.inputFields.options.startValue,this.rangeSelector.inputFields.endValue=g(this.rangeSelector.inputFields.options.endValue)?g(f)?s:f:this.rangeSelector.inputFields.options.endValue);
if(!(g(this._axisXMin)&&g(this._axisXMax)&&g(this.rangeSelector.inputFields.options.startValue)&&g(this.rangeSelector.inputFields.options.endValue)))for(c=0;c<this.rangeSelector.buttons.length;c++)b=this.rangeSelector.buttons[c];d=fa(this.rangeSelector.inputFields.startValue,"YYYY-MM-DD'T'HH:mm:ssZ");e=fa(this.rangeSelector.inputFields.endValue,"YYYY-MM-DD'T'HH:mm:ssZ");u||(d=d.replace(/-/g,"/"),e=e.replace(/-/g,"/"),d=d.replace("T"," "),e=e.replace("T"," "),d=d.replace(/(\+[0-9]{2})(\:)([0-9]{2}$)/,
" UTC$1$3"),e=e.replace(/(\+[0-9]{2})(\:)([0-9]{2}$)/," UTC$1$3"));this._axisXMin=g(this._axisXMin)?"dateTime"===this.rangeSelector.inputFields.valueType?(new Date(d)).getTime():this.rangeSelector.inputFields.startValue:this._axisXMin;this._axisXMax=g(this._axisXMax)?"dateTime"===this.rangeSelector.inputFields.valueType?(new Date(e)).getTime():this.rangeSelector.inputFields.endValue:this._axisXMax}for(d=0;d<this.rangeSelector.inputFields.elements.length;d++)this.rangeSelector.inputFields.elements[d].title=
"dateTime"===this.rangeSelector.inputFields.valueType?"YYYY-MM-DD":this.rangeSelector.inputFields.valueFormatString}this.rangeSelector.render()}g(this._axisXMin)&&(this._axisXMin=x);g(this._axisXMax)&&(this._axisXMax=s);this._axisXMin=!g(this.sessionVariables._axisXMin)&&this.navigator&&this.navigator.slider&&!this.navigator.slider.hasOptionChanged("minimum")?this.sessionVariables._axisXMin:this._axisXMin;this._axisXMax=!g(this.sessionVariables._axisXMax)&&this.navigator&&this.navigator.slider&&!this.navigator.slider.hasOptionChanged("maximum")?
this.sessionVariables._axisXMax:this._axisXMax;if(!g(h)){this.navigator.slider.hasOptionChanged("minimum")&&(this._axisXMin=this.sessionVariables._axisXMin=this.navigator.slider.sessionVariables.minimum=this.navigator.slider.minimum=this.navigator.slider.options.minimum);this.navigator.slider.hasOptionChanged("maximum")&&(this._axisXMax=this.sessionVariables._axisXMax=this.navigator.slider.sessionVariables.maximum=this.navigator.slider.maximum=this.navigator.slider.options.maximum);if(this._axisXMin<
h.minimum||this._axisXMin>h.maximum)this._axisXMin=h.minimum;if(this._axisXMax<h.minimum||this._axisXMax>h.maximum)this._axisXMax=h.maximum}!g(h)&&h.reversed?this._syncCharts(this._axisXMax,this._axisXMin):this._syncCharts(this._axisXMin,this._axisXMax)};G.prototype.setChartsLayout=function(){var d,g,k=0,s=this.width;this.isPlotAreaSet=this.isDateTime=!1;for(var a=0;a<this.charts.length;a++){d=this.charts[a];d._initialize();d.setLayout();g={};if((d.axisX[0]||d.axisX2[0])&&(d.axisY[0]||d.axisY2[0])){var f=
d.axisX[0]?d.axisX[0].lineCoordinates:d.axisX2[0].lineCoordinates;if(d.axisY&&0<d.axisY.length&&d.axisY[0]){var c=d.axisY[0];g.x1=f.x1<f.x2?f.x1:c.lineCoordinates.x1;g.x2=f.x2>c.lineCoordinates.x2?f.x2:c.lineCoordinates.x2}d.axisY2&&0<d.axisY2.length&&d.axisY2[0]&&(c=d.axisY2[0],g.x1=f.x1<f.x2?f.x1:c.lineCoordinates.x1,g.x2=f.x2>c.lineCoordinates.x2?f.x2:c.lineCoordinates.x2)}for(f=0;f<d.data.length;f++)"dateTime"===d.data[f].xValueType&&(this.isDateTime=!0);k=Math.max(k,g.x1);s=Math.min(s,g.x2);
d.sessionVariables.plotAreaBounds=g}this._chartsPlotAreaX1=k;this._chartsPlotAreaX2=s};G.prototype._updateSize=function(){return lb.call(this,[this.canvas,this.overlaidCanvas])};G.prototype._syncCharts=function(d,k){for(var r=this,s=null,a=Math.min(d,k),f=Math.max(d,k),c=0;c<this.charts.length;c++){s=this.charts[c];s.toolTip&&s.toolTip.enabled&&s.toolTip.hide();for(var b=0;b<s.axisX.length;b++)s.axisX[b].setViewPortRange(d,k),s.axisX[b].options.labelAngle=g(s.axisX[b].options.labelAngle)?0:s.axisX[b].options.labelAngle,
this.charts[c].axisX[b].crosshair&&this.charts[c].axisX[b].crosshair.enabled&&(this.charts[c].axisX[b].crosshair.options.updated||(this.charts[c].axisX[b].crosshair.options.updated=function(a){for(var b=0;b<r.charts.length;b++)if(r.charts[b]!=a.chart)for(var c=0;c<r.charts[b].axisX.length;c++)r.charts[b].axisX[c].crosshair&&r.charts[b].axisX[c].crosshair.showAt(a.value)}),this.charts[c].axisX[b].crosshair.options.hidden||(this.charts[c].axisX[b].crosshair.options.hidden=function(a){for(var b=0;b<
r.charts.length;b++)if(r.charts[b]!=a.chart)for(var c=0;c<r.charts[b].axisX.length;c++)r.charts[b].axisX[c].crosshair&&r.charts[b].axisX[c].crosshair.hide()}));for(b=0;b<s.axisX2.length;b++)s.axisX2[b].setViewPortRange(d,k),s.axisX2[b].options.labelAngle=g(s.axisX2[b].options.labelAngle)?0:s.axisX2[b].options.labelAngle,this.charts[c].axisX2[b].crosshair&&this.charts[c].axisX2[b].crosshair.enabled&&(this.charts[c].axisX2[b].crosshair.options.updated||(this.charts[c].axisX2[b].crosshair.options.updated=
function(a){for(var b=0;b<r.charts.length;b++)if(r.charts[b]!=a.chart)for(var c=0;c<r.charts[b].axisX2.length;c++)r.charts[b].axisX2[c].crosshair&&r.charts[b].axisX2[c].crosshair.showAt(a.value)}),this.charts[c].axisX2[b].crosshair.options.hidden||(this.charts[c].axisX2[b].crosshair.options.hidden=function(a){for(var b=0;b<r.charts.length;b++)if(r.charts[b]!=a.chart)for(var c=0;c<r.charts[b].axisX2.length;c++)r.charts[b].axisX2[c].crosshair&&r.charts[b].axisX2[c].crosshair.hide()}));s.options.toolbar?
s.options.toolbar=s.options.toolbar:r.options.toolbar&&(s.options.toolbar=r.options.toolbar);s._initialize();s.setLayout();s.panEnabled=s.options.zoomEnabled&&s.zoomEnabled?!1:!0;s.renderElements();(g(this.charts[c].options.toolTip)||!g(this.charts[c].options.toolTip)&&g(this.charts[c].options.toolTip.updated))&&this.charts[c].toolTip&&(this.charts[c].toolTip.updated=function(a){for(var b=0;b<r.charts.length;b++)r.charts[b]!=a.chart&&r.charts[b].toolTip.showAtX(a.entries[0].xValue,a.entries[0].dataSeriesIndex)});
(g(this.charts[c].options.toolTip)||!g(this.charts[c].options.toolTip)&&g(this.charts[c].options.toolTip.hidden))&&this.charts[c].toolTip&&(this.charts[c].toolTip.hidden=function(a){for(var b=0;b<r.charts.length;b++)r.charts[b]!=a.chart&&r.charts[b].toolTip.hide()})}this.rangeSelector&&(this.rangeSelector.enabled&&this.rangeSelector.inputFields&&this.rangeSelector.inputFields.enabled)&&this.rangeSelector._updateInputFields(a,f);this.navigator&&this.navigator.enabled&&this.navigator._updateSlider(a,
f)};G.prototype.destroy=function(){for(var d=this.allDOMEventHandlers,g=0;g<this.charts.length;g++)this.charts[g].destroy();this.navigator&&this.navigator.enabled&&this.navigator.chart.destroy();for(g=0;g<d.length;g++)fb(d[g][0],d[g][1],d[g][2],d[g][3]);for(this.allDOMEventHandlers=[];this.navigator&&this.navigator.enabled&&this.navigator.panel.hasChildNodes();)this.navigator.panel.removeChild(this.navigator.panel.lastChild);for(;this._canvasJSContainer&&this._canvasJSContainer.hasChildNodes();)this._canvasJSContainer.removeChild(this._canvasJSContainer.lastChild);
for(;this.container&&this.container.hasChildNodes();)this.container.removeChild(this.container.lastChild);this.container=this._canvasJSContainer=null;Ca(this.canvas);Ca(this.overlaidCanvas);this._eventManager&&this._eventManager.ghostCanvas&&Ca(this._eventManager.ghostCanvas);this.navigator.panel=null;this.rangeSelector.panel=null};G.prototype.exportChart=function(d){d="undefined"===typeof d?{}:d;var g=d.format?d.format:"png",k=d.fileName?d.fileName:this.exportFileName,s=this.canvas.cloneNode();s.setAttribute("class",
s.getAttribute("class")+"-clone");var a=s.getContext("2d");a.drawImage(this.canvas,0,0);for(var f=[],c=0;c<this.charts.length;c++){var b=this.charts[c];f.push({canvas:b.canvas,position:{x:b.container.offsetLeft,y:b.container.offsetTop}});f.push({canvas:b.overlaidCanvas,position:{x:b.container.offsetLeft,y:b.container.offsetTop}})}this.navigator&&this.navigator.enabled&&(c=this.navigator,f.push({canvas:c.chart.canvas,position:{x:c.panel.offsetLeft,y:c.panel.offsetTop}}),f.push({canvas:c.chart.overlaidCanvas,
position:{x:c.panel.offsetLeft,y:c.panel.offsetTop}}));for(c=0;c<f.length;c++)a.drawImage(f[c].canvas,f[c].position.x*la,f[c].position.y*la);if(d.toDataURL)return s.toDataURL("image/"+g);cb(s,g,k)};G.prototype.print=function(){var d=this.exportChart({toDataURL:!0}),g=document.createElement("iframe");g.setAttribute("class","canvasjs-chart-print-frame");O(g,{position:"absolute",width:"100%",border:0,margin:0,padding:0});g.style.height=this.height+"px";this._canvasJSContainer.appendChild(g);var k=this,
s=g.contentWindow||g.contentDocument.document||g.contentDocument;s.document.open();s.document.write('<!DOCTYPE HTML>\n<html><body><img src="'+d+'"/><body/></html>');s.document.body&&s.document.body.style&&(s.document.body.style.margin="0px 0px 0px 0px",s.document.body.style.padding="0px 0px 0px 0px");s.document.close();setTimeout(function(){s.focus();s.print();setTimeout(function(){k._canvasJSContainer.removeChild(g)},1E3)},500)};G.prototype.getObjectAtXY=function(d,k,r){r=null;if(!g(this.rangeSelector)){for(var s=
0;s<this.rangeSelector.buttons.length;s++){var a=this.rangeSelector.buttons[s];d>=a.bounds.x1&&(d<=a.bounds.x2&&k>=a.bounds.y1&&k<=a.bounds.y2)&&(r=a.id)}for(s=0;s<this.rangeSelector.inputFields._textBlocks.length;s++)a=this.rangeSelector.inputFields._textBlocks[s],d>=a.bounds.x1&&(d<=a.bounds.x2&&k>=a.bounds.y1&&k<=a.bounds.y2)&&(r=a.id)}return r};G.prototype._touchEventHandler=function(d){if(d.changedTouches){var k=[],r=d.changedTouches,s=r?r[0]:d,a=null;switch(d.type){case "touchstart":case "MSPointerDown":k=
["mousemove","mousedown"];this._lastTouchData=Aa(s);this._lastTouchData.time=new Date;break;case "touchmove":case "MSPointerMove":k=["mousemove"];break;case "touchend":case "MSPointerUp":var f=this._lastTouchData&&this._lastTouchData.time?new Date-this._lastTouchData.time:0,k="touchstart"===this._lastTouchEventType||"MSPointerDown"===this._lastTouchEventType||300>f?["mouseup","click"]:["mouseup"];break;default:return}if(!(r&&1<r.length)){a=Aa(s);a.time=new Date;try{var c=a.y-this._lastTouchData.y,
f=a.time-this._lastTouchData.time;if(1<Math.abs(c)&&this._lastTouchData.scroll||5<Math.abs(c)&&250>f)this._lastTouchData.scroll=!0}catch(b){}this._lastTouchEventType=d.type;if(this._lastTouchData&&this._lastTouchData.scroll)this.isDrag&&this.resetOverlayedCanvas(),this.isDrag=!1;else for(r=0;r<k.length;r++)if(a=k[r],c=document.createEvent("MouseEvent"),c.initMouseEvent(a,!0,!0,window,1,s.screenX,s.screenY,s.clientX,s.clientY,!1,!1,!1,!1,0,null),s.target.dispatchEvent(c),this._lastTouchData&&!g(this._lastTouchData.scroll)&&
!this._lastTouchData.scroll||this._lastTouchData&&!this._lastTouchData.scroll&&250<f||"click"===a)d.preventManipulation&&d.preventManipulation(),d.preventDefault&&d.cancelable&&d.preventDefault()}}};G.prototype._mouseEventHandler=function(d){"undefined"===typeof d.target&&d.srcElement&&(d.target=d.srcElement);var g=Aa(d),k=d.type,s,a;d.which?a=3==d.which:d.button&&(a=2==d.button);G.capturedEventParam&&(s=G.capturedEventParam,"mouseup"===k&&(G.capturedEventParam=null,s.stockChart.overlaidCanvas.releaseCapture?
s.stockChart.overlaidCanvas.releaseCapture():document.documentElement.removeEventListener("mouseup",s.stockChart._mouseEventHandler,!1)),s.hasOwnProperty(k)&&("mouseup"!==k||s.stockChart.overlaidCanvas.releaseCapture?d.target!==s.stockChart.overlaidCanvas&&u||s[k].call(s.context,g.x,g.y):d.target!==s.stockChart.overlaidCanvas&&(s.stockChart.isDrag=!1)));if(this._ignoreNextEvent)this._ignoreNextEvent=!1;else if(d.preventManipulation&&d.preventManipulation(),d.preventDefault&&d.preventDefault(),La&&
window.console&&(window.console.log(k+" --\x3e x: "+g.x+"; y:"+g.y),a&&window.console.log(d.which),"mouseup"===k&&window.console.log("mouseup")),!a){if(!G.capturedEventParam&&this._events){for(var f=0;f<this._events.length;f++)if(this._events[f].hasOwnProperty(k))if(s=this._events[f],a=s.bounds,g.x>=a.x1&&g.x<=a.x2&&g.y>=a.y1&&g.y<=a.y2){s[k].call(s.context,g.x,g.y);"mousedown"===k&&!0===s.capture?(Chart.capturedEventParam=s,this.overlaidCanvas.setCapture?this.overlaidCanvas.setCapture():document.documentElement.addEventListener("mouseup",
this._mouseEventHandler,!1)):"mouseup"===k&&(s.stockChart.overlaidCanvas.releaseCapture?s.stockChart.overlaidCanvas.releaseCapture():document.documentElement.removeEventListener("mouseup",this._mouseEventHandler,!1));break}else s=null;d.target.style.cursor=s&&s.cursor?s.cursor:this._defaultCursor}k=this.bounds;(g.x<k.x1||g.x>k.x2||g.y<k.y1||g.y>k.y2)&&this.resetOverlayedCanvas();!this.isDrag&&this._eventManager&&this._eventManager.mouseEventHandler(d)}};G.prototype.resetOverlayedCanvas=function(){this.overlaidCanvasCtx.clearRect(0,
0,this.width,this.height)};G.prototype.clearCanvas=mb;G.prototype.getAutoFontSize=nb;ia(I,Ha);ia(F,Ma);Ja.prototype.alignVerticalAxes=function(){if(!this.isNavigator&&this.stockChart){for(var d=this.sessionVariables.plotAreaBounds,g=this.stockChart._chartsPlotAreaX1-d.x1,d=d.x2-this.stockChart._chartsPlotAreaX2,k=0;k<this.axisX.length;k++)this.axisX[k].lineCoordinates.x1+=g,this.axisX[k].lineCoordinates.x2-=d,this.axisX[k].lineCoordinates.width=this.axisX[k].lineCoordinates.x2-this.axisX[k].lineCoordinates.x1,
this.axisX[k].bounds.x1+=g,this.axisX[k].bounds.x2-=d,this.axisX[k].calculateValueToPixelConversionParameters();for(k=0;k<this.axisX2.length;k++)this.axisX2[k].lineCoordinates.x1+=g,this.axisX2[k].lineCoordinates.x2-=d,this.axisX2[k].lineCoordinates.width=this.axisX2[k].lineCoordinates.x2-this.axisX2[k].lineCoordinates.x1,this.axisX2[k].bounds.x1+=g,this.axisX2[k].bounds.x2-=d,this.axisX2[k].calculateValueToPixelConversionParameters();for(k=0;k<this.axisY.length;k++)this.axisY[k].lineCoordinates.x1+=
g,this.axisY[k].lineCoordinates.x2+=g,this.axisY[k].bounds.x1+=g,this.axisY[k].bounds.x2+=g;for(k=0;k<this.axisY2.length;k++)this.axisY2[k].lineCoordinates.x1-=d,this.axisY2[k].lineCoordinates.x2-=d,this.axisY2[k].bounds.x1-=d,this.axisY2[k].bounds.x2-=d}};Ja.prototype.syncCharts=function(d,k){this.stockChart&&(d=g(d)?this.stockChart._axisXMin:d,k=g(k)?this.stockChart._axisXMax:k,this.stockChart._syncCharts(d,k),this.stockChart.sessionVariables._axisXMin=d,this.stockChart.sessionVariables._axisXMax=
k,this.stockChart.rangeSelector&&"zoom"!==this._zoomButton.getAttribute("state")&&this.stockChart.rangeSelector.resetRangeButtons())};M.prototype.reset=function(){this.lastObjectId=0;this.objectMap=[];this.rectangularRegionEventSubscriptions=[];this.eventObjects=[];u&&(this.ghostCtx.clearRect(0,0,this.stockChart.width,this.stockChart.height),this.ghostCtx.beginPath())};M.prototype.getNewObjectTrackingId=function(){return++this.lastObjectId};M.prototype.mouseEventHandler=function(d){if("mousemove"===
d.type||"click"===d.type){var g=[],k=Aa(d),s=null;if((s=this.stockChart.getObjectAtXY(k.x,k.y,!1))&&"undefined"!==typeof this.objectMap[s])if(s=this.objectMap[s],"rangeButton"===s.objectType){var a=this.stockChart.rangeSelector.buttons[s.rangeButtonIndex];s.eventParameter={x:k.x,y:k.y,rangeButton:a,rangeButtonIndex:s.rangeButtonIndex,stockChart:this.stockChart};s.eventContext={context:this.stockChart.rangeSelector,userContext:a,mouseover:"mouseover",mousemove:"mousemove",mouseout:"mouseout",click:"click"};
g.push(s)}else"inputFields"===s.objectType&&(a=this.stockChart.rangeSelector.inputFields._textBlocks[s.inputFieldIndex],s.eventParameter={x:k.x,y:k.y,inputField:a,inputFieldIndex:s.inputFieldIndex,stockChart:this.stockChart},s.eventContext={context:this.stockChart.rangeSelector,userContext:a,mouseover:"mouseover",mousemove:"mousemove",mouseout:"mouseout",click:"click"},g.push(s));a=[];for(k=0;k<this.mouseoveredObjectMaps.length;k++){for(var f=!0,s=0;s<g.length;s++)if(g[s].id===this.mouseoveredObjectMaps[k].id){f=
!1;break}f?this.fireEvent(this.mouseoveredObjectMaps[k],"mouseout",d):a.push(this.mouseoveredObjectMaps[k])}this.mouseoveredObjectMaps=a;for(k=0;k<g.length;k++){a=!1;for(s=0;s<this.mouseoveredObjectMaps.length;s++)if(g[k].id===this.mouseoveredObjectMaps[s].id){a=!0;break}a||(this.fireEvent(g[k],"mouseover",d),this.mouseoveredObjectMaps.push(g[k]));"click"===d.type?this.fireEvent(g[k],"click",d):"mousemove"===d.type&&this.fireEvent(g[k],"mousemove",d)}}};M.prototype.fireEvent=function(d,g,k){if(d&&
g){var s=d.eventParameter,a=d.eventContext,f=d.eventContext.userContext;f&&(a&&f[a[g]])&&f[a[g]].call(f,s);"mouseout"!==g?f.cursor&&f.cursor!==k.target.style.cursor&&(k.target.style.cursor=f.cursor):(k.target.style.cursor=this.stockChart._defaultCursor,delete d.eventParameter,delete d.eventContext)}};ia(z,aa);z.prototype._updateOptions=function(){this.updateOption("enabled");this.updateOption("backgroundColor");this.options.backgroundColor||(this.backgroundColor=this.stockChart.backgroundColor);this.updateOption("animationEnabled");
this.animationEnabled=this.animationEnabled&&u;this.updateOption("animationDuration");this.updateOption("theme");this.updateOption("verticalAlign");this.updateOption("horizontalAlign");this.updateOption("width");this.updateOption("height");this.updateOption("dynamicUpdate")};z.prototype._initialize=function(){this._updateOptions();var d;this.enabled&&!this.panel&&(this.panel=k("canvasjs-navigator-panel"),(d=!g(this.panel)&&this.stockChart._canvasJSContainer.contains(this.panel))||this.stockChart._canvasJSContainer.appendChild(this.panel));
d=!g(this.panel)&&this.stockChart._canvasJSContainer.contains(this.panel);if(this.enabled){this.height=this.options.height?parseInt(this.options.height):0.14*this.stockChart.height;d||this.stockChart._canvasJSContainer.appendChild(this.panel);var t=this.stockChart.layoutManager.getFreeSpace(),r=t.x1,s=t.y1;this.width=this.options.width?this.width:t.width;"top"===this.verticalAlign?(s=t.y1+2,d="top"):(s=t.y2-this.height-2,d="bottom");"left"===this.horizontalAlign?r=t.x1+2:"center"===this.horizontalAlign?
r=t.x1+t.width/2-this.width/2:"right"===this.horizontalAlign&&(r=t.x2-2-this.width);this.panel.style.top=s+"px";this.panel.style.left=r+"px";this.panel.style.height=this.height+"px";this.panel.style.width=this.width+"px";this.stockChart.layoutManager.registerSpace(d,{width:this.width,height:this.height+2});this.bounds={x1:r,y1:s,x2:r+this.width,y2:s+this.height}}else d&&this.stockChart._canvasJSContainer.removeChild(this.panel)};z.prototype._updateSlider=function(d,k){var r=this.chart.axisX&&this.chart.axisX.length?
this.chart.axisX[0]:this.chart.axisX2[0];if(!g(r)){var s=Math.max(r.bounds.x1,r.convertValueToPixel(r.reversed?Math.max(d,Math.min(r.maximum,k)):Math.min(d,Math.min(r.maximum,k)))),a=r.convertValueToPixel(r.reversed?Math.min(d,Math.min(r.maximum,k)):Math.max(d,Math.min(r.maximum,k)));this.slider.panel.style.left=s+"px";this.slider.left=s;this.slider.panel.style.width=a-s+"px";this.slider.width=a-s;this.slider.minimum=d;this.slider.maximum=k;this.chart.resetOverlayedCanvas();this.slider.maskInverted?
ba(this.chart.overlaidCanvasCtx,s,0,a,this.height,this.slider.maskColor,0,this.slider.outlineColor,0,0,0,0,this.slider.maskOpacity):(ba(this.chart.overlaidCanvasCtx,r.bounds.x1,0,s,this.height,this.slider.maskColor,0,this.slider.outlineColor,!1,!1,!1,!1,this.slider.maskOpacity),ba(this.chart.overlaidCanvasCtx,a,0,this.width,this.height,this.slider.maskColor,0,this.slider.outlineColor,!1,!1,!1,!1,this.slider.maskOpacity));this.chart.overlaidCanvasCtx.lineWidth=this.slider.outlineThickness;this.chart.overlaidCanvasCtx.strokeStyle=
this.slider.outlineColor;this.chart.overlaidCanvasCtx.save();this.chart.overlaidCanvasCtx.beginPath();0<this.slider.outlineThickness&&(this.slider.outlineInverted?(this.chart.overlaidCanvasCtx.moveTo(r.bounds.x1,this.height-this.slider.outlineThickness/2),this.chart.overlaidCanvasCtx.lineTo(1===this.slider.outlineThickness%2?(s-this.slider.outlineThickness/2<<0)+0.5:s,this.height-this.slider.outlineThickness/2),this.chart.overlaidCanvasCtx.lineTo(1===this.slider.outlineThickness%2?(s-this.slider.outlineThickness/
2<<0)+0.5:s,this.slider.outlineThickness/2),this.chart.overlaidCanvasCtx.lineTo(1===this.slider.outlineThickness%2?(a-this.slider.outlineThickness/2<<0)+0.5:a,this.slider.outlineThickness/2),this.chart.overlaidCanvasCtx.lineTo(1===this.slider.outlineThickness%2?(a-this.slider.outlineThickness/2<<0)+0.5:a,this.height-this.slider.outlineThickness/2),this.chart.overlaidCanvasCtx.lineTo(this.width,this.height-this.slider.outlineThickness)):(this.chart.overlaidCanvasCtx.moveTo(r.bounds.x1,this.slider.outlineThickness/
2),this.chart.overlaidCanvasCtx.lineTo(1===this.slider.outlineThickness%2?(s-this.slider.outlineThickness/2<<0)+0.5:s,this.slider.outlineThickness/2),this.chart.overlaidCanvasCtx.lineTo(1===this.slider.outlineThickness%2?(s-this.slider.outlineThickness/2<<0)+0.5:s,this.height-this.slider.outlineThickness/2),this.chart.overlaidCanvasCtx.lineTo(1===this.slider.outlineThickness%2?(a-this.slider.outlineThickness/2<<0)+0.5:a,this.height-this.slider.outlineThickness/2),this.chart.overlaidCanvasCtx.lineTo(1===
this.slider.outlineThickness%2?(a-this.slider.outlineThickness/2<<0)+0.5:a,this.slider.outlineThickness/2),this.chart.overlaidCanvasCtx.lineTo(this.width,this.slider.outlineThickness/2)));this.chart.overlaidCanvasCtx.stroke();this.chart.overlaidCanvasCtx.restore();ba(this.chart.overlaidCanvasCtx,1===this.slider.handleBorderThickness%2?s-this.slider.handleWidth/2<<0.5:s-this.slider.handleWidth/2<<0,1===this.slider.handleBorderThickness%2?this.height/2-this.slider.handleHeight/2<<0.5:this.height/2-
this.slider.handleHeight/2<<0,1===this.slider.handleBorderThickness%2?s+this.slider.handleWidth/2<<0.5:s+this.slider.handleWidth/2<<0,1===this.slider.handleBorderThickness%2?this.height/2+this.slider.handleHeight/2<<0.5:this.height/2+this.slider.handleHeight/2<<0,this.slider.handleColor,this.slider.handleBorderThickness,this.slider.handleBorderColor,!1,!1,!1,!1,1);ba(this.chart.overlaidCanvasCtx,1===this.slider.handleBorderThickness%2?a-this.slider.handleWidth/2<<0.5:a-this.slider.handleWidth/2<<
0,1===this.slider.handleBorderThickness%2?this.height/2-this.slider.handleHeight/2<<0.5:this.height/2-this.slider.handleHeight/2<<0,1===this.slider.handleBorderThickness%2?a+this.slider.handleWidth/2<<0.5:a+this.slider.handleWidth/2<<0,1===this.slider.handleBorderThickness%2?this.height/2+this.slider.handleHeight/2<<0.5:this.height/2+this.slider.handleHeight/2<<0,this.slider.handleColor,this.slider.handleBorderThickness,this.slider.handleBorderColor,!1,!1,!1,!1,1);this.chart.overlaidCanvasCtx.lineWidth=
this.slider.handleBorderThickness;this.chart.overlaidCanvasCtx.strokeStyle=this.slider.handleBorderColor;this.chart.overlaidCanvasCtx.save();this.chart.overlaidCanvasCtx.beginPath();this.chart.overlaidCanvasCtx.moveTo((1===this.slider.handleBorderThickness%2?(s-this.slider.handleBorderThickness/2<<0)+0.5:s)-Math.round(this.slider.handleBorderThickness),this.height/2-this.slider.handleHeight/4);this.chart.overlaidCanvasCtx.lineTo((1===this.slider.handleBorderThickness%2?(s-this.slider.handleBorderThickness/
2<<0)+0.5:s)-Math.round(this.slider.handleBorderThickness),this.height/2+this.slider.handleHeight/4);this.chart.overlaidCanvasCtx.moveTo((1===this.slider.handleBorderThickness%2?(s+this.slider.handleBorderThickness/2<<0)+0.5:s)+Math.round(this.slider.handleBorderThickness),this.height/2-this.slider.handleHeight/4);this.chart.overlaidCanvasCtx.lineTo((1===this.slider.handleBorderThickness%2?(s+this.slider.handleBorderThickness/2<<0)+0.5:s)+Math.round(this.slider.handleBorderThickness),this.height/
2+this.slider.handleHeight/4);this.chart.overlaidCanvasCtx.moveTo((1===this.slider.handleBorderThickness%2?(a-this.slider.handleBorderThickness/2<<0)+0.5:a)-Math.round(this.slider.handleBorderThickness),this.height/2-this.slider.handleHeight/4);this.chart.overlaidCanvasCtx.lineTo((1===this.slider.handleBorderThickness%2?(a-this.slider.handleBorderThickness/2<<0)+0.5:a)-Math.round(this.slider.handleBorderThickness),this.height/2+this.slider.handleHeight/4);this.chart.overlaidCanvasCtx.moveTo((1===
this.slider.handleBorderThickness%2?(a+this.slider.handleBorderThickness/2<<0)+0.5:a)+Math.round(this.slider.handleBorderThickness),this.height/2-this.slider.handleHeight/4);this.chart.overlaidCanvasCtx.lineTo((1===this.slider.handleBorderThickness%2?(a+this.slider.handleBorderThickness/2<<0)+0.5:a)+Math.round(this.slider.handleBorderThickness),this.height/2+this.slider.handleHeight/4);this.chart.overlaidCanvasCtx.stroke();this.chart.overlaidCanvasCtx.restore()}};ia(R,aa);R.prototype._updateOptions=
function(){this.updateOption("maskColor");this.updateOption("maskInverted");this.updateOption("maskOpacity");this.updateOption("handleColor");this.updateOption("handleBorderColor");this.updateOption("handleBorderThickness");this.updateOption("handleWidth");this.updateOption("handleHeight");this.updateOption("outlineColor");this.updateOption("outlineThickness");this.updateOption("outlineInverted");this.updateOption("minimum");this.updateOption("maximum")};R.prototype._attachEvents=function(){var d=
this;D(this.panel,"mousedown",function(g){d.stockChart.isDrag=!0;g.target!==d.leftHandle&&g.target!==d.rightHandle&&(d.stockChart.navigatorClicked=!0,d.currentHandle=d.leftHandle,d.panMode=!0,d.startPosition=Aa(g),g.target===d.currentHandle?d.startPosition.x+=d.currentHandle.offsetLeft+d.currentHandle.clientWidth/2+d.panel.offsetLeft:g.target===d.panel&&(d.startPosition.x+=d.panel.offsetLeft),d.startWidth=d.panel.clientWidth,d.startLeft=d.panel.offsetLeft)},this.stockChart.allDOMEventHandlers);D(this.panel,
window.navigator.msPointerEnabled?"MSPointerDown":"touchstart",function(g){d.stockChart._touchEventHandler(g)},this.stockChart.allDOMEventHandlers);D(this.navigator.panel,"mousedown",function(k){if(k.target!==d.navigator.slider.panel&&k.target!==d.leftHandle&&k.target!==d.rightHandle){d.stockChart.navigatorClicked=!0;var r=Aa(k),s,a;s=0;var f=d.navigator.chart.axisX&&d.navigator.chart.axisX.length?d.navigator.chart.axisX[0]:d.navigator.chart.axisX2[0];k=d.navigator.slider.left;g(d.startLeft)&&(d.startLeft=
k);s=k+d.navigator.slider.width;a=r.x-(k+s)/2;if(r.x<k||r.x>s){var r=Math.max(0,k+a),c=Math.min(s+a,d.navigator.width);s+a>d.navigator.width&&(s=s+a-d.navigator.width,r-=s);0>k+a&&(s=Math.abs(k+a),c+=s);d.stockChart._rangeEventParameter={stockChart:d.stockChart,source:"navigator",index:null,minimum:f.convertPixelToValue(r),maximum:f.convertPixelToValue(c)};d.stockChart.sessionVariables._axisXMin=f.convertPixelToValue(r);d.stockChart.sessionVariables._axisXMax=f.convertPixelToValue(c);d.navigator.dynamicUpdate?
(d.stockChart._rangeEventParameter.type="rangeChanging",d.stockChart.dispatchEvent("rangeChanging",d.stockChart._rangeEventParameter,d.stockChart),d.stockChart._syncCharts(f.convertPixelToValue(r),f.convertPixelToValue(c)),d.stockChart._rangeEventParameter.type="rangeChanged",d.stockChart.dispatchEvent("rangeChanged",d.stockChart._rangeEventParameter,d.stockChart)):d.navigator._updateSlider(d.stockChart.sessionVariables._axisXMin,d.stockChart.sessionVariables._axisXMax)}}},this.navigator.stockChart.allDOMEventHandlers);
D(this.navigator.panel,window.navigator.msPointerEnabled?"MSPointerDown":"touchstart",function(g){d.stockChart._touchEventHandler(g)},this.navigator.stockChart.allDOMEventHandlers);D(this.navigator.stockChart.container,"mousemove",function(k){var r=d.navigator.chart.axisX&&d.navigator.chart.axisX.length?d.navigator.chart.axisX[0]:d.navigator.chart.axisX2[0];if(!g(d.currentHandle)&&d.startPosition){d.navigator.chart.overlaidCanvas.style.cursor=d.navigator.chart.container.style.cursor=d.navigator.panel.style.cursor=
"ew-resize";var s;s=d.currentHandle===d.leftHandle?1:-1;var a=Aa(k);k=k.target||k.srcElement;a.x=k===d.currentHandle?a.x+(d.currentHandle.offsetLeft+d.currentHandle.clientWidth/2+d.panel.offsetLeft):k===d.mask||k===d.panel?a.x+d.panel.offsetLeft:k===d.rightHandle&&d.currentHandle===d.leftHandle?a.x+(d.rightHandle.offsetLeft+d.rightHandle.clientWidth/2+d.panel.offsetLeft):k===d.leftHandle&&d.currentHandle===d.rightHandle?a.x+d.panel.offsetLeft:a.x+("canvasjs-chart-toolbar"===k.parentElement.className?
k.offsetParent.offsetLeft+k.offsetLeft-d.stockChart._chartsPlotAreaX1:k.parentElement.parentElement.parentElement===d.navigator.panel?k.offsetLeft:k.offsetLeft-d.stockChart._chartsPlotAreaX1);var f=a.x-d.startPosition.x;if(0!==f){k=d.panel.offsetLeft;var c=d.panel.clientWidth;0<s&&(k=Math.max(d.startLeft+s*f,d._left));d.panMode||(c=Math.min(d.startWidth-s*f,d.fullWidth),s*f>d.startWidth?(k=0<s?d.startLeft+d.startWidth:Math.max(a.x,d._left),c=(0<s?a.x:d.startLeft)-parseFloat(k)):0>s&&(k=d.startLeft));
k+c<=d._left+d.fullWidth&&(2<Math.abs(d.startLeft-k)||2<Math.abs(d.startWidth-parseFloat(c)))&&(0<s&&(d.left=k,d.panel.style.left=d.left+"px"),d.panMode||(d.panel.style.width=d.width=c+"px"),g(r)||(s=r.convertPixelToValue(Math.max(r.bounds.x1,parseFloat(k))),r=r.convertPixelToValue(parseFloat(k)+parseFloat(c)),d.stockChart.sessionVariables._axisXMin=s,d.stockChart.sessionVariables._axisXMax=r,d.stockChart.rangeSelector&&!d.panMode&&d.stockChart.rangeSelector.resetRangeButtons(),d.stockChart._rangeEventParameter=
{stockChart:d.stockChart,source:"navigator",index:null,minimum:s,maximum:r},d.navigator.dynamicUpdate?(d.stockChart._rangeEventParameter.type="rangeChanging",d.stockChart.dispatchEvent("rangeChanging",d.stockChart._rangeEventParameter,d.stockChart),d.stockChart._syncCharts(s,r),d.stockChart._rangeEventParameter.type="rangeChanged",d.stockChart.dispatchEvent("rangeChanged",d.stockChart._rangeEventParameter,d.stockChart)):d.navigator._updateSlider(d.stockChart.sessionVariables._axisXMin,d.stockChart.sessionVariables._axisXMax)))}}else d.navigator.chart.overlaidCanvas.style.cursor=
d.navigator.chart.container.style.cursor=d.navigator.panel.style.cursor="auto"},this.navigator.stockChart.allDOMEventHandlers);D(this.navigator.stockChart.container,window.navigator.msPointerEnabled?"MSPointerMove":"touchmove",function(g){d.stockChart._touchEventHandler(g)},this.navigator.stockChart.allDOMEventHandlers)};R.prototype._initialize=function(){var d=this,k;this._updateOptions();ea&&(this.eventsAttached||(this._attachEvents(),this.eventsAttached=!0),this.handleWidth=this.options.handleWidth?
this.handleWidth:8,this.handleHeight=this.options.handleHeight?Math.min(this.navigator.height,this.options.handleHeight):0.25*this.navigator.height,this.leftHandle?O(this.leftHandle,{height:this.navigator.height+"px",width:this.handleWidth+10+"px",position:"absolute",left:"-"+(this.handleWidth/2+8)+"px",top:0,cursor:"ew-resize",borderStyle:"solid",borderWidth:this.handleBorderThickness+"px",borderColor:"transparent",outline:"none",padding:0,backgroundColor:"transparent",color:"transparent",fontSize:"12px",
fontFamily:"Arial",userSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none",opacity:1,zIndex:999}):(this.leftHandle=A("button","canvasjs-slider-handle","button"),this.leftHandle.innerHTML="||",O(this.leftHandle,{height:this.navigator.height+"px",width:this.handleWidth+10+"px",position:"absolute",left:"-"+(this.handleWidth/2+8)+"px",top:0,cursor:"ew-resize",borderStyle:"solid",borderWidth:this.handleBorderThickness+"px",borderColor:"transparent",outline:"none",padding:0,backgroundColor:"transparent",
color:"transparent",fontSize:"12px",fontFamily:"Arial",userSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none",opacity:1,zIndex:999}),this.panel.appendChild(this.leftHandle),this.initHandle(this.leftHandle,1)),this.rightHandle?O(this.rightHandle,{height:this.navigator.height+"px",width:this.handleWidth+10+"px",position:"absolute",right:"-"+(this.handleWidth/2+8)+"px",top:0,cursor:"ew-resize",borderStyle:"solid",borderWidth:this.handleBorderThickness+"px",borderColor:"transparent",outline:"none",
padding:"0px",backgroundColor:"transparent",color:"transparent",fontSize:"12px",fontFamily:"Arial",userSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none",msUserSelect:"none",opacity:1,zIndex:"999"}):(this.rightHandle=A("button","canvasjs-slider-handle","button"),this.rightHandle.innerHTML="||",O(this.rightHandle,{height:this.navigator.height+"px",width:this.handleWidth+10+"px",position:"absolute",right:"-"+(this.handleWidth/2+8)+"px",top:0,cursor:"ew-resize",borderStyle:"solid",borderWidth:this.handleBorderThickness+
"px",borderColor:"transparent",outline:"none",padding:"0px",backgroundColor:"transparent",color:"transparent",fontSize:"12px",fontFamily:"Arial",userSelect:"none",MozUserSelect:"none",WebkitUserSelect:"none",msUserSelect:"none",opacity:1,zIndex:"999"}),this.panel.appendChild(this.rightHandle),this.initHandle(this.rightHandle,-1)),O(this.panel,{position:"absolute",height:this.navigator.height+"px",width:"100%",cursor:"move"}),this.fullWidth=this.panel.clientWidth,this._left=this.navigator.panel.offsetLeft,
D(document,"mousedown",function(g){if(d.stockChart.rangeSelector&&d.stockChart.rangeSelector.inputFields&&d.stockChart.rangeSelector.inputFields.enabled)for(var k=0;k<d.stockChart.rangeSelector.inputFields.elements.length;k++)g.target!=d.stockChart.rangeSelector.inputFields.elements[k]&&d.stockChart.rangeSelector.inputFields.elements[k].focused&&d.stockChart.rangeSelector.inputFields.elements[k].blur()},this.navigator.stockChart.allDOMEventHandlers),D(document,window.navigator.msPointerEnabled?"MSPointerDown":
"touchstart",function(d){a:{var g=d.changedTouches,g=g?g[0]:d,a="";switch(d.type){case "touchstart":case "MSPointerDown":a="mousedown";break;case "touchmove":case "MSPointerMove":a="mousemove";break;case "touchend":case "MSPointerUp":a="mouseup";break;default:break a}d=document.createEvent("MouseEvent");d.initMouseEvent(a,!0,!0,window,1,g.screenX,g.screenY,g.clientX,g.clientY,!1,!1,!1,!1,0,null);g.target.dispatchEvent(d)}},this.navigator.stockChart.allDOMEventHandlers),D(document,"mouseup",function(r){d.panMode=
!1;d.navigator.stockChart.isDrag=!1;if(d.stockChart.navigatorClicked){r=Math.min(d.stockChart.sessionVariables._axisXMin,d.stockChart.sessionVariables._axisXMax);var s=Math.max(d.stockChart.sessionVariables._axisXMin,d.stockChart.sessionVariables._axisXMax);g(d.stockChart._rangeEventParameter)&&(d.stockChart._rangeEventParameter={stockChart:d.stockChart,source:"navigator",index:null,minimum:r,maximum:s});if(2<Math.abs(d.startLeft-d.left)||2<Math.abs(d.startWidth-parseFloat(d.width))){d.navigator.dynamicUpdate||
(d.stockChart._rangeEventParameter.type="rangeChanging",d.stockChart.dispatchEvent("rangeChanging",d.stockChart._rangeEventParameter,d.stockChart));for(var a=0;a<d.stockChart.charts.length;a++){k=d.stockChart.charts[a];k.toolTip&&k.toolTip.enabled&&k.toolTip.hide();for(var f=0;f<k.axisX.length;f++)k.axisX[f].setViewPortRange(r,s);for(f=0;f<k.axisX2.length;f++)k.axisX2[f].setViewPortRange(r,s);k.render()}d.stockChart.rangeSelector&&(d.stockChart.rangeSelector.enabled&&d.stockChart.rangeSelector.inputFields&&
d.stockChart.rangeSelector.inputFields.enabled)&&d.stockChart.rangeSelector._updateInputFields(r,s);d.navigator.dynamicUpdate||(d.stockChart._rangeEventParameter.type="rangeChanged",d.stockChart.dispatchEvent("rangeChanged",d.stockChart._rangeEventParameter,d.stockChart))}}d.stockChart.navigatorClicked=d.currentHandle=d.startPosition=d.startWidth=d.startLeft=null},this.navigator.stockChart.allDOMEventHandlers),D(document,window.navigator.msPointerEnabled?"MSPointerUp":"touchend",function(r){d.panMode=
!1;d.navigator.stockChart.isDrag=!1;if(d.stockChart.navigatorClicked){r=Math.min(d.stockChart.sessionVariables._axisXMin,d.stockChart.sessionVariables._axisXMax);var s=Math.max(d.stockChart.sessionVariables._axisXMin,d.stockChart.sessionVariables._axisXMax);g(d.stockChart._rangeEventParameter)&&(d.stockChart._rangeEventParameter={stockChart:d.stockChart,source:"navigator",index:null,minimum:r,maximum:s});d.navigator.dynamicUpdate||(d.stockChart._rangeEventParameter.type="rangeChanging",d.stockChart.dispatchEvent("rangeChanging",
d.stockChart._rangeEventParameter,d.stockChart));for(var a=0;a<d.stockChart.charts.length;a++){k=d.stockChart.charts[a];k.toolTip&&k.toolTip.enabled&&k.toolTip.hide();for(var f=0;f<k.axisX.length;f++)k.axisX[f].setViewPortRange(r,s);for(f=0;f<k.axisX2.length;f++)k.axisX2[f].setViewPortRange(r,s);k.render()}d.stockChart.rangeSelector&&(d.stockChart.rangeSelector.enabled&&d.stockChart.rangeSelector.inputFields&&d.stockChart.rangeSelector.inputFields.enabled)&&d.stockChart.rangeSelector._updateInputFields(r,
s);d.navigator.dynamicUpdate||(d.stockChart._rangeEventParameter.type="rangeChanged",d.stockChart.dispatchEvent("rangeChanged",d.stockChart._rangeEventParameter,d.stockChart))}d.stockChart.navigatorClicked=d.currentHandle=d.startPosition=d.startWidth=d.startLeft=null},this.navigator.stockChart.allDOMEventHandlers))};R.prototype.initHandle=function(d,g){var k=this;d&&(D(d,"mousedown",function(d){k.stockChart.navigatorClicked=!0;k.currentHandle=this;k.startPosition=Aa(d);d.target===k.currentHandle?
k.startPosition.x+=k.currentHandle.offsetLeft+k.currentHandle.clientWidth/2+k.panel.offsetLeft:d.target===k.panel&&(k.startPosition.x+=k.panel.offsetLeft);k.startWidth=k.panel.clientWidth;k.startLeft=k.panel.offsetLeft;d.preventDefault&&d.preventDefault();d.stopPropagation&&d.stopPropagation()},this.navigator.stockChart.allDOMEventHandlers),D(d,window.navigator.msPointerEnabled?"MSPointerDown":"touchstart",function(d){k.stockChart._touchEventHandler(d)},this.navigator.stockChart.allDOMEventHandlers))};
ia(S,aa);S.prototype._updateOptions=function(){this.updateOption("enabled");this.updateOption("verticalAlign");this.updateOption("horizontalAlign");this.updateOption("width");this.updateOption("height");this.updateOption("label");this.updateOption("selectedRangeButtonIndex")};S.prototype._initialize=function(){var d=0;this._updateOptions();this._label={};this.buttons=[];if(ea&&this.enabled){if(this.options.buttons)for(var k=0;k<this.options.buttons.length;k++)this.buttons.push(new N(this.stockChart,
k,this.options.buttons[k]));else{for(k=0;6>k;k++)this.buttons.push(new N(this.stockChart,k));this.buttonLabels="1m 3m 6m YTD 1y All".split(" ")}this._wrapElements=!1;var r=this.stockChart.layoutManager.getFreeSpace(),s=r.x1,k=r.y1;this.width=this.options.width?this.width:r.width;g(this.buttonStyle.options.labelFontSize)&&(this.buttonStyle.labelFontSize=this.stockChart.getAutoFontSize(this.buttonStyle.labelFontSize));this.rangeButtonsWidth=0;this.buttonStyle.maxWidth=this.buttonStyle.options.maxWidth?
this.buttonStyle.options.maxWidth:this.stockChart.width/this.buttons.length;if(this.buttons&&0<this.buttons.length){var a=new oa(this.ctx,{x:0,y:0,backgroundColor:this.stockChart.backgroundColor,borderThickness:0,cornerRadius:0,maxWidth:0.2*this.stockChart.width,maxHeight:2*this.buttonStyle.labelFontSize,angle:0,padding:{left:5,right:5,top:2,bottom:2},text:g(this.stockChart.options.culture)||g(this.stockChart._cultureInfo.rangeSelector.rangeText)?this.label:this.stockChart._cultureInfo.rangeSelector.rangeText,
horizontalAlign:"left",fontSize:this.buttonStyle.labelFontSize,fontFamily:this.buttonStyle.labelFontFamily,fontWeight:this.buttonStyle.labelFontWeight,fontColor:this.buttonStyle.labelFontColor,fontStyle:this.buttonStyle.labelFontStyle,textBaseline:"middle"});this._label.textBlock=a}for(k=0;k<this.buttons.length;k++){var f=this.buttons[k];f._index=k;a=new oa(this.ctx,{x:0,y:0,backgroundColor:this.buttonStyle.backgroundColor,borderColor:this.buttonStyle.borderColor,borderThickness:this.buttonStyle.borderThickness,
cornerRadius:0,maxWidth:this.buttonStyle.options.width?this.buttonStyle.width:this.buttonStyle.maxWidth,maxHeight:2*this.buttonStyle.labelFontSize,angle:0,padding:this.buttonStyle.padding,text:this.options.buttons&&this.options.buttons.length?g(f.label)?"":f.label:this.buttonLabels[k],horizontalAlign:"center",textAlign:"center",fontSize:this.buttonStyle.labelFontSize,fontFamily:this.buttonStyle.labelFontFamily,fontWeight:this.buttonStyle.labelFontWeight,fontColor:this.buttonStyle.labelFontColor,fontStyle:this.buttonStyle.labelFontStyle,
textBaseline:"middle"});f.state=g(this.selectedRangeButtonIndex)||this.selectedRangeButtonIndex!==k?"off":"on";f.textBlock=a;f.bounds={x1:null,x2:null,y1:null,y2:null,width:null,height:null};a.measureText();this.rangeButtonsWidth+=a.width+this.buttonStyle.spacing;this.rangeButtonsHeight=a.height;d=d<a.height?a.height:d;f=this.buttons[k];f.id=++this.stockChart._eventManager.lastObjectId;this.stockChart._eventManager.objectMap[f.id]={id:f.id,objectType:"rangeButton",rangeButtonIndex:k}}this.height<
this.inputFieldsHeight+2*this.inputFields.style.borderThickness&&(this.height=this.inputFieldsHeight+2*this.inputFields.style.borderThickness);this.height<d+2*this.buttonStyle.borderThickness+5&&(this.height=d+2*this.buttonStyle.borderThickness+5);this._label&&(this._label.textBlock&&this.rangeButtonsWidth&&this.inputFieldsWidth)&&this.rangeButtonsWidth+this._label.textBlock.measureText().width+this.inputFieldsWidth>=this.stockChart.width&&(this.height=this.options.height?this.height:2*this.height,
this._wrapElements=!0);"bottom"===this.verticalAlign?(k=r.y2-this.height,d="bottom"):(k=r.y1,d="top");"left"===this.horizontalAlign?s=r.x1+2:"center"===this.horizontalAlign?s=r.x1+r.width/2-this.width/2:"right"===this.horizontalAlign&&(s=r.x2-2-this.width);this.stockChart.layoutManager.registerSpace(d,{width:this.width,height:this.height});this.bounds={x1:s,y1:k,x2:s+this.width,y2:k+this.height,width:this.width,height:this.height};for(k=0;k<this.buttons.length;k++)this.buttons[k]._initialize(k)}};
S.prototype.render=function(){var d;this.setButtonsLayout();ba(this.ctx,this.bounds.x1,this.bounds.y1,this.bounds.x2,this.bounds.y2,this.stockChart.backgroundColor,0,null,0,0,0,0,1);this._label&&this._label.textBlock&&this._label.textBlock.render(!0);for(d=0;d<this.buttons.length;d++)this.buttons[d].enabled||(this.buttons[d].textBlock.backgroundColor=this.buttons[d].backgroundColorDisabled,this.buttons[d].textBlock.borderColor=this.buttons[d].backgroundColorDisabled),this.buttons[d].render(!0);this.inputFields&&
this.inputFields.enabled&&this.renderInputFields(!0)};S.prototype.setButtonsLayout=function(){var d,g,k=this.bounds.x1+5,r,a;this._label&&(this._label.textBlock&&0<this.buttons.length)&&(this._label.textBlock.x=k,this._label.textBlock.y=a=this.bounds.y1+this._label.textBlock.measureText().height/2+2*this.buttons[0].textBlock.borderThickness,this._label.bounds={x1:k,y1:a-this._label.textBlock.fontSize/2,x2:k+this._label.textBlock.measureText().width,y2:a+this._label.textBlock.measureText().height,
width:this._label.textBlock.measureText().width,height:this._label.textBlock.measureText().height},k+=this._label.bounds.width);for(d=0;d<this.buttons.length;d++)g=this.buttons[d],g.textBlock.width=g.textBlock.maxWidth=this.buttonStyle.width=this.buttonStyle.options.width?this.buttonStyle.width:g.textBlock.width,r=k+g.textBlock.width,g.textBlock.x=g.bounds.x1=1===g.textBlock.borderThickness%2?(k<<0)+0.5:k,g.bounds.x2=r,a=1===g.textBlock.borderThickness%2?this.bounds.y1+g.textBlock.height/2+2*g.textBlock.borderThickness<<
0.5:this.bounds.y1+g.textBlock.height/2+2*g.textBlock.borderThickness,g.textBlock.y=a,g.bounds.y1=a-g.textBlock.height/2,g.bounds.y2=g.bounds.y1+g.textBlock.height,g.bounds.width=r-k,g.bounds.height=g.bounds.y2-g.bounds.y1,k=r+this.buttonStyle.spacing,g.textBlock.maxWidth=this.buttonStyle.maxWidth};S.prototype.resetRangeButtons=function(){for(var d=0;d<this.buttons.length;d++)this.buttons[d].enabled&&(this.buttons[d].state="off",this.buttons[d].textBlock.backgroundColor=this.buttonStyle.backgroundColor,
this.buttons[d].textBlock.fontColor=this.buttonStyle.labelFontColor,this.buttons[d].textBlock.fontWeight=this.buttonStyle.labelFontWeight,this.buttons[d].textBlock.render(!0))};S.prototype.renderInputFields=function(){this.inputFields._textBlocks[0].text="dateTime"===this.inputFields.valueType?fa(this.inputFields.startValue,this.inputFields.valueFormatString,this.stockChart._cultureInfo):$(this.inputFields.startValue,this.inputFields.valueFormatString,this.stockChart._cultureInfo);this.inputFields._textBlocks[1].text=
"dateTime"===this.inputFields.valueType?fa(this.inputFields.endValue,this.inputFields.valueFormatString,this.stockChart._cultureInfo):$(this.inputFields.endValue,this.inputFields.valueFormatString,this.stockChart._cultureInfo);this.inputFields._labels[0].text=g(this.stockChart._cultureInfo.rangeSelector.fromText)?"From":this.stockChart._cultureInfo.rangeSelector.fromText;this.inputFields._labels[1].text=g(this.stockChart._cultureInfo.rangeSelector.toText)?"To":this.stockChart._cultureInfo.rangeSelector.toText;
var d=0,k=!0;if(this.stockChart.title&&this.stockChart.title.text&&("top"===this.stockChart.title.verticalAlign||"right"===this.stockChart.title.horizontalAlign&&"center"===this.stockChart.title.verticalAlign&&this.stockChart.exportEnabled)||"bottom"===this.verticalAlign)k=!1;if(this.stockChart.subtitles)for(var r=0;r<this.stockChart.subtitles.length;r++)this.stockChart.subtitles[r]&&(this.stockChart.subtitles[r].text&&("top"===this.stockChart.subtitles[r].verticalAlign||"right"===this.stockChart.subtitles[r].horizontalAlign&&
"center"===this.stockChart.subtitles[r].verticalAlign&&this.stockChart.exportEnabled))&&(k=!1);for(r=this.inputFields._textBlocks.length-1;0<=r;r--){var s=this.inputFields._textBlocks[r],a=s.measureText();s._width=this.inputFields.style.options.width?this.inputFields.style.width:Math.abs(a.width-s._width)<=("dateTime"===this.inputFields.valueType?10:5)?s._width:a.width+10;d+=s._width+this.inputFields.style.spacing;this.inputFields.elements[r].style.width=s._width-this.inputFields.style.spacing-2*
this.inputFields.style.borderThickness-5+"px";s.x=s.bounds.x1=1===s.borderThickness%2?(this.bounds.x2-d-(this.stockChart.exportEnabled&&k?40:0)<<0)+0.5:this.bounds.x2-d-(this.stockChart.exportEnabled&&k?40:0);s.bounds.x2=s.bounds.x1+s._width;this.inputFields.elements[r].style.left=this.bounds.x2-d-(this.stockChart.exportEnabled&&k?40:0)+this.inputFields.style.borderThickness+"px";d+=this.inputFields._labels[r].measureText().width;this.inputFields._labels[r].x=this.inputFields._labels[r].bounds.x1=
this.bounds.x2-d-(this.stockChart.exportEnabled&&k?40:0);this.inputFields._labels[r].bounds.x2=this.inputFields._labels[r].bounds.x1+this.inputFields._labels[r].measureText().width;s.width=s._width;s.y=1===s.borderThickness%2?(this._wrapElements?this.bounds.y1+this.rangeButtonsHeight+10:this.bounds.y1)+a.height/2+2*s.borderThickness<<0.5:(this._wrapElements?this.bounds.y1+this.rangeButtonsHeight+10:this.bounds.y1)+a.height/2+2*s.borderThickness;this.inputFields._labels[r].y=(this._wrapElements?this.bounds.y1+
this.rangeButtonsHeight+10:this.bounds.y1)+a.height/2+2*s.borderThickness;s.bounds.y1=this.inputFields._labels[r].bounds.y1=s.y-a.height/2+2*s.borderThickness;s.bounds.y2=this.inputFields._labels[r].bounds.y2=s.bounds.y1+a.height;this.inputFields.elements[r].style.top=this.inputFields._labels[r].bounds.y1+"px";s.render(!0);this.inputFields._labels[r].render(!0)}};S.prototype._updateInputFields=function(d,g){this.inputFields.elements[0].focused||(this.inputFields.elements[0].value="dateTime"===this.inputFields.valueType?
fa(d,"YYYY-MM-DD"):$(d,this.inputFields.valueFormatString));this.inputFields.elements[1].focused||(this.inputFields.elements[1].value="dateTime"===this.inputFields.valueType?fa(g,"YYYY-MM-DD"):$(g,this.inputFields.valueFormatString));for(var k=0;k<this.inputFields.elements.length;k++)this.inputFields.elements[k].focused&&this.inputFields.elements[k].focus();this.inputFields.startValue=d;this.inputFields.endValue=g;this.render()};ia(N,aa);N.prototype._updateOptions=function(){this.updateOption("style");
this.updateOption("label");this.updateOption("range");this.updateOption("rangeType")};N.prototype._initialize=function(d){this._updateOptions();var k="1m 3m 6m YTD 1y All".split(" "),r=[1,3,6,null,1,null],s="month month month ytd year all".split(" ");this.range="undefined"!==typeof this.options.range?this.range:g(r[d])?null:r[d];this.rangeType="undefined"!==typeof this.options.rangeType?this.rangeType:s[d];this.label=this.textBlock.text=g(this.options.label)?k[d]:this.label};N.prototype.render=function(){this.textBlock.render(!0)};
ia(W,aa);W.prototype._updateOptions=function(){this.updateOption("enabled");this.updateOption("startValue");this.updateOption("endValue");this.updateOption("valueType");this.updateOption("valueFormatString")};W.prototype._initialize=function(){this._updateOptions();g(this.style.options.fontSize)&&(this.style.fontSize=this.stockChart.getAutoFontSize(this.style.fontSize));if(this.enabled){for(var d=0;d<this.elements.length;d++)this.elements[d].style.position="absolute",this.elements[d].style.display=
this.elements[d].focused?"inline":"none",this.elements[d].style.backgroundColor=this.style.backgroundColor,this.elements[d].style.border="none",this.elements[d].style.outline="none",this.elements[d].style.outlineOffset=0,this.elements[d].style.textAlign="center",this.elements[d].style.color=this.style.fontColor,this.elements[d].style.fontSize=this.elements[d].style.height=this.style.fontSize+"px",this.elements[d].style.fontStyle=this.style.fontStyle,this.elements[d].style.fontFamily=this.style.fontFamily,
this.elements[d].style.fontWeight=this.style.fontWeight,this.elements[d].style.lineHeight=1,isNaN(this.style.padding)?(this.elements[d].style.paddingTop=this.style.padding.top+"px",this.elements[d].style.paddingRight=this.style.padding.right+"px",this.elements[d].style.paddingBottom=this.style.padding.bottom+"px",this.elements[d].style.paddingLeft=this.style.padding.left+"px"):this.elements[d].style.padding=this.style.padding+"px",this.elements[d].style.mozAppearance=this.elements[d].style.webkitAppearance=
this.elements[d].style.appearance="none",this.elements[d].style.webkitBorderRadius=0,this.elements[d].style.mozBorderRadius=0,this.elements[d].style.borderRadius=0,this.elements[d].style.boxSizing="content-box";this.parent=this.rangeSelector=this.stockChart.rangeSelector}};ia(X,aa);X.prototype._updateOptions=function(){this.updateOption("backgroundColor");this.updateOption("backgroundColorOnHover");this.updateOption("backgroundColorOnSelect");this.updateOption("borderColor");this.updateOption("borderThickness");
this.updateOption("labelFontColor");this.updateOption("labelFontColorOnHover");this.updateOption("labelFontSize");this.updateOption("labelFontStyle");this.updateOption("labelFontFamily");this.updateOption("labelFontWeight");this.updateOption("width");this.updateOption("maxWidth");this.updateOption("padding");this.updateOption("spacing");this.updateOption("cursor")};ia(Y,aa);Y.prototype._updateOptions=function(){this.updateOption("backgroundColor");this.updateOption("borderColor");this.updateOption("borderThickness");
this.updateOption("borderColorOnFocus");this.updateOption("fontColor");this.updateOption("fontSize");this.updateOption("fontStyle");this.updateOption("fontFamily");this.updateOption("fontWeight");this.updateOption("width");this.updateOption("maxWidth");this.updateOption("padding");this.updateOption("spacing");this.updateOption("cursor")};return G}();Y.version="v1.6.2 GA";window.CanvasJS&&(Y&&(!window.CanvasJS.StockChart&&window.CanvasJS.Chart)&&(window.CanvasJS.StockChart=Y),Y&&!window.CanvasJS.Chart&&
(window.CanvasJS.Chart=Ja,window.CanvasJS.StockChart=Y))})();

/*
  excanvas is used to support IE678 which do not implement HTML5 Canvas Element. You can safely remove the following excanvas code if you don't need to support older browsers.

  Copyright 2006 Google Inc. https://code.google.com/p/explorercanvas/
  Licensed under the Apache License, Version 2.0
*/
document.createElement("canvas").getContext||function(){function V(){return this.context_||(this.context_=new C(this))}function W(a,b,c){var g=M.call(arguments,2);return function(){return a.apply(b,g.concat(M.call(arguments)))}}function N(a){return String(a).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}function O(a){a.namespaces.g_vml_||a.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML");a.namespaces.g_o_||a.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML");
a.styleSheets.ex_canvas_||(a=a.createStyleSheet(),a.owningElement.id="ex_canvas_",a.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}")}function X(a){var b=a.srcElement;switch(a.propertyName){case "width":b.getContext().clearRect();b.style.width=b.attributes.width.nodeValue+"px";b.firstChild.style.width=b.clientWidth+"px";break;case "height":b.getContext().clearRect(),b.style.height=b.attributes.height.nodeValue+"px",b.firstChild.style.height=b.clientHeight+
"px"}}function Y(a){a=a.srcElement;a.firstChild&&(a.firstChild.style.width=a.clientWidth+"px",a.firstChild.style.height=a.clientHeight+"px")}function D(){return[[1,0,0],[0,1,0],[0,0,1]]}function t(a,b){for(var c=D(),g=0;3>g;g++)for(var e=0;3>e;e++){for(var f=0,d=0;3>d;d++)f+=a[g][d]*b[d][e];c[g][e]=f}return c}function P(a,b){b.fillStyle=a.fillStyle;b.lineCap=a.lineCap;b.lineJoin=a.lineJoin;b.lineWidth=a.lineWidth;b.miterLimit=a.miterLimit;b.shadowBlur=a.shadowBlur;b.shadowColor=a.shadowColor;b.shadowOffsetX=
a.shadowOffsetX;b.shadowOffsetY=a.shadowOffsetY;b.strokeStyle=a.strokeStyle;b.globalAlpha=a.globalAlpha;b.font=a.font;b.textAlign=a.textAlign;b.textBaseline=a.textBaseline;b.arcScaleX_=a.arcScaleX_;b.arcScaleY_=a.arcScaleY_;b.lineScale_=a.lineScale_}function Q(a){var b=a.indexOf("(",3),c=a.indexOf(")",b+1),b=a.substring(b+1,c).split(",");if(4!=b.length||"a"!=a.charAt(3))b[3]=1;return b}function E(a,b,c){return Math.min(c,Math.max(b,a))}function F(a,b,c){0>c&&c++;1<c&&c--;return 1>6*c?a+6*(b-a)*c:
1>2*c?b:2>3*c?a+6*(b-a)*(2/3-c):a}function G(a){if(a in H)return H[a];var b,c=1;a=String(a);if("#"==a.charAt(0))b=a;else if(/^rgb/.test(a)){c=Q(a);b="#";for(var g,e=0;3>e;e++)g=-1!=c[e].indexOf("%")?Math.floor(255*(parseFloat(c[e])/100)):+c[e],b+=v[E(g,0,255)];c=+c[3]}else if(/^hsl/.test(a)){e=c=Q(a);b=parseFloat(e[0])/360%360;0>b&&b++;g=E(parseFloat(e[1])/100,0,1);e=E(parseFloat(e[2])/100,0,1);if(0==g)g=e=b=e;else{var f=0.5>e?e*(1+g):e+g-e*g,d=2*e-f;g=F(d,f,b+1/3);e=F(d,f,b);b=F(d,f,b-1/3)}b="#"+
v[Math.floor(255*g)]+v[Math.floor(255*e)]+v[Math.floor(255*b)];c=c[3]}else b=Z[a]||a;return H[a]={color:b,alpha:c}}function C(a){this.m_=D();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.fillStyle=this.strokeStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=1*q;this.globalAlpha=1;this.font="10px sans-serif";this.textAlign="left";this.textBaseline="alphabetic";this.canvas=a;var b="width:"+a.clientWidth+"px;height:"+a.clientHeight+"px;overflow:hidden;position:absolute",
c=a.ownerDocument.createElement("div");c.style.cssText=b;a.appendChild(c);b=c.cloneNode(!1);b.style.backgroundColor="red";b.style.filter="alpha(opacity=0)";a.appendChild(b);this.element_=c;this.lineScale_=this.arcScaleY_=this.arcScaleX_=1}function R(a,b,c,g){a.currentPath_.push({type:"bezierCurveTo",cp1x:b.x,cp1y:b.y,cp2x:c.x,cp2y:c.y,x:g.x,y:g.y});a.currentX_=g.x;a.currentY_=g.y}function S(a,b){var c=G(a.strokeStyle),g=c.color,c=c.alpha*a.globalAlpha,e=a.lineScale_*a.lineWidth;1>e&&(c*=e);b.push("<g_vml_:stroke",
' opacity="',c,'"',' joinstyle="',a.lineJoin,'"',' miterlimit="',a.miterLimit,'"',' endcap="',$[a.lineCap]||"square",'"',' weight="',e,'px"',' color="',g,'" />')}function T(a,b,c,g){var e=a.fillStyle,f=a.arcScaleX_,d=a.arcScaleY_,k=g.x-c.x,n=g.y-c.y;if(e instanceof w){var h=0,l=g=0,u=0,m=1;if("gradient"==e.type_){h=e.x1_/f;c=e.y1_/d;var p=s(a,e.x0_/f,e.y0_/d),h=s(a,h,c),h=180*Math.atan2(h.x-p.x,h.y-p.y)/Math.PI;0>h&&(h+=360);1E-6>h&&(h=0)}else p=s(a,e.x0_,e.y0_),g=(p.x-c.x)/k,l=(p.y-c.y)/n,k/=f*q,
n/=d*q,m=x.max(k,n),u=2*e.r0_/m,m=2*e.r1_/m-u;f=e.colors_;f.sort(function(a,b){return a.offset-b.offset});d=f.length;p=f[0].color;c=f[d-1].color;k=f[0].alpha*a.globalAlpha;a=f[d-1].alpha*a.globalAlpha;for(var n=[],r=0;r<d;r++){var t=f[r];n.push(t.offset*m+u+" "+t.color)}b.push('<g_vml_:fill type="',e.type_,'"',' method="none" focus="100%"',' color="',p,'"',' color2="',c,'"',' colors="',n.join(","),'"',' opacity="',a,'"',' g_o_:opacity2="',k,'"',' angle="',h,'"',' focusposition="',g,",",l,'" />')}else e instanceof
I?k&&n&&b.push("<g_vml_:fill",' position="',-c.x/k*f*f,",",-c.y/n*d*d,'"',' type="tile"',' src="',e.src_,'" />'):(e=G(a.fillStyle),b.push('<g_vml_:fill color="',e.color,'" opacity="',e.alpha*a.globalAlpha,'" />'))}function s(a,b,c){a=a.m_;return{x:q*(b*a[0][0]+c*a[1][0]+a[2][0])-r,y:q*(b*a[0][1]+c*a[1][1]+a[2][1])-r}}function z(a,b,c){isFinite(b[0][0])&&(isFinite(b[0][1])&&isFinite(b[1][0])&&isFinite(b[1][1])&&isFinite(b[2][0])&&isFinite(b[2][1]))&&(a.m_=b,c&&(a.lineScale_=aa(ba(b[0][0]*b[1][1]-b[0][1]*
b[1][0]))))}function w(a){this.type_=a;this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0;this.colors_=[]}function I(a,b){if(!a||1!=a.nodeType||"IMG"!=a.tagName)throw new A("TYPE_MISMATCH_ERR");if("complete"!=a.readyState)throw new A("INVALID_STATE_ERR");switch(b){case "repeat":case null:case "":this.repetition_="repeat";break;case "repeat-x":case "repeat-y":case "no-repeat":this.repetition_=b;break;default:throw new A("SYNTAX_ERR");}this.src_=a.src;this.width_=a.width;this.height_=a.height}
function A(a){this.code=this[a];this.message=a+": DOM Exception "+this.code}var x=Math,k=x.round,J=x.sin,K=x.cos,ba=x.abs,aa=x.sqrt,q=10,r=q/2;navigator.userAgent.match(/MSIE ([\d.]+)?/);var M=Array.prototype.slice;O(document);var U={init:function(a){a=a||document;a.createElement("canvas");a.attachEvent("onreadystatechange",W(this.init_,this,a))},init_:function(a){a=a.getElementsByTagName("canvas");for(var b=0;b<a.length;b++)this.initElement(a[b])},initElement:function(a){if(!a.getContext){a.getContext=
V;O(a.ownerDocument);a.innerHTML="";a.attachEvent("onpropertychange",X);a.attachEvent("onresize",Y);var b=a.attributes;b.width&&b.width.specified?a.style.width=b.width.nodeValue+"px":a.width=a.clientWidth;b.height&&b.height.specified?a.style.height=b.height.nodeValue+"px":a.height=a.clientHeight}return a}};U.init();for(var v=[],d=0;16>d;d++)for(var B=0;16>B;B++)v[16*d+B]=d.toString(16)+B.toString(16);var Z={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",
bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",
darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",grey:"#808080",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",
ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",mediumaquamarine:"#66CDAA",
mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",oldlace:"#FDF5E6",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",
peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",whitesmoke:"#F5F5F5",yellowgreen:"#9ACD32"},
H={},L={},$={butt:"flat",round:"round"},d=C.prototype;d.clearRect=function(){this.textMeasureEl_&&(this.textMeasureEl_.removeNode(!0),this.textMeasureEl_=null);this.element_.innerHTML=""};d.beginPath=function(){this.currentPath_=[]};d.moveTo=function(a,b){var c=s(this,a,b);this.currentPath_.push({type:"moveTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};d.lineTo=function(a,b){var c=s(this,a,b);this.currentPath_.push({type:"lineTo",x:c.x,y:c.y});this.currentX_=c.x;this.currentY_=c.y};d.bezierCurveTo=
function(a,b,c,g,e,f){e=s(this,e,f);a=s(this,a,b);c=s(this,c,g);R(this,a,c,e)};d.quadraticCurveTo=function(a,b,c,g){a=s(this,a,b);c=s(this,c,g);g={x:this.currentX_+2/3*(a.x-this.currentX_),y:this.currentY_+2/3*(a.y-this.currentY_)};R(this,g,{x:g.x+(c.x-this.currentX_)/3,y:g.y+(c.y-this.currentY_)/3},c)};d.arc=function(a,b,c,g,e,f){c*=q;var d=f?"at":"wa",k=a+K(g)*c-r,n=b+J(g)*c-r;g=a+K(e)*c-r;e=b+J(e)*c-r;k!=g||f||(k+=0.125);a=s(this,a,b);k=s(this,k,n);g=s(this,g,e);this.currentPath_.push({type:d,
x:a.x,y:a.y,radius:c,xStart:k.x,yStart:k.y,xEnd:g.x,yEnd:g.y})};d.rect=function(a,b,c,g){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+g);this.lineTo(a,b+g);this.closePath()};d.strokeRect=function(a,b,c,g){var e=this.currentPath_;this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+g);this.lineTo(a,b+g);this.closePath();this.stroke();this.currentPath_=e};d.fillRect=function(a,b,c,g){var e=this.currentPath_;this.beginPath();this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+
c,b+g);this.lineTo(a,b+g);this.closePath();this.fill();this.currentPath_=e};d.createLinearGradient=function(a,b,c,g){var e=new w("gradient");e.x0_=a;e.y0_=b;e.x1_=c;e.y1_=g;return e};d.createRadialGradient=function(a,b,c,g,e,f){var d=new w("gradientradial");d.x0_=a;d.y0_=b;d.r0_=c;d.x1_=g;d.y1_=e;d.r1_=f;return d};d.drawImage=function(a,b){var c,g,e,d,r,y,n,h;e=a.runtimeStyle.width;d=a.runtimeStyle.height;a.runtimeStyle.width="auto";a.runtimeStyle.height="auto";var l=a.width,u=a.height;a.runtimeStyle.width=
e;a.runtimeStyle.height=d;if(3==arguments.length)c=arguments[1],g=arguments[2],r=y=0,n=e=l,h=d=u;else if(5==arguments.length)c=arguments[1],g=arguments[2],e=arguments[3],d=arguments[4],r=y=0,n=l,h=u;else if(9==arguments.length)r=arguments[1],y=arguments[2],n=arguments[3],h=arguments[4],c=arguments[5],g=arguments[6],e=arguments[7],d=arguments[8];else throw Error("Invalid number of arguments");var m=s(this,c,g),p=[];p.push(" <g_vml_:group",' coordsize="',10*q,",",10*q,'"',' coordorigin="0,0"',' style="width:',
10,"px;height:",10,"px;position:absolute;");if(1!=this.m_[0][0]||this.m_[0][1]||1!=this.m_[1][1]||this.m_[1][0]){var t=[];t.push("M11=",this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",k(m.x/q),",","Dy=",k(m.y/q),"");var v=s(this,c+e,g),w=s(this,c,g+d);c=s(this,c+e,g+d);m.x=x.max(m.x,v.x,w.x,c.x);m.y=x.max(m.y,v.y,w.y,c.y);p.push("padding:0 ",k(m.x/q),"px ",k(m.y/q),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",t.join(""),", sizingmethod='clip');")}else p.push("top:",
k(m.y/q),"px;left:",k(m.x/q),"px;");p.push(' ">','<g_vml_:image src="',a.src,'"',' style="width:',q*e,"px;"," height:",q*d,'px"',' cropleft="',r/l,'"',' croptop="',y/u,'"',' cropright="',(l-r-n)/l,'"',' cropbottom="',(u-y-h)/u,'"'," />","</g_vml_:group>");this.element_.insertAdjacentHTML("BeforeEnd",p.join(""))};d.stroke=function(a){var b=[];b.push("<g_vml_:shape",' filled="',!!a,'"',' style="position:absolute;width:',10,"px;height:",10,'px;"',' coordorigin="0,0"',' coordsize="',10*q,",",10*q,'"',
' stroked="',!a,'"',' path="');for(var c={x:null,y:null},d={x:null,y:null},e=0;e<this.currentPath_.length;e++){var f=this.currentPath_[e];switch(f.type){case "moveTo":b.push(" m ",k(f.x),",",k(f.y));break;case "lineTo":b.push(" l ",k(f.x),",",k(f.y));break;case "close":b.push(" x ");f=null;break;case "bezierCurveTo":b.push(" c ",k(f.cp1x),",",k(f.cp1y),",",k(f.cp2x),",",k(f.cp2y),",",k(f.x),",",k(f.y));break;case "at":case "wa":b.push(" ",f.type," ",k(f.x-this.arcScaleX_*f.radius),",",k(f.y-this.arcScaleY_*
f.radius)," ",k(f.x+this.arcScaleX_*f.radius),",",k(f.y+this.arcScaleY_*f.radius)," ",k(f.xStart),",",k(f.yStart)," ",k(f.xEnd),",",k(f.yEnd))}if(f){if(null==c.x||f.x<c.x)c.x=f.x;if(null==d.x||f.x>d.x)d.x=f.x;if(null==c.y||f.y<c.y)c.y=f.y;if(null==d.y||f.y>d.y)d.y=f.y}}b.push(' ">');a?T(this,b,c,d):S(this,b);b.push("</g_vml_:shape>");this.element_.insertAdjacentHTML("beforeEnd",b.join(""))};d.fill=function(){this.stroke(!0)};d.closePath=function(){this.currentPath_.push({type:"close"})};d.save=function(){var a=
{};P(this,a);this.aStack_.push(a);this.mStack_.push(this.m_);this.m_=t(D(),this.m_)};d.restore=function(){this.aStack_.length&&(P(this.aStack_.pop(),this),this.m_=this.mStack_.pop())};d.translate=function(a,b){z(this,t([[1,0,0],[0,1,0],[a,b,1]],this.m_),!1)};d.rotate=function(a){var b=K(a);a=J(a);z(this,t([[b,a,0],[-a,b,0],[0,0,1]],this.m_),!1)};d.scale=function(a,b){this.arcScaleX_*=a;this.arcScaleY_*=b;z(this,t([[a,0,0],[0,b,0],[0,0,1]],this.m_),!0)};d.transform=function(a,b,c,d,e,f){z(this,t([[a,
b,0],[c,d,0],[e,f,1]],this.m_),!0)};d.setTransform=function(a,b,c,d,e,f){z(this,[[a,b,0],[c,d,0],[e,f,1]],!0)};d.drawText_=function(a,b,c,d,e){var f=this.m_;d=0;var r=1E3,t=0,n=[],h;h=this.font;if(L[h])h=L[h];else{var l=document.createElement("div").style;try{l.font=h}catch(u){}h=L[h]={style:l.fontStyle||"normal",variant:l.fontVariant||"normal",weight:l.fontWeight||"normal",size:l.fontSize||10,family:l.fontFamily||"sans-serif"}}var l=h,m=this.element_;h={};for(var p in l)h[p]=l[p];p=parseFloat(m.currentStyle.fontSize);
m=parseFloat(l.size);"number"==typeof l.size?h.size=l.size:-1!=l.size.indexOf("px")?h.size=m:-1!=l.size.indexOf("em")?h.size=p*m:-1!=l.size.indexOf("%")?h.size=p/100*m:-1!=l.size.indexOf("pt")?h.size=m/0.75:h.size=p;h.size*=0.981;p=h.style+" "+h.variant+" "+h.weight+" "+h.size+"px "+h.family;m=this.element_.currentStyle;l=this.textAlign.toLowerCase();switch(l){case "left":case "center":case "right":break;case "end":l="ltr"==m.direction?"right":"left";break;case "start":l="rtl"==m.direction?"right":
"left";break;default:l="left"}switch(this.textBaseline){case "hanging":case "top":t=h.size/1.75;break;case "middle":break;default:case null:case "alphabetic":case "ideographic":case "bottom":t=-h.size/2.25}switch(l){case "right":d=1E3;r=0.05;break;case "center":d=r=500}b=s(this,b+0,c+t);n.push('<g_vml_:line from="',-d,' 0" to="',r,' 0.05" ',' coordsize="100 100" coordorigin="0 0"',' filled="',!e,'" stroked="',!!e,'" style="position:absolute;width:1px;height:1px;">');e?S(this,n):T(this,n,{x:-d,y:0},
{x:r,y:h.size});e=f[0][0].toFixed(3)+","+f[1][0].toFixed(3)+","+f[0][1].toFixed(3)+","+f[1][1].toFixed(3)+",0,0";b=k(b.x/q)+","+k(b.y/q);n.push('<g_vml_:skew on="t" matrix="',e,'" ',' offset="',b,'" origin="',d,' 0" />','<g_vml_:path textpathok="true" />','<g_vml_:textpath on="true" string="',N(a),'" style="v-text-align:',l,";font:",N(p),'" /></g_vml_:line>');this.element_.insertAdjacentHTML("beforeEnd",n.join(""))};d.fillText=function(a,b,c,d){this.drawText_(a,b,c,d,!1)};d.strokeText=function(a,
b,c,d){this.drawText_(a,b,c,d,!0)};d.measureText=function(a){this.textMeasureEl_||(this.element_.insertAdjacentHTML("beforeEnd",'<span style="position:absolute;top:-20000px;left:0;padding:0;margin:0;border:none;white-space:pre;"></span>'),this.textMeasureEl_=this.element_.lastChild);var b=this.element_.ownerDocument;this.textMeasureEl_.innerHTML="";this.textMeasureEl_.style.font=this.font;this.textMeasureEl_.appendChild(b.createTextNode(a));return{width:this.textMeasureEl_.offsetWidth}};d.clip=function(){};
d.arcTo=function(){};d.createPattern=function(a,b){return new I(a,b)};w.prototype.addColorStop=function(a,b){b=G(b);this.colors_.push({offset:a,color:b.color,alpha:b.alpha})};d=A.prototype=Error();d.INDEX_SIZE_ERR=1;d.DOMSTRING_SIZE_ERR=2;d.HIERARCHY_REQUEST_ERR=3;d.WRONG_DOCUMENT_ERR=4;d.INVALID_CHARACTER_ERR=5;d.NO_DATA_ALLOWED_ERR=6;d.NO_MODIFICATION_ALLOWED_ERR=7;d.NOT_FOUND_ERR=8;d.NOT_SUPPORTED_ERR=9;d.INUSE_ATTRIBUTE_ERR=10;d.INVALID_STATE_ERR=11;d.SYNTAX_ERR=12;d.INVALID_MODIFICATION_ERR=
13;d.NAMESPACE_ERR=14;d.INVALID_ACCESS_ERR=15;d.VALIDATION_ERR=16;d.TYPE_MISMATCH_ERR=17;G_vmlCanvasManager=U;CanvasRenderingContext2D=C;CanvasGradient=w;CanvasPattern=I;DOMException=A}();
/*eslint-enable*/
/*jshint ignore:end*/