p&&1/0!==t&&1/0!==s&&p&&(e=Math.ceil(p/o)),c(e*o)};return r?(i=!n.staggerLines&&!n.step&&(h(l)?[l]:s=i){var n=(e=f(Math.abs(u.h/Math.sin(A*i))))+Math.abs(i/360);n(r.step||0))return r.rotation?0:(this.staggerLines||1)*this.len/o;if(!n){if(void 0!==(t=null===(e=null===r||void 0===r?void 0:r.style)||void 0===e?void 0:e.width))return parseInt(t,10);if(a)return a-i.spacing[3]}return.33*i.chartWidth},n.prototype.renderUnsquish=function(){var t=this.chart,e=t.renderer,i=this.tickPositions,n=this.ticks,r=this.options.labels,o=r&&r.style||{},a=this.horiz,s=this.getSlotWidth(),l=Math.max(1,Math.round(s-2*(r.padding||5))),u={},c=this.labelMetrics(),h=r.style&&r.style.textOverflow,d=0;if(w(r.rotation)||(u.rotation=r.rotation||0),i.forEach(function(t){(t=n[t]).movedLabel&&t.replaceMovedLabel(),t&&t.label&&t.label.textPxLength>d&&(d=t.label.textPxLength)}),this.maxLabelLength=d,this.autoRotation)d>l&&d>c.h?u.rotation=this.labelRotation:this.labelRotation=0;else if(s){var p=l;if(!h){var f="clip";for(l=i.length;!a&&l--;){var g=i[l];(g=n[g].label)&&(g.styles&&"ellipsis"===g.styles.textOverflow?g.css({textOverflow:"clip"}):g.textPxLength>s&&g.css({width:s+"px"}),g.getBBox().height>this.len/i.length-(c.h-c.f)&&(g.specificTextOverflow="ellipsis"))}}}u.rotation&&(p=d>.5*t.chartHeight?.33*t.chartHeight:d,h||(f="ellipsis")),(this.labelAlign=r.align||this.autoLabelAlign(this.labelRotation))&&(u.align=this.labelAlign),i.forEach(function(t){var e=(t=n[t])&&t.label,i=o.width,r={};e&&(e.attr(u),t.shortenLabel?t.shortenLabel():p&&!i&&"nowrap"!==o.whiteSpace&&(p=this.min&&t<=this.max)&&(r[t]||(r[t]=new i(this,t)),o&&r[t].isNew&&r[t].render(e,!0,-1),r[t].render(e))},n.prototype.render=function(){var t,n,r=this,o=r.chart,s=r.logarithmic,l=r.options,u=r.isLinked,c=r.tickPositions,h=r.axisTitle,d=r.ticks,p=r.minorTicks,f=r.alternateBands,m=l.stackLabels,y=l.alternateGridColor,v=r.tickmarkOffset,b=r.axisLine,w=r.showAxis,_=a(o.renderer.globalAnimation);r.labelEdge.length=0,r.overlap=!1,[d,p,f].forEach(function(t){k(t,function(t){t.isActive=!1})}),(r.hasData()||u)&&(r.minorTickInterval&&!r.categories&&r.getMinorTickPositions().forEach(function(t){r.renderMinorTick(t)}),c.length&&(c.forEach(function(t,e){r.renderTick(t,e)}),v&&(0===r.min||r.single)&&(d[-1]||(d[-1]=new i(r,-1,null,!0)),d[-1].render(-1))),y&&c.forEach(function(i,a){n="undefined"!==typeof c[a+1]?c[a+1]+v:r.max-v,0===a%2&&ie&&(!a||g<=i)&&"undefined"!==typeof g&&c.push(g),g>i&&(d=!0);var g=f}}}else e=this.lin2log(e),i=this.lin2log(i),t=a?s.getMinorTickInterval():u.tickInterval,t=o("auto"===t?null:t,this.minorAutoInterval,u.tickPixelInterval/(a?5:1)*(i-e)/((a?l/s.tickPositions.length:l)||1)),t=r(t,void 0,n(t)),c=s.getLinearTickPositions(t,e,i).map(this.log2lin),a||(this.minorAutoInterval=t/5);return a||(s.tickInterval=t),c},t.prototype.lin2log=function(t){return Math.pow(10,t)},t.prototype.log2lin=function(t){return Math.log(t)/Math.LN10},t}();return(e=function(){function t(){}return t.compose=function(t){t.keepProps.push("logarithmic");var e=t.prototype,n=a.prototype;e.log2lin=n.log2lin,e.lin2log=n.lin2log,i(t,"init",function(t){var e=this.logarithmic;"logarithmic"!==t.userOptions.type?this.logarithmic=void 0:(e||(e=this.logarithmic=new a(this)),this.log2lin!==e.log2lin&&(e.log2lin=this.log2lin.bind(this)),this.lin2log!==e.lin2log&&(e.lin2log=this.lin2log.bind(this)))}),i(t,"afterInit",function(){var t=this.logarithmic;t&&(this.lin2val=function(e){return t.lin2log(e)},this.val2lin=function(e){return t.log2lin(e)})})},t}()).compose(t),e}),e(i,"parts/PlotLineOrBand.js",[i["parts/Axis.js"],i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e,i){var n=i.arrayMax,r=i.arrayMin,o=i.defined,a=i.destroyObjectProperties,s=i.erase,l=i.extend,u=i.merge,c=i.objectEach,h=i.pick,d=function(){function t(t,e){this.axis=t,e&&(this.options=e,this.id=e.id)}return t.prototype.render=function(){e.fireEvent(this,"render");var t=this,i=t.axis,n=i.horiz,r=i.logarithmic,a=t.options,s=a.label,l=t.label,d=a.to,p=a.from,f=a.value,g=o(p)&&o(d),m=o(f),y=t.svgElem,v=!y,b=[],x=a.color,w=h(a.zIndex,0),_=a.events;b={class:"highcharts-plot-"+(g?"band ":"line ")+(a.className||"")};var S={},k=i.chart.renderer,P=g?"bands":"lines";if(r&&(p=r.log2lin(p),d=r.log2lin(d),f=r.log2lin(f)),i.chart.styledMode||(m?(b.stroke=x||"#999999",b["stroke-width"]=h(a.width,1),a.dashStyle&&(b.dashstyle=a.dashStyle)):g&&(b.fill=x||"#e6ebf5",a.borderWidth&&(b.stroke=a.borderColor,b["stroke-width"]=a.borderWidth))),S.zIndex=w,P+="-"+w,(r=i.plotLinesAndBandsGroups[P])||(i.plotLinesAndBandsGroups[P]=r=k.g("plot-"+P).attr(S).add()),v&&(t.svgElem=y=k.path().attr(b).add(r)),m)b=i.getPlotLinePath({value:f,lineWidth:y.strokeWidth(),acrossPanes:a.acrossPanes});else{if(!g)return;b=i.getPlotBandPath(p,d,a)}return!t.eventsAdded&&_&&(c(_,function(e,i){y.on(i,function(e){_[i].apply(t,[e])})}),t.eventsAdded=!0),(v||!y.d)&&b&&b.length?y.attr({d:b}):y&&(b?(y.show(!0),y.animate({d:b})):y.d&&(y.hide(),l&&(t.label=l=l.destroy()))),s&&(o(s.text)||o(s.formatter))&&b&&b.length&&0this.max&&e>this.max,n&&i){if(t){var s=n.toString()===i.toString();a=0}for(t=0;tt){l=s;break}if(a[l]&&o.substr(a[l])!=="01-01 00:00:00.000".substr(a[l]))break;"week"!==l&&(s=l)}if(l)var u=r.resolveDTLFormat(n[l]).main;return u},y.prototype.getLabel=function(){var e,i,n,a=this,s=this.chart.renderer,l=this.chart.styledMode,u=this.options,c="tooltip"+(o(u.className)?" "+u.className:""),h=(null===(e=u.style)||void 0===e?void 0:e.pointerEvents)||(!this.followPointer&&u.stickOnContact?"auto":"none");e=function(){a.inContact=!0};if(!this.label){if(this.outside&&(this.container=n=t.doc.createElement("div"),n.className="highcharts-tooltip-container",r(n,{position:"absolute",top:"1px",pointerEvents:h,zIndex:3}),t.doc.body.appendChild(n),this.renderer=s=new t.Renderer(n,0,0,null===(i=this.chart.options.chart)||void 0===i?void 0:i.style,void 0,void 0,s.styledMode)),this.split?this.label=s.g(c):(this.label=s.label("",0,0,u.shape||"callout",null,null,u.useHTML,null,c).attr({padding:u.padding,r:u.borderRadius}),l||this.label.attr({fill:u.backgroundColor,"stroke-width":u.borderWidth}).css(u.style).css({pointerEvents:h}).shadow(u.shadow)),l&&(this.applyFilter(),this.label.addClass("highcharts-tooltip-"+this.chart.index)),a.outside&&!a.split){var d=this.label,p=d.xSetter,f=d.ySetter;d.xSetter=function(t){p.call(d,a.distance),n.style.left=t+"px"},d.ySetter=function(t){f.call(d,a.distance),n.style.top=t+"px"}}this.label.on("mouseenter",e).on("mouseleave",function(){var t=a.chart.hoverSeries;a.inContact=!1,t&&t.onMouseOut&&t.onMouseOut()}).attr({zIndex:8}).add()}return this.label},y.prototype.getPosition=function(t,e,n){var r,o=this.chart,a=this.distance,s={},l=o.inverted&&n.h||0,u=this.outside,c=u?i.documentElement.clientWidth-2*a:o.chartWidth,h=u?Math.max(i.body.scrollHeight,i.documentElement.scrollHeight,i.body.offsetHeight,i.documentElement.offsetHeight,i.documentElement.clientHeight):o.chartHeight,d=o.pointer.getChartPosition(),f=o.containerScaling,g=function(t){return f?t*f.scaleX:t},m=function(t){return f?t*f.scaleY:t},y=function(i){var r="x"===i;return[i,r?c:h,r?t:e].concat(u?[r?g(t):m(e),r?d.left-a+g(n.plotX+o.plotLeft):d.top-a+m(n.plotY+o.plotTop),0,r?c:h]:[r?t:e,r?n.plotX+o.plotLeft:n.plotY+o.plotTop,r?o.plotLeft:o.plotTop,r?o.plotLeft+o.plotWidth:o.plotTop+o.plotHeight])},v=y("y"),b=y("x"),x=!this.followPointer&&p(n.ttBelow,!o.inverted===!!n.negative),w=function(t){var e=v;v=b,b=e,r=t};return(o.inverted||1f-l?f:f-l);else{if(!p)return!1;s[t]=Math.max(o,r+l+i>e?r:r+l)}}.apply(0,v)?!1!==function(t,e,i,n,r){var o;return re-a?o=!1:s[t]=re-n/2?e-n-2:r-i/2,o}.apply(0,b)||r||(w(!0),t()):r?s.x=s.y=0:(w(!0),t())}(),s},y.prototype.getXDateFormat=function(t,e,i){e=e.dateTimeLabelFormats;var n=i&&i.closestPointRange;return(n?this.getDateFormat(n,t.x,i.options.startOfWeek,e):e.day)||e.year},y.prototype.hide=function(t){var i=this;e.clearTimeout(this.hideTimer),t=p(t,this.options.hideDelay,500),this.isHidden||(this.hideTimer=g(function(){i.getLabel().fadeOut(t?void 0:t),i.isHidden=!0},t))},y.prototype.init=function(t,e){this.chart=t,this.options=e,this.crosshairs=[],this.now={x:0,y:0},this.isHidden=!0,this.split=e.split&&!t.inverted&&!t.polar,this.shared=e.shared||this.split,this.outside=p(e.outside,!(!t.scrollablePixelsX&&!t.scrollablePixelsY))},y.prototype.isStickyOnContact=function(){return!(this.followPointer||!this.options.stickOnContact||!this.inContact)},y.prototype.move=function(t,i,n,r){var o=this,a=o.now,l=!1!==o.options.animation&&!o.isHidden&&(1=b+d&&E.pos+v<=b+d+u-y&&(A=E.pos+v);m=n(m,k.left-w,k.right+w),"number"===typeof A?(f=f.height+1,v=S?S.call(o,l,f,a):r(m,A,s,l),t.push({align:S?0:void 0,anchorX:m,anchorY:A,boxWidth:l,point:a,rank:p(v.rank,s?1:0),size:f,target:v.y,tt:e,x:v.x})):e.isActive=!1}return t},[]),!S&&e.some(function(t){return t.xi[0]?Math.max(Math.abs(i[0]),r.width-i[0]):Math.max(Math.abs(i[0]),r.width),n.height=0>i[1]?Math.max(Math.abs(i[1]),r.height-Math.abs(i[1])):Math.max(Math.abs(i[1]),r.height),this.tracker?this.tracker.attr(n):(this.tracker=e.renderer.rect(n).addClass("highcharts-tracker").add(e),t.styledMode||this.tracker.attr({fill:"rgba(0,0,0,0)"}))}}},y.prototype.styledModeFormat=function(t){return t.replace('style="font-size: 10px"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,'class="highcharts-color-{$1.colorIndex}"')},y.prototype.tooltipFooterHeaderFormatter=function(t,e){var i=e?"footer":"header",n=t.series,r=n.tooltipOptions,o=r.xDateFormat,a=n.xAxis,s=a&&"datetime"===a.options.type&&c(t.key),h=r[i+"Format"];return l(this,"headerFormatter",e={isFooter:e,labelConfig:t},function(e){s&&!o&&(o=this.getXDateFormat(t,r,a)),s&&o&&(t.point&&t.point.tooltipDateKeys||["key"]).forEach(function(t){h=h.replace("{point."+t+"}","{point."+t+":"+o+"}")}),n.chart.styledMode&&(h=this.styledModeFormat(h)),e.text=u(h,{point:t,series:n},this.chart)}),e.text},y.prototype.update=function(t){this.destroy(),d(!0,this.chart.options.tooltip.userOptions,t),this.init(this.chart,d(!0,this.options,t))},y.prototype.updatePosition=function(t){var e=this.chart,i=e.pointer,n=this.getLabel(),o=t.plotX+e.plotLeft,a=t.plotY+e.plotTop;if(i=i.getChartPosition(),t=(this.options.positioner||this.getPosition).call(this,n.width,n.height,t),this.outside){var s=(this.options.borderWidth||0)+2*this.distance;this.renderer.setSize(n.width+s,n.height+s,!1),(e=e.containerScaling)&&(r(this.container,{transform:"scale("+e.scaleX+", "+e.scaleY+")"}),o*=e.scaleX,a*=e.scaleY),o+=i.left-t.x,a+=i.top-t.y}this.move(Math.round(t.x),Math.round(t.y||0),o,a)},y}();return t.Tooltip=y,t.Tooltip}),e(i,"parts/Pointer.js",[i["parts/Color.js"],i["parts/Globals.js"],i["parts/Tooltip.js"],i["parts/Utilities.js"]],function(t,e,i,n){var r=t.parse,o=e.charts,a=e.noop,s=n.addEvent,l=n.attr,u=n.css,c=n.defined,h=n.extend,d=n.find,p=n.fireEvent,f=n.isNumber,g=n.isObject,m=n.objectEach,y=n.offset,v=n.pick,b=n.splat;return t=function(){function t(t,e){this.lastValidTouch={},this.pinchDown=[],this.runChartClick=!1,this.chart=t,this.hasDragged=!1,this.options=e,this.unbindContainerMouseLeave=function(){},this.init(t,e)}return t.prototype.applyInactiveState=function(t){var e,i=[];(t||[]).forEach(function(t){e=t.series,i.push(e),e.linkedParent&&i.push(e.linkedParent),e.linkedSeries&&(i=i.concat(e.linkedSeries)),e.navigatorSeries&&i.push(e.navigatorSeries)}),this.chart.series.forEach(function(t){-1===i.indexOf(t)?t.setState("inactive",!0):t.options.inactiveOtherPoints&&t.setAllPointsToState("inactive")})},t.prototype.destroy=function(){var t=this;"undefined"!==typeof t.unDocMouseMove&&t.unDocMouseMove(),this.unbindContainerMouseLeave(),e.chartCount||(e.unbindDocumentMouseUp&&(e.unbindDocumentMouseUp=e.unbindDocumentMouseUp()),e.unbindDocumentTouchEnd&&(e.unbindDocumentTouchEnd=e.unbindDocumentTouchEnd())),clearInterval(t.tooltipTimeout),m(t,function(e,i){t[i]=void 0})},t.prototype.drag=function(t){var e=this.chart,i=e.options.chart,n=t.chartX,o=t.chartY,a=this.zoomHor,s=this.zoomVert,l=e.plotLeft,u=e.plotTop,c=e.plotWidth,h=e.plotHeight,d=this.selectionMarker,p=this.mouseDownX||0,f=this.mouseDownY||0,m=g(i.panning)?i.panning&&i.panning.enabled:i.panning,y=i.panKey&&t[i.panKey+"Key"];if((!d||!d.touch)&&(nl+c&&(n=l+c),ou+h&&(o=u+h),this.hasDragged=Math.sqrt(Math.pow(p-n,2)+Math.pow(f-o,2)),10t.options.findNearestPointBy.indexOf("y");if(t=t.searchPoint(i,r),(r=g(t,!0))&&!(r=!g(n,!0))){r=n.distX-t.distX;var o=n.dist-t.dist,a=(t.series.group&&t.series.group.zIndex)-(n.series.group&&n.series.group.zIndex);r=0<(0!==r&&e?r:0!==o?o:0!==a?a:n.series.index>t.series.index?-1:1)}r&&(n=t)}),n)},t.prototype.getChartCoordinatesFromPoint=function(t,e){var i=t.series,n=i.xAxis;i=i.yAxis;var r=v(t.clientX,t.plotX),o=t.shapeArgs;return n&&i?e?{chartX:n.len+n.pos-r,chartY:i.len+i.pos-t.plotY}:{chartX:r+n.pos,chartY:t.plotY+i.pos}:o&&o.x&&o.y?{chartX:o.x,chartY:o.y}:void 0},t.prototype.getChartPosition=function(){return this.chartPosition||(this.chartPosition=y(this.chart.container))},t.prototype.getCoordinates=function(t){var e={xAxis:[],yAxis:[]};return this.chart.axes.forEach(function(i){e[i.isXAxis?"xAxis":"yAxis"].push({axis:i,value:i.toValue(t[i.horiz?"chartX":"chartY"])})}),e},t.prototype.getHoverData=function(t,e,i,n,r,o){var a,s=[];n=!(!n||!t);var l=e&&!e.stickyTracking,u={chartX:o?o.chartX:void 0,chartY:o?o.chartY:void 0,shared:r};return p(this,"beforeGetHoverData",u),l=l?[e]:i.filter(function(t){return u.filter?u.filter(t):t.visible&&!(!r&&t.directTouch)&&v(t.options.enableMouseTracking,!0)&&t.stickyTracking}),e=(a=n||!o?t:this.findNearestKDPoint(l,r,o))&&a.series,a&&(r&&!e.noSharedTooltip?(l=i.filter(function(t){return u.filter?u.filter(t):t.visible&&!(!r&&t.directTouch)&&v(t.options.enableMouseTracking,!0)&&!t.noSharedTooltip})).forEach(function(t){var e=d(t.points,function(t){return t.x===a.x&&!t.isNull});g(e)&&(t.chart.isBoosting&&(e=t.getPoint(e)),s.push(e))}):s.push(a)),p(this,"afterGetHoverData",u={hoverPoint:a}),{hoverPoint:u.hoverPoint,hoverSeries:e,hoverPoints:s}},t.prototype.getPointFromEvent=function(t){t=t.target;for(var e;t&&!e;)e=t.point,t=t.parentNode;return e},t.prototype.onTrackerMouseOut=function(t){t=t.relatedTarget||t.toElement;var e=this.chart.hoverSeries;this.isDirectTouch=!1,!e||!t||e.stickyTracking||this.inClass(t,"highcharts-tooltip")||this.inClass(t,"highcharts-series-"+e.index)&&this.inClass(t,"highcharts-tracker")||e.onMouseOut()},t.prototype.inClass=function(t,e){for(var i;t;){if(i=l(t,"class")){if(-1!==i.indexOf(e))return!0;if(-1!==i.indexOf("highcharts-container"))return!1}t=t.parentNode}},t.prototype.init=function(t,e){this.options=e,this.chart=t,this.runChartClick=e.chart.events&&!!e.chart.events.click,this.pinchDown=[],this.lastValidTouch={},i&&(t.tooltip=new i(t,e.tooltip),this.followTouchMove=v(e.tooltip.followTouchMove,!0)),this.setDOMEvents()},t.prototype.normalize=function(t,e){var i=t.touches,n=i?i.length?i.item(0):v(i.changedTouches,t.changedTouches)[0]:t;return e||(e=this.getChartPosition()),i=n.pageX-e.left,e=n.pageY-e.top,(n=this.chart.containerScaling)&&(i/=n.scaleX,e/=n.scaleY),h(t,{chartX:Math.round(i),chartY:Math.round(e)})},t.prototype.onContainerClick=function(t){var e=this.chart,i=e.hoverPoint;t=this.normalize(t);var n=e.plotLeft,r=e.plotTop;e.cancelClick||(i&&this.inClass(t.target,"highcharts-tracker")?(p(i.series,"click",h(t,{point:i})),e.hoverPoint&&i.firePointEvent("click",t)):(h(t,this.getCoordinates(t)),e.isInsidePlot(t.chartX-n,t.chartY-r)&&p(e,"click",t)))},t.prototype.onContainerMouseDown=function(t){t=this.normalize(t),e.isFirefox&&0!==t.button&&this.onContainerMouseMove(t),"undefined"!==typeof t.button&&1!==(1&(t.buttons||t.button))||(this.zoomOption(t),this.dragStart(t))},t.prototype.onContainerMouseLeave=function(t){var i=o[v(e.hoverChartIndex,-1)],n=this.chart.tooltip;t=this.normalize(t),i&&(t.relatedTarget||t.toElement)&&(i.pointer.reset(),i.pointer.chartPosition=void 0),n&&!n.isHidden&&this.reset()},t.prototype.onContainerMouseMove=function(t){var e=this.chart;t=this.normalize(t),this.setHoverChartIndex(),t.preventDefault||(t.returnValue=!1),"mousedown"===e.mouseIsDown&&this.drag(t),e.openMenu||!this.inClass(t.target,"highcharts-tracker")&&!e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)||this.runPointActions(t)},t.prototype.onDocumentTouchEnd=function(t){o[e.hoverChartIndex]&&o[e.hoverChartIndex].pointer.drop(t)},t.prototype.onContainerTouchMove=function(t){this.touch(t)},t.prototype.onContainerTouchStart=function(t){this.zoomOption(t),this.touch(t,!0)},t.prototype.onDocumentMouseMove=function(t){var e=this.chart,i=this.chartPosition;t=this.normalize(t,i);var n=e.tooltip;!i||n&&n.isStickyOnContact()||e.isInsidePlot(t.chartX-e.plotLeft,t.chartY-e.plotTop)||this.inClass(t.target,"highcharts-tracker")||this.reset()},t.prototype.onDocumentMouseUp=function(t){var i=o[v(e.hoverChartIndex,-1)];i&&i.pointer.drop(t)},t.prototype.pinch=function(t){var e=this,i=e.chart,n=e.pinchDown,r=t.touches||[],o=r.length,s=e.lastValidTouch,l=e.hasZoom,u=e.selectionMarker,c={},d=1===o&&(e.inClass(t.target,"highcharts-tracker")&&i.runTrackerClick||e.runChartClick),p={};1v.max&&(e=v.max-l,k=!0);k?(w-=.8*(w-a[h][0]),"number"===typeof S&&(S-=.8*(S-a[h][1])),i()):a[h]=[w,S],y||(o[h]=u-g,o[f]=l),o=y?1/m:m,r[f]=l,r[h]=e,n[y?t?"scaleY":"scaleX":"scale"+d]=m,n["translate"+d]=o*g+(w-o*x)},t.prototype.reset=function(t,e){var i=this.chart,n=i.hoverSeries,r=i.hoverPoint,o=i.hoverPoints,a=i.tooltip,s=a&&a.shared?o:r;t&&s&&b(s).forEach(function(e){e.series.isCartesian&&"undefined"===typeof e.plotX&&(t=!1)}),t?a&&s&&b(s).length&&(a.refresh(s),a.shared&&o?o.forEach(function(t){t.setState(t.state,!0),t.series.isCartesian&&(t.series.xAxis.crosshair&&t.series.xAxis.drawCrosshair(null,t),t.series.yAxis.crosshair&&t.series.yAxis.drawCrosshair(null,t))}):r&&(r.setState(r.state,!0),i.axes.forEach(function(t){t.crosshair&&r.series[t.coll]===t&&t.drawCrosshair(null,r)}))):(r&&r.onMouseOut(),o&&o.forEach(function(t){t.setState()}),n&&n.onMouseOut(),a&&a.hide(e),this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove()),i.axes.forEach(function(t){t.hideCrosshair()}),this.hoverX=i.hoverPoints=i.hoverPoint=null)},t.prototype.runPointActions=function(t,i){var n=this.chart,r=n.tooltip&&n.tooltip.options.enabled?n.tooltip:void 0,a=!!r&&r.shared,l=i||n.hoverPoint,u=l&&l.series||n.hoverSeries;l=(u=this.getHoverData(l,u,n.series,(!t||"touchmove"!==t.type)&&(!!i||u&&u.directTouch&&this.isDirectTouch),a,t)).hoverPoint;var c=u.hoverPoints;if(i=(u=u.hoverSeries)&&u.tooltipOptions.followPointer,a=a&&u&&!u.noSharedTooltip,l&&(l!==n.hoverPoint||r&&r.isHidden)){if((n.hoverPoints||[]).forEach(function(t){-1===c.indexOf(t)&&t.setState()}),n.hoverSeries!==u&&u.onMouseOver(),this.applyInactiveState(c),(c||[]).forEach(function(t){t.setState("hover")}),n.hoverPoint&&n.hoverPoint.firePointEvent("mouseOut"),!l.series)return;n.hoverPoints=c,n.hoverPoint=l,l.firePointEvent("mouseOver"),r&&r.refresh(a?c:l,t)}else i&&r&&!r.isHidden&&(l=r.getAnchor([{}],t),r.updatePosition({plotX:l[0],plotY:l[1]}));this.unDocMouseMove||(this.unDocMouseMove=s(n.container.ownerDocument,"mousemove",function(t){var i=o[e.hoverChartIndex];i&&i.pointer.onDocumentMouseMove(t)})),n.axes.forEach(function(e){var i,r=v((e.crosshair||{}).snap,!0);r&&((i=n.hoverPoint)&&i.series[e.coll]===e||(i=d(c,function(t){return t.series[e.coll]===e}))),i||!r?e.drawCrosshair(t,i):e.hideCrosshair()})},t.prototype.scaleGroups=function(t,e){var i,n=this.chart;n.series.forEach(function(r){i=t||r.getPlotBox(),r.xAxis&&r.xAxis.zoomEnabled&&r.group&&(r.group.attr(i),r.markerGroup&&(r.markerGroup.attr(i),r.markerGroup.clip(e?n.clipRect:null)),r.dataLabelsGroup&&r.dataLabelsGroup.attr(i))}),n.clipRect.attr(e||n.clipBox)},t.prototype.setDOMEvents=function(){var t=this.chart.container,i=t.ownerDocument;t.onmousedown=this.onContainerMouseDown.bind(this),t.onmousemove=this.onContainerMouseMove.bind(this),t.onclick=this.onContainerClick.bind(this),this.unbindContainerMouseLeave=s(t,"mouseleave",this.onContainerMouseLeave.bind(this)),e.unbindDocumentMouseUp||(e.unbindDocumentMouseUp=s(i,"mouseup",this.onDocumentMouseUp.bind(this))),e.hasTouch&&(s(t,"touchstart",this.onContainerTouchStart.bind(this)),s(t,"touchmove",this.onContainerTouchMove.bind(this)),e.unbindDocumentTouchEnd||(e.unbindDocumentTouchEnd=s(i,"touchend",this.onDocumentTouchEnd.bind(this))))},t.prototype.setHoverChartIndex=function(){var t=this.chart,i=e.charts[v(e.hoverChartIndex,-1)];i&&i!==t&&i.pointer.onContainerMouseLeave({relatedTarget:!0}),i&&i.mouseIsDown||(e.hoverChartIndex=t.index)},t.prototype.touch=function(t,e){var i=this.chart;if(this.setHoverChartIndex(),1===t.touches.length)if(t=this.normalize(t),i.isInsidePlot(t.chartX-i.plotLeft,t.chartY-i.plotTop)&&!i.openMenu){if(e&&this.runPointActions(t),"touchmove"===t.type)var n=!!(e=this.pinchDown)[0]&&4<=Math.sqrt(Math.pow(e[0].chartX-t.chartX,2)+Math.pow(e[0].chartY-t.chartY,2));v(n,!0)&&this.pinch(t)}else e&&this.reset();else 2===t.touches.length&&this.pinch(t)},t.prototype.zoomOption=function(t){var e=this.chart,i=e.options.chart,n=i.zoomType||"";e=e.inverted,/touch/.test(t.type)&&(n=v(i.pinchType,n)),this.zoomX=t=/x/.test(n),this.zoomY=n=/y/.test(n),this.zoomHor=t&&!e||n&&e,this.zoomVert=n&&!e||t&&e,this.hasZoom=t||n},t}(),e.Pointer=t}),e(i,"parts/MSPointer.js",[i["parts/Globals.js"],i["parts/Pointer.js"],i["parts/Utilities.js"]],function(t,e,i){function n(){var t=[];return t.item=function(t){return this[t]},h(p,function(e){t.push({pageX:e.pageX,pageY:e.pageY,target:e.target})}),t}function r(e,i,r,o){"touch"!==e.pointerType&&e.pointerType!==e.MSPOINTER_TYPE_TOUCH||!a[t.hoverChartIndex]||(o(e),(o=a[t.hoverChartIndex].pointer)[i]({type:r,target:e.currentTarget,preventDefault:l,touches:n()}))}var o=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}(),a=t.charts,s=t.doc,l=t.noop,u=i.addEvent,c=i.css,h=i.objectEach,d=i.removeEvent,p={},f=!!t.win.PointerEvent;return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.batchMSEvents=function(t){t(this.chart.container,f?"pointerdown":"MSPointerDown",this.onContainerPointerDown),t(this.chart.container,f?"pointermove":"MSPointerMove",this.onContainerPointerMove),t(s,f?"pointerup":"MSPointerUp",this.onDocumentPointerUp)},e.prototype.destroy=function(){this.batchMSEvents(d),t.prototype.destroy.call(this)},e.prototype.init=function(e,i){t.prototype.init.call(this,e,i),this.hasZoom&&c(e.container,{"-ms-touch-action":"none","touch-action":"none"})},e.prototype.onContainerPointerDown=function(t){r(t,"onContainerTouchStart","touchstart",function(t){p[t.pointerId]={pageX:t.pageX,pageY:t.pageY,target:t.currentTarget}})},e.prototype.onContainerPointerMove=function(t){r(t,"onContainerTouchMove","touchmove",function(t){p[t.pointerId]={pageX:t.pageX,pageY:t.pageY},p[t.pointerId].target||(p[t.pointerId].target=t.currentTarget)})},e.prototype.onDocumentPointerUp=function(t){r(t,"onDocumentTouchEnd","touchend",function(t){delete p[t.pointerId]})},e.prototype.setDOMEvents=function(){t.prototype.setDOMEvents.call(this),(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(u)},e}(e)}),e(i,"parts/Legend.js",[i["parts/Globals.js"],i["parts/Utilities.js"]],function(t,e){var i=e.addEvent,n=e.animObject,r=e.css,o=e.defined,a=e.discardElement,s=e.find,l=e.fireEvent,u=e.format,c=e.isNumber,h=e.merge,d=e.pick,p=e.relativeLength,f=e.setAnimation,g=e.stableSort,m=e.syncTimeout;e=e.wrap;var y=t.isFirefox,v=t.marginNames,b=t.win,x=function(){function e(t,e){this.allItems=[],this.contentGroup=this.box=void 0,this.display=!1,this.group=void 0,this.offsetWidth=this.maxLegendWidth=this.maxItemWidth=this.legendWidth=this.legendHeight=this.lastLineHeight=this.lastItemY=this.itemY=this.itemX=this.itemMarginTop=this.itemMarginBottom=this.itemHeight=this.initialItemY=0,this.options={},this.padding=0,this.pages=[],this.proximate=!1,this.scrollGroup=void 0,this.widthOption=this.totalItemWidth=this.titleHeight=this.symbolWidth=this.symbolHeight=0,this.chart=t,this.init(t,e)}return e.prototype.init=function(t,e){this.chart=t,this.setOptions(e),e.enabled&&(this.render(),i(this.chart,"endResize",function(){this.legend.positionCheckboxes()}),this.proximate?this.unchartrender=i(this.chart,"render",function(){this.legend.proximatePositions(),this.legend.positionItems()}):this.unchartrender&&this.unchartrender())},e.prototype.setOptions=function(t){var e=d(t.padding,8);this.options=t,this.chart.styledMode||(this.itemStyle=t.itemStyle,this.itemHiddenStyle=h(this.itemStyle,t.itemHiddenStyle)),this.itemMarginTop=t.itemMarginTop||0,this.itemMarginBottom=t.itemMarginBottom||0,this.padding=e,this.initialItemY=e-5,this.symbolWidth=d(t.symbolWidth,16),this.pages=[],this.proximate="proximate"===t.layout&&!this.chart.inverted,this.baseline=void 0},e.prototype.update=function(t,e){var i=this.chart;this.setOptions(h(!0,this.options,t)),this.destroy(),i.isDirtyLegend=i.isDirtyBox=!0,d(e,!0)&&i.redraw(),l(this,"afterUpdate")},e.prototype.colorizeItem=function(t,e){if(t.legendGroup[e?"removeClass":"addClass"]("highcharts-legend-item-hidden"),!this.chart.styledMode){var i=this.options,n=t.legendItem,r=t.legendLine,o=t.legendSymbol,a=this.itemHiddenStyle.color;i=e?i.itemStyle.color:a;var s=e&&t.color||a,u=t.options&&t.options.marker,c={fill:s};n&&n.css({fill:i,color:i}),r&&r.attr({stroke:s}),o&&(u&&o.isMarker&&(c=t.pointAttribs(),e||(c.stroke=c.fill=a)),o.attr(c))}l(this,"afterColorizeItem",{item:t,visible:e})},e.prototype.positionItems=function(){this.allItems.forEach(this.positionItem,this),this.chart.isResizing||this.positionCheckboxes()},e.prototype.positionItem=function(t){var e=this,i=this.options,n=i.symbolPadding,r=!i.rtl,a=t._legendItemPos;i=a[0],a=a[1];var s=t.checkbox,u=t.legendGroup;u&&u.element&&(n={translateX:r?i:this.legendWidth-i-2*n-4,translateY:a},r=function(){l(e,"afterPositionItem",{item:t})},o(u.translateY)?u.animate(n,{complete:r}):(u.attr(n),r())),s&&(s.x=i,s.y=a)},e.prototype.destroyItem=function(t){var e=t.checkbox;["legendItem","legendLine","legendSymbol","legendGroup"].forEach(function(e){t[e]&&(t[e]=t[e].destroy())}),e&&a(t.checkbox)},e.prototype.destroy=function(){function t(t){this[t]&&(this[t]=this[t].destroy())}this.getAllItems().forEach(function(e){["legendItem","legendGroup"].forEach(t,e)}),"clipRect up down pager nav box title group".split(" ").forEach(t,this),this.display=null},e.prototype.positionCheckboxes=function(){var t=this.group&&this.group.alignAttr,e=this.clipHeight||this.legendHeight,i=this.titleHeight;if(t){var n=t.translateY;this.allItems.forEach(function(o){var a=o.checkbox;if(a){var s=n+i+a.y+(this.scrollOffset||0)+3;r(a,{left:t.translateX+o.checkboxOffset+a.x-20+"px",top:s+"px",display:this.proximate||s>n-6&&sl?this.maxItemWidth:t.itemWidth,n&&this.itemX-i+e>l&&(this.itemX=i,this.lastLineHeight&&(this.itemY+=a+this.lastLineHeight+o),this.lastLineHeight=0),this.lastItemY=a+this.itemY+o,this.lastLineHeight=Math.max(r,this.lastLineHeight),t._legendItemPos=[this.itemX,this.itemY],n?this.itemX+=e:(this.itemY+=a+r+o,this.lastLineHeight=r),this.offsetWidth=this.widthOption||Math.max((n?this.itemX-i-(t.checkbox?0:s):e)+i,this.offsetWidth)},e.prototype.getAllItems=function(){var t=[];return this.chart.series.forEach(function(e){var i=e&&e.options;e&&d(i.showInLegend,!o(i.linkedTo)&&void 0,!0)&&(t=t.concat(e.legendItems||("point"===i.legendType?e.data:e)))}),l(this,"afterGetAllItems",{allItems:t}),t},e.prototype.getAlignment=function(){var t=this.options;return this.proximate?t.align.charAt(0)+"tv":t.floating?"":t.align.charAt(0)+t.verticalAlign.charAt(0)+t.layout.charAt(0)},e.prototype.adjustMargins=function(t,e){var i=this.chart,n=this.options,r=this.getAlignment();r&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach(function(a,s){a.test(r)&&!o(t[s])&&(i[v[s]]=Math.max(i[v[s]],i.legend[(s+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][s]*n[s%2?"x":"y"]+d(n.margin,12)+e[s]+(i.titleOffset[s]||0)))})},e.prototype.proximatePositions=function(){var e=this.chart,i=[],n="left"===this.options.align;this.allItems.forEach(function(t){var r=n;if(t.yAxis&&t.points){t.xAxis.options.reversed&&(r=!r);var o=s(r?t.points:t.points.slice(0).reverse(),function(t){return c(t.plotY)});r=this.itemMarginTop+t.legendItem.getBBox().height+this.itemMarginBottom;var a=t.yAxis.top-e.plotTop;t.visible?(o=o?o.plotY:t.yAxis.height,o+=a-.3*r):o=a+t.yAxis.height,i.push({target:o,size:r,item:t})}},this),t.distribute(i,e.plotHeight),i.forEach(function(t){t.item._legendItemPos[1]=e.plotTop-e.spacing[0]+t.pos})},e.prototype.render=function(){var t=this.chart,e=t.renderer,i=this.group,n=this.box,r=this.options,o=this.padding;this.itemX=o,this.itemY=this.initialItemY,this.lastItemY=this.offsetWidth=0,this.widthOption=p(r.width,t.spacingBox.width-o);var a=t.spacingBox.width-2*o-r.x;-1<["rm","lm"].indexOf(this.getAlignment().substring(0,2))&&(a/=2),this.maxLegendWidth=this.widthOption||a,i||(this.group=i=e.g("legend").attr({zIndex:7}).add(),this.contentGroup=e.g().attr({zIndex:1}).add(i),this.scrollGroup=e.g().add(this.contentGroup)),this.renderTitle();var s=this.getAllItems();g(s,function(t,e){return(t.options&&t.options.legendIndex||0)-(e.options&&e.options.legendIndex||0)}),r.reversed&&s.reverse(),this.allItems=s,this.display=a=!!s.length,this.itemHeight=this.totalItemWidth=this.maxItemWidth=this.lastLineHeight=0,s.forEach(this.renderItem,this),s.forEach(this.layoutItem,this),s=(this.widthOption||this.offsetWidth)+o;var u=this.lastItemY+this.lastLineHeight+this.titleHeight;u=this.handleOverflow(u),u+=o,n||(this.box=n=e.rect().addClass("highcharts-legend-box").attr({r:r.borderRadius}).add(i),n.isNew=!0),t.styledMode||n.attr({stroke:r.borderColor,"stroke-width":r.borderWidth||0,fill:r.backgroundColor||"none"}).shadow(r.shadow),0o&&!1!==h.enabled?(this.clipHeight=s=Math.max(o-20-this.titleHeight-a,0),this.currentPage=d(this.currentPage,1),this.fullHeight=t,y.forEach(function(t,e){var i=t._legendItemPos[1],n=Math.round(t.legendItem.getBBox().height),r=m.length;(!r||i-m[r-1]>s&&(l||i)!==m[r-1])&&(m.push(l||i),r++),t.pageIx=r-1,l&&(y[e-1].pageIx=r-1),e===y.length-1&&i+n-m[r-1]>s&&i!==l&&(m.push(i),t.pageIx=r),i!==l&&(l=i)}),c||(c=e.clipRect=n.clipRect(0,a,9999,0),e.contentGroup.clip(c)),v(s),g||(this.nav=g=n.g().attr({zIndex:1}).add(this.group),this.up=n.symbol("triangle",0,0,f,f).add(g),b("upTracker").on("click",function(){e.scroll(-1,p)}),this.pager=n.text("",15,10).addClass("highcharts-legend-navigation"),i.styledMode||this.pager.css(h.style),this.pager.add(g),this.down=n.symbol("triangle-down",0,0,f,f).add(g),b("downTracker").on("click",function(){e.scroll(1,p)})),e.scroll(0),t=o):g&&(v(),this.nav=g.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),t},e.prototype.scroll=function(t,e){var i=this,r=this.chart,o=this.pages,a=o.length,s=this.currentPage+t;t=this.clipHeight;var u=this.options.navigation,c=this.pager,h=this.padding;s>a&&(s=a),0=i.value;)i=e[++n];return this.nonZonedColor||(this.nonZonedColor=this.color),this.color=i&&i.color&&!this.options.color?i.color:this.nonZonedColor,i},t.prototype.hasNewShapeType=function(){return(this.graphic&&(this.graphic.symbolName||this.graphic.element.nodeName))!==this.shapeType},t.prototype.init=function(t,e,i){return this.series=t,this.applyOptions(e,i),this.id=n(this.id)?this.id:g(),this.resolveColor(),t.chart.pointCount++,a(this,"afterInit"),this},t.prototype.optionsToObject=function(e){var i={},n=this.series,r=n.options.keys,o=r||n.pointArrayMap||["y"],a=o.length,s=0,l=0;if(c(e)||null===e)i[o[0]]=e;else if(u(e))for(!r&&e.length>a&&("string"===(n=typeof e[0])?i.name=e[0]:"number"===n&&(i.x=e[0]),s++);l