/**
 * Highstock JS v11.3.0 (2024-01-10)
 *
 * Hollow Candlestick series type for Highcharts Stock
 *
 * (c) 2010-2024 Karol Kolodziej
 *
 * 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/modules/hollowcandlestick",["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 i(t,e,i,s){t.hasOwnProperty(e)||(t[e]=s.apply(null,i),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}i(e,"Series/HollowCandlestick/HollowCandlestickPoint.js",[e["Core/Series/SeriesRegistry.js"]],function(t){let{seriesTypes:{candlestick:e}}=t;class i extends e.prototype.pointClass{getClassName(){let t=super.getClassName.apply(this),e=this.index,i=this.series.hollowCandlestickData[e];return i.isBullish||"up"!==i.trendDirection||(t+="-bearish-up"),t}}return i}),i(e,"Series/HollowCandlestick/HollowCandlestickSeries.js",[e["Series/HollowCandlestick/HollowCandlestickPoint.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"],e["Core/Axis/Axis.js"]],function(t,e,i,s){let{seriesTypes:{candlestick:o}}=e,{addEvent:l,merge:n}=i;class r extends o{constructor(){super(...arguments),this.hollowCandlestickData=[]}getPriceMovement(){let t=this.allGroupedData||this.yData,e=this.hollowCandlestickData;e.length=0,e.push({isBullish:!0,trendDirection:"up"});for(let i=1;i<t.length;i++){let s=t[i],o=t[i-1];e.push(this.isBullish(s,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]<=t[3],trendDirection:t[3]<e[3]?"down":"up"}}pointAttribs(t,e){let i=super.pointAttribs.call(this,t,e),s,o=t.index,l=this.hollowCandlestickData[o];return i.fill=this.getPointFill(l)||i.fill,i.stroke=this.getLineColor(l.trendDirection)||i.stroke,e&&(s=this.options.states[e],i.fill=s.color||i.fill,i.stroke=s.lineColor||i.stroke,i["stroke-width"]=s.lineWidth||i["stroke-width"]),i}}return r.defaultOptions=n(o.defaultOptions,{color:"#f21313",dataGrouping:{groupAll:!0,groupPixelWidth:10},lineColor:"#f21313",upColor:"#06b535",upLineColor:"#06b535"}),l(r,"updatedData",function(){this.hollowCandlestickData.length&&(this.hollowCandlestickData.length=0)}),l(s,"postProcessData",function(){let t=this.series;t.forEach(function(t){t.is("hollowcandlestick")&&t.getPriceMovement()})}),r.prototype.pointClass=t,e.registerSeriesType("hollowcandlestick",r),r}),i(e,"masters/modules/hollowcandlestick.src.js",[],function(){})});