!/**
 * Highcharts JS v12.5.0 (2026-01-12)
 * @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:()=>j});var h=n(944),l=n.n(h),d=n(820),u=n.n(d);let{noop:p}=l(),{addEvent:c,defined:v}=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=v(t)&&(e.series[t]||e.get(t));this.baseSeries=s||null}function i(){this.eventRemovers.push(c(this.chart,"afterLinkSeries",()=>{this.setBaseSeries(),this.baseSeries&&!this.initialised&&(this.setDerivedData(),this.addBaseSeriesEvents(),this.initialised=!0)}))}function r(){this.eventRemovers.push(c(this.baseSeries,"updatedData",()=>{this.setDerivedData()}),c(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=p,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 f=i;var g=n(512),m=n.n(g);let{column:b}=m().seriesTypes,{arrayMax:y,arrayMin:D,correctFloat:S,isNumber:x,merge:M}=l(),H={"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 O extends b{binsNumber(e){let t=this.options.binsNumber,s=H[t]||"function"==typeof t&&t;return Math.ceil(s&&s(e)||(x(t)?t:H["square-root"](e)))}setData(e,t=!0,s,i){let r;void 0!==e&&e.length>0&&(r=this.derivedData(e.filter(x),this.binsNumber(e),this.options.binWidth)),super.setData.call(this,r,t,s,i)}derivedData(e,t,s){var i;let r,a=S(y(e)),n=S(D(e)),o=[],h={},l=[];for(s=this.binWidth=S(x(s)?s||1:(a-n)/t),this.options.pointRange=Math.max(s,0),r=n;r<a&&(this.userOptions.binWidth||S(a-r)>=s||0>=S(S(n+o.length*s)-r));r=S(r+s))o.push(r),h[r]=0;0!==h[n]&&(o.push(n),h[n]=0);let d=(i=o.map(e=>parseFloat(e)),function(e){let t=1;for(;i[t]<=e;)t++;return i[--t]});for(let t of e)h[S(d(t))]++;for(let e of Object.keys(h))l.push({x:Number(e),y:h[e],x2:S(Number(e)+s)});return l.sort((e,t)=>e.x-t.x),l[l.length-1].x2=a,l}setDerivedData(){let e=this.baseSeries?.getColumn("y");e?.length?this.setData(e,!1,void 0,!1):this.setData([])}}O.defaultOptions=M(b.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/>'}}),f.compose(O),m().registerSeriesType("histogram",O);let{areaspline:R}=m().seriesTypes,{correctFloat:E,isNumber:_,merge:w}=l();class N extends R{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=_(t)?t:N.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.filter(_),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,N.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=E(N.mean(e||[]))}setStandardDeviation(e){this.standardDeviation=E(N.standardDeviation(e||[],this.mean))}}N.defaultOptions=w(R.defaultOptions,{intervals:3,pointsInInterval:3,marker:{enabled:!1}}),f.compose(N),m().registerSeriesType("bellcurve",N);let j=l();return o.default})());