!/**
 * Highcharts JS v12.6.0 (2026-04-13)
 * @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,i){"object"==typeof exports&&"object"==typeof module?module.exports=i(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 i(t,t.SeriesRegistry,t.Templating,t.AST,t.Color)}):"object"==typeof exports?exports["highcharts/modules/annotations"]=i(t._Highcharts,t._Highcharts.SeriesRegistry,t._Highcharts.Templating,t._Highcharts.AST,t._Highcharts.Color):t.Highcharts=i(t.Highcharts,t.Highcharts.SeriesRegistry,t.Highcharts.Templating,t.Highcharts.AST,t.Highcharts.Color)}("u"<typeof window?this:window,function(t,i,o,n,e){return function(){"use strict";var s,r,a,h,c,l,p,u,d,f,v,y,g,m,x,b,A={512:function(t){t.exports=i},620:function(t){t.exports=e},660:function(t){t.exports=n},944:function(i){i.exports=t},984:function(t){t.exports=o}},w={};function P(t){var i=w[t];if(void 0!==i)return i.exports;var o=w[t]={exports:{}};return A[t](o,o.exports,P),o.exports}P.n=function(t){var i=t&&t.__esModule?function(){return t.default}:function(){return t};return P.d(i,{a:i}),i},P.d=function(t,i){for(var o in i)P.o(i,o)&&!P.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:i[o]})},P.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)};var O={};P.d(O,{default:function(){return iY}});var C=P(944),k=P.n(C),E=function(t,i,o){if(o||2==arguments.length)for(var n,e=0,s=i.length;e<s;e++)!n&&e in i||(n||(n=Array.prototype.slice.call(i,0,e)),n[e]=i[e]);return t.concat(n||Array.prototype.slice.call(i))},N=k().doc;function B(t,i,o,n){void 0===n&&(n={});var e="function"==typeof t&&t.prototype||t;Object.hasOwnProperty.call(e,"hcEvents")||(e.hcEvents={});var s=e.hcEvents;k().Point&&t instanceof k().Point&&t.series&&t.series.chart&&(t.series.chart.runTrackerClick=!0);var r=t.addEventListener;r&&r.call(t,i,o,!!k().supportsPassiveEvents&&{passive:void 0===n.passive?-1!==i.indexOf("touch"):n.passive,capture:!1}),s[i]||(s[i]=[]);var a={fn:o,order:"number"==typeof n.order?n.order:1/0};return s[i].push(a),s[i].sort(function(t,i){return t.order-i.order}),function(){V(t,i,o)}}function T(t,i,o,n,e){var s,r,a,h=N.createElement(t);return i&&S(h,i),e&&(s={padding:"0",border:"none",margin:"0"},S(h.style,s)),o&&(r=h,a=o,S(r.style,a)),n&&n.appendChild(h),h}k().win;function M(t){return null!=t}function _(t,i){for(var o=t.length;o--;)if(t[o]===i){t.splice(o,1);break}}function S(t,i){var o;for(o in t||(t={}),i)t[o]=i[o];return t}function I(t,i,o,n){if(o=o||{},(null==N?void 0:N.createEvent)&&(t.dispatchEvent||t.fireEvent&&t!==k())){var e=N.createEvent("Events");e.initEvent(i,!0,!0),o=S(e,o),t.dispatchEvent?t.dispatchEvent(o):t.fireEvent(i,o)}else if(t.hcEvents){o.target||S(o,{preventDefault:function(){o.defaultPrevented=!0},target:t,type:i});for(var s=[],r=t,a=!1;r.hcEvents;)Object.hasOwnProperty.call(r,"hcEvents")&&r.hcEvents[i]&&(s.length&&(a=!0),s.unshift.apply(s,r.hcEvents[i])),r=Object.getPrototypeOf(r);a&&s.sort(function(t,i){return t.order-i.order}),s.forEach(function(i){!1===i.fn.call(t,o,t)&&o.preventDefault()})}n&&!o.defaultPrevented&&n.call(t,o)}var D=function(t){return void 0===t&&(t=""),({center:.5,right:1,middle:.5,bottom:1})[t]||0},L=Array.prototype.find?function(t,i){return t.find(i)}:function(t,i){var o,n=t.length;for(o=0;o<n;o++)if(i(t[o],o))return t[o]};function Y(t){return R(t)&&"number"==typeof t.nodeType}function j(t){return"number"==typeof t&&!isNaN(t)&&t<1/0&&t>-1/0}function X(t){return"string"==typeof t}function F(t){var i=Object.prototype.toString.call(t);return"[object Array]"===i||"[object Array Iterator]"===i}function R(t,i){return!!t&&"object"==typeof t&&(!i||!F(t))}function U(t){for(var i=[],o=1;o<arguments.length;o++)i[o-1]=arguments[o];var n,e=E([t],i,!0),s={},r=function(t,i){return"object"!=typeof t&&(t={}),W(i,function(o,n){if("__proto__"!==n&&"constructor"!==n){var e;!R(o,!0)||(e=null==o?void 0:o.constructor,R(o,!0)&&!Y(o)&&(null==e?void 0:e.name)&&"Object"!==e.name)||Y(o)?t[n]=i[n]:t[n]=r(t[n]||{},o)}}),t};!0===t&&(s=e[1],e=Array.prototype.slice.call(e,2));var a=e.length;for(n=0;n<a;n++)s=r(s,e[n]);return s}function W(t,i,o){for(var n in t)Object.hasOwnProperty.call(t,n)&&i.call(o||t[n],t[n],n,t)}function H(){for(var t=arguments,i=t.length,o=0;o<i;o++){var n=t[o];if(null!=n)return n}}function z(t,i){return 0>t.indexOf(i)&&!!t.push(i)}function V(t,i,o){function n(i,o){var n=t.removeEventListener;n&&n.call(t,i,o,!1)}function e(o){var e,s;t.nodeName&&(i?(e={})[i]=!0:e=o,W(e,function(t,i){if(o[i])for(s=o[i].length;s--;)n(i,o[i][s].fn)}))}var s="function"==typeof t&&t.prototype||t;if(Object.hasOwnProperty.call(s,"hcEvents")){var r=s.hcEvents;if(i){var a=r[i]||[];o?(r[i]=a.filter(function(t){return o!==t.fn}),n(i,o)):(e(r),r[i]=[])}else e(r),delete s.hcEvents}}function q(t,i){var o,n,e=t.length;for(n=0;n<e;n++)t[n].safeI=n;for(t.sort(function(t,n){return 0===(o=i(t,n))?t.safeI-n.safeI:o}),n=0;n<e;n++)delete t[n].safeI}function G(t,i,o){var n=t[i];t[i]=function(){var t=arguments,i=this;return o.apply(this,[function(){return n.apply(i,arguments.length?arguments:t)}].concat([].slice.call(arguments)))}}function K(t,i){var o=this.initAnnotation(t);return this.options.annotations.push(o.options),H(i,!0)&&(o.redraw(),o.graphic.attr({opacity:1})),o}function Z(){var 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(function(i,o){if(!t.annotations.some(function(t){return t.options===i})){var n=t.initAnnotation(i);t.options.annotations[o]=n.options}}),t.drawAnnotations(),B(t,"redraw",t.drawAnnotations),B(t,"destroy",function(){t.plotBoxClip.destroy(),t.controlPointsGroup.destroy()}),B(t,"exportData",function(i){var o,n,e,s,r,a,h=t.annotations,c=(this.options.exporting&&this.options.exporting.csv||{}).columnHeaderFormatter,l=!i.dataRows[1].xValues,p=t.options.lang&&t.options.lang.exportData&&t.options.lang.exportData.annotationHeader,u=i.dataRows[0].length,d=null==(e=null==(n=null==(o=t.options.exporting)?void 0:o.csv)?void 0:n.annotations)?void 0:e.itemDelimiter,f=null==(a=null==(r=null==(s=t.options.exporting)?void 0:s.csv)?void 0:r.annotations)?void 0:a.join;h.forEach(function(t){var o;(null==(o=t.options.labelOptions)?void 0:o.includeInDataExport)&&t.labels.forEach(function(t){if(t.options.text){var o=t.options.text;t.points.forEach(function(t){var n=t.x,e=t.series.xAxis?t.series.xAxis.index:-1,s=!1;if(-1===e){for(var r=i.dataRows[0].length,a=Array(r),h=0;h<r;++h)a[h]="";a.push(o),a.xValues=[],a.xValues[e]=n,i.dataRows.push(a),s=!0}if(s||i.dataRows.forEach(function(t){!s&&t.xValues&&void 0!==e&&n===t.xValues[e]&&(f&&t.length>u?t[t.length-1]+=d+o:t.push(o),s=!0)}),!s){for(var r=i.dataRows[0].length,a=Array(r),h=0;h<r;++h)a[h]="";a[0]=n,a.push(o),a.xValues=[],void 0!==e&&(a.xValues[e]=n),i.dataRows.push(a)}})}})});var v=0;i.dataRows.forEach(function(t){v=Math.max(v,t.length)});for(var y=v-i.dataRows[0].length,g=0;g<y;g++){var m=function(t){var i;return c&&!1!==(i=c(t))?i:(i=p+" "+t,l)?{columnTitle:i,topLevelColumnTitle:i}:i}(g+1);l?(i.dataRows[0].push(m.topLevelColumnTitle),i.dataRows[1].push(m.columnTitle)):i.dataRows[0].push(m)}})}function $(){this.plotBoxClip.attr(this.plotBox),this.annotations.forEach(function(t){t.redraw(),t.graphic.animate({opacity:1},t.animationConfig)})}function J(t){var i=this.annotations,o="annotations"===t.coll?t:L(i,function(i){return i.options.id===t});o&&(I(o,"remove"),_(this.options.annotations,o.options),_(i,o),o.destroy())}function Q(){var t=this.options.annotations,i=this.userOptions.annotations;this.annotations=[],F(this.options.annotations)||(this.options.annotations=[]),R(i,!0)&&R(t,!0)&&this.options.annotations.push(t)}function tt(t){this.chart.hasDraggedAnnotation||t.apply(this,Array.prototype.slice.call(arguments,1))}(g||(g={})).compose=function(t,i,o){var n=i.prototype;if(!n.addAnnotation){var e=o.prototype;B(i,"afterInit",Q),n.addAnnotation=K,n.callbacks.push(Z),n.collectionsWithInit.annotations=[K],n.collectionsWithUpdate.push("annotations"),n.drawAnnotations=$,n.removeAnnotation=J,n.initAnnotation=function(i){var o=new(t.types[i.type]||t)(this,i);return this.annotations.push(o),o},G(e,"onContainerMouseDown",tt)}};var ti=g,to={visible:!0,animation:{},crop:!0,draggable:"xy",labelOptions:{align:"center",allowOverlap:!1,backgroundColor:"rgba(0, 0, 0, 0.75)",borderColor:"#000000",borderRadius:3,borderWidth:1,className:"highcharts-no-tooltip",crop:!1,formatter:function(){return M(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:"#ffffff",stroke:"#000000","stroke-width":2},height:10,symbol:"circle",visible:!1,width:10},events:{},typeOptions:{},types:{},zIndex:6},tn=k().doc,te=k().isTouchDevice,ts=function(){function t(){}return t.prototype.addEvents=function(){var t=this,i=function(i){B(i,te?"touchstart":"mousedown",function(i){t.onMouseDown(i)},{passive:!1})};if(i(this.graphic.element),(t.labels||[]).forEach(function(t){t.options.useHTML&&t.graphic.text&&!t.graphic.text.foreignObject&&i(t.graphic.text.element)}),W(t.options.events,function(i,o){var n=function(n){var e;"click"===o&&t.cancelClick||i.call(t,null==(e=t.chart.pointer)?void 0:e.normalize(n),t.target,t)};-1===(t.nonDOMEvents||[]).indexOf(o)?(B(t.graphic.element,o,n,{passive:!1}),t.graphic.div&&B(t.graphic.div,o,n,{passive:!1})):B(t,o,n,{passive:!1})}),t.options.draggable&&(B(t,"drag",t.onDrag),!t.graphic.renderer.styledMode)){var o={cursor:{x:"ew-resize",y:"ns-resize",xy:"move"}[t.options.draggable]};t.graphic.css(o),(t.labels||[]).forEach(function(t){t.options.useHTML&&t.graphic.text&&!t.graphic.text.foreignObject&&t.graphic.text.css(o)})}t.isUpdating||I(t,"add")},t.prototype.destroy=function(){this.removeDocEvents(),V(this),this.hcEvents=null},t.prototype.mouseMoveToRadians=function(t,i,o){var n,e=t.prevChartY-o,s=t.prevChartX-i,r=t.chartY-o,a=t.chartX-i;return this.chart.inverted&&(n=s,s=e,e=n,n=a,a=r,r=n),Math.atan2(r,a)-Math.atan2(e,s)},t.prototype.mouseMoveToScale=function(t,i,o){var n=t.prevChartX-i,e=t.prevChartY-o,s=t.chartX-i,r=t.chartY-o,a=(s||1)/(n||1),h=(r||1)/(e||1);if(this.chart.inverted){var c=h;h=a,a=c}return{x:a,y:h}},t.prototype.mouseMoveToTranslation=function(t){var i,o=t.chartX-t.prevChartX,n=t.chartY-t.prevChartY;return this.chart.inverted&&(i=n,n=o,o=i),{x:o,y:n}},t.prototype.onDrag=function(t){if(this.chart.isInsidePlot(t.chartX-this.chart.plotLeft,t.chartY-this.chart.plotTop,{visiblePlotOnly:!0})){var i=this.mouseMoveToTranslation(t);"x"===this.options.draggable&&(i.y=0),"y"===this.options.draggable&&(i.x=0),this.points.length?this.translate(i.x,i.y):(this.shapes.forEach(function(t){return t.translate(i.x,i.y)}),this.labels.forEach(function(t){return t.translate(i.x,i.y)})),this.redraw(!1)}},t.prototype.onMouseDown=function(t){if(t.preventDefault&&t.preventDefault(),2!==t.button){var i,o=this,n=o.chart.pointer,e=(null==(i=null==t?void 0:t.sourceCapabilities)?void 0:i.firesTouchEvents)||!1,s=(t=(null==n?void 0:n.normalize(t))||t).chartX,r=t.chartY;o.cancelClick=!1,o.chart.hasDraggedAnnotation=!0,o.removeDrag=B(tn,te||e?"touchmove":"mousemove",function(t){o.hasDragged=!0,(t=(null==n?void 0:n.normalize(t))||t).prevChartX=s,t.prevChartY=r,I(o,"drag",t),s=t.chartX,r=t.chartY},te||e?{passive:!1}:void 0),o.removeMouseUp=B(tn,te||e?"touchend":"mouseup",function(){var t=H(o.target&&o.target.annotation,o.target);t&&(t.cancelClick=o.hasDragged),o.cancelClick=o.hasDragged,o.chart.hasDraggedAnnotation=!1,o.hasDragged&&I(H(t,o),"afterUpdate"),o.hasDragged=!1,o.onMouseUp()},te||e?{passive:!1}:void 0)}},t.prototype.onMouseUp=function(){this.removeDocEvents()},t.prototype.removeDocEvents=function(){this.removeDrag&&(this.removeDrag=this.removeDrag()),this.removeMouseUp&&(this.removeMouseUp=this.removeMouseUp())},t}(),tr=(s=function(t,i){return(s=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var o in i)i.hasOwnProperty(o)&&(t[o]=i[o])})(t,i)},function(t,i){function o(){this.constructor=t}s(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}),ta=function(t){function i(i,o,n,e){var s=t.call(this)||this;return s.nonDOMEvents=["drag"],s.chart=i,s.target=o,s.options=n,s.index=H(n.index,e),s}return tr(i,t),i.prototype.destroy=function(){t.prototype.destroy.call(this),this.graphic&&(this.graphic=this.graphic.destroy()),this.chart=null,this.target=null,this.options=null},i.prototype.redraw=function(t){this.graphic[t?"animate":"attr"](this.options.positioner.call(this,this.target,this))},i.prototype.render=function(){var t=this.chart,i=this.options;this.graphic=t.renderer.symbol(i.symbol,0,0,i.width,i.height).add(t.controlPointsGroup).css(i.style),this.setVisibility(i.visible),this.addEvents()},i.prototype.setVisibility=function(t){this.graphic[t?"show":"hide"](),this.options.visible=t},i.prototype.update=function(t){var i=this.chart,o=this.target,n=this.index,e=U(!0,this.options,t);this.destroy(),this.constructor(i,o,e,n),this.render(i.controlPointsGroup),this.redraw()},i}(ts),th=P(512),tc=P.n(th),tl=tc().series.prototype,tp=function(){function t(t,i,o){this.mock=!0,this.point=this,this.series={visible:!0,chart:t,getPlotBox:tl.getPlotBox},this.target=i||null,this.options=o,this.applyOptions(this.getOptions())}return t.fromPoint=function(i){return new t(i.series.chart,null,{x:i.x,y:i.y,xAxis:i.series.xAxis,yAxis:i.series.yAxis})},t.pointToPixels=function(t,i){var o,n=t.series,e=n.chart,s=t.plotX||0,r=t.plotY||0;return e.inverted&&(t.mock?(s=t.plotY,r=t.plotX):(s=e.plotWidth-(t.plotY||0),r=e.plotHeight-(t.plotX||0))),n&&!i&&(s+=(o=n.getPlotBox()).translateX,r+=o.translateY),{x:s,y:r}},t.pointToOptions=function(t){return{x:t.x,y:t.y,xAxis:t.series.xAxis,yAxis:t.series.yAxis}},t.prototype.applyOptions=function(t){this.command=t.command,this.setAxis(t,"x"),this.setAxis(t,"y"),this.refresh()},t.prototype.getOptions=function(){return this.hasDynamicOptions()&&"function"==typeof this.options?this.options(this.target):this.options},t.prototype.hasDynamicOptions=function(){return"function"==typeof this.options},t.prototype.isInsidePlot=function(){var t=this.plotX,i=this.plotY,o=this.series.xAxis,n=this.series.yAxis,e={x:t,y:i,isInsidePlot:!0,options:{}};return o&&(e.isInsidePlot=M(t)&&t>=0&&t<=o.len),n&&(e.isInsidePlot=e.isInsidePlot&&M(i)&&i>=0&&i<=n.len),I(this.series.chart,"afterIsInsidePlot",e),e.isInsidePlot},t.prototype.refresh=function(){var t=this.series,i=t.xAxis,o=t.yAxis,n=this.getOptions();i?(this.x=n.x,this.plotX=i.toPixels(n.x,!0)):(this.x=void 0,this.plotX=n.x),o?(this.y=n.y,this.plotY=o.toPixels(n.y,!0)):(this.y=null,this.plotY=n.y),this.isInside=this.isInsidePlot()},t.prototype.refreshOptions=function(){var t=this.series,i=t.xAxis,o=t.yAxis;this.x=this.options.x=i?this.options.x=i.toValue(this.plotX,!0):this.plotX,this.y=this.options.y=o?o.toValue(this.plotY,!0):this.plotY},t.prototype.rotate=function(t,i,o){if(!this.hasDynamicOptions()){var n=Math.cos(o),e=Math.sin(o),s=this.plotX-t,r=this.plotY-i;this.plotX=s*n-r*e+t,this.plotY=s*e+r*n+i,this.refreshOptions()}},t.prototype.scale=function(t,i,o,n){if(!this.hasDynamicOptions()){var e=this.plotX*o,s=this.plotY*n;this.plotX=(1-o)*t+e,this.plotY=(1-n)*i+s,this.refreshOptions()}},t.prototype.setAxis=function(t,i){var o=i+"Axis",n=t[o],e=this.series.chart;this.series[o]="object"==typeof n?n:M(n)?e[o][n]||e.get(n):null},t.prototype.toAnchor=function(){var t=[this.plotX,this.plotY,0,0];return this.series.chart.inverted&&(t[0]=this.plotY,t[1]=this.plotX),t},t.prototype.translate=function(t,i,o,n){this.hasDynamicOptions()||(this.plotX+=o,this.plotY+=n,this.refreshOptions())},t}();!function(t){function i(){var t=this,i=this.controlPoints,o=this.options.controlPoints||[];o.forEach(function(n,e){var s=U(t.options.controlPointOptions,n);s.index||(s.index=e),o[e]=s,i.push(new ta(t.chart,t,s))})}function o(t){var i=t.series.getPlotBox(),o=t.series.chart,n=t.mock?t.toAnchor():o.tooltip&&o.tooltip.getAnchor.call({chart:t.series.chart},t)||[0,0,0,0],e={x:n[0]+(this.options.x||0),y:n[1]+(this.options.y||0),height:n[2]||0,width:n[3]||0};return{relativePosition:e,absolutePosition:U(e,{x:e.x+(t.mock?i.translateX:o.plotLeft),y:e.y+(t.mock?i.translateY:o.plotTop)})}}function n(){this.controlPoints.forEach(function(t){return t.destroy()}),this.chart=null,this.controlPoints=null,this.points=null,this.options=null,this.annotation&&(this.annotation=null)}function e(){var t,i=this.options;return i.points||i.point&&(F(t=i.point)?t:[t])}function s(){var t,i,o=this.getPointsOptions(),n=this.points,e=(null==o?void 0:o.length)||0;for(t=0;t<e;t++){if(!(i=this.point(o[t],n[t]))){n.length=0;return}i.mock&&i.refresh(),n[t]=i}return n}function r(t,i){if(t&&t.series)return t;if(!i||null===i.series){if(R(t))i=new tp(this.chart,this,t);else if(X(t))i=this.chart.get(t)||null;else if("function"==typeof t){var o=t.call(i,this);i=o.series?o:new tp(this.chart,this,t)}}return i}function a(t){this.controlPoints.forEach(function(i){return i.redraw(t)})}function h(){this.controlPoints.forEach(function(t){return t.render()})}function c(t,i,o,n,e){var s=this;if(this.chart.inverted){var r=i;i=o,o=r}this.points.forEach(function(r,a){return s.transformPoint(t,i,o,n,e,a)},this)}function l(t,i,o,n,e,s){var r=this.points[s];r.mock||(r=this.points[s]=tp.fromPoint(r)),r[t](i,o,n,e)}function p(t,i){this.transform("translate",null,null,t,i)}function u(t,i,o){this.transformPoint("translate",null,null,t,i,o)}t.compose=function(t){var d=t.prototype;d.addControlPoints||U(!0,d,{addControlPoints:i,anchor:o,destroyControlTarget:n,getPointsOptions:e,linkPoints:s,point:r,redrawControlPoints:a,renderControlPoints:h,transform:c,transformPoint:l,translate:p,translatePoint:u})}}(m||(m={}));var tu=m,td=function(){function t(t,i,o,n){this.annotation=t,this.chart=t.chart,this.collection="label"===n?"labels":"shapes",this.controlPoints=[],this.options=i,this.points=[],this.index=o,this.itemType=n,this.init(t,i,o)}return t.prototype.attr=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];this.graphic.attr.apply(this.graphic,arguments)},t.prototype.attrsFromOptions=function(t){var i,o,n=this.constructor.attrsMap,e={},s=this.chart.styledMode;for(i in t)o=n[i],void 0===n[i]||s&&-1!==["fill","stroke","stroke-width"].indexOf(o)||(e[o]=t[i]);return e},t.prototype.destroy=function(){this.graphic&&(this.graphic=this.graphic.destroy()),this.tracker&&(this.tracker=this.tracker.destroy()),this.destroyControlTarget()},t.prototype.calculateAnnotationSize=function(t,i,o){var n=o.toPixels(t,!0);return Math.abs(o.toPixels(t+i,!0)-n)},t.prototype.init=function(t,i,o){this.annotation=t,this.chart=t.chart,this.options=i,this.points=[],this.controlPoints=[],this.index=o,this.linkPoints(),this.addControlPoints()},t.prototype.redraw=function(t){this.redrawControlPoints(t)},t.prototype.render=function(t){this.options.className&&this.graphic&&this.graphic.addClass(this.options.className),this.renderControlPoints()},t.prototype.rotate=function(t,i,o){this.transform("rotate",t,i,o)},t.prototype.scale=function(t,i,o,n){this.transform("scale",t,i,o,n)},t.prototype.setControlPointsVisibility=function(t){this.controlPoints.forEach(function(i){i.setVisibility(t)})},t.prototype.shouldBeDrawn=function(){return!!this.points.length},t.prototype.translateShape=function(t,i,o){var n=this.annotation.chart,e=this.annotation.userOptions,s=n.annotations.indexOf(this.annotation),r=n.options.annotations[s];this.translatePoint(t,i,0),o&&this.translatePoint(t,i,1),r[this.collection][this.index].point=this.options.point,e[this.collection][this.index].point=this.options.point},t.prototype.update=function(t){var i=this.annotation,o=U(!0,this.options,t),n=this.graphic.parentGroup,e=this.constructor;this.destroy(),U(!0,this,new e(i,o,this.index,this.itemType)),this.render(n),this.redraw()},t}();tu.compose(td);var tf={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}}]}},tv=(r=function(t,i){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])})(t,i)},function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function o(){this.constructor=t}r(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}),ty=tx("marker-end"),tg=tx("marker-start"),tm="rgba(192,192,192,"+(k().svg?1e-4:.002)+")";function tx(t){return function(i){this.attr(t,"url(#"+i+")")}}function tb(){this.options.defs=U(tf,this.options.defs||{})}function tA(t,i){var o={attributes:{id:t}},n={stroke:i.color||"none",fill:i.color||"rgba(0, 0, 0, 0.75)"};o.children=i.children&&i.children.map(function(t){return U(n,t)});var e=U(!0,{attributes:{markerWidth:20,markerHeight:20,refX:0,refY:0,orient:"auto"}},i,o),s=this.definition(e);return s.id=t,s}var tw=function(t){function i(i,o,n){var e=t.call(this,i,o,n,"shape")||this;return e.type="path",e}return tv(i,t),i.compose=function(t,i){var o=i.prototype;o.addMarker||(B(t,"afterGetContainer",tb),o.addMarker=tA)},i.prototype.init=function(i,o,n){M(o.yAxis)&&o.points.forEach(function(t){t&&"string"!=typeof t&&(t.yAxis=o.yAxis)}),M(o.xAxis)&&o.points.forEach(function(t){t&&"string"!=typeof t&&(t.xAxis=o.xAxis)}),t.prototype.init.call(this,i,o,n)},i.prototype.toD=function(){var t=this.options.d;if(t)return"function"==typeof t?t.call(this):t;var i,o=this.points,n=o.length,e=[],s=n,r=o[0],a=s&&this.anchor(r).absolutePosition,h=0;if(a)for(e.push(["M",a.x,a.y]);++h<n&&s;)i=(r=o[h]).command||"L",a=this.anchor(r).absolutePosition,"M"===i||"L"===i?e.push([i,a.x,a.y]):"Z"===i&&e.push([i]),s=r.series.visible;return s&&this.graphic?this.chart.renderer.crispLine(e,this.graphic.strokeWidth()):null},i.prototype.shouldBeDrawn=function(){return t.prototype.shouldBeDrawn.call(this)||!!this.options.d},i.prototype.render=function(i){var o=this.options,n=this.attrsFromOptions(o);this.graphic=this.annotation.chart.renderer.path([["M",0,0]]).attr(n).add(i),this.tracker=this.annotation.chart.renderer.path([["M",0,0]]).addClass("highcharts-tracker-line").attr({zIndex:2}).add(i),this.annotation.chart.styledMode||this.tracker.attr({"stroke-linejoin":"round",stroke:tm,fill:tm,"stroke-width":this.graphic.strokeWidth()+2*o.snap}),t.prototype.render.call(this),S(this.graphic,{markerStartSetter:tg,markerEndSetter:ty}),this.setMarkers(this)},i.prototype.redraw=function(i){if(this.graphic){var o=this.toD(),n=i?"animate":"attr";o?(this.graphic[n]({d:o}),this.tracker[n]({d:o})):(this.graphic.attr({d:"M 0 -9000000000"}),this.tracker.attr({d:"M 0 -9000000000"})),this.graphic.placed=this.tracker.placed=!!o}t.prototype.redraw.call(this,i)},i.prototype.setMarkers=function(t){var i=t.options,o=t.chart,n=o.options.defs,e=i.fill,s=M(e)&&"none"!==e?e:i.stroke;["markerStart","markerEnd"].forEach(function(e){var r,a,h,c,l=i[e];if(l){for(h in n)if((l===((r=n[h]).attributes&&r.attributes.id)||l===r.id)&&"marker"===r.tagName){a=r;break}a&&(c=t[e]=o.renderer.addMarker((i.id||(0,C.uniqueKey)())+"-"+l,U(a,{color:s})),t.attr(e,c.getAttribute("id")))}})},i.attrsMap={dashStyle:"dashstyle",strokeWidth:"stroke-width",stroke:"stroke",fill:"fill",zIndex:"zIndex"},i}(td),tP=(a=function(t,i){return(a=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])})(t,i)},function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function o(){this.constructor=t}a(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}),tO=function(t){function i(i,o,n){var e=t.call(this,i,o,n,"shape")||this;return e.type="rect",e.translate=t.prototype.translateShape,e}return tP(i,t),i.prototype.init=function(i,o,n){var e=o.point,s=o.xAxis,r=o.yAxis;e&&"string"!=typeof e&&(M(s)&&(e.xAxis=s),M(r)&&(e.yAxis=r)),t.prototype.init.call(this,i,o,n)},i.prototype.render=function(i){var o=this.attrsFromOptions(this.options);this.graphic=this.annotation.chart.renderer.rect(0,-9e9,0,0).attr(o).add(i),t.prototype.render.call(this)},i.prototype.redraw=function(i){if(this.graphic){var o=this.points[0],n=this.anchor(o).absolutePosition,e=this.options.width||0,s=this.options.height||0;if(n){var r=M(this.options.xAxis)?this.chart.xAxis[this.options.xAxis]:void 0,a=M(this.options.yAxis)?this.chart.yAxis[this.options.yAxis]:void 0;r&&M(o.x)&&(e=this.calculateAnnotationSize(o.x,e,r)),a&&M(o.y)&&(s=this.calculateAnnotationSize(o.y,s,a)),this.graphic[i?"animate":"attr"]({x:n.x,y:n.y,width:e,height:s})}else this.attr({x:0,y:-9e9});this.graphic.placed=!!n}t.prototype.redraw.call(this,i)},i.attrsMap=U(tw.attrsMap,{width:"width",height:"height"}),i}(td),tC=(h=function(t,i){return(h=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])})(t,i)},function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function o(){this.constructor=t}h(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}),tk=function(t){function i(i,o,n){var e=t.call(this,i,o,n,"shape")||this;return e.type="circle",e.translate=t.prototype.translateShape,e}return tC(i,t),i.prototype.init=function(i,o,n){var e=o.point,s=o.xAxis,r=o.yAxis;e&&"string"!=typeof e&&(M(s)&&(e.xAxis=s),M(r)&&(e.yAxis=r)),t.prototype.init.call(this,i,o,n)},i.prototype.redraw=function(i){if(this.graphic){var o=this.points[0],n=this.anchor(o).absolutePosition,e=this.options.r||0;if(n){var s=M(this.options.yAxis)?this.chart.yAxis[this.options.yAxis]:void 0;s&&M(o.y)&&(e=this.calculateAnnotationSize(o.y,e,s)),this.graphic[i?"animate":"attr"]({x:n.x,y:n.y,r:e})}else this.graphic.attr({x:0,y:-9e9});this.graphic.placed=!!n}t.prototype.redraw.call(this,i)},i.prototype.render=function(i){var o=this.attrsFromOptions(this.options);this.graphic=this.annotation.chart.renderer.circle(0,-9e9,0).attr(o).add(i),t.prototype.render.call(this)},i.prototype.setRadius=function(t){this.options.r=t},i.attrsMap=U(tw.attrsMap,{r:"r"}),i}(td),tE=(c=function(t,i){return(c=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])})(t,i)},function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function o(){this.constructor=t}c(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}),tN=function(t){function i(i,o,n){var e=t.call(this,i,o,n,"shape")||this;return e.type="ellipse",e}return tE(i,t),i.prototype.init=function(i,o,n){M(o.yAxis)&&o.points.forEach(function(t){t&&"string"!=typeof t&&(t.yAxis=o.yAxis)}),M(o.xAxis)&&o.points.forEach(function(t){t&&"string"!=typeof t&&(t.xAxis=o.xAxis)}),t.prototype.init.call(this,i,o,n)},i.prototype.render=function(i){this.graphic=this.annotation.chart.renderer.createElement("ellipse").attr(this.attrsFromOptions(this.options)).add(i),t.prototype.render.call(this)},i.prototype.translate=function(i,o){t.prototype.translateShape.call(this,i,o,!0)},i.prototype.getDistanceFromLine=function(t,i,o,n){return Math.abs((i.y-t.y)*o-(i.x-t.x)*n+i.x*t.y-i.y*t.x)/Math.sqrt((i.y-t.y)*(i.y-t.y)+(i.x-t.x)*(i.x-t.x))},i.prototype.getAttrs=function(t,i){var o=t.x,n=t.y,e=i.x,s=i.y,r=(o+e)/2,a=Math.sqrt((o-e)*(o-e)/4+(n-s)*(n-s)/4),h=180*Math.atan((s-n)/(e-o))/Math.PI;return r<o&&(h+=180),{cx:r,cy:(n+s)/2,rx:a,ry:this.getRY(),angle:h}},i.prototype.getRY=function(){var t=this.getYAxis();return M(t)?Math.abs(t.toPixels(this.options.ry)-t.toPixels(0)):this.options.ry},i.prototype.getYAxis=function(){var t=this.options.yAxis;return this.chart.yAxis[t]},i.prototype.getAbsolutePosition=function(t){return this.anchor(t).absolutePosition},i.prototype.redraw=function(i){if(this.graphic){var o=this.getAbsolutePosition(this.points[0]),n=this.getAbsolutePosition(this.points[1]),e=this.getAttrs(o,n);o?this.graphic[i?"animate":"attr"]({cx:e.cx,cy:e.cy,rx:e.rx,ry:e.ry,rotation:e.angle,rotationOriginX:e.cx,rotationOriginY:e.cy}):this.graphic.attr({x:0,y:-9e9}),this.graphic.placed=!!o}t.prototype.redraw.call(this,i)},i.prototype.setYRadius=function(t){var i=this.annotation.userOptions.shapes;this.options.ry=t,i&&i[0]&&(i[0].ry=t,i[0].ry=t)},i.attrsMap=U(tw.attrsMap,{ry:"ry"}),i}(td),tB=P(984),tT=P.n(tB),tM=(l=function(t,i){return(l=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])})(t,i)},function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function o(){this.constructor=t}l(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}),t_=tT().format;function tS(t,i,o,n,e){var s,r,a=e&&e.anchorX,h=e&&e.anchorY,c=o/2;return j(a)&&j(h)&&(s=[["M",a,h]],(r=i-h)<0&&(r=-n-r),r<o&&(c=a<t+o/2?r:o-r),h>i+n?s.push(["L",t+c,i+n]):h<i?s.push(["L",t+c,i]):a<t?s.push(["L",t,i+n/2]):a>t+o&&s.push(["L",t+o,i+n/2])),s||[]}var tI=function(t){function i(i,o,n){return t.call(this,i,o,n,"label")||this}return tM(i,t),i.alignedPosition=function(t,i){return{x:Math.round((i.x||0)+(t.x||0)+(i.width-(t.width||0))*D(t.align)),y:Math.round((i.y||0)+(t.y||0)+(i.height-(t.height||0))*D(t.verticalAlign))}},i.compose=function(t){t.prototype.symbols.connector=tS},i.justifiedOptions=function(t,i,o,n){var e,s=o.align,r=o.verticalAlign,a=i.box?0:i.padding||0,h=i.getBBox(),c={align:s,verticalAlign:r,x:o.x,y:o.y,width:i.width,height:i.height},l=(n.x||0)-t.plotLeft,p=(n.y||0)-t.plotTop;return(e=l+a)<0&&("right"===s?c.align="left":c.x=(c.x||0)-e),(e=l+h.width-a)>t.plotWidth&&("left"===s?c.align="right":c.x=(c.x||0)+t.plotWidth-e),(e=p+a)<0&&("bottom"===r?c.verticalAlign="top":c.y=(c.y||0)-e),(e=p+h.height-a)>t.plotHeight&&("top"===r?c.verticalAlign="bottom":c.y=(c.y||0)+t.plotHeight-e),c},i.prototype.translatePoint=function(i,o){t.prototype.translatePoint.call(this,i,o,0)},i.prototype.translate=function(t,i){var o,n,e=this.annotation.chart,s=this.annotation.userOptions,r=e.annotations.indexOf(this.annotation),a=e.options.annotations[r];if(e.inverted){var h=t;t=i,i=h}(o=this.options).x||(o.x=0),(n=this.options).y||(n.y=0),this.options.x+=t,this.options.y+=i,a[this.collection][this.index].x=this.options.x,a[this.collection][this.index].y=this.options.y,s[this.collection][this.index].x=this.options.x,s[this.collection][this.index].y=this.options.y},i.prototype.render=function(o){var n=this.options,e=this.attrsFromOptions(n),s=n.style,r=this.annotation.chart.options.chart,a=r.plotBackgroundColor||r.backgroundColor;if(this.graphic=this.annotation.chart.renderer.label("",0,-9999,n.shape,void 0,void 0,n.useHTML,void 0,"annotation-label").attr(e).add(o),!this.annotation.chart.styledMode){if((null==s?void 0:s.color)==="contrast"){var h=!n.shape||i.shapesWithoutBackground.indexOf(n.shape)>-1||"none"===n.backgroundColor?a:n.backgroundColor;s.color=this.annotation.chart.renderer.getContrast("string"==typeof h?h:"string"==typeof a?a:"#ffffff")}this.graphic.css(n.style||{}).shadow(n.shadow)}this.graphic.labelrank=n.labelrank,t.prototype.render.call(this)},i.prototype.redraw=function(i){var o=this.options,n=this.text||o.format||o.text,e=this.graphic,s=this.points[0];if(!e)return void this.redraw(i);e.attr({text:n?t_(String(n),s,this.annotation.chart):o.formatter.call(s,s)});var r=this.anchor(s),a=this.position(r);a?(e.alignAttr=a,a.anchorX=r.absolutePosition.x,a.anchorY=r.absolutePosition.y,e[i?"animate":"attr"](a)):e.attr({x:0,y:-9999}),e.placed=!!a,t.prototype.redraw.call(this,i)},i.prototype.anchor=function(i){var o=t.prototype.anchor.apply(this,arguments),n=this.options.x||0,e=this.options.y||0;return o.absolutePosition.x-=n,o.absolutePosition.y-=e,o.relativePosition.x-=n,o.relativePosition.y-=e,o},i.prototype.position=function(t){var o,n,e,s,r=this.graphic,a=this.annotation.chart,h=a.tooltip,c=this.points[0],l=this.options,p=t.absolutePosition,u=t.relativePosition,d=c.series.visible&&tp.prototype.isInsidePlot.call(c);if(r&&d){var f=r.width,v=void 0===f?0:f,y=r.height,g=void 0===y?0:y;l.distance&&h?o=h.getPosition.call({chart:a,distance:H(l.distance,16),getPlayingField:h.getPlayingField,pointer:h.pointer},v,g,{plotX:u.x,plotY:u.y,negative:c.negative,ttBelow:c.ttBelow,h:u.height||u.width}):l.positioner?o=l.positioner.call(this,this):(n={x:p.x,y:p.y,width:0,height:0},o=i.alignedPosition(S(l,{width:v,height:g}),n),"justify"===this.options.overflow&&(o=i.alignedPosition(i.justifiedOptions(a,r,l,o),n))),l.crop&&(e=o.x-a.plotLeft,s=o.y-a.plotTop,d=a.isInsidePlot(e,s)&&a.isInsidePlot(e+v,s+g))}return d?o:null},i.attrsMap={backgroundColor:"fill",borderColor:"stroke",borderWidth:"stroke-width",zIndex:"zIndex",borderRadius:"r",padding:"padding"},i.shapesWithoutBackground=["connector"],i}(td),tD=(p=function(t,i){return(p=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])})(t,i)},function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function o(){this.constructor=t}p(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}),tL=function(t){function i(i,o,n){var e=t.call(this,i,o,n,"shape")||this;return e.type="image",e.translate=t.prototype.translateShape,e}return tD(i,t),i.prototype.render=function(i){var o=this.attrsFromOptions(this.options),n=this.options;this.graphic=this.annotation.chart.renderer.image(n.src,0,-9e9,n.width,n.height).attr(o).add(i),this.graphic.width=n.width,this.graphic.height=n.height,t.prototype.render.call(this)},i.prototype.redraw=function(i){if(this.graphic){var o=this.anchor(this.points[0]),n=tI.prototype.position.call(this,o);n?this.graphic[i?"animate":"attr"]({x:n.x,y:n.y}):this.graphic.attr({x:0,y:-9e9}),this.graphic.placed=!!n}t.prototype.redraw.call(this,i)},i.attrsMap={width:"width",height:"height",zIndex:"zIndex"},i}(td),tY=P(660),tj=P.n(tY),tX=function(){function t(t,i){this.iconsURL=i,this.container=this.createPopupContainer(t),this.closeButton=this.addCloseButton()}return t.prototype.createPopupContainer=function(t,i){return void 0===i&&(i="highcharts-popup highcharts-no-tooltip"),T("div",{className:i},void 0,t)},t.prototype.addCloseButton=function(t){void 0===t&&(t="highcharts-popup-close");var i=this,o=this.iconsURL,n=T("button",{className:t},void 0,this.container);return T("span",{className:"highcharts-icon"},{backgroundImage:"url("+(o.match(/png|svg|jpeg|jpg|gif/ig)?o:o+"close.svg")+")"},n),["click","touchstart"].forEach(function(t){B(n,t,i.closeButtonEvents.bind(i))}),B(document,"keydown",function(t){"Escape"===t.code&&i.closeButtonEvents()}),n},t.prototype.closeButtonEvents=function(){this.closePopup()},t.prototype.showPopup=function(t){void 0===t&&(t="highcharts-annotation-toolbar");var i=this.container,o=this.closeButton;this.type=void 0,i.innerHTML=tj().emptyHTML,i.className.indexOf(t)>=0&&(i.classList.remove(t),i.removeAttribute("style")),i.appendChild(o),i.style.display="block",i.style.height=""},t.prototype.closePopup=function(){this.container.style.display="none"},t}(),tF=P(620),tR=P.n(tF),tU=k().doc,tW=k().isFirefox;function tH(t,i,o,n,e,s){var r,a,h=this;if(i){var c=this.addInput,l=this.lang;W(n,function(n,s){r=""!==o?o+"."+s:s,R(n)&&(!F(n)||F(n)&&R(n[0])?((a=l[s]||s).match(/\d/g)||e.push([!0,a,t]),tH.call(h,t,i,r,n,e,!1)):e.push([h,r,"annotation",t,n]))}),s&&(q(e,function(t){return t[1].match(/format/g)?-1:1}),tW&&e.reverse(),e.forEach(function(t){!0===t[0]?T("span",{className:"highcharts-annotation-title"},void 0,t[2]).appendChild(tU.createTextNode(t[1])):(t[4]={value:t[4][0],type:t[4][1]},c.apply(t[0],t.splice(1)))}))}}var tz=k().doc,tV=tc().seriesTypes;(u=x||(x={}))[u["params.algorithm"]=0]="params.algorithm",u[u["params.average"]=1]="params.average";var tq={"algorithm-pivotpoints":["standard","fibonacci","camarilla"],"average-disparityindex":["sma","ema","dema","tema","wma"]};function tG(t){var i=T("div",{className:"highcharts-popup-lhs-col"},void 0,t),o=T("div",{className:"highcharts-popup-rhs-col"},void 0,t);return T("div",{className:"highcharts-popup-rhs-col-wrapper"},void 0,o),{lhsCol:i,rhsCol:o}}function tK(t,i,o,n){var e=i.params||i.options.params;n.innerHTML=tj().emptyHTML,T("h3",{className:"highcharts-indicator-title"},void 0,n).appendChild(tz.createTextNode(t9(i,o).indicatorFullName)),T("input",{type:"hidden",name:"highcharts-type-"+o,value:o},void 0,n),t5.call(this,o,"series",t,n,i,i.linkedParent&&i.linkedParent.options.id),e.volumeSeriesID&&t5.call(this,o,"volume",t,n,i,i.linkedParent&&e.volumeSeriesID),t$.call(this,t,"params",e,o,n)}function tZ(t,i,o,n){function e(i,o){var n=f.parentNode.children[1];tK.call(s,t,i,o,f),n&&(n.style.display="block"),c&&i.options&&T("input",{type:"hidden",name:"highcharts-id-"+o,value:i.options.id},void 0,f).setAttribute("highcharts-data-series-id",i.options.id)}var s=this,r=s.lang,a=i.querySelectorAll(".highcharts-popup-lhs-col")[0],h=i.querySelectorAll(".highcharts-popup-rhs-col")[0],c="edit"===o,l=c?t.series:t.options.plotOptions||{};if(t||!l){var p,u=[];c||F(l)?F(l)&&(u=t2.call(this,l)):u=t1.call(this,l,n),q(u,function(t,i){var o=t.indicatorFullName.toLowerCase(),n=i.indicatorFullName.toLowerCase();return o<n?-1:+(o>n)}),a.children[1]&&a.children[1].remove();var d=T("ul",{className:"highcharts-indicator-list"},void 0,a),f=h.querySelectorAll(".highcharts-popup-rhs-col-wrapper")[0];if(u.forEach(function(t){var i=t.indicatorFullName,o=t.indicatorType,n=t.series;p=T("li",{className:"highcharts-indicator-list"},void 0,d);var s=T("button",{className:"highcharts-indicator-list-item",textContent:i},void 0,p);["click","touchstart"].forEach(function(t){B(s,t,function(){e(n,o)})})}),u.length>0){var v=u[0];e(v.series,v.indicatorType)}else c||(tj().setElementHTML(f.parentNode.children[0],r.noFilterMatch||""),f.parentNode.children[1].style.display="none")}}function t$(t,i,o,n,e){var s=this;if(t){var r=this.addInput;W(o,function(o,a){var h=i+"."+a;if(M(o)&&h)if(R(o)&&(r.call(s,h,n,e,{}),t$.call(s,t,h,o,n,e)),h in x){var c=tQ.call(s,n,h,e);t0.call(s,t,i,c,n,a,o)}else"params.volumeSeriesID"===h||F(o)||r.call(s,h,n,e,{value:o,type:"number"})})}}function tJ(t,i){var o=this,n=i.querySelectorAll(".highcharts-popup-lhs-col")[0],e=this.lang.clearFilter,s=T("div",{className:"highcharts-input-wrapper"},void 0,n),r=function(i){tZ.call(o,t,o.container,"add",i)},a=this.addInput("searchIndicators","input",s,{value:"",type:"text",htmlFor:"search-indicators",labelClassName:"highcharts-input-search-indicators-label"}),h=T("a",{textContent:e},void 0,s);a.classList.add("highcharts-input-search-indicators"),h.classList.add("clear-filter-button"),B(a,"input",function(){r(this.value),this.value.length?h.style.display="inline-block":h.style.display="none"}),["click","touchstart"].forEach(function(t){B(h,t,function(){a.value="",r(""),h.style.display="none"})})}function tQ(t,i,o){var n=i.split("."),e=n[n.length-1],s="highcharts-"+i+"-type-"+t,r=this.lang;T("label",{htmlFor:s},null,o).appendChild(tz.createTextNode(r[e]||i));var a=T("select",{name:s,className:"highcharts-popup-field",id:"highcharts-select-"+i},null,o);return a.setAttribute("id","highcharts-select-"+i),a}function t0(t,i,o,n,e,s,r){"series"===i||"volume"===i?t.series.forEach(function(t){var n=t.options,e=n.name||n.params?t.name:n.id||"";"highcharts-navigator-series"!==n.id&&n.id!==(r&&r.options&&r.options.id)&&(M(s)||"volume"!==i||"column"!==t.type||(s=n.id),T("option",{value:n.id},void 0,o).appendChild(tz.createTextNode(e)))}):n&&e&&tq[e+"-"+n].forEach(function(t){T("option",{value:t},void 0,o).appendChild(tz.createTextNode(t))}),M(s)&&(o.value=s)}function t1(t,i){var o,n=this.chart&&this.chart.options.lang,e=n&&n.navigation&&n.navigation.popup&&n.navigation.popup.indicatorAliases,s=new Map;return W(t,function(t,n){var r=t&&t.options;if(t.params||r&&r.params){var a=t9(t,n),h=a.indicatorFullName,c=a.indicatorType;if(i){var l=RegExp(i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i"),p=e&&e[c]&&e[c].join(" ")||"";(h.match(l)||p.match(l))&&(o={indicatorFullName:h,indicatorType:c,series:t},s.set(c.toLowerCase(),o))}else o={indicatorFullName:h,indicatorType:c,series:t},s.set(c.toLowerCase(),o)}}),Array.from(s.values())}function t2(t){var i=[];return t.forEach(function(t){t.is("sma")&&i.push({indicatorFullName:t.name,indicatorType:t.type,series:t})}),i}function t9(t,i){var o=t.options,n=tV[i]&&tV[i].prototype.nameBase||i.toUpperCase(),e=i;return o&&o.type&&(e=t.options.type,n=t.name),{indicatorFullName:n,indicatorType:e}}function t5(t,i,o,n,e,s){if(o){var r=tQ.call(this,t,i,n);t0.call(this,o,i,r,void 0,void 0,void 0,e),M(s)&&(r.value=s)}}var t4=k().doc;function t6(){return T("div",{className:"highcharts-tab-item-content highcharts-no-mousewheel"},void 0,this.container)}function t3(t,i){var o=this.container,n=this.lang,e="highcharts-tab-item";0===i&&(e+=" highcharts-tab-disabled");var s=T("button",{className:e},void 0,o);return s.appendChild(t4.createTextNode(n[t+"Button"]||t)),s.setAttribute("highcharts-data-tab-type",t),s}function t7(){for(var t=this.container,i=t.querySelectorAll(".highcharts-tab-item"),o=t.querySelectorAll(".highcharts-tab-item-content"),n=0;n<i.length;n++)i[n].classList.remove("highcharts-tab-item-active"),o[n].classList.remove("highcharts-tab-item-show")}function t8(t,i){var o=this.container.querySelectorAll(".highcharts-tab-item-content");t.className+=" highcharts-tab-item-active",o[i].className+=" highcharts-tab-item-show"}function it(t){var i=this;this.container.querySelectorAll(".highcharts-tab-item").forEach(function(o,n){(0!==t||"edit"!==o.getAttribute("highcharts-data-tab-type"))&&["click","touchstart"].forEach(function(t){B(o,t,function(){t7.call(i),t8.call(i,this,n)})})})}var ii=(d=function(t,i){return(d=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])})(t,i)},function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function o(){this.constructor=t}d(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}),io=k().doc,ie=k().getOptions,is=function(t){function i(i,o,n){var e=t.call(this,i,o)||this;return e.chart=n,e.lang=(ie().lang.navigation||{}).popup||{},B(e.container,"mousedown",function(){var t=n&&n.navigationBindings&&n.navigationBindings.activeAnnotation;if(t){t.cancelClick=!0;var i=B(io,"click",function(){setTimeout(function(){t.cancelClick=!1},0),i()})}}),e}return ii(i,t),i.prototype.addInput=function(t,i,o,n){var e,s=t.split("."),r=s[s.length-1],a=this.lang,h="highcharts-"+i+"-"+H(n.htmlFor,r);if(r.match(/^\d+$/)||T("label",{htmlFor:h,className:n.labelClassName},void 0,o).appendChild(io.createTextNode(a[r]||r)),"color"===n.type&&(null==(e=this.chart)?void 0:e.container))return this.createColorInput(t,h,n,o,this.chart.container);var c=T("input",{name:h,value:n.value,type:n.type,className:"highcharts-popup-field"},void 0,o);return c.setAttribute("highcharts-data-name",t),c},i.prototype.createColorInput=function(t,i,o,n,e){var s=function(t,i){var o=function(t){return("0"+Math.round(t).toString(16)).slice(-2).toUpperCase()},n=function(t){var i=tR().parse(t).rgba,n=i[0],e=i[1],s=i[2],r=i[3];return{value:"#"+o(n)+o(e)+o(s),alpha:r}};if(t.startsWith("rgb")||t.startsWith("rgba"))return n(t);if(t.startsWith("color")||t.startsWith("var")){var e=io.createElement("span");e.style.setProperty("color",t),i.appendChild(e);var s=window.getComputedStyle(e).color;if(i.removeChild(e),s.startsWith("color")){var r=s.match(RegExp("color\\s*\\(\\s*srgb\\s+([\\d.]+)\\s+([\\d.]+)\\s+([\\d.]+)\\s+(?:\\s*\\/\\s*([\\d.]+))?\\s*\\)"));if(r){var a=Math.round(255*parseFloat(r[1])),h=Math.round(255*parseFloat(r[2])),c=Math.round(255*parseFloat(r[3])),l=r[4]?parseFloat(r[4]):1;return{value:"#"+o(a)+o(h)+o(c),alpha:l}}}if(s.startsWith("rgb")||s.startsWith("rgba"))return n(s)}return{value:t,alpha:1}}(o.value||"",e),r=s.value,a=s.alpha,h=tR().parse(o.value||"").rgba[3],c=isNaN(h)?a:h,l=T("div",{className:"highcharts-popup-color-wrapper"},void 0,n),p=T("input",{type:"color",value:r,className:"highcharts-popup-field highcharts-popup-field-color"},void 0,l),u=T("input",{name:i,id:i,value:r,type:"text",className:"highcharts-popup-field highcharts-popup-field-text"},void 0,l);u.setAttribute("highcharts-data-name",t);var d=T("span",{className:"highcharts-popup-color-separator"},void 0,l),f=T("input",{type:"number",value:String(Math.round(100*c)),className:"highcharts-popup-field highcharts-popup-opacity-percentage",min:"0",max:"100",step:"1"},void 0,l),v=T("span",{className:"highcharts-popup-opacity-percent-suffix"},void 0,l);v.appendChild(io.createTextNode(" %"));var y=T("input",{type:"range",value:String(Math.round(100*c)),className:"highcharts-popup-opacity-slider",min:"0",max:"100",step:"1"},void 0,n);y.style.setProperty("--highcharts-popup-opacity-track-color",r),y.style.setProperty("display","none");var g=function(){var t=/^#[0-9A-Fa-f]{6}$/.test(u.value);d.style.display=t?"":"none",f.style.display=t?"":"none",v.style.display=t?"":"none"};g();var m=function(t){var i,o=(i=Number(t.target.value),i>0?i<100?i:100:0);y.value=String(o),f.value=String(Math.round(o))},x=function(t){t.target===p?u.value=p.value.toUpperCase():p.value=u.value,y.style.setProperty("--highcharts-popup-opacity-track-color",p.value),g()};return B(n,"mousedown",function(t){t.target!==f&&t.target!==y&&(y.style.display="none")}),B(f,"focus",function(){y.style.display=""}),B(f,"input",m),B(y,"input",m),B(p,"input",x),B(u,"input",x),l},i.prototype.closeButtonEvents=function(){if(this.chart){var i=this.chart.navigationBindings;I(i,"closePopup"),i&&i.selectedButtonElement&&I(i,"deselectButton",{button:i.selectedButtonElement})}else t.prototype.closeButtonEvents.call(this)},i.prototype.addButton=function(t,i,o,n,e){var s=this,r=T("button",void 0,void 0,t);return r.appendChild(io.createTextNode(i)),e&&["click","touchstart"].forEach(function(t){B(r,t,function(){var t,i,r,a,h;return s.closePopup(),e((t=Array.prototype.slice.call(n.querySelectorAll("input")),i=Array.prototype.slice.call(n.querySelectorAll("select")),r=n.querySelectorAll("#highcharts-select-series > option:checked")[0],a=n.querySelectorAll("#highcharts-select-volume > option:checked")[0],h={actionType:o,linkedTo:r&&r.getAttribute("value")||"",fields:{}},t.forEach(function(t){var i=t.getAttribute("highcharts-data-name");if(t.getAttribute("highcharts-data-series-id"))h.seriesId=t.value;else if(i){var o=t.closest(".highcharts-popup-color-wrapper"),n=null==o?void 0:o.querySelector(".highcharts-popup-opacity-percentage"),e=n?Number(n.value)/100:1;if(n){var s=tR().parse(t.value).rgba;h.fields[i]=Number.isNaN(s[0])?t.value:"rgba(".concat(s[0],",").concat(s[1],",").concat(s[2],",").concat(e,")")}else h.fields[i]=t.value}else h.type=t.value}),i.forEach(function(t){var i=t.id;if("highcharts-select-series"!==i&&"highcharts-select-volume"!==i){var o=i.split("highcharts-select-")[1];h.fields[o]=t.value}}),a&&(h.fields["params.volumeSeriesID"]=a.getAttribute("value")||""),h))})}),r},i.prototype.showForm=function(t,i,o,n){i&&(this.showPopup(),"indicators"===t&&this.indicators.addForm.call(this,i,o,n),"annotation-toolbar"===t&&this.annotations.addToolbar.call(this,i,o,n),"annotation-edit"===t&&this.annotations.addForm.call(this,i,o,n),"flag"===t&&this.annotations.addForm.call(this,i,o,n,!0),this.type=t,this.container.style.height=this.container.offsetHeight+"px")},i}(tX);S(is.prototype,{annotations:{addForm:function(t,i,o,n){if(t){var e=this.container,s=this.lang,r=T("h2",{className:"highcharts-popup-main-title"},void 0,e);r.appendChild(tU.createTextNode(s[i.langKey]||i.langKey||"")),r=T("div",{className:"highcharts-popup-lhs-col highcharts-popup-lhs-full"},void 0,e);var a=T("div",{className:"highcharts-popup-bottom-row"},void 0,e);tH.call(this,r,t,"",i,[],!0),this.addButton(a,n?s.addButton||"Add":s.saveButton||"Save",n?"add":"save",e,o)}},addToolbar:function(t,i,o){var n=this,e=this.lang,s=this.container,r=this.showForm,a="highcharts-annotation-toolbar";-1===s.className.indexOf(a)&&(s.className+=" "+a+" highcharts-no-mousewheel"),t&&(s.style.top=t.plotTop+10+"px");var h=T("p",{className:"highcharts-annotation-label"},void 0,s);h.setAttribute("aria-label","Annotation type"),h.appendChild(tU.createTextNode(H(e[i.langKey]||i.langKey,i.shapes&&i.shapes[0].type,"")));var c=this.addButton(s,e.editButton||"Edit","edit",s,function(){r.call(n,"annotation-edit",t,i,o)});c.className+=" highcharts-annotation-edit-button",T("span",{className:"highcharts-icon"},{backgroundImage:"url(".concat(this.iconsURL,"edit.svg)")},c),c=this.addButton(s,e.removeButton||"Remove","remove",s,o),c.className+=" highcharts-annotation-remove-button",T("span",{className:"highcharts-icon"},{backgroundImage:"url(".concat(this.iconsURL,"destroy.svg)")},c)}},indicators:{addForm:function(t,i,o){var n,e=this.lang;if(t){this.tabs.init.call(this,t);var s=this.container.querySelectorAll(".highcharts-tab-item-content");tG(s[0]),tJ.call(this,t,s[0]),tZ.call(this,t,s[0],"add"),n=s[0].querySelectorAll(".highcharts-popup-rhs-col")[0],this.addButton(n,e.addButton||"add","add",n,o),tG(s[1]),tZ.call(this,t,s[1],"edit"),n=s[1].querySelectorAll(".highcharts-popup-rhs-col")[0],this.addButton(n,e.saveButton||"save","edit",n,o),this.addButton(n,e.removeButton||"remove","remove",n,o)}},getAmount:function(){var t=0;return this.series.forEach(function(i){(i.params||i.options.params)&&t++}),t}},tabs:{init:function(t){if(t){var i=this.indicators.getAmount.call(t),o=t3.call(this,"add");t3.call(this,"edit",i),t6.call(this),t6.call(this),it.call(this,i),t8.call(this,o,0)}}}});var ir=k().composed;function ia(){this.popup&&this.popup.closePopup()}function ih(t){this.popup||(this.popup=new is(this.chart.container,this.chart.options.navigation.iconsURL||this.chart.options.stockTools&&this.chart.options.stockTools.gui.iconsURL||"https://code.highcharts.com/12.6.0/gfx/stock-icons/",this.chart)),this.popup.showForm(t.formType,this.chart,t.options,t.onSubmit)}function ic(t,i){this.inClass(i.target,"highcharts-popup")||t.apply(this,Array.prototype.slice.call(arguments,1))}var il=function(t,i){z(ir,"Popup")&&(B(t,"closePopup",ia),B(t,"showPopup",ih),G(i.prototype,"onContainerMouseDown",ic))},ip=(f=function(t,i){return(f=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(t[o]=i[o])})(t,i)},function(t,i){if("function"!=typeof i&&null!==i)throw TypeError("Class extends value "+String(i)+" is not a constructor or null");function o(){this.constructor=t}f(t,i),t.prototype=null===i?Object.create(i):(o.prototype=i.prototype,new o)}),iu=function(t,i,o){if(o||2==arguments.length)for(var n,e=0,s=i.length;e<s;e++)!n&&e in i||(n||(n=Array.prototype.slice.call(i,0,e)),n[e]=i[e]);return t.concat(n||Array.prototype.slice.call(i))},id=k().getDeferredAnimation,iv=k().defaultOptions;function iy(t,i){var o={};return["labels","shapes"].forEach(function(n){var e=t[n],s=i[n];e&&(s?o[n]=(F(s)?s:[s]).map(function(t,i){return U(e[i],t)}):o[n]=t[n])}),o}var ig=function(t){function i(i,o){var n=t.call(this)||this;n.coll="annotations",n.chart=i,n.points=[],n.controlPoints=[],n.coll="annotations",n.index=-1,n.labels=[],n.shapes=[],n.setOptions(o),n.userOptions=o;var e=iy(n.options,o);return n.options.labels=e.labels,n.options.shapes=e.shapes,n.init(i,n.options),n}return ip(i,t),i.compose=function(t,o,n,e){ti.compose(i,t,n),tI.compose(e),tw.compose(t,e),o.compose(i,t),il(o,n)},i.prototype.addClipPaths=function(){this.setClipAxes(),this.clipXAxis&&this.clipYAxis&&this.options.crop&&(this.clipRect=this.chart.renderer.clipRect(this.getClipBox()))},i.prototype.addLabels=function(){var t=this,i=this.options.labels||[];i.forEach(function(o,n){var e=t.initLabel(o,n);U(!0,i[n],e.options)})},i.prototype.addShapes=function(){var t=this,i=this.options.shapes||[];i.forEach(function(o,n){var e=t.initShape(o,n);U(!0,i[n],e.options)})},i.prototype.destroy=function(){var i,o=this.chart,n=function(t){t.destroy()};this.labels.forEach(n),this.shapes.forEach(n),this.clipXAxis=null,this.clipYAxis=null,_(o.labelCollectors,this.labelCollector),t.prototype.destroy.call(this),this.destroyControlTarget(),i=this,W(i,function(t,n){t!==o&&(null==t?void 0:t.destroy)&&t.destroy(),null==t||t.destroy,delete i[n]})},i.prototype.destroyItem=function(t){_(this[t.itemType+"s"],t),t.destroy()},i.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}},i.prototype.initProperties=function(t,i){this.setOptions(i);var o=iy(this.options,i);this.options.labels=o.labels,this.options.shapes=o.shapes,this.chart=t,this.points=[],this.controlPoints=[],this.coll="annotations",this.userOptions=i,this.labels=[],this.shapes=[]},i.prototype.init=function(t,i,o){void 0===o&&(o=this.index);var n=this.chart,e=this.options.animation;this.index=o,this.linkPoints(),this.addControlPoints(),this.addShapes(),this.addLabels(),this.setLabelCollector(),this.animationConfig=id(n,e)},i.prototype.initLabel=function(t,i){null==(o=this.options.labelOptions)||o.align;var o,n=new tI(this,U(this.options.labelOptions,{controlPointOptions:this.options.controlPointOptions},t),i);return n.itemType="label",this.labels.push(n),n},i.prototype.initShape=function(t,o){var n=U(this.options.shapeOptions,{controlPointOptions:this.options.controlPointOptions},t),e=new i.shapesMap[n.type||"rect"](this,n,o);return e.itemType="shape",this.shapes.push(e),e},i.prototype.redraw=function(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)},i.prototype.redrawItem=function(t,i){if(t.linkPoints(),t.shouldBeDrawn()){var o,n;t.graphic||this.renderItem(t),t.redraw(H(i,!0)&&t.graphic.placed),t.points.length&&(o=t.graphic,n=t.points.some(function(t){return!1!==t.series.visible&&!1!==t.visible}),o&&(n?"hidden"===o.visibility&&o.show():o.hide()))}else this.destroyItem(t)},i.prototype.redrawItems=function(t,i){for(var o=t.length;o--;)this.redrawItem(t[o],i)},i.prototype.remove=function(){return this.chart.removeAnnotation(this)},i.prototype.render=function(){var 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()},i.prototype.renderItem=function(t){t.render("label"===t.itemType?this.labelsGroup:this.shapesGroup)},i.prototype.renderItems=function(t){for(var i=t.length;i--;)this.renderItem(t[i])},i.prototype.setClipAxes=function(){var t,i,o=this.chart.xAxis,n=this.chart.yAxis,e=iu(iu([],null!=(t=this.options.labels)?t:[],!0),null!=(i=this.options.shapes)?i:[],!0).reduce(function(t,i){var e,s=i&&(i.point||"points"in i&&(null==(e=i.points)?void 0:e[0]));return[o[s&&s.xAxis]||t[0],n[s&&s.yAxis]||t[1]]},[]);this.clipXAxis=e[0],this.clipYAxis=e[1]},i.prototype.setControlPointsVisibility=function(t){var i=function(i){i.setControlPointsVisibility(t)};this.controlPoints.forEach(function(i){i.setVisibility(t)}),this.shapes.forEach(i),this.labels.forEach(i)},i.prototype.setLabelCollector=function(){var t=this;t.labelCollector=function(){return t.labels.reduce(function(t,i){return i.options.allowOverlap||t.push(i.graphic),t},[])},t.chart.labelCollectors.push(t.labelCollector)},i.prototype.setOptions=function(t){var i,o;this.options=U(this.defaultOptions,t.type&&(null==(i=this.defaultOptions.types)?void 0:i[t.type])||{},t),(o=this.options).typeOptions||(o.typeOptions={})},i.prototype.setVisibility=function(t){var i=this.options,o=this.chart.navigationBindings,n=H(t,!i.visible);if(this.graphic.attr("visibility",n?"inherit":"hidden"),!n){var e=function(t){t.setControlPointsVisibility(n)};this.shapes.forEach(e),this.labels.forEach(e),o.activeAnnotation===this&&o.popup&&"annotation-toolbar"===o.popup.type&&I(o,"closePopup")}i.visible=n},i.prototype.update=function(t,i){var o=this.chart,n=iy(this.userOptions,t),e=o.annotations.indexOf(this),s=U(!0,this.userOptions,t);s.labels=n.labels,s.shapes=n.shapes,this.destroy(),this.initProperties(o,s),this.init(o,s),o.options.annotations[e]=this.options,this.isUpdating=!0,H(i,!0)&&o.drawAnnotations(),I(this,"afterUpdate"),this.isUpdating=!1},i.ControlPoint=ta,i.MockPoint=tp,i.shapesMap={rect:tO,circle:tk,ellipse:tN,path:tw,image:tL},i.types={},i}(ts);ig.prototype.defaultOptions=to,iv.annotations=to,ig.prototype.nonDOMEvents=["add","afterUpdate","drag","remove"],tu.compose(ig),(v=b||(b={})).compose=function(t){return t.navigation||(t.navigation=new y(t)),t},v.Additions=y=function(){function t(t){this.updates=[],this.chart=t}return t.prototype.addUpdate=function(t){this.chart.navigation.updates.push(t)},t.prototype.update=function(t,i){var o=this;this.updates.forEach(function(n){n.call(o.chart,t,i)})},t}();var im=b,ix={backgroundColor:"color",backgroundColors:"color",borderColor:"color",borderRadius:"string",color:"color",fill:"color",fontSize:"string",labels:"string",name:"string",stroke:"color",title:"string"},ib=function(t){return t.filter(function(t){var i=t.axis.getExtremes(),o=i.min,n=i.max,e=H(t.axis.minPointOffset,0);return j(o)&&j(n)&&t.value>=o-e&&t.value<=n+e&&!t.axis.options.isInternal})[0]},iA={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){var i,o=null==(i=this.chart.pointer)?void 0:i.getCoordinates(t),n=o&&ib(o.xAxis),e=o&&ib(o.yAxis),s=this.chart.options.navigation;if(n&&e)return this.chart.addAnnotation(U({langKey:"circle",type:"basicAnnotation",shapes:[{type:"circle",point:{x:n.value,y:e.value,xAxis:n.axis.index,yAxis:e.axis.index},r:5}]},s.annotationsOptions,s.bindings.circleAnnotation.annotationsOptions))},steps:[function(t,i){var o,n=i.options.shapes,e=n&&n[0]&&n[0].point||{};if(j(e.xAxis)&&j(e.yAxis)){var s=this.chart.inverted,r=this.chart.xAxis[e.xAxis].toPixels(e.x),a=this.chart.yAxis[e.yAxis].toPixels(e.y);o=Math.max(Math.sqrt(Math.pow(s?a-t.chartX:r-t.chartX,2)+Math.pow(s?r-t.chartY:a-t.chartY,2)),5)}i.update({shapes:[{r:o}]})}]},ellipseAnnotation:{className:"highcharts-ellipse-annotation",start:function(t){var i,o=null==(i=this.chart.pointer)?void 0:i.getCoordinates(t),n=o&&ib(o.xAxis),e=o&&ib(o.yAxis),s=this.chart.options.navigation;if(n&&e)return this.chart.addAnnotation(U({langKey:"ellipse",type:"basicAnnotation",shapes:[{type:"ellipse",xAxis:n.axis.index,yAxis:e.axis.index,points:[{x:n.value,y:e.value},{x:n.value,y:e.value}],ry:1}]},s.annotationsOptions,s.bindings.ellipseAnnotation.annotationsOptions))},steps:[function(t,i){var o=i.shapes[0],n=o.getAbsolutePosition(o.points[1]);o.translatePoint(t.chartX-n.x,t.chartY-n.y,1),o.redraw(!1)},function(t,i){var o=i.shapes[0],n=o.getAbsolutePosition(o.points[0]),e=o.getAbsolutePosition(o.points[1]),s=o.getDistanceFromLine(n,e,t.chartX,t.chartY),r=o.getYAxis(),a=Math.abs(r.toValue(0)-r.toValue(s));o.setYRadius(a),o.redraw(!1)}]},rectangleAnnotation:{className:"highcharts-rectangle-annotation",start:function(t){var i,o=null==(i=this.chart.pointer)?void 0:i.getCoordinates(t),n=o&&ib(o.xAxis),e=o&&ib(o.yAxis);if(n&&e){var s=n.value,r=e.value,a=n.axis.index,h=e.axis.index,c=this.chart.options.navigation;return this.chart.addAnnotation(U({langKey:"rectangle",type:"basicAnnotation",shapes:[{type:"path",points:[{xAxis:a,yAxis:h,x:s,y:r},{xAxis:a,yAxis:h,x:s,y:r},{xAxis:a,yAxis:h,x:s,y:r},{xAxis:a,yAxis:h,x:s,y:r},{command:"Z"}]}]},c.annotationsOptions,c.bindings.rectangleAnnotation.annotationsOptions))}},steps:[function(t,i){var o,n=i.options.shapes,e=n&&n[0]&&n[0].points||[],s=null==(o=this.chart.pointer)?void 0:o.getCoordinates(t),r=s&&ib(s.xAxis),a=s&&ib(s.yAxis);if(r&&a){var h=r.value,c=a.value;e[1].x=h,e[2].x=h,e[2].y=c,e[3].y=c,i.update({shapes:[{points:e}]})}}]},labelAnnotation:{className:"highcharts-label-annotation",start:function(t){var i,o=null==(i=this.chart.pointer)?void 0:i.getCoordinates(t),n=o&&ib(o.xAxis),e=o&&ib(o.yAxis),s=this.chart.options.navigation;if(n&&e)return this.chart.addAnnotation(U({langKey:"label",type:"basicAnnotation",labelOptions:{format:"{y:.2f}",overflow:"none",crop:!0},labels:[{point:{xAxis:n.axis.index,yAxis:e.axis.index,x:n.value,y:e.value}}]},s.annotationsOptions,s.bindings.labelAnnotation.annotationsOptions))}}},events:{},annotationsOptions:{animation:{defer:0}}}},iw=k().setOptions,iP=tT().format,iO=k().composed,iC=k().doc,ik=k().win,iE=function(t,i){var o=ix[t],n=typeof i;return M(o)&&(n=o),({string:"text",number:"number",boolean:"checkbox",color:"color"})[n]};function iN(){this.chart.navigationBindings&&this.chart.navigationBindings.deselectAnnotation()}function iB(){this.navigationBindings&&this.navigationBindings.destroy()}function iT(){var t=this.options;t&&t.navigation&&t.navigation.bindings&&(this.navigationBindings=new iD(this,t.navigation),this.navigationBindings.initEvents(),this.navigationBindings.initUpdate())}function iM(){var t=this.navigationBindings,i="highcharts-disabled-btn";if(this&&t){var o=!1;if(this.series.forEach(function(t){!t.options.isInternal&&t.visible&&(o=!0)}),this.navigationBindings&&this.navigationBindings.container&&this.navigationBindings.container[0]){var n=this.navigationBindings.container[0];W(t.boundClassNames,function(t,e){var s=n.querySelectorAll("."+e);if(s)for(var r=0;r<s.length;r++){var a=s[r],h=a.className;"normal"===t.noDataState||o?-1!==h.indexOf(i)&&a.classList.remove(i):-1===h.indexOf(i)&&(a.className+=" "+i)}})}}}function i_(){this.deselectAnnotation()}function iS(){this.selectedButtonElement=null}function iI(t){var i,o,n=t.prototype.defaultOptions.events&&t.prototype.defaultOptions.events.click;function e(t){var i=this,o=i.chart.navigationBindings,e=o.activeAnnotation;n&&n.call(i,t),e!==i?(o.deselectAnnotation(),o.activeAnnotation=i,i.setControlPointsVisibility(!0),I(o,"showPopup",{annotation:i,formType:"annotation-toolbar",options:o.annotationToFields(i),onSubmit:function(t){if("remove"===t.actionType)o.activeAnnotation=!1,o.chart.removeAnnotation(i);else{var n={};o.fieldsToOptions(t.fields,n),o.deselectAnnotation();var e=n.typeOptions;"measure"===i.options.type&&(e.crosshairY.enabled=0!==e.crosshairY.strokeWidth,e.crosshairX.enabled=0!==e.crosshairX.strokeWidth),i.update(n)}}})):I(o,"closePopup"),t.activeAnnotation=!0}U(!0,t.prototype.defaultOptions.events,{click:e,touchstart:function(t){i=t.touches[0].clientX,o=t.touches[0].clientY},touchend:function(t){i&&Math.sqrt(Math.pow(i-t.changedTouches[0].clientX,2)+Math.pow(o-t.changedTouches[0].clientY,2))>=4||e.call(this,t)}})}var iD=function(){function t(t,i){this.boundClassNames=void 0,this.chart=t,this.options=i,this.eventsToUnbind=[],this.container=this.chart.container.getElementsByClassName(this.options.bindingsClassName||""),this.container.length||(this.container=iC.getElementsByClassName(this.options.bindingsClassName||""))}return t.compose=function(i,o){z(iO,"NavigationBindings")&&(B(i,"remove",iN),iI(i),W(i.types,function(t){iI(t)}),B(o,"destroy",iB),B(o,"load",iT),B(o,"render",iM),B(t,"closePopup",i_),B(t,"deselectButton",iS),iw(iA))},t.prototype.getCoords=function(t){var i,o=null==(i=this.chart.pointer)?void 0:i.getCoordinates(t);return[o&&ib(o.xAxis),o&&ib(o.yAxis)]},t.prototype.initEvents=function(){var t=this,i=t.chart,o=t.container,n=t.options;t.boundClassNames={},W(n.bindings||{},function(i){t.boundClassNames[i.className]=i}),[].forEach.call(o,function(i){t.eventsToUnbind.push(B(i,"click",function(o){var n=t.getButtonEvents(i,o);n&&!n.button.classList.contains("highcharts-disabled-btn")&&t.bindingsButtonClick(n.button,n.events,o)}))}),W(n.events||{},function(i,o){"function"==typeof i&&t.eventsToUnbind.push(B(t,o,i,{passive:!1}))}),t.eventsToUnbind.push(B(i.container,"click",function(o){!i.cancelClick&&i.isInsidePlot(o.chartX-i.plotLeft,o.chartY-i.plotTop,{visiblePlotOnly:!0})&&t.bindingsChartClick(this,o)})),t.eventsToUnbind.push(B(i.container,k().isTouchDevice?"touchmove":"mousemove",function(i){t.bindingsContainerMouseMove(this,i)},k().isTouchDevice?{passive:!1}:void 0))},t.prototype.initUpdate=function(){var t=this;im.compose(this.chart).navigation.addUpdate(function(i){t.update(i)})},t.prototype.bindingsButtonClick=function(t,i,o){var n=this.chart,e=n.renderer.boxWrapper,s=!0;this.selectedButtonElement&&(this.selectedButtonElement.classList===t.classList&&(s=!1),I(this,"deselectButton",{button:this.selectedButtonElement}),this.nextEvent&&(this.currentUserDetails&&"annotations"===this.currentUserDetails.coll&&n.removeAnnotation(this.currentUserDetails),this.mouseMoveEvent=this.nextEvent=!1)),s?(this.selectedButton=i,this.selectedButtonElement=t,I(this,"selectButton",{button:t}),i.init&&i.init.call(this,t,o),(i.start||i.steps)&&n.renderer.boxWrapper.addClass("highcharts-draw-mode")):(n.stockTools&&t.classList.remove("highcharts-active"),e.removeClass("highcharts-draw-mode"),this.nextEvent=!1,this.mouseMoveEvent=!1,this.selectedButton=null)},t.prototype.bindingsChartClick=function(t,i){t=this.chart;var o=this.activeAnnotation,n=this.selectedButton,e=t.renderer.boxWrapper;o&&(o.cancelClick||i.activeAnnotation||!i.target.parentNode||function(t,i){var o=ik.Element.prototype,n=o.matches||o.msMatchesSelector||o.webkitMatchesSelector,e=null;if(o.closest)e=o.closest.call(t,i);else do{if(n.call(t,i))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return e}(i.target,".highcharts-popup")?o.cancelClick&&setTimeout(function(){o.cancelClick=!1},0):I(this,"closePopup")),n&&n.start&&(this.nextEvent?(this.nextEvent(i,this.currentUserDetails),this.steps&&(this.stepIndex++,n.steps[this.stepIndex]?this.mouseMoveEvent=this.nextEvent=n.steps[this.stepIndex]:(I(this,"deselectButton",{button:this.selectedButtonElement}),e.removeClass("highcharts-draw-mode"),n.end&&n.end.call(this,i,this.currentUserDetails),this.nextEvent=!1,this.mouseMoveEvent=!1,this.selectedButton=null))):(this.currentUserDetails=n.start.call(this,i),this.currentUserDetails&&n.steps?(this.stepIndex=0,this.steps=!0,this.mouseMoveEvent=this.nextEvent=n.steps[this.stepIndex]):(I(this,"deselectButton",{button:this.selectedButtonElement}),e.removeClass("highcharts-draw-mode"),this.steps=!1,this.selectedButton=null,n.end&&n.end.call(this,i,this.currentUserDetails))))},t.prototype.bindingsContainerMouseMove=function(t,i){this.mouseMoveEvent&&this.mouseMoveEvent(i,this.currentUserDetails)},t.prototype.fieldsToOptions=function(t,i){return W(t,function(t,o){var n=parseFloat(t),e=o.split("."),s=e.length-1;if(!j(n)||t.match(/px|em/g)||o.match(/format/g)||(t=n),"undefined"!==t){var r=i;e.forEach(function(i,o){if("__proto__"!==i&&"constructor"!==i){var n=H(e[o+1],"");s===o?r[i]=t:(r[i]||(r[i]=n.match(/\d/g)?[]:{}),r=r[i])}})}}),i},t.prototype.deselectAnnotation=function(){this.activeAnnotation&&(this.activeAnnotation.setControlPointsVisibility(!1),this.activeAnnotation=!1)},t.prototype.annotationToFields=function(i){var o,n,e,s,r=i.options,a=t.annotationsEditable,h=a.nestedOptions,c=H(r.type,null==(n=null==(o=r.shapes)?void 0:o[0])?void 0:n.type,null==(s=null==(e=r.labels)?void 0:e[0])?void 0:s.type,"label"),l=t.annotationsNonEditable[r.langKey]||[],p={langKey:r.langKey,type:c};function u(t,o,n,e,s){var r;n&&M(t)&&-1===l.indexOf(o)&&((n.indexOf&&n.indexOf(o))>=0||n[o]||!0===n)&&(F(t)?(e[o]=[],t.forEach(function(t,i){R(t)?(e[o][i]={},W(t,function(t,n){u(t,n,h[o],e[o][i],o)})):u(t,0,h[o],e[o],o)})):R(t)?(r={},F(e)?(e.push(r),r[o]={},r=r[o]):e[o]=r,W(t,function(t,i){u(t,i,0===o?n:h[o],r,o)})):"format"===o?e[o]=[iP(t,i.labels[0].points[0]).toString(),"text"]:F(e)?e.push([t,iE(s,t)]):e[o]=[t,iE(o,t)])}return W(r,function(t,i){"typeOptions"===i&&"basicAnnotation"!==p.type?(p[i]={},W(r[i],function(t,o){u(t,o,h,p[i],o)})):u(t,i,a[c],p,i)}),p},t.prototype.getClickedClassNames=function(t,i){for(var o,n,e,s,r,a,h=i.target,c=[];h&&h.tagName&&(o=h,s=X(n="class")&&!M(void 0),r=function(t,i){M(t)?o.setAttribute(i,t):s?(e=o.getAttribute(i))||"class"!==i||(e=o.getAttribute(i+"Name")):o.removeAttribute(i)},X(n)?r(void 0,n):W(n,r),(a=e)&&(c=c.concat(a.split(" ").map(function(t){return[t,h]}))),(h=h.parentNode)!==t););return c},t.prototype.getButtonEvents=function(t,i){var o,n=this;return this.getClickedClassNames(t,i).forEach(function(t){n.boundClassNames[t[0]]&&!o&&(o={events:n.boundClassNames[t[0]],button:t[1]})}),o},t.prototype.update=function(t){this.options=U(!0,this.options,t),this.removeEvents(),this.initEvents()},t.prototype.removeEvents=function(){this.eventsToUnbind.forEach(function(t){return t()})},t.prototype.destroy=function(){this.removeEvents()},t.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"]},t.annotationsNonEditable={rectangle:["crosshairX","crosshairY","labelOptions"],ellipse:["labelOptions"],circle:["labelOptions"]},t}(),iL=k();iL.Annotation=iL.Annotation||ig,iL.NavigationBindings=iL.NavigationBindings||iD,iL.Annotation.compose(iL.Chart,iL.NavigationBindings,iL.Pointer,iL.SVGRenderer);var iY=k();return O.default}()});