/**
 * Highstock JS v11.2.0 (2023-10-30)
 *
 * Indicator series type for Highcharts Stock
 *
 * (c) 2010-2021 Rafał Sebestjański
 *
 * 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/dema",["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 o(t,e,o,n){t.hasOwnProperty(e)||(t[e]=n.apply(null,o),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}o(e,"Stock/Indicators/DEMA/DEMAIndicator.js",[e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"]],function(t,e){var o,n=this&&this.__extends||(o=function(t,e){return(o=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}o(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),r=t.seriesTypes.ema,i=e.correctFloat,s=e.isArray,a=e.merge,c=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.EMApercent=void 0,e.data=void 0,e.options=void 0,e.points=void 0,e}return n(e,t),e.prototype.getEMA=function(e,o,n,r,i,s){return t.prototype.calculateEma.call(this,s||[],e,void 0===i?1:i,this.EMApercent,o,void 0===r?-1:r,n)},e.prototype.getValues=function(e,o){var n,r,a,c,u,p=o.period,d=[],l=2*p,h=e.xData,f=e.yData,y=f?f.length:0,m=[],v=[],g=[],E=0,_=0,A=-1,M=0;if(this.EMApercent=2/(p+1),!(y<2*p-1)){for(s(f[0])&&(A=o.index?o.index:0),M=(E=t.prototype.accumulatePeriodPoints.call(this,p,A,f))/p,E=0,c=p;c<y+2;c++)c<y+1&&(_=this.getEMA(f,r,M,A,c)[1],d.push(_)),r=_,c<l?E+=_:(c===l&&(M=E/p),_=d[c-p-1],n=this.getEMA([_],a,M)[1],u=[h[c-2],i(2*_-n)],m.push(u),v.push(u[0]),g.push(u[1]),a=n);return{values:m,xData:v,yData:g}}},e.defaultOptions=a(r.defaultOptions),e}(r);return t.registerSeriesType("dema",c),c}),o(e,"masters/indicators/dema.src.js",[],function(){})});//# sourceMappingURL=dema.js.map