!/**
 * Highstock JS v13.0.0 (2026-06-11)
 * @module highcharts/indicators/stochastic
 * @requires highcharts
 * @requires highcharts/modules/stock
 *
 * Indicator series type for Highcharts Stock
 *
 * (c) 2010-2026 Highsoft AS
 * Author: Paweł Fus
 *
 * A commercial license may be required depending on use,
 * see www.highcharts.com/license
 */function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(t._Highcharts,t._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/indicators/stochastic",["highcharts/highcharts"],function(t){return e(t,t.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/indicators/stochastic"]=e(t._Highcharts,t._Highcharts.SeriesRegistry):t.Highcharts=e(t.Highcharts,t.Highcharts.SeriesRegistry)}("u"<typeof window?this:window,function(t,e){return function(){"use strict";var r,o,i={512:function(t){t.exports=e},944:function(e){e.exports=t}},n={};function a(t){var e=n[t];if(void 0!==e)return e.exports;var r=n[t]={exports:{}};return i[t](r,r.exports,a),r.exports}a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,{a:e}),e},a.d=function(t,e){for(var r in e)a.o(e,r)&&!a.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var s={};a.d(s,{default:function(){return v}});var p=a(944),l=a.n(p),h=function(t,e,r){return t.reduce(function(t,o){return[Math.min(t[0],o[e]),Math.max(t[1],o[r])]},[Number.MAX_VALUE,-Number.MAX_VALUE])},c=a(512),u=a.n(c),f=u().seriesTypes.sma.prototype;!function(t){var e=["bottomLine"],r=["top","bottom"],o=["top"];function i(t){return"plot"+t.charAt(0).toUpperCase()+t.slice(1)}function n(t,e){var r=[];return(t.pointArrayMap||[]).forEach(function(t){t!==e&&r.push(i(t))}),r}function a(){var t,e=this,r=e.pointValKey,o=e.linesApiNames,a=e.areaLinesNames,s=e.points,l=e.options,h=e.graph,c={options:{gapSize:l.gapSize}},u=[],y=n(e,r),d=s.length;if(y.forEach(function(e,r){for(u[r]=[];d--;)t=s[d],u[r].push({x:t.x,plotX:t.plotX,plotY:t[e],isNull:!(0,p.defined)(t[e])});d=s.length}),e.userOptions.fillColor&&a.length){var g=u[y.indexOf(i(a[0]))],m=1===a.length?s:u[y.indexOf(i(a[1]))],v=e.color;e.points=m,e.nextPoints=g,e.color=e.userOptions.fillColor,e.options=(0,p.merge)(s,c),e.graph=e.area,e.fillGraph=!0,f.drawGraph.call(e),e.area=e.graph,delete e.nextPoints,delete e.fillGraph,e.color=v}o.forEach(function(t,r){u[r]?(e.points=u[r],l[t]?e.options=(0,p.merge)(l[t].styles,c):(0,p.error)('Error: "There is no '+t+' in DOCS options declared. Check if linesApiNames are consistent with your DOCS line names."'),e.graph=e["graph"+t],f.drawGraph.call(e),e["graph"+t]=e.graph):(0,p.error)('Error: "'+t+" doesn't have equivalent in pointArrayMap. To many elements in linesApiNames relative to pointArrayMap.\"")}),e.points=s,e.options=l,e.graph=h,f.drawGraph.call(e)}function s(t){var e,r=[],o=[];if(t=t||this.points,this.fillGraph&&this.nextPoints){if((e=f.getGraphPath.call(this,this.nextPoints))&&e.length){e[0][0]="L",r=f.getGraphPath.call(this,t),o=e.slice(0,r.length);for(var i=o.length-1;i>=0;i--)r.push(o[i])}}else r=f.getGraphPath.apply(this,arguments);return r}function l(t){var e=[];return(this.pointArrayMap||[]).forEach(function(r){e.push(t[r])}),e}function h(){var t,e=this,r=this.pointArrayMap,o=[];o=n(this),f.translate.apply(this,arguments),this.points.forEach(function(i){r.forEach(function(r,n){t=i[r],e.dataModify&&(t=e.dataModify.modifyValue(t)),null!==t&&(i[o[n]]=e.yAxis.toPixels(t,!0))})})}t.compose=function(t){var i=t.prototype;return i.linesApiNames=i.linesApiNames||e.slice(),i.pointArrayMap=i.pointArrayMap||r.slice(),i.pointValKey=i.pointValKey||"top",i.areaLinesNames=i.areaLinesNames||o.slice(),i.drawGraph=a,i.getGraphPath=s,i.toYData=l,i.translate=h,t}}(o||(o={}));var y=o,d=(r=function(t,e){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(t,e)},function(t,e){function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),g=u().seriesTypes.sma,m=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d(e,t),e.prototype.init=function(){t.prototype.init.apply(this,arguments),this.options=(0,p.merge)({smoothedLine:{styles:{lineColor:this.color}}},this.options)},e.prototype.getValues=function(e,r){var o,i,n,a,s=r.periods[0],l=r.periods[1],c=e.xData,u=e.yData,f=u?u.length:0,y=[],d=[],g=[],m=null;if(!(f<s)&&(0,p.isArray)(u[0])&&4===u[0].length){var v=!0,x=0;for(a=s-1;a<f;a++){if(o=(n=h(u.slice(a-s+1,a+1),2,1))[0],isNaN(i=(u[a][3]-o)/(n[1]-o)*100)&&v){x++;continue}v&&!isNaN(i)&&(v=!1);var A=d.push(c[a]);isNaN(i)?g.push([g[A-2]&&"number"==typeof g[A-2][0]?g[A-2][0]:null,null]):g.push([i,null]),a>=x+(s-1)+(l-1)&&(m=t.prototype.getValues.call(this,{xData:d.slice(-l),yData:g.slice(-l)},{period:l}).yData[0]),y.push([c[a],i,m]),g[A-1][1]=m}return{values:y,xData:d,yData:g}}},e.defaultOptions=(0,p.merge)(g.defaultOptions,{params:{index:void 0,period:void 0,periods:[14,3]},marker:{enabled:!1},tooltip:{pointFormat:'<span style="color:{point.color}">●</span><b> {series.name}</b><br/>%K: {point.y}<br/>%D: {point.smoothed}<br/>'},smoothedLine:{styles:{lineWidth:1,lineColor:void 0}},dataGrouping:{approximation:"averages"}}),e}(g);(0,p.extend)(m.prototype,{areaLinesNames:[],nameComponents:["periods"],nameBase:"Stochastic",pointArrayMap:["y","smoothed"],parallelArrays:["x","y","smoothed"],pointValKey:"y",linesApiNames:["smoothedLine"]}),y.compose(m),u().registerSeriesType("stochastic",m);var v=l();return s.default}()});