!/**
 * Highstock JS v11.4.8 (2024-08-29)
 *
 * Indicator series type for Highcharts Stock
 *
 * (c) 2010-2024 Wojciech Chmiel
 *
 * License: www.highcharts.com/license
 */function(e){"object"==typeof module&&module.exports?(e.default=e,module.exports=e):"function"==typeof define&&define.amd?define("highcharts/indicators/chaikin",["highcharts","highcharts/modules/stock"],function(t){return e(t),e.Highcharts=t,e}):e("undefined"!=typeof Highcharts?Highcharts:void 0)}(function(e){"use strict";var t=e?e._modules:{};function i(t,i,s,r){t.hasOwnProperty(i)||(t[i]=r.apply(null,s),"function"==typeof CustomEvent&&e.win.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:i,module:t[i]}})))}i(t,"Stock/Indicators/AD/ADIndicator.js",[t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t){let{sma:i}=e.seriesTypes,{error:s,extend:r,merge:o}=t;class a extends i{static populateAverage(e,t,i,s,r){let o=t[s][1],a=t[s][2],n=t[s][3],u=i[s];return[e[s],n===o&&n===a||o===a?0:(2*n-a-o)/(o-a)*u]}getValues(e,t){let i,r,o;let n=t.period,u=e.xData,l=e.yData,d=t.volumeSeriesID,p=e.chart.get(d),c=p&&p.yData,h=l?l.length:0,f=[],m=[],g=[];if(!(u.length<=n)||!h||4===l[0].length){if(!p){s("Series "+d+" not found! Check `volumeSeriesID`.",!0,e.chart);return}for(r=n;r<h;r++)i=f.length,o=a.populateAverage(u,l,c,r,n),i>0&&(o[1]+=f[i-1][1]),f.push(o),m.push(o[0]),g.push(o[1]);return{values:f,xData:m,yData:g}}}}return a.defaultOptions=o(i.defaultOptions,{params:{index:void 0,volumeSeriesID:"volume"}}),r(a.prototype,{nameComponents:!1,nameBase:"Accumulation/Distribution"}),e.registerSeriesType("ad",a),a}),i(t,"Stock/Indicators/Chaikin/ChaikinIndicator.js",[t["Stock/Indicators/AD/ADIndicator.js"],t["Core/Series/SeriesRegistry.js"],t["Core/Utilities.js"]],function(e,t,i){let{ema:s}=t.seriesTypes,{correctFloat:r,extend:o,merge:a,error:n}=i;class u extends s{getValues(t,i){let s,o;let a=i.periods,u=i.period,l=[],d=[],p=[];if(2!==a.length||a[1]<=a[0]){n('Error: "Chaikin requires two periods. Notice, first period should be lower than the second one."');return}let c=e.prototype.getValues.call(this,t,{volumeSeriesID:i.volumeSeriesID,period:u});if(!c)return;let h=super.getValues.call(this,c,{period:a[0]}),f=super.getValues.call(this,c,{period:a[1]});if(!h||!f)return;let m=a[1]-a[0];for(o=0;o<f.yData.length;o++)s=r(h.yData[o+m]-f.yData[o]),l.push([f.xData[o],s]),d.push(f.xData[o]),p.push(s);return{values:l,xData:d,yData:p}}}return u.defaultOptions=a(s.defaultOptions,{params:{index:void 0,volumeSeriesID:"volume",period:9,periods:[3,10]}}),o(u.prototype,{nameBase:"Chaikin Osc",nameComponents:["periods"]}),t.registerSeriesType("chaikin",u),u}),i(t,"masters/indicators/chaikin.src.js",[t["Core/Globals.js"]],function(e){return e})});