import{g as e}from"./index-B1MHyEgd.js";function t(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(r){if("default"!==r&&!(r in e)){var o=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,o.get?o:{enumerable:!0,get:function(){return t[r]}})}})}),Object.freeze(e)}var r,o={exports:{}};var s,i=r?o.exports:(r=1,s="undefined"==typeof window?o.exports:window,o.exports=((e,t,r)=>(()=>{var o,s={512:e=>{e.exports=t},608:e=>{e.exports=r},944:t=>{t.exports=e}},i={};function n(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return s[e](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var a={};n.d(a,{default:()=>w});var p=n(944),l=n.n(p),h=n(512),u=n.n(h);let{seriesTypes:{scatter:{prototype:{pointClass:d}}}}=u();var c=n(608),f=n.n(c);!function(e){let t=[];function r(e,t,r,o){return[["M",e,t],["L",e+r,t+o],["M",e+r,t],["L",e,t+o],["Z"]]}e.compose=function(e){-1===t.indexOf(e)&&(t.push(e),e.prototype.symbols.cross=r);let o=f().getRendererType();t.indexOf(o)&&t.push(o)}}(o||(o={}));let g=o,{composed:m}=l(),{scatter:y,column:{prototype:x}}=u().seriesTypes,{extend:b,merge:k,pushUnique:v,isNumber:C,relativeLength:T}=l();class M extends y{constructor(){super(...arguments),this.allowDG=!1}static compose(e){v(m,"pointandfigure")&&g.compose(e)}init(){super.init.apply(this,arguments),this.pnfDataGroups=[]}getProcessedData(){let e;if(!this.pnfDataGroups)return{modified:this.dataTable.modified,cropped:!1,cropStart:0,closestPointRange:1};let t=this.dataTable.modified,r=this.options,o=this.getColumn("x",!0),s=this.getColumn("y",!0),i=r.boxSize,n=C(i)?i:T(i,s[0]),a=this.pnfDataGroups,p=n*r.reversalAmount;function l(e,t,r){let o=a[a.length-1],s=t?1:-1,i=Math.floor(s*(e-r)/n);for(let e=1;e<=i;e++){let t=r+n*e*s;o.y.push(t)}}if(this.calculatedBoxSize=n,this.isDirtyData||0===a.length){this.pnfDataGroups.length=0;for(let t=0;t<s.length;t++){let r=o[t],i=s[t],p=s[0];if(i-p>=n){e=!0,a.push({x:r,y:[i],upTrend:e});break}if(p-i>=n){e=!1,a.push({x:r,y:[i],upTrend:e});break}}s.forEach((t,r)=>{let s=o[r],i=function(e){let t=e[e.length-1].y;return t[t.length-1]}(a);e&&(t-i>=n&&l(t,e,i),i-t>=p&&(e=!1,a.push({x:s,y:[],upTrend:e}),l(t,e,i))),!e&&(i-t>=n&&l(t,e,i),t-i>=p&&(e=!0,a.push({x:s,y:[],upTrend:e}),l(t,e,i)))})}let h=[],u=[],d=[];return a.forEach(e=>{let t=e.x,r=e.upTrend;e.y.forEach(e=>{u.push(t),d.push(e),h.push({x:t,y:e,upTrend:r})})}),t.setColumn("x",u),t.setColumn("y",d),this.pnfDataGroups=a,this.processedData=h,{modified:t,cropped:!1,cropStart:0,closestPointRange:1}}markerAttribs(e){let t=this.options,r={},o=e.pos();return r.width=this.markerWidth,r.height=this.markerHeight,o&&r.width&&r.height&&(r.x=o[0]-Math.round(r.width)/2,r.y=o[1]-Math.round(r.height)/2),t.crisp&&r.x&&(r.x=Math.floor(r.x)),r}translate(){let e=this.getColumnMetrics(),t=this.calculatedBoxSize;this.markerWidth=e.width+e.paddedWidth+e.offset,this.markerHeight=this.yAxis.toPixels(0)-this.yAxis.toPixels(t),super.translate()}}M.defaultOptions=k(y.defaultOptions,{boxSize:"1%",reversalAmount:3,tooltip:{pointFormat:'<span style="color:{point.color}">●</span> <b> {series.name}</b><br/>Close: {point.y:.2f}<br/>',headerFormat:""},turboThreshold:0,groupPadding:.2,pointPadding:.1,pointRange:null,dataGrouping:{enabled:!1},markerUp:{symbol:"cross",lineColor:"#00FF00",lineWidth:2},marker:{symbol:"circle",fillColor:"transparent",lineColor:"#FF0000",lineWidth:2},legendSymbol:"lineMarker"}),b(M.prototype,{takeOrdinalPosition:!0,pnfDataGroups:[],getColumnMetrics:x.getColumnMetrics,pointClass:class extends d{resolveMarker(){let e=this.series.options;this.marker=this.options.marker=this.upTrend?e.markerUp:e.marker,this.color=this.options.marker.lineColor}resolveColor(){super.resolveColor(),this.resolveMarker()}getClassName(){return super.getClassName.call(this)+(this.upTrend?" highcharts-point-up":" highcharts-point-down")}},sorted:!0}),u().registerSeriesType("pointandfigure",M);let O=l();M.compose(O.Renderer);let w=l();return a.default})())(s._Highcharts,s._Highcharts.SeriesRegistry,s._Highcharts.RendererRegistry)),n=t({__proto__:null,default:e(i)},[i]);export{n as p};
//# sourceMappingURL=pointandfigure-Dd9AEEte.js.map
