!/**
 * Highcharts JS v13.0.0 (2026-06-11)
 * @module highcharts/modules/annotations
 * @requires highcharts
 *
 * Annotations module
 *
 * (c) 2009-2026 Highsoft AS
 * Author: Torstein Hønsi
 *
 * A commercial license may be required depending on use,
 * see www.highcharts.com/license
 */function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(t._Highcharts,t._Highcharts.SeriesRegistry,t._Highcharts.Templating,t._Highcharts.AST,t._Highcharts.Color):"function"==typeof define&&define.amd?define("highcharts/modules/annotations",["highcharts/highcharts"],function(t){return e(t,t.SeriesRegistry,t.Templating,t.AST,t.Color)}):"object"==typeof exports?exports["highcharts/modules/annotations"]=e(t._Highcharts,t._Highcharts.SeriesRegistry,t._Highcharts.Templating,t._Highcharts.AST,t._Highcharts.Color):t.Highcharts=e(t.Highcharts,t.Highcharts.SeriesRegistry,t.Highcharts.Templating,t.Highcharts.AST,t.Highcharts.Color)}("u"<typeof window?this:window,(t,e,i,s,o)=>(()=>{"use strict";var n,a,r,h,l,c={512:t=>{t.exports=e},620:t=>{t.exports=o},660:t=>{t.exports=s},944:e=>{e.exports=t},984:t=>{t.exports=i}},p={};function d(t){var e=p[t];if(void 0!==e)return e.exports;var i=p[t]={exports:{}};return c[t](i,i.exports,d),i.exports}d.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return d.d(e,{a:e}),e},d.d=(t,e)=>{for(var i in e)d.o(e,i)&&!d.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},d.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var u={};d.d(u,{default:()=>ee});var g=d(944),m=d.n(g);function f(t,e){let i=this.initAnnotation(t);return this.options.annotations.push(i.options),(0,g.pick)(e,!0)&&(i.redraw(),i.graphic.attr({opacity:1})),i}function v(){let t=this;t.plotBoxClip=this.renderer.clipRect(this.plotBox),t.controlPointsGroup=t.renderer.g("control-points").attr({zIndex:99}).clip(t.plotBoxClip).add(),t.options.annotations.forEach((e,i)=>{if(!t.annotations.some(t=>t.options===e)){let s=t.initAnnotation(e);t.options.annotations[i]=s.options}}),t.drawAnnotations(),(0,g.addEvent)(t,"redraw",t.drawAnnotations),(0,g.addEvent)(t,"destroy",function(){t.plotBoxClip.destroy(),t.controlPointsGroup.destroy()}),(0,g.addEvent)(t,"exportData",function(e){let i=t.annotations,s=(this.options.exporting&&this.options.exporting.csv||{}).columnHeaderFormatter,o=!e.dataRows[1].xValues,n=t.options.lang&&t.options.lang.exportData&&t.options.lang.exportData.annotationHeader,a=e.dataRows[0].length,r=t.options.exporting?.csv?.annotations?.itemDelimiter,h=t.options.exporting?.csv?.annotations?.join;i.forEach(t=>{t.options.labelOptions?.includeInDataExport&&t.labels.forEach(t=>{if(t.options.text){let i=t.options.text;t.points.forEach(t=>{let s=t.x,o=t.series.xAxis?t.series.xAxis.index:-1,n=!1;if(-1===o){let t=e.dataRows[0].length,a=Array(t);for(let e=0;e<t;++e)a[e]="";a.push(i),a.xValues=[],a.xValues[o]=s,e.dataRows.push(a),n=!0}if(n||e.dataRows.forEach(t=>{!n&&t.xValues&&void 0!==o&&s===t.xValues[o]&&(h&&t.length>a?t[t.length-1]+=r+i:t.push(i),n=!0)}),!n){let t=e.dataRows[0].length,n=Array(t);for(let e=0;e<t;++e)n[e]="";n[0]=s,n.push(i),n.xValues=[],void 0!==o&&(n.xValues[o]=s),e.dataRows.push(n)}})}})});let l=0;e.dataRows.forEach(t=>{l=Math.max(l,t.length)});let c=l-e.dataRows[0].length;for(let t=0;t<c;t++){let i=function(t){let e;return s&&!1!==(e=s(t))?e:(e=n+" "+t,o)?{columnTitle:e,topLevelColumnTitle:e}:e}(t+1);o?(e.dataRows[0].push(i.topLevelColumnTitle),e.dataRows[1].push(i.columnTitle)):e.dataRows[0].push(i)}})}function y(){this.plotBoxClip.attr(this.plotBox),this.annotations.forEach(t=>{t.redraw(),t.graphic.animate({opacity:1},t.animationConfig)})}function x(t){let e=this.annotations,i="annotations"===t.coll?t:(0,g.find)(e,function(e){return e.options.id===t});i&&((0,g.fireEvent)(i,"remove"),(0,g.erase)(this.options.annotations,i.options),(0,g.erase)(e,i),i.destroy())}function b(){let t=this.options.annotations,e=this.userOptions.annotations;this.annotations=[],(0,g.isArray)(this.options.annotations)||(this.options.annotations=[]),(0,g.isObject)(e,!0)&&(0,g.isObject)(t,!0)&&this.options.annotations.push(t)}function A(t){this.chart.hasDraggedAnnotation||t.apply(this,Array.prototype.slice.call(arguments,1))}(a||(a={})).compose=function(t,e,i){let s=e.prototype;if(!s.addAnnotation){let o=i.prototype;(0,g.addEvent)(e,"afterInit",b),s.addAnnotation=f,s.callbacks.push(v),s.collectionsWithInit.annotations=[f],s.collectionsWithUpdate.push("annotations"),s.drawAnnotations=y,s.removeAnnotation=x,s.initAnnotation=function(e){let i=new(t.types[e.type]||t)(this,e);return this.annotations.push(i),i},(0,g.wrap)(o,"onContainerMouseDown",A)}};let E=a,k={visible:!0,animation:{},crop:!0,draggable:"xy",labelOptions:{align:"center",allowOverlap:!1,backgroundColor:"rgba(0, 0, 0, 0.75)",borderColor:"var(--highcharts-neutral-color-100)",borderRadius:3,borderWidth:1,className:"highcharts-no-tooltip",crop:!1,formatter:function(){return(0,g.defined)(this.y)?""+this.y:"Annotation label"},includeInDataExport:!0,overflow:"justify",padding:5,shadow:!1,shape:"callout",style:{fontSize:"0.7em",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:{events:{},style:{cursor:"pointer",fill:"var(--highcharts-background-color)",stroke:"var(--highcharts-neutral-color-100)","stroke-width":2},height:10,symbol:"circle",visible:!1,width:10},events:{},typeOptions:{},types:{},zIndex:6},{doc:w,isTouchDevice:C}=m(),P=class{addEvents(){let t=this,e=function(e){(0,g.addEvent)(e,C?"touchstart":"mousedown",e=>{t.onMouseDown(e)},{passive:!1})};if(e(this.graphic.element),(t.labels||[]).forEach(t=>{t.options.useHTML&&t.graphic.text&&!t.graphic.text.foreignObject&&e(t.graphic.text.element)}),(0,g.objectEach)(t.options.events,(e,i)=>{let s=function(s){"click"===i&&t.cancelClick||e.call(t,t.chart.pointer?.normalize(s),t.target,t)};-1===(t.nonDOMEvents||[]).indexOf(i)?((0,g.addEvent)(t.graphic.element,i,s,{passive:!1}),t.graphic.div&&(0,g.addEvent)(t.graphic.div,i,s,{passive:!1})):(0,g.addEvent)(t,i,s,{passive:!1})}),t.options.draggable&&((0,g.addEvent)(t,"drag",t.onDrag),!t.graphic.renderer.styledMode)){let e={cursor:{x:"ew-resize",y:"ns-resize",xy:"move"}[t.options.draggable]};t.graphic.css(e),(t.labels||[]).forEach(t=>{t.options.useHTML&&t.graphic.text&&!t.graphic.text.foreignObject&&t.graphic.text.css(e)})}t.isUpdating||(0,g.fireEvent)(t,"add")}destroy(){this.removeDocEvents(),(0,g.removeEvent)(this),this.hcEvents=null}mouseMoveToRadians(t,e,i){let s=t.prevChartY-i,o=t.prevChartX-e,n=t.chartY-i,a=t.chartX-e,r;return this.chart.inverted&&(r=o,o=s,s=r,r=a,a=n,n=r),Math.atan2(n,a)-Math.atan2(s,o)}mouseMoveToScale(t,e,i){let s=t.prevChartX-e,o=t.prevChartY-i,n=t.chartX-e,a=t.chartY-i,r=(n||1)/(s||1),h=(a||1)/(o||1);if(this.chart.inverted){let t=h;h=r,r=t}return{x:r,y:h}}mouseMoveToTranslation(t){let e=t.chartX-t.prevChartX,i=t.chartY-t.prevChartY,s;return this.chart.inverted&&(s=i,i=e,e=s),{x:e,y:i}}onDrag(t){if(this.chart.isInsidePlot(t.chartX-this.chart.plotLeft,t.chartY-this.chart.plotTop,{visiblePlotOnly:!0})){let e=this.mouseMoveToTranslation(t);"x"===this.options.draggable&&(e.y=0),"y"===this.options.draggable&&(e.x=0),this.points.length?this.translate(e.x,e.y):(this.shapes.forEach(t=>t.translate(e.x,e.y)),this.labels.forEach(t=>t.translate(e.x,e.y))),this.redraw(!1)}}onMouseDown(t){if(t.preventDefault&&t.preventDefault(),2===t.button)return;let e=this,i=e.chart.pointer,s=t?.sourceCapabilities?.firesTouchEvents||!1,o=(t=i?.normalize(t)||t).chartX,n=t.chartY;e.cancelClick=!1,e.chart.hasDraggedAnnotation=!0,e.removeDrag=(0,g.addEvent)(w,C||s?"touchmove":"mousemove",function(t){e.hasDragged=!0,(t=i?.normalize(t)||t).prevChartX=o,t.prevChartY=n,(0,g.fireEvent)(e,"drag",t),o=t.chartX,n=t.chartY},C||s?{passive:!1}:void 0),e.removeMouseUp=(0,g.addEvent)(w,C||s?"touchend":"mouseup",function(){let t=(0,g.pick)(e.target&&e.target.annotation,e.target);t&&(t.cancelClick=e.hasDragged),e.cancelClick=e.hasDragged,e.chart.hasDraggedAnnotation=!1,e.hasDragged&&(0,g.fireEvent)((0,g.pick)(t,e),"afterUpdate"),e.hasDragged=!1,e.onMouseUp()},C||s?{passive:!1}:void 0)}onMouseUp(){this.removeDocEvents()}removeDocEvents(){this.removeDrag&&(this.removeDrag=this.removeDrag()),this.removeMouseUp&&(this.removeMouseUp=this.removeMouseUp())}},O=class extends P{constructor(t,e,i,s){super(),this.nonDOMEvents=["drag"],this.chart=t,this.target=e,this.options=i,this.index=(0,g.pick)(i.index,s)}destroy(){super.destroy(),this.graphic&&(this.graphic=this.graphic.destroy()),this.chart=null,this.target=null,this.options=null}redraw(t){this.graphic[t?"animate":"attr"](this.options.positioner.call(this,this.target,this))}render(){let t=this.chart,e=this.options;this.graphic=t.renderer.symbol(e.symbol,0,0,e.width,e.height).add(t.controlPointsGroup).css(e.style),this.setVisibility(e.visible),this.addEvents()}setVisibility(t){this.graphic[t?"show":"hide"](),this.options.visible=t}update(t){let e=this.chart,i=this.target,s=this.index,o=(0,g.merge)(!0,this.options,t);this.destroy(),this.constructor(e,i,o,s),this.render(e.controlPointsGroup),this.redraw()}};var M=d(512),B=d.n(M);let{series:{prototype:N}}=B();class T{static fromPoint(t){return new T(t.series.chart,null,{x:t.x,y:t.y,xAxis:t.series.xAxis,yAxis:t.series.yAxis})}static pointToPixels(t,e){let i=t.series,s=i.chart,o=t.plotX||0,n=t.plotY||0,a;return s.inverted&&(t.mock?(o=t.plotY,n=t.plotX):(o=s.plotWidth-(t.plotY||0),n=s.plotHeight-(t.plotX||0))),i&&!e&&(o+=(a=i.getPlotBox()).translateX,n+=a.translateY),{x:o,y:n}}static pointToOptions(t){return{x:t.x,y:t.y,xAxis:t.series.xAxis,yAxis:t.series.yAxis}}constructor(t,e,i){this.mock=!0,this.point=this,this.series={visible:!0,chart:t,getPlotBox:N.getPlotBox},this.target=e||null,this.options=i,this.applyOptions(this.getOptions())}applyOptions(t){this.command=t.command,this.setAxis(t,"x"),this.setAxis(t,"y"),this.refresh()}getOptions(){return this.hasDynamicOptions()&&"function"==typeof this.options?this.options(this.target):this.options}hasDynamicOptions(){return"function"==typeof this.options}isInsidePlot(){let t=this.plotX,e=this.plotY,i=this.series.xAxis,s=this.series.yAxis,o={x:t,y:e,isInsidePlot:!0,options:{}};return i&&(o.isInsidePlot=(0,g.defined)(t)&&t>=0&&t<=i.len),s&&(o.isInsidePlot=o.isInsidePlot&&(0,g.defined)(e)&&e>=0&&e<=s.len),(0,g.fireEvent)(this.series.chart,"afterIsInsidePlot",o),o.isInsidePlot}refresh(){let t=this.series,e=t.xAxis,i=t.yAxis,s=this.getOptions();e?(this.x=s.x,this.plotX=e.toPixels(s.x,!0)):(this.x=void 0,this.plotX=s.x),i?(this.y=s.y,this.plotY=i.toPixels(s.y,!0)):(this.y=null,this.plotY=s.y),this.isInside=this.isInsidePlot()}refreshOptions(){let t=this.series,e=t.xAxis,i=t.yAxis;this.x=this.options.x=e?this.options.x=e.toValue(this.plotX,!0):this.plotX,this.y=this.options.y=i?i.toValue(this.plotY,!0):this.plotY}rotate(t,e,i){if(!this.hasDynamicOptions()){let s=Math.cos(i),o=Math.sin(i),n=this.plotX-t,a=this.plotY-e;this.plotX=n*s-a*o+t,this.plotY=n*o+a*s+e,this.refreshOptions()}}scale(t,e,i,s){if(!this.hasDynamicOptions()){let o=this.plotX*i,n=this.plotY*s;this.plotX=(1-i)*t+o,this.plotY=(1-s)*e+n,this.refreshOptions()}}setAxis(t,e){let i=e+"Axis",s=t[i],o=this.series.chart;this.series[i]="object"==typeof s?s:(0,g.defined)(s)?o[i][s]||o.get(s):null}toAnchor(){let t=[this.plotX,this.plotY,0,0];return this.series.chart.inverted&&(t[0]=this.plotY,t[1]=this.plotX),t}translate(t,e,i,s){this.hasDynamicOptions()||(this.plotX+=i,this.plotY+=s,this.refreshOptions())}}!function(t){function e(){let t=this.controlPoints,e=this.options.controlPoints||[];e.forEach((i,s)=>{let o=(0,g.merge)(this.options.controlPointOptions,i);o.index||(o.index=s),e[s]=o,t.push(new O(this.chart,this,o))})}function i(t){let e=t.series.getPlotBox(),i=t.series.chart,s=t.mock?t.toAnchor():i.tooltip&&i.tooltip.getAnchor.call({chart:t.series.chart},t)||[0,0,0,0],o={x:s[0]+(this.options.x||0),y:s[1]+(this.options.y||0),height:s[2]||0,width:s[3]||0};return{relativePosition:o,absolutePosition:(0,g.merge)(o,{x:o.x+(t.mock?e.translateX:i.plotLeft),y:o.y+(t.mock?e.translateY:i.plotTop)})}}function s(){this.controlPoints.forEach(t=>t.destroy()),this.chart=null,this.controlPoints=null,this.points=null,this.options=null,this.annotation&&(this.annotation=null)}function o(){let t=this.options;return t.points||t.point&&(0,g.splat)(t.point)}function n(){let t,e,i=this.getPointsOptions(),s=this.points,o=i?.length||0;for(t=0;t<o;t++){if(!(e=this.point(i[t],s[t]))){s.length=0;return}e.mock&&e.refresh(),s[t]=e}return s}function a(t,e){if(t&&t.series)return t;if(!e||null===e.series){if((0,g.isObject)(t))e=new T(this.chart,this,t);else if((0,g.isString)(t))e=this.chart.get(t)||null;else if("function"==typeof t){let i=t.call(e,this);e=i.series?i:new T(this.chart,this,t)}}return e}function r(t){this.controlPoints.forEach(e=>e.redraw(t))}function h(){this.controlPoints.forEach(t=>t.render())}function l(t,e,i,s,o){if(this.chart.inverted){let t=e;e=i,i=t}this.points.forEach((n,a)=>this.transformPoint(t,e,i,s,o,a),this)}function c(t,e,i,s,o,n){let a=this.points[n];a.mock||(a=this.points[n]=T.fromPoint(a)),a[t](e,i,s,o)}function p(t,e){this.transform("translate",null,null,t,e)}function d(t,e,i){this.transformPoint("translate",null,null,t,e,i)}t.compose=function(t){let u=t.prototype;u.addControlPoints||(0,g.merge)(!0,u,{addControlPoints:e,anchor:i,destroyControlTarget:s,getPointsOptions:o,linkPoints:n,point:a,redrawControlPoints:r,renderControlPoints:h,transform:l,transformPoint:c,translate:p,translatePoint:d})}}(r||(r={}));let S=r;class L{constructor(t,e,i,s){this.annotation=t,this.chart=t.chart,this.collection="label"===s?"labels":"shapes",this.controlPoints=[],this.options=e,this.points=[],this.index=i,this.itemType=s,this.init(t,e,i)}attr(){this.graphic.attr.apply(this.graphic,arguments)}attrsFromOptions(t){let e,i,s=this.constructor.attrsMap,o={},n=this.chart.styledMode;for(e in t)i=s[e],void 0===s[e]||n&&-1!==["fill","stroke","stroke-width"].indexOf(i)||(o[i]=t[e]);return o}destroy(){this.graphic&&(this.graphic=this.graphic.destroy()),this.tracker&&(this.tracker=this.tracker.destroy()),this.destroyControlTarget()}calculateAnnotationSize(t,e,i){let s=i.toPixels(t,!0);return Math.abs(i.toPixels(t+e,!0)-s)}init(t,e,i){this.annotation=t,this.chart=t.chart,this.options=e,this.points=[],this.controlPoints=[],this.index=i,this.linkPoints(),this.addControlPoints()}redraw(t){this.redrawControlPoints(t)}render(t){this.options.className&&this.graphic&&this.graphic.addClass(this.options.className),this.renderControlPoints()}rotate(t,e,i){this.transform("rotate",t,e,i)}scale(t,e,i,s){this.transform("scale",t,e,i,s)}setControlPointsVisibility(t){this.controlPoints.forEach(e=>{e.setVisibility(t)})}shouldBeDrawn(){return!!this.points.length}translateShape(t,e,i){let s=this.annotation.chart,o=this.annotation.userOptions,n=s.annotations.indexOf(this.annotation),a=s.options.annotations[n];this.translatePoint(t,e,0),i&&this.translatePoint(t,e,1),a[this.collection][this.index].point=this.options.point,o[this.collection][this.index].point=this.options.point}update(t){let e=this.annotation,i=(0,g.merge)(!0,this.options,t),s=this.graphic.parentGroup,o=this.constructor;this.destroy();let n=new o(e,i,this.index,this.itemType);(0,g.merge)(!0,this,n),this.render(s),this.redraw()}}S.compose(L);let I=L,{defaultMarkers:D}={defaultMarkers:{arrow:{tagName:"marker",attributes:{id:"arrow",refY:5,refX:9,markerWidth:10,markerHeight:10},children:[{tagName:"path",attributes:{d:"M 0 0 L 10 5 L 0 10 Z","stroke-width":0}}]},"reverse-arrow":{tagName:"marker",attributes:{id:"reverse-arrow",refY:5,refX:1,markerWidth:10,markerHeight:10},children:[{tagName:"path",attributes:{d:"M 0 5 L 10 0 L 10 10 Z","stroke-width":0}}]}}},Y=R("marker-end"),X=R("marker-start"),F="rgba(192,192,192,"+(m().svg?1e-4:.002)+")";function R(t){return function(e){this.attr(t,"url(#"+e+")")}}function U(){this.options.defs=(0,g.merge)(D,this.options.defs||{})}function W(t,e){let i={attributes:{id:t}},s={stroke:e.color||"none",fill:e.color||"rgba(0, 0, 0, 0.75)"};i.children=e.children&&e.children.map(function(t){return(0,g.merge)(s,t)});let o=(0,g.merge)(!0,{attributes:{markerWidth:20,markerHeight:20,refX:0,refY:0,orient:"auto"}},e,i),n=this.definition(o);return n.id=t,n}class j extends I{static compose(t,e){let i=e.prototype;i.addMarker||((0,g.addEvent)(t,"afterGetContainer",U),i.addMarker=W)}constructor(t,e,i){super(t,e,i,"shape"),this.type="path"}init(t,e,i){(0,g.defined)(e.yAxis)&&e.points.forEach(t=>{t&&"string"!=typeof t&&(t.yAxis=e.yAxis)}),(0,g.defined)(e.xAxis)&&e.points.forEach(t=>{t&&"string"!=typeof t&&(t.xAxis=e.xAxis)}),super.init(t,e,i)}toD(){let t=this.options.d;if(t)return"function"==typeof t?t.call(this):t;let e=this.points,i=e.length,s=[],o=i,n=e[0],a=o&&this.anchor(n).absolutePosition,r=0,h;if(a)for(s.push(["M",a.x,a.y]);++r<i&&o;)h=(n=e[r]).command||"L",a=this.anchor(n).absolutePosition,"M"===h||"L"===h?s.push([h,a.x,a.y]):"Z"===h&&s.push([h]),o=n.series.visible;return o&&this.graphic?this.chart.renderer.crispLine(s,this.graphic.strokeWidth()):null}shouldBeDrawn(){return super.shouldBeDrawn()||!!this.options.d}render(t){let e=this.options,i=this.attrsFromOptions(e);this.graphic=this.annotation.chart.renderer.path([["M",0,0]]).attr(i).add(t),this.tracker=this.annotation.chart.renderer.path([["M",0,0]]).addClass("highcharts-tracker-line").attr({zIndex:2}).add(t),this.annotation.chart.styledMode||this.tracker.attr({"stroke-linejoin":"round",stroke:F,fill:F,"stroke-width":this.graphic.strokeWidth()+2*e.snap}),super.render(),(0,g.extend)(this.graphic,{markerStartSetter:X,markerEndSetter:Y}),this.setMarkers(this)}redraw(t){if(this.graphic){let e=this.toD(),i=t?"animate":"attr";e?(this.graphic[i]({d:e}),this.tracker[i]({d:e})):(this.graphic.attr({d:"M 0 -9000000000"}),this.tracker.attr({d:"M 0 -9000000000"})),this.graphic.placed=this.tracker.placed=!!e}super.redraw(t)}setMarkers(t){let e=t.options,i=t.chart,s=i.options.defs,o=e.fill,n=(0,g.defined)(o)&&"none"!==o?o:e.stroke;["markerStart","markerEnd"].forEach(function(o){let a,r,h,l,c=e[o];if(c){for(h in s)if((c===((a=s[h]).attributes&&a.attributes.id)||c===a.id)&&"marker"===a.tagName){r=a;break}r&&(l=t[o]=i.renderer.addMarker((e.id||(0,g.uniqueKey)())+"-"+c,(0,g.merge)(r,{color:n})),t.attr(o,l.getAttribute("id")))}})}}j.attrsMap={dashStyle:"dashstyle",strokeWidth:"stroke-width",stroke:"stroke",fill:"fill",zIndex:"zIndex"};class H extends I{constructor(t,e,i){super(t,e,i,"shape"),this.type="rect",this.translate=super.translateShape}init(t,e,i){let{point:s,xAxis:o,yAxis:n}=e;s&&"string"!=typeof s&&((0,g.defined)(o)&&(s.xAxis=o),(0,g.defined)(n)&&(s.yAxis=n)),super.init(t,e,i)}render(t){let e=this.attrsFromOptions(this.options);this.graphic=this.annotation.chart.renderer.rect(0,-9e9,0,0).attr(e).add(t),super.render()}redraw(t){if(this.graphic){let e=this.points[0],i=this.anchor(e).absolutePosition,s=this.options.width||0,o=this.options.height||0;if(i){let n=(0,g.defined)(this.options.xAxis)?this.chart.xAxis[this.options.xAxis]:void 0,a=(0,g.defined)(this.options.yAxis)?this.chart.yAxis[this.options.yAxis]:void 0;n&&(0,g.defined)(e.x)&&(s=this.calculateAnnotationSize(e.x,s,n)),a&&(0,g.defined)(e.y)&&(o=this.calculateAnnotationSize(e.y,o,a)),this.graphic[t?"animate":"attr"]({x:i.x,y:i.y,width:s,height:o})}else this.attr({x:0,y:-9e9});this.graphic.placed=!!i}super.redraw(t)}}H.attrsMap=(0,g.merge)(j.attrsMap,{width:"width",height:"height"});class z extends I{constructor(t,e,i){super(t,e,i,"shape"),this.type="circle",this.translate=super.translateShape}init(t,e,i){let{point:s,xAxis:o,yAxis:n}=e;s&&"string"!=typeof s&&((0,g.defined)(o)&&(s.xAxis=o),(0,g.defined)(n)&&(s.yAxis=n)),super.init(t,e,i)}redraw(t){if(this.graphic){let e=this.points[0],i=this.anchor(e).absolutePosition,s=this.options.r||0;if(i){let o=(0,g.defined)(this.options.yAxis)?this.chart.yAxis[this.options.yAxis]:void 0;o&&(0,g.defined)(e.y)&&(s=this.calculateAnnotationSize(e.y,s,o)),this.graphic[t?"animate":"attr"]({x:i.x,y:i.y,r:s})}else this.graphic.attr({x:0,y:-9e9});this.graphic.placed=!!i}super.redraw.call(this,t)}render(t){let e=this.attrsFromOptions(this.options);this.graphic=this.annotation.chart.renderer.circle(0,-9e9,0).attr(e).add(t),super.render()}setRadius(t){this.options.r=t}}z.attrsMap=(0,g.merge)(j.attrsMap,{r:"r"});class V extends I{constructor(t,e,i){super(t,e,i,"shape"),this.type="ellipse"}init(t,e,i){(0,g.defined)(e.yAxis)&&e.points.forEach(t=>{t&&"string"!=typeof t&&(t.yAxis=e.yAxis)}),(0,g.defined)(e.xAxis)&&e.points.forEach(t=>{t&&"string"!=typeof t&&(t.xAxis=e.xAxis)}),super.init(t,e,i)}render(t){this.graphic=this.annotation.chart.renderer.createElement("ellipse").attr(this.attrsFromOptions(this.options)).add(t),super.render()}translate(t,e){super.translateShape(t,e,!0)}getDistanceFromLine(t,e,i,s){return Math.abs((e.y-t.y)*i-(e.x-t.x)*s+e.x*t.y-e.y*t.x)/Math.sqrt((e.y-t.y)*(e.y-t.y)+(e.x-t.x)*(e.x-t.x))}getAttrs(t,e){let i=t.x,s=t.y,o=e.x,n=e.y,a=(i+o)/2,r=Math.sqrt((i-o)*(i-o)/4+(s-n)*(s-n)/4),h=180*Math.atan((n-s)/(o-i))/Math.PI;return a<i&&(h+=180),{cx:a,cy:(s+n)/2,rx:r,ry:this.getRY(),angle:h}}getRY(){let t=this.getYAxis();return(0,g.defined)(t)?Math.abs(t.toPixels(this.options.ry)-t.toPixels(0)):this.options.ry}getYAxis(){let t=this.options.yAxis;return this.chart.yAxis[t]}getAbsolutePosition(t){return this.anchor(t).absolutePosition}redraw(t){if(this.graphic){let e=this.getAbsolutePosition(this.points[0]),i=this.getAbsolutePosition(this.points[1]),s=this.getAttrs(e,i);e?this.graphic[t?"animate":"attr"]({cx:s.cx,cy:s.cy,rx:s.rx,ry:s.ry,rotation:s.angle,rotationOriginX:s.cx,rotationOriginY:s.cy}):this.graphic.attr({x:0,y:-9e9}),this.graphic.placed=!!e}super.redraw(t)}setYRadius(t){let e=this.annotation.userOptions.shapes;this.options.ry=t,e&&e[0]&&(e[0].ry=t,e[0].ry=t)}}V.attrsMap=(0,g.merge)(j.attrsMap,{ry:"ry"});var q=d(984),$=d.n(q);let{format:_}=$();function G(t,e,i,s,o){let n=o&&o.anchorX,a=o&&o.anchorY,r,h,l=i/2;return(0,g.isNumber)(n)&&(0,g.isNumber)(a)&&(r=[["M",n,a]],(h=e-a)<0&&(h=-s-h),h<i&&(l=n<t+i/2?h:i-h),a>e+s?r.push(["L",t+l,e+s]):a<e?r.push(["L",t+l,e]):n<t?r.push(["L",t,e+s/2]):n>t+i&&r.push(["L",t+i,e+s/2])),r||[]}class K extends I{static alignedPosition(t,e){return{x:Math.round((e.x||0)+(t.x||0)+(e.width-(t.width||0))*(0,g.getAlignFactor)(t.align)),y:Math.round((e.y||0)+(t.y||0)+(e.height-(t.height||0))*(0,g.getAlignFactor)(t.verticalAlign))}}static compose(t){t.prototype.symbols.connector=G}static justifiedOptions(t,e,i,s){let o,n=i.align,a=i.verticalAlign,r=e.box?0:e.padding||0,h=e.getBBox(),l={align:n,verticalAlign:a,x:i.x,y:i.y,width:e.width,height:e.height},c=(s.x||0)-t.plotLeft,p=(s.y||0)-t.plotTop;return(o=c+r)<0&&("right"===n?l.align="left":l.x=(l.x||0)-o),(o=c+h.width-r)>t.plotWidth&&("left"===n?l.align="right":l.x=(l.x||0)+t.plotWidth-o),(o=p+r)<0&&("bottom"===a?l.verticalAlign="top":l.y=(l.y||0)-o),(o=p+h.height-r)>t.plotHeight&&("top"===a?l.verticalAlign="bottom":l.y=(l.y||0)+t.plotHeight-o),l}constructor(t,e,i){super(t,e,i,"label")}translatePoint(t,e){super.translatePoint(t,e,0)}translate(t,e){var i,s;let o=this.annotation.chart,n=this.annotation.userOptions,a=o.annotations.indexOf(this.annotation),r=o.options.annotations[a];if(o.inverted){let i=t;t=e,e=i}(i=this.options).x||(i.x=0),(s=this.options).y||(s.y=0),this.options.x+=t,this.options.y+=e,r[this.collection][this.index].x=this.options.x,r[this.collection][this.index].y=this.options.y,n[this.collection][this.index].x=this.options.x,n[this.collection][this.index].y=this.options.y}render(t){let e=this.options,i=this.attrsFromOptions(e),s=e.style,o=this.annotation.chart.options.chart,n=o.plotBackgroundColor||o.backgroundColor;if(this.graphic=this.annotation.chart.renderer.label("",0,-9999,e.shape,void 0,void 0,e.useHTML,void 0,"annotation-label").attr(i).add(t),!this.annotation.chart.styledMode){if(s?.color==="contrast"){let t=!e.shape||K.shapesWithoutBackground.indexOf(e.shape)>-1||"none"===e.backgroundColor?n:e.backgroundColor;s.color=this.annotation.chart.renderer.getContrast("string"==typeof t?t:"string"==typeof n?n:"#ffffff")}this.graphic.css(e.style||{}).shadow(e.shadow)}this.graphic.labelrank=e.labelrank,super.render()}redraw(t){let e=this.options,i=this.text||e.format||e.text,s=this.graphic,o=this.points[0];if(!s)return void this.redraw(t);s.attr({text:i?_(String(i),o,this.annotation.chart):e.formatter.call(o,o)});let n=this.anchor(o),a=this.position(n);a?(s.alignAttr=a,a.anchorX=n.absolutePosition.x,a.anchorY=n.absolutePosition.y,s[t?"animate":"attr"](a)):s.attr({x:0,y:-9999}),s.placed=!!a,super.redraw(t)}anchor(t){let e=super.anchor.apply(this,arguments),i=this.options.x||0,s=this.options.y||0;return e.absolutePosition.x-=i,e.absolutePosition.y-=s,e.relativePosition.x-=i,e.relativePosition.y-=s,e}position(t){let e=this.graphic,i=this.annotation.chart,s=i.tooltip,o=this.points[0],n=this.options,a=t.absolutePosition,r=t.relativePosition,h,l,c,p,d=o.series.visible&&T.prototype.isInsidePlot.call(o);if(e&&d){let{width:t=0,height:u=0}=e;n.distance&&s?h=s.getPosition.call({chart:i,distance:(0,g.pick)(n.distance,16),getPlayingField:s.getPlayingField,pointer:s.pointer},t,u,{plotX:r.x,plotY:r.y,negative:o.negative,ttBelow:o.ttBelow,h:r.height||r.width}):n.positioner?h=n.positioner.call(this,this):(l={x:a.x,y:a.y,width:0,height:0},h=K.alignedPosition((0,g.extend)(n,{width:t,height:u}),l),"justify"===this.options.overflow&&(h=K.alignedPosition(K.justifiedOptions(i,e,n,h),l))),n.crop&&(c=h.x-i.plotLeft,p=h.y-i.plotTop,d=i.isInsidePlot(c,p)&&i.isInsidePlot(c+t,p+u))}return d?h:null}}K.attrsMap={backgroundColor:"fill",borderColor:"stroke",borderWidth:"stroke-width",zIndex:"zIndex",borderRadius:"r",padding:"padding"},K.shapesWithoutBackground=["connector"];class Z extends I{constructor(t,e,i){super(t,e,i,"shape"),this.type="image",this.translate=super.translateShape}render(t){let e=this.attrsFromOptions(this.options),i=this.options;this.graphic=this.annotation.chart.renderer.image(i.src,0,-9e9,i.width,i.height).attr(e).add(t),this.graphic.width=i.width,this.graphic.height=i.height,super.render()}redraw(t){if(this.graphic){let e=this.anchor(this.points[0]),i=K.prototype.position.call(this,e);i?this.graphic[t?"animate":"attr"]({x:i.x,y:i.y}):this.graphic.attr({x:0,y:-9e9}),this.graphic.placed=!!i}super.redraw(t)}}Z.attrsMap={width:"width",height:"height",zIndex:"zIndex"};var J=d(660),Q=d.n(J);let tt=t=>`<?xml version="1.0" encoding="utf-8"?>
        <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 ${t} ${t}">`,te="#4B4B4D",ti={"close.svg":`${tt(32)}
<polygon fill="${te}" points="24.308,8.756 23.248,7.695 16.002,14.941 8.757,7.695 7.695,8.754 14.941,16.001 7.696,23.246
    8.755,24.308 16.002,17.061 23.247,24.307 24.308,23.248 17.062,16.001"/>
</svg>
`,"destroy.svg":`${tt(32)}
<g>
    <rect x="12.75" y="14" fill="${te}" width="1.5" height="10"/>
    <rect x="17.75" y="14" fill="${te}" width="1.5" height="10"/>
    <path fill="${te}" d="M25.25,10.5c0-1.517-1.233-2.75-2.75-2.75h-3.25V7c0-1.24-1.01-2.25-2.25-2.25h-2
        c-1.24,0-2.25,1.01-2.25,2.25v0.75H9.5c-1.517,0-2.75,1.233-2.75,2.75v1.751h2V27.25h14.5V12.251h2V10.5z M14.25,7
        c0-0.413,0.337-0.75,0.75-0.75h2c0.413,0,0.75,0.337,0.75,0.75v0.75h-3.5V7z M21.75,25.75h-11.5V12.251h11.5V25.75z M23.75,10.751
        H8.25V10.5c0-0.689,0.561-1.25,1.25-1.25h13c0.689,0,1.25,0.561,1.25,1.25V10.751z"/>
</g>
</svg>
`,"edit.svg":`${tt(32)}
<path fill="${te}" d="M22.125,3.814L5.817,20.122l-1.818,7.879l7.879-1.818L28.186,9.875L22.125,3.814z M26.064,9.875
    l-1.439,1.439l-3.939-3.939l1.439-1.439L26.064,9.875z M10.186,22.875l9.939-9.939l1.439,1.439l-9.939,9.939L10.186,22.875z
     M7.686,20.375l9.939-9.939l1.439,1.439l-9.939,9.939L7.686,20.375z M18.686,9.375l0.939-0.939l3.939,3.939l-0.939,0.939
    L18.686,9.375z M6.974,21.784l3.242,3.242l-4.215,0.973L6.974,21.784z"/>
</svg>
`},ts=(t,e,i)=>{let s,o=i[t];return"renderer"===e&&o?(o=encodeURIComponent(o),s=`url("data:image/svg+xml;charset=utf-8,${o}")`):s=e.startsWith("http")&&e.match(/\.(png|svg|jpe?g|gif)$/ig)?'url("'+e+'")':`url("${e}${t}")`,s},to=class{constructor(t,e){this.iconsURL=e,this.container=this.createPopupContainer(t),this.closeButton=this.addCloseButton()}createPopupContainer(t,e="highcharts-popup highcharts-no-tooltip"){return(0,g.createElement)("div",{className:e},void 0,t)}addCloseButton(t="highcharts-popup-close"){let e=(0,g.createElement)("button",{className:t},void 0,this.container);return(0,g.createElement)("span",{className:"highcharts-icon"},{backgroundImage:ts("close.svg",this.iconsURL,ti)},e),["click","touchstart"].forEach(t=>{(0,g.addEvent)(e,t,this.closeButtonEvents.bind(this))}),(0,g.addEvent)(document,"keydown",t=>{"Escape"===t.code&&this.closeButtonEvents()}),e}closeButtonEvents(){this.closePopup()}showPopup(t="highcharts-annotation-toolbar"){let e=this.container,i=this.closeButton;this.type=void 0,e.innerHTML=Q().emptyHTML,e.className.indexOf(t)>=0&&(e.classList.remove(t),e.removeAttribute("style")),e.appendChild(i),e.style.display="block",e.style.height=""}closePopup(){this.container.style.display="none"}};var tn=d(620),ta=d.n(tn);let{doc:tr,isFirefox:th}=m();function tl(t,e,i,s,o,n){let a,r;if(!e)return;let h=this.addInput,l=this.lang;(0,g.objectEach)(s,(s,n)=>{a=""!==i?i+"."+n:n,(0,g.isObject)(s)&&(!(0,g.isArray)(s)||(0,g.isArray)(s)&&(0,g.isObject)(s[0])?((r=l[n]||n).match(/\d/g)||o.push([!0,r,t]),tl.call(this,t,e,a,s,o,!1)):o.push([this,a,"annotation",t,s]))}),n&&((0,g.stableSort)(o,t=>t[1].match(/format/g)?-1:1),th&&o.reverse(),o.forEach(t=>{!0===t[0]?(0,g.createElement)("span",{className:"highcharts-annotation-title"},void 0,t[2]).appendChild(tr.createTextNode(t[1])):(t[4]={value:t[4][0],type:t[4][1]},h.apply(t[0],t.splice(1)))}))}let{doc:tc}=m(),{seriesTypes:tp}=B();(n=h||(h={}))[n["params.algorithm"]=0]="params.algorithm",n[n["params.average"]=1]="params.average";let td={"algorithm-pivotpoints":["standard","fibonacci","camarilla"],"average-disparityindex":["sma","ema","dema","tema","wma"]};function tu(t){let e=(0,g.createElement)("div",{className:"highcharts-popup-lhs-col"},void 0,t),i=(0,g.createElement)("div",{className:"highcharts-popup-rhs-col"},void 0,t);return(0,g.createElement)("div",{className:"highcharts-popup-rhs-col-wrapper"},void 0,i),{lhsCol:e,rhsCol:i}}function tg(t,e,i,s){let o=e.params||e.options.params;s.innerHTML=Q().emptyHTML,(0,g.createElement)("h3",{className:"highcharts-indicator-title"},void 0,s).appendChild(tc.createTextNode(tE(e,i).indicatorFullName)),(0,g.createElement)("input",{type:"hidden",name:"highcharts-type-"+i,value:i},void 0,s),tk.call(this,i,"series",t,s,e,e.linkedParent&&e.linkedParent.options.id),o.volumeSeriesID&&tk.call(this,i,"volume",t,s,e,e.linkedParent&&o.volumeSeriesID),tf.call(this,t,"params",o,i,s)}function tm(t,e,i,s){function o(e,i){let s=m.parentNode.children[1];tg.call(n,t,e,i,m),s&&(s.style.display="block"),l&&e.options&&(0,g.createElement)("input",{type:"hidden",name:"highcharts-id-"+i,value:e.options.id},void 0,m).setAttribute("highcharts-data-series-id",e.options.id)}let n=this,a=n.lang,r=e.querySelectorAll(".highcharts-popup-lhs-col")[0],h=e.querySelectorAll(".highcharts-popup-rhs-col")[0],l="edit"===i,c=l?t.series:t.options.plotOptions||{};if(!t&&c)return;let p,d=[];l||(0,g.isArray)(c)?(0,g.isArray)(c)&&(d=tA.call(this,c)):d=tb.call(this,c,s),(0,g.stableSort)(d,(t,e)=>{let i=t.indicatorFullName.toLowerCase(),s=e.indicatorFullName.toLowerCase();return i<s?-1:+(i>s)}),r.children[1]&&r.children[1].remove();let u=(0,g.createElement)("ul",{className:"highcharts-indicator-list"},void 0,r),m=h.querySelectorAll(".highcharts-popup-rhs-col-wrapper")[0];if(d.forEach(t=>{let{indicatorFullName:e,indicatorType:i,series:s}=t;p=(0,g.createElement)("li",{className:"highcharts-indicator-list"},void 0,u);let n=(0,g.createElement)("button",{className:"highcharts-indicator-list-item",textContent:e},void 0,p);["click","touchstart"].forEach(t=>{(0,g.addEvent)(n,t,function(){o(s,i)})})}),d.length>0){let{series:t,indicatorType:e}=d[0];o(t,e)}else l||(Q().setElementHTML(m.parentNode.children[0],a.noFilterMatch||""),m.parentNode.children[1].style.display="none")}function tf(t,e,i,s,o){if(!t)return;let n=this.addInput;(0,g.objectEach)(i,(i,a)=>{let r=e+"."+a;if((0,g.defined)(i)&&r)if((0,g.isObject)(i)&&(n.call(this,r,s,o,{}),tf.call(this,t,r,i,s,o)),r in h){let n=ty.call(this,s,r,o);tx.call(this,t,e,n,s,a,i)}else"params.volumeSeriesID"===r||(0,g.isArray)(i)||n.call(this,r,s,o,{value:i,type:"number"})})}function tv(t,e){let i=this,s=e.querySelectorAll(".highcharts-popup-lhs-col")[0],o=this.lang.clearFilter,n=(0,g.createElement)("div",{className:"highcharts-input-wrapper"},void 0,s),a=function(e){tm.call(i,t,i.container,"add",e)},r=this.addInput("searchIndicators","input",n,{value:"",type:"text",htmlFor:"search-indicators",labelClassName:"highcharts-input-search-indicators-label"}),h=(0,g.createElement)("a",{textContent:o},void 0,n);r.classList.add("highcharts-input-search-indicators"),h.classList.add("clear-filter-button"),(0,g.addEvent)(r,"input",function(){a(this.value),this.value.length?h.style.display="inline-block":h.style.display="none"}),["click","touchstart"].forEach(t=>{(0,g.addEvent)(h,t,function(){r.value="",a(""),h.style.display="none"})})}function ty(t,e,i){let s=e.split("."),o=s[s.length-1],n="highcharts-"+e+"-type-"+t,a=this.lang;(0,g.createElement)("label",{htmlFor:n},null,i).appendChild(tc.createTextNode(a[o]||e));let r=(0,g.createElement)("select",{name:n,className:"highcharts-popup-field",id:"highcharts-select-"+e},null,i);return r.setAttribute("id","highcharts-select-"+e),r}function tx(t,e,i,s,o,n,a){"series"===e||"volume"===e?t.series.forEach(t=>{let s=t.options,o=s.name||s.params?t.name:s.id||"";"highcharts-navigator-series"!==s.id&&s.id!==(a&&a.options&&a.options.id)&&((0,g.defined)(n)||"volume"!==e||"column"!==t.type||(n=s.id),(0,g.createElement)("option",{value:s.id},void 0,i).appendChild(tc.createTextNode(o)))}):s&&o&&td[o+"-"+s].forEach(t=>{(0,g.createElement)("option",{value:t},void 0,i).appendChild(tc.createTextNode(t))}),(0,g.defined)(n)&&(i.value=n)}function tb(t,e){let i,s=this.chart&&this.chart.options.lang,o=s&&s.navigation&&s.navigation.popup&&s.navigation.popup.indicatorAliases,n=new Map;return(0,g.objectEach)(t,(t,s)=>{let a=t&&t.options;if(t.params||a&&a.params){let{indicatorFullName:a,indicatorType:r}=tE(t,s);if(e){let s=RegExp(e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i"),h=o&&o[r]&&o[r].join(" ")||"";(a.match(s)||h.match(s))&&(i={indicatorFullName:a,indicatorType:r,series:t},n.set(r.toLowerCase(),i))}else i={indicatorFullName:a,indicatorType:r,series:t},n.set(r.toLowerCase(),i)}}),Array.from(n.values())}function tA(t){let e=[];return t.forEach(t=>{t.is("sma")&&e.push({indicatorFullName:t.name,indicatorType:t.type,series:t})}),e}function tE(t,e){let i=t.options,s=tp[e]&&tp[e].prototype.nameBase||e.toUpperCase(),o=e;return i&&i.type&&(o=t.options.type,s=t.name),{indicatorFullName:s,indicatorType:o}}function tk(t,e,i,s,o,n){if(!i)return;let a=ty.call(this,t,e,s);tx.call(this,i,e,a,void 0,void 0,void 0,o),(0,g.defined)(n)&&(a.value=n)}let{doc:tw}=m();function tC(){let t=this.container;return(0,g.createElement)("div",{className:"highcharts-tab-item-content highcharts-no-mousewheel"},void 0,t)}function tP(t,e){let i=this.container,s=this.lang,o="highcharts-tab-item";0===e&&(o+=" highcharts-tab-disabled");let n=(0,g.createElement)("button",{className:o},void 0,i);return n.appendChild(tw.createTextNode(s[t+"Button"]||t)),n.setAttribute("highcharts-data-tab-type",t),n}function tO(){let t=this.container,e=t.querySelectorAll(".highcharts-tab-item"),i=t.querySelectorAll(".highcharts-tab-item-content");for(let t=0;t<e.length;t++)e[t].classList.remove("highcharts-tab-item-active"),i[t].classList.remove("highcharts-tab-item-show")}function tM(t,e){let i=this.container.querySelectorAll(".highcharts-tab-item-content");t.className+=" highcharts-tab-item-active",i[e].className+=" highcharts-tab-item-show"}function tB(t){let e=this;this.container.querySelectorAll(".highcharts-tab-item").forEach((i,s)=>{(0!==t||"edit"!==i.getAttribute("highcharts-data-tab-type"))&&["click","touchstart"].forEach(t=>{(0,g.addEvent)(i,t,function(){tO.call(e),tM.call(e,this,s)})})})}let{doc:tN}=m(),{getOptions:tT}=m();class tS extends to{constructor(t,e,i){super(t,e),this.chart=i,this.lang=(tT().lang.navigation||{}).popup||{},(0,g.addEvent)(this.container,"mousedown",()=>{let t=i&&i.navigationBindings&&i.navigationBindings.activeAnnotation;if(t){t.cancelClick=!0;let e=(0,g.addEvent)(tN,"click",()=>{setTimeout(()=>{t.cancelClick=!1},0),e()})}})}addInput(t,e,i,s){let o=t.split("."),n=o[o.length-1],a=this.lang,r="highcharts-"+e+"-"+(0,g.pick)(s.htmlFor,n);if(n.match(/^\d+$/)||(0,g.createElement)("label",{htmlFor:r,className:s.labelClassName},void 0,i).appendChild(tN.createTextNode(a[n]||n)),"color"===s.type&&this.chart?.container)return this.createColorInput(t,r,s,i,this.chart.container);let h=(0,g.createElement)("input",{name:r,value:s.value,type:s.type,className:"highcharts-popup-field"},void 0,i);return h.setAttribute("highcharts-data-name",t),h}createColorInput(t,e,i,s,o){let{value:n,alpha:a}=function(t,e){let i=t=>("0"+Math.round(t).toString(16)).slice(-2).toUpperCase(),s=t=>{let[e,s,o,n]=ta().parse(t).rgba;return{value:"#"+i(e)+i(s)+i(o),alpha:n}};if(t.startsWith("rgb")||t.startsWith("rgba"))return s(t);if(t.startsWith("color")||t.startsWith("var")){let o=tN.createElement("span");o.style.setProperty("color",t),e.appendChild(o);let n=window.getComputedStyle(o).color;if(e.removeChild(o),n.startsWith("color")){let t=n.match(RegExp("color\\s*\\(\\s*srgb\\s+([\\d.]+)\\s+([\\d.]+)\\s+([\\d.]+)\\s+(?:\\s*\\/\\s*([\\d.]+))?\\s*\\)"));if(t){let e=Math.round(255*parseFloat(t[1])),s=Math.round(255*parseFloat(t[2])),o=Math.round(255*parseFloat(t[3])),n=t[4]?parseFloat(t[4]):1;return{value:"#"+i(e)+i(s)+i(o),alpha:n}}}if(n.startsWith("rgb")||n.startsWith("rgba"))return s(n)}return{value:t,alpha:1}}(i.value||"",o),r=ta().parse(i.value||"").rgba[3],h=isNaN(r)?a:r,l=(0,g.createElement)("div",{className:"highcharts-popup-color-wrapper"},void 0,s),c=(0,g.createElement)("input",{type:"color",value:n,className:"highcharts-popup-field highcharts-popup-field-color"},void 0,l),p=(0,g.createElement)("input",{name:e,id:e,value:n,type:"text",className:"highcharts-popup-field highcharts-popup-field-text"},void 0,l);p.setAttribute("highcharts-data-name",t);let d=(0,g.createElement)("span",{className:"highcharts-popup-color-separator"},void 0,l),u=(0,g.createElement)("input",{type:"number",value:String(Math.round(100*h)),className:"highcharts-popup-field highcharts-popup-opacity-percentage",min:"0",max:"100",step:"1"},void 0,l),m=(0,g.createElement)("span",{className:"highcharts-popup-opacity-percent-suffix"},void 0,l);m.appendChild(tN.createTextNode(" %"));let f=(0,g.createElement)("input",{type:"range",value:String(Math.round(100*h)),className:"highcharts-popup-opacity-slider",min:"0",max:"100",step:"1"},void 0,s);f.style.setProperty("--highcharts-popup-opacity-track-color",n),f.style.setProperty("display","none");let v=()=>{let t=/^#[0-9A-Fa-f]{6}$/.test(p.value);d.style.display=t?"":"none",u.style.display=t?"":"none",m.style.display=t?"":"none"};v();let y=t=>{let e=t.target,i=(0,g.clamp)(Number(e.value),0,100);f.value=String(i),u.value=String(Math.round(i))},x=t=>{t.target===c?p.value=c.value.toUpperCase():c.value=p.value,f.style.setProperty("--highcharts-popup-opacity-track-color",c.value),v()};return(0,g.addEvent)(s,"mousedown",t=>{t.target!==u&&t.target!==f&&(f.style.display="none")}),(0,g.addEvent)(u,"focus",()=>{f.style.display=""}),(0,g.addEvent)(u,"input",y),(0,g.addEvent)(f,"input",y),(0,g.addEvent)(c,"input",x),(0,g.addEvent)(p,"input",x),l}closeButtonEvents(){if(this.chart){let t=this.chart.navigationBindings;(0,g.fireEvent)(t,"closePopup"),t&&t.selectedButtonElement&&(0,g.fireEvent)(t,"deselectButton",{button:t.selectedButtonElement})}else super.closeButtonEvents()}addButton(t,e,i,s,o){let n=(0,g.createElement)("button",void 0,void 0,t);return n.appendChild(tN.createTextNode(e)),o&&["click","touchstart"].forEach(t=>{(0,g.addEvent)(n,t,()=>{let t,e,n,a,r;return this.closePopup(),o((t=Array.prototype.slice.call(s.querySelectorAll("input")),e=Array.prototype.slice.call(s.querySelectorAll("select")),n=s.querySelectorAll("#highcharts-select-series > option:checked")[0],a=s.querySelectorAll("#highcharts-select-volume > option:checked")[0],r={actionType:i,linkedTo:n&&n.getAttribute("value")||"",fields:{}},t.forEach(t=>{let e=t.getAttribute("highcharts-data-name");if(t.getAttribute("highcharts-data-series-id"))r.seriesId=t.value;else if(e){let i=t.closest(".highcharts-popup-color-wrapper"),s=i?.querySelector(".highcharts-popup-opacity-percentage"),o=s?Number(s.value)/100:1;if(s){let i=ta().parse(t.value).rgba;r.fields[e]=Number.isNaN(i[0])?t.value:`rgba(${i[0]},${i[1]},${i[2]},${o})`}else r.fields[e]=t.value}else r.type=t.value}),e.forEach(t=>{let e=t.id;if("highcharts-select-series"!==e&&"highcharts-select-volume"!==e){let i=e.split("highcharts-select-")[1];r.fields[i]=t.value}}),a&&(r.fields["params.volumeSeriesID"]=a.getAttribute("value")||""),r))})}),n}showForm(t,e,i,s){e&&(this.showPopup(),"indicators"===t&&this.indicators.addForm.call(this,e,i,s),"annotation-toolbar"===t&&this.annotations.addToolbar.call(this,e,i,s),"annotation-edit"===t&&this.annotations.addForm.call(this,e,i,s),"flag"===t&&this.annotations.addForm.call(this,e,i,s,!0),this.type=t,this.container.style.height=this.container.offsetHeight+"px")}}(0,g.extend)(tS.prototype,{annotations:{addForm:function(t,e,i,s){if(!t)return;let o=this.container,n=this.lang,a=(0,g.createElement)("h2",{className:"highcharts-popup-main-title"},void 0,o);a.appendChild(tr.createTextNode(n[e.langKey]||e.langKey||"")),a=(0,g.createElement)("div",{className:"highcharts-popup-lhs-col highcharts-popup-lhs-full"},void 0,o);let r=(0,g.createElement)("div",{className:"highcharts-popup-bottom-row"},void 0,o);tl.call(this,a,t,"",e,[],!0),this.addButton(r,s?n.addButton||"Add":n.saveButton||"Save",s?"add":"save",o,i)},addToolbar:function(t,e,i){let s=this.lang,o=this.container,n=this.showForm,a="highcharts-annotation-toolbar";-1===o.className.indexOf(a)&&(o.className+=" "+a+" highcharts-no-mousewheel"),t&&(o.style.top=t.plotTop+10+"px");let r=(0,g.createElement)("p",{className:"highcharts-annotation-label"},void 0,o);r.setAttribute("aria-label","Annotation type"),r.appendChild(tr.createTextNode((0,g.pick)(s[e.langKey]||e.langKey,e.shapes&&e.shapes[0].type,"")));let h=this.addButton(o,s.editButton||"Edit","edit",o,()=>{n.call(this,"annotation-edit",t,e,i)});h.className+=" highcharts-annotation-edit-button",(0,g.createElement)("span",{className:"highcharts-icon"},{backgroundImage:ts("edit.svg",this.iconsURL,ti)},h),h=this.addButton(o,s.removeButton||"Remove","remove",o,i),h.className+=" highcharts-annotation-remove-button",(0,g.createElement)("span",{className:"highcharts-icon"},{backgroundImage:ts("destroy.svg",this.iconsURL,ti)},h)}},indicators:{addForm:function(t,e,i){let s,o=this.lang;if(!t)return;this.tabs.init.call(this,t);let n=this.container.querySelectorAll(".highcharts-tab-item-content");tu(n[0]),tv.call(this,t,n[0]),tm.call(this,t,n[0],"add"),s=n[0].querySelectorAll(".highcharts-popup-rhs-col")[0],this.addButton(s,o.addButton||"add","add",s,i),tu(n[1]),tm.call(this,t,n[1],"edit"),s=n[1].querySelectorAll(".highcharts-popup-rhs-col")[0],this.addButton(s,o.saveButton||"save","edit",s,i),this.addButton(s,o.removeButton||"remove","remove",s,i)},getAmount:function(){let t=0;return this.series.forEach(e=>{(e.params||e.options.params)&&t++}),t}},tabs:{init:function(t){if(!t)return;let e=this.indicators.getAmount.call(t),i=tP.call(this,"add");tP.call(this,"edit",e),tC.call(this),tC.call(this),tB.call(this,e),tM.call(this,i,0)}}});let{composed:tL}=m();function tI(){this.popup&&this.popup.closePopup()}function tD(t){this.popup||(this.popup=new tS(this.chart.container,this.chart.options.navigation.iconsURL||this.chart.options.stockTools&&this.chart.options.stockTools.gui.iconsURL||"renderer",this.chart)),this.popup.showForm(t.formType,this.chart,t.options,t.onSubmit)}function tY(t,e){this.inClass(e.target,"highcharts-popup")||t.apply(this,Array.prototype.slice.call(arguments,1))}let tX=function(t,e){(0,g.pushUnique)(tL,"Popup")&&((0,g.addEvent)(t,"closePopup",tI),(0,g.addEvent)(t,"showPopup",tD),(0,g.wrap)(e.prototype,"onContainerMouseDown",tY))},{getDeferredAnimation:tF}=m(),{defaultOptions:tR}=m();function tU(t,e){let i={};return["labels","shapes"].forEach(s=>{let o=t[s],n=e[s];o&&(n?i[s]=(0,g.splat)(n).map((t,e)=>(0,g.merge)(o[e],t)):i[s]=t[s])}),i}class tW extends P{static compose(t,e,i,s){E.compose(tW,t,i),K.compose(s),j.compose(t,s),e.compose(tW,t),tX(e,i)}constructor(t,e){super(),this.coll="annotations",this.chart=t,this.points=[],this.controlPoints=[],this.coll="annotations",this.index=-1,this.labels=[],this.shapes=[],this.setOptions(e),this.userOptions=e;const i=tU(this.options,e);this.options.labels=i.labels,this.options.shapes=i.shapes,this.init(t,this.options)}addClipPaths(){this.setClipAxes(),this.clipXAxis&&this.clipYAxis&&this.options.crop&&(this.clipRect=this.chart.renderer.clipRect(this.getClipBox()))}addLabels(){let t=this.options.labels||[];t.forEach((e,i)=>{let s=this.initLabel(e,i);(0,g.merge)(!0,t[i],s.options)})}addShapes(){let t=this.options.shapes||[];t.forEach((e,i)=>{let s=this.initShape(e,i);(0,g.merge)(!0,t[i],s.options)})}destroy(){let t=this.chart,e=function(t){t.destroy()};this.labels.forEach(e),this.shapes.forEach(e),this.clipXAxis=null,this.clipYAxis=null,(0,g.erase)(t.labelCollectors,this.labelCollector),super.destroy(),this.destroyControlTarget(),(0,g.destroyObjectProperties)(this,t)}destroyItem(t){(0,g.erase)(this[t.itemType+"s"],t),t.destroy()}getClipBox(){if(this.clipXAxis&&this.clipYAxis)return{x:this.clipXAxis.left,y:this.clipYAxis.top,width:this.clipXAxis.width,height:this.clipYAxis.height}}initProperties(t,e){this.setOptions(e);let i=tU(this.options,e);this.options.labels=i.labels,this.options.shapes=i.shapes,this.chart=t,this.points=[],this.controlPoints=[],this.coll="annotations",this.userOptions=e,this.labels=[],this.shapes=[]}init(t,e,i=this.index){let s=this.chart,o=this.options.animation;this.index=i,this.linkPoints(),this.addControlPoints(),this.addShapes(),this.addLabels(),this.setLabelCollector(),this.animationConfig=tF(s,o)}initLabel(t,e){this.options.labelOptions?.align;let i=new K(this,(0,g.merge)(this.options.labelOptions,{controlPointOptions:this.options.controlPointOptions},t),e);return i.itemType="label",this.labels.push(i),i}initShape(t,e){let i=(0,g.merge)(this.options.shapeOptions,{controlPointOptions:this.options.controlPointOptions},t),s=new tW.shapesMap[i.type||"rect"](this,i,e);return s.itemType="shape",this.shapes.push(s),s}redraw(t){this.linkPoints(),this.graphic||this.render(),this.clipRect&&this.clipRect.animate(this.getClipBox()),this.redrawItems(this.shapes,t),this.redrawItems(this.labels,t),this.redrawControlPoints(t)}redrawItem(t,e){if(t.linkPoints(),t.shouldBeDrawn()){let i,s;t.graphic||this.renderItem(t),t.redraw((0,g.pick)(e,!0)&&t.graphic.placed),t.points.length&&(i=t.graphic,s=t.points.some(t=>!1!==t.series.visible&&!1!==t.visible),i&&(s?"hidden"===i.visibility&&i.show():i.hide()))}else this.destroyItem(t)}redrawItems(t,e){let i=t.length;for(;i--;)this.redrawItem(t[i],e)}remove(){return this.chart.removeAnnotation(this)}render(){let t=this.chart.renderer;this.graphic=t.g("annotation").addClass(this.options.className||"").attr({opacity:0,zIndex:this.options.zIndex,visibility:this.options.visible?"inherit":"hidden"}).add(),this.shapesGroup=t.g("annotation-shapes").add(this.graphic),this.options.crop&&this.shapesGroup.clip(this.chart.plotBoxClip),this.labelsGroup=t.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(),this.renderControlPoints()}renderItem(t){t.render("label"===t.itemType?this.labelsGroup:this.shapesGroup)}renderItems(t){let e=t.length;for(;e--;)this.renderItem(t[e])}setClipAxes(){let t=this.chart.xAxis,e=this.chart.yAxis,i=[...this.options.labels??[],...this.options.shapes??[]].reduce((i,s)=>{let o=s&&(s.point||"points"in s&&s.points?.[0]);return[t[o&&o.xAxis]||i[0],e[o&&o.yAxis]||i[1]]},[]);this.clipXAxis=i[0],this.clipYAxis=i[1]}setControlPointsVisibility(t){let e=function(e){e.setControlPointsVisibility(t)};this.controlPoints.forEach(e=>{e.setVisibility(t)}),this.shapes.forEach(e),this.labels.forEach(e)}setLabelCollector(){let t=this;t.labelCollector=function(){return t.labels.reduce(function(t,e){return e.options.allowOverlap||t.push(e.graphic),t},[])},t.chart.labelCollectors.push(t.labelCollector)}setOptions(t){var e;this.options=(0,g.merge)(this.defaultOptions,t.type&&this.defaultOptions.types?.[t.type]||{},t),(e=this.options).typeOptions||(e.typeOptions={})}setVisibility(t){let e=this.options,i=this.chart.navigationBindings,s=(0,g.pick)(t,!e.visible);if(this.graphic.attr("visibility",s?"inherit":"hidden"),!s){let t=function(t){t.setControlPointsVisibility(s)};this.shapes.forEach(t),this.labels.forEach(t),i.activeAnnotation===this&&i.popup&&"annotation-toolbar"===i.popup.type&&(0,g.fireEvent)(i,"closePopup")}e.visible=s}update(t,e){let i=this.chart,s=tU(this.userOptions,t),o=i.annotations.indexOf(this),n=(0,g.merge)(!0,this.userOptions,t);n.labels=s.labels,n.shapes=s.shapes,this.destroy(),this.initProperties(i,n),this.init(i,n),i.options.annotations[o]=this.options,this.isUpdating=!0,(0,g.pick)(e,!0)&&i.drawAnnotations(),(0,g.fireEvent)(this,"afterUpdate"),this.isUpdating=!1}}tW.ControlPoint=O,tW.MockPoint=T,tW.shapesMap={rect:H,circle:z,ellipse:V,path:j,image:Z},tW.types={},tW.prototype.defaultOptions=k,tR.annotations=k,tW.prototype.nonDOMEvents=["add","afterUpdate","drag","remove"],S.compose(tW);var tj=l||(l={});tj.compose=function(t){return t.navigation||(t.navigation=new tH(t)),t};class tH{constructor(t){this.updates=[],this.chart=t}addUpdate(t){this.chart.navigation.updates.push(t)}update(t,e){this.updates.forEach(i=>{i.call(this.chart,t,e)})}}tj.Additions=tH;let tz=l,tV={backgroundColor:"color",backgroundColors:"color",borderColor:"color",borderRadius:"string",color:"color",fill:"color",fontSize:"string",labels:"string",name:"string",stroke:"color",title:"string"},tq={annotationsFieldsTypes:tV,getAssignedAxis:function(t){return t.filter(t=>{let e=t.axis.getExtremes(),i=e.min,s=e.max,o=(0,g.pick)(t.axis.minPointOffset,0);return(0,g.isNumber)(i)&&(0,g.isNumber)(s)&&t.value>=i-o&&t.value<=s+o&&!t.axis.options.isInternal})[0]},getFieldType:function(t,e){let i=tV[t],s=typeof e;return(0,g.defined)(i)&&(s=i),({string:"text",number:"number",boolean:"checkbox",color:"color"})[s]}},{getAssignedAxis:t$}=tq,t_={lang:{navigation:{popup:{simpleShapes:"Simple shapes",lines:"Lines",circle:"Circle",ellipse:"Ellipse",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(t){let e=this.chart.pointer?.getCoordinates(t),i=e&&t$(e.xAxis),s=e&&t$(e.yAxis),o=this.chart.options.navigation;if(i&&s)return this.chart.addAnnotation((0,g.merge)({langKey:"circle",type:"basicAnnotation",shapes:[{type:"circle",point:{x:i.value,y:s.value,xAxis:i.axis.index,yAxis:s.axis.index},r:5}]},o.annotationsOptions,o.bindings.circleAnnotation.annotationsOptions))},steps:[function(t,e){let i,s=e.options.shapes,o=s&&s[0]&&s[0].point||{};if((0,g.isNumber)(o.xAxis)&&(0,g.isNumber)(o.yAxis)){let e=this.chart.inverted,s=this.chart.xAxis[o.xAxis].toPixels(o.x),n=this.chart.yAxis[o.yAxis].toPixels(o.y);i=Math.max(Math.sqrt(Math.pow(e?n-t.chartX:s-t.chartX,2)+Math.pow(e?s-t.chartY:n-t.chartY,2)),5)}e.update({shapes:[{r:i}]})}]},ellipseAnnotation:{className:"highcharts-ellipse-annotation",start:function(t){let e=this.chart.pointer?.getCoordinates(t),i=e&&t$(e.xAxis),s=e&&t$(e.yAxis),o=this.chart.options.navigation;if(i&&s)return this.chart.addAnnotation((0,g.merge)({langKey:"ellipse",type:"basicAnnotation",shapes:[{type:"ellipse",xAxis:i.axis.index,yAxis:s.axis.index,points:[{x:i.value,y:s.value},{x:i.value,y:s.value}],ry:1}]},o.annotationsOptions,o.bindings.ellipseAnnotation.annotationsOptions))},steps:[function(t,e){let i=e.shapes[0],s=i.getAbsolutePosition(i.points[1]);i.translatePoint(t.chartX-s.x,t.chartY-s.y,1),i.redraw(!1)},function(t,e){let i=e.shapes[0],s=i.getAbsolutePosition(i.points[0]),o=i.getAbsolutePosition(i.points[1]),n=i.getDistanceFromLine(s,o,t.chartX,t.chartY),a=i.getYAxis(),r=Math.abs(a.toValue(0)-a.toValue(n));i.setYRadius(r),i.redraw(!1)}]},rectangleAnnotation:{className:"highcharts-rectangle-annotation",start:function(t){let e=this.chart.pointer?.getCoordinates(t),i=e&&t$(e.xAxis),s=e&&t$(e.yAxis);if(!i||!s)return;let o=i.value,n=s.value,a=i.axis.index,r=s.axis.index,h=this.chart.options.navigation;return this.chart.addAnnotation((0,g.merge)({langKey:"rectangle",type:"basicAnnotation",shapes:[{type:"path",points:[{xAxis:a,yAxis:r,x:o,y:n},{xAxis:a,yAxis:r,x:o,y:n},{xAxis:a,yAxis:r,x:o,y:n},{xAxis:a,yAxis:r,x:o,y:n},{command:"Z"}]}]},h.annotationsOptions,h.bindings.rectangleAnnotation.annotationsOptions))},steps:[function(t,e){let i=e.options.shapes,s=i&&i[0]&&i[0].points||[],o=this.chart.pointer?.getCoordinates(t),n=o&&t$(o.xAxis),a=o&&t$(o.yAxis);if(n&&a){let t=n.value,i=a.value;s[1].x=t,s[2].x=t,s[2].y=i,s[3].y=i,e.update({shapes:[{points:s}]})}}]},labelAnnotation:{className:"highcharts-label-annotation",start:function(t){let e=this.chart.pointer?.getCoordinates(t),i=e&&t$(e.xAxis),s=e&&t$(e.yAxis),o=this.chart.options.navigation;if(i&&s)return this.chart.addAnnotation((0,g.merge)({langKey:"label",type:"basicAnnotation",labelOptions:{format:"{y:.2f}",overflow:"none",crop:!0},labels:[{point:{xAxis:i.axis.index,yAxis:s.axis.index,x:i.value,y:s.value}}]},o.annotationsOptions,o.bindings.labelAnnotation.annotationsOptions))}}},events:{},annotationsOptions:{animation:{defer:0}}}},{setOptions:tG}=m(),{format:tK}=$(),{composed:tZ,doc:tJ,win:tQ}=m(),{getAssignedAxis:t0,getFieldType:t1}=tq;function t2(){this.chart.navigationBindings&&this.chart.navigationBindings.deselectAnnotation()}function t9(){this.navigationBindings&&this.navigationBindings.destroy()}function t5(){let t=this.options;t&&t.navigation&&t.navigation.bindings&&(this.navigationBindings=new t8(this,t.navigation),this.navigationBindings.initEvents(),this.navigationBindings.initUpdate())}function t7(){let t=this.navigationBindings,e="highcharts-disabled-btn";if(this&&t){let i=!1;if(this.series.forEach(t=>{!t.options.isInternal&&t.visible&&(i=!0)}),this.navigationBindings&&this.navigationBindings.container&&this.navigationBindings.container[0]){let s=this.navigationBindings.container[0];(0,g.objectEach)(t.boundClassNames,(t,o)=>{let n=s.querySelectorAll("."+o);if(n)for(let s=0;s<n.length;s++){let o=n[s],a=o.className;"normal"===t.noDataState||i?-1!==a.indexOf(e)&&o.classList.remove(e):-1===a.indexOf(e)&&(o.className+=" "+e)}})}}}function t3(){this.deselectAnnotation()}function t4(){this.selectedButtonElement=null}function t6(t){let e,i,s=t.prototype.defaultOptions.events&&t.prototype.defaultOptions.events.click;function o(t){let e=this,i=e.chart.navigationBindings,o=i.activeAnnotation;s&&s.call(e,t),o!==e?(i.deselectAnnotation(),i.activeAnnotation=e,e.setControlPointsVisibility(!0),(0,g.fireEvent)(i,"showPopup",{annotation:e,formType:"annotation-toolbar",options:i.annotationToFields(e),onSubmit:function(t){if("remove"===t.actionType)i.activeAnnotation=!1,i.chart.removeAnnotation(e);else{let s={};i.fieldsToOptions(t.fields,s),i.deselectAnnotation();let o=s.typeOptions;"measure"===e.options.type&&(o.crosshairY.enabled=0!==o.crosshairY.strokeWidth,o.crosshairX.enabled=0!==o.crosshairX.strokeWidth),e.update(s)}}})):(0,g.fireEvent)(i,"closePopup"),t.activeAnnotation=!0}(0,g.merge)(!0,t.prototype.defaultOptions.events,{click:o,touchstart:function(t){e=t.touches[0].clientX,i=t.touches[0].clientY},touchend:function(t){e&&Math.sqrt(Math.pow(e-t.changedTouches[0].clientX,2)+Math.pow(i-t.changedTouches[0].clientY,2))>=4||o.call(this,t)}})}class t8{static compose(t,e){(0,g.pushUnique)(tZ,"NavigationBindings")&&((0,g.addEvent)(t,"remove",t2),t6(t),(0,g.objectEach)(t.types,t=>{t6(t)}),(0,g.addEvent)(e,"destroy",t9),(0,g.addEvent)(e,"load",t5),(0,g.addEvent)(e,"render",t7),(0,g.addEvent)(t8,"closePopup",t3),(0,g.addEvent)(t8,"deselectButton",t4),tG(t_))}constructor(t,e){this.boundClassNames=void 0,this.chart=t,this.options=e,this.eventsToUnbind=[],this.container=this.chart.container.getElementsByClassName(this.options.bindingsClassName||""),this.container.length||(this.container=tJ.getElementsByClassName(this.options.bindingsClassName||""))}getCoords(t){let e=this.chart.pointer?.getCoordinates(t);return[e&&t0(e.xAxis),e&&t0(e.yAxis)]}initEvents(){let t=this,e=t.chart,i=t.container,s=t.options;t.boundClassNames={},(0,g.objectEach)(s.bindings||{},e=>{t.boundClassNames[e.className]=e}),[].forEach.call(i,e=>{t.eventsToUnbind.push((0,g.addEvent)(e,"click",i=>{let s=t.getButtonEvents(e,i);s&&!s.button.classList.contains("highcharts-disabled-btn")&&t.bindingsButtonClick(s.button,s.events,i)}))}),(0,g.objectEach)(s.events||{},(e,i)=>{(0,g.isFunction)(e)&&t.eventsToUnbind.push((0,g.addEvent)(t,i,e,{passive:!1}))}),t.eventsToUnbind.push((0,g.addEvent)(e.container,"click",function(i){!e.cancelClick&&e.isInsidePlot(i.chartX-e.plotLeft,i.chartY-e.plotTop,{visiblePlotOnly:!0})&&t.bindingsChartClick(this,i)})),t.eventsToUnbind.push((0,g.addEvent)(e.container,m().isTouchDevice?"touchmove":"mousemove",function(e){t.bindingsContainerMouseMove(this,e)},m().isTouchDevice?{passive:!1}:void 0))}initUpdate(){let t=this;tz.compose(this.chart).navigation.addUpdate(e=>{t.update(e)})}bindingsButtonClick(t,e,i){let s=this.chart,o=s.renderer.boxWrapper,n=!0;this.selectedButtonElement&&(this.selectedButtonElement.classList===t.classList&&(n=!1),(0,g.fireEvent)(this,"deselectButton",{button:this.selectedButtonElement}),this.nextEvent&&(this.currentUserDetails&&"annotations"===this.currentUserDetails.coll&&s.removeAnnotation(this.currentUserDetails),this.mouseMoveEvent=this.nextEvent=!1)),n?(this.selectedButton=e,this.selectedButtonElement=t,(0,g.fireEvent)(this,"selectButton",{button:t}),e.init&&e.init.call(this,t,i),(e.start||e.steps)&&s.renderer.boxWrapper.addClass("highcharts-draw-mode")):(s.stockTools&&t.classList.remove("highcharts-active"),o.removeClass("highcharts-draw-mode"),this.nextEvent=!1,this.mouseMoveEvent=!1,this.selectedButton=null)}bindingsChartClick(t,e){t=this.chart;let i=this.activeAnnotation,s=this.selectedButton,o=t.renderer.boxWrapper;i&&(i.cancelClick||e.activeAnnotation||!e.target.parentNode||function(t,e){let i=tQ.Element.prototype,s=i.matches||i.msMatchesSelector||i.webkitMatchesSelector,o=null;if(i.closest)o=i.closest.call(t,e);else do{if(s.call(t,e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return o}(e.target,".highcharts-popup")?i.cancelClick&&setTimeout(()=>{i.cancelClick=!1},0):(0,g.fireEvent)(this,"closePopup")),s&&s.start&&(this.nextEvent?(this.nextEvent(e,this.currentUserDetails),this.steps&&(this.stepIndex++,s.steps[this.stepIndex]?this.mouseMoveEvent=this.nextEvent=s.steps[this.stepIndex]:((0,g.fireEvent)(this,"deselectButton",{button:this.selectedButtonElement}),o.removeClass("highcharts-draw-mode"),s.end&&s.end.call(this,e,this.currentUserDetails),this.nextEvent=!1,this.mouseMoveEvent=!1,this.selectedButton=null))):(this.currentUserDetails=s.start.call(this,e),this.currentUserDetails&&s.steps?(this.stepIndex=0,this.steps=!0,this.mouseMoveEvent=this.nextEvent=s.steps[this.stepIndex]):((0,g.fireEvent)(this,"deselectButton",{button:this.selectedButtonElement}),o.removeClass("highcharts-draw-mode"),this.steps=!1,this.selectedButton=null,s.end&&s.end.call(this,e,this.currentUserDetails))))}bindingsContainerMouseMove(t,e){this.mouseMoveEvent&&this.mouseMoveEvent(e,this.currentUserDetails)}fieldsToOptions(t,e){return(0,g.objectEach)(t,(t,i)=>{let s=parseFloat(t),o=i.split("."),n=o.length-1;if(!(0,g.isNumber)(s)||t.match(/px|em/g)||i.match(/format/g)||i.match(/title/g)||(t=s),"undefined"!==t){let i=e;o.forEach((e,s)=>{if("__proto__"!==e&&"constructor"!==e){let a=(0,g.pick)(o[s+1],"");n===s?i[e]=t:(i[e]||(i[e]=a.match(/\d/g)?[]:{}),i=i[e])}})}}),e}deselectAnnotation(){this.activeAnnotation&&(this.activeAnnotation.setControlPointsVisibility(!1),this.activeAnnotation=!1)}annotationToFields(t){let e=t.options,i=t8.annotationsEditable,s=i.nestedOptions,o=(0,g.pick)(e.type,e.shapes?.[0]?.type,e.labels?.[0]?.type,"label"),n=t8.annotationsNonEditable[e.langKey]||[],a={langKey:e.langKey,type:o};function r(e,i,o,a,h){let l;o&&(0,g.defined)(e)&&-1===n.indexOf(i)&&((o.indexOf&&o.indexOf(i))>=0||o[i]||!0===o)&&((0,g.isArray)(e)?(a[i]=[],e.forEach((t,e)=>{(0,g.isObject)(t)?(a[i][e]={},(0,g.objectEach)(t,(t,o)=>{r(t,o,s[i],a[i][e],i)})):r(t,0,s[i],a[i],i)})):(0,g.isObject)(e)?(l={},(0,g.isArray)(a)?(a.push(l),l[i]={},l=l[i]):a[i]=l,(0,g.objectEach)(e,(t,e)=>{r(t,e,0===i?o:s[i],l,i)})):"format"===i?a[i]=[tK(e,t.labels[0].points[0]).toString(),"text"]:(0,g.isArray)(a)?a.push([e,t1(h,e)]):a[i]=[e,t1(i,e)])}return(0,g.objectEach)(e,(t,n)=>{"typeOptions"===n&&"basicAnnotation"!==a.type?(a[n]={},(0,g.objectEach)(e[n],(t,e)=>{r(t,e,s,a[n],e)})):r(t,n,i[o],a,n)}),a}getClickedClassNames(t,e){let i=e.target,s=[],o;for(;i&&i.tagName&&((o=(0,g.attr)(i,"class"))&&(s=s.concat(o.split(" ").map(t=>[t,i]))),(i=i.parentNode)!==t););return s}getButtonEvents(t,e){let i,s=this;return this.getClickedClassNames(t,e).forEach(t=>{s.boundClassNames[t[0]]&&!i&&(i={events:s.boundClassNames[t[0]],button:t[1]})}),i}update(t){this.options=(0,g.merge)(!0,this.options,t),this.removeEvents(),this.initEvents()}removeEvents(){this.eventsToUnbind.forEach(t=>t())}destroy(){this.removeEvents()}}t8.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"],ellipse:["shapes"],verticalLine:[],label:["labelOptions"],measure:["background","crosshairY","crosshairX"],fibonacci:[],tunnel:["background","line","height"],pitchfork:["innerBackground","outerBackground"],rect:["shapes"],crookedLine:[],basicAnnotation:["shapes","labelOptions"]},t8.annotationsNonEditable={rectangle:["crosshairX","crosshairY","labelOptions"],ellipse:["labelOptions"],circle:["labelOptions"]};let et=m();et.Annotation=et.Annotation||tW,et.NavigationBindings=et.NavigationBindings||t8,et.Annotation.compose(et.Chart,et.NavigationBindings,et.Pointer,et.SVGRenderer);let ee=m();return u.default})());