/*
 FusionCharts JavaScript Library
 Copyright FusionCharts Technologies LLP
 License Information at <http://www.fusioncharts.com/license>

 @version 3.6.0
*/
FusionCharts.register("module",["private","modules.renderer.js-gradientlegend",function(){function hb(g,h,xa){var ma=g[0],J=g[1];g=g[2];ma+=(h[0]-ma)*xa;J+=(h[1]-J)*xa;h=g+(h[2]-g)*xa;return{hex:(z+(ma<<16|J<<8|h).toString(16)).slice(-6),rgb:[ma,J,h]}}function pb(g,h){return g.maxvalue-h.maxvalue}function fb(h){var z,xa,ma=h.colorRange||{},J=h.dataMin,u=h.dataMax,P=h.sortLegend||!1,v=h.mapByCategory||!1,F=h.defaultColor,ea=h.numberFormatter,A=ma.color;h=this.colorArr=[];var Q,ba,V;this.mapByCategory=
v;"1"===ma.mapbypercent&&(this.mapbypercent=!0);if("1"===ma.gradient&&!v){this.gradient=!0;xa=Hb(La(ma.startcolor,ma.mincolor,ma.code));P=Mb(Hb(La(xa,F,"CCCCCC")));v=this.scaleMin=Ta(ma.startvalue,ma.minvalue,this.mapbypercent?0:J);h.push({code:xa,maxvalue:v,label:H(ma.startlabel),codeRGB:Mb(xa)});if(A&&(z=A.length))for(J=0;J<z;J+=1)F=A[J],xa=Hb(La(F.color,F.code)),ba=Ta(F.value,F.maxvalue),V=Ta(F.minvalue),ba>v&&h.push({code:xa,maxvalue:ba,userminvalue:V,label:H(La(F.label,F.displayvalue)),codeRGB:Mb(xa)});
h.sort(pb);z=h.length;for(J=1;J<z;J+=1)F=h[J],xa=F.maxvalue-v,0<xa?(F.minvalue=v,F.range=xa,v=F.maxvalue):(h.splice(J,1),J-=1,z-=1);2<=h.length&&(this.scaleMax=v,h[J-1].label=La(ma.endlabel,h[J-1].label,h[J-1].displayvalue));1===h.length&&(ba=Ta(ma.maxvalue,this.mapbypercent?100:u),h.push({minvalue:v,maxvalue:ba,range:ba-v,label:ma.endlabel}),this.scaleMax=ba,delete h[0].code);ma=h[0];u=h[h.length-1];ma.code&&u.code||(xa=g(P),z=B((xa[2]=0,xa)),xa=B((xa[2]=100,xa)),ma.code||(ma.codeRGB=z,ma.code=da(z)),
u.code||(u.codeRGB=xa,u.code=da(xa)));z=h.length;for(J=1;J<z;J+=1)if(F=h[J],F.code){if(Q)for(u=F,V=ma.maxvalue,A=u.maxvalue-V;Q<J;Q+=1)P=h[Q],xa=hb(ma.codeRGB,u.codeRGB,(P.maxvalue-V)/A),P.code=xa.hex,P.codeRGB=xa.rgb;Q=null;ma=F}else Q=Q||J;if(void 0===this.scaleMin||void 0===this.scaleMax)this.noValidRange=!0}else if(A&&(z=A.length)){for(J=0;J<z;J+=1)F=A[J],xa=La(F.color,F.code),ba=Ta(F.maxvalue),V=Ta(F.minvalue),Q=La(F.label,F.displayvalue,v?ha:ea.dataLabels(V)+" - "+ea.dataLabels(ba)),(xa&&ba>
V||v&&Q)&&h.push({code:xa,maxvalue:ba,minvalue:V,label:H(Q),labelId:Q.toLowerCase()});h.length?P&&h.sort(pb):this.noValidRange=!0}}function A(g,h){return h?na(100*g)/100+"%":Ma(g,ha).toString()}var u=this,Z=u.hcLib,Qa=u.window,Qa=/msie/i.test(Qa.navigator.userAgent)&&!Qa.opera,Ta=Z.pluckNumber,z=Z.COLOR_BLACK,ac=Z.COLOR_GLASS,gb=Z.FC_CONFIG_STRING,h=Z.graphics,B=h.HSBtoRGB,g=h.RGBtoHSB,da=h.RGBtoHex,Mb=h.HEXtoRGB,F=Z.COMMASTRING,ha=Z.BLANKSTRING,H=Z.parseUnsafeString,ya=Z.graphics.convertColor,ea=
Z.POSITION_TOP,qb=Z.POSITION_MIDDLE,Sa=Z.POSITION_START,Qb=Z.POSITION_END,bc=Z.graphics.getDarkColor,rb=Z.graphics.getLightColor,La=Z.pluck,Ma=Z.getValidValue,ib=Z.toRaphaelColor,vb=Z.hasTouch,na=Math.round,Na=Math.max,V=Math.min,ra=Math.abs,Y,Ga,Cb,cc="rgba(192,192,192,"+(Qa?.002:1E-6)+")",Hb=function(g){return g&&g.replace(/^#?([a-f0-9]+)/ig,"$1")};fb.prototype={getColorObj:function(g){var h=this.colorArr,z=this.gradient?1:0,u=h[z],J;if(this.mapByCategory){for(g=H(g).toLowerCase();u;){if(u.labelId===
g)return{code:u.code,seriesIndex:z};z+=1;u=h[z]}return{outOfRange:!0}}if(this.gradient){if(this.scaleMin<=g&&this.scaleMax>=g){for(;u&&u.maxvalue<g;)z+=1,u=h[z];g=(g-u.minvalue)/u.range;return{code:hb(h[z-1].codeRGB,u.codeRGB,g).hex}}return{outOfRange:!0}}for(;u;){if(u.maxvalue>g&&u.minvalue<=g)return{code:u.code,seriesIndex:z};u.maxvalue===g&&(J=z);z+=1;u=h[z]}return(u=h[J])&&u.maxvalue===g?{code:u.code,seriesIndex:J}:{outOfRange:!0}}};fb.prototype.constructor=fb;Z.colorRange=fb;Y=Z.configureGradientLegendOptions=
function(g,h){var u=g.legend,F=h.chart;u.legendSliderBorderWidth=Ta(F.legendpointerborderthickness,1);u.legendSliderBorderColor=ya(La(F.legendpointerbordercolor,z),Ta(F.legendpointerborderalpha,100));u.legendSliderWidth=Ta(F.legendpointerwidth,F.legendpointerswidth,12);u.legendSliderHeight=Ta(F.legendpointerheight,F.legendpointersheight,12);u.legendColorBoxBorderColor=u.borderColor;u.legendColorBoxBorderWidth=u.borderWidth;u.legendScaleColor=ya(La(F.legendscalelinecolor,z),Ta(F.legendscalelinealpha,
100));u.legendScalePadding=Ta(F.legendscalepadding,4);u.legendScaleLineThickness=Ta(F.legendscalelinethickness,1);u.legendScaleTickDistance=Ta(F.legendscaletickdistance,6);u.itemStyle.cursor="default";u.interActivity=Ta(F.interactivelegend,1)};Z.placeGLegendBlockRight=function(g,h,z,u,J){this.configureLegendOptions(g,h.chart,!0,J,z);Y(g,h);J=this.snapLiterals||(this.snapLiterals={});var F=g[gb],P=this.smartLabel||F.smartLabel,v=g.legend,ea=g.chart.spacingRight,B,H,Q=v.textPadding=2,ba=2*Q,ra=v.title.padding,
na=0,da=0,ya=2*v.padding;h=Ta(h.chart.legendpadding,7)+v.borderWidth/2+1;var I=g.colorRange||{},Z=I.colorArr,Ia=I.mapbypercent,Ja=I.scaleMin,La=I.scaleMax-Ja,Ga=v.legendSliderWidth,ja=v.legendSliderHeight/2;H=v.legendScalePadding;var y=v.legendScaleTickDistance,Ka=v.itemStyle||{};B=Ta(parseInt(Ka.lineHeight,10)||12);var Ua=.75*B,Ca=z-ya,Da,qa,za=0,Xa,q,fa,Aa,Ha,Ea,Sa;u-=ya;if(!I.noValidRange&&Z&&1<(qa=Z.length)){qa-=1;v.title.text!==ha&&(P.setStyle(v.title.style),B=P.getSmartText(v.title.text,Ca,
Na(B,u/4)),v.title.text=B.text,na=B.width+ya,u-=da=B.height+ra);P.setStyle(Ka);B=P.lineHeight;Ca-=y+H+Ga;v.colorBoxX=Ga;ra=Na(B,Ca/2);Ca=V(Ca-ra-4,B);Xa=Na(B,u/2);Da=u/4;y=Z[0];y.scaleLabel=A(y.maxvalue,Ia);B=P.getSmartText(y.label,Da,Ca);y.label=B.text;Ka=B.height;y.labelY=Ua-B.height/2;H=P.getSmartText(y.scaleLabel,ra,Xa);y.scaleLabel=H.text;I=H.height/2;q=H.width;y.scaleLabelY=Ua-H.height/2;v.colorBoxY=Na(I,B.width+ba,ja)+da;y=Sa=Z[qa];y.scaleLabel=A(y.maxvalue,Ia);B=P.getSmartText(y.label,Da,
Ca);y.label=B.text;Ka=Na(Ka,B.height);y.labelY=Ua-B.height/2;H=P.getSmartText(y.scaleLabel,ra,Xa);y.scaleLabel=H.text;q=Na(q,H.width);Da=H.height/2;B=Na(B.width+ba,Da,ja);y.scaleLabelY=Ua-H.height/2;v.colorBoxHeight=ja=u-v.colorBoxY-B;Xa=ja-Da;fa=ja/La;Ha=V(ja-za,Xa-I)-4;for(Da=1;Da<qa;Da+=1)y=Z[Da],Aa=(y.maxvalue-Ja)*fa,B=P.getSmartText(y.label,2*V(Aa-za,ja-Aa),Ca),y.label=B.text,Ka=Na(Ka,B.height),y.labelY=Ua-B.height/2,B=B.width/2,y.scaleLabel=A(y.maxvalue,Ia),H=P.getSmartText(y.scaleLabel,ra,
2*V(Aa-I,Xa-Aa)),y.scaleLabel=H.text,q=Na(q,H.width),Ea=H.height/2,y.scaleLabelY=Ua-H.height/2,Ha=V(Ha,(Aa-Na(Ea+I,B+za)-4)*La/y.range),za=B+Aa,I=Ea+Aa;Ha=Na(V(Ha,(V(Xa-I,ja-za)-4)*La/Sa.range,.3*u),0);v.colorBoxHeight-=Ha;v.colorBoxWidth=Ka&&Ka+ba||15;v.height=v.totalHeight=u+da+ya-Ha;v.width=(q&&q+Q)+v.colorBoxWidth+Ga+v.legendScaleTickDistance+v.legendScalePadding+ya;v.width<na&&(v.colorBoxX+=(na-v.width)/2,v.width=na);v.width>z&&(v.width=z);J.legendstartx=F.width-ea-v.width;J.legendwidth=v.width;
J.legendendx=J.legendstartx+J.legendwidth;J.legendheight=v.height;h+=v.width;g.chart.marginRight+=h;return h}v.enabled=!1;return 0};Z.placeGLegendBlockBottom=function(g,h,z,u,J){this.configureLegendOptions(g,h.chart,!1,J,z);Y(g,h);J=this.snapLiterals||(this.snapLiterals={});var F=g[gb],B=this.smartLabel||F.smartLabel,v=g.legend,H=g.chart,ea=H.spacingBottom,ra=H.spacingLeft,H=H.spacingRight,Q,ba,na=v.textPadding=2,da=v.title.padding,ya=0,Z=0,I=2*v.padding;h=Ta(h.chart.legendpadding,7)+v.borderWidth/
2+1;var Ga=g.colorRange||{},Ia=Ga.colorArr,Ja=Ga.mapbypercent,Sa=Ga.scaleMin,Qa=Ga.scaleMax-Sa,ja=v.legendSliderWidth,y=v.legendSliderHeight,Ka=v.legendScalePadding,Ua=v.legendScaleTickDistance,Ca=v.itemStyle||{};Q=Ta(parseInt(Ca.lineHeight,10)||12);var Da=.75*Q,qa=u-I,za,Xa,q,fa,Aa=0,Ha,Ea,Ma;z-=I;if(!Ga.noValidRange&&Ia&&1<(Xa=Ia.length)){Xa-=1;v.title.text!==ha&&(B.setStyle(v.title.style),Q=B.getSmartText(v.title.text,z,qa/3),v.title.text=Q.text,ya=Q.width+I,qa-=Z=Q.height+da);B.setStyle(Ca);Q=
B.lineHeight;qa-=Ua+Ka+y;da=Na(Q,qa/2);Ca=V(qa-da-4,Q);za=z/4;fa=2*za;q=Ia[0];q.scaleLabel=A(q.maxvalue,Ja);Q=B.getSmartText(q.label,za,Ca);q.label=Q.text;qa=Q.height;q.labelY=Da-Q.height/2;ba=B.getSmartText(q.scaleLabel,fa,da);q.scaleLabel=ba.text;Ka=ba.width/2;Ua=ba.height;q.code||(q.code=La(v.minColor,"CCCCCC"));v.colorBoxX=Na(Ka,Q.width+na,ja);q=Ga=Ia[Xa];q.scaleLabel=A(q.maxvalue,Ja);Q=B.getSmartText(q.label,za,Ca);q.label=Q.text;qa=Na(qa,Q.height);q.labelY=Da-Q.height/2;ba=B.getSmartText(q.scaleLabel,
fa,da);q.scaleLabel=ba.text;Ua=Na(Ua,ba.height);q=ba.width/2;Q=Na(Q.width+na,q,ja);v.colorBoxWidth=ja=z-v.colorBoxX-Q;fa=ja-q;Ha=ja/Qa;Ma=V(ja-Aa,fa-Ka)-4;for(za=1;za<Xa;za+=1)q=Ia[za],Ea=(q.maxvalue-Sa)*Ha,Q=B.getSmartText(q.label,2*V(Ea-Aa,ja-Ea),Ca),q.label=Q.text,qa=Na(qa,Q.height),q.labelY=Da-Q.height/2,Q=Q.width/2,q.scaleLabel=A(q.maxvalue,Ja),ba=B.getSmartText(q.scaleLabel,2*V(Ea-Ka,fa-Ea),da),q.scaleLabel=ba.text,Ua=Na(Ua,ba.height),ba=ba.width/2,Ma=V(Ma,(Ea-Na(ba+Ka,Q+Aa)-4)*Qa/q.range),
Aa=Q+Ea,Ka=ba+Ea;Ma=Na(V(Ma,(V(fa-Ka,ja-Aa)-4)*Qa/Ga.range,.3*z),0);v.colorBoxWidth-=Ma;v.width=z+I-Ma;v.width<ya&&(v.colorBoxX+=(ya-v.width)/2,v.width=ya);v.colorBoxY=Z+y;v.colorBoxHeight=qa&&qa+2*na||15;v.height=v.totalHeight=(Ua&&Ua+na)+v.colorBoxHeight+Z+y+v.legendScaleTickDistance+v.legendScalePadding+I;v.height>u&&(v.height=u);J.legendstartx=ra+.5*(F.width-ra-H-v.width)+(v.x||0);J.legendwidth=v.width;J.legendendx=J.legendstartx+J.legendwidth;J.legendstarty=F.height-ea-v.height;J.legendheight=
v.height;J.legendendy=J.legendstarty+J.legendheight;h+=v.height;g.chart.marginBottom+=h;return h}v.enabled=!1;return 0};Ga=function(){return{point:this}};Cb=function(g){return na(100*g)/100};Z.rendererRoot.drawGradientLegendItem=function(g){var h=this,B=h.paper,H=h.options,J=h.canvasLeft,A=h.canvasTop,P=h.canvasWidth,v=h.canvasHeight,V=H.colorRange,da,Z,Q,ba,Y=H.legend,Ma=Ta(Y.padding,4),Qa=Y.itemStyle,H=Y.symbolStyle,hb=Y.interActivity,I=g.elements;g=I.elementGroup.trackTooltip(!0);var gb="vertical"===
Y.layout,Ia,Ja,jb,fb,ja,y,Ka=0,Ua=Y.lighting3d,Ca=Y.colorBoxWidth,Da=Y.colorBoxHeight,qa=Ca,za=Da,Xa={FCcolor:{color:ha,alpha:ha,angle:0,ratio:ha}},q=Xa.FCcolor,fa=Y.colorBoxX+Ma,Aa=Y.colorBoxY+Ma,Ha,Ea,pb=Y.legendColorBoxBorderColor,Mb=Y.legendColorBoxBorderWidth,ta=["M"],Hb=Y.legendScaleColor;y=Y.legendScalePadding;var Nb=Y.legendScaleLineThickness,sb=Nb%2/2;Z=Y.legendScaleTickDistance;var wb=Y.legendSliderWidth,Db=Y.legendSliderHeight;ja=za/2;ba=qa/2;var tb=wb/2,Wa=Db/2,Ob,Za,Eb;Ea=0;var Rb=rb("ABABAB",
50),Ma=bc("ABABAB",70),Y=ya("ABABAB",100),Ma=ya(Ma,100),Rb=ya(Rb,100),Fb,Fa={isFirst:!0},wa={},bb,ab,Gb,b;if(V&&(da=V.colorArr)&&1<(Q=da.length)){Fa.toolText=bb=jb=V.scaleMin;wa.toolText=ab=V=V.scaleMax;fb=V-jb;Fa.snapPX=wa.snapPX=0;Fa.tooltipConstraint=wa.tooltipConstraint="chart";Fa.getLabelConfig=wa.getLabelConfig=Ga;Fa.tooltipPos=[0,0];wa.tooltipPos=[0,0];wa.tooltipOffsetReference=Fa.tooltipOffsetReference={};wa.tooltipOffsetReference.left=Fa.tooltipOffsetReference.left+=J-20;wa.tooltipOffsetReference.top=
Fa.tooltipOffsetReference.top+=A;Gb=I.colorBox=B.group("colorBox",g);if(gb){Fa.tooltipPos[0]=wa.tooltipPos[0]=P+J;Ea=270;q.angle=90;J=fa-wb;P=fa+qa;A=Aa-Wa;Ia=Aa+Wa;J=na(fa-wb)+.5;P=na(fa)+.5;A=na(Aa-Wa)+.5;Ia=na(Aa+Wa)+.5;Ob=na(fa+qa)+.5;Eb=na(Aa-2)+.5;Ja=na(Aa+2)+.5;Ha=na(Aa)+.5;v=fa-tb/2;Za=na(v-Wa)+.5;v=na(v)+.5;ja=Aa-Wa/2;Wa=na(ja+Wa)+.5;ja=na(ja)+.5;Ca/=2;tb=["M",J,A,"L",P,A,P,Eb,Ob,Ha,P,Ja,P,Ia,J,Ia,"Z","M",Za,ja,"L",v,ja,"M",Za,Ha,"L",v,Ha,"M",Za,Wa,"L",v,Wa];Wa=["M",J+1,A,"L",J+1,Ia,"M",
Za,ja-1,"L",v,ja-1,"M",Za,Ha-1,"L",v,Ha-1,"M",Za,Wa-1,"L",v,Wa-1];ja=fa+qa+y;Ia=na(ja+Z)+sb;ja=na(ja)+sb;Ha=fa+ba;Za=Q-1;for(Z=0;Z<Q;Z+=1)ba=da[Z],P=(ba.maxvalue-jb)/fb,Ja=za*P+Aa,y=na(Ja)+sb,Z?(q.ratio+=F,q.color+=F,q.alpha+=F,ta.push("L",ja,y,Ia,y,"M",ja,y),Z===Za?(v=Qb,y=Ja+2):(v=qb,y=Ja)):(ta.push(ja,y,"L",Ia,y,"M",ja,y),v=Sa,y=Ja-2),q.ratio+=100*(P-Ka),q.color+=La(ba.code,z),q.alpha+=La(ba.alpha,100),Ka=P,ba.legendItem=B.text(g).attr({text:ba.label,x:Ha,y:y,"text-anchor":v,"vertical-align":qb}).rotate(Ea,
Ha,y).css(Qa),ba.legendSymbol=B.text(g).attr({text:ba.scaleLabel,x:Ia,y:Ja,"text-anchor":Sa,"vertical-align":qb}).css(Qa);Fa.xMin=wa.xMin=0;Fa.xMax=wa.xMax=0;Fa.yMin=wa.yMin=0;Fa.yMax=wa.yMax=za;Fa.x=wa.x=0;Fa.y=0;wa.y=za;da=Db+qa;Q=wb}else{Fa.tooltipPos[1]=wa.tooltipPos[1]=v+A;J=na(fa-tb)+.5;P=na(fa+tb)+.5;A=na(Aa-Db)+.5;Ia=na(Aa+za)+.5;Ob=na(fa-2)+.5;v=na(fa+2)+.5;Za=na(fa)+.5;Eb=na(Aa)+.5;Ja=Aa-Wa/2;Ha=na(Ja-Wa)+.5;Ja=na(Ja)+.5;Ea=fa-tb/2;ba=na(Ea+tb)+.5;Ea=na(Ea)+.5;Da/=2;tb=["M",J,A,"L",P,A,
P,Eb,v,Eb,Za,Ia,Ob,Eb,J,Eb,"Z","M",Ea,Ha,"L",Ea,Ja,"M",Za,Ha,"L",Za,Ja,"M",ba,Ha,"L",ba,Ja];Wa=["M",J,A+1,"L",P,A+1,"M",Ea-1,Ha,"L",Ea-1,Ja,"M",Za-1,Ha,"L",Za-1,Ja,"M",ba-1,Ha,"L",ba-1,Ja];y=Aa+za+y;Ea=na(y+Z)+sb;y=na(y)+sb;Ja=Aa+ja;Za=Q-1;for(Z=0;Z<Q;Z+=1)ba=da[Z],P=(ba.maxvalue-jb)/fb,Ia=qa*P+fa,ja=na(Ia)+sb,Z?(q.ratio+=F,q.color+=F,q.alpha+=F,ta.push("L",ja,y,ja,Ea,"M",ja,y),Z===Za?(v=Sa,ja=Ia+2):(v=qb,ja=Ia)):(ta.push(ja,y,"L",ja,Ea,"M",ja,y),v=Qb,ja=Ia-2),q.ratio+=100*(P-Ka),q.color+=La(ba.code,
z),q.alpha+=La(ba.alpha,100),Ka=P,ba.legendItem=B.text(g).attr({text:ba.label,x:ja,y:Ja,"text-anchor":v,"vertical-align":qb}).css(Qa),ba.legendSymbol=B.text(g).attr({text:ba.scaleLabel,x:Ia,y:Ea,"text-anchor":qb,"vertical-align":ea}).css(Qa);Fa.xMin=wa.xMin=0;Fa.xMax=wa.xMax=qa;Fa.yMin=wa.yMin=0;Fa.yMax=wa.yMax=0;Fa.y=wa.y=0;Fa.x=0;wa.x=qa;da=wb;Q=Db+za}I.colorBox=B.rect(Gb).attr({x:fa,y:Aa,width:qa,height:za,fill:ib(Xa),stroke:pb,strokeWidth:Mb});Ua&&(I.colorBoxEffect=B.rect(Gb).attr({x:fa,y:Aa,
width:Ca,height:Da,fill:ac,"stroke-width":0}));I.scale=B.path(g).attr({path:ta,stroke:Hb,"stroke-width":Nb});Fb=function(d,a,c,e,f){var p;gb?(p=a*fb/za+jb,e=0<a?e:e+a+.01):(p=d*fb/qa+jb,c=0<d?c:c+d+.01);d=Cb(p);f?(I.slider1.translate(c,e),I.slider1Effect.translate(c,e),I.slider1Tracker.toFront().translate(c,e).tooltip(d,null,null,!0),bb=p):(I.slider2.translate(c,e),I.slider2Effect.translate(c,e),I.slider2Tracker.toFront().translate(c,e).tooltip(d,null,null,!0),ab=p);hb&&(b=clearTimeout(b),b=setTimeout(function(){h.setScaleRange&&
h.setScaleRange(bb,ab)},100))};Ua=function(b,a){var c=0,e=c,f,p=this.isFirst,n=p?wa:Fa;if(gb){e=this._startY+a;0>=e&&(e=0);e>za&&(e=za);if(p?e>n.y:e<n.y)e=n.y;ra(e-this.y)>=(this.snapPX||0)&&(f=!0)}else{c=this._startX+b;0>=c&&(c=0);c>qa&&(c=qa);if(p?c>n.x:c<n.x)c=n.x;ra(c-this.x)>=(this.snapPX||0)&&(f=!0)}f&&(Fb(c,e,c-this.x,e-this.y,p),this.x=c,this.y=e)};Ca=function(){var b=this.isFirst;this._startX=this.x;this._startY=this.y;this._scaleStart=bb;this._scaleEnd=ab;u.raiseEvent("LegendPointerDragStart",
{pointerIndex:b?0:1,pointers:[{value:bb},{value:ab}],legendPointerHeight:Db,legendPointerWidth:wb},h.logic.chartInstance)};Da=function(){var b=this._scaleStart,a=this._scaleEnd;u.raiseEvent("LegendPointerDragStop",{pointerIndex:this.isFirst?0:1,pointers:[{value:bb},{value:ab}],legendPointerHeight:Db,legendPointerWidth:wb},h.logic.chartInstance);b===bb&&a===ab||u.raiseEvent("LegendRangeUpdated",{previousMinValue:b,previousMaxValue:a,minValue:bb,maxValue:ab},h.logic.chartInstance);delete this._scaleStart;
delete this._scaleEnd};Xa=Cb(jb);I.slider1=B.path(g).attr({path:tb,fill:Y,strokeWidth:1,stroke:Ma});I.slider1Effect=B.path(g).attr({path:Wa,fill:"none",strokeWidth:1,stroke:Rb});vb&&(J-=.5*(Na(30,da)-da),A-=.5*(Na(40,Q)-Q),da=Na(30,da),Q=Na(40,Q));I.slider1Tracker=B.rect(g).attr({ishot:!0,width:da,height:Q,x:J,y:A,fill:cc,stroke:"none"}).drag(Ua,Ca,Da,Fa,Fa,Fa).tooltip(Xa,null,null,!0).css(H);Xa=Cb(V);I.slider2=B.path(g).attr({path:tb,fill:Y,strokeWidth:1,stroke:Ma}).translate(wa.x,wa.y);I.slider2Effect=
B.path(g).attr({path:Wa,fill:"none",strokeWidth:1,stroke:Rb}).translate(wa.x,wa.y);I.slider2Tracker=B.rect(g).attr({ishot:!0,width:da,height:Q,x:J,y:A,fill:cc,stroke:"none"}).translate(wa.x,wa.y).css(H).drag(Ua,Ca,Da,wa,wa,wa).tooltip(Xa,null,null,!0)}}}]);
FusionCharts.register("module",["private","modules.renderer.js-powercharts",function(){function hb(b,d,a){var c=b.fcObj;A.hcLib.createChart(c,b.container,b.type,void 0,void 0,!1,!0);u.raiseEvent("chartUpdated",H({sourceEvent:a},d),c,[c.id])}function pb(b,d,a,c,e,f){var p=Pa.atan((d-c)/(b-a)),n=[];0>p&&(p=2*Pa.PI+p);if(c>d){if(a>=b&&p>Pa.PI||a<b&&p>Pa.PI)p-=Pa.PI}else if(a>=b&&p<Pa.PI&&0!==p||a<b&&p<Pa.PI)p+=Pa.PI;"undefined"==typeof f?(a=b+e*xa(p),e=d+e*$a(p)):(e=P(e)/2,f=P(f)/2,a=b+(e=b<a?e:-e),
e=d+e*Pa.tan(p),P(d-e)>P(f)&&(e=d+(f=d<c?f:-f),a=b+f/Pa.tan(p)));n.push("L",a,e,a+10*xa(p+.79),e+10*$a(p+.79),"M",a+10*xa(p-.79),e+10*$a(p-.79),"L",a,e);return n}function fb(b,d){var a;d._origAttr||(d._origAttr={});for(a in b)cc.test(a)||(d._origAttr[a]=b[a]);return d._origAttr}var A=this,u=A.hcLib,Z=u.Raphael,Qa=A.window,Ta=Qa.document,z=u.BLANKSTRING,ac=u.createTrendLine,gb=u.parseTooltext,h=u.pluck,B=u.getValidValue,g=u.pluckNumber,da=u.getFirstValue,Mb=u.getDefinedColor,F=u.parseUnsafeString,
ha=u.FC_CONFIG_STRING,H=u.extend2,ya=u.getDashStyle,ea=u.toRaphaelColor,qb=u.toPrecision,Sa=u.hasSVG,Qb=u.createContextMenu,bc=u.isIE,rb=u.regex.dropHash,La=u.HASHSTRING,Ma=function(b,d){var a;b||(b={});for(a in d)b[a]=d[a];return b},ib=u.each,vb=u.addEvent,na=u.removeEvent,Na=u.getTouchEvent,V=function(b){return void 0!==b&&null!==b},ra="rgba(192,192,192,"+(bc?.002:1E-6)+")",Y=u.TOUCH_THRESHOLD_PIXELS,Ga=u.CLICK_THRESHOLD_PIXELS,Cb=8===Qa.document.documentMode?"visible":"",cc=/^_/,Hb=u.BGRATIOSTRING,
Pa=Math,$a=Pa.sin,xa=Pa.cos,ma=Pa.round,J=Pa.min,Ya=Pa.max,P=Pa.abs,v=Pa.PI,jc=Pa.ceil,$b=Pa.floor,Ac=Pa.sqrt,Q=Pa.pow,ba=v/180,uc=2*v,ob=u.hasTouch,dc=ob?Y:Ga,ec=u.graphics.getColumnColor,I=u.getFirstColor,kc=u.setLineHeight,Ia=u.pluckFontSize,Ja=u.pluckColor,jb=u.getFirstAlpha,lc=u.graphics.getDarkColor,ja=u.graphics.getLightColor,y=u.graphics.convertColor,Ka=u.COLOR_TRANSPARENT,Ua=u.POSITION_CENTER,Ca=u.POSITION_TOP,Da=u.POSITION_BOTTOM,qa=u.POSITION_RIGHT,za=u.POSITION_LEFT,Xa=u.bindSelectionEvent,
q=u.chartAPI,fa=u.graphics.mapSymbolName,Ga=q.singleseries,Aa=u.COMMASTRING,Ha=u.ZEROSTRING,Ea=u.HUNDREDSTRING,$c=u.COMMASPACE,fc=u.getMouseCoordinate,Y=!/fusioncharts\.com$/i.test(Qa.location.hostname),ta=u.plotEventHandler,ad=A.xssEncode,Nb=u.SHAPE_RECT,sb=u.deltend,v=u.graphics,wb=v.parseColor,Db=v.getValidColor,tb=u.placeHorizontalAxis,Wa=u.placeVerticalAxis,Ob=u.stepYAxisNames,Za=u.adjustHorizontalCanvasMargin,Eb=u.adjustVerticalCanvasMargin,Rb=u.getDataParser,Fb={pageX:0,pageY:0},Fa,wa,bb,ab=
function(){this.data("move",!1);clearTimeout(this._longpressactive);delete this._longpressactive},Gb=u.createElement;u.eventList.chartupdated="FC_ChartUpdated";u.eventList.dataposted="FC_DataPosted";u.eventList.dataposterror="FC_DataPostError";u.eventList.datarestored="FC_DataRestored";A.addEventListener("rendered",function(b){b=b.sender;var d=b.__state,a=b.jsVars&&b.jsVars.instanceAPI;!d.listenersAdded&&a&&"function"===typeof a.getCollatedData&&(b.addEventListener(["chartupdated","dataupdated","rendered"],
function(a){delete a.sender.__state.hasStaleData}),d.listenersAdded=!0)});q("spline",{friendlyName:"Spline Chart",standaloneInit:!0,creditLabel:Y,defaultSeriesType:"spline",rendererId:"spline"},q.linebase);q("splinearea",{friendlyName:"Spline Area Chart",standaloneInit:!0,creditLabel:Y,defaultSeriesType:"areaspline",anchorAlpha:"100",rendererId:"spline"},q.area2dbase);q("msspline",{friendlyName:"Multi-series Spline Chart",standaloneInit:!0,creditLabel:Y,defaultSeriesType:"spline",rendererId:"spline"},
q.mslinebase);q("mssplinedy",{friendlyName:"Multi-series Dual Y-Axis Spline Chart",standaloneInit:!0,creditLabel:Y,isDual:!0,series:q.mscombibase.series,secondarySeriesType:"spline",secondarySeriesFilter:{spline:!0},defaultSeriesFilter:{spline:!0}},q.msspline);q("mssplinearea",{friendlyName:"Multi-series Spline Area Chart",standaloneInit:!0,creditLabel:Y,defaultSeriesType:"areaspline",rendererId:"spline"},q.msareabase);q("msstepline",{friendlyName:"Multi-series Step Line Chart",standaloneInit:!0,
creditLabel:Y,defaultSeriesType:"line",rendererId:"cartesian",stepLine:!0},q.mslinebase);q("inversemsline",{friendlyName:"Inverted Y-Axis Multi-series Line Chart",standaloneInit:!0,creditLabel:Y,inversed:!0,rendererId:"cartesian"},q.mslinebase);q("inversemsarea",{friendlyName:"Inverted Y-Axis Multi-series Area Chart",standaloneInit:!0,creditLabel:Y,inversed:!0,rendererId:"cartesian"},q.msareabase);q("inversemscolumn2d",{friendlyName:"Inverted Y-Axis Multi-series Column Chart",standaloneInit:!0,creditLabel:Y,
inversed:!0,rendererId:"cartesian"},q.mscolumn2dbase);q("logmsline",{friendlyName:"Multi-series Log Line Chart",standaloneInit:!0,isValueAbs:!0,isLog:!0,configureAxis:q.logbase.configureAxis,pointValueWatcher:q.logbase.pointValueWatcher,getLogAxisLimits:q.logbase.getLogAxisLimits,creditLabel:Y,rendererId:"cartesian"},q.mslinebase);q("logmscolumn2d",{friendlyName:"Multi-series Log Column Chart",standaloneInit:!0,isLog:!0,isValueAbs:!0,configureAxis:q.logbase.configureAxis,pointValueWatcher:q.logbase.pointValueWatcher,
getLogAxisLimits:q.logbase.getLogAxisLimits,creditLabel:Y,rendererId:"cartesian"},q.mscolumn2dbase);q("logstackedcolumn2d",{friendlyName:"Stacked Log Column Chart",standaloneInit:!0,creditLabel:Y,isStacked:!0},q.logmscolumn2d);q("errorbar2d",{friendlyName:"Error Bar Chart",standaloneInit:!0,creditLabel:Y,showValues:0,rendererId:"cartesian",isErrorChart:!0,fireGroupEvent:!0,chart:function(){var b=this.base.chart.apply(this,arguments),d=this.drawErrorValue;b.callbacks||(b.callbacks=[]);b.callbacks.push(function(){for(var a=
this.elements.plots,b=this.dataset||this.options.series,e=a&&a.length;e--;)b[e]&&d.call(this,a[e],b[e])});return b},point:function(b,d,a,c,e,f,p,n,t){b=g(c.ignoreemptydatasets,0);var l=!1,r=!g(c.halferrorbar,1),k=e[ha],m=h(this.isValueAbs,k.isValueAbs,!1),s=g(a.showvalues,k.showValues),C=g(d.yAxis,0),ga=g(c.use3dlighting,1),G=e[ha].numberFormatter,x=this.colorManager,w=g(c.useplotgradientcolor,1)?Mb(c.plotgradientcolor,x.getColor("plotGradientColor")):z,Ba=h(a.alpha,c.plotfillalpha,"100"),D=jb(h(a.errorbaralpha,
c.errorbaralpha,Ba)),kb=g(a.dashed,c.plotborderdashed,0),db=g(a.dashlen,c.plotborderdashlen,5),E=g(a.dashgap,c.plotborderdashgap,4),$=h(d.type,this.defaultSeriesType),S=e.plotOptions[$]&&e.plotOptions[$].stacking,$=x.getPlotColor(),K,q,ca,la,M,u,L,W,O,N,ia,X,R,v,U,Oa;this.errorBarShadow=g(c.errorbarshadow);d.errorBar2D=!0;d.name=B(a.seriesname);S||(d.columnPosition=g(t,n,p));if(0===g(a.includeinlegend)||0===Ba||void 0===d.name)d.showInLegend=!1;d.errorBarWidthPercent=g(a.errorbarwidthpercent,c.errorbarwidthpercent,
70);d.errorBarColor=y(I(h(a.errorbarcolor,c.errorbarcolor,"AAAAAA")),D);d.errorBarThickness=g(a.errorbarthickness,c.errorbarthickness,1);d.color=h(a.color,$).split(",")[0].replace(/^#?/g,"#");if(p=a.data)for(X=h(c.plotborderthickness,"1"),S=e.chart.useRoundEdges,t=this.isBar,n=/3d$/.test(e.chart.defaultSeriesType),v=h(c.plotbordercolor,x.getColor("plotBorderColor")).split(",")[0],U="0"==c.showplotborder?"0":h(c.plotborderalpha,"100"),U=n?c.showplotborder?U:"0":U,v=n?h(c.plotbordercolor,"#FFFFFF"):
v,x=0;x<f;x+=1)(q=p[x])?(W=G.getCleanValue(q.value,m),O=G.getCleanValue(q.errorvalue,m),null===W?d.data.push({y:null}):(l=!0,L=k.oriCatTmp[x],la=h(q.color,a.color,$),M=jb(h(q.alpha,Ba))+z,K=h(q.ratio,a.ratio,c.plotfillratio),ca=h(360-c.plotfillangle,90),0>W&&(ca=360-ca),N={opacity:M/100},R=J(M,jb(U))+z,u=ec(la+","+w,M,K,ca,S,v,R,t,n),ia={opacity:D/250},Oa=this.getPointStub(q,W,L,e,a,s,C,O),L=[],L.push({errorValue:O,toolText:Oa._errortoolText,shadow:ia}),r&&L.push({errorValue:-O,toolText:Oa._errortoolText,
shadow:ia}),K=this.pointHoverOptions(q,d,{plotType:"column",is3d:n,isBar:t,use3DLighting:ga,isRoundEdged:S,color:la,gradientColor:w,alpha:M,ratio:K,angle:ca,borderWidth:X,borderColor:v,borderAlpha:R,borderDashed:kb,borderDashGap:E,borderDashLen:db,shadow:N}),d.data.push(H(Oa,{y:W,shadow:N,errorValue:L,color:u[0],borderColor:u[1],borderWidth:X,use3DLighting:ga,dashStyle:g(q.dashed,kb)?ya(h(q.dashlen,db),h(q.dashgap,E),X):void 0,hoverEffects:K.enabled&&K.options,rolloverProperties:K.enabled&&K.rolloverOptions})),
this.pointValueWatcher(e,W,O))):d.data.push({y:null});b&&!l&&(d.showInLegend=!1);return d},pointValueWatcher:function(b,d,a){var c=b[ha];null!==d&&(a?(b=d+a,d-=a):b=d,c[0]||(c[0]={}),a=c[0],a.max=a.max>b?a.max:b,a.min=a.min<b?a.min:b,a.max=a.max>d?a.max:d,a.min=a.min<d?a.min:d)},drawErrorValue:function(b,d){var a=this,c=a.options,e=c.plotOptions.series,f=c[ha],f=a.smartLabel||f.smartLabel,p=a.paper,n=a.layers,t=a.xAxis[0],l=a.yAxis[0],h=isNaN(+e.animation)&&e.animation.duration||1E3*e.animation,k=
n.dataset=n.dataset||p.group("dataset-orphan"),m=b.errorGroup=p.group("errorBar").insertAfter(b.lineLayer||k.column||k),s=n.errorTracker||(n.errorTracker=p.group("hot-error",n.tracker||k).toBack()),C=k.errorValueGroup||(k.errorValueGroup=p.group("errorValues")),ga=d.errorBar2D,G=d.data||[],x=G.length,w=b.items,Ba=!1!==(c.tooltip||{}).enabled,D,kb,q,E,$=b.graphics=b.graphics||[],S=!1===d.visible?"hidden":"visible",K=c.chart,Ra=K.valuePadding||0,K=1==K.rotateValues?270:void 0,ca=d.columnPosition||0,
la=a.definition.chart,M=t.getAxisPosition(0),u=t.getAxisPosition(1)-M,L=e.groupPadding,W=e.maxColWidth,M=d.numColumns||1,u=(1-.01*(la&&la.plotspacepercent))*u||J(u*(1-2*L),W*M),la=u/M,ca=ca*la-u/2,M=a.logic,u=!M.avoidCrispError,L=a.canvasHeight+a.canvasTop,O=n.shadows||(n.shadows=p.group("shadows",k).toBack()),n={},W=c.plotOptions.series.dataLabels.style,N=a.chartWidth,ia=a.chartHeight,X={fontFamily:W.fontFamily,fontSize:W.fontSize,lineHeight:W.lineHeight,fontWeight:W.fontWeight,fontStyle:W.fontStyle},
R,y,U,v,B,F,H,aa,I,A,ka,cb,oa,pa,mb,ua,ea,P,sa,va,xb=function(b){ta.call(this,a,b)},Q=function(b){ta.call(this,a,b,"DataPlotRollOver")},ba=function(b){ta.call(this,a,b,"DataPlotRollOut")},Cc=function(b){return function(){void 0!==b&&a.linkClickFN.call({link:b},a)}},Y=function(){m.show();C.attr({transform:"...t"+-N+","+-ia});O.show()};if(0<x){for(;x--;)if(D=G[x],c=g(D.errorStartValue,D.y),cb=D.errorValue,k=D.link,void 0!==c&&cb&&(mb=cb.length)){D=g(D.x,x);E=l.getAxisPosition(c);q=t.getAxisPosition(D);
ga&&(ca&&(q+=ca),la&&(q+=la/2));A=w[x]||(w[x]={});A.errorBars=A.errorBars||[];A.errorValues=A.errorValues||[];A.trackerBars=A.trackerBars||[];for(y=(R=A.tracker||A.graphic)&&R.data("groupId");mb--;)sa=ua=va=null,oa=cb[mb],I=oa.errorStartValue,kb=oa.tooltext||oa.toolText,B=isNaN(I)?E:l.getAxisPosition(I),U=oa.displayValue,pa=oa.errorValue,oa&&V(pa)&&(v=g(oa.isHorizontal,0),P=g(oa.errorBarThickness,d.errorBarThickness,1),ua=g(la*d.errorBarWidthPercent/100,oa.errorWidth,v?d.hErrorBarWidth:d.vErrorBarWidth,
d.errorBarWidth),ea=ua/2,ua=oa.errorBarColor||d.errorBarColor,V(U)&&U!==z&&(va=p.text(C).attr({text:U,fill:W.color,"text-bound":[W.backgroundColor,W.borderColor,W.borderThickness,W.borderPadding,W.borderRadius,W.borderDash]}).css(X),f.setStyle(X),n=f.getOriSize(U)),v?(U=ka=I=t.getAxisPosition(D+pa),v=q,u&&(U=ma(B)+P%2/2,v=ma(ka)+P%2/2),B=["M",q,U,"H",v,"M",v,U-ea,"V",U+ea]):(U=ka=I=l.getAxisPosition((V(I)?I:c)+pa),v=q,u&&(U=ma(ka)+P%2/2,v=ma(q)+P%2/2),aa=.5*(K?n.width:n.height),F=ka+.5*P+Ra+aa,H=
ka-.5*P-Ra-aa,B>ka?(I=H,H-a.canvasTop<aa&&(I=F)):(I=F,L-F<aa&&(I=H)),B=["M",v,B,"V",U,"M",v-ea,U,"H",v+ea]),ua=p.path(B,m).attr({stroke:ua,"stroke-width":P,cursor:k?"pointer":"","stroke-linecap":"round",visibility:S}).shadow(g(M.errorBarShadow,e.shadow)&&0<P&&oa.shadow,O),(k||Ba)&&P<dc&&(sa=p.path(B,s).attr({stroke:ra,"stroke-width":dc,cursor:k?"pointer":"",ishot:!!k,visibility:S})),sa=sa||ua,sa.data("eventArgs",R&&R.data("eventArgs")||{link:k,toolText:kb,displayValue:oa.displayValue,value:pa}),sa.click(xb).data("groupId",
y).hover(Q,ba).tooltip(kb),(k||Ba)&&sa.click(Cc(k)),va&&(va.attr({x:q,y:I,title:oa.originalText||"",visibility:S}).css(X),K&&va.attr("transform","T0,0,R"+K)),ua&&($.push(ua),A.errorBars.push(ua)),va&&($.push(va),A.errorValues.push(va)),sa&&sa!==ua&&($.push(sa),A.trackerBars.push(sa)));h&&(m.hide(),C.attr({transform:"...t"+N+","+ia}),O.hide(),setTimeout(Y,h))}b.visible=!1!==d.visible}}},q.mscolumn2dbase);q("errorline",{friendlyName:"Error Line Chart",standaloneInit:!0,creditLabel:Y,chart:q.errorbar2d.chart,
drawErrorValue:q.errorbar2d.drawErrorValue,useErrorGroup:!0,rendererId:"cartesian",isErrorChart:!0,fireGroupEvent:!0,canvasPaddingModifiers:["anchor","errorbar"],point:function(b,d,a,c,e,f){b=g(c.ignoreemptydatasets,0);var p=!1,n=!g(c.halferrorbar,1),t=e[ha],l=h(this.isValueAbs,t.isValueAbs,!1),r=g(a.showvalues,t.showValues),k=g(d.yAxis,0),m=this.numberFormatter,s=this.colorManager,C=I(h(a.color,c.linecolor,s.getPlotColor())),ga=e.chart,G=g(a.alpha,c.linealpha,"100"),x=g(a.errorbaralpha,c.errorbaralpha,
G),w=g(a.linethickness,c.linethickness,2),Ba=Boolean(g(a.dashed,c.linedashed,0)),D=g(a.linedashlen,c.linedashlen,5),kb=g(a.linedashgap,c.linedashgap,4),db,E,$,S,K,u,ca,la,M,v,L,W,O,N,ia,X,R,F,U,Oa,A,Bc,P,aa,ea,V,ka,cb,oa,pa;this.errorBarShadow=g(c.errorbarshadow);d.name=B(a.seriesname);d.color={FCcolor:{color:C,alpha:G}};d.lineWidth=w;ca=g(a.drawanchors,a.showanchors,c.drawanchors,c.showanchors);U=g(a.anchorsides,c.anchorsides,0);Oa=g(a.anchorradius,c.anchorradius,3);A=I(h(a.anchorbordercolor,c.anchorbordercolor,
C));Bc=g(a.anchorborderthickness,c.anchorborderthickness,1);P=I(h(a.anchorbgcolor,c.anchorbgcolor,s.getColor("anchorBgColor")));aa=h(a.anchoralpha,c.anchoralpha,"100");ea=h(a.anchorbgalpha,c.anchorbgalpha,aa);V=g(a.anchorstartangle,c.anchorstartangle,90);s=d.anchorShadow=g(c.anchorshadow,0);d.errorBarWidth=g(c.errorbarwidth,a.errorbarwidth,5);d.errorBarColor=y(I(h(a.errorbarcolor,c.errorbarcolor,"AAAAAA")),x);d.errorBarThickness=J(w,g(a.errorbarthickness,c.errorbarthickness,1));if(0===g(a.includeinlegend)||
void 0===d.name||0===G&&1!==ca)d.showInLegend=!1;d.marker={fillColor:{FCcolor:{color:P,alpha:ea*aa/100+z}},lineColor:{FCcolor:{color:A,alpha:aa+z}},lineWidth:Bc,radius:Oa,symbol:fa(U),startAngle:V};if(c=a.data)for(S=0;S<f;S+=1)(ia=c[S])?(E=m.getCleanValue(ia.value,l),$=m.getCleanValue(ia.errorvalue,l),null===E?d.data.push({y:null}):(p=!0,N=g(ia.anchorsides,U),O=g(ia.anchorradius,Oa),L=I(h(ia.anchorbordercolor,A)),W=g(ia.anchorborderthickness,Bc),v=I(h(ia.anchorbgcolor,P)),la=h(ia.anchoralpha,aa),
M=h(ia.anchorbgalpha,ea),K=I(h(ia.color,C)),u=h(ia.alpha,G),cb=g(ia.dashed,Ba)?ya(D,kb,w):void 0,X={opacity:u/100},ka=void 0===ca?0!==u:!!ca,db=t.oriCatTmp[S],pa=this.getPointStub(ia,E,db,e,a,r,k,$),oa=[],oa.push({errorValue:$,toolText:pa._errortoolText,shadow:{opacity:x/250}}),n&&oa.push({errorValue:null===$?null:-$,toolText:pa._errortoolText,shadow:{opacity:x/250}}),R=h(ia.anchorstartangle,V),F=Boolean(g(ia.anchorshadow,s,0)),db=this.pointHoverOptions(ia,d,{plotType:"anchor",anchorBgColor:v,anchorAlpha:la,
anchorBgAlpha:M,anchorAngle:R,anchorBorderThickness:W,anchorBorderColor:L,anchorBorderAlpha:la,anchorSides:N,anchorRadius:O,shadow:X}),d.data.push(H(pa,{y:E,shadow:X,dashStyle:cb,errorValue:oa,valuePosition:h(ia.valueposition,ga.valuePosition),color:{FCcolor:{color:K,alpha:u}},marker:{enabled:ka,shadow:F&&{opacity:la/100},fillColor:{FCcolor:{color:v,alpha:M*la/100+z}},lineColor:{FCcolor:{color:L,alpha:la}},lineWidth:W,radius:O,symbol:fa(N),startAngle:R},hoverEffects:db.enabled&&db.options,rolloverProperties:db.enabled&&
db.rolloverOptions})),q.errorbar2d.pointValueWatcher(e,E,$))):d.data.push({y:null});b&&!p&&(d.showInLegend=!1);return d}},q.mslinebase);q("errorscatter",{friendlyName:"Error Scatter Chart",isXY:!0,standaloneInit:!0,creditLabel:Y,chart:q.errorbar2d.chart,drawErrorValue:q.errorbar2d.drawErrorValue,defaultZeroPlaneHighlighted:!1,useErrorGroup:!0,rendererId:"cartesian",isErrorChart:!0,fireGroupEvent:!0,point:function(b,d,a,c,e,f,p){b=g(c.ignoreemptydatasets,0);f=!1;var n=g(a.drawline,0),t=g(a.drawprogressioncurve,
0),l,r,k=g(a.showvalues,e[ha].showValues),m=this.numberFormatter,s=g(a.showregressionline,c.showregressionline,0),C=h(c.errorbarcolor,"AAAAAA"),ga=h(c.errorbaralpha,"100"),G=g(c.errorbarthickness,1);r=g(c.errorbarwidth,5);var x=g(c.halfverticalerrorbar,1),w=g(a.verticalerrorbaralpha,a.errorbaralpha,c.verticalerrorbaralpha,ga),Ba=y(h(a.verticalerrorbarcolor,a.errorbarcolor,c.verticalerrorbarcolor,C),w),D=g(a.verticalerrorbarthickness,a.errorbarthickness,c.verticalerrorbarthickness,G),kb=g(c.halfhorizontalerrorbar,
1),ga=h(a.horizontalerrorbaralpha,a.errorbaralpha,c.horizontalerrorbaralpha,ga),C=y(h(a.horizontalerrorbarcolor,a.errorbarcolor,c.horizontalerrorbarcolor,C),ga),G=g(a.horizontalerrorbarthickness,a.errorbarthickness,c.horizontalerrorbarthickness,G),q=g(a.usehorizontalerrorbar,c.usehorizontalerrorbar,0),E=g(a.useverticalerrorbar,c.useverticalerrorbar,1),$={sumX:0,sumY:0,sumXY:0,sumXsqure:0,sumYsqure:0,xValues:[],yValues:[]};l=this.colorManager;var S=l.getPlotColor(),K,u,ca,la,M,v,L,W,O,N,ia,X,R,F,U,
Oa,J,A,H,aa,P,ea,ka,V;this.errorBarShadow=g(c.errorbarshadow);d.zIndex=1;d.name=B(a.seriesname);if(0===g(a.includeinlegend)||void 0===d.name)d.showInLegend=!1;d.vErrorBarWidth=g(a.verticalerrorbarwidth,a.errorbarwidth,c.verticalerrorbarwidth,r);d.hErrorBarWidth=g(a.horizontalerrorbarwidth,a.errorbarwidth,c.horizontalerrorbarwidth,r);if(n||t)t&&(d.type="spline"),u=I(h(a.color,S)),n=h(a.alpha,Ea),t=g(a.linethickness,c.linethickness,2),r=Boolean(g(a.linedashed,a.dashed,c.linedashed,0)),ca=g(a.linedashlen,
c.linedashlen,5),la=g(a.linedashgap,c.linedashgap,4),d.color=y(h(a.linecolor,c.linecolor,u),g(a.linealpha,c.linealpha,n)),d.lineWidth=t,d.dashStyle=r?ya(ca,la,t):void 0;n=Boolean(g(a.drawanchors,a.showanchors,c.drawanchors,c.showanchors,1));p=g(a.anchorsides,c.anchorsides,p+3);t=g(a.anchorradius,c.anchorradius,3);u=I(h(a.anchorbordercolor,a.color,c.anchorbordercolor,u,S));S=g(a.anchorborderthickness,c.anchorborderthickness,1);la=I(h(a.anchorbgcolor,c.anchorbgcolor,l.getColor("anchorBgColor")));v=
h(a.anchoralpha,a.alpha,c.anchoralpha,"100");L=h(a.anchorbgalpha,c.anchorbgalpha,v);ca=h(a.anchorstartangle,c.anchorstartangle);d.anchorShadow=g(c.anchorshadow,0);d.marker={fillColor:this.getPointColor(la,"100"),lineColor:{FCcolor:{color:u,alpha:v+z}},lineWidth:S,radius:t,symbol:fa(p)};if(l=a.data){r=l.length;s&&(d.events={hide:this.hideRLine,show:this.showRLine},P=g(a.showyonx,c.showyonx,1),ea=I(h(a.regressionlinecolor,c.regressionlinecolor,u)),ka=g(a.regressionlinethickness,c.regressionlinethickness,
S),c=jb(g(a.regressionlinealpha,c.regressionlinealpha,v)),ea=y(ea,c));for(K=0;K<r;K+=1)(M=l[K])?(c=m.getCleanValue(M.y),U=m.getCleanValue(M.x),m.getCleanValue(M.errorvalue),Oa=m.getCleanValue(h(M.horizontalerrorvalue,M.errorvalue)),J=m.getCleanValue(h(M.verticalerrorvalue,M.errorvalue)),null===c?d.data.push({y:null,x:U}):(f=!0,A=this.getPointStub(M,c,m.xAxis(U),e,a,k,void 0,J,Oa,U),W=g(M.anchorsides,p),O=g(M.anchorradius,t),N=I(h(M.anchorbordercolor,u)),ia=g(M.anchorborderthickness,S),X=I(h(M.anchorbgcolor,
la)),R=h(M.anchoralpha,M.alpha,v),F=h(M.anchorbgalpha,L),H=Boolean(g(M.usehorizontalerrorbar,q)),aa=Boolean(g(M.useverticalerrorbar,E)),V=[],H&&(H=A._hErrortoolText,V.push({errorValue:Oa,toolText:H,errorBarColor:C,isHorizontal:1,errorBarThickness:G,shadow:{opacity:ga/250}}),kb||V.push({errorValue:-Oa,toolText:H,errorBarColor:C,isHorizontal:1,errorBarThickness:G,shadow:{opacity:ga/250}})),aa&&(aa=A._errortoolText,V.push({errorValue:J,toolText:aa,errorBarColor:Ba,errorBarThickness:D,shadow:{opacity:w/
250}}),x||V.push({errorValue:-J,toolText:aa,errorBarColor:Ba,errorBarThickness:D,shadow:{opacity:w/250}})),aa=this.pointHoverOptions(M,d,{plotType:"anchor",anchorBgColor:X,anchorAlpha:R,anchorBgAlpha:F,anchorAngle:ca,anchorBorderThickness:ia,anchorBorderColor:N,anchorBorderAlpha:R,anchorSides:W,anchorRadius:O}),d.data.push({y:c,x:U,errorValue:V,displayValue:A.displayValue,toolText:A.toolText,link:A.link,marker:{enabled:n,shadow:void 0,fillColor:{FCcolor:{color:X,alpha:F*R/100+z}},lineColor:{FCcolor:{color:N,
alpha:R}},lineWidth:ia,radius:O,symbol:fa(W),startAngle:h(M.anchorstartangle,ca)},hoverEffects:aa.enabled&&aa.options,rolloverProperties:aa.enabled&&aa.rolloverOptions}),this.pointValueWatcher(e,x?c:c-J,kb?U:U-Oa,s&&$),this.pointValueWatcher(e,c+J,U+Oa,s&&$))):d.data.push({y:null});s&&(a=this.getRegressionLineSeries($,P,r),this.pointValueWatcher(e,a[0].y,a[0].x),this.pointValueWatcher(e,a[1].y,a[1].x),e={type:"line",color:ea,showInLegend:!1,lineWidth:ka,enableMouseTracking:!1,marker:{enabled:!1},
data:a,zIndex:0},d=[d,e])}b&&!f&&(d.showInLegend=!1);return d}},q.scatterbase);q("waterfall2d",{friendlyName:"Waterfall Chart",standaloneInit:!0,isWaterfall:!0,creditLabel:Y,point:function(b,d,a,c,e){var f,p,n,t,l,r,k,m,s,C,ga,G,x,w,Ba;b=h(c.connectorthickness,1);var D={step:!0,type:"line",enableMouseTracking:!1,data:[],dataLabels:{enabled:!1},marker:{enabled:!1},dashStyle:"1"===c.connectordashed?ya(g(c.connectordashlen,2),g(c.connectordashgap,2),b):void 0,drawVerticalJoins:!1,useForwardSteps:!0,
color:y(h(c.connectorcolor,"000000"),h(c.connectoralpha,100)),lineWidth:b},kb=this.colorManager,q=a.length,E=e[ha],$=E.axisGridManager,S=e.xAxis,u=E.x,v=/3d$/.test(e.chart.defaultSeriesType),ca=this.isBar,la="1"===h(c.showplotborder,v?"0":"1")?v?1:g(c.plotborderthickness,1):0,M=e.chart.useRoundEdges,J=g(c.plotborderalpha,c.plotfillalpha,100)+z,L=h(c.plotbordercolor,kb.getColor("plotBorderColor").split(",")[0]),W=g(c.useplotgradientcolor,1)?Mb(c.plotgradientcolor,kb.getColor("plotGradientColor")):
z,O=g(c.plotborderdashed,0),N=g(c.plotborderdashlen,6),ia=g(c.plotborderdashgap,3),X=0,R=Boolean(g(c.use3dlighting,1)),lb=0,U=0,Oa=e[ha].numberFormatter,A,H=0,I,aa=g(c.showsumatend,1);for(f=0;f<q;f+=1)m=a[f],b=Oa.getCleanValue(m.value),n=g(m.issum,0),m.vline||n||(H+=b,m._value=b);A=Oa.dataLabels(H);aa&&(aa=!0,q+=1,I={label:da(c.sumlabel,"Total"),_value:H,value:H,issum:1,cumulative:1});for(p=f=0;f<q;f+=1)m=a[f],!m&&aa&&(m=I),m.vline?$.addVline(S,m,X,e):(b=m._value,delete m._value,n=g(m.issum,0),k=
g(m.cumulative,1),n?(b=k?lb:lb===U?lb:lb-U,U=lb,D.data.push({y:null,x:p-.5})):lb+=b,n=g(m.showlabel,c.showlabels,1),n=F(n?da(m.label,m.name):z),$.addXaxisCat(S,X,X,n,m,{},c),X+=1,0<b?(t=h(m.color,c.positivecolor,kb.getPlotColor()),d.hoverEffects&&(d.hoverEffects.color=h(m.positivehovercolor,c.positivehovercolor,c.plotfillhovercolor))):(t=h(m.color,c.negativecolor,kb.getPlotColor()),d.hoverEffects&&(d.hoverEffects.color=h(m.negativehovercolor,c.negativehovercolor,c.plotfillhovercolor))),l=h(m.alpha,
c.plotfillalpha,"100"),r=h(m.ratio,c.plotfillratio),s=h(360-c.plotfillangle,90),0>b&&(s=360-s),G=h(m.alpha,J),x=g(m.dashed,O),w=h(m.dashgap,ia),Ba=h(m.dashlen,N),C={opacity:l/100,inverted:ca},k=ec(t+Aa+W.replace(/,+?$/,""),l,r,s,M,L,h(m.alpha,J),ca,v),ga=x?ya(Ba,w,la):"none",t=this.pointHoverOptions(m,d,{plotType:"column",is3d:v,isBar:ca,use3DLighting:R,isRoundEdged:M,color:t,gradientColor:W,alpha:l,ratio:r,angle:s,borderWidth:la,borderColor:L,borderAlpha:G,borderDashed:x,borderDashGap:w,borderDashLen:Ba,
shadow:C}),l=B(F(m.displayvalue)),r=null===b?b:Oa.dataLabels(b),s=B(F(h(m.tooltext,E.tooltext))),s=E.showTooltip?void 0!==s?gb(s,[1,2,3,5,6,7,20,21,24,25],{formattedValue:r,label:n,yaxisName:F(c.yaxisname),xaxisName:F(c.xaxisname),cumulativeValue:lb,cumulativeDataValue:Oa.dataLabels(lb),sum:A,unformattedSum:H},m,c):null===r?!1:n!==z?n+E.tooltipSepChar+r:r:z,l=g(m.showvalue,E.showValues)?void 0!==l?l:r:z,d.data.push({y:b,_FCY:0>b?lb-b:lb,previousY:0>b?lb:0===lb-b?void 0:lb-b,shadow:C,color:k[0],borderColor:k[1],
borderWidth:la,dashStyle:ga,use3DLighting:R,hoverEffects:t.enabled&&t.options,rolloverProperties:t.enabled&&t.rolloverOptions,displayValue:l,categoryLabel:n,toolText:s,link:h(m.link)}),D.data.push({y:b&&lb,x:p}),this.pointValueWatcher(e,lb),p+=1);u.catCount=X;"0"!=c.showconnectors&&(d=[D,d]);return d},defaultSeriesType:"column",rendererId:"cartesian"},Ga);q("multilevelpie",{friendlyName:"Multi-level Pie Chart",standaloneInit:!0,defaultSeriesType:"multilevelpie",rendererId:"multiLevelPie",defaultPlotShadow:0,
series:function(){var b=this.dataObj,d=this.hcJSON,a=b.chart,c=d.series,e={},f=Boolean(g(a.usehovercolor,1)),p=y(h(a.hoverfillcolor,"FF5904"),g(a.hoverfillalpha,100)),n=parseInt(a.pieradius,10),t=0,l=!0;d.chart.plotBorderColor=0;d.chart.plotBackgroundColor=null;d.plotOptions.series.dataLabels.style=d.xAxis.labels.style;d.plotOptions.series.dataLabels.color=d.xAxis.labels.style.color;d.legend.enabled=!1;d.plotOptions.pie.allowPointSelect=!1;d.plotOptions.series.borderColor=y(h(a.plotbordercolor,a.piebordercolor,
"FFFFFF"),"0"!=a.showplotborder?h(a.plotborderalpha,a.pieborderalpha,100):0);d.plotOptions.series.borderWidth=g(a.pieborderthickness,a.plotborderthickness,1);d.plotOptions.pie.startingAngle=0;d.plotOptions.pie.size="100%";e.showLabels=g(a.showlabels,1);e.showValues=g(a.showvalues,0);e.showValuesInTooltip=g(a.showvaluesintooltip,a.showvalues,0);e.showPercentValues=g(a.showpercentvalues,a.showpercentagevalues,0);e.showPercentInTooltip=g(a.showpercentintooltip,0);e.toolTipSepChar=h(a.tooltipsepchar,
a.hovercapsepchar,$c);e.labelSepChar=h(a.labelsepchar,e.toolTipSepChar);e.tooltext=a.plottooltext;f&&(d.plotOptions.series.point.events={mouseOver:function(){for(var a=this,b=a.chart.plots,c,d;a;)a.graphic.attr({fill:p}),d=a.prevPointIndex,a=a.prevSeriesIndex,a=(c=b[a])&&c.items&&c.items[d]},mouseOut:function(){for(var a=this,b=a.chart.plots,c,d;a;)a.graphic.attr({fill:a.color}),d=a.prevPointIndex,a=a.prevSeriesIndex,a=(c=b[a])&&c.items&&c.items[d]}});d.chart.plotBorderWidth=0;b.category&&this.addMSPieCat(b.category,
0,0,100,h(a.plotfillalpha,a.piefillalpha,100),e,null);n=parseInt(a.pieradius,10);t=0;l=!0;n?(b=2*n/c.length,l=!1):b=parseInt(100/c.length,10);d.plotOptions.series.dataLabels.distance=0;d.plotOptions.series.dataLabels.placeLabelsInside=!0;for(d=0;d<c.length;d+=1)c[d].innerSize=t+(l?"%":""),c[d].size=(t+=b)+(l?"%":""),0===c[d].data[c[d].data.length-1].y&&c[d].data.pop()},spaceManager:function(b,d,a,c){var e=b[ha];this.titleSpaceManager(b,d,a-(e.marginLeftExtraSpace+e.marginRightExtraSpace+b.chart.marginRight+
b.chart.marginLeft),.4*(c-(e.marginBottomExtraSpace+e.marginTopExtraSpace+b.chart.marginBottom+b.chart.marginTop)))},addMSPieCat:function(b,d,a,c,e,f,p){var n=this.numberFormatter,t=this.colorManager,l,r,k=0,m=b.length-1,s,C,ga;l=this.hcJSON.series;var G=f.labelSepChar,x,w,Ba,D,q,u;void 0===this.colorCount&&(this.colorCount=0);0===d&&(this.colorCount=0);l[d]||(l[d]={data:[{toolText:!1,doNotSlice:!0,y:100,visible:!1,color:"rgba(255,255,255,0)"}]});l=l[d];(r=a-100+l.data[l.data.length-1].y)&&l.data.splice(l.data.length-
1,0,{toolText:!1,doNotSlice:!0,y:r,visible:!1,color:"rgba(255,255,255,0)"});l.data[l.data.length-1].y=100-c;for(C=0;C<=m;C+=1)s=b[C],s._userValue=n.getCleanValue(s.value,this.isValueAbs),s._value=g(s._userValue,1),k+=s._value;k=k||1;r=(c-a)/k;for(C=m;0<=C;C-=1)s=b[C],m=r*s._value,ga=F(h(s.label,s.name)),Ba=null!==s._userValue?n.dataLabels(s._userValue):z,D=n.percentValue(s._value/k*100),x=l.data.length-1,w=g(s.alpha,e),u=f.showLabels?ga:z,f.showValues&&(f.showPercentValues?u+=u!==z?G+D:D:void 0!==
Ba&&Ba!==z&&(u+=u!==z?G+Ba:Ba)),q=F(h(s.tooltext,s.hovertext,f.tooltext)),q===z?(q=ga,f.showValuesInTooltip&&(f.showPercentInTooltip?q+=q!==z?G+D:D:void 0!==Ba&&Ba!==z&&(q+=q!==z?G+Ba:Ba))):q=gb(q,[1,2,3,14],{percentValue:D,label:ga,formattedValue:Ba},s),l.data.splice(x,0,{prevPointIndex:p,prevSeriesIndex:d-1,displayValue:u,toolText:q,y:m,link:B(s.link),doNotSlice:!0,color:y(s.color||t.getPlotColor(),w),shadow:{opacity:.01*ma(50<w?w*w*w*1E-4:w*w*.01)}}),this.colorCount+=1,s.category&&this.addMSPieCat(s.category,
d+1,a,0===C?c:a+m,e,f,x),a+=m},isValueAbs:!0,creditLabel:Y},Ga);q("radar",{friendlyName:"Radar Chart",standaloneInit:!0,creditLabel:Y,defaultSeriesType:"radar",areaAlpha:50,spaceManager:function(b,d,a,c){b.chart.plotBorderWidth=0;b.chart.plotBackgroundColor=null;var e=b[ha],f=e.x,p=b.xAxis,n=b.yAxis[0],t=d.chart,n=g(t.labelpadding,t.labelxpadding,parseInt(n&&n.labels&&n.labels.style&&n.labels.style.fontSize||10,10));a-=e.marginLeftExtraSpace+e.marginRightExtraSpace+b.chart.marginRight+b.chart.marginLeft;
c-=e.marginBottomExtraSpace+e.marginTopExtraSpace+b.chart.marginBottom+b.chart.marginTop;e=this.colorManager;c-=this.titleSpaceManager(b,d,a,.4*c);p.min=g(f.min,0);p.max=g(f.max,f.catCount-1);p.gridLineColor=y(h(t.radarspikecolor,e.getColor("divLineColor")),g(t.radarspikealpha,t.radarinlinealpha,e.getColor("divLineAlpha")));p.gridLineWidth=g(t.radarspikethickness,1);p.showRadarBorder=g(t.showradarborder,1);p.radarBorderThickness=g(t.radarborderthickness,2);p.radarBorderColor=y(h(t.radarbordercolor,
e.getColor("divLineColor")),g(t.radarborderalpha,100));p.radarFillColor=y(h(t.radarfillcolor,e.getColor("altHGridColor")),g(t.radarfillalpha,e.getColor("altHGridAlpha")));b.legend.enabled&&(h(t.legendposition,Da).toLowerCase()!=qa?c-=this.placeLegendBlockBottom(b,d,a,c/2):a-=this.placeLegendBlockRight(b,d,a/3,c));d=g(t.radarradius);f=2*g(parseInt(p.labels.style.lineHeight,10),12);t=2*n;f=J(a-(100+t),c-(f+t));d=d||.5*f;a=J(.3*a,.3*c);d<a&&(d=a);b.chart.axisRadius=d;p.labels.labelPadding=n},anchorAlpha:"100",
showValues:0,isRadar:!0,rendererId:"radar"},q.msareabase);Ga={dragExtended:!0,defaultRestoreButtonVisible:1,spaceManager:function(b,d,a,c){var e=b[ha],f=b.chart,p=d.chart,n=e.outCanvasStyle,t=c-.3*(e.marginBottomExtraSpace+f.marginBottom+f.marginTop),l=0,r=0,e=this.smartLabel||e.smartLabel,k,m;f.formAction=B(p.formaction);f.formDataFormat=h(p.formdataformat,A.dataFormats.XML);f.formTarget=h(p.formtarget,"_self");f.formMethod=h(p.formmethod,"POST");f.submitFormAsAjax=g(p.submitformusingajax,1);f.showFormBtn=
g(p.showformbtn,1)&&f.formAction;f.formBtnTitle=h(p.formbtntitle,"Submit");f.formBtnBorderColor=h(p.formbtnbordercolor,"CBCBCB");f.formBtnBgColor=h(p.formbtnbgcolor,"FFFFFF");f.btnPadding=g(p.btnpadding,7);f.btnSpacing=g(p.btnspacing,5);f.formBtnStyle={fontSize:n.fontSize,fontFamily:n.fontFamily,fontWeight:"bold"};f.formBtnLabelFill=n.color;p.btntextcolor&&(f.formBtnLabelFill=p.btntextcolor.replace(rb,La));0<=(n=g(p.btnfontsize))&&(f.formBtnStyle.fontSize=n+"px");kc(f.formBtnStyle);f.showRestoreBtn=
g(p.showrestorebtn,this.defaultRestoreButtonVisible,1);f.showRestoreBtn&&(f.restoreBtnTitle=h(p.restorebtntitle,"Restore"),f.restoreBtnBorderColor=h(p.restorebtnbordercolor,f.formBtnBorderColor),f.restoreBtnBgColor=h(p.restorebtnbgcolor,f.formBtnBgColor),f.restoreBtnStyle={fontSize:f.formBtnStyle.fontSize,fontFamily:f.formBtnStyle.fontFamily,fontWeight:"bold"},f.restoreBtnLabelFill=f.formBtnLabelFill,p.restorebtntextcolor&&(f.restoreBtnLabelFill=p.restorebtntextcolor.replace(rb,La)),0<=(n=g(p.restorebtnfontsize))&&
(f.restoreBtnStyle.fontSize=n+"px"),kc(f.restoreBtnStyle));f.showLimitUpdateMenu=g(p.showlimitupdatemenu,1);f.showFormBtn&&(e.setStyle(f.formBtnStyle),k=e.getOriSize(f.formBtnTitle),l=k.height||0);f.showRestoreBtn&&(e.setStyle(f.restoreBtnStyle),m=e.getOriSize(f.restoreBtnTitle),l=Ya(m.height,l)||0);0<l&&(l+=f.btnPadding+4,l>t&&(f.btnPadding=Ya(f.btnPadding-l+t,0)/2,l=t));f.btnHeight=l;f.showFormBtn&&(r=k.width+l,f.formBtnWidth=g(p.formbtnwidth,r),f.formBtnWidth<k.width&&(f.formBtnWidth=r));f.showRestoreBtn&&
(r=m.width+l,f.restoreBtnWidth=g(p.restorebtnwidth,r),f.restoreBtnWidth<m.width&&(f.restoreBtnWidth=r));f.marginBottom+=l+f.btnPadding;f.spacingBottom+=l+f.btnPadding;(b.callbacks||(b.callbacks=[])).push(this.drawButtons);return this.placeVerticalXYSpaceManager.apply(this,arguments)},drawButtons:function(){var b=this.logic,d=this.paper,a=this.options.chart,c=a.btnSpacing,e=this.chartHeight-a.spacingBottom+a.btnPadding,f=this.chartWidth-a.spacingRight,p=this.layers.layerAboveDataset,n=0;a.showFormBtn&&
(this.submitBtn=d.button(f-a.formBtnWidth,e,a.formBtnTitle,void 0,{width:a.formBtnWidth,height:a.btnHeight,verticalPadding:1,horizontalPadding:15},p).labelcss(a.formBtnStyle).attr({fill:[I(a.formBtnBgColor),a.formBtnLabelFill],stroke:I(a.formBtnBorderColor)}).buttonclick(function(){b.chartInstance.submitData()}),n=a.formBtnWidth+c);a.showRestoreBtn&&(this.restoreBtn=d.button(f-a.restoreBtnWidth-n,e,a.restoreBtnTitle,void 0,{width:a.restoreBtnWidth,height:a.btnHeight,verticalPadding:1,horizontalPadding:15},
p).labelcss(a.restoreBtnStyle).attr({fill:[I(a.restoreBtnBgColor),a.restoreBtnLabelFill],stroke:I(a.restoreBtnBorderColor)}).buttonclick(function(){b.chartInstance.restoreData()}))},drawAxisUpdateUI:function(){var b=this,d=b.logic,a=b.elements,c=b.options,e=c.chart,f=c[ha],p=d.chartInstance,d=d.renderer,n=b.yAxis[0],g=n.axisData,l=n.poi,h=g.plotLines,k=b.container,m=c.chart.showRangeError,s=f.inCanvasStyle,c=b.toolbar||(b.toolbar=[]),n=b.menus||(b.menus=[]),C=Ma({outline:"none","-webkit-appearance":"none",
filter:"alpha(opacity=0)",position:"absolute",background:"transparent",border:"1px solid #cccccc",textAlign:"right",top:0,left:0,width:50,zIndex:20,opacity:0,borderRadius:0},s),ga,G;d&&!d.forExport&&(G=function(a,c,d){if(a===c+"")return null;c=d?p.setUpperLimit(a,!0):p.setLowerLimit(a,!0);!c&&m&&b.showMessage("Sorry! Not enough range gap to modify axis limit to "+(Number(a)||"0")+".<br />Please modify the data values to be within range.<br />&nbsp;<br />(click anywhere on the chart to close this message)",
!0);return c},ib(["max","min"],function(a){var c=l[a],d=c.label,f=h[c.index],c=d&&d.getBBox(),p,n,g,m,t,ga,q;if(c&&d){n=c.x+c.width-e.spacingLeft;g=e.marginLeft-n-(Sa?4:5);p=Gb("input",{type:"text",value:f.value,name:a||""},k,!0);Ma(C,{top:c.y+(Sa?-1:0)+"px",left:g+"px",width:n+"px"});for(m in C)p.style[m]=C[m];u.dem.listen(p,["focus","mouseup","blur","keyup"],[function(){var a={opacity:1,filter:"alpha(opacity=100)",color:s.color},b;this.value=f.value;for(b in a)this.style[b]=a[b];t=q=!0;d.hide()},
function(){var a=this;q&&(q=!1,ob||setTimeout(function(){a.select()},0))},function(){!0!==G(this.value,f.value,f.isMaxLabel)&&(this.style.opacity=0,this.style.filter="alpha(opacity=0)",d.show());bc&&Ta.getElementsByTagName("body")[0].focus&&Ta.getElementsByTagName("body")[0].focus();t=q=!1},function(a){var b=a.originalEvent.keyCode,c=this.value;13===b?(a=G(c,f.value,f.isMaxLabel),!1===a&&(this.style.color="#dd0000")):27===b&&(this.value=f.value,u.dem.fire(this,"blur",a))}]);p.setAttribute("isOverlay",
"true");Sa?(vb(b.container,"defaultprevented",ga=function(a){p.parentNode&&u.dem.fire(p,"blur",a)}),vb(b.container,"destroy",function(){na(b,"defaultprevented",ga);p.parentNode.removeChild(p)})):(vb(b.container,"mousedown",ga=function(a){a.srcElement!==p&&t&&u.dem.fire(p,"blur",a)}),vb(b.container,"destroy",function(){na(b.container,"mousedown",ga);p.parentNode.removeChild(p)}))}}),e.showLimitUpdateMenu&&(n.push(ga=Qb({chart:b,basicStyle:f.outCanvasStyle,items:[{text:"Increase Upper Limit",onclick:function(){p.setUpperLimit(g.max+
g.tickInterval,!0)}},{text:"Increase Lower Limit",onclick:function(){p.setLowerLimit(g.min+g.tickInterval,!0)}},{text:"Decrease Upper Limit",onclick:function(){p.setUpperLimit(g.max-g.tickInterval,!0)}},{text:"Decrease Lower Limit",onclick:function(){p.setLowerLimit(g.min-g.tickInterval,!0)}}],position:{x:e.spacingLeft,y:p.height-e.spacingBottom+(e.showFormBtn||e.showRestoreBtn?10:-15)}})),a.configureButton=c.add("configureIcon",function(a,b){return function(){ga.visible?ga.hide():ga.show({x:a,y:b+
1})}}(),{x:e.spacingLeft,y:p.height-e.spacingBottom+(e.showFormBtn||e.showRestoreBtn?10:-15),tooltip:"Change Y-Axis Limits"})))},getCollatedData:function(){var b=this.chartInstance,d=b.__state,a=b.jsVars,b=this.updatedDataObj||H({},b.getChartData(A.dataFormats.JSON)),c=a._reflowData,a=b.dataset,e=(c=c&&c.hcJSON&&c.hcJSON.series)&&c.length,f,p,n,g;if(void 0!==d.hasStaleData&&!d.hasStaleData&&this.updatedDataObj)return this.updatedDataObj;if(a&&c)for(;e--;)if(p=a[e]&&a[e].data,(f=(n=c[e]&&c[e].data)&&
n.length)&&p)for(;f--;)if(g=n[f])p[f].value=g.y;d.hasStaleData=!1;return this.updatedDataObj=b},eiMethods:{restoreData:function(){var b=this.jsVars,d=b.fcObj;b._reflowData={};delete b._reflowClean;A.hcLib.createChart(d,b.container,b.type,void 0,void 0,!1,!0);u.raiseEvent("dataRestored",{},d,[d.id]);return!0},submitData:function(){var b=this.jsVars,d=b.fcObj,a=d.__state,c=a._submitAjaxObj||(a._submitAjaxObj=new A.ajax),a=A.dataFormats.JSON,e=A.dataFormats.CSV,f=A.dataFormats.XML,b=b.instanceAPI,p=
b.hcJSON.chart,n=p.formAction,g=p.submitFormAsAjax,l,h,k,m,s;p.formDataFormat===a?(l=a,h=JSON.stringify(b.getCollatedData())):p.formDataFormat===e?(l=e,h=b.getCSVString&&b.getCSVString(),void 0===h&&(h=A.core.transcodeData(b.getCollatedData(),a,e))):(l=f,h=A.core.transcodeData(b.getCollatedData(),a,f));A.raiseEvent("beforeDataSubmit",{data:h},d,void 0,function(){g?(c.onError=function(a,b,c,e){u.raiseEvent("dataSubmitError",{xhrObject:b.xhr,url:e,statusText:a,httpStatus:b.xhr&&b.xhr.status?b.xhr.status:
-1,data:h},d,[d.id,a,b.xhr&&b.xhr.status])},c.onSuccess=function(a,b,e,f){u.raiseEvent("dataSubmitted",{xhrObject:c,response:a,url:f,data:h},d,[d.id,a])},k={},k["str"+l.toUpperCase()]=h,c.open&&c.abort(),c.post(n,k)):(m=Qa.document.createElement("span"),m.innerHTML='<form style="display:none" action="'+n+'" method="'+p.formMethod+'" target="'+p.formTarget+'"> <input type="hidden" name="strXML" value="'+ad(h)+'"><input type="hidden" name="dataFormat" value="'+l.toUpperCase()+'" /></form>',s=m.removeChild(m.firstChild),
Qa.document.body.appendChild(s),s.submit&&s.submit(),s.parentNode.removeChild(s),m=s=null)},function(){A.raiseEvent("dataSubmitCancelled",{data:h},d)})},getDataWithId:function(){for(var b=this.jsVars.instanceAPI.getCollatedData(),d=[[z]],a=b.dataset,b=b.categories&&b.categories[0]&&b.categories[0].category,c=a&&a.length||0,e=0,f,p,n,g,l,h;c--;)if(p=a[c])for(d[0][c+1]=p.id||p.seriesname,g=p.id||c+1,h=(p=p.data)&&p.length||0,l=0;l<h;l+=1){n=l+1;if(!d[n]){for(f=b&&b[l+e]||{};f.vline;)e+=1,f=b[l+e]||
{};f=f.label||f.name||z;d[n]=[f]}f=d[n];n=p[l].id||n+"_"+g;f[c+1]=[n,Number(p[l].value)]}return d},getData:function(b){var d=this.jsVars.instanceAPI.getCollatedData(),a=[[z]],c=d.dataset,e=d.categories&&d.categories[0]&&d.categories[0].category,f=c&&c.length||0,p=0,n,g,l;if(b)a=/^json$/ig.test(b)?d:A.core.transcodeData(d,"json",b);else for(;f--;)if(b=c[f])for(a[0][f+1]=c[f].seriesname,d=(b=c[f]&&c[f].data)&&b.length||0,l=0;l<d;l+=1){g=l+1;if(!a[g]){for(n=e&&e[l+p]||{};n.vline;)p+=1,n=e[l+p]||{};n=
n.label||n.name||z;a[g]=[n]}g=a[g];g[f+1]=Number(b[l].value)}return a},setYAxisLimits:function(b,d){var a=this.jsVars.instanceAPI,c=a.hcJSON,e=a.dataObj,f=e&&e.chart||{},c=c&&c.yAxis&&c.yAxis[0]||!1,p=!1;f.animation=!1;if(!c)return!1;void 0!==b&&b>a.highValue&&b!==c.max?(f.yaxismaxvalue=b,p=!0):(b=a.highValue>c.max?a.highValue:c.max,f.yaxismaxvalue=b);void 0!==d&&d<a.lowValue&&d!==c.min?(f.yaxisminvalue=d,p=!0):(d=a.lowValue<c.min?a.lowValue:c.min,f.yaxisminvalue=d);p&&a.updateChartWithData(e);return p},
getUpperLimit:function(){var b=this.jsVars.instanceAPI.hcJSON;return(b=b.yAxis&&b.yAxis[0])?b.max:void 0},setUpperLimit:function(b){return this.jsVars.fcObj.setYAxisLimits(b,void 0)},getLowerLimit:function(){var b=this.jsVars.instanceAPI.hcJSON;return(b=b.yAxis&&b.yAxis[0])?b.min:void 0},setLowerLimit:function(b){return this.jsVars.fcObj.setYAxisLimits(void 0,b)}},updateChartWithData:function(b){var d=this.chartInstance,a=d.jsVars,c=b&&b.chart;b=a._reflowData||(a._reflowData={});c={dataObj:{chart:{yaxisminvalue:g(c.yaxisminvalue),
yaxismaxvalue:g(c.yaxismaxvalue),animation:c.animation}}};H(b,c,!0);A.hcLib.createChart(d,a.container,a.type)},preSeriesAddition:function(){var b=this,d=b.hcJSON,a=b.dataObj.chart,c=d.chart;b.tooltipSepChar=d[ha].tooltipSepChar;c.allowAxisChange=g(a.allowaxischange,1);c.changeDivWithAxis=1;c.snapToDivOnly=g(a.snaptodivonly,0);c.snapToDiv=c.snapToDivOnly?1:g(a.snaptodiv,1);c.snapToDivRelaxation=g(a.snaptodivrelaxation,10);c.doNotSnap=g(a.donotsnap,0);c.doNotSnap&&(c.snapToDiv=c.snapToDivOnly=0);c.showRangeError=
g(a.showrangeerror,0);g(a.allowaxischange,1)&&(d.callbacks||(d.callbacks=[])).push(function(a){var c=this,d=arguments,n;vb(a.renderer.container,"destroy",function(){n&&(n=clearTimeout(n))});n=setTimeout(function(){b.drawAxisUpdateUI.apply(c,d);n=null},1)})},getTooltextCreator:function(){var b=arguments;return function(){var d=arguments,a=d.length,c,e,f;for(f=0;f<a;f+=1)void 0!==(e=d[f])&&void 0!==(c=b[f])&&(b[f]="object"===typeof c?H(c,e):e);return gb.apply(this,b)}},getPointStub:function(b,d,a,c,
e,f,p){var n=this.isDual,t=this.dataObj.chart;c=c[ha];var l=null===d?d:c.numberFormatter.dataLabels(d,1===p?!0:!1),r=B(F(h(b.tooltext,e.plottooltext,c.tooltext))),k=c.tooltipSepChar,m=e._sourceDataset;d=g(b.allowdrag,m.allowdrag,1);var m=g(b.allownegativedrag,m.allownegativedrag,e.allownegativedrag,1),s,C,ga,G,x=0,w=0,Ba,D;c.showTooltip?void 0!==r?(D=this.getTooltextCreator(r,[1,2,3,4,5,6,7],{yaxisName:F(n?p?t.syaxisname:t.pyaxisname:t.yaxisname),xaxisName:F(t.xaxisname),formattedValue:l,label:a},
b,t,e),e=D(),e===r&&(D=void 0,x=1)):null===l?e=!1:(c.seriesNameInToolTip&&(G=da(e&&e.seriesname)),e=G?G+k:z,Ba=e+=a?a+k:z,c.showPercentInToolTip?s=!0:e+=l):e=!1;g(b.showvalue,f)?void 0!==B(b.displayvalue)?(ga=F(b.displayvalue),w=1):c.showPercentValues?C=!0:ga=l:ga=z;b=h(b.link);return{displayValue:ga,categoryLabel:a,toolText:e,link:b,showPercentValues:C,showPercentInToolTip:s,allowDrag:d,allowNegDrag:m,_toolTextStr:Ba,_isUserValue:w,_isUserTooltip:x,_getTooltext:D}}};q("dragnode",{friendlyName:"Dragable Node Chart",
standaloneInit:!0,decimals:2,numdivlines:0,numVDivLines:0,defaultZeroPlaneHighlighted:!1,defaultZeroPlaneHidden:!0,spaceManager:Ga.spaceManager,drawButtons:Ga.drawButtons,updateChartWithData:Ga.updateChartWithData,creditLabel:Y,canvasPaddingModifiers:null,defaultSeriesType:"dragnode",rendererId:"dragnode",tooltipsepchar:" - ",showAxisLimitGridLines:0,cleanedData:function(b,d){var a=b&&b.hcJSON,c=d&&d.hcJSON,e,f,p,n,g,l,h,k,m;if(a&&c){if(a.series&&c.series&&(g=c.series.length))for(k=0;k<g;k+=1)if(f=
c.series[k],e=a.series[k],f.data&&(l=f.data.length))for(m=0;m<l;m+=1)!0===f.data[m]&&e&&e.data&&e.data[m]&&(delete e.data[m],e.data[m]={y:null});if(a.connectors&&c.connectors&&(p=c.connectors.length))for(k=0;k<p;k+=1)if(f=c.connectors[k],e=a.connectors[k],f.connector&&(h=f.connector.length))for(m=0;m<h;m+=1)!0===f.connector[m]&&e&&e.connector&&e.connector[m]&&(delete e.connector[m],e.connector[m]={});if(a.dragableLabels&&c.dragableLabels&&(n=c.dragableLabels.length))for(k=0;k<n;k+=1)!0===c.dragableLabels[k]&&
a.dragableLabels[k]&&(delete a.dragableLabels[k],a.dragableLabels[k]={})}},eiMethods:H(Ma(q.scatterbase.eiMethods,Ga.eiMethods),{addNode:function(b){var d=this.jsVars,a=d.instanceAPI,c=d._reflowData||(d._reflowData={}),e=a.hcJSON,f=a.numberFormatter,a=h(b.datasetId),p=f.getCleanValue(b.y),f=f.getCleanValue(b.x),n=!1,g=e.series,l=g.length,r=e.xAxis.min,k=e.xAxis.max,m=e.yAxis[0].min,s=e.yAxis[0].max,e={hcJSON:{series:[]}},C=e.hcJSON.series,ga;if(void 0!==a&&null!==p&&p>=m&&p<=s&&null!==f&&f>=r&&f<=
k){for(r=0;r<l&&!n;r+=1)a==g[r].id&&(C[r]={data:[]},n=!0,ga=g[r],m=ga.data,k=m.length,m.push(m=ga._dataParser(b,k,f,p)),C[r].data[k]=m,H(c,e,!0),ga={index:k,dataIndex:k,link:b.link,y:b.y,x:b.x,shape:b.shape,width:b.width,height:b.height,radius:b.radius,sides:b.sides,label:b.name,toolText:b.tooltext,id:b.id,datasetIndex:r,datasetName:ga.name,sourceType:"dataplot"});if(n)return hb(d,ga,"nodeadded"),A.raiseEvent("nodeadded",ga,d.fcObj),!0}return!1},getNodeAttribute:function(b){var d=this.jsVars,a=d.instanceAPI,
d=d._reflowData||(d._reflowData={}),d=d.hcJSON&&d.hcJSON.series||[],a=a.hcJSON.series,c=a.length,e,f,p,n;if(void 0!==b)for(e=0;e<c;e+=1)for(f=a[e],n=f.data,p=n.length,f=0;f<p;f+=1)if(n[f].id===b)return d[e]&&d[e].data&&d[e].data[f]?H(n[f]._options,d[e].data[f]._options,!0):n[f]._options;return!1},setNodeAttribute:function(b,d,a){var c=this.jsVars,e=c.instanceAPI,f=c._reflowData||(c._reflowData={}),p=e.hcJSON,n=e.numberFormatter,g=p.series,l=g.length,h=p.xAxis.min,k=p.xAxis.max,m=p.yAxis[0].min,s=
p.yAxis[0].max,p={hcJSON:{series:[]}},e=p.hcJSON.series,C=f.hcJSON&&f.hcJSON.series||[],ga,G,x,w;"object"===typeof d&&void 0===a?w=d:(w={},w[d]=a);if(void 0!==b)for(d=0;d<l;d+=1)for(ga=g[d],G=ga.data,x=G.length,a=0;a<x;a+=1)if(b===G[a].id)return b=G[a],delete w.id,C[d]&&C[d].data&&C[d].data[a]&&C[d].data[a]._options&&(w=H(C[d].data[a]._options,w,!0)),w=H(b._options,w,!0),b=n.getCleanValue(w.y),n=n.getCleanValue(w.x),null!==b&&b>=m&&b<=s&&null!==n&&n>=h&&n<=k?(e[d]={data:[]},h=ga._dataParser(w,a,n,
b),k={index:a,dataIndex:a,link:w.link,y:w.y,x:w.x,shape:w.shape,width:w.width,height:w.height,radius:w.radius,sides:w.sides,label:w.name,toolText:w.tooltext,id:w.id,datasetIndex:d,datasetName:ga.name,sourceType:"dataplot"},e[d].data[a]=h,H(f,p,!0),hb(c,k,"nodeupdated"),A.raiseEvent("nodeupdated",k,c.fcObj),!0):!1;return!1},deleteNode:function(b){if(void 0!==b){var d=this.jsVars,a=d.instanceAPI,c=d._reflowClean||(d._reflowClean={}),e=a.hcJSON.series,f={hcJSON:{series:[]}},p,n,g,l,h;if(e&&(g=e.length))for(l=
0;l<g;l+=1)if((a=e[l])&&(n=a.data)&&(p=n.length))for(h=0;h<p;h+=1)if(b===n[h].id)return f.hcJSON.series[l]={data:[]},f.hcJSON.series[l].data[h]=!0,H(c,f,!0),b=n[h],b={index:h,dataIndex:h,link:b.link,y:b.y,x:b.x,shape:b._options.shape,width:b._options.width,height:b._options.height,radius:b._options.radius,sides:b._options.sides,label:b.displayValue,toolText:b.toolText,id:b.id,datasetIndex:l,datasetName:a.name,sourceType:"dataplot"},hb(d,b,"nodedeleted"),A.raiseEvent("nodedeleted",b,d.fcObj),!0}return!1},
addConnector:function(b){if("object"===typeof b){var d=this.jsVars,a=d.instanceAPI,c=d._reflowData||(d._reflowData={}),a=a.hcJSON,e=a.connectors&&a.connectors[0]||{connector:[]},a=e.connector.length,f={hcJSON:{connectors:[{connector:[]}]}};b=e._connectorParser&&e._connectorParser(b,a);e={arrowAtEnd:b.arrowAtEnd,arrowAtStart:b.arrowAtStart,fromNodeId:b.from,id:b.id,label:b.label,link:b.connectorLink,sourceType:"connector",toNodeId:b.to};f.hcJSON.connectors[0].connector[a]=b;H(c,f,!0);hb(d,e,"connectoradded");
A.raiseEvent("connectoradded",e,d.fcObj);return!0}return!1},editConnector:function(b,d,a){var c=this.jsVars,e=c.instanceAPI,f=c._reflowData||(c._reflowData={}),e=e.hcJSON,p=e.connectors||(e.connectors=[]),n=p.length,e={hcJSON:{connectors:[]}},g=e.hcJSON.connectors,l,h,k,m;"object"===typeof d&&void 0===a?m=d:(m={},m[d]=a);if(void 0!==b)for(d=0;d<n;d+=1)if((h=p[d])&&(l=h.connector))for(k=l.length,a=0;a<k;a+=1)if(b===l[a].id)return l=l[a],delete m.id,f.hcJSON&&f.hcJSON.connectors&&f.hcJSON.connectors[d]&&
f.hcJSON.connectors[d].connector&&f.hcJSON.connectors[d].connector[a]&&f.hcJSON.connectors[d].connector[a]._options&&(m=H(f.hcJSON.connectors[d].connector[a]._options,m,!0)),m=H(l._options,m,!0),b={arrowAtEnd:Boolean(m.arrowatend),arrowAtStart:Boolean(m.arrowatstart),fromNodeId:m.from,id:b,label:m.label,link:m.link,sourceType:"connector",toNodeId:m.to},g[d]={connector:[]},l=h._connectorParser(m,a),g[d].connector[a]=l,H(f,e,!0),hb(c,b,"connectorupdated"),A.raiseEvent("connectorupdated",b,c.fcObj),
!0;return!1},deleteConnector:function(b){if(void 0!==b){var d=this.jsVars,a=d.instanceAPI,c=d._reflowClean||(d._reflowClean={}),e=a.hcJSON.connectors,a={hcJSON:{connectors:[]}},f,p,n,g,l,h={};if(e&&(g=e.length))for(l=0;l<g;l+=1)if((f=e[l])&&(n=f.connector)&&(p=n.length))for(f=0;f<p;f+=1)if(b===n[f].id)return b=n[f],h={arrowAtEnd:b.arrowAtEnd,arrowAtStart:b.arrowAtStart,fromNodeId:b.from,id:b.id,label:b.label,link:b.connectorLink,sourceType:"connector",toNodeId:b.to},a.hcJSON.connectors[l]={connector:[]},
a.hcJSON.connectors[l].connector[f]=!0,H(c,a,!0),hb(d,h,"connectordeleted"),A.raiseEvent("connectordeleted",h,d.fcObj),!0}return!1},addLabel:function(b){if(b){var d=this.jsVars,a=d.instanceAPI,c=d._reflowData||(d._reflowData={}),e={hcJSON:{dragableLabels:[]}};e.hcJSON.dragableLabels[(a.hcJSON.dragableLabels||[]).length]=b;H(c,e,!0);b={text:b.text,x:b.x,y:b.y,allowdrag:b.allowdrag,sourceType:"labelnode",link:b.link};hb(d,b,"labeladded");A.raiseEvent("labeladded",b,d.fcObj);return!0}return!1},deleteLabel:function(b,
d){var a=this.jsVars,c=a.instanceAPI,e=a._reflowClean||(a._reflowClean={}),f={hcJSON:{dragableLabels:[]}};return b<(c.hcJSON.dragableLabels||[]).length?(f.hcJSON.dragableLabels[b]=!0,H(e,f,!0),hb(a,d,"labeldeleted"),A.raiseEvent("labeldeleted",d,a.fcObj),!0):!1},setThreshold:function(b){var d=this.jsVars.hcObj.connectorsStore||[],a=d.length,c,e;for(e=0;e<a;e+=1)(c=d[e])&&c.options&&(c.options.conStrength<b?(c.graphic&&c.graphic.hide(),c.text&&(c.text.hide(),c.text.textBoundWrapper&&c.text.textBoundWrapper.hide())):
(c.graphic&&c.graphic.show(),c.text&&(c.text.show(),c.text.textBoundWrapper&&c.text.textBoundWrapper.show())))}}),getCollatedData:function(){var b=this.chartInstance,d=b.__state,a=b.jsVars,b=this.updatedDataObj||H({},b.getChartData(A.dataFormats.JSON)),c=a._reflowData,e=a._reflowClean,a=(b.labels||(b.labels={label:[]}),b.labels.label||(b.labels.label=[])),f=c&&c.hcJSON&&c.hcJSON.dragableLabels,p=e&&e.hcJSON&&e.hcJSON.dragableLabels,n=b.connectors,g=c&&c.hcJSON&&c.hcJSON.connectors,l=e&&e.hcJSON&&
e.hcJSON.connectors,h=b.dataset,k=c&&c.hcJSON&&c.hcJSON.series,c=e&&e.hcJSON&&e.hcJSON.series,e=k&&k.length,m,s,C,ga;if(void 0!==d.hasStaleData&&!d.hasStaleData&&this.updatedDataObj)return this.updatedDataObj;if(h&&k)for(;e--;)if(s=h[e]&&h[e].data,(m=(C=k[e]&&k[e].data)&&C.length)&&s)for(;m--;)if(ga=C[m])s[m]?H(s[m],ga._options):s[m]=ga._options;if(e=g&&g.length)for(b.connectors||(n=b.connectors=[{connector:[]}]);e--;)if(k=n[e]&&n[e].connector,(m=(s=g[e]&&g[e].connector)&&s.length)&&k)for(;m--;)if(C=
s[m])k[m]?H(k[m],C._options):k[m]=C._options;if((e=f&&f.length)&&f)for(;e--;)f[e]&&(a[e]=f[e]);sb(h,c);sb(n,l);sb(a,p);d.hasStaleData=!1;return this.updatedDataObj=b},createHtmlDialog:function(b,d,a,c,e,f){var p=b.paper,n=this.hcJSON[ha].inCanvasStyle,g=b.chartWidth,l=b.chartHeight,h={color:n.color,textAlign:"center",paddingTop:"1px",border:"1px solid #cccccc",borderRadius:"4px",cursor:"pointer",_cursor:"hand",backgroundColor:"#ffffff",zIndex:21,"-webkit-border-radius":"4px"},k;k=p.html("div",{fill:"transparent",
width:g,height:l},{fontSize:"10px",lineHeight:"15px",fontFamily:n.fontFamily},b.container);k.veil=p.html("div",{fill:"000000",width:g,height:l,opacity:.3},void 0,k);k.dialog=p.html("div",{x:(g-d)/2,y:(l-a)/2,fill:"efefef",strokeWidth:1,stroke:"000000",width:d,height:a},{borderRadius:"5px",boxShadow:"1px 1px 3px #000000","-webkit-border-radius":"5px","-webkit-box-shadow":"1px 1px 3px #000000",filter:'progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color="#000000")'},k);k.ok=p.html("div",
{x:d-70-5,y:a-23-5,width:65,height:17,text:"Submit",tabIndex:1},h,k.dialog).on("click",c);k.cancel=p.html("div",{x:d-140-5,y:a-23-5,width:65,height:17,text:"Cancel",tabIndex:2},h,k.dialog).on("click",e);k.remove=p.html("div",{x:d-210-5,y:a-23-5,width:65,height:17,text:"Delete",tabIndex:3,visibility:"hidden"},h,k.dialog).on("click",f);k.handleKeyPress=function(a){13===a.keyCode?k.ok.trigger(ob?"touchStart":"click",a):27===a.keyCode&&k.cancel.trigger(ob?"touchStart":"click",a)};k.hide();return k},nodeUpdateUIDefinition:[{key:"id",
text:"Id",inputWidth:60,x:10,y:15},{key:"dataset",text:"Dataset",inputType:"select",inputWidth:110,innerHTML:void 0,x:170,y:15},{key:"x",text:"Value",x:10,y:40,inputWidth:21},{key:"y",text:",",x:88,y:40,inputWidth:21,labelWidth:5},{text:"(x, y)",x:125,y:40,labelWidth:33,noInput:!0},{key:"tooltip",text:"Tooltip",inputWidth:105,x:170,y:40},{key:"label",text:"Label",inputWidth:92,x:10,y:65},{key:"labelalign",text:"Align",labelWidth:70,inputWidth:110,inputType:"select",innerHTML:'<option></option><option value="top">Top</option><option value="middle">Middle</option><option value="bottom">Bottom</option>',
x:145,y:63},{key:"color",text:"Color",x:10,y:90,inputWidth:60},{key:"colorOut",innerHTML:"&nbsp;",x:85,y:90,inputWidth:15,inputType:"span"},{key:"alpha",text:"Alpha",x:170,y:90,inputWidth:20},{key:"draggable",text:"Allow Drag",value:!0,inputWidth:20,x:250,y:90,labelWidth:58,inputPaddingTop:3,type:"checkbox"},{key:"shape",text:"Shape",inputType:"select",inputWidth:97,innerHTML:'<option value="rect">Rectangle</option><option value="circ">Circle</option><option value="poly">Polygon</option>',x:10,y:115},
{key:"rectHeight",text:"Height",x:170,y:115,inputWidth:20},{key:"rectWidth",text:"Width",x:255,y:115,inputWidth:20},{key:"circPolyRadius",text:"Radius",x:170,y:115,inputWidth:20},{key:"polySides",text:"Sides",x:255,y:115,inputWidth:20},{key:"link",text:"Link",x:10,y:140,inputWidth:92},{key:"image",text:"Image",type:"checkbox",inputPaddingTop:4,inputWidth:20,x:10,y:170},{key:"imgUrl",text:"URL",inputWidth:105,x:170,y:170},{key:"imgWidth",text:"Width",inputWidth:20,x:10,y:195},{key:"imgHeight",text:"Height",
inputWidth:20,x:82,y:195},{key:"imgAlign",text:"Align",inputType:"select",inputWidth:75,innerHTML:'<option value="top">Top</option><option value="middle">Middle</option><option value="bottom">Bottom</option>',x:170,y:195}],showNodeUpdateUI:function(){var b=function(a){a=a.cacheUpdateUI;for(var b=a.fields.shape,d=["rectWidth","rectHeight","circPolyRadius","polySides"],p=d.length,n;p--;)n=d[p],/rect|poly|circ/ig.test(n)&&(a.labels[n].hide(),a.fields[n].hide()),(new RegExp(h(b.val(),"rect"),"ig")).test(n)&&
(a.labels[n].show(),a.fields[n].show())},d=function(a){a=a.cacheUpdateUI.fields;var b=Db(a.color.val());b&&a.colorOut.css({background:wb(b)})},a=function(a,b){var d=a.cacheUpdateUI,p=a.chartHeight,n=d.fields.image.val(),g=b?300:0,h=["imgWidth","imgHeight","imgAlign","imgUrl"],r,k,m;r=n?250:215;d.ok.hide();d.cancel.hide();d.remove.hide();d.error.hide();for(k=h.length;!n&&k--;)m=h[k],d.labels[m].hide(),d.fields[m].hide();u.danimate.animate(d.dialog.element,{top:(p-r)/2,height:r},g,"linear",function(){for(k=
h.length;k--&&n;)m=h[k],d.labels[m].show(),d.fields[m].show();d.ok.attr({y:r-23-5}).show();d.cancel.attr({y:r-23-5}).show();d.remove.attr({y:r-23-5});d.error.attr({y:r-23-5+4}).show();d.edit?d.remove.show():d.remove.hide()})};return function(c,e,f){var p=this,n=c.cacheUpdateUI,g=c.paper,h={width:"80px",border:"1px solid #cccccc",fontSize:"10px",lineHeight:"15px",padding:"2px",fontFamily:p.hcJSON[ha].inCanvasStyle.fontFamily},r=0,k={textAlign:"right"},m=n&&n.fields,s=n&&n.labels,C;n||(n=c.cacheUpdateUI=
p.createHtmlDialog(c,350,215,function(){var a=n&&n.fields,b=n.edit,c=p.chartInstance,d=p.hcJSON,e,f,g,k,h,l,m;if(!d)return!1;e=d.xAxis.min;f=d.yAxis[0].min;d=d.series;g=d.length;if(a){switch(a.shape.val()){case "circ":h="circle";break;case "poly":h="polygon";break;default:h="rectangle"}m={x:da(a.x.val(),e),y:da(a.y.val(),f),id:e=a.id.val(),datasetId:a.dataset.val(),name:a.label.val(),tooltext:a.tooltip.val(),color:a.color.val(),alpha:a.alpha.val(),labelalign:a.labelalign.val(),allowdrag:a.draggable.val(),
shape:h,width:a.rectWidth.val(),height:a.rectHeight.val(),radius:a.circPolyRadius.val(),numsides:a.polySides.val(),imagenode:a.image.val(),imagewidth:a.imgWidth.val(),imageheight:a.imgHeight.val(),imagealign:a.imgAlign.val(),imageurl:a.imgUrl.val(),link:a.link.val()};if(void 0!==e&&!b)for(r=0;r<g&&!k;r+=1)for(h=d[r].data,l=h.length,f=0;f<l;f+=1)e===h[f].id&&(k=!0);if(k)n.error.attr({text:"ID already exist."}),a.label.focus();else{b?c&&c.setNodeAttribute&&c.setNodeAttribute(m.id,m):c&&c.addNode&&c.addNode(m);
return}}n.enableFields()},function(){n.hide();n.enableFields();n.error.attr({text:z})},function(){p.chartInstance.deleteNode&&p.chartInstance.deleteNode(n.fields.id.val())}),C=n.dialog,s=n.labels={},m=n.fields={});n.config=e;n.edit=f;n.error||(n.error=g.html("span",{color:"ff0000",x:30,y:228},void 0,C));n.enableFields||(n.enableFields=function(){for(var a in e)e[a]&&e[a].disabled&&m[a]&&m[a].element.removeAttribute("disabled")});ib(this.nodeUpdateUIDefinition,function(f){var p,r=f.key,w={},Ba=e[r]||
{},D,q;!s[r]&&(s[r]=g.html("label",{x:f.x,y:f.y,width:f.labelWidth||45,text:f.text},k,C));if(!f.noInput){p=m[r];if(!p){h.border="checkbox"==f.type?z:"1px solid #cccccc";p=m[r]=g.html(f.inputType||"input",{x:f.labelWidth&&f.labelWidth+5||50,y:-2+(f.inputPaddingTop||0),width:f.inputWidth||50,name:r||""},h);if("select"!==f.inputType)p.attr({type:f.type||"text"}).on("keyup",n.handleKeyPress);p.add(s[r])}V(D=da(Ba.innerHTML,f.innerHTML))&&(w.innerHTML=D);Ba.disabled&&(w.disabled="disabled");p.attr(w);
V(q=da(Ba.value,f.value))&&p.val(q);"shape"==r&&p.on("change",function(){b(c)});"image"==r&&p.on("click",function(){a(c,!0)});"color"==r&&p.on("keyup",function(){d(c)})}});d(c);a(c);b(c);c.options.chart.animation?n.fadeIn("fast"):n.show();n.fields[f?"label":"id"].focus()}}(),labelUpdateUIDefinition:[{key:"label",text:"Label*",x:10,y:15,inputWidth:235},{key:"size",text:"Size",x:10,y:40},{key:"padding",text:"Padding",x:10,y:65},{key:"x",text:"Position",x:120,y:65,labelWidth:70,inputWidth:25},{key:"y",
text:",",x:225,y:65,labelWidth:10,inputWidth:25},{key:"xy",text:"(x, y)",x:260,y:65,noInput:!0},{key:"allowdrag",text:"Allow Drag",x:120,y:40,inputType:"checkbox",inputPaddingTop:3,inputWidth:15,labelWidth:70,val:1},{key:"color",text:"Color",x:10,y:90},{key:"alpha",text:"Alpha",x:145,y:90,inputWidth:30,val:"100"},{key:"bordercolor",text:"Border Color",x:10,y:125,labelWidth:100},{key:"bgcolor",text:"Background Color",x:10,y:150,labelWidth:100}],showLabelUpdateUI:function(b,d){var a=this,c=b.paper,
e=b.cacheLabelUpdateUI,f={border:"1px solid #cccccc",fontSize:"10px",lineHeight:"15px",fontFamily:a.hcJSON[ha].inCanvasStyle.fontFamily,padding:"2px"},p={textAlign:"right"},n=e&&e.fields,g=e&&e.labels,l,r,k;e||(e=b.cacheLabelUpdateUI=a.createHtmlDialog(b,315,205,function(){var b=e&&e.fields,c;b&&(c={text:b.label.val(),x:b.x.val(),y:b.y.val(),color:b.color.val(),alpha:b.alpha.val(),bgcolor:b.bgcolor.val(),bordercolor:b.bordercolor.val(),fontsize:b.size.val(),allowdrag:b.allowdrag.val(),padding:b.padding.val()},
c.text?a.chartInstance&&a.chartInstance.addLabel&&a.chartInstance.addLabel(c):(e.error.attr({text:"Label cannot be blank."}),b.label.focus()))},function(){e.error.attr({text:""});e.hide()}),k=e.dialog,g=e.labels={},n=e.fields={});ib(a.labelUpdateUIDefinition,function(a){var b=a.key;g[b]||(g[b]=c.html("label",{x:a.x,y:a.y,width:a.labelWidth||45,text:a.text},p,k));a.noInput||((l=n[b])||(l=n[b]=c.html("input",{y:-2+(a.inputPaddingTop||0),x:a.labelWidth&&a.labelWidth+5||50,width:a.inputWidth||50,type:a.inputType||
"text",name:b||""},f,g[b]).on("keyup",e.handleKeyPress)),void 0!==(r=h(d[b],a.val))&&l.val(r))});e.error||(e.error=c.html("span",{color:"ff0000",x:10,y:180},void 0,k));b.animation?e.fadeIn("fast"):e.show();e.fields.label.focus()},showLabelDeleteUI:function(b,d){var a=this,c=b.paper,e=b["cache-label-delete-ui"],f=d.data&&d.data("data")||{},p=d.data&&d.data("eventArgs"),f=f&&f.labelNode;e||(e=b["cache-label-delete-ui"]=a.createHtmlDialog(b,250,100,void 0,function(){e.hide()},function(){a.chartInstance.deleteLabel(f.index,
p)}),e.message=c.html("span",{x:10,y:10,width:230,height:80}).add(e.dialog),e.ok.hide(),e.remove.translate(175).show());e.message.attr({text:'Would you really like to delete the label: "'+f.text+'"?'});b.animation?e.fadeIn("fast"):e.show()},connectorUpdateUIDefinition:[{key:"fromid",text:"Connect From",inputType:"select",x:10,y:15,labelWidth:80,inputWidth:100},{key:"toid",text:"Connect To",inputType:"select",x:10,y:40,labelWidth:80,inputWidth:100},{key:"arratstart",text:"Arrow At Start",x:200,y:15,
type:"checkbox",inputPaddingTop:3,labelWidth:80,inputWidth:15},{key:"arratend",text:"Arrow At End",x:200,y:40,type:"checkbox",inputPaddingTop:3,labelWidth:80,inputWidth:15},{key:"label",text:"Label",x:10,y:75,labelWidth:40,inputWidth:120},{key:"id",text:"Node ID",x:190,y:75,inputWidth:55},{key:"color",text:"Color",x:10,y:100,labelWidth:40,inputWidth:35},{key:"alpha",text:"Alpha",x:110,y:100,inputWidth:25,labelWidth:35},{key:"strength",text:"Strength",x:190,y:100,inputWidth:55,val:"0.1"},{key:"url",
text:"Link",x:10,y:125,labelWidth:40,inputWidth:120},{key:"tooltext",text:"Tooltip",x:190,y:125,labelWidth:40,inputWidth:60},{key:"dashed",text:"Dashed",x:10,y:150,type:"checkbox",inputPaddingTop:3,inputWidth:15,labelWidth:40},{key:"dashgap",text:"Dash Gap",x:85,y:150,labelWidth:60,inputWidth:25},{key:"dashlen",text:"Dash Length",x:190,y:150,labelWidth:70,inputWidth:30}],showConnectorUpdateUI:function(b,d,a){var c=this.chartInstance,e=b.paper,f=b.cacheConnectorUpdateUI,p={border:"1px solid #cccccc",
fontSize:"10px",lineHeight:"15px",fontFamily:this.hcJSON[ha].inCanvasStyle.fontFamily,padding:"2px"},n={textAlign:"right"},g=f&&f.fields,l=f&&f.labels,r,k,m,s;f||(f=b.cacheConnectorUpdateUI=this.createHtmlDialog(b,315,215,function(){var b=f&&f.fields,d;b&&(d={from:b.fromid.val(),to:b.toid.val(),id:b.id.val(),label:b.label.val(),color:b.color.val(),alpha:b.alpha.val(),link:b.url.val(),tooltext:b.tooltext.val(),strength:b.strength.val(),arrowatstart:b.arratstart.val(),arrowatend:b.arratend.val(),dashed:b.dashed.val(),
dashlen:b.dashlen.val(),dashgap:b.dashgap.val()},d.from?d.to?d.from!=d.to?(a?c.editConnector(d.id,d):c.addConnector(d),f.enableFields()):(f.error.attr({text:"Connector cannot start and end at the same node!"}),b.fromid.focus()):(f.error.attr({text:"Please select a valid connector end."}),b.toid.focus()):(f.error.attr({text:"Please select a valid connector start."}),b.fromid.focus()))},function(){f.error.attr({text:""});f.enableFields();f.hide()},function(){c.deleteConnector(f.fields.id.val())}),s=
f.dialog,l=f.labels={},g=f.fields={});f.config=d;f.enableFields=function(){for(var a in d)d[a]&&d[a].disabled&&g[a]&&g[a].element.removeAttribute("disabled")};ib(this.connectorUpdateUIDefinition,function(a){var b=a.key,c=d[b]||{};l[b]||(l[b]=e.html("label",{x:a.x,y:a.y,width:a.labelWidth||45,text:a.text},n,s));if(!a.noInput){if(!(k=g[b])){k=g[b]=e.html(a.inputType||"input",{y:-2+(a.inputPaddingTop||0),x:a.labelWidth&&a.labelWidth+5||50,width:a.inputWidth||50,name:b||""},p);if("select"!==a.inputType)k.attr({type:a.type||
"text"}).on("keyup",f.handleKeyPress);k.add(l[b])}(r=h(c.innerHTML,a.innerHTML))&&k.attr({innerHTML:r});void 0!==(m=h(c.val,a.val))&&k.val(m);c.disabled&&k.attr({disabled:"disabled"})}});f.checkDash=function(){var a=g.dashed&&g.dashed.val()?"show":"hide";l.dashgap&&l.dashgap[a]();g.dashgap&&g.dashgap[a]();l.dashlen&&l.dashlen[a]();g.dashlen&&g.dashlen[a]()};f.checkDash();g.dashed.on("click",f.checkDash);f.error||(f.error=e.html("span",{color:"ff0000",x:10,y:170},void 0,s));f.remove[a?"show":"hide"]();
b.animation?f.fadeIn("fast"):f.show()},drawNodeUpdateButtons:function(){var b=this,d=b.logic,a=b.options,c=a.chart,e=a.pointStore||{},f=a.series,a=(a=a[ha])&&a.outCanvasStyle||b.outCanvasStyle||{},p=b.menu||(b.menu=[]),g=b.toolbar,h=f.length,l="",r="",k,m;for(m in e)l+='<option value="'+m+'">'+m+"</option>";for(m=0;m<h;m+=1)e=f[m],r+='<option value="'+e.id+'">'+(e.name!==z&&void 0!==e.name&&e.name+Aa+" "||z)+e.id+"</option>";p.push(k=Qb({chart:b,basicStyle:a,items:[{text:"Add a Node",onclick:function(){d.showNodeUpdateUI(b,
{dataset:{innerHTML:r}})}},{text:"Add a Label",onclick:function(){d.showLabelUpdateUI(b,{})}},{text:"Add a Connector",onclick:function(){d.showConnectorUpdateUI(b,{fromid:{innerHTML:l},toid:{innerHTML:l}})}}],position:{x:c.spacingLeft,y:b.chartHeight-c.spacingBottom+(c.showFormBtn||c.showRestoreBtn?10:-15)}}));b.elements.configureButton=g.add("configureIcon",function(a,b){return function(){k.visible?k.hide():k.show({x:a,y:b+1})}}(),{x:c.spacingLeft,y:b.chartHeight-c.spacingBottom+(c.showFormBtn||
c.showRestoreBtn?10:-15),tooltip:"Add or edit items"})},postSeriesAddition:function(){var b=this.hcJSON,d=this.dataObj.chart,a=this.base.postSeriesAddition&&this.base.postSeriesAddition.apply(this,arguments);b.legend.enabled="1"==d.showlegend?!0:!1;(b.chart.viewMode=g(d.viewmode,0))||(b.callbacks||(b.callbacks=[])).push(this.drawNodeUpdateButtons);return a},pointHoverOptions:function(b,d,a,c){var e=g(b.showhovereffect,d.showhovereffect,a.plothovereffect,a.showhovereffect),f={},p=!!h(b.hovercolor,
d.hovercolor,a.plotfillhovercolor,b.hoveralpha,d.hoveralpha,a.plotfillhoveralpha,b.borderhovercolor,d.borderhovercolor,a.plotborderhovercolor,b.borderhoveralpha,d.borderhoveralpha,a.plotborderhoveralpha,b.borderhoverthickness,d.borderhoverthickness,a.plotborderhoverthickness,b.hoverheight,d.hoverheight,a.plothoverheight,b.hoverwidth,d.hoverwidth,a.plothoverwidth,b.hoverradius,d.hoverradius,a.plothoverradius,e),n=!1;if(void 0===e&&p||e)n=!0,e=h(b.hovercolor,d.hovercolor,a.plotfillhovercolor,ja(c.color,
70)),p=h(b.hoveralpha,d.hoveralpha,a.plotfillhoveralpha,c.alpha),f={stroke:y(h(b.borderhovercolor,d.borderhovercolor,a.plotborderhovercolor,c.borderColor),g(b.borderhoveralpha,d.borderhoveralpha,a.plotborderhoveralpha,p,c.borderAlpha)),"stroke-width":g(b.borderhoverthickness,d.borderhoverthickness,a.plotborderhoverthickness,c.borderThickness),height:g(b.hoverheight,d.hoverheight,a.plothoverheight,c.height),width:g(b.hoverwidth,d.hoverwidth,a.plothoverwidth,c.width),r:g(b.hoverradius,d.hoverradius,
a.plothoverradius,c.radius)},b=c.use3D?this.getPointColor(I(h(b.hovercolor,d.hovercolor,a.plotfillhovercolor,ja(c.color,70))),h(b.hoveralpha,d.hoveralpha,a.plotfillhoveralpha,c.alpha),c.shapeType):y(e,p),f.fill=ea(b);return{enabled:n,rolloverProperties:f}},point:function(b,d,a,c,e,f,p){var n=this;b=g(c.ignoreemptydatasets,0);var t=n.numberFormatter,l=(f=a.data)&&f.length,r=g(a.showvalues,e[ha].showValues),k=g(c.useroundedges),m=!1,s=n.colorManager,C,ga,G,x,w,Ba,D,q,u,E,$,S,K,v;d.zIndex=1;d.name=B(a.seriesname);
Ba=d.id=h(a.id,p);if(b&&!a.data)return d.showInLegend=!1,d;if(0===g(a.includeinlegend)||void 0===d.name)d.showInLegend=!1;ga=h(c.plotfillalpha,"100");G=g(c.showplotborder,1);p=I(h(c.plotbordercolor,"666666"));C=g(c.plotborderthickness,k?2:1);x=h(c.plotborderalpha,c.plotfillalpha,k?"35":"95");w=Boolean(g(c.use3dlighting,c.is3d,k?1:0));D=I(h(a.color,s.getPlotColor()));q=h(a.plotfillalpha,a.nodeFillAlpha,a.alpha,ga);k=Boolean(g(a.showplotborder,G));u=I(h(a.plotbordercolor,a.nodebordercolor,p));E=g(a.plotborderthickness,
a.nodeborderthickness,C);$=k?h(a.plotborderalpha,a.nodeborderalpha,a.alpha,x):"0";S=Boolean(g(a.allowdrag,1));d.marker={enabled:!0,fillColor:y(D,q),lineColor:{FCcolor:{color:u,alpha:$}},lineWidth:E,symbol:"poly_4"};x=d._dataParser=function(b,d,f,p){d=h(b.id,Ba+"_"+d);var k=Boolean(g(b.allowdrag,S)),l=B(b.shape,"rectangle").toLowerCase(),m=B(b.height,10),s=B(b.width,10),C=B(b.radius,10),x=B(b.numsides,4),G=I(h(b.color,D)),ga=h(b.alpha,q),U=B(b.imageurl),F=Boolean(g(b.imagenode));switch(l){case "circle":v=
0;break;case "polygon":v=2;l=fa(x);break;default:v=1}K=w?n.getPointColor(G,ga,v):y(G,ga);x=n.pointHoverOptions(b,a,c,{plotType:"funnel",shapeType:v,use3D:w,height:m,width:s,radius:C,color:G,alpha:ga,borderColor:u,borderAlpha:$,borderThickness:E});return H(n.getPointStub(b,p,t.xAxis(f),e,a,r),{hoverEffects:x,_options:b,y:p,x:f,id:d,imageNode:F,imageURL:U,imageAlign:B(b.imagealign,z).toLowerCase(),imageWidth:B(b.imagewidth),imageHeight:B(b.imageheight),labelAlign:h(b.labelalign,F&&V(U)?Ca:"middle"),
allowDrag:k,marker:{enabled:!0,fillColor:K,lineColor:{FCcolor:{color:u,alpha:$}},lineWidth:E,radius:C,height:m,width:s,symbol:l},tooltipConstraint:n.tooltipConstraint})};for(p=0;p<l;p+=1)if(C=f[p])k=t.getCleanValue(C.y),s=t.getCleanValue(C.x),null===k?d.data.push({_options:C,y:null}):(m=!0,d.data.push(x(C,p,s,k)),this.pointValueWatcher(e,k,s));b&&!m&&(d.showInLegend=!1);return d},getPointColor:function(b,d,a){var c;b=I(b);d=jb(d);c=ja(b,80);b=lc(b,65);d={FCcolor:{gradientUnits:"objectBoundingBox",
color:c+","+b,alpha:d+","+d,ratio:Hb}};a?d.FCcolor.angle=1===a?0:180:(d.FCcolor.cx=.4,d.FCcolor.cy=.4,d.FCcolor.r="50%",d.FCcolor.radialGradient=!0);return d},getPointStub:function(b,d,a,c,e){var f=this.dataObj.chart,p=c[ha],g=null===d?d:p.numberFormatter.dataLabels(d),t=B(F(h(b.tooltext,e.plottooltext,p.tooltext))),l=this.tooltipSepChar=p.tooltipSepChar,r=h(b.label,b.name);d=F(r);var k;c=z;var m=!1;p.showTooltip?void 0!==t?(m=!0,e=gb(t,[3,4,5,6,8,9,10,11],{yaxisName:F(f.yaxisname),xaxisName:F(f.xaxisname),
yDataValue:g,xDataValue:a,label:d},b,f,e)):void 0!==r?(e=d,m=!0):null===g?e=!1:(p.seriesNameInToolTip&&(k=da(e&&e.seriesname)),e=c=k?k+l:z,e+=a?a+l:z,e+=g):e=!1;b=h(b.link);return{displayValue:d,toolText:e,link:b,_toolTextStr:c,_isUserTooltip:m}},connector:function(b,d,a,c,e){var f=e[ha],p=f.smartLabel;e=(b=a.connector)&&b.length;var n,t,l,r,k,m,s,C,ga,G,x,w=B(F(h(a.connectortooltext,c.connectortooltext))),Ba="$fromLabel"+f.tooltipSepChar+"$toLabel";n=g(a.stdthickness,1);t=I(h(a.color,"FF5904"));
l=h(a.alpha,"100");r=g(a.dashgap,5);k=g(a.dashlen,5);m=Boolean(g(a.dashed,0));s=Boolean(g(a.arrowatstart,1));C=Boolean(g(a.arrowatend,1));ga=g(a.strength,1);c=d.connector;G=d._connectorParser=function(a,b){var c=F(h(a.label,a.name)),d=h(a.alpha,l),d={FCcolor:{color:I(h(a.color,t)),alpha:d}},e=p.getOriSize(c),G=B(F(h(a.tooltext,w)));x=f.showTooltip?h(G,c?"$label":Ba):!1;return{_options:a,id:h(a.id,b).toString(),from:h(a.from,z),to:h(a.to,z),label:c,toolText:x,customToolText:G,color:d,dashStyle:Boolean(g(a.dashed,
m))?ya(g(a.dashlen,k),g(a.dashgap,r),n):void 0,arrowAtStart:Boolean(g(a.arrowatstart,s)),arrowAtEnd:Boolean(g(a.arrowatend,C)),conStrength:g(a.strength,ga),connectorLink:B(a.link),stdThickness:n,labelWidth:e.widht,labelHeight:e.height}};for(a=0;a<e;a+=1)c.push(G(b[a],a));return d},series:function(b,d,a){var c=d[ha],e=[],f,p,n,t;d.legend.enabled=Boolean(g(b.chart.showlegend,1));if(b.dataset&&0<(p=b.dataset.length)){this.categoryAdder(b,d);c.x.requiredAutoNumericLabels=!1;if(b.connectors&&(f=b.connectors.length))for(t=
0,n=f;t<n;t+=1)f={connector:[]},e.push(this.connector(a,f,b.connectors[t],b.chart,d,c.oriCatTmp.length,t));else f={connector:[]},e.push(this.connector(a,f,{},b.chart,d,c.oriCatTmp.length,t));for(t=0;t<p;t+=1)f={hoverEffects:this.parseSeriesHoverOptions(b,d,b.dataset[t],a),data:[]},f=this.point(a,f,b.dataset[t],b.chart,d,c.oriCatTmp.length,t),f instanceof Array?d.series=d.series.concat(f):d.series.push(f);d.connectors=e;b.labels&&b.labels.label&&0<b.labels.label.length&&(d.dragableLabels=b.labels.label);
b.chart.showyaxisvalue=h(b.chart.showyaxisvalue,0);this.configureAxis(d,b);b.trendlines&&ac(b.trendlines,d.yAxis,c,!1,this.isBar)}}},q.scatterbase);wa=function(b,d,a,c,e,f){var p=f.logic,n,t,l=d[b.from],r=d[b.to],k={sourceType:"connector"},m=b&&b._options,s=p.numberFormatter,C,ga,G,x,w;this.renderer=c;this.connectorsGroup=e;this.pointStore=d;this.options=b;this.style=a||{};l&&r&&(this.fromPointObj=l,this.toPointObj=r,this.fromX=C=l._xPos,this.fromY=ga=l._yPos,this.toX=G=r._xPos,this.toY=x=r._yPos,
this.arrowAtStart=k.arrowAtStart=b.arrowAtStart,this.arrowAtEnd=k.arrowAtEnd=b.arrowAtEnd,this.strokeWidth=d=b.conStrength*b.stdThickness,this.textBgColor=t=(this.color=n=b.color)&&n.FCcolor&&n.FCcolor.color,this.label=k.label=w=b.label,s=gb(b.toolText,[3,83,84,85,86,87,88,89,90,91,92],{label:b.label,fromXValue:s.dataLabels(l.x),fromYValue:s.dataLabels(l.y),fromXDataValue:l.x,fromYDataValue:l.y,fromLabel:h(l.displayValue,l.id),toXValue:s.dataLabels(r.x),toYValue:s.dataLabels(r.y),toXDataValue:r.x,
toYDataValue:r.y,toLabel:h(r.displayValue,r.id)}),this.link=k.link=m&&m.link,k.id=b.id,k.fromNodeId=l.id,k.toNodeId=r.id,l._config&&l._config.startConnectors&&l._config.startConnectors.push(this),r._config&&r._config.endConnectors&&r._config.endConnectors.push(this),l=function(){var a=this,c=b._options||{};a._longpressactive=clearTimeout(a._longpressactive);a.data("fire_click_event",1);a._longpressactive=setTimeout(function(){a.data("fire_click_event",0);a.data("viewMode")||p.showConnectorUpdateUI(f,
{fromid:{val:c.from,innerHTML:"<option>"+c.from+"</option>",disabled:!0},toid:{val:c.to,innerHTML:"<option>"+c.to+"</option>",disabled:!0},arratstart:{val:Boolean(g(c.arrowatstart,1))},arratend:{val:Boolean(g(c.arrowatend,1))},dashed:{val:g(c.dashed)},dashgap:{val:c.dashgap},dashlen:{val:c.dashlen},label:{val:c.label},tooltext:{val:c.tooltext},id:{val:b.id,disabled:!0},strength:{val:c.strength},alpha:{val:c.alpha},color:{val:c.color}},!0)},1E3)},this.graphic=c.path(this.getlinePath(),e).attr({"stroke-width":d,
ishot:!0,"stroke-dasharray":b.dashStyle,cursor:this.link?"pointer":"",stroke:ea(n)}).mousedown(l).mousemove(function(){this.data("fire_click_event",0);ab.call(this)}).mouseup(function(a){ab.call(this);ta.call(this,f,a,"ConnectorClick")}).hover(function(a){ta.call(this,f,a,"ConnectorRollover")},function(a){ta.call(this,f,a,"ConnectorRollout")}).tooltip(s).data("eventArgs",k).data("viewMode",f.options.chart.viewMode),w&&(this.text=c.text(),e.appendChild(this.text),this.text.css(a.style).attr({text:w,
x:(C+G)/2,y:(ga+x)/2,fill:a.color,ishot:!0,cursor:this.link?"pointer":"","text-bound":[h(a.backgroundColor,t),h(a.borderColor,t),1,"2"]}).tooltip(s).mousedown(l).mousemove(function(){this.data("fire_click_event",0);ab.call(this)}).hover(function(a){ta.call(this,f,a,"ConnectorRollover")},function(a){ta.call(this,f,a,"ConnectorRollout")}).mouseup(function(a){ab.call(this);ta.call(this,f,a,"ConnectorClick")}).tooltip(s).data("eventArgs",k).data("viewMode",f.options.chart.viewMode)))};wa.prototype={updateFromPos:function(b,
d){this.fromX=b;this.fromY=d;this.graphic&&this.graphic.animate({path:this.getlinePath()});this.text&&this.text.animate({x:(this.fromX+this.toX)/2,y:(this.fromY+this.toY)/2})},updateToPos:function(b,d){this.toX=b;this.toY=d;this.graphic&&this.graphic.animate({path:this.getlinePath()});this.text&&this.text.animate({x:(this.fromX+this.toX)/2,y:(this.fromY+this.toY)/2})},getlinePath:function(){var b=this.fromPointObj,d=this.toPointObj,a=this.fromX,c=this.fromY,e=this.toX,f=this.toY,p=["M",a,c];this.arrowAtStart&&
(b=b._config,p=b.shapeType===Nb?p.concat(pb(a,c,e,f,b.shapeArg.width,b.shapeArg.height)):p.concat(pb(a,c,e,f,b.shapeArg.radius)));this.arrowAtEnd&&(b=d._config,p=b.shapeType===Nb?p.concat(pb(e,f,a,c,b.shapeArg.width,b.shapeArg.height)):p.concat(pb(e,f,a,c,b.shapeArg.radius)));p.push("L",e,f);return p}};wa.prototype.constructor=wa;bb={mouseDown:function(b){delete b.data.point.dragActive},click:function(b){return!b.data.point.dragActive},dragHandler:function(b){var d=b.data,a=b.type,c=d.point,e=d.series,
f=e.chart||e,p=f.tooltip,g=ob&&Na(b)||Fb,f=f.options.instanceAPI;switch(a){case "dragstart":p.block(!0);d.dragStartY=b.pageY||g.pageY||0;d.dragStartX=b.pageX||g.pageX||0;d.startValue=c.y;d.startXValue=c.x;c.dragActive=!0;e.dragStartHandler&&e.dragStartHandler(d);break;case "dragend":p.block(!1);e.repositionItems(d,d.changeX?(b.pageX||g.pageX||0)-d.dragStartX:0,d.changeY?(b.pageY||g.pageY||0)-d.dragStartY:0,!0);a={dataIndex:c.index+1,datasetIndex:e.index+1,startValue:d.startValue,endValue:c.y,datasetName:e.name};
b=[f.chartInstance.id,a.dataIndex,a.datasetIndex,a.datasetName,a.startValue,a.endValue];d.changeX&&(a.startYValue=d.startValue,a.endYValue=c.y,a.startXValue=d.startXValue,a.endXValue=c.x,b.push(d.startXValue,c.x),delete a.startValue,delete a.endValue);u.raiseEvent("chartupdated",a,f.chartInstance,b);delete d.dragStartY;delete d.dragStartX;delete d.startValue;delete d.startXValue;break;default:e.repositionItems(d,d.changeX?(b.pageX||g.pageX||0)-d.dragStartX:0,d.changeY?(b.pageY||g.pageY||0)-d.dragStartY:
0)}},dragLabelHandler:function(b){var d=b.data,a=b.type,c=d.element,e=d.tracker,f=d.toolTip,p=ob&&Na(b)||Fb,g=d.series,h,l,r;"dragstart"===a?(f.block(!0),d.dragStartY=b.pageY||p.pageY||0,d.dragStartX=b.pageX||p.pageX||0):(h=d.x+(b.pageX||p.pageX||0)-d.dragStartX,r=h-d.leftDistance,r+d.width>d.plotWidth&&(r=d.plotWidth-d.width),0>r&&(r=0),h=r+d.leftDistance,l=d.y+(b.pageY||p.pageY||0)-d.dragStartY,b=l-d.topDistance,b+d.height>d.plotHeight&&(b=d.plotHeight-d.height),0>b&&(b=0),l=b+d.topDistance,"dragend"===
a?(f.block(!1),d.x=h,d.y=l,delete d.dragStartY,delete d.dragStartX):(c.attr({x:h,y:l}).textBound(),e.attr({x:r,y:b})));"dragend"==a&&(a={hcJSON:{dragableLabels:[]}},a.hcJSON.dragableLabels[d.index]={y:g.yAxis.translate(g.chart.plotHeight-l+d.yAdjustment,1),x:g.xAxis.translate(h,1)},H(g.chart.options.instanceAPI.chartInstance.jsVars._reflowData,a,!0))},pointUpdate:function(b,d,a){b._isUserTooltip||b.toolText===z||b._getTooltext?b._getTooltext&&(b.toolText=b._getTooltext(void 0,void 0,{formattedValue:d},
{value:a})):b.toolText=b._toolTextStr+d;b._isUserValue||b.displayValue===z||(b.displayValue=d)},snapPoint:function(b,d,a){var c=b.options.chart,e=c.snapToDiv,f=c.snapToDivOnly;b=b._yAxisPlotLines;for(var p=P(b[1]-b[0]),c=f?.5*p:c.snapToDivRelaxation,p=d.lastSnap,g=1,h=b.length,l;h--;)if(l=P(b[h]-a),e&&l<c){p!==h&&(d.lastSnap=f?void 0:h,a=b[h]);g=0;break}g&&(d.lastSnap=void 0);return a},setMinMaxValue:function(b){var d=b.options.series;b=b.logic;var a=0,c=Infinity,e=-Infinity,f=b.chartInstance.jsVars._reflowData,
p,g,h,l,r;r=0;for(p=d.length;r<p;r+=1)for(h=d[r]&&d[r].data,a=0,l=h.length;a<l;a+=1)g=h[a].y,null!==g&&(e=e>g?e:g,c=c<g?c:g);b.highValue=e;b.lowValue=c;f.postHCJSONCreation=function(){var a=this.hcJSON[ha][0];a.min=c;a.max=e}},setSelectBoxValues:function(b,d){var a=d.xAxis[0],c=d.yAxis[0],e=d.plotHeight;b.startX=a.translate(b.left,1);b.endX=a.translate(b.left+b.width,1);b.startY=c.translate(e-b.top,1);b.endY=c.translate(e-(b.top+b.height),1)}};q("dragarea",Ma({friendlyName:"Dragable Area Chart",standaloneInit:!0,
creditLabel:Y,rendererId:"dragarea",defaultSeriesType:"area",decimals:2,anchorAlpha:"100",eiMethods:q.msareabase.eiMethods},Ga),q.msareabase);q("dragline",Ma({friendlyName:"Dragable Line Chart",standaloneInit:!0,creditLabel:Y,decimals:2,defaultSeriesType:"line",rendererId:"dragline",eiMethods:q.mslinebase.eiMethods},Ga),q.mslinebase);q("dragcolumn2d",Ma({friendlyName:"Dragable Column Chart",standaloneInit:!0,creditLabel:Y,decimals:2,defaultSeriesType:"column",rendererId:"dragcolumn2d",eiMethods:q.mscolumn2dbase.eiMethods},
Ga),q.mscolumn2dbase);q("selectscatter",{friendlyName:"Dragable Scatter Chart",isXY:!0,standaloneInit:!0,creditLabel:Y,defaultSeriesType:"scatter",defaultZeroPlaneHighlighted:!1,spaceManager:Ga.spaceManager,drawButtons:Ga.drawButtons,updateChartWithData:Ga.updateChartWithData,eiMethods:Ma(Ma(Ma({},q.scatterbase.eiMethods),Ga.eiMethods),{getData:function(b){var d=this.jsVars.instanceAPI,a=d.getCollatedData(),c=[],e=a.dataset,f=e&&e.length||0,p=0,g=0;if(b)c=/^json$/ig.test(b)?a:/^csv$/ig.test(b)?d.getCSVString():
A.core.transcodeData(a,"json",b);else for(;p<f;p+=1)if(d=e[p]){for((a=b=(d=e[p]&&e[p].data)&&d.length||0)&&(c[g]||(c[g]=[B(e[p].id,"null")]));a--;)c[g][a+1]=B(d[a].id,"null");b&&(g+=1)}return c}}),getCSVString:function(){for(var b=this.chartInstance.getData(),d=b.length;d--;)b[d]=b[d].join(",");return b.join("|")},getCollatedData:function(){for(var b=this.chartInstance,d=b.jsVars.hcObj._selectEleArr,a=d&&d.length,b=H({},b.getChartData(A.dataFormats.JSON)),c=b.dataset,e,f,p,g,h,l,r,k,m,s=[];a--;)if(e=
d[a])for(l=e.startX,r=e.endX,k=e.startY,m=e.endY,g=c.length;g--;)for(s[g]||(s[g]={data:[]}),h=(p=c[g].data)&&p.length;h--;)f=p[h],e=f.x,f=f.y,e>l&&e<r&&f<k&&f>m&&(s[g].data[h]=!0);for(g=c.length;g--;)for(h=(p=c[g].data)&&p.length;h--;)s[g]&&s[g].data[h]||p.splice(h,1);return this.updatedDataObj=b},createSelectionBox:function(b){var d=b.chart,a=d.paper,c=d.options.chart,e=d.yAxis&&d.yAxis[0],f=d.xAxis&&d.xAxis[0],g=b.selectionLeft,n=b.selectionTop,h=b.selectionWidth;b=b.selectionHeight;var l=g+h,r=
n+b,k=15<h&&15<b,m={resizeEleRadius:15,canvasTop:d.canvasTop,canvasRight:d.canvasLeft+d.canvasWidth,canvasLeft:d.canvasLeft,canvasBottom:d.canvasTop+d.canvasHeight},s=d.layers.tracker,C=d._selectEleArr||(d._selectEleArr=[]);m.index=C.length;m.id="SELECT_"+m.index;m.selectBoxG=s=a.group("selection-box",s).toFront();m.selectBoxTracker=a.rect(g,n,h,b,s).attr({"stroke-width":1,stroke:ea(c.selectBorderColor),ishot:!0,fill:c.selectFillColor}).css({cursor:"move"});m.selectBoxTracker.data("config",{position:6,
selectEleObj:m,xChange:!0,yChange:!0});m.topTracker=a.rect(g,n-6,h,12,s).attr({"stroke-width":0,ishot:!0,fill:ra}).css("cursor",Sa&&"ns-resize"||"n-resize");m.topTracker.data("config",{position:1,selectEleObj:m,yChange:!0});m.rightTracker=a.rect(g+h-6,n,12,b,s).attr({"stroke-width":0,ishot:!0,fill:ra}).css("cursor",Sa&&"ew-resize"||"w-resize");m.rightTracker.data("config",{position:2,selectEleObj:m,xChange:!0});m.bottomTracker=a.rect(g,n+b-6,h,12,s).attr({"stroke-width":0,ishot:!0,fill:ra}).css("cursor",
Sa&&"ns-resize"||"n-resize");m.bottomTracker.data("config",{position:3,selectEleObj:m,yChange:!0});m.leftTracker=a.rect(g-6,n,12,b,s).attr({"stroke-width":0,ishot:!0,fill:ra}).css("cursor",Sa&&"ew-resize"||"e-resize");m.leftTracker.data("config",{position:4,selectEleObj:m,xChange:!0});m.cornerInnerSymbol=a.symbol("resizeIcon",0,0,15,s).attr({transform:"t"+l+","+r,"stroke-width":1,visibility:k?Cb:"hidden",ishot:!0,stroke:"#999999"});m.cornerOuterSymbol=a.symbol("resizeIcon",0,0,-12,s).attr({transform:"t"+
l+","+r,strokeWidth:1,visibility:k?"hidden":Cb,ishot:!0,stroke:"#777777"});m.resizeTracker=a.circle(l,r,12,s).attr({"stroke-width":1,stroke:ra,ishot:!0,fill:ra}).css("cursor",Sa&&"nwse-resize"||"nw-resize");m.resizeTracker.data("config",{position:5,selectEleObj:m,yChange:!0,xChange:!0});m.closeButton=a.symbol("closeIcon",0,0,6,s).attr({transform:"t"+l+","+n,"stroke-width":2,stroke:c.selectionCancelButtonBorderColor,fill:c.selectionCancelButtonFillColor,"stroke-linecap":"round",ishot:!0,"stroke-linejoin":"round"}).css({cursor:"pointer",
_cursor:"hand"}).click(function(){d.logic.deleteSelection(this,d)});m.closeButton.data("config",{index:m.index});m.chart=d;m.startX=f.getAxisPosition(g,1);m.startY=e.getAxisPosition(n,1);m.endX=f.getAxisPosition(l,1);m.endY=e.getAxisPosition(r,1);m.isVisible=!0;C.push(m);d.logic.bindDragEvent(m)},deleteSelection:function(b,d){var a=b.data("config").index,c=d._selectEleArr,e=c[a],f,g,h;f=e.selectBoxTracker.getBBox();h={selectionLeft:f.x,selectionTop:f.y,selectionWidth:f.width,selectionHeight:f.height,
startXValue:d.xAxis[0].getAxisPosition(f.x,1),startYValue:d.yAxis[0].getAxisPosition(f.y,1),endXValue:d.xAxis[0].getAxisPosition(f.x+f.width,1),endYValue:d.yAxis[0].getAxisPosition(f.y+f.height,1),data:d.logic.getCollatedData(),id:e.id};for(g in e)f=e[g],f.remove&&f.remove(),delete e[g];delete c[a];A.raiseEvent("selectionRemoved",h,d.logic.chartInstance)},bindDragEvent:function(b){for(var d in b)/Tracker/.test(d)&&b[d].drag(this.move,this.start,this.up)},start:function(){var b=this.data("config").selectEleObj,
d=b.topTracker,a=b.rightTracker,c=b.bottomTracker,e=b.leftTracker,f=b.resizeTracker,g=d.data("config"),h=a.data("config"),t=c.data("config"),l=e.data("config"),r=f.data("config"),k=b.selectBoxTracker.data("config"),m=b.selectBoxTracker.getBBox();g.ox=m.x;g.oy=m.y;h.ox=m.x2;h.oy=m.y;t.ox=m.x;t.oy=m.y2;l.ox=m.x;l.oy=m.y;g.ox=m.x;g.oy=m.y;r.ox=m.x2;r.oy=m.y2;k.ox=m.x;k.oy=m.y;k.ow=m.width;k.oh=m.height;k.ox2=m.x2;k.oy2=m.y2;b.selectBoxG.toFront();d.hide();a.hide();c.hide();e.hide();f.hide();this.show()},
move:function(b,d){var a=this.data("config"),c=a.selectEleObj,e=c.chart,f=c.topTracker,g=c.rightTracker,h=c.bottomTracker,t=c.leftTracker,l=c.resizeTracker,r=c.selectBoxTracker,k=c.canvasLeft,m=c.canvasRight,s=c.canvasTop,C=c.canvasBottom,ga=r.data("config"),G={},x,w;b=a.xChange?b:0;d=a.yChange?d:0;x=b+a.ox;w=d+a.oy;x=J(m-(a.ow||0),Ya(x,k));w=J(C-(a.oh||0),Ya(w,s));switch(a.position){case 1:G.y=J(ga.oy2,w);G.height=P(ga.oy2-w)||1;f.attr({y:w+-6});break;case 2:G.x=J(ga.ox,x);G.width=P(ga.ox-x)||1;
g.attr({x:x+-6});break;case 3:G.y=J(ga.oy,w);G.height=P(ga.oy-w)||1;h.attr({y:w+-6});break;case 4:G.x=J(ga.ox2,x);G.width=P(ga.ox2-x)||1;t.attr({x:x+-6});break;case 5:G.x=J(ga.ox,x);G.width=P(ga.ox-x)||1;G.y=J(ga.oy,w);G.height=P(ga.oy-w)||1;l.attr({cx:x,cy:w});break;default:G.x=x,G.y=w}this.data("dragStarted")||(a=r.getBBox(),a={selectionLeft:a.x,selectionTop:a.y,selectionWidth:a.width,selectionHeight:a.height,startXValue:e.xAxis[0].getAxisPosition(a.x,1),startYValue:e.yAxis[0].getAxisPosition(a.y,
1),endXValue:e.xAxis[0].getAxisPosition(a.x+a.width,1),endYValue:e.yAxis[0].getAxisPosition(a.y+a.height,1),id:c.id},A.raiseEvent("BeforeSelectionUpdate",a,e.logic.chartInstance),this.data("dragStarted",1));r.animate(G);c.isVisible&&(c.closeButton.hide(),c.cornerInnerSymbol.hide(),c.cornerOuterSymbol.hide(),c.isVisible=!1)},up:function(){var b=this,d=b.data("config").selectEleObj,a=d.chart,c=a.xAxis&&a.xAxis[0],e=a.yAxis&&a.yAxis[0],f=d.topTracker,g=d.rightTracker,h=d.bottomTracker,t=d.leftTracker,
l=d.resizeTracker,r=d.selectBoxTracker,k,m;setTimeout(function(){k=r.getBBox();d.startX=c.getAxisPosition(k.x,1);d.startY=e.getAxisPosition(k.y,1);d.endX=c.getAxisPosition(k.x2,1);d.endY=e.getAxisPosition(k.y2,1);f.attr({x:k.x,y:k.y+-6,width:k.width});g.attr({x:k.x2+-6,y:k.y,height:k.height});h.attr({x:k.x,y:k.y2+-6,width:k.width});t.attr({x:k.x+-6,y:k.y,height:k.height});l.attr({cx:k.x2,cy:k.y2});d.closeButton.transform("t"+k.x2+","+k.y);d.cornerInnerSymbol.transform("t"+k.x2+","+k.y2);d.cornerOuterSymbol.transform("t"+
k.x2+","+k.y2);d.closeButton.show();15>k.width||15>k.height?(d.cornerInnerSymbol.hide(),d.cornerOuterSymbol.show()):(d.cornerInnerSymbol.show(),d.cornerOuterSymbol.hide());d.isVisible=!0;f.show();g.show();h.show();t.show();l.show();b.data("dragStarted")&&(m={selectionLeft:k.x,selectionTop:k.y,selectionWidth:k.width,selectionHeight:k.height,startXValue:a.xAxis[0].getAxisPosition(k.x,1),startYValue:a.yAxis[0].getAxisPosition(k.y,1),endXValue:a.xAxis[0].getAxisPosition(k.x+k.width,1),endYValue:a.yAxis[0].getAxisPosition(k.y+
k.height,1),data:a.logic.getCollatedData(),id:d.id},A.raiseEvent("SelectionUpdated",m,a.logic.chartInstance),b.data("dragStarted",0))},100)},postSeriesAddition:function(b,d){var a=q.scatter&&q.scatter.postSeriesAddition&&q.scatter.postSeriesAddition.apply(this,arguments),c=b.chart,e=d.chart,f=this.colorManager,p=h(e.selectbordercolor,f.getColor("canvasBorderColor")),n=g(e.selectborderalpha,f.getColor("canvasBorderAlpha"));c.selectBorderColor={FCcolor:{color:p,alpha:n}};c.selectFillColor=y(h(e.selectfillcolor,
f.getColor("altHGridColor")),g(e.selectfillalpha,f.getColor("altHGridAlpha")));c.selectionCancelButtonBorderColor=y(h(e.selectioncancelbuttonbordercolor,p),g(e.selectioncancelbuttonborderalpha,n));c.selectionCancelButtonFillColor=y(h(e.selectioncancelbuttonfillcolor,"FFFFFF"),g(e.selectioncancelbuttonfillalpha,100));b.chart.nativeZoom=!1;c.formAction=B(e.formaction);"0"!==e.submitdataasxml||e.formdataformat||(e.formdataformat=A.dataFormats.CSV);c.formDataFormat=h(e.formdataformat,A.dataFormats.XML);
c.formTarget=h(e.formtarget,"_self");c.formMethod=h(e.formmethod,"POST");c.submitFormAsAjax=g(e.submitformusingajax,1);(b.callbacks||(b.callbacks=[])).push(function(){var a=this.logic;Xa(this,{selectionStart:function(a){var b=fc(a.chart.container,a.originalEvent),b=H({selectionLeft:a.selectionLeft,selectionTop:a.selectionTop,selectionWidth:a.selectionWidth,selectionHeight:a.selectionHeight,startXValue:a.chart.xAxis[0].getAxisPosition(a.selectionLeft,1),startYValue:a.chart.yAxis[0].getAxisPosition(a.selectionTop,
1)},b);A.raiseEvent("selectionStart",b,a.chart.logic.chartInstance)},selectionEnd:function(b){var c=fc(b.chart.container,b.originalEvent),d=b.chart.xAxis[0],e=b.chart.yAxis[0],c=H({selectionLeft:b.selectionLeft,selectionTop:b.selectionTop,selectionWidth:b.selectionWidth,selectionHeight:b.selectionHeight,startXValue:d.getAxisPosition(b.selectionLeft,1),startYValue:e.getAxisPosition(b.selectionTop,1),endXValue:d.getAxisPosition(b.selectionLeft+b.selectionWidth,1),endYValue:e.getAxisPosition(b.selectionTop+
b.selectionHeight,1)},c);A.raiseEvent("selectionEnd",c,b.chart.logic.chartInstance);a.createSelectionBox(b)}})});b.chart.zoomType="xy";return a}},q.scatterbase);q("multiaxisline",{friendlyName:"Multi-axis Line Chart",standaloneInit:!0,creditLabel:Y,defaultSeriesType:"line",rendererId:"multiaxisline",isMLAxis:!0,canvasPaddingModifiers:["anchor","anchorlabel"],drawAxisTrackerAndCheckBox:function(){for(var b=this,d=b.canvasLeft,a=b.canvasTop,c=b.canvasWidth,e=b.canvasHeight,f=b.paper,p=b.yAxis,h=p.length,
t=b.logic,l=0,r=0,k={cursor:"col-resize",_cursor:"e-resize","*cursor":"e-resize"},m=t.chartInstance,s=m.jsVars,C=t.dataObj,ga=s._reflowData,G=ga.hcJSON||{},x=C.axis,w=C.chart,C=g(w.allowaxisshift,1),q=(w=g(w.allowselection,1))&&f.html("div",{fill:"transparent",width:b.chartWidth},{top:"",left:"",fontSize:"10px",lineHeight:"15px",marginTop:-b.chartHeight+"px"},b.container),G=G.yAxis||(G.yAxis=[]),D,u,z,E,$,S,K=function(a){b.series&&b.series[a]&&b.series[a].setVisible(!1,!1)},v=function(a){var c=a.data;
a=c.axis[c.index].axisData;var d=a._relatedSeries,e=!c.checkBox.checked(),c=x[a._axisposition];d&&ib(d,function(a){b.options.series[a].legendClick(e,!0)});c.hidedataplots=!e;H(ga,{preReflowAdjustments:function(){this.dataObj.axis=x}});A.raiseEvent("AxisSelected",{selected:e,AxisId:c._index,AxisConfiguration:a._origAttr||fb(c,a)},b.logic.chartInstance)},ca=function(a){var c=a.data;a=c.axis;var c=a[c.index].axisData,d=c.opposite,e=c._axisposition,f=x.length,p,h,k,n={},l=x[e],r={};for(p=0;p<f;p+=1)h=
x[p],h=!g(h.axisonleft,1),h===d&&(k=p,d&&(p=f));k!==e&&(n=a[k],r=x[k],a=x.splice(k,1,x[e]),x.splice(e,1,a[0]));if(k!==e||d!==t.dataObj.chart._lastClickedOpp)H(ga,{preReflowAdjustments:function(){this.dataObj.chart._lastClickedOpp=d;this.dataObj.axis=x}}),A.raiseEvent("AxisShifted",{previousDefaultAxisId:r._index,newDefaultAxisId:l._index,previousDefaultAxisConfiguration:n._origAttr||fb(r,n),newDefaultAxisConfiguration:c._origAttr||fb(l,c)},b.logic.chartInstance),A.hcLib.createChart(m,s.container,
s.type,void 0,void 0,!1,!0)};h--;)D=p[h],u=D.axisData,z=u._axisWidth,(E=u.opposite)||(l+=z),G[h]||(G[h]={}),w&&u.showAxis&&($=d+(E?c+r+g(u.title.margin,z-10)+5:-l),S=a+e+10,D.checkBox=f.html("input",{},{left:$+"px",top:S+"px"}).attr({type:"checkbox",name:"axis[]",value:u.title.text||""}).add(q),D.checkBox.val(u.hidedataplots),u.hidedataplots||u._relatedSeries&&ib(u._relatedSeries,K),vb(D.checkBox.element,ob?"touchstart":"mousedown",v,{axis:p,index:h,checkBox:D.checkBox})),C&&(D.tracker=f.rect(d+(E?
c+r:-l),a,z,e,0).attr({"stroke-width":0,fill:ra,isTracker:+new Date,zIndex:7}).css(k),E&&(r+=z),vb(D.tracker[0],ob?"touchstart":"mousedown",ca,{axis:p,index:h}))},series:function(b){var d=this,a=d.numberFormatter,c=d.name,e=d.dataObj,f=e.chart,p=e.axis,n=d.hcJSON,t=n[ha],l=n.yAxis[0],r=g(e.chart.allowselection,1),k=[],m=g(f.showaxisnamesinlegend,0),s=g(f.yaxisvaluesstep,f.yaxisvaluestep,1),C=this.colorManager,ga,G,x,w,q,D,u,v,E,$,S,K,Ra,ca,la;n.callbacks||(n.callbacks=[]);n.callbacks.push(function(){d.drawAxisTrackerAndCheckBox.call(this)});
n.legend.enabled=Boolean(g(e.chart.showlegend,1));if(p&&0<p.length){this.categoryAdder(e,n);n.yAxis.splice(0,2);D=t.noHiddenAxis=0;for(v=p.length;D<v;D+=1)E=p[D],void 0===E._index&&(E._index=D),E._axisposition=D,(w=!g(E.axisonleft,1))?(E._isSY=!0,k.unshift(E)):(E._isSY=!1,k.push(E));D=0;for(v=k.length;D<v;D+=1)if(E=k[D],q=g(E.showaxis,1),p=E._index||0,a.parseMLAxisConf(E,p),ga=C.getPlotColor(p),E.id=p,Ra=h(E.color,f.axiscolor,ga),$=y(Ra,100),w=!g(E.axisonleft,1),S=g(E.divlinethickness,f.divlinethickness,
1),G=q?g(E.tickwidth,f.axistickwidth,2):0,x=q?g(E.axislinethickness,f.axislinethickness,2):0,K=t[D]={},K.showAxis=q,t.noHiddenAxis+=1-q,q&&(w?la=D:ca=D),u=[],n.yAxis.push({startOnTick:!1,endOnTick:!1,_axisposition:E._axisposition,_isSY:E._isSY,_index:p,hidedataplots:!g(E.hidedataplots,0),title:{enabled:q,style:l.title.style,text:q?F(E.title):z,align:r?"low":"middle",textAlign:r&&w?"right":void 0},labels:{x:0,style:l.labels.style},plotBands:[],plotLines:[],gridLineColor:y(h(E.divlinecolor,Ra),g(E.divlinealpha,
f.divlinealpha,C.getColor("divLineAlpha"),100)),gridLineWidth:S,gridLineDashStyle:g(E.divlinedashed,E.divlineisdashed,f.divlinedashed,f.divlineisdashed,0)?ya(g(E.divlinedashlen,f.divlinedashlen,4),g(E.divlinedashgap,f.divlinedashgap,2),S):void 0,alternateGridColor:Ka,lineColor:$,lineWidth:x,tickLength:G,tickColor:$,tickWidth:x,opposite:w,_relatedSeries:u,showAxis:q}),K.yAxisValuesStep=g(E.yaxisvaluesstep,E.yaxisvaluestep,s),K.maxValue=E.maxvalue,K.tickWidth=G,K.minValue=E.minvalue,K.setadaptiveymin=
g(E.setadaptiveymin,f.setadaptiveymin),K.numDivLines=g(E.numdivlines,f.numdivlines,4),K.adjustdiv=g(E.adjustdiv,f.adjustdiv),K.showYAxisValues=q?g(E.showyaxisvalues,E.showyaxisvalue,f.showyaxisvalues,f.showyaxisvalue,1):0,K.showLimits=q?g(E.showlimits,f.showyaxislimits,f.showlimits,K.showYAxisValues):0,K.showDivLineValues=q?g(E.showdivlinevalue,f.showdivlinevalues,E.showdivlinevalues,K.showYAxisValues):0,K.showzeroplane=E.showzeroplane,K.showzeroplanevalue=g(E.showzeroplanevalue),K.zeroplanecolor=
E.zeroplanecolor,K.zeroplanethickness=E.zeroplanethickness,K.zeroplanealpha=E.zeroplanealpha,K.linecolor=h(E.linecolor,f.linecolor||E.color,ga),K.linealpha=E.linealpha,K.linedashed=E.linedashed,K.linethickness=E.linethickness,K.linedashlen=E.linedashlen,K.linedashgap=E.linedashgap,K.anchorShadow=E.anchorshadow,K.plottooltext=E.plottooltext,E.dataset&&0<E.dataset.length){S=E.dataset.length;ga=g(E.includeinlegend,1);w=!1;q={data:[],relatedSeries:u,name:F(E.title),type:"line",marker:{symbol:"axisIcon",
fillColor:ra,lineColor:lc(Ra,80).replace(rb,La)},lineWidth:0,legendFillColor:0!==m?y(Ra,25):void 0,legendFillOpacity:0,legendIndex:E._index,showInLegend:Boolean(g(m,ga))};n.series.push(q);for($=0;$<S;$+=1){x=E.dataset[$];x._yAxisName=E.title;void 0===x.color&&(x.color=h(K.linecolor,Ra));G={visible:!g(x.initiallyhidden,0),yAxis:D,data:[],hoverEffects:this.parseSeriesHoverOptions(b,n,x,c)};G=this.point(c,G,x,e.chart,n,t.oriCatTmp.length,D,p);G.legendFillColor=q.legendFillColor;G.legendIndex=E._index;
if(void 0===G.showInLegend||G.showInLegend)w=!0;!1!==G.showInLegend&&(G.showInLegend=Boolean(ga));u.push(n.series.length);n.series.push(G)}0!==u.length&&w||(q.showInLegend=!1)}b=f._lastClickedOpp?g(la,ca):g(ca,la);D=0;for(v=n.yAxis.length;D<v;D+=1)D!=b&&(n.yAxis[D].gridLineWidth=0,t[D].zeroplanethickness=0);this.configureAxis(n,e)}},point:function(b,d,a,c,e,f,p,n){b=!1;p=g(c.ignoreemptydatasets,0);var t;t=e.chart;var l=a.data||[],r=e[ha],k=r[d.yAxis||0],m=h(d.type,this.defaultSeriesType),s=e.plotOptions[m]&&
e.plotOptions[m].stacking,C=h(this.isValueAbs,r.isValueAbs,!1),q=g(d.yAxis,0),G=this.numberFormatter,x=this.colorManager,w=I(h(a.color,k.linecolor,c.linecolor,x.getPlotColor())),u=g(a.alpha,k.linealpha,c.linealpha,Ea),D=g(c.showshadow,this.defaultPlotShadow,1),v=g(a.drawanchors,a.showanchors,c.drawanchors,c.showanchors),y=g(a.anchorsides,c.anchorsides,0),E=g(a.anchorstartangle,c.anchorstartangle,90),$=g(a.anchorradius,c.anchorradius,3),S=I(h(a.anchorbordercolor,c.anchorbordercolor,w)),K=g(a.anchorborderthickness,
c.anchorborderthickness,1),x=I(h(a.anchorbgcolor,c.anchorbgcolor,x.getColor("anchorBgColor"))),Ra=h(a.anchoralpha,c.anchoralpha,Ea),ca=h(a.anchorbgalpha,c.anchorbgalpha,Ra);d.anchorShadow=Ra&&h(a.anchorshadow,k.anchorShadow,c.anchorshadow,0);d.name=B(a.seriesname);if(0===g(a.includeinlegend)||void 0===d.name||0===u&&1!==v)d.showInLegend=!1;d.marker={fillColor:{FCcolor:{color:x,alpha:ca*Ra/100+z}},lineColor:{FCcolor:{color:S,alpha:Ra+z}},lineWidth:K,radius:$,symbol:fa(y),startAngle:E};d.color={FCcolor:{color:w,
alpha:u}};d.shadow=D?{opacity:D?u/100:0}:!1;d.step=this.stepLine;d.drawVerticalJoins=Boolean(g(c.drawverticaljoins,1));d.useForwardSteps=Boolean(g(c.useforwardsteps,1));d.lineWidth=g(a.linethickness,k.linethickness,c.linethickness,2);c=d._dataParser=Rb.line(e,{plottooltext:h(a.plottooltext,k.plottooltext),seriesname:d.name,lineAlpha:u,anchorAlpha:Ra,showValues:g(a.showvalues,r.showValues),yAxis:n,lineDashed:Boolean(g(a.dashed,k.linedashed,c.linedashed,0)),lineDashLen:g(a.linedashlen,k.linedashlen,
c.linedashlen,5),lineDashGap:g(a.linedashgap,k.linedashgap,c.linedashgap,4),lineThickness:d.lineWidth,lineColor:w,valuePosition:h(a.valueposition,t.valuePosition),drawAnchors:v,anchorShadow:d.anchorShadow,anchorBgColor:x,anchorBgAlpha:ca,anchorBorderColor:S,anchorBorderThickness:K,anchorRadius:$,anchorSides:y,anchorAngle:E,_sourceDataset:a,_yAxisName:a._yAxisName,hoverEffects:d.hoverEffects},this);delete a._yAxisName;for(n=0;n<f;n+=1)(t=l[n])?(a=G.getCleanValue(t.value,C),null===a?d.data.push({y:null}):
(b=!0,d.data.push(c(t,n,a)),this.pointValueWatcher(e,a,q,s,n,0,m))):d.data.push({y:null});!p||b||this.realtimeEnabled||(d.showInLegend=!1);return d},configureAxis:function(b,d){var a=b[ha],c=d.chart,e,f,p,h,t,l,r,k,m,s,C,q,G;b.xAxis.title.text=F(c.xaxisname);G=0;for(f=b.yAxis.length;G<f;G+=1)e=b.yAxis[G],p=a[G],q=g(p.yAxisValuesStep,1),q=1>q?1:q,h=p.maxValue,t=p.minValue,l=g(p.setadaptiveymin,0),r=l=!l,k=p.numDivLines,m=0!==p.adjustdiv,s=p.showLimits,C=p.showDivLineValues,this.axisMinMaxSetter(e,
p,h,t,l,r,k,m),this.configurePlotLines(c,b,e,p,s,C,q,this.numberFormatter,e._isSY,void 0,e._index),e.reversed&&0<=e.min&&(b.plotOptions.series.threshold=e.max)},spaceManager:function(b,d,a,c){var e=b[ha],f,p,n=d.chart,t,l,r,k,m,s,C,q,G,x,w,u,D,z;z=b.chart.marginLeft;var v=b.chart.marginRight,E=e.marginLeftExtraSpace,$=e.marginTopExtraSpace,S=e.marginBottomExtraSpace,K=e.marginRightExtraSpace;m=a-(E+K+b.chart.marginRight+b.chart.marginLeft);var y=c-(S+b.chart.marginBottom+b.chart.marginTop),ca=.3*
m;c=.3*y;var la=m-ca,M=y-c,F=h(n.legendposition,Da).toLowerCase();b.legend.enabled&&F===qa&&(la-=this.placeLegendBlockRight(b,d,la/2,y));p=b.yAxis;k=p.length;f=k-e.noHiddenAxis;C=0;if(f)for(x=q=0,w=10,D=la/f,s=k-1;0<=s;s-=1)G=p[s],G.showAxis&&(f=e[s],r=G.opposite,u=(r?x:q)+w,t=f.tickWidth,l=h(n.rotateyaxisname,r?"cw":"ccw"),f.verticalAxisNamePadding=4,f.fixedValuesPadding=t,f.verticalAxisValuesPadding=t,f.rotateVerticalAxisName=r&&"ccw"!==l?"cw":l,f.verticalAxisNameWidth=50,G.offset=u,C=D+C-w,f=Wa(G,
f,b,d,y,C,r,0,0),f+=w,r?(x+=f,b.chart.marginRight+=w):(q+=f,b.chart.marginLeft+=w),C-=f,la-=f,la<w&&(w=0),G._axisWidth=f);la-=Za(b,d,la);p=la+ca;b.legend.enabled&&F!==qa&&(M-=this.placeLegendBlockBottom(b,d,m,M/2),b.legend.width>p&&(b.legend.x=0));M-=this.titleSpaceManager(b,d,p,M/2);f=e.x;f.horizontalAxisNamePadding=g(n.xaxisnamepadding,5);f.horizontalLabelPadding=g(n.labelpadding,2);f.labelDisplay="1"==n.rotatelabels?"rotate":h(n.labeldisplay,"auto").toLowerCase();f.staggerLines=g(n.staggerlines,
2);f.slantLabels=g(n.slantlabels,n.slantlabel,0);m={left:0,right:0};m=b.chart.managePlotOverflow&&this.canvasPaddingModifiers&&this.calculateCanvasOverflow(b,!0)||m;s=m.left+m.right;C=.6*p;s>C&&(q=m.left/s,m.left-=q*(s-C),m.right-=(1-q)*(s-C));this.xAxisMinMaxSetter(b,d,p,m.left,m.right);M-=tb(b.xAxis,f,b,d,p,M,ca);M-=Eb(b,d,M,b.xAxis);d=c+M;for(s=0;s<k;s+=1)Ob(d,b,n,b.yAxis[s],e[s].lYLblIdx);b.legend.enabled&&F===qa&&(e=b.legend,n=c+M,e.height>n&&(e.height=n,e.scroll.enabled=!0,C=(e.scroll.scrollBarWidth=
10)+(e.scroll.scrollBarPadding=2),e.width+=C,b.chart.marginRight+=C),e.y=20);n=(e=b.title.alignWithCanvas)?b.chart.marginLeft+p/2:a/2;z=e?b.chart.marginLeft:z;a=e?a-b.chart.marginRight:a-v;switch(b.title.align){case za:b.title.x=z;b.title.align="start";break;case qa:b.title.x=a;b.title.align="end";break;default:b.title.x=n,b.title.align="middle"}switch(b.subtitle.align){case za:b.subtitle.x=z;break;case qa:b.subtitle.x=a;break;default:b.subtitle.x=n}b.chart.marginLeft+=E;b.chart.marginTop+=$;b.chart.marginBottom+=
S;b.chart.marginRight+=K}},q.mslinebase);q("candlestick",{friendlyName:"Candlestick Chart",standaloneInit:!0,creditLabel:Y,paletteIndex:3,defaultSeriesType:"candlestick",canvasborderthickness:1,rendererId:"candlestick",chart:q.errorbar2d.chart,drawErrorValue:q.errorbar2d.drawErrorValue,series:function(b,d,a){var c,e,f=d[ha],p,n,t,l,r,k;c=b.chart;p=d.chart;var m=g(c.showvolumechart,1);n=this.colorManager;var s;d.legend.enabled=Boolean(g(c.showlegend,1));p.rollOverBandColor=y(h(c.rolloverbandcolor,
n.getColor("altHGridColor")),h(c.rolloverbandalpha,n.getColor("altHGridAlpha")));if(b.dataset&&0<b.dataset.length){this.categoryAdder(b,d);d.yAxis[0].opposite=!0;f.numdivlines=B(b.chart.numpdivlines);m&&(s=d._FCconf.numberFormatter,p=d.labels,d._FCconf.numberFormatter={},d._FCconf.smartLabel&&(e=d._FCconf.smartLabel,d._FCconf.smartLabel=void 0),d.labels={},t=H({},d),d._FCconf.numberFormatter=s,d._FCconf.smartLabel=e,d.labels=p,e&&(t._FCconf.smartLabel=e),t._FCconf.numberFormatter=new u.NumberFormatter(H(H({},
c),{forcedecimals:da(c.forcevdecimals,c.forcedecimals),forceyaxisvaluedecimals:da(c.forcevyaxisvaluedecimals,c.forceyaxisvaluedecimals),yaxisvaluedecimals:da(c.vyaxisvaluedecimals,c.yaxisvaluedecimals),formatnumber:da(c.vformatnumber,c.formatnumber),formatnumberscale:da(c.vformatnumberscale,c.formatnumberscale),defaultnumberscale:da(c.vdefaultnumberscale,c.defaultnumberscale),numberscaleunit:da(c.vnumberscaleunit,c.numberscaleunit),vnumberscalevalue:da(c.vnumberscalevalue,c.numberscalevalue),scalerecursively:da(c.vscalerecursively,
c.scalerecursively),maxscalerecursion:da(c.vmaxscalerecursion,c.maxscalerecursion),scaleseparator:da(c.vscaleseparator,c.scaleseparator),numberprefix:da(c.vnumberprefix,c.numberprefix),numbersuffix:da(c.vnumbersuffix,c.numbersuffix),decimals:da(c.vdecimals,c.decimals)}),this),H(t,{chart:{backgroundColor:"rgba(255,255,255,0)",borderColor:"rgba(255,255,255,0)",animation:!1},title:{text:null},subtitle:{text:null},legend:{enabled:!1},credits:{enabled:!1},xAxis:{opposite:!0,labels:{enabled:!1}},yAxis:[{opposite:!0,
title:{},plotBands:[],plotLines:[]},{opposite:!1,title:{text:b.chart.vyaxisname}}]}),s=d.subCharts=[t]);c=0;for(e=b.dataset.length;c<e;c+=1)p={numColumns:e,data:[]},n=b.dataset[c],p=this.point(a,p,n,b.chart,d,f.oriCatTmp.length,c),p instanceof Array?(m&&(t.series.push({type:"column",data:p[1]}),t.showVolume=!0,n=g(b.chart.volumeheightpercent,40),n=20>n?20:80<n?80:n,l=f.height-(d.chart.marginBottom+d.chart.marginTop),r=l*n/100,k=d.chart.marginBottom+r,t[ha].marginTop=k+40,t.yAxis[0].plotBands=[],t.yAxis[0].plotLines=
[],t.exporting.enabled=!1,t.yAxis[0].title.text=F(B(b.chart.vyaxisname)),t.yAxis[0].title.align="low",t.chart.height=r+20,t.chart.width=f.width,t.chart.top=l-r,t.chart.left=0,t.chart.volumeHeightPercent=n),d.series.push(p[0])):d.series.push(p);if(b.trendset&&0<b.trendset.length)for(c=0,e=b.trendset.length;c<e;c+=1)p={type:"line",marker:{enabled:!1},connectNullData:1,data:[]},t=b.trendset[c],t.data&&0<t.data.length&&(p=this.getTrendsetPoint(a,p,t,b.chart,d,f.oriCatTmp.length,c),d.series.push(p));b.chart.showdivlinesecondaryvalue=
0;b.chart.showsecondarylimits=0;this.configureAxis(d,b);d.yAxis[1].opposite=!1;d.yAxis[1].min=d.yAxis[0].min;d.yAxis[1].max=d.yAxis[0].max;d.yAxis[1].title.text=d.yAxis[0].title.text;d.yAxis[0].title.text=z;m&&s&&(s=s[0],a=s[ha],a.numdivlines=B(b.chart.numvdivlines),a[0].min=f.volume&&f.volume.min,a[0].max=f.volume&&f.volume.max,s.series&&s.series[0]&&(s.series[0].showInLegend=!1),this.configureAxis(s,b),s.yAxis[0].title.text=F(B(b.chart.vyaxisname)),s.yAxis[1].min=s.yAxis[0].min,s.yAxis[1].max=s.yAxis[0].max,
s.yAxis[1].title.text=s.yAxis[0].title.text,s.yAxis[0].title.text=z);if((a=b.trendlines&&b.trendlines[0]&&b.trendlines[0].line)&&a.length){for(m=0;m<a.length;m+=1)a[m].parentyaxis="s",a[m].valueonleft="1";ac(b.trendlines,d.yAxis,f,!0,this.isBar)}}},getTrendsetPoint:function(b,d,a,c,e){if(a.data){b=a.data;var f=b.length,p=0,n,t,l,r,k,m=e[ha],s=this.numberFormatter,C=g(d.yAxis,0),m=m.toolTextStore,f=I(h(a.color,c.trendsetcolor,"666666")),p=h(a.alpha,c.trendsetalpha,"100");n=g(a.thickness,c.trendsetthickness,
2);t=Boolean(g(a.dashed,c.trendsetdashed,0));l=g(a.dashlen,c.trendsetdashlen,4);r=g(a.dashgap,c.trendsetdashgap,4);k=h(a.includeinlegend,1);d.color=y(f,p);d.lineWidth=n;d.dashStyle=t?ya(l,r):void 0;d.includeInLegend=k;d.name=B(a.name);d.doNotUseBand=!0;if(0===g(a.includeinlegend)||void 0===d.name)d.showInLegend=!1;d.tooltip={enabled:!1};p=c.interactivelegend=0;for(f=b.length;p<f;p+=1)(c=b[p])&&!c.vline&&(a=s.getCleanValue(c.value),c=s.getCleanValue(c.x),c=null!==c?c:p+1,n=m&&m[c],d.data.push({x:c,
y:a,toolText:n}),this.pointValueWatchers(e,null,a,a,null,C))}return d},point:function(b,d,a,c,e){if(a.data){b=q[b];var f=e[ha],p=B(c.plotpriceas,z).toLowerCase(),n=a.data,t=n&&n.length,l=this.numberFormatter,r=[],k=[],m={},s,C,ga,G=!1,x=g(d.yAxis,0),w=I(h(c.bearbordercolor,"B90000")),u=I(h(c.bearfillcolor,"B90000")),D=this.colorManager,v=I(h(c.bullbordercolor,D.getColor("canvasBorderColor"))),db=I(h(c.bullfillcolor,"FFFFFF")),E=d.lineWidth=g(c.plotlinethickness,"line"==p||"bar"==p?2:1),$=h(c.plotlinealpha,
"100"),S=g(c.plotlinedashlen,5),K=g(c.plotlinedashgap,4),Ra=g(c.vplotborderthickness,1),ca=!!g(c.drawanchors,1),la=g(c.anchorsides,0),M=g(c.anchorstartangle,90),A=g(c.anchorradius,this.anchorRadius,3),L=I(h(c.anchorbordercolor,v)),W=g(c.anchorborderthickness,this.anchorBorderThickness,1),D=I(h(c.anchorbgcolor,D.getColor("anchorBgColor"))),O=h(c.anchoralpha,"0"),N=h(c.anchorbgalpha,O),ia,X,R,H,U,Oa,ea,V,Q,aa,ba,Y,ka,cb,oa,pa=!1;d.name=B(a.seriesname);d.showInLegend=!1;d.marker={};switch(p){case "line":d.plotType=
"line";break;case "bar":d.plotType="candlestickbar";break;default:d.plotType="column",d.errorBarWidthPercent=0,pa=!0}for(X=0;X<t;X+=1)(R=n[X])&&!R.vline&&(ea=l.getCleanValue(R.open),V=l.getCleanValue(R.close),Q=l.getCleanValue(R.high),aa=l.getCleanValue(R.low),ba=l.getCleanValue(R.volume,!0),cb=l.getCleanValue(R.x),pa&&P(V-ea),J(ea,V),Ya(ea,V),null!==ba&&(G=!0),Y=J(ea,V,Q,aa),ka=Ya(ea,V,Q,aa),F(B(R.valuetext,z)),s=I(h(R.bordercolor,V<ea?w:v)),C=h(R.alpha,"100"),p=y(I(h(R.color,V<ea?u:db)),C),ga=Boolean(g(R.dashed))?
ya(S,K):void 0,ia={opacity:C/100},U=f.oriCatTmp[X],oa=y(s,$),H=b.getPointStub(e,c,R,ea,V,Q,aa,ba,oa,E,d.plotType,U),cb=cb?cb:X+1,m[cb]=H.toolText,d.data.push({high:Ya(ea,V,Q,aa),low:J(ea,V,Q,aa),color:pa?p:{FCcolor:{color:s,alpha:C}},displayValue:F(h(R.displayvalue,R.valuetext,z)),borderColor:oa,shadow:ia,dashStyle:ga,borderWidth:E,x:cb,y:H.y,categoryLabel:U,errorValue:H.errorValue,previousY:H.previousY,toolText:H.toolText,link:H.link,marker:{enabled:ca,fillColor:{FCcolor:{color:D,alpha:N*O/100+z}},
lineColor:{FCcolor:{color:L,alpha:O}},lineWidth:W,radius:A,startAngle:M,symbol:fa(la)}}),Oa=B(F(h(R.volumetooltext,a.volumetooltext,c.volumetooltext))),Oa=void 0!==Oa?b.getPointStub(e,c,R,ea,V,Q,aa,ba,oa,E,d.plotType,U,Oa).toolText:H.toolText,k.push({y:ba,categoryLabel:U,color:y(p,C),toolText:Oa,borderWidth:Ra,borderColor:y(s,h(c.plotlinealpha,R.alpha)),dashStyle:ga,shadow:ia,x:cb,link:R.link}),this.pointValueWatchers(e,cb,Y,ka,ba,x));f.toolTextStore=m;(d.drawVolume=G)?r.push(d,k):r=d;return r}return[]},
getPointStub:function(b,d,a,c,e,f,g,n,t,l,r,k,m){var s=z,s=b[ha],C=s.numberFormatter,q="line"===r,G=J(c,e),x=Ya(c,e),w={};b=b.subCharts&&b.subCharts[0]&&b.subCharts[0][ha].numberFormatter||C;switch(r){case "line":w.y=e;w.link=h(a.link);break;case "column":w.y=P(e-c);w.previousY=G;w.link=h(a.link);w.errorValue=[];0<f-x&&w.errorValue.push({errorValue:f-x,errorStartValue:x,errorBarColor:t,errorBarThickness:l,opacity:1});0>g-G&&w.errorValue.push({errorValue:g-G,errorStartValue:G,errorBarColor:t,errorBarThickness:l,
opacity:1});break;default:w.y=c,w.previousY=e,w.link=h(a.link)}s.showTooltip?(s=B(F(h(m,a.tooltext,s.tooltext))),void 0!==s?s=gb(s,[3,5,6,10,54,55,56,57,58,59,60,61,81,82],{label:k,yaxisName:F(d.yaxisname),xaxisName:F(d.xaxisname),openValue:a.open,openDataValue:C.dataLabels(c),closeValue:a.close,closeDataValue:C.dataLabels(e),highValue:a.high,highDataValue:C.dataLabels(f),lowValue:a.low,lowDataValue:C.dataLabels(g),volumeValue:a.volume,volumeDataValue:C.dataLabels(n)},a,d):(s=null===c||q?z:"<b>Open:</b> "+
C.dataLabels(c)+"<br/>",s+=null!==e?"<b>Close:</b> "+C.dataLabels(e)+"<br/>":z,s+=null===f||q?z:"<b>High:</b> "+C.dataLabels(f)+"<br/>",s+=null===g||q?z:"<b>Low:</b> "+C.dataLabels(g)+"<br/>",s+=null!==n?"<b>Volume:</b> "+b.dataLabels(n):z)):s=z;w.toolText=s;return w},pointValueWatchers:function(b,d,a,c,e,f){var p=b[ha];f=g(f,0);null!==e&&(b=p.volume,b||(b=p.volume={}),b.max=b.max>e?b.max:e,b.min=b.min<e?b.min:e);null!==a&&(b=p[f],!b.max&&0!==b.max&&(b.max=a),!b.min&&0!==b.min&&(b.min=a),b.max=Ya(b.max,
a),b.min=J(b.min,a));null!==c&&(b=p[f],!b.max&&0!==b.max&&(b.max=c),!b.min&&0!==b.min&&(b.min=c),b.max=Ya(b.max,c),b.min=J(b.min,c));null!==d&&(a=p.x,a.max=a.max>d?a.max:d,a.min=a.min<d?a.min:d)},spaceManager:function(b,d,a,c){var e=b[ha],f,p=d.chart,n=b.chart,t,l,r=this.smartLabel||e.smartLabel,k=e.x.min,m=e.x.max,s,C,q=c-(e.marginBottomExtraSpace+0+n.marginTop),G=b.yAxis,x;l=G.length;var w,u,D=0,v=0,y=8,E,$=Ya(g(n.plotBorderWidth,1),0),S;this.base.spaceManager.apply(this,arguments);b.xAxis.min=
k-.5;b.xAxis.max=m+.5;b.yAxis[0].title.centerYAxis=b.yAxis[1].title.centerYAxis=!0;if(b.subCharts){k=b.subCharts[0];D=b.xAxis.showLine?b.xAxis.lineThickness:$;S=c-(n.marginTop+n.marginBottom+D+$);v=k.chart.volumeHeightPercent;m=(e.horizontalAxisHeight||15)+$;S=S*v/100;n.marginBottom+=S+D+$;l=H({},b.xAxis);v=0;for(y=b.xAxis.plotBands.length;v<y;v+=1)(f=b.xAxis.plotBands[v])&&f.label&&f.label.text&&(f.label.text=" "),(f=l.plotBands[v])&&f.label&&f.label.y&&(f.label.y=Ia(p.basefontsize,10)+4+D);v=0;
for(y=l.plotLines.length;v<y;v+=1)(f=l.plotLines[v])&&f.label&&f.label.text&&(f.label.text=z);k.yAxis&&k.yAxis[0]&&k.yAxis[0].title&&k.yAxis[0].title.text&&(k.yAxis[0].title.text=z);k.xAxis=l;l=h(d.chart.rotateyaxisname,"ccw");l=l===Ha?"none":l;r=G[1].title.rotation?r.getSmartText(k.yAxis[1].title.text,"none"===l?n.marginLeft-10:S,void 0,!0).text:r.getSmartText(k.yAxis[1].title.text,r.getOriSize(G[1].title.text).width,void 0,!0).text;G=k.yAxis;l=G.length;y=v=D=0;for(w=l-1;0<=w;w-=1)u=G[w],f=e[w],
x=u.opposite,E=(x?v:D)+y,l=h(d.chart.rotateyaxisname,x?"cw":"ccw"),l=l===Ha?"none":l,t=g(p.yaxisvaluespadding,p.labelypadding,4),t<$&&(t=$),f.verticalAxisNamePadding=10,f.verticalAxisValuesPadding=t+(u.showLine?u.lineThickness:0),f.rotateVerticalAxisName=l,u.offset=E,x?s=Wa(u,f,k,d,q,n.marginRight,!!x,0,0,v):C=Wa(u,f,k,d,q,n.marginLeft,!!x,0,0,D);G=b.yAxis;k.yAxis[1].title=H({},b.yAxis[1].title);k.yAxis[1].title.style=b.orphanStyles.vyaxisname.style;k.yAxis[1].title.text=r;k.chart.left=0;k.chart.width=
a;k.chart.top=c-n.marginBottom+m;k.chart.height=n.marginBottom-m;s=Math.max(n.marginRight,s+n.spacingRight);C=Math.max(n.marginLeft,C+n.spacingLeft);k.chart.marginLeft=n.marginLeft=C;k.chart.marginRight=n.marginRight=s;k.chart.marginTop=5;k.chart.marginBottom=n.marginBottom-(m+S);b.yAxis.push(k.yAxis[0],k.yAxis[1]);k.xAxis.startY=G[2].startY=G[3].startY=k.chart.top+k.chart.marginTop;k.xAxis.endY=G[2].endY=G[3].endY=k.yAxis[0].startY+k.chart.height-k.chart.marginBottom;k.series[0]&&(k.series[0].yAxis=
3,b.series.push(k.series[0]));b.xAxis=[b.xAxis,k.xAxis];b.yAxis[2].title.centerYAxis=b.yAxis[3].title.centerYAxis=!0}},isDual:!0,numVDivLines:0,defSetAdaptiveYMin:!0,divLineIsDashed:1,isCandleStick:!0,defaultPlotShadow:1,requiredAutoNumericLabels:1},q.scatterbase);q("kagi",{friendlyName:"Kagi Chart",standaloneInit:!0,stepLine:!0,creditLabel:Y,defaultSeriesType:"kagi",defaultZeroPlaneHighlighted:!1,setAdaptiveYMin:1,canvasPadding:15,isKagi:1,rendererId:"kagi",pointValueWatcher:function(b,d,a){null!==
d&&(b=b[ha],a=g(a,0),b[a]||(b[a]={}),a=b[a],this.maxValue=a.max=a.max>d?a.max:d,this.minValue=a.min=a.min<d?a.min:d)},point:function(b,d,a,c,e){b=e.chart;var f=a.length,p=0,n=e[ha].x,t=e[ha].numberFormatter,l=this.colorManager,r,k,m,s,C,q,G,x,w,u,D,v,y,E,$,S,K,Ra,ca,la,M,B,L;x=I(h(c.linecolor,c.palettecolors,l.getColor("plotFillColor")));w=g(c.linealpha,100);r=g(c.linethickness,2);d.color={FCcolor:{color:x,alpha:w}};ca=d.anchorShadow=g(c.anchorshadow,0);d.lineWidth=r;d.step=this.stepLine;d.drawVerticalJoins=
Boolean(g(c.drawverticaljoins,1));G=g(c.drawanchors,c.showanchors);for(k=0;k<f;k+=1)s=a[k],s.vline||(r=t.getCleanValue(s.value),null!=r&&(m=g(s.showlabel,c.showlabels,1),m=F(m?da(s.label,s.name):z),p+=1,q=g(s.linealpha,w),C={opacity:q/100},u=g(s.anchorsides,c.anchorsides,0),Ra=g(s.anchorstartangle,c.anchorstartangle,90),y=g(s.anchorradius,c.anchorradius,this.anchorRadius,3),v=I(h(s.anchorbordercolor,c.anchorbordercolor,x)),D=g(s.anchorborderthickness,c.anchorborderthickness,this.anchorBorderThickness,
1),E=I(h(s.anchorbgcolor,c.anchorbgcolor,l.getColor("anchorBgColor"))),$=h(s.anchoralpha,c.anchoralpha,"100"),S=h(s.anchorbgalpha,c.anchorbgalpha,$),q=void 0===G?0!==q:!!G,la=Boolean(g(s.anchorshadow,ca,0)),M=h(s.anchorimageurl,c.anchorimageurl),B=h(s.anchorimagescale,c.anchorimagescale,100),L=h(s.anchorimagealpha,c.anchorimagealpha,100),K=this.pointHoverOptions(s,d,{plotType:"anchor",anchorBgColor:E,anchorAlpha:$,anchorBgAlpha:S,anchorAngle:Ra,anchorBorderThickness:D,anchorBorderColor:v,anchorBorderAlpha:$,
anchorSides:u,anchorRadius:y,imageUrl:M,imageScale:B,imageAlpha:L,shadow:C}),d.data.push(H(this.getPointStub(s,r,m,e),{y:r,color:x,shadow:C,dashStyle:s.dashed,valuePosition:h(s.valueposition,b.valuePosition),isDefined:!0,marker:{enabled:!!q,shadow:la&&{opacity:$/100},fillColor:{FCcolor:{color:E,alpha:S*$/100+z}},lineColor:{FCcolor:{color:v,alpha:$}},lineWidth:D,radius:y,startAngle:Ra,symbol:fa(u),imageUrl:M,imageScale:B,imageAlpha:L},hoverEffects:K.enabled&&K.options,rolloverProperties:K.enabled&&
K.rolloverOptions})),this.pointValueWatcher(e,r)));n.catCount=p;return d},postSeriesAddition:function(b,d){var a=b.series[0],c=d.chart,e=d.data,f=a&&a.data,p=f&&f.length,n=b[ha],t=n.x,n=n.axisGridManager,l=b.xAxis,r=!1,k=0,m=.5,s=g(c.reversalvalue,-1),p=g(c.reversalpercentage,5),C=this.maxValue,q=this.minValue,G,x,w,u,D,v,y,E,$,S,K,B,ca,la,M,J,L={};if(f&&f.length){a.rallyColor=h(c.rallycolor,"FF0000");a.rallyAlpha=g(c.rallyalpha,c.linealpha,100);a.declineColor=h(c.declinecolor,"0000FF");a.declineAlpha=
g(c.declinealpha,c.linealpha,100);a.rallyThickness=g(c.rallythickness,c.linethickness,2);D=g(c.rallydashlen,c.linedashlen,5);B=g(c.rallydashgap,c.linedashgap,4);a.declineThickness=g(c.declinethickness,c.linethickness,2);ca=g(c.declinedashlen,c.linedashlen,5);la=g(c.declinedashgap,c.linedashgap,4);a.lineDashed={"true":g(c.rallydashed,c.linedashed,0),"false":g(c.declinedashed,c.linedashed,0)};a.rallyDashed=g(c.rallydashed,c.linedashed,0)?ya(D,B,a.rallyThickness):void 0;a.declineDashed=g(c.declinedashed,
c.linedashed,0)?ya(ca,la,a.declineThickness):void 0;a.canvasPadding=g(c.canvaspadding,this.canvasPadding,15);s=0<s?s:p*(C-q)/100;C=f[0].y;q=function(a,b){for(var c,d=1,e=f[0].y;d<a;)c=f[d].y,b?c<=e&&(f[d].isDefined=!1):c>=e&&(f[d].isDefined=!1),d+=1;f[0].vAlign=b?Da:Ca;f[0].align="center"};p=e&&e.length;for(la=ca=0;la<p;la+=1)if((B=e[la])&&B.vline)ca&&n.addVline(l,B,m,b);else{L=e[la];J&&(J=!1,m+=.5);if(ca&&($=f[ca])){S=f[ca-1];$.vAlign="middle";$.align=qa;$.showLabel=!1;D=null;u=$.y;w=f[ca+1]&&f[ca+
1].y;K=P(C-u);r?u<v&&G?G=!1:u>y&&!G&&(G=!0):(u>C&&K>s?(G=!0,v=C,y=null,r=x=!0,q(ca,G)):u<C&&K>s?(G=!1,v=null,y=C,x=!1,r=!0,q(ca,G)):(x=G=null,r=!1),V(S)&&(S.isRally=G),null!=G&&(f[0].isRally=G));$.isRally=G;if(x&&u<C||!x&&u>C)D=C;M=D?D:u;K=P(M-w);w=null==x?null:x?M>w&&K>=s:M<w&&K>=s;if(S&&S.isShift)for(x?(v=C,E=Da):x||(y=C,E=Ca),S=ca;1<S;S-=1)if(f[S].y==C){f[S].vAlign=E;f[S].align="center";f[S].showLabel=!0;break}w?(k+=1,m+=.5,J=!0,x=!x,$.isShift=!0,C=M,u=g(B.showlabel,c.showlabels,1),u=F(u?da(B.label,
B.name):z),n.addXaxisCat(l,k-1,k-1,u,B,{},c)):x&&u>C||!x&&u<C?C=u:D=C;$.plotValue=D;$.objParams={isRally:G,lastHigh:y,lastLow:v,isRallyInitialised:r}}ca+=1}u=g(L.showlabel,c.showlabels,1);u=F(u?da(L.label,L.name):z);n.addXaxisCat(l,k,k,u,L,{},c);a.shiftCount=t.catCount=k+1}},xAxisMinMaxSetter:function(b,d,a){var c=b[ha].x,e=d.chart;d=c.min=g(c.min,0);var c=c.max=g(c.max,c.catCount-1),f=b.xAxis,p=J(g(e.canvaspadding,0),a/2-10),h=p,t=g(e.maxhshiftpercent,10),l=b.series[0];b=l&&l.shiftCount;var e=g(e.canvaspadding,
this.canvasPadding,15),r=a-2*e;l&&(h=l.xShiftLength=J(r/b,(0>=t?10:t)*r/100),p=e+h/2,h=a-(h*Ya(b-1,1)+p),c=Ya(c,1));f.labels.enabled=!1;f.gridLineWidth=0;f.alternateGridColor=Ka;a=(a-(p+h))/(c-d+0);f.min=d-(0+p/a);f.max=c+(0+h/a)}},q.linebase);Fa=function(b,d,a){this.nf=d;this.dataSeparator=a;this.method=(b||z).toLowerCase().replace(/\s/g,"")};Fa.prototype={setArray:function(b){var d=this.nf,a=this.dataSeparator,c=0;!b&&(b=z);for(b=this.dataLength=(a=b.replace(/\s/g,z).split(a))&&a.length;b--;)c+=
a[b]=d.getCleanValue(a[b]);a&&a.sort(function(a,b){return a-b});this.values=a;this.mean=c/this.dataLength;this.getFrequencies()},getQuartiles:function(){var b=this.values,d=this.dataLength,a=d%2,c,e;switch(this.method){case "tukey":a?(a=(d+3)/4,d=(3*d+1)/4):(a=(d+2)/4,d=(3*d+2)/4);break;case "mooremccabe":a?(a=(d+1)/4,d=3*a):(a=(d+2)/4,d=(3*d+2)/4);break;case "freundperles":a=(d+3)/4;d=(3*d+1)/4;break;case "mendenhallsincich":a=ma((d+1)/4);d=ma(3*a);break;default:a=(d+1)/4,d=3*a}a-=1;d-=1;c=$b(a);
e=$b(d);a=a-c?b[c]+(b[jc(a)]-b[c])*(a-c):b[a];b=d-e?b[e]+(b[jc(d)]-b[e])*(d-e):b[d];return this.quartiles={q1:a,q3:b}},getMinMax:function(){var b=this.values;return{min:b[0],max:b[this.dataLength-1]}},getMean:function(){return this.mean},getMD:function(){for(var b=this.mean,d=this.frequencies,a=d.length,c,e=0;a--;)c=d[a],e+=c.frequency*P(c.value-b);return e/this.dataLength},getSD:function(){for(var b=this.mean,d=this.values,a=this.dataLength,c=a,e=0;a--;)e+=Q(d[a]-b,2);return Ac(e)/c},getQD:function(){return.5*
(this.quartiles.q3-this.quartiles.q1)},getFrequencies:function(){var b=[],d=this.dataLength,a=this.values,c=0,e,f,g;for(g=0;g<d;g+=1)c+=e=a[g],V(b[g])?b[g].frequency+=1:(f={},f.value=e,f.frequency=1,b[g]=f);this.sum=c;this.frequencies=b},getMedian:function(){var b=this.dataLength,d=.5*b,a=this.values;return 0===b%2?(a[d]+a[d-1])/2:a[$b(d)]}};Fa.prototype.constructor=Fa;q("boxandwhisker2d",{friendlyName:"Box and Whisker Chart",standaloneInit:!0,creditLabel:Y,defaultSeriesType:"boxandwhisker2d",chart:q.errorbar2d.chart,
drawErrorValue:q.errorbar2d.drawErrorValue,decimals:2,maxColWidth:9E3,useErrorAnimation:1,avoidCrispError:0,tooltipsepchar:": ",rendererId:"boxandwhisker",fireGroupEvent:!0,point:function(b,d,a,c,e,f,p,n,t){var l=e[ha],r=g(c.ignoreemptydatasets,0),k=l.numberFormatter,m=e.chart.useRoundEdges,s=g(c.showshadow,1),C=this.colorManager,q=","+(g(c.useplotgradientcolor,0)?Mb(c.plotgradientcolor,C.getColor("plotGradientColor")):z),G=2*p,x=g(c.plotborderthickness,1),w=h(c.plotbordercolor,C.getColor("plotBorderColor")).split(",")[0],
u=h(c.plotborderalpha,"100"),D="0"==c.showplotborder?"0":u,v=g(a.dashed,c.plotborderdashed,0),db=g(a.dashlen,c.plotborderdashlen,5),E=g(a.dashgap,c.plotborderdashgap,4),$=h(a.upperboxcolor,c.upperboxcolor,C.getPlotColor(G)),S=h(a.lowerboxcolor,c.lowerboxcolor,C.getPlotColor(G+1)),K=g(a.upperboxalpha,c.upperboxalpha),Ra=g(a.lowerboxalpha,c.lowerboxalpha),ca=h(a.upperwhiskercolor,c.upperwhiskercolor,w),la=h(a.lowerwhiskercolor,c.lowerwhiskercolor,w),M=g(a.upperwhiskeralpha,c.upperwhiskeralpha,c.plotborderalpha,
"100"),A=g(a.lowerwhiskeralpha,c.lowerwhiskeralpha,c.plotborderalpha,"100"),L=g(a.upperwhiskerthickness,c.upperwhiskerthickness,x),W=g(a.lowerwhiskerthickness,c.lowerwhiskerthickness,x),O=h(a.upperwhiskerdashed,c.upperwhiskerdashed,0),N=h(a.lowerwhiskerdashed,c.lowerwhiskerdashed,0),ia=h(a.upperwhiskerdashlen,c.upperwhiskerdashlen,5),X=h(a.lowerwhiskerdashlen,c.lowerwhiskerdashlen,5),R=h(a.upperwhiskerdashgap,c.upperwhiskerdashgap,4),I=h(a.lowerwhiskerdashgap,c.lowerwhiskerdashgap,4),U=h(a.upperquartilecolor,
c.upperquartilecolor,w),Oa=h(a.lowerquartilecolor,c.lowerquartilecolor,w),P=h(a.upperboxbordercolor,c.upperboxbordercolor,w),Q=h(a.lowerboxbordercolor,c.lowerboxbordercolor,w),ba=h(a.mediancolor,c.mediancolor,w),aa=h(a.upperquartilealpha,c.upperquartilealpha,m?0:u),Y=h(a.lowerquartilealpha,c.lowerquartilealpha,m?0:u),Z=h(a.upperboxborderalpha,c.upperboxborderalpha,m?0:D),ka=h(a.lowerboxborderalpha,c.lowerboxborderalpha,m?0:D),cb=h(a.medianalpha,c.medianalpha,u),oa=h(a.upperquartilethickness,c.upperquartilethickness,
x),pa=h(a.lowerquartilethickness,c.lowerquartilethickness,x),mb=h(a.upperboxborderthickness,c.upperboxborderthickness,x),ua=h(a.lowerboxborderthickness,c.lowerboxborderthickness,x),da=h(a.medianthickness,c.medianthickness,x),ja=h(a.upperquartiledashed,c.upperquartiledashed,v),sa=h(a.lowerquartiledashed,c.lowerquartiledashed,v),va=h(a.upperboxborderdashed,c.upperboxborderdashed,v),xb=h(a.lowerboxborderdashed,c.lowerboxborderdashed,v),bd=h(a.mediandashed,c.mediandashed,v),ma=h(a.upperquartiledashlen,
c.upperquartiledashlen,db),Cc=h(a.lowerquartiledashlen,c.lowerquartiledashlen,db),ra=h(a.upperboxborderdashlen,c.upperboxborderdashlen,db),na=h(a.lowerboxborderdashlen,c.lowerboxborderdashlen,db),ta=h(a.mediandashlen,c.mediandashlen,db),qa=h(a.upperquartiledashgap,c.upperquartiledashgap,E),wa=h(a.lowerquartiledashgap,c.lowerquartiledashgap,E),xa=h(a.upperboxborderdashgap,c.upperboxborderdashgap,E),Aa=h(a.lowerboxborderdashgap,c.lowerboxborderdashgap,E),Fa=h(a.mediandashgap,c.mediandashgap,E),Ca={},
Da={},Ea={},Ga={},za={},Ha=[],Ia=[],Ja=[],Ma=[],Na=[],La={polygon:"polygon",spoke:"spoke"},Pa=La[h(a.meaniconshape,c.meaniconshape,"polygon").toLowerCase()]||"polygon",Ta=g(a.meaniconradius,c.meaniconradius,5),Qa=g(a.meaniconsides,c.meaniconsides,3),Sa=h(a.meaniconcolor,c.meaniconcolor,"000000"),Ua=h(a.meaniconbordercolor,c.meaniconbordercolor,"000000"),Xa=g(a.meaniconalpha,c.meaniconalpha,100),Wa=La[h(a.sdiconshape,c.sdiconshape,"polygon").toLowerCase()]||"polygon",Za=g(a.sdiconradius,c.sdiconradius,
5),$a=g(a.sdiconsides,c.sdiconsides,3),ab=h(a.sdiconcolor,c.sdiconcolor,"000000"),bb=h(a.sdiconbordercolor,c.sdiconbordercolor,"000000"),gb=g(a.sdiconalpha,c.sdiconalpha,100),fb=La[h(a.mdiconshape,c.mdiconshape,"polygon").toLowerCase()]||"polygon",hb=g(a.mdiconradius,c.mdiconradius,5),jb=g(a.mdiconsides,c.mdiconsides,3),ib=h(a.mdiconcolor,c.mdiconcolor,"000000"),ob=h(a.mdiconbordercolor,c.mdiconbordercolor,"000000"),tb=g(a.mdiconalpha,c.mdiconalpha,100),qb=La[h(a.qdiconshape,c.qdiconshape,"polygon").toLowerCase()]||
"polygon",rb=g(a.qdiconradius,c.qdiconradius,5),sb=g(a.qdiconsides,c.qdiconsides,3),pb=h(a.qdiconcolor,c.qdiconcolor,"000000"),vb=h(a.qdiconbordercolor,c.qdiconbordercolor,"000000"),Eb=g(a.qdiconalpha,c.qdiconalpha,100),Cb=La[h(a.outliericonshape,c.outliericonshape,"polygon").toLowerCase()]||"polygon",Db=g(a.outliericonradius,c.outliericonradius,5),Hb=g(a.outliericonsides,c.outliericonsides,3),Nb=h(a.outliericoncolor,c.outliericoncolor,"000000"),Ob=h(a.outliericonbordercolor,c.outliericonbordercolor,
"000000"),Rb=g(a.outliericonalpha,c.outliericonalpha,100),Fb=(1-2*l.plotSpacePercent)/2*(-.5+p),Qb=g(c.reverselegend,0),Gb=Qb?-1:1,mc=d.legendIndex=6*p+(Qb?5:0),ac=g(a.showmean,c.showmean,0),bc=g(a.showmd,c.showmd,0),cc=g(a.showsd,c.showsd,0),fc=g(a.showqd,c.showqd,0),$b=g(a.showalloutliers,c.showalloutliers,0),vc=g(c.outliersupperrangeratio,0),wc=g(c.outlierslowerrangeratio,0),dc=!1,nc=Boolean(g(c.showdetailedlegend,1)),oc=l.tooltipSepChar,Ub=!0,kc=l.dataSeparator,Sb=l.bwCalc,jc=h(d.type,this.defaultSeriesType),
uc=e.plotOptions[jc]&&e.plotOptions[jc].stacking,ub,Vb,Dc,Ec,lc,Nc,Oc,Pc,Qc,Rc,Sc,nb,Ib,Jb,Kb,Lb,xc,Fc,Pb,gc,pc,Tb,hc,Wb,Xb,Yb,Gc,Hc,qc,Ic,T,rc,Zb,sc,ic,Tc,Jc,eb,Va,Uc,tc,Kc,yb,zb,yc,Lc,Ab,Bb,Mc,Ac=function(a,b){return a-b},zc,Vc,Wc,Xc,Yc,Zc;d.errorBarWidthPercent=g(a.whiskerslimitswidthratio,c.whiskerslimitswidthratio,40);Kc=a.data;d.name=B(a.seriesname);uc||(d.columnPosition=g(t,n,p));d.errorBar2D=!0;if(0===g(a.includeinlegend)||void 0===d.name)Ub=d.showInLegend=!1;3>Qa&&(Qa=3);xc=wb($.split(",")[0]);
Fc=wb(S.split(",")[0]);d.color={FCcolor:{color:xc+","+xc+","+Fc+","+Fc,alpha:"100,100,100,100",angle:90,ratio:"0,50,0,50"}};sc=this.isBar;D=(ic=/3d$/.test(e.chart.defaultSeriesType))?c.showplotborder?D:"0":D;w=ic?h(c.plotbordercolor,"#FFFFFF"):w;vc=0>vc?0:vc;wc=0>wc?0:wc;for(Yb=0;Yb<f;Yb+=1){if(T=Kc&&Kc[Yb])T.value?(Sb.setArray(T.value),Lc=Sb.getQuartiles(),Ab=Lc.q1,Bb=Lc.q3,Mc=Sb.getMinMax(),zb=Xb=Mc.min,yb=Mc.max,yc=Sb.getMedian(),Ib=Sb.getMean(),Kb=Sb.getMD(),Jb=Sb.getSD(),Lb=Sb.getQD(),Wb=hc=
yb):(Ab=k.getCleanValue(T.q1),Bb=k.getCleanValue(T.q3),zb=Xb=k.getCleanValue(T.min),yb=k.getCleanValue(T.max),yc=k.getCleanValue(T.median),Wb=hc=yb,Ib=Ec=k.getCleanValue(T.mean),Kb=k.getCleanValue(T.md),Jb=k.getCleanValue(T.sd),Lb=k.getCleanValue(T.qd));if(T&&null!=Ab&&null!=Bb&&null!==hc){dc=!0;Ec=g(T.showmean,ac);lc=g(T.showmd,bc);Nc=g(T.showsd,cc);Oc=g(T.showqd,fc);Vb=l.oriCatTmp[Yb];eb=this.getPointStub(e,c,a,T,yb,Bb,yc,Ab,zb,Ib,Kb,Jb,Lb,Vb);Va=eb.toolText;Ec?(Pc=1,nb=g(T.meaniconalpha,Xa),Va=
B(F(h(T.meantooltext,a.meantooltext,c.meantooltext))),Va=void 0!==Va?this.getTooltext(Va,e,c,a,T,yb,zb,Ab,Bb,za,Jb,Lb,Kb,Ib,Vb):"<b>Mean"+oc+"</b>"+k.dataLabels(Ib),Ha.push({y:Ib,toolText:Va,link:eb.link,marker:{enabled:!0,fillColor:y(h(T.meaniconcolor,Sa),nb),lineColor:y(h(T.meaniconbordercolor,Ua),nb),radius:g(T.meaniconradius,Ta),symbol:fa(g(T.meaniconsides,Qa),"spoke"==h(T.meaniconshape,Pa))}})):Ha.push({y:null});lc?(Qc=1,nb=g(T.mdiconalpha,tb),Va=B(F(h(T.mdtooltext,a.mdtooltext,c.mdtooltext))),
Va=void 0!==Va?this.getTooltext(Va,e,c,a,T,yb,zb,Ab,Bb,za,Jb,Lb,Kb,Ib,Vb):"<b>MD"+oc+"</b>"+k.dataLabels(Kb),Ia.push({y:Kb,toolText:Va,link:eb.link,marker:{enabled:!0,fillColor:y(h(T.mdiconcolor,ib),nb),lineColor:y(h(T.mdiconbordercolor,bb),nb),radius:g(T.mdiconradius,hb),symbol:fa(g(T.mdiconsides,jb),"spoke"==h(T.mdiconshape,fb))}})):Ia.push({y:null});Nc?(Rc=1,nb=g(T.sdiconalpha,gb),Va=B(F(h(T.sdtooltext,a.sdtooltext,c.sdtooltext))),Va=void 0!==Va?this.getTooltext(Va,e,c,a,T,yb,zb,Ab,Bb,za,Jb,Lb,
Kb,Ib,Vb):"<b>SD"+oc+"</b>"+k.dataLabels(Jb),Ja.push({y:Jb,toolText:Va,link:eb.link,marker:{enabled:!0,fillColor:y(h(T.sdiconcolor,ab),nb),lineColor:y(h(T.sdiconbordercolor,bb),nb),radius:g(T.sdiconradius,Za),symbol:fa(g(T.sdiconsides,$a),"spoke"==h(T.sdiconshape,Wa))}})):Ja.push({y:null});Oc?(Sc=1,nb=g(T.qdiconalpha,Eb),Va=B(F(h(T.qdtooltext,a.qdtooltext,c.qdtooltext))),Va=void 0!==Va?this.getTooltext(Va,e,c,a,T,yb,zb,Ab,Bb,za,Jb,Lb,Kb,Ib,Vb):"<b>QD"+oc+"</b>"+k.dataLabels(Lb),Ma.push({y:Lb,toolText:Va,
link:eb.link,marker:{enabled:!0,fillColor:y(h(T.qdiconcolor,pb),nb),lineColor:y(h(T.qdiconbordercolor,vb),nb),radius:g(T.qdiconradius,rb),symbol:fa(g(T.qdiconsides,sb),"spoke"==h(T.qdiconshape,qb))}})):Ma.push({y:null});if(Pb=T.outliers){Pb=Pb.replace(/\s/g,z).split(kc);for(gc=Pb.length;gc--;)Pb[gc]=k.getCleanValue(Pb[gc]);Pb.sort(Ac);gc=Pb.length;for(pc=0;pc<gc;pc+=1)if(Tb=Pb[pc],$b&&(Wb=Ya(hc,Tb),Xb=J(zb,Tb)),nb=g(T.outliericonalpha,Rb),Tb>hc||Tb<zb)Va=B(F(h(T.outlierstooltext,a.outlierstooltext,
c.outlierstooltext))),Va=void 0!==Va?this.getTooltext(Va,e,c,a,T,yb,zb,Ab,Bb,za,Jb,Lb,Kb,Ib,Vb,Tb):"<b>Outlier"+oc+"</b>"+k.dataLabels(Tb),Na.push({y:Tb,toolText:Va,x:Yb,link:eb.link,marker:{enabled:!0,fillColor:y(h(T.outliericoncolor,Nb),nb),lineColor:y(h(T.outliericonbordercolor,Ob),nb),radius:g(T.outliericonradius,Db),symbol:fa(g(T.outliericonsides,Hb),"spoke"==h(T.outliericonshape,Cb))}})}$b||(Dc=Wb-Xb,Wb+=Dc*vc,Xb-=Dc*wc);Gc=h(T.upperboxcolor,$)+q;Hc=h(T.lowerboxcolor,S)+q;qc=h(T.upperboxalpha,
K,c.upperboxalpha,c.plotfillalpha,"100")+z;Ic=h(T.lowerboxalpha,Ra,c.lowerboxalpha,c.plotfillalpha,"100")+z;rc=h(T.ratio,a.ratio,c.plotfillratio);Zb=h(360-c.plotfillangle,90);0>hc&&(Zb=360-Zb);Uc={opacity:qc/100};tc=J(qc,D)+z;Tc=ec(Gc,qc,rc,Zb,m,w,tc,sc,ic);Jc=ec(Hc,Ic,rc,Zb,m,w,tc,sc,ic);Ca={value:Bb,color:y(h(T.upperquartilecolor,U),g(T.upperquartilealpha,aa)),borderWidth:g(T.upperquartilethickness,oa),dashStyle:g(T.upperquartiledashed,ja)?ya(h(T.upperquartiledashlen,ma),h(T.upperquartiledashgap,
qa),g(T.upperquartilethickness,oa)):void 0,displayValue:eb.displayValueQ3};Da={value:Ab,color:y(h(T.lowerquartilecolor,Oa),g(T.lowerquartilealpha,Y)),borderWidth:g(T.lowerquartilethickness,pa),dashStyle:g(T.lowerquartiledashed,sa)?ya(h(T.lowerquartiledashlen,Cc),h(T.lowerquartiledashgap,wa),g(T.lowerquartilethickness,pa)):void 0,displayValue:eb.displayValueQ1};Ea={color:y(h(T.upperboxbordercolor,P),g(T.upperboxborderalpha,Z)),borderWidth:g(T.upperboxborderthickness,mb),dashStyle:g(T.upperboxborderdashed,
va)?ya(h(T.upperboxborderdashlen,ra),h(T.upperboxborderdashgap,xa),g(T.upperboxborderthickness,mb)):void 0};Ga={color:y(h(T.lowerboxbordercolor,Q),g(T.lowerboxborderalpha,ka)),borderWidth:g(T.lowerboxborderthickness,ua),dashStyle:g(T.lowerboxborderdashed,xb)?ya(h(T.lowerboxborderdashlen,na),h(T.lowerboxborderdashgap,Aa),g(T.lowerboxborderthickness,ua)):void 0};za={value:yc,color:y(h(T.mediancolor,ba),g(T.medianalpha,cb)),borderWidth:g(T.medianthickness,da),dashStyle:g(T.mediandashed,bd)?ya(h(T.mediandashlen,
ta),h(T.mediandashgap,Fa),g(T.medianthickness,da)):void 0,displayValue:eb.displayValueMid};zc=[];V(yb)&&zc.push({errorValue:yb-Bb,toolText:eb.toolText,link:eb.link,errorBarColor:y(h(T.upperwhiskercolor,ca),g(T.upperwhiskeralpha,M)),errorBarThickness:g(T.upperwhiskerthickness,L),dashStyle:g(T.upperwhiskerdashed,O)?ya(h(T.upperwhiskerdashlen,ia),h(T.upperwhiskerdashgap,R),g(T.upperwhiskerthickness,L)):void 0,displayValue:eb.displayValueMax,shadow:{opacity:s?g(T.upperwhiskeralpha,M)/250:0}});V(zb)&&
zc.push({errorValue:-(Ab-zb),errorStartValue:Ab,toolText:eb.toolText,link:eb.link,errorBarColor:y(h(T.lowerwhiskercolor,la),g(T.lowerwhiskeralpha,A)),errorBarThickness:g(T.lowerwhiskerthickness,W),dashStyle:g(T.lowerwhiskerdashed,N)?ya(h(T.lowerwhiskerdashlen,X),h(T.lowerwhiskerdashgap,I),g(T.lowerwhiskerthickness,W)):void 0,displayValue:eb.displayValueMin,shadow:{opacity:s?g(T.lowerwhiskeralpha,A)/250:0}});ub=this.pointHoverOptions(T,a,c,{upperBoxColor:Gc,upperBoxAlpha:qc,upperBoxBorderColor:h(T.upperboxbordercolor,
P),upperBoxBorderAlpha:g(T.upperboxborderalpha,Z),upperBoxBorderThickness:Ea.borderWidth,lowerBoxColor:Hc,lowerBoxAlpha:Ic,lowerBoxBorderColor:h(T.lowerboxbordercolor,Q),lowerBoxBorderAlpha:g(T.lowerboxborderalpha,ka),lowerBoxBorderThickness:Ga.borderWidth,upperQuartileColor:h(T.upperquartilecolor,U),upperQuartileAlpha:g(T.upperquartilealpha,aa),upperQuartileThickness:Ca.borderWidth,lowerQuartileColor:h(T.lowerquartilecolor,Oa),lowerQuartileAlpha:g(T.lowerquartilealpha,Y),lowerQuartileThickness:Da.borderWidth,
upperWhiskerColor:h(T.upperwhiskercolor,ca),upperWhiskerThickness:g(T.upperwhiskerthickness,L),upperWhiskerAlpha:g(T.upperwhiskeralpha,M),lowerWhiskerColor:h(T.lowerwhiskercolor,la),lowerWhiskerAlpha:g(T.lowerwhiskeralpha,A),lowerWhiskerThickness:g(T.lowerwhiskerthickness,W),medianColor:h(T.mediancolor,ba),medianAlpha:g(T.medianalpha,cb),medianThickness:g(T.medianthickness,da)});ub.enabled&&(ub.upperBox.fill=ea(ec(ub.upperBox.color,ub.upperBox.alpha,rc,Zb,m,w,tc,sc,ic)[0].FCcolor),delete ub.upperBox.color,
delete ub.upperBox.alpha,ub.lowerBox.fill=ea(ec(ub.lowerBox.color,ub.lowerBox.alpha,rc,Zb,m,w,tc,sc,ic)[0].FCcolor),delete ub.lowerBox.color,delete ub.lowerBox.alpha);d.data.push(H(eb,{y:Bb,errorValue:zc,shadow:Uc,color:Tc[0],toolText:eb.toolText,lowerboxColor:Jc[0],lowerboxBorderColor:Jc[1],borderWidth:0,upperQuartile:Ca,lowerQuartile:Da,upperBoxBorder:Ea,lowerBoxBorder:Ga,median:za,hoverEffects:ub}));this.pointValueWatcher(e,Wb);this.pointValueWatcher(e,Xb)}else d.data.push({y:null}),Ia.push({y:null}),
Ja.push({y:null}),Ma.push({y:null}),Ha.push({y:null})}d.showInLegend=Ub&&(dc||!r);d.legendFillColor=y(xc,20);Vc={type:"line",name:"Mean",relatedSeries:"boxandwhisker",data:Ha,legendIndex:mc+Gb,showInLegend:!!Pc&&Ub&&nc,marker:{fillColor:y(Sa,100),lineColor:y(Ua,100),radius:Ta,symbol:fa(Qa,"spoke"==Pa)},color:g(c.drawmeanconnector,a.drawmeanconnector,0)?y(h(a.meanconnectorcolor,c.meanconnectorcolor,Sa),g(a.meanconnectoralpha,c.meanconnectoralpha,100)):Ka,lineWidth:g(c.drawmeanconnector,a.drawmeanconnector,
0)?g(a.meanconnectorthickness,c.meanconnectorthickness,1):0,shadow:0,legendFillColor:d.legendFillColor};Wc={type:"line",name:"SD",relatedSeries:"boxandwhisker",data:Ja,legendIndex:mc+2*Gb,showInLegend:!!Rc&&Ub&&nc,marker:{fillColor:y(ab,100),lineColor:y(bb,100),radius:Za,symbol:fa($a,"spoke"==Wa)},color:g(c.drawsdconnector,a.drawsdconnector,0)?y(h(a.sdconnectorcolor,c.sdconnectorcolor,ab),g(a.sdconnectoralpha,c.sdconnectoralpha,100)):Ka,lineWidth:g(c.drawsdconnector,a.drawsdconnector,0)?g(a.sdconnectorthickness,
c.sdconnectorthickness,1):0,shadow:0,pointStart:Fb,legendFillColor:d.legendFillColor};Xc={type:"line",name:"MD",relatedSeries:"boxandwhisker",data:Ia,legendIndex:mc+3*Gb,showInLegend:!!Qc&&Ub&&nc,marker:{fillColor:y(ib,100),lineColor:y(ob,100),radius:hb,symbol:fa(jb,"spoke"==fb)},color:g(c.drawmdconnector,a.drawmdconnector,0)?y(h(a.mdconnectorcolor,c.mdconnectorcolor,ib),g(a.mdconnectoralpha,c.mdconnectoralpha,100)):Ka,lineWidth:g(c.drawmdconnector,a.drawmdconnector,0)?g(a.mdconnectorthickness,c.mdconnectorthickness,
1):0,shadow:0,pointStart:Fb,legendFillColor:d.legendFillColor};Yc={type:"line",name:"QD",relatedSeries:"boxandwhisker",data:Ma,legendIndex:mc+4*Gb,showInLegend:!!Sc&&Ub&&nc,marker:{fillColor:y(pb,100),lineColor:y(vb,100),radius:rb,symbol:fa(sb,"spoke"==qb)},color:g(c.drawqdconnector,a.drawqdconnector,0)?y(h(a.qdconnectorcolor,c.qdconnectorcolor,pb),g(a.qdconnectoralpha,c.qdconnectoralpha,100)):Ka,lineWidth:g(c.drawqdconnector,a.drawqdconnector,0)?g(a.qdconnectorthickness,c.qdconnectorthickness,1):
0,shadow:0,pointStart:Fb,legendFillColor:d.legendFillColor};Zc={type:"line",name:"Outlier",relatedSeries:"boxandwhisker",showInLegend:!(!Na||!Na.length)&&Ub&&nc,data:Na,legendIndex:mc+5*Gb,marker:{fillColor:y(Nb,100),lineColor:y(Ob,100),radius:Db,symbol:fa(Hb,"spoke"==Cb)},color:Ka,lineWidth:0,shadow:0,pointStart:Fb,legendFillColor:d.legendFillColor};e._meanDataArr.push(Vc);e._sdDataArr.push(Wc);e._mdDataArr.push(Xc);e._qdDataArr.push(Yc);e._outliers.push(Zc);return d},series:function(b,d,a){var c=
d.series,e=d._meanDataArr=[],f=d._sdDataArr=[],g=d._mdDataArr=[],n=d._qdDataArr=[],t=d._outliers=[],l=d[ha],r=d.yAxis[0],k=2*l.plotSpacePercent,m,s,C,u,G;l.dataSeparator=h(d.chart.dataseparator,Aa);l.bwCalc=new Fa(b.chart.calculationmethod,l.numberFormatter,l.dataSeparator);q.multiseries.series.call(this,b,d,a);a=c&&c.length;b=Ya(e.length,f.length,g.length,n.length,t.length,a);k=(1-k)/a;l=r.min;G=r.max;d.series=c.concat(e,f,g,n,t);for(r=0;r<a;r+=1)for(s=c[r],m=r,!s.relatedSeries&&(s.relatedSeries=
[]),C=0;5>C;C+=1)m+=a,s.relatedSeries.push(m);for(C=r=0;C<b;C+=1,r+=1)if(c=(-.5*(a-1)+r)*k,e[r]&&(e[r].pointStart=c),f[r]&&(f[r].pointStart=c),n[r]&&(n[r].pointStart=c),g[r]&&(g[r].pointStart=c),t[r]&&(t[r].pointStart=c),m=(c=t[r])&&c.data)for(c=0;c<m.length;c+=1)s=m[c],u=s.y,s.y=u>G||u<l?null:u;delete d._meanDataArr;delete d._sdDataArr;delete d._mdDataArr;delete d._qdDataArr;delete d._outliers},getTooltext:function(b,d,a,c,e,f,g,h,t,l,r,k,m,s,C,q){d=this.numberFormatter;return gb(b,[1,2,3,4,5,6,
62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80],{maxValue:f,maxDataValue:d.dataLabels(f),minValue:g,minDataValue:d.dataLabels(g),Q1:d.dataLabels(h),unformattedQ1:h,Q3:d.dataLabels(t),unformattedQ3:t,median:d.dataLabels(l),unformattedMedian:l,SD:d.dataLabels(r),unformattedSD:r,QD:d.dataLabels(k),unformattedQD:k,MD:d.dataLabels(m),unformattedMD:m,mean:d.dataLabels(s),unformattedMean:s,label:F(C),yaxisName:F(a.yaxisname),xaxisName:F(a.xaxisname),formattedValue:d.dataLabels(q),value:q},{value:q},
a,c)},pointHoverOptions:function(b,d,a,c){var e=g(b.showhovereffect,d.showhovereffect,a.plothovereffect,a.showhovereffect),f=g(b.highlightonhover,d.highlightonhover,d.highlightplotonhover,a.highlightonhover,a.highlightplotonhover,e),p={},n={},t={},l={},r={},k={},m={},s={},C={},q;p.color=h(b.upperboxhovercolor,d.upperboxhovercolor,a.plotfillhovercolor,a.upperboxhovercolor);p.alpha=h(b.upperboxhoveralpha,d.upperboxhoveralpha,a.upperboxhoveralpha);m.color=h(b.upperboxborderhovercolor,d.upperboxborderhovercolor,
a.upperboxborderhovercolor);m.alpha=h(b.upperboxborderhoveralpha,d.upperboxborderhoveralpha,a.upperboxborderhoveralpha);m.thickness=g(b.upperboxborderhoverthickness,d.upperboxborderhoverthickness,a.upperboxborderhoverthickness);n.color=h(b.lowerboxhovercolor,d.lowerboxhovercolor,a.plotfillhovercolor,a.lowerboxhovercolor);n.alpha=h(b.lowerboxhoveralpha,d.lowerboxhoveralpha,a.lowerboxhoveralpha);s.color=h(b.lowerboxborderhovercolor,d.lowerboxborderhovercolor,a.lowerboxborderhovercolor);s.alpha=h(b.lowerboxborderhoveralpha,
d.lowerboxborderhoveralpha,a.lowerboxborderhoveralpha);s.thickness=g(b.lowerboxborderhoverthickness,d.lowerboxborderhoverthickness,a.lowerboxborderhoverthickness);r.color=h(b.upperwhiskerhovercolor,d.upperwhiskerhovercolor,a.upperwhiskerhovercolor);r.alpha=h(b.upperwhiskerhoveralpha,d.upperwhiskerhoveralpha,a.upperwhiskerhoveralpha);r.thickness=h(b.upperwhiskerhoverthickness,d.upperwhiskerhoverthickness,a.upperwhiskerhoverthickness);k.color=h(b.lowerwhiskerhovercolor,d.lowerwhiskerhovercolor,a.lowerwhiskerhovercolor);
k.alpha=h(b.lowerwhiskerhoveralpha,d.lowerwhiskerhoveralpha,a.lowerwhiskerhoveralpha);k.thickness=h(b.lowerwhiskerhoverthickness,d.lowerwhiskerhoverthickness,a.lowerwhiskerhoverthickness);t.color=h(b.upperquartilehovercolor,d.upperquartilehovercolor,a.upperquartilehovercolor);t.alpha=h(b.upperquartilehoveralpha,d.upperquartilehoveralpha,a.upperquartilehoveralpha);t.thickness=h(b.upperquartilehoverthickness,d.upperquartilehoverthickness,a.upperquartilehoverthickness);l.color=h(b.lowerquartilehovercolor,
d.lowerquartilehovercolor,a.lowerquartilehovercolor);l.alpha=h(b.lowerquartilehoveralpha,d.lowerquartilehoveralpha,a.lowerquartilehoveralpha);l.thickness=h(b.lowerquartilehoverthickness,d.lowerquartilehoverthickness,a.lowerquartilehoverthickness);C.color=h(b.medianhovercolor,d.medianhovercolor,a.medianhovercolor);C.alpha=h(b.medianhoveralpha,d.medianhoveralpha,a.medianhoveralpha);C.thickness=h(b.medianhoverthickness,d.medianhoverthickness,a.medianhoverthickness);b=!!h(p.color,p.alpha,m.color,m.alpha,
m.thickness,n.color,n.alpha,s.color,s.thickness,s.alpha,r.color,r.alpha,r.thickness,k.color,k.alpha,k.thickness,t.color,t.alpha,t.thickness,l.color,l.alpha,l.thickness,C.color,C.alpha,C.thickness,f);void 0===e&&void 0===f&&b&&(f=0);if(void 0===e&&b||e)q=!0,p.color=h(p.color,f?ja(c.upperBoxColor,70):c.upperBoxColor),p.alpha=h(p.alpha,c.upperBoxAlpha),n.color=h(n.color,f?ja(c.lowerBoxColor,70):c.lowerBoxColor),n.alpha=h(n.alpha,c.lowerBoxAlpha),m.color=h(m.color,c.upperBoxBorderColor),m.alpha=g(m.alpha,
c.upperBoxBorderAlpha),m.stroke=y(m.color,m.alpha),m["stroke-width"]=g(m.thickness,c.upperBoxBorderThickness),delete m.color,delete m.alpha,delete m.thickness,s.color=h(s.color,c.lowerBoxBorderColor),s.alpha=h(s.alpha,c.lowerBoxBorderAlpha),s.stroke=y(s.color,s.alpha),s["stroke-width"]=g(s.thickness,c.lowerBoxBorderThickness),delete s.color,delete s.alpha,delete s.thickness,r.color=h(r.color,c.upperWhiskerColor,70),r.alpha=h(r.alpha,c.upperWhiskerAlpha),r.stroke=y(r.color,r.alpha),r["stroke-width"]=
h(r.thickness,c.upperWhiskerThickness),delete r.color,delete r.alpha,delete r.thickness,k.color=h(k.color,c.lowerWhiskerColor,70),k.alpha=h(k.alpha,c.lowerWhiskerAlpha),k.stroke=y(k.color,k.alpha),k["stroke-width"]=h(k.thickness,c.lowerWhiskerThickness),delete k.color,delete k.alpha,delete k.thickness,t.color=h(t.color,c.upperQuartileColor,70),t.alpha=h(t.alpha,c.upperQuartileAlpha),t.stroke=y(t.color,t.alpha),t["stroke-width"]=h(t.thickness,c.upperQuartileThickness),delete t.color,delete t.alpha,
delete t.thickness,l.color=h(l.color,c.lowerQuartileColor,70),l.alpha=h(l.alpha,c.lowerQuartileAlpha),l.stroke=y(l.color,l.alpha),l["stroke-width"]=h(l.thickness,c.lowerQuartileThickness),delete l.color,delete l.alpha,delete l.thickness,C.color=h(C.color,c.medianColor,70),C.alpha=h(C.alpha,c.medianAlpha),C.stroke=y(C.color,C.alpha),C["stroke-width"]=h(C.thickness,c.medianThickness),delete C.color,delete C.alpha,delete C.thickness;return{enabled:q,upperBox:p,upperBoxBorder:m,lowerBox:n,lowerBoxBorder:s,
upperQuartile:t,lowerQuartile:l,upperWhisker:r,lowerWhisker:k,median:C}},getPointStub:function(b,d,a,c,e,f,p,n,t,l,r,k,m,s){var C=z,C=b[ha],q=C.tooltipSepChar,u=this.numberFormatter,x=g(c.showvalue,a.showvalues,d.showvalues,1),w={"true":u.dataLabels(e),"false":z},v={"true":u.dataLabels(f),"false":z},D={"true":u.dataLabels(p),"false":z},y={"true":u.dataLabels(n),"false":z},u={"true":u.dataLabels(t),"false":z};C.showTooltip?(C=B(F(h(c.tooltext,a.plottooltext,C.tooltext))),C=void 0!==C?this.getTooltext(C,
b,d,a,c,e,t,n,f,p,k,m,r,l,s):"<b>Maximum"+q+"</b>"+w[!0]+"<br/><b>Q3"+q+"</b>"+v[!0]+"<br/><b>Median"+q+"</b>"+D[!0]+"<br/><b>Q1"+q+"</b>"+y[!0]+"<br/><b>Minimum"+q+"</b>"+u[!0]):C=z;return{toolText:C,link:h(c.link),categoryLabel:s,displayValueMax:w[!(!x||!g(c.showmaxvalue,a.showmaxvalues,d.showmaxvalues,1))],displayValueMid:D[!(!x||!g(c.showmedianvalue,a.showmedianvalues,d.showmedianvalues,1))],displayValueMin:u[!(!x||!g(c.showminvalue,a.showminvalues,d.showminvalues,1))],displayValueQ3:v[!(!x||
!g(c.showq3value,a.showq3values,d.showq3values,0))],displayValueQ1:y[!(!x||!g(c.showq1value,a.showq1values,d.showq1values,0))]}}},q.multiseries);q("heatmap",{friendlyName:"Heatmap Chart",standaloneInit:!0,creditLabel:Y,defaultSeriesType:"heatmap",tooltipsepchar:": ",tooltipConstraint:"chart",rendererId:"heatmap",series:function(b,d,a){var c=b.chart,e=d.chart,f=d[ha],p=this.colorManager,n=d.series,t=this.numberFormatter,l=b.rows&&b.rows.row,r=l&&l.length,k=b.columns&&b.columns.column,m=k&&k.length,
s=b.dataset,C=s&&s.data,q=b.colorrange||{},G=f.mapByPercent=g(q.mapbypercent,0),x=f.mapByCategory=g(c.mapbycategory,0),q=!x&&g(q.gradient,0),w=h(c.plotfillalpha,100),v=g(c.showlabels,c.showlabel,1),D=g(c.showplotborder,1),J=D?g(c.plotborderthickness,1):0,p=h(c.plotbordercolor,p.getColor("plotBorderColor")),D=h(c.plotborderalpha,D?95:0).toString(),p=y(p,D),D=g(c.plotborderdashed,0),A=g(c.plotborderdashlen,5),C=g(c.plotborderdashgap,4),A=D?ya(A,C,J):void 0,E=u.colorRange,$=0,S=0,K=0,Ra=0,ca=f.rowIdObj=
{},la=f.columnIdObj={},M=[],D=[],I=0,L=[],W,O,N,ia,X,R,ea,U,Oa;e.showHoverEffect=g(c.showhovereffect,1);q&&(d.legend.type="gradient");d.legend.enabled=Boolean(g(c.showlegend,1));for(e=0;e<r;e+=1)O=l[e],W=O.id,V(W)&&W!==z&&($+=1,ca[W.toLowerCase()]={index:$,label:g(O.showlabel,c.showyaxislabels,c.showyaxisnames,v)?h(O.label,O.name,W):z});for(e=0;e<m;e+=1)N=k[e],l=N.id,V(l)&&l!==z&&(la[l.toLowerCase()]={index:S,label:g(N.showlabel,c.showxaxislabels,c.showxaxisnames,v)?h(N.label,N.name,l):z},S+=1);ea=
0;for(U=s&&s.length;ea<U;ea+=1)for(C=s[ea]&&s[ea].data,e=0,Oa=C&&C.length;e<Oa;e+=1)if(k=C[e],R=t.getCleanValue(k.value),null!==R||x)W=B(k.rowid,k.rowids),O=B(W,z).toLowerCase(),l=B(k.columnid,k.columnids),N=B(l,z).toLowerCase(),M.push(R),V(X)||V(ia)||!V(R)||(ia=X=R),X>R&&(X=R),ia<R&&(ia=R),!V(O)||V(ca[O])||r||(K+=1,ca[O]={index:K,label:W}),!V(N)||V(la[N])||m||(la[N]={index:Ra,label:l},Ra+=1),O=ca[O],N=la[N],O&&N&&(V(L[O.index])||(L[O.index]=[]),L[O.index][N.index]?D[L[O.index][N.index]-1]={rowId:W,
columnId:l,categoryId:h(k.colorrangelabel,k.categoryid,k.categoryname,k.category),tlLabel:F(h(k.tllabel,k.ltlabel)),trLabel:F(h(k.trlabel,k.rtlabel)),blLabel:F(h(k.bllabel,k.lblabel)),brLabel:F(h(k.brlabel,k.rblabel)),rowLabel:O.label,columnLabel:N.label,setColor:k.color,setAlpha:h(k.alpha,w),setShowLabel:g(k.showlabel,k.showname,v),colorRangeLabel:k.colorrangelabel,displayValue:k.displayvalue,tooltext:k.tooltext,showvalue:k.showvalue,link:k.link,hoverColor:h(k.hovercolor,c.hovercolor,c.plotfillhovercolor),
hoverAlpha:g(k.hoveralpha,c.hoveralpha,c.plotfillhoveralpha),index:I,value:R,y:O.index,x:N.index,_value:k.value,_cleanValue:R}:(I+=1,D.push({rowId:W,columnId:l,categoryId:h(k.colorrangelabel,k.categoryid,k.categoryname,k.category),tlLabel:F(h(k.tllabel,k.ltlabel)),trLabel:F(h(k.trlabel,k.rtlabel)),blLabel:F(h(k.bllabel,k.lblabel)),brLabel:F(h(k.brlabel,k.rblabel)),rowLabel:O.label,columnLabel:N.label,setColor:k.color&&k.color.replace(rb,La),setAlpha:h(k.alpha,w),setShowLabel:g(k.showlabel,k.showname,
v),colorRangeLabel:k.colorrangelabel,displayValue:k.displayvalue,tooltext:k.tooltext,showvalue:k.showvalue,link:k.link,hoverColor:h(k.hovercolor,c.hovercolor,c.plotfillhovercolor),hoverAlpha:g(k.hoveralpha,c.hoveralpha,c.plotfillhoveralpha),index:I,value:R,y:O.index,x:N.index,_value:k.value,_cleanValue:R}),L[O.index][N.index]=I));if(D.length){f.rowCount=$=Ya($,K);f.columnCount=Ya(S,Ra);for(e in ca)ca[e].index=$-ca[e].index+1;f.minHeatValue=X;f.maxHeatValue=ia;r=ia-X;G=G&&!x;d.colorRange=new E({colorRange:b.colorrange,
dataMin:X,dataMax:ia,sortLegend:g(c.autoorderlegendicon,c.autoorderlegendicon,0),mapByCategory:x,defaultColor:"cccccc",numberFormatter:t});if(q)n.push({data:[],hoverEffects:this.parseSeriesHoverOptions(b,d,s,a),borderWidth:J,borderColor:p,dashStyle:A});else for(t=(c=d.colorRange.colorArr)&&c.length,e=0;e<t;e+=1)ia=c[e],V(ia.code)&&n.push({data:[],hoverEffects:this.parseSeriesHoverOptions(b,d,s,a),name:h(ia.label,ia.name),borderWidth:J,borderColor:p,color:wb(ia.code),dashStyle:A});n.length||n.push({data:[],
showInLegend:!1});for(e=0;e<D.length;e+=1)k=D[e],G&&(k.value=ma((k.value-X)/r*1E4)/100),a=d.colorRange.getColorObj(x?k.categoryId:k.value),a.outOfRange||(k.y=f.rowCount-k.y+1,k.color=y(h(k.setColor,a.code),h(k.setAlpha,w)),k.hoverColor=y(h(k.hoverColor,k.setColor,a.code),g(k.hoverAlpha,25)),k=H(k,this.getPointStub(k,k.value,z,d,b)),q?n[0].data.push(k):n[a.seriesIndex]&&n[a.seriesIndex].data.push(k))}else d.series=[];this.configureAxis(d,b)},getPointStub:function(b,d,a,c,e){a=c[ha];var f=e.chart,p=
a.tooltipSepChar,n=a.mapByCategory;e=a.mapByPercent&&!n;var t=this.numberFormatter,l=b._cleanValue;c=t.percentValue(d);d=null===l?d:t.dataLabels(l);var r=B(F(h(b.tooltext,a.tooltext))),t=B(F(b.displayValue)),k=n?t:h(t,d),m=g(b.showvalue,a.showValues),s=B(f.tltype,z),C=B(f.trtype,z),q=B(f.bltype,z),u=B(f.brtype,z),n=b.tlLabel,l=b.trLabel,x=b.blLabel,w=b.brLabel,v;s!==z&&(s="<b>"+s+p+"</b>");C!==z&&(C="<b>"+C+p+"</b>");q!==z&&(q="<b>"+q+p+"</b>");u!==z&&(u="<b>"+u+p+"</b>");a=a.showTooltip?void 0!==
r?gb(r,[1,2,5,6,7,14,93,94,95,96,97,98,112,113,114,115,116,117],{formattedValue:d,percentValue:e?c:z,yaxisName:F(f.yaxisname),xaxisName:F(f.xaxisname)},{value:b._value,displayvalue:b.displayValue},f,b):k===z?!1:(e?"<b>Value"+p+"</b>"+d+"<br/><b>Percentage"+p+"</b>"+c:k)+(b.tlLabel!==z?"<br/>"+(s+b.tlLabel):z)+(b.trLabel!==z?"<br/>"+C+b.trLabel:z)+(b.blLabel!==z?"<br/>"+q+b.blLabel:z)+(b.brLabel!==z?"<br/>"+u+b.brLabel:z):z;m?v=void 0!==t?t:e?c:d:n=l=x=w=v=z;b=h(b.link);return{displayValue:v,toolText:a,
link:b,tlLabel:n,trLabel:l,blLabel:x,brLabel:w}},configureAxis:function(b,d){var a=b[ha],c=d.chart,e=b.yAxis[0],f=b.xAxis,p=a.rowCount,n=a.columnCount,t=a.axisGridManager,l=a.rowIdObj,r=a.columnIdObj,k=this.colorManager,m=y(h(c.vdivlinecolor,c.divlinecolor,k.getColor("divLineColor")),g(c.vdivlinealpha,c.divlinealpha,k.getColor("divLineAlpha"))),s=g(c.vdivlinethickness,c.divlinethickness,1),q=g(c.vdivlinedashed,c.vdivlineisdashed,c.divlinedashed,c.divlineisdashed,0)?ya(g(c.vdivlinedashlen,c.divlinedashlen,
4),g(c.vdivlinedashgap,c.divlinedashgap,2),s):void 0,u=y(h(c.hdivlinecolor,c.divlinecolor,k.getColor("divLineColor")),g(c.hdivlinealpha,c.divlinealpha,k.getColor("divLineAlpha"))),G=g(c.hdivlinethickness,c.divlinethickness,1),x=g(c.hdivlinedashed,c.hdivlineisdashed,c.divlinedashed,c.divlineisdashed,0)?ya(g(c.hdivlinedashlen,c.divlinedashlen,4),g(c.hdivlinedashgap,c.divlinedashgap,2),s):void 0,w,v;e.min=0;e.max=p;for(v in l)w=l[v],k=w.index,w=w.label,t.addAxisGridLine(e,k+-.5,w,.1,void 0,Ka,1),k<p&&
e.plotBands.push({isTrend:!0,color:u,value:k,width:G,dashStyle:x,zIndex:3});e.labels.enabled=!1;e.gridLineWidth=0;e.alternateGridColor=Ka;e.title.text=F(c.yaxisname);f.min=-.5;f.max=e=n+-.5;f.opposite=g(c.placexaxislabelsontop,0);a.x.catCount=n;for(v in r)a=r[v],k=a.index,w=a.label,t.addXaxisCat(f,k,1,w,a,{},c),k-=-.5,k<e&&f.plotBands.push({isTrend:!0,color:m,value:k,width:s,dashStyle:q,zIndex:3});f.labels.enabled=!1;f.gridLineWidth=0;f.alternateGridColor=Ka;f.title.text=F(c.xaxisname)},xAxisMinMaxSetter:function(){},
placeLegendBlockRight:function(){return"gradient"===arguments[0].legend.type?u.placeGLegendBlockRight?u.placeGLegendBlockRight.apply(this,arguments):0:u.placeLegendBlockRight.apply(this,arguments)},placeLegendBlockBottom:function(){return"gradient"===arguments[0].legend.type?u.placeGLegendBlockBottom?u.placeGLegendBlockBottom.apply(this,arguments):0:u.placeLegendBlockBottom.apply(this,arguments)}},q.column2dbase);q("renderer.multiaxisline",{legendClick:function(b,d,a){var c=this.options.series,e=
this.yAxis[c[b.index].yAxis],f=e.axisData._relatedSeries,g=f.length,h=!1;q["renderer.cartesian"].legendClick.call(this,b,d,a);if(!a){for(;g--&&!(h=c[f[g]].visible););e.checkBox.element.checked=h}}},q["renderer.cartesian"]);q("renderer.candlestick",{drawPlotCandlestickbar:function(b,d){var a=b.data,c=a.length,e=b.items,f=b.graphics=[],h=this.paper,n=this.layers,t=this.definition.chart,l=this.options.plotOptions.series,r=this.xAxis[d.xAxis||0],k=this.yAxis[d.yAxis||0],m=d.numColumns||1,s=d.columnPosition||
0,q=!1===d.visible?"hidden":"visible",u=r.getAxisPosition(0),u=r.getAxisPosition(1)-u,G=l.groupPadding,x=l.maxColWidth,t=(1-.01*(t&&t.plotspacepercent))*u||J(u*(1-2*G),x*m),m=t/m*s-t/2,w,v,D,z,y,G=n.dataset=n.dataset||h.group("dataset-orphan");G.column=G.column||h.group("columns",G);for(n=0;n<c;n+=1){s=a[n];u=s.y;w=null;if(null===u){if(x=e[n])w=x.graphic,w.attr({height:0})}else x=g(s.x,n),t=s.link,x=r.getAxisPosition(x),w=s.previousY,v=k.getAxisPosition(w),w=k.getAxisPosition(u),D=k.getAxisPosition(s.high),
z=k.getAxisPosition(s.low),P(w-v),y=m,v=["M",x,z,"L",x,D,"M",x,w,"L",x+y,w,"M",x,v,"L",x-y,v],(x=e[n])||(x=e[n]={index:n,value:u,graphic:h.path(v,G),dataLabel:null,tracker:null}),w=x.graphic,w.attr({path:v,fill:ea(s.color),stroke:ea(s.borderColor),"stroke-width":s.borderWidth,"stroke-dasharray":s.dashStyle,"stroke-linecap":"round","stroke-linejoin":"round","shape-rendering":"crisp",cursor:t?"pointer":"",visibility:q}).shadow(l.shadow||s.shadow),this.drawTracker&&this.drawTracker.call(this,b,d,n);
w&&f.push(w);this.drawTracker&&this.drawTracker.call(this,b,d,n)}b.visible=!1!==d.visible;return b},drawCanvas:function(){q["renderer.cartesian"].drawCanvas.call(this,arguments);if(this.options.subCharts&&this.options.subCharts[0]){var b=this.options,b=(b.subCharts&&b.subCharts[0]).chart||{},d=this.paper,a=this.elements,c=a.volumeCanvas,e=b.marginTop+b.top,f=b.left=b.marginLeft,h=b.width-b.marginLeft-b.marginRight,n=b.height-b.marginBottom,t=g(b.plotBorderRadius,0),l=b.plotBorderWidth,r=b.plotBackgroundColor,
k=.5*l,m=b.plotBorderColor,s=this.layers.canvas;c||(a.volumeCanvas=d.rect(f-k,e-k-1,h+l,n+l,t,s).attr({fill:ea(r),"stroke-width":l,stroke:m,"stroke-linejoin":2<l?"round":"miter","shape-rendering":"crisp"}).shadow(b.plotShadow).crisp())}},drawTracker:function(b,d,a){var c=this,e=c.paper,f=c.xAxis[0],h=b.data[a],n=c.yAxis[0].getAxisPosition(h.y),t=f.getAxisPosition(g(h.x,a));b=b.items[a];a=ob?40:20;var l=c.layers.tracker,r=c.definition.chart,k=c.options.plotOptions.series,m=f.getAxisPosition(0),f=f.getAxisPosition(1)-
m,m=k.groupPadding,k=k.maxColWidth,s=((1-.01*(r&&r.plotspacepercent))*f||J(f*(1-2*m),1*k))/1,q=.5*-s,r=c.elements,f=r.canvas.getBBox(),k=r.volumeCanvas&&r.volumeCanvas.getBBox(),m=r.rollOverBand,u=b&&b.tracker,s={"stroke-width":s,ishot:!0,stroke:ea(c.options.chart.rollOverBandColor),fill:ea(c.options.chart.rollOverBandColor),visibility:"hidden"};k&&u&&!d.doNotUseBand&&(u||(u=b.tracker=e.circle(t,n,a,l).attr({"stroke-width":0,fill:ra})),u.data("x",t),h.toolText&&u.tooltip(h.toolText),m||(m=r.rollOverBand=
e.path(["M",0,f.y,"L",0,f.y2,"M",0,k.y,"L",0,k.y2]).attr(s),c.layers.dataset.appendChild(m),m.toBack()),u.mouseover(function(){c.rollOver(c,this,q)}).mouseout(function(){c.rollOut(c)}))},rollOver:function(b,d){b.elements.rollOverBand.transform("t"+d.data("x")+",0").show()},rollOut:function(b){b.elements.rollOverBand.hide()}},q["renderer.cartesian"]);q("renderer.spline",{drawPlotSpline:function(b,d){var a=this,c=a.paper,e=a.elements,f=a.options,h=f.chart,n=f.plotOptions.series,t=n.dataLabels&&n.dataLabels.style||
{},l={fontFamily:t.fontFamily,fontSize:t.fontSize,lineHeight:t.lineHeight,fontWeight:t.fontWeight,fontStyle:t.fontStyle},t=b.items,r=b.graphics=b.graphics||[],k=a.xAxis[d.xAxis||0],m=a.yAxis[d.yAxis||0],s=b.data,q=[],u=[],G=!1===d.visible,x=G?"hidden":"visible",w=isNaN(+n.animation)&&n.animation.duration||1E3*n.animation,v=!1!==(f.tooltip||{}).enabled,D=a.chartWidth,z=a.chartHeight,f=function(){Y.attr({"clip-rect":null});oa.show();ba.show();ka.show();P.attr({transform:"...t"+-D+","+-z})},y,E,$=n.connectNullData,
S,K,B,ca,la,M,F=null,L,W=d.lineWidth,O,N,J,X,R,A,U,H,I=a.layers,V=I.dataset=I.dataset||c.group("dataset-orphan"),P=I.datalabels=I.datalabels||c.group("datalables"),aa=I.tracker,I=h.anchorTrackingRadius,Q,ba,ka,Y,oa,pa=[],mb,ua,da,Z=function(e,f,g,h,p,k,n,l){return function(){var m=g.imageUrl,s=g.imageScale,t=g.imageAlpha,q=n.imageHoverAlpha,C=n.imageHoverScale,u=this.width*s*.01,w=this.width*C*.01;U={x:e-this.width*s*.005,y:f-this.height*s*.005,width:u,height:this.height*s*.01,alpha:t};H={x:e-this.width*
C*.005,y:f-this.height*C*.005,width:w,height:this.height*C*.01,alpha:q};q=w>u?H:U;h.graphic=X=c.image(m,oa).attr(U).css({opacity:.01*t}).data("alwaysInvisible",0===s).data("setRolloverProperties",n).data("setRolloverAttr",H).data("setRolloutAttr",U).data("anchorRadius",s).data("anchorHoverRadius",C);r.push(X);if(ca||v||n)ua=h.tracker=c.rect(aa).attr(q).attr({cursor:ca?"pointer":"",stroke:ra,"stroke-width":g.lineWidth,fill:ra,ishot:!0,visibility:x}).data("eventArgs",p).click(function(b){ta.call(this,
a,b)}).hover(function(b){return function(c){a.hoverPlotAnchor(this,c,"DataPlotRollOver",b,a)}}(h),function(b){return function(c){a.hoverPlotAnchor(this,c,"DataPlotRollOut",b,a)}}(h)).tooltip(k);(mb=a.drawPlotLineLabel(b,d,l,e,f))&&r.push(mb)}},sa=function(c,e,f,g,h,p,k){return function(){(mb=f.dataLabel=a.drawPlotLineLabel(b,d,k,c,e))&&r.push(mb)}},va=function(b){ta.call(this,a,b)},xb=function(b,c){return function(d){a.hoverPlotAnchor(this,d,c,b,a)}},h=function(a,b,c,d){var e=a.length,f=a[e-1],g=
f.length,h=f[0],f=f[g-2];3>g||("R"===h&&3===g&&(a[e-1][0]="L"),b&&a.push(["L",f,d,c,d,"Z"]))};a.addCSSDefinition(".fusioncharts-datalabels .fusioncharts-label",l);P.insertAfter(V);P.attr({"class":"fusioncharts-datalabels",transform:"...t"+D+","+z});w&&a.animationCompleteQueue.push({fn:f,scope:a});l=V.line||(V.line=c.group("line-connector",V));ba=c.group("connector-shadow",l);ka=c.group("anchor-shadow",l);Y=c.group("connector",l);oa=c.group("anchors",l);oa.hide();ba.hide();ka.hide();y=0;for(E=s.length;y<
E;y+=1)if(S=s[y],B=S.y,X=ua=mb=null,null===B)0===$&&(F=null);else{l=t[y]={chart:a,index:y,value:B};K=g(S.x,y);ca=S.link;la=S.tooltext||S.toolText;L=m.getAxisPosition(B);K=k.getAxisPosition(K);if((N=S.marker)&&N.enabled)if(O=N.radius,A=N.shadow,J=N.symbol.split("_"),Q={index:y,link:ca,value:B,displayValue:S.displayValue,categoryLabel:S.categoryLabel,toolText:S.toolText,id:b.userID,datasetIndex:b.index,datasetName:b.name,visible:b.visible},U=H={},B=S.rolloverProperties,N.imageUrl)O=new Qa.Image,O.onload=
Z(K,L,N,l,Q,la,B,y),O.onerror=sa(K,L,l,y),O.src=N.imageUrl;else{B&&(U={polypath:[J[1]||2,K,L,N.radius,N.startAngle,0],fill:ea(N.fillColor),"stroke-width":N.lineWidth,stroke:ea(N.lineColor)},H={polypath:[B.sides||2,K,L,B.radius,B.startAngle,B.dip],fill:ea(B.fillColor),"stroke-width":B.lineWidth,stroke:ea(B.lineColor)});X=l.graphic=c.polypath(J[1]||2,K,L,N.radius,N.startAngle,0,oa).attr({fill:ea(N.fillColor),"stroke-width":N.lineWidth,stroke:ea(N.lineColor),cursor:ca?"pointer":"","stroke-linecap":"round",
"stroke-linejoin":"round",ishot:!0,visibility:0===O?"hidden":x}).data("alwaysInvisible",0===O).data("setRolloverProperties",B).data("setRolloverAttr",H).data("setRolloutAttr",U).data("anchorRadius",O).data("anchorHoverRadius",B&&B.radius).shadow(A||!1,ka);if(ca||v||B)O=Ya(O,B&&B.radius||0,I),ua=c.polypath(J[1]||2,K,L,O,N.startAngle,0,aa).attr({cursor:ca?"pointer":"",stroke:ra,"stroke-width":0,ishot:!0,fill:ra,visibility:x});da=ua||X;da.click(va);(ua||X).data("eventArgs",Q).hover(xb(l,"DataPlotRollOver"),
xb(l,"DataPlotRollOut")).tooltip(la)}la=pa.length;null!==F?2<=la?(pa[la-1].push(K),pa[la-1].push(L)):(pa.push(["M",M,F]),pa.push(["R",K,L])):null===F&&2<=la&&(M=pa[la-1],"R"===M[0]&&3===M.length&&(M.push(M[1]),M.push(M[2])),pa.push(["M",K,L]),pa.push(["R"]));X&&r.push(X);da&&r.push(da);M=K;F=L;la=S.color;O=S.dashStyle;u.push(X);l.dataLabel=mb;l.tracker=da;N&&N.imageUrl||(mb=a.drawPlotLineLabel(b,d,y,K,L));mb&&r.push(mb);a.drawTracker&&a.drawTracker.call(a,b,d,y)}2<=pa.length&&(h(pa,!1),R=b.graphic=
c.path(pa,Y).attr({"stroke-dasharray":O,"stroke-width":W,stroke:ea(la),"stroke-linecap":"round","stroke-linejoin":"round",visibility:x}).shadow(n.shadow&&S.shadow,ba),q.push(R),V.shadow(n.shadow||S.shadow));w?Y.attr({"clip-rect":e["clip-canvas-init"]}).animate({"clip-rect":e["clip-canvas"]},w,"normal",a.getAnimationCompleteFn()):(f&&f(),f=void 0);R&&r.push(R);b.visible=!G;return b},drawPlotAreaspline:function(b,d){var a=this,c=a.paper,e=a.layers,f=a.options,h=f.chart,n=a.elements,t=f.plotOptions.series,
l=t.dataLabels&&t.dataLabels.style||{},r={fontFamily:l.fontFamily,fontSize:l.fontSize,lineHeight:l.lineHeight,fontWeight:l.fontWeight,fontStyle:l.fontStyle},k=a.xAxis[d.xAxis||0],m=a.yAxis[d.yAxis||0],s=b.data,q=(l=!1===d.visible)?"hidden":"visible",u=isNaN(+t.animation)&&t.animation.duration||1E3*t.animation,G="0"===a.definition.chart.drawfullareaborder,x=!1!==(f.tooltip||{}).enabled,w,v,D,z,y,f=b.items,E=b.graphics=b.graphics||[],$=null,S,K,B=m.max,ca=m.min,B=m.getAxisPosition(0<B&&0<ca?ca:0>B&&
0>ca?B:0),F=e.tracker,M=e.dataset=e.dataset||c.group("dataset-orphan"),J=e.datalabels=e.datalabels||c.group("datalabels").insertAfter(M),L=h.anchorTrackingRadius,W=a.chartWidth,O=a.chartHeight,e=function(){R.attr({"clip-rect":null});X.show();ia.show();J.attr({transform:"...t"+-W+","+-O})},N,ia,X,R,A,U,H=[],ca=[],I,V,P,aa,Q,ba,ka,Y,oa,pa,da,ua,Z,ha,sa,va=function(e,f,g,h,k,p,n,l){return function(){var m=g.imageUrl,r=g.imageScale,s=g.imageAlpha,t=n.imageHoverAlpha,u=n.imageHoverScale,w=this.width*r*
.01,v=this.width*u*.01;da={x:e-this.width*r*.005,y:f-this.height*r*.005,width:w,height:this.height*r*.01,alpha:s};ua={x:e-this.width*u*.005,y:f-this.height*u*.005,width:v,height:this.height*u*.01,alpha:t};t=v>w?ua:da;h.graphic=ba=c.image(m,X).attr(da).css({opacity:.01*s}).data("alwaysInvisible",0===r).data("setRolloverProperties",n).data("setRolloverAttr",ua).data("setRolloutAttr",da).data("anchorRadius",r).data("anchorHoverRadius",u);E.push(ba);if(z||x||n)ka=h.tracker=c.rect(F).attr(t).attr({cursor:z?
"pointer":"",stroke:ra,"stroke-width":g.lineWidth,fill:ra,ishot:!0,visibility:q}).data("eventArgs",k).click(function(b){ta.call(this,a,b)}).hover(function(b){return function(c){a.hoverPlotAnchor(this,c,"DataPlotRollOver",b,a)}}(h),function(b){return function(c){a.hoverPlotAnchor(this,c,"DataPlotRollOut",b,a)}}(h)).tooltip(p);(Y=h.dataLabel=a.drawPlotLineLabel(b,d,l,e,f))&&E.push(Y)}},xb=function(c,e,f,g){return function(){(Y=f.dataLabel=a.drawPlotLineLabel(b,d,g,c,e))&&E.push(Y)}},ja=function(b){ta.call(this,
a,b)},ma=function(b,c){return function(d){a.hoverPlotAnchor(this,d,c,b,a)}};P=function(a,b,c,d){var e=a.length,f=a[e-1],g=f.length,h=f[0],f=f[g-2];3>g||("R"===h&&3===g&&(a[e-1][0]="L"),b&&a.push(["L",f,d,c,d,"Z"]))};R=M.area=M.area||c.group("area",M);N=M.line||(M.line=c.group("line-connector",M));c.group("connector-shadow",N);ia=c.group("anchor-shadow",N);h=c.group("area-connector",N);X=c.group("area-anchors",N);X.hide();ia.hide();a.addCSSDefinition(".fusioncharts-datalabels .fusioncharts-label",
r);J.insertAfter(M);J.attr({"class":"fusioncharts-datalabels",transform:"...t"+W+","+O});u&&a.animationCompleteQueue.push({fn:e,scope:a});r=0;for(M=s.length;r<M;r+=1)if(w=s[r],D=w.y,N=H.length,I=ca.length,ba=ka=Y=null,2<=N&&(V=H[N-1],y=V.length),null===D)0===t.connectNullData&&($=null);else{ha=f[r]={chart:a,index:r,value:D};v=g(w.x,r);z=w.link;y=w.tooltext||w.toolText;v=k.getAxisPosition(v);D=m.getAxisPosition(D);if((aa=w.marker)&&aa.enabled)if(sa={index:r,link:z,value:w.y,displayValue:w.displayValue,
categoryLabel:w.categoryLabel,toolText:y,id:b.userID,datasetIndex:b.index,datasetName:b.name,visible:b.visible},U=aa.radius,Z=aa.shadow,Q=aa.symbol.split("_"),da=ua={},pa=w.rolloverProperties,aa.imageUrl)U=new Qa.Image,U.onload=va(v,D,aa,ha,sa,y,pa,r),U.onerror=xb(v,D,ha,r),U.src=aa.imageUrl;else{if(pa=w.rolloverProperties)da={polypath:[Q[1]||2,v,D,U,aa.startAngle,0],fill:ea(aa.fillColor),"stroke-width":aa.lineWidth,stroke:ea(aa.lineColor)},ua={polypath:[pa.sides||2,v,D,pa.radius,pa.startAngle,pa.dip],
fill:ea(pa.fillColor),"stroke-width":pa.lineWidth,stroke:ea(pa.lineColor)};ba=ha.graphic=c.polypath(Q[1]||2,v,D,U,aa.startAngle,0,X).attr({fill:ea(aa.fillColor),"stroke-width":aa.lineWidth,stroke:ea(aa.lineColor),"stroke-linecap":"round",cursor:z?"pointer":"",ishot:!0,visibility:0===U?"hidden":q}).data("alwaysInvisible",0===U).data("setRolloverProperties",pa).data("setRolloverAttr",ua).data("setRolloutAttr",da).data("anchorRadius",U).data("anchorHoverRadius",pa&&pa.radius).shadow(Z||!1,ia);if(z||
x||pa)U=Ya(U,pa&&pa.radius||0,L),ka=c.polypath(Q[1]||2,v,D,U,aa.startAngle,0,F).attr({cursor:z?"pointer":"",stroke:ra,"stroke-width":0,ishot:!0,fill:ra,visibility:q});(ka||ba).data("eventArgs",sa).click(ja).hover(ma(ha,"DataPlotRollOver"),ma(ha,"DataPlotRollOut")).tooltip(y)}null!==$?2<=N?("M"===H[N-1][0]&&H.push(["R"]),"M"===ca[I-1][0]&&ca.push(["R"]),N=H.length,I=ca.length,V=H[N-1],y=V.length,H[N-1].push(v),H[N-1].push(D),ca[I-1].push(v),ca[I-1].push(D),r===M-1&&"R"===V[0]&&(P(H,!0,K,B),P(ca,!1))):
(H.push(["M",S,$]),H.push(["R",v,D]),ca.push(["M",S,$]),ca.push(["R",v,D]),K=S):null===$&&2<=N&&("R"===V[0]&&(P(H,!0,K,B),P(ca,!1)),H.push(["M",v,D]),ca.push(["M",v,D]),K=v);ba&&E.push(ba);a.drawTracker&&a.drawTracker.call(a,b,d,r);ha.graphic=ba;ha.dataLabel=Y;ha.tracker=void 0;aa&&aa.imageUrl||(Y=a.drawPlotLineLabel(b,d,r,v,D));Y&&E.push(Y);a.drawTracker&&a.drawTracker.call(a,b,d,r);S=v;$=D}if(V=H[H.length-1])y=V.length,"Z"!==V[y-1]&&"R"===V[0]&&(P(H,!0,K,B),P(ca,!1));2<=H.length&&(S=c.path(H,R).attr({fill:ea(d.fillColor),
"stroke-dasharray":d.dashStyle,"stroke-width":G?0:d.lineWidth,stroke:ea(d.lineColor),"stroke-linecap":"round",visibility:q}).shadow(t.shadow&&w.shadow),b.graphic=S,E.push(S));u?oa=R.attr({"clip-rect":n["clip-canvas-init"]}).animate({"clip-rect":n["clip-canvas"]},u,"normal",a.getAnimationCompleteFn()):(e&&e(),e=void 0);G&&(2<=ca.length&&(A=c.path(ca,h).attr({stroke:ea(d.lineColor),"stroke-width":d.lineWidth,"stroke-dasharray":w.dashStyle||d.dashStyle,"stroke-linecap":"round",visibility:q}).shadow(t.shadow||
w.shadow)),E.push(A),u&&h.attr({"clip-rect":n["clip-canvas-init"]}).animateWith(R,oa,{"clip-rect":n["clip-canvas"]},u,"normal"));b.visible=!l;return b}},q["renderer.cartesian"]);q("renderer.kagi",{drawPlotKagi:function(b,d){var a=this,c=a.paper,e=a.options,f=a.elements,g=b.data,n=e.plotOptions.series,t=a.xAxis[d.xAxis||0],l=a.yAxis[d.yAxis||0],r=d.canvasPadding,k=d.xShiftLength,m=b.items,s=a.logic,q=!1===d.visible?"hidden":"visible",u=!1!==(e.tooltip||{}).enabled,v={stroke:ea({color:d.rallyColor,
alpha:d.rallyAlpha}),"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":d.rallyThickness||d.lineWidth,"stroke-dasharray":d.rallyDashed},x={stroke:ea({color:d.declineColor,alpha:d.declineAlpha}),"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":d.declineThickness||d.lineWidth,"stroke-dasharray":d.declineDashed},w={"true":v["stroke-width"],"false":x["stroke-width"]},z=a.layers,D=z.dataset=z.dataset||c.group("dataset-orphan"),y=z.datalabels=z.datalabels||c.group("datalabels").insertAfter(D),
B=z.tracker,z=isNaN(+n.animation)&&n.animation.duration||1E3*n.animation,E=f["clip-canvas-init"].slice(0),f=f["clip-canvas"].slice(0),$=0,S=t.getAxisPosition($),K=a.chartWidth,F=a.chartHeight,ca=function(){Z.attr({"clip-rect":null});pa.show();ua.show();y.attr({transform:"...t"+-K+","+-F})},J=[],M=[],H,L,W,O,N,A,X,R,I,U,V,P,ba,Q,aa,Y,da,ka,ha=e.chart.anchorTrackingRadius,oa,pa,Z,ua,ja,na,sa,va,xb,fa,qa;if(g.length){e=D.line||(D.line=c.group("line-connector",D));c.group("connector-shadow",e);pa=c.group("anchor-shadow",
e);Z=c.group("connector",e);ua=c.group("anchors",e);ua.hide();pa.hide();y.attr({transform:"...t"+K+","+F});z&&a.animationCompleteQueue.push({fn:ca,scope:this});X=!!g[0].isRally;e=0;for(D=g.length;e<D;e+=1)m[e]={chart:a,index:e,graphic:null,line:[],dataLabel:null,tracker:null},R=g[e],I=R.y,R.isDefined||(I=R.plotValue),I=h(R.plotValue,I),R.plotY=qb(l.getAxisPosition(R.y),2),R.graphY=qb(l.getAxisPosition(I),2),R.plotX=S,R.isShift&&($+=1,S=t.getAxisPosition($)),e&&(I=g[e-1],X=R&&R.objParams&&R.objParams.isRally,
ba=R&&R.objParams&&R.objParams.lastHigh,Q=R&&R.objParams&&R.objParams.lastLow,aa=R&&R.objParams&&R.objParams.isRallyInitialised,I&&aa&&I.isRally!==R.isRally?(R.isChanged=!0,R.ty=qb(l.getAxisPosition(X?ba:Q),2)):R.isChanged=!1);t=a.canvasLeft+r;S=t+k/2;U=g[0].plotY;X=!!g[0].isRally;l=ma(U)+w[X]%2/2;X?J.push("M",t,l,"H",S):M.push("M",t,l,"H",S);ib(g,function(e,f){if(Y=g[f+1])ka=["M",S,U],X=e.isRally,e.isShift&&(S+=k,U=e.graphY,ka.push("H",S),ka[2]=ma(ka[2])+w[X]%2/2,ka=ka.toString(),X?J.push(ka):M.push(ka),
ka=["M",S,U]),Y.isChanged&&(U=Y.ty,ka.push("V",U),ka[1]=ma(ka[1])+w[X]%2/2,ka=ka.toString(),X?J.push(ka):M.push(ka),ka=["M",S,U]),da=Y.isRally,Y.graphY!==ka[2]&&(ka.push("V",Y.graphY),ka[1]=ma(ka[1])+w[da]%2/2,ka=ka.toString(),da?J.push(ka):M.push(ka)),U=Y.graphY;V=e.plotX;P=e.plotY;O=e.marker;H=e&&e.link;L=e&&e.toolText;if(void 0!==P&&!isNaN(P)&&e.isDefined)if(N=O.symbol.split("_"),xb="spoke"===N[0]?1:0,fa=O.radius,ja=O.shadow,oa={index:f,link:H,value:e.y,displayValue:e.displayValue,categoryLabel:e.categoryLabel,
toolText:L,id:b.userID,datasetIndex:b.index,datasetName:b.name,visible:b.visible},na=sa={},va=e.rolloverProperties,O.imageUrl)qa=new Qa.Image,qa.onload=function(e,f,g,h,k,p,n,l){return function(){var m=g.imageUrl,r=g.imageScale,s=g.imageAlpha,t=n.imageHoverAlpha,w=n.imageHoverScale,x=this.width*r*.01,v=this.width*w*.01;na={x:e-this.width*r*.005,y:f-this.height*r*.005,width:x,height:this.height*r*.01,alpha:s};sa={x:e-this.width*w*.005,y:f-this.height*w*.005,width:v,height:this.height*w*.01,alpha:t};
t=v>x?sa:na;h.graphic=A=c.image(m,ua).attr(na).css({opacity:.01*s}).data("alwaysInvisible",0===r).data("setRolloverProperties",n).data("setRolloverAttr",sa).data("setRolloutAttr",na).data("anchorRadius",r).data("anchorHoverRadius",w);if(H||u||n)W=h.tracker=c.rect(B).attr(t).attr({cursor:H?"pointer":"",stroke:ra,"stroke-width":g.lineWidth,fill:ra,ishot:!0,visibility:q}).data("eventArgs",k).click(function(b){ta.call(this,a,b)}).hover(function(b){return function(c){a.hoverPlotAnchor(this,c,"DataPlotRollOver",
b,a)}}(h),function(b){return function(c){a.hoverPlotAnchor(this,c,"DataPlotRollOut",b,a)}}(h)).tooltip(p);h.dataLabel=a.drawPlotKagiLabel(b,d,l,e,f)}}(V,P,O,m[f],oa,L,va,f),qa.onerror=function(c,e,f,g,h,k,p,n){return function(){g.dataLabel=a.drawPlotKagiLabel(b,d,n,c,e)}}(V,P,O,m[f],oa,L,va,f),qa.src=O.imageUrl;else{!s.multisetRealtime&&va&&(na={polypath:[N[1]||2,V,P,fa,O.startAngle,xb],fill:ea(O.fillColor),"stroke-width":O.lineWidth,stroke:ea(O.lineColor)},sa={polypath:[va.sides||2,V,P,va.radius,
va.startAngle,va.dip],fill:ea(va.fillColor),"stroke-width":va.lineWidth,stroke:ea(va.lineColor)});A=m[f].graphic=c.polypath(N[1]||2,V,P,fa,O.startAngle,xb,ua).attr({fill:ea(O.fillColor),"stroke-width":O.lineWidth,stroke:ea(O.lineColor),"stroke-linecap":"round",cursor:H?"pointer":"",ishot:!0,visibility:0===fa?"hidden":q}).data("alwaysInvisible",0===fa).data("setRolloverProperties",va).data("setRolloverAttr",sa).data("setRolloutAttr",na).data("anchorRadius",fa).data("anchorHoverRadius",va&&va.radius).shadow(ja||
!1,pa);if(H||u)fa=Ya(fa,va&&va.radius||0,ha),W=c.circle(V,P,fa,B).attr({cursor:H?"pointer":"",stroke:ra,ishot:!0,fill:ra,"stroke-width":O.lineWidth,visibility:q}).data("eventArgs",oa).click(function(b){ta.call(this,a,b)}).hover(function(b){return function(c){a.hoverPlotAnchor(this,c,"DataPlotRollOver",b,a)}}(m[f]),function(b){return function(c){a.hoverPlotAnchor(this,c,"DataPlotRollOut",b,a)}}(m[f])).tooltip(L);m[f].tracker=W||A;O&&O.imageUrl||(m[f].dataLabel=a.drawPlotKagiLabel(b,d,f,V,P))}});v=
c.path(J,Z).attr(v).shadow(n.shadow);m[0].line.push(v);v=c.path(M,Z).attr(x).shadow(n.shadow);m[0].line.push(v);z?Z.attr({"clip-rect":E}).animate({"clip-rect":f},z,"normal",a.getAnimationCompleteFn()):(ca&&ca(),ca=void 0)}},drawPlotKagiLabel:function(b,d,a,c,e,f){var g=this.options,h=g.chart,t=this.paper,l=this.layers,r=g.plotOptions.series.dataLabels.style,g=1===h.rotateValues?270:0,k=this.canvasHeight,m=this.canvasTop,s=this.canvasLeft,q=b.data[a];a=b.items[a];b=(b=a.graphic)&&"image"==b.type&&
.5*b.attr("height")||q.marker&&q.marker.radius-3;h=h.valuePadding+2+b;d=!1===d.visible?"hidden":"visible";b=a.dataLabel;var u={fontFamily:r.fontFamily,fontSize:r.fontSize,lineHeight:r.lineHeight,fontWeight:r.fontWeight,fontStyle:r.fontStyle},v,x,w;f=f||l.datalabels;l=q.displayValue;V(l)&&l!==z?(b?g&&b.rotate(360-g):b=a.dataLabel=t.text(f).attr({text:l,fill:r.color,"text-bound":[r.backgroundColor,r.borderColor,r.borderThickness,r.borderPadding,r.borderRadius,r.borderDash]}).css(u),b.attr({title:q.originalText||
"",fill:r.color}),l=b.getBBox(),f=r=g?l.width:l.height,t=e,f=f+h+4,r=.5*r+h,g?(s=!0,q.vAlign===Ca?(t-=r,s=e-m<f):q.vAlign===Da&&(t+=r-2,v=1,s=e+f>m+k),s&&(x=1,c-=h+3+.5*l.height,t=e)):q.vAlign===Ca?t-=r:q.vAlign===Da?(t+=r,v=1):l.width>c-s?t-=r:(x=1,c-=h+3,w="end"),b.attr({x:c,y:t,"text-anchor":w,visibility:d}).data("isBelow",v).data("isMiddle",x),g&&b.attr("transform","T0,0,R"+g)):b&&b.attr({text:z});return b}},q["renderer.cartesian"]);q("renderer.boxandwhisker",{drawPlotBoxandwhisker2d:function(b,
d){var a=this,c=a.paper,e=a.options,f=e.plotOptions.series,h=a.xAxis[d.xAxis||0],n=a.yAxis[d.xAxis||0],t=isNaN(+f.animation)&&f.animation.duration||1E3*f.animation,l=a.layers,r=l.dataset=l.dataset||c.group("dataset-orphan"),k=l.datalabels=l.datalabels||c.group("datalabels"),m=d.data,s=b.items||(b.items=[]),q=!1===d.visible?"hidden":"visible",u=!1!==(e.tooltip||{}).enabled,v=d.columnPosition||0,x=a.definition.chart,w=h.getAxisPosition(0),y=h.getAxisPosition(1)-w,D=f.groupPadding,B=f.maxColWidth,w=
d.numColumns||1,y=(1-.01*(x&&x.plotspacepercent))*y||J(y*(1-2*D),B*w),x=y/w,v=v*x-y/2,y=e.chart,w=1===y.rotateValues?270:void 0,y=g(y.valuePadding,0),D=r.upperBoxGroup=r.upperBoxGroup||c.group("upperBox",r),B=r.lowerBoxGroup=r.lowerBoxGroup||c.group("lowerBox",r),H=r.medianGroup=r.medianGroup||c.group("median",r),E=b.graphics=b.graphics||[],$=s.displayValues={},S=$.upperQuartileValues=[],K=$.lowerQuartileValues=[],$=$.medianValues=[],F=function(b){ta.call(this,a,b)},l=l.shadows||(l.shadows=c.group("shadows",
r).toBack()),e=e.plotOptions.series.dataLabels.style,ca={fontFamily:e.fontFamily,fontSize:e.fontSize,lineHeight:e.lineHeight,fontWeight:e.fontWeight,fontStyle:e.fontStyle},I=function(b,c){return function(d){b.upperBox.attr(c.upperBox);b.lowerBox.attr(c.lowerBox);b.upperBoxBorder.attr(c.upperBoxBorder);b.lowerBoxBorder.attr(c.lowerBoxBorder);b.upperQuartile.attr(c.upperQuartile);b.lowerQuartile.attr(c.lowerQuartile);b.medianBorder.attr(c.median);ta.call(this,a,d,"DataPlotRollOver")}},M=function(b,
c){return function(d){b.upperBox.attr(c.upperBox);b.lowerBox.attr(c.lowerBox);b.upperBoxBorder.attr(c.upperBoxBorder);b.lowerBoxBorder.attr(c.lowerBoxBorder);b.upperQuartile.attr(c.upperQuartile);b.lowerQuartile.attr(c.lowerQuartile);b.medianBorder.attr(c.median);ta.call(this,a,d,"DataPlotRollOut")}},A,L,W,O,N,ia,X,R,P,U,ba,Y,Q,da,aa,Z,ha,ka,ja,oa,pa,fa,ua,na,ra,sa;ka=0;for(ja=m.length;ka<ja;ka+=1)L=m[ka],W=L.y,N=L.link,ia=L.tooltext||L.toolText,(A=s[ka])||(A=s[ka]={index:ka,value:W,upperBox:null,
lowerBox:null,upperBoxBorder:null,lowerBoxBorder:null,upperQuartileBorder:null,lowerQuartileBorder:null,medianBorder:null,upperQuartileValues:null,lowerQuartileValues:null,medianValues:null,tracker:null,hot:null}),null!==W&&(n.getAxisPosition(W),W=g(L.x,ka),W=h.getAxisPosition(W),v&&(W+=v),O=f.borderRadius||0,R=((R=(Q=L.upperQuartile||{},Q.value))||0===R)&&n.getAxisPosition(R),X=((X=(da=L.lowerQuartile||{},da.value))||0===X)&&n.getAxisPosition(X),U=((P=(ha=L.median)&&ha.value)||0===P)&&n.getAxisPosition(P),
ba=U-R,Y=X-U,aa=L.upperBoxBorder||{},Z=L.lowerBoxBorder||{},P={index:ka,link:N,maximum:L.displayValueMax,minimum:L.displayValueMin,median:P,q3:Q.value,q1:da.value,maxDisplayValue:L.displayValueMax,minDisplayValue:L.displayValueMin,medianDisplayValue:L.displayValueMid,q1DisplayValue:L.displayValueQ1,q3DisplayValue:L.displayValueQ3,categoryLabel:L.categoryLabel,toolText:L.toolText,id:b.userID,datasetIndex:b.index,datasetName:b.name,visible:b.visible},oa=ma(W)+aa.borderWidth%2*.5,pa=ma(W+x)+aa.borderWidth%
2*.5,fa=ma(R)+Q.borderWidth%2*.5,x=pa-oa,sa=L.hoverEffects.rollOut={upperBox:{fill:ea(L.color.FCcolor),"stroke-width":0,"stroke-dasharray":aa.dashStyle,cursor:N?"pointer":"",ishot:!0,visibility:q},lowerBox:{fill:ea(L.lowerboxColor.FCcolor),"stroke-width":0,"stroke-dasharray":Z.dashStyle,cursor:N?"pointer":z,ishot:!0,visibility:q},upperBoxBorder:{stroke:aa.color,"stroke-width":aa.borderWidth,"stroke-linecap":"round",dashstyle:aa.dashStyle,ishot:!0,visibility:q},lowerBoxBorder:{stroke:Z.color,"stroke-width":Z.borderWidth,
dashstyle:Z.dashStyle,"stroke-linecap":"round",ishot:!0,visibility:q},upperQuartile:{stroke:ea(Q.color),"stroke-width":Q.borderWidth,"stroke-dasharray":Q.dashSyle,"stroke-linecap":"round",cursor:N?"pointer":z,ishot:!0,visibility:q},lowerQuartile:{stroke:ea(da.color),"stroke-width":da.borderWidth,"stroke-dasharray":da.dashSyle,cursor:N?"pointer":"","stroke-linecap":"round",ishot:!0,visibility:q},median:{stroke:ea(ha.color),"stroke-width":ha.borderWidth,"stroke-dasharray":ha.dashSyle,cursor:N?"pointer":
"","stroke-linecap":"round",ishot:!0,visibility:q}},N=A.graphic=A.upperBox=c.rect(oa,fa,x,ba,O,D).attr(sa.upperBox).shadow(f.shadow&&L.shadow,l),ba=A.upperBoxBorder=c.path(["M",oa,fa,"V",fa+ba,"M",pa,fa,"V",fa+ba],D).attr(sa.upperBoxBorder).shadow(f.shadow&&aa.shadow,l),aa=A.upperQuartile=c.path(["M",oa,fa,"H",oa+x],H).attr(sa.upperQuartile).shadow(f.shadow&&Q.shadow,l),oa=ma(W)+Z.borderWidth%2*.5,pa=ma(W+x)+Z.borderWidth%2*.5,fa=ma(U+Y)+da.borderWidth%2*.5,O=A.lowerBox=c.rect(oa,U,x,fa-U,O,B).attr(sa.lowerBox).shadow(f.shadow&&
L.shadow,l),Z=A.lowerBoxBorder=c.path(["M",oa,U,"V",U+Y,"M",pa,U,"V",U+Y],B).attr(sa.lowerBoxBorder).shadow(f.shadow&&Z.shadow,l),fa=ma(U+Y)+da.borderWidth%2*.5,Y=A.lowerQuartile=c.path(["M",oa,fa,"H",oa+x],H).attr(sa.lowerQuartile).shadow(f.shadow&&Q.shadow,l),fa=ma(U)+ha.borderWidth%2*.5,oa=A.medianBorder=c.path(["M",oa,fa,"H",oa+x],H).attr(sa.median),fa=b.index+"_"+ka,N.click(F).hover(I(A,L.hoverEffects),M(A,sa)).data("groupId",fa).data("eventArgs",P),O.click(F).hover(I(A,L.hoverEffects),M(A,sa)).data("groupId",
fa).data("eventArgs",P),ba.click(F).hover(I(A,L.hoverEffects),M(A,sa)).data("groupId",fa).data("eventArgs",P),Z.click(F).hover(I(A,L.hoverEffects),M(A,sa)).data("groupId",fa).data("eventArgs",P),aa.click(F).hover(I(A,L.hoverEffects),M(A,sa)).data("groupId",fa).data("eventArgs",P),Y.click(F).hover(I(A,L.hoverEffects),M(A,sa)).data("groupId",fa).data("eventArgs",P),oa.click(F).hover(I(A,L.hoverEffects),M(A,sa)).data("groupId",fa).data("eventArgs",P),P=w?za:Ua,V(Q.displayValue)&&Q.displayValue!==z&&
(ua=S[ka]=c.text(k).attr({text:Q.displayValue,x:W+x/2,title:Q.originalText||"",y:R-y,"text-anchor":w?"start":P,"vertical-align":w?"middle":"bottom",visibility:q,fill:e.color,"text-bound":[e.backgroundColor,e.borderColor,e.borderThickness,e.borderPadding,e.borderRadius,e.borderDash]}).hover(I(A,L.hoverEffects),M(A,sa)).data("groupId",fa).css(ca),w&&ua.rotate(w,W+x/2,R-y)),V(ha.displayValue)&&ha.displayValue!==z&&(ra=$[ka]=c.text(k).attr({text:ha.displayValue,x:W+x/2,y:U-y,title:ha.originalText||"",
"text-anchor":w?"start":P,"vertical-align":w?"middle":"bottom",visibility:q,fill:e.color,"text-bound":[e.backgroundColor,e.borderColor,e.borderThickness,e.borderPadding,e.borderRadius,e.borderDash]}).hover(I(A,L.hoverEffects),M(A,sa)).data("groupId",fa).css(ca),w&&ra.rotate(w,W+x/2,U-y)),V(da.displayValue)&&da.displayValue!==z&&(na=K[ka]=c.text(k).attr({text:da.displayValue,x:W+x/2,y:X+y,title:da.originalText||"","text-anchor":w?"start":P,"vertical-align":w?"middle":"top",visibility:q,fill:e.color,
"text-bound":[e.backgroundColor,e.borderColor,e.borderThickness,e.borderPadding,e.borderRadius,e.borderDash]}).hover(I(A,L.hoverEffects),M(A,sa)).data("groupId",fa).css(ca),w&&na.rotate(w,W+x/2,X+y)),u&&(N.tooltip(ia),O.tooltip(ia),ba.tooltip(ia),Z.tooltip(ia),aa.tooltip(ia),Y.tooltip(ia),oa.tooltip(ia),ua&&ua.tooltip(ia),ra&&ra.tooltip(ia),na&&na.tooltip(ia)),N&&E.push(N),O&&E.push(O),oa&&E.push(oa),ba&&E.push(ba),Z&&E.push(Z),aa&&E.push(aa),Y&&E.push(Y),ua&&E.push(ua),ra&&E.push(ra),na&&E.push(na));
r.attr({"clip-rect":[a.canvasLeft,a.canvasTop,t?0:a.canvasWidth,a.canvasHeight]});t&&r.animate({"clip-rect":[a.canvasLeft,a.canvasTop,a.canvasWidth,a.canvasHeight]},t,"normal");b.visible=!1!==d.visible}},q["renderer.cartesian"]);q("renderer.dragnode",{drawPlotDragnode:function(b,d){var a=this,c=b.graphics=[],e={},f=a.options,p=f.tooltip,n=f._FCconf.inCanvasStyle,t=a.paper,l=a.layers,r=b.items,k=l.dataset,m=l.connector,s=e.xAxis=a.xAxis[d.xAxis||0],q=e.yAxis=a.yAxis[d.yAxis||0],v=d.data,G=e.elements=
{data:[]},x=a.smartLabel,w=f.plotOptions.series.dataLabels.style,y=f.orphanStyles.connectorlabels.style,D=f.connectors,B=f.connectorsStore,A=f.pointStore||(f.pointStore=[]),E=f.invalConnectStore,$={fontFamily:w.fontFamily,fontSize:w.fontSize,lineHeight:w.lineHeight,fontWeight:w.fontWeight,fontStyle:w.fontStyle},S=function(b){A[b.from]&&A[b.to]?B.push(new wa(b,A,y,t,m,a)):E.push(b)},K=function(){var b=this;b.data("fire_click_event",1);clearTimeout(b._longpressactive);b._longpressactive=setTimeout(function(){b.data("fire_click_event",
0);b.data("viewMode")||a.logic.showLabelDeleteUI(a,b)},1E3)},J=function(){this.data("fire_click_event")&&(this.data("fire_click_event",0),ab.call(this))},ca=function(b){var c=this.data("fire_click_event");ab.call(this);c&&ta.call(this,a,b,"LabelClick")},I=function(b){ta.call(this,a,b,"LabelRollover")},M=function(b){ta.call(this,a,b,"LabelRollout")},P=function(b,c,d,e,f){d=this.data("data");e=d.bBox;var g=a.canvasTop+a.canvasHeight,h=a.canvasLeft+a.canvasWidth;this.data("fire_dragend")||(ta.call(this,
a,f,"LabelDragStart"),this.data("fire_dragend",1));e.x+b<a.canvasLeft&&(b=a.canvasLeft-e.x);e.x2+b>h&&(b=h-e.x2);e.y+c<a.canvasTop&&(c=a.canvasTop-e.y);e.y2+c>g&&(c=g-e.y2);this.attr({x:e.x+b,y:e.y+c});d.label.attr({x:d.ox+b,y:d.oy+c})},L=function(){var a=this.data("data"),b=this.getBBox();a.ox=a.label.attr("x");a.oy=a.label.attr("y");a.bBox=b;this.data("fire_dragend",0)},W=function(b){var c=this.data("data"),d=c.label,e={hcJSON:{dragableLabels:[]}},f=this.data("eventArgs"),g=f.x=a.xAxis[0].getAxisPosition(d.attr("x"),
1),d=f.y=a.yAxis[0].getAxisPosition(d.attr("y"),1);e.hcJSON.dragableLabels[c.labelNode.index]={y:d,x:g};H(a.logic.chartInstance.jsVars._reflowData,e,!0);this.data("fire_dragend")&&(c=fc(a.container,b),c.sourceEvent="labeldragend",u.raiseEvent("chartupdated",H(c,f),a.logic.chartInstance),ta.call(this,a,b,"labeldragend"))},O,N,ia,X,R,Q,U,Y,ba,da,Z,aa,fa,ha,ka,ja,oa,pa,na,ua,ma,qa,sa,va;m||(m=l.connector=t.group("connectors").insertBefore(k));p&&!1!==p.enabled&&m.trackTooltip(!0);l=G.group=t.group(k);
p=G.dragLabelGroup=t.group(k);x.setStyle(w);k=0;for(G=v.length;k<G;k+=1){O=v[k];X=O.marker;O._yPos=ia=q.getAxisPosition(O.y);O._xPos=N=s.getAxisPosition(O.x);Q=r[k]||(r[k]={});va=O.hoverEffects&&O.hoverEffects.rolloverProperties;X=Q.graphic;U=Q.image;Y=Q.label;X=O.marker;if(void 0!==ia&&!isNaN(ia)&&X){Z=O._config=O._config||{shapeArg:{},startConnectors:[],endConnectors:[]};aa=Z.shapeArg;fa=g(X&&X.height);ha=g(X&&X.width);ka=g(X&&X.radius);R=h(X&&X.symbol);ja="rectangle"===R;ba=O.id;oa=O.imageNode;
pa=O.imageURL;na=O.imageAlign;ua=O.labelAlign;ma=ja?ha:1.4*ka;qa=g(O.imageWidth,ma);ja=ja?fa:1.4*ka;sa=g(O.imageHeight,ja);ka={fill:ea(X.fillColor),"stroke-width":X.lineWidth,r:X.radius,stroke:ea(X.lineColor)};R=aa.symbol=h(X&&X.symbol,e.symbol);R=R.split("_");aa.x=N;aa.y=ia;aa.radius=X.radius;aa.width=ha;aa.height=fa;aa.sides=R[1];"poly"===R[0]||"circle"===R[0]?X=t.polypath(R[1],N,ia,X.radius,X.startAngle,0,l).attr(ka):(Z.shapeType=Nb,aa.x=N-ha/2,aa.y=ia-fa/2,aa.r=0,ka.width=ha,ka.height=fa,ka.x=
N-ha/2,ka.y=ia-fa/2,va&&O.hoverEffects.enabled&&(va.x=N-va.width/2,va.y=ia-va.height/2,delete va.r),delete ka.r,X=t.rect(aa.x,aa.y,ha,fa,0,l).attr(ka));if(oa&&pa){sa>ja&&(sa=ja);qa>ma&&(qa=ma);switch(na){case "middle":va=ia-sa/2;break;case "bottom":va=ja>sa?ia+ja/2-sa:ia-sa/2;break;default:va=ja>sa?ia-.5*ja:ia-sa/2}Z.imageX=N-qa/2;Z.imageY=va;U||(U=t.image(l));U.attr({src:pa,x:Z.imageX,y:va,width:qa,height:sa})}Z=O.displayValue;if(V(Z)||Z!==z){ma=x.getSmartText(Z,ma,ja);Z=.5*ja-.5*ma.height;switch(ua){case "top":Z=
-Z;break;case "bottom":break;default:Z=0}O._yAdjustment=ua=Z;ia+=ua;Y?Y.attr({text:ma.text,title:ma.tooltext||"",fill:w.color,x:N,y:ia}):(Y=t.text(l),Y.attr({text:ma.text,fill:w.color,x:N,y:ia,"text-bound":[w.backgroundColor,w.borderColor,w.borderThickness,w.borderPadding,w.borderRadius,w.borderDash]}).css($))}A[ba]=O;Q.index=k;Q.graphic=X;Q.label=Y;Q.image=U;ba=a.drawTracker&&a.drawTracker.call(a,b,d,k,ka);X&&c.push(X);Y&&c.push(Y);U&&c.push(U);ba&&c.push(ba)}Q.index=k;Q.tracker=ba}if(B)for(k=E.length-
1;0<=k;k-=1)c=E[k],A[c.from]&&A[c.to]&&(E.splice(k,1),B.push(new wa(c,A,y,t,m,a)));else for(B=f.connectorsStore=[],E=f.invalConnectStore=[],k=0;k<D.length;k+=1)ib(D[k].connector,S);if(!a.dragLabelsDrawn&&(da=f.dragableLabels)&&0<(G=da.length)){ma=a.plotSizeX;ja=a.plotSizeY;c=parseInt(n.fontSize,10);r=n.backgroundColor;v=n.borderColor;for(k=0;k<G;k+=1)if(x=da[k],x.index=k,$=F(h(x.text,x.label)))$=F($),S=s.getAxisPosition(x.x||0),ia=q.getAxisPosition(x.y||0,0,1,0,1),O=g(x.fontsize,c),N=Ja(h(x.color,
n.color)),l=g(x.alpha,100)/100,w=g(x.allowdrag,1),ua=.8*O,D=g(x.padding,5),U={fontSize:O+"px",fontFamily:n.fontFamily,fill:N,color:N,opacity:l},kc(U),N=h(x.bgcolor,r),Q=h(x.bordercolor,v),O={link:x.link,text:$,x:S,y:ia,allowdrag:w,sourceType:"labelnode"},N&&(U.backgroundColor=N.replace(rb,La),U.backgroundOpacity=l),Q&&(U.borderColor=Q.replace(rb,La),U.borderOpacity=l),$=t.text(p).css(U).attr({text:$,x:S,y:ia,align:Ua,"text-bound":[(x.bgcolor||"").replace(rb,La),(x.bordercolor||"").replace(rb,La),
g(x.borderthickness,1),D,g(x.radius,0),g(x.dashed,0)?ya(g(x.dashlen,5),g(x.dashgap,4),g(x.borderthickness,1)):void 0]}),S=$.getBBox(),D=t.rect(S.x-D,S.y-D,S.width+2*D,S.height+2*D,0).attr({fill:ra,ishot:!0,"stroke-width":0}).css({cursor:w?"move":""}).mousedown(K).mousemove(J).mouseup(ca).data("viewMode",f.chart.viewMode).hover(I,M),p.appendChild(D),D.data("data",{label:$,labelNode:x,chart:a}).data("eventArgs",O).data("link",x.link),w&&D.drag(P,L,W);a.dragLabelsDrawn=!0}return e},drawTracker:function(b,
d,a,c){var e=this,f=e.paper,g=b.data[a],n=b.items[a],t=g._config,l=e.layers.tracker,r=Ma({},t.pointAttr),k=t.shapeArg,m=k.x,s=k.y,q=k.width,v=k.height,G=k.radius,x=e.dragStart,w=e.dragUp,y=e.dragMove,D=e.elements,B=D.waitElement,A=g.link?"pointer":g.allowDrag?"move":"",E=n.tracker;r.fill=ra;r.stroke=ra;r.cursor=A;r.ishot=!0;E="rect"===t.shapeType?f.rect(m,s,q,v,0).attr(r):f.polypath(k.sides,m,s,G,k.startAngle).attr(r);r={index:a,link:g.link,y:g.y,x:g.x,shape:h(g._options.shape,"rect"),width:q,height:v,
radius:G,sides:k.sides,label:g.displayValue,toolText:g.toolText,id:g.id,datasetIndex:b.index,datasetName:b.name,sourceType:"dataplot"};n.tracker=E.mousedown(function(a){var b=this,c=ob&&Na(a)||Fb,h=a.layerX||c.layerX,k=a.layerY||c.layerY,n=u.getPosition(e.container);b.data("fire_click_event",1);b.data("mousedown",1);void 0===h&&(h=(a.pageX||c.pageX)-n.left,k=(a.pageY||c.pageY)-n.top);clearTimeout(b._longpressactive);b.data("move",!0);e.options.chart.viewMode||((B=D.waitElement)||(B=D.waitElement=
f.ringpath(l).attr({fill:ea({alpha:"100,100",angle:120,color:"CCCCCC,FFFFFF",ratio:"30,50"}),"stroke-width":0})),h+=11,k-=21,B.attr({ringpath:[h,k,8,11,0,0]}).show().animate({ringpath:[h,k,8,11,0,6.28]},1E3),b._longpressactive=setTimeout(function(){var a=d.name!==z&&void 0!==d.name?d.name+Aa+" ":z,c=d.id,f=g._options,h={circle:"circ",polygon:"poly",undefined:"rect"}[f.shape];D.waitElement&&D.waitElement.hide();b.data("fire_click_event",0);e.logic.showNodeUpdateUI(e,{x:{value:g.x},y:{value:g.y},draggable:{value:da(f.allowdrag,
1)},color:{value:f.color},alpha:{value:f.alpha},label:{value:da(f.label,f.name)},tooltip:{value:f.tooltext},shape:{value:h},rectWidth:{value:f.width},rectHeight:{value:f.height},circPolyRadius:{value:f.radius},polySides:{value:f.numsides},image:{value:f.imagenode},imgWidth:{value:f.imagewidth},imgHeight:{value:f.imageheight},imgAlign:{value:f.imagealign},imgUrl:{value:f.imageurl},id:{value:g.id,disabled:!0},link:{value:f.link},dataset:{innerHTML:'<option value="'+c+'">'+a+c+"</option>",disabled:!0}},
!0)},1E3))}).mousemove(function(){D.waitElement&&D.waitElement.hide();this.data("fire_click_event",0);ab.call(this)}).mouseup(function(a){var b=this.data("fire_click_event");D.waitElement&&D.waitElement.hide();ab.call(this);this.data("mousedown",0);b&&ta.call(this,e,a)}).hover(function(a,b){return function(c){a.graphic.attr(b);ta.call(this,e,c,"DataPlotRollOver")}}(n,g.hoverEffects.rolloverProperties),function(a,b){return function(c){a.graphic.attr(b);ta.call(this,e,c,"DataPlotRollOut")}}(n,c)).data("eventArgs",
r).data("drag-options",{plotItems:n,dataObj:g,endConnectors:t.endConnectors,startConnectors:t.startConnectors,boundaryTop:e.canvasTop,boundaryBottom:e.canvasTop+e.canvasHeight,boundaryLeft:e.canvasLeft,boundaryRight:e.canvasLeft+e.canvasWidth,cloneGroup:e.layers.dataset,datasetIndex:b.index,pointIndex:a,dataOptions:d,cursor:A,chart:e,link:g.link}).tooltip(g.toolText);l.appendChild(E);g.allowDrag&&E.drag(function(a,b,c,d,f){y.call(this,a,b,c,d,f,e)},function(a,b,c,d,f){x.call(this,a,b,c,d,f,e)},function(a){w.call(this,
a,e)});return E},dragStart:function(){var b=this.paper,d=this.data("drag-options")||{},a=d.dataObj,c=d.plotItems,e=c.cloneGroup,f=c.cloneGraphic,g=c.cloneImage,h=c.cloneLabel,t=this.getBBox(),l={opacity:.3};d.bBoxX=t.x;d.bBoxX2=t.x2||t.x+t.width;d.bBoxY=t.y;d.bBoxY2=t.y2||t.y+t.height;d.origX=d.lastX||(d.lastX=0);d.origY=d.lastY||(d.lastY=0);d.draged=!1;d.startYValue=a.y;d.startXValue=a.x;e||(e=c.cloneGroup=b.group(d.cloneGroup).attr(l));c.graphic&&!f&&(f=c.cloneGraphic=c.graphic.clone(),e.appendChild(f),
f.attr(l));c.image&&!g&&(g=c.cloneImage=c.image.clone(),e.appendChild(g).attr(l));c.label&&!h&&(h=c.cloneLabel=c.label.clone(),e.appendChild(h).attr(l));e.show()},dragMove:function(b,d,a,c,e,f){a=this.data("drag-options");c=a.plotItems;var g=a.bBoxX2+b,h=a.bBoxY+d,t=a.bBoxY2+d;a.bBoxX+b<a.boundaryLeft&&(b=a.boundaryLeft-a.bBoxX);g>a.boundaryRight&&(b=a.boundaryRight-a.bBoxX2);h<a.boundaryTop&&(d=a.boundaryTop-a.bBoxY);t>a.boundaryBottom&&(d=a.boundaryBottom-a.bBoxY2);g=a._transformObj={transform:"t"+
(a.origX+b)+","+(a.origY+d)};this.attr(g);c.cloneGraphic&&c.cloneGraphic.attr(g);c.cloneImage&&c.cloneImage.attr(g);c.cloneLabel&&c.cloneLabel.attr(g);a.draged||ta.call(this,f,e,"DataplotDragStart");a.draged=!0;a.lastX=b;a.lastY=d},dragUp:function(b){var d=this.data("drag-options"),a=d.plotItems,c=d.chart,e=c.xAxis[0],f=c.yAxis[0],g=c.logic,h=g.tooltipSepChar,t=g.numberFormatter,l=d.dataObj,r,k,m,s,q;if(d.draged){d.lastX+=d.origX;d.lastY+=d.origY;r=l._xPos+d.lastX;k=l._yPos+d.lastY;m=d.startConnectors;
s=m.length;for(q=0;q<s;q+=1)m[q].updateFromPos(r,k);m=d.endConnectors;s=m.length;for(q=0;q<s;q+=1)m[q].updateToPos(r,k);a.label&&a.label.attr(d._transformObj);a.image&&a.image.attr(d._transformObj);a.graphic&&a.graphic.attr(d._transformObj);e=e.getAxisPosition(r,1);f=f.getAxisPosition(k,1);l._isUserTooltip||l.toolText===z||(l.toolText=l._toolTextStr+t.dataLabels(e)+h+t.dataLabels(f));t=this.data("eventArgs");l.x=t.x=e;l.y=t.y=f;h=fc(c.container,b);h.sourceEvent="dataplotdragend";u.raiseEvent("chartupdated",
H(h,t),c.logic.chartInstance);ta.call(this,c,b,"dataplotdragend");b={hcJSON:{series:[]}};b.hcJSON.series[d.datasetIndex]={data:[]};b.hcJSON.series[d.datasetIndex].data[d.pointIndex]={_options:{x:e,y:f},x:e,y:f,toolText:l.toolText,displayValue:l.displayValue};H(g.chartInstance.jsVars._reflowData,b,!0)}a.cloneGroup&&a.cloneGroup.hide()}},q["renderer.cartesian"]);q("renderer.dragcolumn2d",{drawTracker:function(b,d,a){var c=this.paper,e=this.yAxis[0],f=b.data[a],g=e.getAxisPosition(f.y),h=b.items[a],
t=this.layers.tracker,l=h&&h.dragTracker||null,r=this.dragStart,k=this.dragUp,m=this.dragMove,s={stroke:ra,"stroke-width":ob?40:10,ishot:!0,cursor:Sa&&"ns-resize"||"n-resize"},q=e&&e.axisData&&e.axisData.plotLines,u=this._yAxisPlotLines||(this._yAxisPlotLines=[]),v=0,x,w;if(!u.length)for(x=q.length;v<x;v+=1)w=q[v],w.isGrid&&u.push(e.getAxisPosition(w.value));null!==f.y&&f.allowDrag&&(e=h.graphic.getBBox(),e=["M",e.x,g,"L",e.x+e.width,g,"Z"],l?l.animate({d:e}).attr(s):l=h.dragTracker=c.path(e,t).attr(s),
l.drag(m,r,k).data("drag-options",{items:h,yPos:g,chart:this,datasetIndex:b.index,pointIndex:a,dataOptions:d,dataObj:f}),h.dragTracker=l)},dragStart:function(){var b=this.data("drag-options"),d=b.chart,a=d.yAxis[0],c=a.max,a=a.min,e=this.getBBox();b.barH=b.items.graphic.getBBox().height;b.isAllPositive=0<c&&0<a;b.isAllPositiveZero=0<c&&0<=a;b.isAllNegative=0>c&&0>a;b.isAllNegativeZero=0>=c&&0>a;b.isPositiveNegative=0<c&&0>a;b.boundaryTop=d.canvasTop;b.boundaryBottom=d.canvasTop+d.canvasHeight;b.bBoxY=
e.y;b.bBoxY2=e.y2||e.y+e.height;b.startValue=b.dataObj.y;b.origX=b.lastX||(b.lastX=0);b.origY=b.lastY||(b.lastY=0);b.draged=!1},dragMove:function(b,d){var a=this.data("drag-options"),c=a.items,e=a.dataObj,f=a.chart,g=f.options.chart,h=f.yAxis[0],t=f.logic.numberFormatter,l=h.yBasePos,r=c.dataLabel,k={},m=a.bBoxY2+d,s=a.bBoxY+d,q=f.canvasBottom,u=e.allowNegDrag?q:l,v=f.canvasTop,x=parseFloat(e.borderWidth)||0,g=g.isCanvasBorder,w=a.isAllNegativeZero,y=a.isPositiveNegative,D=a.dataOptions;s<a.boundaryTop&&
(d=a.boundaryTop-a.bBoxY);m>u&&(d=u-a.bBoxY2);s=a._transformObj={transform:"t0,"+(a.origY+d)};a.draged||(m={dataIndex:a.pointIndex+1,datasetIndex:D.__i+1,startValue:a.startValue,datasetName:D.name},A.raiseEvent("dataplotDragStart",m,f.logic.chartInstance));m=a.yPos+d;m<=l?(k.y=m,k.height=l-m):(k.y=l,k.height=m-l);g&&!y&&(w?k.y-=k.y-(v-x/2):k.height=q-k.y+x/2);this.attr(s);c.graphic.animate(k);a.shapeAttr=k;c=a.value=ma(1E8*h.getAxisPosition(m,1))/1E8;t=t.dataLabels(c);bb.pointUpdate(e,t,c);r&&f.drawPlotColumnLabel(f.plots[a.datasetIndex],
a.dataOptions,a.pointIndex,void 0,m).attr("text",a.dataObj.displayValue);a.draged=!0;a.lastX=b;a.lastY=d},dragUp:function(){var b=this.data("drag-options"),d=b.chart,a=d.logic,c=!d.options.chart.doNotSnap,e=b.dataObj,f=b.dataOptions,g,h;b.draged&&(g=b.yPos+b.lastY,c&&(h=bb.snapPoint(d,e,g),h-g&&d.dragMove.call(this,0,h-b.yPos)),b.yPos=h,b.lastX+=b.origX,b.lastY+=b.origY,c={dataIndex:b.pointIndex+1,datasetIndex:f.__i+1,startValue:b.startValue,endValue:b.dataObj.y=b.value,datasetName:f.name},f=[d.logic.chartInstance.id,
c.dataIndex,c.datasetIndex,c.datsetName,c.startValue,c.endValue],A.raiseEvent("dataplotDragEnd",c,d.logic.chartInstance),u.raiseEvent("chartupdated",c,d.logic.chartInstance,f),c={hcJSON:{series:[]}},c.hcJSON.series[b.datasetIndex]={data:[]},b.items.tracker.attr(b.shapeAttr).tooltip(e.toolText),c.hcJSON.series[b.datasetIndex].data[b.pointIndex]={y:b.value,toolText:e.toolText,displayValue:e.displayValue},bb.setMinMaxValue(d),H(a.chartInstance.jsVars._reflowData,c,!0))}},q["renderer.cartesian"]);q("renderer.dragline",
{drawTracker:function(b,d,a){var c=this.paper,e=this.yAxis[0],f=this.xAxis[0],g=b.data[a],h=b.items[a],t=ob?20:Ya(g.marker&&g.marker.radius||0,5),l=this.layers.tracker,r=h.tracker||null,k=this.dragStart,m=this.dragUp,s=this.dragMove,q={fill:ra,"stroke-width":0,cursor:Sa&&"ns-resize"||"n-resize"},u=e&&e.axisData&&e.axisData.plotLines,v=this._yAxisPlotLines||(this._yAxisPlotLines=[]),x=0,w,y;if(!v.length)for(w=u.length;x<w;x+=1)y=u[x],y.isGrid&&v.push(e.getAxisPosition(y.value));null!==g.y&&g.allowDrag&&
(f=f.getAxisPosition(a),e=e.getAxisPosition(g.y),r||(r=h.tracker=c.circle(f,e,t,l).attr(q)),r.attr({cursor:Sa&&"ns-resize"||"n-resize",ishot:!0}).drag(s,k,m).data("drag-options",{items:b.items,yPos:e,chart:this,datasetIndex:b.index,pointIndex:a,dataOptions:d,dataObj:g}))},dragStart:function(){var b=this.data("drag-options"),d=b.items,a=b.pointIndex,c=d[a+1],d=d[a],c=b.nextGraph=c&&c.connector,d=b.currGraph=d&&d.connector,a=b.chart;b._origY=b._lastY||(b._lastY=0);b.boundaryTop=a.canvasTop;b.boundaryBottom=
a.canvasTop+a.canvasHeight;b.currPath=d&&d.attr("path");b.nextPath=c&&c.attr("path");b.startValue=b.dataObj.y;b.origY=this.attr("cy");b.origX=this.attr("cx");b.draged=!1},dragMove:function(b,d){var a=this.data("drag-options"),c=a.items[a.pointIndex],e=a.nextPath,f=a.currPath,g=a.dataObj,h=a.chart,t=h.elements.plots[a.datasetIndex],l=h.yAxis[0],r=h.logic.numberFormatter,k=l.yBasePos,m=c.dataLabel,s=g.allowNegDrag?a.boundaryBottom:k,q=a.dataOptions,k=a.origY+d;a.draged||(q={dataIndex:a.pointIndex+1,
datasetIndex:q.__i+1,startValue:a.startValue,datasetName:q.name},A.raiseEvent("dataplotDragStart",q,h.logic.chartInstance));k<a.boundaryTop&&(d=a.boundaryTop-a.origY);k>s&&(d=s-a.origY);k=a.origY+d;this.animate({cy:k});c.graphic&&c.graphic.attr("transform","t0,"+(a._origY+d));e&&e[0]&&a.nextGraph&&(Sa?e[0][2]=k:e[2]=k,a.nextGraph.animate({path:e}));f&&f[1]&&a.currGraph&&(Sa?f[1][2]=k:f[5]=k,a.currGraph.animate({path:f}));c=g.y=a.value=ma(1E8*l.getAxisPosition(k,1))/1E8;r=r.dataLabels(c);bb.pointUpdate(g,
r,c);m&&h.drawPlotLineLabel(h.plots[a.datasetIndex],a.dataOptions,a.pointIndex,a.origX,k).attr("text",g.displayValue);a.draged=!0;a.lastY=d;h.getAreaPath&&t.graphic&&t.graphic.attr({path:h.getAreaPath(t.data)})},dragUp:function(){var b=this.data("drag-options"),d=b.chart,a=d.logic,c=!d.options.chart.doNotSnap,e=b.dataObj,f=b.dataOptions,g,h;b.draged&&(g=b.yPos+b.lastY,c&&(h=bb.snapPoint(d,e,g),h-g&&d.dragMove.call(this,0,h-b.yPos)),b.yPos=h,b._lastY=b.lastY+b._origY,b.lastY+=b.origY,f={dataIndex:b.pointIndex+
1,datasetIndex:f.__i+1,startValue:b.startValue,endValue:b.dataObj.y=b.value,datasetName:f.name},c=[d.logic.chartInstance.id,f.dataIndex,f.datasetIndex,f.datasetName,f.startValue,f.endValue],A.raiseEvent("dataplotDragEnd",f,d.logic.chartInstance),u.raiseEvent("chartupdated",f,d.logic.chartInstance,c),c={hcJSON:{series:[]}},c.hcJSON.series[b.datasetIndex]={data:[]},c.hcJSON.series[b.datasetIndex].data[b.pointIndex]={y:b.value,toolText:e.toolText,displayValue:e.displayValue},b.items[b.pointIndex].tracker.tooltip(e.toolText),
bb.setMinMaxValue(d),H(a.chartInstance.jsVars._reflowData,c,!0))}},q["renderer.cartesian"]);q("renderer.dragarea",{getAreaPath:function(b){for(var d=this.xAxis[0],a=this.yAxis[0],c=a.yBasePos,e=b.length,f=0,g=[],h=[],t=[],l=!0,r,k,m;f<e;f+=1)k=b[f],t[f]=d.getAxisPosition(f),h[f]=null,null!==k.y&&(h[f]=a.getAxisPosition(k.y),m=b[f-1]?b[f-1].y:null,k=b[f+1]?b[f+1].y:null,null!==m?(l?(g.push("M",t[f-1],c,"L",t[f-1],h[f-1],"L",t[f],h[f]),r=f-1):g.push("L",t[f],h[f]),null===k&&g.push("L",t[f],c,"L",t[r],
c),l=!1):l=!0);return g}},q["renderer.dragline"]);q("renderer.heatmap",{drawPlotHeatmap:function(b,d){var a=this,c=b.data,e=b.items,f=b.graphics=b.graphics||[],h=a.paper,n=a.layers,t=a.options,l=t.chart,r=l.showHoverEffect,k=!1!==(t.tooltip||{}).enabled,m=t.plotOptions.series,t=a.xAxis[d.xAxis||0],s=a.yAxis[d.yAxis||0],m=isNaN(+m.animation)&&m.animation.duration||1E3*m.animation,q=!1===d.visible?"hidden":"visible",u,v,x=t.getAxisPosition(0),w=t.getAxisPosition(1),y=s.getAxisPosition(0),D=s.getAxisPosition(1),
x=w-x,y=y-D,l=g(l.useRoundEdges,0),D=d.borderColor,w=d.borderWidth,z=d.dashStyle,B=x/2,E=y/2,A=n.dataset=n.dataset||h.group("dataset-orphan"),S=n.datalabels=n.datalabels||h.group("datalables").insertAfter(A),n=n.tracker,K=a.chartWidth,F=a.chartHeight,H=function(b){ta.call(this,a,b)},J=function(b){ta.call(this,a,b,"DataPlotRollOver")},M=function(b){ta.call(this,a,b,"DataPlotRollOut")},I=function(a,b){return function(){a.attr({fill:ea(b)})}},L,W,O,N,P,X,R,V,U;m&&(S.attr({transform:"t"+K+","+F}),a.animationCompleteQueue.push({fn:function(){S.attr({transform:"t0,0"})},
scope:this}));K=0;for(F=c.length;K<F;K++){N=c[K];W=N.y;L=null;if(null!==W){P=N.link;X=N.toolText||N.tooltext;L=ea(N.setColor||N.color);v=(u=N.visible)&&!1===u?"hiddden":q;R=g(N.x,K);R=t.getAxisPosition(R)-B;U=s.getAxisPosition(W);V=U+E;W={link:P,value:N.value,columnId:N.columnId,rowId:N.rowId,displayValue:N.displayValue,tlLabel:N.tlLabel,trLabel:N.trLabel,blLabel:N.blLabel,brLabel:N.brLabel,toolText:X,id:b.userID,datasetIndex:b.index,datasetName:b.name,visible:b.visible};L=h.rect(R,U,x,y,l,A).attr({fill:L,
stroke:D,"stroke-width":w,"stroke-dasharray":z,"stroke-linejoin":"miter","shape-rendering":0===l?"crisp":"",cursor:P?"pointer":"",opacity:m?0:N.setAlpha&&+N.setAlpha/100||1}).crisp().attr({visibility:v});m&&L.animate({opacity:N.setAlpha&&+N.setAlpha/100||1},m,"normal",a.getAnimationCompleteFn());if(r||k||P)O=h.rect(R,U,x,y,l,n).attr({cursor:P?"pointer":"",stroke:ra,"stroke-width":w,fill:ra,ishot:!0}).data("eventArgs",W);(O||L).click(H).hover(J,M).tooltip(X);1===r&&L&&O&&O.hover(I(L,N.hoverColor),
I(L,N.setColor||N.color));e[K]={index:K,value:N.value,graphic:L,tracker:O,dataLabel:null,dataLabels:[],visible:u||"hidden"!==v};u=a.drawLabelHeatmap.call(a,b,d,K);L&&f.push(L);O&&f.push(O);v=0;for(N=u.length;v<N;v++)!e[K].dataLabels&&(e[K].dataLabels=[]),u[v]&&f.push(u[v]),e[K].dataLabels.push(u[v])}a.drawTracker&&a.drawTracker.call(a,b,K,R,V)}b.visible=!1!==d.visible;return b},drawLabelHeatmap:function(b,d,a){var c=b.items[a],e=b.data[a];b=this.paper;a=this.layers.datalabels;var f=this.options.plotOptions.series.dataLabels,
g=f.style;d=!1===d.visible?"hidden":Cb;var h=e.displayValue,t=e.tlLabel,l=e.trLabel,r=e.blLabel,e=e.brLabel,k=f.tlLabelStyle,m=f.trLabelStyle,s=f.blLabelStyle,f=f.brLabelStyle,q={fontFamily:k.fontFamily,fontSize:k.fontSize,lineHeight:k.lineHeight,fontWeight:k.fontWeight,fontStyle:k.fontStyle},u={fontFamily:m.fontFamily,fontSize:m.fontSize,lineHeight:m.lineHeight,fontWeight:m.fontWeight,fontStyle:m.fontStyle},v={fontFamily:s.fontFamily,fontSize:s.fontSize,lineHeight:s.lineHeight,fontWeight:s.fontWeight,
fontStyle:s.fontStyle},x={fontFamily:f.fontFamily,fontSize:f.fontSize,lineHeight:f.lineHeight,fontWeight:f.fontWeight,fontStyle:f.fontStyle},w=c.tlLabel,y=c.trLabel,D=c.blLabel,B=c.brLabel,A=this.smartLabel,E=c.dataLabel,F=[],S={fontFamily:g.fontFamily,fontSize:g.fontSize,lineHeight:g.lineHeight,fontWeight:g.fontWeight,fontStyle:g.fontStyle},K,H,J,I,M,P,L,W;I=c.graphic.getBBox();K=I.width;H=I.height;J=I.x;I=I.y;A.setStyle(g);V(h)&&h!==z&&(L=A.getSmartText(h,K,H,!1),h=L.text,E||(E=c.dataLabel=b.text(a)),
E.attr({text:h,title:L.tooltext||"",visibility:d,fill:g.color,x:J+.5*K,y:I+.5*H,"text-bound":[g.backgroundColor,g.borderColor,g.borderThickness,g.borderPadding,g.borderRadius,g.borderDash]}).css(S),F.push(E));h=V(t)&&t!==z;S=V(l)&&l!==z;M=V(r)&&r!==z;P=V(e)&&e!==z;g=K*(h&&S?.5:.9);E=.5*(H-(L&&L.height||0));W=I+4;h&&(A.setStyle(k),L=A.getSmartText(t,g,E,!1),h=L.text,t=J,w||(w=c.tlLabel=b.text(a)),w.attr({text:h,title:L.tooltext||"",visibility:d,fill:k.color,"text-anchor":"start","vertical-align":Ca,
x:t+4,y:W,"text-bound":[k.backgroundColor,k.borderColor,k.borderThickness,k.borderPadding,k.borderRadius,k.borderDash]}).css(q),a.appendChild(w),F.push(w));S&&(A.setStyle(m),L=A.getSmartText(l,g,E,!1),h=L.text,t=J+K,y||(y=c.trLabel=b.text(a)),y.attr({text:h,title:L.tooltext||"",visibility:d,fill:m.color,"text-anchor":"end","vertical-align":Ca,x:t-4,y:W,"text-bound":[m.backgroundColor,m.borderColor,m.borderThickness,m.borderPadding,m.borderRadius,m.borderDash]}).css(u),a.appendChild(y),F.push(y));
W=I+H-4;M&&(A.setStyle(s),L=A.getSmartText(r,g,E,!1),h=L.text,t=J,D||(D=c.blLabel=b.text(a)),D.attr({text:h,title:L.tooltext||"",visibility:d,fill:s.color,"text-anchor":"start","vertical-align":Da,x:t+4,y:W,"text-bound":[s.backgroundColor,s.borderColor,s.borderThickness,s.borderPadding,s.borderRadius,s.borderDash]}).css(v),F.push(D));P&&(A.setStyle(s),L=A.getSmartText(e,g,E,!1),h=L.text,t=J+K-4,B||(B=c.brLabel=b.text(a)),B.attr({text:h,title:L.tooltext||"",visibility:d,fill:f.color,"text-anchor":"end",
"vertical-align":Da,x:t,y:W,"text-bound":[f.backgroundColor,f.borderColor,f.borderThickness,f.borderPadding,f.borderRadius,f.borderDash]}).css(x),a.appendChild(B),F.push(B));return F},setScaleRange:function(b,d){var a=this.logic,c=this.plots[0],e={visibility:"visible"},f={visibility:"hidden"},g={hcJSON:{series:[{}]}},h=g.hcJSON.series[0],t=h.data||(h.data=[]),l=a.chartInstance.jsVars._reflowData,r=c.items,k,m,s,q,u,v,x,w=function(a){a.attr(v)};setTimeout(function(){var a,c;a=0;for(c=r.length;a<c;a++)k=
r[a],m=k.value,s=k.graphic,u=t[a]||(t[a]={}),q=k.dataLabels,v=(x=m>=b&&m<=d)?e:f,s.attr(v),ib(q,w),u.visible=x;H(l,g,!0)},100)}},q["renderer.cartesian"]);q("renderer.radar",{createRadarAxis:function(){var b=this.options,d=this.canvasLeft+this.canvasWidth/2,a=this.canvasTop+this.canvasHeight/2,c=b.xAxis,e=b.yAxis instanceof Array?b.yAxis[0]:b.yAxis,f=c.max-c.min+1,g=P(e.max-e.min),b=V(b.chart.axisRadius)?b.chart.axisRadius:J(d,a),h,t=Pa.PI/2,l={};0>b&&(b=J(d,a));h=2*Pa.PI/f;l.yTrans=b/g;l.xTrans=h;
l.yRange=g;l.startAngle=t;l.yMin=e.min;l.centerX=d;l.centerY=a;l.radius=b;l.categories=[];l.catLength=f;l.yAxis=e;l.xAxis=c;return this.radarAxis=l},drawRadarAxis:function(){var b=this.radarAxis,d=b.catLength,a=b.xAxis,c=b.yAxis,e=c.min,f=c.plotLines,p=f.length,n=a.plotLines,t=b.xTrans,l=b.yTrans,r=b.radius,k=b.startAngle,m=this.canvasLeft+this.canvasWidth/2,s=this.canvasTop+this.canvasHeight/2,q=this.paper,u=this.layers,v=u.dataset=u.dataset||q.group("orphan-dataset").trackTooltip(!0),x=u.layerBelowDataset=
u.layerBelowDataset||q.group("axisbottom").trackTooltip(!0),w=u.layerAboveDataset=u.layerAboveDataset||q.group("axistop").trackTooltip(!0),y=u.axisLines=u.axisLines||q.group("axis-lines",x),D=u.axisLabels=u.axisLabels||q.group("axis-labels",x),z=c.labels,c=2*Pa.PI,B=Pa.PI/2,E=Pa.PI+B,A=!1!==(this.options.tooltip||{}).enabled,F=["right","center","left"],K=a.labels,H=g(.9*parseInt(K.style&&K.style.fontSize,10),9)/2,K=r+K.labelPadding,J=[],I=["M"],M=[],V=this.logic.smartLabel,L,W,O,N,Q,X;x.insertBefore(v);
w.insertAfter(v);b.divline=[];for(Q=0;Q<p;Q+=1){M[Q]=["M"];x=!0;v=d;L=f[Q];X=L.tooltext;for(W=L.value;v--;)z=P(W-e)*l,O=m+z*xa(-(k+v*t)),N=s+z*$a(-(k+v*t)),M[Q].splice(M[Q].length,0,O,N),x&&(M[Q].push("L"),x=!1),0===v&&L.label&&(z=L.label,((w=z.text)||0===w)&&q.text(D).attr({text:w,x:O,y:N,"text-anchor":"right"===z.textAlign?"end":"left"===z.textAlign?"start":"middle","vertical-align":z.verticalAlign,rotation:z.rotation}).css(z.style));M[Q].push("Z");b.divline[Q]=q.path(M[Q],y).attr({stroke:L.color,
"stroke-width":L.width});A&&X&&q.path({stroke:ra,"stroke-width":Ya(L.width,dc),ishot:!0,path:M[Q]},u.tracker).toBack().tooltip(X)}x=!0;for(v=n.length;v--;)if(L=n[v],W=L.value,A=k+W*t,d=A%c,O=m+r*xa(-A),N=s+r*$a(-A),J.splice(J.length,0,"M",m,s,"L",O,N),I.splice(I.length,0,O,N),x&&(I.push("L"),x=!1),L.label&&(z=L.label,(w=z.text)||0===w)){f=d>B&&d<E?0:d==B||d==E?1:2;d=z.style;e={fontFamily:d.fontFamily,fontSize:d.fontSize,lineHeight:d.lineHeight,fontWeight:d.fontWeight,fontStyle:d.fontStyle};V.setStyle(e);
f="right"===F[f]?"end":"left"===F[f]?"start":"middle";p=m+K*xa(-A);l=s+K*$a(-A);L=parseInt(e.lineHeight,10);M=z.verticalAlign;switch(f){case "start":u=this.canvasLeft+this.canvasWidth-p;A=n[v-1];A=k+A.value*t;A=s+K*$a(-A)+H*$a(-A)+H;M=n[v+1===n.length?0:v+1];M=k+M.value*t;M=s+K*$a(-M)+H*$a(-M)+H;L=.5*(A-l)+.5*(l-M);M="middle";break;case "end":u=p-this.canvasLeft;A=n[v+1];A=k+A.value*t;A=s+K*$a(-A)+H*$a(-A)+H;M=n[v-1];M=k+M.value*t;M=s+K*$a(-M)+H*$a(-M)+H;L=.5*(A-l)+.5*(l-M);M="middle";break;default:u=
this.canvasWidth,l+=H*$a(-A)+H}w=V.getSmartText(w,u,L).text;q.text(D).attr({text:w,x:p,y:l,"text-anchor":f,"vertical-align":M,rotation:z.rotation,"text-bound":[d.backgroundColor,d.borderColor,d.borderThickness,d.borderPadding,d.borderRadius,d.borderDash]}).css(e)}I.push("Z");b.spikeGraph=q.path(J,y).attr({stroke:a.gridLineColor,"stroke-width":h(a.gridLineWidth,1)});a.showRadarBorder&&(b.borderGraph=q.path(I,y).toBack().attr({stroke:a.radarBorderColor,"stroke-width":h(a.radarBorderThickness,2),fill:a.radarFillColor}))},
drawPlotRadar:function(b,d){var a=this,c=a.paper,e=a.layers,f=e.dataset=e.dataset||c.group("orphan-dataset"),h=e.datalabels=e.datalabels||c.group("datalabels").insertAfter(f),n=e.tracker=e.tracker||c.group("hot").insertAfter(f),t=a.options,l=t.chart.anchorTrackingRadius,r=t.plotOptions.series,k=[],m=b.items||{},s=b.graphics=b.graphics||[],e=a.radarAxis,u=d.data||[],v=u.length,y,x,w=!1===d.visible,z=w?"hidden":"visible",r=isNaN(+r.animation)&&r.animation.duration||1E3*r.animation,D,A,B=!1!==(t.tooltip||
{}).enabled,E,H,F,K,I=f.radarGroup=f.radarGroup||c.group("connectors",f),J=f.marker=f.marker||c.group("anchors",f),Q=n.trackers=n.trackers||c.group("trackers",n),M=a.chartWidth,V=a.chartHeight,f=[],L,W,O,N,Y,X,R,ba,U,Z,da,fa,ha,aa,ja,ma,ka=(t=t.cursor)&&{cursor:t},na=q["renderer.cartesian"],oa,pa,qa;void 0===a.radarAxis&&(e=a.radarAxis=a.createRadarAxis(d),a.drawRadarAxis(d));D=e.yTrans;E=e.yMin;H=e.startAngle;A=e.xTrans;y=e.centerX;x=e.centerY;1<=v&&(X=[],ib(u,function(e,f){U=null;f?2>f&&X.push("L"):
X.push("M");m[f]=oa=k[f]={chart:a,index:f,value:e.y};if(null===e.y)X.push(y,x);else{R=Z=null;da=e.link;fa=e.tooltext||e.toolText;F=y+D*P(e.y-E)*xa(-(H+f*A));K=x+D*P(e.y-E)*$a(-(H+f*A));if(R=e.anchorElem)Y=g(R.attr("r"),W.radius),R.attr({x:F,y:K,r:Y});else if(W=e.marker,qa={index:f,link:da,value:e.y,displayValue:e.displayValue,categoryLabel:e.categoryLabel,toolText:fa,id:b.userID,datasetIndex:b.index,datasetName:b.name,visible:b.visible},W&&W.enabled)if(O=W.radius,ha=W.shadow,L=W.symbol.split("_"),
N="spoke"===L[0]?1:0,ja=ma={},aa=e.rolloverProperties,W.imageUrl)pa=new Qa.Image,pa.onload=function(e,f,g,h,k,l,p,m){return function(){var r=g.imageUrl,q=g.imageScale,t=g.imageAlpha,u=p.imageHoverAlpha,v=p.imageHoverScale,w=this.width*q*.01,x=this.width*v*.01;ja={x:e-this.width*q*.005,y:f-this.height*q*.005,width:w,height:this.height*q*.01,alpha:t};ma={x:e-this.width*v*.005,y:f-this.height*v*.005,width:x,height:this.height*v*.01,alpha:u};u=x>w?ma:ja;(h.graphic=R=c.image(r,J).attr(ja).css({opacity:.01*
t}).data("alwaysInvisible",0===q).data("setRolloverProperties",p).data("setRolloverAttr",ma).data("setRolloutAttr",ja).data("anchorRadius",q).data("anchorHoverRadius",v))&&s.push(R);if(da||B||p)Z=h.tracker=c.rect(n).attr(u).attr({cursor:da?"pointer":"",stroke:ra,"stroke-width":g.lineWidth,fill:ra,ishot:!0,visibility:z}).data("eventArgs",k).click(function(b){ta.call(this,a,b)}).hover(function(b){return function(c){na.hoverPlotAnchor(this,c,"DataPlotRollOver",b,a)}}(h),function(b){return function(c){na.hoverPlotAnchor(this,
c,"DataPlotRollOut",b,a)}}(h)).tooltip(l);(U=h.dataLabel=na.drawPlotLineLabel.call(a,b,d,m,e,f))&&s.push(U)}}(F,K,W,oa,qa,fa,aa,f),pa.onerror=function(c,e,f,g,h,k,l,p){return function(){(U=g.dataLabel=na.drawPlotLineLabel.call(a,b,d,p,c,e))&&s.push(U)}}(F,K,W,oa,qa,fa,aa,f),pa.src=W.imageUrl;else{aa&&(ja={polypath:[L[1]||2,F,K,O,W.startAngle,N],fill:ea(W.fillColor),"stroke-width":W.lineWidth,stroke:ea(W.lineColor)},ma={polypath:[aa.sides||2,F,K,aa.radius,aa.startAngle,aa.dip],fill:ea(aa.fillColor),
"stroke-width":aa.lineWidth,stroke:ea(aa.lineColor)});R=oa.graphic=c.polypath(L[1]||2,F,K,O,W.startAngle,null,J).attr({fill:ea(W.fillColor),"stroke-width":W.lineWidth,stroke:ea(W.lineColor),cursor:da?"pointer":"","stroke-linecap":"round","stroke-linejoin":"round",ishot:!0,visibility:0===O?"hidden":z}).data("alwaysInvisible",0===O).data("setRolloverProperties",aa).data("setRolloverAttr",ma).data("setRolloutAttr",ja).data("anchorRadius",O).data("anchorHoverRadius",aa&&aa.radius).shadow(ha);e.anchorElem=
R;if(da||B||aa)(Z=e.trackerElem)?(Y=g(Z.attr("r"),W.radius+1),Z.attr({x:F,y:K,r:Y})):(L||(L=W.symbol.split("_")),O=Ya(O,l,aa&&aa.radius||0),Z=c.circle(F,K,O,Q).attr({cursor:e.link?"pointer":"",stroke:ra,"stroke-width":1,fill:ra,ishot:!0,visibility:z}).css(ka)),e.trackerElem=Z;(Z=Z||R)&&Z.data("eventArgs",qa).click(function(b){ta.call(this,a,b)}).hover(function(b){return function(c){na.hoverPlotAnchor(this,c,"DataPlotRollOver",b,a)}}(oa),function(b){return function(c){na.hoverPlotAnchor(this,c,"DataPlotRollOut",
b,a)}}(oa)).tooltip(fa)}X.push(F,K);oa.dataLabel=U;oa.tracker=Z;W&&W.imageUrl||(U=na.drawPlotLineLabel.call(a,b,d,f,F,K));R&&s.push(R);U&&s.push(U);Z&&s.push(Z)}}),X.push("Z"),f=f.concat(X));f&&0<f.length&&(ba=b.graphic=c.path(f,I).attr({stroke:ea(d.lineColor.FCcolor),fill:ea(d.fillColor.FCcolor),"stroke-width":d.lineWidth,visibility:z}));r&&(a.animationCompleteQueue.push({fn:function(){J.show();h.attr({transform:"...t"+-M+","+-V})},scope:a}),J.hide(),h.attr({transform:"...t"+M+","+V}),I.scale(.01,
.01,y,x).animate({transform:"s1,1"},r,"normal",a.getAnimationCompleteFn()));ba&&s.push(ba);b.visible=!w},legendClick:function(b){q["renderer.cartesian"].legendClick.call(this,b)},getEventArgs:function(b){return q["renderer.cartesian"].getEventArgs.call(this,b)}},q["renderer.root"]);q("renderer.multiLevelPie",{drawPlotMultilevelpie:function(b,d){var a=this,c=b.items,e=b.data,f=a.options,h=f.plotOptions.series,n=a.layers,q=h.animation,l=h.dataLabels.style,r=h.shadow,k=g(b.moveDuration,q.duration,0),
m=h.borderWidth,s=h.borderColor,u=a.paper,f=(f=f.tooltip||{},!1!==f.enabled),v=(d.startAngle||0)%uc,y=uc/(d.valueTotal||100),x=a.canvasLeft+.5*a.canvasWidth,w=a.canvasTop+.5*a.canvasHeight,z,D,A,B,E,F,H,K,I,P,Q;D=J(a.canvasWidth,a.canvasHeight);var M,V=n.dataset,L=q.mainItem,W=q.animObj,O=function(b){ta.call(this.graphic,a,b,"DataPlotRollOver");h.point.events.mouseOver.call(this)},N=function(b){ta.call(this.graphic,a,b,"DataPlotRollOut");h.point.events.mouseOut.call(this)},Y=function(b){ta.call(this.graphic,
a,b,"DataPlotRollOver");h.point.events.mouseOver.call(this)},X=function(b){ta.call(this.graphic,a,b,"DataPlotRollOut");h.point.events.mouseOut.call(this)},R=function(){a.placeDataLabels(!1,c,b,d)};z=.5*(/%$/.test(d.size)?D*parseInt(d.size,10)/100:d.size);D=.5*(/%$/.test(d.innerSize)?D*parseInt(d.innerSize,10)/100:d.innerSize);d.metrics=[x,w,2*z,2*D];e&&e.length||(e=[]);M=n.datalabels||(n.datalabels=u.group("datalabels").insertAfter(V));P=I=v;for(Q=e.length;Q--;)B=e[Q],E=B.y,F=B.displayValue,n=B.toolText,
H=!!B.link,null!==E&&void 0!==E&&(P=I,I-=E*y,K=.5*(I+P),(A=c[Q])||(A=c[Q]={chart:a,link:B.link,value:E,angle:K,color:B.color,prevPointIndex:B.prevPointIndex,prevSeriesIndex:B.prevSeriesIndex,labelText:F,graphic:u.ringpath(x,w,z,D,v,v,V).attr({"stroke-width":B.borderWidth||m,stroke:B.borderColor||s,fill:ea(B.color),"stroke-dasharray":B.dashStyle,ishot:H,cursor:H?"pointer":""}).shadow(r&&!!B.shadow)},B={link:B.link,label:B.displayValue,toolText:B.toolText},A.graphic.mouseover(O,A),A.graphic.mouseout(N,
A),A.graphic.mouseup(a.plotMouseUp),A.graphic.data("plotItem",A),A.graphic.data("eventArgs",B),f&&A.graphic.tooltip(n),void 0!==F&&(A.dataLabel=u.text(M).css(l).attr({text:F,fill:l.color||"#000000",visibility:"hidden",ishot:H,cursor:H?"pointer":""}).mouseover(Y,A).mouseout(X,A).mouseup(a.plotMouseUp).data("plotItem",A).data("eventArgs",B),f&&A.dataLabel.tooltip(n))),k?L?A.graphic.animateWith(L,W,{ringpath:[x,w,z,D,I,P]},k,"easeIn",!Q&&R):(W=q.animObj=Z.animation({ringpath:[x,w,z,D,I,P]},k,"easeIn",
!Q&&R),L=q.mainItem=A.graphic.animate(W)):(A.graphic.attr({ringpath:[x,w,z,D,I,P]}),!Q&&R&&R()))},plotMouseUp:function(b){var d=this.data("plotItem");ta.call(this,d.chart,b)}},q["renderer.piebase"]);Z.addSymbol({resizeIcon:function(b,d,a){var c=g(a,15)/3,e=[];0>c&&(c=-c,a=-a,b+=a-c/2,d+=a-c/2);for(a=3;0<a;a-=1)e.push("M",b-c*a,d-3,"L",b-3,d-c*a);return e},closeIcon:function(b,d,a){var c=1.3*a,e=43*ba,f=48*ba,g=b+c*xa(e),e=d+c*$a(e),h=b+c*xa(f),q=d+c*$a(f),f=.71*(a-2);a=.71*(a-2);c=["A",c,c,0,1,0,
h,q];g=["M",g,e];g=g.concat(c);return g=g.concat(["M",b+f,d-a,"L",b-f,d+a,"M",b-f,d-a,"L",b+f,d+a])},configureIcon:function(b,d,a){a-=1;var c=.71*a,e=.71*(a+2),f=b-a,g=d-a,h=b+a;a=d+a;var q=b+.5,l=d+.5,r=b-.5,k=d-.5,m=f-2,s=g-2,u=h+2,v=a+2,y=b+c,x=d+c,w=b-c,c=d-c,z=b+e,A=d+e;b-=e;d-=e;return["M",f,l,"L",m,l,m,k,f,k,w-.25,c+.25,b-.25,d+.25,b+.25,d-.25,w+.25,c-.25,r,g,r,s,q,s,q,g,y-.25,c-.25,z-.25,d-.25,z+.25,d+.25,y+.25,c+.25,h,k,u,k,u,l,h,l,y+.25,x-.25,z+.25,A-.25,z-.25,A+.25,y-.25,x+.25,q,a,q,v,
r,v,r,a,w+.25,x+.25,b+.25,A+.25,b-.25,A-.25,w-.25,x-.25,"Z"]},axisIcon:function(b,d,a){a-=1;var c=.33*a,e=a/2,f=b-a,g=d-a,h=b+e;a=d+a;b-=e;e=d+c;d-=c;return["M",f,g,"L",h,g,h,a,f,a,"M",b,e,"L",h,e,"M",b,d,"L",h,d]},loggerIcon:function(b,d,a){a-=1;b-=a;d-=a;var c=b+2*a,e=b+2,f=c-2,g=d+2;a=g+a;var h=a+2;return["M",b,d,"L",c,d,c,g,f,g,f,a,c,a,c,h,b,h,b,a,e,a,e,g,b,g,b,d]}})},[3,2,1,"release"]]);
