=a)break;else if(b.isInBreak(k,a)){m-=a-k.from;break}}return m};b.prototype.findBreakAt=function(b,a){return r(a,function(a){return a.fromp;)O-=f;for(;Of?g.hide():g.show()),(g=this.ticks[b].label)&&(b-n>f?g.hide():g.show()),(p=this.ticks[b].mark)&&(b-nu&&!f.startOnTick&&(b[0]=u),n>x&&n-gm?b:m;l=l+1+h.descendants;J=Math.max(h.height+1,J);return h});h&&(h.start=t(h.start,a),h.end=t(h.end,m));q(y,{children:b,descendants:l,height:J});"function"===typeof E&&E(y,k);return y};return{getListOfParents:A,getNode:r,getTree:function(c,y){var e=c.map(function(e){return e.id});c=A(c,e);return r("",null,1,null,c,y)}}});I(c,"Core/Axis/TreeGridTick.js",
[c["Core/Color/Palette.js"],c["Core/Utilities.js"]],function(c,q){var v=q.addEvent,t=q.isObject,A=q.isNumber,r=q.pick,l=q.wrap,y;(function(e){function h(){this.treeGrid||(this.treeGrid=new E(this))}function d(b,a){b=b.treeGrid;var d=!b.labelIcon,e=a.renderer,k=a.xy,g=a.options,h=g.width||0,E=g.height||0,l=k.x-h/2-(g.padding||0);k=k.y-E/2;var F=a.collapsed?90:180,J=a.show&&A(k),w=b.labelIcon;w||(b.labelIcon=w=e.path(e.symbols[g.type](g.x||0,g.y||0,h,E)).addClass("highcharts-label-icon").add(a.group));
w.attr({y:J?0:-9999});e.styledMode||w.attr({cursor:"pointer",fill:r(a.color,c.neutralColor60),"stroke-width":1,stroke:g.lineColor,strokeWidth:g.lineWidth||0});w[d?"attr":"animate"]({translateX:l,translateY:k,rotation:F})}function k(b,a,d,e,k,g,c,h,E){var m=r(this.options&&this.options.labels,g);g=this.pos;var B=this.axis,w="treegrid"===B.options.type;b=b.apply(this,[a,d,e,k,m,c,h,E]);w&&(a=m&&t(m.symbol,!0)?m.symbol:{},m=m&&A(m.indentation)?m.indentation:0,g=(g=(B=B.treeGrid.mapOfPosToGridNode)&&
B[g])&&g.depth||1,b.x+=(a.width||0)+2*(a.padding||0)+(g-1)*m);return b}function F(b){var a=this,m=a.pos,e=a.axis,k=a.label,g=e.treeGrid.mapOfPosToGridNode,c=e.options,h=r(a.options&&a.options.labels,c&&c.labels),E=h&&t(h.symbol,!0)?h.symbol:{},l=(g=g&&g[m])&&g.depth;c="treegrid"===c.type;var F=-1=b&&(a-=.5);return{from:a,to:g,showPoints:!1}}function r(a,b,g){var n=[],d=[],u={},f="boolean"===typeof b?b:!1,p={},x=-1;a=v.getTree(a,{after:function(f){f=p[f.pos];var a=0,b=0;f.children.forEach(function(f){b+=(f.descendants||0)+1;a=Math.max((f.height||0)+1,a)});f.descendants=b;f.height=a;f.collapsed&&d.push(f)},before:function(a){var b=k(a.data,!0)?a.data:{},g=F(b.name)?b.name:"",d=u[a.parent];d=k(d,!0)?p[d.pos]:null;var m=
function(f){return f.name===g},z;f&&k(d,!0)&&(z=e(d.children,m))?(m=z.pos,z.nodes.push(a)):m=x++;p[m]||(p[m]=z={depth:d?d.depth+1:0,name:g,id:b.id,nodes:[a],children:[],pos:m},-1!==m&&n.push(g),k(d,!0)&&d.children.push(z));F(a.id)&&(u[a.id]=a);z&&!0===b.collapsed&&(z.collapsed=!0);a.pos=m}});p=function(f,a){var b=function(f,p,n){var u=p+(-1===p?0:a-1),x=(u-p)/2,g=p+x;f.nodes.forEach(function(f){var a=f.data;k(a,!0)&&(a.y=p+(a.seriesIndex||0),delete a.seriesIndex);f.pos=g});n[g]=f;f.pos=g;f.tickmarkOffset=
x+.5;f.collapseStart=u+.5;f.children.forEach(function(f){b(f,u+1,n);u=(f.collapseEnd||0)-.5});f.collapseEnd=u+.5;return n};return b(f["-1"],-1,{})}(p,g);return{categories:n,mapOfIdToNode:u,mapOfPosToGridNode:p,collapsedNodes:d,tree:a}}function g(a){a.target.axes.filter(function(a){return"treegrid"===a.options.type}).forEach(function(b){var g=b.options||{},n=g.labels,e=g.uniqueNames;g=g.max;var u=0;if(!b.treeGrid.mapOfPosToGridNode||b.series.some(function(f){return!f.hasRendered||f.isDirtyData||f.isDirty})){var f=
b.series.reduce(function(f,a){a.visible&&((a.options.data||[]).forEach(function(b){a.options.keys&&a.options.keys.length&&(b=a.pointClass.prototype.optionsToObject.call({series:a},b),a.pointClass.setGanttPointAliases(b));k(b,!0)&&(b.seriesIndex=u,f.push(b))}),!0===e&&u++);return f},[]);if(g&&f.length=b&&u<=n)||a.brokenAxis&&a.brokenAxis.isInAnyBreak(u)||g.push(u);return g},[])};a.prototype.isCollapsed=
function(a){var b=this.axis,n=b.options.breaks||[],g=m(a,b.max);return n.some(function(a){return a.from===g.from&&a.to===g.to})};a.prototype.toggleCollapse=function(a){return this.isCollapsed(a)?this.expand(a):this.collapse(a)};return a}();a.Additions=K})(a||(a={}));return a});I(c,"Extensions/CurrentDateIndication.js",[c["Core/Axis/Axis.js"],c["Core/Color/Palette.js"],c["Core/Axis/PlotLineOrBand.js"],c["Core/Utilities.js"]],function(c,q,v,t){var A=t.addEvent,r=t.merge;t=t.wrap;var l={color:q.highlightColor20,
width:2,label:{format:"%a, %b %d %Y, %H:%M",formatter:function(c,e){return this.axis.chart.time.dateFormat(e||"",c)},rotation:0,style:{fontSize:"10px"}}};A(c,"afterSetOptions",function(){var c=this.options,e=c.currentDateIndicator;e&&(e="object"===typeof e?r(l,e):r(l),e.value=Date.now(),e.className="highcharts-current-date-indicator",c.plotLines||(c.plotLines=[]),c.plotLines.push(e))});A(v,"render",function(){this.label&&this.label.attr({text:this.getLabelText(this.options.label)})});t(v.prototype,
"getLabelText",function(c,e){var h=this.options;return h&&h.className&&-1!==h.className.indexOf("highcharts-current-date-indicator")&&h.label&&"function"===typeof h.label.formatter?(h.value=Date.now(),h.label.formatter.call(this,h.value,h.label.format)):c.call(this,e)})});I(c,"Extensions/StaticScale.js",[c["Core/Axis/Axis.js"],c["Core/Chart/Chart.js"],c["Core/Utilities.js"]],function(c,q,v){var t=v.addEvent,A=v.defined,r=v.isNumber,l=v.pick;t(c,"afterSetOptions",function(){var c=this.chart.options.chart;
!this.horiz&&r(this.options.staticScale)&&(!c.height||c.scrollablePlotArea&&c.scrollablePlotArea.minHeight)&&(this.staticScale=this.options.staticScale)});q.prototype.adjustHeight=function(){"adjustHeight"!==this.redrawTrigger&&((this.axes||[]).forEach(function(c){var e=c.chart,h=!!e.initiatedScale&&e.options.animation,d=c.options.staticScale;if(c.staticScale&&A(c.min)){var k=l(c.brokenAxis&&c.brokenAxis.unitLength,c.max+c.tickInterval-c.min)*d;k=Math.max(k,d);d=k-e.plotHeight;!e.scrollablePixelsY&&
1<=Math.abs(d)&&(e.plotHeight=k,e.redrawTrigger="adjustHeight",e.setSize(void 0,e.chartHeight+d,h));c.series.forEach(function(d){(d=d.sharedClipKey&&e.sharedClips[d.sharedClipKey])&&d.attr(e.inverted?{width:e.plotHeight}:{height:e.plotHeight})})}}),this.initiatedScale=!0);this.redrawTrigger=null};t(q,"render",q.prototype.adjustHeight)});I(c,"Extensions/ArrowSymbols.js",[c["Core/Renderer/SVG/SVGRenderer.js"]],function(c){function q(c,r,l,q){return[["M",c,r+q/2],["L",c+l,r],["L",c,r+q/2],["L",c+l,r+
q]]}function v(c,r,l,q){return[["M",c+l,r],["L",c,r+q/2],["L",c+l,r+q],["Z"]]}function t(c,r,l,q){return v(c,r,l/2,q)}c=c.prototype.symbols;c.arrow=q;c["arrow-filled"]=v;c["arrow-filled-half"]=t;c["arrow-half"]=function(c,r,l,t){return q(c,r,l/2,t)};c["triangle-left"]=v;c["triangle-left-half"]=t;return c});I(c,"Gantt/Connection.js",[c["Core/Globals.js"],c["Core/DefaultOptions.js"],c["Core/Series/Point.js"],c["Core/Utilities.js"]],function(c,q,v,t){function A(d){var e=d.shapeArgs;return e?{xMin:e.x||
0,xMax:(e.x||0)+(e.width||0),yMin:e.y||0,yMax:(e.y||0)+(e.height||0)}:(e=d.graphic&&d.graphic.getBBox())?{xMin:d.plotX-e.width/2,xMax:d.plotX+e.width/2,yMin:d.plotY-e.height/2,yMax:d.plotY+e.height/2}:null}"";var r=t.defined,l=t.error,y=t.extend,e=t.merge,h=t.objectEach,d=c.deg2rad,k=Math.max,F=Math.min;y(q.defaultOptions,{connectors:{type:"straight",lineWidth:1,marker:{enabled:!1,align:"center",verticalAlign:"middle",inside:!1,lineWidth:1},startMarker:{symbol:"diamond"},endMarker:{symbol:"arrow-filled"}}});
q=function(){function c(d,b,a){this.toPoint=this.pathfinder=this.graphics=this.fromPoint=this.chart=void 0;this.init(d,b,a)}c.prototype.init=function(d,b,a){this.fromPoint=d;this.toPoint=b;this.options=a;this.chart=d.series.chart;this.pathfinder=this.chart.pathfinder};c.prototype.renderPath=function(d,b,a){var e=this.chart,c=e.styledMode,k=e.pathfinder,g=!e.options.chart.forExport&&!1!==a,h=this.graphics&&this.graphics.path;k.group||(k.group=e.renderer.g().addClass("highcharts-pathfinder-group").attr({zIndex:-1}).add(e.seriesGroup));
k.group.translate(e.plotLeft,e.plotTop);h&&h.renderer||(h=e.renderer.path().add(k.group),c||h.attr({opacity:0}));h.attr(b);d={d:d};c||(d.opacity=1);h[g?"animate":"attr"](d,a);this.graphics=this.graphics||{};this.graphics.path=h};c.prototype.addMarker=function(e,b,a){var c=this.fromPoint.series.chart,k=c.pathfinder;c=c.renderer;var h="start"===e?this.fromPoint:this.toPoint,g=h.getPathfinderAnchorPoint(b);if(b.enabled&&((a="start"===e?a[1]:a[a.length-2])&&"M"===a[0]||"L"===a[0])){a={x:a[1],y:a[2]};
a=h.getRadiansToVector(a,g);g=h.getMarkerVector(a,b.radius,g);a=-a/d;if(b.width&&b.height){var l=b.width;var r=b.height}else l=r=2*b.radius;this.graphics=this.graphics||{};g={x:g.x-l/2,y:g.y-r/2,width:l,height:r,rotation:a,rotationOriginX:g.x,rotationOriginY:g.y};this.graphics[e]?this.graphics[e].animate(g):(this.graphics[e]=c.symbol(b.symbol).addClass("highcharts-point-connecting-path-"+e+"-marker").attr(g).add(k.group),c.styledMode||this.graphics[e].attr({fill:b.color||this.fromPoint.color,stroke:b.lineColor,
"stroke-width":b.lineWidth,opacity:0}).animate({opacity:1},h.series.options.animation))}};c.prototype.getPath=function(d){var b=this.pathfinder,a=this.chart,c=b.algorithms[d.type],k=b.chartObstacles;if("function"!==typeof c)return l('"'+d.type+'" is not a Pathfinder algorithm.'),{path:[],obstacles:[]};c.requiresObstacles&&!k&&(k=b.chartObstacles=b.getChartObstacles(d),a.options.connectors.algorithmMargin=d.algorithmMargin,b.chartObstacleMetrics=b.getObstacleMetrics(k));return c(this.fromPoint.getPathfinderAnchorPoint(d.startMarker),
this.toPoint.getPathfinderAnchorPoint(d.endMarker),e({chartObstacles:k,lineObstacles:b.lineObstacles||[],obstacleMetrics:b.chartObstacleMetrics,hardBounds:{xMin:0,xMax:a.plotWidth,yMin:0,yMax:a.plotHeight},obstacleOptions:{margin:d.algorithmMargin},startDirectionX:b.getAlgorithmStartDirection(d.startMarker)},d))};c.prototype.render=function(){var d=this.fromPoint,b=d.series,a=b.chart,c=a.pathfinder,h=e(a.options.connectors,b.options.connectors,d.options.connectors,this.options),l={};a.styledMode||
(l.stroke=h.lineColor||d.color,l["stroke-width"]=h.lineWidth,h.dashStyle&&(l.dashstyle=h.dashStyle));l["class"]="highcharts-point-connecting-path highcharts-color-"+d.colorIndex;h=e(l,h);r(h.marker.radius)||(h.marker.radius=F(k(Math.ceil((h.algorithmMargin||8)/2)-1,1),5));d=this.getPath(h);a=d.path;d.obstacles&&(c.lineObstacles=c.lineObstacles||[],c.lineObstacles=c.lineObstacles.concat(d.obstacles));this.renderPath(a,l,b.options.animation);this.addMarker("start",e(h.marker,h.startMarker),a);this.addMarker("end",
e(h.marker,h.endMarker),a)};c.prototype.destroy=function(){this.graphics&&(h(this.graphics,function(d){d.destroy()}),delete this.graphics)};return c}();c.Connection=q;y(v.prototype,{getPathfinderAnchorPoint:function(d){var e=A(this);switch(d.align){case "right":var b="xMax";break;case "left":b="xMin"}switch(d.verticalAlign){case "top":var a="yMin";break;case "bottom":a="yMax"}return{x:b?e[b]:(e.xMin+e.xMax)/2,y:a?e[a]:(e.yMin+e.yMax)/2}},getRadiansToVector:function(d,e){var b;r(e)||(b=A(this))&&(e=
{x:(b.xMin+b.xMax)/2,y:(b.yMin+b.yMax)/2});return Math.atan2(e.y-d.y,d.x-e.x)},getMarkerVector:function(d,e,b){var a=2*Math.PI,c=A(this),k=c.xMax-c.xMin,h=c.yMax-c.yMin,g=Math.atan2(h,k),l=!1;k/=2;var r=h/2,F=c.xMin+k;c=c.yMin+r;for(var q=F,t=c,w=1,E=1;d<-Math.PI;)d+=a;for(;d>Math.PI;)d-=a;a=Math.tan(d);d>-g&&d<=g?(E=-1,l=!0):d>g&&d<=Math.PI-g?E=-1:d>Math.PI-g||d<=-(Math.PI-g)?(w=-1,l=!0):w=-1;l?(q+=w*k,t+=E*k*a):(q+=h/(2*a)*w,t+=E*r);b.x!==F&&(q=b.x);b.y!==c&&(t=b.y);return{x:q+e*Math.cos(d),y:t-
e*Math.sin(d)}}});return q});I(c,"Gantt/PathfinderAlgorithms.js",[c["Core/Utilities.js"]],function(c){function q(d,e,c){c=c||0;var k=d.length-1;e-=1e-7;for(var h,b;c<=k;)if(h=k+c>>1,b=e-d[h].xMin,0b)k=h-1;else return h;return 0=e.x)k=d[c],k=e.x<=k.xMax&&e.x>=k.xMin&&e.y<=k.yMax&&e.y>=k.yMin;if(k)return c}return-1}function t(d){var e=[];if(d.length){e.push(["M",d[0].start.x,d[0].start.y]);for(var c=0;ce(b[d]-a[d+"Max"]);return k(b,d,a,d+(g?"Max":"Min"),g?1:-1)}var b=[],a=r(h.startDirectionX,e(c.x-d.x)>e(c.y-d.y))?"x":"y",m=h.chartObstacles,q=v(m,d);h=v(m,c);if(-1=d[a]===h[a]>=g[a]&&(a="y"===a?"x":"y",c=d[a]p?l(q(w,c.x),w.length-1):0;w[f]&&(0p&&w[f].xMax>=n.x);){if(w[f].xMin<=c.x&&w[f].xMax>=n.x&&w[f].yMin<=e.y&&w[f].yMax>=g.y)return d?{y:a.y,x:a.x=c[g+"Max"];c=a[g+"Min"]<=c[g+"Min"];var m=a[g+"Max"]>=n[g+"Max"];n=a[g+
"Min"]<=n[g+"Min"];var z=e(a[g+"Min"]-b[g]),l=e(a[g+"Max"]-b[g]);d=10>e(z-l)?b[g]e(c.y-d.y)),B=m?"x":"y",F=[],g=!1,H=h.obstacleMetrics,D=l(d.x,c.x)-H.maxWidth-10,Q=y(d.x,c.x)+H.maxWidth+10,M=l(d.y,c.y)-H.maxHeight-10,K=y(d.y,c.y)+
H.maxHeight+10,w=h.chartObstacles;var N=q(w,D);H=q(w,Q);w=w.slice(N,H+1);if(-1<(H=v(w,c))){var C=a(w[H],c,d);F.push({end:c,start:C});c=C}for(;-1<(H=v(w,c));)N=0>c[B]-d[B],C={x:c.x,y:c.y},C[B]=w[H][N?B+"Max":B+"Min"]+(N?1:-1),F.push({end:c,start:C}),c=C;d=b(d,c,m);d=d.concat(F.reverse());return{path:t(d),obstacles:d}};h.requiresObstacles=!0;return{fastAvoid:h,straight:function(d,c){return{path:[["M",d.x,d.y],["L",c.x,c.y]],obstacles:[{start:d,end:c}]}},simpleConnect:c}});I(c,"Gantt/Pathfinder.js",
[c["Gantt/Connection.js"],c["Core/Chart/Chart.js"],c["Core/Globals.js"],c["Core/DefaultOptions.js"],c["Core/Series/Point.js"],c["Core/Utilities.js"],c["Gantt/PathfinderAlgorithms.js"]],function(c,q,v,t,A,r,l){function y(a){var b=a.shapeArgs;return b?{xMin:b.x||0,xMax:(b.x||0)+(b.width||0),yMin:b.y||0,yMax:(b.y||0)+(b.height||0)}:(b=a.graphic&&a.graphic.getBBox())?{xMin:a.plotX-b.width/2,xMax:a.plotX+b.width/2,yMin:a.plotY-b.height/2,yMax:a.plotY+b.height/2}:null}function e(a){for(var d=a.length,c=
0,g,e,h=[],k=function(a,d,c){c=b(c,10);var g=a.yMax+c>d.yMin-c&&a.yMin-cd.xMin-c&&a.xMin-cd.xMax?a.xMin-d.xMax:d.xMin-a.xMax:Infinity,p=e?a.yMin>d.yMax?a.yMin-d.yMax:d.yMin-a.yMax:Infinity;return e&&g?c?k(a,d,Math.floor(c/2)):Infinity:B(f,p)};ce&&h.push(e);h.push(80);return m(Math.floor(h.sort(function(a,b){return a-b})[Math.floor(h.length/10)]/2-1),1)}function h(a){if(a.options.pathfinder||a.series.reduce(function(a,
b){b.options&&E(!0,b.options.connectors=b.options.connectors||{},b.options.pathfinder);return a||b.options&&b.options.pathfinder},!1))E(!0,a.options.connectors=a.options.connectors||{},a.options.pathfinder),F('WARNING: Pathfinder options have been renamed. Use "chart.connectors" or "series.connectors" instead.')}"";var d=r.addEvent,k=r.defined,F=r.error,J=r.extend,E=r.merge,b=r.pick,a=r.splat,m=Math.max,B=Math.min;J(t.defaultOptions,{connectors:{type:"straight",lineWidth:1,marker:{enabled:!1,align:"center",
verticalAlign:"middle",inside:!1,lineWidth:1},startMarker:{symbol:"diamond"},endMarker:{symbol:"arrow-filled"}}});var G=function(){function g(a){this.lineObstacles=this.group=this.connections=this.chartObstacleMetrics=this.chartObstacles=this.chart=void 0;this.init(a)}g.prototype.init=function(a){this.chart=a;this.connections=[];d(a,"redraw",function(){this.pathfinder.update()})};g.prototype.update=function(b){var d=this.chart,g=this,e=g.connections;g.connections=[];d.series.forEach(function(b){b.visible&&
!b.options.isInternal&&b.points.forEach(function(b){var f=b.options;f&&f.dependency&&(f.connect=f.dependency);var p;f=b.options&&b.options.connect&&a(b.options.connect);b.visible&&!1!==b.isInside&&f&&f.forEach(function(a){p=d.get("string"===typeof a?a:a.to);p instanceof A&&p.series.visible&&p.visible&&!1!==p.isInside&&g.connections.push(new c(b,p,"string"===typeof a?{}:a))})})});for(var h=0,m=void 0,k=void 0,l=e.length,n=g.connections.length;hMath.PI;)a-=c;c=Math.tan(a);a>-m&&a<=m?(x=-1,k=!0):a>m&&a<=Math.PI-m?x=-1:a>Math.PI-m||a<=-(Math.PI-m)?(p=-1,k=!0):p=-1;k?(u+=p*g,f+=x*g*c):(u+=h/(2*c)*p,f+=x*n);d.x!==z&&(u=d.x);d.y!==e&&(f=d.y);return{x:u+b*Math.cos(a),y:f-b*Math.sin(a)}}});q.prototype.callbacks.push(function(a){!1!==a.options.connectors.enabled&&(h(a),this.pathfinder=new G(this),this.pathfinder.update(!0))});
return G});I(c,"Series/Gantt/GanttSeries.js",[c["Core/Axis/Axis.js"],c["Core/Chart/Chart.js"],c["Series/Gantt/GanttPoint.js"],c["Core/Series/SeriesRegistry.js"],c["Core/Axis/Tick.js"],c["Core/Utilities.js"],c["Core/Axis/TreeGridAxis.js"]],function(c,q,v,t,A,r,l){var y=this&&this.__extends||function(){var d=function(b,a){d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d])};return d(b,a)};return function(b,
a){function c(){this.constructor=b}d(b,a);b.prototype=null===a?Object.create(a):(c.prototype=a.prototype,new c)}}(),e=t.series,h=t.seriesTypes.xrange,d=r.extend,k=r.isNumber,F=r.merge,J=r.splat;l.compose(c,q,e,A);c=function(d){function b(){var a=null!==d&&d.apply(this,arguments)||this;a.data=void 0;a.options=void 0;a.points=void 0;return a}y(b,d);b.prototype.drawPoint=function(a,b){var d=this.options,c=this.chart.renderer,e=a.shapeArgs,m=a.plotY,l=a.graphic,r=a.selected&&"select",q=d.stacking&&!d.borderRadius;
if(a.options.milestone)if(k(m)&&null!==a.y&&!1!==a.visible){e=c.symbols.diamond(e.x||0,e.y||0,e.width||0,e.height||0);if(l)l[b]({d:e});else a.graphic=c.path(e).addClass(a.getClassName(),!0).add(a.group||this.group);this.chart.styledMode||a.graphic.attr(this.pointAttribs(a,r)).shadow(d.shadow,null,q)}else l&&(a.graphic=l.destroy());else h.prototype.drawPoint.call(this,a,b)};b.prototype.translatePoint=function(a){h.prototype.translatePoint.call(this,a);if(a.options.milestone){var b=a.shapeArgs;var d=
b.height||0;a.shapeArgs={x:(b.x||0)-d/2,y:b.y,width:d,height:d}}};b.defaultOptions=F(h.defaultOptions,{grouping:!1,dataLabels:{enabled:!0},tooltip:{headerFormat:'{series.name}
',pointFormat:null,pointFormatter:function(){var a=this.series,b=a.chart.tooltip,d=a.xAxis,c=a.tooltipOptions.dateTimeLabelFormats,e=d.options.startOfWeek,h=a.tooltipOptions,k=h.xDateFormat,l=this.options.milestone,r=""+(this.name||this.yCategory)+"";if(h.pointFormat)return this.tooltipFormatter(h.pointFormat);
k||(k=J(b.getDateFormat(d.closestPointRange,this.start,e,c))[0]);b=a.chart.time.dateFormat(k,this.start);a=a.chart.time.dateFormat(k,this.end);r+="
";return l?r+(b+"
"):r+("Start: "+b+"
End: ")+(a+"
")}},connectors:{type:"simpleConnect",animation:{reversed:!0},startMarker:{enabled:!0,symbol:"arrow-filled",radius:4,fill:"#fa0",align:"left"},endMarker:{enabled:!1,align:"right"}}});return b}(h);d(c.prototype,{keyboardMoveVertical:!1,pointArrayMap:["start","end","y"],pointClass:v,setData:e.prototype.setData});
t.registerSeriesType("gantt",c);"";return c});I(c,"Core/Chart/GanttChart.js",[c["Core/Chart/Chart.js"],c["Core/DefaultOptions.js"],c["Core/Utilities.js"]],function(c,q,v){var t=this&&this.__extends||function(){var c=function(e,d){c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,c){d.__proto__=c}||function(d,c){for(var e in c)c.hasOwnProperty(e)&&(d[e]=c[e])};return c(e,d)};return function(e,d){function h(){this.constructor=e}c(e,d);e.prototype=null===d?Object.create(d):(h.prototype=
d.prototype,new h)}}(),A=q.getOptions,r=v.isArray,l=v.merge,y=v.splat;c=function(c){function e(){return null!==c&&c.apply(this,arguments)||this}t(e,c);e.prototype.init=function(d,e){var h=A(),k=d.xAxis,q=d.yAxis,b;d.xAxis=d.yAxis=void 0;var a=l(!0,{chart:{type:"gantt"},title:{text:null},legend:{enabled:!1},navigator:{series:{type:"gantt"},yAxis:{type:"category"}}},d,{isGantt:!0});d.xAxis=k;d.yAxis=q;a.xAxis=(r(d.xAxis)?d.xAxis:[d.xAxis||{},{}]).map(function(a,d){1===d&&(b=0);return l(h.xAxis,{grid:{enabled:!0},
opposite:!0,linkedTo:b},a,{type:"datetime"})});a.yAxis=y(d.yAxis||{}).map(function(a){return l(h.yAxis,{grid:{enabled:!0},staticScale:50,reversed:!0,type:a.categories?a.type:"treegrid"},a)});c.prototype.init.call(this,a,e)};return e}(c);(function(c){c.ganttChart=function(e,d,k){return new c(e,d,k)}})(c||(c={}));return c});I(c,"Core/Axis/ScrollbarAxis.js",[c["Core/Utilities.js"]],function(c){var q=c.addEvent,v=c.defined,t=c.pick;return function(){function c(){}c.compose=function(c,l){var r=function(c){var e=
t(c.options&&c.options.min,c.min),d=t(c.options&&c.options.max,c.max);return{axisMin:e,axisMax:d,scrollMin:v(c.dataMin)?Math.min(e,c.min,c.dataMin,t(c.threshold,Infinity)):e,scrollMax:v(c.dataMax)?Math.max(d,c.max,c.dataMax,t(c.threshold,-Infinity)):d}};q(c,"afterInit",function(){var c=this;c.options&&c.options.scrollbar&&c.options.scrollbar.enabled&&(c.options.scrollbar.vertical=!c.horiz,c.options.startOnTick=c.options.endOnTick=!1,c.scrollbar=new l(c.chart.renderer,c.options.scrollbar,c.chart),
q(c.scrollbar,"changed",function(e){var d=r(c),h=d.axisMax,l=d.scrollMin,q=d.scrollMax-l;v(d.axisMin)&&v(h)&&(c.horiz&&!c.reversed||!c.horiz&&c.reversed?(d=l+q*this.to,l+=q*this.from):(d=l+q*(1-this.from),l+=q*(1-this.to)),this.shouldUpdateExtremes(e.DOMType)?c.setExtremes(l,d,!0,"mousemove"!==e.DOMType&&"touchmove"!==e.DOMType,e):this.setRange(this.from,this.to))}))});q(c,"afterRender",function(){var c=r(this),h=c.scrollMin,d=c.scrollMax;c=this.scrollbar;var k=this.axisTitleMargin+(this.titleOffset||
0),l=this.chart.scrollbarsOffsets,q=this.options.margin||0;c&&(this.horiz?(this.opposite||(l[1]+=k),c.position(this.left,this.top+this.height+2+l[1]-(this.opposite?q:0),this.width,this.height),this.opposite||(l[1]+=q),k=1):(this.opposite&&(l[0]+=k),c.position(this.left+this.width+2+l[0]-(this.opposite?0:q),this.top,this.width,this.height),this.opposite&&(l[0]+=q),k=0),l[k]+=c.size+c.options.margin,isNaN(h)||isNaN(d)||!v(this.min)||!v(this.max)||this.min===this.max?c.setRange(0,1):(l=(this.min-h)/
(d-h),h=(this.max-h)/(d-h),this.horiz&&!this.reversed||!this.horiz&&this.reversed?c.setRange(l,h):c.setRange(1-h,1-l)))});q(c,"afterGetOffset",function(){var c=this.horiz?2:1,h=this.scrollbar;h&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[c]+=h.size+h.options.margin)});return c};return c}()});I(c,"Core/ScrollbarDefaults.js",[c["Core/Globals.js"],c["Core/Color/Palette.js"]],function(c,q){return{height:c.isTouchDevice?20:14,barBorderRadius:0,buttonBorderRadius:0,liveRedraw:void 0,margin:10,
minWidth:6,step:.2,zIndex:3,barBackgroundColor:q.neutralColor20,barBorderWidth:1,barBorderColor:q.neutralColor20,buttonArrowColor:q.neutralColor80,buttonBackgroundColor:q.neutralColor10,buttonBorderColor:q.neutralColor20,buttonBorderWidth:1,rifleColor:q.neutralColor80,trackBackgroundColor:q.neutralColor5,trackBorderColor:q.neutralColor5,trackBorderWidth:1}});I(c,"Core/Scrollbar.js",[c["Core/DefaultOptions.js"],c["Core/Globals.js"],c["Core/Axis/ScrollbarAxis.js"],c["Core/ScrollbarDefaults.js"],c["Core/Utilities.js"]],
function(c,q,v,t,A){var r=c.defaultOptions,l=A.addEvent,y=A.correctFloat,e=A.defined,h=A.destroyObjectProperties,d=A.fireEvent,k=A.merge,F=A.pick,J=A.removeEvent;c=function(){function c(b,a,c){this._events=[];this.chart=void 0;this.from=this.chartY=this.chartX=0;this.scrollbar=this.renderer=this.options=this.group=void 0;this.scrollbarButtons=[];this.scrollbarGroup=void 0;this.scrollbarLeft=0;this.scrollbarRifles=void 0;this.scrollbarStrokeWidth=1;this.to=this.size=this.scrollbarTop=0;this.track=
void 0;this.trackBorderWidth=1;this.userOptions=void 0;this.y=this.x=0;this.init(b,a,c)}c.compose=function(b){v.compose(b,c)};c.swapXY=function(b,a){a&&b.forEach(function(a){for(var b=a.length,c,d=0;dthis.calculatedWidth?a.minWidth:0;return{chartX:(b.chartX-this.x-this.xOffset)/(this.barWidth-a),chartY:(b.chartY-
this.y-this.yOffset)/(this.barWidth-a)}};c.prototype.destroy=function(){var b=this,a=b.chart.scroller;b.removeEvents();["track","scrollbarRifles","scrollbar","scrollbarGroup","group"].forEach(function(a){b[a]&&b[a].destroy&&(b[a]=b[a].destroy())});a&&b===a.scrollbar&&(a.scrollbar=null,h(a.scrollbarButtons))};c.prototype.drawScrollbarButton=function(b){var a=this.renderer,d=this.scrollbarButtons,e=this.options,h=this.size,g=a.g().add(this.group);d.push(g);g=a.rect().addClass("highcharts-scrollbar-button").add(g);
this.chart.styledMode||g.attr({stroke:e.buttonBorderColor,"stroke-width":e.buttonBorderWidth,fill:e.buttonBackgroundColor});g.attr(g.crisp({x:-.5,y:-.5,width:h+1,height:h+1,r:e.buttonBorderRadius},g.strokeWidth()));g=a.path(c.swapXY([["M",h/2+(b?-1:1),h/2-3],["L",h/2+(b?-1:1),h/2+3],["L",h/2+(b?2:-2),h/2]],e.vertical)).addClass("highcharts-scrollbar-arrow").add(d[b]);this.chart.styledMode||g.attr({fill:e.buttonArrowColor})};c.prototype.init=function(b,a,c){this.scrollbarButtons=[];this.renderer=b;
this.userOptions=a;this.options=k(t,r.scrollbar,a);this.chart=c;this.size=F(this.options.size,this.options.height);a.enabled&&(this.render(),this.addEvents())};c.prototype.mouseDownHandler=function(b){b=this.chart.pointer.normalize(b);b=this.cursorToScrollbarPosition(b);this.chartX=b.chartX;this.chartY=b.chartY;this.initPositions=[this.from,this.to];this.grabbedCenter=!0};c.prototype.mouseMoveHandler=function(b){var a=this.chart.pointer.normalize(b),c=this.options.vertical?"chartY":"chartX",e=this.initPositions||
[];!this.grabbedCenter||b.touches&&0===b.touches[0][c]||(a=this.cursorToScrollbarPosition(a)[c],c=this[c],c=a-c,this.hasDragged=!0,this.updatePosition(e[0]+c,e[1]+c),this.hasDragged&&d(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:b.type,DOMEvent:b}))};c.prototype.mouseUpHandler=function(b){this.hasDragged&&d(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:b.type,DOMEvent:b});this.grabbedCenter=this.hasDragged=this.chartX=this.chartY=null};c.prototype.position=
function(b,a,c,d){var e=this.options.vertical,g=this.rendered?"animate":"attr",h=0;this.x=b;this.y=a+this.trackBorderWidth;this.width=c;this.xOffset=this.height=d;this.yOffset=h;e?(this.width=this.yOffset=c=h=this.size,this.xOffset=a=0,this.barWidth=d-2*c,this.x=b+=this.options.margin):(this.height=this.xOffset=d=a=this.size,this.barWidth=c-2*d,this.y+=this.options.margin);this.group[g]({translateX:b,translateY:this.y});this.track[g]({width:c,height:d});this.scrollbarButtons[1][g]({translateX:e?0:
c-a,translateY:e?d-h:0})};c.prototype.removeEvents=function(){this._events.forEach(function(b){J.apply(null,b)});this._events.length=0};c.prototype.render=function(){var b=this.renderer,a=this.options,d=this.size,e=this.chart.styledMode,h=b.g("scrollbar").attr({zIndex:a.zIndex,translateY:-99999}).add();this.group=h;this.track=b.rect().addClass("highcharts-scrollbar-track").attr({x:0,r:a.trackBorderRadius||0,height:d,width:d}).add(h);e||this.track.attr({fill:a.trackBackgroundColor,stroke:a.trackBorderColor,
"stroke-width":a.trackBorderWidth});this.trackBorderWidth=this.track.strokeWidth();this.track.attr({y:-this.trackBorderWidth%2/2});this.scrollbarGroup=b.g().add(h);this.scrollbar=b.rect().addClass("highcharts-scrollbar-thumb").attr({height:d,width:d,r:a.barBorderRadius||0}).add(this.scrollbarGroup);this.scrollbarRifles=b.path(c.swapXY([["M",-3,d/4],["L",-3,2*d/3],["M",0,d/4],["L",0,2*d/3],["M",3,d/4],["L",3,2*d/3]],a.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup);e||(this.scrollbar.attr({fill:a.barBackgroundColor,
stroke:a.barBorderColor,"stroke-width":a.barBorderWidth}),this.scrollbarRifles.attr({stroke:a.rifleColor,"stroke-width":1}));this.scrollbarStrokeWidth=this.scrollbar.strokeWidth();this.scrollbarGroup.translate(-this.scrollbarStrokeWidth%2/2,-this.scrollbarStrokeWidth%2/2);this.drawScrollbarButton(0);this.drawScrollbarButton(1)};c.prototype.setRange=function(b,a){var c=this.options,d=c.vertical,h=c.minWidth,g=this.barWidth,k=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?
"attr":"animate";if(e(g)){var l=g*Math.min(a,1);b=Math.max(b,0);var r=Math.ceil(g*b);this.calculatedWidth=l=y(l-r);l=l?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0);!1===c.showFull&&(0>=b&&1<=a?this.group.hide():this.group.show());this.rendered=!0}};c.prototype.shouldUpdateExtremes=function(b){return F(this.options.liveRedraw,q.svg&&!q.isTouchDevice&&!this.chart.isBoosting)||"mouseup"===b||"touchend"===b||!e(b)};c.prototype.trackClick=function(b){var a=this.chart.pointer.normalize(b),c=this.to-this.from,e=this.y+this.scrollbarTop,h=this.x+this.scrollbarLeft;this.options.vertical&&a.chartY>e||
!this.options.vertical&&a.chartX>h?this.updatePosition(this.from+c,this.to+c):this.updatePosition(this.from-c,this.to-c);d(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:b})};c.prototype.update=function(b){this.destroy();this.init(this.chart.renderer,k(!0,this.options,b),this.chart)};c.prototype.updatePosition=function(b,a){1b&&(a=y(a-b),b=0);this.from=b;this.to=a};c.defaultOptions=t;return c}();r.scrollbar=k(!0,c.defaultOptions,r.scrollbar);return c});
I(c,"Extensions/RangeSelector.js",[c["Core/Axis/Axis.js"],c["Core/Chart/Chart.js"],c["Core/Globals.js"],c["Core/DefaultOptions.js"],c["Core/Color/Palette.js"],c["Core/Renderer/SVG/SVGElement.js"],c["Core/Utilities.js"]],function(c,q,v,t,A,r,l){function y(a){if(-1!==a.indexOf("%L"))return"text";var b="aAdewbBmoyY".split("").some(function(b){return-1!==a.indexOf("%"+b)}),c="HkIlMS".split("").some(function(b){return-1!==a.indexOf("%"+b)});return b&&c?"datetime-local":b?"date":c?"time":"text"}var e=t.defaultOptions,
h=l.addEvent,d=l.createElement,k=l.css,F=l.defined,J=l.destroyObjectProperties,E=l.discardElement,b=l.extend,a=l.find,m=l.fireEvent,B=l.isNumber,G=l.merge,g=l.objectEach,H=l.pad,D=l.pick,I=l.pInt,M=l.splat;b(e,{rangeSelector:{allButtonsEnabled:!1,buttons:void 0,buttonSpacing:5,dropdown:"responsive",enabled:void 0,verticalAlign:"top",buttonTheme:{width:28,height:18,padding:2,zIndex:7},floating:!1,x:0,y:0,height:void 0,inputBoxBorderColor:"none",inputBoxHeight:17,inputBoxWidth:void 0,inputDateFormat:"%b %e, %Y",
inputDateParser:void 0,inputEditDateFormat:"%Y-%m-%d",inputEnabled:!0,inputPosition:{align:"right",x:0,y:0},inputSpacing:5,selected:void 0,buttonPosition:{align:"left",x:0,y:0},inputStyle:{color:A.highlightColor80,cursor:"pointer"},labelStyle:{color:A.neutralColor60}}});b(e.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"",rangeSelectorTo:"\u2192"});var K=function(){function a(b){this.buttons=void 0;this.buttonOptions=a.prototype.defaultButtons;this.initialButtonGroupWidth=0;this.options=void 0;
this.chart=b;this.init(b)}a.prototype.clickButton=function(a,b){var d=this.chart,f=this.buttonOptions[a],p=d.xAxis[0],e=d.scroller&&d.scroller.getUnionExtremes()||p||{},g=e.dataMin,n=e.dataMax,k=p&&Math.round(Math.min(p.max,D(n,p.max))),l=f.type;e=f._range;var z,r=f.dataGrouping;if(null!==g&&null!==n){d.fixedRange=e;this.setSelected(a);r&&(this.forcedDataGrouping=!0,c.prototype.setDataGrouping.call(p||{chart:this.chart},r,!1),this.frozenStates=f.preserveDataGrouping);if("month"===l||"year"===l)if(p){l=
{range:f,max:k,chart:d,dataMin:g,dataMax:n};var q=p.minFromRange.call(l);B(l.newMax)&&(k=l.newMax)}else e=f;else if(e)q=Math.max(k-e,g),k=Math.min(q+e,n);else if("ytd"===l)if(p)"undefined"===typeof n&&(g=Number.MAX_VALUE,n=Number.MIN_VALUE,d.series.forEach(function(a){a=a.xData;g=Math.min(a[0],g);n=Math.max(a[a.length-1],n)}),b=!1),k=this.getYTDExtremes(n,g,d.time.useUTC),q=z=k.min,k=k.max;else{this.deferredYTDClick=a;return}else"all"===l&&p&&(d.navigator&&d.navigator.baseSeries[0]&&(d.navigator.baseSeries[0].xAxis.options.range=
void 0),q=g,k=n);F(q)&&(q+=f._offsetMin);F(k)&&(k+=f._offsetMax);this.dropdown&&(this.dropdown.selectedIndex=a+1);if(p)p.setExtremes(q,k,D(b,!0),void 0,{trigger:"rangeSelectorButton",rangeSelectorButton:f});else{var t=M(d.options.xAxis)[0];var C=t.range;t.range=e;var v=t.min;t.min=z;h(d,"load",function(){t.range=C;t.min=v})}m(this,"afterBtnClick")}};a.prototype.setSelected=function(a){this.selected=this.options.selected=a};a.prototype.init=function(a){var b=this,c=a.options.rangeSelector,f=c.buttons||
b.defaultButtons.slice(),d=c.selected,e=function(){var a=b.minInput,f=b.maxInput;a&&a.blur&&m(a,"blur");f&&f.blur&&m(f,"blur")};b.chart=a;b.options=c;b.buttons=[];b.buttonOptions=f;this.eventsToUnbind=[];this.eventsToUnbind.push(h(a.container,"mousedown",e));this.eventsToUnbind.push(h(a,"resize",e));f.forEach(b.computeButtonRange);"undefined"!==typeof d&&f[d]&&this.clickButton(d,!1);this.eventsToUnbind.push(h(a,"load",function(){a.xAxis&&a.xAxis[0]&&h(a.xAxis[0],"setExtremes",function(f){this.max-
this.min!==a.fixedRange&&"rangeSelectorButton"!==f.trigger&&"updatedData"!==f.trigger&&b.forcedDataGrouping&&!b.frozenStates&&this.setDataGrouping(!1,!1)})}))};a.prototype.updateButtonStates=function(){var a=this,b=this.chart,c=this.dropdown,f=b.xAxis[0],d=Math.round(f.max-f.min),e=!f.hasVisibleSeries,g=b.scroller&&b.scroller.getUnionExtremes()||f,h=g.dataMin,k=g.dataMax;b=a.getYTDExtremes(k,h,b.time.useUTC);var l=b.min,m=b.max,r=a.selected,q=B(r),t=a.options.allButtonsEnabled,C=a.buttons;a.buttonOptions.forEach(function(b,
p){var g=b._range,n=b.type,x=b.count||1,u=C[p],z=0,L=b._offsetMax-b._offsetMin;b=p===r;var S=g>k-h,O=g=864E5*{month:28,year:365}[n]*x-L&&d-36E5<=864E5*{month:31,year:366}[n]*x+L?g=!0:"ytd"===n?(g=m-l+L===d,P=!b):"all"===n&&(g=f.max-f.min>=k-h,R=!b&&q&&g);n=!t&&(S||O||R||e);x=b&&g||g&&!q&&!P||b&&a.frozenStates;n?z=3:x&&(q=!0,z=2);u.state!==z&&(u.setState(z),c&&(c.options[p+1].disabled=n,2===z&&(c.selectedIndex=p+1)),0===z&&r===p&&a.setSelected())})};
a.prototype.computeButtonRange=function(a){var b=a.type,c=a.count||1,f={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5};if(f[b])a._range=f[b]*c;else if("month"===b||"year"===b)a._range=864E5*{month:30,year:365}[b]*c;a._offsetMin=D(a.offsetMin,0);a._offsetMax=D(a.offsetMax,0);a._range+=a._offsetMax-a._offsetMin};a.prototype.getInputValue=function(a){a="min"===a?this.minInput:this.maxInput;var b=this.chart.options.rangeSelector,c=this.chart.time;return a?("text"===a.type&&b.inputDateParser||
this.defaultInputDateParser)(a.value,c.useUTC,c):0};a.prototype.setInputValue=function(a,b){var c=this.options,f=this.chart.time,d="min"===a?this.minInput:this.maxInput;a="min"===a?this.minDateBox:this.maxDateBox;if(d){var e=d.getAttribute("data-hc-time");e=F(e)?Number(e):void 0;F(b)&&(F(e)&&d.setAttribute("data-hc-time-previous",e),d.setAttribute("data-hc-time",b),e=b);d.value=f.dateFormat(this.inputTypeFormats[d.type]||c.inputEditDateFormat,e);a&&a.attr({text:f.dateFormat(c.inputDateFormat,e)})}};
a.prototype.setInputExtremes=function(a,b,c){if(a="min"===a?this.minInput:this.maxInput){var f=this.inputTypeFormats[a.type],d=this.chart.time;f&&(b=d.dateFormat(f,b),a.min!==b&&(a.min=b),c=d.dateFormat(f,c),a.max!==c&&(a.max=c))}};a.prototype.showInput=function(a){var b="min"===a?this.minDateBox:this.maxDateBox;if((a="min"===a?this.minInput:this.maxInput)&&b&&this.inputGroup){var c="text"===a.type,f=this.inputGroup,d=f.translateX;f=f.translateY;var e=this.options.inputBoxWidth;k(a,{width:c?b.width+
(e?-2:20)+"px":"auto",height:c?b.height-2+"px":"auto",border:"2px solid silver"});c&&e?k(a,{left:d+b.x+"px",top:f+"px"}):k(a,{left:Math.min(Math.round(b.x+d-(a.offsetWidth-b.width)/2),this.chart.chartWidth-a.offsetWidth)+"px",top:f-(a.offsetHeight-b.height)/2+"px"})}};a.prototype.hideInput=function(a){(a="min"===a?this.minInput:this.maxInput)&&k(a,{top:"-9999em",border:0,width:"1px",height:"1px"})};a.prototype.defaultInputDateParser=function(a,b,c){var f=a.split("/").join("-").split(" ").join("T");
-1===f.indexOf("T")&&(f+="T00:00");if(b)f+="Z";else{var d;if(d=v.isSafari)d=f,d=!(6=d?"+"+H(-d)+":00":"-"+H(d)+":00")}f=Date.parse(f);B(f)||(a=a.split("-"),f=Date.UTC(I(a[0]),I(a[1])-1,I(a[2])));c&&b&&B(f)&&(f+=c.getTimezoneOffset(f));return f};a.prototype.drawInput=function(a){function c(){var b=h.getInputValue(a),f=g.xAxis[0],c=g.scroller&&g.scroller.xAxis?g.scroller.xAxis:
f,d=c.dataMin;c=c.dataMax;var e=h.maxInput,p=h.minInput;b!==Number(t.getAttribute("data-hc-time-previous"))&&B(b)&&(t.setAttribute("data-hc-time-previous",b),r&&e&&B(d)?b>Number(e.getAttribute("data-hc-time"))?b=void 0:bc&&(b=c)),"undefined"!==typeof b&&f.setExtremes(r?b:f.min,r?f.max:b,void 0,void 0,{trigger:"rangeSelectorInput"}))}var g=this.chart,f=this.div,p=this.inputGroup,h=this,n=g.renderer.style||{},l=g.renderer,m=g.options.rangeSelector,
r="min"===a,q=e.lang[r?"rangeSelectorFrom":"rangeSelectorTo"];q=l.label(q,0).addClass("highcharts-range-label").attr({padding:q?2:0,height:q?m.inputBoxHeight:0}).add(p);l=l.label("",0).addClass("highcharts-range-input").attr({padding:2,width:m.inputBoxWidth,height:m.inputBoxHeight,"text-align":"center"}).on("click",function(){h.showInput(a);h[a+"Input"].focus()});g.styledMode||l.attr({stroke:m.inputBoxBorderColor,"stroke-width":1});l.add(p);var t=d("input",{name:a,className:"highcharts-range-selector"},
void 0,f);t.setAttribute("type",y(m.inputDateFormat||"%b %e, %Y"));g.styledMode||(q.css(G(n,m.labelStyle)),l.css(G({color:A.neutralColor80},n,m.inputStyle)),k(t,b({position:"absolute",border:0,boxShadow:"0 0 15px rgba(0,0,0,0.3)",width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:n.fontSize,fontFamily:n.fontFamily,top:"-9999em"},m.inputStyle)));t.onfocus=function(){h.showInput(a)};t.onblur=function(){t===v.doc.activeElement&&c();h.hideInput(a);h.setInputValue(a);t.blur()};var C=!1;t.onchange=
function(){C||(c(),h.hideInput(a),t.blur())};t.onkeypress=function(a){13===a.keyCode&&c()};t.onkeydown=function(a){C=!0;38!==a.keyCode&&40!==a.keyCode||c()};t.onkeyup=function(){C=!1};return{dateBox:l,input:t,label:q}};a.prototype.getPosition=function(){var a=this.chart,b=a.options.rangeSelector;a="top"===b.verticalAlign?a.plotTop-a.axisOffset[0]:0;return{buttonTop:a+b.buttonPosition.y,inputTop:a+b.inputPosition.y-10}};a.prototype.getYTDExtremes=function(a,b,c){var f=this.chart.time,d=new f.Date(a),
e=f.get("FullYear",d);c=c?f.Date.UTC(e,0,1):+new f.Date(e,0,1);b=Math.max(b,c);d=d.getTime();return{max:Math.min(a||d,d),min:b}};a.prototype.render=function(a,b){var c=this.chart,f=c.renderer,e=c.container,g=c.options,h=g.rangeSelector,n=D(g.chart.style&&g.chart.style.zIndex,0)+1;g=h.inputEnabled;if(!1!==h.enabled){this.rendered||(this.group=f.g("range-selector-group").attr({zIndex:7}).add(),this.div=d("div",void 0,{position:"relative",height:0,zIndex:n}),this.buttonOptions.length&&this.renderButtons(),
e.parentNode&&e.parentNode.insertBefore(this.div,e),g&&(this.inputGroup=f.g("input-group").add(this.group),f=this.drawInput("min"),this.minDateBox=f.dateBox,this.minLabel=f.label,this.minInput=f.input,f=this.drawInput("max"),this.maxDateBox=f.dateBox,this.maxLabel=f.label,this.maxInput=f.input));if(g&&(this.setInputValue("min",a),this.setInputValue("max",b),a=c.scroller&&c.scroller.getUnionExtremes()||c.xAxis[0]||{},F(a.dataMin)&&F(a.dataMax)&&(c=c.xAxis[0].minRange||0,this.setInputExtremes("min",
a.dataMin,Math.min(a.dataMax,this.getInputValue("max"))-c),this.setInputExtremes("max",Math.max(a.dataMin,this.getInputValue("min"))+c,a.dataMax)),this.inputGroup)){var k=0;[this.minLabel,this.minDateBox,this.maxLabel,this.maxDateBox].forEach(function(a){if(a){var b=a.getBBox().width;b&&(a.attr({x:k}),k+=b+h.inputSpacing)}})}this.alignElements();this.rendered=!0}};a.prototype.renderButtons=function(){var a=this,b=this.buttons,c=this.options,f=e.lang,g=this.chart.renderer,k=G(c.buttonTheme),l=k&&k.states,
r=k.width||28;delete k.width;delete k.states;this.buttonGroup=g.g("range-selector-buttons").add(this.group);var q=this.dropdown=d("select",void 0,{position:"absolute",width:"1px",height:"1px",padding:0,border:0,top:"-9999em",cursor:"pointer",opacity:.0001},this.div);h(q,"touchstart",function(){q.style.fontSize="16px"});[[v.isMS?"mouseover":"mouseenter"],[v.isMS?"mouseout":"mouseleave"],["change","click"]].forEach(function(c){var f=c[0],d=c[1];h(q,f,function(){var c=b[a.currentButtonIndex()];c&&m(c.element,
d||f)})});this.zoomText=g.label(f&&f.rangeSelectorZoom||"",0).attr({padding:c.buttonTheme.padding,height:c.buttonTheme.height,paddingLeft:0,paddingRight:0}).add(this.buttonGroup);this.chart.styledMode||(this.zoomText.css(c.labelStyle),k["stroke-width"]=D(k["stroke-width"],0));d("option",{textContent:this.zoomText.textStr,disabled:!0},void 0,q);this.buttonOptions.forEach(function(c,f){d("option",{textContent:c.title||c.text},void 0,q);b[f]=g.button(c.text,0,0,function(b){var d=c.events&&c.events.click,
e;d&&(e=d.call(c,b));!1!==e&&a.clickButton(f);a.isActive=!0},k,l&&l.hover,l&&l.select,l&&l.disabled).attr({"text-align":"center",width:r}).add(a.buttonGroup);c.title&&b[f].attr("title",c.title)})};a.prototype.alignElements=function(){var a=this,b=this.buttonGroup,c=this.buttons,f=this.chart,d=this.group,e=this.inputGroup,g=this.options,h=this.zoomText,k=f.options,l=k.exporting&&!1!==k.exporting.enabled&&k.navigation&&k.navigation.buttonOptions;k=g.buttonPosition;var m=g.inputPosition,r=g.verticalAlign,
q=function(b,c){return l&&a.titleCollision(f)&&"top"===r&&"right"===c.align&&c.y-b.getBBox().height-12<(l.y||0)+(l.height||0)+f.spacing[0]?-40:0},t=f.plotLeft;if(d&&k&&m){var C=k.x-f.spacing[3];if(b){this.positionButtons();if(!this.initialButtonGroupWidth){var v=0;h&&(v+=h.getBBox().width+5);c.forEach(function(a,b){v+=a.width;b!==c.length-1&&(v+=g.buttonSpacing)});this.initialButtonGroupWidth=v}t-=f.spacing[3];this.updateButtonStates();h=q(b,k);this.alignButtonGroup(h);d.placed=b.placed=f.hasLoaded}b=
0;e&&(b=q(e,m),"left"===m.align?C=t:"right"===m.align&&(C=-Math.max(f.axisOffset[1],-b)),e.align({y:m.y,width:e.getBBox().width,align:m.align,x:m.x+C-2},!0,f.spacingBox),e.placed=f.hasLoaded);this.handleCollision(b);d.align({verticalAlign:r},!0,f.spacingBox);e=d.alignAttr.translateY;b=d.getBBox().height+20;q=0;"bottom"===r&&(q=(q=f.legend&&f.legend.options)&&"bottom"===q.verticalAlign&&q.enabled&&!q.floating?f.legend.legendHeight+D(q.margin,10):0,b=b+q-20,q=e-b-(g.floating?0:g.y)-(f.titleOffset?f.titleOffset[2]:
0)-10);if("top"===r)g.floating&&(q=0),f.titleOffset&&f.titleOffset[0]&&(q=f.titleOffset[0]),q+=f.margin[0]-f.spacing[0]||0;else if("middle"===r)if(m.y===k.y)q=e;else if(m.y||k.y)q=0>m.y||0>k.y?q-Math.min(m.y,k.y):e-b;d.translate(g.x,g.y+Math.floor(q));k=this.minInput;m=this.maxInput;e=this.dropdown;g.inputEnabled&&k&&m&&(k.style.marginTop=d.translateY+"px",m.style.marginTop=d.translateY+"px");e&&(e.style.marginTop=d.translateY+"px")}};a.prototype.alignButtonGroup=function(a,b){var c=this.chart,f=
this.buttonGroup,d=this.options.buttonPosition,e=c.plotLeft-c.spacing[3],g=d.x-c.spacing[3];"right"===d.align?g+=a-e:"center"===d.align&&(g-=e/2);f&&f.align({y:d.y,width:D(b,this.initialButtonGroupWidth),align:d.align,x:g},!0,c.spacingBox)};a.prototype.positionButtons=function(){var a=this.buttons,b=this.chart,c=this.options,f=this.zoomText,d=b.hasLoaded?"animate":"attr",e=c.buttonPosition,g=b.plotLeft,h=g;f&&"hidden"!==f.visibility&&(f[d]({x:D(g+e.x,g)}),h+=e.x+f.getBBox().width+5);this.buttonOptions.forEach(function(b,
f){if("hidden"!==a[f].visibility)a[f][d]({x:h}),h+=a[f].width+c.buttonSpacing;else a[f][d]({x:g})})};a.prototype.handleCollision=function(a){var b=this,c=this.chart,f=this.buttonGroup,d=this.inputGroup,e=this.options,g=e.buttonPosition,h=e.dropdown,k=e.inputPosition;e=function(){var a=0;b.buttons.forEach(function(b){b=b.getBBox();b.width>a&&(a=b.width)});return a};var n=function(b){if(d&&f){var c=d.alignAttr.translateX+d.alignOptions.x-a+d.getBBox().x+2,e=d.alignOptions.width,p=f.alignAttr.translateX+
f.getBBox().x;return p+b>c&&c+e>p&&g.y=-a?0:-a),translateY:d.alignAttr.translateY+f.getBBox().height+10})};if(f){if("always"===h){this.collapseButtons(a);n(e())&&l();return}"never"===h&&this.expandButtons()}d&&f?k.align===g.align||n(this.initialButtonGroupWidth+20)?"responsive"===h?(this.collapseButtons(a),n(e())&&l()):l():"responsive"===h&&this.expandButtons():f&&"responsive"===h&&(this.initialButtonGroupWidth>
c.plotWidth?this.collapseButtons(a):this.expandButtons())};a.prototype.collapseButtons=function(a){var b=this.buttons,c=this.buttonOptions,f=this.chart,d=this.dropdown,e=this.options,g=this.zoomText,h=f.userOptions.rangeSelector&&f.userOptions.rangeSelector.buttonTheme||{},k=function(a){return{text:a?a+" \u25be":"\u25be",width:"auto",paddingLeft:D(e.buttonTheme.paddingLeft,h.padding,8),paddingRight:D(e.buttonTheme.paddingRight,h.padding,8)}};g&&g.hide();var n=!1;c.forEach(function(a,c){c=b[c];2!==
c.state?c.hide():(c.show(),c.attr(k(a.text)),n=!0)});n||(d&&(d.selectedIndex=0),b[0].show(),b[0].attr(k(this.zoomText&&this.zoomText.textStr)));c=e.buttonPosition.align;this.positionButtons();"right"!==c&&"center"!==c||this.alignButtonGroup(a,b[this.currentButtonIndex()].getBBox().width);this.showDropdown()};a.prototype.expandButtons=function(){var a=this.buttons,b=this.buttonOptions,c=this.options,f=this.zoomText;this.hideDropdown();f&&f.show();b.forEach(function(b,f){f=a[f];f.show();f.attr({text:b.text,
width:c.buttonTheme.width||28,paddingLeft:D(c.buttonTheme.paddingLeft,"unset"),paddingRight:D(c.buttonTheme.paddingRight,"unset")});2>f.state&&f.setState(0)});this.positionButtons()};a.prototype.currentButtonIndex=function(){var a=this.dropdown;return a&&0d&&0>f||0d&&(q?c=e-b:e=c+b);l(c)&&l(e)||(c=e=void 0);return{min:c,max:e}};return c}();return function(){function c(){}c.compose=function(c){c.keepProps.push("navigatorAxis");t(c,"init",function(){this.navigatorAxis||(this.navigatorAxis=new e(this))});t(c,"zoom",function(c){var d=this.chart.options,e=d.navigator,h=this.navigatorAxis,b=d.chart.pinchType,a=d.rangeSelector;d=d.chart.zoomType;this.isXAxis&&(e&&e.enabled||a&&a.enabled)&&("y"===d?c.zoomed=
!1:(!v&&"xy"===d||v&&"xy"===b)&&this.options.range&&(e=h.previousZoom,r(c.newMin)?h.previousZoom=[this.min,this.max]:e&&(c.newMin=e[0],c.newMax=e[1],h.previousZoom=void 0)));"undefined"!==typeof c.zoomed&&c.preventDefault()})};c.AdditionsClass=e;return c}()});I(c,"Core/Navigator.js",[c["Core/Axis/Axis.js"],c["Core/Chart/Chart.js"],c["Core/Color/Color.js"],c["Core/Globals.js"],c["Core/Axis/NavigatorAxis.js"],c["Core/DefaultOptions.js"],c["Core/Color/Palette.js"],c["Core/Renderer/RendererRegistry.js"],
c["Core/Scrollbar.js"],c["Core/Series/Series.js"],c["Core/Series/SeriesRegistry.js"],c["Core/Utilities.js"]],function(c,q,v,t,A,r,l,y,e,h,d,k){v=v.parse;var F=t.hasTouch,J=t.isTouchDevice,E=r.defaultOptions,b=k.addEvent,a=k.clamp,m=k.correctFloat,B=k.defined,G=k.destroyObjectProperties,g=k.erase,H=k.extend,D=k.find,I=k.isArray,M=k.isNumber,K=k.merge,w=k.pick,N=k.removeEvent,C=k.splat,n=function(a){for(var b=[],c=1;cu&&(this.grabbedLeft?d=p.toPixels(c-u-k,!0):this.grabbedRight&&(e=p.toPixels(b+u+k,!0)));this.zoomedMax=a(Math.max(d,e),0,q);this.zoomedMin=a(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(d,e),0,q);this.range=this.zoomedMax-this.zoomedMin;q=Math.round(this.zoomedMax);d=Math.round(this.zoomedMin);n&&(this.navigatorGroup.attr({visibility:"visible"}),r=r&&!this.hasDragged?"animate":"attr",this.drawMasks(d,q,x,r),this.drawOutline(d,q,x,r),this.navigatorOptions.handles.enabled&&
(this.drawHandle(d,0,x,r),this.drawHandle(q,1,x,r)));this.scrollbar&&(x?(x=this.top-g,l=this.left-g+(n||!l.opposite?0:(l.titleOffset||0)+l.axisTitleMargin),g=h+2*g):(x=this.top+(n?this.height:-g),l=this.left-g),this.scrollbar.position(l,x,f,g),this.scrollbar.setRange(this.zoomedMin/(h||1),this.zoomedMax/(h||1)));this.rendered=!0}};d.prototype.addMouseEvents=function(){var a=this,c=a.chart,d=c.container,e=[],g,h;a.mouseMoveHandler=g=function(b){a.onMouseMove(b)};a.mouseUpHandler=h=function(b){a.onMouseUp(b)};
e=a.getPartsEvents("mousedown");e.push(b(c.renderTo,"mousemove",g),b(d.ownerDocument,"mouseup",h));F&&(e.push(b(c.renderTo,"touchmove",g),b(d.ownerDocument,"touchend",h)),e.concat(a.getPartsEvents("touchstart")));a.eventsToUnbind=e;a.series&&a.series[0]&&e.push(b(a.series[0].xAxis,"foundExtremes",function(){c.navigator.modifyNavigatorAxisExtremes()}))};d.prototype.getPartsEvents=function(a){var c=this,d=[];["shades","handles"].forEach(function(f){c[f].forEach(function(e,g){d.push(b(e.element,a,function(a){c[f+
"Mousedown"](a,g)}))})});return d};d.prototype.shadesMousedown=function(a,b){a=this.chart.pointer.normalize(a);var c=this.chart,d=this.xAxis,f=this.zoomedMin,e=this.left,g=this.size,h=this.range,p=a.chartX;c.inverted&&(p=a.chartY,e=this.top);if(1===b)this.grabbedCenter=p,this.fixedWidth=h,this.dragOffset=p-f;else{a=p-e-h/2;if(0===b)a=Math.max(0,a);else if(2===b&&a+h>=g)if(a=g-h,this.reversedExtremes){a-=h;var k=this.getUnionExtremes().dataMin}else var l=this.getUnionExtremes().dataMax;a!==f&&(this.fixedWidth=
h,b=d.navigatorAxis.toFixedRange(a,a+h,k,l),B(b.min)&&c.xAxis[0].setExtremes(Math.min(b.min,b.max),Math.max(b.min,b.max),!0,null,{trigger:"navigator"}))}};d.prototype.handlesMousedown=function(a,b){this.chart.pointer.normalize(a);a=this.chart;var c=a.xAxis[0],d=this.reversedExtremes;0===b?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=d?c.min:c.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=d?c.max:c.min);a.fixedRange=null};d.prototype.onMouseMove=
function(a){var b=this,c=b.chart,d=b.left,f=b.navigatorSize,e=b.range,g=b.dragOffset,h=c.inverted;a.touches&&0===a.touches[0].pageX||(a=c.pointer.normalize(a),c=a.chartX,h&&(d=b.top,c=a.chartY),b.grabbedLeft?(b.hasDragged=!0,b.render(0,0,c-d,b.otherHandlePos)):b.grabbedRight?(b.hasDragged=!0,b.render(0,0,b.otherHandlePos,c-d)):b.grabbedCenter&&(b.hasDragged=!0,cf+g-e&&(c=f+g-e),b.render(0,0,c-g,c-g+e)),b.hasDragged&&b.scrollbar&&w(b.scrollbar.options.liveRedraw,t.svg&&!J&&!this.chart.isBoosting)&&
(a.DOMType=a.type,setTimeout(function(){b.onMouseUp(a)},0)))};d.prototype.onMouseUp=function(a){var b=this.chart,c=this.xAxis,d=this.scrollbar,f=a.DOMEvent||a,e=b.inverted,g=this.rendered&&!this.hasDragged?"animate":"attr";if(this.hasDragged&&(!d||!d.hasDragged)||"scrollbar"===a.trigger){d=this.getUnionExtremes();if(this.zoomedMin===this.otherHandlePos)var h=this.fixedExtreme;else if(this.zoomedMax===this.otherHandlePos)var k=this.fixedExtreme;this.zoomedMax===this.size&&(k=this.reversedExtremes?
d.dataMin:d.dataMax);0===this.zoomedMin&&(h=this.reversedExtremes?d.dataMax:d.dataMin);c=c.navigatorAxis.toFixedRange(this.zoomedMin,this.zoomedMax,h,k);B(c.min)&&b.xAxis[0].setExtremes(Math.min(c.min,c.max),Math.max(c.min,c.max),!0,this.hasDragged?!1:null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:f})}"mousemove"!==a.DOMType&&"touchmove"!==a.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=
null);this.navigatorEnabled&&M(this.zoomedMin)&&M(this.zoomedMax)&&(b=Math.round(this.zoomedMin),a=Math.round(this.zoomedMax),this.shades&&this.drawMasks(b,a,e,g),this.outline&&this.drawOutline(b,a,e,g),this.navigatorOptions.handles.enabled&&Object.keys(this.handles).length===this.handles.length&&(this.drawHandle(b,0,e,g),this.drawHandle(a,1,e,g)))};d.prototype.removeEvents=function(){this.eventsToUnbind&&(this.eventsToUnbind.forEach(function(a){a()}),this.eventsToUnbind=void 0);this.removeBaseSeriesEvents()};
d.prototype.removeBaseSeriesEvents=function(){var a=this.baseSeries||[];this.navigatorEnabled&&a[0]&&(!1!==this.navigatorOptions.adaptToUpdatedData&&a.forEach(function(a){N(a,"updatedData",this.updatedDataHandler)},this),a[0].xAxis&&N(a[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))};d.prototype.init=function(a){var d=a.options,f=d.navigator,g=f.enabled,h=d.scrollbar,k=h.enabled;d=g?f.height:0;var l=k?h.height:0;this.handles=[];this.shades=[];this.chart=a;this.setBaseSeries();this.height=
d;this.scrollbarHeight=l;this.scrollbarEnabled=k;this.navigatorEnabled=g;this.navigatorOptions=f;this.scrollbarOptions=h;this.outlineHeight=d+l;this.opposite=w(f.opposite,!(g||!a.inverted));var m=this;g=m.baseSeries;h=a.xAxis.length;k=a.yAxis.length;var q=g&&g[0]&&g[0].xAxis||a.xAxis[0]||{options:{}};a.isDirtyBox=!0;m.navigatorEnabled?(m.xAxis=new c(a,K({breaks:q.options.breaks,ordinal:q.options.ordinal},f.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",isX:!0,type:"datetime",index:h,isInternal:!0,
offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1},a.inverted?{offsets:[l,0,-l,0],width:d}:{offsets:[0,-l,0,l],height:d})),m.yAxis=new c(a,K(f.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:k,isInternal:!0,reversed:w(f.yAxis&&f.yAxis.reversed,a.yAxis[0]&&a.yAxis[0].reversed,!1),zoomEnabled:!1},a.inverted?{width:d}:{height:d})),g||f.series.data?m.updateNavigatorSeries(!1):0===a.series.length&&(m.unbindRedraw=b(a,"beforeRedraw",function(){0<
a.series.length&&!m.series&&(m.setBaseSeries(),m.unbindRedraw())})),m.reversedExtremes=a.inverted&&!m.xAxis.reversed||!a.inverted&&m.xAxis.reversed,m.renderElements(),m.addMouseEvents()):(m.xAxis={chart:a,navigatorAxis:{fake:!0},translate:function(b,c){var d=a.xAxis[0],f=d.getExtremes(),e=d.len-2*l,g=n("min",d.options.min,f.dataMin);d=n("max",d.options.max,f.dataMax)-g;return c?b*d/e+g:e*(b-g)/d},toPixels:function(a){return this.translate(a)},toValue:function(a){return this.translate(a,!0)}},m.xAxis.navigatorAxis.axis=
m.xAxis,m.xAxis.navigatorAxis.toFixedRange=A.AdditionsClass.prototype.toFixedRange.bind(m.xAxis.navigatorAxis));a.options.scrollbar.enabled&&(a.scrollbar=m.scrollbar=new e(a.renderer,K(a.options.scrollbar,{margin:m.navigatorEnabled?0:10,vertical:a.inverted}),a),b(m.scrollbar,"changed",function(a){var b=m.size,c=b*this.to;b*=this.from;m.hasDragged=m.scrollbar.hasDragged;m.render(0,0,b,c);this.shouldUpdateExtremes(a.DOMType)&&setTimeout(function(){m.onMouseUp(a)})}));m.addBaseSeriesEvents();m.addChartEvents()};
d.prototype.getUnionExtremes=function(a){var b=this.chart.xAxis[0],c=this.xAxis,d=c.options,f=b.options,e;a&&null===b.dataMin||(e={dataMin:w(d&&d.min,n("min",f.min,b.dataMin,c.dataMin,c.min)),dataMax:w(d&&d.max,n("max",f.max,b.dataMax,c.dataMax,c.max))});return e};d.prototype.setBaseSeries=function(a,b){var c=this.chart,d=this.baseSeries=[];a=a||c.options&&c.options.navigator.baseSeries||(c.series.length?D(c.series,function(a){return!a.options.isInternal}).index:0);(c.series||[]).forEach(function(b,
c){b.options.isInternal||!b.options.showInNavigator&&(c!==a&&b.options.id!==a||!1===b.options.showInNavigator)||d.push(b)});this.xAxis&&!this.xAxis.navigatorAxis.fake&&this.updateNavigatorSeries(!0,b)};d.prototype.updateNavigatorSeries=function(a,b){var c=this,d=c.chart,f=c.baseSeries,e,g,h=c.navigatorOptions.series,k,l={enableMouseTracking:!1,index:null,linkedTo:null,group:"nav",padXAxis:!1,xAxis:"navigator-x-axis",yAxis:"navigator-y-axis",showInLegend:!1,stacking:void 0,isInternal:!0,states:{inactive:{opacity:1}}},
p=c.series=(c.series||[]).filter(function(a){var b=a.baseSeries;return 0>f.indexOf(b)?(b&&(N(b,"updatedData",c.updatedDataHandler),delete b.navigatorSeries),a.chart&&a.destroy(),!1):!0});f&&f.length&&f.forEach(function(a){var m=a.navigatorSeries,n=H({color:a.color,visible:a.visible},I(h)?E.navigator.series:h);m&&!1===c.navigatorOptions.adaptToUpdatedData||(l.name="Navigator "+f.length,e=a.options||{},k=e.navigatorOptions||{},n.dataLabels=C(n.dataLabels),g=K(e,l,n,k),g.pointRange=w(n.pointRange,k.pointRange,
E.plotOptions[g.type||"line"].pointRange),n=k.data||n.data,c.hasNavigatorData=c.hasNavigatorData||!!n,g.data=n||e.data&&e.data.slice(0),m&&m.options?m.update(g,b):(a.navigatorSeries=d.initSeries(g),a.navigatorSeries.baseSeries=a,p.push(a.navigatorSeries)))});if(h.data&&(!f||!f.length)||I(h))c.hasNavigatorData=!1,h=C(h),h.forEach(function(a,b){l.name="Navigator "+(p.length+1);g=K(E.navigator.series,{color:d.series[b]&&!d.series[b].options.isInternal&&d.series[b].color||d.options.colors[b]||d.options.colors[0]},
l,a);g.data=a.data;g.data&&(c.hasNavigatorData=!0,p.push(d.initSeries(g)))});a&&this.addBaseSeriesEvents()};d.prototype.addBaseSeriesEvents=function(){var a=this,c=a.baseSeries||[];c[0]&&c[0].xAxis&&c[0].eventsToUnbind.push(b(c[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes));c.forEach(function(c){c.eventsToUnbind.push(b(c,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)}));c.eventsToUnbind.push(b(c,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,
!1)}));!1!==this.navigatorOptions.adaptToUpdatedData&&c.xAxis&&c.eventsToUnbind.push(b(c,"updatedData",this.updatedDataHandler));c.eventsToUnbind.push(b(c,"remove",function(){this.navigatorSeries&&(g(a.series,this.navigatorSeries),B(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)}))},this)};d.prototype.getBaseSeriesMin=function(a){return this.baseSeries.reduce(function(a,b){return Math.min(a,b.xData?b.xData[0]:a)},a)};d.prototype.modifyNavigatorAxisExtremes=
function(){var a=this.xAxis,b;"undefined"!==typeof a.getExtremes&&(!(b=this.getUnionExtremes(!0))||b.dataMin===a.min&&b.dataMax===a.max||(a.min=b.dataMin,a.max=b.dataMax))};d.prototype.modifyBaseAxisExtremes=function(){var a=this.chart.navigator,b=this.getExtremes(),c=b.dataMin,d=b.dataMax;b=b.max-b.min;var e=a.stickToMin,g=a.stickToMax,h=w(this.options.overscroll,0),k=a.series&&a.series[0],l=!!this.setExtremes;if(!this.eventArgs||"rangeSelectorButton"!==this.eventArgs.trigger){if(e){var m=c;var n=
m+b}g&&(n=d+h,e||(m=Math.max(c,n-b,a.getBaseSeriesMin(k&&k.xData?k.xData[0]:-Number.MAX_VALUE))));l&&(e||g)&&M(m)&&(this.min=this.userMin=m,this.max=this.userMax=n)}a.stickToMin=a.stickToMax=null};d.prototype.updatedDataHandler=function(){var a=this.chart.navigator,b=this.navigatorSeries;a.stickToMax=a.reversedExtremes?0===Math.round(a.zoomedMin):Math.round(a.zoomedMax)>=Math.round(a.size);a.stickToMin=a.shouldStickToMin(this,a);b&&!a.hasNavigatorData&&(b.options.pointStart=this.xData[0],b.setData(this.options.data,
!1,null,!1))};d.prototype.shouldStickToMin=function(a,b){b=b.getBaseSeriesMin(a.xData[0]);var c=a.xAxis;a=c.max;var d=c.min;c=c.options.range;var e=!0;M(a)&&M(d)&&(e=c&&0