/**
 * Highstock JS v13.0.0 (2026-06-11)
 * @module highcharts/modules/renko
 * @requires highcharts
 * @requires highcharts/modules/stock
 *
 * Renko series type for Highcharts Stock
 *
 * (c) 2010-2026 Highsoft AS
 * Author: Paweł Lysy
 *
 * A commercial license may be required depending on use,
 * see www.highcharts.com/license
 */import*as t from"../highcharts.js";var e={};e.n=t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},e.d=(t,o)=>{for(var s in o)e.o(o,s)&&!e.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:o[s]})},e.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);let o=t.default;var s=e.n(o);let r=t.default.SeriesRegistry;var a=e.n(r);let{column:{prototype:{pointClass:n}}}=a().seriesTypes,i=t.default.Series.types.column;var l=e.n(i);class p extends l(){constructor(){super(...arguments),this.hasDerivedData=!0,this.allowDG=!1}init(){super.init.apply(this,arguments),this.renkoData=[]}setData(t,e,o){this.renkoData=[],super.setData(t,e,o,!1)}getXExtremes(t){return this.processData(),{min:(t=this.getColumn("x",!0))[0],max:t[t.length-1]}}getProcessedData(){let t=this.dataTable.getModified(),e=[],s=[],r=[],a=[],n=[],i=this.getColumn("x",!0),l=this.getColumn("y",!0);if(!this.renkoData||this.renkoData.length>0)return{modified:t,closestPointRange:1,cropped:!1,cropStart:0};let p=this.options.boxSize,h=(0,o.isNumber)(p)?p:(0,o.relativeLength)(p,l[0]),u=[],d=i.length,c=0,g=l[0];for(let t=1;t<d;t++){let e=l[t]-l[t-1];if(e>h){2===c&&(g+=h);for(let o=0;o<e/h;o++)u.push({x:i[t]+o,low:g,y:g+h,color:this.options.color,upTrend:!0}),g+=h;c=1}else if(Math.abs(e)>h){1===c&&(g-=h);for(let o=0;o<Math.abs(e)/h;o++)u.push({x:i[t]+o,low:g-h,y:g,color:this.options.downColor,upTrend:!1}),g-=h;c=2}}for(let t of(this.renkoData=u,u))e.push(t.x),s.push(t.y),r.push(t.low),a.push(t.color),n.push(t.upTrend);return this.hasProcessedDataTable=!0,t.setColumn("x",e),t.setColumn("y",s),t.setColumn("low",r),t.setColumn("color",a),t.setColumn("upTrend",n),{modified:t,cropped:!1,cropStart:0,closestPointRange:1}}}p.defaultOptions=(0,o.merge)(l().defaultOptions,{boxSize:4,groupPadding:0,pointPadding:0,downColor:"#ff0000",navigatorOptions:{type:"renko"},fillColor:"transparent",borderWidth:2,lineWidth:0,stickyTracking:!0,borderRadius:{where:"all"},tooltip:{pointFormat:'<span style="color:{point.color}">●</span> {series.name}: <b>{point.low:.2f} - {point.y:.2f}</b><br/>'}}),(0,o.extend)(p.prototype,{pointClass:class extends n{getClassName(){return super.getClassName.call(this)+(this.upTrend?" highcharts-point-up":" highcharts-point-down")}}}),a().registerSeriesType("renko",p);let h=s();export{h as default};