(e.step||0)&&!e.rotation&&(this.staggerLines||1)*a.plotWidth/c||!b&&(f&&f-a.spacing[3]||.33*a.chartWidth)},renderUnsquish:function(){var a=this.chart,b=a.renderer,e=this.tickPositions,c=this.ticks,m=this.options.labels,d=this.horiz,h=this.getSlotWidth(),r=Math.max(1, -Math.round(h-2*(m.padding||5))),w={},g=this.labelMetrics(),l=m.style&&m.style.textOverflow,G,v=0,k,n;q(m.rotation)||(w.rotation=m.rotation||0);f(e,function(a){(a=c[a])&&a.labelLength>v&&(v=a.labelLength)});this.maxLabelLength=v;if(this.autoRotation)v>r&&v>g.h?w.rotation=this.labelRotation:this.labelRotation=0;else if(h&&(G={width:r+"px"},!l))for(G.textOverflow="clip",k=e.length;!d&&k--;)if(n=e[k],r=c[n].label)r.styles&&"ellipsis"===r.styles.textOverflow?r.css({textOverflow:"clip"}):c[n].labelLength> -h&&r.css({width:h+"px"}),r.getBBox().height>this.len/e.length-(g.h-g.f)&&(r.specCss={textOverflow:"ellipsis"});w.rotation&&(G={width:(v>.5*a.chartHeight?.33*a.chartHeight:a.chartHeight)+"px"},l||(G.textOverflow="ellipsis"));if(this.labelAlign=m.align||this.autoLabelAlign(this.labelRotation))w.align=this.labelAlign;f(e,function(a){var b=(a=c[a])&&a.label;b&&(b.attr(w),G&&b.css(x(G,b.specCss)),delete b.specCss,a.rotation=w.rotation)});this.tickRotCorr=b.rotCorr(g.b,this.labelRotation||0,0!==this.side)}, -hasData:function(){return this.hasVisibleSeries||l(this.min)&&l(this.max)&&!!this.tickPositions},getOffset:function(){var a=this,b=a.chart,e=b.renderer,c=a.options,m=a.tickPositions,d=a.ticks,h=a.horiz,r=a.side,w=b.inverted?[1,0,3,2][r]:r,g,q,x=0,G,v=0,k=c.title,n=c.labels,K=0,t=a.opposite,I=b.axisOffset,b=b.clipOffset,L=[-1,1,1,-1][r],u,H=c.className,J=a.axisParent,A=this.tickSize("tick");g=a.hasData();a.showAxis=q=g||E(c.showEmpty,!0);a.staggerLines=a.horiz&&n.staggerLines;a.axisGroup||(a.gridGroup= -e.g("grid").attr({zIndex:c.gridZIndex||1}).addClass("highcharts-"+this.coll.toLowerCase()+"-grid "+(H||"")).add(J),a.axisGroup=e.g("axis").attr({zIndex:c.zIndex||2}).addClass("highcharts-"+this.coll.toLowerCase()+" "+(H||"")).add(J),a.labelGroup=e.g("axis-labels").attr({zIndex:n.zIndex||7}).addClass("highcharts-"+a.coll.toLowerCase()+"-labels "+(H||"")).add(J));if(g||a.isLinked)f(m,function(b){d[b]?d[b].addLabel():d[b]=new N(a,b)}),a.renderUnsquish(),!1===n.reserveSpace||0!==r&&2!==r&&{1:"left",3:"right"}[r]!== -a.labelAlign&&"center"!==a.labelAlign||f(m,function(a){K=Math.max(d[a].getLabelSize(),K)}),a.staggerLines&&(K*=a.staggerLines,a.labelOffset=K*(a.opposite?-1:1));else for(u in d)d[u].destroy(),delete d[u];k&&k.text&&!1!==k.enabled&&(a.axisTitle||((u=k.textAlign)||(u=(h?{low:"left",middle:"center",high:"right"}:{low:t?"right":"left",middle:"center",high:t?"left":"right"})[k.align]),a.axisTitle=e.text(k.text,0,0,k.useHTML).attr({zIndex:7,rotation:k.rotation||0,align:u}).addClass("highcharts-axis-title").css(k.style).add(a.axisGroup), -a.axisTitle.isNew=!0),q&&(x=a.axisTitle.getBBox()[h?"height":"width"],G=k.offset,v=l(G)?0:E(k.margin,h?5:10)),a.axisTitle[q?"show":"hide"](!0));a.renderLine();a.offset=L*E(c.offset,I[r]);a.tickRotCorr=a.tickRotCorr||{x:0,y:0};e=0===r?-a.labelMetrics().h:2===r?a.tickRotCorr.y:0;v=Math.abs(K)+v;K&&(v=v-e+L*(h?E(n.y,a.tickRotCorr.y+8*L):n.x));a.axisTitleMargin=E(G,v);I[r]=Math.max(I[r],a.axisTitleMargin+x+L*a.offset,v,g&&m.length&&A?A[0]:0);c=c.offset?0:2*Math.floor(a.axisLine.strokeWidth()/2);b[w]= -Math.max(b[w],c)},getLinePath:function(a){var b=this.chart,e=this.opposite,c=this.offset,f=this.horiz,m=this.left+(e?this.width:0)+c,c=b.chartHeight-this.bottom-(e?this.height:0)+c;e&&(a*=-1);return b.renderer.crispLine(["M",f?this.left:m,f?c:this.top,"L",f?b.chartWidth-this.right:m,f?c:b.chartHeight-this.bottom],a)},renderLine:function(){this.axisLine||(this.axisLine=this.chart.renderer.path().addClass("highcharts-axis-line").add(this.axisGroup),this.axisLine.attr({stroke:this.options.lineColor, -"stroke-width":this.options.lineWidth,zIndex:7}))},getTitlePosition:function(){var a=this.horiz,b=this.left,e=this.top,c=this.len,f=this.options.title,m=a?b:e,d=this.opposite,h=this.offset,r=f.x||0,w=f.y||0,g=this.chart.renderer.fontMetrics(f.style&&f.style.fontSize,this.axisTitle).f,c={low:m+(a?0:c),middle:m+c/2,high:m+(a?c:0)}[f.align],b=(a?e+this.height:b)+(a?1:-1)*(d?-1:1)*this.axisTitleMargin+(2===this.side?g:0);return{x:a?c+r:b+(d?this.width:0)+h+r,y:a?b+w-(d?this.height:0)+h:c+w}},render:function(){var a= -this,e=a.chart,c=e.renderer,m=a.options,d=a.isLog,h=a.lin2log,r=a.isLinked,w=a.tickPositions,g=a.axisTitle,q=a.ticks,x=a.minorTicks,l=a.alternateBands,v=m.stackLabels,k=m.alternateGridColor,n=a.tickmarkOffset,K=a.axisLine,E=e.hasRendered&&b(a.oldMin),t=a.showAxis,I=A(c.globalAnimation),L,u;a.labelEdge.length=0;a.overlap=!1;f([q,x,l],function(a){for(var b in a)a[b].isActive=!1});if(a.hasData()||r)a.minorTickInterval&&!a.categories&&f(a.getMinorTickPositions(),function(b){x[b]||(x[b]=new N(a,b,"minor")); -E&&x[b].isNew&&x[b].render(null,!0);x[b].render(null,!1,1)}),w.length&&(f(w,function(b,e){if(!r||b>=a.min&&b<=a.max)q[b]||(q[b]=new N(a,b)),E&&q[b].isNew&&q[b].render(e,!0,.1),q[b].render(e)}),n&&(0===a.min||a.single)&&(q[-1]||(q[-1]=new N(a,-1,null,!0)),q[-1].render(-1))),k&&f(w,function(b,c){u=void 0!==w[c+1]?w[c+1]+n:a.max-n;0===c%2&&b=f.second?0:L*Math.floor(b.getMilliseconds()/L));if(x>=f.second)b[A.hcSetSeconds](x>=f.minute?0:L*Math.floor(b.getSeconds()/ -L));if(x>=f.minute)b[A.hcSetMinutes](x>=f.hour?0:L*Math.floor(b[A.hcGetMinutes]()/L));if(x>=f.hour)b[A.hcSetHours](x>=f.day?0:L*Math.floor(b[A.hcGetHours]()/L));if(x>=f.day)b[A.hcSetDate](x>=f.month?1:L*Math.floor(b[A.hcGetDate]()/L));x>=f.month&&(b[A.hcSetMonth](x>=f.year?0:L*Math.floor(b[A.hcGetMonth]()/L)),h=b[A.hcGetFullYear]());if(x>=f.year)b[A.hcSetFullYear](h-h%L);if(x===f.week)b[A.hcSetDate](b[A.hcGetDate]()-b[A.hcGetDay]()+n(c,1));h=b[A.hcGetFullYear]();c=b[A.hcGetMonth]();var u=b[A.hcGetDate](), -w=b[A.hcGetHours]();if(A.hcTimezoneOffset||A.hcGetTimezoneOffset)E=(!r||!!A.hcGetTimezoneOffset)&&(t-v>4*f.month||l(v)!==l(t)),b=b.getTime(),b=new A(b+l(b));r=b.getTime();for(v=1;r g&&(!l||m<=u)&&void 0!==m&&v.push(m),m>u&&(r=!0),m=e;else g=f(g),u= -f(u),a=d[l?"minorTickInterval":"tickInterval"],a=k("auto"===a?null:a,this._minorAutoInterval,d.tickPixelInterval/(l?5:1)*(u-g)/((l?n/this.tickPositions.length:n)||1)),a=F(a,null,A(a)),v=D(this.getLinearTickPositions(a,g,u),h),l||(this._minorAutoInterval=a/5);l||(this.tickInterval=a);return v};C.prototype.log2lin=function(a){return Math.log(a)/Math.LN10};C.prototype.lin2log=function(a){return Math.pow(10,a)}})(M);(function(a){var C=a.dateFormat,A=a.each,D=a.extend,F=a.format,k=a.isNumber,d=a.map,g= -a.merge,u=a.pick,l=a.splat,t=a.stop,n=a.syncTimeout,f=a.timeUnits;a.Tooltip=function(){this.init.apply(this,arguments)};a.Tooltip.prototype={init:function(a,f){this.chart=a;this.options=f;this.crosshairs=[];this.now={x:0,y:0};this.isHidden=!0;this.split=f.split&&!a.inverted;this.shared=f.shared||this.split},cleanSplit:function(a){A(this.chart.series,function(f){var d=f&&f.tt;d&&(!d.isActive||a?f.tt=d.destroy():d.isActive=!1)})},getLabel:function(){var a=this.chart.renderer,f=this.options;this.label|| -(this.split?this.label=a.g("tooltip"):(this.label=a.label("",0,0,f.shape||"callout",null,null,f.useHTML,null,"tooltip").attr({padding:f.padding,r:f.borderRadius}),this.label.attr({fill:f.backgroundColor,"stroke-width":f.borderWidth}).css(f.style).shadow(f.shadow)),this.label.attr({zIndex:8}).add());return this.label},update:function(a){this.destroy();this.init(this.chart,g(!0,this.options,a))},destroy:function(){this.label&&(this.label=this.label.destroy());this.split&&this.tt&&(this.cleanSplit(this.chart, -!0),this.tt=this.tt.destroy());clearTimeout(this.hideTimer);clearTimeout(this.tooltipTimeout)},move:function(a,f,d,c){var e=this,m=e.now,r=!1!==e.options.animation&&!e.isHidden&&(1 g-r?g:g-r);else if(w)m[a]=Math.max(d,f+r+c>b?f:f+r);else return!1},k=function(a,b,c,f){var d;f b-e?d=!1:m[a]=f b-c/2?b-c-2:f-c/2;return d},n=function(a){var c=b;b=g;g=c;h=a},w=function(){!1!==l.apply(0,b)?!1!==k.apply(0,g)||h||(n(!0),w()):h?m.x=m.y=0:(n(!0),w())};(c.inverted||1 w&&(r=!1);a=(f.series&&f.series.yAxis&&f.series.yAxis.pos)+(f.plotY||0);a-=e.plotTop;c.push({target:f.isHeader?e.plotHeight+b:a,rank:f.isHeader?1:0,size:x.tt.getBBox().height+1,point:f,x:w,tt:l})});this.cleanSplit(); -a.distribute(c,e.plotHeight+b);A(c,function(a){var b=a.point;a.tt.attr({visibility:void 0===a.pos?"hidden":"inherit",x:r||b.isHeader?a.x:b.plotX+e.plotLeft+u(g.distance,16),y:a.pos+e.plotTop,anchorX:b.plotX+e.plotLeft,anchorY:b.isHeader?a.pos+e.plotTop-15:b.plotY+e.plotTop})})},updatePosition:function(a){var f=this.chart,d=this.getLabel(),d=(this.options.positioner||this.getPosition).call(this,d.width,d.height,a);this.move(Math.round(d.x),Math.round(d.y||0),a.plotX+f.plotLeft,a.plotY+f.plotTop)}, -getXDateFormat:function(a,d,g){var c;d=d.dateTimeLabelFormats;var e=g&&g.closestPointRange,m,r={millisecond:15,second:12,minute:9,hour:6,day:3},h,b="millisecond";if(e){h=C("%m-%d %H:%M:%S.%L",a.x);for(m in f){if(e===f.week&&+C("%w",a.x)===g.options.startOfWeek&&"00:00:00.000"===h.substr(6)){m="week";break}if(f[m]>e){m=b;break}if(r[m]&&h.substr(r[m])!=="01-01 00:00:00.000".substr(r[m]))break;"week"!==m&&(b=m)}m&&(c=d[m])}else c=d.day;return c||d.year},tooltipFooterHeaderFormatter:function(a,f){var d= -f?"footer":"header";f=a.series;var c=f.tooltipOptions,e=c.xDateFormat,m=f.xAxis,r=m&&"datetime"===m.options.type&&k(a.key),d=c[d+"Format"];r&&!e&&(e=this.getXDateFormat(a,c,m));r&&e&&(d=d.replace("{point.key}","{point.key:"+e+"}"));return F(d,{point:a,series:f})},bodyFormatter:function(a){return d(a,function(a){var f=a.series.tooltipOptions;return(f.pointFormatter||a.point.tooltipFormatter).call(a.point,f.pointFormat)})}}})(M);(function(a){var C=a.addEvent,A=a.attr,D=a.charts,F=a.color,k=a.css,d= -a.defined,g=a.doc,u=a.each,l=a.extend,t=a.fireEvent,n=a.offset,f=a.pick,h=a.removeEvent,v=a.splat,H=a.Tooltip,c=a.win;a.Pointer=function(a,c){this.init(a,c)};a.Pointer.prototype={init:function(a,c){this.options=c;this.chart=a;this.runChartClick=c.chart.events&&!!c.chart.events.click;this.pinchDown=[];this.lastValidTouch={};H&&c.tooltip.enabled&&(a.tooltip=new H(a,c.tooltip),this.followTouchMove=f(c.tooltip.followTouchMove,!0));this.setDOMEvents()},zoomOption:function(a){var c=this.chart,e=c.options.chart, -d=e.zoomType||"",c=c.inverted;/touch/.test(a.type)&&(d=f(e.pinchType,d));this.zoomX=a=/x/.test(d);this.zoomY=d=/y/.test(d);this.zoomHor=a&&!c||d&&c;this.zoomVert=d&&!c||a&&c;this.hasZoom=a||d},normalize:function(a,f){var e,m;a=a||c.event;a.target||(a.target=a.srcElement);m=a.touches?a.touches.length?a.touches.item(0):a.changedTouches[0]:a;f||(this.chartPosition=f=n(this.chart.container));void 0===m.pageX?(e=Math.max(a.x,a.clientX-f.left),f=a.y):(e=m.pageX-f.left,f=m.pageY-f.top);return l(a,{chartX:Math.round(e), -chartY:Math.round(f)})},getCoordinates:function(a){var c={xAxis:[],yAxis:[]};u(this.chart.axes,function(e){c[e.isXAxis?"xAxis":"yAxis"].push({axis:e,value:e.toValue(a[e.horiz?"chartX":"chartY"])})});return c},runPointActions:function(c){var e=this.chart,d=e.series,h=e.tooltip,b=h?h.shared:!1,q=!0,l=e.hoverPoint,k=e.hoverSeries,n,t,w,K=[],G;if(!b&&!k)for(n=0;n c.series.index?-1:1}));if(b)for(n=K.length;n--;)(K[n].x!==K[0].x||K[n].series.noSharedTooltip)&&K.splice(n,1);if(K[0]&&(K[0]!==this.prevKDPoint||h&&h.isHidden)){if(b&& -!K[0].series.noSharedTooltip){for(n=0;n g+k&&(f=g+k),b l+w&&(b=l+w),this.hasDragged=Math.sqrt(Math.pow(t-f,2)+Math.pow(p-b,2)),10 E.max&&(d=E.max-b,p=!0);p?(K-=.8*(K-h[c][0]),J||(N-=.8*(N-h[c][1])),l()):h[c]=[K,N];u||(f[c]=q-t,f[r]=b);f=u?1/x:x;n[r]=b;n[c]=d;k[u?a?"scaleY":"scaleX":"scale"+e]=x;k["translate"+e]=f* -t+(K-f*w)},pinch:function(a){var g=this,l=g.chart,t=g.pinchDown,n=a.touches,f=n.length,h=g.lastValidTouch,v=g.hasZoom,H=g.selectionMarker,c={},e=1===f&&(g.inClass(a.target,"highcharts-tracker")&&l.runTrackerClick||g.runChartClick),m={};1 f-6&&d (K||c.chartWidth- -2*v-p-d.x)&&(this.itemX=p,this.itemY+=N+this.lastLineHeight+G,this.lastLineHeight=0);this.maxItemWidth=Math.max(this.maxItemWidth,b);this.lastItemY=N+this.itemY+G;this.lastLineHeight=Math.max(g,this.lastLineHeight);a._legendItemPos=[this.itemX,this.itemY];h?this.itemX+=b:(this.itemY+=N+g+G,this.lastLineHeight=g);this.offsetWidth=K||Math.max((h?this.itemX-p-u:b)+v,this.offsetWidth)},getAllItems:function(){var a=[];d(this.chart.series,function(c){var e=c&&c.options;c&&n(e.showInLegend,k(e.linkedTo)? -!1:void 0,!0)&&(a=a.concat(c.legendItems||("point"===e.legendType?c.data:c)))});return a},adjustMargins:function(a,e){var c=this.chart,f=this.options,h=f.align.charAt(0)+f.verticalAlign.charAt(0)+f.layout.charAt(0);f.floating||d([/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/],function(b,d){b.test(h)&&!k(a[d])&&(c[l[d]]=Math.max(c[l[d]],c.legend[(d+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][d]*f[d%2?"x":"y"]+n(f.margin,12)+e[d]))})},render:function(){var a=this,e=a.chart,f=e.renderer, -l=a.group,k,b,q,n,t=a.box,v=a.options,u=a.padding;a.itemX=a.initialItemX;a.itemY=a.initialItemY;a.offsetWidth=0;a.lastItemY=0;l||(a.group=l=f.g("legend").attr({zIndex:7}).add(),a.contentGroup=f.g().attr({zIndex:1}).add(l),a.scrollGroup=f.g().add(a.contentGroup));a.renderTitle();k=a.getAllItems();h(k,function(a,b){return(a.options&&a.options.legendIndex||0)-(b.options&&b.options.legendIndex||0)});v.reversed&&k.reverse();a.allItems=k;a.display=b=!!k.length;a.lastLineHeight=0;d(k,function(b){a.renderItem(b)}); -q=(v.width||a.offsetWidth)+u;n=a.lastItemY+a.lastLineHeight+a.titleHeight;n=a.handleOverflow(n);n+=u;t||(a.box=t=f.rect().addClass("highcharts-legend-box").attr({r:v.borderRadius}).add(l),t.isNew=!0);t.attr({stroke:v.borderColor,"stroke-width":v.borderWidth||0,fill:v.backgroundColor||"none"}).shadow(v.shadow);0 f&&!1!==k.enabled?(this.clipHeight=q=Math.max(f-20-this.titleHeight-G,0),this.currentPage=n(this.currentPage,1),this.fullHeight=a,d(p,function(a,b){var c=a._legendItemPos[1];a=Math.round(a.legendItem.getBBox().height);var e=K.length;if(!e||c-K[e-1]>q&&(u||c)!==K[e-1])K.push(u||c),e++;b===p.length-1&&c+a-K[e-1]>q&&K.push(c);c!==u&&(u=c)}),l||(l=c.clipRect= -h.clipRect(0,G,9999,0),c.contentGroup.clip(l)),y(q),w||(this.nav=w=h.g().attr({zIndex:1}).add(this.group),this.up=h.symbol("triangle",0,0,v,v).on("click",function(){c.scroll(-1,t)}).add(w),this.pager=h.text("",15,10).addClass("highcharts-legend-navigation").css(k.style).add(w),this.down=h.symbol("triangle-down",0,0,v,v).on("click",function(){c.scroll(1,t)}).add(w)),c.scroll(0),a=f):w&&(y(),w.hide(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0);return a},scroll:function(a,e){var c=this.pages, -d=c.length;a=this.currentPage+a;var h=this.clipHeight,b=this.options.navigation,g=this.pager,l=this.padding;a>d&&(a=d);0c&&(d=typeof a[0],"string"===d?f.name=a[0]:"number"===d&&(f.x=a[0]),e++);m=g.value;)g=f[++d];g&&g.color&&!this.options.color&&(this.color=g.color);return g},destroy:function(){var a=this.series.chart,f=a.hoverPoints,d;a.pointCount--;f&&(this.setState(),F(f,this),f.length||(a.hoverPoints=null));if(this===a.hoverPoint)this.onMouseOut();if(this.graphic||this.dataLabel)t(this), -this.destroyElements();this.legendItem&&a.legend.destroyItem(this);for(d in this)this[d]=null},destroyElements:function(){for(var a=["graphic","dataLabel","dataLabelUpper","connector","shadowGroup"],f,d=6;d--;)f=a[d],this[f]&&(this[f]=this[f].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,color:this.color,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},tooltipFormatter:function(a){var f=this.series,g= -f.tooltipOptions,k=l(g.valueDecimals,""),n=g.valuePrefix||"",c=g.valueSuffix||"";A(f.pointArrayMap||["y"],function(e){e="{point."+e;if(n||c)a=a.replace(e+"}",n+e+"}"+c);a=a.replace(e+"}",e+":,."+k+"f}")});return d(a,{point:this,series:this.series})},firePointEvent:function(a,f,d){var g=this,h=this.series.options;(h.point.events[a]||g.options&&g.options.events&&g.options.events[a])&&this.importEvents();"click"===a&&h.allowPointSelect&&(d=function(a){g.select&&g.select(null,a.ctrlKey||a.metaKey||a.shiftKey)}); -k(this,a,f,d)},visible:!0}})(M);(function(a){var C=a.addEvent,A=a.animObject,D=a.arrayMax,F=a.arrayMin,k=a.correctFloat,d=a.Date,g=a.defaultOptions,u=a.defaultPlotOptions,l=a.defined,t=a.each,n=a.erase,f=a.error,h=a.extend,v=a.fireEvent,H=a.grep,c=a.isArray,e=a.isNumber,m=a.isString,r=a.merge,I=a.pick,b=a.removeEvent,q=a.splat,x=a.stableSort,L=a.SVGElement,E=a.syncTimeout,J=a.win;a.Series=a.seriesType("line",null,{lineWidth:2,allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},events:{}, -marker:{lineWidth:0,lineColor:"#ffffff",radius:4,states:{hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{align:"center",formatter:function(){return null===this.y?"":a.numberFormat(this.y,-1)},style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0,padding:5},cropThreshold:300,pointRange:0,softThreshold:!0,states:{hover:{lineWidthPlus:1, -marker:{},halo:{size:10,opacity:.25}},select:{marker:{}}},stickyTracking:!0,turboThreshold:1E3},{isCartesian:!0,pointClass:a.Point,sorted:!0,requireSorting:!0,directTouch:!1,axisTypes:["xAxis","yAxis"],colorCounter:0,parallelArrays:["x","y"],coll:"series",init:function(a,b){var c=this,e,f,d=a.series,g,m=function(a,b){return I(a.options.index,a._i)-I(b.options.index,b._i)};c.chart=a;c.options=b=c.setOptions(b);c.linkedSeries=[];c.bindAxes();h(c,{name:b.name,state:"",visible:!1!==b.visible,selected:!0=== -b.selected});f=b.events;for(e in f)C(c,e,f[e]);if(f&&f.click||b.point&&b.point.events&&b.point.events.click||b.allowPointSelect)a.runTrackerClick=!0;c.getColor();c.getSymbol();t(c.parallelArrays,function(a){c[a+"Data"]=[]});c.setData(b.data,!1);c.isCartesian&&(a.hasCartesianSeries=!0);d.length&&(g=d[d.length-1]);c._i=I(g&&g._i,-1)+1;d.push(c);x(d,m);this.yAxis&&x(this.yAxis.series,m);t(d,function(a,b){a.index=b;a.name=a.name||"Series "+(b+1)})},bindAxes:function(){var a=this,b=a.options,c=a.chart, -e;t(a.axisTypes||[],function(d){t(c[d],function(c){e=c.options;if(b[d]===e.index||void 0!==b[d]&&b[d]===e.id||void 0===b[d]&&0===e.index)c.series.push(a),a[d]=c,c.isDirty=!0});a[d]||a.optionalAxis===d||f(18,!0)})},updateParallelArrays:function(a,b){var c=a.series,f=arguments,d=e(b)?function(e){var f="y"===e&&c.toYData?c.toYData(a):a[e];c[e+"Data"][b]=f}:function(a){Array.prototype[b].apply(c[a+"Data"],Array.prototype.slice.call(f,2))};t(c.parallelArrays,d)},autoIncrement:function(){var a=this.options, -b=this.xIncrement,c,e=a.pointIntervalUnit,b=I(b,a.pointStart,0);this.pointInterval=c=I(this.pointInterval,a.pointInterval,1);e&&(a=new d(b),"day"===e?a=+a[d.hcSetDate](a[d.hcGetDate]()+c):"month"===e?a=+a[d.hcSetMonth](a[d.hcGetMonth]()+c):"year"===e&&(a=+a[d.hcSetFullYear](a[d.hcGetFullYear]()+c)),c=a-b);this.xIncrement=b+c;return b},setOptions:function(a){var b=this.chart,c=b.options.plotOptions,b=b.userOptions||{},e=b.plotOptions||{},f=c[this.type];this.userOptions=a;c=r(f,c.series,a);this.tooltipOptions= -r(g.tooltip,g.plotOptions[this.type].tooltip,b.tooltip,e.series&&e.series.tooltip,e[this.type]&&e[this.type].tooltip,a.tooltip);null===f.marker&&delete c.marker;this.zoneAxis=c.zoneAxis;a=this.zones=(c.zones||[]).slice();!c.negativeColor&&!c.negativeFillColor||c.zones||a.push({value:c[this.zoneAxis+"Threshold"]||c.threshold||0,className:"highcharts-negative",color:c.negativeColor,fillColor:c.negativeFillColor});a.length&&l(a[a.length-1].value)&&a.push({color:this.color,fillColor:this.fillColor}); -return c},getCyclic:function(a,b,c){var e,f=this.userOptions,d=a+"Index",g=a+"Counter",h=c?c.length:I(this.chart.options.chart[a+"Count"],this.chart[a+"Count"]);b||(e=I(f[d],f["_"+d]),l(e)||(f["_"+d]=e=this.chart[g]%h,this.chart[g]+=1),c&&(b=c[e]));void 0!==e&&(this[d]=e);this[a]=b},getColor:function(){this.options.colorByPoint?this.options.color=null:this.getCyclic("color",this.options.color||u[this.type].color,this.chart.options.colors)},getSymbol:function(){this.getCyclic("symbol",this.options.marker.symbol, -this.chart.options.symbols)},drawLegendSymbol:a.LegendSymbolMixin.drawLineMarker,setData:function(a,b,d,g){var h=this,k=h.points,l=k&&k.length||0,w,q=h.options,r=h.chart,n=null,x=h.xAxis,v=q.turboThreshold,K=this.xData,G=this.yData,E=(w=h.pointArrayMap)&&w.length;a=a||[];w=a.length;b=I(b,!0);if(!1!==g&&w&&l===w&&!h.cropped&&!h.hasGroupedData&&h.visible)t(a,function(a,b){k[b].update&&a!==q.data[b]&&k[b].update(a,!1,null,!1)});else{h.xIncrement=null;h.colorCounter=0;t(this.parallelArrays,function(a){h[a+ -"Data"].length=0});if(v&&w>v){for(d=0;null===n&&d k||this.forceCrop))if(b[e-1] t)b=[],c=[];else if(b[0] t)d=this.cropData(this.xData,this.yData,n,t),b=d.xData,c=d.yData,d=d.start,g=!0;for(k=b.length||1;--k;)e=r?l(b[k])-l(b[k-1]):b[k]-b[k-1],0 e&&this.requireSorting&&f(15);this.cropped=g;this.cropStart=d;this.processedXData=b;this.processedYData=c;this.closestPointRange=h},cropData:function(a,b,c,e){var f=a.length,d=0,g=f,h=I(this.cropShoulder,1),m;for(m=0;m =c){d=Math.max(0,m- -h);break}for(c=m;c e){g=c+h;break}return{xData:a.slice(d,g),yData:b.slice(d,g),start:d,end:g}},generatePoints:function(){var a=this.options.data,b=this.data,c,e=this.processedXData,f=this.processedYData,d=this.pointClass,g=e.length,h=this.cropStart||0,m,k=this.hasGroupedData,l,r=[],n;b||k||(b=[],b.length=a.length,b=this.data=b);for(n=0;n =m&&(f[n-1]||q)<=k,l&&q)if(l=w.length)for(;l--;)null!==w[l]&&(g[h++]=w[l]);else g[h++]=w;this.dataMin=F(g);this.dataMax=D(g)},translate:function(){this.processedXData||this.processData();this.generatePoints();var a=this.options,b=a.stacking,c=this.xAxis,f=c.categories,d=this.yAxis,g=this.points,h=g.length,m=!!this.modifyValue,q=a.pointPlacement,n="between"===q||e(q),r=a.threshold,t=a.startFromThreshold?r:0,x,v,E,u,J=Number.MAX_VALUE;"between"===q&&(q=.5);e(q)&&(q*=I(a.pointRange||c.pointRange)); -for(a=0;a =A&&(L.isNull=!0);L.plotX=x=k(Math.min(Math.max(-1E5,c.translate(H,0,0,0,1,q,"flags"===this.type)),1E5));b&&this.visible&&!L.isNull&&C&&C[H]&&(u=this.getStackIndicator(u,H,this.index),D=C[H],A=D.points[u.key],v=A[0],A=A[1],v===t&&u.key===C[H].base&&(v=I(r,d.min)),d.isLog&&0>=v&&(v=null),L.total=L.stackTotal=D.total,L.percentage=D.total&&L.y/D.total*100,L.stackY= -A,D.setOffset(this.pointXOffset||0,this.barW||0));L.yBottom=l(v)?d.translate(v,0,1,0,1):null;m&&(A=this.modifyValue(A,L));L.plotY=v="number"===typeof A&&Infinity!==A?Math.min(Math.max(-1E5,d.translate(A,0,1,0,1)),1E5):void 0;L.isInside=void 0!==v&&0<=v&&v<=d.len&&0<=x&&x<=c.len;L.clientX=n?k(c.translate(H,0,0,0,1,q)):x;L.negative=L.y<(r||0);L.category=f&&void 0!==f[L.x]?f[L.x]:L.x;L.isNull||(void 0!==E&&(J=Math.min(J,Math.abs(x-E))),E=x)}this.closestPointRangePx=J},getValidPoints:function(a,b){var c= -this.chart;return H(a||this.points||[],function(a){return b&&!c.isInsidePlot(a.plotX,a.plotY,c.inverted)?!1:!a.isNull})},setClip:function(a){var b=this.chart,c=this.options,e=b.renderer,f=b.inverted,d=this.clipBox,g=d||b.clipBox,h=this.sharedClipKey||["_sharedClip",a&&a.duration,a&&a.easing,g.height,c.xAxis,c.yAxis].join(),m=b[h],k=b[h+"m"];m||(a&&(g.width=0,b[h+"m"]=k=e.clipRect(-99,f?-b.plotLeft:-b.plotTop,99,f?b.chartWidth:b.chartHeight)),b[h]=m=e.clipRect(g),m.count={length:0});a&&!m.count[this.index]&& -(m.count[this.index]=!0,m.count.length+=1);!1!==c.clip&&(this.group.clip(a||d?m:b.clipRect),this.markerGroup.clip(k),this.sharedClipKey=h);a||(m.count[this.index]&&(delete m.count[this.index],--m.count.length),0===m.count.length&&h&&b[h]&&(d||(b[h]=b[h].destroy()),b[h+"m"]&&(b[h+"m"]=b[h+"m"].destroy())))},animate:function(a){var b=this.chart,c=A(this.options.animation),e;a?this.setClip(c):(e=this.sharedClipKey,(a=b[e])&&a.animate({width:b.plotSizeX},c),b[e+"m"]&&b[e+"m"].animate({width:b.plotSizeX+ -99},c),this.animate=null)},afterAnimate:function(){this.setClip();v(this,"afterAnimate")},drawPoints:function(){var a=this.points,b=this.chart,c,f,d,g,h=this.options.marker,m,k,l,q,n=this.markerGroup,r=I(h.enabled,this.xAxis.isRadial?!0:null,this.closestPointRangePx>2*h.radius);if(!1!==h.enabled||this._hasPointMarkers)for(f=a.length;f--;)d=a[f],c=d.plotY,g=d.graphic,m=d.marker||{},k=!!d.marker,l=r&&void 0===m.enabled||m.enabled,q=d.isInside,l&&e(c)&&null!==d.y?(c=I(m.symbol,this.symbol),d.hasImage= -0===c.indexOf("url"),l=this.markerAttribs(d,d.selected&&"select"),g?g[q?"show":"hide"](!0).animate(l):q&&(0 f&&b.shadow));g&&(g.startX=c.xMap, -g.isArea=c.isArea)})},applyZones:function(){var a=this,b=this.chart,c=b.renderer,e=this.zones,f,d,g=this.clips||[],h,m=this.graph,k=this.area,l=Math.max(b.chartWidth,b.chartHeight),q=this[(this.zoneAxis||"y")+"Axis"],n,r,x=b.inverted,v,E,u,L,J=!1;e.length&&(m||k)&&q&&void 0!==q.min&&(r=q.reversed,v=q.horiz,m&&m.hide(),k&&k.hide(),n=q.getExtremes(),t(e,function(e,p){f=r?v?b.plotWidth:0:v?0:q.toPixels(n.min);f=Math.min(Math.max(I(d,f),0),l);d=Math.min(Math.max(Math.round(q.toPixels(I(e.value,n.max), -!0)),0),l);J&&(f=d=q.toPixels(n.max));E=Math.abs(f-d);u=Math.min(f,d);L=Math.max(f,d);q.isXAxis?(h={x:x?L:u,y:0,width:E,height:l},v||(h.x=b.plotHeight-h.x)):(h={x:0,y:x?L:u,width:l,height:E},v&&(h.y=b.plotWidth-h.y));x&&c.isVML&&(h=q.isXAxis?{x:0,y:r?u:L,height:h.width,width:b.chartWidth}:{x:h.y-b.plotLeft-b.spacingBox.x,y:0,width:h.height,height:b.chartHeight});g[p]?g[p].animate(h):(g[p]=c.clipRect(h),m&&a["zone-graph-"+p].clip(g[p]),k&&a["zone-area-"+p].clip(g[p]));J=e.value>n.max}),this.clips= -g)},invertGroups:function(a){function b(){var b={width:c.yAxis.len,height:c.xAxis.len};t(["group","markerGroup"],function(e){c[e]&&c[e].attr(b).invert(a)})}var c=this,e;c.xAxis&&(e=C(c.chart,"resize",b),C(c,"destroy",e),b(a),c.invertGroups=b)},plotGroup:function(a,b,c,e,f){var d=this[a],g=!d;g&&(this[a]=d=this.chart.renderer.g(b).attr({zIndex:e||.1}).add(f),d.addClass("highcharts-series-"+this.index+" highcharts-"+this.type+"-series highcharts-color-"+this.colorIndex+" "+(this.options.className|| -"")));d.attr({visibility:c})[g?"attr":"animate"](this.getPlotBox());return d},getPlotBox:function(){var a=this.chart,b=this.xAxis,c=this.yAxis;a.inverted&&(b=c,c=this.xAxis);return{translateX:b?b.left:a.plotLeft,translateY:c?c.top:a.plotTop,scaleX:1,scaleY:1}},render:function(){var a=this,b=a.chart,c,e=a.options,f=!!a.animate&&b.renderer.isSVG&&A(e.animation).duration,d=a.visible?"inherit":"hidden",g=e.zIndex,h=a.hasRendered,m=b.seriesGroup,k=b.inverted;c=a.plotGroup("group","series",d,g,m);a.markerGroup= -a.plotGroup("markerGroup","markers",d,g,m);f&&a.animate(!0);c.inverted=a.isCartesian?k:!1;a.drawGraph&&(a.drawGraph(),a.applyZones());a.drawDataLabels&&a.drawDataLabels();a.visible&&a.drawPoints();a.drawTracker&&!1!==a.options.enableMouseTracking&&a.drawTracker();a.invertGroups(k);!1===e.clip||a.sharedClipKey||h||c.clip(b.clipRect);f&&a.animate();h||(a.animationTimeout=E(function(){a.afterAnimate()},f));a.isDirty=a.isDirtyData=!1;a.hasRendered=!0},redraw:function(){var a=this.chart,b=this.isDirty|| -this.isDirtyData,c=this.group,e=this.xAxis,f=this.yAxis;c&&(a.inverted&&c.attr({width:a.plotWidth,height:a.plotHeight}),c.animate({translateX:I(e&&e.left,a.plotLeft),translateY:I(f&&f.top,a.plotTop)}));this.translate();this.render();b&&delete this.kdTree},kdDimensions:1,kdAxisArray:["clientX","plotY"],searchPoint:function(a,b){var c=this.xAxis,e=this.yAxis,f=this.chart.inverted;return this.searchKDTree({clientX:f?c.len-a.chartY+c.pos:a.chartX-c.pos,plotY:f?e.len-a.chartX+e.pos:a.chartY-e.pos},b)}, -buildKDTree:function(){function a(c,e,f){var d,g;if(g=c&&c.length)return d=b.kdAxisArray[e%f],c.sort(function(a,b){return a[d]-b[d]}),g=Math.floor(g/2),{point:c[g],left:a(c.slice(0,g),e+1,f),right:a(c.slice(g+1),e+1,f)}}var b=this,c=b.kdDimensions;delete b.kdTree;E(function(){b.kdTree=a(b.getValidPoints(null,!b.directTouch),c,c)},b.options.kdNow?0:1)},searchKDTree:function(a,b){function c(a,b,h,m){var k=b.point,q=e.kdAxisArray[h%m],n,r,p=k;r=l(a[f])&&l(k[f])?Math.pow(a[f]-k[f],2):null;n=l(a[d])&& -l(k[d])?Math.pow(a[d]-k[d],2):null;n=(r||0)+(n||0);k.dist=l(n)?Math.sqrt(n):Number.MAX_VALUE;k.distX=l(r)?Math.sqrt(r):Number.MAX_VALUE;q=a[q]-k[q];n=0>q?"left":"right";r=0>q?"right":"left";b[n]&&(n=c(a,b[n],h+1,m),p=n[g] n;)r--;this.updateParallelArrays(k,"splice",r,0,0);this.updateParallelArrays(k,r);h&&k.name&&(h[n]=k.name);m.splice(r,0,a);l&&(this.data.splice(r,0,null),this.processData());"point"===b.legendType&&this.generatePoints();e&&(d[0]&&d[0].remove?d[0].remove(!1):(d.shift(),this.updateParallelArrays(k,"shift"),m.shift()));this.isDirtyData=this.isDirty=!0;c&&g.redraw(f)},removePoint:function(a, -c,e){var b=this,f=b.data,d=f[a],g=b.points,h=b.chart,m=function(){g&&g.length===f.length&&g.splice(a,1);f.splice(a,1);b.options.data.splice(a,1);b.updateParallelArrays(d||{series:b},"splice",a,1);d&&d.destroy();b.isDirty=!0;b.isDirtyData=!0;c&&h.redraw()};r(e,h);c=H(c,!0);d?d.firePointEvent("remove",null,m):m()},remove:function(a,c,e){function b(){f.destroy();d.isDirtyLegend=d.isDirtyBox=!0;d.linkSeries();H(a,!0)&&d.redraw(c)}var f=this,d=f.chart;!1!==e?t(f,"remove",null,b):b()},update:function(a, -c){var b=this,e=this.chart,f=this.userOptions,d=this.type,h=a.type||f.type||e.options.chart.type,k=m[d].prototype,q=["group","markerGroup","dataLabelsGroup"],r;if(h&&h!==d||void 0!==a.zIndex)q.length=0;g(q,function(a){q[a]=b[a];delete b[a]});a=v(f,{animation:!1,index:this.index,pointStart:this.xData[0]},{data:this.options.data},a);this.remove(!1,null,!1);for(r in k)this[r]=void 0;l(this,m[h||d].prototype);g(q,function(a){b[a]=q[a]});this.init(e,a);e.linkSeries();H(c,!0)&&e.redraw(!1)}});l(D.prototype, -{update:function(a,c){var b=this.chart;a=b.options[this.coll][this.options.index]=v(this.userOptions,a);this.destroy(!0);this.init(b,l(a,{events:void 0}));b.isDirtyBox=!0;H(c,!0)&&b.redraw()},remove:function(a){for(var b=this.chart,c=this.coll,e=this.series,f=e.length;f--;)e[f]&&e[f].remove(!1);u(b.axes,this);u(b[c],this);b.options[c].splice(this.options.index,1);g(b[c],function(a,b){a.options.index=b});this.destroy();b.isDirtyBox=!0;H(a,!0)&&b.redraw()},setTitle:function(a,c){this.update({title:a}, -c)},setCategories:function(a,c){this.update({categories:a},c)}})})(M);(function(a){var C=a.color,A=a.each,D=a.map,F=a.pick,k=a.Series,d=a.seriesType;d("area","line",{softThreshold:!1,threshold:0},{singleStacks:!1,getStackPoints:function(){var a=[],d=[],k=this.xAxis,t=this.yAxis,n=t.stacks[this.stackKey],f={},h=this.points,v=this.index,H=t.series,c=H.length,e,m=F(t.options.reversedStacks,!0)?1:-1,r,I;if(this.options.stacking){for(r=0;r
a&&l>d?(l=Math.max(a,d),n=2*d-l):lF&& -n>d?(n=Math.max(F,d),l=2*d-n):n =Math.abs(d)&&.5 a.closestPointRange*a.xAxis.transA,l=a.borderWidth=g(k.borderWidth,l?0:1),c=a.yAxis,e=a.translatedThreshold=c.getThreshold(k.threshold),m=g(k.minPointLength,5),r=a.getColumnMetrics(),n=r.width,b=a.barW=Math.max(n,1+2*l),q=a.pointXOffset= -r.offset;d.inverted&&(e-=.5);k.pointPadding&&(b=Math.ceil(b));u.prototype.translate.apply(a);D(a.points,function(f){var h=g(f.yBottom,e),k=999+Math.abs(h),k=Math.min(Math.max(-k,f.plotY),c.len+k),l=f.plotX+q,r=b,t=Math.min(k,h),x,v=Math.max(k,h)-t;Math.abs(v) m?h-m:e-(x?m:0));f.barX=l;f.pointWidth=n;f.tooltipPos=d.inverted?[c.len+c.pos-d.plotLeft-k,a.xAxis.len-l-r/2,v]:[l+r/2,k+c.pos-d.plotTop,v];f.shapeType="rect";f.shapeArgs= -a.crispCol.apply(a,f.isNull?[f.plotX,c.len/2,0,0]:[l,t,r,v])})},getSymbol:a.noop,drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,drawGraph:function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},pointAttribs:function(a,d){var f=this.options,g=this.pointAttrToOptions||{},c=g.stroke||"borderColor",e=g["stroke-width"]||"borderWidth",h=a&&a.color||this.color,k=a[c]||f[c]||this.color||h,g=f.dashStyle,l;a&&this.zones.length&&(h=(h=a.getZone())&&h.color||a.options.color|| -this.color);d&&(d=f.states[d],l=d.brightness,h=d.color||void 0!==l&&A(h).brighten(d.brightness).get()||h,k=d[c]||k,g=d.dashStyle||g);a={fill:h,stroke:k,"stroke-width":a[e]||f[e]||this[e]||0};f.borderRadius&&(a.r=f.borderRadius);g&&(a.dashstyle=g);return a},drawPoints:function(){var a=this,g=this.chart,l=a.options,n=g.renderer,c=l.animationLimit||250,e;D(a.points,function(f){var h=f.graphic;k(f.plotY)&&null!==f.y?(e=f.shapeArgs,h?(t(h),h[g.pointCount l;++l)t=g[l],a=2>l||2===l&&/%$/.test(t),g[l]=A(t,[d,F,u,g[2]][l])+(a?k:0);g[3]>g[2]&&(g[3]=g[2]);return g}}})(M);(function(a){var C=a.addEvent,A=a.defined,D=a.each,F=a.extend,k=a.inArray,d=a.noop,g=a.pick,u=a.Point,l=a.Series,t=a.seriesType,n=a.setAnimation;t("pie","line",{center:[null,null],clip:!1,colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return null===this.y? -void 0:this.point.name},x:0},ignoreHiddenPoint:!0,legendType:"point",marker:null,size:null,showInLegend:!1,slicedOffset:10,stickyTracking:!1,tooltip:{followPointer:!0},borderColor:"#ffffff",borderWidth:1,states:{hover:{brightness:.1,shadow:!1}}},{isCartesian:!1,requireSorting:!1,directTouch:!0,noSharedTooltip:!0,trackerGroups:["group","dataLabelsGroup"],axisTypes:[],pointAttribs:a.seriesTypes.column.prototype.pointAttribs,animate:function(a){var d=this,f=d.points,g=d.startAngleRad;a||(D(f,function(a){var c= -a.graphic,f=a.shapeArgs;c&&(c.attr({r:a.startR||d.center[3]/2,start:g,end:g}),c.animate({r:f.r,start:f.start,end:f.end},d.options.animation))}),d.animate=null)},updateTotals:function(){var a,d=0,g=this.points,k=g.length,c,e=this.options.ignoreHiddenPoint;for(a=0;a c.y&&(c.y=null),d+=e&&!c.visible?0:c.y;this.total=d;for(a=0;a 1.5*Math.PI?l-=2*Math.PI:l<-Math.PI/2&&(l+=2*Math.PI);J.slicedTranslation={translateX:Math.round(Math.cos(l)*k),translateY:Math.round(Math.sin(l)*k)};e=Math.cos(l)*a[2]/2;m=Math.sin(l)*a[2]/2;J.tooltipPos=[a[0]+.7*e,a[1]+.7*m];J.half=l<-Math.PI/2||l>Math.PI/2?1:0;J.angle=l;c=Math.min(c,t/5);J.labelPos=[a[0]+e+Math.cos(l)*t,a[1]+m+Math.sin(l)*t,a[0]+e+Math.cos(l)*c,a[1]+m+Math.sin(l)* -c,a[0]+e,a[1]+m,0>t?"center":J.half?"right":"left",l]}},drawGraph:null,drawPoints:function(){var a=this,d=a.chart.renderer,g,k,c,e,m=a.options.shadow;m&&!a.shadowGroup&&(a.shadowGroup=d.g("shadow").add(a.group));D(a.points,function(f){if(null!==f.y){k=f.graphic;e=f.shapeArgs;g=f.sliced?f.slicedTranslation:{};var h=f.shadowGroup;m&&!h&&(h=f.shadowGroup=d.g("shadow").add(a.shadowGroup));h&&h.attr(g);c=a.pointAttribs(f,f.selected&&"select");k?k.setRadialReference(a.center).attr(c).animate(F(e,g)):(f.graphic= -k=d[f.shapeType](e).addClass(f.getClassName()).setRadialReference(a.center).attr(g).add(a.group),f.visible||k.attr({visibility:"hidden"}),k.attr(c).attr({"stroke-linejoin":"round"}).shadow(m,h))}})},searchPoint:d,sortByAngle:function(a,d){a.sort(function(a,f){return void 0!==a.angle&&(f.angle-a.angle)*d})},drawLegendSymbol:a.LegendSymbolMixin.drawRectangle,getCenter:a.CenteredSeriesMixin.getCenter,getSymbol:d},{init:function(){u.prototype.init.apply(this,arguments);var a=this,d;a.name=g(a.name,"Slice"); -d=function(d){a.slice("select"===d.type)};C(a,"select",d);C(a,"unselect",d);return a},setVisible:function(a,d){var f=this,h=f.series,c=h.chart,e=h.options.ignoreHiddenPoint;d=g(d,e);a!==f.visible&&(f.visible=f.options.visible=a=void 0===a?!f.visible:a,h.options.data[k(f,h.data)]=f.options,D(["graphic","dataLabel","connector","shadowGroup"],function(c){if(f[c])f[c][a?"show":"hide"](!0)}),f.legendItem&&c.legend.colorizeItem(f,a),a||"hover"!==f.state||f.setState(""),e&&(h.isDirty=!0),d&&c.redraw())}, -slice:function(a,d,l){var f=this.series;n(l,f.chart);g(d,!0);this.sliced=this.options.sliced=a=A(a)?a:!this.sliced;f.options.data[k(this,f.data)]=this.options;a=a?this.slicedTranslation:{translateX:0,translateY:0};this.graphic.animate(a);this.shadowGroup&&this.shadowGroup.animate(a)},haloPath:function(a){var d=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(d.x,d.y,d.r+a,d.r+a,{innerR:this.shapeArgs.r,start:d.start,end:d.end})}})})(M);(function(a){var C= -a.addEvent,A=a.arrayMax,D=a.defined,F=a.each,k=a.extend,d=a.format,g=a.map,u=a.merge,l=a.noop,t=a.pick,n=a.relativeLength,f=a.Series,h=a.seriesTypes,v=a.stableSort,H=a.stop;a.distribute=function(a,d){function c(a,b){return a.target-b.target}var e,f=!0,b=a,h=[],k;k=0;for(e=a.length;e--;)k+=a[e].size;if(k>d){v(a,function(a,b){return(b.rank||0)-(a.rank||0)});for(k=e=0;k<=d;)k+=a[e].size,e++;h=a.splice(e-1,a.length)}v(a,c);for(a=g(a,function(a){return{size:a.size,targets:[a.target]}});f;){for(e=a.length;e--;)f= -a[e],k=(Math.min.apply(0,f.targets)+Math.max.apply(0,f.targets))/2,f.pos=Math.min(Math.max(0,k-f.size/2),d-f.size);e=a.length;for(f=!1;e--;)0 a[e].pos&&(a[e-1].size+=a[e].size,a[e-1].targets=a[e-1].targets.concat(a[e].targets),a[e-1].pos+a[e-1].size>d&&(a[e-1].pos=d-a[e-1].size),a.splice(e,1),f=!0)}e=0;F(a,function(a){var c=0;F(a.targets,function(){b[e].pos=a.pos+c;c+=b[e].size;e++})});b.push.apply(b,h);v(b,c)};f.prototype.drawDataLabels=function(){var a=this,e=a.options, -f=e.dataLabels,g=a.points,h,b,l=a.hasRendered||0,n,v,E=t(f.defer,!0),J=a.chart.renderer;if(f.enabled||a._hasPointLabels)a.dlProcessOptions&&a.dlProcessOptions(f),v=a.plotGroup("dataLabelsGroup","data-labels",E&&!l?"hidden":"visible",f.zIndex||6),E&&(v.attr({opacity:+l}),l||C(a,"afterAnimate",function(){a.visible&&v.show(!0);v[e.animation?"animate":"attr"]({opacity:1},{duration:200})})),b=f,F(g,function(c){var g,m=c.dataLabel,l,q,r=c.connector,x=!0,w,E={};h=c.dlOptions||c.options&&c.options.dataLabels; -g=t(h&&h.enabled,b.enabled)&&null!==c.y;if(m&&!g)c.dataLabel=m.destroy();else if(g){f=u(b,h);w=f.style;g=f.rotation;l=c.getLabelConfig();n=f.format?d(f.format,l):f.formatter.call(l,f);w.color=t(f.color,w.color,a.color,"#000000");if(m)D(n)?(m.attr({text:n}),x=!1):(c.dataLabel=m=m.destroy(),r&&(c.connector=r.destroy()));else if(D(n)){m={fill:f.backgroundColor,stroke:f.borderColor,"stroke-width":f.borderWidth,r:f.borderRadius||0,rotation:g,padding:f.padding,zIndex:1};"contrast"===w.color&&(E.color=f.inside|| -0>f.distance||e.stacking?J.getContrast(c.color||a.color):"#000000");e.cursor&&(E.cursor=e.cursor);for(q in m)void 0===m[q]&&delete m[q];m=c.dataLabel=J[g?"text":"label"](n,0,-9999,f.shape,null,null,f.useHTML,null,"data-label").attr(m);m.addClass("highcharts-data-label-color-"+c.colorIndex+" "+(f.className||""));m.css(k(w,E));m.add(v);m.shadow(f.shadow)}m&&a.alignDataLabel(c,m,f,null,x)}})};f.prototype.alignDataLabel=function(a,e,d,f,g){var b=this.chart,c=b.inverted,h=t(a.plotX,-9999),m=t(a.plotY, --9999),l=e.getBBox(),n,r=d.rotation,u=d.align,v=this.visible&&(a.series.forceDL||b.isInsidePlot(h,Math.round(m),c)||f&&b.isInsidePlot(h,c?f.x+1:f.y+f.height-1,c)),A="justify"===t(d.overflow,"justify");v&&(n=d.style.fontSize,n=b.renderer.fontMetrics(n,e).b,f=k({x:c?b.plotWidth-m:h,y:Math.round(c?b.plotHeight-h:m),width:0,height:0},f),k(d,{width:l.width,height:l.height}),r?(A=!1,c=b.renderer.rotCorr(n,r),c={x:f.x+d.x+f.width/2+c.x,y:f.y+d.y+{top:0,middle:.5,bottom:1}[d.verticalAlign]*f.height},e[g? -"attr":"animate"](c).attr({align:u}),h=(r+720)%360,h=180 h,"left"===u?c.y-=h?l.height:0:"center"===u?(c.x-=l.width/2,c.y-=l.height/2):"right"===u&&(c.x-=l.width,c.y-=h?0:l.height)):(e.align(d,null,f),c=e.alignAttr),A?this.justifyDataLabel(e,d,c,l,f,g):t(d.crop,!0)&&(v=b.isInsidePlot(c.x,c.y)&&b.isInsidePlot(c.x+l.width,c.y+l.height)),d.shape&&!r&&e.attr({anchorX:a.plotX,anchorY:a.plotY}));v||(H(e),e.attr({y:-9999}),e.placed=!1)};f.prototype.justifyDataLabel=function(a,d,f,g,h,b){var c=this.chart, -e=d.align,k=d.verticalAlign,m,l,n=a.box?0:a.padding||0;m=f.x+n;0>m&&("right"===e?d.align="left":d.x=-m,l=!0);m=f.x+g.width-n;m>c.plotWidth&&("left"===e?d.align="right":d.x=c.plotWidth-m,l=!0);m=f.y+n;0>m&&("bottom"===k?d.verticalAlign="top":d.y=-m,l=!0);m=f.y+g.height-n;m>c.plotHeight&&("top"===k?d.verticalAlign="bottom":d.y=c.plotHeight-m,l=!0);l&&(a.placed=!b,a.align(d,null,h))};h.pie&&(h.pie.prototype.drawDataLabels=function(){var c=this,d=c.data,h,k=c.chart,l=c.options.dataLabels,b=t(l.connectorPadding, -10),q=t(l.connectorWidth,1),n=k.plotWidth,u=k.plotHeight,v,J=l.distance,w=c.center,C=w[2]/2,G=w[1],D=0 m-2?t:M,e),p._attr={visibility:Q,align:H[6]},p._pos={x:z+l.x+({left:b,right:-b}[H[6]]||0),y:M+l.y-10},H.x=z,H.y=M,null===c.options.size&&(y=p.width,z-yn-b&&(T[1]=Math.max(Math.round(z+ -y-n+b),T[1])),0>M-O/2?T[0]=Math.max(Math.round(-M+O/2),T[0]):M+O/2>u&&(T[2]=Math.max(Math.round(M+O/2-u),T[2])))}),0===A(T)||this.verifyDataLabelOverflow(T))&&(this.placeDataLabels(),D&&q&&F(this.points,function(a){var b;v=a.connector;if((p=a.dataLabel)&&p._pos&&a.visible){Q=p._attr.visibility;if(b=!v)a.connector=v=k.renderer.path().addClass("highcharts-data-label-connector highcharts-color-"+a.colorIndex).add(c.dataLabelsGroup),v.attr({"stroke-width":q,stroke:l.connectorColor||a.color||"#666666"}); -v[b?"attr":"animate"]({d:c.connectorPath(a.labelPos)});v.attr("visibility",Q)}else v&&(a.connector=v.destroy())}))},h.pie.prototype.connectorPath=function(a){var c=a.x,d=a.y;return t(this.options.dataLabels.softConnector,!0)?["M",c+("left"===a[6]?5:-5),d,"C",c,d,2*a[2]-a[4],2*a[3]-a[5],a[2],a[3],"L",a[4],a[5]]:["M",c+("left"===a[6]?5:-5),d,"L",a[2],a[3],"L",a[4],a[5]]},h.pie.prototype.placeDataLabels=function(){F(this.points,function(a){var c=a.dataLabel;c&&a.visible&&((a=c._pos)?(c.attr(c._attr), -c[c.moved?"animate":"attr"](a),c.moved=!0):c&&c.attr({y:-9999}))})},h.pie.prototype.alignDataLabel=l,h.pie.prototype.verifyDataLabelOverflow=function(a){var c=this.center,d=this.options,f=d.center,g=d.minSize||80,b,h;null!==f[0]?b=Math.max(c[2]-Math.max(a[1],a[3]),g):(b=Math.max(c[2]-a[1]-a[3],g),c[0]+=(a[3]-a[1])/2);null!==f[1]?b=Math.max(Math.min(b,c[2]-Math.max(a[0],a[2])),g):(b=Math.max(Math.min(b,c[2]-a[0]-a[2]),g),c[1]+=(a[0]-a[2])/2);b t(this.translatedThreshold,c.yAxis.len)),m=t(g.inside,!!this.options.stacking);e&&(h=u(e),0>h.y&&(h.height+=h.y,h.y=0),e=h.y+h.height-c.yAxis.len,0 a+d||b+hc+f||g+k this.pointCount))},pan:function(a,c){var b=this,d=b.hoverPoints, -e;d&&g(d,function(a){a.setState()});g("xy"===c?[1,0]:[1],function(c){c=b[c?"xAxis":"yAxis"][0];var d=c.horiz,f=a[d?"chartX":"chartY"],d=d?"mouseDownX":"mouseDownY",g=b[d],h=(c.pointRange||0)/2,k=c.getExtremes(),l=c.toValue(g-f,!0)+h,h=c.toValue(g+c.len-f,!0)-h,g=g>f;c.series.length&&(g||l>Math.min(k.dataMin,k.min))&&(!g||h =k(t.minWidth,0)&&this.chartHeight>=k(t.minHeight,0)};void 0===d._id&&(d._id=a.uniqueKey());n=n.call(this);!g[d._id]&&n?d.chartOptions&&(g[d._id]=this.currentOptions(d.chartOptions),this.update(d.chartOptions,u)):g[d._id]&&!n&&(this.update(g[d._id],u),delete g[d._id])};C.prototype.currentOptions=function(a){function g(a,k,f){var h,l;for(h in a)if(-1< -D(h,["series","xAxis","yAxis"]))for(a[h]=d(a[h]),f[h]=[],l=0;l