!/**
 * Highstock JS v11.4.8 (2024-08-29)
 *
 * Indicator series type for Highcharts Stock
 *
 * (c) 2010-2024 Daniel Studencki
 *
 * License: www.highcharts.com/license
 */function(t){"object"==typeof module&&module.exports?(t.default=t,module.exports=t):"function"==typeof define&&define.amd?define("highcharts/indicators/acceleration-bands",["highcharts","highcharts/modules/stock"],function(e){return t(e),t.Highcharts=e,t}):t("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(t){"use strict";var e=t?t._modules:{};function i(e,i,a,o){e.hasOwnProperty(i)||(e[i]=o.apply(null,a),"function"==typeof CustomEvent&&t.win.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:e[i]}})))}i(e,"Stock/Indicators/MultipleLinesComposition.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e){var i;let{sma:{prototype:a}}=t.seriesTypes,{defined:o,error:s,merge:n}=e;return function(t){let e=["bottomLine"],i=["top","bottom"],r=["top"];function l(t){return"plot"+t.charAt(0).toUpperCase()+t.slice(1)}function p(t,e){let i=[];return(t.pointArrayMap||[]).forEach(t=>{t!==e&&i.push(l(t))}),i}function h(){let t=this,e=t.pointValKey,i=t.linesApiNames,r=t.areaLinesNames,h=t.points,c=t.options,u=t.graph,d={options:{gapSize:c.gapSize}},f=[],y=p(t,e),m=h.length,g;if(y.forEach((t,e)=>{for(f[e]=[];m--;)g=h[m],f[e].push({x:g.x,plotX:g.plotX,plotY:g[t],isNull:!o(g[t])});m=h.length}),t.userOptions.fillColor&&r.length){let e=f[y.indexOf(l(r[0]))],i=1===r.length?h:f[y.indexOf(l(r[1]))],o=t.color;t.points=i,t.nextPoints=e,t.color=t.userOptions.fillColor,t.options=n(h,d),t.graph=t.area,t.fillGraph=!0,a.drawGraph.call(t),t.area=t.graph,delete t.nextPoints,delete t.fillGraph,t.color=o}i.forEach((e,i)=>{f[i]?(t.points=f[i],c[e]?t.options=n(c[e].styles,d):s('Error: "There is no '+e+' in DOCS options declared. Check if linesApiNames are consistent with your DOCS line names."'),t.graph=t["graph"+e],a.drawGraph.call(t),t["graph"+e]=t.graph):s('Error: "'+e+" doesn't have equivalent in pointArrayMap. To many elements in linesApiNames relative to pointArrayMap.\"")}),t.points=h,t.options=c,t.graph=u,a.drawGraph.call(t)}function c(t){let e,i=[],o=[];if(t=t||this.points,this.fillGraph&&this.nextPoints){if((e=a.getGraphPath.call(this,this.nextPoints))&&e.length){e[0][0]="L",i=a.getGraphPath.call(this,t),o=e.slice(0,i.length);for(let t=o.length-1;t>=0;t--)i.push(o[t])}}else i=a.getGraphPath.apply(this,arguments);return i}function u(t){let e=[];return(this.pointArrayMap||[]).forEach(i=>{e.push(t[i])}),e}function d(){let t=this.pointArrayMap,e=[],i;e=p(this),a.translate.apply(this,arguments),this.points.forEach(a=>{t.forEach((t,o)=>{i=a[t],this.dataModify&&(i=this.dataModify.modifyValue(i)),null!==i&&(a[e[o]]=this.yAxis.toPixels(i,!0))})})}t.compose=function(t){let a=t.prototype;return a.linesApiNames=a.linesApiNames||e.slice(),a.pointArrayMap=a.pointArrayMap||i.slice(),a.pointValKey=a.pointValKey||"top",a.areaLinesNames=a.areaLinesNames||r.slice(),a.drawGraph=h,a.getGraphPath=c,a.toYData=u,a.translate=d,t}}(i||(i={})),i}),i(e,"Stock/Indicators/ABands/ABandsIndicator.js",[e["Stock/Indicators/MultipleLinesComposition.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e,i){let{sma:a}=e.seriesTypes,{correctFloat:o,extend:s,merge:n}=i;class r extends a{getValues(t,e){let i,a,s,n,r,l,p,h,c,u,d;let f=e.period,y=e.factor,m=e.index,g=t.xData,x=t.yData,A=x?x.length:0,D=[],C=[],G=[],L=[],M=[];if(!(A<f)){for(d=0;d<=A;d++){if(d<A){var v,S;v=x[d][2],r=o((S=x[d][1])-v)/(o(S+v)/2)*1e3*y,D.push(x[d][1]*o(1+2*r)),C.push(x[d][2]*o(1-2*r))}d>=f&&(c=g.slice(d-f,d),u=x.slice(d-f,d),p=super.getValues.call(this,{xData:c,yData:D.slice(d-f,d)},{period:f}),h=super.getValues.call(this,{xData:c,yData:C.slice(d-f,d)},{period:f}),n=(l=super.getValues.call(this,{xData:c,yData:u},{period:f,index:m})).xData[0],a=p.yData[0],s=h.yData[0],i=l.yData[0],G.push([n,a,i,s]),L.push(n),M.push([a,i,s]))}return{values:G,xData:L,yData:M}}}}return r.defaultOptions=n(a.defaultOptions,{params:{period:20,factor:.001,index:3},lineWidth:1,topLine:{styles:{lineWidth:1}},bottomLine:{styles:{lineWidth:1}},dataGrouping:{approximation:"averages"}}),s(r.prototype,{areaLinesNames:["top","bottom"],linesApiNames:["topLine","bottomLine"],nameBase:"Acceleration Bands",nameComponents:["period","factor"],pointArrayMap:["top","middle","bottom"],pointValKey:"middle"}),t.compose(r),e.registerSeriesType("abands",r),r}),i(e,"masters/indicators/acceleration-bands.src.js",[e["Core/Globals.js"]],function(t){return t})});