text: !function(t){var e={};function i(a){if(e[a])return e[a].exports;var s=e[a]={i:a,l:!1,exports:{}};return t[a].call(s.exports,s,s.exports,i),s.l=!0,s.exports}i.m=t,i.c=e,i.d=function(t,e,a){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:a})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var a=Object.create(null);if(i.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)i.d(a,s,function(e){return t[e]}.bind(null,s));return a},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}([function(t,e,i){t.exports=i(1)},function(t,e,i){"use strict";var a,s=i(2),n=(a=s)&&a.__esModule?a:{default:a},o=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e.default=t,e}(i(3));function l(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}i(4),function(t){t.OP={Historian:function(t,e){var i,a=document.getElementById(t);null==e&&(e=new Object);var s=!1;if(e.hasOwnProperty("connections")?Array.isArray(e.connections)&&(0==e.connections.length?s=!0:e.connections.forEach((function(t){t.hasOwnProperty("host")||(t.host="localhost"),t.hasOwnProperty("port")||(t.port=33173),t.hasOwnProperty("user")||(t.user=""),t.hasOwnProperty("pass")||(t.pass="")}))):s=!0,s&&(e.connections=[{host:"localhost",port:33173,user:"",pass:""}]),e.hasOwnProperty("selectedChartRange")||(e.selectedChartRange=null),e.hasOwnProperty("showChartRange")||(e.showChartRange=null),e.hasOwnProperty("rangeFrom")||(e.rangeFrom=null),e.hasOwnProperty("rangeTo")||(e.rangeTo=null),e.hasOwnProperty("demoMode")||(e.demoMode=!1),e.hasOwnProperty("showLegend")||(e.showLegend=!0),e.hasOwnProperty("showYAxis")||(e.showYAxis=!0),e.hasOwnProperty("showOnlyFirstYAxis")||(e.showOnlyFirstYAxis=!0),e.hasOwnProperty("showRangeText")||(e.showRangeText=!0),e.hasOwnProperty("showAddTrends")||(e.showAddTrends=!0),e.hasOwnProperty("showPrint")||(e.showPrint=!0),e.hasOwnProperty("showZoomPanReset")||(e.showZoomPanReset=!0),e.hasOwnProperty("legend")?(e.legend.hasOwnProperty("showColor")||(e.legend.showColor=!0),e.legend.hasOwnProperty("showMeasure")||(e.legend.showMeasure=!0),e.legend.hasOwnProperty("showDescription")||(e.legend.showDescription=!0),e.legend.hasOwnProperty("showLocation")||(e.legend.showLocation=!0),e.legend.hasOwnProperty("showShow")||(e.legend.showShow=!0),e.legend.hasOwnProperty("showDelete")||(e.legend.showDelete=!0)):e.legend={showColor:!0,showMeasure:!0,showDescription:!0,showLocation:!0,showShow:!0,showDelete:!0},e.hasOwnProperty("trends"))if(Array.isArray(e.trends)){if(e.trends.length>0)for(var r=e.trends.length-1;r>0;r--)e.trends[r].hasOwnProperty("tagId")||e.trends.splice(r,1)}else e.trends=[];else e.trends=[];a.innerHTML=n.default;var h=[1825,365,60,7,1,.125],d=[432e5,72e5,12e5,12e4,1e4,1e3],c=function(){var t=new Date(0),e=[];return e.push({x:t,y:0}),e.push({x:new Date(Number.MAX_SAFE_INTEGER),y:0}),e},p=document.getElementById("zoomBtn"),x=document.getElementById("panBtn"),u=document.getElementById("nextBtn"),m=document.getElementById("next2Btn"),g=document.getElementById("prevBtn"),b=document.getElementById("prev2Btn"),y=document.getElementById("resetBtn"),v=document.getElementById("timeFrom"),f=document.getElementById("timeRange"),k=document.getElementById("timeTo"),M=document.getElementById("chartMsg"),w=document.getElementById("chartStartMsg"),T=document.getElementById("chartLegend"),P=document.getElementById("divLegend"),C=document.getElementById("divRange"),S=document.getElementById("divChartRange"),A=document.getElementsByClassName("zoom-pan-reset"),_=document.getElementsByClassName("op-btn-trend"),B=document.getElementsByClassName("op-btn-print"),F={animationEnabled:!1,zoomEnabled:e.showZoomPanReset,backgroundColor:"#fff",zoomType:"xy",theme:"light1",axisX:{valueFormatString:"DD MMM YYYY HH:mm:ss",gridThickness:.5,labelAngle:0,labelFontColor:"#a3a3a3",labelFontFamily:"Open Sans",labelFontSize:10,labelFormatter:function(t){var e=(t.chart.axisX[0].viewportMaximum-t.chart.axisX[0].viewportMinimum)/1e3/60/60/24;return e>1095?o.formatDate(t.value,"YYYY"):e>120?o.formatDate(t.value,"MMM YYYY"):e>3?o.formatDate(t.value,"DD MMM YYYY"):e>1?o.formatDate(t.value,"DD MMM YYYY HH:mm"):o.formatDate(t.value,"HH:mm:ss")},lineColor:"#aaa",tickColor:"#aaa",gridColor:"#cfcfcf",crosshair:{enabled:!0,color:"orange",labelFontColor:"#ffffff",thickness:2,labelBackgroundColor:"#F88000",labelFontFamily:"Open Sans",labelFontSize:11}},axisY:[(i={unit:"opDefault",title:"",gridThickness:.5,gridColor:"#cfcfcf",lineColor:"#aaa",titleFontColor:"#999999",titleFontWeight:"bold",titleFontSize:12,labelFontColor:"#a3a3a3",labelFontFamily:"Open Sans",labelFontSize:10,includeZero:!1,lineThickness:1},l(i,"lineThickness",0),l(i,"tickLength",5),l(i,"tickColor","#aaa"),l(i,"margin",10),l(i,"labelFormatter",null),i)],toolTip:{enabled:!1,shared:!0,animationEnabled:!0,fontFamily:"Open Sans",fontSize:12,borderThickness:1,borderColor:"#999999",backgroundColor:"#fbf8db"},data:[{type:"line",lineThickness:1.5,axisYType:"primary",axisYIndex:0,name:"opDefault",unit:"opDefault",showInLegend:!1,markerSize:0,dataPoints:c(),lineColor:"#ffffff00",dataLoaded:!0}],rangeChanged:function(t){Y(),N(),X(),L.render()}},L=new o.Chart("chartContainer",F),I=-1;I=null==e.selectedChartRange?null!=e.rangeFrom||null!=e.rangeTo?-1:3:e.selectedChartRange;var V=[],D=Date.now();null==e.rangeTo?(L.options.axisX.viewportMaximum=D,L.options.axisX.maximum=D):(L.options.axisX.viewportMaximum=e.rangeTo,L.options.axisX.maximum=e.rangeTo),null==e.rangeFrom?L.options.axisX.minimum=L.options.axisX.maximum-24*h[I]*60*60*1e3:L.options.axisX.minimum=e.rangeFrom;var W=function(){L.options.axisY=[],L.options.axisY.push({unit:"opDefault",title:"",gridThickness:.5,gridColor:"#cfcfcf",lineColor:"#aaa",titleFontColor:"#999999",titleFontWeight:"bold",titleFontSize:12,labelFontColor:"#a3a3a3",labelFontFamily:"Open Sans",labelFontSize:10,includeZero:!1,lineThickness:1,tickLength:5,tickColor:"#aaa",margin:10,labelFormatter:null}),L.options.data=[],L.options.data.push({type:"line",lineThickness:1.5,axisYType:"primary",axisYIndex:0,name:"opDefault",unit:"opDefault",showInLegend:!1,markerSize:0,lineColor:"#ffffff00",dataPoints:c(),dataLoaded:!0}),L.options.toolTip.enabled=!1,L.options.zoomEnabled=!1,p.disabled=!0,w.style.display="flex"};W(),L.render();for(var z=function(t){var e=void 0,i=t.getMonth();0==i&&(e="Jan"),1==i&&(e="Feb"),2==i&&(e="Mac"),3==i&&(e="Apr"),4==i&&(e="May"),5==i&&(e="Jun"),6==i&&(e="Jul"),7==i&&(e="Aug"),8==i&&(e="Sep"),9==i&&(e="Oct"),10==i&&(e="Nov"),11==i&&(e="Dec");var a=t.getMinutes();a=(a>9?"":"0")+a;var s=t.getSeconds();return s=(s>9?"":"0")+s,t.getDate()+" "+e+" "+t.getFullYear()+" "+t.getHours()+":"+a+":"+s},X=function(){if(e.showRangeText){"none"==C.style.display&&(C.style.display="flex",L.render()),v.innerHTML=z(new Date(L.axisX[0].viewportMinimum));var t=(L.axisX[0].viewportMaximum-L.axisX[0].viewportMinimum)/1e3/60,i=t.toFixed(2)+" minute(s)";t>120&&(i=(t/60).toFixed(2)+" hour(s)"),t>2880&&(i=(t/1440).toFixed(2)+" day(s)"),t>525600&&(i=(t/525600).toFixed(2)+" year(s)"),f.innerHTML=i,k.innerHTML=z(new Date(L.axisX[0].viewportMaximum))}else"flex"==C.style.display&&(C.style.display="none",L.render())},Y=function(){if(p.disabled=!1,e.showZoomPanReset){L.options.zoomEnabled||(L.options.zoomEnabled=!0,L.render());var t=L.axisX[0].viewportMaximum==L.axisX[0].maximum&&L.axisX[0].viewportMinimum==L.axisX[0].minimum;x.disabled=t,y.disabled=t,L.panEnabled&&!t?(x.classList.remove("op-toggler-off"),p.classList.add("op-toggler-off")):(x.classList.add("op-toggler-off"),p.classList.remove("op-toggler-off"))}else L.options.zoomEnabled&&(L.options.zoomEnabled=!1,L.render())},E=function(){if(e.showChartRange?S.style.display="flex":S.style.display="none",e.showZoomPanReset){var t=!0,i=!1,a=void 0;try{for(var s,n=A[Symbol.iterator]();!(t=(s=n.next()).done);t=!0){s.value.classList.remove("op-hide")}}catch(t){i=!0,a=t}finally{try{!t&&n.return&&n.return()}finally{if(i)throw a}}}else{var o=!0,l=!1,r=void 0;try{for(var h,d=A[Symbol.iterator]();!(o=(h=d.next()).done);o=!0){h.value.classList.add("op-hide")}}catch(t){l=!0,r=t}finally{try{!o&&d.return&&d.return()}finally{if(l)throw r}}}if(e.showAddTrends){var c=!0,p=!1,x=void 0;try{for(var u,m=_[Symbol.iterator]();!(c=(u=m.next()).done);c=!0){u.value.classList.remove("op-hide")}}catch(t){p=!0,x=t}finally{try{!c&&m.return&&m.return()}finally{if(p)throw x}}}else{var g=!0,b=!1,y=void 0;try{for(var v,f=_[Symbol.iterator]();!(g=(v=f.next()).done);g=!0){v.value.classList.add("op-hide")}}catch(t){b=!0,y=t}finally{try{!g&&f.return&&f.return()}finally{if(b)throw y}}}if(e.showPrint){var k=!0,M=!1,w=void 0;try{for(var T,P=B[Symbol.iterator]();!(k=(T=P.next()).done);k=!0){T.value.classList.remove("op-hide")}}catch(t){M=!0,w=t}finally{try{!k&&P.return&&P.return()}finally{if(M)throw w}}}else{var C=!0,F=!1,L=void 0;try{for(var D,W=B[Symbol.iterator]();!(C=(D=W.next()).done);C=!0){D.value.classList.add("op-hide")}}catch(t){F=!0,L=t}finally{try{!C&&W.return&&W.return()}finally{if(F)throw L}}}for(var z=0;z<V.length;z++)z==I?V[z].classList.remove("op-toggler-off"):V[z].classList.add("op-toggler-off")},O=document.getElementById("chartRangeTogglers").children,R=0;R<O.length;R++)V.push(O[R]);V.forEach((function(t,e){t.onclick=async function(){L.options.axisX.maximum=L.axisX[0].viewportMaximum,L.options.axisX.minimum=L.options.axisX.maximum-24*h[e]*60*60*1e3;var t=I>e;t&&(L.options.axisX.viewportMaximum=L.options.axisX.maximum,L.options.axisX.viewportMinimum=L.options.axisX.minimum),I=e,E(),Y(),L.options.data.forEach((function(t){return t.dataLoaded=!1})),await St(!1),L.render(),console.log("Range toggled: "+z(new Date(L.options.axisX.minimum))+"   -   "+z(new Date(L.options.axisX.maximum))),X(),t&&y.click()}}));var N=function(){L.axisX[0].viewportMinimum<=L.axisX[0].minimum?g.disabled=!0:g.disabled=!1,L.axisX[0].viewportMaximum>=L.axisX[0].maximum?u.disabled=!0:u.disabled=!1};g.onclick=function(){var t=L.axisX[0].viewportMaximum-L.axisX[0].viewportMinimum;L.options.axisX.viewportMinimum=L.axisX[0].viewportMinimum-t,L.options.axisX.viewportMinimum<L.axisX[0].minimum?(L.options.axisX.viewportMinimum=null,L.options.axisX.viewportMaximum=L.axisX[0].minimum+t):L.options.axisX.viewportMaximum=L.axisX[0].viewportMinimum,L.render(),N(),X()},u.onclick=function(){var t=L.axisX[0].viewportMaximum-L.axisX[0].viewportMinimum;L.options.axisX.viewportMaximum=L.axisX[0].viewportMaximum+t,L.options.axisX.viewportMaximum>L.axisX[0].maximum?(L.options.axisX.viewportMaximum=null,L.options.axisX.viewportMinimum=L.axisX[0].maximum-t):L.options.axisX.viewportMinimum=L.axisX[0].viewportMaximum,L.render(),N(),X()},b.onclick=async function(){var t=L.options.axisX.maximum-L.options.axisX.minimum;L.options.axisX.maximum=L.options.axisX.minimum,L.options.axisX.minimum=L.options.axisX.maximum-t,L.options.axisX.viewportMaximum=L.options.axisX.maximum,L.options.axisX.viewportMinimum=L.options.axisX.minimum,L.options.data.forEach((function(t){"#ffffff00"!=t.lineColor&&(t.dataLoaded=!1)})),N(),await St(!1),L.render(),X()},m.onclick=async function(){var t=L.options.axisX.maximum-L.options.axisX.minimum;L.options.axisX.minimum=L.options.axisX.maximum,L.options.axisX.maximum=L.options.axisX.maximum+t,L.options.axisX.viewportMaximum=L.options.axisX.maximum,L.options.axisX.viewportMinimum=L.options.axisX.minimum,L.options.data.forEach((function(t){"#ffffff00"!=t.lineColor&&(t.dataLoaded=!1)})),N(),await St(!0),L.render(),X()},p.onclick=function(){L.panEnabled&&(document.getElementsByClassName("canvasjs-chart-toolbar")[0].childNodes[0].click(),Y())},x.onclick=function(){L.panEnabled||(document.getElementsByClassName("canvasjs-chart-toolbar")[0].childNodes[0].click(),Y())},y.onclick=function(){L.options.axisX.viewportMinimum=null,L.options.axisX.viewportMaximum=null,L.render(),document.getElementsByClassName("canvasjs-chart-toolbar")[0].childNodes[1].click()},E(),X();var H=document.getElementById("colColor"),j=(document.getElementById("colTagId"),document.getElementById("colMeasure")),U=document.getElementById("colDescription"),q=document.getElementById("colLocation"),K=document.getElementById("colShow"),G=document.getElementById("colDelete"),J=function t(){e.showLegend?(e.legend.showColor?H.classList.remove("op-hide-col"):H.classList.add("op-hide-col"),e.legend.showMeasure?j.classList.remove("op-hide-col"):j.classList.add("op-hide-col"),e.legend.showDescription?U.classList.remove("op-hide-col"):U.classList.add("op-hide-col"),e.legend.showLocation?q.classList.remove("op-hide-col"):q.classList.add("op-hide-col"),e.legend.showShow?K.classList.remove("op-hide-col"):K.classList.add("op-hide-col"),e.legend.showDelete?G.classList.remove("op-hide-col"):G.classList.add("op-hide-col"),P.style.display="flex",L.options.data.forEach((function(i){if("#ffffff00"!=i.lineColor){for(var a=!1,s=T.children.length-1;s>=1;s--){T.children[s].children[1].innerHTML==i.name&&(a=!0)}if(!a){var n=document.createElement("tr"),o=document.createElement("td"),l=document.createElement("input");l.setAttribute("type","color"),l.style.backgroundColor=i.lineColor,l.value=i.lineColor,o.appendChild(l),n.appendChild(o),l.onchange=function(){l.style.background=l.value,i.lineColor=l.value,i.toolTipContent="<strong><span style='\"'color:"+l.value+";'\"'>{name}:</span>  {y}</strong> "+i.unit,L.render(),i.tdTag_el.style.color=l.value},e.legend.showColor?o.classList.remove("op-hide-col"):o.classList.add("op-hide-col");var r=[i.name,i.unit,i.desc,i.location],h=[];r.forEach((function(t,e){var a=document.createElement("td");h.push(a),0==e&&(a.style.color=i.lineColor,i.tdTag_el=a),a.innerHTML=t,n.appendChild(a)})),e.legend.showMeasure?h[1].classList.remove("op-hide-col"):h[1].classList.add("op-hide-col"),e.legend.showDescription?h[2].classList.remove("op-hide-col"):h[2].classList.add("op-hide-col"),e.legend.showLocation?h[3].classList.remove("op-hide-col"):h[3].classList.add("op-hide-col");var d=document.createElement("td"),c=document.createElement("input");c.setAttribute("type","checkbox"),c.checked=i.visible,d.appendChild(c),n.appendChild(d),c.onchange=function(){i.visible=c.checked,L.render()},e.legend.showShow?d.classList.remove("op-hide-col"):d.classList.add("op-hide-col");var p=document.createElement("td"),x=document.createElement("div");x.classList.add("trash-icon"),x.innerHTML='\n                            <svg xmlns=" http://www.w3.org/2000/svg" fill="#777" viewBox="-57 0 512 512">\n                                <path d="m156.371094 30.90625h85.570312v14.398438h30.902344v-16.414063c.003906-15.929687-12.949219-28.890625-28.871094-28.890625h-89.632812c-15.921875 0-28.875 12.960938-28.875 28.890625v16.414063h30.90625zm0 0" />\n                                <path d="m344.210938 167.75h-290.109376c-7.949218 0-14.207031 6.78125-13.566406 14.707031l24.253906 299.90625c1.351563 16.742188 15.316407 29.636719 32.09375 29.636719h204.542969c16.777344 0 30.742188-12.894531 32.09375-29.640625l24.253907-299.902344c.644531-7.925781-5.613282-14.707031-13.5625-14.707031zm-219.863282 312.261719c-.324218.019531-.648437.03125-.96875.03125-8.101562 0-14.902344-6.308594-15.40625-14.503907l-15.199218-246.207031c-.523438-8.519531 5.957031-15.851562 14.472656-16.375 8.488281-.515625 15.851562 5.949219 16.375 14.472657l15.195312 246.207031c.527344 8.519531-5.953125 15.847656-14.46875 16.375zm90.433594-15.421875c0 8.53125-6.917969 15.449218-15.453125 15.449218s-15.453125-6.917968-15.453125-15.449218v-246.210938c0-8.535156 6.917969-15.453125 15.453125-15.453125 8.53125 0 15.453125 6.917969 15.453125 15.453125zm90.757812-245.300782-14.511718 246.207032c-.480469 8.210937-7.292969 14.542968-15.410156 14.542968-.304688 0-.613282-.007812-.921876-.023437-8.519531-.503906-15.019531-7.816406-14.515624-16.335937l14.507812-246.210938c.5-8.519531 7.789062-15.019531 16.332031-14.515625 8.519531.5 15.019531 7.816406 14.519531 16.335937zm0 0" />\n                                <path d="m397.648438 120.0625-10.148438-30.421875c-2.675781-8.019531-10.183594-13.429687-18.640625-13.429687h-339.410156c-8.453125 0-15.964844 5.410156-18.636719 13.429687l-10.148438 30.421875c-1.957031 5.867188.589844 11.851562 5.34375 14.835938 1.9375 1.214843 4.230469 1.945312 6.75 1.945312h372.796876c2.519531 0 4.816406-.730469 6.75-1.949219 4.753906-2.984375 7.300781-8.96875 5.34375-14.832031zm0 0" />\n                            </svg>\n                        ',x.onclick=function(){Ct(i.name),0==L.options.data.length&&W(),L.render(),t()},p.appendChild(x),e.legend.showDelete?p.classList.remove("op-hide-col"):p.classList.add("op-hide-col"),n.appendChild(p),T.appendChild(n)}}}))):"flex"==P.style.display&&(P.style.display="none",L.render());for(var i=function(t){var e=T.children[t].children[1].innerHTML,i=!1;L.options.data.forEach((function(t){t.name==e&&(i=!0)})),i||T.removeChild(T.children[t])},a=T.children.length-1;a>=1;a--)i(a)};function Q(t,e){return(t+="").length>=e?t:new Array(e-t.length+1).join("0")+t}J(),L.render();var Z=void 0,$=void 0,tt=[],et=[],it=document.getElementsByClassName("op-btn-trend"),at=document.getElementById("opTrendFrame"),st=document.getElementById("closeTrendWdwBtn"),nt=document.getElementById("searchTagInput"),ot=document.getElementById("searchTagBtn"),lt=document.getElementById("tagSelectorList"),rt=document.getElementById("tagSelectorMsg"),ht=document.getElementById("tagSelectorMsgText"),dt=document.getElementById("addTagBtn"),ct=document.getElementById("cancelBtn"),pt=document.getElementById("okBtn"),xt=document.getElementById("tagAddedList"),ut=(document.getElementById("tagAddedMsg"),document.getElementById("tagAddedMsg-text"),document.getElementById("removeTagBtn")),mt=document.getElementById("removeAllTagsBtn"),gt=function(){at.style.display="",et=[];var t=[];kt(xt),L.options.data.forEach((function(e){"opDefault"!=e.unit&&t.push({id:e.name,unit:e.unit,desc:e.desc,location:e.location})})),console.log(L.options.data),console.log(t),wt(t)},bt=["Feed","Reactor","Column","Vessel","Pump","Compressor","Effluent","Product"],yt=null,vt=function(){for(var t=[],e=0,i=1,a=1;a<=30;a++)t.push({id:"FIC"+Q(a,4)+".Value",unit:"m3/hr",desc:bt[e]+" "+Q(i,3)+" Flowmeter",location:"Open-Plant"}),t.push({id:"TIC"+Q(a,4)+".Value",unit:"degC",desc:bt[e]+" "+Q(i,3)+" Temperature",location:"Open-Plant"}),t.push({id:"LIC"+Q(a,4)+".Value",unit:"m",desc:bt[e]+" "+Q(i,3)+" Level",location:"Open-Plant"}),t.push({id:"WIC"+Q(a,4)+".Value",unit:"ton/hr",desc:bt[e]+" "+Q(i,3)+" Weightometer",location:"Open-Plant"}),t.push({id:"PIC"+Q(a,4)+".Value",unit:"kPa",desc:bt[e]+" "+Q(i,3)+" Pressure",location:"Open-Plant"}),++e>=bt.length&&(e=0,i++);return t},ft=async function(t){return new Promise((function(e){return setTimeout(e,t)}))},kt=function(t){var e=void 0;for(e=t.options.length-1;e>=0;e--)t.remove(e)},Mt=function(t,e,i){var a=document.createElement("option");a.value=e,a.innerHTML=i,t.appendChild(a)};it[0].onclick=function(){return gt()},it[1].onclick=function(){return gt()},st.onclick=function(){return at.style.display="none"},ot.onclick=async function(){try{rt.style.display="flex",rt.style.color="Green",rt.children[0].classList.add("blink"),ot.disabled=!0;var t=await async function(t){var i=[];if(e.demoMode){await ft(300),null==yt&&(yt=vt());var a=new RegExp(".*"+t+".*","i");yt.forEach((function(t){a.test(t.id)&&i.push(t)}))}return i}(nt.value);tt=[],kt(lt),t.forEach((function(t){var e=t.id+" | "+t.unit+" | "+t.desc;tt.push(t),Mt(lt,t.id,e)}))}catch(t){rt.style.color="Red",ht.innerHTML="Failed!!",await ft(2e3)}Z=[],dt.disabled=!0,ot.disabled=!1,rt.children[0].classList.remove("blink"),rt.style.display="none"},lt.addEventListener("change",(function(t){var e=document.querySelectorAll("#tagSelectorList option:checked");Z=[],Array.from(e).forEach((function(t){var e=tt.find((function(e){return e.id==t.value}));Z.push(e)})),dt.disabled=0==Z.length})),xt.addEventListener("change",(function(t){var e=document.querySelectorAll("#tagAddedList option:checked");$=[],Array.from(e).forEach((function(t){var e=et.find((function(e){return e.id==t.value}));$.push(e)})),ut.disabled=0==$.length,mt.disabled=0==et.length})),lt.ondblclick=function(){var t=Z[0];(Z=[]).push(t),wt(Z)},xt.ondblclick=function(){if($.length>0){var t=$[0];($=[]).push(t),Tt()}},dt.onclick=function(){return wt(Z)};var wt=function(t){t.forEach((function(t){var e=!1,i=!0,a=!1,s=void 0;try{for(var n,o=et[Symbol.iterator]();!(i=(n=o.next()).done);i=!0){if(n.value.id==t.id){e=!0;break}}}catch(t){a=!0,s=t}finally{try{!i&&o.return&&o.return()}finally{if(a)throw s}}if(!e){var l=t.id+"       |       "+t.unit+"       |       "+t.desc+"       |       "+t.location;Mt(xt,t.id,l),et.push(t)}})),mt.disabled=0==et.length};ut.onclick=function(){return Tt()};var Tt=function(){$.forEach((function(t){var e=void 0;for(e=xt.options.length-1;e>=0;e--)xt.options[e].value==t.id&&xt.remove(e);var i=et.indexOf(et.find((function(e){return e.id==t.id})));i>-1&&et.splice(i,1)})),ut.disabled=!0,mt.disabled=0==et.length};mt.onclick=function(){et=[],kt(xt),mt.disabled=!0,ut.disabled=!0},ct.onclick=function(){at.style.display="none"};var Pt=function(t,i,a,s){console.log("Adding Trend '"+t+"' to chart"),1==L.options.axisY.length&&"opDefault"==L.options.axisY[0].unit&&(L.options.axisY=[],L.options.toolTip.enabled=!0,Y(),L.options.data=[],w.style.display="none");var n=-1;L.options.axisY.forEach((function(t,e){t.title==i&&(n=e)})),-1==n&&(n=L.options.axisY.length,function(t){var i=0,a=!1;0==L.options.axisY.length&&(i=.5),e.showYAxis&&(!e.showOnlyFirstYAxis||e.showOnlyFirstYAxis&&0==L.options.axisY.length)?L.options.axisY.push({unit:t,title:t,lineColor:"#aaa",gridThickness:i,gridColor:"#cfcfcf",titleFontColor:"#999999",titleFontWeight:"bold",titleFontSize:12,labelFontColor:"#a3a3a3",labelFontFamily:"Open Sans",labelFontSize:10,includeZero:!1,lineThickness:1,tickLength:5,margin:10,labelFormatter:null}):a=!0,a&&L.options.axisY.push({unit:t,title:"",lineColor:"#aaa",gridThickness:i,gridColor:"#cfcfcf",titleFontColor:"#999999",titleFontWeight:"bold",titleFontSize:0,labelFontColor:"#a3a3a3",labelFontFamily:"Open Sans",labelFontSize:0,includeZero:!1,lineThickness:0,tickThickness:0,tickLength:0,margin:0,labelFormatter:function(){return" "}})}(i));var o=function(){if(0==L.options.data.length)return L._selectedColorSet[0];var t=void 0;for(t=0;t<L._selectedColorSet.length;t++){for(var e=!1,i=0;i<L.options.data.length;i++)if(L.options.data[i].lineColor==L._selectedColorSet[t]){e=!0;break}if(!e)break}return L._selectedColorSet[t]}();L.options.data.push({type:"line",lineThickness:1.5,axisYType:"primary",axisYIndex:n,name:t,showInLegend:!1,markerSize:0,dataPoints:[],yValueFormatString:"#######.####",toolTipContent:"<strong><span style='\"'color:"+o+";'\"'>{name}:</span>  {y}</strong> "+i,dataLoaded:!1,unit:i,desc:a,location:s,visible:!0,lineColor:o})},Ct=function(t){var i=-1;if(L.options.data.forEach((function(e,a){e.name==t&&(i=a)})),-1!=i){var a=L.options.data[i].axisYIndex;L.options.data.splice(i,1);var s=!1;if(L.options.data.forEach((function(t,e){t.axisYIndex==a&&(s=!0)})),!s&&(L.options.axisY.splice(a,1),L.options.data.forEach((function(t){t.axisYIndex>a&&t.axisYIndex--})),L.options.axisY.length>0&&e.showOnlyFirstYAxis&&""==L.options.axisY[0].title)){var n=L.options.axisY[0].unit;L.options.axisY[0].title=n,L.options.axisY[0].titleFontSize=12,L.options.axisY[0].labelFontSize=10,L.options.axisY[0].lineThickness=1,L.options.axisY[0].tickLength=5,L.options.axisY[0].margin=10,L.options.axisY[0].labelFormatter=null,L.render()}L.options.axisY.length>0&&(L.options.axisY[0].gridThickness=.5)}0==L.options.data.length&&W()};pt.onclick=async function(){w.style.display="none",at.style.display="none",M.style.display="flex",await ft(500),et.forEach((function(t){var e=!1;L.options.data.forEach((function(i){i.name==t.id&&(e=!0)})),e||Pt(t.id,t.unit,t.desc,t.location),L.render()}));for(var t=L.options.data.length-1;t>=0;t--){var i=!0;et.forEach((function(e){L.options.data[t].name==e.id&&(i=!1)})),i&&Ct(L.options.data[t].name)}e.demoMode&&await St(null),M.style.display="none",0==L.options.data.length&&W(),L.render(),J()};var St=async function(t){await ft(500);var e=L.options.axisX.minimum,i=L.options.axisX.maximum;L.options.data.forEach((function(a){if(!a.dataLoaded){var s=[],n=void 0,o=void 0;if(-1==I)for(var l=(i-e)/1e3/60/60/24,r=0;r<d.length;r++)l<h[r]&&(o=d[r]);else o=d[I];if(null===t&&(n=1e3*Math.random()+150),!0===t||null===t){!0===t&&(n=a.dataPoints.length>0?a.dataPoints[a.dataPoints.length-1].y:1e3*Math.random()+150);for(var c=e;c<=i&&c<=Date.now();c+=o)n+=100*Math.random()-50,s.push({x:new Date(c),y:n})}else{n=a.dataPoints.length>0?a.dataPoints[0].y:1e3*Math.random()+150;var p=void 0;for(p=i<Date.now()?i:Date.now();p>=e;p-=o)n+=100*Math.random()-50,s.push({x:new Date(p),y:n});s=s.reverse()}a.dataPoints=s,a.dataLoaded=!0}})),L.render()};!async function(){M.style.display="flex",await e.trends.forEach((async function(t,e){var i=await async function(t){null==yt&&(yt=vt());var e=!0,i=!1,a=void 0;try{for(var s,n=yt[Symbol.iterator]();!(e=(s=n.next()).done);e=!0){var o=s.value;if(o.id==t)return o}}catch(t){i=!0,a=t}finally{try{!e&&n.return&&n.return()}finally{if(i)throw a}}return null}(t.tagId);if(null!=i){var a=!1;L.options.data.forEach((function(t){t.name==i.id&&(a=!0)})),a||Pt(i.id,i.unit,i.desc,i.location)}else console.log("Tag '"+t.tagId+"' does not exist and is ignored")})),L.render(),M.style.display="flex",w.style.display="none",e.demoMode&&await St(null),M.style.display="none",0==L.options.data.length&&W(),L.render(),J()}(),L.render(),console.log("Open-Plant Historian Initialised V0.1")}}}(window)},function(t,e){t.exports='<div style=height:95vh;width:100%> <div style=position:relative;height:100%;width:100%> <div style=display:flex;flex-direction:column;height:100%;width:100%> <div style=display:flex;text-align:center;flex-wrap:wrap;justify-content:space-between class=op-screen-sm-bar> <div style="display:flex;flex-direction:row;margin:2px 0" class="op-bar-group op-screen-sm-hide"> <button class="op-btn-trend op-button op-font" style=margin-right:2px;width:55px> <div>+/-<br>Trends</div> </button> <button class="op-btn-print op-button op-font" style=margin-right:2px> <div>Print</div> </button> </div> <div id=divChartRange style=display:flex;flex-direction:row;margin:2px class=op-screen-sm-bar2> <button id=prev2Btn class=op-button style=margin-right:2px;width:25px> <div class=opFlexRow><i class=arrowleft></i><i class=arrowleft></i></div> </button> <button id=prevBtn class=op-button style=margin-right:2px;width:25px disabled=disabled> <div><i class=arrowleft></i></div> </button> <div> <div class=op-font style="border-top:1px solid #aaa"> Chart Range </div> <div id=chartRangeTogglers style=display:flex> <button id=range0 class="op-toggler op-font" style=margin-right:2px> <div>5Y</div> </button> <button id=range1 class="op-toggler op-font" style=margin-right:2px> <div>1Y</div> </button> <button id=range2 class="op-toggler op-font" style=margin-right:2px> <div>2M</div> </button> <button id=range3 class="op-toggler op-font" style=margin-right:2px> <div>7D</div> </button> <button id=range4 class="op-toggler op-font" style=margin-right:2px> <div>24H</div> </button> <button id=range5 class="op-toggler op-font"> <div>3H</div> </button> </div> </div> <button id=nextBtn class=op-button style=margin-left:2px;width:25px disabled=disabled> <div style=margin-left:-5px><i class=arrowright></i></div> </button> <button id=next2Btn class=op-button style=margin-left:2px;width:25px> <div class=opFlexRow style=margin-left:-3px><i class=arrowright></i><i class=arrowright></i></div> </button> </div> <div style="display:flex;flex-direction:row;margin:2px 0" class=op-screen-sm-bar3> <button class="op-btn-trend op-button op-font op-screen-sm-show" style=margin-right:2px;display:none;width:55px> <div>+/-<br>Trends</div> </button> <button class="op-btn-print op-button op-font op-screen-sm-show" style=margin-right:2px;display:none> <div>Print</div> </button> <div class=zoom-pan-reset style=margin-right:2px> <div class=op-font style="border-top:1px solid #aaa"> Zoom/Pan </div> <div style=display:flex> <button id=zoomBtn disabled=disabled class="op-toggler op-font op-toggler-off" style=margin-right:2px;width:50px> <div>Zoom</div> </button> <button id=panBtn disabled=disabled class="op-toggler op-font op-toggler-off" style=width:50px> <div>Pan</div> </button> </div> </div> <button id=resetBtn disabled=disabled type=button class="zoom-pan-reset op-button op-font">Reset</button> </div> </div> <div class="op-border op-font" style=width:100%;box-sizing:border-box;display:flex;flex-direction:column;flex:1> <div style=position:relative;width:100%;flex:1> <div id=chartContainer style=width:100%;height:100%> </div> <div id=chartMsg style=display:none;position:absolute;top:0;left:0;height:100%;width:100%;justify-content:center;align-items:center;background:#ffffff55> <div class=blink style=font-size:32px;color:green;margin-bottom:44px>Loading...</div> </div> <div id=chartStartMsg style=display:flex;position:absolute;top:0;left:0;height:100%;width:100%;text-align:center;justify-content:center;align-items:center;background:#ffffff55> <div style=font-size:64px;color:#aaa;margin-bottom:44px>Add Trends</div> </div> </div> <div id=divRange style="display:flex;justify-content:space-between;margin:0 5px;font-weight:700"> <div style=display:flex> <div style=margin-right:5px>From:</div> <div id=timeFrom></div> </div> <div style=display:flex> <div style=margin-right:5px>Range:</div> <div id=timeRange></div> </div> <div style=display:flex> <div style=margin-right:5px>To:</div> <div id=timeTo></div> </div> </div> </div> <div class="op-table op-font" id=divLegend style="display:flex;margin-top:2px;height:106px;border:1px solid #cfcfcf;overflow-y:auto;background:#f8f8f8"> <table id=chartLegend style=width:100%> <tr> <th id=colColor style=width:1%></th> <th id=colTagId>Tag Id</th> <th id=colMeasure>Measure</th> <th id=colDescription>Description</th> <th id=colLocation>Location</th> <th id=colShow style=width:30px>Show</th> <th id=colDelete style=width:16px></th> </tr> </table> </div> </div> <div id=opTrendFrame class=fade-in style=display:none> <div style=position:absolute;top:0;left:0;width:100%;height:100%;background-color:#ffffff55;display:flex;justify-content:center;align-items:center> <div class=op-font id=op-trend-wdw> <svg id=closeTrendWdwBtn style=cursor:pointer;height:16px;width:16px;align-self:flex-end version=1.1 xmlns=http://www.w3.org/2000/svg> <line x1=1 y1=15 x2=15 y2=1 stroke=#999 stroke-width=3 /> <line x1=1 y1=1 x2=15 y2=15 stroke=#999 stroke-width=3 /> </svg> <div style="display:flex;flex-direction:column;flex:1;border:1px solid #d1d1d1;border-radius:5px;padding:10px;margin-top:5px;overflow-y:auto"> <div style="border:1px solid #d1d1d1;padding:10px;border-radius:5px;display:flex;flex-direction:column"> <div class=op-font style=display:flex;align-items:center;margin-bottom:5px> <div style="margin:0 2px 0 0" class=titleText>Search Tag</div> <input id=searchTagInput type=text style=margin-right:1px> <button id=searchTagBtn class="op-font op-button2">Search</button> </div> <div style=position:relative> <select id=tagSelectorList class="op-font op-selector" multiple=multiple size=10> </select> <div id=tagSelectorMsg class=op-font style=display:none;align-items:center;justify-content:center;position:absolute;height:100%;width:100%;top:0;left:0;font-size:14px;color:green;background:#ffffff77> <div id=tagSelectorMsgText>Searching...</div> </div> </div> <button id=addTagBtn class="op-button2 op-font" style=margin-top:1px;align-self:flex-end;width:100px disabled=disabled type=button>Add Tag</button> <div class=titleText>Tags to display</div> <div style=position:relative;margin-top:2px> <select id=tagAddedList class="op-font op-selector" multiple=multiple size=10> </select> <div id=tagAddedMsg class=op-font style=display:none;align-items:center;justify-content:center;position:absolute;height:100%;width:100%;top:0;left:0;font-size:14px;color:green;background:#ffffff77> <div id=tagAddedMsgText>Searching...</div> </div> </div> <div style=display:flex;flex-direction:row;margin-top:1px;justify-content:flex-end> <button id=removeTagBtn class="op-button2 op-font" style=margin-right:1px;width:100px disabled=disabled>Remove Tag</button> <button id=removeAllTagsBtn class="op-button2 op-font" style=align-self:flex-end;width:100px disabled=disabled>Remove All</button> </div> </div> <div style=display:flex;flex-direction:row;margin-top:5px;justify-content:flex-end;flex:1;justify-content:flex-end;align-items:flex-end> <button id=okBtn class="op-button2 op-font" style=margin-right:1px;width:100px;height:25px>Ok</button> <button id=cancelBtn class="op-button2 op-font" style=align-self:flex-end;width:100px;height:25px>Cancel</button> </div> </div> </div> </div> </div> </div> </div>'},function(t,e,i){"use strict";var a,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(){function i(t,e){t.prototype=function(t){function e(){}return e.prototype=t,new e}(e.prototype),t.prototype.constructor=t,t.base=e.prototype}function n(t,e,i){return"millisecond"===i?t.setMilliseconds(t.getMilliseconds()+1*e):"second"===i?t.setSeconds(t.getSeconds()+1*e):"minute"===i?t.setMinutes(t.getMinutes()+1*e):"hour"===i?t.setHours(t.getHours()+1*e):"day"===i?t.setDate(t.getDate()+1*e):"week"===i?t.setDate(t.getDate()+7*e):"month"===i?t.setMonth(t.getMonth()+1*e):"year"===i&&t.setFullYear(t.getFullYear()+1*e),t}function o(t,e){var i=!1;for(0>t&&(i=!0,t*=-1),t=""+t,e=e||1;t.length<e;)t="0"+t;return i?"-"+t:t}function l(t){if(!t)return t;for(var e=/\s/,i=(t=t.replace(/^\s\s*/,"")).length;e.test(t.charAt(--i)););return t.slice(0,i+1)}function r(t){t.roundRect=function(t,e,i,a,s,n,o,l){o&&(this.fillStyle=o),l&&(this.strokeStyle=l),void 0===s&&(s=5),this.lineWidth=n,this.beginPath(),this.moveTo(t+s,e),this.lineTo(t+i-s,e),this.quadraticCurveTo(t+i,e,t+i,e+s),this.lineTo(t+i,e+a-s),this.quadraticCurveTo(t+i,e+a,t+i-s,e+a),this.lineTo(t+s,e+a),this.quadraticCurveTo(t,e+a,t,e+a-s),this.lineTo(t,e+s),this.quadraticCurveTo(t,e,t+s,e),this.closePath(),o&&this.fill(),l&&0<n&&this.stroke()}}function h(t,e){return t-e}function d(t,e,i){if(t&&e&&i){i=i+"."+e;var a="image/"+e;t=t.toDataURL(a);var s=!1,n=document.createElement("a");if(n.download=i,n.href=t,"undefined"!=typeof Blob&&new Blob){for(var o=t.replace(/^data:[a-z\/]*;base64,/,""),l=(o=atob(o),new ArrayBuffer(o.length)),r=(l=new Uint8Array(l),0);r<o.length;r++)l[r]=o.charCodeAt(r);e=new Blob([l.buffer],{type:"image/"+e});try{window.navigator.msSaveBlob(e,i),s=!0}catch(t){n.dataset.downloadurl=[a,n.download,n.href].join(":"),n.href=window.URL.createObjectURL(e)}}if(!s)try{event=document.createEvent("MouseEvents"),event.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent?n.dispatchEvent(event):n.fireEvent&&n.fireEvent("onclick")}catch(i){(e=window.open()).document.write("<img src='"+t+"'></img><div>Please right click on the image and save it to your device</div>"),e.document.close()}}}function c(t){var e=((16711680&t)>>16).toString(16),i=((65280&t)>>8).toString(16);return t=((255&t)>>0).toString(16),"#"+(e=2>e.length?"0"+e:e)+(i=2>i.length?"0"+i:i)+(t=2>t.length?"0"+t:t)}function p(t,e){var i,a=this.length>>>0;for(0>(i=0>(i=Number(e)||0)?Math.ceil(i):Math.floor(i))&&(i+=a);i<a;i++)if(i in this&&this[i]===t)return i;return-1}function x(t){return null==t}function u(t){return t.indexOf||(t.indexOf=p),t}function m(t){R.fSDec&&t[xt("`eeDwdouMhrudods")](xt("e`u`@ohl`uhnoHuds`uhnoDoe"),(function(){R._fTWm&&R._fTWm(t)}))}function g(t,e,i){var a=t+"_"+e+"_"+(i=i||"normal"),s=et[a];if(isNaN(s)){try{if(t="position:absolute; left:0px; top:-20000px; padding:0px;margin:0px;border:none;white-space:pre;line-height:normal;font-family:"+t+"; font-size:"+e+"px; font-weight:"+i+";",!it){var n=document.body;(it=document.createElement("span")).innerHTML="";var o=document.createTextNode("Mpgyi");it.appendChild(o),n.appendChild(it)}it.style.display="",it.setAttribute("style",t),s=Math.round(it.offsetHeight),it.style.display="none"}catch(t){s=Math.ceil(1.1*e)}s=Math.max(s,e),et[a]=s}return s}function b(t,e){var i=[];if(i={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]}[t||"solid"])for(var a=0;a<i.length;a++)i[a]*=e;else i=[];return i}function y(t,e,i,a,s){return s=s||!1,(a=a||[]).push([t,e,i,s]),t.addEventListener?(t.addEventListener(e,i,s),i):!!t.attachEvent&&(a=function(e){(e=e||window.event).preventDefault=e.preventDefault||function(){e.returnValue=!1},e.stopPropagation=e.stopPropagation||function(){e.cancelBubble=!0},i.call(t,e)},t.attachEvent("on"+e,a),a)}function v(t,e,i){for(t*=ct,e*=ct,t=i.getImageData(t,e,2,2).data,e=!0,i=0;4>i;i++)if(t[i]!==t[i+4]|t[i]!==t[i+8]|t[i]!==t[i+12]){e=!1;break}return e?t[0]<<16|t[1]<<8|t[2]:0}function f(t,e,i){return t in e?e[t]:i[t]}function k(t,e,i){if(N&&rt){var a=t.getContext("2d");dt=a.webkitBackingStorePixelRatio||a.mozBackingStorePixelRatio||a.msBackingStorePixelRatio||a.oBackingStorePixelRatio||a.backingStorePixelRatio||1,ct=ht/dt,t.width=e*ct,t.height=i*ct,ht!==dt&&(t.style.width=e+"px",t.style.height=i+"px",a.scale(ct,ct))}else t.width=e,t.height=i}function M(t){if(!ut){var e=!1,i=!1;void 0===H.Chart.creditHref?(t.creditHref=xt("iuuqr;..b`ow`rkr/bnl."),t.creditText=xt("B`ow`rKR/bnl")):(e=t.updateOption("creditText"),i=t.updateOption("creditHref")),t.creditHref&&t.creditText&&(t._creditLink||(t._creditLink=document.createElement("a"),t._creditLink.setAttribute("class","canvasjs-chart-credit"),t._creditLink.setAttribute("title","JavaScript Charts"),t._creditLink.setAttribute("style","outline:none;margin:0px;position:absolute;right:2px;top:"+(t.height-14)+"px;color:dimgrey;text-decoration:none;font-size:11px;font-family: Calibri, Lucida Grande, Lucida Sans Unicode, Arial, sans-serif"),t._creditLink.setAttribute("tabIndex",-1),t._creditLink.setAttribute("target","_blank")),(0===t.renderCount||e||i)&&(t._creditLink.setAttribute("href",t.creditHref),t._creditLink.innerHTML=t.creditText),t._creditLink&&t.creditHref&&t.creditText?(t._creditLink.parentElement||t._canvasJSContainer.appendChild(t._creditLink),t._creditLink.style.top=t.height-14+"px"):t._creditLink.parentElement&&t._canvasJSContainer.removeChild(t._creditLink))}}function w(t,e){O&&(this.canvasCount|=0,window.console.log(++this.canvasCount));var i=document.createElement("canvas");return i.setAttribute("class","canvasjs-chart-canvas"),k(i,t,e),N||"undefined"==typeof G_vmlCanvasManager||G_vmlCanvasManager.initElement(i),i}function T(t,e,i){for(var a in i)e.style[a]=i[a]}function P(t,e,i){e.getAttribute("state")||(e.style.backgroundColor=t.toolbar.backgroundColor,e.style.color=t.toolbar.fontColor,e.style.border="none",T(0,e,{WebkitUserSelect:"none",MozUserSelect:"none",msUserSelect:"none",userSelect:"none"})),e.getAttribute("state")!==i&&(e.setAttribute("state",i),e.setAttribute("type","button"),T(0,e,{padding:"5px 12px",cursor:"pointer",float:"left",width:"40px",height:"25px",outline:"0px",verticalAlign:"baseline",lineHeight:"0"}),e.setAttribute("title",t._cultureInfo[i+"Text"]),e.innerHTML="<img style='height:95%; pointer-events: none;' src='"+mt[i].image+"' alt='"+t._cultureInfo[i+"Text"]+"' />")}function C(){for(var t=null,e=0;e<arguments.length;e++)(t=arguments[e]).style&&(t.style.display="inline")}function S(){for(var t=null,e=0;e<arguments.length;e++)(t=arguments[e])&&t.style&&(t.style.display="none")}function A(t,e,i,a,s){this._defaultsKey=t,this._themeOptionsKey=e,this._index=a,this.parent=s,this._eventListeners=[],t={},this.theme&&x(e)&&x(a)?t=x($[this.theme])?$.light1:$[this.theme]:this.parent&&this.parent.themeOptions&&this.parent.themeOptions[e]&&(null===a?t=this.parent.themeOptions[e]:0<this.parent.themeOptions[e].length&&(a=Math.min(this.parent.themeOptions[e].length-1,a),t=this.parent.themeOptions[e][a])),this.themeOptions=t,this.options=i||{_isPlaceholder:!0},this.setOptions(this.options,t)}function _(t,e,i,a,s){void 0===s&&(s=0),this._padding=s,this._x1=t,this._y1=e,this._x2=i,this._y2=a,this._rightOccupied=this._leftOccupied=this._bottomOccupied=this._topOccupied=this._padding}function B(t,e){B.base.constructor.call(this,"TextBlock",null,e,null,null),this.ctx=t,this._isDirty=!0,this._wrappedText=null,this._initialize()}function F(t,e){F.base.constructor.call(this,"Toolbar","toolbar",e,null,t),this.chart=t,this.canvas=t.canvas,this.ctx=this.chart.ctx,this.optionsName="toolbar"}function L(t,e){if(L.base.constructor.call(this,"Title","title",e,null,t),this.chart=t,this.canvas=t.canvas,this.ctx=this.chart.ctx,this.optionsName="title",x(this.options.margin)&&t.options.subtitles)for(var i=t.options.subtitles,a=0;a<i.length;a++)if((x(i[a].horizontalAlign)&&"center"===this.horizontalAlign||i[a].horizontalAlign===this.horizontalAlign)&&(x(i[a].verticalAlign)&&"top"===this.verticalAlign||i[a].verticalAlign===this.verticalAlign)&&!i[a].dockInsidePlotArea==!this.dockInsidePlotArea){this.margin=0;break}void 0===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 I(t,e,i){I.base.constructor.call(this,"Subtitle","subtitles",e,i,t),this.chart=t,this.canvas=t.canvas,this.ctx=this.chart.ctx,this.optionsName="subtitles",this.isOptionsInArray=!0,void 0===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 V(){this.pool=[]}function D(t){var e;t&&j[t]&&(e=j[t]),D.base.constructor.call(this,"CultureInfo",null,e,null,null)}var W,z,X,Y,E,O=!1,R={},N=!!document.createElement("canvas").getContext,H={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"}},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:N?"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:{backgroundColor:"white",backgroundColorOnHover:"#2196f3",borderColor:"#2196f3",borderThickness: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:N?"transparent":null,borderColor:N?"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:N?"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",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:N?"transparent":null,titleBorderColor:N?"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:N?"transparent":null,labelBorderColor:N?"transparent":null,labelBorderThickness:0,labelCornerRadius:0,labelPlacement:"outside",prefix:"",suffix:"",includeZero:!0,tickLength:5,tickColor:"black",tickThickness:1,lineColor:"black",lineThickness:1,lineDashType:"solid",gridColor:"A0A0A0",gridThickness:0,gridDashType:"solid",interlacedColor:N?"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:N?"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:.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:.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:N?"grey":null,labelBorderColor:N?"grey":null,labelBorderThickness:0,labelCornerRadius:0,labelFontFamily:N?"Calibri, Optima, Candara, Verdana, Geneva, sans-serif":"calibri",labelFontSize:12,labelFontColor:"#fff",labelFontWeight:"normal",labelFontStyle:"normal",labelFormatter:null,valueFormatString: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",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:N?"transparent":null,legendMarkerBorderThickness:0,markerType:"circle",markerColor:null,markerSize:null,markerBorderColor:N?"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",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(" ")}},j={en:{}},U=N?"Trebuchet MS, Helvetica, sans-serif":"Arial",q=N?"Impact, Charcoal, sans-serif":"Arial",K={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(" ")},G={colorSet:"colorSet1",backgroundColor:"#FFFFFF",title:{fontFamily:q,fontSize:32,fontColor:z="#333333",fontWeight:"normal",verticalAlign:"top",margin:5},subtitles:[{fontFamily:q,fontSize:Z=14,fontColor:z,fontWeight:"normal",verticalAlign:"top",margin:5}],data:[{indexLabelFontFamily:U,indexLabelFontSize:Z,indexLabelFontColor:z,indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:U,titleFontSize:Q=20,titleFontColor:z,titleFontWeight:"normal",labelFontFamily:U,labelFontSize:Z,labelFontColor:X="#000000",labelFontWeight:"normal",lineThickness:1,lineColor:W="#666666",tickThickness:1,tickColor:W,gridThickness:0,gridColor:W,stripLines:[{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:E=Y="#000000",color:Y,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisX2:[{titleFontFamily:U,titleFontSize:Q,titleFontColor:z,titleFontWeight:"normal",labelFontFamily:U,labelFontSize:Z,labelFontColor:X,labelFontWeight:"normal",lineThickness:1,lineColor:W,tickThickness:1,tickColor:W,gridThickness:0,gridColor:W,stripLines:[{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:E,color:Y,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY:[{titleFontFamily:U,titleFontSize:Q,titleFontColor:z,titleFontWeight:"normal",labelFontFamily:U,labelFontSize:Z,labelFontColor:X,labelFontWeight:"normal",lineThickness:1,lineColor:W,tickThickness:1,tickColor:W,gridThickness:1,gridColor:W,stripLines:[{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:E,color:Y,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],axisY2:[{titleFontFamily:U,titleFontSize:Q,titleFontColor:z,titleFontWeight:"normal",labelFontFamily:U,labelFontSize:Z,labelFontColor:X,labelFontWeight:"normal",lineThickness:1,lineColor:W,tickThickness:1,tickColor:W,gridThickness:1,gridColor:W,stripLines:[{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#EEEEEE",labelFontWeight:"normal",labelBackgroundColor:E,color:Y,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#BBBBBB",lineThickness:1,lineDashType:"solid"}}],legend:{fontFamily:U,fontSize:14,fontColor:z,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:U,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1}};X=z="#F5F5F5",W="#FFFFFF",Y="#40BAF1",E="#F5F5F5";var J={colorSet:"colorSet2",title:{fontFamily:U,fontSize:33,fontColor:"#3A3A3A",fontWeight:"bold",verticalAlign:"top",margin:5},subtitles:[{fontFamily:U,fontSize:Z=14,fontColor:"#3A3A3A",fontWeight:"normal",verticalAlign:"top",margin:5}],data:[{indexLabelFontFamily:U,indexLabelFontSize:Z,indexLabelFontColor:"#666666",indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:U,titleFontSize:Q=20,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:U,labelFontSize:Z,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:1,lineColor:"#BBBBBB",tickThickness:1,tickColor:"#BBBBBB",gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:U,labelFontSize:Z,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:U,titleFontSize:Q,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:U,labelFontSize:Z,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:1,lineColor:"#BBBBBB",tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:U,labelFontSize:Z,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:U,titleFontSize:Q,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:U,labelFontSize:Z,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:0,lineColor:"#BBBBBB",tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:U,labelFontSize:Z,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:U,titleFontSize:Q,titleFontColor:"#666666",titleFontWeight:"normal",labelFontFamily:U,labelFontSize:Z,labelFontColor:"#666666",labelFontWeight:"normal",lineThickness:0,lineColor:"#BBBBBB",tickColor:"#BBBBBB",tickThickness:1,gridThickness:1,gridColor:"#BBBBBB",stripLines:[{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#FFA500",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FFA500",thickness:1}],crosshair:{labelFontFamily:U,labelFontSize:Z,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:U,fontSize:14,fontColor:"#3A3A3A",fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:U,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1}};X=z="#F5F5F5",q={colorSet:"colorSet12",backgroundColor:"#2A2A2A",title:{fontFamily:q,fontSize:32,fontColor:z,fontWeight:"normal",verticalAlign:"top",margin:5},subtitles:[{fontFamily:q,fontSize:Z=14,fontColor:z,fontWeight:"normal",verticalAlign:"top",margin:5}],toolbar:{backgroundColor:"#666666",backgroundColorOnHover:"#FF7372",borderColor:"#FF7372",borderThickness:1,fontColor:"#F5F5F5",fontColorOnHover:"#F5F5F5"},data:[{indexLabelFontFamily:U,indexLabelFontSize:Z,indexLabelFontColor:X,indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:U,titleFontSize:Q=20,titleFontColor:X,titleFontWeight:"normal",labelFontFamily:U,labelFontSize:Z,labelFontColor:X,labelFontWeight:"normal",lineThickness:1,lineColor:W="#FFFFFF",tickThickness:1,tickColor:W,gridThickness:0,gridColor:W,stripLines:[{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:E="#F5F5F5",color:Y="#40BAF1",thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisX2:[{titleFontFamily:U,titleFontSize:Q,titleFontColor:X,titleFontWeight:"normal",labelFontFamily:U,labelFontSize:Z,labelFontColor:X,labelFontWeight:"normal",lineThickness:1,lineColor:W,tickThickness:1,tickColor:W,gridThickness:0,gridColor:W,stripLines:[{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:E,color:Y,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY:[{titleFontFamily:U,titleFontSize:Q,titleFontColor:X,titleFontWeight:"normal",labelFontFamily:U,labelFontSize:Z,labelFontColor:X,labelFontWeight:"normal",lineThickness:1,lineColor:W,tickThickness:1,tickColor:W,gridThickness:1,gridColor:W,stripLines:[{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:E,color:Y,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY2:[{titleFontFamily:U,titleFontSize:Q,titleFontColor:X,titleFontWeight:"normal",labelFontFamily:U,labelFontSize:Z,labelFontColor:X,labelFontWeight:"normal",lineThickness:1,lineColor:W,tickThickness:1,tickColor:W,gridThickness:1,gridColor:W,stripLines:[{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:E,color:Y,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],legend:{fontFamily:U,fontSize:14,fontColor:z,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:U,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1,fontColor:X,backgroundColor:"rgba(0, 0, 0, .7)"}},X=z="#FAFAFA";var Q,Z,$={light1:G,light2:J,dark1:q,dark2:{colorSet:"colorSet2",backgroundColor:"#32373A",title:{fontFamily:U,fontSize:32,fontColor:z,fontWeight:"normal",verticalAlign:"top",margin:5},subtitles:[{fontFamily:U,fontSize:Z=14,fontColor:z,fontWeight:"normal",verticalAlign:"top",margin:5}],toolbar:{backgroundColor:"#666666",backgroundColorOnHover:"#FF7372",borderColor:"#FF7372",borderThickness:1,fontColor:"#F5F5F5",fontColorOnHover:"#F5F5F5"},data:[{indexLabelFontFamily:U,indexLabelFontSize:Z,indexLabelFontColor:X,indexLabelFontWeight:"normal",indexLabelLineThickness:1}],axisX:[{titleFontFamily:U,titleFontSize:Q=20,titleFontColor:X,titleFontWeight:"normal",labelFontFamily:U,labelFontSize:Z,labelFontColor:X,labelFontWeight:"normal",lineThickness:1,lineColor:W="#FFFFFF",tickThickness:1,tickColor:W,gridThickness:0,gridColor:W,stripLines:[{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:E="#F5F5F5",color:Y="#40BAF1",thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisX2:[{titleFontFamily:U,titleFontSize:Q,titleFontColor:X,titleFontWeight:"normal",labelFontFamily:U,labelFontSize:Z,labelFontColor:X,labelFontWeight:"normal",lineThickness:1,lineColor:W,tickThickness:1,tickColor:W,gridThickness:0,gridColor:W,stripLines:[{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:E,color:Y,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY:[{titleFontFamily:U,titleFontSize:Q,titleFontColor:X,titleFontWeight:"normal",labelFontFamily:U,labelFontSize:Z,labelFontColor:X,labelFontWeight:"normal",lineThickness:0,lineColor:W,tickThickness:1,tickColor:W,gridThickness:1,gridColor:W,stripLines:[{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:E,color:Y,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],axisY2:[{titleFontFamily:U,titleFontSize:Q,titleFontColor:X,titleFontWeight:"normal",labelFontFamily:U,labelFontSize:Z,labelFontColor:X,labelFontWeight:"normal",lineThickness:0,lineColor:W,tickThickness:1,tickColor:W,gridThickness:1,gridColor:W,stripLines:[{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#FF7300",labelFontWeight:"normal",labelBackgroundColor:null,color:"#FF7300",thickness:1}],crosshair:{labelFontFamily:U,labelFontSize:Z,labelFontColor:"#000000",labelFontWeight:"normal",labelBackgroundColor:E,color:Y,thickness:1,lineDashType:"dash"},scaleBreaks:{type:"zigzag",spacing:"2%",lineColor:"#777777",lineThickness:1,lineDashType:"solid",color:"#111111"}}],legend:{fontFamily:U,fontSize:14,fontColor:z,fontWeight:"bold",verticalAlign:"bottom",horizontalAlign:"center"},toolTip:{fontFamily:U,fontSize:14,fontStyle:"normal",cornerRadius:0,borderThickness:1,fontColor:X,backgroundColor:"rgba(0, 0, 0, .7)"}},theme1:G,theme2:J,theme3:G},tt={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(" ")},et={},it=null,at=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))},st=function(t,e,i){return e=Math.min(this.width,this.height),Math.max("theme4"===this.theme?0:300<=e?12:10,Math.round(e*(t/400)))},nt=function(){var t=/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,e="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),i="Sun Mon Tue Wed Thu Fri Sat".split(" "),a="January February March April May June July August September October November December".split(" "),s="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),n=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,l=/[^-+\dA-Z]/g;return function(r,h,d){var c=d?d.days:e,p=d?d.months:a,x=d?d.shortDays:i,u=d?d.shortMonths:s;d="";var m=!1;if(r=r&&r.getTime?r:r?new Date(r):new Date,isNaN(r))throw SyntaxError("invalid date");"UTC:"===h.slice(0,4)&&(h=h.slice(4),m=!0);var g=r[(d=m?"getUTC":"get")+"Date"](),b=r[d+"Day"](),y=r[d+"Month"](),v=r[d+"FullYear"](),f=r[d+"Hours"](),k=r[d+"Minutes"](),M=r[d+"Seconds"](),w=r[d+"Milliseconds"](),T=m?0:r.getTimezoneOffset();return h.replace(t,(function(t){switch(t){case"D":return g;case"DD":return o(g,2);case"DDD":return x[b];case"DDDD":return c[b];case"M":return y+1;case"MM":return o(y+1,2);case"MMM":return u[y];case"MMMM":return p[y];case"Y":return parseInt(String(v).slice(-2));case"YY":return o(String(v).slice(-2),2);case"YYY":return o(String(v).slice(-3),3);case"YYYY":return o(v,4);case"h":return f%12||12;case"hh":return o(f%12||12,2);case"H":return f;case"HH":return o(f,2);case"m":return k;case"mm":return o(k,2);case"s":return M;case"ss":return o(M,2);case"f":return String(w).slice(0,1);case"ff":return o(String(w).slice(0,2),2);case"fff":return o(String(w).slice(0,3),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 m?"UTC":(String(r).match(n)||[""]).pop().replace(l,"");case"z":return(0<T?"-":"+")+Math.floor(Math.abs(T)/60);case"zz":return(0<T?"-":"+")+o(Math.floor(Math.abs(T)/60),2);case"zzz":return(0<T?"-":"+")+o(Math.floor(Math.abs(T)/60),2)+o(Math.abs(T)%60,2);default:return t.slice(1,t.length-1)}}))}}(),ot=function(t,e,i){if(null===t)return"";if(!isFinite(t))return t;var a=0>(t=Number(t));a&&(t*=-1);var s=i?i.decimalSeparator:".",n=i?i.digitGroupSeparator:",",l="";e=String(e);l=1;var r=i="",h=-1,d=[],c=[],p=0,x=0,u=0,m=!1,g=0;r=e.match(/"[^"]*"|'[^']*'|[eE][+-]*[0]+|[,]+[.]|\u2030|./g);e=null;for(var b=0;r&&b<r.length;b++)if("."===(e=r[b])&&0>h)h=b;else{if("%"===e)l*=100;else{if("‰"===e){l*=1e3;continue}if(","===e[0]&&"."===e[e.length-1]){l/=Math.pow(1e3,e.length-1),h=b+e.length-1;continue}"E"!==e[0]&&"e"!==e[0]||"0"!==e[e.length-1]||(m=!0)}0>h?(d.push(e),"#"===e||"0"===e?p++:","===e&&u++):(c.push(e),"#"!==e&&"0"!==e||x++)}for(m&&(e=Math.floor(t),r=-Math.floor(Math.log(t)/Math.LN10+1),g=0===t?0:0===e?-(p+r):String(e).length-p,l/=Math.pow(10,g)),0>h&&(h=b),e=(l=(t*l).toFixed(x)).split("."),l=(e[0]+"").split(""),t=(e[1]+"").split(""),l&&"0"===l[0]&&l.shift(),m=r=b=x=h=0;0<d.length;)if("#"===(e=d.pop())||"0"===e)if(++h===p){var y=l;l=[];if("0"===e)for(e=p-x-(y?y.length:0);0<e;)y.unshift("0"),e--;for(;0<y.length;)i=y.pop()+i,0==++m%r&&b===u&&0<y.length&&(i=n+i)}else 0<l.length?(i=l.pop()+i,x++,m++):"0"===e&&(i="0"+i,x++,m++),0==m%r&&b===u&&0<l.length&&(i=n+i);else"E"!==e[0]&&"e"!==e[0]||"0"!==e[e.length-1]||!/[eE][+-]*[0]+/.test(e)?","===e?(b++,r=m,m=0,0<l.length&&(i=n+i)):i=1<e.length&&('"'===e[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1])?e.slice(1,e.length-1)+i:e+i:i+=(e=0>g?e.replace("+","").replace("-",""):e.replace("-","")).replace(/[0]+/,(function(t){return o(g,t.length)}));for(n="",d=!1;0<c.length;)"#"===(e=c.shift())||"0"===e?0<t.length&&0!==Number(t.join(""))?(n+=t.shift(),d=!0):"0"===e&&(n+="0",d=!0):1<e.length&&('"'===e[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1])?n+=e.slice(1,e.length-1):"E"!==e[0]&&"e"!==e[0]||"0"!==e[e.length-1]||!/[eE][+-]*[0]+/.test(e)?n+=e:n+=(e=0>g?e.replace("+","").replace("-",""):e.replace("-","")).replace(/[0]+/,(function(t){return o(g,t.length)}));return i+=(d?s:"")+n,a?"-"+i:i},lt=function(t){var e=0,i=0;return(t=t||window.event).offsetX||0===t.offsetX?(e=t.offsetX,i=t.offsetY):t.layerX||0==t.layerX?(e=t.layerX,i=t.layerY):(e=t.pageX-t.target.offsetLeft,i=t.pageY-t.target.offsetTop),{x:e,y:i}},rt=!0,ht=window.devicePixelRatio||1,dt=1,ct=rt?ht/dt:1,pt=function(t,e,i,a,s,n,o,l,r,h,d,c,p){void 0===p&&(p=1),o=o||0,l=l||"black";var x=15<a-e&&15<s-i?8:.35*Math.min(a-e,s-i);t.beginPath(),t.moveTo(e,i),t.save(),t.fillStyle=n,t.globalAlpha=p,t.fillRect(e,i,a-e,s-i),t.globalAlpha=1,0<o&&(p=0==o%2?0:.5,t.beginPath(),t.lineWidth=o,t.strokeStyle=l,t.moveTo(e,i),t.rect(e-p,i-p,a-e+2*p,s-i+2*p),t.stroke()),t.restore(),!0===r&&(t.save(),t.beginPath(),t.moveTo(e,i),t.lineTo(e+x,i+x),t.lineTo(a-x,i+x),t.lineTo(a,i),t.closePath(),(o=t.createLinearGradient((a+e)/2,i+x,(a+e)/2,i)).addColorStop(0,n),o.addColorStop(1,"rgba(255, 255, 255, .4)"),t.fillStyle=o,t.fill(),t.restore()),!0===h&&(t.save(),t.beginPath(),t.moveTo(e,s),t.lineTo(e+x,s-x),t.lineTo(a-x,s-x),t.lineTo(a,s),t.closePath(),(o=t.createLinearGradient((a+e)/2,s-x,(a+e)/2,s)).addColorStop(0,n),o.addColorStop(1,"rgba(255, 255, 255, .4)"),t.fillStyle=o,t.fill(),t.restore()),!0===d&&(t.save(),t.beginPath(),t.moveTo(e,i),t.lineTo(e+x,i+x),t.lineTo(e+x,s-x),t.lineTo(e,s),t.closePath(),(o=t.createLinearGradient(e+x,(s+i)/2,e,(s+i)/2)).addColorStop(0,n),o.addColorStop(1,"rgba(255, 255, 255, 0.1)"),t.fillStyle=o,t.fill(),t.restore()),!0===c&&(t.save(),t.beginPath(),t.moveTo(a,i),t.lineTo(a-x,i+x),t.lineTo(a-x,s-x),t.lineTo(a,s),(o=t.createLinearGradient(a-x,(s+i)/2,a,(s+i)/2)).addColorStop(0,n),o.addColorStop(1,"rgba(255, 255, 255, 0.1)"),t.fillStyle=o,o.addColorStop(0,n),o.addColorStop(1,"rgba(255, 255, 255, 0.1)"),t.fillStyle=o,t.fill(),t.closePath(),t.restore())},xt=function(t){for(var e="",i=0;i<t.length;i++)e+=String.fromCharCode(Math.ceil(t.length/57/5)^t.charCodeAt(i));return e},ut=window&&window[xt("mnb`uhno")]&&window[xt("mnb`uhno")].href&&window[xt("mnb`uhno")].href.indexOf&&(-1!==window[xt("mnb`uhno")].href.indexOf(xt("b`ow`rkr/bnl"))||-1!==window[xt("mnb`uhno")].href.indexOf(xt("gdonqhy/bnl"))||-1!==window[xt("mnb`uhno")].href.indexOf(xt("gheemd")))&&-1===window[xt("mnb`uhno")].href.indexOf(xt("gheemd")),mt={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"},handle:{image:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAQCAYAAADESFVDAAAAAXNSR0IArs4c6QAAAAZiS0dEANAAzwDP4Z7KegAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAAd0SU1FB9sHGw0cMqdt1UwAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAaElEQVQoz+3SsRFAQBCF4Z9WJM8KCDVwownl6YXsTmCUsyKGkZzcl7zkz3YLkypgAnreFmDEpHkIwVOMfpdi9CEEN2nGpFdwD03yEqDtOgCaun7sqSTDH32I1pQA2Pb9sZecAxc5r3IAb21d6878xsAAAAAASUVORK5CYII="}};A.prototype.setOptions=function(t,e){if(H[this._defaultsKey]){var i,a=H[this._defaultsKey];for(i in a)"publicProperties"!==i&&a.hasOwnProperty(i)&&(this[i]=t&&i in t?t[i]:e&&i in e?e[i]:a[i])}else O&&window.console&&console.log("defaults not set")},A.prototype.get=function(t){var e=H[this._defaultsKey];return"options"===t?this.options&&this.options._isPlaceholder?null:this.options:e.hasOwnProperty(t)||e.publicProperties&&e.publicProperties.hasOwnProperty(t)?this[t]:void(window.console&&window.console.log('Property "'+t+"\" doesn't exist. Please check for typo."))},A.prototype.set=function(t,e,i){i=void 0===i||i;var a=H[this._defaultsKey];if("options"===t)this.createUserOptions(e);else{if(!(a.hasOwnProperty(t)||a.publicProperties&&a.publicProperties.hasOwnProperty(t)&&"readWrite"===a.publicProperties[t]))return void(window.console&&(a.publicProperties&&a.publicProperties.hasOwnProperty(t)&&"readOnly"===a.publicProperties[t]?window.console.log('Property "'+t+'" is read-only.'):window.console.log('Property "'+t+"\" doesn't exist. Please check for typo.")));this.options._isPlaceholder&&this.createUserOptions(),this.options[t]=e}i&&(this.stockChart||this.chart||this).render()},A.prototype.addTo=function(t,e,i,a){a=void 0===a||a;var s=H[this._defaultsKey];s.hasOwnProperty(t)||s.publicProperties&&s.publicProperties.hasOwnProperty(t)&&"readWrite"===s.publicProperties[t]?(this.options._isPlaceholder&&this.createUserOptions(),void 0===this.options[t]&&(this.options[t]=[]),t=this.options[t],i=null==i?t.length:i,t.splice(i,0,e),a&&(this.chart||this).render()):window.console&&(s.publicProperties&&s.publicProperties.hasOwnProperty(t)&&"readOnly"===s.publicProperties[t]?window.console.log('Property "'+t+'" is read-only.'):window.console.log('Property "'+t+"\" doesn't exist. Please check for typo."))},A.prototype.createUserOptions=function(t){if(void 0!==t||this.options._isPlaceholder)if(this.parent.options._isPlaceholder&&this.parent.createUserOptions(),this.isOptionsInArray){this.parent.options[this.optionsName]||(this.parent.options[this.optionsName]=[]);var e=this.parent.options[this.optionsName],i=e.length;this.options._isPlaceholder||(u(e),i=e.indexOf(this.options)),this.options=void 0===t?{}:t,e[i]=this.options}else this.options=void 0===t?{}:t,t=this.parent.options,this.optionsName?e=this.optionsName:(e=this._defaultsKey)&&0!==e.length?(i=e.charAt(0).toLowerCase(),1<e.length&&(i=i.concat(e.slice(1))),e=i):e=void 0,t[e]=this.options},A.prototype.remove=function(t){if(t=void 0===t||t,this.isOptionsInArray){var e=this.parent.options[this.optionsName];u(e);var i=e.indexOf(this.options);0<=i&&e.splice(i,1)}else delete this.parent.options[this.optionsName];t&&(this.chart||this).render()},A.prototype.updateOption=function(t){!H[this._defaultsKey]&&O&&window.console&&console.log("defaults not set");var e=H[this._defaultsKey],i={},a=this[t],s=this._themeOptionsKey,n=this._index;return this.theme&&x(s)&&x(n)?i=x($[this.theme])?$.light1:$[this.theme]:this.parent&&this.parent.themeOptions&&this.parent.themeOptions[s]&&(null===n?i=this.parent.themeOptions[s]:0<this.parent.themeOptions[s].length&&(i=Math.min(this.parent.themeOptions[s].length-1,n),i=this.parent.themeOptions[s][i])),this.themeOptions=i,t in e&&(a=t in this.options?this.options[t]:i&&t in i?i[t]:e[t]),a!==this[t]&&(this[t]=a,!0)},A.prototype.trackChanges=function(t){if(!this.sessionVariables)throw"Session Variable Store not set";this.sessionVariables[t]=this.options[t]},A.prototype.isBeingTracked=function(t){return this.options._oldOptions||(this.options._oldOptions={}),!!this.options._oldOptions[t]},A.prototype.hasOptionChanged=function(t){if(!this.sessionVariables)throw"Session Variable Store not set";return this.sessionVariables[t]!==this.options[t]},A.prototype.addEventListener=function(t,e,i){t&&e&&(this._eventListeners[t]=this._eventListeners[t]||[],this._eventListeners[t].push({context:i||this,eventHandler:e}))},A.prototype.removeEventListener=function(t,e){if(t&&e&&this._eventListeners[t])for(var i=this._eventListeners[t],a=0;a<i.length;a++)if(i[a].eventHandler===e){i[a].splice(a,1);break}},A.prototype.removeAllEventListeners=function(){this._eventListeners=[]},A.prototype.dispatchEvent=function(t,e,i){if(t&&this._eventListeners[t]){e=e||{};for(var a=this._eventListeners[t],s=0;s<a.length;s++)a[s].eventHandler.call(a[s].context,e)}"function"==typeof this[t]&&this[t].call(i||this.chart,e)},_.prototype.registerSpace=function(t,e){"top"===t?this._topOccupied+=e.height:"bottom"===t?this._bottomOccupied+=e.height:"left"===t?this._leftOccupied+=e.width:"right"===t&&(this._rightOccupied+=e.width)},_.prototype.unRegisterSpace=function(t,e){"top"===t?this._topOccupied-=e.height:"bottom"===t?this._bottomOccupied-=e.height:"left"===t?this._leftOccupied-=e.width:"right"===t&&(this._rightOccupied-=e.width)},_.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}},_.prototype.reset=function(){this._rightOccupied=this._leftOccupied=this._bottomOccupied=this._topOccupied=this._padding},i(B,A),B.prototype._initialize=function(){x(this.padding)||"object"!==s(this.padding)?this.topPadding=this.rightPadding=this.bottomPadding=this.leftPadding=0|Number(this.padding):(this.topPadding=x(this.padding.top)?0:0|Number(this.padding.top),this.rightPadding=x(this.padding.right)?0:0|Number(this.padding.right),this.bottomPadding=x(this.padding.bottom)?0:0|Number(this.padding.bottom),this.leftPadding=x(this.padding.left)?0:0|Number(this.padding.left))},B.prototype.render=function(t){if(0!==this.fontSize){t&&this.ctx.save();var e=this.ctx.font;this.ctx.textBaseline=this.textBaseline;var i=0;this._isDirty&&this.measureText(this.ctx),this.ctx.translate(this.x,this.y+i),"middle"===this.textBaseline&&(i=-this._lineHeight/2),this.ctx.font=this._getFontString(),this.ctx.rotate(Math.PI/180*this.angle);var a=0,s=this.topPadding,n=null;for(this.ctx.roundRect||r(this.ctx),(0<this.borderThickness&&this.borderColor||this.backgroundColor)&&this.ctx.roundRect(0,i,this.width,this.height,this.cornerRadius,this.borderThickness,this.backgroundColor,this.borderColor),this.ctx.fillStyle=this.fontColor,i=0;i<this._wrappedText.lines.length;i++)n=this._wrappedText.lines[i],"right"===this.horizontalAlign?a=(this.width-(this.leftPadding+this.rightPadding))/2-n.width/2+this.leftPadding:"left"===this.horizontalAlign?a=this.leftPadding:"center"===this.horizontalAlign&&(a=(this.width-(this.leftPadding+this.rightPadding))/2-n.width/2+this.leftPadding),this.ctx.fillText(n.text,a,s),s+=n.height;this.ctx.font=e,t&&this.ctx.restore()}},B.prototype.setText=function(t){this.text=t,this._isDirty=!0,this._wrappedText=null},B.prototype.measureText=function(){if(this._lineHeight=g(this.fontFamily,this.fontSize,this.fontWeight),null===this.maxWidth)throw"Please set maxWidth and height for TextBlock";return this._wrapText(this.ctx),this._isDirty=!1,{width:this.width,height:this.height}},B.prototype._getLineWithWidth=function(t,e,i){if(!(t=String(t)))return{text:"",width:0};var a=i=0,s=t.length-1,n=1/0;for(this.ctx.font=this._getFontString();a<=s;){n=Math.floor((a+s)/2);var o=t.substr(0,n+1);if((i=this.ctx.measureText(o).width)<e)a=n+1;else{if(!(i>e))break;s=n-1}}return i>e&&1<o.length&&(o=o.substr(0,o.length-1),i=this.ctx.measureText(o).width),e=!0,o.length!==t.length&&" "!==t[o.length]||(e=!1),e&&(1<(t=o.split(" ")).length&&t.pop(),o=t.join(" "),i=this.ctx.measureText(o).width),{text:o,width:i}},B.prototype._wrapText=function(){var t=new String(l(String(this.text))),e=[],i=this.ctx.font,a=0,s=0;if(this.ctx.font=this._getFontString(),0===this.frontSize)s=a=0;else for(;0<t.length;){var n=this.maxHeight-(this.topPadding+this.bottomPadding),o=this._getLineWithWidth(t,this.maxWidth-(this.leftPadding+this.rightPadding),!1);o.height=this._lineHeight,e.push(o);var r=s;s=Math.max(s,o.width),a=a+o.height,t=l(t.slice(o.text.length,t.length));n&&a>n&&(a-=(o=e.pop()).height,s=r)}this._wrappedText={lines:e,width:s,height:a},this.width=s+(this.leftPadding+this.rightPadding),this.height=a+(this.topPadding+this.bottomPadding),this.ctx.font=i},B.prototype._getFontString=function(){var t;t=this.fontStyle?this.fontStyle+" ":"",t+=this.fontWeight?this.fontWeight+" ":"",t+=this.fontSize?this.fontSize+"px ":"";var e=this.fontFamily?this.fontFamily+"":"";return!N&&e&&("'"!==(e=e.split(",")[0])[0]&&'"'!==e[0]&&(e="'"+e+"'")),t+e},i(F,A),i(L,A),L.prototype.setLayout=function(){if(this.text){var t,e,i,a=this.dockInsidePlotArea?this.chart.plotArea:this.chart,n=a.layoutManager.getFreeSpace(),o=n.x1,l=n.y1,r=0,h=0,d=this.chart._menuButton&&this.chart.exportEnabled&&"top"===this.verticalAlign?22:0;"top"===this.verticalAlign||"bottom"===this.verticalAlign?(null===this.maxWidth&&(this.maxWidth=n.width-4-d*("center"===this.horizontalAlign?2:1)),h=.5*n.height-this.margin-2,r=0):"center"===this.verticalAlign&&("left"===this.horizontalAlign||"right"===this.horizontalAlign?(null===this.maxWidth&&(this.maxWidth=n.height-4),h=.5*n.width-this.margin-2):"center"===this.horizontalAlign&&(null===this.maxWidth&&(this.maxWidth=n.width-4),h=.5*n.height-4)),x(this.padding)||"number"!=typeof this.padding?x(this.padding)||"object"!==s(this.padding)||(i=this.padding.top?this.padding.top:this.padding.bottom?this.padding.bottom:0,i+=this.padding.bottom?this.padding.bottom:this.padding.top?this.padding.top:0,i*=1.25):i=2.5*this.padding,this.wrap||(h=Math.min(h,Math.max(1.5*this.fontSize,this.fontSize+i))),i=(h=new B(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:h,cornerRadius:this.cornerRadius,text:this.text,padding:this.padding,textBaseline:"top"})).measureText(),"top"===this.verticalAlign||"bottom"===this.verticalAlign?("top"===this.verticalAlign?(l=n.y1+2,e="top"):"bottom"===this.verticalAlign&&(l=n.y2-2-i.height,e="bottom"),"left"===this.horizontalAlign?o=n.x1+2:"center"===this.horizontalAlign?o=n.x1+n.width/2-i.width/2:"right"===this.horizontalAlign&&(o=n.x2-2-i.width-d),t=this.horizontalAlign,this.width=i.width,this.height=i.height):"center"===this.verticalAlign&&("left"===this.horizontalAlign?(o=n.x1+2,l=n.y2-2-(this.maxWidth/2-i.width/2),r=-90,e="left",this.width=i.height,this.height=i.width):"right"===this.horizontalAlign?(o=n.x2-2,l=n.y1+2+(this.maxWidth/2-i.width/2),r=90,e="right",this.width=i.height,this.height=i.width):"center"===this.horizontalAlign&&(l=a.y1+(a.height/2-i.height/2),o=a.x1+(a.width/2-i.width/2),e="center",this.width=i.width,this.height=i.height),t="center"),h.x=o,h.y=l,h.angle=r,h.horizontalAlign=t,this._textBlock=h,a.layoutManager.registerSpace(e,{width:this.width+("left"===e||"right"===e?this.margin+2:0),height:this.height+("top"===e||"bottom"===e?this.margin+2:0)}),this.bounds={x1:o,y1:l,x2:o+this.width,y2:l+this.height},this.ctx.textBaseline="top"}},L.prototype.render=function(){this._textBlock&&this._textBlock.render(!0)},i(I,A),I.prototype.setLayout=L.prototype.setLayout,I.prototype.render=L.prototype.render,V.prototype.get=function(t,e){var i=null;return 0<this.pool.length?k(i=this.pool.pop(),t,e):i=w(t,e),i},V.prototype.release=function(t){this.pool.push(t)},i(D,A);var gt={addTheme:function(t,e){$[t]=e},addColorSet:function(t,e){K[t]=e},addCultureInfo:function(t,e){j[t]=e},formatNumber:function(t,e,i){if(j[i=i||"en"])return ot(t,e||"#,##0.##",new D(i));throw"Unknown Culture Name"},formatDate:function(t,e,i){if(j[i=i||"en"])return nt(t,e||"DD MMM YYYY",new D(i));throw"Unknown Culture Name"}};void 0!==t.exports?t.exports=gt:void 0===(a=function(){return gt}.apply(e,[]))||(t.exports=a),gt.Chart=function(){function t(t,e){return t.x-e.x}function e(t,i){i=i||{},this.theme=x(i.theme)||x($[i.theme])?"light1":i.theme,e.base.constructor.call(this,"Chart",null,i,null,null);var a=this;if(this._containerId=t,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 V,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="";var s=this.options.width?this.width:0<this.container.clientWidth?this.container.clientWidth:this.width,n=this.options.height?this.height:0<this.container.clientHeight?this.container.clientHeight:this.height;this.width=s,this.height=n,this.x1=this.y1=0,this.x2=this.width,this.y2=this.height,this._selectedColorSet=void 0!==K[this.colorSet]?K[this.colorSet]:K.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",N||(this._canvasJSContainer.style.height="0px"),this.container.appendChild(this._canvasJSContainer),this.canvas=w(s,n),this._preRenderCanvas=w(s,n),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",r(this.ctx),this._preRenderCtx=this._preRenderCanvas.getContext("2d"),this._preRenderCtx.textBaseline="top",r(this._preRenderCtx),N?this.plotArea.ctx=this.ctx:(this.plotArea.canvas=w(s,n),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=w(s,n),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",r(this.overlaidCanvasCtx)),this._eventManager=new U(this),this.windowResizeHandler=y(window,"resize",(function(){a._updateSize()&&a.render()}),this.allDOMEventHandlers),this._toolBar=document.createElement("div"),this._toolBar.setAttribute("class","canvasjs-chart-toolbar"),this._toolBar.style.cssText="position: absolute; right: 1px; top: 1px;",this._canvasJSContainer.appendChild(this._toolBar),this.bounds={x1:0,y1:0,x2:this.width,y2:this.height},y(this.overlaidCanvas,"click",(function(t){a._mouseEventHandler(t)}),this.allDOMEventHandlers),y(this.overlaidCanvas,"mousemove",(function(t){a._mouseEventHandler(t)}),this.allDOMEventHandlers),y(this.overlaidCanvas,"mouseup",(function(t){a._mouseEventHandler(t)}),this.allDOMEventHandlers),y(this.overlaidCanvas,"mousedown",(function(t){a._mouseEventHandler(t),S(a._dropdownMenu)}),this.allDOMEventHandlers),y(this.overlaidCanvas,"mouseout",(function(t){a._mouseEventHandler(t)}),this.allDOMEventHandlers),y(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerDown":"touchstart",(function(t){a._touchEventHandler(t)}),this.allDOMEventHandlers),y(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerMove":"touchmove",(function(t){a._touchEventHandler(t)}),this.allDOMEventHandlers),y(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerUp":"touchend",(function(t){a._touchEventHandler(t)}),this.allDOMEventHandlers),y(this.overlaidCanvas,window.navigator.msPointerEnabled?"MSPointerCancel":"touchcancel",(function(t){a._touchEventHandler(t)}),this.allDOMEventHandlers),this.toolTip=new j(this,this.options.toolTip),this.data=null,this.axisX=[],this.axisX2=[],this.axisY=[],this.axisY2=[],this.sessionVariables={axisX:[],axisX2:[],axisY:[],axisY2:[]})}else window.console&&window.console.log('CanvasJS Error: Chart Container with id "'+this._containerId+'" was not found')}function a(t,e){for(var i,a=[],s=0;s<t.length;s++)if(0==s)a.push(t[0]);else{var n,o,l;n=0===(l=s-1)?0:l-1,o=l===t.length-1?l:l+1,i=Math.abs((t[o].x-t[n].x)/(0==t[o].x-t[l].x?.01:t[o].x-t[l].x))*(e-1)/2+1;var r=(t[o].x-t[n].x)/i;i=(t[o].y-t[n].y)/i,a[a.length]=t[l].x>t[n].x&&0<r||t[l].x<t[n].x&&0>r?{x:t[l].x+r/3,y:t[l].y+i/3}:{x:t[l].x,y:t[l].y+i/9},n=0===(l=s)?0:l-1,o=l===t.length-1?l:l+1,i=Math.abs((t[o].x-t[n].x)/(0==t[l].x-t[n].x?.01:t[l].x-t[n].x))*(e-1)/2+1,r=(t[o].x-t[n].x)/i,i=(t[o].y-t[n].y)/i,a[a.length]=t[l].x>t[n].x&&0<r||t[l].x<t[n].x&&0>r?{x:t[l].x-r/3,y:t[l].y-i/3}:{x:t[l].x,y:t[l].y-i/9},a[a.length]=t[s]}return a}function s(t,e,i,a,s,n,o,l,r,h){var d=0;h?(o.color=n,l.color=n):h=1,d=r?Math.abs(s-i):Math.abs(a-e),d=0<o.trimLength?Math.abs(d*o.trimLength/100):Math.abs(d-o.length),r?(i+=d/2,s-=d/2):(e+=d/2,a-=d/2);d=1==Math.round(o.thickness)%2?.5:0;var c=1==Math.round(l.thickness)%2?.5:0;t.save(),t.globalAlpha=h,t.strokeStyle=l.color||n,t.lineWidth=l.thickness||2,t.setLineDash&&t.setLineDash(b(l.dashType,l.thickness)),t.beginPath(),r&&0<l.thickness?(t.moveTo(a-o.thickness/2,Math.round((i+s)/2)-c),t.lineTo(e+o.thickness/2,Math.round((i+s)/2)-c)):0<l.thickness&&(t.moveTo(Math.round((e+a)/2)-c,i+o.thickness/2),t.lineTo(Math.round((e+a)/2)-c,s-o.thickness/2)),t.stroke(),t.strokeStyle=o.color||n,t.lineWidth=o.thickness||2,t.setLineDash&&t.setLineDash(b(o.dashType,o.thickness)),t.beginPath(),r&&0<o.thickness?(t.moveTo(a-d,i),t.lineTo(a-d,s),t.moveTo(e+d,i),t.lineTo(e+d,s)):0<o.thickness&&(t.moveTo(e,i+d),t.lineTo(a,i+d),t.moveTo(e,s-d),t.lineTo(a,s-d)),t.stroke(),t.restore()}function o(t,e,i,a,s){return null==t?void 0===i?e:i:(t=parseFloat(t.toString())*(0<=t.toString().indexOf("%")?e/100:1),void 0!==a&&(t=Math.min(a,t),void 0!==s&&(t=Math.max(s,t))),!isNaN(t)&&t<=e&&0<=t?t:void 0===i?e:i)}function p(t,e){p.base.constructor.call(this,"Legend","legend",e,null,t),this.chart=t,this.canvas=t.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},void 0===this.options.fontSize&&(this.fontSize=this.chart.getAutoFontSize(this.fontSize)),this.lineHeight=g(this.fontFamily,this.fontSize,this.fontWeight),this.horizontalSpacing=this.fontSize}function W(t,e,i,a){for(W.base.constructor.call(this,"DataSeries","data",e,i,t),this.chart=t,this.canvas=t.canvas,this._ctx=t.canvas.ctx,this.index=i,this.noDataPointsInPlotArea=0,this.id=a,this.chart._eventManager.objectMap[a]={id:a,objectType:"dataSeries",dataSeriesIndex:i},t=e.dataPoints?e.dataPoints.length:0,this.dataPointEOs=[],e=0;e<t;e++)this.dataPointEOs[e]={};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=.7:this.fillOpacity=1),this.axisPlacement=this.getDefaultAxisPlacement(),void 0===this.options.indexLabelFontSize&&(this.indexLabelFontSize=this.chart.getAutoFontSize(this.indexLabelFontSize))}function z(t,e,i,a,s,n){if(z.base.constructor.call(this,"Axis",e,i,a,t),this.chart=t,this.canvas=t.canvas,this.ctx=t.ctx,this.intervalStartPosition=this.maxHeight=this.maxWidth=0,this.labels=[],this.dataSeries=[],this._stripLineLabels=this._ticks=this._labels=null,this.dataInfo={min:1/0,max:-1/0,viewPortMin:1/0,viewPortMax:-1/0,minDiff:1/0},this.isOptionsInArray=!0,"axisX"===s?("left"===n||"bottom"===n?(this.optionsName="axisX",x(this.chart.sessionVariables.axisX[a])&&(this.chart.sessionVariables.axisX[a]={}),this.sessionVariables=this.chart.sessionVariables.axisX[a]):(this.optionsName="axisX2",x(this.chart.sessionVariables.axisX2[a])&&(this.chart.sessionVariables.axisX2[a]={}),this.sessionVariables=this.chart.sessionVariables.axisX2[a]),this.options.interval||(this.intervalType=null)):"left"===n||"bottom"===n?(this.optionsName="axisY",x(this.chart.sessionVariables.axisY[a])&&(this.chart.sessionVariables.axisY[a]={}),this.sessionVariables=this.chart.sessionVariables.axisY[a]):(this.optionsName="axisY2",x(this.chart.sessionVariables.axisY2[a])&&(this.chart.sessionVariables.axisY2[a]={}),this.sessionVariables=this.chart.sessionVariables.axisY2[a]),void 0===this.options.titleFontSize&&(this.titleFontSize=this.chart.getAutoFontSize(this.titleFontSize)),void 0===this.options.labelFontSize&&(this.labelFontSize=this.chart.getAutoFontSize(this.labelFontSize)),this.type=s,"axisX"!==s||i&&void 0!==i.gridThickness||(this.gridThickness=0),this._position=n,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 X(this.chart,this.options.scaleBreaks,++this.chart._eventManager.lastObjectId,this)),this.stripLines=[],this.options.stripLines&&0<this.options.stripLines.length)for(t=0;t<this.options.stripLines.length;t++)this.stripLines.push(new E(this.chart,this.options.stripLines[t],t,++this.chart._eventManager.lastObjectId,this));this.options.crosshair&&(this.crosshair=new H(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 X(t,e,i,a){if(X.base.constructor.call(this,"ScaleBreaks","scaleBreaks",e,null,a),this.id=i,this.chart=t,this.ctx=this.chart.ctx,this.axis=a,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)),this.options.customBreaks&&0<this.options.customBreaks.length){for(t=0;t<this.options.customBreaks.length;t++)this.customBreaks.push(new Y(this.chart,"customBreaks",this.options.customBreaks[t],t,++this.chart._eventManager.lastObjectId,this)),"number"==typeof this.customBreaks[t].startValue&&"number"==typeof this.customBreaks[t].endValue&&this.customBreaks[t].endValue!==this.customBreaks[t].startValue&&this._appliedBreaks.push(this.customBreaks[t]);for(this._appliedBreaks.sort((function(t,e){return t.startValue-e.startValue})),t=0;t<this._appliedBreaks.length-1;t++)this._appliedBreaks[t].endValue>=this._appliedBreaks[t+1].startValue&&(this._appliedBreaks[t].endValue=Math.max(this._appliedBreaks[t].endValue,this._appliedBreaks[t+1].endValue),window.console&&window.console.log("CanvasJS Error: Breaks "+t+" and "+(t+1)+" are overlapping."),this._appliedBreaks.splice(t,2),t--)}}function Y(t,e,i,a,s,n){Y.base.constructor.call(this,"Break",e,i,a,n),this.id=s,this.chart=t,this.ctx=this.chart.ctx,this.scaleBreaks=n,this.optionsName=e,this.isOptionsInArray=!0,this.type=i.type?this.type:n.type,this.fillOpacity=x(i.fillOpacity)?n.fillOpacity:this.fillOpacity,this.lineThickness=x(i.lineThickness)?n.lineThickness:this.lineThickness,this.color=i.color?this.color:n.color,this.lineColor=i.lineColor?this.lineColor:n.lineColor,this.lineDashType=i.lineDashType?this.lineDashType:n.lineDashType,!x(this.startValue)&&this.startValue.getTime&&(this.startValue=this.startValue.getTime()),!x(this.endValue)&&this.endValue.getTime&&(this.endValue=this.endValue.getTime()),"number"==typeof this.startValue&&"number"==typeof this.endValue&&this.endValue<this.startValue&&(t=this.startValue,this.startValue=this.endValue,this.endValue=t),this.spacing=void 0===i.spacing?n.spacing:i.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=n.spacing),this.size=n.parent.logarithmic?1:0}function E(t,e,i,a,s){E.base.constructor.call(this,"StripLine","stripLines",e,i,s),this.id=a,this.chart=t,this.ctx=this.chart.ctx,this.label=this.label,this.axis=s,this.optionsName="stripLines",this.isOptionsInArray=!0,this._thicknessType="pixel",null!==this.startValue&&null!==this.endValue&&(this.value=s.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 H(t,e,i){H.base.constructor.call(this,"Crosshair","crosshair",e,null,i),this.chart=t,this.ctx=this.chart.ctx,this.axis=i,this.optionsName="crosshair",this._thicknessType="pixel"}function j(t,e){j.base.constructor.call(this,"ToolTip","toolTip",e,null,t),this.chart=t,this.canvas=t.canvas,this.ctx=this.chart.ctx,this.currentDataPointIndex=this.currentSeriesIndex=-1,this._prevY=this._prevX=NaN,this.containerTransitionDuration=.1,this.mozContainerTransition=this.getContainerTransition(this.containerTransitionDuration),this.optionsName="toolTip",this._initialize()}function U(t){this.chart=t,this.lastObjectId=0,this.objectMap=[],this.rectangularRegionEventSubscriptions=[],this.previousDataPointEventObject=null,this.ghostCanvas=w(this.chart.width,this.chart.height),this.ghostCtx=this.ghostCanvas.getContext("2d"),this.mouseoveredObjectMaps=[]}function q(t){this.chart=t,this.ctx=this.chart.plotArea.ctx,this.animations=[],this.animationRequestId=null}i(e,A),e.prototype.destroy=function(){var t=this.allDOMEventHandlers;this._animator&&this._animator.cancelAllAnimations(),this._panTimerId&&clearTimeout(this._panTimerId);for(var e=0;e<t.length;e++){var i=t[e][0],a=t[e][1],s=t[e][2],n=(n=t[e][3])||!1;i.removeEventListener?i.removeEventListener(a,s,n):i.detachEvent&&i.detachEvent("on"+a,s)}for(this.allDOMEventHandlers=[],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.overlaidCanvas=this.canvas=this.container=this._canvasJSContainer=null,this._toolBar=this._dropdownMenu=this._menuButton=this._resetButton=this._zoomButton=this._breaksCanvas=this._preRenderCanvas=this.toolTip.container=null},e.prototype._updateOptions=function(){var t=this;if(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=void 0!==K[this.colorSet]?K[this.colorSet]:K.colorSet1),this.updateOption("backgroundColor"),this.backgroundColor||(this.backgroundColor="rgba(0,0,0,0)"),this.updateOption("culture"),this._cultureInfo=new D(this.options.culture),this.updateOption("animationEnabled"),this.animationEnabled=this.animationEnabled&&N,this.updateOption("animationDuration"),this.updateOption("rangeChanging"),this.updateOption("rangeChanged"),this.updateOption("exportEnabled"),this.updateOption("exportFileName"),this.updateOption("zoomType"),this.options.zoomEnabled){if(!this._zoomButton){var e=!1;S(this._zoomButton=document.createElement("button")),P(this,this._zoomButton,"pan"),this._toolBar.appendChild(this._zoomButton),this._zoomButton.style.borderRight=this.toolbar.borderThickness+"px solid "+this.toolbar.borderColor,y(this._zoomButton,"touchstart",(function(t){e=!0}),this.allDOMEventHandlers),y(this._zoomButton,"click",(function(){t.zoomEnabled?(t.zoomEnabled=!1,t.panEnabled=!0,P(t,t._zoomButton,"zoom")):(t.zoomEnabled=!0,t.panEnabled=!1,P(t,t._zoomButton,"pan")),t.render()}),this.allDOMEventHandlers),y(this._zoomButton,"mouseover",(function(){e?e=!1:(T(0,t._zoomButton,{backgroundColor:t.toolbar.backgroundColorOnHover,color:t.toolbar.fontColorOnHover,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&T(0,t._zoomButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))}),this.allDOMEventHandlers),y(this._zoomButton,"mouseout",(function(){e||(T(0,t._zoomButton,{backgroundColor:t.toolbar.backgroundColor,color:t.toolbar.fontColor,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&T(0,t._zoomButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}))}),this.allDOMEventHandlers)}this._resetButton||(e=!1,S(this._resetButton=document.createElement("button")),P(this,this._resetButton,"reset"),this._resetButton.style.borderRight=(this.exportEnabled?this.toolbar.borderThickness:0)+"px solid "+this.toolbar.borderColor,this._toolBar.appendChild(this._resetButton),y(this._resetButton,"touchstart",(function(t){e=!0}),this.allDOMEventHandlers),y(this._resetButton,"click",(function(){if(t.toolTip.hide(),t.zoomEnabled||t.panEnabled?(t.zoomEnabled=!0,t.panEnabled=!1,P(t,t._zoomButton,"pan"),t._defaultCursor="default",t.overlaidCanvas.style.cursor=t._defaultCursor):(t.zoomEnabled=!1,t.panEnabled=!1),t.sessionVariables.axisX)for(var e=0;e<t.sessionVariables.axisX.length;e++)t.sessionVariables.axisX[e].newViewportMinimum=null,t.sessionVariables.axisX[e].newViewportMaximum=null;if(t.sessionVariables.axisX2)for(e=0;e<t.sessionVariables.axisX2.length;e++)t.sessionVariables.axisX2[e].newViewportMinimum=null,t.sessionVariables.axisX2[e].newViewportMaximum=null;if(t.sessionVariables.axisY)for(e=0;e<t.sessionVariables.axisY.length;e++)t.sessionVariables.axisY[e].newViewportMinimum=null,t.sessionVariables.axisY[e].newViewportMaximum=null;if(t.sessionVariables.axisY2)for(e=0;e<t.sessionVariables.axisY2.length;e++)t.sessionVariables.axisY2[e].newViewportMinimum=null,t.sessionVariables.axisY2[e].newViewportMaximum=null;t.resetOverlayedCanvas(),S(t._zoomButton,t._resetButton),t._dispatchRangeEvent("rangeChanging","reset"),t.render(),t._dispatchRangeEvent("rangeChanged","reset"),t.syncCharts&&t.syncCharts(null,null)}),this.allDOMEventHandlers),y(this._resetButton,"mouseover",(function(){e||(T(0,t._resetButton,{backgroundColor:t.toolbar.backgroundColorOnHover,color:t.toolbar.hoverFfontColorOnHoverontColor,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&T(0,t._resetButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))}),this.allDOMEventHandlers),y(this._resetButton,"mouseout",(function(){e||(T(0,t._resetButton,{backgroundColor:t.toolbar.backgroundColor,color:t.toolbar.fontColor,transition:"0.4s",WebkitTransition:"0.4s"}),0>=navigator.userAgent.search("MSIE")&&T(0,t._resetButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}))}),this.allDOMEventHandlers),this.overlaidCanvas.style.cursor=t._defaultCursor),this.zoomEnabled||this.panEnabled||(this._zoomButton?(t._zoomButton.getAttribute("state")===t._cultureInfo.zoomText?(this.panEnabled=!0,this.zoomEnabled=!1):(this.zoomEnabled=!0,this.panEnabled=!1),C(t._zoomButton,t._resetButton)):(this.zoomEnabled=!0,this.panEnabled=!1))}else this.panEnabled=this.zoomEnabled=!1;if(this._menuButton?this.exportEnabled?C(this._menuButton):S(this._menuButton):this.exportEnabled&&N&&(e=!1,this._menuButton=document.createElement("button"),P(this,this._menuButton,"menu"),this._toolBar.appendChild(this._menuButton),y(this._menuButton,"touchstart",(function(t){e=!0}),this.allDOMEventHandlers),y(this._menuButton,"click",(function(){"none"!==t._dropdownMenu.style.display||t._dropDownCloseTime&&500>=(new Date).getTime()-t._dropDownCloseTime.getTime()||(t._dropdownMenu.style.display="block",t._menuButton.blur(),t._dropdownMenu.focus())}),this.allDOMEventHandlers,!0),y(this._menuButton,"mouseover",(function(){e||(T(0,t._menuButton,{backgroundColor:t.toolbar.backgroundColorOnHover,color:t.toolbar.fontColorOnHover}),0>=navigator.userAgent.search("MSIE")&&T(0,t._menuButton.childNodes[0],{WebkitFilter:"invert(100%)",filter:"invert(100%)"}))}),this.allDOMEventHandlers,!0),y(this._menuButton,"mouseout",(function(){e||(T(0,t._menuButton,{backgroundColor:t.toolbar.backgroundColor,color:t.toolbar.fontColor}),0>=navigator.userAgent.search("MSIE")&&T(0,t._menuButton.childNodes[0],{WebkitFilter:"invert(0%)",filter:"invert(0%)"}))}),this.allDOMEventHandlers,!0)),!this._dropdownMenu&&this.exportEnabled&&N){e=!1,this._dropdownMenu=document.createElement("div"),this._dropdownMenu.setAttribute("tabindex",-1);var i=-1!==this.theme.indexOf("dark")?"black":"#888888";this._dropdownMenu.style.cssText="position: absolute; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none; cursor: pointer;right: 0px;top: 25px;min-width: 120px;outline: 0;font-size: 14px; font-family: Arial, Helvetica, sans-serif;padding: 5px 0px 5px 0px;text-align: left;line-height: 10px;background-color:"+this.toolbar.backgroundColor+";box-shadow: 2px 2px 10px "+i,t._dropdownMenu.style.display="none",this._toolBar.appendChild(this._dropdownMenu),y(this._dropdownMenu,"blur",(function(){S(t._dropdownMenu),t._dropDownCloseTime=new Date}),this.allDOMEventHandlers,!0),(i=document.createElement("div")).style.cssText="padding: 12px 8px 12px 8px",i.innerHTML=this._cultureInfo.printText,i.style.backgroundColor=this.toolbar.backgroundColor,i.style.color=this.toolbar.fontColor,this._dropdownMenu.appendChild(i),y(i,"touchstart",(function(t){e=!0}),this.allDOMEventHandlers),y(i,"mouseover",(function(){e||(this.style.backgroundColor=t.toolbar.backgroundColorOnHover,this.style.color=t.toolbar.fontColorOnHover)}),this.allDOMEventHandlers,!0),y(i,"mouseout",(function(){e||(this.style.backgroundColor=t.toolbar.backgroundColor,this.style.color=t.toolbar.fontColor)}),this.allDOMEventHandlers,!0),y(i,"click",(function(){t.print(),S(t._dropdownMenu)}),this.allDOMEventHandlers,!0),(i=document.createElement("div")).style.cssText="padding: 12px 8px 12px 8px",i.innerHTML=this._cultureInfo.saveJPGText,i.style.backgroundColor=this.toolbar.backgroundColor,i.style.color=this.toolbar.fontColor,this._dropdownMenu.appendChild(i),y(i,"touchstart",(function(t){e=!0}),this.allDOMEventHandlers),y(i,"mouseover",(function(){e||(this.style.backgroundColor=t.toolbar.backgroundColorOnHover,this.style.color=t.toolbar.fontColorOnHover)}),this.allDOMEventHandlers,!0),y(i,"mouseout",(function(){e||(this.style.backgroundColor=t.toolbar.backgroundColor,this.style.color=t.toolbar.fontColor)}),this.allDOMEventHandlers,!0),y(i,"click",(function(){d(t.canvas,"jpeg",t.exportFileName),S(t._dropdownMenu)}),this.allDOMEventHandlers,!0),(i=document.createElement("div")).style.cssText="padding: 12px 8px 12px 8px",i.innerHTML=this._cultureInfo.savePNGText,i.style.backgroundColor=this.toolbar.backgroundColor,i.style.color=this.toolbar.fontColor,this._dropdownMenu.appendChild(i),y(i,"touchstart",(function(t){e=!0}),this.allDOMEventHandlers),y(i,"mouseover",(function(){e||(this.style.backgroundColor=t.toolbar.backgroundColorOnHover,this.style.color=t.toolbar.fontColorOnHover)}),this.allDOMEventHandlers,!0),y(i,"mouseout",(function(){e||(this.style.backgroundColor=t.toolbar.backgroundColor,this.style.color=t.toolbar.fontColor)}),this.allDOMEventHandlers,!0),y(i,"click",(function(){d(t.canvas,"png",t.exportFileName),S(t._dropdownMenu)}),this.allDOMEventHandlers,!0)}for(var a in"none"!==this._toolBar.style.display&&this._zoomButton&&(this.panEnabled?P(t,t._zoomButton,"zoom"):P(t,t._zoomButton,"pan"),t._resetButton.getAttribute("state")!==t._cultureInfo.resetText&&P(t,t._resetButton,"reset")),this.options.toolTip&&this.toolTip.options!==this.options.toolTip&&(this.toolTip.options=this.options.toolTip),this.toolTip.options)this.toolTip.options.hasOwnProperty(a)&&this.toolTip.updateOption(a)},e.prototype._updateSize=function(){var t;t=[this.canvas,this.overlaidCanvas,this._eventManager.ghostCanvas];var e=0,i=0;if(this.options.width?e=this.width:this.width=e=0<this.container.clientWidth?this.container.clientWidth:this.width,this.options.height?i=this.height:this.height=i=0<this.container.clientHeight?this.container.clientHeight:this.height,this.canvas.width!==e*ct||this.canvas.height!==i*ct){for(var a=0;a<t.length;a++)k(t[a],e,i);t=!0}else t=!1;return t},e.prototype._initialize=function(){this.isNavigator=!x(this.parent)&&!x(this.parent._defaultsKey)&&"Navigator"===this.parent._defaultsKey,this.toolbar=new F(this,this.options.toolbar),this._animator?this._animator.cancelAllAnimations():this._animator=new q(this),this.removeAllEventListeners(),this.disableToolTip=!1,this._axes=[],this.funnelPyramidClickHandler=this.pieDoughnutClickHandler=null,this._updateOptions(),this.animatedRender=N&&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 _(0,0,this.width,this.height,this.isNavigator?0:2),this.plotArea.layoutManager&&this.plotArea.layoutManager.reset(),this.data=[];var i=0,a=null;if(this.options.data){for(var s=0;s<this.options.data.length;s++)if(i++,!this.options.data[s].type||0<=e._supportedChartTypes.indexOf(this.options.data[s].type)){var n=new W(this,this.options.data[s],i-1,++this._eventManager.lastObjectId);"error"===n.type&&(n.linkedDataSeriesIndex=x(this.options.data[s].linkedDataSeriesIndex)?s-1:this.options.data[s].linkedDataSeriesIndex,0>n.linkedDataSeriesIndex||n.linkedDataSeriesIndex>=this.options.data.length||"number"!=typeof n.linkedDataSeriesIndex||"error"===this.options.data[n.linkedDataSeriesIndex].type)&&(n.linkedDataSeriesIndex=null),null===n.name&&(n.name="DataSeries "+i),null===n.color?1<this.options.data.length?(n._colorSet=[this._selectedColorSet[n.index%this._selectedColorSet.length]],n.color=this._selectedColorSet[n.index%this._selectedColorSet.length]):n._colorSet="line"===n.type||"stepLine"===n.type||"spline"===n.type||"area"===n.type||"stepArea"===n.type||"splineArea"===n.type||"stackedArea"===n.type||"stackedArea100"===n.type||"rangeArea"===n.type||"rangeSplineArea"===n.type||"candlestick"===n.type||"ohlc"===n.type||"waterfall"===n.type||"boxAndWhisker"===n.type?[this._selectedColorSet[0]]:this._selectedColorSet:n._colorSet=[n.color],null===n.markerSize&&(("line"===n.type||"stepLine"===n.type||"spline"===n.type||0<=n.type.toLowerCase().indexOf("area"))&&n.dataPoints&&n.dataPoints.length<this.width/16||"scatter"===n.type)&&(n.markerSize=8),"bubble"!==n.type&&"scatter"!==n.type||!n.dataPoints||(n.dataPoints.some?n.dataPoints.some((function(t){return t.x}))&&n.dataPoints.sort(t):n.dataPoints.sort(t)),this.data.push(n);var o,l=n.axisPlacement;a=a||l;if("normal"===l?"xySwapped"===this.plotInfo.axisPlacement?o='You cannot combine "'+n.type+'" with bar chart':"none"===this.plotInfo.axisPlacement?o='You cannot combine "'+n.type+'" with pie chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="normal"):"xySwapped"===l?"normal"===this.plotInfo.axisPlacement?o='You cannot combine "'+n.type+'" with line, area, column or pie chart':"none"===this.plotInfo.axisPlacement?o='You cannot combine "'+n.type+'" with pie chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="xySwapped"):"none"===l?"normal"===this.plotInfo.axisPlacement?o='You cannot combine "'+n.type+'" with line, area, column or bar chart':"xySwapped"===this.plotInfo.axisPlacement?o='You cannot combine "'+n.type+'" with bar chart':null===this.plotInfo.axisPlacement&&(this.plotInfo.axisPlacement="none"):null===l&&"none"===this.plotInfo.axisPlacement&&(o='You cannot combine "'+n.type+'" with pie chart'),o&&window.console)return void window.console.log(o)}for(s=0;s<this.data.length;s++){if("none"==a&&"error"===this.data[s].type&&window.console)return void window.console.log('You cannot combine "'+n.type+'" with error chart');"error"===this.data[s].type&&(this.data[s].axisPlacement=this.plotInfo.axisPlacement=a||"normal",this.data[s]._linkedSeries=null===this.data[s].linkedDataSeriesIndex?null:this.data[this.data[s].linkedDataSeriesIndex])}}this._objectsInitialized=!0,this._plotAreaElements=[]},e._supportedChartTypes=u("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(" ")),e.prototype.setLayout=function(){for(var t=this._plotAreaElements,e=0;e<this.data.length;e++)if("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement){if(!this.data[e].axisYType||"primary"===this.data[e].axisYType)if(this.options.axisY&&0<this.options.axisY.length){if(!this.axisY.length)for(var i=0;i<this.options.axisY.length;i++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY[i]=new z(this,"axisY",this.options.axisY[i],i,"axisY","left")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY[i]=new z(this,"axisY",this.options.axisY[i],i,"axisY","bottom"));this.data[e].axisY=this.axisY[0<=this.data[e].axisYIndex&&this.data[e].axisYIndex<this.axisY.length?this.data[e].axisYIndex:0],this.axisY[0<=this.data[e].axisYIndex&&this.data[e].axisYIndex<this.axisY.length?this.data[e].axisYIndex:0].dataSeries.push(this.data[e])}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[e].axisY=this.axisY[0],this.axisY[0].dataSeries.push(this.data[e]);if("secondary"===this.data[e].axisYType)if(this.options.axisY2&&0<this.options.axisY2.length){if(!this.axisY2.length)for(i=0;i<this.options.axisY2.length;i++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisY2[i]=new z(this,"axisY2",this.options.axisY2[i],i,"axisY","right")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisY2[i]=new z(this,"axisY2",this.options.axisY2[i],i,"axisY","top"));this.data[e].axisY=this.axisY2[0<=this.data[e].axisYIndex&&this.data[e].axisYIndex<this.axisY2.length?this.data[e].axisYIndex:0],this.axisY2[0<=this.data[e].axisYIndex&&this.data[e].axisYIndex<this.axisY2.length?this.data[e].axisYIndex:0].dataSeries.push(this.data[e])}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[e].axisY=this.axisY2[0],this.axisY2[0].dataSeries.push(this.data[e]);if(!this.data[e].axisXType||"primary"===this.data[e].axisXType)if(this.options.axisX&&0<this.options.axisX.length){if(!this.axisX.length)for(i=0;i<this.options.axisX.length;i++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisX[i]=new z(this,"axisX",this.options.axisX[i],i,"axisX","bottom")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX[i]=new z(this,"axisX",this.options.axisX[i],i,"axisX","left"));this.data[e].axisX=this.axisX[0<=this.data[e].axisXIndex&&this.data[e].axisXIndex<this.axisX.length?this.data[e].axisXIndex:0],this.axisX[0<=this.data[e].axisXIndex&&this.data[e].axisXIndex<this.axisX.length?this.data[e].axisXIndex:0].dataSeries.push(this.data[e])}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[e].axisX=this.axisX[0],this.axisX[0].dataSeries.push(this.data[e]);if("secondary"===this.data[e].axisXType)if(this.options.axisX2&&0<this.options.axisX2.length){if(!this.axisX2.length)for(i=0;i<this.options.axisX2.length;i++)"normal"===this.plotInfo.axisPlacement?this._axes.push(this.axisX2[i]=new z(this,"axisX2",this.options.axisX2[i],i,"axisX","top")):"xySwapped"===this.plotInfo.axisPlacement&&this._axes.push(this.axisX2[i]=new z(this,"axisX2",this.options.axisX2[i],i,"axisX","right"));this.data[e].axisX=this.axisX2[0<=this.data[e].axisXIndex&&this.data[e].axisXIndex<this.axisX2.length?this.data[e].axisXIndex:0],this.axisX2[0<=this.data[e].axisXIndex&&this.data[e].axisXIndex<this.axisX2.length?this.data[e].axisXIndex:0].dataSeries.push(this.data[e])}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[e].axisX=this.axisX2[0],this.axisX2[0].dataSeries.push(this.data[e])}if(this.axisY){for(i=1;i<this.axisY.length;i++)void 0===this.axisY[i].options.gridThickness&&(this.axisY[i].gridThickness=0);for(i=0;i<this.axisY.length-1;i++)void 0===this.axisY[i].options.margin&&(this.axisY[i].margin=10)}if(this.axisY2){for(i=1;i<this.axisY2.length;i++)void 0===this.axisY2[i].options.gridThickness&&(this.axisY2[i].gridThickness=0);for(i=0;i<this.axisY2.length-1;i++)void 0===this.axisY2[i].options.margin&&(this.axisY2[i].margin=10)}if(this.axisY&&0<this.axisY.length&&this.axisY2&&0<this.axisY2.length&&(0<this.axisY[0].gridThickness&&void 0===this.axisY2[0].options.gridThickness?this.axisY2[0].gridThickness=0:0<this.axisY2[0].gridThickness&&void 0===this.axisY[0].options.gridThickness&&(this.axisY[0].gridThickness=0)),this.axisX)for(i=0;i<this.axisX.length;i++)void 0===this.axisX[i].options.gridThickness&&(this.axisX[i].gridThickness=0);if(this.axisX2)for(i=0;i<this.axisX2.length;i++)void 0===this.axisX2[i].options.gridThickness&&(this.axisX2[i].gridThickness=0);if(this.axisX&&0<this.axisX.length&&this.axisX2&&0<this.axisX2.length&&(0<this.axisX[0].gridThickness&&void 0===this.axisX2[0].options.gridThickness?this.axisX2[0].gridThickness=0:0<this.axisX2[0].gridThickness&&void 0===this.axisX[0].options.gridThickness&&(this.axisX[0].gridThickness=0)),i=!1,0<this._axes.length&&(this.zoomEnabled||this.panEnabled))for(e=0;e<this._axes.length;e++)if(null!==this._axes[e].viewportMinimum||null!==this._axes[e].viewportMaximum){i=!0;break}if(i?(C(this._zoomButton,this._resetButton),this._toolBar.style.border=this.toolbar.borderThickness+"px solid "+this.toolbar.borderColor,this._zoomButton.style.borderRight=this.toolbar.borderThickness+"px solid "+this.toolbar.borderColor,this._resetButton.style.borderRight=(this.exportEnabled?this.toolbar.borderThickness:0)+"px solid "+this.toolbar.borderColor):(S(this._zoomButton,this._resetButton),this._toolBar.style.border=this.toolbar.borderThickness+"px solid transparent",this.options.zoomEnabled&&(this.zoomEnabled=!0,this.panEnabled=!1)),m(this),this._processData(),this.options.title&&(this.title=new L(this,this.options.title),this.title.dockInsidePlotArea?t.push(this.title):this.title.setLayout()),this.subtitles=[],this.options.subtitles)for(e=0;e<this.options.subtitles.length;e++)i=new I(this,this.options.subtitles[e],e),this.subtitles.push(i),i.dockInsidePlotArea?t.push(i):i.setLayout();for(this.legend=new p(this,this.options.legend),e=0;e<this.data.length;e++)(this.data[e].showInLegend||"pie"===this.data[e].type||"doughnut"===this.data[e].type||"funnel"===this.data[e].type||"pyramid"===this.data[e].type)&&this.legend.dataSeries.push(this.data[e]);for(this.legend.dockInsidePlotArea?t.push(this.legend):this.legend.setLayout(),e=0;e<this._axes.length;e++)if(this._axes[e].scaleBreaks&&this._axes[e].scaleBreaks._appliedBreaks.length){N?(this._breaksCanvas=w(this.width,this.height),this._breaksCanvasCtx=this._breaksCanvas.getContext("2d")):(this._breaksCanvas=this.canvas,this._breaksCanvasCtx=this.ctx);break}this._preRenderCanvas=w(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())},e.prototype.renderElements=function(){var t=this._plotAreaElements;this.title&&!this.title.dockInsidePlotArea&&this.title.render();for(var e=0;e<this.subtitles.length;e++)this.subtitles[e].dockInsidePlotArea||this.subtitles[e].render();if(this.legend.dockInsidePlotArea||this.legend.render(),"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)return;this.preparePlotArea()}for(e=0;e<t.length;e++)t[e].setLayout(),t[e].render();var i=[];if(this.animatedRender){var a=w(this.width,this.height);a.getContext("2d").drawImage(this.canvas,0,0,this.width,this.height)}M(this);var s;t=this.ctx.miterLimit;for(this.ctx.miterLimit=3,N&&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)),e=0;e<this.plotInfo.plotTypes.length;e++)for(var n=this.plotInfo.plotTypes[e],o=0;o<n.plotUnits.length;o++){var l=n.plotUnits[o],r=null;l.targetCanvas=null,this.animatedRender&&(l.targetCanvas=w(this.width,this.height),l.targetCanvasCtx=l.targetCanvas.getContext("2d"),s=l.targetCanvasCtx.miterLimit,l.targetCanvasCtx.miterLimit=3),"line"===l.type?r=this.renderLine(l):"stepLine"===l.type?r=this.renderStepLine(l):"spline"===l.type?r=this.renderSpline(l):"column"===l.type?r=this.renderColumn(l):"bar"===l.type?r=this.renderBar(l):"area"===l.type?r=this.renderArea(l):"stepArea"===l.type?r=this.renderStepArea(l):"splineArea"===l.type?r=this.renderSplineArea(l):"stackedColumn"===l.type?r=this.renderStackedColumn(l):"stackedColumn100"===l.type?r=this.renderStackedColumn100(l):"stackedBar"===l.type?r=this.renderStackedBar(l):"stackedBar100"===l.type?r=this.renderStackedBar100(l):"stackedArea"===l.type?r=this.renderStackedArea(l):"stackedArea100"===l.type?r=this.renderStackedArea100(l):"bubble"===l.type?r=r=this.renderBubble(l):"scatter"===l.type?r=this.renderScatter(l):"pie"===l.type||"doughnut"===l.type?this.renderPie(l):"funnel"===l.type||"pyramid"===l.type?r=this.renderFunnel(l):"candlestick"===l.type||"ohlc"===l.type?r=this.renderCandlestick(l):"rangeColumn"===l.type?r=this.renderRangeColumn(l):"error"===l.type?r=this.renderError(l):"rangeBar"===l.type?r=this.renderRangeBar(l):"rangeArea"===l.type?r=this.renderRangeArea(l):"rangeSplineArea"===l.type?r=this.renderRangeSplineArea(l):"waterfall"===l.type?r=this.renderWaterfall(l):"boxAndWhisker"===l.type&&(r=this.renderBoxAndWhisker(l));for(var h=0;h<l.dataSeriesIndexes.length;h++)this._dataInRenderedOrder.push(this.data[l.dataSeriesIndexes[h]]);this.animatedRender&&(l.targetCanvasCtx.miterLimit=s,r&&i.push(r))}this.ctx.miterLimit=t,this.animatedRender&&this._breaksCanvasCtx&&i.push({source:this._breaksCanvasCtx,dest:this.plotArea.ctx,animationCallback:Q.fadeInAnimation,easingFunction:Q.easing.easeInQuad,animationBase:0,startTimePercent:.7}),this.animatedRender&&0<this._indexLabels.length&&(s=w(this.width,this.height).getContext("2d"),i.push(this.renderIndexLabels(s)));var d=this;if(0<i.length)d.disableToolTip=!0,d._animator.animate(200,d.animationDuration,(function(t){d.ctx.clearRect(0,0,d.width,d.height),d.ctx.drawImage(a,0,0,Math.floor(d.width*ct),Math.floor(d.height*ct),0,0,d.width,d.height);for(var e=0;e<i.length;e++)r=i[e],1>t&&void 0!==r.startTimePercent?t>=r.startTimePercent&&r.animationCallback(r.easingFunction(t-r.startTimePercent,0,1,1-r.startTimePercent),r):r.animationCallback(r.easingFunction(t,0,1,1),r);d.dispatchEvent("dataAnimationIterationEnd",{chart:d})}),(function(){i=[];for(var t=0;t<d.plotInfo.plotTypes.length;t++)for(var e=d.plotInfo.plotTypes[t],s=0;s<e.plotUnits.length;s++)e.plotUnits[s].targetCanvas=null;a=null,d.disableToolTip=!1}));else{if(d._breaksCanvas)if(N)d.plotArea.ctx.drawImage(d._breaksCanvas,0,0,this.width,this.height);else for(h=0;h<d._axes.length;h++)d._axes[h].createMask();0<d._indexLabels.length&&d.renderIndexLabels(),d.dispatchEvent("dataAnimationIterationEnd",{chart:d})}for(this.attachPlotAreaEventHandlers(),this.zoomEnabled||this.panEnabled||!this._zoomButton||"none"===this._zoomButton.style.display||S(this._zoomButton,this._resetButton),this.toolTip._updateToolTip(),this.renderCount++,O&&(d=this,setTimeout((function(){var t=document.getElementById("ghostCanvasCopy");t&&(k(t,d.width,d.height),t.getContext("2d").drawImage(d._eventManager.ghostCanvas,0,0))}),2e3)),this._breaksCanvas&&(delete this._breaksCanvas,delete this._breaksCanvasCtx),h=0;h<this._axes.length;h++)this._axes[h].maskCanvas&&(delete this._axes[h].maskCanvas,delete this._axes[h].maskCtx)},e.prototype.render=function(t){t&&(this.options=t),this._initialize(),this.setLayout(),this.renderElements(),this._preRenderCanvas=null},e.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})},e.prototype.categoriseDataSeries=function(){for(var t="",i=0;i<this.data.length;i++)if((t=this.data[i]).dataPoints&&0!==t.dataPoints.length&&t.visible&&0<=e._supportedChartTypes.indexOf(t.type)){for(var a=null,s=!1,n=null,o=!1,l=0;l<this.plotInfo.plotTypes.length;l++)if(this.plotInfo.plotTypes[l].type===t.type){s=!0,a=this.plotInfo.plotTypes[l];break}for(s||(a={type:t.type,totalDataSeries:0,plotUnits:[]},this.plotInfo.plotTypes.push(a)),l=0;l<a.plotUnits.length;l++)if(a.plotUnits[l].axisYType===t.axisYType&&a.plotUnits[l].axisXType===t.axisXType&&a.plotUnits[l].axisYIndex===t.axisYIndex&&a.plotUnits[l].axisXIndex===t.axisXIndex){o=!0,n=a.plotUnits[l];break}o||(n={type:t.type,previousDataSeriesCount:0,index:a.plotUnits.length,plotType:a,axisXType:t.axisXType,axisYType:t.axisYType,axisYIndex:t.axisYIndex,axisXIndex:t.axisXIndex,axisY:"primary"===t.axisYType?this.axisY[0<=t.axisYIndex&&t.axisYIndex<this.axisY.length?t.axisYIndex:0]:this.axisY2[0<=t.axisYIndex&&t.axisYIndex<this.axisY2.length?t.axisYIndex:0],axisX:"primary"===t.axisXType?this.axisX[0<=t.axisXIndex&&t.axisXIndex<this.axisX.length?t.axisXIndex:0]:this.axisX2[0<=t.axisXIndex&&t.axisXIndex<this.axisX2.length?t.axisXIndex:0],dataSeriesIndexes:[],yTotals:[]},a.plotUnits.push(n)),a.totalDataSeries++,n.dataSeriesIndexes.push(i),t.plotUnit=n}for(i=0;i<this.plotInfo.plotTypes.length;i++)for(a=this.plotInfo.plotTypes[i],l=t=0;l<a.plotUnits.length;l++)a.plotUnits[l].previousDataSeriesCount=t,t+=a.plotUnits[l].dataSeriesIndexes.length},e.prototype.assignIdToDataPoints=function(){for(var t=0;t<this.data.length;t++){var e=this.data[t];if(e.dataPoints)for(var i=e.dataPoints.length,a=0;a<i;a++)e.dataPointIds[a]=++this._eventManager.lastObjectId}},e.prototype._processData=function(){this.assignIdToDataPoints(),this.categoriseDataSeries();for(var t=0;t<this.plotInfo.plotTypes.length;t++)for(var e=this.plotInfo.plotTypes[t],i=0;i<e.plotUnits.length;i++){var a=e.plotUnits[i];"line"===a.type||"stepLine"===a.type||"spline"===a.type||"column"===a.type||"area"===a.type||"stepArea"===a.type||"splineArea"===a.type||"bar"===a.type||"bubble"===a.type||"scatter"===a.type?this._processMultiseriesPlotUnit(a):"stackedColumn"===a.type||"stackedBar"===a.type||"stackedArea"===a.type?this._processStackedPlotUnit(a):"stackedColumn100"===a.type||"stackedBar100"===a.type||"stackedArea100"===a.type?this._processStacked100PlotUnit(a):"candlestick"===a.type||"ohlc"===a.type||"rangeColumn"===a.type||"rangeBar"===a.type||"rangeArea"===a.type||"rangeSplineArea"===a.type||"error"===a.type||"boxAndWhisker"===a.type?this._processMultiYPlotUnit(a):"waterfall"===a.type&&this._processSpecificPlotUnit(a)}this.calculateAutoBreaks()},e.prototype._processMultiseriesPlotUnit=function(t){if(t.dataSeriesIndexes&&!(1>t.dataSeriesIndexes.length))for(var e,i,a=t.axisY.dataInfo,s=t.axisX.dataInfo,n=!1,o=0;o<t.dataSeriesIndexes.length;o++){var l,r=this.data[t.dataSeriesIndexes[o]],h=0,d=!1,c=!1;if("normal"===r.axisPlacement||"xySwapped"===r.axisPlacement)var p=t.axisX.sessionVariables.newViewportMinimum?t.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:t.axisX.logarithmic?0:-1/0,x=t.axisX.sessionVariables.newViewportMaximum?t.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:1/0;for((r.dataPoints[h].x&&r.dataPoints[h].x.getTime||"dateTime"===r.xValueType)&&(n=!0),h=0;h<r.dataPoints.length;h++){if(void 0===r.dataPoints[h].x&&(r.dataPoints[h].x=h+(t.axisX.logarithmic?1:0)),r.dataPoints[h].x.getTime?(n=!0,e=r.dataPoints[h].x.getTime()):e=r.dataPoints[h].x,i=r.dataPoints[h].y,e<s.min&&(s.min=e),e>s.max&&(s.max=e),i<a.min&&"number"==typeof i&&(a.min=i),i>a.max&&"number"==typeof i&&(a.max=i),0<h){if(t.axisX.logarithmic){var u=e/r.dataPoints[h-1].x;1>u&&(u=1/u),s.minDiff>u&&1!==u&&(s.minDiff=u)}else 0>(u=e-r.dataPoints[h-1].x)&&(u*=-1),s.minDiff>u&&0!==u&&(s.minDiff=u);null!==i&&null!==r.dataPoints[h-1].y&&(t.axisY.logarithmic?(1>(u=i/r.dataPoints[h-1].y)&&(u=1/u),a.minDiff>u&&1!==u&&(a.minDiff=u)):(0>(u=i-r.dataPoints[h-1].y)&&(u*=-1),a.minDiff>u&&0!==u&&(a.minDiff=u)))}if(e<p&&!d)null!==i&&(l=e);else{if(!d&&(d=!0,0<h)){h-=2;continue}if(e>x&&!c)c=!0;else if(e>x&&c)continue;r.dataPoints[h].label&&(t.axisX.labels[e]=r.dataPoints[h].label),e<s.viewPortMin&&(s.viewPortMin=e),e>s.viewPortMax&&(s.viewPortMax=e),null===i?s.viewPortMin===e&&l<e&&(s.viewPortMin=l):(i<a.viewPortMin&&"number"==typeof i&&(a.viewPortMin=i),i>a.viewPortMax&&"number"==typeof i&&(a.viewPortMax=i))}}r.axisX.valueType=r.xValueType=n?"dateTime":"number"}},e.prototype._processStackedPlotUnit=function(t){if(t.dataSeriesIndexes&&!(1>t.dataSeriesIndexes.length)){for(var e,i,a=t.axisY.dataInfo,s=t.axisX.dataInfo,n=!1,o=[],l=[],r=1/0,h=-1/0,d=0;d<t.dataSeriesIndexes.length;d++){var c,p=this.data[t.dataSeriesIndexes[d]],u=0,m=!1,g=!1;if("normal"===p.axisPlacement||"xySwapped"===p.axisPlacement)var b=t.axisX.sessionVariables.newViewportMinimum?t.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:-1/0,y=t.axisX.sessionVariables.newViewportMaximum?t.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:1/0;for((p.dataPoints[u].x&&p.dataPoints[u].x.getTime||"dateTime"===p.xValueType)&&(n=!0),u=0;u<p.dataPoints.length;u++){if(void 0===p.dataPoints[u].x&&(p.dataPoints[u].x=u+(t.axisX.logarithmic?1:0)),p.dataPoints[u].x.getTime?(n=!0,e=p.dataPoints[u].x.getTime()):e=p.dataPoints[u].x,i=x(p.dataPoints[u].y)?0:p.dataPoints[u].y,e<s.min&&(s.min=e),e>s.max&&(s.max=e),0<u){if(t.axisX.logarithmic){var v=e/p.dataPoints[u-1].x;1>v&&(v=1/v),s.minDiff>v&&1!==v&&(s.minDiff=v)}else 0>(v=e-p.dataPoints[u-1].x)&&(v*=-1),s.minDiff>v&&0!==v&&(s.minDiff=v);null!==i&&null!==p.dataPoints[u-1].y&&(t.axisY.logarithmic?0<i&&(1>(v=i/p.dataPoints[u-1].y)&&(v=1/v),a.minDiff>v&&1!==v&&(a.minDiff=v)):(0>(v=i-p.dataPoints[u-1].y)&&(v*=-1),a.minDiff>v&&0!==v&&(a.minDiff=v)))}if(e<b&&!m)null!==p.dataPoints[u].y&&(c=e);else{if(!m&&(m=!0,0<u)){u-=2;continue}if(e>y&&!g)g=!0;else if(e>y&&g)continue;p.dataPoints[u].label&&(t.axisX.labels[e]=p.dataPoints[u].label),e<s.viewPortMin&&(s.viewPortMin=e),e>s.viewPortMax&&(s.viewPortMax=e),null===p.dataPoints[u].y?s.viewPortMin===e&&c<e&&(s.viewPortMin=c):(t.yTotals[e]=(t.yTotals[e]?t.yTotals[e]:0)+i,0<=i?o[e]?o[e]+=i:(o[e]=i,r=Math.min(i,r)):l[e]?l[e]+=i:(l[e]=i,h=Math.max(i,h)))}}t.axisY.scaleBreaks&&t.axisY.scaleBreaks.autoCalculate&&1<=t.axisY.scaleBreaks.maxNumberOfAutoBreaks&&(a.dataPointYPositiveSums?(a.dataPointYPositiveSums.push.apply(a.dataPointYPositiveSums,o),a.dataPointYNegativeSums.push.apply(a.dataPointYPositiveSums,l)):(a.dataPointYPositiveSums=o,a.dataPointYNegativeSums=l)),p.axisX.valueType=p.xValueType=n?"dateTime":"number"}for(u in o)o.hasOwnProperty(u)&&!isNaN(u)&&((t=o[u])<a.min&&(a.min=Math.min(t,r)),t>a.max&&(a.max=t),u<s.viewPortMin||u>s.viewPortMax||(t<a.viewPortMin&&(a.viewPortMin=Math.min(t,r)),t>a.viewPortMax&&(a.viewPortMax=t)));for(u in l)l.hasOwnProperty(u)&&!isNaN(u)&&((t=l[u])<a.min&&(a.min=t),t>a.max&&(a.max=Math.max(t,h)),u<s.viewPortMin||u>s.viewPortMax||(t<a.viewPortMin&&(a.viewPortMin=t),t>a.viewPortMax&&(a.viewPortMax=Math.max(t,h))))}},e.prototype._processStacked100PlotUnit=function(t){if(t.dataSeriesIndexes&&!(1>t.dataSeriesIndexes.length)){for(var e,i,a=t.axisY.dataInfo,s=t.axisX.dataInfo,n=!1,o=!1,l=!1,r=[],h=0;h<t.dataSeriesIndexes.length;h++){var d,c=this.data[t.dataSeriesIndexes[h]],p=0,u=!1,m=!1;if("normal"===c.axisPlacement||"xySwapped"===c.axisPlacement)var g=t.axisX.sessionVariables.newViewportMinimum?t.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:-1/0,b=t.axisX.sessionVariables.newViewportMaximum?t.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:1/0;for((c.dataPoints[p].x&&c.dataPoints[p].x.getTime||"dateTime"===c.xValueType)&&(n=!0),p=0;p<c.dataPoints.length;p++){if(void 0===c.dataPoints[p].x&&(c.dataPoints[p].x=p+(t.axisX.logarithmic?1:0)),c.dataPoints[p].x.getTime?(n=!0,e=c.dataPoints[p].x.getTime()):e=c.dataPoints[p].x,i=x(c.dataPoints[p].y)?null:c.dataPoints[p].y,e<s.min&&(s.min=e),e>s.max&&(s.max=e),0<p){if(t.axisX.logarithmic){var y=e/c.dataPoints[p-1].x;1>y&&(y=1/y),s.minDiff>y&&1!==y&&(s.minDiff=y)}else 0>(y=e-c.dataPoints[p-1].x)&&(y*=-1),s.minDiff>y&&0!==y&&(s.minDiff=y);x(i)||null===c.dataPoints[p-1].y||(t.axisY.logarithmic?0<i&&(1>(y=i/c.dataPoints[p-1].y)&&(y=1/y),a.minDiff>y&&1!==y&&(a.minDiff=y)):(0>(y=i-c.dataPoints[p-1].y)&&(y*=-1),a.minDiff>y&&0!==y&&(a.minDiff=y)))}if(e<g&&!u)null!==i&&(d=e);else{if(!u&&(u=!0,0<p)){p-=2;continue}if(e>b&&!m)m=!0;else if(e>b&&m)continue;c.dataPoints[p].label&&(t.axisX.labels[e]=c.dataPoints[p].label),e<s.viewPortMin&&(s.viewPortMin=e),e>s.viewPortMax&&(s.viewPortMax=e),null===i?s.viewPortMin===e&&d<e&&(s.viewPortMin=d):(t.yTotals[e]=(t.yTotals[e]?t.yTotals[e]:0)+i,0<=i?o=!0:0>i&&(l=!0),r[e]=r[e]?r[e]+Math.abs(i):Math.abs(i))}}c.axisX.valueType=c.xValueType=n?"dateTime":"number"}t.axisY.logarithmic?(a.max=x(a.viewPortMax)?99*Math.pow(t.axisY.logarithmBase,-.05):Math.max(a.viewPortMax,99*Math.pow(t.axisY.logarithmBase,-.05)),a.min=x(a.viewPortMin)?1:Math.min(a.viewPortMin,1)):o&&!l?(a.max=x(a.viewPortMax)?99:Math.max(a.viewPortMax,99),a.min=x(a.viewPortMin)?1:Math.min(a.viewPortMin,1)):o&&l?(a.max=x(a.viewPortMax)?99:Math.max(a.viewPortMax,99),a.min=x(a.viewPortMin)?-99:Math.min(a.viewPortMin,-99)):!o&&l&&(a.max=x(a.viewPortMax)?-1:Math.max(a.viewPortMax,-1),a.min=x(a.viewPortMin)?-99:Math.min(a.viewPortMin,-99)),a.viewPortMin=a.min,a.viewPortMax=a.max,t.dataPointYSums=r}},e.prototype._processMultiYPlotUnit=function(t){if(t.dataSeriesIndexes&&!(1>t.dataSeriesIndexes.length))for(var e,i,a,s,n=t.axisY.dataInfo,o=t.axisX.dataInfo,l=!1,r=0;r<t.dataSeriesIndexes.length;r++){var h,d,c,p=this.data[t.dataSeriesIndexes[r]],x=0,u=!1,m=!1;if("normal"===p.axisPlacement||"xySwapped"===p.axisPlacement)var g=t.axisX.sessionVariables.newViewportMinimum?t.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:t.axisX.logarithmic?0:-1/0,b=t.axisX.sessionVariables.newViewportMaximum?t.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:1/0;for((p.dataPoints[x].x&&p.dataPoints[x].x.getTime||"dateTime"===p.xValueType)&&(l=!0),x=0;x<p.dataPoints.length;x++){if(void 0===p.dataPoints[x].x&&(p.dataPoints[x].x=x+(t.axisX.logarithmic?1:0)),p.dataPoints[x].x.getTime?(l=!0,e=p.dataPoints[x].x.getTime()):e=p.dataPoints[x].x,(i=p.dataPoints[x].y)&&i.length){a=Math.min.apply(null,i),s=Math.max.apply(null,i),d=!0;for(var y=0;y<i.length;y++)null===i.k&&(d=!1);d&&(u||(c=h),h=e)}if(e<o.min&&(o.min=e),e>o.max&&(o.max=e),a<n.min&&(n.min=a),s>n.max&&(n.max=s),0<x&&(t.axisX.logarithmic?(1>(d=e/p.dataPoints[x-1].x)&&(d=1/d),o.minDiff>d&&1!==d&&(o.minDiff=d)):(0>(d=e-p.dataPoints[x-1].x)&&(d*=-1),o.minDiff>d&&0!==d&&(o.minDiff=d)),i&&null!==i[0]&&p.dataPoints[x-1].y&&null!==p.dataPoints[x-1].y[0]&&(t.axisY.logarithmic?(1>(d=i[0]/p.dataPoints[x-1].y[0])&&(d=1/d),n.minDiff>d&&1!==d&&(n.minDiff=d)):(0>(d=i[0]-p.dataPoints[x-1].y[0])&&(d*=-1),n.minDiff>d&&0!==d&&(n.minDiff=d)))),!(e<g)||u){if(!u&&(u=!0,0<x)){x-=2,h=c;continue}if(e>b&&!m)m=!0;else if(e>b&&m)continue;if(p.dataPoints[x].label&&(t.axisX.labels[e]=p.dataPoints[x].label),e<o.viewPortMin&&(o.viewPortMin=e),e>o.viewPortMax&&(o.viewPortMax=e),o.viewPortMin===e&&i)for(y=0;y<i.length;y++)if(null===i[y]&&h<e){o.viewPortMin=h;break}null===i?o.viewPortMin===e&&h<e&&(o.viewPortMin=h):(a<n.viewPortMin&&(n.viewPortMin=a),s>n.viewPortMax&&(n.viewPortMax=s))}}p.axisX.valueType=p.xValueType=l?"dateTime":"number"}},e.prototype._processSpecificPlotUnit=function(t){if("waterfall"===t.type&&t.dataSeriesIndexes&&!(1>t.dataSeriesIndexes.length))for(var e,i,a=t.axisY.dataInfo,s=t.axisX.dataInfo,n=!1,o=0;o<t.dataSeriesIndexes.length;o++){var l=this.data[t.dataSeriesIndexes[o]],r=0,h=!1,d=!1,c=e=0;if("normal"===l.axisPlacement||"xySwapped"===l.axisPlacement)var p=t.axisX.sessionVariables.newViewportMinimum?t.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:t.axisX.logarithmic?0:-1/0,x=t.axisX.sessionVariables.newViewportMaximum?t.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:1/0;for((l.dataPoints[r].x&&l.dataPoints[r].x.getTime||"dateTime"===l.xValueType)&&(n=!0),r=0;r<l.dataPoints.length;r++)void 0!==l.dataPoints[r].isCumulativeSum&&!0===l.dataPoints[r].isCumulativeSum?(l.dataPointEOs[r].cumulativeSumYStartValue=0,l.dataPointEOs[r].cumulativeSum=0===r?0:l.dataPointEOs[r-1].cumulativeSum,l.dataPoints[r].y=0===r?0:l.dataPointEOs[r-1].cumulativeSum):void 0!==l.dataPoints[r].isIntermediateSum&&!0===l.dataPoints[r].isIntermediateSum?(l.dataPointEOs[r].cumulativeSumYStartValue=c,l.dataPointEOs[r].cumulativeSum=0===r?0:l.dataPointEOs[r-1].cumulativeSum,l.dataPoints[r].y=0===r?0:e,c=0===r?0:l.dataPointEOs[r-1].cumulativeSum,e=0):(i="number"!=typeof l.dataPoints[r].y?0:l.dataPoints[r].y,l.dataPointEOs[r].cumulativeSumYStartValue=0===r?0:l.dataPointEOs[r-1].cumulativeSum,l.dataPointEOs[r].cumulativeSum=0===r?i:l.dataPointEOs[r-1].cumulativeSum+i,e+=i);for(r=0;r<l.dataPoints.length;r++)if(void 0===l.dataPoints[r].x&&(l.dataPoints[r].x=r+(t.axisX.logarithmic?1:0)),l.dataPoints[r].x.getTime?(n=!0,e=l.dataPoints[r].x.getTime()):e=l.dataPoints[r].x,i=l.dataPoints[r].y,e<s.min&&(s.min=e),e>s.max&&(s.max=e),l.dataPointEOs[r].cumulativeSum<a.min&&(a.min=l.dataPointEOs[r].cumulativeSum),l.dataPointEOs[r].cumulativeSum>a.max&&(a.max=l.dataPointEOs[r].cumulativeSum),0<r&&(t.axisX.logarithmic?(1>(c=e/l.dataPoints[r-1].x)&&(c=1/c),s.minDiff>c&&1!==c&&(s.minDiff=c)):(0>(c=e-l.dataPoints[r-1].x)&&(c*=-1),s.minDiff>c&&0!==c&&(s.minDiff=c)),null!==i&&null!==l.dataPoints[r-1].y&&(t.axisY.logarithmic?(1>(i=l.dataPointEOs[r].cumulativeSum/l.dataPointEOs[r-1].cumulativeSum)&&(i=1/i),a.minDiff>i&&1!==i&&(a.minDiff=i)):(0>(i=l.dataPointEOs[r].cumulativeSum-l.dataPointEOs[r-1].cumulativeSum)&&(i*=-1),a.minDiff>i&&0!==i&&(a.minDiff=i)))),!(e<p)||h){if(!h&&(h=!0,0<r)){r-=2;continue}if(e>x&&!d)d=!0;else if(e>x&&d)continue;l.dataPoints[r].label&&(t.axisX.labels[e]=l.dataPoints[r].label),e<s.viewPortMin&&(s.viewPortMin=e),e>s.viewPortMax&&(s.viewPortMax=e),0<r&&(l.dataPointEOs[r-1].cumulativeSum<a.viewPortMin&&(a.viewPortMin=l.dataPointEOs[r-1].cumulativeSum),l.dataPointEOs[r-1].cumulativeSum>a.viewPortMax&&(a.viewPortMax=l.dataPointEOs[r-1].cumulativeSum)),l.dataPointEOs[r].cumulativeSum<a.viewPortMin&&(a.viewPortMin=l.dataPointEOs[r].cumulativeSum),l.dataPointEOs[r].cumulativeSum>a.viewPortMax&&(a.viewPortMax=l.dataPointEOs[r].cumulativeSum)}l.axisX.valueType=l.xValueType=n?"dateTime":"number"}},e.prototype.calculateAutoBreaks=function(){function t(t,e,i,a){return a?(1>=(i=Math.pow(Math.min(i*t/e,e/t),.2))&&(i=Math.pow(1>t?1/t:Math.min(e/t,t),.25)),{startValue:t*i,endValue:e/i}):(0>=(i=.2*Math.min(i-e+t,e-t))&&(i=.25*Math.min(e-t,Math.abs(t))),{startValue:t+i,endValue:e-i})}function e(t){if(t.dataSeriesIndexes&&!(1>t.dataSeriesIndexes.length)){var e=t.axisX.scaleBreaks&&t.axisX.scaleBreaks.autoCalculate&&1<=t.axisX.scaleBreaks.maxNumberOfAutoBreaks,i=t.axisY.scaleBreaks&&t.axisY.scaleBreaks.autoCalculate&&1<=t.axisY.scaleBreaks.maxNumberOfAutoBreaks;if(e||i)for(var a,n,o=t.axisY.dataInfo,l=(c=t.axisX.dataInfo).min,r=c.max,h=o.min,d=o.max,c=c._dataRanges,p=(o=o._dataRanges,0),u=0;u<t.dataSeriesIndexes.length;u++){var m=s.data[t.dataSeriesIndexes[u]];if(!(4>m.dataPoints.length))for(p=0;p<m.dataPoints.length;p++)if(e&&(n=(r+1-l)*Math.max(parseFloat(t.axisX.scaleBreaks.collapsibleThreshold)||10,10)/100,(a=m.dataPoints[p].x.getTime?m.dataPoints[p].x.getTime():m.dataPoints[p].x)<c[n=Math.floor((a-l)/n)].min&&(c[n].min=a),a>c[n].max&&(c[n].max=a)),i){var g=(d+1-h)*Math.max(parseFloat(t.axisY.scaleBreaks.collapsibleThreshold)||10,10)/100;if((a="waterfall"===t.type?m.dataPointEOs[p].cumulativeSum:m.dataPoints[p].y)&&a.length)for(var b=0;b<a.length;b++)n=Math.floor((a[b]-h)/g),a[b]<o[n].min&&(o[n].min=a[b]),a[b]>o[n].max&&(o[n].max=a[b]);else x(a)||(a<o[n=Math.floor((a-h)/g)].min&&(o[n].min=a),a>o[n].max&&(o[n].max=a))}}}}function i(t){if(t.dataSeriesIndexes&&!(1>t.dataSeriesIndexes.length)&&t.axisX.scaleBreaks&&t.axisX.scaleBreaks.autoCalculate&&1<=t.axisX.scaleBreaks.maxNumberOfAutoBreaks)for(var e,i=t.axisX.dataInfo,a=i.min,n=i.max,o=i._dataRanges,l=0,r=0;r<t.dataSeriesIndexes.length;r++){var h=s.data[t.dataSeriesIndexes[r]];if(!(4>h.dataPoints.length))for(l=0;l<h.dataPoints.length;l++)e=(n+1-a)*Math.max(parseFloat(t.axisX.scaleBreaks.collapsibleThreshold)||10,10)/100,(i=h.dataPoints[l].x.getTime?h.dataPoints[l].x.getTime():h.dataPoints[l].x)<o[e=Math.floor((i-a)/e)].min&&(o[e].min=i),i>o[e].max&&(o[e].max=i)}}for(var a,s=this,n=!1,o=0;o<this._axes.length;o++)if(this._axes[o].scaleBreaks&&this._axes[o].scaleBreaks.autoCalculate&&1<=this._axes[o].scaleBreaks.maxNumberOfAutoBreaks){n=!0,this._axes[o].dataInfo._dataRanges=[];for(var l=0;l<100/Math.max(parseFloat(this._axes[o].scaleBreaks.collapsibleThreshold)||10,10);l++)this._axes[o].dataInfo._dataRanges.push({min:1/0,max:-1/0})}if(n){for(o=0;o<this.plotInfo.plotTypes.length;o++)for(n=this.plotInfo.plotTypes[o],l=0;l<n.plotUnits.length;l++)"line"===(a=n.plotUnits[l]).type||"stepLine"===a.type||"spline"===a.type||"column"===a.type||"area"===a.type||"stepArea"===a.type||"splineArea"===a.type||"bar"===a.type||"bubble"===a.type||"scatter"===a.type||"candlestick"===a.type||"ohlc"===a.type||"rangeColumn"===a.type||"rangeBar"===a.type||"rangeArea"===a.type||"rangeSplineArea"===a.type||"waterfall"===a.type||"error"===a.type||"boxAndWhisker"===a.type?e(a):0<=a.type.indexOf("stacked")&&i(a);for(o=0;o<this._axes.length;o++)if(this._axes[o].dataInfo._dataRanges){var r=this._axes[o].dataInfo.min;a=(this._axes[o].dataInfo.max+1-r)*Math.max(parseFloat(this._axes[o].scaleBreaks.collapsibleThreshold)||10,10)/100;var h,d,c=this._axes[o].dataInfo._dataRanges;n=[];if(this._axes[o].dataInfo.dataPointYPositiveSums){var p=this._axes[o].dataInfo.dataPointYPositiveSums;for(l in h=c,p)if(p.hasOwnProperty(l)&&!isNaN(l)&&!x(d=p[l])){var u=Math.floor((d-r)/a);d<h[u].min&&(h[u].min=d),d>h[u].max&&(h[u].max=d)}delete this._axes[o].dataInfo.dataPointYPositiveSums}if(this._axes[o].dataInfo.dataPointYNegativeSums){for(l in h=c,p=this._axes[o].dataInfo.dataPointYNegativeSums)p.hasOwnProperty(l)&&!isNaN(l)&&(x(d=-1*p[l])||(d<h[u=Math.floor((d-r)/a)].min&&(h[u].min=d),d>h[u].max&&(h[u].max=d)));delete this._axes[o].dataInfo.dataPointYNegativeSums}for(l=0;l<c.length-1;l++)if(h=c[l].max,isFinite(h))for(;l<c.length-1;){if(r=c[l+1].min,isFinite(r)){(d=r-h)>a&&n.push({diff:d,start:h,end:r});break}l++}if(this._axes[o].scaleBreaks.customBreaks)for(l=0;l<this._axes[o].scaleBreaks.customBreaks.length;l++)for(a=0;a<n.length;a++)(this._axes[o].scaleBreaks.customBreaks[l].startValue<=n[a].start&&n[a].start<=this._axes[o].scaleBreaks.customBreaks[l].endValue||this._axes[o].scaleBreaks.customBreaks[l].startValue<=n[a].start&&n[a].start<=this._axes[o].scaleBreaks.customBreaks[l].endValue||n[a].start<=this._axes[o].scaleBreaks.customBreaks[l].startValue&&this._axes[o].scaleBreaks.customBreaks[l].startValue<=n[a].end||n[a].start<=this._axes[o].scaleBreaks.customBreaks[l].endValue&&this._axes[o].scaleBreaks.customBreaks[l].endValue<=n[a].end)&&(n.splice(a,1),a--);for(n.sort((function(t,e){return e.diff-t.diff})),l=0;l<Math.min(n.length,this._axes[o].scaleBreaks.maxNumberOfAutoBreaks);l++)a=t(n[l].start,n[l].end,this._axes[o].logarithmic?this._axes[o].dataInfo.max/this._axes[o].dataInfo.min:this._axes[o].dataInfo.max-this._axes[o].dataInfo.min,this._axes[o].logarithmic),this._axes[o].scaleBreaks.autoBreaks.push(new Y(this,"autoBreaks",a,l,++this._eventManager.lastObjectId,this._axes[o].scaleBreaks)),this._axes[o].scaleBreaks._appliedBreaks.push(this._axes[o].scaleBreaks.autoBreaks[this._axes[o].scaleBreaks.autoBreaks.length-1]);this._axes[o].scaleBreaks._appliedBreaks.sort((function(t,e){return t.startValue-e.startValue}))}}},e.prototype.getDataPointAtXY=function(t,e,i){i=i||!1;for(var a=[],s=this._dataInRenderedOrder.length-1;0<=s;s--){var n;(n=this._dataInRenderedOrder[s].getDataPointAtXY(t,e,i))&&a.push(n)}for(t=null,e=!1,i=0;i<a.length;i++)if(("line"===a[i].dataSeries.type||"stepLine"===a[i].dataSeries.type||"area"===a[i].dataSeries.type||"stepArea"===a[i].dataSeries.type)&&(s=f("markerSize",a[i].dataPoint,a[i].dataSeries)||8,a[i].distance<=s/2)){e=!0;break}for(i=0;i<a.length;i++)e&&"line"!==a[i].dataSeries.type&&"stepLine"!==a[i].dataSeries.type&&"area"!==a[i].dataSeries.type&&"stepArea"!==a[i].dataSeries.type||(t?a[i].distance<=t.distance&&(t=a[i]):t=a[i]);return t},e.prototype.getObjectAtXY=function(t,e,i){var a=null;if(i=this.getDataPointAtXY(t,e,i||!1))a=i.dataSeries.dataPointIds[i.dataPointIndex];else if(N)a=v(t,e,this._eventManager.ghostCtx);else for(i=0;i<this.legend.items.length;i++){var s=this.legend.items[i];t>=s.x1&&t<=s.x2&&e>=s.y1&&e<=s.y2&&(a=s.id)}return a},e.prototype.getAutoFontSize=st,e.prototype.resetOverlayedCanvas=function(){this.overlaidCanvasCtx.clearRect(0,0,this.width,this.height)},e.prototype.clearCanvas=at,e.prototype.attachEvent=function(t){this._events.push(t)},e.prototype._touchEventHandler=function(t){if(t.changedTouches&&this.interactivityEnabled){var e=[],i=t.changedTouches,a=i?i[0]:t,s=null;switch(t.type){case"touchstart":case"MSPointerDown":e=["mousemove","mousedown"],this._lastTouchData=lt(a),this._lastTouchData.time=new Date;break;case"touchmove":case"MSPointerMove":e=["mousemove"];break;case"touchend":case"MSPointerUp":var n=this._lastTouchData&&this._lastTouchData.time?new Date-this._lastTouchData.time:0;e="touchstart"===this._lastTouchEventType||"MSPointerDown"===this._lastTouchEventType||300>n?["mouseup","click"]:["mouseup"];break;default:return}if(!(i&&1<i.length)){(s=lt(a)).time=new Date;try{var o=s.y-this._lastTouchData.y;n=s.time-this._lastTouchData.time;(1<Math.abs(o)&&this._lastTouchData.scroll||5<Math.abs(o)&&250>n)&&(this._lastTouchData.scroll=!0)}catch(t){}if(this._lastTouchEventType=t.type,this._lastTouchData.scroll&&this.zoomEnabled)this.isDrag&&this.resetOverlayedCanvas(),this.isDrag=!1;else for(i=0;i<e.length;i++)s=e[i],(o=document.createEvent("MouseEvent")).initMouseEvent(s,!0,!0,window,1,a.screenX,a.screenY,a.clientX,a.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(o),(!x(this._lastTouchData.scroll)&&!this._lastTouchData.scroll||!this._lastTouchData.scroll&&250<n||"click"===s)&&(t.preventManipulation&&t.preventManipulation(),t.preventDefault&&t.preventDefault())}}},e.prototype._dispatchRangeEvent=function(t,e){var i={chart:this};i.type=t,i.trigger=e;var a=[];this.axisX&&0<this.axisX.length&&a.push("axisX"),this.axisX2&&0<this.axisX2.length&&a.push("axisX2"),this.axisY&&0<this.axisY.length&&a.push("axisY"),this.axisY2&&0<this.axisY2.length&&a.push("axisY2");for(var s=0;s<a.length;s++)if(x(i[a[s]])&&(i[a[s]]=[]),"axisY"===a[s])for(var n=0;n<this.axisY.length;n++)i[a[s]].push({viewportMinimum:this[a[s]][n].sessionVariables.newViewportMinimum,viewportMaximum:this[a[s]][n].sessionVariables.newViewportMaximum});else if("axisY2"===a[s])for(n=0;n<this.axisY2.length;n++)i[a[s]].push({viewportMinimum:this[a[s]][n].sessionVariables.newViewportMinimum,viewportMaximum:this[a[s]][n].sessionVariables.newViewportMaximum});else if("axisX"===a[s])for(n=0;n<this.axisX.length;n++)i[a[s]].push({viewportMinimum:this[a[s]][n].sessionVariables.newViewportMinimum,viewportMaximum:this[a[s]][n].sessionVariables.newViewportMaximum});else if("axisX2"===a[s])for(n=0;n<this.axisX2.length;n++)i[a[s]].push({viewportMinimum:this[a[s]][n].sessionVariables.newViewportMinimum,viewportMaximum:this[a[s]][n].sessionVariables.newViewportMaximum});this.dispatchEvent(t,i,this)},e.prototype._mouseEventHandler=function(t){void 0===t.target&&t.srcElement&&(t.target=t.srcElement);var i,a,s=lt(t),n=t.type;if(t.which?a=3==t.which:t.button&&(a=2==t.button),e.capturedEventParam&&(i=e.capturedEventParam,"mouseup"===n&&(e.capturedEventParam=null,i.chart.overlaidCanvas.releaseCapture?i.chart.overlaidCanvas.releaseCapture():document.documentElement.removeEventListener("mouseup",i.chart._mouseEventHandler,!1)),i.hasOwnProperty(n)&&("mouseup"!==n||i.chart.overlaidCanvas.releaseCapture?t.target!==i.chart.overlaidCanvas&&N||i[n].call(i.context,s.x,s.y):t.target!==i.chart.overlaidCanvas&&(i.chart.isDrag=!1))),this.interactivityEnabled)if(this._ignoreNextEvent)this._ignoreNextEvent=!1;else if(t.preventManipulation&&t.preventManipulation(),t.preventDefault&&t.preventDefault(),O&&window.console&&(window.console.log(n+" --\x3e x: "+s.x+"; y:"+s.y),a&&window.console.log(t.which),"mouseup"===n&&window.console.log("mouseup")),!a){if(!e.capturedEventParam&&this._events){for(var o=0;o<this._events.length;o++)if(this._events[o].hasOwnProperty(n)){if(a=(i=this._events[o]).bounds,s.x>=a.x1&&s.x<=a.x2&&s.y>=a.y1&&s.y<=a.y2){i[n].call(i.context,s.x,s.y),"mousedown"===n&&!0===i.capture?(e.capturedEventParam=i,this.overlaidCanvas.setCapture?this.overlaidCanvas.setCapture():document.documentElement.addEventListener("mouseup",this._mouseEventHandler,!1)):"mouseup"===n&&(i.chart.overlaidCanvas.releaseCapture?i.chart.overlaidCanvas.releaseCapture():document.documentElement.removeEventListener("mouseup",this._mouseEventHandler,!1));break}i=null}t.target.style.cursor=i&&i.cursor?i.cursor:this._defaultCursor}n=this.plotArea,(s.x<n.x1||s.x>n.x2||s.y<n.y1||s.y>n.y2)&&(this.toolTip&&this.toolTip.enabled?this.toolTip.hide():this.resetOverlayedCanvas()),this.isDrag&&this.zoomEnabled||!this._eventManager||this._eventManager.mouseEventHandler(t)}},e.prototype._plotAreaMouseDown=function(t,e){this.isDrag=!0,this.dragStartPoint={x:t,y:e}},e.prototype._plotAreaMouseUp=function(t,e){if(("normal"===this.plotInfo.axisPlacement||"xySwapped"===this.plotInfo.axisPlacement)&&this.isDrag){var i=e-this.dragStartPoint.y,a=t-this.dragStartPoint.x,s=0<=this.zoomType.indexOf("x"),n=0<=this.zoomType.indexOf("y"),o=!1;if(this.resetOverlayedCanvas(),"xySwapped"===this.plotInfo.axisPlacement){var l=n;n=s,s=l}if(this.panEnabled||this.zoomEnabled){if(this.panEnabled)for(s=n=0;s<this._axes.length;s++)(i=this._axes[s]).logarithmic?i.viewportMinimum<i.minimum?(n=i.minimum/i.viewportMinimum,i.sessionVariables.newViewportMinimum=i.viewportMinimum*n,i.sessionVariables.newViewportMaximum=i.viewportMaximum*n,o=!0):i.viewportMaximum>i.maximum&&(n=i.viewportMaximum/i.maximum,i.sessionVariables.newViewportMinimum=i.viewportMinimum/n,i.sessionVariables.newViewportMaximum=i.viewportMaximum/n,o=!0):i.viewportMinimum<i.minimum?(n=i.minimum-i.viewportMinimum,i.sessionVariables.newViewportMinimum=i.viewportMinimum+n,i.sessionVariables.newViewportMaximum=i.viewportMaximum+n,o=!0):i.viewportMaximum>i.maximum&&(n=i.viewportMaximum-i.maximum,i.sessionVariables.newViewportMinimum=i.viewportMinimum-n,i.sessionVariables.newViewportMaximum=i.viewportMaximum-n,o=!0);else if((!s||2<Math.abs(a))&&(!n||2<Math.abs(i))&&this.zoomEnabled){if(!this.dragStartPoint)return;i=s?this.dragStartPoint.x:this.plotArea.x1,a=n?this.dragStartPoint.y:this.plotArea.y1,s=s?t:this.plotArea.x2,n=n?e:this.plotArea.y2,2<Math.abs(i-s)&&2<Math.abs(a-n)&&this._zoomPanToSelectedRegion(i,a,s,n)&&(o=!0)}o&&(this._ignoreNextEvent=!0,this._dispatchRangeEvent("rangeChanging","zoom"),this.render(),this._dispatchRangeEvent("rangeChanged","zoom"),o&&this.zoomEnabled&&"none"===this._zoomButton.style.display&&(C(this._zoomButton,this._resetButton),P(this,this._zoomButton,"pan"),P(this,this._resetButton,"reset")))}}if(this.isDrag=!1,"none"!==this.plotInfo.axisPlacement){if(this.resetOverlayedCanvas(),this.axisX&&0<this.axisX.length)for(o=0;o<this.axisX.length;o++)this.axisX[o].crosshair&&this.axisX[o].crosshair.enabled&&this.axisX[o].renderCrosshair(t,e);if(this.axisX2&&0<this.axisX2.length)for(o=0;o<this.axisX2.length;o++)this.axisX2[o].crosshair&&this.axisX2[o].crosshair.enabled&&this.axisX2[o].renderCrosshair(t,e);if(this.axisY&&0<this.axisY.length)for(o=0;o<this.axisY.length;o++)this.axisY[o].crosshair&&this.axisY[o].crosshair.enabled&&this.axisY[o].renderCrosshair(t,e);if(this.axisY2&&0<this.axisY2.length)for(o=0;o<this.axisY2.length;o++)this.axisY2[o].crosshair&&this.axisY2[o].crosshair.enabled&&this.axisY2[o].renderCrosshair(t,e)}},e.prototype._plotAreaMouseMove=function(t,e){if(this.isDrag&&"none"!==this.plotInfo.axisPlacement){var i=0,a=0,s=i=null,n=(s=0<=this.zoomType.indexOf("x"),0<=this.zoomType.indexOf("y")),o=this;if("xySwapped"===this.plotInfo.axisPlacement&&(i=n,n=s,s=i),i=this.dragStartPoint.x-t,a=this.dragStartPoint.y-e,2<Math.abs(i)&&8>Math.abs(i)&&(this.panEnabled||this.zoomEnabled)?this.toolTip.hide():this.panEnabled||this.zoomEnabled||this.toolTip.mouseMoveHandler(t,e),(!s||2<Math.abs(i)||!n||2<Math.abs(a))&&(this.panEnabled||this.zoomEnabled))if(this.panEnabled)s={x1:s?this.plotArea.x1+i:this.plotArea.x1,y1:n?this.plotArea.y1+a:this.plotArea.y1,x2:s?this.plotArea.x2+i:this.plotArea.x2,y2:n?this.plotArea.y2+a:this.plotArea.y2},clearTimeout(o._panTimerId),o._panTimerId=setTimeout(function(i,a,s,n){return function(){o._zoomPanToSelectedRegion(i,a,s,n,!0)&&(o._dispatchRangeEvent("rangeChanging","pan"),o.render(),o._dispatchRangeEvent("rangeChanged","pan"),o.dragStartPoint.x=t,o.dragStartPoint.y=e)}}(s.x1,s.y1,s.x2,s.y2),0);else if(this.zoomEnabled){this.resetOverlayedCanvas(),i=this.overlaidCanvasCtx.globalAlpha,this.overlaidCanvasCtx.fillStyle="#A89896";a=s?this.dragStartPoint.x:this.plotArea.x1;var l=n?this.dragStartPoint.y:this.plotArea.y1,r=s?t-this.dragStartPoint.x:this.plotArea.x2-this.plotArea.x1,h=n?e-this.dragStartPoint.y:this.plotArea.y2-this.plotArea.y1;this.validateRegion(a,l,s?t:this.plotArea.x2-this.plotArea.x1,n?e:this.plotArea.y2-this.plotArea.y1,"xy"!==this.zoomType).isValid&&(this.resetOverlayedCanvas(),this.overlaidCanvasCtx.fillStyle="#99B2B5"),this.overlaidCanvasCtx.globalAlpha=.7,this.overlaidCanvasCtx.fillRect(a,l,r,h),this.overlaidCanvasCtx.globalAlpha=i}}else if(this.toolTip.mouseMoveHandler(t,e),"none"!==this.plotInfo.axisPlacement){if(this.axisX&&0<this.axisX.length)for(s=0;s<this.axisX.length;s++)this.axisX[s].crosshair&&this.axisX[s].crosshair.enabled&&this.axisX[s].renderCrosshair(t,e);if(this.axisX2&&0<this.axisX2.length)for(s=0;s<this.axisX2.length;s++)this.axisX2[s].crosshair&&this.axisX2[s].crosshair.enabled&&this.axisX2[s].renderCrosshair(t,e);if(this.axisY&&0<this.axisY.length)for(s=0;s<this.axisY.length;s++)this.axisY[s].crosshair&&this.axisY[s].crosshair.enabled&&this.axisY[s].renderCrosshair(t,e);if(this.axisY2&&0<this.axisY2.length)for(s=0;s<this.axisY2.length;s++)this.axisY2[s].crosshair&&this.axisY2[s].crosshair.enabled&&this.axisY2[s].renderCrosshair(t,e)}},e.prototype._zoomPanToSelectedRegion=function(t,e,i,a,s){if(e=(t=this.validateRegion(t,e,i,a,s)).axesWithValidRange,i=t.axesRanges,t.isValid)for(a=0;a<e.length;a++)s=i[a],e[a].setViewPortRange(s.val1,s.val2),this.syncCharts&&this.syncCharts(s.val1,s.val2);return t.isValid},e.prototype.validateRegion=function(t,e,i,a,s){s=s||!1;for(var n=0<=this.zoomType.indexOf("x"),o=0<=this.zoomType.indexOf("y"),l=!1,r=[],h=[],d=[],c=0;c<this._axes.length;c++)("axisX"===this._axes[c].type&&n||"axisY"===this._axes[c].type&&o)&&h.push(this._axes[c]);for(o=0;o<h.length;o++){n=!1;if((u=(c=h[o]).convertPixelToValue({x:t,y:e}))>(x=c.convertPixelToValue({x:i,y:a})))var p=x,x=u,u=p;if(c.scaleBreaks)for(p=0;!n&&p<c.scaleBreaks._appliedBreaks.length;p++)n=c.scaleBreaks._appliedBreaks[p].startValue<=u&&c.scaleBreaks._appliedBreaks[p].endValue>=x;if(isFinite(c.dataInfo.minDiff))if(p=c.getApparentDifference(u,x,null,!0),n||!(this.panEnabled&&c.scaleBreaks&&c.scaleBreaks._appliedBreaks.length)&&(c.logarithmic&&p<Math.pow(c.dataInfo.minDiff,3)||!c.logarithmic&&p<3*Math.abs(c.dataInfo.minDiff))||u<c.minimum||x>c.maximum){if(!s){l=!1;break}}else r.push(c),d.push({val1:u,val2:x}),l=!0}return{isValid:l,axesWithValidRange:r,axesRanges:d}},e.prototype.preparePlotArea=function(){var t=this.plotArea;if(!N&&(0<t.x1||0<t.y1)&&t.ctx.translate(t.x1,t.y1),(this.axisX[0]||this.axisX2[0])&&(this.axisY[0]||this.axisY2[0])){var e=this.axisX[0]?this.axisX[0].lineCoordinates:this.axisX2[0].lineCoordinates;if(this.axisY&&0<this.axisY.length&&this.axisY[0]){var i=this.axisY[0];t.x1=e.x1<e.x2?e.x1:i.lineCoordinates.x1,t.y1=e.y1<i.lineCoordinates.y1?e.y1:i.lineCoordinates.y1,t.x2=e.x2>i.lineCoordinates.x2?e.x2:i.lineCoordinates.x2,t.y2=e.y2>e.y1?e.y2:i.lineCoordinates.y2,t.width=t.x2-t.x1,t.height=t.y2-t.y1}this.axisY2&&0<this.axisY2.length&&this.axisY2[0]&&(i=this.axisY2[0],t.x1=e.x1<e.x2?e.x1:i.lineCoordinates.x1,t.y1=e.y1<i.lineCoordinates.y1?e.y1:i.lineCoordinates.y1,t.x2=e.x2>i.lineCoordinates.x2?e.x2:i.lineCoordinates.x2,t.y2=e.y2>e.y1?e.y2:i.lineCoordinates.y2,t.width=t.x2-t.x1,t.height=t.y2-t.y1)}else e=this.layoutManager.getFreeSpace(),t.x1=e.x1,t.x2=e.x2,t.y1=e.y1,t.y2=e.y2,t.width=e.width,t.height=e.height;N||(t.canvas.width=t.width,t.canvas.height=t.height,t.canvas.style.left=t.x1+"px",t.canvas.style.top=t.y1+"px",(0<t.x1||0<t.y1)&&t.ctx.translate(-t.x1,-t.y1)),t.layoutManager=new _(t.x1,t.y1,t.x2,t.y2,2)},e.prototype.renderIndexLabels=function(t){var e=t||this.plotArea.ctx,i=this.plotArea,a=0,s=0,n=0,o=0,l=a=o=s=n=0,r=0;for(t=0;t<this._indexLabels.length;t++){var h,d,c=this._indexLabels[t],p=c.chartType.toLowerCase();l=f("indexLabelFontColor",c.dataPoint,c.dataSeries),r=f("indexLabelFontSize",c.dataPoint,c.dataSeries);h=f("indexLabelFontFamily",c.dataPoint,c.dataSeries),d=f("indexLabelFontStyle",c.dataPoint,c.dataSeries);o=f("indexLabelFontWeight",c.dataPoint,c.dataSeries);var u=f("indexLabelBackgroundColor",c.dataPoint,c.dataSeries),m=(s=f("indexLabelMaxWidth",c.dataPoint,c.dataSeries),n=f("indexLabelWrap",c.dataPoint,c.dataSeries),f("indexLabelLineDashType",c.dataPoint,c.dataSeries)),g=f("indexLabelLineColor",c.dataPoint,c.dataSeries),y=x(c.dataPoint.indexLabelLineThickness)?x(c.dataSeries.options.indexLabelLineThickness)?0:c.dataSeries.options.indexLabelLineThickness:c.dataPoint.indexLabelLineThickness,v=(a=0<y?Math.min(10,("normal"===this.plotInfo.axisPlacement?this.plotArea.height:this.plotArea.width)<<0):0,{percent:null,total:null}),k=null;(0<=c.dataSeries.type.indexOf("stacked")||"pie"===c.dataSeries.type||"doughnut"===c.dataSeries.type)&&(v=this.getPercentAndTotal(c.dataSeries,c.dataPoint)),(c.dataSeries.indexLabelFormatter||c.dataPoint.indexLabelFormatter)&&(k={chart:this,dataSeries:c.dataSeries,dataPoint:c.dataPoint,index:c.indexKeyword,total:v.total,percent:v.percent});var M=c.dataPoint.indexLabelFormatter?c.dataPoint.indexLabelFormatter(k):c.dataPoint.indexLabel?this.replaceKeywordsWithValue(c.dataPoint.indexLabel,c.dataPoint,c.dataSeries,null,c.indexKeyword):c.dataSeries.indexLabelFormatter?c.dataSeries.indexLabelFormatter(k):c.dataSeries.indexLabel?this.replaceKeywordsWithValue(c.dataSeries.indexLabel,c.dataPoint,c.dataSeries,null,c.indexKeyword):null;if(null!==M&&""!==M){v=f("indexLabelPlacement",c.dataPoint,c.dataSeries),k=f("indexLabelOrientation",c.dataPoint,c.dataSeries);var w=c.direction,T=c.dataSeries.axisX,P=c.dataSeries.axisY,C=!1;if((u=new B(e,{x:0,y:0,maxWidth:s||.5*this.width,maxHeight:n?5*r:1.5*r,angle:"horizontal"===k?0:-90,text:M,padding:0,backgroundColor:u,horizontalAlign:"left",fontSize:r,fontFamily:h,fontWeight:o,fontColor:l,fontStyle:d,textBaseline:"top"})).measureText(),c.dataSeries.indexLabelMaxWidth=u.maxWidth,"stackedarea100"===p){if(c.point.x<i.x1||c.point.x>i.x2||c.point.y<i.y1-1||c.point.y>i.y2+1)continue}else if("rangearea"===p||"rangesplinearea"===p){if(c.dataPoint.x<T.viewportMinimum||c.dataPoint.x>T.viewportMaximum||Math.max.apply(null,c.dataPoint.y)<P.viewportMinimum||Math.min.apply(null,c.dataPoint.y)>P.viewportMaximum)continue}else if(0<=p.indexOf("line")||0<=p.indexOf("area")||0<=p.indexOf("bubble")||0<=p.indexOf("scatter")){if(c.dataPoint.x<T.viewportMinimum||c.dataPoint.x>T.viewportMaximum||c.dataPoint.y<P.viewportMinimum||c.dataPoint.y>P.viewportMaximum)continue}else if(0<=p.indexOf("column")||"waterfall"===p||"error"===p&&!c.axisSwapped){if(c.dataPoint.x<T.viewportMinimum||c.dataPoint.x>T.viewportMaximum||c.bounds.y1>i.y2||c.bounds.y2<i.y1)continue}else if(0<=p.indexOf("bar")||"error"===p){if(c.dataPoint.x<T.viewportMinimum||c.dataPoint.x>T.viewportMaximum||c.bounds.x1>i.x2||c.bounds.x2<i.x1)continue}else if("candlestick"===p||"ohlc"===p){if(c.dataPoint.x<T.viewportMinimum||c.dataPoint.x>T.viewportMaximum||Math.max.apply(null,c.dataPoint.y)<P.viewportMinimum||Math.min.apply(null,c.dataPoint.y)>P.viewportMaximum)continue}else if(c.dataPoint.x<T.viewportMinimum||c.dataPoint.x>T.viewportMaximum)continue;s=o=2,"horizontal"===k?(l=u.width,r=u.height):(r=u.width,l=u.height),"normal"===this.plotInfo.axisPlacement?(0<=p.indexOf("line")||0<=p.indexOf("area")?(v="auto",o=4):0<=p.indexOf("stacked")?"auto"===v&&(v="inside"):"bubble"!==p&&"scatter"!==p||(v="inside"),h=c.point.x-l/2,"inside"!==v?(s=i.y1,n=i.y2,0<w?(d=c.point.y-r-o-a)<s&&(C=(d="auto"===v?Math.max(c.point.y,s)+o+a:s+o+a)+r>c.point.y):(d=c.point.y+o+a)>n-r-o-a&&(C=(d="auto"===v?Math.min(c.point.y,n)-r-o-a:n-r-o-a)<c.point.y)):(s=Math.max(c.bounds.y1,i.y1),n=Math.min(c.bounds.y2,i.y2),a=0<=p.indexOf("range")||"error"===p?0<w?Math.max(c.bounds.y1,i.y1)+r/2+o:Math.min(c.bounds.y2,i.y2)-r/2-o:(Math.max(c.bounds.y1,i.y1)+Math.min(c.bounds.y2,i.y2))/2,0<w?(d=Math.max(c.point.y,a)-r/2)<s&&("bubble"===p||"scatter"===p)&&(d=Math.max(c.point.y-r-o,i.y1+o)):(d=Math.min(c.point.y,a)-r/2)>n-r-o&&("bubble"===p||"scatter"===p)&&(d=Math.min(c.point.y+o,i.y2-r-o)),d=Math.min(d,n-r))):(0<=p.indexOf("line")||0<=p.indexOf("area")||0<=p.indexOf("scatter")?(v="auto",s=4):0<=p.indexOf("stacked")?"auto"===v&&(v="inside"):"bubble"===p&&(v="inside"),d=c.point.y-r/2,"inside"!==v?(o=i.x1,n=i.x2,0>w?(h=c.point.x-l-s-a)<o&&(C=(h="auto"===v?Math.max(c.point.x,o)+s+a:o+s+a)+l>c.point.x):(h=c.point.x+s+a)>n-l-s-a&&(C=(h="auto"===v?Math.min(c.point.x,n)-l-s-a:n-l-s-a)<c.point.x)):(o=Math.max(c.bounds.x1,i.x1),Math.min(c.bounds.x2,i.x2),a=0<=p.indexOf("range")||"error"===p?0>w?Math.max(c.bounds.x1,i.x1)+l/2+s:Math.min(c.bounds.x2,i.x2)-l/2-s:(Math.max(c.bounds.x1,i.x1)+Math.min(c.bounds.x2,i.x2))/2,h=0>w?Math.max(c.point.x,a)-l/2:Math.min(c.point.x,a)-l/2,h=Math.max(h,o))),"vertical"===k&&(d+=r),u.x=h,u.y=d,u.render(!0),y&&"inside"!==v&&(0>p.indexOf("bar")&&("error"!==p||!c.axisSwapped)&&c.point.x>i.x1&&c.point.x<i.x2||!C)&&(0>p.indexOf("column")&&("error"!==p||c.axisSwapped)&&c.point.y>i.y1&&c.point.y<i.y2||!C)&&(e.lineWidth=y,e.strokeStyle=g||"gray",e.setLineDash&&e.setLineDash(b(m,y)),e.beginPath(),e.moveTo(c.point.x,c.point.y),0<=p.indexOf("bar")||"error"===p&&c.axisSwapped?e.lineTo(h+(0<c.direction?0:l),d+("horizontal"===k?r:-r)/2):0<=p.indexOf("column")||"error"===p&&!c.axisSwapped?e.lineTo(h+l/2,d+((0<c.direction?r:-r)+("horizontal"===k?r:-r))/2):e.lineTo(h+l/2,d+((d<c.point.y?r:-r)+("horizontal"===k?r:-r))/2),e.stroke())}}for(e={source:e,dest:this.plotArea.ctx,animationCallback:Q.fadeInAnimation,easingFunction:Q.easing.easeInQuad,animationBase:0,startTimePercent:.7},t=0;t<this._indexLabels.length;t++)u=f("indexLabelBackgroundColor",(c=this._indexLabels[t]).dataPoint,c.dataSeries),c.dataSeries.indexLabelBackgroundColor=x(u)?N?"transparent":null:u;return e},e.prototype.renderLine=function(t){var e=t.targetCanvasCtx||this.plotArea.ctx,i=N?this._preRenderCtx:e;if(!(0>=t.dataSeriesIndexes.length)){var a=this._eventManager.ghostCtx;i.save();var s=this.plotArea;i.beginPath(),i.rect(s.x1,s.y1,s.width,s.height),i.clip();for(var n,o=[],l=0;l<t.dataSeriesIndexes.length;l++){var r=t.dataSeriesIndexes[l],h=this.data[r];i.lineWidth=h.lineThickness;var d=h.dataPoints,p="solid";if(i.setLineDash){var x=b(h.nullDataLineDashType,h.lineThickness),u=b(p=h.lineDashType,h.lineThickness);i.setLineDash(u)}var m=h.id;this._eventManager.objectMap[m]={objectType:"dataSeries",dataSeriesIndex:r},m=c(m),a.strokeStyle=m,a.lineWidth=0<h.lineThickness?Math.max(h.lineThickness,4):0;m=h._colorSet;var g=m=h.lineColor=h.options.lineColor?h.options.lineColor:m[0];i.strokeStyle=m;var y,v,f=!0,k=0;if(i.beginPath(),0<d.length){var M=!1;for(k=0;k<d.length;k++)if(!((y=d[k].x.getTime?d[k].x.getTime():d[k].x)<t.axisX.dataInfo.viewPortMin||y>t.axisX.dataInfo.viewPortMax&&(!h.connectNullData||!M)))if("number"!=typeof d[k].y)0<k&&!(h.connectNullData||M||f)&&(i.stroke(),N&&a.stroke()),M=!0;else{y=t.axisX.convertValueToPixel(y),v=t.axisY.convertValueToPixel(d[k].y);var w=h.dataPointIds[k];if(this._eventManager.objectMap[w]={id:w,objectType:"dataPoint",dataSeriesIndex:r,dataPointIndex:k,x1:y,y1:v},f||M?(!f&&h.connectNullData?(i.setLineDash&&(h.options.nullDataLineDashType||p===h.lineDashType&&h.lineDashType!==h.nullDataLineDashType)&&(i.stroke(),i.beginPath(),i.moveTo(n.x,n.y),p=h.nullDataLineDashType,i.setLineDash(x)),i.lineTo(y,v),N&&a.lineTo(y,v)):(i.beginPath(),i.moveTo(y,v),N&&(a.beginPath(),a.moveTo(y,v))),M=f=!1):(i.lineTo(y,v),N&&a.lineTo(y,v),0==k%500&&(i.stroke(),i.beginPath(),i.moveTo(y,v),N&&(a.stroke(),a.beginPath(),a.moveTo(y,v)))),n={x:y,y:v},k<d.length-1&&(g!==(d[k].lineColor||m)||p!==(d[k].lineDashType||h.lineDashType))&&(i.stroke(),i.beginPath(),i.moveTo(y,v),g=d[k].lineColor||m,i.strokeStyle=g,i.setLineDash&&(d[k].lineDashType?(p=d[k].lineDashType,i.setLineDash(b(p,h.lineThickness))):(p=h.lineDashType,i.setLineDash(u)))),0<d[k].markerSize||0<h.markerSize){var T=h.getMarkerProperties(k,y,v,i);o.push(T),w=c(w),N&&o.push({x:y,y:v,ctx:a,type:T.type,size:T.size,color:w,borderColor:w,borderThickness:T.borderThickness})}(d[k].indexLabel||h.indexLabel||d[k].indexLabelFormatter||h.indexLabelFormatter)&&this._indexLabels.push({chartType:"line",dataPoint:d[k],dataSeries:h,point:{x:y,y:v},direction:0>d[k].y===t.axisY.reversed?1:-1,color:m})}i.stroke(),N&&a.stroke()}}return Z.drawMarkers(o),N&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.globalCompositeOperation="source-atop",t.axisX.maskCanvas&&i.drawImage(t.axisX.maskCanvas,0,0,this.width,this.height),t.axisY.maskCanvas&&i.drawImage(t.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.clearRect(s.x1,s.y1,s.width,s.height),a.beginPath()),i.restore(),i.beginPath(),{source:e,dest:this.plotArea.ctx,animationCallback:Q.xClipAnimation,easingFunction:Q.easing.linear,animationBase:0}}},e.prototype.renderStepLine=function(t){var e=t.targetCanvasCtx||this.plotArea.ctx,i=N?this._preRenderCtx:e;if(!(0>=t.dataSeriesIndexes.length)){var a=this._eventManager.ghostCtx;i.save();var s=this.plotArea;i.beginPath(),i.rect(s.x1,s.y1,s.width,s.height),i.clip();for(var n,o=[],l=0;l<t.dataSeriesIndexes.length;l++){var r=t.dataSeriesIndexes[l],h=this.data[r];i.lineWidth=h.lineThickness;var d=h.dataPoints,p="solid";if(i.setLineDash){var x=b(h.nullDataLineDashType,h.lineThickness),u=b(p=h.lineDashType,h.lineThickness);i.setLineDash(u)}var m=h.id;this._eventManager.objectMap[m]={objectType:"dataSeries",dataSeriesIndex:r},m=c(m),a.strokeStyle=m,a.lineWidth=0<h.lineThickness?Math.max(h.lineThickness,4):0;m=h._colorSet;var g=m=h.lineColor=h.options.lineColor?h.options.lineColor:m[0];i.strokeStyle=m;var y,v,f=!0,k=0;if(i.beginPath(),0<d.length){var M=!1;for(k=0;k<d.length;k++)if(!((y=d[k].getTime?d[k].x.getTime():d[k].x)<t.axisX.dataInfo.viewPortMin||y>t.axisX.dataInfo.viewPortMax&&(!h.connectNullData||!M)))if("number"!=typeof d[k].y)0<k&&!(h.connectNullData||M||f)&&(i.stroke(),N&&a.stroke()),M=!0;else{var w=v;y=t.axisX.convertValueToPixel(y),v=t.axisY.convertValueToPixel(d[k].y);var T=h.dataPointIds[k];this._eventManager.objectMap[T]={id:T,objectType:"dataPoint",dataSeriesIndex:r,dataPointIndex:k,x1:y,y1:v},f||M?(!f&&h.connectNullData?(i.setLineDash&&(h.options.nullDataLineDashType||p===h.lineDashType&&h.lineDashType!==h.nullDataLineDashType)&&(i.stroke(),i.beginPath(),i.moveTo(n.x,n.y),p=h.nullDataLineDashType,i.setLineDash(x)),i.lineTo(y,w),i.lineTo(y,v),N&&(a.lineTo(y,w),a.lineTo(y,v))):(i.beginPath(),i.moveTo(y,v),N&&(a.beginPath(),a.moveTo(y,v))),M=f=!1):(i.lineTo(y,w),N&&a.lineTo(y,w),i.lineTo(y,v),N&&a.lineTo(y,v),0==k%500&&(i.stroke(),i.beginPath(),i.moveTo(y,v),N&&(a.stroke(),a.beginPath(),a.moveTo(y,v)))),n={x:y,y:v},k<d.length-1&&(g!==(d[k].lineColor||m)||p!==(d[k].lineDashType||h.lineDashType))&&(i.stroke(),i.beginPath(),i.moveTo(y,v),g=d[k].lineColor||m,i.strokeStyle=g,i.setLineDash&&(d[k].lineDashType?(p=d[k].lineDashType,i.setLineDash(b(p,h.lineThickness))):(p=h.lineDashType,i.setLineDash(u)))),(0<d[k].markerSize||0<h.markerSize)&&(w=h.getMarkerProperties(k,y,v,i),o.push(w),T=c(T),N&&o.push({x:y,y:v,ctx:a,type:w.type,size:w.size,color:T,borderColor:T,borderThickness:w.borderThickness})),(d[k].indexLabel||h.indexLabel||d[k].indexLabelFormatter||h.indexLabelFormatter)&&this._indexLabels.push({chartType:"stepLine",dataPoint:d[k],dataSeries:h,point:{x:y,y:v},direction:0>d[k].y===t.axisY.reversed?1:-1,color:m})}i.stroke(),N&&a.stroke()}}return Z.drawMarkers(o),N&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.globalCompositeOperation="source-atop",t.axisX.maskCanvas&&i.drawImage(t.axisX.maskCanvas,0,0,this.width,this.height),t.axisY.maskCanvas&&i.drawImage(t.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.clearRect(s.x1,s.y1,s.width,s.height),a.beginPath()),i.restore(),i.beginPath(),{source:e,dest:this.plotArea.ctx,animationCallback:Q.xClipAnimation,easingFunction:Q.easing.linear,animationBase:0}}},e.prototype.renderSpline=function(t){function e(t){if(0<(t=a(t,2)).length){s.beginPath(),N&&n.beginPath(),s.moveTo(t[0].x,t[0].y),t[0].newStrokeStyle&&(s.strokeStyle=t[0].newStrokeStyle),t[0].newLineDashArray&&s.setLineDash(t[0].newLineDashArray),N&&n.moveTo(t[0].x,t[0].y);for(var e=0;e<t.length-3;e+=3)s.bezierCurveTo(t[e+1].x,t[e+1].y,t[e+2].x,t[e+2].y,t[e+3].x,t[e+3].y),N&&n.bezierCurveTo(t[e+1].x,t[e+1].y,t[e+2].x,t[e+2].y,t[e+3].x,t[e+3].y),(0<e&&0==e%3e3||t[e+3].newStrokeStyle||t[e+3].newLineDashArray)&&(s.stroke(),s.beginPath(),s.moveTo(t[e+3].x,t[e+3].y),t[e+3].newStrokeStyle&&(s.strokeStyle=t[e+3].newStrokeStyle),t[e+3].newLineDashArray&&s.setLineDash(t[e+3].newLineDashArray),N&&(n.stroke(),n.beginPath(),n.moveTo(t[e+3].x,t[e+3].y)));s.stroke(),N&&n.stroke()}}var i=t.targetCanvasCtx||this.plotArea.ctx,s=N?this._preRenderCtx:i;if(!(0>=t.dataSeriesIndexes.length)){var n=this._eventManager.ghostCtx;s.save();var o=this.plotArea;s.beginPath(),s.rect(o.x1,o.y1,o.width,o.height),s.clip();for(var l=[],r=0;r<t.dataSeriesIndexes.length;r++){var h=t.dataSeriesIndexes[r],d=this.data[h];s.lineWidth=d.lineThickness;var p=d.dataPoints,x="solid";if(s.setLineDash){var u=b(d.nullDataLineDashType,d.lineThickness),m=b(x=d.lineDashType,d.lineThickness);s.setLineDash(m)}var g=d.id;this._eventManager.objectMap[g]={objectType:"dataSeries",dataSeriesIndex:h},g=c(g),n.strokeStyle=g,n.lineWidth=0<d.lineThickness?Math.max(d.lineThickness,4):0;g=d._colorSet;var y=g=d.lineColor=d.options.lineColor?d.options.lineColor:g[0];s.strokeStyle=g;var v,f,k=0,M=[];if(s.beginPath(),0<p.length)for(f=!1,k=0;k<p.length;k++)if(!((v=p[k].getTime?p[k].x.getTime():p[k].x)<t.axisX.dataInfo.viewPortMin||v>t.axisX.dataInfo.viewPortMax&&(!d.connectNullData||!f)))if("number"!=typeof p[k].y)0<k&&!f&&(d.connectNullData?s.setLineDash&&0<M.length&&(d.options.nullDataLineDashType||!p[k-1].lineDashType)&&(M[M.length-1].newLineDashArray=u,x=d.nullDataLineDashType):(e(M),M=[])),f=!0;else{v=t.axisX.convertValueToPixel(v),f=t.axisY.convertValueToPixel(p[k].y);var w=d.dataPointIds[k];if(this._eventManager.objectMap[w]={id:w,objectType:"dataPoint",dataSeriesIndex:h,dataPointIndex:k,x1:v,y1:f},M[M.length]={x:v,y:f},k<p.length-1&&(y!==(p[k].lineColor||g)||x!==(p[k].lineDashType||d.lineDashType))&&(y=p[k].lineColor||g,M[M.length-1].newStrokeStyle=y,s.setLineDash&&(p[k].lineDashType?(x=p[k].lineDashType,M[M.length-1].newLineDashArray=b(x,d.lineThickness)):(x=d.lineDashType,M[M.length-1].newLineDashArray=m))),0<p[k].markerSize||0<d.markerSize){var T=d.getMarkerProperties(k,v,f,s);l.push(T),w=c(w),N&&l.push({x:v,y:f,ctx:n,type:T.type,size:T.size,color:w,borderColor:w,borderThickness:T.borderThickness})}(p[k].indexLabel||d.indexLabel||p[k].indexLabelFormatter||d.indexLabelFormatter)&&this._indexLabels.push({chartType:"spline",dataPoint:p[k],dataSeries:d,point:{x:v,y:f},direction:0>p[k].y===t.axisY.reversed?1:-1,color:g}),f=!1}e(M)}return Z.drawMarkers(l),N&&(i.drawImage(this._preRenderCanvas,0,0,this.width,this.height),s.globalCompositeOperation="source-atop",t.axisX.maskCanvas&&s.drawImage(t.axisX.maskCanvas,0,0,this.width,this.height),t.axisY.maskCanvas&&s.drawImage(t.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),s.clearRect(o.x1,o.y1,o.width,o.height),n.beginPath()),s.restore(),s.beginPath(),{source:i,dest:this.plotArea.ctx,animationCallback:Q.xClipAnimation,easingFunction:Q.easing.linear,animationBase:0}}},e.prototype.renderColumn=function(t){var e=t.targetCanvasCtx||this.plotArea.ctx,i=N?this._preRenderCtx:e;if(!(0>=t.dataSeriesIndexes.length)){var a,s,n,o=null,l=this.plotArea,r=0,h=t.axisY.convertValueToPixel(t.axisY.logarithmic?t.axisY.viewportMinimum:0),d=(r=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(.15*this.width,this.plotArea.width/t.plotType.totalDataSeries*.9)<<0),p=t.axisX.dataInfo.minDiff;for(isFinite(p)||(p=.3*Math.abs(t.axisX.range)),p=this.dataPointWidth=this.options.dataPointWidth?this.dataPointWidth:l.width*(t.axisX.logarithmic?Math.log(p)/Math.log(t.axisX.range):Math.abs(p)/Math.abs(t.axisX.range))/t.plotType.totalDataSeries*.9<<0,this.dataPointMaxWidth&&r>d&&(r=Math.min(this.options.dataPointWidth?this.dataPointWidth:1/0,d)),!this.dataPointMaxWidth&&this.dataPointMinWidth&&d<r&&(d=Math.max(this.options.dataPointWidth?this.dataPointWidth:-1/0,r)),p<r&&(p=r),p>d&&(p=d),i.save(),N&&this._eventManager.ghostCtx.save(),i.beginPath(),i.rect(l.x1,l.y1,l.width,l.height),i.clip(),N&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(l.x1,l.y1,l.width,l.height),this._eventManager.ghostCtx.clip()),d=0;d<t.dataSeriesIndexes.length;d++){var x=t.dataSeriesIndexes[d],u=this.data[x],m=u.dataPoints;if(0<m.length){var g=!!(5<p&&u.bevelEnabled);for(r=0;r<m.length;r++)if(!((n=m[r].getTime?m[r].x.getTime():m[r].x)<t.axisX.dataInfo.viewPortMin||n>t.axisX.dataInfo.viewPortMax)&&"number"==typeof m[r].y){a=t.axisX.convertValueToPixel(n),s=t.axisY.convertValueToPixel(m[r].y),a=t.axisX.reversed?a+t.plotType.totalDataSeries*p/2-(t.previousDataSeriesCount+d)*p<<0:a-t.plotType.totalDataSeries*p/2+(t.previousDataSeriesCount+d)*p<<0;var b,y=t.axisX.reversed?a-p<<0:a+p<<0;0<=m[r].y?b=h:(b=s,s=h),s>b&&(o=s,s=b,b=o),o=m[r].color?m[r].color:u._colorSet[r%u._colorSet.length],pt(i,a,s,y,b,o,0,null,g&&0<=m[r].y,0>m[r].y&&g,!1,!1,u.fillOpacity),o=u.dataPointIds[r],this._eventManager.objectMap[o]={id:o,objectType:"dataPoint",dataSeriesIndex:x,dataPointIndex:r,x1:a,y1:s,x2:y,y2:b},o=c(o),N&&pt(this._eventManager.ghostCtx,a,s,y,b,o,0,null,!1,!1,!1,!1),(m[r].indexLabel||u.indexLabel||m[r].indexLabelFormatter||u.indexLabelFormatter)&&this._indexLabels.push({chartType:"column",dataPoint:m[r],dataSeries:u,point:{x:a+(y-a)/2,y:0>m[r].y===t.axisY.reversed?s:b},direction:0>m[r].y===t.axisY.reversed?1:-1,bounds:{x1:a,y1:Math.min(s,b),x2:y,y2:Math.max(s,b)},color:o})}}}return N&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.globalCompositeOperation="source-atop",t.axisX.maskCanvas&&i.drawImage(t.axisX.maskCanvas,0,0,this.width,this.height),t.axisY.maskCanvas&&i.drawImage(t.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.clearRect(l.x1,l.y1,l.width,l.height),this._eventManager.ghostCtx.restore()),i.restore(),{source:e,dest:this.plotArea.ctx,animationCallback:Q.yScaleAnimation,easingFunction:Q.easing.easeOutQuart,animationBase:h<t.axisY.bounds.y1?t.axisY.bounds.y1:h>t.axisY.bounds.y2?t.axisY.bounds.y2:h}}},e.prototype.renderStackedColumn=function(t){var e=t.targetCanvasCtx||this.plotArea.ctx,i=N?this._preRenderCtx:e;if(!(0>=t.dataSeriesIndexes.length)){var a,s,n=null,o=this.plotArea,l=[],r=[],h=[],d=[],p=0,x=t.axisY.convertValueToPixel(t.axisY.logarithmic?t.axisY.viewportMinimum:0);p=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;a=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:.15*this.width<<0;var u=t.axisX.dataInfo.minDiff;isFinite(u)||(u=.3*Math.abs(t.axisX.range)),u=this.options.dataPointWidth?this.dataPointWidth:o.width*(t.axisX.logarithmic?Math.log(u)/Math.log(t.axisX.range):Math.abs(u)/Math.abs(t.axisX.range))/t.plotType.plotUnits.length*.9<<0,this.dataPointMaxWidth&&p>a&&(p=Math.min(this.options.dataPointWidth?this.dataPointWidth:1/0,a)),!this.dataPointMaxWidth&&this.dataPointMinWidth&&a<p&&(a=Math.max(this.options.dataPointWidth?this.dataPointWidth:-1/0,p)),u<p&&(u=p),u>a&&(u=a),i.save(),N&&this._eventManager.ghostCtx.save(),i.beginPath(),i.rect(o.x1,o.y1,o.width,o.height),i.clip(),N&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(o.x1,o.y1,o.width,o.height),this._eventManager.ghostCtx.clip());for(var m=0;m<t.dataSeriesIndexes.length;m++){var g=t.dataSeriesIndexes[m],b=this.data[g],y=b.dataPoints;if(0<y.length){var v=!!(5<u&&b.bevelEnabled);for(i.strokeStyle="#4572A7 ",p=0;p<y.length;p++)if(!((n=y[p].x.getTime?y[p].x.getTime():y[p].x)<t.axisX.dataInfo.viewPortMin||n>t.axisX.dataInfo.viewPortMax)&&"number"==typeof y[p].y){var f,k=(a=t.axisX.convertValueToPixel(n))-t.plotType.plotUnits.length*u/2+t.index*u<<0,M=k+u<<0;if(t.axisY.logarithmic||t.axisY.scaleBreaks&&0<t.axisY.scaleBreaks._appliedBreaks.length&&0<y[p].y)h[n]=y[p].y+(h[n]?h[n]:0),0<h[n]&&(s=t.axisY.convertValueToPixel(h[n]),f=void 0!==l[n]?l[n]:x,l[n]=s);else if(t.axisY.scaleBreaks&&0<t.axisY.scaleBreaks._appliedBreaks.length&&0>=y[p].y)d[n]=y[p].y+(d[n]?d[n]:0),f=t.axisY.convertValueToPixel(d[n]),s=void 0!==r[n]?r[n]:x,r[n]=f;else if(s=t.axisY.convertValueToPixel(y[p].y),0<=y[p].y){var w=void 0!==l[n]?l[n]:0;s-=w,f=x-w,l[n]=w+(f-s)}else f=s+(w=r[n]?r[n]:0),s=x+w,r[n]=w+(f-s);n=y[p].color?y[p].color:b._colorSet[p%b._colorSet.length],pt(i,k,s,M,f,n,0,null,v&&0<=y[p].y,0>y[p].y&&v,!1,!1,b.fillOpacity),n=b.dataPointIds[p],this._eventManager.objectMap[n]={id:n,objectType:"dataPoint",dataSeriesIndex:g,dataPointIndex:p,x1:k,y1:s,x2:M,y2:f},n=c(n),N&&pt(this._eventManager.ghostCtx,k,s,M,f,n,0,null,!1,!1,!1,!1),(y[p].indexLabel||b.indexLabel||y[p].indexLabelFormatter||b.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedColumn",dataPoint:y[p],dataSeries:b,point:{x:a,y:0<=y[p].y?s:f},direction:0>y[p].y===t.axisY.reversed?1:-1,bounds:{x1:k,y1:Math.min(s,f),x2:M,y2:Math.max(s,f)},color:n})}}}return N&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.globalCompositeOperation="source-atop",t.axisX.maskCanvas&&i.drawImage(t.axisX.maskCanvas,0,0,this.width,this.height),t.axisY.maskCanvas&&i.drawImage(t.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.clearRect(o.x1,o.y1,o.width,o.height),this._eventManager.ghostCtx.restore()),i.restore(),{source:e,dest:this.plotArea.ctx,animationCallback:Q.yScaleAnimation,easingFunction:Q.easing.easeOutQuart,animationBase:x<t.axisY.bounds.y1?t.axisY.bounds.y1:x>t.axisY.bounds.y2?t.axisY.bounds.y2:x}}},e.prototype.renderStackedColumn100=function(t){var e=t.targetCanvasCtx||this.plotArea.ctx,i=N?this._preRenderCtx:e;if(!(0>=t.dataSeriesIndexes.length)){var a,s,n=null,o=this.plotArea,l=[],r=[],h=[],d=[],p=0,x=t.axisY.convertValueToPixel(t.axisY.logarithmic?t.axisY.viewportMinimum:0);p=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;a=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:.15*this.width<<0;var u=t.axisX.dataInfo.minDiff;isFinite(u)||(u=.3*Math.abs(t.axisX.range)),u=this.options.dataPointWidth?this.dataPointWidth:o.width*(t.axisX.logarithmic?Math.log(u)/Math.log(t.axisX.range):Math.abs(u)/Math.abs(t.axisX.range))/t.plotType.plotUnits.length*.9<<0,this.dataPointMaxWidth&&p>a&&(p=Math.min(this.options.dataPointWidth?this.dataPointWidth:1/0,a)),!this.dataPointMaxWidth&&this.dataPointMinWidth&&a<p&&(a=Math.max(this.options.dataPointWidth?this.dataPointWidth:-1/0,p)),u<p&&(u=p),u>a&&(u=a),i.save(),N&&this._eventManager.ghostCtx.save(),i.beginPath(),i.rect(o.x1,o.y1,o.width,o.height),i.clip(),N&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(o.x1,o.y1,o.width,o.height),this._eventManager.ghostCtx.clip());for(var m=0;m<t.dataSeriesIndexes.length;m++){var g=t.dataSeriesIndexes[m],b=this.data[g],y=b.dataPoints;if(0<y.length){var v=!!(5<u&&b.bevelEnabled);for(p=0;p<y.length;p++)if(!((n=y[p].x.getTime?y[p].x.getTime():y[p].x)<t.axisX.dataInfo.viewPortMin||n>t.axisX.dataInfo.viewPortMax)&&"number"==typeof y[p].y){a=t.axisX.convertValueToPixel(n),s=0!==t.dataPointYSums[n]?y[p].y/t.dataPointYSums[n]*100:0;var f,k=a-t.plotType.plotUnits.length*u/2+t.index*u<<0,M=k+u<<0;if(t.axisY.logarithmic||t.axisY.scaleBreaks&&0<t.axisY.scaleBreaks._appliedBreaks.length&&0<y[p].y){if(h[n]=s+(void 0!==h[n]?h[n]:0),0>=h[n])continue;s=t.axisY.convertValueToPixel(h[n]),f=l[n]?l[n]:x,l[n]=s}else if(t.axisY.scaleBreaks&&0<t.axisY.scaleBreaks._appliedBreaks.length&&0>=y[p].y)d[n]=s+(void 0!==d[n]?d[n]:0),f=t.axisY.convertValueToPixel(d[n]),s=r[n]?r[n]:x,r[n]=f;else if(s=t.axisY.convertValueToPixel(s),0<=y[p].y){var w=void 0!==l[n]?l[n]:0;s-=w,f=x-w,t.dataSeriesIndexes.length-1===m&&1>=Math.abs(o.y1-s)&&(s=o.y1),l[n]=w+(f-s)}else f=s+(w=void 0!==r[n]?r[n]:0),s=x+w,t.dataSeriesIndexes.length-1===m&&1>=Math.abs(o.y2-f)&&(f=o.y2),r[n]=w+(f-s);n=y[p].color?y[p].color:b._colorSet[p%b._colorSet.length],pt(i,k,s,M,f,n,0,null,v&&0<=y[p].y,0>y[p].y&&v,!1,!1,b.fillOpacity),n=b.dataPointIds[p],this._eventManager.objectMap[n]={id:n,objectType:"dataPoint",dataSeriesIndex:g,dataPointIndex:p,x1:k,y1:s,x2:M,y2:f},n=c(n),N&&pt(this._eventManager.ghostCtx,k,s,M,f,n,0,null,!1,!1,!1,!1),(y[p].indexLabel||b.indexLabel||y[p].indexLabelFormatter||b.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedColumn100",dataPoint:y[p],dataSeries:b,point:{x:a,y:0<=y[p].y?s:f},direction:0>y[p].y===t.axisY.reversed?1:-1,bounds:{x1:k,y1:Math.min(s,f),x2:M,y2:Math.max(s,f)},color:n})}}}return N&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.globalCompositeOperation="source-atop",t.axisX.maskCanvas&&i.drawImage(t.axisX.maskCanvas,0,0,this.width,this.height),t.axisY.maskCanvas&&i.drawImage(t.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.clearRect(o.x1,o.y1,o.width,o.height),this._eventManager.ghostCtx.restore()),i.restore(),{source:e,dest:this.plotArea.ctx,animationCallback:Q.yScaleAnimation,easingFunction:Q.easing.easeOutQuart,animationBase:x<t.axisY.bounds.y1?t.axisY.bounds.y1:x>t.axisY.bounds.y2?t.axisY.bounds.y2:x}}},e.prototype.renderBar=function(t){var e=t.targetCanvasCtx||this.plotArea.ctx,i=N?this._preRenderCtx:e;if(!(0>=t.dataSeriesIndexes.length)){var a,s,n,o=null,l=this.plotArea,r=0,h=t.axisY.convertValueToPixel(t.axisY.logarithmic?t.axisY.viewportMinimum:0),d=(r=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(.15*this.height,this.plotArea.height/t.plotType.totalDataSeries*.9)<<0),p=t.axisX.dataInfo.minDiff;for(isFinite(p)||(p=.3*Math.abs(t.axisX.range)),p=this.options.dataPointWidth?this.dataPointWidth:l.height*(t.axisX.logarithmic?Math.log(p)/Math.log(t.axisX.range):Math.abs(p)/Math.abs(t.axisX.range))/t.plotType.totalDataSeries*.9<<0,this.dataPointMaxWidth&&r>d&&(r=Math.min(this.options.dataPointWidth?this.dataPointWidth:1/0,d)),!this.dataPointMaxWidth&&this.dataPointMinWidth&&d<r&&(d=Math.max(this.options.dataPointWidth?this.dataPointWidth:-1/0,r)),p<r&&(p=r),p>d&&(p=d),i.save(),N&&this._eventManager.ghostCtx.save(),i.beginPath(),i.rect(l.x1,l.y1,l.width,l.height),i.clip(),N&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(l.x1,l.y1,l.width,l.height),this._eventManager.ghostCtx.clip()),d=0;d<t.dataSeriesIndexes.length;d++){var x=t.dataSeriesIndexes[d],u=this.data[x],m=u.dataPoints;if(0<m.length){var g=!!(5<p&&u.bevelEnabled);for(i.strokeStyle="#4572A7 ",r=0;r<m.length;r++)if(!((n=m[r].getTime?m[r].x.getTime():m[r].x)<t.axisX.dataInfo.viewPortMin||n>t.axisX.dataInfo.viewPortMax)&&"number"==typeof m[r].y){s=t.axisX.convertValueToPixel(n),a=t.axisY.convertValueToPixel(m[r].y),s=t.axisX.reversed?s+t.plotType.totalDataSeries*p/2-(t.previousDataSeriesCount+d)*p<<0:s-t.plotType.totalDataSeries*p/2+(t.previousDataSeriesCount+d)*p<<0;var b,y=t.axisX.reversed?s-p<<0:s+p<<0;0<=m[r].y?b=h:(b=a,a=h),o=m[r].color?m[r].color:u._colorSet[r%u._colorSet.length],pt(i,b,s,a,y,o,0,null,g,!1,!1,!1,u.fillOpacity),o=u.dataPointIds[r],this._eventManager.objectMap[o]={id:o,objectType:"dataPoint",dataSeriesIndex:x,dataPointIndex:r,x1:b,y1:s,x2:a,y2:y},o=c(o),N&&pt(this._eventManager.ghostCtx,b,s,a,y,o,0,null,!1,!1,!1,!1),(m[r].indexLabel||u.indexLabel||m[r].indexLabelFormatter||u.indexLabelFormatter)&&this._indexLabels.push({chartType:"bar",dataPoint:m[r],dataSeries:u,point:{x:0<=m[r].y?a:b,y:s+(y-s)/2},direction:0>m[r].y===t.axisY.reversed?1:-1,bounds:{x1:Math.min(b,a),y1:s,x2:Math.max(b,a),y2:y},color:o})}}}return N&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.globalCompositeOperation="source-atop",t.axisX.maskCanvas&&i.drawImage(t.axisX.maskCanvas,0,0,this.width,this.height),t.axisY.maskCanvas&&i.drawImage(t.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.clearRect(l.x1,l.y1,l.width,l.height),this._eventManager.ghostCtx.restore()),i.restore(),{source:e,dest:this.plotArea.ctx,animationCallback:Q.xScaleAnimation,easingFunction:Q.easing.easeOutQuart,animationBase:h<t.axisY.bounds.x1?t.axisY.bounds.x1:h>t.axisY.bounds.x2?t.axisY.bounds.x2:h}}},e.prototype.renderStackedBar=function(t){var e=t.targetCanvasCtx||this.plotArea.ctx,i=N?this._preRenderCtx:e;if(!(0>=t.dataSeriesIndexes.length)){var a,s,n=null,o=this.plotArea,l=[],r=[],h=[],d=[],p=0,x=t.axisY.convertValueToPixel(t.axisY.logarithmic?t.axisY.viewportMinimum:0);p=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;s=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:.15*this.height<<0;var u=t.axisX.dataInfo.minDiff;isFinite(u)||(u=.3*Math.abs(t.axisX.range)),u=this.options.dataPointWidth?this.dataPointWidth:o.height*(t.axisX.logarithmic?Math.log(u)/Math.log(t.axisX.range):Math.abs(u)/Math.abs(t.axisX.range))/t.plotType.plotUnits.length*.9<<0,this.dataPointMaxWidth&&p>s&&(p=Math.min(this.options.dataPointWidth?this.dataPointWidth:1/0,s)),!this.dataPointMaxWidth&&this.dataPointMinWidth&&s<p&&(s=Math.max(this.options.dataPointWidth?this.dataPointWidth:-1/0,p)),u<p&&(u=p),u>s&&(u=s),i.save(),N&&this._eventManager.ghostCtx.save(),i.beginPath(),i.rect(o.x1,o.y1,o.width,o.height),i.clip(),N&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(o.x1,o.y1,o.width,o.height),this._eventManager.ghostCtx.clip());for(var m=0;m<t.dataSeriesIndexes.length;m++){var g=t.dataSeriesIndexes[m],b=this.data[g],y=b.dataPoints;if(0<y.length){var v=!!(5<u&&b.bevelEnabled);for(i.strokeStyle="#4572A7 ",p=0;p<y.length;p++)if(!((n=y[p].x.getTime?y[p].x.getTime():y[p].x)<t.axisX.dataInfo.viewPortMin||n>t.axisX.dataInfo.viewPortMax)&&"number"==typeof y[p].y){var f,k=(s=t.axisX.convertValueToPixel(n))-t.plotType.plotUnits.length*u/2+t.index*u<<0,M=k+u<<0;if(t.axisY.logarithmic||t.axisY.scaleBreaks&&0<t.axisY.scaleBreaks._appliedBreaks.length&&0<y[p].y)h[n]=y[p].y+(h[n]?h[n]:0),0<h[n]&&(f=l[n]?l[n]:x,l[n]=a=t.axisY.convertValueToPixel(h[n]));else if(t.axisY.scaleBreaks&&0<t.axisY.scaleBreaks._appliedBreaks.length&&0>=y[p].y)d[n]=y[p].y+(d[n]?d[n]:0),a=r[n]?r[n]:x,r[n]=f=t.axisY.convertValueToPixel(d[n]);else if(a=t.axisY.convertValueToPixel(y[p].y),0<=y[p].y){var w=l[n]?l[n]:0;f=x+w,a+=w,l[n]=w+(a-f)}else f=a-(w=r[n]?r[n]:0),a=x-w,r[n]=w+(a-f);n=y[p].color?y[p].color:b._colorSet[p%b._colorSet.length],pt(i,f,k,a,M,n,0,null,v,!1,!1,!1,b.fillOpacity),n=b.dataPointIds[p],this._eventManager.objectMap[n]={id:n,objectType:"dataPoint",dataSeriesIndex:g,dataPointIndex:p,x1:f,y1:k,x2:a,y2:M},n=c(n),N&&pt(this._eventManager.ghostCtx,f,k,a,M,n,0,null,!1,!1,!1,!1),(y[p].indexLabel||b.indexLabel||y[p].indexLabelFormatter||b.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar",dataPoint:y[p],dataSeries:b,point:{x:0<=y[p].y?a:f,y:s},direction:0>y[p].y===t.axisY.reversed?1:-1,bounds:{x1:Math.min(f,a),y1:k,x2:Math.max(f,a),y2:M},color:n})}}}return N&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.globalCompositeOperation="source-atop",t.axisX.maskCanvas&&i.drawImage(t.axisX.maskCanvas,0,0,this.width,this.height),t.axisY.maskCanvas&&i.drawImage(t.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.clearRect(o.x1,o.y1,o.width,o.height),this._eventManager.ghostCtx.restore()),i.restore(),{source:e,dest:this.plotArea.ctx,animationCallback:Q.xScaleAnimation,easingFunction:Q.easing.easeOutQuart,animationBase:x<t.axisY.bounds.x1?t.axisY.bounds.x1:x>t.axisY.bounds.x2?t.axisY.bounds.x2:x}}},e.prototype.renderStackedBar100=function(t){var e=t.targetCanvasCtx||this.plotArea.ctx,i=N?this._preRenderCtx:e;if(!(0>=t.dataSeriesIndexes.length)){var a,s,n=null,o=this.plotArea,l=[],r=[],h=[],d=[],p=0,x=t.axisY.convertValueToPixel(t.axisY.logarithmic?t.axisY.viewportMinimum:0);p=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;s=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:.15*this.height<<0;var u=t.axisX.dataInfo.minDiff;isFinite(u)||(u=.3*Math.abs(t.axisX.range)),u=this.options.dataPointWidth?this.dataPointWidth:o.height*(t.axisX.logarithmic?Math.log(u)/Math.log(t.axisX.range):Math.abs(u)/Math.abs(t.axisX.range))/t.plotType.plotUnits.length*.9<<0,this.dataPointMaxWidth&&p>s&&(p=Math.min(this.options.dataPointWidth?this.dataPointWidth:1/0,s)),!this.dataPointMaxWidth&&this.dataPointMinWidth&&s<p&&(s=Math.max(this.options.dataPointWidth?this.dataPointWidth:-1/0,p)),u<p&&(u=p),u>s&&(u=s),i.save(),N&&this._eventManager.ghostCtx.save(),i.beginPath(),i.rect(o.x1,o.y1,o.width,o.height),i.clip(),N&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(o.x1,o.y1,o.width,o.height),this._eventManager.ghostCtx.clip());for(var m=0;m<t.dataSeriesIndexes.length;m++){var g=t.dataSeriesIndexes[m],b=this.data[g],y=b.dataPoints;if(0<y.length){var v=!!(5<u&&b.bevelEnabled);for(i.strokeStyle="#4572A7 ",p=0;p<y.length;p++)if(!((n=y[p].x.getTime?y[p].x.getTime():y[p].x)<t.axisX.dataInfo.viewPortMin||n>t.axisX.dataInfo.viewPortMax)&&"number"==typeof y[p].y){var f;s=t.axisX.convertValueToPixel(n),f=0!==t.dataPointYSums[n]?y[p].y/t.dataPointYSums[n]*100:0;var k=s-t.plotType.plotUnits.length*u/2+t.index*u<<0,M=k+u<<0;if(t.axisY.logarithmic||t.axisY.scaleBreaks&&0<t.axisY.scaleBreaks._appliedBreaks.length&&0<y[p].y){if(h[n]=f+(h[n]?h[n]:0),0>=h[n])continue;f=l[n]?l[n]:x,l[n]=a=t.axisY.convertValueToPixel(h[n])}else if(t.axisY.scaleBreaks&&0<t.axisY.scaleBreaks._appliedBreaks.length&&0>=y[p].y)d[n]=f+(d[n]?d[n]:0),a=r[n]?r[n]:x,r[n]=f=t.axisY.convertValueToPixel(d[n]);else if(a=t.axisY.convertValueToPixel(f),0<=y[p].y){var w=l[n]?l[n]:0;f=x+w,a+=w,t.dataSeriesIndexes.length-1===m&&1>=Math.abs(o.x2-a)&&(a=o.x2),l[n]=w+(a-f)}else f=a-(w=r[n]?r[n]:0),a=x-w,t.dataSeriesIndexes.length-1===m&&1>=Math.abs(o.x1-f)&&(f=o.x1),r[n]=w+(a-f);n=y[p].color?y[p].color:b._colorSet[p%b._colorSet.length],pt(i,f,k,a,M,n,0,null,v,!1,!1,!1,b.fillOpacity),n=b.dataPointIds[p],this._eventManager.objectMap[n]={id:n,objectType:"dataPoint",dataSeriesIndex:g,dataPointIndex:p,x1:f,y1:k,x2:a,y2:M},n=c(n),N&&pt(this._eventManager.ghostCtx,f,k,a,M,n,0,null,!1,!1,!1,!1),(y[p].indexLabel||b.indexLabel||y[p].indexLabelFormatter||b.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedBar100",dataPoint:y[p],dataSeries:b,point:{x:0<=y[p].y?a:f,y:s},direction:0>y[p].y===t.axisY.reversed?1:-1,bounds:{x1:Math.min(f,a),y1:k,x2:Math.max(f,a),y2:M},color:n})}}}return N&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.globalCompositeOperation="source-atop",t.axisX.maskCanvas&&i.drawImage(t.axisX.maskCanvas,0,0,this.width,this.height),t.axisY.maskCanvas&&i.drawImage(t.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.clearRect(o.x1,o.y1,o.width,o.height),this._eventManager.ghostCtx.restore()),i.restore(),{source:e,dest:this.plotArea.ctx,animationCallback:Q.xScaleAnimation,easingFunction:Q.easing.easeOutQuart,animationBase:x<t.axisY.bounds.x1?t.axisY.bounds.x1:x>t.axisY.bounds.x2?t.axisY.bounds.x2:x}}},e.prototype.renderArea=function(t){var e,i;function a(){T&&(0<m.lineThickness&&n.stroke(),t.axisY.logarithmic||0>=t.axisY.viewportMinimum&&0<=t.axisY.viewportMaximum?k=w:0>t.axisY.viewportMaximum?k=h.y1:0<t.axisY.viewportMinimum&&(k=r.y2),n.lineTo(y,k),n.lineTo(T.x,k),n.closePath(),n.globalAlpha=m.fillOpacity,n.fill(),n.globalAlpha=1,N&&(l.lineTo(y,k),l.lineTo(T.x,k),l.closePath(),l.fill()),n.beginPath(),n.moveTo(y,v),l.beginPath(),l.moveTo(y,v),T={x:y,y:v})}var s=t.targetCanvasCtx||this.plotArea.ctx,n=N?this._preRenderCtx:s;if(!(0>=t.dataSeriesIndexes.length)){var o,l=this._eventManager.ghostCtx,r=t.axisX.lineCoordinates,h=t.axisY.lineCoordinates,d=[],p=this.plotArea;n.save(),N&&l.save(),n.beginPath(),n.rect(p.x1,p.y1,p.width,p.height),n.clip(),N&&(l.beginPath(),l.rect(p.x1,p.y1,p.width,p.height),l.clip());for(var x=0;x<t.dataSeriesIndexes.length;x++){var u=t.dataSeriesIndexes[x],m=this.data[u],g=m.dataPoints;d=m.id;this._eventManager.objectMap[d]={objectType:"dataSeries",dataSeriesIndex:u},d=c(d),l.fillStyle=d,d=[],e=!0;var y,v,f,k,M=0,w=t.axisY.convertValueToPixel(t.axisY.logarithmic?t.axisY.viewportMinimum:0),T=null;if(0<g.length){var P=m._colorSet[M%m._colorSet.length],C=m.lineColor=m.options.lineColor||P,S=C;if(n.fillStyle=P,n.strokeStyle=C,n.lineWidth=m.lineThickness,i="solid",n.setLineDash){var A=b(m.nullDataLineDashType,m.lineThickness),_=b(i=m.lineDashType,m.lineThickness);n.setLineDash(_)}for(var B=!0;M<g.length;M++)if(!((f=g[M].x.getTime?g[M].x.getTime():g[M].x)<t.axisX.dataInfo.viewPortMin||f>t.axisX.dataInfo.viewPortMax&&(!m.connectNullData||!B)))if("number"!=typeof g[M].y)m.connectNullData||B||e||a(),B=!0;else{y=t.axisX.convertValueToPixel(f),v=t.axisY.convertValueToPixel(g[M].y),e||B?(!e&&m.connectNullData?(n.setLineDash&&(m.options.nullDataLineDashType||i===m.lineDashType&&m.lineDashType!==m.nullDataLineDashType)&&(e=y,i=v,y=o.x,v=o.y,a(),n.moveTo(o.x,o.y),y=e,v=i,T=o,i=m.nullDataLineDashType,n.setLineDash(A)),n.lineTo(y,v),N&&l.lineTo(y,v)):(n.beginPath(),n.moveTo(y,v),N&&(l.beginPath(),l.moveTo(y,v)),T={x:y,y:v}),B=e=!1):(n.lineTo(y,v),N&&l.lineTo(y,v),0==M%250&&a()),o={x:y,y:v},M<g.length-1&&(S!==(g[M].lineColor||C)||i!==(g[M].lineDashType||m.lineDashType))&&(a(),S=g[M].lineColor||C,n.strokeStyle=S,n.setLineDash&&(g[M].lineDashType?(i=g[M].lineDashType,n.setLineDash(b(i,m.lineThickness))):(i=m.lineDashType,n.setLineDash(_))));var F=m.dataPointIds[M];this._eventManager.objectMap[F]={id:F,objectType:"dataPoint",dataSeriesIndex:u,dataPointIndex:M,x1:y,y1:v},0!==g[M].markerSize&&(0<g[M].markerSize||0<m.markerSize)&&(f=m.getMarkerProperties(M,y,v,n),d.push(f),F=c(F),N&&d.push({x:y,y:v,ctx:l,type:f.type,size:f.size,color:F,borderColor:F,borderThickness:f.borderThickness})),(g[M].indexLabel||m.indexLabel||g[M].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"area",dataPoint:g[M],dataSeries:m,point:{x:y,y:v},direction:0>g[M].y===t.axisY.reversed?1:-1,color:P})}a(),Z.drawMarkers(d)}}return N&&(s.drawImage(this._preRenderCanvas,0,0,this.width,this.height),n.globalCompositeOperation="source-atop",t.axisX.maskCanvas&&n.drawImage(t.axisX.maskCanvas,0,0,this.width,this.height),t.axisY.maskCanvas&&n.drawImage(t.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),n.clearRect(p.x1,p.y1,p.width,p.height),this._eventManager.ghostCtx.restore()),n.restore(),{source:s,dest:this.plotArea.ctx,animationCallback:Q.xClipAnimation,easingFunction:Q.easing.linear,animationBase:0}}},e.prototype.renderSplineArea=function(t){function e(){var e=a(M,2);if(0<e.length){if(0<x.lineThickness){s.beginPath(),s.moveTo(e[0].x,e[0].y),e[0].newStrokeStyle&&(s.strokeStyle=e[0].newStrokeStyle),e[0].newLineDashArray&&s.setLineDash(e[0].newLineDashArray);for(var i=0;i<e.length-3;i+=3)s.bezierCurveTo(e[i+1].x,e[i+1].y,e[i+2].x,e[i+2].y,e[i+3].x,e[i+3].y),N&&n.bezierCurveTo(e[i+1].x,e[i+1].y,e[i+2].x,e[i+2].y,e[i+3].x,e[i+3].y),(e[i+3].newStrokeStyle||e[i+3].newLineDashArray)&&(s.stroke(),s.beginPath(),s.moveTo(e[i+3].x,e[i+3].y),e[i+3].newStrokeStyle&&(s.strokeStyle=e[i+3].newStrokeStyle),e[i+3].newLineDashArray&&s.setLineDash(e[i+3].newLineDashArray));s.stroke()}for(s.beginPath(),s.moveTo(e[0].x,e[0].y),N&&(n.beginPath(),n.moveTo(e[0].x,e[0].y)),i=0;i<e.length-3;i+=3)s.bezierCurveTo(e[i+1].x,e[i+1].y,e[i+2].x,e[i+2].y,e[i+3].x,e[i+3].y),N&&n.bezierCurveTo(e[i+1].x,e[i+1].y,e[i+2].x,e[i+2].y,e[i+3].x,e[i+3].y);t.axisY.logarithmic||0>=t.axisY.viewportMinimum&&0<=t.axisY.viewportMaximum?y=f:0>t.axisY.viewportMaximum?y=l.y1:0<t.axisY.viewportMinimum&&(y=o.y2),k={x:e[0].x,y:e[0].y},s.lineTo(e[e.length-1].x,y),s.lineTo(k.x,y),s.closePath(),s.globalAlpha=x.fillOpacity,s.fill(),s.globalAlpha=1,N&&(n.lineTo(e[e.length-1].x,y),n.lineTo(k.x,y),n.closePath(),n.fill())}}var i=t.targetCanvasCtx||this.plotArea.ctx,s=N?this._preRenderCtx:i;if(!(0>=t.dataSeriesIndexes.length)){var n=this._eventManager.ghostCtx,o=t.axisX.lineCoordinates,l=t.axisY.lineCoordinates,r=[],h=this.plotArea;s.save(),N&&n.save(),s.beginPath(),s.rect(h.x1,h.y1,h.width,h.height),s.clip(),N&&(n.beginPath(),n.rect(h.x1,h.y1,h.width,h.height),n.clip());for(var d=0;d<t.dataSeriesIndexes.length;d++){var p=t.dataSeriesIndexes[d],x=this.data[p],u=x.dataPoints;r=x.id;this._eventManager.objectMap[r]={objectType:"dataSeries",dataSeriesIndex:p},r=c(r),n.fillStyle=r;r=[];var m,g,y,v=0,f=t.axisY.convertValueToPixel(t.axisY.logarithmic?t.axisY.viewportMinimum:0),k=null,M=[];if(0<u.length){var w=x._colorSet[v%x._colorSet.length],T=x.lineColor=x.options.lineColor||w,P=T;s.fillStyle=w,s.strokeStyle=T,s.lineWidth=x.lineThickness;var C="solid";if(s.setLineDash){var S=b(x.nullDataLineDashType,x.lineThickness),A=b(C=x.lineDashType,x.lineThickness);s.setLineDash(A)}for(g=!1;v<u.length;v++)if(!((m=u[v].x.getTime?u[v].x.getTime():u[v].x)<t.axisX.dataInfo.viewPortMin||m>t.axisX.dataInfo.viewPortMax&&(!x.connectNullData||!g)))if("number"!=typeof u[v].y)0<v&&!g&&(x.connectNullData?s.setLineDash&&0<M.length&&(x.options.nullDataLineDashType||!u[v-1].lineDashType)&&(M[M.length-1].newLineDashArray=S,C=x.nullDataLineDashType):(e(),M=[])),g=!0;else{m=t.axisX.convertValueToPixel(m),g=t.axisY.convertValueToPixel(u[v].y);var _=x.dataPointIds[v];if(this._eventManager.objectMap[_]={id:_,objectType:"dataPoint",dataSeriesIndex:p,dataPointIndex:v,x1:m,y1:g},M[M.length]={x:m,y:g},v<u.length-1&&(P!==(u[v].lineColor||T)||C!==(u[v].lineDashType||x.lineDashType))&&(P=u[v].lineColor||T,M[M.length-1].newStrokeStyle=P,s.setLineDash&&(u[v].lineDashType?(C=u[v].lineDashType,M[M.length-1].newLineDashArray=b(C,x.lineThickness)):(C=x.lineDashType,M[M.length-1].newLineDashArray=A))),0!==u[v].markerSize&&(0<u[v].markerSize||0<x.markerSize)){var B=x.getMarkerProperties(v,m,g,s);r.push(B),_=c(_),N&&r.push({x:m,y:g,ctx:n,type:B.type,size:B.size,color:_,borderColor:_,borderThickness:B.borderThickness})}(u[v].indexLabel||x.indexLabel||u[v].indexLabelFormatter||x.indexLabelFormatter)&&this._indexLabels.push({chartType:"splineArea",dataPoint:u[v],dataSeries:x,point:{x:m,y:g},direction:0>u[v].y===t.axisY.reversed?1:-1,color:w}),g=!1}e(),Z.drawMarkers(r)}}return N&&(i.drawImage(this._preRenderCanvas,0,0,this.width,this.height),s.globalCompositeOperation="source-atop",t.axisX.maskCanvas&&s.drawImage(t.axisX.maskCanvas,0,0,this.width,this.height),t.axisY.maskCanvas&&s.drawImage(t.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),s.clearRect(h.x1,h.y1,h.width,h.height),this._eventManager.ghostCtx.restore()),s.restore(),{source:i,dest:this.plotArea.ctx,animationCallback:Q.xClipAnimation,easingFunction:Q.easing.linear,animationBase:0}}},e.prototype.renderStepArea=function(t){var e,i;function a(){T&&(0<m.lineThickness&&n.stroke(),t.axisY.logarithmic||0>=t.axisY.viewportMinimum&&0<=t.axisY.viewportMaximum?k=w:0>t.axisY.viewportMaximum?k=h.y1:0<t.axisY.viewportMinimum&&(k=r.y2),n.lineTo(y,k),n.lineTo(T.x,k),n.closePath(),n.globalAlpha=m.fillOpacity,n.fill(),n.globalAlpha=1,N&&(l.lineTo(y,k),l.lineTo(T.x,k),l.closePath(),l.fill()),n.beginPath(),n.moveTo(y,v),l.beginPath(),l.moveTo(y,v),T={x:y,y:v})}var s=t.targetCanvasCtx||this.plotArea.ctx,n=N?this._preRenderCtx:s;if(!(0>=t.dataSeriesIndexes.length)){var o,l=this._eventManager.ghostCtx,r=t.axisX.lineCoordinates,h=t.axisY.lineCoordinates,d=[],p=this.plotArea;n.save(),N&&l.save(),n.beginPath(),n.rect(p.x1,p.y1,p.width,p.height),n.clip(),N&&(l.beginPath(),l.rect(p.x1,p.y1,p.width,p.height),l.clip());for(var x=0;x<t.dataSeriesIndexes.length;x++){var u=t.dataSeriesIndexes[x],m=this.data[u],g=m.dataPoints;d=m.id;this._eventManager.objectMap[d]={objectType:"dataSeries",dataSeriesIndex:u},d=c(d),l.fillStyle=d,d=[],e=!0;var y,v,f,k,M=0,w=t.axisY.convertValueToPixel(t.axisY.logarithmic?t.axisY.viewportMinimum:0),T=null;if(i=!1,0<g.length){var P=m._colorSet[M%m._colorSet.length],C=m.lineColor=m.options.lineColor||P,S=C;n.fillStyle=P,n.strokeStyle=C,n.lineWidth=m.lineThickness;var A="solid";if(n.setLineDash){var _=b(m.nullDataLineDashType,m.lineThickness),B=b(A=m.lineDashType,m.lineThickness);n.setLineDash(B)}for(;M<g.length;M++)if(!((f=g[M].x.getTime?g[M].x.getTime():g[M].x)<t.axisX.dataInfo.viewPortMin||f>t.axisX.dataInfo.viewPortMax&&(!m.connectNullData||!i))){var F=v;"number"!=typeof g[M].y?(m.connectNullData||i||e||a(),i=!0):(y=t.axisX.convertValueToPixel(f),v=t.axisY.convertValueToPixel(g[M].y),e||i?(!e&&m.connectNullData?(n.setLineDash&&(m.options.nullDataLineDashType||A===m.lineDashType&&m.lineDashType!==m.nullDataLineDashType)&&(e=y,i=v,y=o.x,v=o.y,a(),n.moveTo(o.x,o.y),y=e,v=i,T=o,A=m.nullDataLineDashType,n.setLineDash(_)),n.lineTo(y,F),n.lineTo(y,v),N&&(l.lineTo(y,F),l.lineTo(y,v))):(n.beginPath(),n.moveTo(y,v),N&&(l.beginPath(),l.moveTo(y,v)),T={x:y,y:v}),i=e=!1):(n.lineTo(y,F),N&&l.lineTo(y,F),n.lineTo(y,v),N&&l.lineTo(y,v),0==M%250&&a()),o={x:y,y:v},M<g.length-1&&(S!==(g[M].lineColor||C)||A!==(g[M].lineDashType||m.lineDashType))&&(a(),S=g[M].lineColor||C,n.strokeStyle=S,n.setLineDash&&(g[M].lineDashType?(A=g[M].lineDashType,n.setLineDash(b(A,m.lineThickness))):(A=m.lineDashType,n.setLineDash(B)))),f=m.dataPointIds[M],this._eventManager.objectMap[f]={id:f,objectType:"dataPoint",dataSeriesIndex:u,dataPointIndex:M,x1:y,y1:v},0!==g[M].markerSize&&(0<g[M].markerSize||0<m.markerSize)&&(F=m.getMarkerProperties(M,y,v,n),d.push(F),f=c(f),N&&d.push({x:y,y:v,ctx:l,type:F.type,size:F.size,color:f,borderColor:f,borderThickness:F.borderThickness})),(g[M].indexLabel||m.indexLabel||g[M].indexLabelFormatter||m.indexLabelFormatter)&&this._indexLabels.push({chartType:"stepArea",dataPoint:g[M],dataSeries:m,point:{x:y,y:v},direction:0>g[M].y===t.axisY.reversed?1:-1,color:P}))}a(),Z.drawMarkers(d)}}return N&&(s.drawImage(this._preRenderCanvas,0,0,this.width,this.height),n.globalCompositeOperation="source-atop",t.axisX.maskCanvas&&n.drawImage(t.axisX.maskCanvas,0,0,this.width,this.height),t.axisY.maskCanvas&&n.drawImage(t.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),n.clearRect(p.x1,p.y1,p.width,p.height),this._eventManager.ghostCtx.restore()),n.restore(),{source:s,dest:this.plotArea.ctx,animationCallback:Q.xClipAnimation,easingFunction:Q.easing.linear,animationBase:0}}},e.prototype.renderStackedArea=function(t){function e(){if(!(1>g.length)){for(0<P.lineThickness&&a.stroke();0<g.length;){var t=g.pop();a.lineTo(t.x,t.y),N&&M.lineTo(t.x,t.y)}a.closePath(),a.globalAlpha=P.fillOpacity,a.fill(),a.globalAlpha=1,a.beginPath(),N&&(M.closePath(),M.fill(),M.beginPath()),g=[]}}var i=t.targetCanvasCtx||this.plotArea.ctx,a=N?this._preRenderCtx:i;if(!(0>=t.dataSeriesIndexes.length)){var s,n,o,l,r,d=null,p=null,x=[],u=this.plotArea,m=[],g=[],y=[],v=[],f=0,k=t.axisY.convertValueToPixel(t.axisY.logarithmic?t.axisY.viewportMinimum:0),M=this._eventManager.ghostCtx;N&&M.beginPath(),a.save(),N&&M.save(),a.beginPath(),a.rect(u.x1,u.y1,u.width,u.height),a.clip(),N&&(M.beginPath(),M.rect(u.x1,u.y1,u.width,u.height),M.clip());d=[];for(var w=0;w<t.dataSeriesIndexes.length;w++){var T=t.dataSeriesIndexes[w],P=this.data[T],C=P.dataPoints;for(P.dataPointIndexes=[],f=0;f<C.length;f++)T=C[f].x.getTime?C[f].x.getTime():C[f].x,P.dataPointIndexes[T]=f,d[T]||(y.push(T),d[T]=!0);y.sort(h)}for(w=0;w<t.dataSeriesIndexes.length;w++){if(T=t.dataSeriesIndexes[w],C=(P=this.data[T]).dataPoints,l=!0,g=[],f=P.id,this._eventManager.objectMap[f]={objectType:"dataSeries",dataSeriesIndex:T},f=c(f),M.fillStyle=f,0<y.length){d=P._colorSet[0];var S=P.lineColor=P.options.lineColor||d,A=S;if(a.fillStyle=d,a.strokeStyle=S,a.lineWidth=P.lineThickness,r="solid",a.setLineDash){var _=b(P.nullDataLineDashType,P.lineThickness),B=b(r=P.lineDashType,P.lineThickness);a.setLineDash(B)}var F=!0;for(f=0;f<y.length;f++){p=y[f];var L=0<=P.dataPointIndexes[p]?C[P.dataPointIndexes[p]]:{x:p,y:null};if(!(p<t.axisX.dataInfo.viewPortMin||p>t.axisX.dataInfo.viewPortMax&&(!P.connectNullData||!F)))if("number"!=typeof L.y)P.connectNullData||F||l||e(),F=!0;else{s=t.axisX.convertValueToPixel(p);var I=m[p]?m[p]:0;if(t.axisY.logarithmic||t.axisY.scaleBreaks&&0<t.axisY.scaleBreaks._appliedBreaks.length){if(v[p]=L.y+(v[p]?v[p]:0),0>=v[p]&&t.axisY.logarithmic)continue;n=t.axisY.convertValueToPixel(v[p])}else n=t.axisY.convertValueToPixel(L.y),n-=I;if(g.push({x:s,y:k-I}),m[p]=k-n,l||F?(!l&&P.connectNullData?(a.setLineDash&&(P.options.nullDataLineDashType||r===P.lineDashType&&P.lineDashType!==P.nullDataLineDashType)&&(l=g.pop(),r=g[g.length-1],e(),a.moveTo(o.x,o.y),g.push(r),g.push(l),r=P.nullDataLineDashType,a.setLineDash(_)),a.lineTo(s,n),N&&M.lineTo(s,n)):(a.beginPath(),a.moveTo(s,n),N&&(M.beginPath(),M.moveTo(s,n))),F=l=!1):(a.lineTo(s,n),N&&M.lineTo(s,n),0==f%250&&(e(),a.moveTo(s,n),N&&M.moveTo(s,n),g.push({x:s,y:k-I}))),o={x:s,y:n},f<C.length-1&&(A!==(C[f].lineColor||S)||r!==(C[f].lineDashType||P.lineDashType))&&(e(),a.beginPath(),a.moveTo(s,n),g.push({x:s,y:k-I}),A=C[f].lineColor||S,a.strokeStyle=A,a.setLineDash&&(C[f].lineDashType?(r=C[f].lineDashType,a.setLineDash(b(r,P.lineThickness))):(r=P.lineDashType,a.setLineDash(B)))),0<=P.dataPointIndexes[p]){var V=P.dataPointIds[P.dataPointIndexes[p]];this._eventManager.objectMap[V]={id:V,objectType:"dataPoint",dataSeriesIndex:T,dataPointIndex:P.dataPointIndexes[p],x1:s,y1:n}}0<=P.dataPointIndexes[p]&&0!==L.markerSize&&(0<L.markerSize||0<P.markerSize)&&(I=P.getMarkerProperties(P.dataPointIndexes[p],s,n,a),x.push(I),p=c(V),N&&x.push({x:s,y:n,ctx:M,type:I.type,size:I.size,color:p,borderColor:p,borderThickness:I.borderThickness})),(L.indexLabel||P.indexLabel||L.indexLabelFormatter||P.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedArea",dataPoint:L,dataSeries:P,point:{x:s,y:n},direction:0>C[f].y===t.axisY.reversed?1:-1,color:d})}}e(),a.moveTo(s,n),N&&M.moveTo(s,n)}delete P.dataPointIndexes}return Z.drawMarkers(x),N&&(i.drawImage(this._preRenderCanvas,0,0,this.width,this.height),a.globalCompositeOperation="source-atop",t.axisX.maskCanvas&&a.drawImage(t.axisX.maskCanvas,0,0,this.width,this.height),t.axisY.maskCanvas&&a.drawImage(t.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),a.clearRect(u.x1,u.y1,u.width,u.height),M.restore()),a.restore(),{source:i,dest:this.plotArea.ctx,animationCallback:Q.xClipAnimation,easingFunction:Q.easing.linear,animationBase:0}}},e.prototype.renderStackedArea100=function(t){function e(){for(0<P.lineThickness&&a.stroke();0<g.length;){var t=g.pop();a.lineTo(t.x,t.y),N&&M.lineTo(t.x,t.y)}a.closePath(),a.globalAlpha=P.fillOpacity,a.fill(),a.globalAlpha=1,a.beginPath(),N&&(M.closePath(),M.fill(),M.beginPath()),g=[]}var i=t.targetCanvasCtx||this.plotArea.ctx,a=N?this._preRenderCtx:i;if(!(0>=t.dataSeriesIndexes.length)){var s,n,o,l,r,d=null,p=null,x=this.plotArea,u=[],m=[],g=[],y=[],v=[],f=0,k=t.axisY.convertValueToPixel(t.axisY.logarithmic?t.axisY.viewportMinimum:0),M=this._eventManager.ghostCtx;a.save(),N&&M.save(),a.beginPath(),a.rect(x.x1,x.y1,x.width,x.height),a.clip(),N&&(M.beginPath(),M.rect(x.x1,x.y1,x.width,x.height),M.clip());d=[];for(var w=0;w<t.dataSeriesIndexes.length;w++){var T=t.dataSeriesIndexes[w],P=this.data[T],C=P.dataPoints;for(P.dataPointIndexes=[],f=0;f<C.length;f++)T=C[f].x.getTime?C[f].x.getTime():C[f].x,P.dataPointIndexes[T]=f,d[T]||(y.push(T),d[T]=!0);y.sort(h)}for(w=0;w<t.dataSeriesIndexes.length;w++){if(T=t.dataSeriesIndexes[w],C=(P=this.data[T]).dataPoints,l=!0,d=P.id,this._eventManager.objectMap[d]={objectType:"dataSeries",dataSeriesIndex:T},d=c(d),M.fillStyle=d,g=[],0<y.length){d=P._colorSet[f%P._colorSet.length];var S=P.lineColor=P.options.lineColor||d,A=S;if(a.fillStyle=d,a.strokeStyle=S,a.lineWidth=P.lineThickness,r="solid",a.setLineDash){var _=b(P.nullDataLineDashType,P.lineThickness),B=b(r=P.lineDashType,P.lineThickness);a.setLineDash(B)}var F=!0;for(f=0;f<y.length;f++){p=y[f];var L=0<=P.dataPointIndexes[p]?C[P.dataPointIndexes[p]]:{x:p,y:null};if(!(p<t.axisX.dataInfo.viewPortMin||p>t.axisX.dataInfo.viewPortMax&&(!P.connectNullData||!F)))if("number"!=typeof L.y)P.connectNullData||F||l||e(),F=!0;else{var I;I=0!==t.dataPointYSums[p]?L.y/t.dataPointYSums[p]*100:0,s=t.axisX.convertValueToPixel(p);var V=m[p]?m[p]:0;if(t.axisY.logarithmic||t.axisY.scaleBreaks&&0<t.axisY.scaleBreaks._appliedBreaks.length){if(v[p]=I+(v[p]?v[p]:0),0>=v[p]&&t.axisY.logarithmic)continue;n=t.axisY.convertValueToPixel(v[p])}else n=t.axisY.convertValueToPixel(I),n-=V;if(g.push({x:s,y:k-V}),m[p]=k-n,l||F?(!l&&P.connectNullData?(a.setLineDash&&(P.options.nullDataLineDashType||r===P.lineDashType&&P.lineDashType!==P.nullDataLineDashType)&&(l=g.pop(),r=g[g.length-1],e(),a.moveTo(o.x,o.y),g.push(r),g.push(l),r=P.nullDataLineDashType,a.setLineDash(_)),a.lineTo(s,n),N&&M.lineTo(s,n)):(a.beginPath(),a.moveTo(s,n),N&&(M.beginPath(),M.moveTo(s,n))),F=l=!1):(a.lineTo(s,n),N&&M.lineTo(s,n),0==f%250&&(e(),a.moveTo(s,n),N&&M.moveTo(s,n),g.push({x:s,y:k-V}))),o={x:s,y:n},f<C.length-1&&(A!==(C[f].lineColor||S)||r!==(C[f].lineDashType||P.lineDashType))&&(e(),a.beginPath(),a.moveTo(s,n),g.push({x:s,y:k-V}),A=C[f].lineColor||S,a.strokeStyle=A,a.setLineDash&&(C[f].lineDashType?(r=C[f].lineDashType,a.setLineDash(b(r,P.lineThickness))):(r=P.lineDashType,a.setLineDash(B)))),0<=P.dataPointIndexes[p]){var D=P.dataPointIds[P.dataPointIndexes[p]];this._eventManager.objectMap[D]={id:D,objectType:"dataPoint",dataSeriesIndex:T,dataPointIndex:P.dataPointIndexes[p],x1:s,y1:n}}0<=P.dataPointIndexes[p]&&0!==L.markerSize&&(0<L.markerSize||0<P.markerSize)&&(V=P.getMarkerProperties(f,s,n,a),u.push(V),p=c(D),N&&u.push({x:s,y:n,ctx:M,type:V.type,size:V.size,color:p,borderColor:p,borderThickness:V.borderThickness})),(L.indexLabel||P.indexLabel||L.indexLabelFormatter||P.indexLabelFormatter)&&this._indexLabels.push({chartType:"stackedArea100",dataPoint:L,dataSeries:P,point:{x:s,y:n},direction:0>C[f].y===t.axisY.reversed?1:-1,color:d})}}e(),a.moveTo(s,n),N&&M.moveTo(s,n)}delete P.dataPointIndexes}return Z.drawMarkers(u),N&&(i.drawImage(this._preRenderCanvas,0,0,this.width,this.height),a.globalCompositeOperation="source-atop",t.axisX.maskCanvas&&a.drawImage(t.axisX.maskCanvas,0,0,this.width,this.height),t.axisY.maskCanvas&&a.drawImage(t.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),a.clearRect(x.x1,x.y1,x.width,x.height),M.restore()),a.restore(),{source:i,dest:this.plotArea.ctx,animationCallback:Q.xClipAnimation,easingFunction:Q.easing.linear,animationBase:0}}},e.prototype.renderBubble=function(t){var e=t.targetCanvasCtx||this.plotArea.ctx,i=N?this._preRenderCtx:e;if(!(0>=t.dataSeriesIndexes.length)){var a,s,n=this.plotArea,o=0;i.save(),N&&this._eventManager.ghostCtx.save(),i.beginPath(),i.rect(n.x1,n.y1,n.width,n.height),i.clip(),N&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(n.x1,n.y1,n.width,n.height),this._eventManager.ghostCtx.clip());for(var l=-1/0,r=1/0,h=0;h<t.dataSeriesIndexes.length;h++){var d=t.dataSeriesIndexes[h],p=this.data[d],x=p.dataPoints,u=0;for(o=0;o<x.length;o++)(a=a=x[o].getTime?x[o].x.getTime():x[o].x)<t.axisX.dataInfo.viewPortMin||a>t.axisX.dataInfo.viewPortMax||void 0===x[o].z||((u=x[o].z)>l&&(l=u),u<r&&(r=u))}var m=25*Math.PI,g=Math.max(Math.pow(.25*Math.min(n.height,n.width)/2,2)*Math.PI,m);for(h=0;h<t.dataSeriesIndexes.length;h++)if(d=t.dataSeriesIndexes[h],0<(x=(p=this.data[d]).dataPoints).length)for(i.strokeStyle="#4572A7 ",o=0;o<x.length;o++)if(!((a=a=x[o].getTime?x[o].x.getTime():x[o].x)<t.axisX.dataInfo.viewPortMin||a>t.axisX.dataInfo.viewPortMax)&&"number"==typeof x[o].y){a=t.axisX.convertValueToPixel(a),s=t.axisY.convertValueToPixel(x[o].y);u=x[o].z;var b=2*Math.max(Math.sqrt((l===r?g/2:m+(g-m)/(l-r)*(u-r))/Math.PI)<<0,1);(u=p.getMarkerProperties(o,i)).size=b,i.globalAlpha=p.fillOpacity,Z.drawMarker(a,s,i,u.type,u.size,u.color,u.borderColor,u.borderThickness),i.globalAlpha=1;var y=p.dataPointIds[o];this._eventManager.objectMap[y]={id:y,objectType:"dataPoint",dataSeriesIndex:d,dataPointIndex:o,x1:a,y1:s,size:b},b=c(y),N&&Z.drawMarker(a,s,this._eventManager.ghostCtx,u.type,u.size,b,b,u.borderThickness),(x[o].indexLabel||p.indexLabel||x[o].indexLabelFormatter||p.indexLabelFormatter)&&this._indexLabels.push({chartType:"bubble",dataPoint:x[o],dataSeries:p,point:{x:a,y:s},direction:1,bounds:{x1:a-u.size/2,y1:s-u.size/2,x2:a+u.size/2,y2:s+u.size/2},color:null})}return N&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.globalCompositeOperation="source-atop",t.axisX.maskCanvas&&i.drawImage(t.axisX.maskCanvas,0,0,this.width,this.height),t.axisY.maskCanvas&&i.drawImage(t.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.clearRect(n.x1,n.y1,n.width,n.height),this._eventManager.ghostCtx.restore()),i.restore(),{source:e,dest:this.plotArea.ctx,animationCallback:Q.fadeInAnimation,easingFunction:Q.easing.easeInQuad,animationBase:0}}},e.prototype.renderScatter=function(t){var e=t.targetCanvasCtx||this.plotArea.ctx,i=N?this._preRenderCtx:e;if(!(0>=t.dataSeriesIndexes.length)){var a,s,n=this.plotArea,o=0;i.save(),N&&this._eventManager.ghostCtx.save(),i.beginPath(),i.rect(n.x1,n.y1,n.width,n.height),i.clip(),N&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(n.x1,n.y1,n.width,n.height),this._eventManager.ghostCtx.clip());for(var l=0;l<t.dataSeriesIndexes.length;l++){var r=t.dataSeriesIndexes[l],h=this.data[r],d=h.dataPoints;if(0<d.length){i.strokeStyle="#4572A7 ",Math.pow(.3*Math.min(n.height,n.width)/2,2);var p=0,x=0;for(o=0;o<d.length;o++)if(!((a=a=d[o].getTime?d[o].x.getTime():d[o].x)<t.axisX.dataInfo.viewPortMin||a>t.axisX.dataInfo.viewPortMax)&&"number"==typeof d[o].y){a=t.axisX.convertValueToPixel(a),s=t.axisY.convertValueToPixel(d[o].y);var u=h.getMarkerProperties(o,a,s,i);i.globalAlpha=h.fillOpacity,Z.drawMarker(u.x,u.y,u.ctx,u.type,u.size,u.color,u.borderColor,u.borderThickness),i.globalAlpha=1,Math.sqrt((p-a)*(p-a)+(x-s)*(x-s))<Math.min(u.size,5)&&d.length>Math.min(this.plotArea.width,this.plotArea.height)||(p=h.dataPointIds[o],this._eventManager.objectMap[p]={id:p,objectType:"dataPoint",dataSeriesIndex:r,dataPointIndex:o,x1:a,y1:s},p=c(p),N&&Z.drawMarker(u.x,u.y,this._eventManager.ghostCtx,u.type,u.size,p,p,u.borderThickness),(d[o].indexLabel||h.indexLabel||d[o].indexLabelFormatter||h.indexLabelFormatter)&&this._indexLabels.push({chartType:"scatter",dataPoint:d[o],dataSeries:h,point:{x:a,y:s},direction:1,bounds:{x1:a-u.size/2,y1:s-u.size/2,x2:a+u.size/2,y2:s+u.size/2},color:null}),p=a,x=s)}}}return N&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.globalCompositeOperation="source-atop",t.axisX.maskCanvas&&i.drawImage(t.axisX.maskCanvas,0,0,this.width,this.height),t.axisY.maskCanvas&&i.drawImage(t.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.clearRect(n.x1,n.y1,n.width,n.height),this._eventManager.ghostCtx.restore()),i.restore(),{source:e,dest:this.plotArea.ctx,animationCallback:Q.fadeInAnimation,easingFunction:Q.easing.easeInQuad,animationBase:0}}},e.prototype.renderCandlestick=function(t){var e=t.targetCanvasCtx||this.plotArea.ctx,i=N?this._preRenderCtx:e,a=this._eventManager.ghostCtx;if(!(0>=t.dataSeriesIndexes.length)){var s,n,o,l,r,h,d=null,p=null,u=this.plotArea,m=0,g=(d=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,p=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:.015*this.width,t.axisX.dataInfo.minDiff);isFinite(g)||(g=.3*Math.abs(t.axisX.range)),g=this.options.dataPointWidth?this.dataPointWidth:.7*u.width*(t.axisX.logarithmic?Math.log(g)/Math.log(t.axisX.range):Math.abs(g)/Math.abs(t.axisX.range))<<0,this.dataPointMaxWidth&&d>p&&(d=Math.min(this.options.dataPointWidth?this.dataPointWidth:1/0,p)),!this.dataPointMaxWidth&&this.dataPointMinWidth&&p<d&&(p=Math.max(this.options.dataPointWidth?this.dataPointWidth:-1/0,d)),g<d&&(g=d),g>p&&(g=p),i.save(),N&&a.save(),i.beginPath(),i.rect(u.x1,u.y1,u.width,u.height),i.clip(),N&&(a.beginPath(),a.rect(u.x1,u.y1,u.width,u.height),a.clip());for(var b=0;b<t.dataSeriesIndexes.length;b++){var y=t.dataSeriesIndexes[b],v=this.data[y],f=v.dataPoints;if(0<f.length){var k=!!(5<g&&v.bevelEnabled);for(m=0;m<f.length;m++)if(!((h=f[m].getTime?f[m].x.getTime():f[m].x)<t.axisX.dataInfo.viewPortMin||h>t.axisX.dataInfo.viewPortMax)&&!x(f[m].y)&&f[m].y.length&&"number"==typeof f[m].y[0]&&"number"==typeof f[m].y[1]&&"number"==typeof f[m].y[2]&&"number"==typeof f[m].y[3]){s=t.axisX.convertValueToPixel(h),n=t.axisY.convertValueToPixel(f[m].y[0]),o=t.axisY.convertValueToPixel(f[m].y[1]),l=t.axisY.convertValueToPixel(f[m].y[2]),r=t.axisY.convertValueToPixel(f[m].y[3]);var M=s-g/2<<0,w=M+g<<0,T=(p=v.options.fallingColor?v.fallingColor:v._colorSet[0],d=f[m].color?f[m].color:v._colorSet[0],Math.round(Math.max(1,.15*g))),P=0==T%2?0:.5,C=v.dataPointIds[m];this._eventManager.objectMap[C]={id:C,objectType:"dataPoint",dataSeriesIndex:y,dataPointIndex:m,x1:M,y1:n,x2:w,y2:o,x3:s,y3:l,x4:s,y4:r,borderThickness:T,color:d},i.strokeStyle=d,i.beginPath(),i.lineWidth=T,a.lineWidth=Math.max(T,4),"candlestick"===v.type?(i.moveTo(s-P,o),i.lineTo(s-P,Math.min(n,r)),i.stroke(),i.moveTo(s-P,Math.max(n,r)),i.lineTo(s-P,l),i.stroke(),pt(i,M,Math.min(n,r),w,Math.max(n,r),f[m].y[0]<=f[m].y[3]?v.risingColor:p,T,d,k,k,!1,!1,v.fillOpacity),N&&(d=c(C),a.strokeStyle=d,a.moveTo(s-P,o),a.lineTo(s-P,Math.min(n,r)),a.stroke(),a.moveTo(s-P,Math.max(n,r)),a.lineTo(s-P,l),a.stroke(),pt(a,M,Math.min(n,r),w,Math.max(n,r),d,0,null,!1,!1,!1,!1))):"ohlc"===v.type&&(i.moveTo(s-P,o),i.lineTo(s-P,l),i.stroke(),i.beginPath(),i.moveTo(s,n),i.lineTo(M,n),i.stroke(),i.beginPath(),i.moveTo(s,r),i.lineTo(w,r),i.stroke(),N&&(d=c(C),a.strokeStyle=d,a.moveTo(s-P,o),a.lineTo(s-P,l),a.stroke(),a.beginPath(),a.moveTo(s,n),a.lineTo(M,n),a.stroke(),a.beginPath(),a.moveTo(s,r),a.lineTo(w,r),a.stroke())),(f[m].indexLabel||v.indexLabel||f[m].indexLabelFormatter||v.indexLabelFormatter)&&this._indexLabels.push({chartType:v.type,dataPoint:f[m],dataSeries:v,point:{x:M+(w-M)/2,y:t.axisY.reversed?l:o},direction:1,bounds:{x1:M,y1:Math.min(o,l),x2:w,y2:Math.max(o,l)},color:d})}}}return N&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.globalCompositeOperation="source-atop",t.axisX.maskCanvas&&i.drawImage(t.axisX.maskCanvas,0,0,this.width,this.height),t.axisY.maskCanvas&&i.drawImage(t.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.clearRect(u.x1,u.y1,u.width,u.height),a.restore()),i.restore(),{source:e,dest:this.plotArea.ctx,animationCallback:Q.fadeInAnimation,easingFunction:Q.easing.easeInQuad,animationBase:0}}},e.prototype.renderBoxAndWhisker=function(t){var e=t.targetCanvasCtx||this.plotArea.ctx,i=N?this._preRenderCtx:e,a=this._eventManager.ghostCtx;if(!(0>=t.dataSeriesIndexes.length)){var s,n,o,l,r,h,d,p=null,u=this.plotArea,m=0,g=(p=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,m=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:.015*this.width,t.axisX.dataInfo.minDiff);isFinite(g)||(g=.3*Math.abs(t.axisX.range)),g=this.options.dataPointWidth?this.dataPointWidth:.7*u.width*(t.axisX.logarithmic?Math.log(g)/Math.log(t.axisX.range):Math.abs(g)/Math.abs(t.axisX.range))<<0,this.dataPointMaxWidth&&p>m&&(p=Math.min(this.options.dataPointWidth?this.dataPointWidth:1/0,m)),!this.dataPointMaxWidth&&this.dataPointMinWidth&&m<p&&(m=Math.max(this.options.dataPointWidth?this.dataPointWidth:-1/0,p)),g<p&&(g=p),g>m&&(g=m),i.save(),N&&a.save(),i.beginPath(),i.rect(u.x1,u.y1,u.width,u.height),i.clip(),N&&(a.beginPath(),a.rect(u.x1,u.y1,u.width,u.height),a.clip());for(var y=!!t.axisY.reversed,v=0;v<t.dataSeriesIndexes.length;v++){var f=t.dataSeriesIndexes[v],k=this.data[f],M=k.dataPoints;if(0<M.length){var w=!!(5<g&&k.bevelEnabled);for(m=0;m<M.length;m++)if(!((d=M[m].getTime?M[m].x.getTime():M[m].x)<t.axisX.dataInfo.viewPortMin||d>t.axisX.dataInfo.viewPortMax)&&!x(M[m].y)&&M[m].y.length&&"number"==typeof M[m].y[0]&&"number"==typeof M[m].y[1]&&"number"==typeof M[m].y[2]&&"number"==typeof M[m].y[3]&&"number"==typeof M[m].y[4]&&5===M[m].y.length){s=t.axisX.convertValueToPixel(d),n=t.axisY.convertValueToPixel(M[m].y[0]),o=t.axisY.convertValueToPixel(M[m].y[1]),l=t.axisY.convertValueToPixel(M[m].y[2]),r=t.axisY.convertValueToPixel(M[m].y[3]),h=t.axisY.convertValueToPixel(M[m].y[4]);var T=s-g/2<<0,P=s+g/2<<0,C=(p=M[m].color?M[m].color:k._colorSet[0],Math.round(Math.max(1,.15*g))),S=0==C%2?0:.5,A=M[m].whiskerColor?M[m].whiskerColor:M[m].color?k.whiskerColor?k.whiskerColor:M[m].color:k.whiskerColor?k.whiskerColor:p,_="number"==typeof M[m].whiskerThickness?M[m].whiskerThickness:"number"==typeof k.options.whiskerThickness?k.whiskerThickness:C,B=M[m].whiskerDashType?M[m].whiskerDashType:k.whiskerDashType,F="number"==typeof(F=x(M[m].whiskerLength)?x(k.options.whiskerLength)?g:k.whiskerLength:M[m].whiskerLength)?0>=F?0:F>=g?g:F:"string"==typeof F?parseInt(F)*g/100>g?g:parseInt(F)*g/100:g,L=1==Math.round(_)%2?.5:0,I=M[m].stemColor?M[m].stemColor:M[m].color?k.stemColor?k.stemColor:M[m].color:k.stemColor?k.stemColor:p,V="number"==typeof M[m].stemThickness?M[m].stemThickness:"number"==typeof k.options.stemThickness?k.stemThickness:C,D=1==Math.round(V)%2?.5:0,W=M[m].stemDashType?M[m].stemDashType:k.stemDashType,z=M[m].lineColor?M[m].lineColor:M[m].color?k.lineColor?k.lineColor:M[m].color:k.lineColor?k.lineColor:p,X="number"==typeof M[m].lineThickness?M[m].lineThickness:"number"==typeof k.options.lineThickness?k.lineThickness:C,Y=M[m].lineDashType?M[m].lineDashType:k.lineDashType,E=1==Math.round(X)%2?.5:0,O=k.upperBoxColor,R=k.lowerBoxColor,H=x(k.options.fillOpacity)?1:k.fillOpacity,j=k.dataPointIds[m];this._eventManager.objectMap[j]={id:j,objectType:"dataPoint",dataSeriesIndex:f,dataPointIndex:m,x1:T,y1:n,x2:P,y2:o,x3:s,y3:l,x4:s,y4:r,y5:h,borderThickness:C,color:p,stemThickness:V,stemColor:I,whiskerThickness:_,whiskerLength:F,whiskerColor:A,lineThickness:X,lineColor:z},i.save(),0<V&&(i.beginPath(),i.strokeStyle=I,i.lineWidth=V,i.setLineDash&&i.setLineDash(b(W,V)),i.moveTo(s-D,o),i.lineTo(s-D,n),i.stroke(),i.moveTo(s-D,r),i.lineTo(s-D,l),i.stroke()),i.restore(),a.lineWidth=Math.max(C,4),i.beginPath(),pt(i,T,Math.min(h,o),P,Math.max(o,h),R,0,p,!!y&&w,!y&&w,!1,!1,H),i.beginPath(),pt(i,T,Math.min(l,h),P,Math.max(h,l),O,0,p,!y&&w,!!y&&w,!1,!1,H),i.beginPath(),i.lineWidth=C,i.strokeStyle=p,i.rect(T-S,Math.min(o,l)-S,P-T+2*S,Math.max(o,l)-Math.min(o,l)+2*S),i.stroke(),i.save(),0<X&&(i.beginPath(),i.globalAlpha=1,i.setLineDash&&i.setLineDash(b(Y,X)),i.strokeStyle=z,i.lineWidth=X,i.moveTo(T,h-E),i.lineTo(P,h-E),i.stroke()),i.restore(),i.save(),0<_&&(i.beginPath(),i.setLineDash&&i.setLineDash(b(B,_)),i.strokeStyle=A,i.lineWidth=_,i.moveTo(s-F/2<<0,r-L),i.lineTo(s+F/2<<0,r-L),i.stroke(),i.moveTo(s-F/2<<0,n+L),i.lineTo(s+F/2<<0,n+L),i.stroke()),i.restore(),N&&(p=c(j),a.strokeStyle=p,a.lineWidth=V,0<V&&(a.moveTo(s-S-D,o),a.lineTo(s-S-D,Math.max(n,r)),a.stroke(),a.moveTo(s-S-D,Math.min(n,r)),a.lineTo(s-S-D,l),a.stroke()),pt(a,T,Math.max(o,l),P,Math.min(o,l),p,0,null,!1,!1,!1,!1),0<_&&(a.beginPath(),a.lineWidth=_,a.moveTo(s+F/2,r-L),a.lineTo(s-F/2,r-L),a.stroke(),a.moveTo(s+F/2,n+L),a.lineTo(s-F/2,n+L),a.stroke())),(M[m].indexLabel||k.indexLabel||M[m].indexLabelFormatter||k.indexLabelFormatter)&&this._indexLabels.push({chartType:k.type,dataPoint:M[m],dataSeries:k,point:{x:T+(P-T)/2,y:t.axisY.reversed?n:r},direction:1,bounds:{x1:T,y1:Math.min(n,r),x2:P,y2:Math.max(n,r)},color:p})}}}return N&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.globalCompositeOperation="source-atop",t.axisX.maskCanvas&&i.drawImage(t.axisX.maskCanvas,0,0,this.width,this.height),t.axisY.maskCanvas&&i.drawImage(t.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.clearRect(u.x1,u.y1,u.width,u.height),a.restore()),i.restore(),{source:e,dest:this.plotArea.ctx,animationCallback:Q.fadeInAnimation,easingFunction:Q.easing.easeInQuad,animationBase:0}}},e.prototype.renderRangeColumn=function(t){var e=t.targetCanvasCtx||this.plotArea.ctx,i=N?this._preRenderCtx:e;if(!(0>=t.dataSeriesIndexes.length)){var a,s,n,o=null,l=this.plotArea,r=0;r=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;a=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:.03*this.width;var h=t.axisX.dataInfo.minDiff;isFinite(h)||(h=.3*Math.abs(t.axisX.range)),h=this.options.dataPointWidth?this.dataPointWidth:l.width*(t.axisX.logarithmic?Math.log(h)/Math.log(t.axisX.range):Math.abs(h)/Math.abs(t.axisX.range))/t.plotType.totalDataSeries*.9<<0,this.dataPointMaxWidth&&r>a&&(r=Math.min(this.options.dataPointWidth?this.dataPointWidth:1/0,a)),!this.dataPointMaxWidth&&this.dataPointMinWidth&&a<r&&(a=Math.max(this.options.dataPointWidth?this.dataPointWidth:-1/0,r)),h<r&&(h=r),h>a&&(h=a),i.save(),N&&this._eventManager.ghostCtx.save(),i.beginPath(),i.rect(l.x1,l.y1,l.width,l.height),i.clip(),N&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(l.x1,l.y1,l.width,l.height),this._eventManager.ghostCtx.clip());for(var d=0;d<t.dataSeriesIndexes.length;d++){var p=t.dataSeriesIndexes[d],u=this.data[p],m=u.dataPoints;if(0<m.length){var g=!!(5<h&&u.bevelEnabled);for(r=0;r<m.length;r++)if(!((n=m[r].getTime?m[r].x.getTime():m[r].x)<t.axisX.dataInfo.viewPortMin||n>t.axisX.dataInfo.viewPortMax)&&!x(m[r].y)&&m[r].y.length&&"number"==typeof m[r].y[0]&&"number"==typeof m[r].y[1]){o=t.axisX.convertValueToPixel(n),a=t.axisY.convertValueToPixel(m[r].y[0]),s=t.axisY.convertValueToPixel(m[r].y[1]);var b=t.axisX.reversed?o+t.plotType.totalDataSeries*h/2-(t.previousDataSeriesCount+d)*h<<0:o-t.plotType.totalDataSeries*h/2+(t.previousDataSeriesCount+d)*h<<0,y=t.axisX.reversed?b-h<<0:b+h<<0;o=m[r].color?m[r].color:u._colorSet[r%u._colorSet.length];if(a>s){var v=a;a=s,s=v}v=u.dataPointIds[r],this._eventManager.objectMap[v]={id:v,objectType:"dataPoint",dataSeriesIndex:p,dataPointIndex:r,x1:b,y1:a,x2:y,y2:s},pt(i,b,a,y,s,o,0,o,g,g,!1,!1,u.fillOpacity),o=c(v),N&&pt(this._eventManager.ghostCtx,b,a,y,s,o,0,null,!1,!1,!1,!1),(m[r].indexLabel||u.indexLabel||m[r].indexLabelFormatter||u.indexLabelFormatter)&&(this._indexLabels.push({chartType:"rangeColumn",dataPoint:m[r],dataSeries:u,indexKeyword:0,point:{x:b+(y-b)/2,y:m[r].y[1]>=m[r].y[0]?s:a},direction:m[r].y[1]>=m[r].y[0]?-1:1,bounds:{x1:b,y1:Math.min(a,s),x2:y,y2:Math.max(a,s)},color:o}),this._indexLabels.push({chartType:"rangeColumn",dataPoint:m[r],dataSeries:u,indexKeyword:1,point:{x:b+(y-b)/2,y:m[r].y[1]>=m[r].y[0]?a:s},direction:m[r].y[1]>=m[r].y[0]?1:-1,bounds:{x1:b,y1:Math.min(a,s),x2:y,y2:Math.max(a,s)},color:o}))}}}return N&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.globalCompositeOperation="source-atop",t.axisX.maskCanvas&&i.drawImage(t.axisX.maskCanvas,0,0,this.width,this.height),t.axisY.maskCanvas&&i.drawImage(t.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.clearRect(l.x1,l.y1,l.width,l.height),this._eventManager.ghostCtx.restore()),i.restore(),{source:e,dest:this.plotArea.ctx,animationCallback:Q.fadeInAnimation,easingFunction:Q.easing.easeInQuad,animationBase:0}}},e.prototype.renderError=function(t){var e=t.targetCanvasCtx||this.plotArea.ctx,i=N?this._preRenderCtx:e,a=!!t.axisY._position&&("left"!==t.axisY._position&&"right"!==t.axisY._position);if(!(0>=t.dataSeriesIndexes.length)){var n,o,l,r,h,d,c,p=null,u=!1,m=this.plotArea,g=0,b=t.axisX.dataInfo.minDiff;isFinite(b)||(b=.3*Math.abs(t.axisX.range)),i.save(),N&&this._eventManager.ghostCtx.save(),i.beginPath(),i.rect(m.x1,m.y1,m.width,m.height),i.clip(),N&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(m.x1,m.y1,m.width,m.height),this._eventManager.ghostCtx.clip());for(var y=0,v=0;v<this.data.length;v++)!this.data[v].type.match(/(bar|column)/gi)||!this.data[v].visible||this.data[v].type.match(/(stacked)/gi)&&y||y++;for(var f=0;f<t.dataSeriesIndexes.length;f++){var k=t.dataSeriesIndexes[f],M=this.data[k],w=M.dataPoints,T=!x(M._linkedSeries)&&!(!M._linkedSeries.type.match(/(bar|column)/gi)||!M._linkedSeries.visible),P=0;if(T)for(p=M._linkedSeries.id,v=0;v<p;v++)!this.data[v].type.match(/(bar|column)/gi)||!this.data[v].visible||this.data[v].type.match(/(stacked)/gi)&&P||(this.data[v].type.match(/(range)/gi)&&(u=!0),P++);if(p=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1,g=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:a?Math.min(.15*this.height,this.plotArea.height/(T?y:1)*.9)<<0:.3*this.width,u&&(g=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:a?Math.min(.15*this.height,this.plotArea.height/(T?y:1)*.9)<<0:.03*this.width),v=this.options.dataPointWidth?this.dataPointWidth:(a?m.height:m.width)*(t.axisX.logarithmic?Math.log(b)/Math.log(t.axisX.range):Math.abs(b)/Math.abs(t.axisX.range))/(T?y:1)*.9<<0,this.dataPointMaxWidth&&p>g&&(p=Math.min(this.options.dataPointWidth?this.dataPointWidth:1/0,g)),!this.dataPointMaxWidth&&this.dataPointMinWidth&&g<p&&(g=Math.max(this.options.dataPointWidth?this.dataPointWidth:-1/0,p)),v<p&&(v=p),v>g&&(v=g),0<w.length){var C=M._colorSet;for(g=0;g<w.length;g++){p=M.lineColor=M.options.color?M.options.color:C[0];var S={color:w[g].whiskerColor?w[g].whiskerColor:w[g].color?M.whiskerColor?M.whiskerColor:w[g].color:M.whiskerColor?M.whiskerColor:p,thickness:x(w[g].whiskerThickness)?M.whiskerThickness:w[g].whiskerThickness,dashType:w[g].whiskerDashType?w[g].whiskerDashType:M.whiskerDashType,length:x(w[g].whiskerLength)?x(M.options.whiskerLength)?v:M.options.whiskerLength:w[g].whiskerLength,trimLength:x(w[g].whiskerLength)&&x(M.options.whiskerLength)?50:0};S.length="number"==typeof S.length?0>=S.length?0:S.length>=v?v:S.length:"string"==typeof S.length?parseInt(S.length)*v/100>v?v:parseInt(S.length)*v/100>v:v,S.thickness="number"==typeof S.thickness?0>S.thickness?0:Math.round(S.thickness):2;var A={color:w[g].stemColor?w[g].stemColor:w[g].color?M.stemColor?M.stemColor:w[g].color:M.stemColor?M.stemColor:p,thickness:w[g].stemThickness?w[g].stemThickness:M.stemThickness,dashType:w[g].stemDashType?w[g].stemDashType:M.stemDashType};if(A.thickness="number"==typeof A.thickness?0>A.thickness?0:Math.round(A.thickness):2,!((c=w[g].getTime?w[g].x.getTime():w[g].x)<t.axisX.dataInfo.viewPortMin||c>t.axisX.dataInfo.viewPortMax)&&!x(w[g].y)&&w[g].y.length&&"number"==typeof w[g].y[0]&&"number"==typeof w[g].y[1]){var _=t.axisX.convertValueToPixel(c);a?o=_:n=_,_=t.axisY.convertValueToPixel(w[g].y[0]),a?l=_:h=_,_=t.axisY.convertValueToPixel(w[g].y[1]),a?r=_:d=_,a?(h=t.axisX.reversed?o+(T?y:1)*v/2-(T?P-1:0)*v<<0:o-(T?y:1)*v/2+(T?P-1:0)*v<<0,d=t.axisX.reversed?h-v<<0:h+v<<0):(l=t.axisX.reversed?n+(T?y:1)*v/2-(T?P-1:0)*v<<0:n-(T?y:1)*v/2+(T?P-1:0)*v<<0,r=t.axisX.reversed?l-v<<0:l+v<<0),!a&&h>d&&(_=h,h=d,d=_),a&&l>r&&(_=l,l=r,r=_),_=M.dataPointIds[g],this._eventManager.objectMap[_]={id:_,objectType:"dataPoint",dataSeriesIndex:k,dataPointIndex:g,x1:Math.min(l,r),y1:Math.min(h,d),x2:Math.max(r,l),y2:Math.max(d,h),isXYSwapped:a,stemProperties:A,whiskerProperties:S},s(i,Math.min(l,r),Math.min(h,d),Math.max(r,l),Math.max(d,h),p,S,A,a),N&&s(this._eventManager.ghostCtx,l,h,r,d,p,S,A,a),(w[g].indexLabel||M.indexLabel||w[g].indexLabelFormatter||M.indexLabelFormatter)&&(this._indexLabels.push({chartType:"error",dataPoint:w[g],dataSeries:M,indexKeyword:0,point:{x:a?w[g].y[1]>=w[g].y[0]?l:r:l+(r-l)/2,y:a?h+(d-h)/2:w[g].y[1]>=w[g].y[0]?d:h},direction:w[g].y[1]>=w[g].y[0]?-1:1,bounds:{x1:a?Math.min(l,r):l,y1:a?h:Math.min(h,d),x2:a?Math.max(l,r):r,y2:a?d:Math.max(h,d)},color:p,axisSwapped:a}),this._indexLabels.push({chartType:"error",dataPoint:w[g],dataSeries:M,indexKeyword:1,point:{x:a?w[g].y[1]>=w[g].y[0]?r:l:l+(r-l)/2,y:a?h+(d-h)/2:w[g].y[1]>=w[g].y[0]?h:d},direction:w[g].y[1]>=w[g].y[0]?1:-1,bounds:{x1:a?Math.min(l,r):l,y1:a?h:Math.min(h,d),x2:a?Math.max(l,r):r,y2:a?d:Math.max(h,d)},color:p,axisSwapped:a}))}}}}return N&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.globalCompositeOperation="source-atop",t.axisX.maskCanvas&&i.drawImage(t.axisX.maskCanvas,0,0,this.width,this.height),t.axisY.maskCanvas&&i.drawImage(t.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.clearRect(m.x1,m.y1,m.width,m.height),this._eventManager.ghostCtx.restore()),i.restore(),{source:e,dest:this.plotArea.ctx,animationCallback:Q.fadeInAnimation,easingFunction:Q.easing.easeInQuad,animationBase:0}}},e.prototype.renderRangeBar=function(t){var e=t.targetCanvasCtx||this.plotArea.ctx,i=N?this._preRenderCtx:e;if(!(0>=t.dataSeriesIndexes.length)){var a,s,n,o,l=null,r=this.plotArea,h=0;h=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;a=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(.15*this.height,this.plotArea.height/t.plotType.totalDataSeries*.9)<<0;var d=t.axisX.dataInfo.minDiff;isFinite(d)||(d=.3*Math.abs(t.axisX.range)),d=this.options.dataPointWidth?this.dataPointWidth:r.height*(t.axisX.logarithmic?Math.log(d)/Math.log(t.axisX.range):Math.abs(d)/Math.abs(t.axisX.range))/t.plotType.totalDataSeries*.9<<0,this.dataPointMaxWidth&&h>a&&(h=Math.min(this.options.dataPointWidth?this.dataPointWidth:1/0,a)),!this.dataPointMaxWidth&&this.dataPointMinWidth&&a<h&&(a=Math.max(this.options.dataPointWidth?this.dataPointWidth:-1/0,h)),d<h&&(d=h),d>a&&(d=a),i.save(),N&&this._eventManager.ghostCtx.save(),i.beginPath(),i.rect(r.x1,r.y1,r.width,r.height),i.clip(),N&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(r.x1,r.y1,r.width,r.height),this._eventManager.ghostCtx.clip());for(var p=0;p<t.dataSeriesIndexes.length;p++){var u=t.dataSeriesIndexes[p],m=this.data[u],g=m.dataPoints;if(0<g.length){var b=!!(5<d&&m.bevelEnabled);for(i.strokeStyle="#4572A7 ",h=0;h<g.length;h++)if(!((o=g[h].getTime?g[h].x.getTime():g[h].x)<t.axisX.dataInfo.viewPortMin||o>t.axisX.dataInfo.viewPortMax)&&!x(g[h].y)&&g[h].y.length&&"number"==typeof g[h].y[0]&&"number"==typeof g[h].y[1]){a=t.axisY.convertValueToPixel(g[h].y[0]),s=t.axisY.convertValueToPixel(g[h].y[1]),n=t.axisX.convertValueToPixel(o),n=t.axisX.reversed?n+t.plotType.totalDataSeries*d/2-(t.previousDataSeriesCount+p)*d<<0:n-t.plotType.totalDataSeries*d/2+(t.previousDataSeriesCount+p)*d<<0;var y=t.axisX.reversed?n-d<<0:n+d<<0;a>s&&(l=a,a=s,s=l),l=g[h].color?g[h].color:m._colorSet[h%m._colorSet.length],pt(i,a,n,s,y,l,0,null,b,!1,!1,!1,m.fillOpacity),l=m.dataPointIds[h],this._eventManager.objectMap[l]={id:l,objectType:"dataPoint",dataSeriesIndex:u,dataPointIndex:h,x1:a,y1:n,x2:s,y2:y},l=c(l),N&&pt(this._eventManager.ghostCtx,a,n,s,y,l,0,null,!1,!1,!1,!1),(g[h].indexLabel||m.indexLabel||g[h].indexLabelFormatter||m.indexLabelFormatter)&&(this._indexLabels.push({chartType:"rangeBar",dataPoint:g[h],dataSeries:m,indexKeyword:0,point:{x:g[h].y[1]>=g[h].y[0]?a:s,y:n+(y-n)/2},direction:g[h].y[1]>=g[h].y[0]?-1:1,bounds:{x1:Math.min(a,s),y1:n,x2:Math.max(a,s),y2:y},color:l}),this._indexLabels.push({chartType:"rangeBar",dataPoint:g[h],dataSeries:m,indexKeyword:1,point:{x:g[h].y[1]>=g[h].y[0]?s:a,y:n+(y-n)/2},direction:g[h].y[1]>=g[h].y[0]?1:-1,bounds:{x1:Math.min(a,s),y1:n,x2:Math.max(a,s),y2:y},color:l}))}}}return N&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.globalCompositeOperation="source-atop",t.axisX.maskCanvas&&i.drawImage(t.axisX.maskCanvas,0,0,this.width,this.height),t.axisY.maskCanvas&&i.drawImage(t.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.clearRect(r.x1,r.y1,r.width,r.height),this._eventManager.ghostCtx.restore()),i.restore(),{source:e,dest:this.plotArea.ctx,animationCallback:Q.fadeInAnimation,easingFunction:Q.easing.easeInQuad,animationBase:0}}},e.prototype.renderRangeArea=function(t){function e(){if(f){var t=null;0<d.lineThickness&&a.stroke();for(var e=r.length-1;0<=e;e--)t=r[e],a.lineTo(t.x,t.y),s.lineTo(t.x,t.y);if(a.closePath(),a.globalAlpha=d.fillOpacity,a.fill(),a.globalAlpha=1,s.fill(),0<d.lineThickness){for(a.beginPath(),a.moveTo(t.x,t.y),e=0;e<r.length;e++)t=r[e],a.lineTo(t.x,t.y);a.stroke()}a.beginPath(),a.moveTo(x,u),s.beginPath(),s.moveTo(x,u),f={x:x,y:u},(r=[]).push({x:x,y:m})}}var i=t.targetCanvasCtx||this.plotArea.ctx,a=N?this._preRenderCtx:i;if(!(0>=t.dataSeriesIndexes.length)){var s=this._eventManager.ghostCtx,n=[],o=this.plotArea;a.save(),N&&s.save(),a.beginPath(),a.rect(o.x1,o.y1,o.width,o.height),a.clip(),N&&(s.beginPath(),s.rect(o.x1,o.y1,o.width,o.height),s.clip());for(var l=0;l<t.dataSeriesIndexes.length;l++){var r=[],h=t.dataSeriesIndexes[l],d=this.data[h],p=d.dataPoints;n=d.id;this._eventManager.objectMap[n]={objectType:"dataSeries",dataSeriesIndex:h},n=c(n),s.fillStyle=n;n=[];var x,u,m,g,y=!0,v=0,f=null;if(0<p.length){var k=d._colorSet[v%d._colorSet.length],M=d.lineColor=d.options.lineColor||k,w=M;a.fillStyle=k,a.strokeStyle=M,a.lineWidth=d.lineThickness;var T="solid";if(a.setLineDash){var P=b(d.nullDataLineDashType,d.lineThickness),C=b(T=d.lineDashType,d.lineThickness);a.setLineDash(C)}for(var S=!0;v<p.length;v++)if(!((g=p[v].x.getTime?p[v].x.getTime():p[v].x)<t.axisX.dataInfo.viewPortMin||g>t.axisX.dataInfo.viewPortMax&&(!d.connectNullData||!S)))if(null!==p[v].y&&p[v].y.length&&"number"==typeof p[v].y[0]&&"number"==typeof p[v].y[1]){if(x=t.axisX.convertValueToPixel(g),u=t.axisY.convertValueToPixel(p[v].y[0]),m=t.axisY.convertValueToPixel(p[v].y[1]),y||S?(d.connectNullData&&!y?(a.setLineDash&&(d.options.nullDataLineDashType||T===d.lineDashType&&d.lineDashType!==d.nullDataLineDashType)&&(r[r.length-1].newLineDashArray=C,T=d.nullDataLineDashType,a.setLineDash(P)),a.lineTo(x,u),N&&s.lineTo(x,u),r.push({x:x,y:m})):(a.beginPath(),a.moveTo(x,u),f={x:x,y:u},(r=[]).push({x:x,y:m}),N&&(s.beginPath(),s.moveTo(x,u))),S=y=!1):(a.lineTo(x,u),r.push({x:x,y:m}),N&&s.lineTo(x,u),0==v%250&&e()),g=d.dataPointIds[v],this._eventManager.objectMap[g]={id:g,objectType:"dataPoint",dataSeriesIndex:h,dataPointIndex:v,x1:x,y1:u,y2:m},v<p.length-1&&(w!==(p[v].lineColor||M)||T!==(p[v].lineDashType||d.lineDashType))&&(e(),w=p[v].lineColor||M,r[r.length-1].newStrokeStyle=w,a.strokeStyle=w,a.setLineDash&&(p[v].lineDashType?(T=p[v].lineDashType,r[r.length-1].newLineDashArray=b(T,d.lineThickness),a.setLineDash(r[r.length-1].newLineDashArray)):(T=d.lineDashType,r[r.length-1].newLineDashArray=C,a.setLineDash(C)))),0!==p[v].markerSize&&(0<p[v].markerSize||0<d.markerSize)){var A=d.getMarkerProperties(v,x,m,a);n.push(A);var _=c(g);N&&n.push({x:x,y:m,ctx:s,type:A.type,size:A.size,color:_,borderColor:_,borderThickness:A.borderThickness}),A=d.getMarkerProperties(v,x,u,a),n.push(A),_=c(g),N&&n.push({x:x,y:u,ctx:s,type:A.type,size:A.size,color:_,borderColor:_,borderThickness:A.borderThickness})}(p[v].indexLabel||d.indexLabel||p[v].indexLabelFormatter||d.indexLabelFormatter)&&(this._indexLabels.push({chartType:"rangeArea",dataPoint:p[v],dataSeries:d,indexKeyword:0,point:{x:x,y:u},direction:p[v].y[0]>p[v].y[1]===t.axisY.reversed?-1:1,color:k}),this._indexLabels.push({chartType:"rangeArea",dataPoint:p[v],dataSeries:d,indexKeyword:1,point:{x:x,y:m},direction:p[v].y[0]>p[v].y[1]===t.axisY.reversed?1:-1,color:k}))}else S||y||e(),S=!0;e(),Z.drawMarkers(n)}}return N&&(i.drawImage(this._preRenderCanvas,0,0,this.width,this.height),a.globalCompositeOperation="source-atop",t.axisX.maskCanvas&&a.drawImage(t.axisX.maskCanvas,0,0,this.width,this.height),t.axisY.maskCanvas&&a.drawImage(t.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),a.clearRect(o.x1,o.y1,o.width,o.height),this._eventManager.ghostCtx.restore()),a.restore(),{source:i,dest:this.plotArea.ctx,animationCallback:Q.xClipAnimation,easingFunction:Q.easing.linear,animationBase:0}}},e.prototype.renderRangeSplineArea=function(t){function e(t,e){var i=a(y,2);if(0<i.length){if(0<d.lineThickness){s.strokeStyle=e,s.setLineDash&&s.setLineDash(t),s.beginPath(),s.moveTo(i[0].x,i[0].y);for(var o=0;o<i.length-3;o+=3)(i[o].newStrokeStyle||i[o].newLineDashArray)&&(s.stroke(),s.beginPath(),s.moveTo(i[o].x,i[o].y),i[o].newStrokeStyle&&(s.strokeStyle=i[o].newStrokeStyle),i[o].newLineDashArray&&s.setLineDash(i[o].newLineDashArray)),s.bezierCurveTo(i[o+1].x,i[o+1].y,i[o+2].x,i[o+2].y,i[o+3].x,i[o+3].y);s.stroke()}for(s.beginPath(),s.moveTo(i[0].x,i[0].y),N&&(n.beginPath(),n.moveTo(i[0].x,i[0].y)),o=0;o<i.length-3;o+=3)s.bezierCurveTo(i[o+1].x,i[o+1].y,i[o+2].x,i[o+2].y,i[o+3].x,i[o+3].y),N&&n.bezierCurveTo(i[o+1].x,i[o+1].y,i[o+2].x,i[o+2].y,i[o+3].x,i[o+3].y);for(i=a(v,2),s.lineTo(v[v.length-1].x,v[v.length-1].y),o=i.length-1;2<o;o-=3)s.bezierCurveTo(i[o-1].x,i[o-1].y,i[o-2].x,i[o-2].y,i[o-3].x,i[o-3].y),N&&n.bezierCurveTo(i[o-1].x,i[o-1].y,i[o-2].x,i[o-2].y,i[o-3].x,i[o-3].y);if(s.closePath(),s.globalAlpha=d.fillOpacity,s.fill(),N&&(n.closePath(),n.fill()),s.globalAlpha=1,0<d.lineThickness){s.strokeStyle=e,s.setLineDash&&s.setLineDash(t),s.beginPath(),s.moveTo(i[0].x,i[0].y);for(var l=o=0;o<i.length-3;o+=3,l++)(y[l].newStrokeStyle||y[l].newLineDashArray)&&(s.stroke(),s.beginPath(),s.moveTo(i[o].x,i[o].y),y[l].newStrokeStyle&&(s.strokeStyle=y[l].newStrokeStyle),y[l].newLineDashArray&&s.setLineDash(y[l].newLineDashArray)),s.bezierCurveTo(i[o+1].x,i[o+1].y,i[o+2].x,i[o+2].y,i[o+3].x,i[o+3].y);s.stroke()}s.beginPath()}}var i=t.targetCanvasCtx||this.plotArea.ctx,s=N?this._preRenderCtx:i;if(!(0>=t.dataSeriesIndexes.length)){var n=this._eventManager.ghostCtx,o=[],l=this.plotArea;s.save(),N&&n.save(),s.beginPath(),s.rect(l.x1,l.y1,l.width,l.height),s.clip(),N&&(n.beginPath(),n.rect(l.x1,l.y1,l.width,l.height),n.clip());for(var r=0;r<t.dataSeriesIndexes.length;r++){var h=t.dataSeriesIndexes[r],d=this.data[h],p=d.dataPoints;o=d.id;this._eventManager.objectMap[o]={objectType:"dataSeries",dataSeriesIndex:h},o=c(o),n.fillStyle=o;o=[];var x,u,m,g=0,y=[],v=[];if(0<p.length){var f=d._colorSet[g%d._colorSet.length],k=d.lineColor=d.options.lineColor||f,M=k;s.fillStyle=f,s.lineWidth=d.lineThickness;var w,T="solid";if(s.setLineDash){var P=b(d.nullDataLineDashType,d.lineThickness);w=b(T=d.lineDashType,d.lineThickness)}for(u=!1;g<p.length;g++)if(!((x=p[g].x.getTime?p[g].x.getTime():p[g].x)<t.axisX.dataInfo.viewPortMin||x>t.axisX.dataInfo.viewPortMax&&(!d.connectNullData||!u)))if(null!==p[g].y&&p[g].y.length&&"number"==typeof p[g].y[0]&&"number"==typeof p[g].y[1]){x=t.axisX.convertValueToPixel(x),u=t.axisY.convertValueToPixel(p[g].y[0]),m=t.axisY.convertValueToPixel(p[g].y[1]);var C=d.dataPointIds[g];if(this._eventManager.objectMap[C]={id:C,objectType:"dataPoint",dataSeriesIndex:h,dataPointIndex:g,x1:x,y1:u,y2:m},y[y.length]={x:x,y:u},v[v.length]={x:x,y:m},g<p.length-1&&(M!==(p[g].lineColor||k)||T!==(p[g].lineDashType||d.lineDashType))&&(M=p[g].lineColor||k,y[y.length-1].newStrokeStyle=M,s.setLineDash&&(p[g].lineDashType?(T=p[g].lineDashType,y[y.length-1].newLineDashArray=b(T,d.lineThickness)):(T=d.lineDashType,y[y.length-1].newLineDashArray=w))),0!==p[g].markerSize&&(0<p[g].markerSize||0<d.markerSize)){var S=d.getMarkerProperties(g,x,u,s);o.push(S);var A=c(C);N&&o.push({x:x,y:u,ctx:n,type:S.type,size:S.size,color:A,borderColor:A,borderThickness:S.borderThickness}),S=d.getMarkerProperties(g,x,m,s),o.push(S),A=c(C),N&&o.push({x:x,y:m,ctx:n,type:S.type,size:S.size,color:A,borderColor:A,borderThickness:S.borderThickness})}(p[g].indexLabel||d.indexLabel||p[g].indexLabelFormatter||d.indexLabelFormatter)&&(this._indexLabels.push({chartType:"rangeSplineArea",dataPoint:p[g],dataSeries:d,indexKeyword:0,point:{x:x,y:u},direction:p[g].y[0]<=p[g].y[1]?-1:1,color:f}),this._indexLabels.push({chartType:"rangeSplineArea",dataPoint:p[g],dataSeries:d,indexKeyword:1,point:{x:x,y:m},direction:p[g].y[0]<=p[g].y[1]?1:-1,color:f})),u=!1}else 0<g&&!u&&(d.connectNullData?s.setLineDash&&0<y.length&&(d.options.nullDataLineDashType||!p[g-1].lineDashType)&&(y[y.length-1].newLineDashArray=P,T=d.nullDataLineDashType):(e(w,k),y=[],v=[])),u=!0;e(w,k),Z.drawMarkers(o)}}return N&&(i.drawImage(this._preRenderCanvas,0,0,this.width,this.height),s.globalCompositeOperation="source-atop",t.axisX.maskCanvas&&s.drawImage(t.axisX.maskCanvas,0,0,this.width,this.height),t.axisY.maskCanvas&&s.drawImage(t.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),s.clearRect(l.x1,l.y1,l.width,l.height),this._eventManager.ghostCtx.restore()),s.restore(),{source:i,dest:this.plotArea.ctx,animationCallback:Q.xClipAnimation,easingFunction:Q.easing.linear,animationBase:0}}},e.prototype.renderWaterfall=function(t){var e=t.targetCanvasCtx||this.plotArea.ctx,i=N?this._preRenderCtx:e;if(!(0>=t.dataSeriesIndexes.length)){var a,s,n,o,l=this._eventManager.ghostCtx,r=null,h=this.plotArea,d=0,p=t.axisY.convertValueToPixel(t.axisY.logarithmic?t.axisY.viewportMinimum:0);d=this.options.dataPointMinWidth?this.dataPointMinWidth:this.options.dataPointWidth?this.dataPointWidth:1;s=this.options.dataPointMaxWidth?this.dataPointMaxWidth:this.options.dataPointWidth?this.dataPointWidth:Math.min(.15*this.width,this.plotArea.width/t.plotType.totalDataSeries*.9)<<0;var x=t.axisX.dataInfo.minDiff;isFinite(x)||(x=.3*Math.abs(t.axisX.range)),x=this.options.dataPointWidth?this.dataPointWidth:h.width*(t.axisX.logarithmic?Math.log(x)/Math.log(t.axisX.range):Math.abs(x)/Math.abs(t.axisX.range))/t.plotType.totalDataSeries*.6<<0,this.dataPointMaxWidth&&d>s&&(d=Math.min(this.options.dataPointWidth?this.dataPointWidth:1/0,s)),!this.dataPointMaxWidth&&this.dataPointMinWidth&&s<d&&(s=Math.max(this.options.dataPointWidth?this.dataPointWidth:-1/0,d)),x<d&&(x=d),x>s&&(x=s),i.save(),N&&this._eventManager.ghostCtx.save(),i.beginPath(),i.rect(h.x1,h.y1,h.width,h.height),i.clip(),N&&(this._eventManager.ghostCtx.beginPath(),this._eventManager.ghostCtx.rect(h.x1,h.y1,h.width,h.height),this._eventManager.ghostCtx.clip());for(var u=0;u<t.dataSeriesIndexes.length;u++){var m=t.dataSeriesIndexes[u],g=this.data[m],y=g.dataPoints;r=g._colorSet[0];g.risingColor=g.options.risingColor?g.options.risingColor:r,g.fallingColor=g.options.fallingColor?g.options.fallingColor:"#e40a0a";var v="number"==typeof g.options.lineThickness?Math.round(g.lineThickness):1,f=1==Math.round(v)%2?-.5:0;if(0<y.length){var k=!!(5<x&&g.bevelEnabled),M=!1,w=null,T=null;for(d=0;d<y.length;d++)if(o=y[d].getTime?y[d].x.getTime():y[d].x,"number"!=typeof y[d].y){if(0<d&&!M&&g.connectNullData)var P=g.options.nullDataLineDashType||!y[d-1].lineDashType?g.nullDataLineDashType:y[d-1].lineDashType;M=!0}else{a=t.axisX.convertValueToPixel(o),s=0===g.dataPointEOs[d].cumulativeSum?p:t.axisY.convertValueToPixel(g.dataPointEOs[d].cumulativeSum),n=0===g.dataPointEOs[d].cumulativeSumYStartValue?p:t.axisY.convertValueToPixel(g.dataPointEOs[d].cumulativeSumYStartValue),a=t.axisX.reversed?a+t.plotType.totalDataSeries*x/2-(t.previousDataSeriesCount+u)*x<<0:a-t.plotType.totalDataSeries*x/2+(t.previousDataSeriesCount+u)*x<<0;var C=t.axisX.reversed?a-x<<0:a+x<<0;s>n&&(r=s,s=n,n=r),t.axisY.reversed&&(r=s,s=n,n=r),r=g.dataPointIds[d],this._eventManager.objectMap[r]={id:r,objectType:"dataPoint",dataSeriesIndex:m,dataPointIndex:d,x1:a,y1:s,x2:C,y2:n};var S=y[d].color?y[d].color:0<y[d].y?g.risingColor:g.fallingColor;pt(i,a,s,C,n,S,0,S,k,k,!1,!1,g.fillOpacity),r=c(r),N&&pt(this._eventManager.ghostCtx,a,s,C,n,r,0,null,!1,!1,!1,!1);var A;S=a;A=void 0!==y[d].isIntermediateSum&&!0===y[d].isIntermediateSum||void 0!==y[d].isCumulativeSum&&!0===y[d].isCumulativeSum?0<y[d].y?s:n:0<y[d].y?n:s,0<d&&w&&(!M||g.connectNullData)&&(M&&i.setLineDash&&i.setLineDash(b(P,v)),i.beginPath(),i.moveTo(w,T-f),i.lineTo(S,A-f),0<v&&i.stroke(),N&&(l.beginPath(),l.moveTo(w,T-f),l.lineTo(S,A-f),0<v&&l.stroke())),M=!1,w=C,T=0<y[d].y?s:n,S=y[d].lineDashType?y[d].lineDashType:g.options.lineDashType?g.options.lineDashType:"shortDash",i.strokeStyle=y[d].lineColor?y[d].lineColor:g.options.lineColor?g.options.lineColor:"#9e9e9e",i.lineWidth=v,i.setLineDash&&(S=b(S,v),i.setLineDash(S)),(y[d].indexLabel||g.indexLabel||y[d].indexLabelFormatter||g.indexLabelFormatter)&&this._indexLabels.push({chartType:"waterfall",dataPoint:y[d],dataSeries:g,point:{x:a+(C-a)/2,y:0<=y[d].y?s:n},direction:0>y[d].y===t.axisY.reversed?1:-1,bounds:{x1:a,y1:Math.min(s,n),x2:C,y2:Math.max(s,n)},color:r})}}}return N&&(e.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.globalCompositeOperation="source-atop",t.axisX.maskCanvas&&i.drawImage(t.axisX.maskCanvas,0,0,this.width,this.height),t.axisY.maskCanvas&&i.drawImage(t.axisY.maskCanvas,0,0,this.width,this.height),this._breaksCanvasCtx&&this._breaksCanvasCtx.drawImage(this._preRenderCanvas,0,0,this.width,this.height),i.clearRect(h.x1,h.y1,h.width,h.height),this._eventManager.ghostCtx.restore()),i.restore(),{source:e,dest:this.plotArea.ctx,animationCallback:Q.fadeInAnimation,easingFunction:Q.easing.easeInQuad,animationBase:0}}};var G=function(t,e,i,a,s,n,o,l,r){if(!(0>i)){if(void 0===l&&(l=1),!N){var h=Number((o%(2*Math.PI)).toFixed(8));Number((n%(2*Math.PI)).toFixed(8))===h&&(o-=1e-4)}t.save(),t.globalAlpha=l,"pie"===s?(t.beginPath(),t.moveTo(e.x,e.y),t.arc(e.x,e.y,i,n,o,!1),t.fillStyle=a,t.strokeStyle="white",t.lineWidth=2,t.closePath(),t.fill()):"doughnut"===s&&(t.beginPath(),t.arc(e.x,e.y,i,n,o,!1),0<=r&&t.arc(e.x,e.y,r*i,o,n,!0),t.closePath(),t.fillStyle=a,t.strokeStyle="white",t.lineWidth=2,t.fill()),t.globalAlpha=1,t.restore()}};e.prototype.renderPie=function(t){function e(t){var e=r.plotArea.ctx;for(e.clearRect(u.x1,u.y1,u.width,u.height),e.fillStyle=r.backgroundColor,e.fillRect(u.x1,u.y1,u.width,u.height),e=0;e<c.length;e++){var i=m[e].startAngle,a=m[e].endAngle;if(a>i){var s=.07*T*Math.cos(m[e].midAngle),n=.07*T*Math.sin(m[e].midAngle),o=!1;c[e].exploded?(1e-9<Math.abs(m[e].center.x-(k.x+s))||1e-9<Math.abs(m[e].center.y-(k.y+n)))&&(m[e].center.x=k.x+s*t,m[e].center.y=k.y+n*t,o=!0):(0<Math.abs(m[e].center.x-k.x)||0<Math.abs(m[e].center.y-k.y))&&(m[e].center.x=k.x+s*(1-t),m[e].center.y=k.y+n*(1-t),o=!0),o&&((s={}).dataSeries=d,s.dataPoint=d.dataPoints[e],s.index=e,r.toolTip.highlightObjects([s])),G(r.plotArea.ctx,m[e].center,m[e].radius,c[e].color?c[e].color:d._colorSet[e%d._colorSet.length],d.type,i,a,d.fillOpacity,m[e].percentInnerRadius)}}for((t=r.plotArea.ctx).save(),t.fillStyle="black",t.strokeStyle="grey",t.textBaseline="middle",t.lineJoin="round",e=e=0;e<c.length;e++)(i=m[e]).indexLabelText&&(i.indexLabelTextBlock.y-=i.indexLabelTextBlock.height/2,a=0,a="left"===i.hemisphere?"inside"!==d.indexLabelPlacement?-(i.indexLabelTextBlock.width+p):-i.indexLabelTextBlock.width/2:"inside"!==d.indexLabelPlacement?p:-i.indexLabelTextBlock.width/2,i.indexLabelTextBlock.x+=a,i.indexLabelTextBlock.render(!0),i.indexLabelTextBlock.x-=a,i.indexLabelTextBlock.y+=i.indexLabelTextBlock.height/2,"inside"!==i.indexLabelPlacement&&0<i.indexLabelLineThickness&&(a=i.center.x+T*Math.cos(i.midAngle),s=i.center.y+T*Math.sin(i.midAngle),t.strokeStyle=i.indexLabelLineColor,t.lineWidth=i.indexLabelLineThickness,t.setLineDash&&t.setLineDash(b(i.indexLabelLineDashType,i.indexLabelLineThickness)),t.beginPath(),t.moveTo(a,s),t.lineTo(i.indexLabelTextBlock.x,i.indexLabelTextBlock.y),t.lineTo(i.indexLabelTextBlock.x+("left"===i.hemisphere?-p:p),i.indexLabelTextBlock.y),t.stroke()),t.lineJoin="miter");t.save()}function i(t,e){var i=0,a=(i=t.indexLabelTextBlock.y-t.indexLabelTextBlock.height/2,t.indexLabelTextBlock.y+t.indexLabelTextBlock.height/2),s=e.indexLabelTextBlock.y-e.indexLabelTextBlock.height/2,n=e.indexLabelTextBlock.y+e.indexLabelTextBlock.height/2;return e.indexLabelTextBlock.y>t.indexLabelTextBlock.y?s-a:i-n}function a(t){for(var e=null,a=1;a<c.length;a++){if(e=(t+a+m.length)%m.length,m[e].hemisphere!==m[t].hemisphere){e=null;break}if(m[e].indexLabelText&&e!==t&&(0>i(m[e],m[t])||("right"===m[t].hemisphere?m[e].indexLabelTextBlock.y>=m[t].indexLabelTextBlock.y:m[e].indexLabelTextBlock.y<=m[t].indexLabelTextBlock.y)))break;e=null}return e}function s(t,e,n){if(1e3<(n=(n||0)+1))return 0;e=e||0;var o=0,l=k.y-1*h,r=k.y+1*h;if(0<=t&&t<c.length){var d=m[t];if(0>e&&d.indexLabelTextBlock.y<l||0<e&&d.indexLabelTextBlock.y>r)return 0;var p=0,x=0;x=p=p=0;for(0>e?d.indexLabelTextBlock.y-d.indexLabelTextBlock.height/2>l&&d.indexLabelTextBlock.y-d.indexLabelTextBlock.height/2+e<l&&(e=-(l-(d.indexLabelTextBlock.y-d.indexLabelTextBlock.height/2+e))):d.indexLabelTextBlock.y+d.indexLabelTextBlock.height/2<l&&d.indexLabelTextBlock.y+d.indexLabelTextBlock.height/2+e>r&&(e=d.indexLabelTextBlock.y+d.indexLabelTextBlock.height/2+e-r),e=d.indexLabelTextBlock.y+e,l=0,l="right"===d.hemisphere?k.x+Math.sqrt(Math.pow(h,2)-Math.pow(e-k.y,2)):k.x-Math.sqrt(Math.pow(h,2)-Math.pow(e-k.y,2)),x=k.x+T*Math.cos(d.midAngle),p=k.y+T*Math.sin(d.midAngle),p=Math.sqrt(Math.pow(l-x,2)+Math.pow(e-p,2)),x=Math.acos(T/h),e=(p=Math.acos((h*h+T*T-p*p)/(2*T*h)))<x?e-d.indexLabelTextBlock.y:0,l=null,r=1;r<c.length;r++){if(l=(t-r+m.length)%m.length,m[l].hemisphere!==m[t].hemisphere){l=null;break}if(m[l].indexLabelText&&m[l].hemisphere===m[t].hemisphere&&l!==t&&(0>i(m[l],m[t])||("right"===m[t].hemisphere?m[l].indexLabelTextBlock.y<=m[t].indexLabelTextBlock.y:m[l].indexLabelTextBlock.y>=m[t].indexLabelTextBlock.y)))break;l=null}x=l,p=a(t),r=l=0,0>e?(o=e,null!==(r="right"===d.hemisphere?x:p)&&(x=-e,(e=d.indexLabelTextBlock.y-d.indexLabelTextBlock.height/2-(m[r].indexLabelTextBlock.y+m[r].indexLabelTextBlock.height/2))-x<g&&(+(r=s(r,l=-x,n+1)).toFixed(f)>+l.toFixed(f)&&(o=e>g?-(e-g):-(x-(r-l)))))):0<e&&(o=e,null!==(r="right"===d.hemisphere?p:x)&&(x=e,(e=m[r].indexLabelTextBlock.y-m[r].indexLabelTextBlock.height/2-(d.indexLabelTextBlock.y+d.indexLabelTextBlock.height/2))-x<g&&(+(r=s(r,l=x,n+1)).toFixed(f)<+l.toFixed(f)&&(o=e>g?e-g:x-(l-r))))),o&&(n=d.indexLabelTextBlock.y+o,e=0,e="right"===d.hemisphere?k.x+Math.sqrt(Math.pow(h,2)-Math.pow(n-k.y,2)):k.x-Math.sqrt(Math.pow(h,2)-Math.pow(n-k.y,2)),d.midAngle>Math.PI/2-v&&d.midAngle<Math.PI/2+v?(l=(t-1+m.length)%m.length,l=m[l],t=m[(t+1+m.length)%m.length],"left"===d.hemisphere&&"right"===l.hemisphere&&e>l.indexLabelTextBlock.x?e=l.indexLabelTextBlock.x-15:"right"===d.hemisphere&&"left"===t.hemisphere&&e<t.indexLabelTextBlock.x&&(e=t.indexLabelTextBlock.x+15)):d.midAngle>3*Math.PI/2-v&&d.midAngle<3*Math.PI/2+v&&(l=(t-1+m.length)%m.length,l=m[l],t=m[(t+1+m.length)%m.length],"right"===d.hemisphere&&"left"===l.hemisphere&&e<l.indexLabelTextBlock.x?e=l.indexLabelTextBlock.x+15:"left"===d.hemisphere&&"right"===t.hemisphere&&e>t.indexLabelTextBlock.x&&(e=t.indexLabelTextBlock.x-15)),d.indexLabelTextBlock.y=n,d.indexLabelTextBlock.x=e,d.indexLabelAngle=Math.atan2(d.indexLabelTextBlock.y-k.y,d.indexLabelTextBlock.x-k.x))}return o}function n(){(x=r.plotArea.ctx).fillStyle="grey",x.strokeStyle="grey",x.font="16px Arial",x.textBaseline="middle";var t=x=0,e=0,n=!0;for(t=0;10>t&&(1>t||0<e);t++){if((d.radius||!d.radius&&void 0!==d.innerRadius&&null!==d.innerRadius&&T-e<=P)&&(n=!1),n&&(T-=e),e=0,"inside"!==d.indexLabelPlacement){for(h=T*y,x=0;x<c.length;x++){(b=m[x]).indexLabelTextBlock.x=k.x+h*Math.cos(b.midAngle),b.indexLabelTextBlock.y=k.y+h*Math.sin(b.midAngle),b.indexLabelAngle=b.midAngle,b.radius=T,b.percentInnerRadius=C}for(var o,l,x=0;x<c.length;x++){var b=m[x],v=a(x);if(null!==v){o=m[x],l=m[v];var M=0;if(0>(M=i(o,l)-g)){for(var w=l=0,S=0;S<c.length;S++)S!==x&&m[S].hemisphere===b.hemisphere&&(m[S].indexLabelTextBlock.y<b.indexLabelTextBlock.y?l++:w++);w=-1*(M-(l=M/(l+w||1)*w));var A=S=0;"right"===b.hemisphere?(S=s(x,l),+(A=s(v,w=-1*(M-S))).toFixed(f)<+w.toFixed(f)&&+S.toFixed(f)<=+l.toFixed(f)&&s(x,-(w-A))):(S=s(v,l),+(A=s(x,w=-1*(M-S))).toFixed(f)<+w.toFixed(f)&&+S.toFixed(f)<=+l.toFixed(f)&&s(v,-(w-A)))}}}}else for(x=0;x<c.length;x++)b=m[x],h="pie"===d.type?.7*T:.8*T,v=k.x+h*Math.cos(b.midAngle),l=k.y+h*Math.sin(b.midAngle),b.indexLabelTextBlock.x=v,b.indexLabelTextBlock.y=l;for(x=0;x<c.length;x++)0!==(v=(b=m[x]).indexLabelTextBlock.measureText()).height&&0!==v.width&&(v=v=0,"right"===b.hemisphere?(v=u.x2-(b.indexLabelTextBlock.x+b.indexLabelTextBlock.width+p),v*=-1):v=u.x1-(b.indexLabelTextBlock.x-b.indexLabelTextBlock.width-p),0<v&&(!n&&b.indexLabelText&&(l="right"===b.hemisphere?u.x2-b.indexLabelTextBlock.x:b.indexLabelTextBlock.x-u.x1,.3*b.indexLabelTextBlock.maxWidth>l?b.indexLabelText="":b.indexLabelTextBlock.maxWidth=.85*l,.3*b.indexLabelTextBlock.maxWidth<l&&(b.indexLabelTextBlock.x-="right"===b.hemisphere?2:-2)),Math.abs(b.indexLabelTextBlock.y-b.indexLabelTextBlock.height/2-k.y)<T||Math.abs(b.indexLabelTextBlock.y+b.indexLabelTextBlock.height/2-k.y)<T)&&(9<(v/=Math.abs(Math.cos(b.indexLabelAngle)))&&(v*=.3),v>e&&(e=v)),v=v=0,0<b.indexLabelAngle&&b.indexLabelAngle<Math.PI?(v=u.y2-(b.indexLabelTextBlock.y+b.indexLabelTextBlock.height/2+5),v*=-1):v=u.y1-(b.indexLabelTextBlock.y-b.indexLabelTextBlock.height/2-5),0<v&&(!n&&b.indexLabelText&&(0===s(x,v*(l=0<b.indexLabelAngle&&b.indexLabelAngle<Math.PI?-1:1))&&s(x,2*l)),Math.abs(b.indexLabelTextBlock.x-k.x)<T&&(9<(v/=Math.abs(Math.sin(b.indexLabelAngle)))&&(v*=.3),v>e&&(e=v))));var _=function(t,e,i){for(var a=[],s=0;a.push(m[e]),e!==i;e=(e+1+c.length)%c.length);for(a.sort((function(t,e){return t.y-e.y})),e=0;e<a.length&&(i=a[e],s<.7*t);e++)s+=i.indexLabelTextBlock.height,i.indexLabelTextBlock.text="",i.indexLabelText="",i.indexLabelTextBlock.measureText()};!function(){for(var t=-1,e=-1,s=0,n=!1,l=0;l<c.length;l++)if(n=!1,(o=m[l]).indexLabelText){var r=a(l);if(null!==r){var h,d=m[r];if(M=0,h=0>(M=i(o,d))){h=o.indexLabelTextBlock.x;var x=o.indexLabelTextBlock.y-o.indexLabelTextBlock.height/2,u=o.indexLabelTextBlock.y+o.indexLabelTextBlock.height/2,g=d.indexLabelTextBlock.y-d.indexLabelTextBlock.height/2,b=d.indexLabelTextBlock.x+d.indexLabelTextBlock.width,y=d.indexLabelTextBlock.y+d.indexLabelTextBlock.height/2;h=!(o.indexLabelTextBlock.x+o.indexLabelTextBlock.width<d.indexLabelTextBlock.x-p||h>b+p||x>y+p||u<g-p)}h?(0>t&&(t=l),r!==t&&(e=r,s+=-M),0==l%Math.max(c.length/10,3)&&(n=!0)):n=!0,n&&0<s&&0<=t&&0<=e&&(_(s,t,e),e=t=-1,s=0)}}0<s&&_(s,t,e)}()}}function l(){if(r.plotArea.layoutManager.reset(),r.title&&(r.title.dockInsidePlotArea||"center"===r.title.horizontalAlign&&"center"===r.title.verticalAlign)&&r.title.render(),r.subtitles)for(var t=0;t<r.subtitles.length;t++){var e=r.subtitles[t];(e.dockInsidePlotArea||"center"===e.horizontalAlign&&"center"===e.verticalAlign)&&e.render()}r.legend&&(r.legend.dockInsidePlotArea||"center"===r.legend.horizontalAlign&&"center"===r.legend.verticalAlign)&&(r.legend.setLayout(),r.legend.render())}var r=this;if(!(0>=t.dataSeriesIndexes.length)){var h,d=this.data[t.dataSeriesIndexes[0]],c=d.dataPoints,p=10,u=this.plotArea,m=d.dataPointEOs,g=2,y=1.3,v=20/180*Math.PI,f=6,k={x:(u.x2+u.x1)/2,y:(u.y2+u.y1)/2},M=0;t=!1;for(var w=0;w<c.length;w++)M+=Math.abs(c[w].y),!t&&void 0!==c[w].indexLabel&&null!==c[w].indexLabel&&0<c[w].indexLabel.toString().length&&(t=!0),!t&&void 0!==c[w].label&&null!==c[w].label&&0<c[w].label.toString().length&&(t=!0);if(0!==M){t=t||void 0!==d.indexLabel&&null!==d.indexLabel&&0<d.indexLabel.toString().length;var T="inside"!==d.indexLabelPlacement&&t?.75*Math.min(u.width,u.height)/2:.92*Math.min(u.width,u.height)/2;d.radius&&(T=o(d.radius,T));var P=void 0!==d.innerRadius&&null!==d.innerRadius?o(d.innerRadius,T):.7*T;d.radius=T,"doughnut"===d.type&&(d.innerRadius=P);var C=Math.min(P/T,(T-1)/T);this.pieDoughnutClickHandler=function(t){r.isAnimating||!x(t.dataSeries.explodeOnClick)&&!t.dataSeries.explodeOnClick||((t=t.dataPoint).exploded=!t.exploded,1<this.dataPoints.length&&r._animator.animate(0,500,(function(t){e(t),l()})))},function(){if(d&&c){for(var t=0,e=0,i=0,a=0,s=0;s<c.length;s++){var n=c[s],o=d.dataPointIds[s];m[s].id=o,m[s].objectType="dataPoint",m[s].dataPointIndex=s,m[s].dataSeriesIndex=0;var l=m[s],h={percent:null,total:null},p=null;h=r.getPercentAndTotal(d,n);(d.indexLabelFormatter||n.indexLabelFormatter)&&(p={chart:r.options,dataSeries:d,dataPoint:n,total:h.total,percent:h.percent}),h=n.indexLabelFormatter?n.indexLabelFormatter(p):n.indexLabel?r.replaceKeywordsWithValue(n.indexLabel,n,d,s):d.indexLabelFormatter?d.indexLabelFormatter(p):d.indexLabel?r.replaceKeywordsWithValue(d.indexLabel,n,d,s):n.label?n.label:"",r._eventManager.objectMap[o]=l,l.center={x:k.x,y:k.y},l.y=n.y,l.radius=T,l.percentInnerRadius=C,l.indexLabelText=h,l.indexLabelPlacement=d.indexLabelPlacement,l.indexLabelLineColor=n.indexLabelLineColor?n.indexLabelLineColor:d.options.indexLabelLineColor?d.options.indexLabelLineColor:n.color?n.color:d._colorSet[s%d._colorSet.length],l.indexLabelLineThickness=x(n.indexLabelLineThickness)?d.indexLabelLineThickness:n.indexLabelLineThickness,l.indexLabelLineDashType=n.indexLabelLineDashType?n.indexLabelLineDashType:d.indexLabelLineDashType,l.indexLabelFontColor=n.indexLabelFontColor?n.indexLabelFontColor:d.indexLabelFontColor,l.indexLabelFontStyle=n.indexLabelFontStyle?n.indexLabelFontStyle:d.indexLabelFontStyle,l.indexLabelFontWeight=n.indexLabelFontWeight?n.indexLabelFontWeight:d.indexLabelFontWeight,l.indexLabelFontSize=x(n.indexLabelFontSize)?d.indexLabelFontSize:n.indexLabelFontSize,l.indexLabelFontFamily=n.indexLabelFontFamily?n.indexLabelFontFamily:d.indexLabelFontFamily,l.indexLabelBackgroundColor=n.indexLabelBackgroundColor?n.indexLabelBackgroundColor:d.options.indexLabelBackgroundColor?d.options.indexLabelBackgroundColor:d.indexLabelBackgroundColor,l.indexLabelMaxWidth=n.indexLabelMaxWidth?n.indexLabelMaxWidth:d.indexLabelMaxWidth?d.indexLabelMaxWidth:.33*u.width,l.indexLabelWrap=void 0!==n.indexLabelWrap?n.indexLabelWrap:d.indexLabelWrap,l.startAngle=0===s?d.startAngle?d.startAngle/180*Math.PI:0:m[s-1].endAngle,l.startAngle=(l.startAngle+2*Math.PI)%(2*Math.PI),l.endAngle=l.startAngle+2*Math.PI/M*Math.abs(n.y),n=((n=(l.endAngle+l.startAngle)/2)+2*Math.PI)%(2*Math.PI),l.midAngle=n,l.midAngle>Math.PI/2-v&&l.midAngle<Math.PI/2+v?((0===t||m[i].midAngle>l.midAngle)&&(i=s),t++):l.midAngle>3*Math.PI/2-v&&l.midAngle<3*Math.PI/2+v&&((0===e||m[a].midAngle>l.midAngle)&&(a=s),e++),l.hemisphere=n>Math.PI/2&&n<=3*Math.PI/2?"left":"right",l.indexLabelTextBlock=new B(r.plotArea.ctx,{fontSize:l.indexLabelFontSize,fontFamily:l.indexLabelFontFamily,fontColor:l.indexLabelFontColor,fontStyle:l.indexLabelFontStyle,fontWeight:l.indexLabelFontWeight,horizontalAlign:"left",backgroundColor:l.indexLabelBackgroundColor,maxWidth:l.indexLabelMaxWidth,maxHeight:l.indexLabelWrap?5*l.indexLabelFontSize:1.5*l.indexLabelFontSize,text:l.indexLabelText,padding:0,textBaseline:"top"}),l.indexLabelTextBlock.measureText()}for(o=n=0,h=!1,s=0;s<c.length;s++)l=m[(i+s)%c.length],1<t&&l.midAngle>Math.PI/2-v&&l.midAngle<Math.PI/2+v&&(n<=t/2&&!h?(l.hemisphere="right",n++):(l.hemisphere="left",h=!0));for(h=!1,s=0;s<c.length;s++)l=m[(a+s)%c.length],1<e&&l.midAngle>3*Math.PI/2-v&&l.midAngle<3*Math.PI/2+v&&(o<=e/2&&!h?(l.hemisphere="left",o++):(l.hemisphere="right",h=!0))}}(),n(),n(),n(),n(),this.disableToolTip=!0,this._animator.animate(0,this.animatedRender?this.animationDuration:0,(function(t){var e=r.plotArea.ctx;for(e.clearRect(u.x1,u.y1,u.width,u.height),e.fillStyle=r.backgroundColor,e.fillRect(u.x1,u.y1,u.width,u.height),t=m[0].startAngle+2*Math.PI*t,e=0;e<c.length;e++){var i=0===e?m[e].startAngle:a,a=i+(m[e].endAngle-m[e].startAngle),s=!1;a>t&&(a=t,s=!0);var n=c[e].color?c[e].color:d._colorSet[e%d._colorSet.length];if(a>i&&G(r.plotArea.ctx,m[e].center,m[e].radius,n,d.type,i,a,d.fillOpacity,m[e].percentInnerRadius),s)break}l()}),(function(){r.disableToolTip=!1,r._animator.animate(0,r.animatedRender?500:0,(function(t){e(t),l()}))}))}}};var J=function(t,e,i,a){void 0===i&&(i=1),0>=Math.round(e.y4-e.y1)||(t.save(),t.globalAlpha=i,t.beginPath(),t.moveTo(Math.round(e.x1),Math.round(e.y1)),t.lineTo(Math.round(e.x2),Math.round(e.y2)),t.lineTo(Math.round(e.x3),Math.round(e.y3)),t.lineTo(Math.round(e.x4),Math.round(e.y4)),"undefined"!==e.x5&&(t.lineTo(Math.round(e.x5),Math.round(e.y5)),t.lineTo(Math.round(e.x6),Math.round(e.y6))),t.closePath(),t.fillStyle=a||e.color,t.fill(),t.globalAplha=1,t.restore())};e.prototype.renderFunnel=function(t){function e(){var t,e,i,a;if("inside"!==p.indexLabelPlacement)for(var s=0;s<O.length;s++)0==K[s].textBlock.text.length?K[s].isDirty=!0:(i=void 0!==(t=O[s]).x5?(t.y2+t.y4)/2:(t.y2+t.y3)/2,e=p.reversed?void 0!==t.x5&&i>X?l(i).x2+1:(t.x2+t.x3)/2+1:void 0!==t.x5?i<X?l(i).x2+1:(t.x4+t.x3)/2+1:(t.x2+t.x3)/2+1,K[s].textBlock.x=e+L,K[s].textBlock.y=i-K[s].height/2,p.reversed?(K[s].textBlock.y+K[s].height>D+y&&(K[s].textBlock.y=D+y-K[s].height),K[s].textBlock.y<Y-y&&(K[s].textBlock.y=Y-y)):(K[s].textBlock.y<D-y&&(K[s].textBlock.y=D-y),K[s].textBlock.y+K[s].height>Y+y&&(K[s].textBlock.y=Y+y-K[s].height)));else for(s=0;s<O.length;s++)0==K[s].textBlock.text.length?K[s].isDirty=!0:(e=(t=O[s]).height,i=K[s].height,a=K[s].width,e>=i?(e=s!=E?(t.x4+t.x3)/2-a/2:(t.x5+t.x4)/2-a/2,i=s!=E?(t.y1+t.y3)/2-i/2:(t.y1+t.y4)/2-i/2,K[s].textBlock.x=e,K[s].textBlock.y=i):K[s].isDirty=!0)}function i(t,e){return(e<O.length?K[e].textBlock.y:p.reversed?D+y:Y+y)-(0>t?p.reversed?Y-y:D-y:K[t].textBlock.y+K[t].height+q)}function a(t,i,a){var n,o,l,r=[],c=y,x=[];if(-1!==i&&(0<=Z.indexOf(i)?(o=Z.indexOf(i),Z.splice(o,1)):(Z.push(i),Z=Z.sort((function(t,e){return t-e})))),0===Z.length)r=$;else{o=y*(1!=Z.length||0!=Z[0]&&Z[0]!=O.length-1?2:1)/function(){for(var t=0,e=0;e<O.length-1;e++)(0<=Z.indexOf(e)||0<=Z.indexOf(e+1))&&t++;return t}();for(var u=0;u<O.length;u++){if(1==Z.length&&0==Z[0]){if(0===u){r.push($[u]),n=c;continue}}else 0===u&&(n=-1*c);r.push($[u]+n),(0<=Z.indexOf(u)||u<O.length&&0<=Z.indexOf(u+1))&&(n+=o)}}l=function(){for(var t=[],e=0;e<O.length;e++)t.push(r[e]-O[e].y1);return t}();(new Date).getTime();var b=function(t){for(var e,i,a=0;a<O.length;a++)e=l[a],i=O[a],e*=t,void 0===x[a]&&(x[a]=0),0>x&&(x*=-1),i.y1+=e-x[a],i.y2+=e-x[a],i.y3+=e-x[a],i.y4+=e-x[a],i.y5&&(i.y5+=e-x[a],i.y6+=e-x[a]),x[a]=e};t._animator.animate(0,a,(function(a){var n=t.plotArea.ctx||t.ctx;G=!0,n.clearRect(g.x1,g.y1,g.x2-g.x1,g.y2-g.y1),n.fillStyle=t.backgroundColor,n.fillRect(g.x1,g.y1,g.width,g.height),b(a,i);var o={};for(o.dataSeries=p,o.dataPoint=p.reversed?p.dataPoints[m.length-1-i]:p.dataPoints[i],o.index=p.reversed?m.length-1-i:i,t.toolTip.highlightObjects([o]),o=0;o<O.length;o++)J(n,O[o],p.fillOpacity);d(n),w&&("inside"!==p.indexLabelPlacement?s(n):e(),h(n)),1<=a&&(G=!1)}),null,Q.easing.easeOutQuart)}function s(t){for(var e,i,a,s,n=0;n<O.length;n++)s=1==K[n].lineThickness%2?.5:0,e=l(i=((O[n].y2+O[n].y4)/2<<0)+s).x2-1,a=K[n].textBlock.x,s=(K[n].textBlock.y+K[n].height/2<<0)+s,K[n].isDirty||0==K[n].lineThickness||(t.strokeStyle=K[n].lineColor,t.lineWidth=K[n].lineThickness,t.setLineDash&&t.setLineDash(b(K[n].lineDashType,K[n].lineThickness)),t.beginPath(),t.moveTo(e,i),t.lineTo(a,s),t.stroke())}function n(t){for(t-=1;-1<=t&&-1!=t&&K[t].isDirty;t--);return t}function o(t){for(t+=1;t<=O.length&&t!=O.length&&K[t].isDirty;t++);return t}function l(t){for(var e,i=0;i<m.length;i++)if(O[i].y1<t&&O[i].y4>t){e=O[i];break}return e?{x1:t=e.y6&&t>e.y6?e.x3+(e.x4-e.x3)/(e.y4-e.y3)*(t-e.y3):e.x2+(e.x3-e.x2)/(e.y3-e.y2)*(t-e.y2),x2:t}:-1}function h(t){for(var e=0;e<O.length;e++)K[e].isDirty||(t&&(K[e].textBlock.ctx=t),K[e].textBlock.render(!0))}function d(t){if(c.plotArea.layoutManager.reset(),t.roundRect||r(t),c.title&&(c.title.dockInsidePlotArea||"center"===c.title.horizontalAlign&&"center"===c.title.verticalAlign)&&(c.title.ctx=t,c.title.render()),c.subtitles)for(var e=0;e<c.subtitles.length;e++){var i=c.subtitles[e];(i.dockInsidePlotArea||"center"===i.horizontalAlign&&"center"===i.verticalAlign)&&(c.subtitles.ctx=t,i.render())}c.legend&&(c.legend.dockInsidePlotArea||"center"===c.legend.horizontalAlign&&"center"===c.legend.verticalAlign)&&(c.legend.ctx=t,c.legend.setLayout(),c.legend.render()),R.fNg&&R.fNg(c)}var c=this;if(!(0>=t.dataSeriesIndexes.length)){for(var p=this.data[t.dataSeriesIndexes[0]],m=p.dataPoints,g=this.plotArea,y=.025*g.width,v=.01*g.width,f=0,k=g.height-2*y,M=Math.min(g.width-2*v,2.8*g.height),w=!1,T=0;T<m.length;T++)!w&&void 0!==m[T].indexLabel&&null!==m[T].indexLabel&&0<m[T].indexLabel.toString().length&&(w=!0),!w&&void 0!==m[T].label&&null!==m[T].label&&0<m[T].label.toString().length&&(w=!0),(!w&&"function"==typeof p.indexLabelFormatter||"function"==typeof m[T].indexLabelFormatter)&&(w=!0);w=w||void 0!==p.indexLabel&&null!==p.indexLabel&&0<p.indexLabel.toString().length,"inside"!==p.indexLabelPlacement&&w||(v=(g.width-.75*M)/2);T=g.x1+v;var P=g.x2-v,C=g.y1+y,S=g.y2-y,A=t.targetCanvasCtx||this.plotArea.ctx||this.ctx;if(0!=p.length&&p.dataPoints&&p.visible&&0!==m.length){var _,F,L=30*(P-(t=75*M/100))/100;"funnel"===p.type?(_=x(p.options.neckHeight)?.35*k:p.neckHeight,F=x(p.options.neckWidth)?.25*t:p.neckWidth,"string"==typeof _&&_.match(/%$/)?_=(_=parseInt(_))*k/100:_=parseInt(_),"string"==typeof F&&F.match(/%$/)?F=(F=parseInt(F))*t/100:F=parseInt(F),_>k?_=k:0>=_&&(_=0),F>t?F=t-.5:0>=F&&(F=0)):"pyramid"===p.type&&(F=_=0,p.reversed=!p.reversed);v=T+t/2;var I=T,V=T+t,D=p.reversed?S:C,W=v-F/2,z=v+F/2,X=p.reversed?C+_:S-_,Y=p.reversed?C:S;t=[];v=[];var E,O=[],H=(M=[],C),j=(X-D)/(W-I),U=-j;if(-1!==(T="area"===(p.valueRepresents?p.valueRepresents:"height")?function(){var t,e,i=I,a=V,s=W,n=z;t=C,e=S-_,n=Math.abs((e-t)*(a-i+(n-s))/2),t=e-t,e=(s=z-W)*(e-S),e=n+(e=Math.abs(e)),n=[];for(var o=0,l=0;l<m.length;l++){if(void 0===m[l].y)return-1;m[l].y="number"==typeof m[l].y?m[l].y:0,o+=Math.abs(m[l].y)}if(0===o)return-1;var r,h,d=n[0]=0,c=0;for(a=a-i,d=!1,l=0;l<m.length;l++)i=Math.abs(m[l].y)*e/o,d?r=0==Number(s.toFixed(3))?0:i/s:0>(h=j*j*a*a-4*Math.abs(j)*i)?(i-=d=(a+(h=s))*(t-c)/2,r=t-c,c+=t-c,r+=0==h?0:i/h,c+=i/h,d=!0):(h=a-2*(r=(Math.abs(j)*a-Math.sqrt(h))/2)/Math.abs(j),(c+=r)>t&&(d=(a+(h=s))*(t-(c-=r))/2,r=t-c,c+=t-c,r+=(i-=d)/h,c+=i/h,d=!0),a=h),n.push(r);return n}():function(){for(var t=0,e=[],i=0;i<m.length;i++){if(void 0===m[i].y)return-1;m[i].y="number"==typeof m[i].y?m[i].y:0,t+=Math.abs(m[i].y)}if(0===t)return-1;for(i=e[0]=0;i<m.length;i++)e.push(Math.abs(m[i].y)*k/t);return e}())){if(p.reversed)for(M.push(H),F=T.length-1;0<F;F--)H+=T[F],M.push(H);else for(F=0;F<T.length;F++)H+=T[F],M.push(H);if(p.reversed)for(F=0;F<T.length;F++)M[F]<X?(t.push(W),v.push(z),E=F):(t.push((M[F]-D+j*I)/j),v.push((M[F]-D+U*V)/U));else for(F=0;F<T.length;F++)M[F]<X?(t.push((M[F]-D+j*I)/j),v.push((M[F]-D+U*V)/U),E=F):(t.push(W),v.push(z));for(F=0;F<T.length-1;F++)H=p.reversed?m[m.length-1-F].color?m[m.length-1-F].color:p._colorSet[(m.length-1-F)%p._colorSet.length]:m[F].color?m[F].color:p._colorSet[F%p._colorSet.length],F===E?O.push({x1:t[F],y1:M[F],x2:v[F],y2:M[F],x3:z,y3:X,x4:v[F+1],y4:M[F+1],x5:t[F+1],y5:M[F+1],x6:W,y6:X,id:F,height:M[F+1]-M[F],color:H}):O.push({x1:t[F],y1:M[F],x2:v[F],y2:M[F],x3:v[F+1],y3:M[F+1],x4:t[F+1],y4:M[F+1],id:F,height:M[F+1]-M[F],color:H});var q=2,K=[],G=!1,Z=[],$=[];T=!1;for(t=t=0,u(Z),F=0;F<m.length;F++)m[F].exploded&&(T=!0,p.reversed?Z.push(m.length-1-F):Z.push(F));if(A.clearRect(g.x1,g.y1,g.width,g.height),A.fillStyle=c.backgroundColor,A.fillRect(g.x1,g.y1,g.width,g.height),w&&p.visible&&(function(){if(p&&m){for(var t,e,i,a,s,n,o,h,d,u,g,b,y,v,f=[],k=[],M={percent:null,total:null},w=null,T=0;T<m.length;T++)v=l(v=void 0!==(v=O[T]).x5?(v.y2+v.y4)/2:(v.y2+v.y3)/2).x2+1,f[T]=P-v-L;v=.5*L;T=0;for(var C=m.length-1;T<m.length||0<=C;T++,C--)t=(e=p.reversed?m[C]:m[T]).color?e.color:p.reversed?p._colorSet[(m.length-1-T)%p._colorSet.length]:p._colorSet[T%p._colorSet.length],i=e.indexLabelPlacement||p.indexLabelPlacement||"outside",a=e.indexLabelBackgroundColor||p.indexLabelBackgroundColor||(N?"transparent":null),s=e.indexLabelFontColor||p.indexLabelFontColor||"#979797",n=x(e.indexLabelFontSize)?p.indexLabelFontSize:e.indexLabelFontSize,o=e.indexLabelFontStyle||p.indexLabelFontStyle||"normal",h=e.indexLabelFontFamily||p.indexLabelFontFamily||"arial",d=e.indexLabelFontWeight||p.indexLabelFontWeight||"normal",t=e.indexLabelLineColor||p.options.indexLabelLineColor||t,u="number"==typeof e.indexLabelLineThickness?e.indexLabelLineThickness:"number"==typeof p.indexLabelLineThickness?p.indexLabelLineThickness:2,g=e.indexLabelLineDashType||p.indexLabelLineDashType||"solid",b=void 0!==e.indexLabelWrap?e.indexLabelWrap:void 0===p.indexLabelWrap||p.indexLabelWrap,y=p.dataPointIds[T],c._eventManager.objectMap[y]={id:y,objectType:"dataPoint",dataPointIndex:T,dataSeriesIndex:0,funnelSection:O[p.reversed?m.length-1-T:T]},"inside"===p.indexLabelPlacement&&(f[T]=T!==E?p.reversed?O[T].x2-O[T].x1:O[T].x3-O[T].x4:O[T].x3-O[T].x6,20>f[T]&&(f[T]=T!==E&&p.reversed?O[T].x3-O[T].x4:O[T].x2-O[T].x1,f[T]/=2)),((y=e.indexLabelMaxWidth?e.indexLabelMaxWidth:p.options.indexLabelMaxWidth?p.indexLabelMaxWidth:f[T])>f[T]||0>y)&&(y=f[T]),k[T]="inside"===p.indexLabelPlacement&&O[T].height,M=c.getPercentAndTotal(p,e),(p.indexLabelFormatter||e.indexLabelFormatter)&&(w={chart:c.options,dataSeries:p,dataPoint:e,total:M.total,percent:M.percent}),e=e.indexLabelFormatter?e.indexLabelFormatter(w):e.indexLabel?c.replaceKeywordsWithValue(e.indexLabel,e,p,T):p.indexLabelFormatter?p.indexLabelFormatter(w):p.indexLabel?c.replaceKeywordsWithValue(p.indexLabel,e,p,T):e.label?e.label:"",0>=u&&(u=0),1e3>y&&1e3-y<v&&(y+=1e3-y),A.roundRect||r(A),(i=new B(A,{fontSize:n,fontFamily:h,fontColor:s,fontStyle:o,fontWeight:d,horizontalAlign:i,backgroundColor:a,maxWidth:y,maxHeight:!1===k[T]?b?4.28571429*n:1.5*n:k[T],text:e,padding:q})).measureText(),K.push({textBlock:i,id:p.reversed?C:T,isDirty:!1,lineColor:t,lineThickness:u,lineDashType:g,height:i.height<i.maxHeight?i.height:i.maxHeight,width:i.width<i.maxWidth?i.width:i.maxWidth})}}(),e(),function(){var t,e,i,a,s,n=[];s=!1,i=0;for(var l,r=P-V-L/2,h=(r=p.options.indexLabelMaxWidth?p.indexLabelMaxWidth>r?r:p.indexLabelMaxWidth:r,K.length-1);0<=h;h--)l=m[K[h].id],a=(i=K[h]).textBlock,e=(t=o(h)<O.length?K[o(h)]:null)?t.textBlock:null,i=i.height,t&&a.y+i+q>e.y&&(s=!0),((i=l.indexLabelMaxWidth||r)>r||0>i)&&(i=r),n.push(i);if(s)for(h=K.length-1;0<=h;h--)t=O[h],K[h].textBlock.maxWidth=n[n.length-(h+1)],K[h].textBlock.measureText(),K[h].textBlock.x=P-r,i=K[h].textBlock.height<K[h].textBlock.maxHeight?K[h].textBlock.height:K[h].textBlock.maxHeight,s=K[h].textBlock.width<K[h].textBlock.maxWidth?K[h].textBlock.width:K[h].textBlock.maxWidth,K[h].height=i,K[h].width=s,i=void 0!==t.x5?(t.y2+t.y4)/2:(t.y2+t.y3)/2,K[h].textBlock.y=i-K[h].height/2,p.reversed?(K[h].textBlock.y+K[h].height>D+y&&(K[h].textBlock.y=D+y-K[h].height),K[h].textBlock.y<Y-y&&(K[h].textBlock.y=Y-y)):(K[h].textBlock.y<D-y&&(K[h].textBlock.y=D-y),K[h].textBlock.y+K[h].height>Y+y&&(K[h].textBlock.y=Y+y-K[h].height))}(),"inside"!==p.indexLabelPlacement)){for(function(){function t(e,a){var s;if(0>e||e>=K.length)return 0;var l,r=K[e].textBlock;return 0>a?(a*=-1,(s=i(l=n(e),e))>=a?(r.y-=a,a):0==e?(0<s&&(r.y-=s),s):(0<(s+=t(l,-(a-s)))&&(r.y-=s),s)):(s=i(e,l=o(e)))>=a?(r.y+=a,a):e==O.length-1?(0<s&&(r.y+=s),s):(0<(s+=t(l,a-s))&&(r.y+=s),s)}function e(){var t,e,i,s,l,r=0;s=(S-C+2*y)/p,l=p;for(var h,d=1;d<l;d++){i=d*s;for(var c=K.length-1;0<=c;c--)!K[c].isDirty&&K[c].textBlock.y<i&&K[c].textBlock.y+K[c].height>i&&(!((h=o(c))>=K.length-1)&&K[c].textBlock.y+K[c].height+q>K[h].textBlock.y&&(K[c].textBlock.y=K[c].textBlock.y+K[c].height-i>i-K[c].textBlock.y?i+1:i-K[c].height-1))}for(h=O.length-1;0<h;h--)if(!K[h].isDirty){if(0>(i=n(h))&&K[i=0].isDirty)break;if(K[h].textBlock.y<K[i].textBlock.y+K[i].height){for(e=e||h,s=h,l=0;K[s].textBlock.y<K[i].textBlock.y+K[i].height+q;){if(t=t||K[s].textBlock.y+K[s].height,l+=K[s].height,l+=q,0>=(s=i)){l+=K[s=0].height;break}if(0>(i=n(s))){l+=K[s=0].height;break}}if(s!=h){r=a(t=l-(t-=r=K[s].textBlock.y),e,s);break}}}return r}function a(t,e,i){var a=[],s=0,n=0;for(t=Math.abs(t);i<=e;i++)a.push(O[i]);for(a.sort((function(t,e){return t.height-e.height})),i=0;i<a.length&&(e=a[i],s<t);i++)n++,s+=K[e.id].height+q,K[e.id].textBlock.text="",K[e.id].indexLabelText="",K[e.id].isDirty=!0,K[e.id].textBlock.measureText();return n}for(var s,l,r,h,d,c,p=1,x=0;x<2*p;x++){for(var u=K.length-1;0<=u&&(0<=n(u)&&n(u),h=(r=K[u]).textBlock,c=(d=o(u)<O.length?K[o(u)]:null)?d.textBlock:null,s=+r.height.toFixed(6),l=+h.y.toFixed(6),!(!r.isDirty&&d&&l+s+q>+c.y.toFixed(6)&&(s=h.y+s+q-c.y,l=t(u,-s),l<s&&(0<l&&(s-=l),l=t(o(u),s),l!=s))));u--);e()}}(),F=0;F<m.length;F++)K[F].isDirty||(t=K[F].textBlock.x+K[F].width,t=(P-t)/2,0==F&&(f=t),f>t&&(f=t));for(F=0;F<O.length;F++)O[F].x1+=f,O[F].x2+=f,O[F].x3+=f,O[F].x4+=f,O[F].x5&&(O[F].x5+=f,O[F].x6+=f),K[F].textBlock.x+=f}for(F=0;F<O.length;F++)f=O[F],J(A,f,p.fillOpacity),$.push(f.y1);if(d(A),w&&p.visible&&("inside"===p.indexLabelPlacement||c.animationEnabled||s(A),c.animationEnabled||h()),!w)for(F=0;F<m.length;F++)t={id:f=p.dataPointIds[F],objectType:"dataPoint",dataPointIndex:F,dataSeriesIndex:0,funnelSection:O[p.reversed?m.length-1-F:F]},c._eventManager.objectMap[f]=t;return(!c.animationEnabled&&T||c.animationEnabled&&!c.animatedRender)&&a(c,-1,0),this.funnelPyramidClickHandler=function(t){var e=-1;!G&&!c.isAnimating&&(x(t.dataSeries.explodeOnClick)||t.dataSeries.explodeOnClick)&&0<=(e=p.reversed?m.length-1-t.dataPointIndex:t.dataPointIndex)&&(t=e,"funnel"!==p.type&&"pyramid"!==p.type||(p.reversed?m[m.length-1-t].exploded=!m[m.length-1-t].exploded:m[t].exploded=!m[t].exploded),a(c,e,500))},{source:A,dest:this.plotArea.ctx,animationCallback:function(t,e){Q.fadeInAnimation(t,e),1<=t&&(a(c,-1,500),d(c.plotArea.ctx||c.ctx))},easingFunction:Q.easing.easeInQuad,animationBase:0}}}}},e.prototype.requestAnimFrame=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)},e.prototype.cancelRequestAnimFrame=window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.mozCancelRequestAnimationFrame||window.oCancelRequestAnimationFrame||window.msCancelRequestAnimationFrame||clearTimeout,e.prototype.set=function(t,i,a){a=void 0===a||a,"options"===t?(this.options=i,a&&this.render()):e.base.set.call(this,t,i,a)},e.prototype.exportChart=function(t){var e=(t=void 0===t?{}:t).format?t.format:"png",i=t.fileName?t.fileName:this.exportFileName;if(t.toDataURL)return this.canvas.toDataURL("image/"+e);d(this.canvas,e,i)},e.prototype.print=function(){var t=this.exportChart({toDataURL:!0}),e=document.createElement("iframe");e.setAttribute("class","canvasjs-chart-print-frame"),e.setAttribute("style","position:absolute; width:100%; border: 0px; margin: 0px 0px 0px 0px; padding 0px 0px 0px 0px;"),e.style.height=this.height+"px",this._canvasJSContainer.appendChild(e);var i=this,a=e.contentWindow||e.contentDocument.document||e.contentDocument;a.document.open(),a.document.write('<!DOCTYPE HTML>\n<html><body style="margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;"><img src="'+t+'"/><body/></html>'),a.document.close(),setTimeout((function(){a.focus(),a.print(),setTimeout((function(){i._canvasJSContainer.removeChild(e)}),1e3)}),500)},e.prototype.getPercentAndTotal=function(t,e){var i=null,a=null,s=null;if(0<=t.type.indexOf("stacked"))a=0,(i=e.x.getTime?e.x.getTime():e.x)in t.plotUnit.yTotals&&(a=t.plotUnit.yTotals[i],s=isNaN(e.y)?0:e.y/a*100);else if("pie"===t.type||"doughnut"===t.type||"funnel"===t.type||"pyramid"===t.type){for(i=a=0;i<t.dataPoints.length;i++)isNaN(t.dataPoints[i].y)||(a+=t.dataPoints[i].y);s=isNaN(e.y)?0:e.y/a*100}return{percent:s,total:a}},e.prototype.replaceKeywordsWithValue=function(t,e,i,a,s){var n=this;if(s=void 0===s?0:s,(0<=i.type.indexOf("stacked")||"pie"===i.type||"doughnut"===i.type||"funnel"===i.type||"pyramid"===i.type)&&(0<=t.indexOf("#percent")||0<=t.indexOf("#total"))){var o="#percent",r="#total",h=this.getPercentAndTotal(i,e);r=isNaN(h.total)?r:h.total,o=isNaN(h.percent)?o:h.percent;do{if(h="",i.percentFormatString)h=i.percentFormatString;else{h="#,##0.";var d=Math.max(Math.ceil(Math.log(1/Math.abs(o))/Math.LN10),2);!isNaN(d)&&isFinite(d)||(d=2);for(var c=0;c<d;c++)h+="#";i.percentFormatString=h}t=(t=t.replace("#percent",ot(o,h,n._cultureInfo))).replace("#total",ot(r,i.yValueFormatString?i.yValueFormatString:"#,##0.########",n._cultureInfo))}while(0<=t.indexOf("#percent")||0<=t.indexOf("#total"))}return t.replace(/\{.*?\}|"[^"]*"|'[^']*'/g,(function(t){if('"'===t[0]&&'"'===t[t.length-1]||"'"===t[0]&&"'"===t[t.length-1])return t.slice(1,t.length-1);t=(t=l(t.slice(1,t.length-1))).replace("#index",s);var o=null;try{var r=t.match(/(.*?)\s*\[\s*(.*?)\s*\]/);r&&0<r.length&&(o=l(r[2]),t=l(r[1]))}catch(t){}if(r=null,"color"===t)return"waterfall"===i.type?e.color?e.color:0<e.y?i.risingColor:i.fallingColor:"error"===i.type?i.color?i.color:i._colorSet[o%i._colorSet.length]:e.color?e.color:i.color?i.color:i._colorSet[a%i._colorSet.length];if(e.hasOwnProperty(t))r=e;else{if(!i.hasOwnProperty(t))return"";r=i}return r=r[t],null!==o&&(r=r[o]),"x"!==t?"y"===t?ot(r,e.yValueFormatString?e.yValueFormatString:i.yValueFormatString?i.yValueFormatString:i.yValueFormatString="#,##0.########",n._cultureInfo):"z"===t?ot(r,e.zValueFormatString?e.zValueFormatString:i.zValueFormatString?i.zValueFormatString:i.zValueFormatString="#,##0.########",n._cultureInfo):r:"dateTime"===i.axisX.valueType||"dateTime"===i.xValueType||e.x&&e.x.getTime?n.plotInfo.plotTypes[0].plotUnits[0].axisX&&!n.plotInfo.plotTypes[0].plotUnits[0].axisX.logarithmic?nt(r,e.xValueFormatString?e.xValueFormatString:i.xValueFormatString?i.xValueFormatString:i.xValueFormatString=n.axisX&&n.axisX.autoValueFormatString?n.axisX.autoValueFormatString:"DD MMM YY",n._cultureInfo):void 0:ot(r,e.xValueFormatString?e.xValueFormatString:i.xValueFormatString?i.xValueFormatString:i.xValueFormatString="#,##0.########",n._cultureInfo)}))},i(p,A),p.prototype.setLayout=function(){var t=this.dockInsidePlotArea?this.chart.plotArea:this.chart,e=t.layoutManager.getFreeSpace(),i=null,a=0,s=0,n=0,o=0,l=this.markerMargin=this.chart.options.legend&&!x(this.chart.options.legend.markerMargin)?this.chart.options.legend.markerMargin:.3*this.fontSize;this.height=0;var r=[],h=[];"top"===this.verticalAlign||"bottom"===this.verticalAlign?(this.orientation="horizontal",i=this.verticalAlign,n=this.maxWidth=null!==this.maxWidth?this.maxWidth:e.width,o=this.maxHeight=null!==this.maxHeight?this.maxHeight:.5*e.height):"center"===this.verticalAlign&&(this.orientation="vertical",i=this.horizontalAlign,n=this.maxWidth=null!==this.maxWidth?this.maxWidth:.5*e.width,o=this.maxHeight=null!==this.maxHeight?this.maxHeight:e.height),this.errorMarkerColor=[];for(var d=0;d<this.dataSeries.length;d++){var c=this.dataSeries[d];if(c.dataPoints&&c.dataPoints.length)if("pie"!==c.type&&"doughnut"!==c.type&&"funnel"!==c.type&&"pyramid"!==c.type){var p=c.legendMarkerType=c.legendMarkerType?c.legendMarkerType:"line"!==c.type&&"stepLine"!==c.type&&"spline"!==c.type&&"scatter"!==c.type&&"bubble"!==c.type||!c.markerType?"error"===c.type&&c._linkedSeries?c._linkedSeries.legendMarkerType?c._linkedSeries.legendMarkerType:W.getDefaultLegendMarker(c._linkedSeries.type):W.getDefaultLegendMarker(c.type):c.markerType,u=c.legendText?c.legendText:this.itemTextFormatter?this.itemTextFormatter({chart:this.chart,legend:this.options,dataSeries:c,dataPoint:null}):c.name,m=c.legendMarkerColor=c.legendMarkerColor?c.legendMarkerColor:c.markerColor?c.markerColor:"error"===c.type?x(c.whiskerColor)?c._colorSet[0]:c.whiskerColor:c._colorSet[0],g=c.markerSize||"line"!==c.type&&"stepLine"!==c.type&&"spline"!==c.type?.75*this.lineHeight:0,b=c.legendMarkerBorderColor?c.legendMarkerBorderColor:c.markerBorderColor,y=c.legendMarkerBorderThickness?c.legendMarkerBorderThickness:c.markerBorderThickness?Math.max(1,Math.round(.2*g)):0;"error"===c.type&&this.errorMarkerColor.push(m),p={markerType:p,markerColor:m,text:u=this.chart.replaceKeywordsWithValue(u,c.dataPoints[0],c,d),textBlock:null,chartType:c.type,markerSize:g,lineColor:c._colorSet[0],dataSeriesIndex:c.index,dataPointIndex:null,markerBorderColor:b,markerBorderThickness:y},r.push(p)}else for(var v=0;v<c.dataPoints.length;v++){var f=c.dataPoints[v];p=f.legendMarkerType?f.legendMarkerType:c.legendMarkerType?c.legendMarkerType:W.getDefaultLegendMarker(c.type),u=f.legendText?f.legendText:c.legendText?c.legendText:this.itemTextFormatter?this.itemTextFormatter({chart:this.chart,legend:this.options,dataSeries:c,dataPoint:f}):f.name?f.name:"DataPoint: "+(v+1),m=f.legendMarkerColor?f.legendMarkerColor:c.legendMarkerColor?c.legendMarkerColor:f.color?f.color:c.color?c.color:c._colorSet[v%c._colorSet.length],g=.75*this.lineHeight,b=f.legendMarkerBorderColor?f.legendMarkerBorderColor:c.legendMarkerBorderColor?c.legendMarkerBorderColor:f.markerBorderColor?f.markerBorderColor:c.markerBorderColor,y=f.legendMarkerBorderThickness?f.legendMarkerBorderThickness:c.legendMarkerBorderThickness?c.legendMarkerBorderThickness:f.markerBorderThickness||c.markerBorderThickness?Math.max(1,Math.round(.2*g)):0,p={markerType:p,markerColor:m,text:u=this.chart.replaceKeywordsWithValue(u,f,c,v),textBlock:null,chartType:c.type,markerSize:g,dataSeriesIndex:d,dataPointIndex:v,markerBorderColor:b,markerBorderThickness:y};(f.showInLegend||c.showInLegend&&!1!==f.showInLegend)&&r.push(p)}}if(!0===this.reversed&&r.reverse(),0<r.length){for(c=null,m=u=f=v=0,f=null!==this.itemWidth?null!==this.itemMaxWidth?Math.min(this.itemWidth,this.itemMaxWidth,n):this.itemMaxWidth=Math.min(this.itemWidth,n):null!==this.itemMaxWidth?Math.min(this.itemMaxWidth,n):this.itemMaxWidth=n,f-=(g=0===g?.75*this.lineHeight:g)+l,d=0;d<r.length;d++)b=f,"line"!==(p=r[d]).chartType&&"spline"!==p.chartType&&"stepLine"!==p.chartType||(b-=.2*this.lineHeight),0>=o||void 0===o||0>=b||void 0===b||("horizontal"===this.orientation?(p.textBlock=new B(this.ctx,{x:0,y:0,maxWidth:b,maxHeight:this.itemWrap?o:this.lineHeight,angle:0,text:p.text,horizontalAlign:"left",fontSize:this.fontSize,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"middle"}),p.textBlock.measureText(),null!==this.itemWidth&&(p.textBlock.width=this.itemWidth-(g+l+("line"===p.chartType||"spline"===p.chartType||"stepLine"===p.chartType?.2*this.lineHeight:0))),(!c||c.width+Math.round(p.textBlock.width+g+l+(0===c.width?0:this.horizontalSpacing)+("line"===p.chartType||"spline"===p.chartType||"stepLine"===p.chartType?.2*this.lineHeight:0))>n)&&(c={items:[],width:0},h.push(c),this.height+=u,u=0),u=Math.max(u,p.textBlock.height)):(p.textBlock=new B(this.ctx,{x:0,y:0,maxWidth:f,maxHeight:!0===this.itemWrap?o:1.5*this.fontSize,angle:0,text:p.text,horizontalAlign:"left",fontSize:this.fontSize,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontColor:this.fontColor,fontStyle:this.fontStyle,textBaseline:"middle"}),p.textBlock.measureText(),null!==this.itemWidth&&(p.textBlock.width=this.itemWidth-(g+l+("line"===p.chartType||"spline"===p.chartType||"stepLine"===p.chartType?.2*this.lineHeight:0))),this.height<o-this.lineHeight?(c={items:[],width:0},h.push(c)):(c=h[v],v=(v+1)%h.length),this.height+=p.textBlock.height),p.textBlock.x=c.width,p.textBlock.y=0,c.width+=Math.round(p.textBlock.width+g+l+(0===c.width?0:this.horizontalSpacing)+("line"===p.chartType||"spline"===p.chartType||"stepLine"===p.chartType?.2*this.lineHeight:0)),c.items.push(p),this.width=Math.max(c.width,this.width),m=p.textBlock.width+(g+l+("line"===p.chartType||"spline"===p.chartType||"stepLine"===p.chartType?.2*this.lineHeight:0)));this.itemWidth=m,this.height=!1===this.itemWrap?h.length*this.lineHeight:this.height+u,this.height=Math.min(o,this.height),this.width=Math.min(n,this.width)}for("top"===this.verticalAlign?(s="left"===this.horizontalAlign?e.x1:"right"===this.horizontalAlign?e.x2-this.width:e.x1+e.width/2-this.width/2,a=e.y1):"center"===this.verticalAlign?(s="left"===this.horizontalAlign?e.x1:"right"===this.horizontalAlign?e.x2-this.width:e.x1+e.width/2-this.width/2,a=e.y1+e.height/2-this.height/2):"bottom"===this.verticalAlign&&(s="left"===this.horizontalAlign?e.x1:"right"===this.horizontalAlign?e.x2-this.width:e.x1+e.width/2-this.width/2,a=e.y2-this.height),this.items=r,d=0;d<this.items.length;d++)(p=r[d]).id=++this.chart._eventManager.lastObjectId,this.chart._eventManager.objectMap[p.id]={id:p.id,objectType:"legendItem",legendItemIndex:d,dataSeriesIndex:p.dataSeriesIndex,dataPointIndex:p.dataPointIndex};this.markerSize=g,this.rows=h,0<r.length&&t.layoutManager.registerSpace(i,{width:this.width+2+2,height:this.height+5+5}),this.bounds={x1:s,y1:a,x2:s+this.width,y2:a+this.height}},p.prototype.render=function(){var t=this.bounds.x1,e=this.bounds.y1,i=this.markerMargin,a=this.maxWidth,s=this.maxHeight,n=this.markerSize,o=this.rows;(0<this.borderThickness&&this.borderColor||this.backgroundColor)&&this.ctx.roundRect(t,e,this.width,this.height,this.cornerRadius,this.borderThickness,this.backgroundColor,this.borderColor);for(var l=0,r=0;r<o.length;r++){for(var h=o[r],d=0,p=0;p<h.items.length;p++){var x=h.items[p],u=x.textBlock.x+t+(0===p?.2*n:this.horizontalSpacing),m=e+l,g=u;if(this.chart.data[x.dataSeriesIndex].visible||(this.ctx.globalAlpha=.5),this.ctx.save(),this.ctx.beginPath(),this.ctx.rect(t,e,a,Math.max(s-s%this.lineHeight,0)),this.ctx.clip(),"line"!==x.chartType&&"stepLine"!==x.chartType&&"spline"!==x.chartType||(this.ctx.strokeStyle=x.lineColor,this.ctx.lineWidth=Math.ceil(this.lineHeight/8),this.ctx.beginPath(),this.ctx.moveTo(u-.1*this.lineHeight,m+this.lineHeight/2),this.ctx.lineTo(u+.85*this.lineHeight,m+this.lineHeight/2),this.ctx.stroke(),g-=.1*this.lineHeight),"error"===x.chartType){this.ctx.strokeStyle=this.errorMarkerColor[0],this.ctx.lineWidth=n/8,this.ctx.beginPath();var b=u-.08*this.lineHeight+.1*this.lineHeight,y=m+.15*this.lineHeight,v=.7*this.lineHeight,f=v+.02*this.lineHeight;this.ctx.moveTo(b,y),this.ctx.lineTo(b+v,y),this.ctx.stroke(),this.ctx.beginPath(),this.ctx.moveTo(b+v/2,y),this.ctx.lineTo(b+v/2,y+f),this.ctx.stroke(),this.ctx.beginPath(),this.ctx.moveTo(b,y+f),this.ctx.lineTo(b+v,y+f),this.ctx.stroke(),this.errorMarkerColor.shift()}Z.drawMarker(u+n/2,m+this.lineHeight/2,this.ctx,x.markerType,"error"===x.chartType||"line"===x.chartType||"spline"===x.chartType?x.markerSize/2:x.markerSize,x.markerColor,x.markerBorderColor,x.markerBorderThickness),x.textBlock.x=u+i+n,"line"!==x.chartType&&"stepLine"!==x.chartType&&"spline"!==x.chartType||(x.textBlock.x+=.1*this.lineHeight),x.textBlock.y=Math.round(m+this.lineHeight/2),x.textBlock.render(!0),this.ctx.restore(),d=0<p?Math.max(d,x.textBlock.height):x.textBlock.height,this.chart.data[x.dataSeriesIndex].visible||(this.ctx.globalAlpha=1),u=c(x.id),this.ghostCtx.fillStyle=u,this.ghostCtx.beginPath(),this.ghostCtx.fillRect(g,x.textBlock.y-this.lineHeight/2,x.textBlock.x+x.textBlock.width-g,x.textBlock.height),x.x1=this.chart._eventManager.objectMap[x.id].x1=g,x.y1=this.chart._eventManager.objectMap[x.id].y1=x.textBlock.y-this.lineHeight/2,x.x2=this.chart._eventManager.objectMap[x.id].x2=x.textBlock.x+x.textBlock.width,x.y2=this.chart._eventManager.objectMap[x.id].y2=x.textBlock.y+x.textBlock.height-this.lineHeight/2}l+=d}},i(W,A),W.prototype.getDefaultAxisPlacement=function(){var t=this.type;return"column"===t||"line"===t||"stepLine"===t||"spline"===t||"area"===t||"stepArea"===t||"splineArea"===t||"stackedColumn"===t||"stackedLine"===t||"bubble"===t||"scatter"===t||"stackedArea"===t||"stackedColumn100"===t||"stackedLine100"===t||"stackedArea100"===t||"candlestick"===t||"ohlc"===t||"rangeColumn"===t||"rangeArea"===t||"rangeSplineArea"===t||"boxAndWhisker"===t||"waterfall"===t?"normal":"bar"===t||"stackedBar"===t||"stackedBar100"===t||"rangeBar"===t?"xySwapped":"pie"===t||"doughnut"===t||"funnel"===t||"pyramid"===t?"none":("error"!==t&&window.console.log("Unknown Chart Type: "+t),null)},W.getDefaultLegendMarker=function(t){return"column"===t||"stackedColumn"===t||"stackedLine"===t||"bar"===t||"stackedBar"===t||"stackedBar100"===t||"bubble"===t||"scatter"===t||"stackedColumn100"===t||"stackedLine100"===t||"stepArea"===t||"candlestick"===t||"ohlc"===t||"rangeColumn"===t||"rangeBar"===t||"rangeArea"===t||"rangeSplineArea"===t||"boxAndWhisker"===t||"waterfall"===t?"square":"line"===t||"stepLine"===t||"spline"===t||"pie"===t||"doughnut"===t?"circle":"area"===t||"splineArea"===t||"stackedArea"===t||"stackedArea100"===t||"funnel"===t||"pyramid"===t?"triangle":"error"===t?"none":(window.console.log("Unknown Chart Type: "+t),null)},W.prototype.getDataPointAtX=function(t,e){if(!this.dataPoints||0===this.dataPoints.length)return null;var i={dataPoint:null,distance:1/0,index:NaN},a=null,s=0,n=0,o=1,l=1/0,r=0,h=0,d=0;for("none"!==this.chart.plotInfo.axisPlacement&&(this.axisX.logarithmic?d=1<(d=Math.log(this.dataPoints[this.dataPoints.length-1].x/this.dataPoints[0].x))?Math.min(Math.max((this.dataPoints.length-1)/d*Math.log(t/this.dataPoints[0].x)>>0,0),this.dataPoints.length):0:d=0<(d=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x)?Math.min(Math.max((this.dataPoints.length-1)/d*(t-this.dataPoints[0].x)>>0,0),this.dataPoints.length):0);;){if(0<=(n=0<o?d+s:d-s)&&n<this.dataPoints.length){a=this.dataPoints[n];var c=this.axisX.logarithmic?a.x>t?a.x/t:t/a.x:Math.abs(a.x-t);if(c<i.distance&&(i.dataPoint=a,i.distance=c,i.index=n),(a=c)<=l?l=a:0<o?r++:h++,1e3<r&&1e3<h)break}else if(0>d-s&&d+s>=this.dataPoints.length)break;-1===o?(s++,o=1):o=-1}return e||i.dataPoint.x!==t?e&&null!==i.dataPoint?i:null:i},W.prototype.getDataPointAtXY=function(t,e,i){if(!this.dataPoints||0===this.dataPoints.length||t<this.chart.plotArea.x1||t>this.chart.plotArea.x2||e<this.chart.plotArea.y1||e>this.chart.plotArea.y2)return null;i=i||!1;var a=[],s=0,n=0,o=1,l=!1,r=1/0,h=0,d=0,c=0;if("none"!==this.chart.plotInfo.axisPlacement)if(c=(this.chart.axisX[0]?this.chart.axisX[0]:this.chart.axisX2[0]).getXValueAt({x:t,y:e}),this.axisX.logarithmic)c=1<(p=Math.log(this.dataPoints[this.dataPoints.length-1].x/this.dataPoints[0].x))?Math.min(Math.max((this.dataPoints.length-1)/p*Math.log(c/this.dataPoints[0].x)>>0,0),this.dataPoints.length):0;else c=0<(p=this.dataPoints[this.dataPoints.length-1].x-this.dataPoints[0].x)?Math.min(Math.max((this.dataPoints.length-1)/p*(c-this.dataPoints[0].x)>>0,0),this.dataPoints.length):0;for(;;){if(0<=(n=0<o?c+s:c-s)&&n<this.dataPoints.length){var p=this.chart._eventManager.objectMap[this.dataPointIds[n]],x=this.dataPoints[n],u=null;if(p){switch(this.type){case"column":case"stackedColumn":case"stackedColumn100":case"bar":case"stackedBar":case"stackedBar100":case"rangeColumn":case"rangeBar":case"waterfall":case"error":t>=p.x1&&t<=p.x2&&e>=p.y1&&e<=p.y2&&(a.push({dataPoint:x,dataPointIndex:n,dataSeries:this,distance:Math.min(Math.abs(p.x1-t),Math.abs(p.x2-t),Math.abs(p.y1-e),Math.abs(p.y2-e))}),l=!0);break;case"line":case"stepLine":case"spline":case"area":case"stepArea":case"stackedArea":case"stackedArea100":case"splineArea":case"scatter":var m=f("markerSize",x,this)||4,g=i?20:m;(u=Math.sqrt(Math.pow(p.x1-t,2)+Math.pow(p.y1-e,2)))<=g&&a.push({dataPoint:x,dataPointIndex:n,dataSeries:this,distance:u}),(p=Math.abs(p.x1-t))<=r?r=p:0<o?h++:d++,u<=m/2&&(l=!0);break;case"rangeArea":case"rangeSplineArea":m=f("markerSize",x,this)||4,g=i?20:m,(u=Math.min(Math.sqrt(Math.pow(p.x1-t,2)+Math.pow(p.y1-e,2)),Math.sqrt(Math.pow(p.x1-t,2)+Math.pow(p.y2-e,2))))<=g&&a.push({dataPoint:x,dataPointIndex:n,dataSeries:this,distance:u}),(p=Math.abs(p.x1-t))<=r?r=p:0<o?h++:d++,u<=m/2&&(l=!0);break;case"bubble":m=p.size,(u=Math.sqrt(Math.pow(p.x1-t,2)+Math.pow(p.y1-e,2)))<=m/2&&(a.push({dataPoint:x,dataPointIndex:n,dataSeries:this,distance:u}),l=!0);break;case"pie":case"doughnut":m=p.center,g="doughnut"===this.type?p.percentInnerRadius*p.radius:0,(u=Math.sqrt(Math.pow(m.x-t,2)+Math.pow(m.y-e,2)))<p.radius&&u>g&&(0>(u=Math.atan2(e-m.y,t-m.x))&&(u+=2*Math.PI),u=Number(((u/Math.PI*180%360+360)%360).toFixed(12)),m=Number(((p.startAngle/Math.PI*180%360+360)%360).toFixed(12)),0===(g=Number(((p.endAngle/Math.PI*180%360+360)%360).toFixed(12)))&&1<p.endAngle&&(g=360),m>=g&&0!==x.y&&(g+=360,u<m&&(u+=360)),u>m&&u<g&&(a.push({dataPoint:x,dataPointIndex:n,dataSeries:this,distance:0}),l=!0));break;case"funnel":case"pyramid":e>(u=p.funnelSection).y1&&e<u.y4&&(u.y6?e>u.y6?(n=u.x6+(u.x5-u.x6)/(u.y5-u.y6)*(e-u.y6),u=u.x3+(u.x4-u.x3)/(u.y4-u.y3)*(e-u.y3)):(n=u.x1+(u.x6-u.x1)/(u.y6-u.y1)*(e-u.y1),u=u.x2+(u.x3-u.x2)/(u.y3-u.y2)*(e-u.y2)):(n=u.x1+(u.x4-u.x1)/(u.y4-u.y1)*(e-u.y1),u=u.x2+(u.x3-u.x2)/(u.y3-u.y2)*(e-u.y2)),t>n&&t<u&&(a.push({dataPoint:x,dataPointIndex:p.dataPointIndex,dataSeries:this,distance:0}),l=!0));break;case"boxAndWhisker":(t>=p.x1-p.borderThickness/2&&t<=p.x2+p.borderThickness/2&&e>=p.y4-p.borderThickness/2&&e<=p.y1+p.borderThickness/2||Math.abs(p.x2-t+p.x1-t)<p.borderThickness&&e>=p.y1&&e<=p.y4)&&(a.push({dataPoint:x,dataPointIndex:n,dataSeries:this,distance:Math.min(Math.abs(p.x1-t),Math.abs(p.x2-t),Math.abs(p.y2-e),Math.abs(p.y3-e))}),l=!0);break;case"candlestick":(t>=p.x1-p.borderThickness/2&&t<=p.x2+p.borderThickness/2&&e>=p.y2-p.borderThickness/2&&e<=p.y3+p.borderThickness/2||Math.abs(p.x2-t+p.x1-t)<p.borderThickness&&e>=p.y1&&e<=p.y4)&&(a.push({dataPoint:x,dataPointIndex:n,dataSeries:this,distance:Math.min(Math.abs(p.x1-t),Math.abs(p.x2-t),Math.abs(p.y2-e),Math.abs(p.y3-e))}),l=!0);break;case"ohlc":(Math.abs(p.x2-t+p.x1-t)<p.borderThickness&&e>=p.y2&&e<=p.y3||t>=p.x1&&t<=(p.x2+p.x1)/2&&e>=p.y1-p.borderThickness/2&&e<=p.y1+p.borderThickness/2||t>=(p.x1+p.x2)/2&&t<=p.x2&&e>=p.y4-p.borderThickness/2&&e<=p.y4+p.borderThickness/2)&&(a.push({dataPoint:x,dataPointIndex:n,dataSeries:this,distance:Math.min(Math.abs(p.x1-t),Math.abs(p.x2-t),Math.abs(p.y2-e),Math.abs(p.y3-e))}),l=!0)}if(l||1e3<h&&1e3<d)break}}else if(0>c-s&&c+s>=this.dataPoints.length)break;-1===o?(s++,o=1):o=-1}for(t=null,e=0;e<a.length;e++)t?a[e].distance<=t.distance&&(t=a[e]):t=a[e];return t},W.prototype.getMarkerProperties=function(t,e,i,a){var s=this.dataPoints;return{x:e,y:i,ctx:a,type:s[t].markerType?s[t].markerType:this.markerType,size:s[t].markerSize?s[t].markerSize:this.markerSize,color:s[t].markerColor?s[t].markerColor:this.markerColor?this.markerColor:s[t].color?s[t].color:this.color?this.color:this._colorSet[t%this._colorSet.length],borderColor:s[t].markerBorderColor?s[t].markerBorderColor:this.markerBorderColor?this.markerBorderColor:null,borderThickness:s[t].markerBorderThickness?s[t].markerBorderThickness:this.markerBorderThickness?this.markerBorderThickness:null}},i(z,A),z.prototype.createExtraLabelsForLog=function(t){if(!(5<(t=(t||0)+1))){var e=this.logLabelValues[0]||this.intervalStartPosition;if(Math.log(this.range)/Math.log(e/this.viewportMinimum)<this.noTicks-1){for(var i=z.getNiceNumber((e-this.viewportMinimum)/Math.min(Math.max(2,this.noTicks-this.logLabelValues.length),3),!0),a=Math.ceil(this.viewportMinimum/i)*i;a<e;a+=i)a<this.viewportMinimum||this.logLabelValues.push(a);this.logLabelValues.sort(h),this.createExtraLabelsForLog(t)}}},z.prototype.createLabels=function(){var t,e,i,a,s,o=0,l=0,r=0,h=0,d=(l=0,l=this.interval,0),c=.6*this.chart.height;t=!1;var p,u,m,g=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[],b=g.length?x(this.scaleBreaks.firstBreakIndex)?0:this.scaleBreaks.firstBreakIndex:0;if("axisX"!==this.type||"dateTime"!==this.valueType||this.logarithmic){if(i=this.viewportMaximum,this.labels){t=Math.ceil(l);var y=!1;for(o=l=Math.ceil(this.intervalStartPosition);o<this.viewportMaximum;o+=t){if(!this.labels[o]){y=!1;break}y=!0}y&&(this.interval=t,this.intervalStartPosition=l)}if(this.logarithmic&&!this.equidistantInterval)for(this.logLabelValues||(this.logLabelValues=[],this.createExtraLabelsForLog()),l=0,y=b;l<this.logLabelValues.length;l++)if((o=this.logLabelValues[l])<this.viewportMinimum)l++;else{for(;y<g.length&&o>g[y].endValue;y++);s=o,(t=y<g.length&&o>=g[y].startValue&&o<=g[y].endValue)||(t=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:s,label:this.labels[s]?this.labels[s]:null}):"axisX"===this.type&&this.labels[s]?this.labels[s]:ot(s,this.valueFormatString,this.chart._cultureInfo),t=new B(this.ctx,(p={x:0,y:0,maxWidth:r,maxHeight:h,angle:this.labelAngle,text:this.prefix+t+this.suffix,backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,borderThickness:this.labelBorderThickness,cornerRadius:this.labelCornerRadius,horizontalAlign:"left",fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle"},m=0,(u="borderThickness")in p?Object.defineProperty(p,u,{value:m,enumerable:!0,configurable:!0,writable:!0}):p[u]=m,p)),this._labels.push({position:s,textBlock:t,effectiveHeight:null}))}for(y=b,o=this.intervalStartPosition;o<=i;o=parseFloat(1e-12>this.interval?this.logarithmic&&this.equidistantInterval?o*Math.pow(this.logarithmBase,this.interval):o+this.interval:(this.logarithmic&&this.equidistantInterval?o*Math.pow(this.logarithmBase,this.interval):o+this.interval).toFixed(12))){for(;y<g.length&&o>g[y].endValue;y++);s=o,(t=y<g.length&&o>=g[y].startValue&&o<=g[y].endValue)||(t=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:s,label:this.labels[s]?this.labels[s]:null}):"axisX"===this.type&&this.labels[s]?this.labels[s]:ot(s,this.valueFormatString,this.chart._cultureInfo),t=new B(this.ctx,{x:0,y:0,maxWidth:r,maxHeight:h,angle:this.labelAngle,text:this.prefix+t+this.suffix,horizontalAlign:"left",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:s,textBlock:t,effectiveHeight:null}))}}else for(this.intervalStartPosition=this.getLabelStartPoint(new Date(this.viewportMinimum),this.intervalType,this.interval),i=n(new Date(this.viewportMaximum),this.interval,this.intervalType),y=b,o=this.intervalStartPosition;o<i;n(o,l,this.intervalType)){for(t=o.getTime();y<g.length&&t>g[y].endValue;y++);s=t,(t=y<g.length&&t>=g[y].startValue&&t<=g[y].endValue)||(t=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.options,value:new Date(s),label:this.labels[s]?this.labels[s]:null}):"axisX"===this.type&&this.labels[s]?this.labels[s]:nt(s,this.valueFormatString,this.chart._cultureInfo),t=new B(this.ctx,{x:0,y:0,maxWidth:r,backgroundColor:this.labelBackgroundColor,borderColor:this.labelBorderColor,borderThickness:this.labelBorderThickness,cornerRadius:this.labelCornerRadius,maxHeight:h,angle:this.labelAngle,text:this.prefix+t+this.suffix,horizontalAlign:"left",fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle"}),this._labels.push({position:s,textBlock:t,effectiveHeight:null,breaksLabelType:void 0}))}for("bottom"===this._position||"top"===this._position?(d=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))*tt[this.intervalType+"Duration"]*this.interval,r=void 0===this.options.labelMaxWidth?.5*this.chart.width>>0:this.options.labelMaxWidth,this.chart.panEnabled||(h=void 0===this.options.labelWrap||this.labelWrap?.8*this.chart.height>>0:1.5*this.labelFontSize)):"left"!==this._position&&"right"!==this._position||(d=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))*tt[this.intervalType+"Duration"]*this.interval,this.chart.panEnabled||(r=void 0===this.options.labelMaxWidth?.3*this.chart.width>>0:this.options.labelMaxWidth),h=void 0===this.options.labelWrap||this.labelWrap?.3*this.chart.height>>0:1.5*this.labelFontSize),l=0;l<this._labels.length;l++){(t=this._labels[l].textBlock).maxWidth=r,t.maxHeight=h;var v=t.measureText();a=v.height}if(i=[],b=g=0,this.labelAutoFit||this.options.labelAutoFit)if(x(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(r=.9*d>>0,b=0,!this.chart.panEnabled&&1<=this._labels.length){for(this.sessionVariables.labelFontSize=this.labelFontSize,this.sessionVariables.labelMaxWidth=r,this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelAngle=this.labelAngle,this.sessionVariables.labelWrap=this.labelWrap,o=0;o<this._labels.length;o++)if(!this._labels[o].breaksLabelType){var f;for(y=(t=this._labels[o].textBlock).text.split(" "),l=0;l<y.length;l++)s=y[l],this.ctx.font=t.fontStyle+" "+t.fontWeight+" "+t.fontSize+"px "+t.fontFamily,(s=this.ctx.measureText(s)).width>b&&(f=o,b=s.width)}for(o=0,o=this.intervalStartPosition<this.viewportMinimum?1:0;o<this._labels.length;o++)if(!this._labels[o].breaksLabelType){for(v=(t=this._labels[o].textBlock).measureText(),y=o+1;y<this._labels.length;y++)if(!this._labels[y].breaksLabelType){e=(e=this._labels[y].textBlock).measureText();break}if(i.push(t.height),this.sessionVariables.labelMaxHeight=Math.max.apply(Math,i),Math.cos(Math.PI/180*Math.abs(this.labelAngle)),Math.sin(Math.PI/180*Math.abs(this.labelAngle)),l=r*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+(h-t.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle)),x(this.options.labelAngle)&&isNaN(this.options.labelAngle)&&0!==this.options.labelAngle)if(this.sessionVariables.labelMaxHeight=0===this.labelAngle?h:Math.min((l-r*Math.cos(Math.PI/180*Math.abs(this.labelAngle)))/Math.sin(Math.PI/180*Math.abs(this.labelAngle)),l),s=(c-(a+t.fontSize/2)*Math.cos(Math.PI/180*Math.abs(-25)))/Math.sin(Math.PI/180*Math.abs(-25)),x(this.options.labelWrap)){if(x(this.options.labelWrap))if(x(this.options.labelMaxWidth)){if(!x(e))if(l=v.width+e.width>>0,y=this.labelFontSize,b<r)l-2*r>g&&(g=l-2*r,l>=2*r&&l<2.2*r?(this.sessionVariables.labelMaxWidth=r,x(this.options.labelFontSize)&&12<y&&(y=Math.floor(12/13*y),t.measureText()),this.sessionVariables.labelFontSize=x(this.options.labelFontSize)?y:this.options.labelFontSize,this.sessionVariables.labelAngle=this.labelAngle):l>=2.2*r&&l<2.8*r?(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=s,this.sessionVariables.labelFontSize=y):l>=2.8*r&&l<3.2*r?(this.sessionVariables.labelMaxWidth=Math.max(r,b),this.sessionVariables.labelWrap=!0,x(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),t.measureText()),this.sessionVariables.labelFontSize=x(this.options.labelFontSize)?y:this.options.labelFontSize,this.sessionVariables.labelAngle=this.labelAngle):l>=3.2*r&&l<3.6*r?(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelMaxWidth=s,this.sessionVariables.labelFontSize=this.labelFontSize):l>3.6*r&&l<5*r?(x(this.options.labelFontSize)&&12<y&&(y=Math.floor(12/13*y),t.measureText()),this.sessionVariables.labelFontSize=x(this.options.labelFontSize)?y:this.options.labelFontSize,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=s):l>5*r&&(this.sessionVariables.labelWrap=!0,this.sessionVariables.labelMaxWidth=r,this.sessionVariables.labelFontSize=y,this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelAngle=this.labelAngle));else if(f===o&&(0===f&&b+this._labels[f+1].textBlock.measureText().width-2*r>g||f===this._labels.length-1&&b+this._labels[f-1].textBlock.measureText().width-2*r>g||0<f&&f<this._labels.length-1&&b+this._labels[f+1].textBlock.measureText().width-2*r>g&&b+this._labels[f-1].textBlock.measureText().width-2*r>g))g=0===f?b+this._labels[f+1].textBlock.measureText().width-2*r:b+this._labels[f-1].textBlock.measureText().width-2*r,this.sessionVariables.labelFontSize=x(this.options.labelFontSize)?y:this.options.labelFontSize,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=s;else if(0===g)for(this.sessionVariables.labelFontSize=x(this.options.labelFontSize)?y:this.options.labelFontSize,this.sessionVariables.labelWrap=!0,l=0;l<this._labels.length;l++)(t=this._labels[l].textBlock).maxWidth=this.sessionVariables.labelMaxWidth=Math.min(Math.max(r,b),s),v=t.measureText(),l<this._labels.length-1&&(y=l+1,(e=this._labels[y].textBlock).maxWidth=this.sessionVariables.labelMaxWidth=Math.min(Math.max(r,b),s),e=e.measureText(),v.width+e.width>>0>2*r&&(this.sessionVariables.labelAngle=-25))}else this.options.labelMaxWidth<r?(this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelMaxHeight=l):(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelMaxHeight=h)}else this.labelWrap?x(this.options.labelMaxWidth)?(this.sessionVariables.labelMaxWidth=Math.min(Math.max(r,b),s),this.sessionVariables.labelWrap=this.labelWrap,v.width+e.width>>0>2*r&&(this.sessionVariables.labelAngle=-25)):(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelAngle=this.sessionVariables.labelMaxWidth>r?-25:this.sessionVariables.labelAngle):x(this.options.labelMaxWidth)?(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelMaxWidth=r,v.width+e.width>>0>2*r&&(this.sessionVariables.labelAngle=-25,this.sessionVariables.labelMaxWidth=s)):(this.sessionVariables.labelAngle=this.sessionVariables.labelMaxWidth>r?-25:this.sessionVariables.labelAngle,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth,this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelWrap=this.labelWrap);else this.sessionVariables.labelAngle=this.labelAngle,this.sessionVariables.labelMaxHeight=0===this.labelAngle?h:Math.min((l-r*Math.cos(Math.PI/180*Math.abs(this.labelAngle)))/Math.sin(Math.PI/180*Math.abs(this.labelAngle)),l),s=0!=this.labelAngle?(c-(a+t.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle)))/Math.sin(Math.PI/180*Math.abs(this.labelAngle)):r,this.sessionVariables.labelMaxHeight=h=this.labelWrap?(c-s*Math.sin(Math.PI/180*Math.abs(this.labelAngle)))/Math.cos(Math.PI/180*Math.abs(this.labelAngle)):1.5*this.labelFontSize,x(this.options.labelWrap)?x(this.options.labelWrap)&&(this.labelWrap&&!x(this.options.labelMaxWidth)?(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:s,this.sessionVariables.labelMaxHeight=h):(this.sessionVariables.labelAngle=this.labelAngle,this.sessionVariables.labelMaxWidth=s,this.sessionVariables.labelMaxHeight=l<.9*d?.9*d:l,this.sessionVariables.labelWrap=this.labelWrap)):(this.options.labelWrap?(this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:s):(x(this.options.labelMaxWidth),this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:s,this.sessionVariables.labelWrap=this.labelWrap),this.sessionVariables.labelMaxHeight=h)}for(l=0;l<this._labels.length;l++)(t=this._labels[l].textBlock).maxWidth=this.labelMaxWidth=this.sessionVariables.labelMaxWidth,t.fontSize=this.sessionVariables.labelFontSize,t.angle=this.labelAngle=this.sessionVariables.labelAngle,t.wrap=this.labelWrap=this.sessionVariables.labelWrap,t.maxHeight=this.sessionVariables.labelMaxHeight,t.measureText()}else for(o=0;o<this._labels.length;o++)(t=this._labels[o].textBlock).maxWidth=this.labelMaxWidth=x(this.options.labelMaxWidth)?this.sessionVariables.labelMaxWidth:this.options.labelMaxWidth,t.fontSize=this.labelFontSize=x(this.options.labelFontSize)?this.sessionVariables.labelFontSize:this.options.labelFontSize,t.angle=this.labelAngle=x(this.options.labelAngle)?this.sessionVariables.labelAngle:this.labelAngle,t.wrap=this.labelWrap=x(this.options.labelWrap)?this.sessionVariables.labelWrap:this.options.labelWrap,t.maxHeight=this.sessionVariables.labelMaxHeight,t.measureText();else if("left"===this._position||"right"===this._position)if(r=x(this.options.labelMaxWidth)?.3*this.chart.width>>0:this.options.labelMaxWidth,h=void 0===this.options.labelWrap||this.labelWrap?.3*this.chart.height>>0:1.5*this.labelFontSize,!this.chart.panEnabled&&1<=this._labels.length){for(this.sessionVariables.labelFontSize=this.labelFontSize,this.sessionVariables.labelMaxWidth=r,this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelAngle=x(this.sessionVariables.labelAngle)?0:this.sessionVariables.labelAngle,this.sessionVariables.labelWrap=this.labelWrap,o=0;o<this._labels.length;o++)if(!this._labels[o].breaksLabelType){for(v=(t=this._labels[o].textBlock).measureText(),y=o+1;y<this._labels.length;y++)if(!this._labels[y].breaksLabelType){e=(e=this._labels[y].textBlock).measureText();break}i.push(t.height),this.sessionVariables.labelMaxHeight=Math.max.apply(Math,i),l=r*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+(h-t.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)),x(this.options.labelAngle)&&isNaN(this.options.labelAngle)&&0!==this.options.labelAngle?x(this.options.labelWrap)?x(this.options.labelWrap)&&(x(this.options.labelMaxWidth)?x(e)||(d=v.height+e.height>>0)-2*h>b&&(b=d-2*h,d>=2*h&&d<2.4*h?(x(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),t.measureText()),this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelFontSize=x(this.options.labelFontSize)?this.labelFontSize:this.options.labelFontSize):d>=2.4*h&&d<2.8*h?(this.sessionVariables.labelMaxHeight=l,this.sessionVariables.labelFontSize=this.labelFontSize,this.sessionVariables.labelWrap=!0):d>=2.8*h&&d<3.2*h?(this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelWrap=!0,x(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),t.measureText()),this.sessionVariables.labelFontSize=x(this.options.labelFontSize)?this.labelFontSize:this.options.labelFontSize,this.sessionVariables.labelAngle=x(this.sessionVariables.labelAngle)?0:this.sessionVariables.labelAngle):d>=3.2*h&&d<3.6*h?(this.sessionVariables.labelMaxHeight=l,this.sessionVariables.labelWrap=!0,this.sessionVariables.labelFontSize=this.labelFontSize):d>3.6*h&&d<10*h?(x(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),t.measureText()),this.sessionVariables.labelFontSize=x(this.options.labelFontSize)?this.labelFontSize:this.options.labelFontSize,this.sessionVariables.labelMaxWidth=r,this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelAngle=x(this.sessionVariables.labelAngle)?0:this.sessionVariables.labelAngle):d>10*h&&d<50*h&&(x(this.options.labelFontSize)&&12<this.labelFontSize&&(this.labelFontSize=Math.floor(12/13*this.labelFontSize),t.measureText()),this.sessionVariables.labelFontSize=x(this.options.labelFontSize)?this.labelFontSize:this.options.labelFontSize,this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelMaxWidth=r,this.sessionVariables.labelAngle=x(this.sessionVariables.labelAngle)?0:this.sessionVariables.labelAngle)):(this.sessionVariables.labelMaxHeight=h,this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth)):(this.sessionVariables.labelMaxWidth=this.labelWrap||this.labelMaxWidth?this.options.labelMaxWidth?this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth:r,this.sessionVariables.labelMaxHeight=h):(this.sessionVariables.labelAngle=this.labelAngle,this.sessionVariables.labelMaxWidth=0===this.labelAngle?r:Math.min((l-h*Math.sin(Math.PI/180*Math.abs(this.labelAngle)))/Math.cos(Math.PI/180*Math.abs(this.labelAngle)),h),x(this.options.labelWrap)?x(this.options.labelWrap)&&(this.labelWrap&&!x(this.options.labelMaxWidth)?(this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth>this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth,this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxHeight=l):(this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:r,this.sessionVariables.labelMaxHeight=0===this.labelAngle?h:l,x(this.options.labelMaxWidth)&&(this.sessionVariables.labelAngle=this.labelAngle))):this.options.labelWrap?(this.sessionVariables.labelMaxHeight=0===this.labelAngle?h:l,this.sessionVariables.labelWrap=this.labelWrap,this.sessionVariables.labelMaxWidth=r):(this.sessionVariables.labelMaxHeight=h,x(this.options.labelMaxWidth),this.sessionVariables.labelMaxWidth=this.options.labelMaxWidth?this.options.labelMaxWidth:this.sessionVariables.labelMaxWidth,this.sessionVariables.labelWrap=this.labelWrap))}for(l=0;l<this._labels.length;l++)(t=this._labels[l].textBlock).maxWidth=this.labelMaxWidth=this.sessionVariables.labelMaxWidth,t.fontSize=this.labelFontSize=this.sessionVariables.labelFontSize,t.angle=this.labelAngle=this.sessionVariables.labelAngle,t.wrap=this.labelWrap=this.sessionVariables.labelWrap,t.maxHeight=this.sessionVariables.labelMaxHeight,t.measureText()}else for(o=0;o<this._labels.length;o++)(t=this._labels[o].textBlock).maxWidth=this.labelMaxWidth=x(this.options.labelMaxWidth)?this.sessionVariables.labelMaxWidth:this.options.labelMaxWidth,t.fontSize=this.labelFontSize=x(this.options.labelFontSize)?this.sessionVariables.labelFontSize:this.options.labelFontSize,t.angle=this.labelAngle=x(this.options.labelAngle)?this.sessionVariables.labelAngle:this.labelAngle,t.wrap=this.labelWrap=x(this.options.labelWrap)?this.sessionVariables.labelWrap:this.options.labelWrap,t.maxHeight=this.sessionVariables.labelMaxHeight,t.measureText();for(o=0;o<this.stripLines.length;o++){var k;"outside"===(r=this.stripLines[o]).labelPlacement?(h=this.sessionVariables.labelMaxWidth,"bottom"!==this._position&&"top"!==this._position||(k=x(r.options.labelWrap)?this.sessionVariables.labelMaxHeight:r.labelWrap?.8*this.chart.height>>0:1.5*this.labelFontSize),"left"!==this._position&&"right"!==this._position||(k=x(r.options.labelWrap)?this.sessionVariables.labelMaxHeight:r.labelWrap?.8*this.chart.width>>0:1.5*this.labelFontSize),x(r.labelBackgroundColor)&&(r.labelBackgroundColor="#EEEEEE")):(h="bottom"===this._position||"top"===this._position?.9*this.chart.width>>0:.9*this.chart.height>>0,k=x(r.options.labelWrap)||r.labelWrap?"bottom"===this._position||"top"===this._position?.8*this.chart.width>>0:.8*this.chart.height>>0:1.5*this.labelFontSize,x(r.labelBackgroundColor)&&(x(r.startValue)&&0!==r.startValue?r.labelBackgroundColor=N?"transparent":null:r.labelBackgroundColor="#EEEEEE")),t=new B(this.ctx,{x:0,y:0,backgroundColor:r.labelBackgroundColor,borderColor:r.labelBorderColor,borderThickness:r.labelBorderThickness,cornerRadius:r.labelCornerRadius,maxWidth:r.options.labelMaxWidth?r.options.labelMaxWidth:h,maxHeight:k,angle:this.labelAngle,text:r.labelFormatter?r.labelFormatter({chart:this.chart,axis:this,stripLine:r}):r.label,horizontalAlign:"left",fontSize:"outside"===r.labelPlacement?r.options.labelFontSize?r.labelFontSize:this.labelFontSize:r.labelFontSize,fontFamily:"outside"===r.labelPlacement?r.options.labelFontFamily?r.labelFontFamily:this.labelFontFamily:r.labelFontFamily,fontWeight:"outside"===r.labelPlacement?r.options.labelFontWeight?r.labelFontWeight:this.labelFontWeight:r.labelFontWeight,fontColor:r.labelFontColor||r.color,fontStyle:"outside"===r.labelPlacement?r.options.labelFontStyle?r.labelFontStyle:this.fontWeight:r.labelFontStyle,textBaseline:"middle"}),this._stripLineLabels.push({position:r.value,textBlock:t,effectiveHeight:null,stripLine:r})}},z.prototype.createLabelsAndCalculateWidth=function(){var t=0,e=0;this._labels=[],this._stripLineLabels=[];var i=this.chart.isNavigator?0:5;if("left"===this._position||"right"===this._position){for(this.createLabels(),e=0;e<this._labels.length;e++){var a=this._labels[e].textBlock,s=a.measureText(),n=0;t<(n=0===this.labelAngle?s.width:s.width*Math.cos(Math.PI/180*Math.abs(this.labelAngle))+(s.height-a.fontSize/2)*Math.sin(Math.PI/180*Math.abs(this.labelAngle)))&&(t=n),this._labels[e].effectiveWidth=n}for(e=0;e<this._stripLineLabels.length;e++)"outside"===this._stripLineLabels[e].stripLine.labelPlacement&&this._stripLineLabels[e].stripLine.value>=this.viewportMinimum&&this._stripLineLabels[e].stripLine.value<=this.viewportMaximum&&(s=(a=this._stripLineLabels[e].textBlock).measureText(),t<(n=0===this.labelAngle?s.width:s.width*Math.cos(Math.PI/180*Math.abs(this.labelAngle))+(s.height-a.fontSize/2)*Math.sin(Math.PI/180*Math.abs(this.labelAngle)))&&(t=n),this._stripLineLabels[e].effectiveWidth=n)}return e=this.title?this._titleTextBlock.measureText().height+2:0,"inside"===this.labelPlacement?a=e+i:e+t+this.tickLength+i},z.prototype.createLabelsAndCalculateHeight=function(){var t=0;this._labels=[],this._stripLineLabels=[];var e,i=0,a=this.chart.isNavigator?0:5;if(this.createLabels(),"bottom"===this._position||"top"===this._position){for(i=0;i<this._labels.length;i++){var s=(e=this._labels[i].textBlock).measureText(),n=0;t<(n=0===this.labelAngle?s.height:s.width*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+(s.height-e.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle)))&&(t=n),this._labels[i].effectiveHeight=n}for(i=0;i<this._stripLineLabels.length;i++)"outside"===this._stripLineLabels[i].stripLine.labelPlacement&&this._stripLineLabels[i].stripLine.value>=this.viewportMinimum&&this._stripLineLabels[i].stripLine.value<=this.viewportMaximum&&(s=(e=this._stripLineLabels[i].textBlock).measureText(),t<(n=0===this.labelAngle?s.height:s.width*Math.sin(Math.PI/180*Math.abs(this.labelAngle))+(s.height-e.fontSize/2)*Math.cos(Math.PI/180*Math.abs(this.labelAngle)))&&(t=n),this._stripLineLabels[i].effectiveHeight=n)}return e=this.title?this._titleTextBlock.measureText().height+2:0,"inside"===this.labelPlacement?i=e+a:e+t+this.tickLength+a},z.setLayout=function(t,e,i,a,s,n){var o,l,r,h,d=t[0]?t[0].chart:e[0].chart,c=d.isNavigator?0:10,p=d._axes;if(t&&0<t.length)for(var u=0;u<t.length;u++)t[u]&&t[u].calculateAxisParameters();if(e&&0<e.length)for(u=0;u<e.length;u++)e[u].calculateAxisParameters();if(i&&0<i.length)for(u=0;u<i.length;u++)i[u].calculateAxisParameters();if(a&&0<a.length)for(u=0;u<a.length;u++)a[u].calculateAxisParameters();for(u=0;u<p.length;u++)if(p[u]&&p[u].scaleBreaks&&p[u].scaleBreaks._appliedBreaks.length)for(var m=p[u].scaleBreaks._appliedBreaks,g=0;g<m.length&&!(m[g].startValue>p[u].viewportMaximum);g++)m[g].endValue<p[u].viewportMinimum||(x(p[u].scaleBreaks.firstBreakIndex)&&(p[u].scaleBreaks.firstBreakIndex=g),m[g].startValue>=p[u].viewPortMinimum&&(p[u].scaleBreaks.lastBreakIndex=g));var b,y,v,f,k,M=g=0,w=0,T=0,P=0,C=0,S=0,A=l=0;for(m=v=f=k=!1,u=0;u<p.length;u++)p[u]&&p[u].title&&(p[u]._titleTextBlock=new B(p[u].ctx,{text:p[u].title,horizontalAlign:"center",fontSize:p[u].titleFontSize,fontFamily:p[u].titleFontFamily,fontWeight:p[u].titleFontWeight,fontColor:p[u].titleFontColor,fontStyle:p[u].titleFontStyle,borderColor:p[u].titleBorderColor,borderThickness:p[u].titleBorderThickness,backgroundColor:p[u].titleBackgroundColor,cornerRadius:p[u].titleCornerRadius,textBaseline:"top"}));for(u=0;u<p.length;u++)if(p[u].title)switch(p[u]._position){case"left":p[u]._titleTextBlock.maxWidth=p[u].titleMaxWidth||n.height,p[u]._titleTextBlock.maxHeight=p[u].titleWrap?.8*n.width:1.5*p[u].titleFontSize,p[u]._titleTextBlock.angle=-90;break;case"right":p[u]._titleTextBlock.maxWidth=p[u].titleMaxWidth||n.height,p[u]._titleTextBlock.maxHeight=p[u].titleWrap?.8*n.width:1.5*p[u].titleFontSize,p[u]._titleTextBlock.angle=90;break;default:p[u]._titleTextBlock.maxWidth=p[u].titleMaxWidth||n.width,p[u]._titleTextBlock.maxHeight=p[u].titleWrap?.8*n.height:1.5*p[u].titleFontSize,p[u]._titleTextBlock.angle=0}if("normal"===s){T=[],P=[],C=[],S=[];for(var _=[],F=[],L=[],I=[];4>g;){var V=0,D=0,W=0,z=0,X=s=0,Y=0,E=0,O=0,R=0,N=0,H=0;if(i&&0<i.length)for(C=[],u=N=0;u<i.length;u++)C.push(Math.ceil(i[u]?i[u].createLabelsAndCalculateWidth():0)),N+=C[u],Y+=i[u]&&!d.isNavigator?i[u].margin:0;else C.push(Math.ceil(i[0]?i[0].createLabelsAndCalculateWidth():0));if(L.push(C),a&&0<a.length)for(S=[],u=H=0;u<a.length;u++)S.push(Math.ceil(a[u]?a[u].createLabelsAndCalculateWidth():0)),H+=S[u],E+=a[u]?a[u].margin:0;else S.push(Math.ceil(a[0]?a[0].createLabelsAndCalculateWidth():0));if(I.push(S),o=Math.round(n.x1+N+Y),r=Math.round(n.x2-H-E>d.width-c?d.width-c:n.x2-H-E),t&&0<t.length)for(T=[],u=O=0;u<t.length;u++)t[u]&&(t[u].lineCoordinates={}),t[u].lineCoordinates.width=Math.abs(r-o),t[u].title&&(t[u]._titleTextBlock.maxWidth=0<t[u].titleMaxWidth&&t[u].titleMaxWidth<t[u].lineCoordinates.width?t[u].titleMaxWidth:t[u].lineCoordinates.width),T.push(Math.ceil(t[u]?t[u].createLabelsAndCalculateHeight():0)),O+=T[u],s+=t[u]&&!d.isNavigator?t[u].margin:0;else T.push(Math.ceil(t[0]?t[0].createLabelsAndCalculateHeight():0));if(_.push(T),e&&0<e.length)for(P=[],u=R=0;u<e.length;u++)e[u]&&(e[u].lineCoordinates={}),e[u].lineCoordinates.width=Math.abs(r-o),e[u].title&&(e[u]._titleTextBlock.maxWidth=0<e[u].titleMaxWidth&&e[u].titleMaxWidth<e[u].lineCoordinates.width?e[u].titleMaxWidth:e[u].lineCoordinates.width),P.push(Math.ceil(e[u]?e[u].createLabelsAndCalculateHeight():0)),R+=P[u],X+=e[u]&&!d.isNavigator?e[u].margin:0;else P.push(Math.ceil(e[0]?e[0].createLabelsAndCalculateHeight():0));if(F.push(P),t&&0<t.length)for(u=0;u<t.length;u++)t[u]&&(t[u].lineCoordinates.x1=o,r=Math.round(n.x2-H-E>d.width-c?d.width-c:n.x2-H-E),t[u]._labels&&1<t[u]._labels.length&&(l=h=0,h=t[u]._labels[1],l="dateTime"===t[u].valueType?t[u]._labels[t[u]._labels.length-2]:t[u]._labels[t[u]._labels.length-1],M=h.textBlock.width*Math.cos(Math.PI/180*Math.abs(h.textBlock.angle))+(h.textBlock.height-l.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(h.textBlock.angle)),w=l.textBlock.width*Math.cos(Math.PI/180*Math.abs(l.textBlock.angle))+(l.textBlock.height-l.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(l.textBlock.angle))),!t[u]||!t[u].labelAutoFit||x(b)||x(y)||d.isNavigator||(l=0,0<t[u].labelAngle?y+w>r&&(l+=0<t[u].labelAngle?y+w-r-H:0):0>t[u].labelAngle?b-M<o&&b-M<t[u].viewportMinimum&&(A=o-(Y+t[u].tickLength+C+b-M+t[u].labelFontSize/2)):0===t[u].labelAngle&&(y+w>r&&(l=y+w/2-r-H),b-M<o&&b-M<t[u].viewportMinimum&&(A=o-Y-t[u].tickLength-C-b+M/2)),t[u].viewportMaximum===t[u].maximum&&t[u].viewportMinimum===t[u].minimum&&0<t[u].labelAngle&&0<l?r-=l:t[u].viewportMaximum===t[u].maximum&&t[u].viewportMinimum===t[u].minimum&&0>t[u].labelAngle&&0<A?o+=A:t[u].viewportMaximum===t[u].maximum&&t[u].viewportMinimum===t[u].minimum&&0===t[u].labelAngle&&(0<A&&(o+=A),0<l&&(r-=l))),d.panEnabled?O=d.sessionVariables.axisX.height:d.sessionVariables.axisX.height=O,l=Math.round(n.y2-O-s+V),h=Math.round(n.y2),t[u].lineCoordinates.x2=r,t[u].lineCoordinates.width=r-o,t[u].lineCoordinates.y1=l,t[u].lineCoordinates.y2=l,t[u].bounds={x1:o,y1:l,x2:r,y2:h-(O+s-T[u]-V),width:r-o,height:h-l}),V+=T[u]+t[u].margin;if(e&&0<e.length)for(u=0;u<e.length;u++)e[u].lineCoordinates.x1=Math.round(n.x1+N+Y),e[u].lineCoordinates.x2=Math.round(n.x2-H-E>d.width-c?d.width-c:n.x2-H-E),e[u].lineCoordinates.width=Math.abs(r-o),e[u]._labels&&1<e[u]._labels.length&&(h=e[u]._labels[1],l="dateTime"===e[u].valueType?e[u]._labels[e[u]._labels.length-2]:e[u]._labels[e[u]._labels.length-1],M=h.textBlock.width*Math.cos(Math.PI/180*Math.abs(h.textBlock.angle))+(h.textBlock.height-l.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(h.textBlock.angle)),w=l.textBlock.width*Math.cos(Math.PI/180*Math.abs(l.textBlock.angle))+(l.textBlock.height-l.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(l.textBlock.angle))),d.panEnabled?R=d.sessionVariables.axisX2.height:d.sessionVariables.axisX2.height=R,l=Math.round(n.y1),h=Math.round(n.y2+e[u].margin),e[u].lineCoordinates.y1=l+R+X-D,e[u].lineCoordinates.y2=l,e[u].bounds={x1:o,y1:l+(R+X-P[u]-D),x2:r,y2:h,width:r-o,height:h-l},D+=P[u]+e[u].margin;if(i&&0<i.length)for(u=0;u<i.length;u++)Y=d.isNavigator?0:10,i[u]&&(o=Math.round(t[0]?t[0].lineCoordinates.x1:e[0].lineCoordinates.x1),Y=i[u]._labels&&0<i[u]._labels.length?i[u]._labels[i[u]._labels.length-1].textBlock.height/2:c,l=Math.round(n.y1+R+X<Math.max(Y,c)?Math.max(Y,c):n.y1+R+X),r=Math.round(t[0]?t[0].lineCoordinates.x1:e[0].lineCoordinates.x1),Y=0<t.length?0:i[u]._labels&&0<i[u]._labels.length?i[u]._labels[0].textBlock.height/2:c,h=Math.round(n.y2-O-s-Y),i[u].lineCoordinates={x1:r-W,y1:l,x2:r-W,y2:h,height:Math.abs(h-l)},i[u].bounds={x1:o-(C[u]+W),y1:l,x2:r,y2:h,width:r-o,height:h-l},i[u].title&&(i[u]._titleTextBlock.maxWidth=0<i[u].titleMaxWidth&&i[u].titleMaxWidth<i[u].lineCoordinates.height?i[u].titleMaxWidth:i[u].lineCoordinates.height),W+=C[u]+i[u].margin);if(a&&0<a.length)for(u=0;u<a.length;u++)a[u]&&(o=Math.round(t[0]?t[0].lineCoordinates.x2:e[0].lineCoordinates.x2),r=Math.round(o),Y=a[u]._labels&&0<a[u]._labels.length?a[u]._labels[a[u]._labels.length-1].textBlock.height/2:0,l=Math.round(n.y1+R+X<Math.max(Y,c)?Math.max(Y,c):n.y1+R+X),Y=0<t.length?0:a[u]._labels&&0<a[u]._labels.length?a[u]._labels[0].textBlock.height/2:0,h=Math.round(n.y2-(O+s+Y)),a[u].lineCoordinates={x1:o+z,y1:l,x2:o+z,y2:h,height:Math.abs(h-l)},a[u].bounds={x1:o,y1:l,x2:r+(S[u]+z),y2:h,width:r-o,height:h-l},a[u].title&&(a[u]._titleTextBlock.maxWidth=0<a[u].titleMaxWidth&&a[u].titleMaxWidth<a[u].lineCoordinates.height?a[u].titleMaxWidth:a[u].lineCoordinates.height),z+=S[u]+a[u].margin);if(t&&0<t.length)for(u=0;u<t.length;u++)t[u]&&(t[u].calculateValueToPixelConversionParameters(),t[u].calculateBreaksSizeInValues(),t[u]._labels&&1<t[u]._labels.length&&(b=(t[u].logarithmic?Math.log(t[u]._labels[1].position/t[u].viewportMinimum)/t[u].conversionParameters.lnLogarithmBase:t[u]._labels[1].position-t[u].viewportMinimum)*Math.abs(t[u].conversionParameters.pixelPerUnit)+t[u].lineCoordinates.x1,o=t[u]._labels[t[u]._labels.length-("dateTime"===t[u].valueType?2:1)].position,o=t[u].getApparentDifference(t[u].viewportMinimum,o),y=t[u].logarithmic?(1<o?Math.log(o)/t[u].conversionParameters.lnLogarithmBase*Math.abs(t[u].conversionParameters.pixelPerUnit):0)+t[u].lineCoordinates.x1:(0<o?o*Math.abs(t[u].conversionParameters.pixelPerUnit):0)+t[u].lineCoordinates.x1));if(e&&0<e.length)for(u=0;u<e.length;u++)e[u].calculateValueToPixelConversionParameters(),e[u].calculateBreaksSizeInValues(),e[u]._labels&&1<e[u]._labels.length&&(b=(e[u].logarithmic?Math.log(e[u]._labels[1].position/e[u].viewportMinimum)/e[u].conversionParameters.lnLogarithmBase:e[u]._labels[1].position-e[u].viewportMinimum)*Math.abs(e[u].conversionParameters.pixelPerUnit)+e[u].lineCoordinates.x1,o=e[u]._labels[e[u]._labels.length-("dateTime"===e[u].valueType?2:1)].position,o=e[u].getApparentDifference(e[u].viewportMinimum,o),y=e[u].logarithmic?(1<o?Math.log(o)/e[u].conversionParameters.lnLogarithmBase*Math.abs(e[u].conversionParameters.pixelPerUnit):0)+e[u].lineCoordinates.x1:(0<o?o*Math.abs(e[u].conversionParameters.pixelPerUnit):0)+e[u].lineCoordinates.x1);for(u=0;u<p.length;u++)"axisY"===p[u].type&&(p[u].calculateValueToPixelConversionParameters(),p[u].calculateBreaksSizeInValues());if(0<g){if(t&&0<t.length)for(u=0;u<t.length;u++)m=_[g-1][u]===_[g][u];else m=!0;if(e&&0<e.length)for(u=0;u<e.length;u++)v=F[g-1][u]===F[g][u];else v=!0;if(i&&0<i.length)for(u=0;u<i.length;u++)f=L[g-1][u]===L[g][u];else f=!0;if(a&&0<a.length)for(u=0;u<a.length;u++)k=I[g-1][u]===I[g][u];else k=!0}if(m&&v&&f&&k)break;g++}if(t&&0<t.length)for(u=0;u<t.length;u++)t[u].calculateStripLinesThicknessInValues(),t[u].calculateBreaksInPixels();if(e&&0<e.length)for(u=0;u<e.length;u++)e[u].calculateStripLinesThicknessInValues(),e[u].calculateBreaksInPixels();if(i&&0<i.length)for(u=0;u<i.length;u++)i[u].calculateStripLinesThicknessInValues(),i[u].calculateBreaksInPixels();if(a&&0<a.length)for(u=0;u<a.length;u++)a[u].calculateStripLinesThicknessInValues(),a[u].calculateBreaksInPixels()}else{for(c=[],b=[],A=[],M=[],y=[],w=[],_=[],F=[];4>g;){if(O=z=D=W=E=Y=X=s=I=L=V=R=0,t&&0<t.length)for(A=[],u=z=0;u<t.length;u++)A.push(Math.ceil(t[u]?t[u].createLabelsAndCalculateWidth():0)),z+=A[u],s+=t[u]&&!d.isNavigator?t[u].margin:0;else A.push(Math.ceil(t[0]?t[0].createLabelsAndCalculateWidth():0));if(_.push(A),e&&0<e.length)for(M=[],u=O=0;u<e.length;u++)M.push(Math.ceil(e[u]?e[u].createLabelsAndCalculateWidth():0)),O+=M[u],X+=e[u]?e[u].margin:0;else M.push(Math.ceil(e[0]?e[0].createLabelsAndCalculateWidth():0));if(F.push(M),i&&0<i.length)for(u=0;u<i.length;u++)i[u].lineCoordinates={},o=Math.round(n.x1+z+s),r=Math.round(n.x2-O-X>d.width-10?d.width-10:n.x2-O-X),i[u].labelAutoFit&&!x(T)&&(0<!t.length&&(o=0>i[u].labelAngle?Math.max(o,T):0===i[u].labelAngle?Math.max(o,T/2):o),0<!e.length&&(r=0<i[u].labelAngle||0===i[u].labelAngle?r-P/2:r)),i[u].lineCoordinates.x1=o,i[u].lineCoordinates.x2=r,i[u].lineCoordinates.width=Math.abs(r-o),i[u].title&&(i[u]._titleTextBlock.maxWidth=0<i[u].titleMaxWidth&&i[u].titleMaxWidth<i[u].lineCoordinates.width?i[u].titleMaxWidth:i[u].lineCoordinates.width);if(a&&0<a.length)for(u=0;u<a.length;u++)a[u].lineCoordinates={},o=Math.round(n.x1+z+s),r=Math.round(n.x2-O-X>a[u].chart.width-10?a[u].chart.width-10:n.x2-O-X),a[u]&&a[u].labelAutoFit&&!x(C)&&(0<!t.length&&(o=0<a[u].labelAngle?Math.max(o,C):0===a[u].labelAngle?Math.max(o,C/2):o),0<!e.length&&(r-=S/2)),a[u].lineCoordinates.x1=o,a[u].lineCoordinates.x2=r,a[u].lineCoordinates.width=Math.abs(r-o),a[u].title&&(a[u]._titleTextBlock.maxWidth=0<a[u].titleMaxWidth&&a[u].titleMaxWidth<a[u].lineCoordinates.width?a[u].titleMaxWidth:a[u].lineCoordinates.width);if(i&&0<i.length)for(c=[],u=W=0;u<i.length;u++)c.push(Math.ceil(i[u]?i[u].createLabelsAndCalculateHeight():0)),W+=c[u]+i[u].margin,Y+=i[u].margin;else c.push(Math.ceil(i[0]?i[0].createLabelsAndCalculateHeight():0));if(y.push(c),a&&0<a.length)for(b=[],u=D=0;u<a.length;u++)b.push(Math.ceil(a[u]?a[u].createLabelsAndCalculateHeight():0)),D+=b[u],E+=a[u].margin;else b.push(Math.ceil(a[0]?a[0].createLabelsAndCalculateHeight():0));if(w.push(b),i&&0<i.length)for(u=0;u<i.length;u++)0<i[u]._labels.length&&(h=i[u]._labels[0],l=i[u]._labels[i[u]._labels.length-1],T=h.textBlock.width*Math.cos(Math.PI/180*Math.abs(h.textBlock.angle))+(h.textBlock.height-l.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(h.textBlock.angle)),P=l.textBlock.width*Math.cos(Math.PI/180*Math.abs(l.textBlock.angle))+(l.textBlock.height-l.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(l.textBlock.angle)));if(a&&0<a.length)for(u=0;u<a.length;u++)a[u]&&0<a[u]._labels.length&&(h=a[u]._labels[0],l=a[u]._labels[a[u]._labels.length-1],C=h.textBlock.width*Math.cos(Math.PI/180*Math.abs(h.textBlock.angle))+(h.textBlock.height-l.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(h.textBlock.angle)),S=l.textBlock.width*Math.cos(Math.PI/180*Math.abs(l.textBlock.angle))+(l.textBlock.height-l.textBlock.fontSize/2)*Math.sin(Math.PI/180*Math.abs(l.textBlock.angle)));if(d.panEnabled)for(u=0;u<i.length;u++)c[u]=d.sessionVariables.axisY.height;else for(u=0;u<i.length;u++)d.sessionVariables.axisY.height=c[u];if(i&&0<i.length)for(u=i.length-1;0<=u;u--)l=Math.round(n.y2),h=Math.round(n.y2>i[u].chart.height-10?i[u].chart.height-10:n.y2),i[u].lineCoordinates.y1=l-(c[u]+i[u].margin+R),i[u].lineCoordinates.y2=l-(c[u]+i[u].margin+R),i[u].bounds={x1:o,y1:l-(c[u]+R+i[u].margin),x2:r,y2:h-(R+i[u].margin),width:r-o,height:c[u]},i[u].title&&(i[u]._titleTextBlock.maxWidth=0<i[u].titleMaxWidth&&i[u].titleMaxWidth<i[u].lineCoordinates.width?i[u].titleMaxWidth:i[u].lineCoordinates.width),R+=c[u]+i[u].margin;if(a&&0<a.length)for(u=a.length-1;0<=u;u--)a[u]&&(l=Math.round(n.y1),h=Math.round(n.y1+(b[u]+a[u].margin+V)),a[u].lineCoordinates.y1=h,a[u].lineCoordinates.y2=h,a[u].bounds={x1:o,y1:l+(a[u].margin+V),x2:r,y2:h,width:r-o,height:D},a[u].title&&(a[u]._titleTextBlock.maxWidth=0<a[u].titleMaxWidth&&a[u].titleMaxWidth<a[u].lineCoordinates.width?a[u].titleMaxWidth:a[u].lineCoordinates.width),V+=b[u]+a[u].margin);if(t&&0<t.length)for(u=0;u<t.length;u++){if(Y=t[u]._labels&&0<t[u]._labels.length?t[u]._labels[0].textBlock.fontSize/2:0,o=Math.round(n.x1+s),l=a&&0<a.length?Math.round(a[0]?a[0].lineCoordinates.y2:n.y1<Math.max(Y,10)?Math.max(Y,10):n.y1):n.y1<Math.max(Y,10)?Math.max(Y,10):n.y1,r=Math.round(n.x1+z+s),h=i&&0<i.length?Math.round(i[0]?i[0].lineCoordinates.y1:n.y2-W>d.height-Math.max(Y,10)?d.height-Math.max(Y,10):n.y2-W):n.y2>d.height-Math.max(Y,10)?d.height-Math.max(Y,10):n.y2,i&&0<i.length)for(Y=0;Y<i.length;Y++)i[Y]&&i[Y].labelAutoFit&&(r=0>i[Y].labelAngle?Math.max(r,T):0===i[Y].labelAngle?Math.max(r,T/2):r,o=0>i[Y].labelAngle||0===i[Y].labelAngle?r-z:o);if(a&&0<a.length)for(Y=0;Y<a.length;Y++)a[Y]&&a[Y].labelAutoFit&&(o=(r=a[Y].lineCoordinates.x1)-z);t[u].lineCoordinates={x1:r-L,y1:l,x2:r-L,y2:h,height:Math.abs(h-l)},t[u].bounds={x1:r-(A[u]+L),y1:l,x2:r,y2:h,width:r-o,height:h-l},t[u].title&&(t[u]._titleTextBlock.maxWidth=0<t[u].titleMaxWidth&&t[u].titleMaxWidth<t[u].lineCoordinates.height?t[u].titleMaxWidth:t[u].lineCoordinates.height),t[u].calculateValueToPixelConversionParameters(),t[u].calculateBreaksSizeInValues(),L+=A[u]+t[u].margin}if(e&&0<e.length)for(u=0;u<e.length;u++){if(Y=e[u]._labels&&0<e[u]._labels.length?e[u]._labels[0].textBlock.fontSize/2:0,o=Math.round(n.x1-s),l=a&&0<a.length?Math.round(a[0]?a[0].lineCoordinates.y2:n.y1<Math.max(Y,10)?Math.max(Y,10):n.y1):n.y1<Math.max(Y,10)?Math.max(Y,10):n.y1,r=Math.round(n.x2-O-X),h=i&&0<i.length?Math.round(i[0]?i[0].lineCoordinates.y1:n.y2-W>d.height-Math.max(Y,10)?d.height-Math.max(Y,10):n.y2-W):n.y2>d.height-Math.max(Y,10)?d.height-Math.max(Y,10):n.y2,i&&0<i.length)for(Y=0;Y<i.length;Y++)i[Y]&&i[Y].labelAutoFit&&(r=0>i[Y].labelAngle?Math.max(r,T):0===i[Y].labelAngle?Math.max(r,T/2):r,o=0>i[Y].labelAngle||0===i[Y].labelAngle?r-O:o);if(a&&0<a.length)for(Y=0;Y<a.length;Y++)a[Y]&&a[Y].labelAutoFit&&(o=(r=a[Y].lineCoordinates.x2)-O);e[u].lineCoordinates={x1:r+I,y1:l,x2:r+I,y2:h,height:Math.abs(h-l)},e[u].bounds={x1:o,y1:l,x2:r+M[u]+I,y2:h,width:r-o,height:h-l},e[u].title&&(e[u]._titleTextBlock.maxWidth=0<e[u].titleMaxWidth&&e[u].titleMaxWidth<e[u].lineCoordinates.height?e[u].titleMaxWidth:e[u].lineCoordinates.height),e[u].calculateValueToPixelConversionParameters(),e[u].calculateBreaksSizeInValues(),I+=M[u]+e[u].margin}for(u=0;u<p.length;u++)"axisY"===p[u].type&&(p[u].calculateValueToPixelConversionParameters(),p[u].calculateBreaksSizeInValues());if(0<g){if(t&&0<t.length)for(u=0;u<t.length;u++)m=_[g-1][u]===_[g][u];else m=!0;if(e&&0<e.length)for(u=0;u<e.length;u++)v=F[g-1][u]===F[g][u];else v=!0;if(i&&0<i.length)for(u=0;u<i.length;u++)f=y[g-1][u]===y[g][u];else f=!0;if(a&&0<a.length)for(u=0;u<a.length;u++)k=w[g-1][u]===w[g][u];else k=!0}if(m&&v&&f&&k)break;g++}if(i&&0<i.length)for(u=0;u<i.length;u++)i[u].calculateStripLinesThicknessInValues(),i[u].calculateBreaksInPixels();if(a&&0<a.length)for(u=0;u<a.length;u++)a[u].calculateStripLinesThicknessInValues(),a[u].calculateBreaksInPixels();if(t&&0<t.length)for(u=0;u<t.length;u++)t[u].calculateStripLinesThicknessInValues(),t[u].calculateBreaksInPixels();if(e&&0<e.length)for(u=0;u<e.length;u++)e[u].calculateStripLinesThicknessInValues(),e[u].calculateBreaksInPixels()}},z.render=function(t,e,i,a,s){var n=t[0]?t[0].chart:e[0].chart;s=n.ctx;var o=n._axes;if(n.alignVerticalAxes&&n.alignVerticalAxes(),s.save(),s.beginPath(),t[0]&&s.rect(5,t[0].bounds.y1,t[0].chart.width-10,t[0].bounds.height),e[0]&&s.rect(5,e[e.length-1].bounds.y1,e[0].chart.width-10,e[0].bounds.height),s.clip(),t&&0<t.length)for(var l=0;l<t.length;l++)t[l].renderLabelsTicksAndTitle();if(e&&0<e.length)for(l=0;l<e.length;l++)e[l].renderLabelsTicksAndTitle();if(s.restore(),i&&0<i.length)for(l=0;l<i.length;l++)i[l].renderLabelsTicksAndTitle();if(a&&0<a.length)for(l=0;l<a.length;l++)a[l].renderLabelsTicksAndTitle();if(n.preparePlotArea(),n=n.plotArea,s.save(),s.beginPath(),s.rect(n.x1,n.y1,Math.abs(n.x2-n.x1),Math.abs(n.y2-n.y1)),s.clip(),t&&0<t.length)for(l=0;l<o.length;l++)o[l].renderStripLinesOfThicknessType("value");if(e&&0<e.length)for(l=0;l<e.length;l++)e[l].renderStripLinesOfThicknessType("value");if(i&&0<i.length)for(l=0;l<i.length;l++)i[l].renderStripLinesOfThicknessType("value");if(a&&0<a.length)for(l=0;l<a.length;l++)a[l].renderStripLinesOfThicknessType("value");if(t&&0<t.length)for(l=0;l<t.length;l++)t[l].renderInterlacedColors();if(e&&0<e.length)for(l=0;l<e.length;l++)e[l].renderInterlacedColors();if(i&&0<i.length)for(l=0;l<i.length;l++)i[l].renderInterlacedColors();if(a&&0<a.length)for(l=0;l<a.length;l++)a[l].renderInterlacedColors();if(s.restore(),t&&0<t.length)for(l=0;l<t.length;l++)t[l].renderGrid(),N&&(t[l].createMask(),t[l].renderBreaksBackground());if(e&&0<e.length)for(l=0;l<e.length;l++)e[l].renderGrid(),N&&(e[l].createMask(),e[l].renderBreaksBackground());if(i&&0<i.length)for(l=0;l<i.length;l++)i[l].renderGrid(),N&&(i[l].createMask(),i[l].renderBreaksBackground());if(a&&0<a.length)for(l=0;l<a.length;l++)a[l].renderGrid(),N&&(a[l].createMask(),a[l].renderBreaksBackground());if(t&&0<t.length)for(l=0;l<t.length;l++)t[l].renderAxisLine();if(e&&0<e.length)for(l=0;l<e.length;l++)e[l].renderAxisLine();if(i&&0<i.length)for(l=0;l<i.length;l++)i[l].renderAxisLine();if(a&&0<a.length)for(l=0;l<a.length;l++)a[l].renderAxisLine();if(t&&0<t.length)for(l=0;l<t.length;l++)t[l].renderStripLinesOfThicknessType("pixel");if(e&&0<e.length)for(l=0;l<e.length;l++)e[l].renderStripLinesOfThicknessType("pixel");if(i&&0<i.length)for(l=0;l<i.length;l++)i[l].renderStripLinesOfThicknessType("pixel");if(a&&0<a.length)for(l=0;l<a.length;l++)a[l].renderStripLinesOfThicknessType("pixel")},z.prototype.calculateStripLinesThicknessInValues=function(){for(var t=0;t<this.stripLines.length;t++)if(null!==this.stripLines[t].startValue&&null!==this.stripLines[t].endValue){var e=Math.min(this.stripLines[t].startValue,this.stripLines[t].endValue),i=Math.max(this.stripLines[t].startValue,this.stripLines[t].endValue);e=this.getApparentDifference(e,i);this.stripLines[t].value=this.logarithmic?this.stripLines[t].value*Math.sqrt(Math.log(this.stripLines[t].endValue/this.stripLines[t].startValue)/Math.log(e)):this.stripLines[t].value+(Math.abs(this.stripLines[t].endValue-this.stripLines[t].startValue)-e)/2,this.stripLines[t].thickness=e,this.stripLines[t]._thicknessType="value"}},z.prototype.calculateBreaksSizeInValues=function(){for(var t,e="left"===this._position||"right"===this._position?this.lineCoordinates.height||this.chart.height:this.lineCoordinates.width||this.chart.width,i=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[],a=this.conversionParameters.pixelPerUnit||e/(this.logarithmic?this.conversionParameters.maximum/this.conversionParameters.minimum:this.conversionParameters.maximum-this.conversionParameters.minimum),s=this.scaleBreaks&&!x(this.scaleBreaks.options.spacing),n=0;n<i.length;n++)t=s||!x(i[n].options.spacing),i[n].spacing=o(i[n].spacing,e,8,t?.1*e:8,t?0:3)<<0,i[n].size=0>i[n].spacing?0:Math.abs(i[n].spacing/a),this.logarithmic&&(i[n].size=Math.pow(this.logarithmBase,i[n].size))},z.prototype.calculateBreaksInPixels=function(){if(!(this.scaleBreaks&&0>=this.scaleBreaks._appliedBreaks.length)){var t=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[];t.length&&(this.scaleBreaks.firstBreakIndex=this.scaleBreaks.lastBreakIndex=null);for(var e=0;e<t.length&&!(t[e].startValue>this.conversionParameters.maximum);e++)t[e].endValue<this.conversionParameters.minimum||(x(this.scaleBreaks.firstBreakIndex)&&(this.scaleBreaks.firstBreakIndex=e),t[e].startValue>=this.conversionParameters.minimum&&(t[e].startPixel=this.convertValueToPixel(t[e].startValue),this.scaleBreaks.lastBreakIndex=e),t[e].endValue<=this.conversionParameters.maximum&&(t[e].endPixel=this.convertValueToPixel(t[e].endValue)))}},z.prototype.renderLabelsTicksAndTitle=function(){var t=this,e=!1,i=0,a=0,s=1,n=0;if(0!==this.labelAngle&&360!==this.labelAngle&&(s=1.2),void 0===this.options.interval){if("bottom"===this._position||"top"===this._position)if(this.logarithmic&&!this.equidistantInterval&&this.labelAutoFit){i=[],s=0!==this.labelAngle&&360!==this.labelAngle?1:1.2;for(var o,l=this.viewportMaximum,r=this.lineCoordinates.width/Math.log(this.range),h=this._labels.length-1;0<=h&&!((c=this._labels[h]).position<this.viewportMinimum);h--)c.position>this.viewportMaximum||!(h===this._labels.length-1||o<Math.log(l/c.position)*r/s)||(i.push(c),l=c.position,o=c.textBlock.width*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+c.textBlock.height*Math.abs(Math.sin(Math.PI/180*this.labelAngle)));this._labels=i}else{for(h=0;h<this._labels.length;h++)(c=this._labels[h]).position<this.viewportMinimum||(i+=o=c.textBlock.width*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+c.textBlock.height*Math.abs(Math.sin(Math.PI/180*this.labelAngle)));i>this.lineCoordinates.width*s&&this.labelAutoFit&&(e=!0)}if("left"===this._position||"right"===this._position)if(this.logarithmic&&!this.equidistantInterval&&this.labelAutoFit){var d;for(i=[],l=this.viewportMaximum,r=this.lineCoordinates.height/Math.log(this.range),h=this._labels.length-1;0<=h&&!((c=this._labels[h]).position<this.viewportMinimum);h--)c.position>this.viewportMaximum||!(h===this._labels.length-1||d<Math.log(l/c.position)*r)||(i.push(c),l=c.position,d=c.textBlock.height*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+c.textBlock.width*Math.abs(Math.sin(Math.PI/180*this.labelAngle)));this._labels=i}else{for(h=0;h<this._labels.length;h++)(c=this._labels[h]).position<this.viewportMinimum||(a+=d=c.textBlock.height*Math.abs(Math.cos(Math.PI/180*this.labelAngle))+c.textBlock.width*Math.abs(Math.sin(Math.PI/180*this.labelAngle)));a>this.lineCoordinates.height*s&&this.labelAutoFit&&(e=!0)}}this.logarithmic&&!this.equidistantInterval&&this.labelAutoFit&&this._labels.sort((function(t,e){return t.position-e.position}));var c,p;h=0;if("bottom"===this._position){for(h=0;h<this._labels.length;h++)(c=this._labels[h]).position<this.viewportMinimum||c.position>this.viewportMaximum||e&&0!=n++%2&&this.labelAutoFit||(p=this.getPixelCoordinatesOnAxis(c.position),this.tickThickness&&"inside"!=this.labelPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,a=1==this.ctx.lineWidth%2?.5+(p.x<<0):p.x<<0,this.ctx.beginPath(),this.ctx.moveTo(a,p.y<<0),this.ctx.lineTo(a,p.y+this.tickLength<<0),this.ctx.stroke()),0===c.textBlock.angle?(p.x-=c.textBlock.width/2,p.y="inside"===this.labelPlacement?p.y-(this.tickLength+c.textBlock.fontSize/2):p.y+this.tickLength+c.textBlock.fontSize/2):(p.x="inside"===this.labelPlacement?0>this.labelAngle?p.x:p.x-c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):p.x-(0>this.labelAngle?c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0),p.y="inside"===this.labelPlacement?0>this.labelAngle?p.y-this.tickLength-5:p.y-this.tickLength-Math.abs(c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)+5):p.y+this.tickLength+Math.abs(0>this.labelAngle?c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-5:5)),c.textBlock.x=p.x,c.textBlock.y=p.y);"inside"===this.labelPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",(function(){for(h=0;h<t._labels.length;h++)if(!((c=t._labels[h]).position<t.viewportMinimum||c.position>t.viewportMaximum||e&&0!=n++%2&&t.labelAutoFit)&&(p=t.getPixelCoordinatesOnAxis(c.position),t.tickThickness)){t.ctx.lineWidth=t.tickThickness,t.ctx.strokeStyle=t.tickColor;var i=1==t.ctx.lineWidth%2?.5+(p.x<<0):p.x<<0;t.ctx.save(),t.ctx.beginPath(),t.ctx.moveTo(i,p.y<<0),t.ctx.lineTo(i,p.y-t.tickLength<<0),t.ctx.stroke(),t.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(h=0;h<this._labels.length;h++)(c=this._labels[h]).position<this.viewportMinimum||c.position>this.viewportMaximum||e&&0!=n++%2&&this.labelAutoFit||(p=this.getPixelCoordinatesOnAxis(c.position),this.tickThickness&&"inside"!=this.labelPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,a=1==this.ctx.lineWidth%2?.5+(p.x<<0):p.x<<0,this.ctx.beginPath(),this.ctx.moveTo(a,p.y<<0),this.ctx.lineTo(a,p.y-this.tickLength<<0),this.ctx.stroke()),0===c.textBlock.angle?(p.x-=c.textBlock.width/2,p.y="inside"===this.labelPlacement?p.y+this.labelFontSize/2+this.tickLength+5:p.y-(this.tickLength+c.textBlock.height-c.textBlock.fontSize/2)):(p.x="inside"===this.labelPlacement?0<this.labelAngle?p.x:p.x-c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):p.x+(c.textBlock.height-this.tickLength-this.labelFontSize)*Math.sin(Math.PI/180*this.labelAngle)-(0<this.labelAngle?c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0),p.y="inside"===this.labelPlacement?0<this.labelAngle?p.y+this.tickLength+5:p.y-c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)+this.tickLength+5:p.y-(this.tickLength+((c.textBlock.height-c.textBlock.fontSize/2)*Math.cos(Math.PI/180*this.labelAngle)+(0<this.labelAngle?c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):0)))),c.textBlock.x=p.x,c.textBlock.y=p.y);"inside"===this.labelPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",(function(){for(h=0;h<t._labels.length;h++)if(!((c=t._labels[h]).position<t.viewportMinimum||c.position>t.viewportMaximum||e&&0!=n++%2&&t.labelAutoFit)&&(p=t.getPixelCoordinatesOnAxis(c.position),t.tickThickness)){t.ctx.lineWidth=t.tickThickness,t.ctx.strokeStyle=t.tickColor;var i=1==this.ctx.lineWidth%2?.5+(p.x<<0):p.x<<0;t.ctx.save(),t.ctx.beginPath(),t.ctx.moveTo(i,p.y<<0),t.ctx.lineTo(i,p.y+t.tickLength<<0),t.ctx.stroke(),t.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(h=0;h<this._labels.length;h++)(c=this._labels[h]).position<this.viewportMinimum||c.position>this.viewportMaximum||e&&0!=n++%2&&this.labelAutoFit||(p=this.getPixelCoordinatesOnAxis(c.position),this.tickThickness&&"inside"!=this.labelPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,a=1==this.ctx.lineWidth%2?.5+(p.y<<0):p.y<<0,this.ctx.beginPath(),this.ctx.moveTo(p.x<<0,a),this.ctx.lineTo(p.x-this.tickLength<<0,a),this.ctx.stroke()),0===this.labelAngle?(c.textBlock.y=p.y,c.textBlock.x="inside"===this.labelPlacement?p.x+this.tickLength+5:p.x-c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-this.tickLength-5):(c.textBlock.y="inside"===this.labelPlacement?p.y:p.y-c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),c.textBlock.x="inside"===this.labelPlacement?p.x+this.tickLength+5:0<this.labelAngle?p.x-c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-this.tickLength-5:p.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));"inside"===this.labelPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",(function(){for(h=0;h<t._labels.length;h++)if(!((c=t._labels[h]).position<t.viewportMinimum||c.position>t.viewportMaximum||e&&0!=n++%2&&t.labelAutoFit)&&(p=t.getPixelCoordinatesOnAxis(c.position),t.tickThickness)){t.ctx.lineWidth=t.tickThickness,t.ctx.strokeStyle=t.tickColor;var i=1==t.ctx.lineWidth%2?.5+(p.y<<0):p.y<<0;t.ctx.save(),t.ctx.beginPath(),t.ctx.moveTo(p.x<<0,i),t.ctx.lineTo(p.x+t.tickLength<<0,i),t.ctx.stroke(),t.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(h=0;h<this._labels.length;h++)(c=this._labels[h]).position<this.viewportMinimum||c.position>this.viewportMaximum||e&&0!=n++%2&&this.labelAutoFit||(p=this.getPixelCoordinatesOnAxis(c.position),this.tickThickness&&"inside"!=this.labelPlacement&&(this.ctx.lineWidth=this.tickThickness,this.ctx.strokeStyle=this.tickColor,a=1==this.ctx.lineWidth%2?.5+(p.y<<0):p.y<<0,this.ctx.beginPath(),this.ctx.moveTo(p.x<<0,a),this.ctx.lineTo(p.x+this.tickLength<<0,a),this.ctx.stroke()),0===this.labelAngle?(c.textBlock.y=p.y,c.textBlock.x="inside"===this.labelPlacement?p.x-c.textBlock.width-this.tickLength-5:p.x+this.tickLength+5):(c.textBlock.y="inside"===this.labelPlacement?p.y-c.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):0>this.labelAngle?p.y:p.y-(c.textBlock.height-c.textBlock.fontSize/2-5)*Math.cos(Math.PI/180*this.labelAngle),c.textBlock.x="inside"===this.labelPlacement?p.x-c.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-this.tickLength-5:0<this.labelAngle?p.x+(c.textBlock.height-c.textBlock.fontSize/2-5)*Math.sin(Math.PI/180*this.labelAngle)+this.tickLength:p.x+this.tickLength+5));"inside"===this.labelPlacement&&this.chart.addEventListener("dataAnimationIterationEnd",(function(){for(h=0;h<t._labels.length;h++)if(!((c=t._labels[h]).position<t.viewportMinimum||c.position>t.viewportMaximum||e&&0!=n++%2&&t.labelAutoFit)&&(p=t.getPixelCoordinatesOnAxis(c.position),t.tickThickness)){t.ctx.lineWidth=t.tickThickness,t.ctx.strokeStyle=t.tickColor;var i=1==t.ctx.lineWidth%2?.5+(p.y<<0):p.y<<0;t.ctx.save(),t.ctx.beginPath(),t.ctx.moveTo(p.x<<0,i),t.ctx.lineTo(p.x-t.tickLength<<0,i),t.ctx.stroke(),t.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))}if(n=0,"inside"===this.labelPlacement)this.chart.addEventListener("dataAnimationIterationEnd",(function(){for(h=0;h<t._labels.length;h++)(c=t._labels[h]).position<t.viewportMinimum||c.position>t.viewportMaximum||e&&0!=n++%2&&t.labelAutoFit||(t.ctx.save(),t.ctx.beginPath(),c.textBlock.render(!0),t.ctx.restore())}),this);else for(h=0;h<this._labels.length;h++)(c=this._labels[h]).position<this.viewportMinimum||c.position>this.viewportMaximum||e&&0!=n++%2&&this.labelAutoFit||c.textBlock.render(!0)},z.prototype.renderInterlacedColors=function(){var t,e,i=this.chart.plotArea.ctx,a=this.chart.plotArea,s=0;if(t=!0,"bottom"!==this._position&&"top"!==this._position||!this.interlacedColor){if(("left"===this._position||"right"===this._position)&&this.interlacedColor)for(i.fillStyle=this.interlacedColor,s=0;s<this._labels.length;s++)t?(e=this.getPixelCoordinatesOnAxis(this._labels[s].position),t=s+1>this._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[s+1].position),i.fillRect(a.x1,Math.min(e.y,t.y),Math.abs(a.x1-a.x2),Math.abs(t.y-e.y)),t=!1):t=!0}else for(i.fillStyle=this.interlacedColor,s=0;s<this._labels.length;s++)t?(t=this.getPixelCoordinatesOnAxis(this._labels[s].position),e=s+1>this._labels.length-1?this.getPixelCoordinatesOnAxis(this.viewportMaximum):this.getPixelCoordinatesOnAxis(this._labels[s+1].position),i.fillRect(Math.min(e.x,t.x),a.y1,Math.abs(e.x-t.x),Math.abs(a.y1-a.y2)),t=!1):t=!0;i.beginPath()},z.prototype.renderStripLinesOfThicknessType=function(t){if(this.stripLines&&0<this.stripLines.length&&t){var e,i=this,a=0,s=0,n=!1,o=!1,l=[],r=[];for(o=!1,a=0;a<this.stripLines.length;a++){var h=this.stripLines[a];h._thicknessType===t&&("pixel"===t&&(h.value<this.viewportMinimum||h.value>this.viewportMaximum||x(h.value)||isNaN(this.range))||l.push(h))}for(a=0;a<this._stripLineLabels.length;a++)if(h=this.stripLines[a],!((e=this._stripLineLabels[a]).position<this.viewportMinimum||e.position>this.viewportMaximum||isNaN(this.range))){if(t=this.getPixelCoordinatesOnAxis(e.position),"outside"===e.stripLine.labelPlacement)if(h&&(this.ctx.strokeStyle=h.color,"pixel"===h._thicknessType&&(this.ctx.lineWidth=h.thickness)),"bottom"===this._position){var d=1==this.ctx.lineWidth%2?.5+(t.x<<0):t.x<<0;this.ctx.beginPath(),this.ctx.moveTo(d,t.y<<0),this.ctx.lineTo(d,t.y+this.tickLength<<0),this.ctx.stroke(),0===this.labelAngle?(t.x-=e.textBlock.width/2,t.y+=this.tickLength+e.textBlock.fontSize/2):(t.x-=0>this.labelAngle?e.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0,t.y+=this.tickLength+Math.abs(0>this.labelAngle?e.textBlock.width*Math.sin(Math.PI/180*this.labelAngle)-5:5))}else"top"===this._position?(d=1==this.ctx.lineWidth%2?.5+(t.x<<0):t.x<<0,this.ctx.beginPath(),this.ctx.moveTo(d,t.y<<0),this.ctx.lineTo(d,t.y-this.tickLength<<0),this.ctx.stroke(),0===this.labelAngle?(t.x-=e.textBlock.width/2,t.y-=this.tickLength+e.textBlock.height):(t.x+=(e.textBlock.height-this.tickLength-this.labelFontSize/2)*Math.sin(Math.PI/180*this.labelAngle)-(0<this.labelAngle?e.textBlock.width*Math.cos(Math.PI/180*this.labelAngle):0),t.y-=this.tickLength+(e.textBlock.height*Math.cos(Math.PI/180*this.labelAngle)+(0<this.labelAngle?e.textBlock.width*Math.sin(Math.PI/180*this.labelAngle):0)))):"left"===this._position?(d=1==this.ctx.lineWidth%2?.5+(t.y<<0):t.y<<0,this.ctx.beginPath(),this.ctx.moveTo(t.x<<0,d),this.ctx.lineTo(t.x-this.tickLength<<0,d),this.ctx.stroke(),0===this.labelAngle?t.x=t.x-e.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-this.tickLength-5:(t.y-=e.textBlock.width*Math.sin(Math.PI/180*this.labelAngle),t.x=0<this.labelAngle?t.x-e.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)-this.tickLength-5:t.x-e.textBlock.width*Math.cos(Math.PI/180*this.labelAngle)+(e.textBlock.height-e.textBlock.fontSize/2-5)*Math.sin(Math.PI/180*this.labelAngle)-this.tickLength)):"right"===this._position&&(d=1==this.ctx.lineWidth%2?.5+(t.y<<0):t.y<<0,this.ctx.beginPath(),this.ctx.moveTo(t.x<<0,d),this.ctx.lineTo(t.x+this.tickLength<<0,d),this.ctx.stroke(),0===this.labelAngle?t.x=t.x+this.tickLength+5:(t.y=0>this.labelAngle?t.y:t.y-(e.textBlock.height-e.textBlock.fontSize/2-5)*Math.cos(Math.PI/180*this.labelAngle),t.x=0<this.labelAngle?t.x+(e.textBlock.height-e.textBlock.fontSize/2-5)*Math.sin(Math.PI/180*this.labelAngle)+this.tickLength:t.x+this.tickLength+5));else e.textBlock.angle=-90,"bottom"===this._position?(e.textBlock.maxWidth=this.options.stripLines[a].labelMaxWidth?this.options.stripLines[a].labelMaxWidth:this.chart.plotArea.height-3,e.textBlock.measureText(),t.x-e.textBlock.height>this.chart.plotArea.x1?x(h.startValue)?t.x-=e.textBlock.height-e.textBlock.fontSize/2:t.x-=e.textBlock.height/2-e.textBlock.fontSize/2+3:(e.textBlock.angle=90,x(h.startValue)?t.x+=e.textBlock.height-e.textBlock.fontSize/2:t.x+=e.textBlock.height/2-e.textBlock.fontSize/2+3),t.y=-90===e.textBlock.angle?"near"===e.stripLine.labelAlign?this.chart.plotArea.y2-3:"center"===e.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1+e.textBlock.width)/2:this.chart.plotArea.y1+e.textBlock.width+3:"near"===e.stripLine.labelAlign?this.chart.plotArea.y2-e.textBlock.width-3:"center"===e.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1-e.textBlock.width)/2:this.chart.plotArea.y1+3):"top"===this._position?(e.textBlock.maxWidth=this.options.stripLines[a].labelMaxWidth?this.options.stripLines[a].labelMaxWidth:this.chart.plotArea.height-3,e.textBlock.measureText(),t.x-e.textBlock.height>this.chart.plotArea.x1?x(h.startValue)?t.x-=e.textBlock.height-e.textBlock.fontSize/2:t.x-=e.textBlock.height/2-e.textBlock.fontSize/2+3:(e.textBlock.angle=90,x(h.startValue)?t.x+=e.textBlock.height-e.textBlock.fontSize/2:t.x+=e.textBlock.height/2-e.textBlock.fontSize/2+3),t.y=-90===e.textBlock.angle?"near"===e.stripLine.labelAlign?this.chart.plotArea.y1+e.textBlock.width+3:"center"===e.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1+e.textBlock.width)/2:this.chart.plotArea.y2-3:"near"===e.stripLine.labelAlign?this.chart.plotArea.y1+3:"center"===e.stripLine.labelAlign?(this.chart.plotArea.y2+this.chart.plotArea.y1-e.textBlock.width)/2:this.chart.plotArea.y2-e.textBlock.width-3):"left"===this._position?(e.textBlock.maxWidth=this.options.stripLines[a].labelMaxWidth?this.options.stripLines[a].labelMaxWidth:this.chart.plotArea.width-3,e.textBlock.angle=0,e.textBlock.measureText(),t.y-e.textBlock.height>this.chart.plotArea.y1?x(h.startValue)?t.y-=e.textBlock.height-e.textBlock.fontSize/2:t.y-=e.textBlock.height/2-e.textBlock.fontSize+3:t.y-e.textBlock.height<this.chart.plotArea.y2?t.y+=e.textBlock.fontSize/2+3:x(h.startValue)?t.y-=e.textBlock.height-e.textBlock.fontSize/2:t.y-=e.textBlock.height/2-e.textBlock.fontSize+3,t.x="near"===e.stripLine.labelAlign?this.chart.plotArea.x1+3:"center"===e.stripLine.labelAlign?(this.chart.plotArea.x2+this.chart.plotArea.x1)/2-e.textBlock.width/2:this.chart.plotArea.x2-e.textBlock.width-3):"right"===this._position&&(e.textBlock.maxWidth=this.options.stripLines[a].labelMaxWidth?this.options.stripLines[a].labelMaxWidth:this.chart.plotArea.width-3,e.textBlock.angle=0,e.textBlock.measureText(),t.y-+e.textBlock.height>this.chart.plotArea.y1?x(h.startValue)?t.y-=e.textBlock.height-e.textBlock.fontSize/2:t.y-=e.textBlock.height/2-e.textBlock.fontSize/2-3:t.y-e.textBlock.height<this.chart.plotArea.y2?t.y+=e.textBlock.fontSize/2+3:x(h.startValue)?t.y-=e.textBlock.height-e.textBlock.fontSize/2:t.y-=e.textBlock.height/2-e.textBlock.fontSize/2+3,t.x="near"===e.stripLine.labelAlign?this.chart.plotArea.x2-e.textBlock.width-3:"center"===e.stripLine.labelAlign?(this.chart.plotArea.x2+this.chart.plotArea.x1)/2-e.textBlock.width/2:this.chart.plotArea.x1+3);e.textBlock.x=t.x,e.textBlock.y=t.y,r.push(e)}if(!o){for(o=!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(),a=0;a<l.length;a++)(h=l[a]).showOnTop?n||(n=!0,this.chart.addEventListener("dataAnimationIterationEnd",(function(){for(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(),s=0;s<l.length;s++)(h=l[s]).showOnTop&&h.render();this.ctx.restore()}),h)):h.render();for(a=0;a<r.length;a++)(e=r[a]).stripLine.showOnTop?o||(o=!0,this.chart.addEventListener("dataAnimationIterationEnd",(function(){for(s=0;s<r.length;s++)"inside"===(e=r[s]).stripLine.labelPlacement&&e.stripLine.showOnTop&&(i.ctx.save(),i.ctx.beginPath(),i.ctx.rect(i.chart.plotArea.x1,i.chart.plotArea.y1,i.chart.plotArea.width,i.chart.plotArea.height),i.ctx.clip(),e.textBlock.render(!0),i.ctx.restore())}),e.textBlock)):"inside"===e.stripLine.labelPlacement&&e.textBlock.render(!0);this.ctx.restore(),o=!0}if(o)for(o=!1,a=0;a<r.length;a++)(e=r[a]).stripLine.showOnTop?o||(o=!0,this.chart.addEventListener("dataAnimationIterationEnd",(function(){for(s=0;s<r.length;s++)"outside"===(e=r[s]).stripLine.labelPlacement&&e.stripLine.showOnTop&&e.textBlock.render(!0)}),e.textBlock)):"outside"===e.stripLine.labelPlacement&&e.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 t=this.scaleBreaks._appliedBreaks;N?(this.maskCanvas=w(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 e=0;e<t.length;e++)t[e].endValue<this.viewportMinimum||t[e].startValue>this.viewportMaximum||isNaN(this.range)||t[e].render(this.maskCtx);this.maskCtx.restore()}},z.prototype.renderCrosshair=function(t,e){this.crosshair.render(t,e)},z.prototype.renderGrid=function(){if(this.gridThickness&&0<this.gridThickness){var t=this.chart.ctx;t.save();var e,i=this.chart.plotArea;if(t.lineWidth=this.gridThickness,t.strokeStyle=this.gridColor,t.setLineDash&&t.setLineDash(b(this.gridDashType,this.gridThickness)),"bottom"===this._position||"top"===this._position)for(a=0;a<this._labels.length;a++)this._labels[a].position<this.viewportMinimum||this._labels[a].position>this.viewportMaximum||this._labels[a].breaksLabelType||(t.beginPath(),e=this.getPixelCoordinatesOnAxis(this._labels[a].position),e=1==t.lineWidth%2?.5+(e.x<<0):e.x<<0,t.moveTo(e,i.y1<<0),t.lineTo(e,i.y2<<0),t.stroke());else if("left"===this._position||"right"===this._position)for(var a=0;a<this._labels.length;a++)this._labels[a].position<this.viewportMinimum||this._labels[a].position>this.viewportMaximum||this._labels[a].breaksLabelType||(t.beginPath(),e=this.getPixelCoordinatesOnAxis(this._labels[a].position),e=1==t.lineWidth%2?.5+(e.y<<0):e.y<<0,t.moveTo(i.x1<<0,e),t.lineTo(i.x2<<0,e),t.stroke());t.restore()}},z.prototype.renderAxisLine=function(){var t,e,i=this.chart.ctx,a=N?this.chart._preRenderCtx:i,s=Math.ceil(this.tickThickness/(this.reversed?-2:2)),n=Math.ceil(this.tickThickness/(this.reversed?2:-2));if(a.save(),"bottom"===this._position||"top"===this._position){if(this.lineThickness){this.reversed?(t=this.lineCoordinates.x2,e=this.lineCoordinates.x1):(t=this.lineCoordinates.x1,e=this.lineCoordinates.x2),a.lineWidth=this.lineThickness,a.strokeStyle=this.lineColor?this.lineColor:"black",a.setLineDash&&a.setLineDash(b(this.lineDashType,this.lineThickness));var o=1==this.lineThickness%2?.5+(this.lineCoordinates.y1<<0):this.lineCoordinates.y1<<0;if(a.beginPath(),this.scaleBreaks&&!x(this.scaleBreaks.firstBreakIndex))if(x(this.scaleBreaks.lastBreakIndex))t=this.scaleBreaks._appliedBreaks[this.scaleBreaks.firstBreakIndex].endPixel+n;else for(var l=this.scaleBreaks.firstBreakIndex;l<=this.scaleBreaks.lastBreakIndex;l++)a.moveTo(t,o),a.lineTo(this.scaleBreaks._appliedBreaks[l].startPixel+s,o),t=this.scaleBreaks._appliedBreaks[l].endPixel+n;t&&(a.moveTo(t,o),a.lineTo(e,o)),a.stroke()}}else if(("left"===this._position||"right"===this._position)&&this.lineThickness){if(this.reversed?(t=this.lineCoordinates.y1,e=this.lineCoordinates.y2):(t=this.lineCoordinates.y2,e=this.lineCoordinates.y1),a.lineWidth=this.lineThickness,a.strokeStyle=this.lineColor,a.setLineDash&&a.setLineDash(b(this.lineDashType,this.lineThickness)),o=1==this.lineThickness%2?.5+(this.lineCoordinates.x1<<0):this.lineCoordinates.x1<<0,a.beginPath(),this.scaleBreaks&&!x(this.scaleBreaks.firstBreakIndex))if(x(this.scaleBreaks.lastBreakIndex))t=this.scaleBreaks._appliedBreaks[this.scaleBreaks.firstBreakIndex].endPixel+s;else for(l=this.scaleBreaks.firstBreakIndex;l<=this.scaleBreaks.lastBreakIndex;l++)a.moveTo(o,t),a.lineTo(o,this.scaleBreaks._appliedBreaks[l].startPixel+n),t=this.scaleBreaks._appliedBreaks[l].endPixel+s;t&&(a.moveTo(o,t),a.lineTo(o,e)),a.stroke()}N&&(i.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),a.clearRect(0,0,this.chart.width,this.chart.height)),a.restore()},z.prototype.getPixelCoordinatesOnAxis=function(t){var e={};return"bottom"!==this._position&&"top"!==this._position||(e.x=this.convertValueToPixel(t),e.y=this.lineCoordinates.y1),"left"!==this._position&&"right"!==this._position||(e.y=this.convertValueToPixel(t),e.x=this.lineCoordinates.x2),e},z.prototype.convertPixelToValue=function(t){if(void 0===t)return null;var e,i=0,a=0,s=(i=!0,this.scaleBreaks?this.scaleBreaks._appliedBreaks:[]);a="number"==typeof t?t:"left"===this._position||"right"===this._position?t.y:t.x;if(this.logarithmic){if(t=e=Math.pow(this.logarithmBase,(a-this.conversionParameters.reference)/this.conversionParameters.pixelPerUnit),a<=this.conversionParameters.reference==("left"===this._position||"right"===this._position)!==this.reversed){for(a=0;a<s.length;a++)if(!(s[a].endValue<this.conversionParameters.minimum))if(i)if(s[a].startValue<this.conversionParameters.minimum){if(1<s[a].size&&this.conversionParameters.minimum*Math.pow(s[a].endValue/s[a].startValue,Math.log(e)/Math.log(s[a].size))<s[a].endValue){t=Math.pow(s[a].endValue/s[a].startValue,Math.log(e)/Math.log(s[a].size));break}t*=s[a].endValue/this.conversionParameters.minimum/Math.pow(s[a].size,Math.log(s[a].endValue/this.conversionParameters.minimum)/Math.log(s[a].endValue/s[a].startValue)),e/=Math.pow(s[a].size,Math.log(s[a].endValue/this.conversionParameters.minimum)/Math.log(s[a].endValue/s[a].startValue)),i=!1}else{if(!(e>s[a].startValue/this.conversionParameters.minimum))break;if((e/=s[a].startValue/this.conversionParameters.minimum)<s[a].size){t*=Math.pow(s[a].endValue/s[a].startValue,1===s[a].size?1:Math.log(e)/Math.log(s[a].size))/e;break}t*=s[a].endValue/s[a].startValue/s[a].size,e/=s[a].size,i=!1}else{if(!(e>s[a].startValue/s[a-1].endValue))break;if((e/=s[a].startValue/s[a-1].endValue)<s[a].size){t*=Math.pow(s[a].endValue/s[a].startValue,1===s[a].size?1:Math.log(e)/Math.log(s[a].size))/e;break}t*=s[a].endValue/s[a].startValue/s[a].size,e/=s[a].size}}else for(a=s.length-1;0<=a;a--)if(!(s[a].startValue>this.conversionParameters.minimum))if(i)if(s[a].endValue>this.conversionParameters.minimum){if(1<s[a].size&&this.conversionParameters.minimum*Math.pow(s[a].endValue/s[a].startValue,Math.log(e)/Math.log(s[a].size))>s[a].startValue){t=Math.pow(s[a].endValue/s[a].startValue,Math.log(e)/Math.log(s[a].size));break}t*=s[a].startValue/this.conversionParameters.minimum*Math.pow(s[a].size,Math.log(s[a].startValue/this.conversionParameters.minimum)/Math.log(s[a].endValue/s[a].startValue))*e,e*=Math.pow(s[a].size,Math.log(this.conversionParameters.minimum/s[a].startValue)/Math.log(s[a].endValue/s[a].startValue)),i=!1}else{if(!(e<s[a].endValue/this.conversionParameters.minimum))break;if((e/=s[a].endValue/this.conversionParameters.minimum)>1/s[a].size){t*=Math.pow(s[a].endValue/s[a].startValue,1>=s[a].size?1:Math.log(e)/Math.log(s[a].size))*e;break}t/=s[a].endValue/s[a].startValue/s[a].size,e*=s[a].size,i=!1}else{if(!(e<s[a].endValue/s[a+1].startValue))break;if((e/=s[a].endValue/s[a+1].startValue)>1/s[a].size){t*=Math.pow(s[a].endValue/s[a].startValue,1>=s[a].size?1:Math.log(e)/Math.log(s[a].size))*e;break}t/=s[a].endValue/s[a].startValue/s[a].size,e*=s[a].size}i=t*this.viewportMinimum}else{if(t=e=(a-this.conversionParameters.reference)/this.conversionParameters.pixelPerUnit,a<=this.conversionParameters.reference==("left"===this._position||"right"===this._position)!==this.reversed){for(a=0;a<s.length;a++)if(!(s[a].endValue<this.conversionParameters.minimum))if(i)if(s[a].startValue<this.conversionParameters.minimum){if(s[a].size&&this.conversionParameters.minimum+e*(s[a].endValue-s[a].startValue)/s[a].size<s[a].endValue){t=0>=s[a].size?0:e*(s[a].endValue-s[a].startValue)/s[a].size;break}t+=s[a].endValue-this.conversionParameters.minimum-s[a].size*(s[a].endValue-this.conversionParameters.minimum)/(s[a].endValue-s[a].startValue),e-=s[a].size*(s[a].endValue-this.conversionParameters.minimum)/(s[a].endValue-s[a].startValue),i=!1}else{if(!(e>s[a].startValue-this.conversionParameters.minimum))break;if((e-=s[a].startValue-this.conversionParameters.minimum)<s[a].size){t+=(s[a].endValue-s[a].startValue)*(0===s[a].size?1:e/s[a].size)-e;break}t+=s[a].endValue-s[a].startValue-s[a].size,e-=s[a].size,i=!1}else{if(!(e>s[a].startValue-s[a-1].endValue))break;if((e-=s[a].startValue-s[a-1].endValue)<s[a].size){t+=(s[a].endValue-s[a].startValue)*(0===s[a].size?1:e/s[a].size)-e;break}t+=s[a].endValue-s[a].startValue-s[a].size,e-=s[a].size}}else for(a=s.length-1;0<=a;a--)if(!(s[a].startValue>this.conversionParameters.minimum))if(i)if(s[a].endValue>this.conversionParameters.minimum){if(s[a].size&&this.conversionParameters.minimum+e*(s[a].endValue-s[a].startValue)/s[a].size>s[a].startValue){t=0>=s[a].size?0:e*(s[a].endValue-s[a].startValue)/s[a].size;break}t+=s[a].startValue-this.conversionParameters.minimum+s[a].size*(this.conversionParameters.minimum-s[a].startValue)/(s[a].endValue-s[a].startValue),e+=s[a].size*(this.conversionParameters.minimum-s[a].startValue)/(s[a].endValue-s[a].startValue),i=!1}else{if(!(e<s[a].endValue-this.conversionParameters.minimum))break;if((e-=s[a].endValue-this.conversionParameters.minimum)>-1*s[a].size){t+=(s[a].endValue-s[a].startValue)*(0===s[a].size?1:e/s[a].size)+e;break}t-=s[a].endValue-s[a].startValue-s[a].size,e+=s[a].size,i=!1}else{if(!(e<s[a].endValue-s[a+1].startValue))break;if((e-=s[a].endValue-s[a+1].startValue)>-1*s[a].size){t+=(s[a].endValue-s[a].startValue)*(0===s[a].size?1:e/s[a].size)+e;break}t-=s[a].endValue-s[a].startValue-s[a].size,e+=s[a].size}i=this.conversionParameters.minimum+t}return i},z.prototype.convertValueToPixel=function(t){return t=this.getApparentDifference(this.conversionParameters.minimum,t,t),this.logarithmic?this.conversionParameters.reference+this.conversionParameters.pixelPerUnit*Math.log(t/this.conversionParameters.minimum)/this.conversionParameters.lnLogarithmBase+.5<<0:"axisX"===this.type?this.conversionParameters.reference+this.conversionParameters.pixelPerUnit*(t-this.conversionParameters.minimum)+.5<<0:this.conversionParameters.reference+this.conversionParameters.pixelPerUnit*(t-this.conversionParameters.minimum)+.5},z.prototype.getApparentDifference=function(t,e,i,a){var s=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[];if(this.logarithmic){i=x(i)?e/t:i;for(var n=0;n<s.length&&!(e<s[n].startValue);n++)t>s[n].endValue||(t<=s[n].startValue&&e>=s[n].endValue?i=i/s[n].endValue*s[n].startValue*s[n].size:t>=s[n].startValue&&e>=s[n].endValue?i=i/s[n].endValue*t*Math.pow(s[n].size,Math.log(s[n].endValue/t)/Math.log(s[n].endValue/s[n].startValue)):t<=s[n].startValue&&e<=s[n].endValue?i=i/e*s[n].startValue*Math.pow(s[n].size,Math.log(e/s[n].startValue)/Math.log(s[n].endValue/s[n].startValue)):!a&&t>s[n].startValue&&e<s[n].endValue&&(i=t*Math.pow(s[n].size,Math.log(e/t)/Math.log(s[n].endValue/s[n].startValue))))}else for(i=x(i)?Math.abs(e-t):i,n=0;n<s.length&&!(e<s[n].startValue);n++)t>s[n].endValue||(t<=s[n].startValue&&e>=s[n].endValue?i=i-s[n].endValue+s[n].startValue+s[n].size:t>s[n].startValue&&e>=s[n].endValue?i=i-s[n].endValue+t+s[n].size*(s[n].endValue-t)/(s[n].endValue-s[n].startValue):t<=s[n].startValue&&e<s[n].endValue?i=i-e+s[n].startValue+s[n].size*(e-s[n].startValue)/(s[n].endValue-s[n].startValue):!a&&t>s[n].startValue&&e<s[n].endValue&&(i=t+s[n].size*(e-t)/(s[n].endValue-s[n].startValue)));return i},z.prototype.setViewPortRange=function(t,e){this.sessionVariables.newViewportMinimum=this.viewportMinimum=Math.min(t,e),this.sessionVariables.newViewportMaximum=this.viewportMaximum=Math.max(t,e)},z.prototype.getXValueAt=function(t){if(!t)return null;var e=null;return"left"===this._position?e=this.convertPixelToValue(t.y):"bottom"===this._position&&(e=this.convertPixelToValue(t.x)),e},z.prototype.calculateValueToPixelConversionParameters=function(t){t=this.scaleBreaks?this.scaleBreaks._appliedBreaks:[];var e={pixelPerUnit:null,minimum:null,reference:null},i=this.lineCoordinates.width,a=this.lineCoordinates.height;i="bottom"===this._position||"top"===this._position?i:a,a=Math.abs(this.range);if(this.logarithmic)for(var s=0;s<t.length&&!(this.viewportMaximum<t[s].startValue);s++)this.viewportMinimum>t[s].endValue||(this.viewportMinimum>=t[s].startValue&&this.viewportMaximum<=t[s].endValue?i=0:this.viewportMinimum<=t[s].startValue&&this.viewportMaximum>=t[s].endValue?(a=a/t[s].endValue*t[s].startValue,i=0<t[s].spacing.toString().indexOf("%")?i*(1-parseFloat(t[s].spacing)/100):i-Math.min(t[s].spacing,.1*i)):this.viewportMinimum>t[s].startValue&&this.viewportMaximum>=t[s].endValue?(a=a/t[s].endValue*this.viewportMinimum,i=0<t[s].spacing.toString().indexOf("%")?i*(1-parseFloat(t[s].spacing)/100*Math.log(t[s].endValue/this.viewportMinimum)/Math.log(t[s].endValue/t[s].startValue)):i-Math.min(t[s].spacing,.1*i)*Math.log(t[s].endValue/this.viewportMinimum)/Math.log(t[s].endValue/t[s].startValue)):this.viewportMinimum<=t[s].startValue&&this.viewportMaximum<t[s].endValue&&(a=a/this.viewportMaximum*t[s].startValue,i=0<t[s].spacing.toString().indexOf("%")?i*(1-parseFloat(t[s].spacing)/100*Math.log(this.viewportMaximum/t[s].startValue)/Math.log(t[s].endValue/t[s].startValue)):i-Math.min(t[s].spacing,.1*i)*Math.log(this.viewportMaximum/t[s].startValue)/Math.log(t[s].endValue/t[s].startValue)));else for(s=0;s<t.length&&!(this.viewportMaximum<t[s].startValue);s++)this.viewportMinimum>t[s].endValue||(this.viewportMinimum>=t[s].startValue&&this.viewportMaximum<=t[s].endValue?i=0:this.viewportMinimum<=t[s].startValue&&this.viewportMaximum>=t[s].endValue?(a=a-t[s].endValue+t[s].startValue,i=0<t[s].spacing.toString().indexOf("%")?i*(1-parseFloat(t[s].spacing)/100):i-Math.min(t[s].spacing,.1*i)):this.viewportMinimum>t[s].startValue&&this.viewportMaximum>=t[s].endValue?(a=a-t[s].endValue+this.viewportMinimum,i=0<t[s].spacing.toString().indexOf("%")?i*(1-parseFloat(t[s].spacing)/100*(t[s].endValue-this.viewportMinimum)/(t[s].endValue-t[s].startValue)):i-Math.min(t[s].spacing,.1*i)*(t[s].endValue-this.viewportMinimum)/(t[s].endValue-t[s].startValue)):this.viewportMinimum<=t[s].startValue&&this.viewportMaximum<t[s].endValue&&(a=a-this.viewportMaximum+t[s].startValue,i=0<t[s].spacing.toString().indexOf("%")?i*(1-parseFloat(t[s].spacing)/100*(this.viewportMaximum-t[s].startValue)/(t[s].endValue-t[s].startValue)):i-Math.min(t[s].spacing,.1*i)*(this.viewportMaximum-t[s].startValue)/(t[s].endValue-t[s].startValue)));e.minimum=this.viewportMinimum,e.maximum=this.viewportMaximum,e.range=a,"bottom"!==this._position&&"top"!==this._position||(this.logarithmic?(e.lnLogarithmBase=Math.log(this.logarithmBase),e.pixelPerUnit=(this.reversed?-1:1)*i*e.lnLogarithmBase/Math.log(Math.abs(a))):e.pixelPerUnit=(this.reversed?-1:1)*i/Math.abs(a),e.reference=this.reversed?this.lineCoordinates.x2:this.lineCoordinates.x1),"left"!==this._position&&"right"!==this._position||(this.logarithmic?(e.lnLogarithmBase=Math.log(this.logarithmBase),e.pixelPerUnit=(this.reversed?1:-1)*i*e.lnLogarithmBase/Math.log(Math.abs(a))):e.pixelPerUnit=(this.reversed?1:-1)*i/Math.abs(a),e.reference=this.reversed?this.lineCoordinates.y1:this.lineCoordinates.y2),this.conversionParameters=e},z.prototype.calculateAxisParameters=function(){if(this.logarithmic)this.calculateLogarithmicAxisParameters();else{var t=this.chart.layoutManager.getFreeSpace(),e=!1,i=!1;"bottom"===this._position||"top"===this._position?(this.maxWidth=t.width,this.maxHeight=t.height):(this.maxWidth=t.height,this.maxHeight=t.width);t="axisX"===this.type?"xySwapped"===this.chart.plotInfo.axisPlacement?62:70:"xySwapped"===this.chart.plotInfo.axisPlacement?50:40;var a=4;"axisX"===this.type&&(a=600>this.maxWidth?8:6);var s,n,o;t=Math.max(a,Math.floor(this.maxWidth/t)),a=0;if(!x(this.options.viewportMinimum)&&!x(this.options.viewportMaximum)&&this.options.viewportMinimum>=this.options.viewportMaximum&&(this.viewportMinimum=this.viewportMaximum=null),!x(this.options.viewportMinimum)||x(this.sessionVariables.newViewportMinimum)||isNaN(this.sessionVariables.newViewportMinimum)?(null===this.viewportMinimum||isNaN(this.viewportMinimum))&&(this.viewportMinimum=this.minimum):this.viewportMinimum=this.sessionVariables.newViewportMinimum,!x(this.options.viewportMaximum)||x(this.sessionVariables.newViewportMaximum)||isNaN(this.sessionVariables.newViewportMaximum)?(null===this.viewportMaximum||isNaN(this.viewportMaximum))&&(this.viewportMaximum=this.maximum):this.viewportMaximum=this.sessionVariables.newViewportMaximum,this.scaleBreaks)for(a=0;a<this.scaleBreaks._appliedBreaks.length;a++)if((!x(this.sessionVariables.newViewportMinimum)&&this.sessionVariables.newViewportMinimum>=this.scaleBreaks._appliedBreaks[a].startValue||!x(this.options.minimum)&&this.options.minimum>=this.scaleBreaks._appliedBreaks[a].startValue||!x(this.options.viewportMinimum)&&this.viewportMinimum>=this.scaleBreaks._appliedBreaks[a].startValue)&&(!x(this.sessionVariables.newViewportMaximum)&&this.sessionVariables.newViewportMaximum<=this.scaleBreaks._appliedBreaks[a].endValue||!x(this.options.maximum)&&this.options.maximum<=this.scaleBreaks._appliedBreaks[a].endValue||!x(this.options.viewportMaximum)&&this.viewportMaximum<=this.scaleBreaks._appliedBreaks[a].endValue)){this.scaleBreaks._appliedBreaks.splice(a,1);break}if("axisX"===this.type){if(this.dataSeries&&0<this.dataSeries.length)for(s=0;s<this.dataSeries.length;s++)"dateTime"===this.dataSeries[s].xValueType&&(i=!0);s=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin,0==(n=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax)-s&&(n+=a=void 0===this.options.interval?.4:this.options.interval,s-=a),1/0!==this.dataInfo.minDiff?o=this.dataInfo.minDiff:1<n-s?o=.5*Math.abs(n-s):(o=1,i&&(e=!0))}else"axisY"===this.type&&(s=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin,n=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax,isFinite(s)||isFinite(n)?isFinite(s)?isFinite(n)||(n=s):s=n:(n=void 0===this.options.interval?-1/0:this.options.interval,s=void 0!==this.options.interval||isFinite(this.dataInfo.minDiff)?0:1/0),0===s&&0===n?(n+=9,s=0):0==n-s?(n+=a=Math.min(Math.abs(.01*Math.abs(n)),5),s-=a):s>n?(a=Math.min(.01*Math.abs(this.getApparentDifference(n,s,null,!0)),5),0<=n?s=n-a:n=isFinite(s)?s+a:0):(a=Math.min(.01*Math.abs(this.getApparentDifference(s,n,null,!0)),.05),0!==n&&(n+=a),0!==s&&(s-=a)),o=1/0!==this.dataInfo.minDiff?this.dataInfo.minDiff:1<n-s?.5*Math.abs(n-s):1,this.includeZero&&(null===this.viewportMinimum||isNaN(this.viewportMinimum))&&0<s&&(s=0),this.includeZero&&(null===this.viewportMaximum||isNaN(this.viewportMaximum))&&0>n&&(n=0));a=this.getApparentDifference(isNaN(this.viewportMinimum)||null===this.viewportMinimum?s:this.viewportMinimum,isNaN(this.viewportMaximum)||null===this.viewportMaximum?n:this.viewportMaximum,null,!0),"axisX"===this.type&&i?(this.intervalType||(a/1<=t?(this.interval=1,this.intervalType="millisecond"):a/2<=t?(this.interval=2,this.intervalType="millisecond"):a/5<=t?(this.interval=5,this.intervalType="millisecond"):a/10<=t?(this.interval=10,this.intervalType="millisecond"):a/20<=t?(this.interval=20,this.intervalType="millisecond"):a/50<=t?(this.interval=50,this.intervalType="millisecond"):a/100<=t?(this.interval=100,this.intervalType="millisecond"):a/200<=t?(this.interval=200,this.intervalType="millisecond"):a/250<=t?(this.interval=250,this.intervalType="millisecond"):a/300<=t?(this.interval=300,this.intervalType="millisecond"):a/400<=t?(this.interval=400,this.intervalType="millisecond"):a/500<=t?(this.interval=500,this.intervalType="millisecond"):a/(1*tt.secondDuration)<=t?(this.interval=1,this.intervalType="second"):a/(2*tt.secondDuration)<=t?(this.interval=2,this.intervalType="second"):a/(5*tt.secondDuration)<=t?(this.interval=5,this.intervalType="second"):a/(10*tt.secondDuration)<=t?(this.interval=10,this.intervalType="second"):a/(15*tt.secondDuration)<=t?(this.interval=15,this.intervalType="second"):a/(20*tt.secondDuration)<=t?(this.interval=20,this.intervalType="second"):a/(30*tt.secondDuration)<=t?(this.interval=30,this.intervalType="second"):a/(1*tt.minuteDuration)<=t?(this.interval=1,this.intervalType="minute"):a/(2*tt.minuteDuration)<=t?(this.interval=2,this.intervalType="minute"):a/(5*tt.minuteDuration)<=t?(this.interval=5,this.intervalType="minute"):a/(10*tt.minuteDuration)<=t?(this.interval=10,this.intervalType="minute"):a/(15*tt.minuteDuration)<=t?(this.interval=15,this.intervalType="minute"):a/(20*tt.minuteDuration)<=t?(this.interval=20,this.intervalType="minute"):a/(30*tt.minuteDuration)<=t?(this.interval=30,this.intervalType="minute"):a/(1*tt.hourDuration)<=t?(this.interval=1,this.intervalType="hour"):a/(2*tt.hourDuration)<=t?(this.interval=2,this.intervalType="hour"):a/(3*tt.hourDuration)<=t?(this.interval=3,this.intervalType="hour"):a/(6*tt.hourDuration)<=t?(this.interval=6,this.intervalType="hour"):a/(1*tt.dayDuration)<=t?(this.interval=1,this.intervalType="day"):a/(2*tt.dayDuration)<=t?(this.interval=2,this.intervalType="day"):a/(4*tt.dayDuration)<=t?(this.interval=4,this.intervalType="day"):a/(1*tt.weekDuration)<=t?(this.interval=1,this.intervalType="week"):a/(2*tt.weekDuration)<=t?(this.interval=2,this.intervalType="week"):a/(3*tt.weekDuration)<=t?(this.interval=3,this.intervalType="week"):a/(1*tt.monthDuration)<=t?(this.interval=1,this.intervalType="month"):a/(2*tt.monthDuration)<=t?(this.interval=2,this.intervalType="month"):a/(3*tt.monthDuration)<=t?(this.interval=3,this.intervalType="month"):a/(6*tt.monthDuration)<=t?(this.interval=6,this.intervalType="month"):(this.interval=a/(1*tt.yearDuration)<=t?1:a/(2*tt.yearDuration)<=t?2:a/(4*tt.yearDuration)<=t?4:Math.floor(z.getNiceNumber(a/(t-1),!0)/tt.yearDuration),this.intervalType="year")),(null===this.viewportMinimum||isNaN(this.viewportMinimum))&&(this.viewportMinimum=s-o/2),(null===this.viewportMaximum||isNaN(this.viewportMaximum))&&(this.viewportMaximum=n+o/2),e?this.autoValueFormatString="MMM DD YYYY HH:mm":"year"===this.intervalType?this.autoValueFormatString="YYYY":"month"===this.intervalType?this.autoValueFormatString="MMM YYYY":"week"===this.intervalType||"day"===this.intervalType?this.autoValueFormatString="MMM DD YYYY":"hour"===this.intervalType||"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)):(this.intervalType="number",a=z.getNiceNumber(a,!1),this.interval=this.options&&0<this.options.interval?this.options.interval:z.getNiceNumber(a/(t-1),!0),(null===this.viewportMinimum||isNaN(this.viewportMinimum))&&(this.viewportMinimum="axisX"===this.type?s-o/2:Math.floor(s/this.interval)*this.interval),(null===this.viewportMaximum||isNaN(this.viewportMaximum))&&(this.viewportMaximum="axisX"===this.type?n+o/2:Math.ceil(n/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&&void 0===this.options.interval&&(this.interval=z.getNiceNumber((this.viewportMaximum-this.viewportMinimum)/(t-1),!0)))),null!==this.minimum&&null!==this.maximum||("axisX"===this.type?(s=null!==this.minimum?this.minimum:this.dataInfo.min,0==(n=null!==this.maximum?this.maximum:this.dataInfo.max)-s&&(n+=a=void 0===this.options.interval?.4:this.options.interval,s-=a),o=1/0!==this.dataInfo.minDiff?this.dataInfo.minDiff:1<n-s?.5*Math.abs(n-s):1):"axisY"===this.type&&(s=null!==this.minimum?this.minimum:this.dataInfo.min,n=null!==this.maximum?this.maximum:this.dataInfo.max,isFinite(s)||isFinite(n)?0===s&&0===n?(n+=9,s=0):0==n-s?(n+=a=Math.min(Math.abs(.01*Math.abs(n)),5),s-=a):s>n?(a=Math.min(.01*Math.abs(this.getApparentDifference(n,s,null,!0)),5),0<=n?s=n-a:n=isFinite(s)?s+a:0):(a=Math.min(.01*Math.abs(this.getApparentDifference(s,n,null,!0)),.05),0!==n&&(n+=a),0!==s&&(s-=a)):(n=void 0===this.options.interval?-1/0:this.options.interval,s=void 0!==this.options.interval||isFinite(this.dataInfo.minDiff)?0:1/0),o=1/0!==this.dataInfo.minDiff?this.dataInfo.minDiff:1<n-s?.5*Math.abs(n-s):1,this.includeZero&&(null===this.minimum||isNaN(this.minimum))&&0<s&&(s=0),this.includeZero&&(null===this.maximum||isNaN(this.maximum))&&0>n&&(n=0)),Math.abs(this.getApparentDifference(s,n,null,!0)),"axisX"===this.type&&i?(this.valueType="dateTime",(null===this.minimum||isNaN(this.minimum))&&(this.minimum=s-o/2),(null===this.maximum||isNaN(this.maximum))&&(this.maximum=n+o/2)):(this.intervalType=this.valueType="number",null===this.minimum&&(this.minimum="axisX"===this.type?s-o/2:Math.floor(s/this.interval)*this.interval,this.minimum=Math.min(this.minimum,null===this.sessionVariables.viewportMinimum||isNaN(this.sessionVariables.viewportMinimum)?1/0:this.sessionVariables.viewportMinimum)),null===this.maximum&&(this.maximum="axisX"===this.type?n+o/2:Math.ceil(n/this.interval)*this.interval,this.maximum=Math.max(this.maximum,null===this.sessionVariables.viewportMaximum||isNaN(this.sessionVariables.viewportMaximum)?-1/0:this.sessionVariables.viewportMaximum)),0===this.maximum&&0===this.minimum&&(0===this.options.minimum?this.maximum+=10:0===this.options.maximum&&(this.minimum-=10)))),x(this.sessionVariables.newViewportMinimum)&&(this.viewportMinimum=Math.max(this.viewportMinimum,this.minimum)),x(this.sessionVariables.newViewportMaximum)&&(this.viewportMaximum=Math.min(this.viewportMaximum,this.maximum)),this.range=this.viewportMaximum-this.viewportMinimum,this.intervalStartPosition="axisX"===this.type&&i?this.getLabelStartPoint(new Date(this.viewportMinimum),this.intervalType,this.interval):Math.floor((this.viewportMinimum+.2*this.interval)/this.interval)*this.interval,this.valueFormatString||(this.valueFormatString=z.generateValueFormatString(this.range,2))}},z.prototype.calculateLogarithmicAxisParameters=function(){var t,e=this.chart.layoutManager.getFreeSpace(),i=Math.log(this.logarithmBase);"bottom"===this._position||"top"===this._position?(this.maxWidth=e.width,this.maxHeight=e.height):(this.maxWidth=e.height,this.maxHeight=e.width);var a,s,n,o;e="axisX"===this.type?500>this.maxWidth?7:Math.max(7,Math.floor(this.maxWidth/100)):Math.max(Math.floor(this.maxWidth/50),3);if(o=1,(null===this.viewportMinimum||isNaN(this.viewportMinimum))&&(this.viewportMinimum=this.minimum),(null===this.viewportMaximum||isNaN(this.viewportMaximum))&&(this.viewportMaximum=this.maximum),this.scaleBreaks)for(o=0;o<this.scaleBreaks._appliedBreaks.length;o++)if((!x(this.sessionVariables.newViewportMinimum)&&this.sessionVariables.newViewportMinimum>=this.scaleBreaks._appliedBreaks[o].startValue||!x(this.options.minimum)&&this.options.minimum>=this.scaleBreaks._appliedBreaks[o].startValue||!x(this.options.viewportMinimum)&&this.viewportMinimum>=this.scaleBreaks._appliedBreaks[o].startValue)&&(!x(this.sessionVariables.newViewportMaximum)&&this.sessionVariables.newViewportMaximum<=this.scaleBreaks._appliedBreaks[o].endValue||!x(this.options.maximum)&&this.options.maximum<=this.scaleBreaks._appliedBreaks[o].endValue||!x(this.options.viewportMaximum)&&this.viewportMaximum<=this.scaleBreaks._appliedBreaks[o].endValue)){this.scaleBreaks._appliedBreaks.splice(o,1);break}"axisX"===this.type?(a=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin,1==(s=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax)/a&&(s*=o=Math.pow(this.logarithmBase,void 0===this.options.interval?.4:this.options.interval),a/=o),n=1/0!==this.dataInfo.minDiff?this.dataInfo.minDiff:s/a>this.logarithmBase?s/a*Math.pow(this.logarithmBase,.5):this.logarithmBase):"axisY"===this.type&&(a=null!==this.viewportMinimum?this.viewportMinimum:this.dataInfo.viewPortMin,s=null!==this.viewportMaximum?this.viewportMaximum:this.dataInfo.viewPortMax,0>=a&&!isFinite(s)?(s=void 0===this.options.interval?0:this.options.interval,a=1):0>=a?a=s:isFinite(s)||(s=a),1===a&&1===s?(s*=this.logarithmBase-1/this.logarithmBase,a=1):1==s/a?(s*=o=Math.min(s*Math.pow(this.logarithmBase,.01),Math.pow(this.logarithmBase,5)),a/=o):a>s?(o=Math.min(a/s*Math.pow(this.logarithmBase,.01),Math.pow(this.logarithmBase,5)),1<=s?a=s/o:s=a*o):(o=Math.min(s/a*Math.pow(this.logarithmBase,.01),Math.pow(this.logarithmBase,.04)),1!==s&&(s*=o),1!==a&&(a/=o)),n=1/0!==this.dataInfo.minDiff?this.dataInfo.minDiff:s/a>this.logarithmBase?s/a*Math.pow(this.logarithmBase,.5):this.logarithmBase,this.includeZero&&(null===this.viewportMinimum||isNaN(this.viewportMinimum))&&1<a&&(a=1),this.includeZero&&(null===this.viewportMaximum||isNaN(this.viewportMaximum))&&1>s&&(s=1)),o=(isNaN(this.viewportMaximum)||null===this.viewportMaximum?s:this.viewportMaximum)/(isNaN(this.viewportMinimum)||null===this.viewportMinimum?a:this.viewportMinimum);var l=(isNaN(this.viewportMaximum)||null===this.viewportMaximum?s:this.viewportMaximum)-(isNaN(this.viewportMinimum)||null===this.viewportMinimum?a:this.viewportMinimum);if(this.intervalType="number",o=Math.pow(this.logarithmBase,z.getNiceNumber(Math.abs(Math.log(o)/i),!1)),this.options&&0<this.options.interval?this.interval=this.options.interval:(this.interval=z.getNiceExponent(Math.log(o)/i/(e-1),!0),t=z.getNiceNumber(l/(e-1),!0)),(null===this.viewportMinimum||isNaN(this.viewportMinimum))&&(this.viewportMinimum="axisX"===this.type?a/Math.sqrt(n):Math.pow(this.logarithmBase,this.interval*Math.floor(Math.log(a)/i/this.interval))),(null===this.viewportMaximum||isNaN(this.viewportMaximum))&&(this.viewportMaximum="axisX"===this.type?s*Math.sqrt(n):Math.pow(this.logarithmBase,this.interval*Math.ceil(Math.log(s)/i/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&&void 0===this.options.interval&&(this.interval=z.getNiceExponent(Math.ceil(Math.log(o)/i)/(e-1)),t=z.getNiceNumber((this.viewportMaximum-this.viewportMinimum)/(e-1),!0))),null!==this.minimum&&null!==this.maximum||("axisX"===this.type?(a=null!==this.minimum?this.minimum:this.dataInfo.min,1==(s=null!==this.maximum?this.maximum:this.dataInfo.max)/a&&(s*=o=Math.pow(this.logarithmBase,void 0===this.options.interval?.4:this.options.interval),a/=o),n=1/0!==this.dataInfo.minDiff?this.dataInfo.minDiff:s/a>this.logarithmBase?s/a*Math.pow(this.logarithmBase,.5):this.logarithmBase):"axisY"===this.type&&(a=null!==this.minimum?this.minimum:this.dataInfo.min,s=null!==this.maximum?this.maximum:this.dataInfo.max,isFinite(a)||isFinite(s)?1===a&&1===s?(s*=this.logarithmBase,a/=this.logarithmBase):1==s/a?(s*=o=Math.pow(this.logarithmBase,this.interval),a/=o):a>s?(o=Math.min(a/s*.01,5),1<=s?a=s/o:s=a*o):(o=Math.min(s/a*Math.pow(this.logarithmBase,.01),Math.pow(this.logarithmBase,.04)),1!==s&&(s*=o),1!==a&&(a/=o)):(s=void 0===this.options.interval?0:this.options.interval,a=1),n=1/0!==this.dataInfo.minDiff?this.dataInfo.minDiff:s/a>this.logarithmBase?s/a*Math.pow(this.logarithmBase,.5):this.logarithmBase,this.includeZero&&(null===this.minimum||isNaN(this.minimum))&&1<a&&(a=1),this.includeZero&&(null===this.maximum||isNaN(this.maximum))&&1>s&&(s=1)),this.intervalType="number",null===this.minimum&&(this.minimum="axisX"===this.type?a/Math.sqrt(n):Math.pow(this.logarithmBase,this.interval*Math.floor(Math.log(a)/i/this.interval)),this.minimum=Math.min(this.minimum,null===this.sessionVariables.viewportMinimum||isNaN(this.sessionVariables.viewportMinimum)?void 0===this.sessionVariables.newViewportMinimum?1/0:this.sessionVariables.newViewportMinimum:this.sessionVariables.viewportMinimum)),null===this.maximum&&(this.maximum="axisX"===this.type?s*Math.sqrt(n):Math.pow(this.logarithmBase,this.interval*Math.ceil(Math.log(s)/i/this.interval)),this.maximum=Math.max(this.maximum,null===this.sessionVariables.viewportMaximum||isNaN(this.sessionVariables.viewportMaximum)?void 0===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),a=Math.pow(this.logarithmBase,Math.floor(Math.log(this.viewportMinimum)/(i*this.interval)+.2)*this.interval),this.range=this.viewportMaximum/this.viewportMinimum,this.noTicks=e,!this.options.interval&&this.range<Math.pow(this.logarithmBase,8>this.viewportMaximum||3>e?2:3)){for(i=Math.floor(this.viewportMinimum/t+.5)*t;i<this.viewportMinimum;)i+=t;this.equidistantInterval=!1,this.intervalStartPosition=i,this.interval=t}else this.options.interval||(t=Math.ceil(this.interval),this.range>this.interval&&(this.interval=t,a=Math.pow(this.logarithmBase,Math.floor(Math.log(this.viewportMinimum)/(i*this.interval)+.2)*this.interval))),this.equidistantInterval=!0,this.intervalStartPosition=a;if(!this.valueFormatString&&(this.valueFormatString="#,##0.##",1>this.viewportMinimum)&&(i=Math.floor(Math.abs(Math.log(this.viewportMinimum)/Math.LN10))+2,!isNaN(i)&&isFinite(i)||(i=2),2<i))for(o=0;o<i-2;o++)this.valueFormatString+="#"},z.generateValueFormatString=function(t,e){var i="#,##0.",a=e;1>t&&(a+=Math.floor(Math.abs(Math.log(t)/Math.LN10)),isNaN(a)||!isFinite(a))&&(a=e);for(var s=0;s<a;s++)i+="#";return i},z.getNiceExponent=function(t,e){var i=Math.floor(Math.log(t)/Math.LN10),a=t/Math.pow(10,i);a=0>i?1>=a?1:5>=a?5:10:Math.max(Math.floor(a),1);return Number(-20>i?a*Math.pow(10,i):(a*Math.pow(10,i)).toFixed(20))},z.getNiceNumber=function(t,e){var i=Math.floor(Math.log(t)/Math.LN10),a=t/Math.pow(10,i);a=e?1.5>a?1:3>a?2:7>a?5:10:1>=a?1:2>=a?2:5>=a?5:10;return Number(-20>i?a*Math.pow(10,i):(a*Math.pow(10,i)).toFixed(20))},z.prototype.getLabelStartPoint=function(){var t=tt[this.intervalType+"Duration"]*this.interval;t=new Date(Math.floor(this.viewportMinimum/t)*t);return"millisecond"!==this.intervalType&&("second"===this.intervalType?0<t.getMilliseconds()&&(t.setSeconds(t.getSeconds()+1),t.setMilliseconds(0)):"minute"===this.intervalType?(0<t.getSeconds()||0<t.getMilliseconds())&&(t.setMinutes(t.getMinutes()+1),t.setSeconds(0),t.setMilliseconds(0)):"hour"===this.intervalType?(0<t.getMinutes()||0<t.getSeconds()||0<t.getMilliseconds())&&(t.setHours(t.getHours()+1),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0)):"day"===this.intervalType?(0<t.getHours()||0<t.getMinutes()||0<t.getSeconds()||0<t.getMilliseconds())&&(t.setDate(t.getDate()+1),t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0)):"week"===this.intervalType?(0<t.getDay()||0<t.getHours()||0<t.getMinutes()||0<t.getSeconds()||0<t.getMilliseconds())&&(t.setDate(t.getDate()+(7-t.getDay())),t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0)):"month"===this.intervalType?(1<t.getDate()||0<t.getHours()||0<t.getMinutes()||0<t.getSeconds()||0<t.getMilliseconds())&&(t.setMonth(t.getMonth()+1),t.setDate(1),t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0)):"year"===this.intervalType&&(0<t.getMonth()||1<t.getDate()||0<t.getHours()||0<t.getMinutes()||0<t.getSeconds()||0<t.getMilliseconds())&&(t.setFullYear(t.getFullYear()+1),t.setMonth(0),t.setDate(1),t.setHours(0),t.setMinutes(0),t.setSeconds(0),t.setMilliseconds(0))),t},i(X,A),i(Y,A),Y.prototype.createUserOptions=function(t){if(void 0!==t||this.options._isPlaceholder){var e=0;this.parent.options._isPlaceholder&&this.parent.createUserOptions(),this.options._isPlaceholder||(u(this.parent[this.optionsName]),e=this.parent.options[this.optionsName].indexOf(this.options)),this.options=void 0===t?{}:t,this.parent.options[this.optionsName][e]=this.options}},Y.prototype.render=function(t){if(0!==this.spacing||0!==this.options.lineThickness&&(void 0!==this.options.lineThickness||0!==this.parent.lineThickness)){var e=this.ctx,i=this.ctx.globalAlpha;this.ctx=t||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 a,s,n,o,l,r,h=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,c(this.id),t=Math.max(this.spacing,3);var p=Math.max(0,this.lineThickness);if(this.ctx.lineWidth=p,this.ctx.setLineDash&&this.ctx.setLineDash(b(this.lineDashType,p)),"bottom"===this.scaleBreaks.parent._position||"top"===this.scaleBreaks.parent._position){if(h=1==p%2?.5+(h.x<<0):h.x<<0,s=1==p%2?.5+(d.x<<0):d.x<<0,"top"===this.scaleBreaks.parent._position?(d=this.chart.plotArea.y1,n=this.chart.plotArea.y2+p/2+.5<<0):(d=this.chart.plotArea.y2,n=this.chart.plotArea.y1-p/2+.5<<0,t*=-1),this.bounds={x1:h-p/2,y1:d,x2:s+p/2,y2:n},this.ctx.moveTo(h,d),"straight"===this.type||"top"===this.scaleBreaks.parent._position&&0>=t||"bottom"===this.scaleBreaks.parent._position&&0<=t)this.ctx.lineTo(h,n),this.ctx.lineTo(s,n),this.ctx.lineTo(s,d);else if("wavy"===this.type){o=h,a=.5,r=(n-(l=d))/t/3;for(var x=0;x<r;x++)this.ctx.bezierCurveTo(o+a*t,l+t,o+a*t,l+2*t,o,l+3*t),l+=3*t,a*=-1;for(this.ctx.bezierCurveTo(o+a*t,l+t,o+a*t,l+2*t,o,l+3*t),o=s,a*=-1,this.ctx.lineTo(o,l),x=0;x<r;x++)this.ctx.bezierCurveTo(o+a*t,l-t,o+a*t,l-2*t,o,l-3*t),l-=3*t,a*=-1}else if("zigzag"===this.type){for(a=-1,o=h+t,r=(n-(l=d+t))/t/2,x=0;x<r;x++)this.ctx.lineTo(o,l),o+=2*a*t,l+=2*t,a*=-1;for(this.ctx.lineTo(o,l),o+=s-h,x=0;x<r+1;x++)this.ctx.lineTo(o,l),o+=2*a*t,l-=2*t,a*=-1;this.ctx.lineTo(o+a*t,l+t)}}else if("left"===this.scaleBreaks.parent._position||"right"===this.scaleBreaks.parent._position)if(d=1==p%2?.5+(d.y<<0):d.y<<0,n=1==p%2?.5+(h.y<<0):h.y<<0,"left"===this.scaleBreaks.parent._position?(h=this.chart.plotArea.x1,s=this.chart.plotArea.x2+p/2+.5<<0):(h=this.chart.plotArea.x2,s=this.chart.plotArea.x1-p/2+.5<<0,t*=-1),this.bounds={x1:h,y1:d-p/2,x2:s,y2:n+p/2},this.ctx.moveTo(h,d),"straight"===this.type||"left"===this.scaleBreaks.parent._position&&0>=t||"right"===this.scaleBreaks.parent._position&&0<=t)this.ctx.lineTo(s,d),this.ctx.lineTo(s,n),this.ctx.lineTo(h,n);else if("wavy"===this.type){for(l=d,a=.5,r=(s-(o=h))/t/3,x=0;x<r;x++)this.ctx.bezierCurveTo(o+t,l+a*t,o+2*t,l+a*t,o+3*t,l),o+=3*t,a*=-1;for(this.ctx.bezierCurveTo(o+t,l+a*t,o+2*t,l+a*t,o+3*t,l),l=n,a*=-1,this.ctx.lineTo(o,l),x=0;x<r;x++)this.ctx.bezierCurveTo(o-t,l+a*t,o-2*t,l+a*t,o-3*t,l),o-=3*t,a*=-1}else if("zigzag"===this.type){for(a=1,l=d-t,r=(s-(o=h+t))/t/2,x=0;x<r;x++)this.ctx.lineTo(o,l),l+=2*a*t,o+=2*t,a*=-1;for(this.ctx.lineTo(o,l),l+=n-d,x=0;x<r+1;x++)this.ctx.lineTo(o,l),l+=2*a*t,o-=2*t,a*=-1;this.ctx.lineTo(o+t,l+a*t)}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=i,this.ctx=e}},i(E,A),E.prototype.createUserOptions=function(t){if(void 0!==t||this.options._isPlaceholder){var e=0;this.parent.options._isPlaceholder&&this.parent.createUserOptions(),this.options._isPlaceholder||(u(this.parent.stripLines),e=this.parent.options.stripLines.indexOf(this.options)),this.options=void 0===t?{}:t,this.parent.options.stripLines[e]=this.options}},E.prototype.render=function(){this.ctx.save();var t=this.parent.getPixelCoordinatesOnAxis(this.value),e=Math.abs("pixel"===this._thicknessType?this.thickness:this.parent.conversionParameters.pixelPerUnit*this.thickness);if(0<e){var i=null===this.opacity?1:this.opacity;this.ctx.strokeStyle=this.color,this.ctx.beginPath();var a,s,n,o,l=this.ctx.globalAlpha;this.ctx.globalAlpha=i,c(this.id),this.ctx.lineWidth=e,this.ctx.setLineDash&&this.ctx.setLineDash(b(this.lineDashType,e)),"bottom"===this.parent._position||"top"===this.parent._position?(a=s=1==this.ctx.lineWidth%2?.5+(t.x<<0):t.x<<0,n=this.chart.plotArea.y1,o=this.chart.plotArea.y2,this.bounds={x1:a-e/2,y1:n,x2:s+e/2,y2:o}):"left"!==this.parent._position&&"right"!==this.parent._position||(n=o=1==this.ctx.lineWidth%2?.5+(t.y<<0):t.y<<0,a=this.chart.plotArea.x1,s=this.chart.plotArea.x2,this.bounds={x1:a,y1:n-e/2,x2:s,y2:o+e/2}),this.ctx.moveTo(a,n),this.ctx.lineTo(s,o),this.ctx.stroke(),this.ctx.globalAlpha=l}this.ctx.restore()},i(H,A),H.prototype.render=function(t,e){var i,a,s,n,o=null,l=o=null,r="";if(!this.valueFormatString)if("dateTime"===this.parent.valueType)this.valueFormatString=this.parent.valueFormatString;else{var h=0;h="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,h)}l=null===this.opacity?1:this.opacity,h=Math.abs("pixel"===this._thicknessType?this.thickness:this.parent.conversionParameters.pixelPerUnit*this.thickness);var d=this.chart.overlaidCanvasCtx,c=d.globalAlpha;if(d.globalAlpha=l,d.beginPath(),d.strokeStyle=this.color,d.lineWidth=h,d.save(),this.labelFontSize=x(this.options.labelFontSize)?this.parent.labelFontSize:this.labelFontSize,"left"===this.parent._position||"right"===this.parent._position?(this.labelMaxWidth=x(this.options.labelMaxWidth)?this.parent.bounds.x2-this.parent.bounds.x1:this.labelMaxWidth,this.labelMaxHeight=x(this.options.labelWrap)||this.labelWrap?3*this.chart.height:2*this.labelFontSize):"top"!==this.parent._position&&"bottom"!==this.parent._position||(this.labelMaxWidth=x(this.options.labelMaxWidth)?3*this.chart.width:this.labelMaxWidth,this.labelMaxHeight=x(this.options.labelWrap)||this.labelWrap?this.parent.bounds.height:2*this.labelFontSize),0<h&&d.setLineDash&&d.setLineDash(b(this.lineDashType,h)),l=new B(d,{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:r,horizontalAlign:"left",fontSize:this.labelFontSize,fontFamily:this.labelFontFamily,fontWeight:this.labelFontWeight,fontColor:this.labelFontColor,fontStyle:this.labelFontStyle,textBaseline:"middle"}),this.snapToDataPoint){var p=0;o=[];if("xySwapped"===this.chart.plotInfo.axisPlacement){var u=null;"bottom"===this.parent._position||"top"===this.parent._position?p=this.parent.dataSeries[0].axisX.convertPixelToValue({y:e}):"left"!==this.parent._position&&"right"!==this.parent._position||(p=this.parent.convertPixelToValue({y:e}));for(var m=0;m<this.parent.dataSeries.length;m++)(u=this.parent.dataSeries[m].getDataPointAtX(p,!0))&&0<=u.index&&(u.dataSeries=this.parent.dataSeries[m],null!==u.dataPoint.y&&o.push(u));if(u=null,0===o.length)return;if(o.sort((function(t,e){return t.distance-e.distance})),u=Math.abs(t-this.parent.convertValueToPixel(o[0].dataPoint.y)),m=0,"rangeBar"===o[0].dataSeries.type||"error"===o[0].dataSeries.type){u=Math.abs(t-this.parent.convertValueToPixel(o[m].dataPoint.y[0]));var g=0;for(p=0;p<o.length;p++)if(o[p].dataPoint.y&&o[p].dataPoint.y.length)for(r=0;r<o[p].dataPoint.y.length;r++)(g=Math.abs(t-this.parent.convertValueToPixel(o[p].dataPoint.y[r])))<u&&(u=g,m=p);else(g=Math.abs(t-this.parent.convertValueToPixel(o[p].dataPoint.y)))<u&&(u=g,m=p)}else if("stackedBar"===o[0].dataSeries.type){u=Math.abs(t-this.parent.convertValueToPixel(o[0].dataPoint.y));var y=g=0;for(p=m=0;p<o.length;p++)if(o[p].dataPoint.y&&o[p].dataPoint.y.length)for(r=0;r<o[p].dataPoint.y.length;r++)(g=Math.abs(t-this.parent.convertValueToPixel(o[p].dataPoint.y[r])))<u&&(u=g,m=p);else y+=o[p].dataPoint.y,(g=Math.abs(t-this.parent.convertValueToPixel(y)))<u&&(u=g,m=p)}else if("stackedBar100"===o[0].dataSeries.type){u=Math.abs(t-this.parent.convertValueToPixel(o[0].dataPoint.y));var v=y=g=0;for(p=0;p<o.length;p++)if(o[p].dataPoint.y&&o[p].dataPoint.y.length)for(r=0;r<o[p].dataPoint.y.length;r++)(g=Math.abs(t-this.parent.convertValueToPixel(o[p].dataPoint.y[r])))<u&&(u=g,m=p);else y+=o[p].dataPoint.y,v=o[p].dataPoint.x.getTime?o[p].dataPoint.x.getTime():o[p].dataPoint.x,v=y/o[p].dataSeries.plotUnit.dataPointYSums[v]*100,(g=Math.abs(t-this.parent.convertValueToPixel(v)))<u&&(u=g,m=p)}else for(u=Math.abs(t-this.parent.convertValueToPixel(o[0].dataPoint.y)),p=m=g=0;p<o.length;p++)if(o[p].dataPoint.y&&o[p].dataPoint.y.length)for(r=0;r<o[p].dataPoint.y.length;r++)(g=Math.abs(t-this.parent.convertValueToPixel(o[p].dataPoint.y[r])))<u&&(u=g,m=p);else(g=Math.abs(t-this.parent.convertValueToPixel(o[p].dataPoint.y)))<u&&(u=g,m=p);if(r=o[m],"bottom"===this.parent._position||"top"===this.parent._position){if(i=0,"rangeBar"===this.parent.dataSeries[m].type||"error"===this.parent.dataSeries[m].type){for(u=Math.abs(t-this.parent.convertValueToPixel(r.dataPoint.y[0])),p=g=0;p<r.dataPoint.y.length;p++)(g=Math.abs(t-this.parent.convertValueToPixel(r.dataPoint.y[p])))<u&&(u=g,i=p);o=1==d.lineWidth%2?.5+(this.parent.convertValueToPixel(r.dataPoint.y[i])<<0):this.parent.convertValueToPixel(r.dataPoint.y[i])<<0,l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:r.dataPoint.y[i]}):x(this.options.label)?ot(r.dataPoint.y[i],this.valueFormatString,this.chart._cultureInfo):this.label}else if("stackedBar"===this.parent.dataSeries[m].type){for(u=Math.abs(t-this.parent.convertValueToPixel(o[0].dataPoint.y)),y=g=0,p=m;0<=p;p--)y+=o[p].dataPoint.y,(g=Math.abs(t-this.parent.convertValueToPixel(y)))<u&&(u=g,i=p);o=1==d.lineWidth%2?.5+(this.parent.convertValueToPixel(y)<<0):this.parent.convertValueToPixel(y)<<0,l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:r.dataPoint.y}):x(this.options.label)?ot(r.dataPoint.y,this.valueFormatString,this.chart._cultureInfo):this.label}else if("stackedBar100"===this.parent.dataSeries[m].type){for(u=Math.abs(t-this.parent.convertValueToPixel(o[0].dataPoint.y)),v=y=g=0,p=m;0<=p;p--)y+=o[p].dataPoint.y,v=o[p].dataPoint.x.getTime?o[p].dataPoint.x.getTime():o[p].dataPoint.x,v=y/o[p].dataSeries.plotUnit.dataPointYSums[v]*100,(g=Math.abs(t-this.parent.convertValueToPixel(v)))<u&&(u=g,i=p);o=1==d.lineWidth%2?.5+(this.parent.convertValueToPixel(v)<<0):this.parent.convertValueToPixel(v)<<0,l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:v}):x(this.options.label)?ot(v,this.valueFormatString,this.chart._cultureInfo):this.label}else o=1==d.lineWidth%2?.5+(this.parent.convertValueToPixel(r.dataPoint.y)<<0):this.parent.convertValueToPixel(r.dataPoint.y)<<0,l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:r.dataPoint.y}):x(this.options.label)?ot(r.dataPoint.y,this.valueFormatString,this.chart._cultureInfo):this.label;i=a=o,s=this.chart.plotArea.y1,n=this.chart.plotArea.y2,this.bounds={x1:i-h/2,y1:s,x2:a+h/2,y2:n},l.x=i-l.measureText().width/2,l.x+l.width>this.chart.bounds.x2?l.x=this.chart.bounds.x2-l.width:l.x<this.chart.bounds.x1&&(l.x=this.chart.bounds.x1),l.y=this.parent.lineCoordinates.y2+l.fontSize/2+2}else if("left"===this.parent._position||"right"===this.parent._position){if(s=n=o=1==d.lineWidth%2?.5+(this.parent.convertValueToPixel(r.dataPoint.x)<<0):this.parent.convertValueToPixel(r.dataPoint.x)<<0,i=this.chart.plotArea.x1,a=this.chart.plotArea.x2,this.bounds={x1:i,y1:s-h/2,x2:a,y2:n+h/2},v=!1,this.parent.labels)for(o=Math.ceil(this.parent.interval),p=0;p<this.parent.viewportMaximum;p+=o){if(!this.parent.labels[p]){v=!1;break}v=!0}if(v){if("axisX"===this.parent.type)for(p=this.parent.convertPixelToValue({y:e}),u=null,m=0;m<this.parent.dataSeries.length;m++)(u=this.parent.dataSeries[m].getDataPointAtX(p,!0))&&0<=u.index&&(l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:r.dataPoint.x}):x(this.options.label)?u.dataPoint.label:this.label)}else"dateTime"===this.parent.valueType?l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:r.dataPoint.x}):x(this.options.label)?nt(r.dataPoint.x,this.valueFormatString,this.chart._cultureInfo):this.label:"number"===this.parent.valueType&&(l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:r.dataPoint.x}):x(this.options.label)?ot(r.dataPoint.x,this.valueFormatString,this.chart._cultureInfo):this.label);l.y=n+l.fontSize/2-l.measureText().height/2+2,l.y-l.fontSize/2<this.chart.bounds.y1?l.y=this.chart.bounds.y1+l.fontSize/2+2:l.y+l.measureText().height-l.fontSize/2>this.chart.bounds.y2&&(l.y=this.chart.bounds.y2-l.measureText().height+l.fontSize/2),"left"===this.parent._position?l.x=this.parent.lineCoordinates.x2-l.measureText().width:"right"===this.parent._position&&(l.x=this.parent.lineCoordinates.x2)}}else if("bottom"===this.parent._position||"top"===this.parent._position){for(p=this.parent.convertPixelToValue({x:t}),m=0;m<this.parent.dataSeries.length;m++)(u=this.parent.dataSeries[m].getDataPointAtX(p,!0))&&0<=u.index&&(u.dataSeries=this.parent.dataSeries[m],null!==u.dataPoint.y&&o.push(u));if(0===o.length)return;if(o.sort((function(t,e){return t.distance-e.distance})),r=o[0],i=a=o=1==d.lineWidth%2?.5+(this.parent.convertValueToPixel(r.dataPoint.x)<<0):this.parent.convertValueToPixel(r.dataPoint.x)<<0,s=this.chart.plotArea.y1,n=this.chart.plotArea.y2,this.bounds={x1:i-h/2,y1:s,x2:a+h/2,y2:n},v=!1,this.parent.labels)for(o=Math.ceil(this.parent.interval),p=0;p<this.parent.viewportMaximum;p+=o){if(!this.parent.labels[p]){v=!1;break}v=!0}if(v){if("axisX"===this.parent.type)for(p=this.parent.convertPixelToValue({x:t}),u=null,m=0;m<this.parent.dataSeries.length;m++)(u=this.parent.dataSeries[m].getDataPointAtX(p,!0))&&0<=u.index&&(l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:r.dataPoint.x}):x(this.options.label)?u.dataPoint.label:this.label)}else"dateTime"===this.parent.valueType?l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:r.dataPoint.x}):x(this.options.label)?nt(r.dataPoint.x,this.valueFormatString,this.chart._cultureInfo):this.label:"number"===this.parent.valueType&&(l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:r.dataPoint.x}):x(this.options.label)?ot(r.dataPoint.x,this.valueFormatString,this.chart._cultureInfo):this.label);l.x=i-l.measureText().width/2,l.x+l.width>this.chart.bounds.x2&&(l.x=this.chart.bounds.x2-l.width),l.x<this.chart.bounds.x1&&(l.x=this.chart.bounds.x1),"bottom"===this.parent._position?l.y=this.parent.lineCoordinates.y2+l.fontSize/2+2:"top"===this.parent._position&&(l.y=this.parent.lineCoordinates.y1-l.height+l.fontSize/2+2)}else if("left"===this.parent._position||"right"===this.parent._position){for(!x(this.parent.dataSeries)&&0<this.parent.dataSeries.length&&(p=this.parent.dataSeries[0].axisX.convertPixelToValue({x:t})),m=0;m<this.parent.dataSeries.length;m++)(u=this.parent.dataSeries[m].getDataPointAtX(p,!0))&&0<=u.index&&(u.dataSeries=this.parent.dataSeries[m],null!==u.dataPoint.y&&o.push(u));if(0===o.length)return;if(o.sort((function(t,e){return t.distance-e.distance})),m=0,"rangeColumn"===o[0].dataSeries.type||"rangeArea"===o[0].dataSeries.type||"error"===o[0].dataSeries.type||"rangeSplineArea"===o[0].dataSeries.type||"candlestick"===o[0].dataSeries.type||"ohlc"===o[0].dataSeries.type||"boxAndWhisker"===o[0].dataSeries.type)for(u=Math.abs(e-this.parent.convertValueToPixel(o[0].dataPoint.y[0])),p=g=0;p<o.length;p++)if(o[p].dataPoint.y&&o[p].dataPoint.y.length)for(r=0;r<o[p].dataPoint.y.length;r++)(g=Math.abs(e-this.parent.convertValueToPixel(o[p].dataPoint.y[r])))<u&&(u=g,m=p);else(g=Math.abs(e-this.parent.convertValueToPixel(o[p].dataPoint.y)))<u&&(u=g,m=p);else if("stackedColumn"===o[0].dataSeries.type||"stackedArea"===o[0].dataSeries.type)for(u=Math.abs(e-this.parent.convertValueToPixel(o[0].dataPoint.y)),p=y=g=0;p<o.length;p++)if(o[p].dataPoint.y&&o[p].dataPoint.y.length)for(r=0;r<o[p].dataPoint.y.length;r++)(g=Math.abs(e-this.parent.convertValueToPixel(o[p].dataPoint.y[r])))<u&&(u=g,m=p);else y+=o[p].dataPoint.y,(g=Math.abs(e-this.parent.convertValueToPixel(y)))<u&&(u=g,m=p);else if("stackedColumn100"===o[0].dataSeries.type||"stackedArea100"===o[0].dataSeries.type)for(u=Math.abs(e-this.parent.convertValueToPixel(o[0].dataPoint.y)),p=v=y=g=0;p<o.length;p++)if(o[p].dataPoint.y&&o[p].dataPoint.y.length)for(r=0;r<o[p].dataPoint.y.length;r++)(g=Math.abs(e-this.parent.convertValueToPixel(o[p].dataPoint.y[r])))<u&&(u=g,m=p);else y+=o[p].dataPoint.y,v=o[p].dataPoint.x.getTime?o[p].dataPoint.x.getTime():o[p].dataPoint.x,v=y/o[p].dataSeries.plotUnit.dataPointYSums[v]*100,(g=Math.abs(e-this.parent.convertValueToPixel(v)))<u&&(u=g,m=p);else for(u=Math.abs(e-this.parent.convertValueToPixel(o[0].dataPoint.y)),p=g=0;p<o.length;p++)if(o[p].dataPoint.y&&o[p].dataPoint.y.length)for(r=0;r<o[p].dataPoint.y.length;r++)(g=Math.abs(e-this.parent.convertValueToPixel(o[p].dataPoint.y[r])))<u&&(u=g,m=p);else(g=Math.abs(e-this.parent.convertValueToPixel(o[p].dataPoint.y)))<u&&(u=g,m=p);if(r=o[m],i=0,"rangeColumn"===this.parent.dataSeries[m].type||"rangeArea"===this.parent.dataSeries[m].type||"error"===this.parent.dataSeries[m].type||"rangeSplineArea"===this.parent.dataSeries[m].type||"candlestick"===this.parent.dataSeries[m].type||"ohlc"===this.parent.dataSeries[m].type||"boxAndWhisker"===this.parent.dataSeries[m].type){for(u=Math.abs(e-this.parent.convertValueToPixel(r.dataPoint.y[0])),p=g=0;p<r.dataPoint.y.length;p++)(g=Math.abs(e-this.parent.convertValueToPixel(r.dataPoint.y[p])))<u&&(u=g,i=p);o=1==d.lineWidth%2?.5+(this.parent.convertValueToPixel(r.dataPoint.y[i])<<0):this.parent.convertValueToPixel(r.dataPoint.y[i])<<0,l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:r.dataPoint.y[i]}):x(this.options.label)?ot(r.dataPoint.y[i],this.valueFormatString,this.chart._cultureInfo):this.label}else if("stackedColumn"===this.parent.dataSeries[m].type||"stackedArea"===this.parent.dataSeries[m].type){for(u=Math.abs(e-this.parent.convertValueToPixel(o[0].dataPoint.y)),y=g=0,p=m;0<=p;p--)y+=o[p].dataPoint.y,(g=Math.abs(e-this.parent.convertValueToPixel(y)))<u&&(u=g,i=p);o=1==d.lineWidth%2?.5+(this.parent.convertValueToPixel(y)<<0):this.parent.convertValueToPixel(y)<<0,l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:r.dataPoint.y}):x(this.options.label)?ot(r.dataPoint.y,this.valueFormatString,this.chart._cultureInfo):this.label}else if("stackedColumn100"===this.parent.dataSeries[m].type||"stackedArea100"===this.parent.dataSeries[m].type){for(u=Math.abs(e-this.parent.convertValueToPixel(o[0].dataPoint.y)),y=g=0,p=m;0<=p;p--)y+=o[p].dataPoint.y,v=o[p].dataPoint.x.getTime?o[p].dataPoint.x.getTime():o[p].dataPoint.x,v=y/o[p].dataSeries.plotUnit.dataPointYSums[v]*100,(g=Math.abs(e-this.parent.convertValueToPixel(v)))<u&&(u=g,i=p);o=1==d.lineWidth%2?.5+(this.parent.convertValueToPixel(v)<<0):this.parent.convertValueToPixel(v)<<0,l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:v}):x(this.options.label)?ot(v,this.valueFormatString,this.chart._cultureInfo):this.label}else"waterfall"===this.parent.dataSeries[m].type?(o=1==d.lineWidth%2?.5+(this.parent.convertValueToPixel(r.dataSeries.dataPointEOs[r.index].cumulativeSum)<<0):this.parent.convertValueToPixel(r.dataSeries.dataPointEOs[r.index].cumulativeSum)<<0,l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:r.dataSeries.dataPointEOs[r.index].cumulativeSum}):x(this.options.label)?ot(r.dataSeries.dataPointEOs[r.index].cumulativeSum,this.valueFormatString,this.chart._cultureInfo):this.label):(o=1==d.lineWidth%2?.5+(this.parent.convertValueToPixel(r.dataPoint.y)<<0):this.parent.convertValueToPixel(r.dataPoint.y)<<0,l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:r.dataPoint.y}):x(this.options.label)?ot(r.dataPoint.y,this.valueFormatString,this.chart._cultureInfo):this.label);s=n=o,i=this.chart.plotArea.x1,a=this.chart.plotArea.x2,this.bounds={x1:i,y1:s-h/2,x2:a,y2:n+h/2},l.y=n+l.fontSize/2-l.measureText().height/2+2,l.y-l.fontSize/2<this.chart.bounds.y1?l.y=this.chart.bounds.y1+l.fontSize/2+2:l.y+l.measureText().height-l.fontSize/2>this.chart.bounds.y2&&(l.y=this.chart.bounds.y2-l.measureText().height+l.fontSize/2),"left"===this.parent._position?l.x=this.parent.lineCoordinates.x2-l.measureText().width:"right"===this.parent._position&&(l.x=this.parent.lineCoordinates.x2)}o=null,("bottom"===this.parent._position||"top"===this.parent._position)&&i>=this.parent.convertValueToPixel(this.parent.viewportMinimum)&&a<=this.parent.convertValueToPixel(this.parent.viewportMaximum)&&(0<h&&(d.moveTo(i,s),d.lineTo(a,n),d.stroke()),d.restore(),!x(l.text)&&("number"==typeof l.text.valueOf()||0<l.text.length)&&l.render(!0)),("left"===this.parent._position||"right"===this.parent._position)&&n>=this.parent.convertValueToPixel(this.parent.viewportMaximum)&&s<=this.parent.convertValueToPixel(this.parent.viewportMinimum)&&(0<h&&(d.moveTo(i,s),d.lineTo(a,n),d.stroke()),d.restore(),!x(l.text)&&("number"==typeof l.text.valueOf()||0<l.text.length)&&l.render(!0))}else{if("bottom"===this.parent._position||"top"===this.parent._position?(i=a=o=1==d.lineWidth%2?.5+(t<<0):t<<0,s=this.chart.plotArea.y1,n=this.chart.plotArea.y2,this.bounds={x1:i-h/2,y1:s,x2:a+h/2,y2:n}):"left"!==this.parent._position&&"right"!==this.parent._position||(s=n=o=1==d.lineWidth%2?.5+(e<<0):e<<0,i=this.chart.plotArea.x1,a=this.chart.plotArea.x2,this.bounds={x1:i,y1:s-h/2,x2:a,y2:n+h/2}),"xySwapped"===this.chart.plotInfo.axisPlacement)if("left"===this.parent._position||"right"===this.parent._position){if(v=!1,this.parent.labels)for(o=Math.ceil(this.parent.interval),p=0;p<this.parent.viewportMaximum;p+=o){if(!this.parent.labels[p]){v=!1;break}v=!0}if(v){if("axisX"===this.parent.type)for(p=this.parent.convertPixelToValue({y:e}),u=null,m=0;m<this.parent.dataSeries.length;m++)(u=this.parent.dataSeries[m].getDataPointAtX(p,!0))&&0<=u.index&&(l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:this.parent.convertPixelToValue(t)}):x(this.options.label)?u.dataPoint.label:this.label)}else"dateTime"===this.parent.valueType?l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:this.parent.convertPixelToValue(e)}):x(this.options.label)?nt(this.parent.convertPixelToValue(e),this.valueFormatString,this.chart._cultureInfo):this.label:"number"===this.parent.valueType&&(l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:this.parent.convertPixelToValue(e)}):x(this.options.label)?ot(this.parent.convertPixelToValue(e),this.valueFormatString,this.chart._cultureInfo):this.label);l.y=e+l.fontSize/2-l.measureText().height/2+2,l.y-l.fontSize/2<this.chart.bounds.y1?l.y=this.chart.bounds.y1+l.fontSize/2+2:l.y+l.measureText().height-l.fontSize/2>this.chart.bounds.y2&&(l.y=this.chart.bounds.y2-l.measureText().height+l.fontSize/2),"left"===this.parent._position?l.x=this.parent.lineCoordinates.x1-l.measureText().width:"right"===this.parent._position&&(l.x=this.parent.lineCoordinates.x2)}else"bottom"!==this.parent._position&&"top"!==this.parent._position||(l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:this.parent.convertPixelToValue(t)}):x(this.options.label)?ot(this.parent.convertPixelToValue(t),this.valueFormatString,this.chart._cultureInfo):this.label,l.x=i-l.measureText().width/2,l.x+l.width>this.chart.bounds.x2&&(l.x=this.chart.bounds.x2-l.width),l.x<this.chart.bounds.x1&&(l.x=this.chart.bounds.x1),"bottom"===this.parent._position&&(l.y=this.parent.lineCoordinates.y2+l.fontSize/2+2),"top"===this.parent._position&&(l.y=this.parent.lineCoordinates.y1-l.height+l.fontSize/2+2));else if("bottom"===this.parent._position||"top"===this.parent._position){if(v=!1,r="",this.parent.labels)for(o=Math.ceil(this.parent.interval),p=0;p<this.parent.viewportMaximum;p+=o){if(!this.parent.labels[p]){v=!1;break}v=!0}if(v){if("axisX"===this.parent.type)for(p=this.parent.convertPixelToValue({x:t}),u=null,m=0;m<this.parent.dataSeries.length;m++)(u=this.parent.dataSeries[m].getDataPointAtX(p,!0))&&0<=u.index&&(l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:this.parent.convertPixelToValue(t)}):x(this.options.label)?u.dataPoint.label:this.label)}else"dateTime"===this.parent.valueType?l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:this.parent.convertPixelToValue(t)}):x(this.options.label)?nt(this.parent.convertPixelToValue(t),this.valueFormatString,this.chart._cultureInfo):this.label:"number"===this.parent.valueType&&(l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:0<this.parent.dataSeries.length?this.parent.convertPixelToValue(t):""}):x(this.options.label)?ot(this.parent.convertPixelToValue(t),this.valueFormatString,this.chart._cultureInfo):this.label);l.x=i-l.measureText().width/2,l.x+l.width>this.chart.bounds.x2&&(l.x=this.chart.bounds.x2-l.width),l.x<this.chart.bounds.x1&&(l.x=this.chart.bounds.x1),"bottom"===this.parent._position?l.y=this.parent.lineCoordinates.y2+l.fontSize/2+2:"top"===this.parent._position&&(l.y=this.parent.lineCoordinates.y1-l.height+l.fontSize/2+2)}else"left"!==this.parent._position&&"right"!==this.parent._position||(l.text=this.labelFormatter?this.labelFormatter({chart:this.chart,axis:this.parent.options,crosshair:this.options,value:this.parent.convertPixelToValue(e)}):x(this.options.label)?ot(this.parent.convertPixelToValue(e),this.valueFormatString,this.chart._cultureInfo):this.label,l.y=e+l.fontSize/2-l.measureText().height/2+2,l.y-l.fontSize/2<this.chart.bounds.y1?l.y=this.chart.bounds.y1+l.fontSize/2+2:l.y+l.measureText().height-l.fontSize/2>this.chart.bounds.y2&&(l.y=this.chart.bounds.y2-l.measureText().height+l.fontSize/2),"left"===this.parent._position?l.x=this.parent.lineCoordinates.x2-l.measureText().width:"right"===this.parent._position&&(l.x=this.parent.lineCoordinates.x2));0<h&&(d.moveTo(i,s),d.lineTo(a,n),d.stroke()),d.restore(),!x(l.text)&&("number"==typeof l.text.valueOf()||0<l.text.length)&&l.render(!0)}d.globalAlpha=c},i(j,A),j.prototype._initialize=function(){var t;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",t='<div style=" width: auto;height: auto;min-width: 50px;',t+="line-height: auto;",t+="margin: 0px 0px 0px 0px;",t+="padding: 5px;",t+="font-family: Calibri, Arial, Georgia, serif;",t+="font-weight: normal;",t+="font-style: "+(N?"italic;":"normal;"),t+="font-size: 14px;",t+="color: #000000;",t+="text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);",t+="text-align: left;",t+="border: 2px solid gray;",t+=N?"background: rgba(255,255,255,.9);":"background: rgb(255,255,255);",t+="text-indent: 0px;",t+="white-space: nowrap;",t+="border-radius: 5px;",t+="-moz-user-select:none;",t+="-khtml-user-select: none;",t+="-webkit-user-select: none;",t+="-ms-user-select: none;",t+="user-select: none;",N||(t+="filter: alpha(opacity = 90);",t+="filter: progid:DXImageTransform.Microsoft.Shadow(Strength=3, Direction=135, Color='#666666');"),t+='} "> Sample Tooltip</div>',this.container.innerHTML=t,this.contentDiv=this.container.firstChild,this.container.style.borderRadius=this.contentDiv.style.borderRadius,this.chart._canvasJSContainer.appendChild(this.container))},j.prototype.mouseMoveHandler=function(t,e){this._lastUpdated&&4>(new Date).getTime()-this._lastUpdated||(this._lastUpdated=(new Date).getTime(),this.chart.resetOverlayedCanvas(),this._updateToolTip(t,e))},j.prototype._updateToolTip=function(t,e,i){if(i=void 0===i||i,this.container||this._initialize(),this.enabled||this.hide(),!this.chart.disableToolTip){if(void 0===t||void 0===e){if(isNaN(this._prevX)||isNaN(this._prevY))return;t=this._prevX,e=this._prevY}else this._prevX=t,this._prevY=e;var a=null,s=null,n=[],o=0;if(this.shared&&this.enabled&&"none"!==this.chart.plotInfo.axisPlacement){if("xySwapped"===this.chart.plotInfo.axisPlacement){var l=[];if(this.chart.axisX)for(var r=0;r<this.chart.axisX.length;r++){o=this.chart.axisX[r].convertPixelToValue({y:e});var h=null;for(a=0;a<this.chart.axisX[r].dataSeries.length;a++)(h=this.chart.axisX[r].dataSeries[a].getDataPointAtX(o,i))&&0<=h.index&&(h.dataSeries=this.chart.axisX[r].dataSeries[a],null!==h.dataPoint.y&&l.push(h));h=null}if(this.chart.axisX2)for(r=0;r<this.chart.axisX2.length;r++){for(o=this.chart.axisX2[r].convertPixelToValue({y:e}),h=null,a=0;a<this.chart.axisX2[r].dataSeries.length;a++)(h=this.chart.axisX2[r].dataSeries[a].getDataPointAtX(o,i))&&0<=h.index&&(h.dataSeries=this.chart.axisX2[r].dataSeries[a],null!==h.dataPoint.y&&l.push(h));h=null}}else{if(l=[],this.chart.axisX)for(r=0;r<this.chart.axisX.length;r++)for(o=this.chart.axisX[r].convertPixelToValue({x:t}),h=null,a=0;a<this.chart.axisX[r].dataSeries.length;a++)(h=this.chart.axisX[r].dataSeries[a].getDataPointAtX(o,i))&&0<=h.index&&(h.dataSeries=this.chart.axisX[r].dataSeries[a],null!==h.dataPoint.y&&l.push(h));if(this.chart.axisX2)for(r=0;r<this.chart.axisX2.length;r++)for(o=this.chart.axisX2[r].convertPixelToValue({x:t}),h=null,a=0;a<this.chart.axisX2[r].dataSeries.length;a++)(h=this.chart.axisX2[r].dataSeries[a].getDataPointAtX(o,i))&&0<=h.index&&(h.dataSeries=this.chart.axisX2[r].dataSeries[a],null!==h.dataPoint.y&&l.push(h))}if(0===l.length)return;for(l.sort((function(t,e){return t.distance-e.distance})),i=l[0],a=0;a<l.length;a++)l[a].dataPoint.x.valueOf()===i.dataPoint.x.valueOf()&&n.push(l[a]);l=null}else{if(h=this.chart.getDataPointAtXY(t,e,i))this.currentDataPointIndex=h.dataPointIndex,this.currentSeriesIndex=h.dataSeries.index;else if(N)if(0<(h=v(t,e,this.chart._eventManager.ghostCtx))&&void 0!==this.chart._eventManager.objectMap[h]){if("legendItem"===(h=this.chart._eventManager.objectMap[h]).objectType)return;this.currentSeriesIndex=h.dataSeriesIndex,this.currentDataPointIndex=0<=h.dataPointIndex?h.dataPointIndex:-1}else this.currentDataPointIndex=-1;else this.currentDataPointIndex=-1;if(0<=this.currentSeriesIndex){if(s=this.chart.data[this.currentSeriesIndex],h={},0<=this.currentDataPointIndex)a=s.dataPoints[this.currentDataPointIndex],h.dataSeries=s,h.dataPoint=a,h.index=this.currentDataPointIndex,h.distance=Math.abs(a.x-o),"waterfall"===s.type&&(h.cumulativeSumYStartValue=s.dataPointEOs[this.currentDataPointIndex].cumulativeSumYStartValue,h.cumulativeSum=s.dataPointEOs[this.currentDataPointIndex].cumulativeSum);else{if(!this.enabled||"line"!==s.type&&"stepLine"!==s.type&&"spline"!==s.type&&"area"!==s.type&&"stepArea"!==s.type&&"splineArea"!==s.type&&"stackedArea"!==s.type&&"stackedArea100"!==s.type&&"rangeArea"!==s.type&&"rangeSplineArea"!==s.type&&"candlestick"!==s.type&&"ohlc"!==s.type&&"boxAndWhisker"!==s.type)return;o=s.axisX.convertPixelToValue({x:t}),x(h=s.getDataPointAtX(o,i))||(h.dataSeries=s,this.currentDataPointIndex=h.index,a=h.dataPoint)}if(!x(h)&&!x(h.dataPoint)&&!x(h.dataPoint.y))if(h.dataSeries.axisY)if(0<h.dataPoint.y.length){for(a=i=0;a<h.dataPoint.y.length;a++)h.dataPoint.y[a]<h.dataSeries.axisY.viewportMinimum?i--:h.dataPoint.y[a]>h.dataSeries.axisY.viewportMaximum&&i++;i<h.dataPoint.y.length&&i>-h.dataPoint.y.length&&n.push(h)}else"column"===s.type||"bar"===s.type?0>h.dataPoint.y?0>h.dataSeries.axisY.viewportMinimum&&h.dataSeries.axisY.viewportMaximum>=h.dataPoint.y&&n.push(h):h.dataSeries.axisY.viewportMinimum<=h.dataPoint.y&&0<=h.dataSeries.axisY.viewportMaximum&&n.push(h):"bubble"===s.type?(i=this.chart._eventManager.objectMap[s.dataPointIds[h.index]].size/2,h.dataPoint.y>=h.dataSeries.axisY.viewportMinimum-i&&h.dataPoint.y<=h.dataSeries.axisY.viewportMaximum+i&&n.push(h)):"waterfall"===s.type?(i=0,h.cumulativeSumYStartValue<h.dataSeries.axisY.viewportMinimum?i--:h.cumulativeSumYStartValue>h.dataSeries.axisY.viewportMaximum&&i++,h.cumulativeSum<h.dataSeries.axisY.viewportMinimum?i--:h.cumulativeSum>h.dataSeries.axisY.viewportMaximum&&i++,2>i&&-2<i&&n.push(h)):(0<=h.dataSeries.type.indexOf("100")||"stackedColumn"===s.type||"stackedBar"===s.type||h.dataPoint.y>=h.dataSeries.axisY.viewportMinimum&&h.dataPoint.y<=h.dataSeries.axisY.viewportMaximum)&&n.push(h);else n.push(h)}}if(0<n.length){if(this.highlightObjects(n),this.enabled)if(i="",null!==(i=this.getToolTipInnerHTML({entries:n}))){this.contentDiv.innerHTML=i,i=!1,"none"===this.container.style.display&&(i=!0,this.container.style.display="block");try{this.contentDiv.style.background=this.backgroundColor?this.backgroundColor:N?"rgba(255,255,255,.9)":"rgb(255,255,255)",this.borderColor="waterfall"===n[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:n[0].dataPoint.color?n[0].dataPoint.color:0<n[0].dataPoint.y?n[0].dataSeries.risingColor:n[0].dataSeries.fallingColor:"error"===n[0].dataSeries.type?this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:n[0].dataSeries.color?n[0].dataSeries.color:n[0].dataSeries._colorSet[s.index%n[0].dataSeries._colorSet.length]:this.contentDiv.style.borderRightColor=this.contentDiv.style.borderLeftColor=this.contentDiv.style.borderColor=this.options.borderColor?this.options.borderColor:n[0].dataPoint.color?n[0].dataPoint.color:n[0].dataSeries.color?n[0].dataSeries.color:n[0].dataSeries._colorSet[n[0].index%n[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:N?"italic":"normal"}catch(t){}"pie"===n[0].dataSeries.type||"doughnut"===n[0].dataSeries.type||"funnel"===n[0].dataSeries.type||"pyramid"===n[0].dataSeries.type||"bar"===n[0].dataSeries.type||"rangeBar"===n[0].dataSeries.type||"stackedBar"===n[0].dataSeries.type||"stackedBar100"===n[0].dataSeries.type?t=t-10-this.container.clientWidth:(t=n[0].dataSeries.axisX.convertValueToPixel(n[0].dataPoint.x)-this.container.clientWidth<<0,t-=10),0>t&&(t+=this.container.clientWidth+20),t+this.container.clientWidth>Math.max(this.chart.container.clientWidth,this.chart.width)&&(t=Math.max(0,Math.max(this.chart.container.clientWidth,this.chart.width)-this.container.clientWidth)),0<(e=10-(e=1!==n.length||this.shared||"line"!==n[0].dataSeries.type&&"stepLine"!==n[0].dataSeries.type&&"spline"!==n[0].dataSeries.type&&"area"!==n[0].dataSeries.type&&"stepArea"!==n[0].dataSeries.type&&"splineArea"!==n[0].dataSeries.type?"bar"===n[0].dataSeries.type||"rangeBar"===n[0].dataSeries.type||"stackedBar"===n[0].dataSeries.type||"stackedBar100"===n[0].dataSeries.type?n[0].dataSeries.axisX.convertValueToPixel(n[0].dataPoint.x):e:n[0].dataSeries.axisY.convertValueToPixel(n[0].dataPoint.y)))+this.container.clientHeight+5&&(e-=e+this.container.clientHeight+5-0),this.fixMozTransitionDelay(t,e),!this.animationEnabled||i?this.disableAnimation():(this.enableAnimation(),this.container.style.MozTransition=this.mozContainerTransition),this.container.style.left=t+"px",this.container.style.bottom=e+"px"}else this.hide(!1)}else this.hide()}},j.prototype.highlightObjects=function(t){var e=this.chart.overlaidCanvasCtx;this.chart.resetOverlayedCanvas(),e.clearRect(0,0,this.chart.width,this.chart.height),e.save();var i=this.chart.plotArea,a=0;for(e.beginPath(),e.rect(i.x1,i.y1,i.x2-i.x1,i.y2-i.y1),e.clip(),i=0;i<t.length;i++){var n=t[i];if((n=this.chart._eventManager.objectMap[n.dataSeries.dataPointIds[n.index]])&&n.objectType&&"dataPoint"===n.objectType){var o=(a=this.chart.data[n.dataSeriesIndex]).dataPoints[n.dataPointIndex],l=n.dataPointIndex;!1===o.highlightEnabled||!0!==a.highlightEnabled&&!0!==o.highlightEnabled||("line"===a.type||"stepLine"===a.type||"spline"===a.type||"scatter"===a.type||"area"===a.type||"stepArea"===a.type||"splineArea"===a.type||"stackedArea"===a.type||"stackedArea100"===a.type||"rangeArea"===a.type||"rangeSplineArea"===a.type?((o=a.getMarkerProperties(l,n.x1,n.y1,this.chart.overlaidCanvasCtx)).size=Math.max(1.5*o.size<<0,10),o.borderColor=o.borderColor||"#FFFFFF",o.borderThickness=o.borderThickness||Math.ceil(.1*o.size),Z.drawMarkers([o]),void 0!==n.y2&&((o=a.getMarkerProperties(l,n.x1,n.y2,this.chart.overlaidCanvasCtx)).size=Math.max(1.5*o.size<<0,10),o.borderColor=o.borderColor||"#FFFFFF",o.borderThickness=o.borderThickness||Math.ceil(.1*o.size),Z.drawMarkers([o]))):"bubble"===a.type?((o=a.getMarkerProperties(l,n.x1,n.y1,this.chart.overlaidCanvasCtx)).size=n.size,o.color="white",o.borderColor="white",e.globalAlpha=.3,Z.drawMarkers([o]),e.globalAlpha=1):"column"===a.type||"stackedColumn"===a.type||"stackedColumn100"===a.type||"bar"===a.type||"rangeBar"===a.type||"stackedBar"===a.type||"stackedBar100"===a.type||"rangeColumn"===a.type||"waterfall"===a.type?pt(e,n.x1,n.y1,n.x2,n.y2,"white",0,null,!1,!1,!1,!1,.3):"pie"===a.type||"doughnut"===a.type?G(e,n.center,n.radius,"white",a.type,n.startAngle,n.endAngle,.3,n.percentInnerRadius):"funnel"===a.type||"pyramid"===a.type?J(e,n.funnelSection,.3,"white"):"candlestick"===a.type?(e.globalAlpha=1,e.strokeStyle=n.color,e.lineWidth=2*n.borderThickness,a=0==e.lineWidth%2?0:.5,e.beginPath(),e.moveTo(n.x3-a,Math.min(n.y2,n.y3)),e.lineTo(n.x3-a,Math.min(n.y1,n.y4)),e.stroke(),e.beginPath(),e.moveTo(n.x3-a,Math.max(n.y1,n.y4)),e.lineTo(n.x3-a,Math.max(n.y2,n.y3)),e.stroke(),pt(e,n.x1,Math.min(n.y1,n.y4),n.x2,Math.max(n.y1,n.y4),"transparent",2*n.borderThickness,n.color,!1,!1,!1,!1),e.globalAlpha=1):"ohlc"===a.type?(e.globalAlpha=1,e.strokeStyle=n.color,e.lineWidth=2*n.borderThickness,a=0==e.lineWidth%2?0:.5,e.beginPath(),e.moveTo(n.x3-a,n.y2),e.lineTo(n.x3-a,n.y3),e.stroke(),e.beginPath(),e.moveTo(n.x3,n.y1),e.lineTo(n.x1,n.y1),e.stroke(),e.beginPath(),e.moveTo(n.x3,n.y4),e.lineTo(n.x2,n.y4),e.stroke(),e.globalAlpha=1):"boxAndWhisker"===a.type?(e.save(),e.globalAlpha=1,e.strokeStyle=n.stemColor,e.lineWidth=2*n.stemThickness,0<n.stemThickness&&(e.beginPath(),e.moveTo(n.x3,n.y2+n.borderThickness/2),e.lineTo(n.x3,n.y1+n.whiskerThickness/2),e.stroke(),e.beginPath(),e.moveTo(n.x3,n.y4-n.whiskerThickness/2),e.lineTo(n.x3,n.y3-n.borderThickness/2),e.stroke()),e.beginPath(),pt(e,n.x1-n.borderThickness/2,Math.max(n.y2+n.borderThickness/2,n.y3+n.borderThickness/2),n.x2+n.borderThickness/2,Math.min(n.y2-n.borderThickness/2,n.y3-n.borderThickness/2),"transparent",n.borderThickness,n.color,!1,!1,!1,!1),e.globalAlpha=1,e.strokeStyle=n.whiskerColor,e.lineWidth=2*n.whiskerThickness,0<n.whiskerThickness&&(e.beginPath(),e.moveTo(Math.floor(n.x3-n.whiskerLength/2),n.y4),e.lineTo(Math.ceil(n.x3+n.whiskerLength/2),n.y4),e.stroke(),e.beginPath(),e.moveTo(Math.floor(n.x3-n.whiskerLength/2),n.y1),e.lineTo(Math.ceil(n.x3+n.whiskerLength/2),n.y1),e.stroke()),e.globalAlpha=1,e.strokeStyle=n.lineColor,e.lineWidth=2*n.lineThickness,0<n.lineThickness&&(e.beginPath(),e.moveTo(n.x1,n.y5),e.lineTo(n.x2,n.y5),e.stroke()),e.restore(),e.globalAlpha=1):"error"===a.type&&s(e,n.x1,n.y1,n.x2,n.y2,"white",n.whiskerProperties,n.stemProperties,n.isXYSwapped,.3))}}e.restore(),e.globalAlpha=1,e.beginPath()},j.prototype.getToolTipInnerHTML=function(t){t=t.entries;for(var e=null,i=null,a=null,s=0,n="",o=!0,l=0;l<t.length;l++)if(t[l].dataSeries.toolTipContent||t[l].dataPoint.toolTipContent){o=!1;break}if(o&&(this.content&&"function"==typeof this.content||this.contentFormatter))t={chart:this.chart,toolTip:this.options,entries:t},e=this.contentFormatter?this.contentFormatter(t):this.content(t);else if(this.shared&&"none"!==this.chart.plotInfo.axisPlacement){var r=null,h="";for(l=0;l<t.length;l++)i=t[l].dataSeries,a=t[l].dataPoint,s=t[l].index,n="",0===l&&o&&!this.content&&(this.chart.axisX&&0<this.chart.axisX.length?h+=void 0!==this.chart.axisX[0].labels[a.x]?this.chart.axisX[0].labels[a.x]:"{x}":this.chart.axisX2&&0<this.chart.axisX2.length&&(h+=void 0!==this.chart.axisX2[0].labels[a.x]?this.chart.axisX2[0].labels[a.x]:"{x}"),h+="</br>",h=this.chart.replaceKeywordsWithValue(h,a,i,s)),null===a.toolTipContent||void 0===a.toolTipContent&&null===i.options.toolTipContent||("line"===i.type||"stepLine"===i.type||"spline"===i.type||"area"===i.type||"stepArea"===i.type||"splineArea"===i.type||"column"===i.type||"bar"===i.type||"scatter"===i.type||"stackedColumn"===i.type||"stackedColumn100"===i.type||"stackedBar"===i.type||"stackedBar100"===i.type||"stackedArea"===i.type||"stackedArea100"===i.type||"waterfall"===i.type?(this.chart.axisX&&1<this.chart.axisX.length&&(n+=r!=i.axisXIndex?i.axisX.title?i.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),n+=a.toolTipContent?a.toolTipContent:i.toolTipContent?i.toolTipContent:this.content&&"function"!=typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>{name}:</span>&nbsp;&nbsp;{y}",r=i.axisXIndex):"bubble"===i.type?(this.chart.axisX&&1<this.chart.axisX.length&&(n+=r!=i.axisXIndex?i.axisX.title?i.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),n+=a.toolTipContent?a.toolTipContent:i.toolTipContent?i.toolTipContent:this.content&&"function"!=typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>{name}:</span>&nbsp;&nbsp;{y}, &nbsp;&nbsp;{z}"):"rangeColumn"===i.type||"rangeBar"===i.type||"rangeArea"===i.type||"rangeSplineArea"===i.type||"error"===i.type?(this.chart.axisX&&1<this.chart.axisX.length&&(n+=r!=i.axisXIndex?i.axisX.title?i.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),n+=a.toolTipContent?a.toolTipContent:i.toolTipContent?i.toolTipContent:this.content&&"function"!=typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>{name}:</span>&nbsp;&nbsp;{y[0]},&nbsp;{y[1]}"):"candlestick"===i.type||"ohlc"===i.type?(this.chart.axisX&&1<this.chart.axisX.length&&(n+=r!=i.axisXIndex?i.axisX.title?i.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),n+=a.toolTipContent?a.toolTipContent:i.toolTipContent?i.toolTipContent:this.content&&"function"!=typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>{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"===i.type&&(this.chart.axisX&&1<this.chart.axisX.length&&(n+=r!=i.axisXIndex?i.axisX.title?i.axisX.title+"<br/>":"X:{axisXIndex}<br/>":""),n+=a.toolTipContent?a.toolTipContent:i.toolTipContent?i.toolTipContent:this.content&&"function"!=typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>{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===e&&(e=""),!0===this.reversed?(e=this.chart.replaceKeywordsWithValue(n,a,i,s)+e,l<t.length-1&&(e="</br>"+e)):(e+=this.chart.replaceKeywordsWithValue(n,a,i,s),l<t.length-1&&(e+="</br>")));null!==e&&(e=h+e)}else{if(i=t[0].dataSeries,a=t[0].dataPoint,s=t[0].index,null===a.toolTipContent||void 0===a.toolTipContent&&null===i.options.toolTipContent)return null;"line"===i.type||"stepLine"===i.type||"spline"===i.type||"area"===i.type||"stepArea"===i.type||"splineArea"===i.type||"column"===i.type||"bar"===i.type||"scatter"===i.type||"stackedColumn"===i.type||"stackedColumn100"===i.type||"stackedBar"===i.type||"stackedBar100"===i.type||"stackedArea"===i.type||"stackedArea100"===i.type||"waterfall"===i.type?n=a.toolTipContent?a.toolTipContent:i.toolTipContent?i.toolTipContent:this.content&&"function"!=typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>"+(a.label?"{label}":"{x}")+":</span>&nbsp;&nbsp;{y}":"bubble"===i.type?n=a.toolTipContent?a.toolTipContent:i.toolTipContent?i.toolTipContent:this.content&&"function"!=typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>"+(a.label?"{label}":"{x}")+":</span>&nbsp;&nbsp;{y}, &nbsp;&nbsp;{z}":"pie"===i.type||"doughnut"===i.type||"funnel"===i.type||"pyramid"===i.type?n=a.toolTipContent?a.toolTipContent:i.toolTipContent?i.toolTipContent:this.content&&"function"!=typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>"+(a.name?"{name}:</span>&nbsp;&nbsp;":a.label?"{label}:</span>&nbsp;&nbsp;":"</span>")+"{y}":"rangeColumn"===i.type||"rangeBar"===i.type||"rangeArea"===i.type||"rangeSplineArea"===i.type||"error"===i.type?n=a.toolTipContent?a.toolTipContent:i.toolTipContent?i.toolTipContent:this.content&&"function"!=typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>"+(a.label?"{label}":"{x}")+" :</span>&nbsp;&nbsp;{y[0]}, &nbsp;{y[1]}":"candlestick"===i.type||"ohlc"===i.type?n=a.toolTipContent?a.toolTipContent:i.toolTipContent?i.toolTipContent:this.content&&"function"!=typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>"+(a.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"===i.type&&(n=a.toolTipContent?a.toolTipContent:i.toolTipContent?i.toolTipContent:this.content&&"function"!=typeof this.content?this.content:"<span style='\""+(this.options.fontColor?"":"'color:{color};'")+"\"'>"+(a.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===e&&(e=""),e+=this.chart.replaceKeywordsWithValue(n,a,i,s)}return e},j.prototype.enableAnimation=function(){if(!this.container.style.WebkitTransition){var t=this.getContainerTransition(this.containerTransitionDuration);this.container.style.WebkitTransition=t,this.container.style.MsTransition=t,this.container.style.transition=t,this.container.style.MozTransition=this.mozContainerTransition}},j.prototype.disableAnimation=function(){this.container.style.WebkitTransition&&(this.container.style.WebkitTransition="",this.container.style.MozTransition="",this.container.style.MsTransition="",this.container.style.transition="")},j.prototype.hide=function(t){this.container&&(this.container.style.display="none",this.currentSeriesIndex=-1,this._prevY=this._prevX=NaN,(void 0===t||t)&&this.chart.resetOverlayedCanvas())},j.prototype.show=function(t,e,i){this._updateToolTip(t,e,void 0!==i&&i)},j.prototype.fixMozTransitionDelay=function(t,e){if(20<this.chart._eventManager.lastObjectId)this.mozContainerTransition=this.getContainerTransition(0);else{var i=parseFloat(this.container.style.left),a=(i=isNaN(i)?0:i,parseFloat(this.container.style.bottom));a=isNaN(a)?0:a;10<Math.sqrt(Math.pow(i-t,2)+Math.pow(a-e,2))?this.mozContainerTransition=this.getContainerTransition(.1):this.mozContainerTransition=this.getContainerTransition(0)}},j.prototype.getContainerTransition=function(t){return"left "+t+"s ease-out 0s, bottom "+t+"s ease-out 0s"},U.prototype.reset=function(){this.lastObjectId=0,this.objectMap=[],this.rectangularRegionEventSubscriptions=[],this.previousDataPointEventObject=null,this.eventObjects=[],N&&(this.ghostCtx.clearRect(0,0,this.chart.width,this.chart.height),this.ghostCtx.beginPath())},U.prototype.getNewObjectTrackingId=function(){return++this.lastObjectId},U.prototype.mouseEventHandler=function(t){if("mousemove"===t.type||"click"===t.type){var e=[],i=lt(t),a=null;if((a=this.chart.getObjectAtXY(i.x,i.y,!1))&&void 0!==this.objectMap[a])if("dataPoint"===(a=this.objectMap[a]).objectType){var s=this.chart.data[a.dataSeriesIndex],n=s.dataPoints[a.dataPointIndex],o=a.dataPointIndex;a.eventParameter={x:i.x,y:i.y,dataPoint:n,dataSeries:s.options,dataPointIndex:o,dataSeriesIndex:s.index,chart:this.chart},a.eventContext={context:n,userContext:n,mouseover:"mouseover",mousemove:"mousemove",mouseout:"mouseout",click:"click"},e.push(a),(a=this.objectMap[s.id]).eventParameter={x:i.x,y:i.y,dataPoint:n,dataSeries:s.options,dataPointIndex:o,dataSeriesIndex:s.index,chart:this.chart},a.eventContext={context:s,userContext:s.options,mouseover:"mouseover",mousemove:"mousemove",mouseout:"mouseout",click:"click"},e.push(this.objectMap[s.id])}else"legendItem"===a.objectType&&(s=this.chart.data[a.dataSeriesIndex],n=null!==a.dataPointIndex?s.dataPoints[a.dataPointIndex]:null,a.eventParameter={x:i.x,y:i.y,dataSeries:s.options,dataPoint:n,dataPointIndex:a.dataPointIndex,dataSeriesIndex:a.dataSeriesIndex,chart:this.chart},a.eventContext={context:this.chart.legend,userContext:this.chart.legend.options,mouseover:"itemmouseover",mousemove:"itemmousemove",mouseout:"itemmouseout",click:"itemclick"},e.push(a));for(s=[],i=0;i<this.mouseoveredObjectMaps.length;i++){for(n=!0,a=0;a<e.length;a++)if(e[a].id===this.mouseoveredObjectMaps[i].id){n=!1;break}n?this.fireEvent(this.mouseoveredObjectMaps[i],"mouseout",t):s.push(this.mouseoveredObjectMaps[i])}for(this.mouseoveredObjectMaps=s,i=0;i<e.length;i++){for(s=!1,a=0;a<this.mouseoveredObjectMaps.length;a++)if(e[i].id===this.mouseoveredObjectMaps[a].id){s=!0;break}s||(this.fireEvent(e[i],"mouseover",t),this.mouseoveredObjectMaps.push(e[i])),"click"===t.type?this.fireEvent(e[i],"click",t):"mousemove"===t.type&&this.fireEvent(e[i],"mousemove",t)}}},U.prototype.fireEvent=function(t,e,i){if(t&&e){var a=t.eventParameter,s=t.eventContext,n=t.eventContext.userContext;n&&s&&n[s[e]]&&n[s[e]].call(n,a),"mouseout"!==e?n.cursor&&n.cursor!==i.target.style.cursor&&(i.target.style.cursor=n.cursor):(i.target.style.cursor=this.chart._defaultCursor,delete t.eventParameter,delete t.eventContext),"click"===e&&"dataPoint"===t.objectType&&this.chart.pieDoughnutClickHandler&&this.chart.pieDoughnutClickHandler.call(this.chart.data[t.dataSeriesIndex],a),"click"===e&&"dataPoint"===t.objectType&&this.chart.funnelPyramidClickHandler&&this.chart.funnelPyramidClickHandler.call(this.chart.data[t.dataSeriesIndex],a)}},q.prototype.animate=function(t,e,i,a,s){var n=this;for(this.chart.isAnimating=!0,s=s||Q.easing.linear,i&&this.animations.push({startTime:(new Date).getTime()+(t||0),duration:e,animationCallback:i,onComplete:a}),t=[];0<this.animations.length;)e=this.animations.shift(),i=(new Date).getTime(),a=0,e.startTime<=i&&(a=s(Math.min(i-e.startTime,e.duration),0,1,e.duration),a=Math.min(a,1),isNaN(a)||!isFinite(a))&&(a=1),1>a&&t.push(e),e.animationCallback(a),1<=a&&e.onComplete&&e.onComplete();this.animations=t,0<this.animations.length?this.animationRequestId=this.chart.requestAnimFrame.call(window,(function(){n.animate.call(n)})):this.chart.isAnimating=!1},q.prototype.cancelAllAnimations=function(){this.animations=[],this.animationRequestId&&this.chart.cancelRequestAnimFrame.call(window,this.animationRequestId),this.animationRequestId=null,this.chart.isAnimating=!1};var Q={yScaleAnimation:function(t,e){if(0!==t){var i=e.dest,a=e.source.canvas,s=e.animationBase;i.drawImage(a,0,0,a.width,a.height,0,s-s*t,i.canvas.width/ct,t*i.canvas.height/ct)}},xScaleAnimation:function(t,e){if(0!==t){var i=e.dest,a=e.source.canvas,s=e.animationBase;i.drawImage(a,0,0,a.width,a.height,s-s*t,0,t*i.canvas.width/ct,i.canvas.height/ct)}},xClipAnimation:function(t,e){if(0!==t){var i=e.dest,a=e.source.canvas;i.save(),0<t&&i.drawImage(a,0,0,a.width*t,a.height,0,0,a.width*t/ct,a.height/ct),i.restore()}},fadeInAnimation:function(t,e){if(0!==t){var i=e.dest,a=e.source.canvas;i.save(),i.globalAlpha=t,i.drawImage(a,0,0,a.width,a.height,0,0,i.canvas.width/ct,i.canvas.height/ct),i.restore()}},easing:{linear:function(t,e,i,a){return i*t/a+e},easeOutQuad:function(t,e,i,a){return-i*(t/=a)*(t-2)+e},easeOutQuart:function(t,e,i,a){return-i*((t=t/a-1)*t*t*t-1)+e},easeInQuad:function(t,e,i,a){return i*(t/=a)*t+e},easeInQuart:function(t,e,i,a){return i*(t/=a)*t*t*t+e}}},Z={drawMarker:function(t,e,i,a,s,n,o,l){if(i){var r=1;i.fillStyle=n||"#000000",i.strokeStyle=o||"#000000",i.lineWidth=l||0,i.setLineDash&&i.setLineDash(b("solid",l)),"circle"===a?(i.moveTo(t,e),i.beginPath(),i.arc(t,e,s/2,0,2*Math.PI,!1),n&&i.fill(),l&&(o?i.stroke():(r=i.globalAlpha,i.globalAlpha=.15,i.strokeStyle="black",i.stroke(),i.globalAlpha=r))):"square"===a?(i.beginPath(),i.rect(t-s/2,e-s/2,s,s),n&&i.fill(),l&&(o?i.stroke():(r=i.globalAlpha,i.globalAlpha=.15,i.strokeStyle="black",i.stroke(),i.globalAlpha=r))):"triangle"===a?(i.beginPath(),i.moveTo(t-s/2,e+s/2),i.lineTo(t+s/2,e+s/2),i.lineTo(t,e-s/2),i.closePath(),n&&i.fill(),l&&(o?i.stroke():(r=i.globalAlpha,i.globalAlpha=.15,i.strokeStyle="black",i.stroke(),i.globalAlpha=r)),i.beginPath()):"cross"===a&&(i.strokeStyle=n,i.lineWidth=s/4,i.beginPath(),i.moveTo(t-s/2,e-s/2),i.lineTo(t+s/2,e+s/2),i.stroke(),i.moveTo(t+s/2,e-s/2),i.lineTo(t-s/2,e+s/2),i.stroke())}},drawMarkers:function(t){for(var e=0;e<t.length;e++){var i=t[e];Z.drawMarker(i.x,i.y,i.ctx,i.type,i.size,i.color,i.borderColor,i.borderThickness)}}};return e}(),gt.Chart.version="v2.3.2 GA"}(),document.createElement("canvas").getContext||function(){function t(){return this.context_||(this.context_=new c(this))}function e(t){return String(t).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}function i(t){t.namespaces.g_vml_||t.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML"),t.namespaces.g_o_||t.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML"),t.styleSheets.ex_canvas_||((t=t.createStyleSheet()).owningElement.id="ex_canvas_",t.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}")}function a(t){var e=t.srcElement;switch(t.propertyName){case"width":e.getContext().clearRect(),e.style.width=e.attributes.width.nodeValue+"px",e.firstChild.style.width=e.clientWidth+"px";break;case"height":e.getContext().clearRect(),e.style.height=e.attributes.height.nodeValue+"px",e.firstChild.style.height=e.clientHeight+"px"}}function s(t){(t=t.srcElement).firstChild&&(t.firstChild.style.width=t.clientWidth+"px",t.firstChild.style.height=t.clientHeight+"px")}function n(t,e){for(var i=[[1,0,0],[0,1,0],[0,0,1]],a=0;3>a;a++)for(var s=0;3>s;s++){for(var n=0,o=0;3>o;o++)n+=t[a][o]*e[o][s];i[a][s]=n}return i}function o(t,e){e.fillStyle=t.fillStyle,e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.shadowBlur=t.shadowBlur,e.shadowColor=t.shadowColor,e.shadowOffsetX=t.shadowOffsetX,e.shadowOffsetY=t.shadowOffsetY,e.strokeStyle=t.strokeStyle,e.globalAlpha=t.globalAlpha,e.font=t.font,e.textAlign=t.textAlign,e.textBaseline=t.textBaseline,e.arcScaleX_=t.arcScaleX_,e.arcScaleY_=t.arcScaleY_,e.lineScale_=t.lineScale_}function l(t){var e=t.indexOf("(",3),i=t.indexOf(")",e+1);return 4==(e=t.substring(e+1,i).split(",")).length&&"a"==t.charAt(3)||(e[3]=1),e}function r(t,e,i){return Math.min(i,Math.max(e,t))}function h(t,e,i){return 0>i&&i++,1<i&&i--,1>6*i?t+6*(e-t)*i:1>2*i?e:2>3*i?t+6*(e-t)*(2/3-i):t}function d(t){if(t in V)return V[t];var e,i=1;if("#"==(t=String(t)).charAt(0))e=t;else if(/^rgb/.test(t)){i=l(t),e="#";for(var a,s=0;3>s;s++)a=-1!=i[s].indexOf("%")?Math.floor(parseFloat(i[s])/100*255):+i[s],e+=B[r(a,0,255)];i=+i[3]}else if(/^hsl/.test(t)){if(s=i=l(t),0>(e=parseFloat(s[0])/360%360)&&e++,a=r(parseFloat(s[1])/100,0,1),s=r(parseFloat(s[2])/100,0,1),0==a)a=s=e=s;else{var n=.5>s?s*(1+a):s+a-s*a,o=2*s-n;a=h(o,n,e+1/3),s=h(o,n,e),e=h(o,n,e-1/3)}e="#"+B[Math.floor(255*a)]+B[Math.floor(255*s)]+B[Math.floor(255*e)],i=i[3]}else e=I[t]||t;return V[t]={color:e,alpha:i}}function c(t){this.m_=[[1,0,0],[0,1,0],[0,0,1]],this.mStack_=[],this.aStack_=[],this.currentPath_=[],this.fillStyle=this.strokeStyle="#000",this.lineWidth=1,this.lineJoin="miter",this.lineCap="butt",this.miterLimit=1*C,this.globalAlpha=1,this.font="10px sans-serif",this.textAlign="left",this.textBaseline="alphabetic",this.canvas=t;var e="width:"+t.clientWidth+"px;height:"+t.clientHeight+"px;overflow:hidden;position:absolute",i=t.ownerDocument.createElement("div");i.style.cssText=e,t.appendChild(i),(e=i.cloneNode(!1)).style.backgroundColor="red",e.style.filter="alpha(opacity=0)",t.appendChild(e),this.element_=i,this.lineScale_=this.arcScaleY_=this.arcScaleX_=1}function p(t,e,i,a){t.currentPath_.push({type:"bezierCurveTo",cp1x:e.x,cp1y:e.y,cp2x:i.x,cp2y:i.y,x:a.x,y:a.y}),t.currentX_=a.x,t.currentY_=a.y}function x(t,e){var i=(a=d(t.strokeStyle)).color,a=a.alpha*t.globalAlpha,s=t.lineScale_*t.lineWidth;1>s&&(a*=s),e.push("<g_vml_:stroke",' opacity="',a,'"',' joinstyle="',t.lineJoin,'"',' miterlimit="',t.miterLimit,'"',' endcap="',W[t.lineCap]||"square",'"',' weight="',s,'px"',' color="',i,'" />')}function u(t,e,i,a){var s=t.fillStyle,n=t.arcScaleX_,o=t.arcScaleY_,l=a.x-i.x,r=a.y-i.y;if(s instanceof b){var h=0,c=a=0,p=0,x=1;if("gradient"==s.type_){h=s.x1_/n,i=s.y1_/o;var u=m(t,s.x0_/n,s.y0_/o);h=m(t,h,i);0>(h=180*Math.atan2(h.x-u.x,h.y-u.y)/Math.PI)&&(h+=360),1e-6>h&&(h=0)}else a=((u=m(t,s.x0_,s.y0_)).x-i.x)/l,c=(u.y-i.y)/r,l/=n*C,r/=o*C,x=f.max(l,r),p=2*s.r0_/x,x=2*s.r1_/x-p;(n=s.colors_).sort((function(t,e){return t.offset-e.offset})),o=n.length,u=n[0].color,i=n[o-1].color,l=n[0].alpha*t.globalAlpha,t=n[o-1].alpha*t.globalAlpha;r=[];for(var g=0;g<o;g++){var v=n[g];r.push(v.offset*x+p+" "+v.color)}e.push('<g_vml_:fill type="',s.type_,'"',' method="none" focus="100%"',' color="',u,'"',' color2="',i,'"',' colors="',r.join(","),'"',' opacity="',t,'"',' g_o_:opacity2="',l,'"',' angle="',h,'"',' focusposition="',a,",",c,'" />')}else s instanceof y?l&&r&&e.push("<g_vml_:fill",' position="',-i.x/l*n*n,",",-i.y/r*o*o,'"',' type="tile"',' src="',s.src_,'" />'):(s=d(t.fillStyle),e.push('<g_vml_:fill color="',s.color,'" opacity="',s.alpha*t.globalAlpha,'" />'))}function m(t,e,i){return t=t.m_,{x:C*(e*t[0][0]+i*t[1][0]+t[2][0])-S,y:C*(e*t[0][1]+i*t[1][1]+t[2][1])-S}}function g(t,e,i){isFinite(e[0][0])&&isFinite(e[0][1])&&isFinite(e[1][0])&&isFinite(e[1][1])&&isFinite(e[2][0])&&isFinite(e[2][1])&&(t.m_=e,i&&(t.lineScale_=P(T(e[0][0]*e[1][1]-e[0][1]*e[1][0]))))}function b(t){this.type_=t,this.r1_=this.y1_=this.x1_=this.r0_=this.y0_=this.x0_=0,this.colors_=[]}function y(t,e){if(!t||1!=t.nodeType||"IMG"!=t.tagName)throw new v("TYPE_MISMATCH_ERR");if("complete"!=t.readyState)throw new v("INVALID_STATE_ERR");switch(e){case"repeat":case null:case"":this.repetition_="repeat";break;case"repeat-x":case"repeat-y":case"no-repeat":this.repetition_=e;break;default:throw new v("SYNTAX_ERR")}this.src_=t.src,this.width_=t.width,this.height_=t.height}function v(t){this.code=this[t],this.message=t+": DOM Exception "+this.code}var f=Math,k=f.round,M=f.sin,w=f.cos,T=f.abs,P=f.sqrt,C=10,S=C/2;navigator.userAgent.match(/MSIE ([\d.]+)?/);var A=Array.prototype.slice;i(document);var _={init:function(t){(t=t||document).createElement("canvas"),t.attachEvent("onreadystatechange",function(t,e,i){var a=A.call(arguments,2);return function(){return t.apply(e,a.concat(A.call(arguments)))}}(this.init_,this,t))},init_:function(t){t=t.getElementsByTagName("canvas");for(var e=0;e<t.length;e++)this.initElement(t[e])},initElement:function(e){if(!e.getContext){e.getContext=t,i(e.ownerDocument),e.innerHTML="",e.attachEvent("onpropertychange",a),e.attachEvent("onresize",s);var n=e.attributes;n.width&&n.width.specified?e.style.width=n.width.nodeValue+"px":e.width=e.clientWidth,n.height&&n.height.specified?e.style.height=n.height.nodeValue+"px":e.height=e.clientHeight}return e}};_.init();for(var B=[],F=0;16>F;F++)for(var L=0;16>L;L++)B[16*F+L]=F.toString(16)+L.toString(16);var I={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"},V={},D={},W={butt:"flat",round:"round"};(F=c.prototype).clearRect=function(){this.textMeasureEl_&&(this.textMeasureEl_.removeNode(!0),this.textMeasureEl_=null),this.element_.innerHTML=""},F.beginPath=function(){this.currentPath_=[]},F.moveTo=function(t,e){var i=m(this,t,e);this.currentPath_.push({type:"moveTo",x:i.x,y:i.y}),this.currentX_=i.x,this.currentY_=i.y},F.lineTo=function(t,e){var i=m(this,t,e);this.currentPath_.push({type:"lineTo",x:i.x,y:i.y}),this.currentX_=i.x,this.currentY_=i.y},F.bezierCurveTo=function(t,e,i,a,s,n){s=m(this,s,n),p(this,t=m(this,t,e),i=m(this,i,a),s)},F.quadraticCurveTo=function(t,e,i,a){t=m(this,t,e),i=m(this,i,a),p(this,a={x:this.currentX_+2/3*(t.x-this.currentX_),y:this.currentY_+2/3*(t.y-this.currentY_)},{x:a.x+(i.x-this.currentX_)/3,y:a.y+(i.y-this.currentY_)/3},i)},F.arc=function(t,e,i,a,s,n){i*=C;var o=n?"at":"wa",l=t+w(a)*i-S,r=e+M(a)*i-S;a=t+w(s)*i-S,s=e+M(s)*i-S,l!=a||n||(l+=.125),t=m(this,t,e),l=m(this,l,r),a=m(this,a,s),this.currentPath_.push({type:o,x:t.x,y:t.y,radius:i,xStart:l.x,yStart:l.y,xEnd:a.x,yEnd:a.y})},F.rect=function(t,e,i,a){this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+a),this.lineTo(t,e+a),this.closePath()},F.strokeRect=function(t,e,i,a){var s=this.currentPath_;this.beginPath(),this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+a),this.lineTo(t,e+a),this.closePath(),this.stroke(),this.currentPath_=s},F.fillRect=function(t,e,i,a){var s=this.currentPath_;this.beginPath(),this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+a),this.lineTo(t,e+a),this.closePath(),this.fill(),this.currentPath_=s},F.createLinearGradient=function(t,e,i,a){var s=new b("gradient");return s.x0_=t,s.y0_=e,s.x1_=i,s.y1_=a,s},F.createRadialGradient=function(t,e,i,a,s,n){var o=new b("gradientradial");return o.x0_=t,o.y0_=e,o.r0_=i,o.x1_=a,o.y1_=s,o.r1_=n,o},F.drawImage=function(t,e){var i,a,s,n,o,l,r,h;s=t.runtimeStyle.width,n=t.runtimeStyle.height,t.runtimeStyle.width="auto",t.runtimeStyle.height="auto";var d=t.width,c=t.height;if(t.runtimeStyle.width=s,t.runtimeStyle.height=n,3==arguments.length)i=arguments[1],a=arguments[2],o=l=0,r=s=d,h=n=c;else if(5==arguments.length)i=arguments[1],a=arguments[2],s=arguments[3],n=arguments[4],o=l=0,r=d,h=c;else{if(9!=arguments.length)throw Error("Invalid number of arguments");o=arguments[1],l=arguments[2],r=arguments[3],h=arguments[4],i=arguments[5],a=arguments[6],s=arguments[7],n=arguments[8]}var p=m(this,i,a),x=[];if(x.push(" <g_vml_:group",' coordsize="',10*C,",",10*C,'"',' coordorigin="0,0"',' style="width:',10,"px;height:",10,"px;position:absolute;"),1!=this.m_[0][0]||this.m_[0][1]||1!=this.m_[1][1]||this.m_[1][0]){var u=[];u.push("M11=",this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",k(p.x/C),",","Dy=",k(p.y/C),"");var g=m(this,i+s,a),b=m(this,i,a+n);i=m(this,i+s,a+n),p.x=f.max(p.x,g.x,b.x,i.x),p.y=f.max(p.y,g.y,b.y,i.y),x.push("padding:0 ",k(p.x/C),"px ",k(p.y/C),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",u.join(""),", sizingmethod='clip');")}else x.push("top:",k(p.y/C),"px;left:",k(p.x/C),"px;");x.push(' ">','<g_vml_:image src="',t.src,'"',' style="width:',C*s,"px;"," height:",C*n,'px"',' cropleft="',o/d,'"',' croptop="',l/c,'"',' cropright="',(d-o-r)/d,'"',' cropbottom="',(c-l-h)/c,'"'," />","</g_vml_:group>"),this.element_.insertAdjacentHTML("BeforeEnd",x.join(""))},F.stroke=function(t){var e=[];e.push("<g_vml_:shape",' filled="',!!t,'"',' style="position:absolute;width:',10,"px;height:",10,'px;"',' coordorigin="0,0"',' coordsize="',10*C,",",10*C,'"',' stroked="',!t,'"',' path="');for(var i={x:null,y:null},a={x:null,y:null},s=0;s<this.currentPath_.length;s++){var n=this.currentPath_[s];switch(n.type){case"moveTo":e.push(" m ",k(n.x),",",k(n.y));break;case"lineTo":e.push(" l ",k(n.x),",",k(n.y));break;case"close":e.push(" x "),n=null;break;case"bezierCurveTo":e.push(" c ",k(n.cp1x),",",k(n.cp1y),",",k(n.cp2x),",",k(n.cp2y),",",k(n.x),",",k(n.y));break;case"at":case"wa":e.push(" ",n.type," ",k(n.x-this.arcScaleX_*n.radius),",",k(n.y-this.arcScaleY_*n.radius)," ",k(n.x+this.arcScaleX_*n.radius),",",k(n.y+this.arcScaleY_*n.radius)," ",k(n.xStart),",",k(n.yStart)," ",k(n.xEnd),",",k(n.yEnd))}n&&((null==i.x||n.x<i.x)&&(i.x=n.x),(null==a.x||n.x>a.x)&&(a.x=n.x),(null==i.y||n.y<i.y)&&(i.y=n.y),(null==a.y||n.y>a.y)&&(a.y=n.y))}e.push(' ">'),t?u(this,e,i,a):x(this,e),e.push("</g_vml_:shape>"),this.element_.insertAdjacentHTML("beforeEnd",e.join(""))},F.fill=function(){this.stroke(!0)},F.closePath=function(){this.currentPath_.push({type:"close"})},F.save=function(){var t={};o(this,t),this.aStack_.push(t),this.mStack_.push(this.m_),this.m_=n([[1,0,0],[0,1,0],[0,0,1]],this.m_)},F.restore=function(){this.aStack_.length&&(o(this.aStack_.pop(),this),this.m_=this.mStack_.pop())},F.translate=function(t,e){g(this,n([[1,0,0],[0,1,0],[t,e,1]],this.m_),!1)},F.rotate=function(t){var e=w(t);g(this,n([[e,t=M(t),0],[-t,e,0],[0,0,1]],this.m_),!1)},F.scale=function(t,e){this.arcScaleX_*=t,this.arcScaleY_*=e,g(this,n([[t,0,0],[0,e,0],[0,0,1]],this.m_),!0)},F.transform=function(t,e,i,a,s,o){g(this,n([[t,e,0],[i,a,0],[s,o,1]],this.m_),!0)},F.setTransform=function(t,e,i,a,s,n){g(this,[[t,e,0],[i,a,0],[s,n,1]],!0)},F.drawText_=function(t,i,a,s,n){var o=this.m_;s=0;var l,r=1e3,h=0,d=[];if(l=this.font,D[l])l=D[l];else{var c=document.createElement("div").style;try{c.font=l}catch(t){}l=D[l]={style:c.fontStyle||"normal",variant:c.fontVariant||"normal",weight:c.fontWeight||"normal",size:c.fontSize||10,family:c.fontFamily||"sans-serif"}}c=l;var p=this.element_;for(var g in l={},c)l[g]=c[g];switch(g=parseFloat(p.currentStyle.fontSize),p=parseFloat(c.size),"number"==typeof c.size?l.size=c.size:-1!=c.size.indexOf("px")?l.size=p:-1!=c.size.indexOf("em")?l.size=g*p:-1!=c.size.indexOf("%")?l.size=g/100*p:-1!=c.size.indexOf("pt")?l.size=p/.75:l.size=g,l.size*=.981,g=l.style+" "+l.variant+" "+l.weight+" "+l.size+"px "+l.family,p=this.element_.currentStyle,c=this.textAlign.toLowerCase()){case"left":case"center":case"right":break;case"end":c="ltr"==p.direction?"right":"left";break;case"start":c="rtl"==p.direction?"right":"left";break;default:c="left"}switch(this.textBaseline){case"hanging":case"top":h=l.size/1.75;break;case"middle":break;default:case null:case"alphabetic":case"ideographic":case"bottom":h=-l.size/2.25}switch(c){case"right":s=1e3,r=.05;break;case"center":s=r=500}i=m(this,i+0,a+h),d.push('<g_vml_:line from="',-s,' 0" to="',r,' 0.05" ',' coordsize="100 100" coordorigin="0 0"',' filled="',!n,'" stroked="',!!n,'" style="position:absolute;width:1px;height:1px;">'),n?x(this,d):u(this,d,{x:-s,y:0},{x:r,y:l.size}),n=o[0][0].toFixed(3)+","+o[1][0].toFixed(3)+","+o[0][1].toFixed(3)+","+o[1][1].toFixed(3)+",0,0",i=k(i.x/C)+","+k(i.y/C),d.push('<g_vml_:skew on="t" matrix="',n,'" ',' offset="',i,'" origin="',s,' 0" />','<g_vml_:path textpathok="true" />','<g_vml_:textpath on="true" string="',e(t),'" style="v-text-align:',c,";font:",e(g),'" /></g_vml_:line>'),this.element_.insertAdjacentHTML("beforeEnd",d.join(""))},F.fillText=function(t,e,i,a){this.drawText_(t,e,i,a,!1)},F.strokeText=function(t,e,i,a){this.drawText_(t,e,i,a,!0)},F.measureText=function(t){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 e=this.element_.ownerDocument;return this.textMeasureEl_.innerHTML="",this.textMeasureEl_.style.font=this.font,this.textMeasureEl_.appendChild(e.createTextNode(t)),{width:this.textMeasureEl_.offsetWidth}},F.clip=function(){},F.arcTo=function(){},F.createPattern=function(t,e){return new y(t,e)},b.prototype.addColorStop=function(t,e){e=d(e),this.colors_.push({offset:t,color:e.color,alpha:e.alpha})},(F=v.prototype=Error()).INDEX_SIZE_ERR=1,F.DOMSTRING_SIZE_ERR=2,F.HIERARCHY_REQUEST_ERR=3,F.WRONG_DOCUMENT_ERR=4,F.INVALID_CHARACTER_ERR=5,F.NO_DATA_ALLOWED_ERR=6,F.NO_MODIFICATION_ALLOWED_ERR=7,F.NOT_FOUND_ERR=8,F.NOT_SUPPORTED_ERR=9,F.INUSE_ATTRIBUTE_ERR=10,F.INVALID_STATE_ERR=11,F.SYNTAX_ERR=12,F.INVALID_MODIFICATION_ERR=13,F.NAMESPACE_ERR=14,F.INVALID_ACCESS_ERR=15,F.VALIDATION_ERR=16,F.TYPE_MISMATCH_ERR=17,G_vmlCanvasManager=_,CanvasRenderingContext2D=c,CanvasGradient=b,CanvasPattern=y,DOMException=v}()},function(t,e,i){var a=i(5),s=i(6);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[t.i,s,""]]);var n={insert:"head",singleton:!1};a(s,n);t.exports=s.locals||{}},function(t,e,i){"use strict";var a,s=function(){return void 0===a&&(a=Boolean(window&&document&&document.all&&!window.atob)),a},n=function(){var t={};return function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}t[e]=i}return t[e]}}(),o=[];function l(t){for(var e=-1,i=0;i<o.length;i++)if(o[i].identifier===t){e=i;break}return e}function r(t,e){for(var i={},a=[],s=0;s<t.length;s++){var n=t[s],r=e.base?n[0]+e.base:n[0],h=i[r]||0,d="".concat(r," ").concat(h);i[r]=h+1;var c=l(d),p={css:n[1],media:n[2],sourceMap:n[3]};-1!==c?(o[c].references++,o[c].updater(p)):o.push({identifier:d,updater:g(p,e),references:1}),a.push(d)}return a}function h(t){var e=document.createElement("style"),a=t.attributes||{};if(void 0===a.nonce){var s=i.nc;s&&(a.nonce=s)}if(Object.keys(a).forEach((function(t){e.setAttribute(t,a[t])})),"function"==typeof t.insert)t.insert(e);else{var o=n(t.insert||"head");if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(e)}return e}var d,c=(d=[],function(t,e){return d[t]=e,d.filter(Boolean).join("\n")});function p(t,e,i,a){var s=i?"":a.media?"@media ".concat(a.media," {").concat(a.css,"}"):a.css;if(t.styleSheet)t.styleSheet.cssText=c(e,s);else{var n=document.createTextNode(s),o=t.childNodes;o[e]&&t.removeChild(o[e]),o.length?t.insertBefore(n,o[e]):t.appendChild(n)}}function x(t,e,i){var a=i.css,s=i.media,n=i.sourceMap;if(s?t.setAttribute("media",s):t.removeAttribute("media"),n&&btoa&&(a+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(n))))," */")),t.styleSheet)t.styleSheet.cssText=a;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(a))}}var u=null,m=0;function g(t,e){var i,a,s;if(e.singleton){var n=m++;i=u||(u=h(e)),a=p.bind(null,i,n,!1),s=p.bind(null,i,n,!0)}else i=h(e),a=x.bind(null,i,e),s=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(i)};return a(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;a(t=e)}else s()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=s());var i=r(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var a=0;a<i.length;a++){var s=l(i[a]);o[s].references--}for(var n=r(t,e),h=0;h<i.length;h++){var d=l(i[h]);0===o[d].references&&(o[d].updater(),o.splice(d,1))}i=n}}}},function(t,e,i){(e=i(7)(!1)).push([t.i,".op-font {\r\n    font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-size: 10.5px; color: #777; font-weight: 500;\r\n  }\r\n  .op-button {\r\n    height: 42px; width: 42px; border: 1px solid #aaa; border-radius: 5px; outline:none; background: #f2f2f2\r\n  }\r\n  .op-toggler {\r\n    height: 26px; width: 30px; font-size:9px; border: 1px solid #aaa; border-radius: 5px; outline:none; background: #fffdd0; cursor: unset;\r\n  }\r\n  .op-toggler-off {\r\n    background: #f2f2f2;\r\n    cursor: pointer;\r\n  }\r\n  .op-toggler-off:hover{\r\n    border: 1.5px solid #999; background-color: #e2e2e2;\r\n    cursor: pointer;\r\n  }\r\n  .op-button:hover{\r\n    border: 1.5px solid #999; background-color: #e2e2e2;\r\n    cursor: pointer;\r\n  }\r\n  .op-button:active{\r\n  background-color:#999;\r\n  }\r\n\r\n  .op-button:disabled,\r\n  .op-button2:disabled,\r\n  .op-button3:disabled,\r\n  .op-button[disabled],\r\n  .op-button2[disabled],\r\n  .op-button3[disabled],\r\n  .op-toggler:disabled,\r\n  .op-toggler[disabled] {\r\n    border: 1px solid #d9d9d9;\r\n    background-color: #ffffff;\r\n    color: #c2c2c2;\r\n    cursor: unset;\r\n  }\r\n\r\n  .op-button2 {\r\n    background: #f88000;\r\n    border: 1px;\r\n    color: #fff;\r\n    height: 20px;\r\n    padding: 0 10px 0 10px;\r\n    border-radius: 2px;\r\n    cursor: pointer;\r\n  }\r\n\r\n  .opFlexRow {\r\n    display: flex;\r\n    flex-direction: row;\r\n  }\r\n  .arrowright {\r\n    border: solid #777;\r\n    border-width: 0 3px 3px 0;\r\n    display: inline-block;\r\n    padding: 3px;\r\n    transform: rotate(-45deg);\r\n    -webkit-transform: rotate(-45deg);\r\n    margin-right: -3px;\r\n  }\r\n\r\n  .arrowleft {\r\n    border: solid #777;\r\n    border-width: 0 3px 3px 0;\r\n    display: inline-block;\r\n    padding: 3px;\r\n    transform: rotate(135deg);\r\n    -webkit-transform: rotate(135deg);\r\n    margin-right: -3px;\r\n  }\r\n\r\n  .op-button:disabled > div > i\r\n   { \r\n    border-color: #d1d1d1 !important;\r\n  }\r\n\r\n  .up {\r\n    transform: rotate(-135deg);\r\n    -webkit-transform: rotate(-135deg);\r\n  }\r\n\r\n  .down {\r\n    transform: rotate(45deg);\r\n    -webkit-transform: rotate(45deg);\r\n  }\r\n\r\n  .canvasjs-chart-toolbar button {\r\n    display: none !important;\r\n  }\r\n\r\n\r\n  @media screen and (max-width: 620px) {\r\n    .op-screen-sm-bar {\r\n      justify-content: space-around !important;\r\n    }\r\n    .op-screen-sm-bar2 {\r\n      order: 1;\r\n    }\r\n    .op-screen-sm-bar3 {\r\n      order: 0;\r\n    }\r\n    .op-screen-sm-hide {\r\n      display: none !important;\r\n    }\r\n    .op-screen-sm-show {\r\n      display: block !important;\r\n    }\r\n  }\r\n\r\n  #op-trend-wdw {\r\n    background-color: #eeeeee;\r\n    border: 1px solid #aaa;\r\n    border-radius: 5px;\r\n    box-shadow: 0px 0px 25px #888;\r\n    width: -webkit-calc(100% - 50px);\r\n    width:    -moz-calc(100% - 50px);\r\n    width:         calc(100% - 50px);\r\n    height: -webkit-calc(100% - 50px);\r\n    height:    -moz-calc(100% - 50px);\r\n    height:         calc(100% - 50px);\r\n    display: flex;\r\n    flex-direction: column;\r\n    padding: 10px;\r\n  }\r\n\r\n  .fade-in {\r\n  animation: fadeIn ease 0.5s;\r\n  -webkit-animation: fadeIn ease 0.5s;\r\n  -moz-animation: fadeIn ease 0.5s;\r\n  -o-animation: fadeIn ease 0.5s;\r\n  -ms-animation: fadeIn ease 0.5s;\r\n  }\r\n  @keyframes fadeIn {\r\n  0% {opacity:0;}\r\n  100% {opacity:1;}\r\n  }\r\n\r\n  @-moz-keyframes fadeIn {\r\n  0% {opacity:0;}\r\n  100% {opacity:1;}\r\n  }\r\n\r\n  @-webkit-keyframes fadeIn {\r\n  0% {opacity:0;}\r\n  100% {opacity:1;}\r\n  }\r\n\r\n  @-o-keyframes fadeIn {\r\n  0% {opacity:0;}\r\n  100% {opacity:1;}\r\n  }\r\n\r\n  @-ms-keyframes fadeIn {\r\n  0% {opacity:0;}\r\n  100% {opacity:1;}\r\n  }\r\n\r\n  .op-selector {\r\n    border: 1px solid #d1d1d1; width: 100%;\r\n  }\r\n  .op-selector > option > div { margin-right: 10px; }\r\n\r\n  @keyframes fade {\r\n    from { opacity: 1.0; }\r\n    50% { opacity: 0; }\r\n    to { opacity: 1.0; }\r\n  }\r\n\r\n  @-webkit-keyframes fade {\r\n      from { opacity: 1.0; }\r\n      50% { opacity: 0; }\r\n      to { opacity: 1.0; }\r\n  }\r\n\r\n  .blink {\r\n    animation:fade 500ms infinite;\r\n    -webkit-animation:fade 500ms infinite;\r\n  }\r\n  .titleText {\r\n    font-size: 11.5px;\r\n    font-weight: bold;\r\n  }\r\n\r\n  .op-border {\r\n    border: 1px solid #cfcfcf; border-radius: 5px; padding: 5px;\r\n  }\r\n\r\n  .op-table > table, th,td { \r\n    border: 1px solid #cfcfcf;\r\n  }\r\n\r\n \r\n  .op-table th { \r\n    background-color: #f2f2f2; \r\n  }\r\n  .op-table td { \r\n    background-color: #fff; \r\n  }\r\n  tr > td:first-child {\r\n    background-color: transparent !important;\r\n  }\r\n\r\n  .op-table > table { \r\n    width: 100%;\r\n    border-collapse: collapse;\r\n    text-align: center;\r\n    border-style: hidden;\r\n  }\r\n\r\n  .op-table input[type=color] {\r\n    padding: 0;\r\n    -webkit-appearance: none;\r\n    background-color: black;\r\n    border: none;\r\n    width: 16px;\r\n    height: 16px;\r\n  }\r\n\r\n  input::-webkit-color-swatch {\r\n    border: none;\r\n  }\r\n\r\n  .trash-icon {\r\n    cursor: pointer;\r\n    margin-top: 1px;\r\n  }\r\n  .trash-icon:hover {\r\n    background-color: #e2e2e2;\r\n}\r\n\r\n.op-hide-col {\r\n  display: none;\r\n}\r\n\r\n.op-hide {\r\n  display: none !important;\r\n}",""]),t.exports=e},function(t,e,i){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=function(t,e){var i=t[1]||"",a=t[3];if(!a)return i;if(e&&"function"==typeof btoa){var s=(o=a,l=btoa(unescape(encodeURIComponent(JSON.stringify(o)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(l),"/*# ".concat(r," */")),n=a.sources.map((function(t){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(t," */")}));return[i].concat(n).concat([s]).join("\n")}var o,l,r;return[i].join("\n")}(e,t);return e[2]?"@media ".concat(e[2]," {").concat(i,"}"):i})).join("")},e.i=function(t,i,a){"string"==typeof t&&(t=[[null,t,""]]);var s={};if(a)for(var n=0;n<this.length;n++){var o=this[n][0];null!=o&&(s[o]=!0)}for(var l=0;l<t.length;l++){var r=[].concat(t[l]);a&&s[r[0]]||(i&&(r[2]?r[2]="".concat(i," and ").concat(r[2]):r[2]=i),e.push(r))}},e}}]);