(function(p){"object"===typeof module&&module.exports?module.exports=p:p(Highcharts)})(function(p){function P(a,b,c){this.init(a,b,c)}var U=p.arrayMin,V=p.arrayMax,x=p.each,M=p.extend,J=p.isNumber,y=p.merge,W=p.map,q=p.pick,E=p.pInt,K=p.correctFloat,s=p.getOptions().plotOptions,k=p.seriesTypes,v=p.extendClass,Q=p.splat,z=p.wrap,R=p.Axis,C=p.Tick,L=p.Point,X=p.Pointer,Y=p.CenteredSeriesMixin,F=p.TrackerMixin,A=p.Series,B=Math,I=B.round,G=B.floor,S=B.max,Z=p.Color,w=function(){};M(P.prototype,{init:function(a,
b,c){var d=this,g=d.defaultOptions;d.chart=b;d.options=a=y(g,b.angular?{background:{}}:void 0,a);(a=a.background)&&x([].concat(Q(a)).reverse(),function(a){var b=a.backgroundColor,g=c.userOptions;a=y(d.defaultBackgroundOptions,a);b&&(a.backgroundColor=b);a.color=a.backgroundColor;c.options.plotBands.unshift(a);g.plotBands=g.plotBands||[];g.plotBands!==c.options.plotBands&&g.plotBands.unshift(a)})},defaultOptions:{center:["50%","50%"],size:"85%",startAngle:0},defaultBackgroundOptions:{shape:"circle",
borderWidth:1,borderColor:"silver",backgroundColor:{linearGradient:{x1:0,y1:0,x2:0,y2:1},stops:[[0,"#FFF"],[1,"#DDD"]]},from:-Number.MAX_VALUE,innerRadius:0,to:Number.MAX_VALUE,outerRadius:"105%"}});var D=R.prototype,C=C.prototype,$={getOffset:w,redraw:function(){this.isDirty=!1},render:function(){this.isDirty=!1},setScale:w,setCategories:w,setTitle:w},T={isRadial:!0,defaultRadialGaugeOptions:{labels:{align:"center",x:0,y:null},minorGridLineWidth:0,minorTickInterval:"auto",minorTickLength:10,minorTickPosition:"inside",
minorTickWidth:1,tickLength:10,tickPosition:"inside",tickWidth:2,title:{rotation:0},zIndex:2},defaultRadialXOptions:{gridLineWidth:1,labels:{align:null,distance:15,x:0,y:null},maxPadding:0,minPadding:0,showLastLabel:!1,tickLength:0},defaultRadialYOptions:{gridLineInterpolation:"circle",labels:{align:"right",x:-3,y:-2},showLastLabel:!1,title:{x:4,text:null,rotation:90}},setOptions:function(a){a=this.options=y(this.defaultOptions,this.defaultRadialOptions,a);a.plotBands||(a.plotBands=[])},getOffset:function(){D.getOffset.call(this);
this.chart.axisOffset[this.side]=0;this.center=this.pane.center=Y.getCenter.call(this.pane)},getLinePath:function(a,b){var c=this.center,d,g=this.chart;d=q(b,c[2]/2-this.offset);this.isCircular||void 0!==b?c=this.chart.renderer.symbols.arc(this.left+c[0],this.top+c[1],d,d,{start:this.startAngleRad,end:this.endAngleRad,open:!0,innerR:0}):(d=this.postTranslate(this.angleRad,d),c=["M",c[0]+g.plotLeft,c[1]+g.plotTop,"L",d.x,d.y]);return c},setAxisTranslation:function(){D.setAxisTranslation.call(this);
this.center&&(this.transA=this.isCircular?(this.endAngleRad-this.startAngleRad)/(this.max-this.min||1):this.center[2]/2/(this.max-this.min||1),this.minPixelPadding=this.isXAxis?this.transA*this.minPointOffset:0)},beforeSetTickPositions:function(){(this.autoConnect=this.isCircular&&void 0===q(this.userMax,this.options.max)&&this.endAngleRad-this.startAngleRad===2*Math.PI)&&(this.max+=this.categories&&1||this.pointRange||this.closestPointRange||0)},setAxisSize:function(){D.setAxisSize.call(this);this.isRadial&&
(this.center=this.pane.center=p.CenteredSeriesMixin.getCenter.call(this.pane),this.isCircular&&(this.sector=this.endAngleRad-this.startAngleRad),this.len=this.width=this.height=this.center[2]*q(this.sector,1)/2)},getPosition:function(a,b){return this.postTranslate(this.isCircular?this.translate(a):this.angleRad,q(this.isCircular?b:this.translate(a),this.center[2]/2)-this.offset)},postTranslate:function(a,b){var c=this.chart,d=this.center;a=this.startAngleRad+a;return{x:c.plotLeft+d[0]+Math.cos(a)*
b,y:c.plotTop+d[1]+Math.sin(a)*b}},getPlotBandPath:function(a,b,c){var d=this.center,g=this.startAngleRad,e=d[2]/2,l=[q(c.outerRadius,"100%"),c.innerRadius,q(c.thickness,10)],n=Math.min(this.offset,0),h=/%$/,f,m=this.isCircular;"polygon"===this.options.gridLineInterpolation?d=this.getPlotLinePath(a).concat(this.getPlotLinePath(b,!0)):(a=Math.max(a,this.min),b=Math.min(b,this.max),m||(l[0]=this.translate(a),l[1]=this.translate(b)),l=W(l,function(a){h.test(a)&&(a=E(a,10)*e/100);return a}),"circle"!==
c.shape&&m?(a=g+this.translate(a),b=g+this.translate(b)):(a=-Math.PI/2,b=1.5*Math.PI,f=!0),l[0]-=n,l[2]-=n,d=this.chart.renderer.symbols.arc(this.left+d[0],this.top+d[1],l[0],l[0],{start:Math.min(a,b),end:Math.max(a,b),innerR:q(l[1],l[0]-l[2]),open:f}));return d},getPlotLinePath:function(a,b){var c=this,d=c.center,g=c.chart,e=c.getPosition(a),l,n,h;c.isCircular?h=["M",d[0]+g.plotLeft,d[1]+g.plotTop,"L",e.x,e.y]:"circle"===c.options.gridLineInterpolation?(a=c.translate(a))&&(h=c.getLinePath(0,a)):
(x(g.xAxis,function(a){a.pane===c.pane&&(l=a)}),h=[],a=c.translate(a),d=l.tickPositions,l.autoConnect&&(d=d.concat([d[0]])),b&&(d=[].concat(d).reverse()),x(d,function(e,b){n=l.getPosition(e,a);h.push(b?"L":"M",n.x,n.y)}));return h},getTitlePosition:function(){var a=this.center,b=this.chart,c=this.options.title;return{x:b.plotLeft+a[0]+(c.x||0),y:b.plotTop+a[1]-{high:0.5,middle:0.25,low:0}[c.align]*a[2]+(c.y||0)}}};z(D,"init",function(a,b,c){var d,g=b.angular,e=b.polar,l=c.isX,n=g&&l,h,f=b.options,
m=c.pane||0;if(g){if(M(this,n?$:T),h=!l)this.defaultRadialOptions=this.defaultRadialGaugeOptions}else e&&(M(this,T),this.defaultRadialOptions=(h=l)?this.defaultRadialXOptions:y(this.defaultYAxisOptions,this.defaultRadialYOptions));if(g||e)b.inverted=!1,f.chart.zoomType=null;a.call(this,b,c);n||!g&&!e||(a=this.options,b.panes||(b.panes=[]),this.pane=(d=b.panes[m]=b.panes[m]||new P(Q(f.pane)[m],b,this),b=d),b=b.options,this.angleRad=(a.angle||0)*Math.PI/180,this.startAngleRad=(b.startAngle-90)*Math.PI/
180,this.endAngleRad=(q(b.endAngle,b.startAngle+360)-90)*Math.PI/180,this.offset=a.offset||0,this.isCircular=h)});z(D,"autoLabelAlign",function(a){if(!this.isRadial)return a.apply(this,[].slice.call(arguments,1))});z(C,"getPosition",function(a,b,c,d,g){var e=this.axis;return e.getPosition?e.getPosition(c):a.call(this,b,c,d,g)});z(C,"getLabelPosition",function(a,b,c,d,g,e,l,n,h){var f=this.axis,m=e.y,r=20,u=e.align,k=(f.translate(this.pos)+f.startAngleRad+Math.PI/2)/Math.PI*180%360;f.isRadial?(a=f.getPosition(this.pos,
f.center[2]/2+q(e.distance,-25)),"auto"===e.rotation?d.attr({rotation:k}):null===m&&(m=f.chart.renderer.fontMetrics(d.styles.fontSize).b-d.getBBox().height/2),null===u&&(f.isCircular?(this.label.getBBox().width>f.len*f.tickInterval/(f.max-f.min)&&(r=0),u=k>r&&k<180-r?"left":k>180+r&&k<360-r?"right":"center"):u="center",d.attr({align:u})),a.x+=e.x,a.y+=m):a=a.call(this,b,c,d,g,e,l,n,h);return a});z(C,"getMarkPath",function(a,b,c,d,g,e,l){var n=this.axis;n.isRadial?(a=n.getPosition(this.pos,n.center[2]/
2+d),b=["M",b,c,"L",a.x,a.y]):b=a.call(this,b,c,d,g,e,l);return b});s.arearange=y(s.area,{lineWidth:1,marker:null,threshold:null,tooltip:{pointFormat:'<span style="color:{series.color}">\u25cf</span> {series.name}: <b>{point.low}</b> - <b>{point.high}</b><br/>'},trackByArea:!0,dataLabels:{align:null,verticalAlign:null,xLow:0,xHigh:0,yLow:0,yHigh:0},states:{hover:{halo:!1}}});k.arearange=v(k.area,{type:"arearange",pointArrayMap:["low","high"],dataLabelCollections:["dataLabel","dataLabelUpper"],toYData:function(a){return[a.low,
a.high]},pointValKey:"low",deferTranslatePolar:!0,highToXY:function(a){var b=this.chart,c=this.xAxis.postTranslate(a.rectPlotX,this.yAxis.len-a.plotHigh);a.plotHighX=c.x-b.plotLeft;a.plotHigh=c.y-b.plotTop},translate:function(){var a=this,b=a.yAxis;k.area.prototype.translate.apply(a);x(a.points,function(a){var d=a.low,g=a.high,e=a.plotY;null===g||null===d?a.isNull=!0:(a.plotLow=e,a.plotHigh=b.translate(g,0,1,0,1))});this.chart.polar&&x(this.points,function(b){a.highToXY(b)})},getGraphPath:function(a){var b=
[],c=[],d,g=k.area.prototype.getGraphPath,e,l,n;n=this.options;var h=n.step;a=a||this.points;for(d=a.length;d--;)e=a[d],e.isNull||n.connectEnds||a[d+1]&&!a[d+1].isNull||c.push({plotX:e.plotX,plotY:e.plotY,doCurve:!1}),l={polarPlotY:e.polarPlotY,rectPlotX:e.rectPlotX,yBottom:e.yBottom,plotX:q(e.plotHighX,e.plotX),plotY:e.plotHigh,isNull:e.isNull},c.push(l),b.push(l),e.isNull||n.connectEnds||a[d-1]&&!a[d-1].isNull||c.push({plotX:e.plotX,plotY:e.plotY,doCurve:!1});a=g.call(this,a);h&&(!0===h&&(h="left"),
n.step={left:"right",center:"center",right:"left"}[h]);b=g.call(this,b);c=g.call(this,c);n.step=h;n=[].concat(a,b);!this.chart.polar&&"M"===c[0]&&(c[0]="L");this.graphPath=n;this.areaPath=this.areaPath.concat(a,c);n.isArea=!0;n.xMap=a.xMap;this.areaPath.xMap=a.xMap;return n},drawDataLabels:function(){var a=this.data,b=a.length,c,d=[],g=A.prototype,e=this.options.dataLabels,l=e.align,n=e.verticalAlign,h=e.inside,f,m,r=this.chart.inverted;if(e.enabled||this._hasPointLabels){for(c=b;c--;)if(f=a[c])m=
h?f.plotHigh<f.plotLow:f.plotHigh>f.plotLow,f.y=f.high,f._plotY=f.plotY,f.plotY=f.plotHigh,d[c]=f.dataLabel,f.dataLabel=f.dataLabelUpper,f.below=m,r?l||(e.align=m?"right":"left"):n||(e.verticalAlign=m?"top":"bottom"),e.x=e.xHigh,e.y=e.yHigh;g.drawDataLabels&&g.drawDataLabels.apply(this,arguments);for(c=b;c--;)if(f=a[c])m=h?f.plotHigh<f.plotLow:f.plotHigh>f.plotLow,f.dataLabelUpper=f.dataLabel,f.dataLabel=d[c],f.y=f.low,f.plotY=f._plotY,f.below=!m,r?l||(e.align=m?"left":"right"):n||(e.verticalAlign=
m?"bottom":"top"),e.x=e.xLow,e.y=e.yLow;g.drawDataLabels&&g.drawDataLabels.apply(this,arguments)}e.align=l;e.verticalAlign=n},alignDataLabel:function(){k.column.prototype.alignDataLabel.apply(this,arguments)},setStackedPoints:w,getSymbol:w,drawPoints:w});s.areasplinerange=y(s.arearange);k.areasplinerange=v(k.arearange,{type:"areasplinerange",getPointSpline:k.spline.prototype.getPointSpline});(function(){var a=k.column.prototype;s.columnrange=y(s.column,s.arearange,{lineWidth:1,pointRange:null});k.columnrange=
v(k.arearange,{type:"columnrange",translate:function(){var b=this,c=b.yAxis,d=b.xAxis,g=d.startAngleRad,e,l=b.chart,n=b.xAxis.isRadial,h;a.translate.apply(b);x(b.points,function(a){var m=a.shapeArgs,r=b.options.minPointLength,u,k;a.plotHigh=h=c.translate(a.high,0,1,0,1);a.plotLow=a.plotY;k=h;u=q(a.rectPlotY,a.plotY)-h;Math.abs(u)<r?(r-=u,u+=r,k-=r/2):0>u&&(u*=-1,k-=u);n?(e=a.barX+g,a.shapeType="path",a.shapeArgs={d:b.polarArc(k+u,k,e,e+a.pointWidth)}):(m.height=u,m.y=k,a.tooltipPos=l.inverted?[c.len+
c.pos-l.plotLeft-k-u/2,d.len+d.pos-l.plotTop-m.x-m.width/2,u]:[d.left-l.plotLeft+m.x+m.width/2,c.pos-l.plotTop+k+u/2,u])})},directTouch:!0,trackerGroups:["group","dataLabelsGroup"],drawGraph:w,crispCol:a.crispCol,pointAttrToOptions:a.pointAttrToOptions,drawPoints:a.drawPoints,drawTracker:a.drawTracker,getColumnMetrics:a.getColumnMetrics,animate:function(){return a.animate.apply(this,arguments)},polarArc:function(){return a.polarArc.apply(this,arguments)}})})();s.gauge=y(s.line,{dataLabels:{enabled:!0,
defer:!1,y:15,borderWidth:1,borderColor:"silver",borderRadius:3,crop:!1,verticalAlign:"top",zIndex:2},dial:{},pivot:{},tooltip:{headerFormat:""},showInLegend:!1});F={type:"gauge",pointClass:v(L,{setState:function(a){this.state=a}}),angular:!0,directTouch:!0,drawGraph:w,fixedBox:!0,forceDL:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],translate:function(){var a=this.yAxis,b=this.options,c=a.center;this.generatePoints();x(this.points,function(d){var g=y(b.dial,d.dial),e=E(q(g.radius,
80))*c[2]/200,l=E(q(g.baseLength,70))*e/100,n=E(q(g.rearLength,10))*e/100,h=g.baseWidth||3,f=g.topWidth||1,m=b.overshoot,r=a.startAngleRad+a.translate(d.y,null,null,null,!0);J(m)?(m=m/180*Math.PI,r=Math.max(a.startAngleRad-m,Math.min(a.endAngleRad+m,r))):!1===b.wrap&&(r=Math.max(a.startAngleRad,Math.min(a.endAngleRad,r)));r=180*r/Math.PI;d.shapeType="path";d.shapeArgs={d:g.path||["M",-n,-h/2,"L",l,-h/2,e,-f/2,e,f/2,l,h/2,-n,h/2,"z"],translateX:c[0],translateY:c[1],rotation:r};d.plotX=c[0];d.plotY=
c[1]})},drawPoints:function(){var a=this,b=a.yAxis.center,c=a.pivot,d=a.options,g=d.pivot,e=a.chart.renderer;x(a.points,function(b){var g=b.graphic,c=b.shapeArgs,f=c.d,m=y(d.dial,b.dial);g?(g.animate(c),c.d=f):b.graphic=e[b.shapeType](c).attr({stroke:m.borderColor||"none","stroke-width":m.borderWidth||0,fill:m.backgroundColor||"black",rotation:c.rotation,zIndex:1}).add(a.group)});c?c.animate({translateX:b[0],translateY:b[1]}):a.pivot=e.circle(0,0,q(g.radius,5)).attr({"stroke-width":g.borderWidth||
0,stroke:g.borderColor||"silver",fill:g.backgroundColor||"black",zIndex:2}).translate(b[0],b[1]).add(a.group)},animate:function(a){var b=this;a||(x(b.points,function(a){var d=a.graphic;d&&(d.attr({rotation:180*b.yAxis.startAngleRad/Math.PI}),d.animate({rotation:a.shapeArgs.rotation},b.options.animation))}),b.animate=null)},render:function(){this.group=this.plotGroup("group","series",this.visible?"visible":"hidden",this.options.zIndex,this.chart.seriesGroup);A.prototype.render.call(this);this.group.clip(this.chart.clipRect)},
setData:function(a,b){A.prototype.setData.call(this,a,!1);this.processData();this.generatePoints();q(b,!0)&&this.chart.redraw()},drawTracker:F&&F.drawTrackerPoint};k.gauge=v(k.line,F);s.boxplot=y(s.column,{fillColor:"#FFFFFF",lineWidth:1,medianWidth:2,states:{hover:{brightness:-0.3}},threshold:null,tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span> <b> {series.name}</b><br/>Maximum: {point.high}<br/>Upper quartile: {point.q3}<br/>Median: {point.median}<br/>Lower quartile: {point.q1}<br/>Minimum: {point.low}<br/>'},
whiskerLength:"50%",whiskerWidth:2});k.boxplot=v(k.column,{type:"boxplot",pointArrayMap:["low","q1","median","q3","high"],toYData:function(a){return[a.low,a.q1,a.median,a.q3,a.high]},pointValKey:"high",pointAttrToOptions:{fill:"fillColor",stroke:"color","stroke-width":"lineWidth"},drawDataLabels:w,translate:function(){var a=this.yAxis,b=this.pointArrayMap;k.column.prototype.translate.apply(this);x(this.points,function(c){x(b,function(b){null!==c[b]&&(c[b+"Plot"]=a.translate(c[b],0,1,0,1))})})},drawPoints:function(){var a=
this,b=a.options,c=a.chart.renderer,d,g,e,l,n,h,f,m,r,k,p,N,O,s,y,w,z,v,A,B,F,E,C=!1!==a.doQuartiles,D,H=a.options.whiskerLength;x(a.points,function(t){r=t.graphic;F=t.shapeArgs;p={};s={};w={};E=t.color||a.color;void 0!==t.plotY&&((d=t.pointAttr[t.selected?"selected":""],z=F.width,v=G(F.x),A=v+z,B=I(z/2),g=G(C?t.q1Plot:t.lowPlot),e=G(C?t.q3Plot:t.lowPlot),l=G(t.highPlot),n=G(t.lowPlot),p.stroke=t.stemColor||b.stemColor||E,p["stroke-width"]=q(t.stemWidth,b.stemWidth,b.lineWidth),p.dashstyle=t.stemDashStyle||
b.stemDashStyle,s.stroke=t.whiskerColor||b.whiskerColor||E,s["stroke-width"]=q(t.whiskerWidth,b.whiskerWidth,b.lineWidth),w.stroke=t.medianColor||b.medianColor||E,w["stroke-width"]=q(t.medianWidth,b.medianWidth,b.lineWidth),f=p["stroke-width"]%2/2,m=v+B+f,k=["M",m,e,"L",m,l,"M",m,g,"L",m,n],C&&(f=d["stroke-width"]%2/2,m=G(m)+f,g=G(g)+f,e=G(e)+f,v+=f,A+=f,N=["M",v,e,"L",v,g,"L",A,g,"L",A,e,"L",v,e,"z"]),H&&(f=s["stroke-width"]%2/2,l+=f,n+=f,D=/%$/.test(H)?B*parseFloat(H)/100:H/2,O=["M",m-D,l,"L",m+
D,l,"M",m-D,n,"L",m+D,n]),f=w["stroke-width"]%2/2,h=I(t.medianPlot)+f,y=["M",v,h,"L",A,h],r)?(t.stem.animate({d:k}),H&&t.whiskers.animate({d:O}),C&&t.box.animate({d:N}),t.medianShape.animate({d:y})):(t.graphic=r=c.g().add(a.group),t.stem=c.path(k).attr(p).add(r),H&&(t.whiskers=c.path(O).attr(s).add(r)),C&&(t.box=c.path(N).attr(d).add(r)),t.medianShape=c.path(y).attr(w).add(r)))})},setStackedPoints:w});s.errorbar=y(s.boxplot,{color:"#000000",grouping:!1,linkedTo:":previous",tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span> {series.name}: <b>{point.low}</b> - <b>{point.high}</b><br/>'},
whiskerWidth:null});k.errorbar=v(k.boxplot,{type:"errorbar",pointArrayMap:["low","high"],toYData:function(a){return[a.low,a.high]},pointValKey:"high",doQuartiles:!1,drawDataLabels:k.arearange?function(){var a=this.pointValKey;k.arearange.prototype.drawDataLabels.call(this);x(this.data,function(b){b.y=b[a]})}:w,getColumnMetrics:function(){return this.linkedParent&&this.linkedParent.columnMetrics||k.column.prototype.getColumnMetrics.call(this)}});s.waterfall=y(s.column,{lineWidth:1,lineColor:"#333",
dashStyle:"dot",borderColor:"#333",dataLabels:{inside:!0},states:{hover:{lineWidthPlus:0}}});k.waterfall=v(k.column,{type:"waterfall",upColorProp:"fill",pointValKey:"y",pointClass:v(L,{isValid:function(){return J(this.y,!0)||this.isSum||this.isIntermediateSum}}),translate:function(){var a=this.options,b=this.yAxis,c,d,g,e,l,n,h,f,m,r=q(a.minPointLength,5),u=a.threshold,p=a.stacking;k.column.prototype.translate.apply(this);this.minPointLengthOffset=0;h=f=u;d=this.points;c=0;for(a=d.length;c<a;c++)g=
d[c],n=this.processedYData[c],e=g.shapeArgs,m=(l=p&&b.stacks[(this.negStacks&&n<u?"-":"")+this.stackKey])?l[g.x].points[this.index+","+c]:[0,n],g.isSum?g.y=K(n):g.isIntermediateSum&&(g.y=K(n-f)),l=S(h,h+g.y)+m[0],e.y=b.toPixels(l,!0),g.isSum?(e.y=b.toPixels(m[1],!0),e.height=Math.min(b.toPixels(m[0],!0),b.len)-e.y+this.minPointLengthOffset):g.isIntermediateSum?(e.y=b.toPixels(m[1],!0),e.height=Math.min(b.toPixels(f,!0),b.len)-e.y+this.minPointLengthOffset,f=m[1]):(e.height=0<n?b.toPixels(h,!0)-e.y:
b.toPixels(h,!0)-b.toPixels(h-n,!0),h+=n),0>e.height&&(e.y+=e.height,e.height*=-1),g.plotY=e.y=I(e.y)-this.borderWidth%2/2,e.height=S(I(e.height),0.001),g.yBottom=e.y+e.height,e.height<=r&&(e.height=r,this.minPointLengthOffset+=r),e.y-=this.minPointLengthOffset,e=g.plotY+(g.negative?e.height:0)-this.minPointLengthOffset,this.chart.inverted?g.tooltipPos[0]=b.len-e:g.tooltipPos[1]=e},processData:function(a){var b=this.yData,c=this.options.data,d,g=b.length,e,l,n,h,f,m;l=e=n=h=this.options.threshold||
0;for(m=0;m<g;m++)f=b[m],d=c&&c[m]?c[m]:{},"sum"===f||d.isSum?b[m]=K(l):"intermediateSum"===f||d.isIntermediateSum?b[m]=K(e):(l+=f,e+=f),n=Math.min(l,n),h=Math.max(l,h);A.prototype.processData.call(this,a);this.dataMin=n;this.dataMax=h},toYData:function(a){return a.isSum?0===a.x?null:"sum":a.isIntermediateSum?0===a.x?null:"intermediateSum":a.y},getAttribs:function(){k.column.prototype.getAttribs.apply(this,arguments);var a=this,b=a.options,c=b.states,d=b.upColor||a.color,b=p.Color(d).brighten(b.states.hover.brightness).get(),
g=y(a.pointAttr),e=a.upColorProp;g[""][e]=d;g.hover[e]=c.hover.upColor||b;g.select[e]=c.select.upColor||d;x(a.points,function(e){e.options.color||(0<e.y?(e.pointAttr=g,e.color=d):e.pointAttr=a.pointAttr)})},getGraphPath:function(){var a=this.data,b=a.length,c=I(this.options.lineWidth+this.borderWidth)%2/2,d=[],g,e,l;for(l=1;l<b;l++)e=a[l].shapeArgs,g=a[l-1].shapeArgs,e=["M",g.x+g.width,g.y+c,"L",e.x,g.y+c],0>a[l-1].y&&(e[2]+=g.height,e[5]+=g.height),d=d.concat(e);return d},getExtremes:w,drawGraph:A.prototype.drawGraph});
s.polygon=y(s.scatter,{marker:{enabled:!1,states:{hover:{enabled:!1}}},stickyTracking:!1,tooltip:{followPointer:!0,pointFormat:""},trackByArea:!0});k.polygon=v(k.scatter,{type:"polygon",getGraphPath:function(){for(var a=A.prototype.getGraphPath.call(this),b=a.length+1;b--;)(b===a.length||"M"===a[b])&&0<b&&a.splice(b,0,"z");return this.areaPath=a},drawGraph:function(){this.options.fillColor=this.color;k.area.prototype.drawGraph.call(this)},drawLegendSymbol:p.LegendSymbolMixin.drawRectangle,drawTracker:A.prototype.drawTracker,
setStackedPoints:w});s.bubble=y(s.scatter,{dataLabels:{formatter:function(){return this.point.z},inside:!0,verticalAlign:"middle"},marker:{lineColor:null,lineWidth:1},minSize:8,maxSize:"20%",softThreshold:!1,states:{hover:{halo:{size:5}}},tooltip:{pointFormat:"({point.x}, {point.y}), Size: {point.z}"},turboThreshold:0,zThreshold:0,zoneAxis:"z"});F=v(L,{haloPath:function(){return L.prototype.haloPath.call(this,this.shapeArgs.r+this.series.options.states.hover.halo.size)},ttBelow:!1});k.bubble=v(k.scatter,
{type:"bubble",pointClass:F,pointArrayMap:["y","z"],parallelArrays:["x","y","z"],trackerGroups:["group","dataLabelsGroup"],bubblePadding:!0,zoneAxis:"z",pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor"},applyOpacity:function(a){var b=this.options.marker,c=q(b.fillOpacity,0.5);a=a||b.fillColor||this.color;1!==c&&(a=Z(a).setOpacity(c).get("rgba"));return a},convertAttribs:function(){var a=A.prototype.convertAttribs.apply(this,arguments);a.fill=this.applyOpacity(a.fill);
return a},getRadii:function(a,b,c,d){var g,e,l,n=this.zData,h=[],f=this.options,m="width"!==f.sizeBy,r=f.zThreshold,k=b-a;e=0;for(g=n.length;e<g;e++)l=n[e],f.sizeByAbsoluteValue&&null!==l&&(l=Math.abs(l-r),b=Math.max(b-r,Math.abs(a-r)),a=0),null===l?l=null:l<a?l=c/2-1:(l=0<k?(l-a)/k:0.5,m&&0<=l&&(l=Math.sqrt(l)),l=B.ceil(c+l*(d-c))/2),h.push(l);this.radii=h},animate:function(a){var b=this.options.animation;a||(x(this.points,function(a){var d=a.graphic;a=a.shapeArgs;d&&a&&(d.attr("r",1),d.animate({r:a.r},
b))}),this.animate=null)},translate:function(){var a,b=this.data,c,d,g=this.radii;k.scatter.prototype.translate.call(this);for(a=b.length;a--;)c=b[a],d=g?g[a]:0,J(d)&&d>=this.minPxSize/2?(c.shapeType="circle",c.shapeArgs={x:c.plotX,y:c.plotY,r:d},c.dlBox={x:c.plotX-d,y:c.plotY-d,width:2*d,height:2*d}):c.shapeArgs=c.plotY=c.dlBox=void 0},drawLegendSymbol:function(a,b){var c=this.chart.renderer,d=c.fontMetrics(a.itemStyle.fontSize).f/2;b.legendSymbol=c.circle(d,a.baseline-d,d).attr({zIndex:3}).add(b.legendGroup);
b.legendSymbol.isMarker=!0},drawPoints:k.column.prototype.drawPoints,alignDataLabel:k.column.prototype.alignDataLabel,buildKDTree:w,applyZones:w});R.prototype.beforePadding=function(){var a=this,b=this.len,c=this.chart,d=0,g=b,e=this.isXAxis,l=e?"xData":"yData",n=this.min,h={},f=B.min(c.plotWidth,c.plotHeight),m=Number.MAX_VALUE,k=-Number.MAX_VALUE,u=this.max-n,p=b/u,s=[];x(this.series,function(b){var g=b.options;b.bubblePadding&&(b.visible||!c.options.chart.ignoreHiddenSeries)&&(a.allowZoomOutside=
!0,s.push(b),e)&&(x(["minSize","maxSize"],function(a){var b=g[a],e=/%$/.test(b),b=E(b);h[a]=e?f*b/100:b}),b.minPxSize=h.minSize,b.maxPxSize=h.maxSize,b=b.zData,b.length&&(m=q(g.zMin,B.min(m,B.max(U(b),!1===g.displayNegative?g.zThreshold:-Number.MAX_VALUE))),k=q(g.zMax,B.max(k,V(b)))))});x(s,function(b){var c=b[l],f=c.length,h;e&&b.getRadii(m,k,b.minPxSize,b.maxPxSize);if(0<u)for(;f--;)J(c[f])&&a.dataMin<=c[f]&&c[f]<=a.dataMax&&(h=b.radii[f],d=Math.min((c[f]-n)*p-h,d),g=Math.max((c[f]-n)*p+h,g))});
s.length&&0<u&&!this.isLog&&(g-=b,p*=(b+d-g)/b,x([["min","userMin",d],["max","userMax",g]],function(b){void 0===q(a.options[b[0]],a[b[1]])&&(a[b[0]]+=b[2]/p)}))};(function(){function a(a,b){var c=this.chart,d=this.options.animation,h=this.group,f=this.markerGroup,m=this.xAxis.center,k=c.plotLeft,p=c.plotTop;c.polar?c.renderer.isSVG&&(!0===d&&(d={}),b?(c={translateX:m[0]+k,translateY:m[1]+p,scaleX:0.001,scaleY:0.001},h.attr(c),f&&f.attr(c)):(c={translateX:k,translateY:p,scaleX:1,scaleY:1},h.animate(c,
d),f&&f.animate(c,d),this.animate=null)):a.call(this,b)}var b=A.prototype,c=X.prototype,d;b.searchPointByAngle=function(a){var b=this.chart,c=this.xAxis.pane.center;return this.searchKDTree({clientX:180+Math.atan2(a.chartX-c[0]-b.plotLeft,a.chartY-c[1]-b.plotTop)*(-180/Math.PI)})};z(b,"buildKDTree",function(a){this.chart.polar&&(this.kdByAngle?this.searchPoint=this.searchPointByAngle:this.kdDimensions=2);a.apply(this)});b.toXY=function(a){var b,c=this.chart,d=a.plotX;b=a.plotY;a.rectPlotX=d;a.rectPlotY=
b;b=this.xAxis.postTranslate(a.plotX,this.yAxis.len-b);a.plotX=a.polarPlotX=b.x-c.plotLeft;a.plotY=a.polarPlotY=b.y-c.plotTop;this.kdByAngle?(c=(d/Math.PI*180+this.xAxis.pane.options.startAngle)%360,0>c&&(c+=360),a.clientX=c):a.clientX=a.plotX};k.spline&&z(k.spline.prototype,"getPointSpline",function(a,b,c,d){var h,f,m,k,p,s,q;this.chart.polar?(h=c.plotX,f=c.plotY,a=b[d-1],m=b[d+1],this.connectEnds&&(a||(a=b[b.length-2]),m||(m=b[1])),a&&m&&(k=a.plotX,p=a.plotY,b=m.plotX,s=m.plotY,k=(1.5*h+k)/2.5,
p=(1.5*f+p)/2.5,m=(1.5*h+b)/2.5,q=(1.5*f+s)/2.5,b=Math.sqrt(Math.pow(k-h,2)+Math.pow(p-f,2)),s=Math.sqrt(Math.pow(m-h,2)+Math.pow(q-f,2)),k=Math.atan2(p-f,k-h),p=Math.atan2(q-f,m-h),q=Math.PI/2+(k+p)/2,Math.abs(k-q)>Math.PI/2&&(q-=Math.PI),k=h+Math.cos(q)*b,p=f+Math.sin(q)*b,m=h+Math.cos(Math.PI+q)*s,q=f+Math.sin(Math.PI+q)*s,c.rightContX=m,c.rightContY=q),d?(c=["C",a.rightContX||a.plotX,a.rightContY||a.plotY,k||h,p||f,h,f],a.rightContX=a.rightContY=null):c=["M",h,f]):c=a.call(this,b,c,d);return c});
z(b,"translate",function(a){var b=this.chart;a.call(this);if(b.polar&&(this.kdByAngle=b.tooltip&&b.tooltip.shared,!this.preventPostTranslate))for(a=this.points,b=a.length;b--;)this.toXY(a[b])});z(b,"getGraphPath",function(a,b){var c=this,d,h;if(this.chart.polar){b=b||this.points;for(d=0;d<b.length;d++)if(!b[d].isNull){h=d;break}!1!==this.options.connectEnds&&void 0!==h&&(this.connectEnds=!0,b.splice(b.length,0,b[h]));x(b,function(a){void 0===a.polarPlotY&&c.toXY(a)})}return a.apply(this,[].slice.call(arguments,
1))});z(b,"animate",a);k.column&&(d=k.column.prototype,d.polarArc=function(a,b,c,d){var h=this.xAxis.center,f=this.yAxis.len;return this.chart.renderer.symbols.arc(h[0],h[1],f-b,null,{start:c,end:d,innerR:f-q(a,f)})},z(d,"animate",a),z(d,"translate",function(a){var b=this.xAxis,c=b.startAngleRad,d,h,f;this.preventPostTranslate=!0;a.call(this);if(b.isRadial)for(d=this.points,f=d.length;f--;)h=d[f],a=h.barX+c,h.shapeType="path",h.shapeArgs={d:this.polarArc(h.yBottom,h.plotY,a,a+h.pointWidth)},this.toXY(h),
h.tooltipPos=[h.plotX,h.plotY],h.ttBelow=h.plotY>b.center[1]}),z(d,"alignDataLabel",function(a,c,d,k,h,f){this.chart.polar?(a=c.rectPlotX/Math.PI*180,null===k.align&&(k.align=20<a&&160>a?"left":200<a&&340>a?"right":"center"),null===k.verticalAlign&&(k.verticalAlign=45>a||315<a?"bottom":135<a&&225>a?"top":"middle"),b.alignDataLabel.call(this,c,d,k,h,f)):a.call(this,c,d,k,h,f)}));z(c,"getCoordinates",function(a,b){var c=this.chart,d={xAxis:[],yAxis:[]};c.polar?x(c.axes,function(a){var f=a.isXAxis,g=
a.center,k=b.chartX-g[0]-c.plotLeft,g=b.chartY-g[1]-c.plotTop;d[f?"xAxis":"yAxis"].push({axis:a,value:a.translate(f?Math.PI-Math.atan2(k,g):Math.sqrt(Math.pow(k,2)+Math.pow(g,2)),!0)})}):d=a.call(this,b);return d})})()});
