!/**
 * Highcharts JS v13.0.0 (2026-06-11)
 * @module highcharts/modules/histogram-bellcurve
 * @requires highcharts
 *
 * (c) 2010-2026 Highsoft AS
 * Author: Sebastian Domas
 *
 * A commercial license may be required depending on use,
 * see www.highcharts.com/license
 */function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(e._Highcharts,e._Highcharts.Series,e._Highcharts.SeriesRegistry):"function"==typeof define&&define.amd?define("highcharts/modules/histogram-bellcurve",["highcharts/highcharts"],function(e){return t(e,e.Series,e.SeriesRegistry)}):"object"==typeof exports?exports["highcharts/modules/histogram-bellcurve"]=t(e._Highcharts,e._Highcharts.Series,e._Highcharts.SeriesRegistry):e.Highcharts=t(e.Highcharts,e.Highcharts.Series,e.Highcharts.SeriesRegistry)}("u"<typeof window?this:window,(e,t,s)=>(()=>{"use strict";var i,r={512:e=>{e.exports=s},820:e=>{e.exports=t},944:t=>{t.exports=e}},a={};function n(e){var t=a[e];if(void 0!==t)return t.exports;var s=a[e]={exports:{}};return r[e](s,s.exports,n),s.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 s in t)n.o(t,s)&&!n.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var o={};n.d(o,{default:()=>S});var h=n(944),l=n.n(h),d=n(820),u=n.n(d);let{noop:c}=l();!function(e){function t(){u().prototype.init.apply(this,arguments),this.initialised=!1,this.baseSeries=null,this.eventRemovers=[],this.addEvents()}function s(){let e=this.chart,t=this.options.baseSeries,s=(0,h.defined)(t)&&(e.series[t]||e.get(t));this.baseSeries=s||null}function i(){this.eventRemovers.push((0,h.addEvent)(this.chart,"afterLinkSeries",()=>{this.setBaseSeries(),this.baseSeries&&!this.initialised&&(this.setDerivedData(),this.addBaseSeriesEvents(),this.initialised=!0)}))}function r(){this.eventRemovers.push((0,h.addEvent)(this.baseSeries,"updatedData",()=>{this.setDerivedData()}),(0,h.addEvent)(this.baseSeries,"destroy",()=>{this.baseSeries=null,this.initialised=!1}))}function a(){this.eventRemovers.forEach(e=>{e()}),u().prototype.destroy.apply(this,arguments)}e.hasDerivedData=!0,e.setDerivedData=c,e.compose=function(e){let n=e.prototype;return n.addBaseSeriesEvents=r,n.addEvents=i,n.destroy=a,n.init=t,n.setBaseSeries=s,e},e.init=t,e.setBaseSeries=s,e.addEvents=i,e.addBaseSeriesEvents=r,e.destroy=a}(i||(i={}));let p=i;var v=n(512),m=n.n(v);let{column:f}=m().seriesTypes,g={"square-root":function(e){return Math.ceil(Math.sqrt(e.length))},sturges:function(e){return Math.ceil(Math.log(e.length)*Math.LOG2E)},rice:function(e){return Math.ceil(2*Math.pow(e.length,1/3))}};class b extends f{binsNumber(e){let t=this.options.binsNumber,s=g[t]||"function"==typeof t&&t;return Math.ceil(s&&s(e)||((0,h.isNumber)(t)?t:g["square-root"](e)))}setData(e,t=!0,s,i){let r;void 0!==e&&e.length>0&&(e=e.map(function(e){return(0,h.isNumber)(e)?e:e?.y??0}),r=this.derivedData(e.filter(h.isNumber),this.binsNumber(e),this.options.binWidth)),super.setData.call(this,r,t,s,i)}derivedData(e,t,s){var i;let r,a=(0,h.correctFloat)((0,h.arrayMax)(e)),n=(0,h.correctFloat)((0,h.arrayMin)(e)),o=[],l={},d=[];for(s=this.binWidth=(0,h.correctFloat)((0,h.isNumber)(s)?s||1:(a-n)/t),this.options.pointRange=Math.max(s,0),r=n;r<a&&(this.userOptions.binWidth||(0,h.correctFloat)(a-r)>=s||0>=(0,h.correctFloat)((0,h.correctFloat)(n+o.length*s)-r));r=(0,h.correctFloat)(r+s))o.push(r),l[r]=0;0!==l[n]&&(o.push(n),l[n]=0);let u=(i=o.map(e=>parseFloat(e)),function(e){let t=1;for(;i[t]<=e;)t++;return i[--t]});for(let t of e)l[(0,h.correctFloat)(u(t))]++;for(let e of Object.keys(l))d.push({x:Number(e),y:l[e],x2:(0,h.correctFloat)(Number(e)+s)});return d.sort((e,t)=>e.x-t.x),d[d.length-1].x2=a,d}setDerivedData(){let e=this.baseSeries?.getColumn("y");e?.length?this.setData(e,!1,void 0,!1):this.setData([])}}b.defaultOptions=(0,h.merge)(f.defaultOptions,{binsNumber:"square-root",binWidth:void 0,pointPadding:0,groupPadding:0,grouping:!1,pointPlacement:"between",tooltip:{headerFormat:"",pointFormat:'<span style="font-size: 0.8em">{point.x} - {point.x2}</span><br/><span style="color:{point.color}">●</span> {series.name} <b>{point.y}</b><br/>'}}),p.compose(b),m().registerSeriesType("histogram",b);let{areaspline:y}=m().seriesTypes;class D extends y{static mean(e){let t=e.length,s=e.reduce(function(e,t){return e+t},0);return t>0&&s/t}static standardDeviation(e,t){let s=e.length;t=(0,h.isNumber)(t)?t:D.mean(e);let i=e.reduce((e,s)=>{let i=s-t;return e+i*i},0);return s>1&&Math.sqrt(i/(s-1))}static normalDensity(e,t,s){let i=e-t;return Math.exp(-(i*i)/(2*s*s))/(s*Math.sqrt(2*Math.PI))}setData(e,t=!0,s,i){let r;void 0!==e&&e.length>0&&(e=e.map(function(e){return(0,h.isNumber)(e)?e:e?.y}).filter(h.isNumber),this.setMean(e),this.setStandardDeviation(e),r=this.derivedData(this.mean||0,this.standardDeviation||0)),super.setData.call(this,r,t,s,i)}derivedData(e,t){let s=this.options,i=s.intervals,r=s.pointsInInterval,a=i*r*2+1,n=t/r,o=[],h=e-i*t;for(let s=0;s<a;s++)o.push([h,D.normalDensity(h,e,t)]),h+=n;return o}setDerivedData(){this.baseSeries?.getColumn("y").length&&this.setData(this.baseSeries?.getColumn("y"),!1,void 0,!1)}setMean(e){this.mean=(0,h.correctFloat)(D.mean(e||[]))}setStandardDeviation(e){this.standardDeviation=(0,h.correctFloat)(D.standardDeviation(e||[],this.mean))}}D.defaultOptions=(0,h.merge)(y.defaultOptions,{intervals:3,pointsInInterval:3,marker:{enabled:!1}}),p.compose(D),m().registerSeriesType("bellcurve",D);let S=l();return o.default})());