/** * Highstock JS v11.2.0 (2023-10-30) * * Indicator series type for Highcharts Stock * * (c) 2010-2021 Paweł Dalek * * 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/indicators/volume-by-price",["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 o(t,e,o,i){t.hasOwnProperty(e)||(t[e]=i.apply(null,o),"function"==typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:t[e]}})))}o(e,"Stock/Indicators/VBP/VBPPoint.js",[e["Core/Series/SeriesRegistry.js"]],function(t){var e,o=this&&this.__extends||(e=function(t,o){return(e=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,o)},function(t,o){if("function"!=typeof o&&null!==o)throw TypeError("Class extends value "+String(o)+" is not a constructor or null");function i(){this.constructor=t}e(t,o),t.prototype=null===o?Object.create(o):(i.prototype=o.prototype,new i)});return function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o(e,t),e.prototype.destroy=function(){this.negativeGraphic&&(this.negativeGraphic=this.negativeGraphic.destroy()),t.prototype.destroy.apply(this,arguments)},e}(t.seriesTypes.sma.prototype.pointClass)}),o(e,"Stock/Indicators/VBP/VBPIndicator.js",[e["Stock/Indicators/VBP/VBPPoint.js"],e["Core/Animation/AnimationUtilities.js"],e["Core/Globals.js"],e["Core/Series/SeriesRegistry.js"],e["Core/Utilities.js"],e["Core/Chart/StockChart.js"]],function(t,e,o,i,n,s){var r,a=this&&this.__extends||(r=function(t,e){return(r=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),p=e.animObject,l=o.noop,u=i.seriesTypes,h=u.column.prototype,d=u.sma,c=n.addEvent,f=n.arrayMax,v=n.arrayMin,m=n.correctFloat,y=n.defined,g=n.error,x=n.extend,S=n.isArray,V=n.merge,D=Math.abs,P=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.data=void 0,e.negWidths=void 0,e.options=void 0,e.points=void 0,e.posWidths=void 0,e.priceZones=void 0,e.rangeStep=void 0,e.volumeDataArray=void 0,e.zoneStarts=void 0,e.zoneLinesSVG=void 0,e}return a(e,t),e.prototype.init=function(e,o){var i=this;delete o.data,t.prototype.init.apply(i,arguments);var n=c(s,"afterLinkSeries",function(){if(i.options){var t=i.options.params,o=i.linkedParent,s=e.get(t.volumeSeriesID);i.addCustomEvents(o,s)}n()},{order:1});return i},e.prototype.addCustomEvents=function(t,e){var o=this,i=function(){o.chart.redraw(),o.setData([]),o.zoneStarts=[],o.zoneLinesSVG&&(o.zoneLinesSVG=o.zoneLinesSVG.destroy())};return o.dataEventsToUnbind.push(c(t,"remove",function(){i()})),e&&o.dataEventsToUnbind.push(c(e,"remove",function(){i()})),o},e.prototype.animate=function(t){var e=this,o=e.chart.inverted,i=e.group,n={};if(!t&&i){var s=o?e.yAxis.top:e.xAxis.left;o?(i["forceAnimate:translateY"]=!0,n.translateY=s):(i["forceAnimate:translateX"]=!0,n.translateX=s),i.animate(n,x(p(e.options.animation),{step:function(t,o){e.group.attr({scaleX:Math.max(.001,o.pos)})}}))}},e.prototype.drawPoints=function(){this.options.volumeDivision.enabled&&(this.posNegVolume(!0,!0),h.drawPoints.apply(this,arguments),this.posNegVolume(!1,!1)),h.drawPoints.apply(this,arguments)},e.prototype.posNegVolume=function(t,e){var o,i,n,s,r=e?["positive","negative"]:["negative","positive"],a=this.options.volumeDivision,p=this.points.length,l=[],u=[],h=0;for(t?(this.posWidths=l,this.negWidths=u):(l=this.posWidths,u=this.negWidths);h
n&&(n=e);return{min:i,max:n}}(o),r=this.zoneStarts=[],a=[],p=s?s.min:v(o),l=s?s.max:f(o),u=0,h=1,d=this.linkedParent;if(!this.options.compareToMain&&d.dataModify&&(p=d.dataModify.modifyValue(p),l=d.dataModify.modifyValue(l)),!y(p)||!y(l))return this.points.length&&(this.setData([]),this.zoneStarts=[],this.zoneLinesSVG&&(this.zoneLinesSVG=this.zoneLinesSVG.destroy())),[];var c=this.rangeStep=m(l-p)/i;for(r.push(p);u