/*
 Highstock JS v8.2.0 (2020-08-20)

 Highstock as a plugin for Highcharts

 (c) 2010-2019 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(l){"object"===typeof module&&module.exports?(l["default"]=l,module.exports=l):"function"===typeof define&&define.amd?define("highcharts/modules/stock",["highcharts"],function(K){l(K);l.Highcharts=K;return l}):l("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(l){function K(l,r,B,t){l.hasOwnProperty(r)||(l[r]=t.apply(null,B))}l=l?l._modules:{};K(l,"Core/Axis/NavigatorAxis.js",[l["Core/Globals.js"],l["Core/Utilities.js"]],function(l,r){var B=l.isTouchDevice,t=r.addEvent,E=r.correctFloat,
e=r.defined,z=r.isNumber,p=r.pick,a=function(){function a(a){this.axis=a}a.prototype.destroy=function(){this.axis=void 0};a.prototype.toFixedRange=function(a,v,C,y){var A=this.axis,n=A.chart;n=n&&n.fixedRange;var c=(A.pointRange||0)/2;a=p(C,A.translate(a,!0,!A.horiz));v=p(y,A.translate(v,!0,!A.horiz));A=n&&(v-a)/n;e(C)||(a=E(a+c));e(y)||(v=E(v-c));.7<A&&1.3>A&&(y?a=v-n:v=a+n);z(a)&&z(v)||(a=v=void 0);return{min:a,max:v}};return a}();return function(){function p(){}p.compose=function(p){p.keepProps.push("navigatorAxis");
t(p,"init",function(){this.navigatorAxis||(this.navigatorAxis=new a(this))});t(p,"zoom",function(a){var p=this.chart.options,y=p.navigator,A=this.navigatorAxis,n=p.chart.pinchType,c=p.rangeSelector;p=p.chart.zoomType;this.isXAxis&&(y&&y.enabled||c&&c.enabled)&&("y"===p?a.zoomed=!1:(!B&&"xy"===p||B&&"xy"===n)&&this.options.range&&(y=A.previousZoom,e(a.newMin)?A.previousZoom=[this.min,this.max]:y&&(a.newMin=y[0],a.newMax=y[1],A.previousZoom=void 0)));"undefined"!==typeof a.zoomed&&a.preventDefault()})};
p.AdditionsClass=a;return p}()});K(l,"Core/Axis/ScrollbarAxis.js",[l["Core/Globals.js"],l["Core/Utilities.js"]],function(l,r){var B=r.addEvent,t=r.defined,E=r.pick;return function(){function e(){}e.compose=function(e,p){B(e,"afterInit",function(){var a=this;a.options&&a.options.scrollbar&&a.options.scrollbar.enabled&&(a.options.scrollbar.vertical=!a.horiz,a.options.startOnTick=a.options.endOnTick=!1,a.scrollbar=new p(a.chart.renderer,a.options.scrollbar,a.chart),B(a.scrollbar,"changed",function(p){var e=
E(a.options&&a.options.min,a.min),v=E(a.options&&a.options.max,a.max),C=t(a.dataMin)?Math.min(e,a.min,a.dataMin):e,y=(t(a.dataMax)?Math.max(v,a.max,a.dataMax):v)-C;t(e)&&t(v)&&(a.horiz&&!a.reversed||!a.horiz&&a.reversed?(e=C+y*this.to,C+=y*this.from):(e=C+y*(1-this.from),C+=y*(1-this.to)),E(this.options.liveRedraw,l.svg&&!l.isTouchDevice&&!this.chart.isBoosting)||"mouseup"===p.DOMType||!t(p.DOMType)?a.setExtremes(C,e,!0,"mousemove"!==p.DOMType,p):this.setRange(this.from,this.to))}))});B(e,"afterRender",
function(){var a=Math.min(E(this.options.min,this.min),this.min,E(this.dataMin,this.min)),p=Math.max(E(this.options.max,this.max),this.max,E(this.dataMax,this.max)),e=this.scrollbar,l=this.axisTitleMargin+(this.titleOffset||0),C=this.chart.scrollbarsOffsets,y=this.options.margin||0;e&&(this.horiz?(this.opposite||(C[1]+=l),e.position(this.left,this.top+this.height+2+C[1]-(this.opposite?y:0),this.width,this.height),this.opposite||(C[1]+=y),l=1):(this.opposite&&(C[0]+=l),e.position(this.left+this.width+
2+C[0]-(this.opposite?0:y),this.top,this.width,this.height),this.opposite&&(C[0]+=y),l=0),C[l]+=e.size+e.options.margin,isNaN(a)||isNaN(p)||!t(this.min)||!t(this.max)||this.min===this.max?e.setRange(0,1):(C=(this.min-a)/(p-a),a=(this.max-a)/(p-a),this.horiz&&!this.reversed||!this.horiz&&this.reversed?e.setRange(C,a):e.setRange(1-a,1-C)))});B(e,"afterGetOffset",function(){var a=this.horiz?2:1,e=this.scrollbar;e&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[a]+=e.size+e.options.margin)})};
return e}()});K(l,"Core/Scrollbar.js",[l["Core/Axis/Axis.js"],l["Core/Globals.js"],l["Core/Axis/ScrollbarAxis.js"],l["Core/Utilities.js"],l["Core/Options.js"]],function(l,r,B,t,E){var e=t.addEvent,z=t.correctFloat,p=t.defined,a=t.destroyObjectProperties,v=t.fireEvent,H=t.merge,G=t.pick,C=t.removeEvent;t=E.defaultOptions;var y=r.hasTouch,A=r.isTouchDevice,n=r.swapXY=function(c,h){h&&c.forEach(function(g){for(var h=g.length,c,m=0;m<h;m+=2)c=g[m+1],"number"===typeof c&&(g[m+1]=g[m+2],g[m+2]=c)});return c};
E=function(){function c(h,g,c){this._events=[];this.from=this.chartY=this.chartX=0;this.scrollbar=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={};this.y=this.x=0;this.chart=c;this.options=g;this.renderer=c.renderer;this.init(h,g,c)}c.prototype.addEvents=function(){var h=this.options.inverted?[1,0]:[0,
1],g=this.scrollbarButtons,c=this.scrollbarGroup.element,n=this.track.element,m=this.mouseDownHandler.bind(this),k=this.mouseMoveHandler.bind(this),d=this.mouseUpHandler.bind(this);h=[[g[h[0]].element,"click",this.buttonToMinClick.bind(this)],[g[h[1]].element,"click",this.buttonToMaxClick.bind(this)],[n,"click",this.trackClick.bind(this)],[c,"mousedown",m],[c.ownerDocument,"mousemove",k],[c.ownerDocument,"mouseup",d]];y&&h.push([c,"touchstart",m],[c.ownerDocument,"touchmove",k],[c.ownerDocument,"touchend",
d]);h.forEach(function(d){e.apply(null,d)});this._events=h};c.prototype.buttonToMaxClick=function(h){var g=(this.to-this.from)*G(this.options.step,.2);this.updatePosition(this.from+g,this.to+g);v(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:h})};c.prototype.buttonToMinClick=function(h){var g=z(this.to-this.from)*G(this.options.step,.2);this.updatePosition(z(this.from-g),z(this.to-g));v(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:h})};c.prototype.cursorToScrollbarPosition=
function(h){var g=this.options;g=g.minWidth>this.calculatedWidth?g.minWidth:0;return{chartX:(h.chartX-this.x-this.xOffset)/(this.barWidth-g),chartY:(h.chartY-this.y-this.yOffset)/(this.barWidth-g)}};c.prototype.destroy=function(){var h=this.chart.scroller;this.removeEvents();["track","scrollbarRifles","scrollbar","scrollbarGroup","group"].forEach(function(g){this[g]&&this[g].destroy&&(this[g]=this[g].destroy())},this);h&&this===h.scrollbar&&(h.scrollbar=null,a(h.scrollbarButtons))};c.prototype.drawScrollbarButton=
function(h){var g=this.renderer,c=this.scrollbarButtons,a=this.options,m=this.size;var k=g.g().add(this.group);c.push(k);k=g.rect().addClass("highcharts-scrollbar-button").add(k);this.chart.styledMode||k.attr({stroke:a.buttonBorderColor,"stroke-width":a.buttonBorderWidth,fill:a.buttonBackgroundColor});k.attr(k.crisp({x:-.5,y:-.5,width:m+1,height:m+1,r:a.buttonBorderRadius},k.strokeWidth()));k=g.path(n([["M",m/2+(h?-1:1),m/2-3],["L",m/2+(h?-1:1),m/2+3],["L",m/2+(h?2:-2),m/2]],a.vertical)).addClass("highcharts-scrollbar-arrow").add(c[h]);
this.chart.styledMode||k.attr({fill:a.buttonArrowColor})};c.prototype.init=function(h,g,I){this.scrollbarButtons=[];this.renderer=h;this.userOptions=g;this.options=H(c.defaultOptions,g);this.chart=I;this.size=G(this.options.size,this.options.height);g.enabled&&(this.render(),this.addEvents())};c.prototype.mouseDownHandler=function(h){h=this.chart.pointer.normalize(h);h=this.cursorToScrollbarPosition(h);this.chartX=h.chartX;this.chartY=h.chartY;this.initPositions=[this.from,this.to];this.grabbedCenter=
!0};c.prototype.mouseMoveHandler=function(h){var g=this.chart.pointer.normalize(h),c=this.options.vertical?"chartY":"chartX",a=this.initPositions||[];!this.grabbedCenter||h.touches&&0===h.touches[0][c]||(g=this.cursorToScrollbarPosition(g)[c],c=this[c],c=g-c,this.hasDragged=!0,this.updatePosition(a[0]+c,a[1]+c),this.hasDragged&&v(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:h.type,DOMEvent:h}))};c.prototype.mouseUpHandler=function(c){this.hasDragged&&v(this,"changed",{from:this.from,
to:this.to,trigger:"scrollbar",DOMType:c.type,DOMEvent:c});this.grabbedCenter=this.hasDragged=this.chartX=this.chartY=null};c.prototype.position=function(c,g,a,n){var h=this.options.vertical,k=0,d=this.rendered?"animate":"attr";this.x=c;this.y=g+this.trackBorderWidth;this.width=a;this.xOffset=this.height=n;this.yOffset=k;h?(this.width=this.yOffset=a=k=this.size,this.xOffset=g=0,this.barWidth=n-2*a,this.x=c+=this.options.margin):(this.height=this.xOffset=n=g=this.size,this.barWidth=a-2*n,this.y+=this.options.margin);
this.group[d]({translateX:c,translateY:this.y});this.track[d]({width:a,height:n});this.scrollbarButtons[1][d]({translateX:h?0:a-g,translateY:h?n-k:0})};c.prototype.removeEvents=function(){this._events.forEach(function(c){C.apply(null,c)});this._events.length=0};c.prototype.render=function(){var c=this.renderer,g=this.options,a=this.size,e=this.chart.styledMode,m;this.group=m=c.g("scrollbar").attr({zIndex:g.zIndex,translateY:-99999}).add();this.track=c.rect().addClass("highcharts-scrollbar-track").attr({x:0,
r:g.trackBorderRadius||0,height:a,width:a}).add(m);e||this.track.attr({fill:g.trackBackgroundColor,stroke:g.trackBorderColor,"stroke-width":g.trackBorderWidth});this.trackBorderWidth=this.track.strokeWidth();this.track.attr({y:-this.trackBorderWidth%2/2});this.scrollbarGroup=c.g().add(m);this.scrollbar=c.rect().addClass("highcharts-scrollbar-thumb").attr({height:a,width:a,r:g.barBorderRadius||0}).add(this.scrollbarGroup);this.scrollbarRifles=c.path(n([["M",-3,a/4],["L",-3,2*a/3],["M",0,a/4],["L",
0,2*a/3],["M",3,a/4],["L",3,2*a/3]],g.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup);e||(this.scrollbar.attr({fill:g.barBackgroundColor,stroke:g.barBorderColor,"stroke-width":g.barBorderWidth}),this.scrollbarRifles.attr({stroke:g.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(c,g){var h=this.options,a=h.vertical,m=h.minWidth,k=this.barWidth,d,q=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?"attr":"animate";if(p(k)){c=Math.max(c,0);var u=Math.ceil(k*c);this.calculatedWidth=d=z(k*Math.min(g,1)-u);d<m&&(u=(k-m+d)*c,d=m);m=Math.floor(u+this.xOffset+this.yOffset);k=d/2-.5;this.from=c;this.to=g;a?(this.scrollbarGroup[q]({translateY:m}),this.scrollbar[q]({height:d}),this.scrollbarRifles[q]({translateY:k}),this.scrollbarTop=m,
this.scrollbarLeft=0):(this.scrollbarGroup[q]({translateX:m}),this.scrollbar[q]({width:d}),this.scrollbarRifles[q]({translateX:k}),this.scrollbarLeft=m,this.scrollbarTop=0);12>=d?this.scrollbarRifles.hide():this.scrollbarRifles.show(!0);!1===h.showFull&&(0>=c&&1<=g?this.group.hide():this.group.show());this.rendered=!0}};c.prototype.trackClick=function(c){var g=this.chart.pointer.normalize(c),h=this.to-this.from,a=this.y+this.scrollbarTop,m=this.x+this.scrollbarLeft;this.options.vertical&&g.chartY>
a||!this.options.vertical&&g.chartX>m?this.updatePosition(this.from+h,this.to+h):this.updatePosition(this.from-h,this.to-h);v(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:c})};c.prototype.update=function(c){this.destroy();this.init(this.chart.renderer,H(!0,this.options,c),this.chart)};c.prototype.updatePosition=function(c,g){1<g&&(c=z(1-z(g-c)),g=1);0>c&&(g=z(g-c),c=0);this.from=c;this.to=g};c.defaultOptions={height:A?20:14,barBorderRadius:0,buttonBorderRadius:0,liveRedraw:void 0,
margin:10,minWidth:6,step:.2,zIndex:3,barBackgroundColor:"#cccccc",barBorderWidth:1,barBorderColor:"#cccccc",buttonArrowColor:"#333333",buttonBackgroundColor:"#e6e6e6",buttonBorderColor:"#cccccc",buttonBorderWidth:1,rifleColor:"#333333",trackBackgroundColor:"#f2f2f2",trackBorderColor:"#f2f2f2",trackBorderWidth:1};return c}();r.Scrollbar||(t.scrollbar=H(!0,E.defaultOptions,t.scrollbar),r.Scrollbar=E,B.compose(l,E));return r.Scrollbar});K(l,"Core/Navigator.js",[l["Core/Axis/Axis.js"],l["Core/Chart/Chart.js"],
l["Core/Color.js"],l["Core/Globals.js"],l["Core/Axis/NavigatorAxis.js"],l["Core/Options.js"],l["Core/Scrollbar.js"],l["Core/Utilities.js"]],function(l,r,B,t,E,e,z,p){B=B.parse;var a=e.defaultOptions,v=p.addEvent,H=p.clamp,G=p.correctFloat,C=p.defined,y=p.destroyObjectProperties,A=p.erase,n=p.extend,c=p.find,h=p.isArray,g=p.isNumber,I=p.merge,D=p.pick,m=p.removeEvent,k=p.splat,d=t.hasTouch,q=t.isTouchDevice;e=t.Series;var u=function(b){for(var f=[],x=1;x<arguments.length;x++)f[x-1]=arguments[x];f=
[].filter.call(f,g);if(f.length)return Math[b].apply(0,f)};p="undefined"===typeof t.seriesTypes.areaspline?"line":"areaspline";n(a,{navigator:{height:40,margin:25,maskInside:!0,handles:{width:7,height:15,symbols:["navigator-handle","navigator-handle"],enabled:!0,lineWidth:1,backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:B("#6685c2").setOpacity(.3).get(),outlineColor:"#cccccc",outlineWidth:1,series:{type:p,fillOpacity:.05,lineWidth:1,compare:null,dataGrouping:{approximation:"average",enabled:!0,
groupPixelWidth:2,smoothed:!0,units:[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2,3,4]],["week",[1,2,3]],["month",[1,3,6]],["year",null]]},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},threshold:null},xAxis:{overscroll:0,className:"highcharts-navigator-xaxis",tickLength:0,lineWidth:0,gridLineColor:"#e6e6e6",
gridLineWidth:1,tickPixelInterval:200,labels:{align:"left",style:{color:"#999999"},x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",gridLineWidth:0,startOnTick:!1,endOnTick:!1,minPadding:.1,maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:null},tickLength:0,tickWidth:0}}});t.Renderer.prototype.symbols["navigator-handle"]=function(b,f,x,d,c){b=(c&&c.width||0)/2;f=Math.round(b/3)+.5;c=c&&c.height||0;return[["M",-b-1,.5],["L",b,.5],["L",b,c+.5],["L",-b-1,c+.5],["L",-b-
1,.5],["M",-f,4],["L",-f,c-3],["M",f-1,4],["L",f-1,c-3]]};var w=function(){function b(f){this.zoomedMin=this.zoomedMax=this.yAxis=this.xAxis=this.top=this.size=this.shades=this.rendered=this.range=this.outlineHeight=this.outline=this.opposite=this.navigatorSize=this.navigatorSeries=this.navigatorOptions=this.navigatorGroup=this.navigatorEnabled=this.left=this.height=this.handles=this.chart=this.baseSeries=void 0;this.init(f)}b.prototype.drawHandle=function(f,x,b,c){var d=this.navigatorOptions.handles.height;
this.handles[x][c](b?{translateX:Math.round(this.left+this.height/2),translateY:Math.round(this.top+parseInt(f,10)+.5-d)}:{translateX:Math.round(this.left+parseInt(f,10)),translateY:Math.round(this.top+this.height/2-d/2-1)})};b.prototype.drawOutline=function(f,x,b,c){var d=this.navigatorOptions.maskInside,g=this.outline.strokeWidth(),q=g/2,J=g%2/2;g=this.outlineHeight;var u=this.scrollbarHeight||0,F=this.size,k=this.left-u,w=this.top;b?(k-=q,b=w+x+J,x=w+f+J,J=[["M",k+g,w-u-J],["L",k+g,b],["L",k,b],
["L",k,x],["L",k+g,x],["L",k+g,w+F+u]],d&&J.push(["M",k+g,b-q],["L",k+g,x+q])):(f+=k+u-J,x+=k+u-J,w+=q,J=[["M",k,w],["L",f,w],["L",f,w+g],["L",x,w+g],["L",x,w],["L",k+F+2*u,w]],d&&J.push(["M",f-q,w],["L",x+q,w]));this.outline[c]({d:J})};b.prototype.drawMasks=function(f,x,b,c){var d=this.left,g=this.top,q=this.height;if(b){var J=[d,d,d];var u=[g,g+f,g+x];var F=[q,q,q];var k=[f,x-f,this.size-x]}else J=[d,d+f,d+x],u=[g,g,g],F=[f,x-f,this.size-x],k=[q,q,q];this.shades.forEach(function(f,x){f[c]({x:J[x],
y:u[x],width:F[x],height:k[x]})})};b.prototype.renderElements=function(){var f=this,x=f.navigatorOptions,b=x.maskInside,d=f.chart,c=d.renderer,g,q={cursor:d.inverted?"ns-resize":"ew-resize"};f.navigatorGroup=g=c.g("navigator").attr({zIndex:8,visibility:"hidden"}).add();[!b,b,!b].forEach(function(b,J){f.shades[J]=c.rect().addClass("highcharts-navigator-mask"+(1===J?"-inside":"-outside")).add(g);d.styledMode||f.shades[J].attr({fill:b?x.maskFill:"rgba(0,0,0,0)"}).css(1===J&&q)});f.outline=c.path().addClass("highcharts-navigator-outline").add(g);
d.styledMode||f.outline.attr({"stroke-width":x.outlineWidth,stroke:x.outlineColor});x.handles.enabled&&[0,1].forEach(function(b){x.handles.inverted=d.inverted;f.handles[b]=c.symbol(x.handles.symbols[b],-x.handles.width/2-1,0,x.handles.width,x.handles.height,x.handles);f.handles[b].attr({zIndex:7-b}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][b]).add(g);if(!d.styledMode){var J=x.handles;f.handles[b].attr({fill:J.backgroundColor,stroke:J.borderColor,"stroke-width":J.lineWidth}).css(q)}})};
b.prototype.update=function(f){(this.series||[]).forEach(function(f){f.baseSeries&&delete f.baseSeries.navigatorSeries});this.destroy();I(!0,this.chart.options.navigator,this.options,f);this.init(this.chart)};b.prototype.render=function(f,x,b,d){var c=this.chart,q=this.scrollbarHeight,J,u=this.xAxis,k=u.pointRange||0;var F=u.navigatorAxis.fake?c.xAxis[0]:u;var w=this.navigatorEnabled,h,a=this.rendered;var m=c.inverted;var n=c.xAxis[0].minRange,e=c.xAxis[0].options.maxRange;if(!this.hasDragged||C(b)){f=
G(f-k/2);x=G(x+k/2);if(!g(f)||!g(x))if(a)b=0,d=D(u.width,F.width);else return;this.left=D(u.left,c.plotLeft+q+(m?c.plotWidth:0));this.size=h=J=D(u.len,(m?c.plotHeight:c.plotWidth)-2*q);c=m?q:J+2*q;b=D(b,u.toPixels(f,!0));d=D(d,u.toPixels(x,!0));g(b)&&Infinity!==Math.abs(b)||(b=0,d=c);f=u.toValue(b,!0);x=u.toValue(d,!0);var y=Math.abs(G(x-f));y<n?this.grabbedLeft?b=u.toPixels(x-n-k,!0):this.grabbedRight&&(d=u.toPixels(f+n+k,!0)):C(e)&&G(y-k)>e&&(this.grabbedLeft?b=u.toPixels(x-e-k,!0):this.grabbedRight&&
(d=u.toPixels(f+e+k,!0)));this.zoomedMax=H(Math.max(b,d),0,h);this.zoomedMin=H(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(b,d),0,h);this.range=this.zoomedMax-this.zoomedMin;h=Math.round(this.zoomedMax);b=Math.round(this.zoomedMin);w&&(this.navigatorGroup.attr({visibility:"visible"}),a=a&&!this.hasDragged?"animate":"attr",this.drawMasks(b,h,m,a),this.drawOutline(b,h,m,a),this.navigatorOptions.handles.enabled&&(this.drawHandle(b,0,m,a),this.drawHandle(h,1,m,a)));this.scrollbar&&(m?(m=this.top-
q,F=this.left-q+(w||!F.opposite?0:(F.titleOffset||0)+F.axisTitleMargin),q=J+2*q):(m=this.top+(w?this.height:-q),F=this.left-q),this.scrollbar.position(F,m,c,q),this.scrollbar.setRange(this.zoomedMin/(J||1),this.zoomedMax/(J||1)));this.rendered=!0}};b.prototype.addMouseEvents=function(){var f=this,b=f.chart,c=b.container,q=[],g,u;f.mouseMoveHandler=g=function(b){f.onMouseMove(b)};f.mouseUpHandler=u=function(b){f.onMouseUp(b)};q=f.getPartsEvents("mousedown");q.push(v(b.renderTo,"mousemove",g),v(c.ownerDocument,
"mouseup",u));d&&(q.push(v(b.renderTo,"touchmove",g),v(c.ownerDocument,"touchend",u)),q.concat(f.getPartsEvents("touchstart")));f.eventsToUnbind=q;f.series&&f.series[0]&&q.push(v(f.series[0].xAxis,"foundExtremes",function(){b.navigator.modifyNavigatorAxisExtremes()}))};b.prototype.getPartsEvents=function(f){var b=this,d=[];["shades","handles"].forEach(function(x){b[x].forEach(function(c,q){d.push(v(c.element,f,function(f){b[x+"Mousedown"](f,q)}))})});return d};b.prototype.shadesMousedown=function(f,
b){f=this.chart.pointer.normalize(f);var x=this.chart,d=this.xAxis,c=this.zoomedMin,q=this.left,g=this.size,u=this.range,k=f.chartX;x.inverted&&(k=f.chartY,q=this.top);if(1===b)this.grabbedCenter=k,this.fixedWidth=u,this.dragOffset=k-c;else{f=k-q-u/2;if(0===b)f=Math.max(0,f);else if(2===b&&f+u>=g)if(f=g-u,this.reversedExtremes){f-=u;var w=this.getUnionExtremes().dataMin}else var h=this.getUnionExtremes().dataMax;f!==c&&(this.fixedWidth=u,b=d.navigatorAxis.toFixedRange(f,f+u,w,h),C(b.min)&&x.xAxis[0].setExtremes(Math.min(b.min,
b.max),Math.max(b.min,b.max),!0,null,{trigger:"navigator"}))}};b.prototype.handlesMousedown=function(f,b){this.chart.pointer.normalize(f);f=this.chart;var x=f.xAxis[0],d=this.reversedExtremes;0===b?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=d?x.min:x.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=d?x.max:x.min);f.fixedRange=null};b.prototype.onMouseMove=function(f){var b=this,d=b.chart,c=b.left,g=b.navigatorSize,u=b.range,k=b.dragOffset,
w=d.inverted;f.touches&&0===f.touches[0].pageX||(f=d.pointer.normalize(f),d=f.chartX,w&&(c=b.top,d=f.chartY),b.grabbedLeft?(b.hasDragged=!0,b.render(0,0,d-c,b.otherHandlePos)):b.grabbedRight?(b.hasDragged=!0,b.render(0,0,b.otherHandlePos,d-c)):b.grabbedCenter&&(b.hasDragged=!0,d<k?d=k:d>g+k-u&&(d=g+k-u),b.render(0,0,d-k,d-k+u)),b.hasDragged&&b.scrollbar&&D(b.scrollbar.options.liveRedraw,t.svg&&!q&&!this.chart.isBoosting)&&(f.DOMType=f.type,setTimeout(function(){b.onMouseUp(f)},0)))};b.prototype.onMouseUp=
function(f){var b=this.chart,d=this.xAxis,c=this.scrollbar,q=f.DOMEvent||f,u=b.inverted,k=this.rendered&&!this.hasDragged?"animate":"attr";if(this.hasDragged&&(!c||!c.hasDragged)||"scrollbar"===f.trigger){c=this.getUnionExtremes();if(this.zoomedMin===this.otherHandlePos)var w=this.fixedExtreme;else if(this.zoomedMax===this.otherHandlePos)var h=this.fixedExtreme;this.zoomedMax===this.size&&(h=this.reversedExtremes?c.dataMin:c.dataMax);0===this.zoomedMin&&(w=this.reversedExtremes?c.dataMax:c.dataMin);
d=d.navigatorAxis.toFixedRange(this.zoomedMin,this.zoomedMax,w,h);C(d.min)&&b.xAxis[0].setExtremes(Math.min(d.min,d.max),Math.max(d.min,d.max),!0,this.hasDragged?!1:null,{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:q})}"mousemove"!==f.DOMType&&"touchmove"!==f.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null);this.navigatorEnabled&&g(this.zoomedMin)&&g(this.zoomedMax)&&(b=Math.round(this.zoomedMin),
f=Math.round(this.zoomedMax),this.shades&&this.drawMasks(b,f,u,k),this.outline&&this.drawOutline(b,f,u,k),this.navigatorOptions.handles.enabled&&Object.keys(this.handles).length===this.handles.length&&(this.drawHandle(b,0,u,k),this.drawHandle(f,1,u,k)))};b.prototype.removeEvents=function(){this.eventsToUnbind&&(this.eventsToUnbind.forEach(function(f){f()}),this.eventsToUnbind=void 0);this.removeBaseSeriesEvents()};b.prototype.removeBaseSeriesEvents=function(){var f=this.baseSeries||[];this.navigatorEnabled&&
f[0]&&(!1!==this.navigatorOptions.adaptToUpdatedData&&f.forEach(function(f){m(f,"updatedData",this.updatedDataHandler)},this),f[0].xAxis&&m(f[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))};b.prototype.init=function(f){var b=f.options,d=b.navigator,c=d.enabled,q=b.scrollbar,g=q.enabled;b=c?d.height:0;var k=g?q.height:0;this.handles=[];this.shades=[];this.chart=f;this.setBaseSeries();this.height=b;this.scrollbarHeight=k;this.scrollbarEnabled=g;this.navigatorEnabled=c;this.navigatorOptions=
d;this.scrollbarOptions=q;this.outlineHeight=b+k;this.opposite=D(d.opposite,!(c||!f.inverted));var w=this;c=w.baseSeries;q=f.xAxis.length;g=f.yAxis.length;var h=c&&c[0]&&c[0].xAxis||f.xAxis[0]||{options:{}};f.isDirtyBox=!0;w.navigatorEnabled?(w.xAxis=new l(f,I({breaks:h.options.breaks,ordinal:h.options.ordinal},d.xAxis,{id:"navigator-x-axis",yAxis:"navigator-y-axis",isX:!0,type:"datetime",index:q,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:0,maxPadding:0,zoomEnabled:!1},
f.inverted?{offsets:[k,0,-k,0],width:b}:{offsets:[0,-k,0,k],height:b})),w.yAxis=new l(f,I(d.yAxis,{id:"navigator-y-axis",alignTicks:!1,offset:0,index:g,isInternal:!0,zoomEnabled:!1},f.inverted?{width:b}:{height:b})),c||d.series.data?w.updateNavigatorSeries(!1):0===f.series.length&&(w.unbindRedraw=v(f,"beforeRedraw",function(){0<f.series.length&&!w.series&&(w.setBaseSeries(),w.unbindRedraw())})),w.reversedExtremes=f.inverted&&!w.xAxis.reversed||!f.inverted&&w.xAxis.reversed,w.renderElements(),w.addMouseEvents()):
(w.xAxis={chart:f,navigatorAxis:{fake:!0},translate:function(b,d){var x=f.xAxis[0],c=x.getExtremes(),q=x.len-2*k,g=u("min",x.options.min,c.dataMin);x=u("max",x.options.max,c.dataMax)-g;return d?b*x/q+g:q*(b-g)/x},toPixels:function(f){return this.translate(f)},toValue:function(f){return this.translate(f,!0)}},w.xAxis.navigatorAxis.axis=w.xAxis,w.xAxis.navigatorAxis.toFixedRange=E.AdditionsClass.prototype.toFixedRange.bind(w.xAxis.navigatorAxis));f.options.scrollbar.enabled&&(f.scrollbar=w.scrollbar=
new z(f.renderer,I(f.options.scrollbar,{margin:w.navigatorEnabled?0:10,vertical:f.inverted}),f),v(w.scrollbar,"changed",function(b){var d=w.size,x=d*this.to;d*=this.from;w.hasDragged=w.scrollbar.hasDragged;w.render(0,0,d,x);(f.options.scrollbar.liveRedraw||"mousemove"!==b.DOMType&&"touchmove"!==b.DOMType)&&setTimeout(function(){w.onMouseUp(b)})}));w.addBaseSeriesEvents();w.addChartEvents()};b.prototype.getUnionExtremes=function(f){var b=this.chart.xAxis[0],d=this.xAxis,c=d.options,q=b.options,g;f&&
null===b.dataMin||(g={dataMin:D(c&&c.min,u("min",q.min,b.dataMin,d.dataMin,d.min)),dataMax:D(c&&c.max,u("max",q.max,b.dataMax,d.dataMax,d.max))});return g};b.prototype.setBaseSeries=function(f,b){var d=this.chart,x=this.baseSeries=[];f=f||d.options&&d.options.navigator.baseSeries||(d.series.length?c(d.series,function(f){return!f.options.isInternal}).index:0);(d.series||[]).forEach(function(b,d){b.options.isInternal||!b.options.showInNavigator&&(d!==f&&b.options.id!==f||!1===b.options.showInNavigator)||
x.push(b)});this.xAxis&&!this.xAxis.navigatorAxis.fake&&this.updateNavigatorSeries(!0,b)};b.prototype.updateNavigatorSeries=function(b,d){var f=this,c=f.chart,x=f.baseSeries,q,g,u=f.navigatorOptions.series,w,e={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}}},y=f.series=(f.series||[]).filter(function(b){var d=b.baseSeries;return 0>x.indexOf(d)?(d&&(m(d,
"updatedData",f.updatedDataHandler),delete d.navigatorSeries),b.chart&&b.destroy(),!1):!0});x&&x.length&&x.forEach(function(b){var k=b.navigatorSeries,m=n({color:b.color,visible:b.visible},h(u)?a.navigator.series:u);k&&!1===f.navigatorOptions.adaptToUpdatedData||(e.name="Navigator "+x.length,q=b.options||{},w=q.navigatorOptions||{},g=I(q,e,m,w),g.pointRange=D(m.pointRange,w.pointRange,a.plotOptions[g.type||"line"].pointRange),m=w.data||m.data,f.hasNavigatorData=f.hasNavigatorData||!!m,g.data=m||q.data&&
q.data.slice(0),k&&k.options?k.update(g,d):(b.navigatorSeries=c.initSeries(g),b.navigatorSeries.baseSeries=b,y.push(b.navigatorSeries)))});if(u.data&&(!x||!x.length)||h(u))f.hasNavigatorData=!1,u=k(u),u.forEach(function(b,d){e.name="Navigator "+(y.length+1);g=I(a.navigator.series,{color:c.series[d]&&!c.series[d].options.isInternal&&c.series[d].color||c.options.colors[d]||c.options.colors[0]},e,b);g.data=b.data;g.data&&(f.hasNavigatorData=!0,y.push(c.initSeries(g)))});b&&this.addBaseSeriesEvents()};
b.prototype.addBaseSeriesEvents=function(){var b=this,d=b.baseSeries||[];d[0]&&d[0].xAxis&&v(d[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes);d.forEach(function(f){v(f,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)});v(f,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)});!1!==this.navigatorOptions.adaptToUpdatedData&&f.xAxis&&v(f,"updatedData",this.updatedDataHandler);v(f,"remove",function(){this.navigatorSeries&&(A(b.series,this.navigatorSeries),
C(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)})},this)};b.prototype.getBaseSeriesMin=function(b){return this.baseSeries.reduce(function(b,f){return Math.min(b,f.xData?f.xData[0]:b)},b)};b.prototype.modifyNavigatorAxisExtremes=function(){var b=this.xAxis,d;"undefined"!==typeof b.getExtremes&&(!(d=this.getUnionExtremes(!0))||d.dataMin===b.min&&d.dataMax===b.max||(b.min=d.dataMin,b.max=d.dataMax))};b.prototype.modifyBaseAxisExtremes=function(){var b=this.chart.navigator,
d=this.getExtremes(),c=d.dataMin,q=d.dataMax;d=d.max-d.min;var u=b.stickToMin,w=b.stickToMax,k=D(this.options.overscroll,0),h=b.series&&b.series[0],a=!!this.setExtremes;if(!this.eventArgs||"rangeSelectorButton"!==this.eventArgs.trigger){if(u){var m=c;var n=m+d}w&&(n=q+k,u||(m=Math.max(c,n-d,b.getBaseSeriesMin(h&&h.xData?h.xData[0]:-Number.MAX_VALUE))));a&&(u||w)&&g(m)&&(this.min=this.userMin=m,this.max=this.userMax=n)}b.stickToMin=b.stickToMax=null};b.prototype.updatedDataHandler=function(){var b=
this.chart.navigator,d=this.navigatorSeries,c=b.getBaseSeriesMin(this.xData[0]);b.stickToMax=b.reversedExtremes?0===Math.round(b.zoomedMin):Math.round(b.zoomedMax)>=Math.round(b.size);b.stickToMin=g(this.xAxis.min)&&this.xAxis.min<=c&&(!this.chart.fixedRange||!b.stickToMax);d&&!b.hasNavigatorData&&(d.options.pointStart=this.xData[0],d.setData(this.options.data,!1,null,!1))};b.prototype.addChartEvents=function(){this.eventsToUnbind||(this.eventsToUnbind=[]);this.eventsToUnbind.push(v(this.chart,"redraw",
function(){var b=this.navigator,d=b&&(b.baseSeries&&b.baseSeries[0]&&b.baseSeries[0].xAxis||this.xAxis[0]);d&&b.render(d.min,d.max)}),v(this.chart,"getMargins",function(){var b=this.navigator,d=b.opposite?"plotTop":"marginBottom";this.inverted&&(d=b.opposite?"marginRight":"plotLeft");this[d]=(this[d]||0)+(b.navigatorEnabled||!this.inverted?b.outlineHeight:0)+b.navigatorOptions.margin}))};b.prototype.destroy=function(){this.removeEvents();this.xAxis&&(A(this.chart.xAxis,this.xAxis),A(this.chart.axes,
this.xAxis));this.yAxis&&(A(this.chart.yAxis,this.yAxis),A(this.chart.axes,this.yAxis));(this.series||[]).forEach(function(b){b.destroy&&b.destroy()});"series xAxis yAxis shades outline scrollbarTrack scrollbarRifles scrollbarGroup scrollbar navigatorGroup rendered".split(" ").forEach(function(b){this[b]&&this[b].destroy&&this[b].destroy();this[b]=null},this);[this.handles].forEach(function(b){y(b)},this)};return b}();t.Navigator||(t.Navigator=w,E.compose(l),v(r,"beforeShowResetZoom",function(){var b=
this.options,f=b.navigator,d=b.rangeSelector;if((f&&f.enabled||d&&d.enabled)&&(!q&&"x"===b.chart.zoomType||q&&"x"===b.chart.pinchType))return!1}),v(r,"beforeRender",function(){var b=this.options;if(b.navigator.enabled||b.scrollbar.enabled)this.scroller=this.navigator=new w(this)}),v(r,"afterSetChartSize",function(){var b=this.legend,f=this.navigator;if(f){var d=b&&b.options;var c=f.xAxis;var q=f.yAxis;var g=f.scrollbarHeight;this.inverted?(f.left=f.opposite?this.chartWidth-g-f.height:this.spacing[3]+
g,f.top=this.plotTop+g):(f.left=this.plotLeft+g,f.top=f.navigatorOptions.top||this.chartHeight-f.height-g-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(d&&"bottom"===d.verticalAlign&&"proximate"!==d.layout&&d.enabled&&!d.floating?b.legendHeight+D(d.margin,10):0)-(this.titleOffset?this.titleOffset[2]:0));c&&q&&(this.inverted?c.options.left=q.options.left=f.left:c.options.top=q.options.top=f.top,c.setAxisSize(),q.setAxisSize())}}),v(r,"update",function(b){var f=
b.options.navigator||{},d=b.options.scrollbar||{};this.navigator||this.scroller||!f.enabled&&!d.enabled||(I(!0,this.options.navigator,f),I(!0,this.options.scrollbar,d),delete b.options.navigator,delete b.options.scrollbar)}),v(r,"afterUpdate",function(b){this.navigator||this.scroller||!this.options.navigator.enabled&&!this.options.scrollbar.enabled||(this.scroller=this.navigator=new w(this),D(b.redraw,!0)&&this.redraw(b.animation))}),v(r,"afterAddSeries",function(){this.navigator&&this.navigator.setBaseSeries(null,
!1)}),v(e,"afterUpdate",function(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1)}),r.prototype.callbacks.push(function(b){var f=b.navigator;f&&b.xAxis[0]&&(b=b.xAxis[0].getExtremes(),f.render(b.min,b.max))}));t.Navigator=w;return t.Navigator});K(l,"Core/Axis/OrdinalAxis.js",[l["Core/Axis/Axis.js"],l["Core/Globals.js"],l["Core/Utilities.js"]],function(l,r,B){var t=B.addEvent,E=B.css,e=B.defined,z=B.pick,p=B.timeUnits;B=r.Chart;var a=r.Series,v;(function(a){var l=
function(){function a(a){this.index={};this.axis=a}a.prototype.beforeSetTickPositions=function(){var a=this.axis,e=a.ordinal,n=[],c,h=!1,g=a.getExtremes(),p=g.min,D=g.max,m,k=a.isXAxis&&!!a.options.breaks;g=a.options.ordinal;var d=Number.MAX_VALUE,q=a.chart.options.chart.ignoreHiddenSeries,u;if(g||k){a.series.forEach(function(b,g){c=[];if(!(q&&!1===b.visible||!1===b.takeOrdinalPosition&&!k)&&(n=n.concat(b.processedXData),w=n.length,n.sort(function(b,f){return b-f}),d=Math.min(d,z(b.closestPointRange,
d)),w)){for(g=0;g<w-1;)n[g]!==n[g+1]&&c.push(n[g+1]),g++;c[0]!==n[0]&&c.unshift(n[0]);n=c}b.isSeriesBoosting&&(u=!0)});u&&(n.length=0);var w=n.length;if(2<w){var b=n[1]-n[0];for(m=w-1;m--&&!h;)n[m+1]-n[m]!==b&&(h=!0);!a.options.keepOrdinalPadding&&(n[0]-p>b||D-n[n.length-1]>b)&&(h=!0)}else a.options.overscroll&&(2===w?d=n[1]-n[0]:1===w?(d=a.options.overscroll,n=[n[0],n[0]+d]):d=e.overscrollPointsRange);h?(a.options.overscroll&&(e.overscrollPointsRange=d,n=n.concat(e.getOverscrollPositions())),e.positions=
n,b=a.ordinal2lin(Math.max(p,n[0]),!0),m=Math.max(a.ordinal2lin(Math.min(D,n[n.length-1]),!0),1),e.slope=D=(D-p)/(m-b),e.offset=p-b*D):(e.overscrollPointsRange=z(a.closestPointRange,e.overscrollPointsRange),e.positions=a.ordinal.slope=e.offset=void 0)}a.isOrdinal=g&&h;e.groupIntervalFactor=null};a.prototype.getExtendedPositions=function(){var a=this,e=a.axis,n=e.constructor.prototype,c=e.chart,h=e.series[0].currentDataGrouping,g=a.index,p=h?h.count+h.unitName:"raw",D=e.options.overscroll,m=e.getExtremes(),
k;g||(g=a.index={});if(!g[p]){var d={series:[],chart:c,getExtremes:function(){return{min:m.dataMin,max:m.dataMax+D}},options:{ordinal:!0},ordinal:{},ordinal2lin:n.ordinal2lin,val2lin:n.val2lin};d.ordinal.axis=d;e.series.forEach(function(g){k={xAxis:d,xData:g.xData.slice(),chart:c,destroyGroupedData:r.noop,getProcessedData:r.Series.prototype.getProcessedData};k.xData=k.xData.concat(a.getOverscrollPositions());k.options={dataGrouping:h?{enabled:!0,forced:!0,approximation:"open",units:[[h.unitName,[h.count]]]}:
{enabled:!1}};g.processData.apply(k);d.series.push(k)});e.ordinal.beforeSetTickPositions.apply({axis:d});g[p]=d.ordinal.positions}return g[p]};a.prototype.getGroupIntervalFactor=function(a,e,n){n=n.processedXData;var c=n.length,h=[];var g=this.groupIntervalFactor;if(!g){for(g=0;g<c-1;g++)h[g]=n[g+1]-n[g];h.sort(function(c,g){return c-g});h=h[Math.floor(c/2)];a=Math.max(a,n[0]);e=Math.min(e,n[c-1]);this.groupIntervalFactor=g=c*h/(e-a)}return g};a.prototype.getOverscrollPositions=function(){var a=this.axis,
p=a.options.overscroll,n=this.overscrollPointsRange,c=[],h=a.dataMax;if(e(n))for(c.push(h);h<=a.dataMax+p;)h+=n,c.push(h);return c};a.prototype.postProcessTickInterval=function(a){var e=this.axis,n=this.slope;return n?e.options.breaks?e.closestPointRange||a:a/(n/e.closestPointRange):a};return a}();a.Composition=l;a.compose=function(l,y,v){l.keepProps.push("ordinal");var n=l.prototype;l.prototype.getTimeTicks=function(c,a,g,n,l,m,k){void 0===l&&(l=[]);void 0===m&&(m=0);var d=0,q,u,w={},b=[],f=-Number.MAX_VALUE,
x=this.options.tickPixelInterval,h=this.chart.time,F=[];if(!this.options.ordinal&&!this.options.breaks||!l||3>l.length||"undefined"===typeof a)return h.getTimeTicks.apply(h,arguments);var I=l.length;for(q=0;q<I;q++){var y=q&&l[q-1]>g;l[q]<a&&(d=q);if(q===I-1||l[q+1]-l[q]>5*m||y){if(l[q]>f){for(u=h.getTimeTicks(c,l[d],l[q],n);u.length&&u[0]<=f;)u.shift();u.length&&(f=u[u.length-1]);F.push(b.length);b=b.concat(u)}d=q+1}if(y)break}u=u.info;if(k&&u.unitRange<=p.hour){q=b.length-1;for(d=1;d<q;d++)if(h.dateFormat("%d",
b[d])!==h.dateFormat("%d",b[d-1])){w[b[d]]="day";var v=!0}v&&(w[b[0]]="day");u.higherRanks=w}u.segmentStarts=F;b.info=u;if(k&&e(x)){d=F=b.length;v=[];var D;for(h=[];d--;)q=this.translate(b[d]),D&&(h[d]=D-q),v[d]=D=q;h.sort();h=h[Math.floor(h.length/2)];h<.6*x&&(h=null);d=b[F-1]>g?F-1:F;for(D=void 0;d--;)q=v[d],F=Math.abs(D-q),D&&F<.8*x&&(null===h||F<.8*h)?(w[b[d]]&&!w[b[d+1]]?(F=d+1,D=q):F=d,b.splice(F,1)):D=q}return b};n.lin2val=function(c,a){var g=this.ordinal,h=g.positions;if(h){var e=g.slope,
m=g.offset;g=h.length-1;if(a)if(0>c)c=h[0];else if(c>g)c=h[g];else{g=Math.floor(c);var k=c-g}else for(;g--;)if(a=e*g+m,c>=a){e=e*(g+1)+m;k=(c-a)/(e-a);break}return"undefined"!==typeof k&&"undefined"!==typeof h[g]?h[g]+(k?k*(h[g+1]-h[g]):0):c}return c};n.val2lin=function(c,a){var g=this.ordinal,h=g.positions;if(h){var e=h.length,m;for(m=e;m--;)if(h[m]===c){var k=m;break}for(m=e-1;m--;)if(c>h[m]||0===m){c=(c-h[m])/(h[m+1]-h[m]);k=m+c;break}a=a?k:g.slope*(k||0)+g.offset}else a=c;return a};n.ordinal2lin=
n.val2lin;t(l,"afterInit",function(){this.ordinal||(this.ordinal=new a.Composition(this))});t(l,"foundExtremes",function(){this.isXAxis&&e(this.options.overscroll)&&this.max===this.dataMax&&(!this.chart.mouseIsDown||this.isInternal)&&(!this.eventArgs||this.eventArgs&&"navigator"!==this.eventArgs.trigger)&&(this.max+=this.options.overscroll,!this.isInternal&&e(this.userMin)&&(this.min+=this.options.overscroll))});t(l,"afterSetScale",function(){this.horiz&&!this.isDirty&&(this.isDirty=this.isOrdinal&&
this.chart.navigator&&!this.chart.navigator.adaptToUpdatedData)});t(l,"initialAxisTranslation",function(){this.ordinal&&(this.ordinal.beforeSetTickPositions(),this.tickInterval=this.ordinal.postProcessTickInterval(this.tickInterval))});t(y,"pan",function(c){var a=this.xAxis[0],g=a.options.overscroll,e=c.originalEvent.chartX,n=this.options.chart&&this.options.chart.panning,m=!1;if(n&&"y"!==n.type&&a.options.ordinal&&a.series.length){var k=this.mouseDownX,d=a.getExtremes(),q=d.dataMax,u=d.min,w=d.max,
b=this.hoverPoints,f=a.closestPointRange||a.ordinal&&a.ordinal.overscrollPointsRange;k=(k-e)/(a.translationSlope*(a.ordinal.slope||f));var x={ordinal:{positions:a.ordinal.getExtendedPositions()}};f=a.lin2val;var p=a.val2lin;if(!x.ordinal.positions)m=!0;else if(1<Math.abs(k)){b&&b.forEach(function(b){b.setState()});if(0>k){b=x;var F=a.ordinal.positions?a:x}else b=a.ordinal.positions?a:x,F=x;x=F.ordinal.positions;q>x[x.length-1]&&x.push(q);this.fixedRange=w-u;k=a.navigatorAxis.toFixedRange(null,null,
f.apply(b,[p.apply(b,[u,!0])+k,!0]),f.apply(F,[p.apply(F,[w,!0])+k,!0]));k.min>=Math.min(d.dataMin,u)&&k.max<=Math.max(q,w)+g&&a.setExtremes(k.min,k.max,!0,!1,{trigger:"pan"});this.mouseDownX=e;E(this.container,{cursor:"move"})}}else m=!0;m||n&&/y/.test(n.type)?g&&(a.max=a.dataMax+g):c.preventDefault()});t(v,"updatedData",function(){var c=this.xAxis;c&&c.options.ordinal&&delete c.ordinal.index})}})(v||(v={}));v.compose(l,B,a);return v});K(l,"Core/Axis/BrokenAxis.js",[l["Core/Axis/Axis.js"],l["Core/Globals.js"],
l["Core/Utilities.js"],l["Extensions/Stacking.js"]],function(l,r,B,t){var E=B.addEvent,e=B.find,z=B.fireEvent,p=B.isArray,a=B.isNumber,v=B.pick,H=r.Series,G=function(){function a(a){this.hasBreaks=!1;this.axis=a}a.isInBreak=function(a,e){var n=a.repeat||Infinity,c=a.from,h=a.to-a.from;e=e>=c?(e-c)%n:n-(c-e)%n;return a.inclusive?e<=h:e<h&&0!==e};a.lin2Val=function(e){var p=this.brokenAxis;p=p&&p.breakArray;if(!p)return e;var n;for(n=0;n<p.length;n++){var c=p[n];if(c.from>=e)break;else c.to<e?e+=c.len:
a.isInBreak(c,e)&&(e+=c.len)}return e};a.val2Lin=function(e){var p=this.brokenAxis;p=p&&p.breakArray;if(!p)return e;var n=e,c;for(c=0;c<p.length;c++){var h=p[c];if(h.to<=e)n-=h.len;else if(h.from>=e)break;else if(a.isInBreak(h,e)){n-=e-h.from;break}}return n};a.prototype.findBreakAt=function(a,p){return e(p,function(e){return e.from<a&&a<e.to})};a.prototype.isInAnyBreak=function(e,p){var n=this.axis,c=n.options.breaks,h=c&&c.length,g;if(h){for(;h--;)if(a.isInBreak(c[h],e)){var l=!0;g||(g=v(c[h].showPoints,
!n.isXAxis))}var D=l&&p?l&&!g:l}return D};a.prototype.setBreaks=function(e,t){var n=this,c=n.axis,h=p(e)&&!!e.length;c.isDirty=n.hasBreaks!==h;n.hasBreaks=h;c.options.breaks=c.userOptions.breaks=e;c.forceRedraw=!0;c.series.forEach(function(c){c.isDirty=!0});h||c.val2lin!==a.val2Lin||(delete c.val2lin,delete c.lin2val);h&&(c.userOptions.ordinal=!1,c.lin2val=a.lin2Val,c.val2lin=a.val2Lin,c.setExtremes=function(c,a,e,h,k){if(n.hasBreaks){for(var d,g=this.options.breaks;d=n.findBreakAt(c,g);)c=d.to;for(;d=
n.findBreakAt(a,g);)a=d.from;a<c&&(a=c)}l.prototype.setExtremes.call(this,c,a,e,h,k)},c.setAxisTranslation=function(g){l.prototype.setAxisTranslation.call(this,g);n.unitLength=null;if(n.hasBreaks){g=c.options.breaks||[];var e=[],h=[],m=0,k,d=c.userMin||c.min,q=c.userMax||c.max,u=v(c.pointRangePadding,0),w;g.forEach(function(b){k=b.repeat||Infinity;a.isInBreak(b,d)&&(d+=b.to%k-d%k);a.isInBreak(b,q)&&(q-=q%k-b.from%k)});g.forEach(function(b){f=b.from;for(k=b.repeat||Infinity;f-k>d;)f-=k;for(;f<d;)f+=
k;for(w=f;w<q;w+=k)e.push({value:w,move:"in"}),e.push({value:w+(b.to-b.from),move:"out",size:b.breakSize})});e.sort(function(b,f){return b.value===f.value?("in"===b.move?0:1)-("in"===f.move?0:1):b.value-f.value});var b=0;var f=d;e.forEach(function(d){b+="in"===d.move?1:-1;1===b&&"in"===d.move&&(f=d.value);0===b&&(h.push({from:f,to:d.value,len:d.value-f-(d.size||0)}),m+=d.value-f-(d.size||0))});c.breakArray=n.breakArray=h;n.unitLength=q-d-m+u;z(c,"afterBreaks");c.staticScale?c.transA=c.staticScale:
n.unitLength&&(c.transA*=(q-c.min+u)/n.unitLength);u&&(c.minPixelPadding=c.transA*c.minPointOffset);c.min=d;c.max=q}});v(t,!0)&&c.chart.redraw()};return a}();r=function(){function e(){}e.compose=function(e,p){e.keepProps.push("brokenAxis");var n=H.prototype;n.drawBreaks=function(c,e){var g=this,h=g.points,n,m,k,d;if(c&&c.brokenAxis&&c.brokenAxis.hasBreaks){var q=c.brokenAxis;e.forEach(function(u){n=q&&q.breakArray||[];m=c.isXAxis?c.min:v(g.options.threshold,c.min);h.forEach(function(g){d=v(g["stack"+
u.toUpperCase()],g[u]);n.forEach(function(b){if(a(m)&&a(d)){k=!1;if(m<b.from&&d>b.to||m>b.from&&d<b.from)k="pointBreak";else if(m<b.from&&d>b.from&&d<b.to||m>b.from&&d>b.to&&d<b.from)k="pointInBreak";k&&z(c,k,{point:g,brk:b})}})})})}};n.gappedPath=function(){var c=this.currentDataGrouping,a=c&&c.gapSize;c=this.options.gapSize;var g=this.points.slice(),e=g.length-1,n=this.yAxis,m;if(c&&0<e)for("value"!==this.options.gapUnit&&(c*=this.basePointRange),a&&a>c&&a>=this.basePointRange&&(c=a),m=void 0;e--;)m&&
!1!==m.visible||(m=g[e+1]),a=g[e],!1!==m.visible&&!1!==a.visible&&(m.x-a.x>c&&(m=(a.x+m.x)/2,g.splice(e+1,0,{isNull:!0,x:m}),n.stacking&&this.options.stacking&&(m=n.stacking.stacks[this.stackKey][m]=new t(n,n.options.stackLabels,!1,m,this.stack),m.total=0)),m=a);return this.getGraphPath(g)};E(e,"init",function(){this.brokenAxis||(this.brokenAxis=new G(this))});E(e,"afterInit",function(){"undefined"!==typeof this.brokenAxis&&this.brokenAxis.setBreaks(this.options.breaks,!1)});E(e,"afterSetTickPositions",
function(){var c=this.brokenAxis;if(c&&c.hasBreaks){var a=this.tickPositions,g=this.tickPositions.info,e=[],n;for(n=0;n<a.length;n++)c.isInAnyBreak(a[n])||e.push(a[n]);this.tickPositions=e;this.tickPositions.info=g}});E(e,"afterSetOptions",function(){this.brokenAxis&&this.brokenAxis.hasBreaks&&(this.options.ordinal=!1)});E(p,"afterGeneratePoints",function(){var c=this.options.connectNulls,a=this.points,g=this.xAxis,e=this.yAxis;if(this.isDirty)for(var n=a.length;n--;){var m=a[n],k=!(null===m.y&&!1===
c)&&(g&&g.brokenAxis&&g.brokenAxis.isInAnyBreak(m.x,!0)||e&&e.brokenAxis&&e.brokenAxis.isInAnyBreak(m.y,!0));m.visible=k?!1:!1!==m.options.visible}});E(p,"afterRender",function(){this.drawBreaks(this.xAxis,["x"]);this.drawBreaks(this.yAxis,v(this.pointArrayMap,["y"]))})};return e}();r.compose(l,H);return r});K(l,"masters/modules/broken-axis.src.js",[],function(){});K(l,"Extensions/DataGrouping.js",[l["Core/Axis/DateTimeAxis.js"],l["Core/Globals.js"],l["Core/Options.js"],l["Core/Series/Point.js"],
l["Core/Tooltip.js"],l["Core/Utilities.js"]],function(l,r,B,t,E,e){"";var z=e.addEvent,p=e.arrayMax,a=e.arrayMin,v=e.correctFloat,H=e.defined,G=e.error,C=e.extend,y=e.format,A=e.isNumber,n=e.merge,c=e.pick,h=r.Axis;e=r.Series;var g=r.approximations={sum:function(b){var f=b.length;if(!f&&b.hasNulls)var d=null;else if(f)for(d=0;f--;)d+=b[f];return d},average:function(b){var d=b.length;b=g.sum(b);A(b)&&d&&(b=v(b/d));return b},averages:function(){var b=[];[].forEach.call(arguments,function(d){b.push(g.average(d))});
return"undefined"===typeof b[0]?void 0:b},open:function(b){return b.length?b[0]:b.hasNulls?null:void 0},high:function(b){return b.length?p(b):b.hasNulls?null:void 0},low:function(b){return b.length?a(b):b.hasNulls?null:void 0},close:function(b){return b.length?b[b.length-1]:b.hasNulls?null:void 0},ohlc:function(b,d,c,a){b=g.open(b);d=g.high(d);c=g.low(c);a=g.close(a);if(A(b)||A(d)||A(c)||A(a))return[b,d,c,a]},range:function(b,d){b=g.low(b);d=g.high(d);if(A(b)||A(d))return[b,d];if(null===b&&null===
d)return null}},I=function(b,d,c,a){var f=this,q=f.data,u=f.options&&f.options.data,e=[],w=[],k=[],x=b.length,h=!!d,m=[],p=f.pointArrayMap,l=p&&p.length,J=["x"].concat(p||["y"]),v=0,t=0,z;a="function"===typeof a?a:g[a]?g[a]:g[f.getDGApproximation&&f.getDGApproximation()||"average"];l?p.forEach(function(){m.push([])}):m.push([]);var D=l||1;for(z=0;z<=x&&!(b[z]>=c[0]);z++);for(z;z<=x;z++){for(;"undefined"!==typeof c[v+1]&&b[z]>=c[v+1]||z===x;){var r=c[v];f.dataGroupInfo={start:f.cropStart+t,length:m[0].length};
var y=a.apply(f,m);f.pointClass&&!H(f.dataGroupInfo.options)&&(f.dataGroupInfo.options=n(f.pointClass.prototype.optionsToObject.call({series:f},f.options.data[f.cropStart+t])),J.forEach(function(b){delete f.dataGroupInfo.options[b]}));"undefined"!==typeof y&&(e.push(r),w.push(y),k.push(f.dataGroupInfo));t=z;for(r=0;r<D;r++)m[r].length=0,m[r].hasNulls=!1;v+=1;if(z===x)break}if(z===x)break;if(p)for(r=f.cropStart+z,y=q&&q[r]||f.pointClass.prototype.applyOptions.apply({series:f},[u[r]]),r=0;r<l;r++){var E=
y[p[r]];A(E)?m[r].push(E):null===E&&(m[r].hasNulls=!0)}else r=h?d[z]:null,A(r)?m[0].push(r):null===r&&(m[0].hasNulls=!0)}return{groupedXData:e,groupedYData:w,groupMap:k}},D={approximations:g,groupData:I},m=e.prototype,k=m.processData,d=m.generatePoints,q={groupPixelWidth:2,dateTimeLabelFormats:{millisecond:["%A, %b %e, %H:%M:%S.%L","%A, %b %e, %H:%M:%S.%L","-%H:%M:%S.%L"],second:["%A, %b %e, %H:%M:%S","%A, %b %e, %H:%M:%S","-%H:%M:%S"],minute:["%A, %b %e, %H:%M","%A, %b %e, %H:%M","-%H:%M"],hour:["%A, %b %e, %H:%M",
"%A, %b %e, %H:%M","-%H:%M"],day:["%A, %b %e, %Y","%A, %b %e","-%A, %b %e, %Y"],week:["Week from %A, %b %e, %Y","%A, %b %e","-%A, %b %e, %Y"],month:["%B %Y","%B","-%B %Y"],year:["%Y","%Y","-%Y"]}},u={line:{},spline:{},area:{},areaspline:{},arearange:{},column:{groupPixelWidth:10},columnrange:{groupPixelWidth:10},candlestick:{groupPixelWidth:10},ohlc:{groupPixelWidth:5}},w=r.defaultDataGroupingUnits=[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,
30]],["hour",[1,2,3,4,6,8,12]],["day",[1]],["week",[1]],["month",[1,3,6]],["year",null]];m.getDGApproximation=function(){return this.is("arearange")?"range":this.is("ohlc")?"ohlc":this.is("column")?"sum":"average"};m.groupData=I;m.processData=function(){var b=this.chart,d=this.options.dataGrouping,a=!1!==this.allowDG&&d&&c(d.enabled,b.options.isStock),g=this.visible||!b.options.chart.ignoreHiddenSeries,q,u=this.currentDataGrouping,e=!1;this.forceCrop=a;this.groupPixelWidth=null;this.hasProcessed=
!0;a&&!this.requireSorting&&(this.requireSorting=e=!0);a=!1===k.apply(this,arguments)||!a;e&&(this.requireSorting=!1);if(!a){this.destroyGroupedData();a=d.groupAll?this.xData:this.processedXData;var h=d.groupAll?this.yData:this.processedYData,n=b.plotSizeX;b=this.xAxis;var p=b.options.ordinal,v=this.groupPixelWidth=b.getGroupPixelWidth&&b.getGroupPixelWidth();if(v){this.isDirty=q=!0;this.points=null;e=b.getExtremes();var r=e.min;e=e.max;p=p&&b.ordinal&&b.ordinal.getGroupIntervalFactor(r,e,this)||
1;v=v*(e-r)/n*p;n=b.getTimeTicks(l.AdditionsClass.prototype.normalizeTimeTickInterval(v,d.units||w),Math.min(r,a[0]),Math.max(e,a[a.length-1]),b.options.startOfWeek,a,this.closestPointRange);h=m.groupData.apply(this,[a,h,n,d.approximation]);a=h.groupedXData;p=h.groupedYData;var z=0;if(d.smoothed&&a.length){var t=a.length-1;for(a[t]=Math.min(a[t],e);t--&&0<t;)a[t]+=v/2;a[0]=Math.max(a[0],r)}for(t=1;t<n.length;t++)n.info.segmentStarts&&-1!==n.info.segmentStarts.indexOf(t)||(z=Math.max(n[t]-n[t-1],z));
r=n.info;r.gapSize=z;this.closestPointRange=n.info.totalRange;this.groupMap=h.groupMap;if(H(a[0])&&a[0]<b.min&&g){if(!H(b.options.min)&&b.min<=b.dataMin||b.min===b.dataMin)b.min=Math.min(a[0],b.min);b.dataMin=Math.min(a[0],b.dataMin)}d.groupAll&&(d=this.cropData(a,p,b.min,b.max,1),a=d.xData,p=d.yData);this.processedXData=a;this.processedYData=p}else this.groupMap=null;this.hasGroupedData=q;this.currentDataGrouping=r;this.preventGraphAnimation=(u&&u.totalRange)!==(r&&r.totalRange)}};m.destroyGroupedData=
function(){this.groupedData&&(this.groupedData.forEach(function(b,d){b&&(this.groupedData[d]=b.destroy?b.destroy():null)},this),this.groupedData.length=0)};m.generatePoints=function(){d.apply(this);this.destroyGroupedData();this.groupedData=this.hasGroupedData?this.points:null};z(t,"update",function(){if(this.dataGroup)return G(24,!1,this.series.chart),!1});z(E,"headerFormatter",function(b){var d=this.chart,a=d.time,c=b.labelConfig,g=c.series,u=g.tooltipOptions,e=g.options.dataGrouping,w=u.xDateFormat,
k=g.xAxis,h=u[(b.isFooter?"footer":"header")+"Format"];if(k&&"datetime"===k.options.type&&e&&A(c.key)){var n=g.currentDataGrouping;e=e.dateTimeLabelFormats||q.dateTimeLabelFormats;if(n)if(u=e[n.unitName],1===n.count)w=u[0];else{w=u[1];var m=u[2]}else!w&&e&&(w=this.getXDateFormat(c,u,k));w=a.dateFormat(w,c.key);m&&(w+=a.dateFormat(m,c.key+n.totalRange-1));g.chart.styledMode&&(h=this.styledModeFormat(h));b.text=y(h,{point:C(c.point,{key:w}),series:g},d);b.preventDefault()}});z(e,"destroy",m.destroyGroupedData);
z(e,"afterSetOptions",function(b){b=b.options;var d=this.type,a=this.chart.options.plotOptions,c=B.defaultOptions.plotOptions[d].dataGrouping,g=this.useCommonDataGrouping&&q;if(u[d]||g)c||(c=n(q,u[d])),b.dataGrouping=n(g,c,a.series&&a.series.dataGrouping,a[d].dataGrouping,this.userOptions.dataGrouping)});z(h,"afterSetScale",function(){this.series.forEach(function(b){b.hasProcessed=!1})});h.prototype.getGroupPixelWidth=function(){var b=this.series,d=b.length,a,g=0,u=!1,e;for(a=d;a--;)(e=b[a].options.dataGrouping)&&
(g=Math.max(g,c(e.groupPixelWidth,q.groupPixelWidth)));for(a=d;a--;)(e=b[a].options.dataGrouping)&&b[a].hasProcessed&&(d=(b[a].processedXData||b[a].data).length,b[a].groupPixelWidth||d>this.chart.plotSizeX/g||d&&e.forced)&&(u=!0);return u?g:0};h.prototype.setDataGrouping=function(b,d){var f;d=c(d,!0);b||(b={forced:!1,units:null});if(this instanceof h)for(f=this.series.length;f--;)this.series[f].update({dataGrouping:b},!1);else this.chart.options.series.forEach(function(d){d.dataGrouping=b},!1);this.ordinal&&
(this.ordinal.slope=void 0);d&&this.chart.redraw()};r.dataGrouping=D;"";return D});K(l,"Series/OHLCSeries.js",[l["Core/Globals.js"],l["Core/Series/Point.js"],l["Core/Utilities.js"]],function(l,r,B){B=B.seriesType;var t=l.seriesTypes;B("ohlc","column",{lineWidth:1,tooltip:{pointFormat:'<span style="color:{point.color}">\u25cf</span> <b> {series.name}</b><br/>Open: {point.open}<br/>High: {point.high}<br/>Low: {point.low}<br/>Close: {point.close}<br/>'},threshold:null,states:{hover:{lineWidth:3}},stickyTracking:!0},
{directTouch:!1,pointArrayMap:["open","high","low","close"],toYData:function(l){return[l.open,l.high,l.low,l.close]},pointValKey:"close",pointAttrToOptions:{stroke:"color","stroke-width":"lineWidth"},init:function(){t.column.prototype.init.apply(this,arguments);this.options.stacking=void 0},pointAttribs:function(l,e){e=t.column.prototype.pointAttribs.call(this,l,e);var r=this.options;delete e.fill;!l.options.color&&r.upColor&&l.open<l.close&&(e.stroke=r.upColor);return e},translate:function(){var l=
this,e=l.yAxis,r=!!l.modifyValue,p=["plotOpen","plotHigh","plotLow","plotClose","yBottom"];t.column.prototype.translate.apply(l);l.points.forEach(function(a){[a.open,a.high,a.low,a.close,a.low].forEach(function(v,t){null!==v&&(r&&(v=l.modifyValue(v)),a[p[t]]=e.toPixels(v,!0))});a.tooltipPos[1]=a.plotHigh+e.pos-l.chart.plotTop})},drawPoints:function(){var l=this,e=l.chart,r=function(e,a,l){var p=e[0];e=e[1];"number"===typeof p[2]&&(p[2]=Math.max(l+a,p[2]));"number"===typeof e[2]&&(e[2]=Math.min(l-
a,e[2]))};l.points.forEach(function(p){var a=p.graphic,v=!a;if("undefined"!==typeof p.plotY){a||(p.graphic=a=e.renderer.path().add(l.group));e.styledMode||a.attr(l.pointAttribs(p,p.selected&&"select"));var t=a.strokeWidth();var z=t%2/2;var C=Math.round(p.plotX)-z;var y=Math.round(p.shapeArgs.width/2);var A=[["M",C,Math.round(p.yBottom)],["L",C,Math.round(p.plotHigh)]];if(null!==p.open){var n=Math.round(p.plotOpen)+z;A.push(["M",C,n],["L",C-y,n]);r(A,t/2,n)}null!==p.close&&(n=Math.round(p.plotClose)+
z,A.push(["M",C,n],["L",C+y,n]),r(A,t/2,n));a[v?"attr":"animate"]({d:A}).addClass(p.getClassName(),!0)}})},animate:null},{getClassName:function(){return r.prototype.getClassName.call(this)+(this.open<this.close?" highcharts-point-up":" highcharts-point-down")}});""});K(l,"Series/CandlestickSeries.js",[l["Core/Globals.js"],l["Core/Options.js"],l["Core/Utilities.js"]],function(l,r,B){r=r.defaultOptions;var t=B.merge;B=B.seriesType;var E=l.seriesTypes;B("candlestick","ohlc",t(r.plotOptions.column,{states:{hover:{lineWidth:2}},
tooltip:r.plotOptions.ohlc.tooltip,threshold:null,lineColor:"#000000",lineWidth:1,upColor:"#ffffff",stickyTracking:!0}),{pointAttribs:function(e,l){var p=E.column.prototype.pointAttribs.call(this,e,l),a=this.options,v=e.open<e.close,r=a.lineColor||this.color;p["stroke-width"]=a.lineWidth;p.fill=e.options.color||(v?a.upColor||this.color:this.color);p.stroke=e.options.lineColor||(v?a.upLineColor||r:r);l&&(e=a.states[l],p.fill=e.color||p.fill,p.stroke=e.lineColor||p.stroke,p["stroke-width"]=e.lineWidth||
p["stroke-width"]);return p},drawPoints:function(){var e=this,l=e.chart,p=e.yAxis.reversed;e.points.forEach(function(a){var r=a.graphic,t=!r;if("undefined"!==typeof a.plotY){r||(a.graphic=r=l.renderer.path().add(e.group));e.chart.styledMode||r.attr(e.pointAttribs(a,a.selected&&"select")).shadow(e.options.shadow);var z=r.strokeWidth()%2/2;var C=Math.round(a.plotX)-z;var y=a.plotOpen;var A=a.plotClose;var n=Math.min(y,A);y=Math.max(y,A);var c=Math.round(a.shapeArgs.width/2);A=p?y!==a.yBottom:Math.round(n)!==
Math.round(a.plotHigh);var h=p?Math.round(n)!==Math.round(a.plotHigh):y!==a.yBottom;n=Math.round(n)+z;y=Math.round(y)+z;z=[];z.push(["M",C-c,y],["L",C-c,n],["L",C+c,n],["L",C+c,y],["Z"],["M",C,n],["L",C,A?Math.round(p?a.yBottom:a.plotHigh):n],["M",C,y],["L",C,h?Math.round(p?a.plotHigh:a.yBottom):y]);r[t?"attr":"animate"]({d:z}).addClass(a.getClassName(),!0)}})}});""});K(l,"Mixins/OnSeries.js",[l["Core/Globals.js"],l["Core/Utilities.js"]],function(l,r){var B=r.defined,t=r.stableSort,E=l.seriesTypes;
return{getPlotBox:function(){return l.Series.prototype.getPlotBox.call(this.options.onSeries&&this.chart.get(this.options.onSeries)||this)},translate:function(){E.column.prototype.translate.apply(this);var e=this,l=e.options,p=e.chart,a=e.points,r=a.length-1,H,G=l.onSeries;G=G&&p.get(G);l=l.onKey||"y";var C=G&&G.options.step,y=G&&G.points,A=y&&y.length,n=p.inverted,c=e.xAxis,h=e.yAxis,g=0,I;if(G&&G.visible&&A){g=(G.pointXOffset||0)+(G.barW||0)/2;p=G.currentDataGrouping;var D=y[A-1].x+(p?p.totalRange:
0);t(a,function(d,a){return d.x-a.x});for(l="plot"+l[0].toUpperCase()+l.substr(1);A--&&a[r];){var m=y[A];p=a[r];p.y=m.y;if(m.x<=p.x&&"undefined"!==typeof m[l]){if(p.x<=D&&(p.plotY=m[l],m.x<p.x&&!C&&(I=y[A+1])&&"undefined"!==typeof I[l])){var k=(p.x-m.x)/(I.x-m.x);p.plotY+=k*(I[l]-m[l]);p.y+=k*(I.y-m.y)}r--;A++;if(0>r)break}}}a.forEach(function(d,q){d.plotX+=g;if("undefined"===typeof d.plotY||n)0<=d.plotX&&d.plotX<=c.len?n?(d.plotY=c.translate(d.x,0,1,0,1),d.plotX=B(d.y)?h.translate(d.y,0,0,0,1):0):
d.plotY=(c.opposite?0:e.yAxis.len)+c.offset:d.shapeArgs={};if((H=a[q-1])&&H.plotX===d.plotX){"undefined"===typeof H.stackIndex&&(H.stackIndex=0);var u=H.stackIndex+1}d.stackIndex=u});this.onSeries=G}}});K(l,"Series/FlagsSeries.js",[l["Core/Globals.js"],l["Core/Renderer/SVG/SVGElement.js"],l["Core/Renderer/SVG/SVGRenderer.js"],l["Core/Utilities.js"],l["Mixins/OnSeries.js"]],function(l,r,B,t,E){function e(a){h[a+"pin"]=function(c,g,e,k,d){var q=d&&d.anchorX;d=d&&d.anchorY;"circle"===a&&k>e&&(c-=Math.round((k-
e)/2),e=k);var u=h[a](c,g,e,k);if(q&&d){var w=q;"circle"===a?w=c+e/2:(c=u[0],e=u[1],"M"===c[0]&&"L"===e[0]&&(w=(c[1]+e[1])/2));u.push(["M",w,g>d?g:g+k],["L",q,d]);u=u.concat(h.circle(q-1,d-1,2,2))}return u}}var z=t.addEvent,p=t.defined,a=t.isNumber,v=t.merge,H=t.objectEach,G=t.seriesType,C=t.wrap;t=l.noop;var y=l.Renderer,A=l.Series,n=l.TrackerMixin,c=l.VMLRenderer,h=B.prototype.symbols;G("flags","column",{pointRange:0,allowOverlapX:!1,shape:"flag",stackDistance:12,textAlign:"center",tooltip:{pointFormat:"{point.text}<br/>"},
threshold:null,y:-30,fillColor:"#ffffff",lineWidth:1,states:{hover:{lineColor:"#000000",fillColor:"#ccd6eb"}},style:{fontSize:"11px",fontWeight:"bold"}},{sorted:!1,noSharedTooltip:!0,allowDG:!1,takeOrdinalPosition:!1,trackerGroups:["markerGroup"],forceCrop:!0,init:A.prototype.init,pointAttribs:function(a,c){var g=this.options,e=a&&a.color||this.color,k=g.lineColor,d=a&&a.lineWidth;a=a&&a.fillColor||g.fillColor;c&&(a=g.states[c].fillColor,k=g.states[c].lineColor,d=g.states[c].lineWidth);return{fill:a||
e,stroke:k||e,"stroke-width":d||g.lineWidth||0}},translate:E.translate,getPlotBox:E.getPlotBox,drawPoints:function(){var a=this.points,c=this.chart,e=c.renderer,h=c.inverted,k=this.options,d=k.y,q,u=this.yAxis,w={},b=[];for(q=a.length;q--;){var f=a[q];var n=(h?f.plotY:f.plotX)>this.xAxis.len;var t=f.plotX;var F=f.stackIndex;var z=f.options.shape||k.shape;var y=f.plotY;"undefined"!==typeof y&&(y=f.plotY+d-("undefined"!==typeof F&&F*k.stackDistance));f.anchorX=F?void 0:f.plotX;var A=F?void 0:f.plotY;
var B="flag"!==z;F=f.graphic;"undefined"!==typeof y&&0<=t&&!n?(F||(F=f.graphic=e.label("",null,null,z,null,null,k.useHTML),c.styledMode||F.attr(this.pointAttribs(f)).css(v(k.style,f.style)),F.attr({align:B?"center":"left",width:k.width,height:k.height,"text-align":k.textAlign}).addClass("highcharts-point").add(this.markerGroup),f.graphic.div&&(f.graphic.div.point=f),c.styledMode||F.shadow(k.shadow),F.isNew=!0),0<t&&(t-=F.strokeWidth()%2),z={y:y,anchorY:A},k.allowOverlapX&&(z.x=t,z.anchorX=f.anchorX),
F.attr({text:f.options.title||k.title||"A"})[F.isNew?"attr":"animate"](z),k.allowOverlapX||(w[f.plotX]?w[f.plotX].size=Math.max(w[f.plotX].size,F.width):w[f.plotX]={align:B?.5:0,size:F.width,target:t,anchorX:t}),f.tooltipPos=[t,y+u.pos-c.plotTop]):F&&(f.graphic=F.destroy())}k.allowOverlapX||(H(w,function(d){d.plotX=d.anchorX;b.push(d)}),l.distribute(b,h?u.len:this.xAxis.len,100),a.forEach(function(b){var d=b.graphic&&w[b.plotX];d&&(b.graphic[b.graphic.isNew?"attr":"animate"]({x:d.pos+d.align*d.size,
anchorX:b.anchorX}),p(d.pos)?b.graphic.isNew=!1:(b.graphic.attr({x:-9999,anchorX:-9999}),b.graphic.isNew=!0))}));k.useHTML&&C(this.markerGroup,"on",function(b){return r.prototype.on.apply(b.apply(this,[].slice.call(arguments,1)),[].slice.call(arguments,1))})},drawTracker:function(){var a=this.points;n.drawTrackerPoint.apply(this);a.forEach(function(c){var g=c.graphic;g&&z(g.element,"mouseover",function(){0<c.stackIndex&&!c.raised&&(c._y=g.y,g.attr({y:c._y-8}),c.raised=!0);a.forEach(function(a){a!==
c&&a.raised&&a.graphic&&(a.graphic.attr({y:a._y}),a.raised=!1)})})})},animate:function(a){a&&this.setClip()},setClip:function(){A.prototype.setClip.apply(this,arguments);!1!==this.options.clip&&this.sharedClipKey&&this.markerGroup.clip(this.chart[this.sharedClipKey])},buildKDTree:t,invertGroups:t},{isValid:function(){return a(this.y)||"undefined"===typeof this.y}});h.flag=function(a,c,e,n,k){var d=k&&k.anchorX||a;k=k&&k.anchorY||c;var g=h.circle(d-1,k-1,2,2);g.push(["M",d,k],["L",a,c+n],["L",a,c],
["L",a+e,c],["L",a+e,c+n],["L",a,c+n],["Z"]);return g};e("circle");e("square");y===c&&["circlepin","flag","squarepin"].forEach(function(a){c.prototype.symbols[a]=h[a]});""});K(l,"Extensions/RangeSelector.js",[l["Core/Axis/Axis.js"],l["Core/Chart/Chart.js"],l["Core/Globals.js"],l["Core/Options.js"],l["Core/Renderer/SVG/SVGElement.js"],l["Core/Utilities.js"]],function(l,r,B,t,E,e){var z=t.defaultOptions,p=e.addEvent,a=e.createElement,v=e.css,H=e.defined,G=e.destroyObjectProperties,C=e.discardElement,
y=e.extend,A=e.fireEvent,n=e.isNumber,c=e.merge,h=e.objectEach,g=e.pick,I=e.pInt,D=e.splat;y(z,{rangeSelector:{verticalAlign:"top",buttonTheme:{width:28,height:18,padding:2,zIndex:7},floating:!1,x:0,y:0,height:void 0,inputPosition:{align:"right",x:0,y:0},buttonPosition:{align:"left",x:0,y:0},labelStyle:{color:"#666666"}}});z.lang=c(z.lang,{rangeSelectorZoom:"Zoom",rangeSelectorFrom:"From",rangeSelectorTo:"To"});var m=function(){function e(d){this.buttons=void 0;this.buttonOptions=e.prototype.defaultButtons;
this.options=void 0;this.chart=d;this.init(d)}e.prototype.clickButton=function(d,a){var c=this.chart,e=this.buttonOptions[d],b=c.xAxis[0],f=c.scroller&&c.scroller.getUnionExtremes()||b||{},q=f.dataMin,k=f.dataMax,h=b&&Math.round(Math.min(b.max,g(k,b.max))),m=e.type;f=e._range;var r,t=e.dataGrouping;if(null!==q&&null!==k){c.fixedRange=f;t&&(this.forcedDataGrouping=!0,l.prototype.setDataGrouping.call(b||{chart:this.chart},t,!1),this.frozenStates=e.preserveDataGrouping);if("month"===m||"year"===m)if(b){m=
{range:e,max:h,chart:c,dataMin:q,dataMax:k};var v=b.minFromRange.call(m);n(m.newMax)&&(h=m.newMax)}else f=e;else if(f)v=Math.max(h-f,q),h=Math.min(v+f,k);else if("ytd"===m)if(b)"undefined"===typeof k&&(q=Number.MAX_VALUE,k=Number.MIN_VALUE,c.series.forEach(function(b){b=b.xData;q=Math.min(b[0],q);k=Math.max(b[b.length-1],k)}),a=!1),h=this.getYTDExtremes(k,q,c.time.useUTC),v=r=h.min,h=h.max;else{this.deferredYTDClick=d;return}else"all"===m&&b&&(v=q,h=k);H(v)&&(v+=e._offsetMin);H(h)&&(h+=e._offsetMax);
this.setSelected(d);if(b)b.setExtremes(v,h,g(a,1),null,{trigger:"rangeSelectorButton",rangeSelectorButton:e});else{var z=D(c.options.xAxis)[0];var y=z.range;z.range=f;var A=z.min;z.min=r;p(c,"load",function(){z.range=y;z.min=A})}}};e.prototype.setSelected=function(d){this.selected=this.options.selected=d};e.prototype.init=function(d){var a=this,c=d.options.rangeSelector,e=c.buttons||a.defaultButtons.slice(),b=c.selected,f=function(){var b=a.minInput,d=a.maxInput;b&&b.blur&&A(b,"blur");d&&d.blur&&
A(d,"blur")};a.chart=d;a.options=c;a.buttons=[];a.buttonOptions=e;this.unMouseDown=p(d.container,"mousedown",f);this.unResize=p(d,"resize",f);e.forEach(a.computeButtonRange);"undefined"!==typeof b&&e[b]&&this.clickButton(b,!1);p(d,"load",function(){d.xAxis&&d.xAxis[0]&&p(d.xAxis[0],"setExtremes",function(b){this.max-this.min!==d.fixedRange&&"rangeSelectorButton"!==b.trigger&&"updatedData"!==b.trigger&&a.forcedDataGrouping&&!a.frozenStates&&this.setDataGrouping(!1,!1)})})};e.prototype.updateButtonStates=
function(){var d=this,a=this.chart,c=a.xAxis[0],e=Math.round(c.max-c.min),b=!c.hasVisibleSeries,f=a.scroller&&a.scroller.getUnionExtremes()||c,g=f.dataMin,k=f.dataMax;a=d.getYTDExtremes(k,g,a.time.useUTC);var h=a.min,l=a.max,p=d.selected,m=n(p),r=d.options.allButtonsEnabled,t=d.buttons;d.buttonOptions.forEach(function(a,f){var q=a._range,u=a.type,w=a.count||1,n=t[f],x=0,v=a._offsetMax-a._offsetMin;a=f===p;var F=q>k-g,z=q<c.minRange,y=!1,J=!1;q=q===e;("month"===u||"year"===u)&&e+36E5>=864E5*{month:28,
year:365}[u]*w-v&&e-36E5<=864E5*{month:31,year:366}[u]*w+v?q=!0:"ytd"===u?(q=l-h+v===e,y=!a):"all"===u&&(q=c.max-c.min>=k-g,J=!a&&m&&q);u=!r&&(F||z||J||b);w=a&&q||q&&!m&&!y||a&&d.frozenStates;u?x=3:w&&(m=!0,x=2);n.state!==x&&(n.setState(x),0===x&&p===f&&d.setSelected(null))})};e.prototype.computeButtonRange=function(d){var a=d.type,c=d.count||1,e={millisecond:1,second:1E3,minute:6E4,hour:36E5,day:864E5,week:6048E5};if(e[a])d._range=e[a]*c;else if("month"===a||"year"===a)d._range=864E5*{month:30,year:365}[a]*
c;d._offsetMin=g(d.offsetMin,0);d._offsetMax=g(d.offsetMax,0);d._range+=d._offsetMax-d._offsetMin};e.prototype.setInputValue=function(d,a){var c=this.chart.options.rangeSelector,e=this.chart.time,b=this[d+"Input"];H(a)&&(b.previousValue=b.HCTime,b.HCTime=a);b.value=e.dateFormat(c.inputEditDateFormat||"%Y-%m-%d",b.HCTime);this[d+"DateBox"].attr({text:e.dateFormat(c.inputDateFormat||"%b %e, %Y",b.HCTime)})};e.prototype.showInput=function(d){var a=this.inputGroup,c=this[d+"DateBox"];v(this[d+"Input"],
{left:a.translateX+c.x+"px",top:a.translateY+"px",width:c.width-2+"px",height:c.height-2+"px",border:"2px solid silver"})};e.prototype.hideInput=function(d){v(this[d+"Input"],{border:0,width:"1px",height:"1px"});this.setInputValue(d)};e.prototype.defaultInputDateParser=function(d,a){var c=new Date;return B.isSafari?Date.parse(d.split(" ").join("T")):a?Date.parse(d+"Z"):Date.parse(d)-6E4*c.getTimezoneOffset()};e.prototype.drawInput=function(d){function e(){var b=m.value,d=k.xAxis[0];var a=k.scroller&&
k.scroller.xAxis?k.scroller.xAxis:d;var c=a.dataMin,f=a.dataMax;a=(h.inputDateParser||A)(b,k.time.useUTC);a!==m.previousValue&&(m.previousValue=a,n(a)||(a=b.split("-"),a=Date.UTC(I(a[0]),I(a[1])-1,I(a[2]))),n(a)&&(k.time.useUTC||(a+=6E4*(new Date).getTimezoneOffset()),p?a>g.maxInput.HCTime?a=void 0:a<c&&(a=c):a<g.minInput.HCTime?a=void 0:a>f&&(a=f),"undefined"!==typeof a&&d.setExtremes(p?a:d.min,p?d.max:a,void 0,void 0,{trigger:"rangeSelectorInput"})))}var g=this,k=g.chart,b=k.renderer.style||{},
f=k.renderer,h=k.options.rangeSelector,l=g.div,p="min"===d,m,r,t=this.inputGroup,A=this.defaultInputDateParser;this[d+"Label"]=r=f.label(z.lang[p?"rangeSelectorFrom":"rangeSelectorTo"],this.inputGroup.offset).addClass("highcharts-range-label").attr({padding:2}).add(t);t.offset+=r.width+5;this[d+"DateBox"]=f=f.label("",t.offset).addClass("highcharts-range-input").attr({padding:2,width:h.inputBoxWidth||90,height:h.inputBoxHeight||17,"text-align":"center"}).on("click",function(){g.showInput(d);g[d+"Input"].focus()});
k.styledMode||f.attr({stroke:h.inputBoxBorderColor||"#cccccc","stroke-width":1});f.add(t);t.offset+=f.width+(p?10:0);this[d+"Input"]=m=a("input",{name:d,className:"highcharts-range-selector",type:"text"},{top:k.plotTop+"px"},l);k.styledMode||(r.css(c(b,h.labelStyle)),f.css(c({color:"#333333"},b,h.inputStyle)),v(m,y({position:"absolute",border:0,width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:b.fontSize,fontFamily:b.fontFamily,top:"-9999em"},h.inputStyle)));m.onfocus=function(){g.showInput(d)};
m.onblur=function(){m===B.doc.activeElement&&e();g.hideInput(d);m.blur()};m.onchange=e;m.onkeypress=function(b){13===b.keyCode&&e()}};e.prototype.getPosition=function(){var a=this.chart,c=a.options.rangeSelector;a="top"===c.verticalAlign?a.plotTop-a.axisOffset[0]:0;return{buttonTop:a+c.buttonPosition.y,inputTop:a+c.inputPosition.y-10}};e.prototype.getYTDExtremes=function(a,c,e){var d=this.chart.time,b=new d.Date(a),f=d.get("FullYear",b);e=e?d.Date.UTC(f,0,1):+new d.Date(f,0,1);c=Math.max(c||0,e);
b=b.getTime();return{max:Math.min(a||b,b),min:c}};e.prototype.render=function(d,c){var e=this,q=e.chart,b=q.renderer,f=q.container,k=q.options,h=k.exporting&&!1!==k.exporting.enabled&&k.navigation&&k.navigation.buttonOptions,n=z.lang,l=e.div,m=k.rangeSelector,p=g(k.chart.style&&k.chart.style.zIndex,0)+1;k=m.floating;var r=e.buttons;l=e.inputGroup;var t=m.buttonTheme,v=m.buttonPosition,y=m.inputPosition,A=m.inputEnabled,C=t&&t.states,B=q.plotLeft,D=e.buttonGroup,E,G=e.options.verticalAlign,H=q.legend,
I=H&&H.options,K=v.y,N=y.y,O=q.hasLoaded,P=O?"animate":"attr",M=0,L=0;if(!1!==m.enabled){e.rendered||(e.group=E=b.g("range-selector-group").attr({zIndex:7}).add(),e.buttonGroup=D=b.g("range-selector-buttons").add(E),e.zoomText=b.text(n.rangeSelectorZoom,0,15).add(D),q.styledMode||(e.zoomText.css(m.labelStyle),t["stroke-width"]=g(t["stroke-width"],0)),e.buttonOptions.forEach(function(a,d){r[d]=b.button(a.text,0,0,function(b){var c=a.events&&a.events.click,f;c&&(f=c.call(a,b));!1!==f&&e.clickButton(d);
e.isActive=!0},t,C&&C.hover,C&&C.select,C&&C.disabled).attr({"text-align":"center"}).add(D)}),!1!==A&&(e.div=l=a("div",null,{position:"relative",height:0,zIndex:p}),f.parentNode.insertBefore(l,f),e.inputGroup=l=b.g("input-group").add(E),l.offset=0,e.drawInput("min"),e.drawInput("max")));e.zoomText[P]({x:g(B+v.x,B)});var Q=g(B+v.x,B)+e.zoomText.getBBox().width+5;e.buttonOptions.forEach(function(b,a){r[a][P]({x:Q});Q+=r[a].width+g(m.buttonSpacing,5)});B=q.plotLeft-q.spacing[3];e.updateButtonStates();
h&&this.titleCollision(q)&&"top"===G&&"right"===v.align&&v.y+D.getBBox().height-12<(h.y||0)+h.height&&(M=-40);f=v.x-q.spacing[3];"right"===v.align?f+=M-B:"center"===v.align&&(f-=B/2);D.align({y:v.y,width:D.getBBox().width,align:v.align,x:f},!0,q.spacingBox);e.group.placed=O;e.buttonGroup.placed=O;!1!==A&&(M=h&&this.titleCollision(q)&&"top"===G&&"right"===y.align&&y.y-l.getBBox().height-12<(h.y||0)+h.height+q.spacing[0]?-40:0,"left"===y.align?f=B:"right"===y.align&&(f=-Math.max(q.axisOffset[1],-M)),
l.align({y:y.y,width:l.getBBox().width,align:y.align,x:y.x+f-2},!0,q.spacingBox),h=l.alignAttr.translateX+l.alignOptions.x-M+l.getBBox().x+2,f=l.alignOptions.width,n=D.alignAttr.translateX+D.getBBox().x,B=D.getBBox().width+20,(y.align===v.align||n+B>h&&h+f>n&&K<N+l.getBBox().height)&&l.attr({translateX:l.alignAttr.translateX+(q.axisOffset[1]>=-M?0:-M),translateY:l.alignAttr.translateY+D.getBBox().height+10}),e.setInputValue("min",d),e.setInputValue("max",c),e.inputGroup.placed=O);e.group.align({verticalAlign:G},
!0,q.spacingBox);d=e.group.getBBox().height+20;c=e.group.alignAttr.translateY;"bottom"===G&&(H=I&&"bottom"===I.verticalAlign&&I.enabled&&!I.floating?H.legendHeight+g(I.margin,10):0,d=d+H-20,L=c-d-(k?0:m.y)-(q.titleOffset?q.titleOffset[2]:0)-10);if("top"===G)k&&(L=0),q.titleOffset&&q.titleOffset[0]&&(L=q.titleOffset[0]),L+=q.margin[0]-q.spacing[0]||0;else if("middle"===G)if(N===K)L=0>N?c+void 0:c;else if(N||K)L=0>N||0>K?L-Math.min(N,K):c-d+NaN;e.group.translate(m.x,m.y+Math.floor(L));!1!==A&&(e.minInput.style.marginTop=
e.group.translateY+"px",e.maxInput.style.marginTop=e.group.translateY+"px");e.rendered=!0}};e.prototype.getHeight=function(){var a=this.options,c=this.group,e=a.y,g=a.buttonPosition.y,b=a.inputPosition.y;if(a.height)return a.height;a=c?c.getBBox(!0).height+13+e:0;c=Math.min(b,g);if(0>b&&0>g||0<b&&0<g)a+=Math.abs(c);return a};e.prototype.titleCollision=function(a){return!(a.options.title.text||a.options.subtitle.text)};e.prototype.update=function(a){var d=this.chart;c(!0,d.options.rangeSelector,a);
this.destroy();this.init(d);d.rangeSelector.render()};e.prototype.destroy=function(){var a=this,c=a.minInput,g=a.maxInput;a.unMouseDown();a.unResize();G(a.buttons);c&&(c.onfocus=c.onblur=c.onchange=null);g&&(g.onfocus=g.onblur=g.onchange=null);h(a,function(c,b){c&&"chart"!==b&&(c instanceof E?c.destroy():c instanceof window.HTMLElement&&C(c));c!==e.prototype[b]&&(a[b]=null)},this)};return e}();m.prototype.defaultButtons=[{type:"month",count:1,text:"1m"},{type:"month",count:3,text:"3m"},{type:"month",
count:6,text:"6m"},{type:"ytd",text:"YTD"},{type:"year",count:1,text:"1y"},{type:"all",text:"All"}];l.prototype.minFromRange=function(){var a=this.range,c=a.type,e=this.max,h=this.chart.time,l=function(b,a){var d="year"===c?"FullYear":"Month",e=new h.Date(b),f=h.get(d,e);h.set(d,e,f+a);f===h.get(d,e)&&h.set("Date",e,0);return e.getTime()-b};if(n(a)){var b=e-a;var f=a}else b=e+l(e,-a.count),this.chart&&(this.chart.fixedRange=e-b);var m=g(this.dataMin,Number.MIN_VALUE);n(b)||(b=m);b<=m&&(b=m,"undefined"===
typeof f&&(f=l(b,a.count)),this.newMax=Math.min(b+f,this.dataMax));n(e)||(b=void 0);return b};B.RangeSelector||(p(r,"afterGetContainer",function(){this.options.rangeSelector.enabled&&(this.rangeSelector=new m(this))}),p(r,"beforeRender",function(){var a=this.axes,c=this.rangeSelector;c&&(n(c.deferredYTDClick)&&(c.clickButton(c.deferredYTDClick),delete c.deferredYTDClick),a.forEach(function(a){a.updateNames();a.setScale()}),this.getAxisMargins(),c.render(),a=c.options.verticalAlign,c.options.floating||
("bottom"===a?this.extraBottomMargin=!0:"middle"!==a&&(this.extraTopMargin=!0)))}),p(r,"update",function(a){var c=a.options.rangeSelector;a=this.rangeSelector;var e=this.extraBottomMargin,g=this.extraTopMargin;c&&c.enabled&&!H(a)&&(this.options.rangeSelector.enabled=!0,this.rangeSelector=new m(this));this.extraTopMargin=this.extraBottomMargin=!1;a&&(a.render(),c=c&&c.verticalAlign||a.options&&a.options.verticalAlign,a.options.floating||("bottom"===c?this.extraBottomMargin=!0:"middle"!==c&&(this.extraTopMargin=
!0)),this.extraBottomMargin!==e||this.extraTopMargin!==g)&&(this.isDirtyBox=!0)}),p(r,"render",function(){var a=this.rangeSelector;a&&!a.options.floating&&(a.render(),a=a.options.verticalAlign,"bottom"===a?this.extraBottomMargin=!0:"middle"!==a&&(this.extraTopMargin=!0))}),p(r,"getMargins",function(){var a=this.rangeSelector;a&&(a=a.getHeight(),this.extraTopMargin&&(this.plotTop+=a),this.extraBottomMargin&&(this.marginBottom+=a))}),r.prototype.callbacks.push(function(a){function d(){e=a.xAxis[0].getExtremes();
h=a.legend;f=null===g||void 0===g?void 0:g.options.verticalAlign;n(e.min)&&g.render(e.min,e.max);g&&h.display&&"top"===f&&f===h.options.verticalAlign&&(b=c(a.spacingBox),b.y="vertical"===h.options.layout?a.plotTop:b.y+g.getHeight(),h.group.placed=!1,h.align(b))}var e,g=a.rangeSelector,h,b,f;if(g){var l=p(a.xAxis[0],"afterSetExtremes",function(a){g.render(a.min,a.max)});var k=p(a,"redraw",d);d()}p(a,"destroy",function(){g&&(k(),l())})}),B.RangeSelector=m);return B.RangeSelector});K(l,"Core/Chart/StockChart.js",
[l["Core/Axis/Axis.js"],l["Core/Chart/Chart.js"],l["Core/Globals.js"],l["Core/Series/Point.js"],l["Core/Renderer/SVG/SVGRenderer.js"],l["Core/Utilities.js"]],function(l,r,B,t,E,e){var z=e.addEvent,p=e.arrayMax,a=e.arrayMin,v=e.clamp,H=e.defined,G=e.extend,C=e.find,y=e.format,A=e.getOptions,n=e.isNumber,c=e.isString,h=e.merge,g=e.pick,I=e.splat;e=B.Series;var D=e.prototype,m=D.init,k=D.processData,d=t.prototype.tooltipFormatter;B.StockChart=B.stockChart=function(a,d,e){var b=c(a)||a.nodeName,f=arguments[b?
1:0],q=f,l=f.series,k=A(),n,m=g(f.navigator&&f.navigator.enabled,k.navigator.enabled,!0);f.xAxis=I(f.xAxis||{}).map(function(a,b){return h({minPadding:0,maxPadding:0,overscroll:0,ordinal:!0,title:{text:null},labels:{overflow:"justify"},showLastLabel:!0},k.xAxis,k.xAxis&&k.xAxis[b],a,{type:"datetime",categories:null},m?{startOnTick:!1,endOnTick:!1}:null)});f.yAxis=I(f.yAxis||{}).map(function(a,b){n=g(a.opposite,!0);return h({labels:{y:-2},opposite:n,showLastLabel:!(!a.categories&&"category"!==a.type),
title:{text:null}},k.yAxis,k.yAxis&&k.yAxis[b],a)});f.series=null;f=h({chart:{panning:{enabled:!0,type:"x"},pinchType:"x"},navigator:{enabled:m},scrollbar:{enabled:g(k.scrollbar.enabled,!0)},rangeSelector:{enabled:g(k.rangeSelector.enabled,!0)},title:{text:null},tooltip:{split:g(k.tooltip.split,!0),crosshairs:!0},legend:{enabled:!1}},f,{isStock:!0});f.series=q.series=l;return b?new r(a,f,e):new r(f,d)};z(e,"setOptions",function(a){var c;this.chart.options.isStock&&(this.is("column")||this.is("columnrange")?
c={borderWidth:0,shadow:!1}:this.is("scatter")||this.is("sma")||(c={marker:{enabled:!1,radius:2}}),c&&(a.plotOptions[this.type]=h(a.plotOptions[this.type],c)))});z(l,"autoLabelAlign",function(a){var c=this.chart,d=this.options;c=c._labelPanes=c._labelPanes||{};var b=this.options.labels;this.chart.options.isStock&&"yAxis"===this.coll&&(d=d.top+","+d.height,!c[d]&&b.enabled&&(15===b.x&&(b.x=0),"undefined"===typeof b.align&&(b.align="right"),c[d]=this,a.align="right",a.preventDefault()))});z(l,"destroy",
function(){var a=this.chart,c=this.options&&this.options.top+","+this.options.height;c&&a._labelPanes&&a._labelPanes[c]===this&&delete a._labelPanes[c]});z(l,"getPlotLinePath",function(a){function d(a){var d="xAxis"===a?"yAxis":"xAxis";a=e.options[d];return n(a)?[f[d][a]]:c(a)?[f.get(a)]:b.map(function(a){return a[d]})}var e=this,b=this.isLinked&&!this.series?this.linkedParent.series:this.series,f=e.chart,h=f.renderer,q=e.left,l=e.top,k,m,p,r,t=[],y=[],z=a.translatedValue,B=a.value,A=a.force;if(f.options.isStock&&
!1!==a.acrossPanes&&"xAxis"===e.coll||"yAxis"===e.coll){a.preventDefault();y=d(e.coll);var D=e.isXAxis?f.yAxis:f.xAxis;D.forEach(function(a){if(H(a.options.id)?-1===a.options.id.indexOf("navigator"):1){var b=a.isXAxis?"yAxis":"xAxis";b=H(a.options[b])?f[b][a.options[b]]:f[b][0];e===b&&y.push(a)}});var E=y.length?[]:[e.isXAxis?f.yAxis[0]:f.xAxis[0]];y.forEach(function(a){-1!==E.indexOf(a)||C(E,function(b){return b.pos===a.pos&&b.len===a.len})||E.push(a)});var G=g(z,e.translate(B,null,null,a.old));
n(G)&&(e.horiz?E.forEach(function(a){var b;m=a.pos;r=m+a.len;k=p=Math.round(G+e.transB);"pass"!==A&&(k<q||k>q+e.width)&&(A?k=p=v(k,q,q+e.width):b=!0);b||t.push(["M",k,m],["L",p,r])}):E.forEach(function(a){var b;k=a.pos;p=k+a.len;m=r=Math.round(l+e.height-G);"pass"!==A&&(m<l||m>l+e.height)&&(A?m=r=v(m,l,l+e.height):b=!0);b||t.push(["M",k,m],["L",p,r])}));a.path=0<t.length?h.crispPolyLine(t,a.lineWidth||1):null}});E.prototype.crispPolyLine=function(a,c){for(var d=0;d<a.length;d+=2){var b=a[d],e=a[d+
1];b[1]===e[1]&&(b[1]=e[1]=Math.round(b[1])-c%2/2);b[2]===e[2]&&(b[2]=e[2]=Math.round(b[2])+c%2/2)}return a};z(l,"afterHideCrosshair",function(){this.crossLabel&&(this.crossLabel=this.crossLabel.hide())});z(l,"afterDrawCrosshair",function(a){var c,d;if(H(this.crosshair.label)&&this.crosshair.label.enabled&&this.cross){var b=this.chart,e=this.logarithmic,h=this.options.crosshair.label,k=this.horiz,l=this.opposite,q=this.left,m=this.top,p=this.crossLabel,r=h.format,t="",v="inside"===this.options.tickPosition,
z=!1!==this.crosshair.snap,A=0,B=a.e||this.cross&&this.cross.e,C=a.point;a=this.min;var D=this.max;e&&(a=e.lin2log(a),D=e.lin2log(D));e=k?"center":l?"right"===this.labelAlign?"right":"left":"left"===this.labelAlign?"left":"center";p||(p=this.crossLabel=b.renderer.label(null,null,null,h.shape||"callout").addClass("highcharts-crosshair-label"+(this.series[0]&&" highcharts-color-"+this.series[0].colorIndex)).attr({align:h.align||e,padding:g(h.padding,8),r:g(h.borderRadius,3),zIndex:2}).add(this.labelGroup),
b.styledMode||p.attr({fill:h.backgroundColor||this.series[0]&&this.series[0].color||"#666666",stroke:h.borderColor||"","stroke-width":h.borderWidth||0}).css(G({color:"#ffffff",fontWeight:"normal",fontSize:"11px",textAlign:"center"},h.style)));k?(e=z?C.plotX+q:B.chartX,m+=l?0:this.height):(e=l?this.width+q:0,m=z?C.plotY+m:B.chartY);r||h.formatter||(this.dateTime&&(t="%b %d, %Y"),r="{value"+(t?":"+t:"")+"}");t=z?C[this.isXAxis?"x":"y"]:this.toValue(k?B.chartX:B.chartY);p.attr({text:r?y(r,{value:t},
b):h.formatter.call(this,t),x:e,y:m,visibility:t<a||t>D?"hidden":"visible"});h=p.getBBox();if(n(p.y))if(k){if(v&&!l||!v&&l)m=p.y-h.height}else m=p.y-h.height/2;k?(c=q-h.x,d=q+this.width-h.x):(c="left"===this.labelAlign?q:0,d="right"===this.labelAlign?q+this.width:b.chartWidth);p.translateX<c&&(A=c-p.translateX);p.translateX+h.width>=d&&(A=-(p.translateX+h.width-d));p.attr({x:e+A,y:m,anchorX:k?e:this.opposite?0:b.chartWidth,anchorY:k?this.opposite?b.chartHeight:0:m+h.height/2})}});D.init=function(){m.apply(this,
arguments);this.setCompare(this.options.compare)};D.setCompare=function(a){this.modifyValue="value"===a||"percent"===a?function(c,d){var b=this.compareValue;return"undefined"!==typeof c&&"undefined"!==typeof b?(c="value"===a?c-b:c/b*100-(100===this.options.compareBase?0:100),d&&(d.change=c),c):0}:null;this.userOptions.compare=a;this.chart.hasRendered&&(this.isDirty=!0)};D.processData=function(a){var c,d=-1,b=!0===this.options.compareStart?0:1;k.apply(this,arguments);if(this.xAxis&&this.processedYData){var e=
this.processedXData;var g=this.processedYData;var h=g.length;this.pointArrayMap&&(d=this.pointArrayMap.indexOf(this.options.pointValKey||this.pointValKey||"y"));for(c=0;c<h-b;c++){var l=g[c]&&-1<d?g[c][d]:g[c];if(n(l)&&e[c+b]>=this.xAxis.min&&0!==l){this.compareValue=l;break}}}};z(e,"afterGetExtremes",function(c){c=c.dataExtremes;if(this.modifyValue&&c){var d=[this.modifyValue(c.dataMin),this.modifyValue(c.dataMax)];c.dataMin=a(d);c.dataMax=p(d)}});l.prototype.setCompare=function(a,c){this.isXAxis||
(this.series.forEach(function(c){c.setCompare(a)}),g(c,!0)&&this.chart.redraw())};t.prototype.tooltipFormatter=function(a){var c=this.series.chart.numberFormatter;a=a.replace("{point.change}",(0<this.change?"+":"")+c(this.change,g(this.series.tooltipOptions.changeDecimals,2)));return d.apply(this,[a])};z(e,"render",function(){var a=this.chart;if(!(a.is3d&&a.is3d()||a.polar)&&this.xAxis&&!this.xAxis.isRadial){var c=this.yAxis.len;if(this.xAxis.axisLine){var d=a.plotTop+a.plotHeight-this.yAxis.pos-
this.yAxis.len,b=Math.floor(this.xAxis.axisLine.strokeWidth()/2);0<=d&&(c-=Math.max(b-d,0))}!this.clipBox&&this.animate?(this.clipBox=h(a.clipBox),this.clipBox.width=this.xAxis.len,this.clipBox.height=c):a[this.sharedClipKey]&&(a[this.sharedClipKey].animate({width:this.xAxis.len,height:c}),a[this.sharedClipKey+"m"]&&a[this.sharedClipKey+"m"].animate({width:this.xAxis.len}))}});z(r,"update",function(a){a=a.options;"scrollbar"in a&&this.navigator&&(h(!0,this.options.scrollbar,a.scrollbar),this.navigator.update({},
!1),delete a.scrollbar)})});K(l,"masters/modules/stock.src.js",[],function(){})});
//# sourceMappingURL=stock.js.map