/**
 * Highstock JS v12.6.0 (2026-04-13)
 * @module highcharts/modules/stock-tools
 * @requires highcharts
 * @requires highcharts/modules/stock
 *
 * Advanced Highcharts Stock tools
 *
 * (c) 2010-2026 Highsoft AS
 * Author: Torstein Hønsi
 *
 * A commercial license may be required depending on use.
 * See www.highcharts.com/license
 */import*as t from"../highcharts.js";var e,i={};i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);let s=t.default;var n=i.n(s),o=e||(e={});o.compose=function(t){return t.navigation||(t.navigation=new a(t)),t};class a{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)})}}o.Additions=a;let r=e,l=t.default.Templating;var c=i.n(l);let{doc:h,win:p}=n();function d(t,e,i,s={}){let o="function"==typeof t&&t.prototype||t;Object.hasOwnProperty.call(o,"hcEvents")||(o.hcEvents={});let a=o.hcEvents;n().Point&&t instanceof n().Point&&t.series&&t.series.chart&&(t.series.chart.runTrackerClick=!0);let r=t.addEventListener;r&&r.call(t,e,i,!!n().supportsPassiveEvents&&{passive:void 0===s.passive?-1!==e.indexOf("touch"):s.passive,capture:!1}),a[e]||(a[e]=[]);let l={fn:i,order:"number"==typeof s.order?s.order:1/0};return a[e].push(l),a[e].sort((t,e)=>t.order-e.order),function(){!function(t,e,i){function s(e,i){let s=t.removeEventListener;s&&s.call(t,e,i,!1)}function n(i){let n,o;t.nodeName&&(e?(n={})[e]=!0:n=i,N(n,function(t,e){if(i[e])for(o=i[e].length;o--;)s(e,i[e][o].fn)}))}let o="function"==typeof t&&t.prototype||t;if(Object.hasOwnProperty.call(o,"hcEvents")){let t=o.hcEvents;if(e){let o=t[e]||[];i?(t[e]=o.filter(function(t){return i!==t.fn}),s(e,i)):(n(t),t[e]=[])}else n(t),delete o.hcEvents}}(t,e,i)}}function g(t,e){return t>1e14?t:parseFloat(t.toPrecision(e||14))}function u(t,e,i,s,n){let o=h.createElement(t);return e&&f(o,e),n&&m(o,{padding:"0",border:"none",margin:"0"}),i&&m(o,i),s&&s.appendChild(o),o}function m(t,e){f(t.style,e)}function y(t){return null!=t}function f(t,e){let i;for(i in t||(t={}),e)t[i]=e[i];return t}function v(t,e,i,s){if(i=i||{},h?.createEvent&&(t.dispatchEvent||t.fireEvent&&t!==n())){let s=h.createEvent("Events");s.initEvent(e,!0,!0),i=f(s,i),t.dispatchEvent?t.dispatchEvent(i):t.fireEvent(e,i)}else if(t.hcEvents){i.target||f(i,{preventDefault:function(){i.defaultPrevented=!0},target:t,type:e});let s=[],n=t,o=!1;for(;n.hcEvents;)Object.hasOwnProperty.call(n,"hcEvents")&&n.hcEvents[e]&&(s.length&&(o=!0),s.unshift.apply(s,n.hcEvents[e])),n=Object.getPrototypeOf(n);o&&s.sort((t,e)=>t.order-e.order),s.forEach(e=>{!1===e.fn.call(t,i,t)&&i.preventDefault()})}s&&!i.defaultPrevented&&s.call(t,i)}function b(t,e,i){let s;if("width"===e){let e=Math.min(t.offsetWidth,t.scrollWidth),i=t.getBoundingClientRect?.().width;return i<e&&i>=e-1&&(e=Math.floor(i)),Math.max(0,e-(b(t,"padding-left",!0)||0)-(b(t,"padding-right",!0)||0))}if("height"===e)return Math.max(0,Math.min(t.offsetHeight,t.scrollHeight)-(b(t,"padding-top",!0)||0)-(b(t,"padding-bottom",!0)||0));let n=p.getComputedStyle(t,void 0);return n&&(s=n.getPropertyValue(e),L(i,"opacity"!==e)&&(s=parseInt(s,10))),s}function x(t){return w(t)&&"number"==typeof t.nodeType}function A(t){return"number"==typeof t&&!isNaN(t)&&t<1/0&&t>-1/0}function k(t){return"string"==typeof t}function C(t){let e=Object.prototype.toString.call(t);return"[object Array]"===e||"[object Array Iterator]"===e}function w(t,e){return!!t&&"object"==typeof t&&(!e||!C(t))}function O(t,...e){let i,s=[t,...e],n={},o=function(t,e){return"object"!=typeof t&&(t={}),N(e,function(i,s){if("__proto__"!==s&&"constructor"!==s){let n;!w(i,!0)||(n=i?.constructor,w(i,!0)&&!x(i)&&n?.name&&"Object"!==n.name)||x(i)?t[s]=e[s]:t[s]=o(t[s]||{},i)}}),t};!0===t&&(n=s[1],s=Array.prototype.slice.call(s,2));let a=s.length;for(i=0;i<a;i++)n=o(n,s[i]);return n}function N(t,e,i){for(let s in t)Object.hasOwnProperty.call(t,s)&&e.call(i||t[s],t[s],s,t)}function L(){let t=arguments,e=t.length;for(let i=0;i<e;i++){let e=t[i];if(null!=e)return e}}Array.prototype.find;let T={backgroundColor:"color",backgroundColors:"color",borderColor:"color",borderRadius:"string",color:"color",fill:"color",fontSize:"string",labels:"string",name:"string",stroke:"color",title:"string"},E={annotationsFieldsTypes:T,getAssignedAxis:function(t){return t.filter(t=>{let e=t.axis.getExtremes(),i=e.min,s=e.max,n=L(t.axis.minPointOffset,0);return A(i)&&A(s)&&t.value>=i-n&&t.value<=s+n&&!t.axis.options.isInternal})[0]},getFieldType:function(t,e){let i=T[t],s=typeof e;return y(i)&&(s=i),({string:"text",number:"number",boolean:"checkbox",color:"color"})[s]}},{getAssignedAxis:B}=E,S={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&&B(e.xAxis),s=e&&B(e.yAxis),n=this.chart.options.navigation;if(i&&s)return this.chart.addAnnotation(O({langKey:"circle",type:"basicAnnotation",shapes:[{type:"circle",point:{x:i.value,y:s.value,xAxis:i.axis.index,yAxis:s.axis.index},r:5}]},n.annotationsOptions,n.bindings.circleAnnotation.annotationsOptions))},steps:[function(t,e){let i,s=e.options.shapes,n=s&&s[0]&&s[0].point||{};if(A(n.xAxis)&&A(n.yAxis)){let e=this.chart.inverted,s=this.chart.xAxis[n.xAxis].toPixels(n.x),o=this.chart.yAxis[n.yAxis].toPixels(n.y);i=Math.max(Math.sqrt(Math.pow(e?o-t.chartX:s-t.chartX,2)+Math.pow(e?s-t.chartY:o-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&&B(e.xAxis),s=e&&B(e.yAxis),n=this.chart.options.navigation;if(i&&s)return this.chart.addAnnotation(O({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}]},n.annotationsOptions,n.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]),n=i.getAbsolutePosition(i.points[1]),o=i.getDistanceFromLine(s,n,t.chartX,t.chartY),a=i.getYAxis(),r=Math.abs(a.toValue(0)-a.toValue(o));i.setYRadius(r),i.redraw(!1)}]},rectangleAnnotation:{className:"highcharts-rectangle-annotation",start:function(t){let e=this.chart.pointer?.getCoordinates(t),i=e&&B(e.xAxis),s=e&&B(e.yAxis);if(!i||!s)return;let n=i.value,o=s.value,a=i.axis.index,r=s.axis.index,l=this.chart.options.navigation;return this.chart.addAnnotation(O({langKey:"rectangle",type:"basicAnnotation",shapes:[{type:"path",points:[{xAxis:a,yAxis:r,x:n,y:o},{xAxis:a,yAxis:r,x:n,y:o},{xAxis:a,yAxis:r,x:n,y:o},{xAxis:a,yAxis:r,x:n,y:o},{command:"Z"}]}]},l.annotationsOptions,l.bindings.rectangleAnnotation.annotationsOptions))},steps:[function(t,e){let i=e.options.shapes,s=i&&i[0]&&i[0].points||[],n=this.chart.pointer?.getCoordinates(t),o=n&&B(n.xAxis),a=n&&B(n.yAxis);if(o&&a){let t=o.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&&B(e.xAxis),s=e&&B(e.yAxis),n=this.chart.options.navigation;if(i&&s)return this.chart.addAnnotation(O({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}}]},n.annotationsOptions,n.bindings.labelAnnotation.annotationsOptions))}}},events:{},annotationsOptions:{animation:{defer:0}}}},{setOptions:P}=n(),{format:I}=c(),{composed:z,doc:Y,win:W}=n(),{getAssignedAxis:M,getFieldType:R}=E;function H(){this.chart.navigationBindings&&this.chart.navigationBindings.deselectAnnotation()}function X(){this.navigationBindings&&this.navigationBindings.destroy()}function D(){let t=this.options;t&&t.navigation&&t.navigation.bindings&&(this.navigationBindings=new q(this,t.navigation),this.navigationBindings.initEvents(),this.navigationBindings.initUpdate())}function U(){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];N(t.boundClassNames,(t,n)=>{let o=s.querySelectorAll("."+n);if(o)for(let s=0;s<o.length;s++){let n=o[s],a=n.className;"normal"===t.noDataState||i?-1!==a.indexOf(e)&&n.classList.remove(e):-1===a.indexOf(e)&&(n.className+=" "+e)}})}}}function F(){this.deselectAnnotation()}function K(){this.selectedButtonElement=null}function V(t){let e,i,s=t.prototype.defaultOptions.events&&t.prototype.defaultOptions.events.click;function n(t){let e=this,i=e.chart.navigationBindings,n=i.activeAnnotation;s&&s.call(e,t),n!==e?(i.deselectAnnotation(),i.activeAnnotation=e,e.setControlPointsVisibility(!0),v(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 n=s.typeOptions;"measure"===e.options.type&&(n.crosshairY.enabled=0!==n.crosshairY.strokeWidth,n.crosshairX.enabled=0!==n.crosshairX.strokeWidth),e.update(s)}}})):v(i,"closePopup"),t.activeAnnotation=!0}O(!0,t.prototype.defaultOptions.events,{click:n,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||n.call(this,t)}})}class q{static compose(t,e){var i;i="NavigationBindings",0>z.indexOf(i)&&z.push(i)&&(d(t,"remove",H),V(t),N(t.types,t=>{V(t)}),d(e,"destroy",X),d(e,"load",D),d(e,"render",U),d(q,"closePopup",F),d(q,"deselectButton",K),P(S))}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=Y.getElementsByClassName(this.options.bindingsClassName||""))}getCoords(t){let e=this.chart.pointer?.getCoordinates(t);return[e&&M(e.xAxis),e&&M(e.yAxis)]}initEvents(){let t=this,e=t.chart,i=t.container,s=t.options;t.boundClassNames={},N(s.bindings||{},e=>{t.boundClassNames[e.className]=e}),[].forEach.call(i,e=>{t.eventsToUnbind.push(d(e,"click",i=>{let s=t.getButtonEvents(e,i);s&&!s.button.classList.contains("highcharts-disabled-btn")&&t.bindingsButtonClick(s.button,s.events,i)}))}),N(s.events||{},(e,i)=>{"function"==typeof e&&t.eventsToUnbind.push(d(t,i,e,{passive:!1}))}),t.eventsToUnbind.push(d(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(d(e.container,n().isTouchDevice?"touchmove":"mousemove",function(e){t.bindingsContainerMouseMove(this,e)},n().isTouchDevice?{passive:!1}:void 0))}initUpdate(){let t=this;r.compose(this.chart).navigation.addUpdate(e=>{t.update(e)})}bindingsButtonClick(t,e,i){let s=this.chart,n=s.renderer.boxWrapper,o=!0;this.selectedButtonElement&&(this.selectedButtonElement.classList===t.classList&&(o=!1),v(this,"deselectButton",{button:this.selectedButtonElement}),this.nextEvent&&(this.currentUserDetails&&"annotations"===this.currentUserDetails.coll&&s.removeAnnotation(this.currentUserDetails),this.mouseMoveEvent=this.nextEvent=!1)),o?(this.selectedButton=e,this.selectedButtonElement=t,v(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"),n.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,n=t.renderer.boxWrapper;i&&(i.cancelClick||e.activeAnnotation||!e.target.parentNode||function(t,e){let i=W.Element.prototype,s=i.matches||i.msMatchesSelector||i.webkitMatchesSelector,n=null;if(i.closest)n=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 n}(e.target,".highcharts-popup")?i.cancelClick&&setTimeout(()=>{i.cancelClick=!1},0):v(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]:(v(this,"deselectButton",{button:this.selectedButtonElement}),n.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]):(v(this,"deselectButton",{button:this.selectedButtonElement}),n.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 N(t,(t,i)=>{let s=parseFloat(t),n=i.split("."),o=n.length-1;if(!A(s)||t.match(/px|em/g)||i.match(/format/g)||(t=s),"undefined"!==t){let i=e;n.forEach((e,s)=>{if("__proto__"!==e&&"constructor"!==e){let a=L(n[s+1],"");o===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=q.annotationsEditable,s=i.nestedOptions,n=L(e.type,e.shapes?.[0]?.type,e.labels?.[0]?.type,"label"),o=q.annotationsNonEditable[e.langKey]||[],a={langKey:e.langKey,type:n};function r(e,i,n,a,l){let c;n&&y(e)&&-1===o.indexOf(i)&&((n.indexOf&&n.indexOf(i))>=0||n[i]||!0===n)&&(C(e)?(a[i]=[],e.forEach((t,e)=>{w(t)?(a[i][e]={},N(t,(t,n)=>{r(t,n,s[i],a[i][e],i)})):r(t,0,s[i],a[i],i)})):w(e)?(c={},C(a)?(a.push(c),c[i]={},c=c[i]):a[i]=c,N(e,(t,e)=>{r(t,e,0===i?n:s[i],c,i)})):"format"===i?a[i]=[I(e,t.labels[0].points[0]).toString(),"text"]:C(a)?a.push([e,R(l,e)]):a[i]=[e,R(i,e)])}return N(e,(t,o)=>{"typeOptions"===o&&"basicAnnotation"!==a.type?(a[o]={},N(e[o],(t,e)=>{r(t,e,s,a[o],e)})):r(t,o,i[n],a,o)}),a}getClickedClassNames(t,e){var i,s;let n,o,a,r=e.target,l=[],c;for(;r&&r.tagName&&(i=r,o=k(s="class")&&!y(void 0),a=(t,e)=>{y(t)?i.setAttribute(e,t):o?(n=i.getAttribute(e))||"class"!==e||(n=i.getAttribute(e+"Name")):i.removeAttribute(e)},k(s)?a(void 0,s):N(s,a),(c=n)&&(l=l.concat(c.split(" ").map(t=>[t,r]))),(r=r.parentNode)!==t););return l}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=O(!0,this.options,t),this.removeEvents(),this.initEvents()}removeEvents(){this.eventsToUnbind.forEach(t=>t())}destroy(){this.removeEvents()}}q.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"]},q.annotationsNonEditable={rectangle:["crosshairX","crosshairY","labelOptions"],ellipse:["labelOptions"],circle:["labelOptions"]};let Z=t.default.Series;var j=i.n(Z);let{getOptions:_}=n(),{getAssignedAxis:G,getFieldType:J}=E,Q=["apo","ad","aroon","aroonoscillator","atr","ao","cci","chaikin","cmf","cmo","disparityindex","dmi","dpo","linearregressionangle","linearregressionintercept","linearregressionslope","klinger","macd","mfi","momentum","natr","obv","ppo","roc","rsi","slowstochastic","stochastic","trix","williamsr"],$=["ad","cmf","klinger","mfi","obv","vbp","vwap"];function tt(t,e){let i=e.pointer?.getCoordinates(t),s,n,o=Number.MAX_VALUE,a;if(e.navigationBindings&&i&&(s=G(i.xAxis),n=G(i.yAxis)),!s||!n)return;let r=s.value,l=n.value;if(n.axis.series.forEach(e=>{if(e.points){let i=e.searchPoint(t,!0);i&&o>Math.abs(i.x-r)&&(o=Math.abs(i.x-r),a=i)}}),a&&a.x&&a.y)return{x:a.x,y:a.y,below:l<a.y,series:a.series,xAxis:a.series.xAxis.index||0,yAxis:a.series.yAxis.index||0}}let te={indicatorsWithAxes:Q,indicatorsWithVolume:$,addFlagFromForm:function(t){return function(e){let i=this,s=i.chart,n=s.stockTools,o=tt(e,s);if(!o)return;let a={x:o.x,y:o.y},r={type:"flags",onSeries:o.series.id,shape:t,data:[a],xAxis:o.xAxis,yAxis:o.yAxis,point:{events:{click:function(){let t=this,e=t.options;v(i,"showPopup",{point:t,formType:"annotation-toolbar",options:{langKey:"flags",type:"flags",title:[e.title,J("title",e.title)],name:[e.name,J("name",e.name)]},onSubmit:function(e){"remove"===e.actionType?t.remove():t.update(i.fieldsToOptions(e.fields,{}))}})}}}};n&&n.guiEnabled||s.addSeries(r),v(i,"showPopup",{formType:"flag",options:{langKey:"flags",type:"flags",title:["A",J("label","A")],name:["Flag A",J("label","Flag A")]},onSubmit:function(t){i.fieldsToOptions(t.fields,r.data[0]),s.addSeries(r)}})}},attractToPoint:tt,getAssignedAxis:G,isNotNavigatorYAxis:function(t){return"highcharts-navigator-yaxis"!==t.userOptions.className},isPriceIndicatorEnabled:function(t){return t.some(t=>t.lastVisiblePrice||t.lastPrice)},manageIndicators:function(t){let e,i,n,o,a=this.chart,r={linkedTo:t.linkedTo,type:t.type};if("edit"===t.actionType)this.fieldsToOptions(t.fields,r),(o=a.get(t.seriesId))&&o.update(r,!1);else if("remove"===t.actionType){if((o=a.get(t.seriesId))&&(e=o.yAxis,o.linkedSeries&&o.linkedSeries.forEach(t=>{t.remove(!1)}),o.remove(!1),Q.indexOf(o.type)>=0)){let t={height:e.options.height,top:e.options.top};e.remove(!1),this.resizeYAxes(t)}}else r.id=(0,s.uniqueKey)(),this.fieldsToOptions(t.fields,r),i=a.get(r.linkedTo),n=_().plotOptions,void 0!==i&&i instanceof j()&&"sum"===i.getDGApproximation()&&!y(n&&n[r.type]&&n.dataGrouping&&n.dataGrouping.approximation)&&(r.dataGrouping={approximation:"sum"}),Q.indexOf(t.type)>=0?(r.yAxis=(e=a.addAxis({id:(0,s.uniqueKey)(),offset:0,opposite:!0,title:{text:""},tickPixelInterval:40,showLastLabel:!1,labels:{align:"left",y:-2}},!1,!1)).options.id,this.resizeYAxes()):r.yAxis=a.get(t.linkedTo).options.yAxis,$.indexOf(t.type)>=0&&(r.params.volumeSeriesID=a.series.filter(function(t){return"column"===t.options.type})[0].options.id),a.addSeries(r,!1);v(this,"deselectButton",{button:this.selectedButtonElement}),a.redraw()},shallowArraysEqual:function(t,e){if(!y(t)||!y(e)||t.length!==e.length)return!1;for(let i=0;i<t.length;i++)if(t[i]!==e[i])return!1;return!0},updateHeight:function(t,e){let i=e.options.typeOptions,s=A(i.yAxis)&&this.chart.yAxis[i.yAxis];s&&i.points&&e.update({typeOptions:{height:s.toValue(t[s.horiz?"chartX":"chartY"])-(i.points[1].y||0)}})},updateNthPoint:function(t){return function(e,i){let s=i.options.typeOptions,n=A(s.xAxis)&&this.chart.xAxis[s.xAxis],o=A(s.yAxis)&&this.chart.yAxis[s.yAxis];n&&o&&(s.points.forEach((i,s)=>{s>=t&&(i.x=n.toValue(e[n.horiz?"chartX":"chartY"]),i.y=o.toValue(e[o.horiz?"chartX":"chartY"]))}),i.update({typeOptions:{points:s.points}}))}},updateRectSize:function(t,e){let i=e.chart,s=e.options.typeOptions,n=A(s.xAxis)&&i.xAxis[s.xAxis],o=A(s.yAxis)&&i.yAxis[s.yAxis];if(n&&o){let a=n.toValue(t[n.horiz?"chartX":"chartY"]),r=o.toValue(t[o.horiz?"chartX":"chartY"]),l=a-s.point.x,c=s.point.y-r;e.update({typeOptions:{background:{width:i.inverted?c:l,height:i.inverted?l:c}}})}}},{addFlagFromForm:ti,attractToPoint:ts,isNotNavigatorYAxis:tn,isPriceIndicatorEnabled:to,manageIndicators:ta,updateHeight:tr,updateNthPoint:tl,updateRectSize:tc}=te,th={segment:{className:"highcharts-segment",start:function(t){let[e,i]=this.getCoords(t);if(!e||!i)return;let s=this.chart.options.navigation,n=O({langKey:"segment",type:"crookedLine",typeOptions:{xAxis:e.axis.index,yAxis:i.axis.index,points:[{x:e.value,y:i.value},{x:e.value,y:i.value}]}},s.annotationsOptions,s.bindings?.segment.annotationsOptions);return this.chart.addAnnotation(n)},steps:[tl(1)]},arrowSegment:{className:"highcharts-arrow-segment",start:function(t){let[e,i]=this.getCoords(t);if(!e||!i)return;let s=this.chart.options.navigation,n=O({langKey:"arrowSegment",type:"crookedLine",typeOptions:{line:{markerEnd:"arrow"},xAxis:e.axis.index,yAxis:i.axis.index,points:[{x:e.value,y:i.value},{x:e.value,y:i.value}]}},s.annotationsOptions,s.bindings?.arrowSegment.annotationsOptions);return this.chart.addAnnotation(n)},steps:[tl(1)]},ray:{className:"highcharts-ray",start:function(t){let[e,i]=this.getCoords(t);if(!e||!i)return;let s=this.chart.options.navigation,n=O({langKey:"ray",type:"infinityLine",typeOptions:{type:"ray",xAxis:e.axis.index,yAxis:i.axis.index,points:[{x:e.value,y:i.value},{x:e.value,y:i.value}]}},s.annotationsOptions,s.bindings?.ray.annotationsOptions);return this.chart.addAnnotation(n)},steps:[tl(1)]},arrowRay:{className:"highcharts-arrow-ray",start:function(t){let[e,i]=this.getCoords(t);if(!e||!i)return;let s=this.chart.options.navigation,n=O({langKey:"arrowRay",type:"infinityLine",typeOptions:{type:"ray",line:{markerEnd:"arrow"},xAxis:e.axis.index,yAxis:i.axis.index,points:[{x:e.value,y:i.value},{x:e.value,y:i.value}]}},s.annotationsOptions,s.bindings?.arrowRay.annotationsOptions);return this.chart.addAnnotation(n)},steps:[tl(1)]},infinityLine:{className:"highcharts-infinity-line",start:function(t){let[e,i]=this.getCoords(t);if(!e||!i)return;let s=this.chart.options.navigation,n=O({langKey:"infinityLine",type:"infinityLine",typeOptions:{type:"line",xAxis:e.axis.index,yAxis:i.axis.index,points:[{x:e.value,y:i.value},{x:e.value,y:i.value}]}},s.annotationsOptions,s.bindings?.infinityLine.annotationsOptions);return this.chart.addAnnotation(n)},steps:[tl(1)]},arrowInfinityLine:{className:"highcharts-arrow-infinity-line",start:function(t){let[e,i]=this.getCoords(t);if(!e||!i)return;let s=this.chart.options.navigation,n=O({langKey:"arrowInfinityLine",type:"infinityLine",typeOptions:{type:"line",line:{markerEnd:"arrow"},xAxis:e.axis.index,yAxis:i.axis.index,points:[{x:e.value,y:i.value},{x:e.value,y:i.value}]}},s.annotationsOptions,s.bindings?.arrowInfinityLine.annotationsOptions);return this.chart.addAnnotation(n)},steps:[tl(1)]},horizontalLine:{className:"highcharts-horizontal-line",start:function(t){let[e,i]=this.getCoords(t);if(!e||!i)return;let s=this.chart.options.navigation,n=O({langKey:"horizontalLine",type:"infinityLine",draggable:"y",typeOptions:{type:"horizontalLine",xAxis:e.axis.index,yAxis:i.axis.index,points:[{x:e.value,y:i.value}]}},s.annotationsOptions,s.bindings?.horizontalLine.annotationsOptions);this.chart.addAnnotation(n)}},verticalLine:{className:"highcharts-vertical-line",start:function(t){let[e,i]=this.getCoords(t);if(!e||!i)return;let s=this.chart.options.navigation,n=O({langKey:"verticalLine",type:"infinityLine",draggable:"x",typeOptions:{type:"verticalLine",xAxis:e.axis.index,yAxis:i.axis.index,points:[{x:e.value,y:i.value}]}},s.annotationsOptions,s.bindings?.verticalLine.annotationsOptions);this.chart.addAnnotation(n)}},crooked3:{className:"highcharts-crooked3",start:function(t){let[e,i]=this.getCoords(t);if(!e||!i)return;let s=e.value,n=i.value,o=this.chart.options.navigation,a=O({langKey:"crooked3",type:"crookedLine",typeOptions:{xAxis:e.axis.index,yAxis:i.axis.index,points:[{x:s,y:n},{x:s,y:n},{x:s,y:n}]}},o.annotationsOptions,o.bindings?.crooked3.annotationsOptions);return this.chart.addAnnotation(a)},steps:[tl(1),tl(2)]},crooked5:{className:"highcharts-crooked5",start:function(t){let[e,i]=this.getCoords(t);if(!e||!i)return;let s=e.value,n=i.value,o=this.chart.options.navigation,a=O({langKey:"crooked5",type:"crookedLine",typeOptions:{xAxis:e.axis.index,yAxis:i.axis.index,points:[{x:s,y:n},{x:s,y:n},{x:s,y:n},{x:s,y:n},{x:s,y:n}]}},o.annotationsOptions,o.bindings?.crooked5.annotationsOptions);return this.chart.addAnnotation(a)},steps:[tl(1),tl(2),tl(3),tl(4)]},elliott3:{className:"highcharts-elliott3",start:function(t){let[e,i]=this.getCoords(t);if(!e||!i)return;let s=e.value,n=i.value,o=this.chart.options.navigation,a=O({langKey:"elliott3",type:"elliottWave",typeOptions:{xAxis:e.axis.index,yAxis:i.axis.index,points:[{x:s,y:n},{x:s,y:n},{x:s,y:n},{x:s,y:n}]}},o.annotationsOptions,o.bindings?.elliott3.annotationsOptions);return this.chart.addAnnotation(a)},steps:[tl(1),tl(2),tl(3)]},elliott5:{className:"highcharts-elliott5",start:function(t){let[e,i]=this.getCoords(t);if(!e||!i)return;let s=e.value,n=i.value,o=this.chart.options.navigation,a=O({langKey:"elliott5",type:"elliottWave",typeOptions:{xAxis:e.axis.index,yAxis:i.axis.index,points:[{x:s,y:n},{x:s,y:n},{x:s,y:n},{x:s,y:n},{x:s,y:n},{x:s,y:n}]}},o.annotationsOptions,o.bindings?.elliott5.annotationsOptions);return this.chart.addAnnotation(a)},steps:[tl(1),tl(2),tl(3),tl(4),tl(5)]},measureX:{className:"highcharts-measure-x",start:function(t){let[e,i]=this.getCoords(t);if(!e||!i)return;let s=e.value,n=i.value,o=this.chart.options.navigation,a=O({langKey:"measure",type:"measure",typeOptions:{selectType:"x",xAxis:e.axis.index,yAxis:i.axis.index,point:{x:s,y:n},crosshairX:{strokeWidth:1},crosshairY:{enabled:!1,strokeWidth:0},background:{width:0,height:0}}},o.annotationsOptions,o.bindings?.measureX.annotationsOptions);return this.chart.addAnnotation(a)},steps:[tc]},measureY:{className:"highcharts-measure-y",start:function(t){let[e,i]=this.getCoords(t);if(!e||!i)return;let s=e.value,n=i.value,o=this.chart.options.navigation,a=O({langKey:"measure",type:"measure",typeOptions:{selectType:"y",xAxis:e.axis.index,yAxis:i.axis.index,point:{x:s,y:n},crosshairX:{enabled:!1,strokeWidth:0},crosshairY:{strokeWidth:1},background:{width:0,height:0,strokeWidth:0}}},o.annotationsOptions,o.bindings?.measureY.annotationsOptions);return this.chart.addAnnotation(a)},steps:[tc]},measureXY:{className:"highcharts-measure-xy",start:function(t){let[e,i]=this.getCoords(t);if(!e||!i)return;let s=e.value,n=i.value,o=this.chart.options.navigation,a=O({langKey:"measure",type:"measure",typeOptions:{selectType:"xy",xAxis:e.axis.index,yAxis:i.axis.index,point:{x:s,y:n},background:{width:0,height:0,strokeWidth:0},crosshairX:{strokeWidth:1},crosshairY:{strokeWidth:1}}},o.annotationsOptions,o.bindings?.measureXY.annotationsOptions);return this.chart.addAnnotation(a)},steps:[tc]},fibonacci:{className:"highcharts-fibonacci",start:function(t){let[e,i]=this.getCoords(t);if(!e||!i)return;let s=e.value,n=i.value,o=this.chart.options.navigation,a=O({langKey:"fibonacci",type:"fibonacci",typeOptions:{xAxis:e.axis.index,yAxis:i.axis.index,points:[{x:s,y:n},{x:s,y:n}]}},o.annotationsOptions,o.bindings?.fibonacci.annotationsOptions);return this.chart.addAnnotation(a)},steps:[tl(1),tr]},parallelChannel:{className:"highcharts-parallel-channel",start:function(t){let[e,i]=this.getCoords(t);if(!e||!i)return;let s=e.value,n=i.value,o=this.chart.options.navigation,a=O({langKey:"parallelChannel",type:"tunnel",typeOptions:{xAxis:e.axis.index,yAxis:i.axis.index,points:[{x:s,y:n},{x:s,y:n}]}},o.annotationsOptions,o.bindings?.parallelChannel.annotationsOptions);return this.chart.addAnnotation(a)},steps:[tl(1),tr]},pitchfork:{className:"highcharts-pitchfork",start:function(t){let[e,i]=this.getCoords(t);if(!e||!i)return;let s=e.value,n=i.value,o=this.chart.options.navigation,a=O({langKey:"pitchfork",type:"pitchfork",typeOptions:{xAxis:e.axis.index,yAxis:i.axis.index,points:[{x:e.value,y:i.value,controlPoint:{style:{fill:"#f21313"}}},{x:s,y:n},{x:s,y:n}]}},o.annotationsOptions,o.bindings?.pitchfork.annotationsOptions);return this.chart.addAnnotation(a)},steps:[tl(1),tl(2)]},verticalCounter:{className:"highcharts-vertical-counter",start:function(t){let e=ts(t,this.chart);if(!e)return;this.verticalCounter=this.verticalCounter||0;let i=this.chart.options.navigation,s=O({langKey:"verticalCounter",type:"verticalLine",typeOptions:{point:{x:e.x,y:e.y,xAxis:e.xAxis,yAxis:e.yAxis},label:{offset:e.below?40:-40,text:this.verticalCounter.toString()}}},i.annotationsOptions,i.bindings?.verticalCounter.annotationsOptions),n=this.chart.addAnnotation(s);this.verticalCounter++,(n.options.events?.click).call(n,{})}},timeCycles:{className:"highcharts-time-cycles",start:function(t){let e=ts(t,this.chart);if(!e)return;let i=this.chart.options.navigation,s=O({langKey:"timeCycles",type:"timeCycles",typeOptions:{xAxis:e.xAxis,yAxis:e.yAxis,points:[{x:e.x},{x:e.x}]}},i.annotationsOptions,i.bindings?.timeCycles.annotationsOptions),n=this.chart.addAnnotation(s);return(n.options.events?.click).call(n,{}),n},steps:[tl(1)]},verticalLabel:{className:"highcharts-vertical-label",start:function(t){let e=ts(t,this.chart);if(!e)return;let i=this.chart.options.navigation,s=O({langKey:"verticalLabel",type:"verticalLine",typeOptions:{point:{x:e.x,y:e.y,xAxis:e.xAxis,yAxis:e.yAxis},label:{offset:e.below?40:-40}}},i.annotationsOptions,i.bindings?.verticalLabel.annotationsOptions),n=this.chart.addAnnotation(s);(n.options.events?.click).call(n,{})}},verticalArrow:{className:"highcharts-vertical-arrow",start:function(t){let e=ts(t,this.chart);if(!e)return;let i=this.chart.options.navigation,s=O({langKey:"verticalArrow",type:"verticalLine",typeOptions:{point:{x:e.x,y:e.y,xAxis:e.xAxis,yAxis:e.yAxis},label:{offset:e.below?40:-40,format:" "},connector:{fill:"none",stroke:e.below?"#f21313":"#06b535"}}},i.annotationsOptions,i.bindings?.verticalArrow.annotationsOptions),n=this.chart.addAnnotation(s);(n.options.events?.click).call(n,{})}},fibonacciTimeZones:{className:"highcharts-fibonacci-time-zones",start:function(t){let[e,i]=this.getCoords(t);if(!e||!i)return;let s=this.chart.options.navigation,n=O({type:"fibonacciTimeZones",langKey:"fibonacciTimeZones",typeOptions:{xAxis:e.axis.index,yAxis:i.axis.index,points:[{x:e.value}]}},s.annotationsOptions,s.bindings?.fibonacciTimeZones.annotationsOptions);return this.chart.addAnnotation(n)},steps:[function(t,e){let i=e.options.typeOptions?.points,s=(i?.[0]).x,[n,o]=this.getCoords(t);n&&o&&e.update({typeOptions:{xAxis:n.axis.index,yAxis:o.axis.index,points:[{x:s},{x:n.value}]}})}]},flagCirclepin:{className:"highcharts-flag-circlepin",start:ti("circlepin")},flagDiamondpin:{className:"highcharts-flag-diamondpin",start:ti("flag")},flagSquarepin:{className:"highcharts-flag-squarepin",start:ti("squarepin")},flagSimplepin:{className:"highcharts-flag-simplepin",start:ti("nopin")},zoomX:{className:"highcharts-zoom-x",init:function(t){this.chart.update({chart:{zooming:{type:"x"}}}),v(this,"deselectButton",{button:t})}},zoomY:{className:"highcharts-zoom-y",init:function(t){this.chart.update({chart:{zooming:{type:"y"}}}),v(this,"deselectButton",{button:t})}},zoomXY:{className:"highcharts-zoom-xy",init:function(t){this.chart.update({chart:{zooming:{type:"xy"}}}),v(this,"deselectButton",{button:t})}},seriesTypeLine:{className:"highcharts-series-type-line",init:function(t){this.chart.series[0].update({type:"line",useOhlcData:!0}),v(this,"deselectButton",{button:t})}},seriesTypeOhlc:{className:"highcharts-series-type-ohlc",init:function(t){this.chart.series[0].update({type:"ohlc"}),v(this,"deselectButton",{button:t})}},seriesTypeCandlestick:{className:"highcharts-series-type-candlestick",init:function(t){this.chart.series[0].update({type:"candlestick"}),v(this,"deselectButton",{button:t})}},seriesTypeHeikinAshi:{className:"highcharts-series-type-heikinashi",init:function(t){this.chart.series[0].update({type:"heikinashi"}),v(this,"deselectButton",{button:t})}},seriesTypeHLC:{className:"highcharts-series-type-hlc",init:function(t){this.chart.series[0].update({type:"hlc",useOhlcData:!0}),v(this,"deselectButton",{button:t})}},seriesTypeHollowCandlestick:{className:"highcharts-series-type-hollowcandlestick",init:function(t){this.chart.series[0].update({type:"hollowcandlestick"}),v(this,"deselectButton",{button:t})}},fullScreen:{className:"highcharts-full-screen",noDataState:"normal",init:function(t){this.chart.fullscreen&&this.chart.fullscreen.toggle(),v(this,"deselectButton",{button:t})}},currentPriceIndicator:{className:"highcharts-current-price-indicator",init:function(t){let e=this.chart,i=e.series,s=e.stockTools,n=to(e.series);s&&s.guiEnabled&&(i.forEach(function(t){t.update({lastPrice:{enabled:!n},lastVisiblePrice:{enabled:!n,label:{enabled:!0}}},!1)}),e.redraw()),v(this,"deselectButton",{button:t})}},indicators:{className:"highcharts-indicators",init:function(){let t=this;v(t,"showPopup",{formType:"indicators",options:{},onSubmit:function(e){ta.call(t,e)}})}},toggleAnnotations:{className:"highcharts-toggle-annotations",init:function(t){let e=this.chart,i=e.stockTools,s=i.getIconsURL();this.toggledAnnotations=!this.toggledAnnotations,(e.annotations||[]).forEach(function(t){t.setVisibility(!this.toggledAnnotations)},this),i&&i.guiEnabled&&(this.toggledAnnotations?t.firstChild.style["background-image"]='url("'+s+'annotations-hidden.svg")':t.firstChild.style["background-image"]='url("'+s+'annotations-visible.svg")'),v(this,"deselectButton",{button:t})}},saveChart:{className:"highcharts-save-chart",noDataState:"normal",init:function(t){let e=this.chart,i=[],s=[],o=[],a=[];e.annotations.forEach(function(t,e){i[e]=t.userOptions}),e.series.forEach(function(t){t.is("sma")?s.push(t.userOptions):"flags"===t.type&&o.push(t.userOptions)}),e.yAxis.forEach(function(t){tn(t)&&a.push(t.options)}),n().win.localStorage.setItem("highcharts-chart",JSON.stringify({annotations:i,indicators:s,flags:o,yAxes:a})),v(this,"deselectButton",{button:t})}}},tp={lang:{stockTools:{gui:{simpleShapes:"Simple shapes",lines:"Lines",crookedLines:"Crooked lines",measure:"Measure",advanced:"Advanced",toggleAnnotations:"Toggle annotations",verticalLabels:"Vertical labels",flags:"Flags",zoomChange:"Zoom change",typeChange:"Type change",saveChart:"Save chart",indicators:"Indicators",currentPriceIndicator:"Current Price Indicators",zoomX:"Zoom X",zoomY:"Zoom Y",zoomXY:"Zooom XY",fullScreen:"Fullscreen",typeOHLC:"OHLC",typeLine:"Line",typeCandlestick:"Candlestick",typeHLC:"HLC",typeHollowCandlestick:"Hollow Candlestick",typeHeikinAshi:"Heikin Ashi",circle:"Circle",ellipse:"Ellipse",label:"Label",rectangle:"Rectangle",flagCirclepin:"Flag circle",flagDiamondpin:"Flag diamond",flagSquarepin:"Flag square",flagSimplepin:"Flag simple",measureXY:"Measure XY",measureX:"Measure X",measureY:"Measure Y",segment:"Segment",arrowSegment:"Arrow segment",ray:"Ray",arrowRay:"Arrow ray",line:"Line",arrowInfinityLine:"Arrow line",horizontalLine:"Horizontal line",verticalLine:"Vertical line",infinityLine:"Infinity line",crooked3:"Crooked 3 line",crooked5:"Crooked 5 line",elliott3:"Elliott 3 line",elliott5:"Elliott 5 line",verticalCounter:"Vertical counter",verticalLabel:"Vertical label",verticalArrow:"Vertical arrow",fibonacci:"Fibonacci",fibonacciTimeZones:"Fibonacci Time Zones",pitchfork:"Pitchfork",parallelChannel:"Parallel channel",timeCycles:"Time Cycles"}},navigation:{popup:{circle:"Circle",ellipse:"Ellipse",rectangle:"Rectangle",label:"Label",segment:"Segment",arrowSegment:"Arrow segment",ray:"Ray",arrowRay:"Arrow ray",line:"Line",arrowInfinityLine:"Arrow line",horizontalLine:"Horizontal line",verticalLine:"Vertical line",crooked3:"Crooked 3 line",crooked5:"Crooked 5 line",elliott3:"Elliott 3 line",elliott5:"Elliott 5 line",verticalCounter:"Vertical counter",verticalLabel:"Vertical label",verticalArrow:"Vertical arrow",fibonacci:"Fibonacci",fibonacciTimeZones:"Fibonacci Time Zones",pitchfork:"Pitchfork",parallelChannel:"Parallel channel",infinityLine:"Infinity line",measure:"Measure",measureXY:"Measure XY",measureX:"Measure X",measureY:"Measure Y",timeCycles:"Time Cycles",flags:"Flags",addButton:"Add",saveButton:"Save",editButton:"Edit",removeButton:"Remove",series:"Series",volume:"Volume",connector:"Connector",innerBackground:"Inner background",outerBackground:"Outer background",crosshairX:"Crosshair X",crosshairY:"Crosshair Y",tunnel:"Tunnel",background:"Background",noFilterMatch:"No match",searchIndicators:"Search Indicators",clearFilter:"✕ clear filter",index:"Index",period:"Period",periods:"Periods",standardDeviation:"Standard deviation",periodTenkan:"Tenkan period",periodSenkouSpanB:"Senkou Span B period",periodATR:"ATR period",multiplierATR:"ATR multiplier",shortPeriod:"Short period",longPeriod:"Long period",signalPeriod:"Signal period",decimals:"Decimals",algorithm:"Algorithm",topBand:"Top band",bottomBand:"Bottom band",initialAccelerationFactor:"Initial acceleration factor",maxAccelerationFactor:"Max acceleration factor",increment:"Increment",multiplier:"Multiplier",ranges:"Ranges",highIndex:"High index",lowIndex:"Low index",deviation:"Deviation",xAxisUnit:"x-axis unit",factor:"Factor",fastAvgPeriod:"Fast average period",slowAvgPeriod:"Slow average period",average:"Average",indicatorAliases:{abands:["Acceleration Bands"],bb:["Bollinger Bands"],dema:["Double Exponential Moving Average"],ema:["Exponential Moving Average"],ikh:["Ichimoku Kinko Hyo"],keltnerchannels:["Keltner Channels"],linearRegression:["Linear Regression"],pivotpoints:["Pivot Points"],pc:["Price Channel"],priceenvelopes:["Price Envelopes"],psar:["Parabolic SAR"],sma:["Simple Moving Average"],supertrend:["Super Trend"],tema:["Triple Exponential Moving Average"],vbp:["Volume by Price"],vwap:["Volume Weighted Moving Average"],wma:["Weighted Moving Average"],zigzag:["Zig Zag"],apo:["Absolute price indicator"],ad:["Accumulation/Distribution"],aroon:["Aroon"],aroonoscillator:["Aroon oscillator"],atr:["Average True Range"],ao:["Awesome oscillator"],cci:["Commodity Channel Index"],chaikin:["Chaikin"],cmf:["Chaikin Money Flow"],cmo:["Chande Momentum Oscillator"],disparityindex:["Disparity Index"],dmi:["Directional Movement Index"],dpo:["Detrended price oscillator"],klinger:["Klinger Oscillator"],linearRegressionAngle:["Linear Regression Angle"],linearRegressionIntercept:["Linear Regression Intercept"],linearRegressionSlope:["Linear Regression Slope"],macd:["Moving Average Convergence Divergence"],mfi:["Money Flow Index"],momentum:["Momentum"],natr:["Normalized Average True Range"],obv:["On-Balance Volume"],ppo:["Percentage Price oscillator"],roc:["Rate of Change"],rsi:["Relative Strength Index"],slowstochastic:["Slow Stochastic"],stochastic:["Stochastic"],trix:["TRIX"],williamsr:["Williams %R"]}}}},stockTools:{gui:{enabled:!0,className:"highcharts-bindings-wrapper",toolbarClassName:"stocktools-toolbar",buttons:["indicators","separator","simpleShapes","lines","crookedLines","measure","advanced","toggleAnnotations","separator","verticalLabels","flags","separator","zoomChange","fullScreen","typeChange","separator","currentPriceIndicator","saveChart"],definitions:{separator:{elementType:"span",symbol:"separator.svg"},simpleShapes:{items:["label","circle","ellipse","rectangle"],circle:{symbol:"circle.svg"},ellipse:{symbol:"ellipse.svg"},rectangle:{symbol:"rectangle.svg"},label:{symbol:"label.svg"}},flags:{items:["flagCirclepin","flagDiamondpin","flagSquarepin","flagSimplepin"],flagSimplepin:{symbol:"flag-basic.svg"},flagDiamondpin:{symbol:"flag-diamond.svg"},flagSquarepin:{symbol:"flag-trapeze.svg"},flagCirclepin:{symbol:"flag-elipse.svg"}},lines:{items:["segment","arrowSegment","ray","arrowRay","line","arrowInfinityLine","horizontalLine","verticalLine"],segment:{symbol:"segment.svg"},arrowSegment:{symbol:"arrow-segment.svg"},ray:{symbol:"ray.svg"},arrowRay:{symbol:"arrow-ray.svg"},line:{symbol:"line.svg"},arrowInfinityLine:{symbol:"arrow-line.svg"},verticalLine:{symbol:"vertical-line.svg"},horizontalLine:{symbol:"horizontal-line.svg"}},crookedLines:{items:["elliott3","elliott5","crooked3","crooked5"],crooked3:{symbol:"crooked-3.svg"},crooked5:{symbol:"crooked-5.svg"},elliott3:{symbol:"elliott-3.svg"},elliott5:{symbol:"elliott-5.svg"}},verticalLabels:{items:["verticalCounter","verticalLabel","verticalArrow"],verticalCounter:{symbol:"vertical-counter.svg"},verticalLabel:{symbol:"vertical-label.svg"},verticalArrow:{symbol:"vertical-arrow.svg"}},advanced:{items:["fibonacci","fibonacciTimeZones","pitchfork","parallelChannel","timeCycles"],pitchfork:{symbol:"pitchfork.svg"},fibonacci:{symbol:"fibonacci.svg"},fibonacciTimeZones:{symbol:"fibonacci-timezone.svg"},parallelChannel:{symbol:"parallel-channel.svg"},timeCycles:{symbol:"time-cycles.svg"}},measure:{items:["measureXY","measureX","measureY"],measureX:{symbol:"measure-x.svg"},measureY:{symbol:"measure-y.svg"},measureXY:{symbol:"measure-xy.svg"}},toggleAnnotations:{symbol:"annotations-visible.svg"},currentPriceIndicator:{symbol:"current-price-show.svg"},indicators:{symbol:"indicators.svg"},zoomChange:{items:["zoomX","zoomY","zoomXY"],zoomX:{symbol:"zoom-x.svg"},zoomY:{symbol:"zoom-y.svg"},zoomXY:{symbol:"zoom-xy.svg"}},typeChange:{items:["typeOHLC","typeLine","typeCandlestick","typeHollowCandlestick","typeHLC","typeHeikinAshi"],typeOHLC:{symbol:"series-ohlc.svg"},typeLine:{symbol:"series-line.svg"},typeCandlestick:{symbol:"series-candlestick.svg"},typeHLC:{symbol:"series-hlc.svg"},typeHeikinAshi:{symbol:"series-heikin-ashi.svg"},typeHollowCandlestick:{symbol:"series-hollow-candlestick.svg"}},fullScreen:{symbol:"fullscreen.svg"},saveChart:{symbol:"save-chart.svg"}},visible:!0}}},{setOptions:td}=n(),{isNotNavigatorYAxis:tg,isPriceIndicatorEnabled:tu}=te;function tm(t,e,i,s){let n=0,o,a,r;function l(t){return y(t)&&!A(t)&&t.match("%")}return s&&(r=g(parseFloat(s.top)/100),a=g(parseFloat(s.height)/100)),{positions:t.map((s,c)=>{let h=g(l(s.options.height)?parseFloat(s.options.height)/100:s.height/e),p=g(l(s.options.top)?parseFloat(s.options.top)/100:(s.top-s.chart.plotTop)/e);return a?(p>r&&(p-=a),n=Math.max(n,(p||0)+(h||0))):(A(h)||(h=t[c-1].series.every(t=>t.is("sma"))?o:i/100),A(p)||(p=n),o=h,n=g(Math.max(n,(p||0)+(h||0)))),{height:100*h,top:100*p}}),allAxesHeight:n}}function ty(t){let e=[];return t.forEach(function(i,s){let n=t[s+1];n?e[s]={enabled:!0,controlledAxis:{next:[L(n.options.id,n.index)]}}:e[s]={enabled:!1}}),e}function tf(t,e,i,s){return t.forEach(function(n,o){let a=t[o-1];n.top=a?g(a.height+a.top):0,i&&(n.height=g(n.height+s*e))}),t}function tv(t){let e=this.chart,i=e.yAxis.filter(tg),s=e.plotHeight,{positions:n,allAxesHeight:o}=this.getYAxisPositions(i,s,20,t),a=this.getYAxisResizers(i);!t&&o<=g(1)?n[n.length-1]={height:20,top:g(100*o-20)}:n.forEach(function(t){t.height=t.height/(100*o)*100,t.top=t.top/(100*o)*100}),n.forEach(function(t,e){i[e].update({height:t.height+"%",top:t.top+"%",resize:a[e],offset:0},!1)})}let tb=t.default.AST;var tx=i.n(tb);let{shallowArraysEqual:tA}=te;class tk{constructor(t,e,i){this.width=0,this.isDirty=!1,this.chart=i,this.options=t,this.lang=e,this.iconsURL=this.getIconsURL(),this.guiEnabled=t.enabled,this.visible=L(t.visible,!0),this.guiClassName=t.className,this.toolbarClassName=t.toolbarClassName,this.eventsToUnbind=[],this.guiEnabled&&(this.createContainer(),this.createButtons(),this.showHideNavigation()),v(this,"afterInit")}createButtons(){let t=this.lang,e=this.options,i=this.toolbar,s=e.buttons,n=e.definitions,o=i.childNodes;this.buttonList=s,s.forEach(e=>{let s=this.addButton(i,n,e,t);this.eventsToUnbind.push(d(s.buttonWrapper,"click",()=>this.eraseActiveButtons(o,s.buttonWrapper))),C(n[e].items)&&this.addSubmenu(s,n[e])})}addSubmenu(t,e){let i=t.submenuArrow,s=t.buttonWrapper,n=b(s,"width"),o=this.wrapper,a=this.listWrapper,r=this.toolbar.childNodes,l=s.title,c=this.submenu=u("ul",{className:"highcharts-submenu-wrapper",id:"highcharts-submenu-wrapper-"+l.toLowerCase().replace(/\s+/g,"-")},void 0,s);this.addSubmenuItems(s,e),i.setAttribute("aria-controls",c.id),this.eventsToUnbind.push(d(i,"click",t=>{if(t.stopPropagation(),this.eraseActiveButtons(r,s),s.className.indexOf("highcharts-current")>=0)i.setAttribute("aria-expanded",!1),a.style.width=a.startWidth+"px",s.classList.remove("highcharts-current"),c.style.display="none";else{i.setAttribute("aria-expanded",!0),c.style.display="block";let t=c.offsetHeight-s.offsetHeight-3;c.offsetHeight+s.offsetTop>o.offsetHeight&&s.offsetTop>t||(t=0),m(c,{top:-t+"px",left:n+3+"px"}),s.className+=" highcharts-current",a.startWidth=o.offsetWidth,a.style.width=a.startWidth+b(a,"padding-left")+c.offsetWidth+3+"px"}}))}addSubmenuItems(t,e){let i,s=this,n=this.submenu,o=this.lang,a=this.listWrapper;e.items.forEach(r=>{i=this.addButton(n,e,r,o),this.eventsToUnbind.push(d(i.mainButton,"click",function(){s.switchSymbol(this,t,!0),a.style.width=a.startWidth+"px",n.style.display="none"}))});let r=n.querySelectorAll("li > .highcharts-menu-item-btn")[0];this.switchSymbol(r,!1)}eraseActiveButtons(t,e,i){[].forEach.call(t,t=>{t!==e&&(t.classList.remove("highcharts-current"),t.classList.remove("highcharts-active"),(i=t.querySelectorAll(".highcharts-submenu-wrapper")).length>0&&(i[0].style.display="none"))})}addButton(t,e,i,s={}){let n=e[i],o=s[i]||i,a=this.chart.options.lang.accessibility?.stockTools.arrowLabel,r=n.items,l=tk.prototype.classMapping,c=n.className||"",h=u("li",{className:L(l[i],"")+" "+c},void 0,t),p=u(n.elementType||"button",{className:"highcharts-menu-item-btn",title:o,ariaLabel:o},void 0,h);if(r&&r.length){let t=u("button",{className:"highcharts-submenu-item-arrow highcharts-arrow-right",ariaLabel:a,ariaExpanded:!1},void 0,h);return t.style.backgroundImage="url("+this.iconsURL+"arrow-bottom.svg)",{buttonWrapper:h,mainButton:p,submenuArrow:t}}return p.style.backgroundImage="url("+this.iconsURL+n.symbol+")",{buttonWrapper:h,mainButton:p}}addNavigation(){let t=this.wrapper;this.arrowWrapper=u("div",{className:"highcharts-arrow-wrapper"}),this.arrowUp=u("div",{className:"highcharts-arrow-up"},void 0,this.arrowWrapper),this.arrowUp.style.backgroundImage="url("+this.iconsURL+"arrow-right.svg)",this.arrowDown=u("div",{className:"highcharts-arrow-down"},void 0,this.arrowWrapper),this.arrowDown.style.backgroundImage="url("+this.iconsURL+"arrow-right.svg)",t.insertBefore(this.arrowWrapper,t.childNodes[0]),this.scrollButtons()}scrollButtons(){let t=this.wrapper,e=this.toolbar,i=.1*t.offsetHeight,s=0;this.eventsToUnbind.push(d(this.arrowUp,"click",()=>{s>0&&(s-=i,e.style.marginTop=-s+"px")})),this.eventsToUnbind.push(d(this.arrowDown,"click",()=>{t.offsetHeight+s<=e.offsetHeight+i&&(s+=i,e.style.marginTop=-s+"px")}))}createContainer(){let t,e,i=this.chart,s=i.options.lang.accessibility?.stockTools.groupLabel,n=this.options,o=i.container,a=i.options.navigation,r=a?.bindingsClassName,l=this,c=this.wrapper=u("div",{className:"highcharts-stocktools-wrapper "+n.className+" "+r,ariaHidden:!1});o.appendChild(c),this.showHideBtn=u("div",{className:"highcharts-toggle-toolbar highcharts-arrow-left"},void 0,c),this.eventsToUnbind.push(d(this.showHideBtn,"click",()=>{this.update({gui:{visible:!l.visible}})})),["mousedown","mousemove","click","touchstart"].forEach(t=>{d(c,t,t=>t.stopPropagation())}),d(c,"mouseover",t=>i.pointer?.onContainerMouseLeave(t)),this.toolbar=e=u("ul",{className:"highcharts-stocktools-toolbar "+n.toolbarClassName,ariaLabel:s}),this.listWrapper=t=u("div",{className:"highcharts-menu-wrapper"}),c.insertBefore(t,c.childNodes[0]),t.insertBefore(e,t.childNodes[0]),this.showHideToolbar(),this.addNavigation()}showHideNavigation(){this.visible&&this.toolbar.offsetHeight>this.wrapper.offsetHeight-50?this.arrowWrapper.style.display="block":(this.toolbar.style.marginTop="0px",this.arrowWrapper.style.display="none")}showHideToolbar(){let t=this.wrapper,e=this.listWrapper,i=this.submenu,s=this.showHideBtn,n=this.visible;s.style.backgroundImage="url("+this.iconsURL+"arrow-right.svg)",n?(t.style.height="100%",e.classList.remove("highcharts-hide"),s.classList.remove("highcharts-arrow-right"),s.style.top=b(e,"padding-top")+"px",s.style.left=t.offsetWidth+b(e,"padding-left")+"px"):(i&&(i.style.display="none"),s.style.left="0px",n=this.visible=!1,e.classList.add("highcharts-hide"),s.classList.add("highcharts-arrow-right"),t.style.height=s.offsetHeight+"px")}switchSymbol(t,e){let i=t.parentNode,s=i.className,n=i.parentNode.parentNode;!(s.indexOf("highcharts-disabled-btn")>-1)&&(n.className="",s&&n.classList.add(s.trim()),n.querySelectorAll(".highcharts-menu-item-btn")[0].style.backgroundImage=t.style.backgroundImage,e&&this.toggleButtonActiveClass(n))}toggleButtonActiveClass(t){let e=t.classList;e.contains("highcharts-active")?e.remove("highcharts-active"):e.add("highcharts-active")}unselectAllButtons(t){let e=t.parentNode.querySelectorAll(".highcharts-active");[].forEach.call(e,e=>{e!==t&&e.classList.remove("highcharts-active")})}update(t,e){this.isDirty=!!t.gui.definitions,O(!0,this.chart.options.stockTools,t),O(!0,this.options,t.gui),this.visible=L(this.options.visible&&this.options.enabled,!0),this.chart.navigationBindings&&this.chart.navigationBindings.update(),this.chart.isDirtyBox=!0,L(e,!0)&&this.chart.redraw()}destroy(){let t=this.wrapper,e=t&&t.parentNode;this.eventsToUnbind.forEach(t=>t()),e&&e.removeChild(t)}redraw(){if(this.options.enabled!==this.guiEnabled)this.handleGuiEnabledChange();else{if(!this.guiEnabled)return;this.updateClassNames(),this.updateButtons(),this.updateVisibility(),this.showHideNavigation(),this.showHideToolbar()}}handleGuiEnabledChange(){!1===this.options.enabled&&(this.destroy(),this.visible=!1),!0===this.options.enabled&&(this.createContainer(),this.createButtons()),this.guiEnabled=this.options.enabled}updateClassNames(){this.options.className!==this.guiClassName&&(this.guiClassName&&this.wrapper.classList.remove(this.guiClassName),this.options.className&&this.wrapper.classList.add(this.options.className),this.guiClassName=this.options.className),this.options.toolbarClassName!==this.toolbarClassName&&(this.toolbarClassName&&this.toolbar.classList.remove(this.toolbarClassName),this.options.toolbarClassName&&this.toolbar.classList.add(this.options.toolbarClassName),this.toolbarClassName=this.options.toolbarClassName)}updateButtons(){(!tA(this.options.buttons,this.buttonList)||this.isDirty)&&(this.toolbar.innerHTML=tx().emptyHTML,this.createButtons())}updateVisibility(){y(this.options.visible)&&(this.visible=this.options.visible)}getIconsURL(){return this.chart.options.navigation.iconsURL||this.options.iconsURL||"https://code.highcharts.com/12.6.0/gfx/stock-icons/"}}tk.prototype.classMapping={circle:"highcharts-circle-annotation",ellipse:"highcharts-ellipse-annotation",rectangle:"highcharts-rectangle-annotation",label:"highcharts-label-annotation",segment:"highcharts-segment",arrowSegment:"highcharts-arrow-segment",ray:"highcharts-ray",arrowRay:"highcharts-arrow-ray",line:"highcharts-infinity-line",arrowInfinityLine:"highcharts-arrow-infinity-line",verticalLine:"highcharts-vertical-line",horizontalLine:"highcharts-horizontal-line",crooked3:"highcharts-crooked3",crooked5:"highcharts-crooked5",elliott3:"highcharts-elliott3",elliott5:"highcharts-elliott5",pitchfork:"highcharts-pitchfork",fibonacci:"highcharts-fibonacci",fibonacciTimeZones:"highcharts-fibonacci-time-zones",parallelChannel:"highcharts-parallel-channel",measureX:"highcharts-measure-x",measureY:"highcharts-measure-y",measureXY:"highcharts-measure-xy",timeCycles:"highcharts-time-cycles",verticalCounter:"highcharts-vertical-counter",verticalLabel:"highcharts-vertical-label",verticalArrow:"highcharts-vertical-arrow",currentPriceIndicator:"highcharts-current-price-indicator",indicators:"highcharts-indicators",flagCirclepin:"highcharts-flag-circlepin",flagDiamondpin:"highcharts-flag-diamondpin",flagSquarepin:"highcharts-flag-squarepin",flagSimplepin:"highcharts-flag-simplepin",zoomX:"highcharts-zoom-x",zoomY:"highcharts-zoom-y",zoomXY:"highcharts-zoom-xy",typeLine:"highcharts-series-type-line",typeOHLC:"highcharts-series-type-ohlc",typeHLC:"highcharts-series-type-hlc",typeCandlestick:"highcharts-series-type-candlestick",typeHollowCandlestick:"highcharts-series-type-hollowcandlestick",typeHeikinAshi:"highcharts-series-type-heikinashi",fullScreen:"highcharts-full-screen",toggleAnnotations:"highcharts-toggle-annotations",saveChart:"highcharts-save-chart",separator:"highcharts-separator"};let{setOptions:tC}=n();function tw(t){let e=this.options,i=e.lang,s=O(e.stockTools&&e.stockTools.gui,t&&t.gui),n=i&&i.stockTools&&i.stockTools.gui;this.stockTools=new tk(s,n,this),this.stockTools.guiEnabled&&(this.isDirtyBox=!0)}function tO(){this.setStockTools()}function tN(){this.stockTools&&(this.stockTools.redraw(),function(t){if(t.stockTools?.guiEnabled){let e=t.options.chart,i=t.stockTools.listWrapper,s=i&&(i.startWidth+b(i,"padding-left")+b(i,"padding-right")||i.offsetWidth);t.stockTools.width=s;let n=!1;if(s<t.plotWidth){let i=L(e.spacingLeft,e.spacing&&e.spacing[3],0)+s,o=i-t.spacingBox.x;t.spacingBox.x=i,t.spacingBox.width-=o,n=!0}else 0===s&&(n=!0);s!==t.stockTools.prevOffsetWidth&&(t.stockTools.prevOffsetWidth=s,n&&(t.isDirtyLegend=!0))}}(this))}function tL(){this.stockTools&&this.stockTools.destroy()}function tT(){let t=this.stockTools?.visible&&this.stockTools.guiEnabled?this.stockTools.width:0;t&&t<this.plotWidth&&(this.plotLeft+=t,this.spacing[3]+=t)}function tE(){let t=this.stockTools,e=t&&t.toolbar&&t.toolbar.querySelector(".highcharts-current-price-indicator");t&&this.navigationBindings&&this.options.series&&e&&(this.navigationBindings.utils?.isPriceIndicatorEnabled?.(this.series)?e.firstChild.style["background-image"]='url("'+t.getIconsURL()+'current-price-hide.svg")':e.firstChild.style["background-image"]='url("'+t.getIconsURL()+'current-price-show.svg")')}function tB(t){let e=this.chart.stockTools;if(e&&e.guiEnabled){let e=t.button;e.parentNode.className.indexOf("highcharts-submenu-wrapper")>=0&&(e=e.parentNode.parentNode),e.classList.remove("highcharts-active")}}function tS(t){let e=this.chart.stockTools;if(e&&e.guiEnabled){let i=t.button;e.unselectAllButtons(t.button),i.parentNode.className.indexOf("highcharts-submenu-wrapper")>=0&&(i=i.parentNode.parentNode),e.toggleButtonActiveClass(i)}}let tP=n();tP.NavigationBindings=tP.NavigationBindings||q,tP.Toolbar=tk,({compose:function(t){let e=t.prototype;e.utils?.manageIndicators||(e.getYAxisPositions=tm,e.getYAxisResizers=ty,e.recalculateYAxisPositions=tf,e.resizeYAxes=tv,e.utils=e.utils||{},e.utils.indicatorsWithAxes=te.indicatorsWithAxes,e.utils.indicatorsWithVolume=te.indicatorsWithVolume,e.utils.getAssignedAxis=te.getAssignedAxis,e.utils.isPriceIndicatorEnabled=tu,e.utils.manageIndicators=te.manageIndicators,td(tp),td({navigation:{bindings:th}}))}}).compose(tP.NavigationBindings),({compose:function(t,e){let i=t.prototype;i.setStockTools||(d(t,"afterGetContainer",tO),d(t,"beforeRedraw",tN),d(t,"beforeRender",tN),d(t,"destroy",tL),d(t,"getMargins",tT,{order:0}),d(t,"render",tE),i.setStockTools=tw,d(e,"deselectButton",tB),d(e,"selectButton",tS),tC(tp))}}).compose(tP.Chart,tP.NavigationBindings);let tI=n();export{tI as default};