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

 Annotations module

 (c) 2009-2019 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(d){"object"===typeof module&&module.exports?(d["default"]=d,module.exports=d):"function"===typeof define&&define.amd?define("highcharts/modules/annotations-advanced",["highcharts"],function(u){d(u);d.Highcharts=u;return d}):d("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(d){function u(l,d,p,h){l.hasOwnProperty(d)||(l[d]=h.apply(null,p))}d=d?d._modules:{};u(d,"Extensions/Annotations/Mixins/EventEmitterMixin.js",[d["Core/Globals.js"],d["Core/Utilities.js"]],function(l,d){var k=
d.addEvent,h=d.fireEvent,w=d.objectEach,e=d.pick,g=d.removeEvent;return{addEvents:function(){var c=this,b=function(b){k(b,l.isTouchDevice?"touchstart":"mousedown",function(b){c.onMouseDown(b)})};b(this.graphic.element);(c.labels||[]).forEach(function(a){a.options.useHTML&&a.graphic.text&&b(a.graphic.text.element)});w(c.options.events,function(b,a){var f=function(f){"click"===a&&c.cancelClick||b.call(c,c.chart.pointer.normalize(f),c.target)};if(-1===(c.nonDOMEvents||[]).indexOf(a))c.graphic.on(a,f);
else k(c,a,f)});if(c.options.draggable&&(k(c,"drag",c.onDrag),!c.graphic.renderer.styledMode)){var a={cursor:{x:"ew-resize",y:"ns-resize",xy:"move"}[c.options.draggable]};c.graphic.css(a);(c.labels||[]).forEach(function(b){b.options.useHTML&&b.graphic.text&&b.graphic.text.css(a)})}c.isUpdating||h(c,"add")},removeDocEvents:function(){this.removeDrag&&(this.removeDrag=this.removeDrag());this.removeMouseUp&&(this.removeMouseUp=this.removeMouseUp())},onMouseDown:function(c){var b=this,a=b.chart.pointer;
c.preventDefault&&c.preventDefault();if(2!==c.button){c=a.normalize(c);var f=c.chartX;var n=c.chartY;b.cancelClick=!1;b.chart.hasDraggedAnnotation=!0;b.removeDrag=k(l.doc,l.isTouchDevice?"touchmove":"mousemove",function(c){b.hasDragged=!0;c=a.normalize(c);c.prevChartX=f;c.prevChartY=n;h(b,"drag",c);f=c.chartX;n=c.chartY});b.removeMouseUp=k(l.doc,l.isTouchDevice?"touchend":"mouseup",function(a){b.cancelClick=b.hasDragged;b.hasDragged=!1;b.chart.hasDraggedAnnotation=!1;h(e(b.target,b),"afterUpdate");
b.onMouseUp(a)})}},onMouseUp:function(c){var b=this.chart;c=this.target||this;var a=b.options.annotations;b=b.annotations.indexOf(c);this.removeDocEvents();a[b]=c.options},onDrag:function(c){if(this.chart.isInsidePlot(c.chartX-this.chart.plotLeft,c.chartY-this.chart.plotTop)){var b=this.mouseMoveToTranslation(c);"x"===this.options.draggable&&(b.y=0);"y"===this.options.draggable&&(b.x=0);this.points.length?this.translate(b.x,b.y):(this.shapes.forEach(function(a){a.translate(b.x,b.y)}),this.labels.forEach(function(a){a.translate(b.x,
b.y)}));this.redraw(!1)}},mouseMoveToRadians:function(c,b,a){var f=c.prevChartY-a,n=c.prevChartX-b;a=c.chartY-a;c=c.chartX-b;this.chart.inverted&&(b=n,n=f,f=b,b=c,c=a,a=b);return Math.atan2(a,c)-Math.atan2(f,n)},mouseMoveToTranslation:function(c){var b=c.chartX-c.prevChartX;c=c.chartY-c.prevChartY;if(this.chart.inverted){var a=c;c=b;b=a}return{x:b,y:c}},mouseMoveToScale:function(c,b,a){b=(c.chartX-b||1)/(c.prevChartX-b||1);c=(c.chartY-a||1)/(c.prevChartY-a||1);this.chart.inverted&&(a=c,c=b,b=a);return{x:b,
y:c}},destroy:function(){this.removeDocEvents();g(this);this.hcEvents=null}}});u(d,"Extensions/Annotations/ControlPoint.js",[d["Core/Utilities.js"],d["Extensions/Annotations/Mixins/EventEmitterMixin.js"]],function(l,d){var k=l.merge,h=l.pick;return function(){function l(e,g,c,b){this.addEvents=d.addEvents;this.graphic=void 0;this.mouseMoveToRadians=d.mouseMoveToRadians;this.mouseMoveToScale=d.mouseMoveToScale;this.mouseMoveToTranslation=d.mouseMoveToTranslation;this.onDrag=d.onDrag;this.onMouseDown=
d.onMouseDown;this.onMouseUp=d.onMouseUp;this.removeDocEvents=d.removeDocEvents;this.nonDOMEvents=["drag"];this.chart=e;this.target=g;this.options=c;this.index=h(c.index,b)}l.prototype.setVisibility=function(e){this.graphic.attr("visibility",e?"visible":"hidden");this.options.visible=e};l.prototype.render=function(){var e=this.chart,g=this.options;this.graphic=e.renderer.symbol(g.symbol,0,0,g.width,g.height).add(e.controlPointsGroup).css(g.style);this.setVisibility(g.visible);this.addEvents()};l.prototype.redraw=
function(e){this.graphic[e?"animate":"attr"](this.options.positioner.call(this,this.target))};l.prototype.destroy=function(){d.destroy.call(this);this.graphic&&(this.graphic=this.graphic.destroy());this.options=this.target=this.chart=null};l.prototype.update=function(e){var g=this.chart,c=this.target,b=this.index;e=k(!0,this.options,e);this.destroy();this.constructor(g,c,e,b);this.render(g.controlPointsGroup);this.redraw()};return l}()});u(d,"Extensions/Annotations/MockPoint.js",[d["Core/Globals.js"],
d["Core/Utilities.js"]],function(l,d){var k=d.defined,h=d.fireEvent;return function(){function d(e,g,c){this.y=this.x=this.plotY=this.plotX=this.isInside=void 0;this.mock=!0;this.series={visible:!0,chart:e,getPlotBox:l.Series.prototype.getPlotBox};this.target=g||null;this.options=c;this.applyOptions(this.getOptions())}d.fromPoint=function(e){return new d(e.series.chart,null,{x:e.x,y:e.y,xAxis:e.series.xAxis,yAxis:e.series.yAxis})};d.pointToPixels=function(e,g){var c=e.series,b=c.chart,a=e.plotX,f=
e.plotY;b.inverted&&(e.mock?(a=e.plotY,f=e.plotX):(a=b.plotWidth-e.plotY,f=b.plotHeight-e.plotX));c&&!g&&(e=c.getPlotBox(),a+=e.translateX,f+=e.translateY);return{x:a,y:f}};d.pointToOptions=function(e){return{x:e.x,y:e.y,xAxis:e.series.xAxis,yAxis:e.series.yAxis}};d.prototype.hasDynamicOptions=function(){return"function"===typeof this.options};d.prototype.getOptions=function(){return this.hasDynamicOptions()?this.options(this.target):this.options};d.prototype.applyOptions=function(e){this.command=
e.command;this.setAxis(e,"x");this.setAxis(e,"y");this.refresh()};d.prototype.setAxis=function(e,g){g+="Axis";e=e[g];var c=this.series.chart;this.series[g]=e instanceof l.Axis?e:k(e)?c[g][e]||c.get(e):null};d.prototype.toAnchor=function(){var e=[this.plotX,this.plotY,0,0];this.series.chart.inverted&&(e[0]=this.plotY,e[1]=this.plotX);return e};d.prototype.getLabelConfig=function(){return{x:this.x,y:this.y,point:this}};d.prototype.isInsidePlot=function(){var e=this.plotX,g=this.plotY,c=this.series.xAxis,
b=this.series.yAxis,a={x:e,y:g,isInsidePlot:!0};c&&(a.isInsidePlot=k(e)&&0<=e&&e<=c.len);b&&(a.isInsidePlot=a.isInsidePlot&&k(g)&&0<=g&&g<=b.len);h(this.series.chart,"afterIsInsidePlot",a);return a.isInsidePlot};d.prototype.refresh=function(){var e=this.series,g=e.xAxis;e=e.yAxis;var c=this.getOptions();g?(this.x=c.x,this.plotX=g.toPixels(c.x,!0)):(this.x=null,this.plotX=c.x);e?(this.y=c.y,this.plotY=e.toPixels(c.y,!0)):(this.y=null,this.plotY=c.y);this.isInside=this.isInsidePlot()};d.prototype.translate=
function(e,g,c,b){this.hasDynamicOptions()||(this.plotX+=c,this.plotY+=b,this.refreshOptions())};d.prototype.scale=function(e,g,c,b){if(!this.hasDynamicOptions()){var a=this.plotY*b;this.plotX=(1-c)*e+this.plotX*c;this.plotY=(1-b)*g+a;this.refreshOptions()}};d.prototype.rotate=function(e,g,c){if(!this.hasDynamicOptions()){var b=Math.cos(c);c=Math.sin(c);var a=this.plotX,f=this.plotY;a-=e;f-=g;this.plotX=a*b-f*c+e;this.plotY=a*c+f*b+g;this.refreshOptions()}};d.prototype.refreshOptions=function(){var e=
this.series,g=e.xAxis;e=e.yAxis;this.x=this.options.x=g?this.options.x=g.toValue(this.plotX,!0):this.plotX;this.y=this.options.y=e?e.toValue(this.plotY,!0):this.plotY};return d}()});u(d,"Extensions/Annotations/Mixins/ControllableMixin.js",[d["Extensions/Annotations/ControlPoint.js"],d["Extensions/Annotations/MockPoint.js"],d["Core/Tooltip.js"],d["Core/Utilities.js"]],function(l,d,p,h){var k=h.isObject,e=h.isString,g=h.merge,c=h.splat;return{init:function(b,a,c){this.annotation=b;this.chart=b.chart;
this.options=a;this.points=[];this.controlPoints=[];this.index=c;this.linkPoints();this.addControlPoints()},attr:function(){this.graphic.attr.apply(this.graphic,arguments)},getPointsOptions:function(){var b=this.options;return b.points||b.point&&c(b.point)},attrsFromOptions:function(b){var a=this.constructor.attrsMap,c={},n,q=this.chart.styledMode;for(n in b){var e=a[n];!e||q&&-1!==["fill","stroke","stroke-width"].indexOf(e)||(c[e]=b[n])}return c},anchor:function(b){var a=b.series.getPlotBox();b=
b.mock?b.toAnchor():p.prototype.getAnchor.call({chart:b.series.chart},b);b={x:b[0]+(this.options.x||0),y:b[1]+(this.options.y||0),height:b[2]||0,width:b[3]||0};return{relativePosition:b,absolutePosition:g(b,{x:b.x+a.translateX,y:b.y+a.translateY})}},point:function(b,a){if(b&&b.series)return b;a&&null!==a.series||(k(b)?a=new d(this.chart,this,b):e(b)?a=this.chart.get(b)||null:"function"===typeof b&&(a=b.call(a,this),a=a.series?a:new d(this.chart,this,b)));return a},linkPoints:function(){var b=this.getPointsOptions(),
a=this.points,c=b&&b.length||0,n;for(n=0;n<c;n++){var q=this.point(b[n],a[n]);if(!q){a.length=0;return}q.mock&&q.refresh();a[n]=q}return a},addControlPoints:function(){var b=this.options.controlPoints;(b||[]).forEach(function(a,c){a=g(this.options.controlPointOptions,a);a.index||(a.index=c);b[c]=a;this.controlPoints.push(new l(this.chart,this,a))},this)},shouldBeDrawn:function(){return!!this.points.length},render:function(b){this.controlPoints.forEach(function(b){b.render()})},redraw:function(b){this.controlPoints.forEach(function(a){a.redraw(b)})},
transform:function(b,a,c,n,q){if(this.chart.inverted){var f=a;a=c;c=f}this.points.forEach(function(f,e){this.transformPoint(b,a,c,n,q,e)},this)},transformPoint:function(b,a,c,n,q,e){var f=this.points[e];f.mock||(f=this.points[e]=d.fromPoint(f));f[b](a,c,n,q)},translate:function(b,a){this.transform("translate",null,null,b,a)},translatePoint:function(b,a,c){this.transformPoint("translate",null,null,b,a,c)},translateShape:function(b,a){var c=this.annotation.chart,n=this.annotation.userOptions,q=c.annotations.indexOf(this.annotation);
c=c.options.annotations[q];this.translatePoint(b,a,0);c[this.collection][this.index].point=this.options.point;n[this.collection][this.index].point=this.options.point},rotate:function(b,a,c){this.transform("rotate",b,a,c)},scale:function(b,a,c,n){this.transform("scale",b,a,c,n)},setControlPointsVisibility:function(b){this.controlPoints.forEach(function(a){a.setVisibility(b)})},destroy:function(){this.graphic&&(this.graphic=this.graphic.destroy());this.tracker&&(this.tracker=this.tracker.destroy());
this.controlPoints.forEach(function(b){b.destroy()});this.options=this.controlPoints=this.points=this.chart=null;this.annotation&&(this.annotation=null)},update:function(b){var a=this.annotation;b=g(!0,this.options,b);var c=this.graphic.parentGroup;this.destroy();this.constructor(a,b);this.render(c);this.redraw()}}});u(d,"Extensions/Annotations/Mixins/MarkerMixin.js",[d["Core/Chart/Chart.js"],d["Core/Renderer/SVG/SVGRenderer.js"],d["Core/Utilities.js"]],function(l,d,p){function h(b){return function(a){this.attr(b,
"url(#"+a+")")}}var k=p.addEvent,e=p.defined,g=p.merge,c=p.objectEach,b=p.uniqueKey,a={arrow:{tagName:"marker",render:!1,id:"arrow",refY:5,refX:9,markerWidth:10,markerHeight:10,children:[{tagName:"path",d:"M 0 0 L 10 5 L 0 10 Z",strokeWidth:0}]},"reverse-arrow":{tagName:"marker",render:!1,id:"reverse-arrow",refY:5,refX:1,markerWidth:10,markerHeight:10,children:[{tagName:"path",d:"M 0 5 L 10 0 L 10 10 Z",strokeWidth:0}]}};d.prototype.addMarker=function(b,a){var c={id:b},f={stroke:a.color||"none",fill:a.color||
"rgba(0, 0, 0, 0.75)"};c.children=a.children.map(function(b){return g(f,b)});a=this.definition(g(!0,{markerWidth:20,markerHeight:20,refX:0,refY:0,orient:"auto"},a,c));a.id=b;return a};d={markerEndSetter:h("marker-end"),markerStartSetter:h("marker-start"),setItemMarkers:function(a){var c=a.options,f=a.chart,d=f.options.defs,m=c.fill,r=e(m)&&"none"!==m?m:c.stroke;["markerStart","markerEnd"].forEach(function(n){var m=c[n],q;if(m){for(q in d){var e=d[q];if(m===e.id&&"marker"===e.tagName){var l=e;break}}l&&
(m=a[n]=f.renderer.addMarker((c.id||b())+"-"+l.id,g(l,{color:r})),a.attr(n,m.attr("id")))}})}};k(l,"afterGetContainer",function(){this.options.defs=g(a,this.options.defs||{});c(this.options.defs,function(b){"marker"===b.tagName&&!1!==b.render&&this.renderer.addMarker(b.id,b)},this)});return d});u(d,"Extensions/Annotations/Controllables/ControllablePath.js",[d["Extensions/Annotations/Mixins/ControllableMixin.js"],d["Core/Globals.js"],d["Extensions/Annotations/Mixins/MarkerMixin.js"],d["Core/Utilities.js"]],
function(d,k,p,h){var l=h.extend,e="rgba(192,192,192,"+(k.svg?.0001:.002)+")";return function(){function g(c,b,a){this.addControlPoints=d.addControlPoints;this.anchor=d.anchor;this.attr=d.attr;this.attrsFromOptions=d.attrsFromOptions;this.destroy=d.destroy;this.getPointsOptions=d.getPointsOptions;this.init=d.init;this.linkPoints=d.linkPoints;this.point=d.point;this.rotate=d.rotate;this.scale=d.scale;this.setControlPointsVisibility=d.setControlPointsVisibility;this.setMarkers=p.setItemMarkers;this.transform=
d.transform;this.transformPoint=d.transformPoint;this.translate=d.translate;this.translatePoint=d.translatePoint;this.translateShape=d.translateShape;this.update=d.update;this.type="path";this.init(c,b,a);this.collection="shapes"}g.prototype.toD=function(){var c=this.options.d;if(c)return"function"===typeof c?c.call(this):c;c=this.points;var b=c.length,a=b,f=c[0],n=a&&this.anchor(f).absolutePosition,q=0,e=[];if(n)for(e.push(["M",n.x,n.y]);++q<b&&a;)f=c[q],a=f.command||"L",n=this.anchor(f).absolutePosition,
"M"===a?e.push([a,n.x,n.y]):"L"===a?e.push([a,n.x,n.y]):"Z"===a&&e.push([a]),a=f.series.visible;return a?this.chart.renderer.crispLine(e,this.graphic.strokeWidth()):null};g.prototype.shouldBeDrawn=function(){return d.shouldBeDrawn.call(this)||!!this.options.d};g.prototype.render=function(c){var b=this.options,a=this.attrsFromOptions(b);this.graphic=this.annotation.chart.renderer.path([["M",0,0]]).attr(a).add(c);b.className&&this.graphic.addClass(b.className);this.tracker=this.annotation.chart.renderer.path([["M",
0,0]]).addClass("highcharts-tracker-line").attr({zIndex:2}).add(c);this.annotation.chart.styledMode||this.tracker.attr({"stroke-linejoin":"round",stroke:e,fill:e,"stroke-width":this.graphic.strokeWidth()+2*b.snap});d.render.call(this);l(this.graphic,{markerStartSetter:p.markerStartSetter,markerEndSetter:p.markerEndSetter});this.setMarkers(this)};g.prototype.redraw=function(c){var b=this.toD(),a=c?"animate":"attr";b?(this.graphic[a]({d:b}),this.tracker[a]({d:b})):(this.graphic.attr({d:"M 0 -9000000000"}),
this.tracker.attr({d:"M 0 -9000000000"}));this.graphic.placed=this.tracker.placed=!!b;d.redraw.call(this,c)};g.attrsMap={dashStyle:"dashstyle",strokeWidth:"stroke-width",stroke:"stroke",fill:"fill",zIndex:"zIndex"};return g}()});u(d,"Extensions/Annotations/Controllables/ControllableRect.js",[d["Extensions/Annotations/Mixins/ControllableMixin.js"],d["Extensions/Annotations/Controllables/ControllablePath.js"],d["Core/Utilities.js"]],function(d,k,p){var l=p.merge;return function(){function h(e,g,c){this.addControlPoints=
d.addControlPoints;this.anchor=d.anchor;this.attr=d.attr;this.attrsFromOptions=d.attrsFromOptions;this.destroy=d.destroy;this.getPointsOptions=d.getPointsOptions;this.init=d.init;this.linkPoints=d.linkPoints;this.point=d.point;this.rotate=d.rotate;this.scale=d.scale;this.setControlPointsVisibility=d.setControlPointsVisibility;this.shouldBeDrawn=d.shouldBeDrawn;this.transform=d.transform;this.transformPoint=d.transformPoint;this.translatePoint=d.translatePoint;this.translateShape=d.translateShape;
this.update=d.update;this.type="rect";this.translate=d.translateShape;this.init(e,g,c);this.collection="shapes"}h.prototype.render=function(e){var g=this.attrsFromOptions(this.options);this.graphic=this.annotation.chart.renderer.rect(0,-9E9,0,0).attr(g).add(e);d.render.call(this)};h.prototype.redraw=function(e){var g=this.anchor(this.points[0]).absolutePosition;if(g)this.graphic[e?"animate":"attr"]({x:g.x,y:g.y,width:this.options.width,height:this.options.height});else this.attr({x:0,y:-9E9});this.graphic.placed=
!!g;d.redraw.call(this,e)};h.attrsMap=l(k.attrsMap,{width:"width",height:"height"});return h}()});u(d,"Extensions/Annotations/Controllables/ControllableCircle.js",[d["Extensions/Annotations/Mixins/ControllableMixin.js"],d["Extensions/Annotations/Controllables/ControllablePath.js"],d["Core/Utilities.js"]],function(d,k,p){var l=p.merge;return function(){function h(e,g,c){this.addControlPoints=d.addControlPoints;this.anchor=d.anchor;this.attr=d.attr;this.attrsFromOptions=d.attrsFromOptions;this.destroy=
d.destroy;this.getPointsOptions=d.getPointsOptions;this.init=d.init;this.linkPoints=d.linkPoints;this.point=d.point;this.rotate=d.rotate;this.scale=d.scale;this.setControlPointsVisibility=d.setControlPointsVisibility;this.shouldBeDrawn=d.shouldBeDrawn;this.transform=d.transform;this.transformPoint=d.transformPoint;this.translatePoint=d.translatePoint;this.translateShape=d.translateShape;this.update=d.update;this.type="circle";this.translate=d.translateShape;this.init(e,g,c);this.collection="shapes"}
h.prototype.render=function(e){var g=this.attrsFromOptions(this.options);this.graphic=this.annotation.chart.renderer.circle(0,-9E9,0).attr(g).add(e);d.render.call(this)};h.prototype.redraw=function(e){var g=this.anchor(this.points[0]).absolutePosition;if(g)this.graphic[e?"animate":"attr"]({x:g.x,y:g.y,r:this.options.r});else this.graphic.attr({x:0,y:-9E9});this.graphic.placed=!!g;d.redraw.call(this,e)};h.prototype.setRadius=function(d){this.options.r=d};h.attrsMap=l(k.attrsMap,{r:"r"});return h}()});
u(d,"Extensions/Annotations/Controllables/ControllableLabel.js",[d["Extensions/Annotations/Mixins/ControllableMixin.js"],d["Extensions/Annotations/MockPoint.js"],d["Core/Renderer/SVG/SVGRenderer.js"],d["Core/Tooltip.js"],d["Core/Utilities.js"]],function(d,k,p,h,w){var e=w.extend,g=w.format,c=w.isNumber,b=w.pick;w=function(){function a(b,a,c){this.addControlPoints=d.addControlPoints;this.attr=d.attr;this.attrsFromOptions=d.attrsFromOptions;this.destroy=d.destroy;this.getPointsOptions=d.getPointsOptions;
this.init=d.init;this.linkPoints=d.linkPoints;this.point=d.point;this.rotate=d.rotate;this.scale=d.scale;this.setControlPointsVisibility=d.setControlPointsVisibility;this.shouldBeDrawn=d.shouldBeDrawn;this.transform=d.transform;this.transformPoint=d.transformPoint;this.translateShape=d.translateShape;this.update=d.update;this.init(b,a,c);this.collection="labels"}a.alignedPosition=function(b,a){var c=b.align,f=b.verticalAlign,n=(a.x||0)+(b.x||0),d=(a.y||0)+(b.y||0),e,g;"right"===c?e=1:"center"===c&&
(e=2);e&&(n+=(a.width-(b.width||0))/e);"bottom"===f?g=1:"middle"===f&&(g=2);g&&(d+=(a.height-(b.height||0))/g);return{x:Math.round(n),y:Math.round(d)}};a.justifiedOptions=function(b,a,c,d){var f=c.align,n=c.verticalAlign,e=a.box?0:a.padding||0,q=a.getBBox();a={align:f,verticalAlign:n,x:c.x,y:c.y,width:a.width,height:a.height};c=d.x-b.plotLeft;var g=d.y-b.plotTop;d=c+e;0>d&&("right"===f?a.align="left":a.x=-d);d=c+q.width-e;d>b.plotWidth&&("left"===f?a.align="right":a.x=b.plotWidth-d);d=g+e;0>d&&("bottom"===
n?a.verticalAlign="top":a.y=-d);d=g+q.height-e;d>b.plotHeight&&("top"===n?a.verticalAlign="bottom":a.y=b.plotHeight-d);return a};a.prototype.translatePoint=function(b,a){d.translatePoint.call(this,b,a,0)};a.prototype.translate=function(b,a){var c=this.annotation.chart,f=this.annotation.userOptions,n=c.annotations.indexOf(this.annotation);n=c.options.annotations[n];c.inverted&&(c=b,b=a,a=c);this.options.x+=b;this.options.y+=a;n[this.collection][this.index].x=this.options.x;n[this.collection][this.index].y=
this.options.y;f[this.collection][this.index].x=this.options.x;f[this.collection][this.index].y=this.options.y};a.prototype.render=function(b){var c=this.options,f=this.attrsFromOptions(c),e=c.style;this.graphic=this.annotation.chart.renderer.label("",0,-9999,c.shape,null,null,c.useHTML,null,"annotation-label").attr(f).add(b);this.annotation.chart.styledMode||("contrast"===e.color&&(e.color=this.annotation.chart.renderer.getContrast(-1<a.shapesWithoutBackground.indexOf(c.shape)?"#FFFFFF":c.backgroundColor)),
this.graphic.css(c.style).shadow(c.shadow));c.className&&this.graphic.addClass(c.className);this.graphic.labelrank=c.labelrank;d.render.call(this)};a.prototype.redraw=function(b){var a=this.options,c=this.text||a.format||a.text,f=this.graphic,e=this.points[0];f.attr({text:c?g(c,e.getLabelConfig(),this.annotation.chart):a.formatter.call(e,this)});a=this.anchor(e);(c=this.position(a))?(f.alignAttr=c,c.anchorX=a.absolutePosition.x,c.anchorY=a.absolutePosition.y,f[b?"animate":"attr"](c)):f.attr({x:0,
y:-9999});f.placed=!!c;d.redraw.call(this,b)};a.prototype.anchor=function(b){var a=d.anchor.apply(this,arguments),c=this.options.x||0,f=this.options.y||0;a.absolutePosition.x-=c;a.absolutePosition.y-=f;a.relativePosition.x-=c;a.relativePosition.y-=f;return a};a.prototype.position=function(c){var f=this.graphic,d=this.annotation.chart,g=this.points[0],m=this.options,r=c.absolutePosition,t=c.relativePosition;if(c=g.series.visible&&k.prototype.isInsidePlot.call(g)){if(m.distance)var y=h.prototype.getPosition.call({chart:d,
distance:b(m.distance,16)},f.width,f.height,{plotX:t.x,plotY:t.y,negative:g.negative,ttBelow:g.ttBelow,h:t.height||t.width});else m.positioner?y=m.positioner.call(this):(g={x:r.x,y:r.y,width:0,height:0},y=a.alignedPosition(e(m,{width:f.width,height:f.height}),g),"justify"===this.options.overflow&&(y=a.alignedPosition(a.justifiedOptions(d,f,m,y),g)));m.crop&&(m=y.x-d.plotLeft,g=y.y-d.plotTop,c=d.isInsidePlot(m,g)&&d.isInsidePlot(m+f.width,g+f.height))}return c?y:null};a.attrsMap={backgroundColor:"fill",
borderColor:"stroke",borderWidth:"stroke-width",zIndex:"zIndex",borderRadius:"r",padding:"padding"};a.shapesWithoutBackground=["connector"];return a}();p.prototype.symbols.connector=function(a,b,d,e,g){var f=g&&g.anchorX;g=g&&g.anchorY;var n=d/2;if(c(f)&&c(g)){var q=[["M",f,g]];var h=b-g;0>h&&(h=-e-h);h<d&&(n=f<a+d/2?h:d-h);g>b+e?q.push(["L",a+n,b+e]):g<b?q.push(["L",a+n,b]):f<a?q.push(["L",a,b+e/2]):f>a+d&&q.push(["L",a+d,b+e/2])}return q||[]};return w});u(d,"Extensions/Annotations/Controllables/ControllableImage.js",
[d["Extensions/Annotations/Controllables/ControllableLabel.js"],d["Extensions/Annotations/Mixins/ControllableMixin.js"]],function(d,k){return function(){function l(d,l,e){this.addControlPoints=k.addControlPoints;this.anchor=k.anchor;this.attr=k.attr;this.attrsFromOptions=k.attrsFromOptions;this.destroy=k.destroy;this.getPointsOptions=k.getPointsOptions;this.init=k.init;this.linkPoints=k.linkPoints;this.point=k.point;this.rotate=k.rotate;this.scale=k.scale;this.setControlPointsVisibility=k.setControlPointsVisibility;
this.shouldBeDrawn=k.shouldBeDrawn;this.transform=k.transform;this.transformPoint=k.transformPoint;this.translatePoint=k.translatePoint;this.translateShape=k.translateShape;this.update=k.update;this.type="image";this.translate=k.translateShape;this.init(d,l,e);this.collection="shapes"}l.prototype.render=function(d){var h=this.attrsFromOptions(this.options),e=this.options;this.graphic=this.annotation.chart.renderer.image(e.src,0,-9E9,e.width,e.height).attr(h).add(d);this.graphic.width=e.width;this.graphic.height=
e.height;k.render.call(this)};l.prototype.redraw=function(h){var l=this.anchor(this.points[0]);if(l=d.prototype.position.call(this,l))this.graphic[h?"animate":"attr"]({x:l.x,y:l.y});else this.graphic.attr({x:0,y:-9E9});this.graphic.placed=!!l;k.redraw.call(this,h)};l.attrsMap={width:"width",height:"height",zIndex:"zIndex"};return l}()});u(d,"Extensions/Annotations/Annotations.js",[d["Core/Chart/Chart.js"],d["Extensions/Annotations/Mixins/ControllableMixin.js"],d["Extensions/Annotations/Controllables/ControllableRect.js"],
d["Extensions/Annotations/Controllables/ControllableCircle.js"],d["Extensions/Annotations/Controllables/ControllablePath.js"],d["Extensions/Annotations/Controllables/ControllableImage.js"],d["Extensions/Annotations/Controllables/ControllableLabel.js"],d["Extensions/Annotations/ControlPoint.js"],d["Extensions/Annotations/Mixins/EventEmitterMixin.js"],d["Core/Globals.js"],d["Extensions/Annotations/MockPoint.js"],d["Core/Pointer.js"],d["Core/Utilities.js"]],function(d,k,p,h,w,e,g,c,b,a,f,n,q){d=d.prototype;
var l=q.addEvent,m=q.defined,r=q.destroyObjectProperties,t=q.erase,y=q.extend,B=q.find,x=q.fireEvent,A=q.getDeferredAnimation,v=q.merge,z=q.pick,D=q.splat;q=q.wrap;var C=function(){function a(a,b){this.annotation=void 0;this.coll="annotations";this.shapesGroup=this.labelsGroup=this.labelCollector=this.group=this.graphic=this.animationConfig=this.collection=void 0;this.chart=a;this.points=[];this.controlPoints=[];this.coll="annotations";this.labels=[];this.shapes=[];this.options=v(this.defaultOptions,
b);this.userOptions=b;b=this.getLabelsAndShapesOptions(this.options,b);this.options.labels=b.labels;this.options.shapes=b.shapes;this.init(a,this.options)}a.prototype.init=function(){var a=this.chart,b=this.options.animation;this.linkPoints();this.addControlPoints();this.addShapes();this.addLabels();this.setLabelCollector();this.animationConfig=A(a,b)};a.prototype.getLabelsAndShapesOptions=function(a,b){var c={};["labels","shapes"].forEach(function(f){a[f]&&(c[f]=D(b[f]).map(function(b,c){return v(a[f][c],
b)}))});return c};a.prototype.addShapes=function(){(this.options.shapes||[]).forEach(function(a,b){a=this.initShape(a,b);v(!0,this.options.shapes[b],a.options)},this)};a.prototype.addLabels=function(){(this.options.labels||[]).forEach(function(a,b){a=this.initLabel(a,b);v(!0,this.options.labels[b],a.options)},this)};a.prototype.addClipPaths=function(){this.setClipAxes();this.clipXAxis&&this.clipYAxis&&(this.clipRect=this.chart.renderer.clipRect(this.getClipBox()))};a.prototype.setClipAxes=function(){var a=
this.chart.xAxis,b=this.chart.yAxis,c=(this.options.labels||[]).concat(this.options.shapes||[]).reduce(function(c,f){return[a[f&&f.point&&f.point.xAxis]||c[0],b[f&&f.point&&f.point.yAxis]||c[1]]},[]);this.clipXAxis=c[0];this.clipYAxis=c[1]};a.prototype.getClipBox=function(){if(this.clipXAxis&&this.clipYAxis)return{x:this.clipXAxis.left,y:this.clipYAxis.top,width:this.clipXAxis.width,height:this.clipYAxis.height}};a.prototype.setLabelCollector=function(){var a=this;a.labelCollector=function(){return a.labels.reduce(function(a,
b){b.options.allowOverlap||a.push(b.graphic);return a},[])};a.chart.labelCollectors.push(a.labelCollector)};a.prototype.setOptions=function(a){this.options=v(this.defaultOptions,a)};a.prototype.redraw=function(a){this.linkPoints();this.graphic||this.render();this.clipRect&&this.clipRect.animate(this.getClipBox());this.redrawItems(this.shapes,a);this.redrawItems(this.labels,a);k.redraw.call(this,a)};a.prototype.redrawItems=function(a,b){for(var c=a.length;c--;)this.redrawItem(a[c],b)};a.prototype.renderItems=
function(a){for(var b=a.length;b--;)this.renderItem(a[b])};a.prototype.render=function(){var a=this.chart.renderer;this.graphic=a.g("annotation").attr({opacity:0,zIndex:this.options.zIndex,visibility:this.options.visible?"visible":"hidden"}).add();this.shapesGroup=a.g("annotation-shapes").add(this.graphic).clip(this.chart.plotBoxClip);this.labelsGroup=a.g("annotation-labels").attr({translateX:0,translateY:0}).add(this.graphic);this.addClipPaths();this.clipRect&&this.graphic.clip(this.clipRect);this.renderItems(this.shapes);
this.renderItems(this.labels);this.addEvents();k.render.call(this)};a.prototype.setVisibility=function(a){var b=this.options;a=z(a,!b.visible);this.graphic.attr("visibility",a?"visible":"hidden");a||this.setControlPointsVisibility(!1);b.visible=a};a.prototype.setControlPointsVisibility=function(a){var b=function(b){b.setControlPointsVisibility(a)};k.setControlPointsVisibility.call(this,a);this.shapes.forEach(b);this.labels.forEach(b)};a.prototype.destroy=function(){var a=this.chart,c=function(a){a.destroy()};
this.labels.forEach(c);this.shapes.forEach(c);this.clipYAxis=this.clipXAxis=null;t(a.labelCollectors,this.labelCollector);b.destroy.call(this);k.destroy.call(this);r(this,a)};a.prototype.remove=function(){return this.chart.removeAnnotation(this)};a.prototype.update=function(a,b){var c=this.chart,f=this.getLabelsAndShapesOptions(this.userOptions,a),d=c.annotations.indexOf(this);a=v(!0,this.userOptions,a);a.labels=f.labels;a.shapes=f.shapes;this.destroy();this.constructor(c,a);c.options.annotations[d]=
a;this.isUpdating=!0;z(b,!0)&&c.redraw();x(this,"afterUpdate");this.isUpdating=!1};a.prototype.initShape=function(b,c){b=v(this.options.shapeOptions,{controlPointOptions:this.options.controlPointOptions},b);c=new a.shapesMap[b.type](this,b,c);c.itemType="shape";this.shapes.push(c);return c};a.prototype.initLabel=function(a,b){a=v(this.options.labelOptions,{controlPointOptions:this.options.controlPointOptions},a);b=new g(this,a,b);b.itemType="label";this.labels.push(b);return b};a.prototype.redrawItem=
function(a,b){a.linkPoints();a.shouldBeDrawn()?(a.graphic||this.renderItem(a),a.redraw(z(b,!0)&&a.graphic.placed),a.points.length&&this.adjustVisibility(a)):this.destroyItem(a)};a.prototype.adjustVisibility=function(a){var b=!1,c=a.graphic;a.points.forEach(function(a){!1!==a.series.visible&&!1!==a.visible&&(b=!0)});b?"hidden"===c.visibility&&c.show():c.hide()};a.prototype.destroyItem=function(a){t(this[a.itemType+"s"],a);a.destroy()};a.prototype.renderItem=function(a){a.render("label"===a.itemType?
this.labelsGroup:this.shapesGroup)};a.ControlPoint=c;a.MockPoint=f;a.shapesMap={rect:p,circle:h,path:w,image:e};a.types={};return a}();v(!0,C.prototype,k,b,v(C.prototype,{nonDOMEvents:["add","afterUpdate","drag","remove"],defaultOptions:{visible:!0,animation:{},draggable:"xy",labelOptions:{align:"center",allowOverlap:!1,backgroundColor:"rgba(0, 0, 0, 0.75)",borderColor:"black",borderRadius:3,borderWidth:1,className:"",crop:!1,formatter:function(){return m(this.y)?this.y:"Annotation label"},includeInDataExport:!0,
overflow:"justify",padding:5,shadow:!1,shape:"callout",style:{fontSize:"11px",fontWeight:"normal",color:"contrast"},useHTML:!1,verticalAlign:"bottom",x:0,y:-16},shapeOptions:{stroke:"rgba(0, 0, 0, 0.75)",strokeWidth:1,fill:"rgba(0, 0, 0, 0.75)",r:0,snap:2},controlPointOptions:{symbol:"circle",width:10,height:10,style:{stroke:"black","stroke-width":2,fill:"white"},visible:!1,events:{}},events:{},zIndex:6}}));a.extendAnnotation=function(a,b,c,f){b=b||C;v(!0,a.prototype,b.prototype,c);a.prototype.defaultOptions=
v(a.prototype.defaultOptions,f||{})};y(d,{initAnnotation:function(a){a=new (C.types[a.type]||C)(this,a);this.annotations.push(a);return a},addAnnotation:function(a,b){a=this.initAnnotation(a);this.options.annotations.push(a.options);z(b,!0)&&(a.redraw(),a.graphic.attr({opacity:1}));return a},removeAnnotation:function(a){var b=this.annotations,c="annotations"===a.coll?a:B(b,function(b){return b.options.id===a});c&&(x(c,"remove"),t(this.options.annotations,c.options),t(b,c),c.destroy())},drawAnnotations:function(){this.plotBoxClip.attr(this.plotBox);
this.annotations.forEach(function(a){a.redraw();a.graphic.animate({opacity:1},a.animationConfig)})}});d.collectionsWithUpdate.push("annotations");d.collectionsWithInit.annotations=[d.addAnnotation];d.callbacks.push(function(a){a.annotations=[];a.options.annotations||(a.options.annotations=[]);a.plotBoxClip=this.renderer.clipRect(this.plotBox);a.controlPointsGroup=a.renderer.g("control-points").attr({zIndex:99}).clip(a.plotBoxClip).add();a.options.annotations.forEach(function(b,c){b=a.initAnnotation(b);
a.options.annotations[c]=b.options});a.drawAnnotations();l(a,"redraw",a.drawAnnotations);l(a,"destroy",function(){a.plotBoxClip.destroy();a.controlPointsGroup.destroy()});l(a,"exportData",function(b){var c,f,d,n,e,m,g,r,q=a.annotations,t=(this.options.exporting&&this.options.exporting.csv||{}).columnHeaderFormatter,x=!b.dataRows[1].xValues,h=null===(f=null===(c=a.options.lang)||void 0===c?void 0:c.exportData)||void 0===f?void 0:f.annotationHeader;c=function(a){if(t){var b=t(a);if(!1!==b)return b}b=
h+" "+a;return x?{columnTitle:b,topLevelColumnTitle:b}:b};var v=b.dataRows[0].length,A=null===(e=null===(n=null===(d=a.options.exporting)||void 0===d?void 0:d.csv)||void 0===n?void 0:n.annotations)||void 0===e?void 0:e.itemDelimiter,l=null===(r=null===(g=null===(m=a.options.exporting)||void 0===m?void 0:m.csv)||void 0===g?void 0:g.annotations)||void 0===r?void 0:r.join;q.forEach(function(a){a.options.labelOptions.includeInDataExport&&a.labels.forEach(function(a){if(a.options.text){var c=a.options.text;
a.points.forEach(function(a){var f=a.x,d=a.series.xAxis?a.series.xAxis.options.index:-1,n=!1;if(-1===d){a=b.dataRows[0].length;for(var e=Array(a),m=0;m<a;++m)e[m]="";e.push(c);e.xValues=[];e.xValues[d]=f;b.dataRows.push(e);n=!0}n||b.dataRows.forEach(function(a,b){!n&&a.xValues&&void 0!==d&&f===a.xValues[d]&&(l&&a.length>v?a[a.length-1]+=A+c:a.push(c),n=!0)});if(!n){a=b.dataRows[0].length;e=Array(a);for(m=0;m<a;++m)e[m]="";e[0]=f;e.push(c);e.xValues=[];void 0!==d&&(e.xValues[d]=f);b.dataRows.push(e)}})}})});
var z=0;b.dataRows.forEach(function(a){z=Math.max(z,a.length)});d=z-b.dataRows[0].length;for(n=0;n<d;n++)e=c(n+1),x?(b.dataRows[0].push(e.topLevelColumnTitle),b.dataRows[1].push(e.columnTitle)):b.dataRows[0].push(e)})});q(n.prototype,"onContainerMouseDown",function(a){this.chart.hasDraggedAnnotation||a.apply(this,Array.prototype.slice.call(arguments,1))});return a.Annotation=C});u(d,"Extensions/Annotations/Types/BasicAnnotation.js",[d["Extensions/Annotations/Annotations.js"],d["Extensions/Annotations/MockPoint.js"],
d["Core/Utilities.js"]],function(d,k,p){var h=this&&this.__extends||function(){var d=function(e,c){d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(b,a){for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c])};return d(e,c)};return function(e,c){function b(){this.constructor=e}d(e,c);e.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)}}();p=p.merge;var l=function(e){function g(c,b){return e.call(this,c,b)||this}h(g,e);g.prototype.addControlPoints=
function(){var c=this.options,b=g.basicControlPoints,a=this.basicType;(c.labels||c.shapes).forEach(function(c){c.controlPoints=b[a]})};g.prototype.init=function(){var c=this.options;c.shapes?(delete c.labelOptions,this.basicType="circle"===c.shapes[0].type?"circle":"rectangle"):(delete c.shapes,this.basicType="label");d.prototype.init.apply(this,arguments)};g.basicControlPoints={label:[{symbol:"triangle-down",positioner:function(c){if(!c.graphic.placed)return{x:0,y:-9E7};c=k.pointToPixels(c.points[0]);
return{x:c.x-this.graphic.width/2,y:c.y-this.graphic.height/2}},events:{drag:function(c,b){c=this.mouseMoveToTranslation(c);b.translatePoint(c.x,c.y);b.annotation.userOptions.labels[0].point=b.options.point;b.redraw(!1)}}},{symbol:"square",positioner:function(c){return c.graphic.placed?{x:c.graphic.alignAttr.x-this.graphic.width/2,y:c.graphic.alignAttr.y-this.graphic.height/2}:{x:0,y:-9E7}},events:{drag:function(c,b){c=this.mouseMoveToTranslation(c);b.translate(c.x,c.y);b.annotation.userOptions.labels[0].point=
b.options.point;b.redraw(!1)}}}],rectangle:[{positioner:function(c){c=k.pointToPixels(c.points[2]);return{x:c.x-4,y:c.y-4}},events:{drag:function(c,b){var a=b.annotation,f=this.chart.pointer.getCoordinates(c);c=f.xAxis[0].value;f=f.yAxis[0].value;var d=b.options.points;d[1].x=c;d[2].x=c;d[2].y=f;d[3].y=f;a.userOptions.shapes[0].points=b.options.points;a.redraw(!1)}}}],circle:[{positioner:function(c){var b=k.pointToPixels(c.points[0]);c=c.options.r;return{x:b.x+c*Math.cos(Math.PI/4)-this.graphic.width/
2,y:b.y+c*Math.sin(Math.PI/4)-this.graphic.height/2}},events:{drag:function(c,b){var a=b.annotation;c=this.mouseMoveToTranslation(c);b.setRadius(Math.max(b.options.r+c.y/Math.sin(Math.PI/4),5));a.userOptions.shapes[0].r=b.options.r;a.userOptions.shapes[0].point=b.options.point;b.redraw(!1)}}}]};return g}(d);l.prototype.defaultOptions=p(d.prototype.defaultOptions,{});return d.types.basicAnnotation=l});u(d,"Extensions/Annotations/Types/CrookedLine.js",[d["Extensions/Annotations/Annotations.js"],d["Extensions/Annotations/ControlPoint.js"],
d["Extensions/Annotations/MockPoint.js"],d["Core/Utilities.js"]],function(d,k,p,h){var l=this&&this.__extends||function(){var d=function(c,b){d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};return d(c,b)};return function(c,b){function a(){this.constructor=c}d(c,b);c.prototype=null===b?Object.create(b):(a.prototype=b.prototype,new a)}}(),e=h.merge;h=function(d){function c(b,a){return d.call(this,b,
a)||this}l(c,d);c.prototype.setClipAxes=function(){this.clipXAxis=this.chart.xAxis[this.options.typeOptions.xAxis];this.clipYAxis=this.chart.yAxis[this.options.typeOptions.yAxis]};c.prototype.getPointsOptions=function(){var b=this.options.typeOptions;return(b.points||[]).map(function(a){a.xAxis=b.xAxis;a.yAxis=b.yAxis;return a})};c.prototype.getControlPointsOptions=function(){return this.getPointsOptions()};c.prototype.addControlPoints=function(){this.getControlPointsOptions().forEach(function(b,
a){a=new k(this.chart,this,e(this.options.controlPointOptions,b.controlPoint),a);this.controlPoints.push(a);b.controlPoint=a.options},this)};c.prototype.addShapes=function(){var b=this.options.typeOptions,a=this.initShape(e(b.line,{type:"path",points:this.points.map(function(a,b){return function(a){return a.annotation.points[b]}})}),!1);b.line=a.options};return c}(d);h.prototype.defaultOptions=e(d.prototype.defaultOptions,{typeOptions:{xAxis:0,yAxis:0,line:{fill:"none"}},controlPointOptions:{positioner:function(d){var c=
this.graphic;d=p.pointToPixels(d.points[this.index]);return{x:d.x-c.width/2,y:d.y-c.height/2}},events:{drag:function(d,c){c.chart.isInsidePlot(d.chartX-c.chart.plotLeft,d.chartY-c.chart.plotTop)&&(d=this.mouseMoveToTranslation(d),c.translatePoint(d.x,d.y,this.index),c.options.typeOptions.points[this.index].x=c.points[this.index].x,c.options.typeOptions.points[this.index].y=c.points[this.index].y,c.redraw(!1))}}}});return d.types.crookedLine=h});u(d,"Extensions/Annotations/Types/ElliottWave.js",[d["Extensions/Annotations/Annotations.js"],
d["Extensions/Annotations/Types/CrookedLine.js"],d["Core/Utilities.js"]],function(d,k,p){var h=this&&this.__extends||function(){var d=function(e,c){d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(b,a){for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c])};return d(e,c)};return function(e,c){function b(){this.constructor=e}d(e,c);e.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)}}(),l=p.merge;p=function(d){function e(c,b){return d.call(this,
c,b)||this}h(e,d);e.prototype.addLabels=function(){this.getPointsOptions().forEach(function(c,b){var a=this.initLabel(l(c.label,{text:this.options.typeOptions.labels[b],point:function(a){return a.annotation.points[b]}}),!1);c.label=a.options},this)};return e}(k);p.prototype.defaultOptions=l(k.prototype.defaultOptions,{typeOptions:{labels:"(0) (A) (B) (C) (D) (E)".split(" "),line:{strokeWidth:1}},labelOptions:{align:"center",allowOverlap:!0,crop:!0,overflow:"none",type:"rect",backgroundColor:"none",
borderWidth:0,y:-5}});return d.types.elliottWave=p});u(d,"Extensions/Annotations/Types/Tunnel.js",[d["Extensions/Annotations/Annotations.js"],d["Extensions/Annotations/ControlPoint.js"],d["Extensions/Annotations/Types/CrookedLine.js"],d["Extensions/Annotations/MockPoint.js"],d["Core/Utilities.js"]],function(d,k,p,h,w){var e=this&&this.__extends||function(){var c=function(b,a){c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&
(a[c]=b[c])};return c(b,a)};return function(b,a){function d(){this.constructor=b}c(b,a);b.prototype=null===a?Object.create(a):(d.prototype=a.prototype,new d)}}(),g=w.merge;w=function(c){function b(a,b){return c.call(this,a,b)||this}e(b,c);b.prototype.getPointsOptions=function(){var a=p.prototype.getPointsOptions.call(this);a[2]=this.heightPointOptions(a[1]);a[3]=this.heightPointOptions(a[0]);return a};b.prototype.getControlPointsOptions=function(){return this.getPointsOptions().slice(0,2)};b.prototype.heightPointOptions=
function(a){a=g(a);a.y+=this.options.typeOptions.height;return a};b.prototype.addControlPoints=function(){p.prototype.addControlPoints.call(this);var a=this.options,b=a.typeOptions;a=new k(this.chart,this,g(a.controlPointOptions,b.heightControlPoint),2);this.controlPoints.push(a);b.heightControlPoint=a.options};b.prototype.addShapes=function(){this.addLine();this.addBackground()};b.prototype.addLine=function(){var a=this.initShape(g(this.options.typeOptions.line,{type:"path",points:[this.points[0],
this.points[1],function(a){a=h.pointToOptions(a.annotation.points[2]);a.command="M";return a},this.points[3]]}),!1);this.options.typeOptions.line=a.options};b.prototype.addBackground=function(){var a=this.initShape(g(this.options.typeOptions.background,{type:"path",points:this.points.slice()}));this.options.typeOptions.background=a.options};b.prototype.translateSide=function(a,b,c){c=Number(c);var d=0===c?3:2;this.translatePoint(a,b,c);this.translatePoint(a,b,d)};b.prototype.translateHeight=function(a){this.translatePoint(0,
a,2);this.translatePoint(0,a,3);this.options.typeOptions.height=this.points[3].y-this.points[0].y};return b}(p);w.prototype.defaultOptions=g(p.prototype.defaultOptions,{typeOptions:{xAxis:0,yAxis:0,background:{fill:"rgba(130, 170, 255, 0.4)",strokeWidth:0},line:{strokeWidth:1},height:-2,heightControlPoint:{positioner:function(c){var b=h.pointToPixels(c.points[2]);c=h.pointToPixels(c.points[3]);var a=(b.x+c.x)/2;return{x:a-this.graphic.width/2,y:(c.y-b.y)/(c.x-b.x)*(a-b.x)+b.y-this.graphic.height/
2}},events:{drag:function(c,b){b.chart.isInsidePlot(c.chartX-b.chart.plotLeft,c.chartY-b.chart.plotTop)&&(b.translateHeight(this.mouseMoveToTranslation(c).y),b.redraw(!1))}}}},controlPointOptions:{events:{drag:function(c,b){b.chart.isInsidePlot(c.chartX-b.chart.plotLeft,c.chartY-b.chart.plotTop)&&(c=this.mouseMoveToTranslation(c),b.translateSide(c.x,c.y,this.index),b.redraw(!1))}}}});return d.types.tunnel=w});u(d,"Extensions/Annotations/Types/InfinityLine.js",[d["Extensions/Annotations/Annotations.js"],
d["Extensions/Annotations/Types/CrookedLine.js"],d["Extensions/Annotations/MockPoint.js"],d["Core/Utilities.js"]],function(d,k,p,h){var l=this&&this.__extends||function(){var d=function(c,b){d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};return d(c,b)};return function(c,b){function a(){this.constructor=c}d(c,b);c.prototype=null===b?Object.create(b):(a.prototype=b.prototype,new a)}}(),e=h.merge;h=
function(d){function c(b,a){return d.call(this,b,a)||this}l(c,d);c.edgePoint=function(b,a){return function(d){d=d.annotation;var f=d.points,e=d.options.typeOptions.type;"horizontalLine"===e?f=[f[0],new p(d.chart,f[0].target,{x:f[0].x+1,y:f[0].y,xAxis:f[0].options.xAxis,yAxis:f[0].options.yAxis})]:"verticalLine"===e&&(f=[f[0],new p(d.chart,f[0].target,{x:f[0].x,y:f[0].y+1,xAxis:f[0].options.xAxis,yAxis:f[0].options.yAxis})]);return c.findEdgePoint(f[b],f[a])}};c.findEdgeCoordinate=function(b,a,c,d){var f=
"x"===c?"y":"x";return(a[c]-b[c])*(d-b[f])/(a[f]-b[f])+b[c]};c.findEdgePoint=function(b,a){var d=b.series.xAxis,e=a.series.yAxis,q=p.pointToPixels(b),g=p.pointToPixels(a),m=g.x-q.x,r=g.y-q.y;a=d.left;var t=a+d.width;d=e.top;e=d+e.height;var h=0>m?a:t,l=0>r?d:e;t={x:0===m?q.x:h,y:0===r?q.y:l};0!==m&&0!==r&&(m=c.findEdgeCoordinate(q,g,"y",h),q=c.findEdgeCoordinate(q,g,"x",l),m>=d&&m<=e?(t.x=h,t.y=m):(t.x=q,t.y=l));t.x-=a;t.y-=d;b.series.chart.inverted&&(b=t.x,t.x=t.y,t.y=b);return t};c.prototype.addShapes=
function(){var b=this.options.typeOptions,a=[this.points[0],c.endEdgePoint];b.type.match(/Line/g)&&(a[0]=c.startEdgePoint);a=this.initShape(e(b.line,{type:"path",points:a}),!1);b.line=a.options};c.endEdgePoint=c.edgePoint(0,1);c.startEdgePoint=c.edgePoint(1,0);return c}(k);h.prototype.defaultOptions=e(k.prototype.defaultOptions,{});return d.types.infinityLine=h});u(d,"Extensions/Annotations/Types/Fibonacci.js",[d["Extensions/Annotations/Annotations.js"],d["Extensions/Annotations/MockPoint.js"],d["Extensions/Annotations/Types/Tunnel.js"],
d["Core/Utilities.js"]],function(d,k,p,h){var l=this&&this.__extends||function(){var c=function(b,a){c=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};return c(b,a)};return function(b,a){function d(){this.constructor=b}c(b,a);b.prototype=null===a?Object.create(a):(d.prototype=a.prototype,new d)}}(),e=h.merge,g=function(c,b){return function(){var a=this.annotation,d=this.anchor(a.startRetracements[c]).absolutePosition,
e=this.anchor(a.endRetracements[c]).absolutePosition;d=[["M",Math.round(d.x),Math.round(d.y)],["L",Math.round(e.x),Math.round(e.y)]];b&&(e=this.anchor(a.endRetracements[c-1]).absolutePosition,a=this.anchor(a.startRetracements[c-1]).absolutePosition,d.push(["L",Math.round(e.x),Math.round(e.y)],["L",Math.round(a.x),Math.round(a.y)]));return d}};h=function(c){function b(a,b){return c.call(this,a,b)||this}l(b,c);b.prototype.linkPoints=function(){c.prototype.linkPoints.call(this);this.linkRetracementsPoints()};
b.prototype.linkRetracementsPoints=function(){var a=this.points,c=a[0].y-a[3].y,d=a[1].y-a[2].y,e=a[0].x,g=a[1].x;b.levels.forEach(function(b,f){var m=a[0].y-c*b;b=a[1].y-d*b;this.startRetracements=this.startRetracements||[];this.endRetracements=this.endRetracements||[];this.linkRetracementPoint(f,e,m,this.startRetracements);this.linkRetracementPoint(f,g,b,this.endRetracements)},this)};b.prototype.linkRetracementPoint=function(a,b,c,d){var f=d[a],e=this.options.typeOptions;f?(f.options.x=b,f.options.y=
c,f.refresh()):d[a]=new k(this.chart,this,{x:b,y:c,xAxis:e.xAxis,yAxis:e.yAxis})};b.prototype.addShapes=function(){b.levels.forEach(function(a,b){this.initShape({type:"path",d:g(b)},!1);0<b&&this.initShape({type:"path",fill:this.options.typeOptions.backgroundColors[b-1],strokeWidth:0,d:g(b,!0)})},this)};b.prototype.addLabels=function(){b.levels.forEach(function(a,b){var c=this.options.typeOptions;a=this.initLabel(e(c.labels[b],{point:function(a){return k.pointToOptions(a.annotation.startRetracements[b])},
text:a.toString()}));c.labels[b]=a.options},this)};b.levels=[0,.236,.382,.5,.618,.786,1];return b}(p);h.prototype.defaultOptions=e(p.prototype.defaultOptions,{typeOptions:{height:2,backgroundColors:"rgba(130, 170, 255, 0.4);rgba(139, 191, 216, 0.4);rgba(150, 216, 192, 0.4);rgba(156, 229, 161, 0.4);rgba(162, 241, 130, 0.4);rgba(169, 255, 101, 0.4)".split(";"),lineColor:"grey",lineColors:[],labels:[]},labelOptions:{allowOverlap:!0,align:"right",backgroundColor:"none",borderWidth:0,crop:!1,overflow:"none",
shape:"rect",style:{color:"grey"},verticalAlign:"middle",y:0}});return d.types.fibonacci=h});u(d,"Extensions/Annotations/Types/Pitchfork.js",[d["Extensions/Annotations/Annotations.js"],d["Extensions/Annotations/Types/InfinityLine.js"],d["Extensions/Annotations/MockPoint.js"],d["Core/Utilities.js"]],function(d,k,p,h){var l=this&&this.__extends||function(){var d=function(c,b){d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&
(a[c]=b[c])};return d(c,b)};return function(c,b){function a(){this.constructor=c}d(c,b);c.prototype=null===b?Object.create(b):(a.prototype=b.prototype,new a)}}(),e=h.merge;h=function(d){function c(b,a){return d.call(this,b,a)||this}l(c,d);c.outerLineEdgePoint=function(b){return function(a){var d=a.annotation,e=d.points;return c.findEdgePoint(e[b],e[0],new p(d.chart,a,d.midPointOptions()))}};c.findEdgePoint=function(b,a,c){a=Math.atan2(c.plotY-a.plotY,c.plotX-a.plotX);return{x:b.plotX+1E7*Math.cos(a),
y:b.plotY+1E7*Math.sin(a)}};c.middleLineEdgePoint=function(b){var a=b.annotation;return k.findEdgePoint(a.points[0],new p(a.chart,b,a.midPointOptions()))};c.prototype.midPointOptions=function(){var b=this.points;return{x:(b[1].x+b[2].x)/2,y:(b[1].y+b[2].y)/2,xAxis:b[0].series.xAxis,yAxis:b[0].series.yAxis}};c.prototype.addShapes=function(){this.addLines();this.addBackgrounds()};c.prototype.addLines=function(){this.initShape({type:"path",points:[this.points[0],c.middleLineEdgePoint]},!1);this.initShape({type:"path",
points:[this.points[1],c.topLineEdgePoint]},!1);this.initShape({type:"path",points:[this.points[2],c.bottomLineEdgePoint]},!1)};c.prototype.addBackgrounds=function(){var b=this.shapes,a=this.options.typeOptions,c=this.initShape(e(a.innerBackground,{type:"path",points:[function(a){var b=a.annotation;a=b.points;b=b.midPointOptions();return{x:(a[1].x+b.x)/2,y:(a[1].y+b.y)/2,xAxis:b.xAxis,yAxis:b.yAxis}},b[1].points[1],b[2].points[1],function(a){var b=a.annotation;a=b.points;b=b.midPointOptions();return{x:(b.x+
a[2].x)/2,y:(b.y+a[2].y)/2,xAxis:b.xAxis,yAxis:b.yAxis}}]}));b=this.initShape(e(a.outerBackground,{type:"path",points:[this.points[1],b[1].points[1],b[2].points[1],this.points[2]]}));a.innerBackground=c.options;a.outerBackground=b.options};c.topLineEdgePoint=c.outerLineEdgePoint(1);c.bottomLineEdgePoint=c.outerLineEdgePoint(0);return c}(k);h.prototype.defaultOptions=e(k.prototype.defaultOptions,{typeOptions:{innerBackground:{fill:"rgba(130, 170, 255, 0.4)",strokeWidth:0},outerBackground:{fill:"rgba(156, 229, 161, 0.4)",
strokeWidth:0}}});return d.types.pitchfork=h});u(d,"Extensions/Annotations/Types/VerticalLine.js",[d["Extensions/Annotations/Annotations.js"],d["Extensions/Annotations/MockPoint.js"],d["Core/Utilities.js"]],function(d,k,p){var h=this&&this.__extends||function(){var d=function(e,c){d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,a){b.__proto__=a}||function(b,a){for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c])};return d(e,c)};return function(e,c){function b(){this.constructor=e}d(e,
c);e.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)}}(),l=p.merge;p=function(d){function e(c,b){return d.call(this,c,b)||this}h(e,d);e.connectorFirstPoint=function(c){c=c.annotation;var b=c.points[0],a=k.pointToPixels(b,!0),d=a.y,e=c.options.typeOptions.label.offset;c.chart.inverted&&(d=a.x);return{x:b.x,xAxis:b.series.xAxis,y:d+e}};e.connectorSecondPoint=function(c){var b=c.annotation;c=b.options.typeOptions;var a=b.points[0],d=c.yOffset;b=k.pointToPixels(a,!0)[b.chart.inverted?
"x":"y"];0>c.label.offset&&(d*=-1);return{x:a.x,xAxis:a.series.xAxis,y:b+d}};e.prototype.getPointsOptions=function(){return[this.options.typeOptions.point]};e.prototype.addShapes=function(){var c=this.options.typeOptions,b=this.initShape(l(c.connector,{type:"path",points:[e.connectorFirstPoint,e.connectorSecondPoint]}),!1);c.connector=b.options};e.prototype.addLabels=function(){var c=this.options.typeOptions,b=c.label,a=0,d=b.offset,e=0>b.offset?"bottom":"top",g="center";this.chart.inverted&&(a=b.offset,
d=0,e="middle",g=0>b.offset?"right":"left");b=this.initLabel(l(b,{verticalAlign:e,align:g,x:a,y:d}));c.label=b.options};return e}(d);p.prototype.defaultOptions=l(d.prototype.defaultOptions,{typeOptions:{yOffset:10,label:{offset:-40,point:function(d){return d.annotation.points[0]},allowOverlap:!0,backgroundColor:"none",borderWidth:0,crop:!0,overflow:"none",shape:"rect",text:"{y:.2f}"},connector:{strokeWidth:1,markerEnd:"arrow"}}});return d.types.verticalLine=p});u(d,"Extensions/Annotations/Types/Measure.js",
[d["Extensions/Annotations/Annotations.js"],d["Extensions/Annotations/ControlPoint.js"],d["Core/Utilities.js"]],function(d,k,p){var h=this&&this.__extends||function(){var b=function(a,c){b=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c])};return b(a,c)};return function(a,c){function d(){this.constructor=a}b(a,c);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)}}(),l=p.extend,e=p.isNumber,
g=p.merge,c=function(b){function a(a,c){return b.call(this,a,c)||this}h(a,b);a.prototype.init=function(b,c,e){d.prototype.init.call(this,b,c,e);this.resizeY=this.resizeX=this.offsetY=this.offsetX=0;a.calculations.init.call(this);this.addValues();this.addShapes()};a.prototype.setClipAxes=function(){this.clipXAxis=this.chart.xAxis[this.options.typeOptions.xAxis];this.clipYAxis=this.chart.yAxis[this.options.typeOptions.yAxis]};a.prototype.pointsOptions=function(){return this.options.points};a.prototype.shapePointsOptions=
function(){var a=this.options.typeOptions,b=a.xAxis;a=a.yAxis;return[{x:this.xAxisMin,y:this.yAxisMin,xAxis:b,yAxis:a},{x:this.xAxisMax,y:this.yAxisMin,xAxis:b,yAxis:a},{x:this.xAxisMax,y:this.yAxisMax,xAxis:b,yAxis:a},{x:this.xAxisMin,y:this.yAxisMax,xAxis:b,yAxis:a}]};a.prototype.addControlPoints=function(){var a=this.options.typeOptions.selectType;var b=new k(this.chart,this,this.options.controlPointOptions,0);this.controlPoints.push(b);"xy"!==a&&(b=new k(this.chart,this,this.options.controlPointOptions,
1),this.controlPoints.push(b))};a.prototype.addValues=function(b){var c=this.options.typeOptions,d=c.label.formatter;a.calculations.recalculate.call(this,b);c.label.enabled&&(0<this.labels.length?this.labels[0].text=d&&d.call(this)||a.calculations.defaultFormatter.call(this):this.initLabel(l({shape:"rect",backgroundColor:"none",color:"black",borderWidth:0,dashStyle:"dash",overflow:"none",align:"left",vertical:"top",crop:!0,point:function(a){a=a.annotation;var b=a.chart,d=b.inverted,e=b.yAxis[c.yAxis],
f=b.plotTop,g=b.plotLeft;return{x:(d?f:10)+b.xAxis[c.xAxis].toPixels(a.xAxisMin,!d),y:(d?-g+10:f)+e.toPixels(a.yAxisMin)}},text:d&&d.call(this)||a.calculations.defaultFormatter.call(this)},c.label)))};a.prototype.addShapes=function(){this.addCrosshairs();this.addBackground()};a.prototype.addBackground=function(){"undefined"!==typeof this.shapePointsOptions()[0].x&&this.initShape(l({type:"path",points:this.shapePointsOptions()},this.options.typeOptions.background),!1)};a.prototype.addCrosshairs=function(){var a=
this.chart,b=this.options.typeOptions,c=this.options.typeOptions.point,d=a.xAxis[b.xAxis],e=a.yAxis[b.yAxis],r=a.inverted;a=d.toPixels(this.xAxisMin);d=d.toPixels(this.xAxisMax);var t=e.toPixels(this.yAxisMin),h=e.toPixels(this.yAxisMax),k={point:c,type:"path"};c=[];e=[];r&&(r=a,a=t,t=r,r=d,d=h,h=r);b.crosshairX.enabled&&(c=[["M",a,t+(h-t)/2],["L",d,t+(h-t)/2]]);b.crosshairY.enabled&&(e=[["M",a+(d-a)/2,t],["L",a+(d-a)/2,h]]);0<this.shapes.length?(this.shapes[0].options.d=c,this.shapes[1].options.d=
e):(a=g(k,b.crosshairX),b=g(k,b.crosshairY),this.initShape(l({d:c},a),!1),this.initShape(l({d:e},b),!1))};a.prototype.onDrag=function(a){var b=this.mouseMoveToTranslation(a),c=this.options.typeOptions.selectType;a="y"===c?0:b.x;b="x"===c?0:b.y;this.translate(a,b);this.offsetX+=a;this.offsetY+=b;this.redraw(!1,!1,!0)};a.prototype.resize=function(b,c,d,e){var f=this.shapes[2];"x"===e?0===d?(f.translatePoint(b,0,0),f.translatePoint(b,c,3)):(f.translatePoint(b,0,1),f.translatePoint(b,c,2)):"y"===e?0===
d?(f.translatePoint(0,c,0),f.translatePoint(0,c,1)):(f.translatePoint(0,c,2),f.translatePoint(0,c,3)):(f.translatePoint(b,0,1),f.translatePoint(b,c,2),f.translatePoint(0,c,3));a.calculations.updateStartPoints.call(this,!1,!0,d,b,c);this.options.typeOptions.background.height=Math.abs(this.startYMax-this.startYMin);this.options.typeOptions.background.width=Math.abs(this.startXMax-this.startXMin)};a.prototype.redraw=function(b,c,d){this.linkPoints();this.graphic||this.render();d&&a.calculations.updateStartPoints.call(this,
!0,!1);this.clipRect&&this.clipRect.animate(this.getClipBox());this.addValues(c);this.addCrosshairs();this.redrawItems(this.shapes,b);this.redrawItems(this.labels,b);this.controlPoints.forEach(function(a){a.redraw()})};a.prototype.translate=function(a,b){this.shapes.forEach(function(c){c.translate(a,b)});this.options.typeOptions.point.x=this.startXMin;this.options.typeOptions.point.y=this.startYMin};a.calculations={init:function(){var b=this.options.typeOptions,c=this.chart,d=a.calculations.getPointPos,
g=c.inverted,m=c.xAxis[b.xAxis];c=c.yAxis[b.yAxis];var r=b.background,h=g?r.height:r.width;r=g?r.width:r.height;var l=b.selectType,k=g?m.left:c.top;g=g?c.top:m.left;this.startXMin=b.point.x;this.startYMin=b.point.y;e(h)?this.startXMax=this.startXMin+h:this.startXMax=d(m,this.startXMin,parseFloat(h));e(r)?this.startYMax=this.startYMin-r:this.startYMax=d(c,this.startYMin,parseFloat(r));"x"===l?(this.startYMin=c.toValue(k),this.startYMax=c.toValue(k+c.len)):"y"===l&&(this.startXMin=m.toValue(g),this.startXMax=
m.toValue(g+m.len))},recalculate:function(b){var c=a.calculations,d=this.options.typeOptions,e=this.chart.xAxis[d.xAxis];d=this.chart.yAxis[d.yAxis];var f=a.calculations.getPointPos,r=this.offsetX,g=this.offsetY;this.xAxisMin=f(e,this.startXMin,r);this.xAxisMax=f(e,this.startXMax,r);this.yAxisMin=f(d,this.startYMin,g);this.yAxisMax=f(d,this.startYMax,g);this.min=c.min.call(this);this.max=c.max.call(this);this.average=c.average.call(this);this.bins=c.bins.call(this);b&&this.resize(0,0)},getPointPos:function(a,
b,c){return a.toValue(a.toPixels(b)+c)},updateStartPoints:function(b,c,d,e,m){var f=this.options.typeOptions,g=f.selectType,h=this.chart.xAxis[f.xAxis];f=this.chart.yAxis[f.yAxis];var l=a.calculations.getPointPos,x=this.startXMin,A=this.startXMax,v=this.startYMin,k=this.startYMax,n=this.offsetX,q=this.offsetY;c&&("x"===g?0===d?this.startXMin=l(h,x,e):this.startXMax=l(h,A,e):"y"===g?0===d?this.startYMin=l(f,v,m):this.startYMax=l(f,k,m):(this.startXMax=l(h,A,e),this.startYMax=l(f,k,m)));b&&(this.startXMin=
l(h,x,n),this.startXMax=l(h,A,n),this.startYMin=l(f,v,q),this.startYMax=l(f,k,q),this.offsetY=this.offsetX=0)},defaultFormatter:function(){return"Min: "+this.min+"<br>Max: "+this.max+"<br>Average: "+this.average+"<br>Bins: "+this.bins},getExtremes:function(a,b,c,d){return{xAxisMin:Math.min(b,a),xAxisMax:Math.max(b,a),yAxisMin:Math.min(d,c),yAxisMax:Math.max(d,c)}},min:function(){var b=Infinity,c=this.chart.series,d=a.calculations.getExtremes(this.xAxisMin,this.xAxisMax,this.yAxisMin,this.yAxisMax),
e=!1;c.forEach(function(a){a.visible&&"highcharts-navigator-series"!==a.options.id&&a.points.forEach(function(a){!a.isNull&&a.y<b&&a.x>d.xAxisMin&&a.x<=d.xAxisMax&&a.y>d.yAxisMin&&a.y<=d.yAxisMax&&(b=a.y,e=!0)})});e||(b="");return b},max:function(){var b=-Infinity,c=this.chart.series,d=a.calculations.getExtremes(this.xAxisMin,this.xAxisMax,this.yAxisMin,this.yAxisMax),e=!1;c.forEach(function(a){a.visible&&"highcharts-navigator-series"!==a.options.id&&a.points.forEach(function(a){!a.isNull&&a.y>b&&
a.x>d.xAxisMin&&a.x<=d.xAxisMax&&a.y>d.yAxisMin&&a.y<=d.yAxisMax&&(b=a.y,e=!0)})});e||(b="");return b},average:function(){var a="";""!==this.max&&""!==this.min&&(a=(this.max+this.min)/2);return a},bins:function(){var b=0,c=this.chart.series,d=a.calculations.getExtremes(this.xAxisMin,this.xAxisMax,this.yAxisMin,this.yAxisMax),e=!1;c.forEach(function(a){a.visible&&"highcharts-navigator-series"!==a.options.id&&a.points.forEach(function(a){!a.isNull&&a.x>d.xAxisMin&&a.x<=d.xAxisMax&&a.y>d.yAxisMin&&a.y<=
d.yAxisMax&&(b++,e=!0)})});e||(b="");return b}};return a}(d);c.prototype.defaultOptions=g(d.prototype.defaultOptions,{typeOptions:{selectType:"xy",xAxis:0,yAxis:0,background:{fill:"rgba(130, 170, 255, 0.4)",strokeWidth:0,stroke:void 0},crosshairX:{enabled:!0,zIndex:6,dashStyle:"Dash",markerEnd:"arrow"},crosshairY:{enabled:!0,zIndex:6,dashStyle:"Dash",markerEnd:"arrow"},label:{enabled:!0,style:{fontSize:"11px",color:"#666666"},formatter:void 0}},controlPointOptions:{positioner:function(b){var a=this.index,
d=b.chart,e=b.options,g=e.typeOptions,h=g.selectType;e=e.controlPointOptions;var m=d.inverted,r=d.xAxis[g.xAxis];d=d.yAxis[g.yAxis];g=b.xAxisMax;var l=b.yAxisMax,k=c.calculations.getExtremes(b.xAxisMin,b.xAxisMax,b.yAxisMin,b.yAxisMax);"x"===h&&(l=(k.yAxisMax-k.yAxisMin)/2,0===a&&(g=b.xAxisMin));"y"===h&&(g=k.xAxisMin+(k.xAxisMax-k.xAxisMin)/2,0===a&&(l=b.yAxisMin));m?(b=d.toPixels(l),a=r.toPixels(g)):(b=r.toPixels(g),a=d.toPixels(l));return{x:b-e.width/2,y:a-e.height/2}},events:{drag:function(b,
a){var c=this.mouseMoveToTranslation(b);b=a.options.typeOptions.selectType;var d="y"===b?0:c.x;c="x"===b?0:c.y;a.resize(d,c,this.index,b);a.resizeX+=d;a.resizeY+=c;a.redraw(!1,!0)}}}});return d.types.measure=c});u(d,"Mixins/Navigation.js",[],function(){return{initUpdate:function(d){d.navigation||(d.navigation={updates:[],update:function(d,l){this.updates.forEach(function(h){h.update.call(h.context,d,l)})}})},addUpdate:function(d,k){k.navigation||this.initUpdate(k);k.navigation.updates.push({update:d,
context:k})}}});u(d,"Extensions/Annotations/NavigationBindings.js",[d["Extensions/Annotations/Annotations.js"],d["Mixins/Navigation.js"],d["Core/Globals.js"],d["Core/Utilities.js"]],function(d,k,p,h){function l(a){var c=a.prototype.defaultOptions.events&&a.prototype.defaultOptions.events.click;u(!0,a.prototype.defaultOptions.events,{click:function(a){var d=this,e=d.chart.navigationBindings,f=e.activeAnnotation;c&&c.call(d,a);f!==d?(e.deselectAnnotation(),e.activeAnnotation=d,d.setControlPointsVisibility(!0),
b(e,"showPopup",{annotation:d,formType:"annotation-toolbar",options:e.annotationToFields(d),onSubmit:function(a){var b={};"remove"===a.actionType?(e.activeAnnotation=!1,e.chart.removeAnnotation(d)):(e.fieldsToOptions(a.fields,b),e.deselectAnnotation(),a=b.typeOptions,"measure"===d.options.type&&(a.crosshairY.enabled=0!==a.crosshairY.strokeWidth,a.crosshairX.enabled=0!==a.crosshairX.strokeWidth),d.update(b))}})):(e.deselectAnnotation(),b(e,"closePopup"));a.activeAnnotation=!0}})}var e=h.addEvent,g=
h.attr,c=h.format,b=h.fireEvent,a=h.isArray,f=h.isFunction,n=h.isNumber,q=h.isObject,u=h.merge,m=h.objectEach,r=h.pick;h=h.setOptions;var t=p.doc,y=p.win,B=function(){function d(a,b){this.selectedButton=this.boundClassNames=void 0;this.chart=a;this.options=b;this.eventsToUnbind=[];this.container=t.getElementsByClassName(this.options.bindingsClassName||"")}d.prototype.initEvents=function(){var a=this,b=a.chart,c=a.container,d=a.options;a.boundClassNames={};m(d.bindings||{},function(b){a.boundClassNames[b.className]=
b});[].forEach.call(c,function(b){a.eventsToUnbind.push(e(b,"click",function(c){var d=a.getButtonEvents(b,c);d&&a.bindingsButtonClick(d.button,d.events,c)}))});m(d.events||{},function(b,c){f(b)&&a.eventsToUnbind.push(e(a,c,b))});a.eventsToUnbind.push(e(b.container,"click",function(c){!b.cancelClick&&b.isInsidePlot(c.chartX-b.plotLeft,c.chartY-b.plotTop)&&a.bindingsChartClick(this,c)}));a.eventsToUnbind.push(e(b.container,p.isTouchDevice?"touchmove":"mousemove",function(b){a.bindingsContainerMouseMove(this,
b)}))};d.prototype.initUpdate=function(){var a=this;k.addUpdate(function(b){a.update(b)},this.chart)};d.prototype.bindingsButtonClick=function(a,c,d){var e=this.chart;this.selectedButtonElement&&(b(this,"deselectButton",{button:this.selectedButtonElement}),this.nextEvent&&(this.currentUserDetails&&"annotations"===this.currentUserDetails.coll&&e.removeAnnotation(this.currentUserDetails),this.mouseMoveEvent=this.nextEvent=!1));this.selectedButton=c;this.selectedButtonElement=a;b(this,"selectButton",
{button:a});c.init&&c.init.call(this,a,d);(c.start||c.steps)&&e.renderer.boxWrapper.addClass("highcharts-draw-mode")};d.prototype.bindingsChartClick=function(a,c){a=this.chart;var d=this.selectedButton;a=a.renderer.boxWrapper;var e;if(e=this.activeAnnotation&&!c.activeAnnotation&&c.target.parentNode){a:{e=c.target;var f=y.Element.prototype,g=f.matches||f.msMatchesSelector||f.webkitMatchesSelector,m=null;if(f.closest)m=f.closest.call(e,".highcharts-popup");else{do{if(g.call(e,".highcharts-popup"))break a;
e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType)}e=m}e=!e}e&&(b(this,"closePopup"),this.deselectAnnotation());d&&d.start&&(this.nextEvent?(this.nextEvent(c,this.currentUserDetails),this.steps&&(this.stepIndex++,d.steps[this.stepIndex]?this.mouseMoveEvent=this.nextEvent=d.steps[this.stepIndex]:(b(this,"deselectButton",{button:this.selectedButtonElement}),a.removeClass("highcharts-draw-mode"),d.end&&d.end.call(this,c,this.currentUserDetails),this.mouseMoveEvent=this.nextEvent=!1,this.selectedButton=
null))):(this.currentUserDetails=d.start.call(this,c),d.steps?(this.stepIndex=0,this.steps=!0,this.mouseMoveEvent=this.nextEvent=d.steps[this.stepIndex]):(b(this,"deselectButton",{button:this.selectedButtonElement}),a.removeClass("highcharts-draw-mode"),this.steps=!1,this.selectedButton=null,d.end&&d.end.call(this,c,this.currentUserDetails))))};d.prototype.bindingsContainerMouseMove=function(a,b){this.mouseMoveEvent&&this.mouseMoveEvent(b,this.currentUserDetails)};d.prototype.fieldsToOptions=function(a,
b){m(a,function(a,c){var d=parseFloat(a),e=c.split("."),f=b,g=e.length-1;!n(d)||a.match(/px/g)||c.match(/format/g)||(a=d);""!==a&&"undefined"!==a&&e.forEach(function(b,c){var d=r(e[c+1],"");g===c?f[b]=a:(f[b]||(f[b]=d.match(/\d/g)?[]:{}),f=f[b])})});return b};d.prototype.deselectAnnotation=function(){this.activeAnnotation&&(this.activeAnnotation.setControlPointsVisibility(!1),this.activeAnnotation=!1)};d.prototype.annotationToFields=function(b){function e(d,f,g,r){if(g&&d&&-1===t.indexOf(f)&&(0<=
(g.indexOf&&g.indexOf(f))||g[f]||!0===g))if(a(d))r[f]=[],d.forEach(function(a,b){q(a)?(r[f][b]={},m(a,function(a,c){e(a,c,h[f],r[f][b])})):e(a,0,h[f],r[f])});else if(q(d)){var k={};a(r)?(r.push(k),k[f]={},k=k[f]):r[f]=k;m(d,function(a,b){e(a,b,0===f?g:h[f],k)})}else"format"===f?r[f]=[c(d,b.labels[0].points[0]).toString(),"text"]:a(r)?r.push([d,l(d)]):r[f]=[d,l(d)]}var f=b.options,g=d.annotationsEditable,h=g.nestedOptions,l=this.utils.getFieldType,k=r(f.type,f.shapes&&f.shapes[0]&&f.shapes[0].type,
f.labels&&f.labels[0]&&f.labels[0].itemType,"label"),t=d.annotationsNonEditable[f.langKey]||[],x={langKey:f.langKey,type:k};m(f,function(a,b){"typeOptions"===b?(x[b]={},m(f[b],function(a,c){e(a,c,h,x[b],!0)})):e(a,b,g[k],x)});return x};d.prototype.getClickedClassNames=function(a,b){var c=b.target;b=[];for(var d;c&&((d=g(c,"class"))&&(b=b.concat(d.split(" ").map(function(a){return[a,c]}))),c=c.parentNode,c!==a););return b};d.prototype.getButtonEvents=function(a,b){var c=this,d;this.getClickedClassNames(a,
b).forEach(function(a){c.boundClassNames[a[0]]&&!d&&(d={events:c.boundClassNames[a[0]],button:a[1]})});return d};d.prototype.update=function(a){this.options=u(!0,this.options,a);this.removeEvents();this.initEvents()};d.prototype.removeEvents=function(){this.eventsToUnbind.forEach(function(a){a()})};d.prototype.destroy=function(){this.removeEvents()};d.annotationsEditable={nestedOptions:{labelOptions:["style","format","backgroundColor"],labels:["style"],label:["style"],style:["fontSize","color"],background:["fill",
"strokeWidth","stroke"],innerBackground:["fill","strokeWidth","stroke"],outerBackground:["fill","strokeWidth","stroke"],shapeOptions:["fill","strokeWidth","stroke"],shapes:["fill","strokeWidth","stroke"],line:["strokeWidth","stroke"],backgroundColors:[!0],connector:["fill","strokeWidth","stroke"],crosshairX:["strokeWidth","stroke"],crosshairY:["strokeWidth","stroke"]},circle:["shapes"],verticalLine:[],label:["labelOptions"],measure:["background","crosshairY","crosshairX"],fibonacci:[],tunnel:["background",
"line","height"],pitchfork:["innerBackground","outerBackground"],rect:["shapes"],crookedLine:[],basicAnnotation:["shapes","labelOptions"]};d.annotationsNonEditable={rectangle:["crosshairX","crosshairY","label"]};return d}();B.prototype.utils={updateRectSize:function(a,b){var c=b.chart,d=b.options.typeOptions,e=c.pointer.getCoordinates(a);a=e.xAxis[0].value-d.point.x;d=d.point.y-e.yAxis[0].value;b.update({typeOptions:{background:{width:c.inverted?d:a,height:c.inverted?a:d}}})},getFieldType:function(a){return{string:"text",
number:"number","boolean":"checkbox"}[typeof a]}};p.Chart.prototype.initNavigationBindings=function(){var a=this.options;a&&a.navigation&&a.navigation.bindings&&(this.navigationBindings=new B(this,a.navigation),this.navigationBindings.initEvents(),this.navigationBindings.initUpdate())};e(p.Chart,"load",function(){this.initNavigationBindings()});e(p.Chart,"destroy",function(){this.navigationBindings&&this.navigationBindings.destroy()});e(B,"deselectButton",function(){this.selectedButtonElement=null});
e(d,"remove",function(){this.chart.navigationBindings&&this.chart.navigationBindings.deselectAnnotation()});p.Annotation&&(l(d),m(d.types,function(a){l(a)}));h({lang:{navigation:{popup:{simpleShapes:"Simple shapes",lines:"Lines",circle:"Circle",rectangle:"Rectangle",label:"Label",shapeOptions:"Shape options",typeOptions:"Details",fill:"Fill",format:"Text",strokeWidth:"Line width",stroke:"Line color",title:"Title",name:"Name",labelOptions:"Label options",labels:"Labels",backgroundColor:"Background color",
backgroundColors:"Background colors",borderColor:"Border color",borderRadius:"Border radius",borderWidth:"Border width",style:"Style",padding:"Padding",fontSize:"Font size",color:"Color",height:"Height",shapes:"Shape options"}}},navigation:{bindingsClassName:"highcharts-bindings-container",bindings:{circleAnnotation:{className:"highcharts-circle-annotation",start:function(a){a=this.chart.pointer.getCoordinates(a);var b=this.chart.options.navigation;return this.chart.addAnnotation(u({langKey:"circle",
type:"basicAnnotation",shapes:[{type:"circle",point:{xAxis:0,yAxis:0,x:a.xAxis[0].value,y:a.yAxis[0].value},r:5}]},b.annotationsOptions,b.bindings.circleAnnotation.annotationsOptions))},steps:[function(a,b){var c=b.options.shapes[0].point,d=this.chart.xAxis[0].toPixels(c.x);c=this.chart.yAxis[0].toPixels(c.y);var e=this.chart.inverted;b.update({shapes:[{r:Math.max(Math.sqrt(Math.pow(e?c-a.chartX:d-a.chartX,2)+Math.pow(e?d-a.chartY:c-a.chartY,2)),5)}]})}]},rectangleAnnotation:{className:"highcharts-rectangle-annotation",
start:function(a){var b=this.chart.pointer.getCoordinates(a);a=this.chart.options.navigation;var c=b.xAxis[0].value;b=b.yAxis[0].value;return this.chart.addAnnotation(u({langKey:"rectangle",type:"basicAnnotation",shapes:[{type:"path",points:[{xAxis:0,yAxis:0,x:c,y:b},{xAxis:0,yAxis:0,x:c,y:b},{xAxis:0,yAxis:0,x:c,y:b},{xAxis:0,yAxis:0,x:c,y:b}]}]},a.annotationsOptions,a.bindings.rectangleAnnotation.annotationsOptions))},steps:[function(a,b){var c=b.options.shapes[0].points,d=this.chart.pointer.getCoordinates(a);
a=d.xAxis[0].value;d=d.yAxis[0].value;c[1].x=a;c[2].x=a;c[2].y=d;c[3].y=d;b.update({shapes:[{points:c}]})}]},labelAnnotation:{className:"highcharts-label-annotation",start:function(a){a=this.chart.pointer.getCoordinates(a);var b=this.chart.options.navigation;return this.chart.addAnnotation(u({langKey:"label",type:"basicAnnotation",labelOptions:{format:"{y:.2f}"},labels:[{point:{xAxis:0,yAxis:0,x:a.xAxis[0].value,y:a.yAxis[0].value},overflow:"none",crop:!0}]},b.annotationsOptions,b.bindings.labelAnnotation.annotationsOptions))}}},
events:{},annotationsOptions:{animation:{defer:0}}}});return B});u(d,"Extensions/Annotations/Popup.js",[d["Core/Globals.js"],d["Extensions/Annotations/NavigationBindings.js"],d["Core/Pointer.js"],d["Core/Utilities.js"]],function(d,k,p,h){var l=h.addEvent,e=h.createElement,g=h.defined,c=h.getOptions,b=h.isArray,a=h.isObject,f=h.isString,n=h.objectEach,q=h.pick;h=h.wrap;var u=/\d/g;h(p.prototype,"onContainerMouseDown",function(a,b){var c=b.target&&b.target.className;f(c)&&0<=c.indexOf("highcharts-popup-field")||
a.apply(this,Array.prototype.slice.call(arguments,1))});d.Popup=function(a,b){this.init(a,b)};d.Popup.prototype={init:function(a,b){this.container=e("div",{className:"highcharts-popup"},null,a);this.lang=this.getLangpack();this.iconsURL=b;this.addCloseBtn()},addCloseBtn:function(){var a=this;var b=e("div",{className:"highcharts-popup-close"},null,this.container);b.style["background-image"]="url("+this.iconsURL+"close.svg)";["click","touchstart"].forEach(function(c){l(b,c,function(){a.closePopup()})})},
addColsContainer:function(a){var b=e("div",{className:"highcharts-popup-lhs-col"},null,a);a=e("div",{className:"highcharts-popup-rhs-col"},null,a);e("div",{className:"highcharts-popup-rhs-col-wrapper"},null,a);return{lhsCol:b,rhsCol:a}},addInput:function(a,b,c,d){var f=a.split(".");f=f[f.length-1];var g=this.lang;b="highcharts-"+b+"-"+f;b.match(u)||e("label",{innerHTML:g[f]||f,htmlFor:b},null,c);e("input",{name:b,value:d[0],type:d[1],className:"highcharts-popup-field"},null,c).setAttribute("highcharts-data-name",
a)},addButton:function(a,b,c,d,f){var g=this,m=this.closePopup,h=this.getFields;var r=e("button",{innerHTML:b},null,a);["click","touchstart"].forEach(function(a){l(r,a,function(){m.call(g);return d(h(f,c))})});return r},getFields:function(a,b){var c=a.querySelectorAll("input"),d=a.querySelectorAll("#highcharts-select-series > option:checked")[0];a=a.querySelectorAll("#highcharts-select-volume > option:checked")[0];var e,f;var g={actionType:b,linkedTo:d&&d.getAttribute("value"),fields:{}};[].forEach.call(c,
function(a){f=a.getAttribute("highcharts-data-name");(e=a.getAttribute("highcharts-data-series-id"))?g.seriesId=a.value:f?g.fields[f]=a.value:g.type=a.value});a&&(g.fields["params.volumeSeriesID"]=a.getAttribute("value"));return g},showPopup:function(){var a=this.container,b=a.querySelectorAll(".highcharts-popup-close")[0];a.innerHTML="";0<=a.className.indexOf("highcharts-annotation-toolbar")&&(a.classList.remove("highcharts-annotation-toolbar"),a.removeAttribute("style"));a.appendChild(b);a.style.display=
"block"},closePopup:function(){this.popup.container.style.display="none"},showForm:function(a,b,c,d){this.popup=b.navigationBindings.popup;this.showPopup();"indicators"===a&&this.indicators.addForm.call(this,b,c,d);"annotation-toolbar"===a&&this.annotations.addToolbar.call(this,b,c,d);"annotation-edit"===a&&this.annotations.addForm.call(this,b,c,d);"flag"===a&&this.annotations.addForm.call(this,b,c,d,!0)},getLangpack:function(){return c().lang.navigation.popup},annotations:{addToolbar:function(a,
b,c){var d=this,f=this.lang,g=this.popup.container,h=this.showForm;-1===g.className.indexOf("highcharts-annotation-toolbar")&&(g.className+=" highcharts-annotation-toolbar");g.style.top=a.plotTop+10+"px";e("span",{innerHTML:q(f[b.langKey]||b.langKey,b.shapes&&b.shapes[0].type)},null,g);var m=this.addButton(g,f.removeButton||"remove","remove",c,g);m.className+=" highcharts-annotation-remove-button";m.style["background-image"]="url("+this.iconsURL+"destroy.svg)";m=this.addButton(g,f.editButton||"edit",
"edit",function(){h.call(d,"annotation-edit",a,b,c)},g);m.className+=" highcharts-annotation-edit-button";m.style["background-image"]="url("+this.iconsURL+"edit.svg)"},addForm:function(a,b,c,d){var f=this.popup.container,g=this.lang;e("h2",{innerHTML:g[b.langKey]||b.langKey,className:"highcharts-popup-main-title"},null,f);var h=e("div",{className:"highcharts-popup-lhs-col highcharts-popup-lhs-full"},null,f);var m=e("div",{className:"highcharts-popup-bottom-row"},null,f);this.annotations.addFormFields.call(this,
h,a,"",b,[],!0);this.addButton(m,d?g.addButton||"add":g.saveButton||"save",d?"add":"save",c,f)},addFormFields:function(c,d,f,g,h,l){var m=this,k=this.annotations.addFormFields,r=this.addInput,t=this.lang,p,q;n(g,function(e,g){p=""!==f?f+"."+g:g;a(e)&&(!b(e)||b(e)&&a(e[0])?(q=t[g]||g,q.match(u)||h.push([!0,q,c]),k.call(m,c,d,p,e,h,!1)):h.push([m,p,"annotation",c,e]))});l&&(h=h.sort(function(a){return a[1].match(/format/g)?-1:1}),h.forEach(function(a){!0===a[0]?e("span",{className:"highcharts-annotation-title",
innerHTML:a[1]},null,a[2]):r.apply(a[0],a.splice(1))}))}},indicators:{addForm:function(a,b,c){var d=this.indicators,e=this.lang;this.tabs.init.call(this,a);b=this.popup.container.querySelectorAll(".highcharts-tab-item-content");this.addColsContainer(b[0]);d.addIndicatorList.call(this,a,b[0],"add");var f=b[0].querySelectorAll(".highcharts-popup-rhs-col")[0];this.addButton(f,e.addButton||"add","add",c,f);this.addColsContainer(b[1]);d.addIndicatorList.call(this,a,b[1],"edit");f=b[1].querySelectorAll(".highcharts-popup-rhs-col")[0];
this.addButton(f,e.saveButton||"save","edit",c,f);this.addButton(f,e.removeButton||"remove","remove",c,f)},addIndicatorList:function(a,b,c){var d=this,f=b.querySelectorAll(".highcharts-popup-lhs-col")[0];b=b.querySelectorAll(".highcharts-popup-rhs-col")[0];var g="edit"===c,h=g?a.series:a.options.plotOptions,m=this.indicators.addFormFields,k;var r=e("ul",{className:"highcharts-indicator-list"},null,f);var t=b.querySelectorAll(".highcharts-popup-rhs-col-wrapper")[0];n(h,function(b,c){var f=b.options;
if(b.params||f&&f.params){var n=d.indicators.getNameType(b,c),p=n.type;k=e("li",{className:"highcharts-indicator-list",innerHTML:n.name},null,r);["click","touchstart"].forEach(function(c){l(k,c,function(){m.call(d,a,g?b:h[p],n.type,t);g&&b.options&&e("input",{type:"hidden",name:"highcharts-id-"+p,value:b.options.id},null,t).setAttribute("highcharts-data-series-id",b.options.id)})})}});0<r.childNodes.length&&r.childNodes[0].click()},getNameType:function(a,b){var c=a.options,e=d.seriesTypes;e=e[b]&&
e[b].prototype.nameBase||b.toUpperCase();c&&c.type&&(b=a.options.type,e=a.name);return{name:e,type:b}},listAllSeries:function(a,b,c,d,f){a="highcharts-"+b+"-type-"+a;var h;e("label",{innerHTML:this.lang[b]||b,htmlFor:a},null,d);var k=e("select",{name:a,className:"highcharts-popup-field"},null,d);k.setAttribute("id","highcharts-select-"+b);c.series.forEach(function(a){h=a.options;!h.params&&h.id&&"highcharts-navigator-series"!==h.id&&e("option",{innerHTML:h.name||h.id,value:h.id},null,k)});g(f)&&(k.value=
f)},addFormFields:function(a,b,c,d){var f=b.params||b.options.params,g=this.indicators.getNameType;d.innerHTML="";e("h3",{className:"highcharts-indicator-title",innerHTML:g(b,c).name},null,d);e("input",{type:"hidden",name:"highcharts-type-"+c,value:c},null,d);this.indicators.listAllSeries.call(this,c,"series",a,d,b.linkedParent&&f.volumeSeriesID);f.volumeSeriesID&&this.indicators.listAllSeries.call(this,c,"volume",a,d,b.linkedParent&&b.linkedParent.options.id);this.indicators.addParamInputs.call(this,
a,"params",f,c,d)},addParamInputs:function(b,c,d,e,f){var g=this,h=this.indicators.addParamInputs,k=this.addInput,l;n(d,function(d,m){l=c+"."+m;a(d)?h.call(g,b,l,d,e,f):"params.volumeSeriesID"!==l&&k.call(g,l,e,f,[d,"text"])})},getAmount:function(){var a=0;this.series.forEach(function(b){var c=b.options;(b.params||c&&c.params)&&a++});return a}},tabs:{init:function(a){var b=this.tabs;a=this.indicators.getAmount.call(a);var c=b.addMenuItem.call(this,"add");b.addMenuItem.call(this,"edit",a);b.addContentItem.call(this,
"add");b.addContentItem.call(this,"edit");b.switchTabs.call(this,a);b.selectTab.call(this,c,0)},addMenuItem:function(a,b){var c=this.popup.container,d="highcharts-tab-item",f=this.lang;0===b&&(d+=" highcharts-tab-disabled");b=e("span",{innerHTML:f[a+"Button"]||a,className:d},null,c);b.setAttribute("highcharts-data-tab-type",a);return b},addContentItem:function(){return e("div",{className:"highcharts-tab-item-content"},null,this.popup.container)},switchTabs:function(a){var b=this,c;this.popup.container.querySelectorAll(".highcharts-tab-item").forEach(function(d,
e){c=d.getAttribute("highcharts-data-tab-type");"edit"===c&&0===a||["click","touchstart"].forEach(function(a){l(d,a,function(){b.tabs.deselectAll.call(b);b.tabs.selectTab.call(b,this,e)})})})},selectTab:function(a,b){var c=this.popup.container.querySelectorAll(".highcharts-tab-item-content");a.className+=" highcharts-tab-item-active";c[b].className+=" highcharts-tab-item-show"},deselectAll:function(){var a=this.popup.container,b=a.querySelectorAll(".highcharts-tab-item");a=a.querySelectorAll(".highcharts-tab-item-content");
var c;for(c=0;c<b.length;c++)b[c].classList.remove("highcharts-tab-item-active"),a[c].classList.remove("highcharts-tab-item-show")}}};l(k,"showPopup",function(a){this.popup||(this.popup=new d.Popup(this.chart.container,this.chart.options.navigation.iconsURL||this.chart.options.stockTools&&this.chart.options.stockTools.gui.iconsURL||"https://code.highcharts.com/8.2.0/gfx/stock-icons/"));this.popup.showForm(a.formType,this.chart,a.options,a.onSubmit)});l(k,"closePopup",function(){this.popup&&this.popup.closePopup()})});
u(d,"masters/modules/annotations-advanced.src.js",[],function(){})});
//# sourceMappingURL=annotations-advanced.js.map