import{g as t}from"./index-B1MHyEgd.js";function e(t,e){return e.forEach(function(e){e&&"string"!=typeof e&&!Array.isArray(e)&&Object.keys(e).forEach(function(o){if("default"!==o&&!(o in t)){var r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:function(){return e[o]}})}})}),Object.freeze(t)}var o,r={exports:{}};var i,s=o?r.exports:(o=1,i="undefined"==typeof window?r.exports:window,r.exports=((t,e,o)=>(()=>{var r={512:t=>{t.exports=e},532:t=>{t.exports=o},944:e=>{e.exports=t}},i={};function s(t){var e=i[t];if(void 0!==e)return e.exports;var o=i[t]={exports:{}};return r[t](o,o.exports,s),o.exports}s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var o in e)s.o(e,o)&&!s.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var l={};s.d(l,{default:()=>y});var n=s(944),a=s.n(n),p=s(512),h=s.n(p);let{seriesTypes:{candlestick:u}}=h();class c extends u.prototype.pointClass{getClassName(){let t=super.getClassName.apply(this),e=this.index,o=this.series.hollowCandlestickData[e];return o.isBullish||"up"!==o.trendDirection||(t+="-bearish-up"),t}}var d=s(532),f=s.n(d);let{seriesTypes:{candlestick:g}}=h(),{addEvent:w,merge:C}=a();class x extends g{constructor(){super(...arguments),this.hollowCandlestickData=[]}getPriceMovement(){let t,e=this.allGroupedTable||this.dataTable,o=e.rowCount,r=this.hollowCandlestickData;r.length=0;for(let i=0;i<o;i++){let o=e.getRow(i,this.pointArrayMap);r.push(this.isBullish(o,i?t:o)),t=o}}getLineColor(t){return"up"===t?this.options.upColor||"#06b535":this.options.color||"#f21313"}getPointFill(t){return t.isBullish?"transparent":"up"===t.trendDirection?this.options.upColor||"#06b535":this.options.color||"#f21313"}init(){super.init.apply(this,arguments),this.hollowCandlestickData=[]}isBullish(t,e){return{isBullish:(t[0]||0)<=(t[3]||0),trendDirection:(t[3]||0)<(e?.[3]||0)?"down":"up"}}pointAttribs(t,e){let o,r=super.pointAttribs.call(this,t,e),i=t.index,s=this.hollowCandlestickData[i];return r.fill=this.getPointFill(s)||r.fill,r.stroke=this.getLineColor(s.trendDirection)||r.stroke,e&&(r.fill=(o=this.options.states[e]).color||r.fill,r.stroke=o.lineColor||r.stroke,r["stroke-width"]=o.lineWidth||r["stroke-width"]),r}}x.defaultOptions=C(g.defaultOptions,{color:"#f21313",dataGrouping:{groupAll:!0,groupPixelWidth:10},lineColor:"#f21313",upColor:"#06b535",upLineColor:"#06b535"}),w(x,"updatedData",function(){this.hollowCandlestickData.length&&(this.hollowCandlestickData.length=0)}),w(f(),"postProcessData",function(){this.series.forEach(function(t){t.is("hollowcandlestick")&&t.getPriceMovement()})}),x.prototype.pointClass=c,h().registerSeriesType("hollowcandlestick",x);let y=a();return l.default})())(i._Highcharts,i._Highcharts.SeriesRegistry,i._Highcharts.Axis)),l=e({__proto__:null,default:t(s)},[s]);export{l as h};
//# sourceMappingURL=hollowcandlestick-DjRCMKA-.js.map
