/*
 Highcharts JS v10.3.3 (2023-01-20)

 Item series type for Highcharts

 (c) 2019 Torstein Honsi

 License: www.highcharts.com/license
*/
(function(a){"object"===typeof module&&module.exports?(a["default"]=a,module.exports=a):"function"===typeof define&&define.amd?define("highcharts/modules/item-series",["highcharts"],function(b){a(b);a.Highcharts=b;return a}):a("undefined"!==typeof Highcharts?Highcharts:void 0)})(function(a){function b(a,e,c,b){a.hasOwnProperty(e)||(a[e]=b.apply(null,c),"function"===typeof CustomEvent&&window.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:e,module:a[e]}})))}a=a?a._modules:{};
b(a,"Series/Item/ItemPoint.js",[a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,e){var c=this&&this.__extends||function(){var a=function(b,f){a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,b){a.__proto__=b}||function(a,b){for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f])};return a(b,f)};return function(b,f){function e(){this.constructor=b}a(b,f);b.prototype=null===f?Object.create(f):(e.prototype=f.prototype,new e)}}(),b=a.series;e=e.extend;a=function(a){function b(){var b=
null!==a&&a.apply(this,arguments)||this;b.options=void 0;b.series=void 0;return b}c(b,a);return b}(a.seriesTypes.pie.prototype.pointClass);e(a.prototype,{haloPath:b.prototype.pointClass.prototype.haloPath});return a});b(a,"Series/Item/ItemSeries.js",[a["Core/Globals.js"],a["Series/Item/ItemPoint.js"],a["Core/Defaults.js"],a["Core/Series/SeriesRegistry.js"],a["Core/Utilities.js"]],function(a,b,c,x,h){var e=this&&this.__extends||function(){var a=function(b,d){a=Object.setPrototypeOf||{__proto__:[]}instanceof
Array&&function(a,d){a.__proto__=d}||function(a,d){for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b])};return a(b,d)};return function(b,d){function q(){this.constructor=b}a(b,d);b.prototype=null===d?Object.create(d):(q.prototype=d.prototype,new q)}}(),f=c.defaultOptions,y=x.seriesTypes.pie,J=h.defined,z=h.extend,K=h.fireEvent,p=h.isNumber,C=h.merge,L=h.pick;c=function(b){function c(){var a=null!==b&&b.apply(this,arguments)||this;a.data=void 0;a.options=void 0;a.points=void 0;return a}e(c,b);c.prototype.animate=
function(a){a?this.group.attr({opacity:0}):this.group.animate({opacity:1},this.options.animation)};c.prototype.drawDataLabels=function(){this.center&&this.slots?a.seriesTypes.pie.prototype.drawDataLabels.call(this):this.points.forEach(function(a){a.destroyElements({dataLabel:1})})};c.prototype.drawPoints=function(){var a=this,b=this.options,c=a.chart.renderer,e=b.marker,f=this.borderWidth%2?.5:1,A=0,t=this.getRows(),h=Math.ceil(this.total/t),u=this.chart.plotWidth/h,v=this.chart.plotHeight/t,w=this.itemSize||
Math.min(u,v);this.points.forEach(function(d){var q,G,l=d.marker||{},n=l.symbol||e.symbol;l=L(l.radius,e.radius);var I=J(l)?2*l:w,r=I*b.itemPadding,B;d.graphics=q=d.graphics||[];a.chart.styledMode||(G=a.pointAttribs(d,d.selected&&"select"));if(!d.isNull&&d.visible){d.graphic||(d.graphic=c.g("point").add(a.group));for(var m=0;m<(d.y||0);m++){if(a.center&&a.slots){var g=a.slots.shift();var k=g.x-w/2;g=g.y-w/2}else"horizontal"===b.layout?(k=A%h*u,g=v*Math.floor(A/h)):(k=u*Math.floor(A/t),g=A%t*v);k+=
r;g+=r;var p=B=Math.round(I-2*r);a.options.crisp&&(k=Math.round(k)-f,g=Math.round(g)+f);k={x:k,y:g,width:B,height:p};"undefined"!==typeof l&&(k.r=l);(g=q[m])?g.animate(k):(G&&z(k,G),g=c.symbol(n,void 0,void 0,void 0,void 0,{backgroundSize:"within"}).attr(k).add(d.graphic));g.isActive=!0;q[m]=g;A++}}q.forEach(function(a,b){a&&(a.isActive?a.isActive=!1:(a.destroy(),q.splice(b,1)))})})};c.prototype.getRows=function(){var a=this.options.rows;if(!a){var b=this.chart.plotWidth/this.chart.plotHeight;a=Math.sqrt(this.total);
if(1<b)for(a=Math.ceil(a);0<a;){var c=this.total/a;if(c/a>b)break;a--}else for(a=Math.floor(a);a<this.total;){c=this.total/a;if(c/a<b)break;a++}}return a};c.prototype.getSlots=function(){function a(a){0<F&&(a.row.colCount--,F--)}for(var b=this.center,c=b[2],e=b[3],f,h=this.slots,t,p,u,v,w,x,D,E,l=0,n,H=this.endAngleRad-this.startAngleRad,r=Number.MAX_VALUE,B,m,g,k=this.options.rows,y=(c-e)/c,z=0===H%(2*Math.PI),C=this.total||0;r>C+(m&&z?m.length:0);)for(B=r,r=h.length=0,m=g,g=[],l++,n=c/l/2,k?(e=
(n-k)/n*c,0<=e?n=k:(e=0,y=1)):n=Math.floor(n*y),f=n;0<f;f--)u=(e+f/n*(c-e-l))/2,v=H*u,w=Math.ceil(v/l),g.push({rowRadius:u,rowLength:v,colCount:w}),r+=w+1;if(m){for(var F=B-this.total-(z?m.length:0);0<F;)m.map(function(a){return{angle:a.colCount/a.rowLength,row:a}}).sort(function(a,b){return b.angle-a.angle}).slice(0,Math.min(F,Math.ceil(m.length/2))).forEach(a);m.forEach(function(a){var c=a.rowRadius;x=(a=a.colCount)?H/a:0;for(E=0;E<=a;E+=1)D=this.startAngleRad+E*x,t=b[0]+Math.cos(D)*c,p=b[1]+Math.sin(D)*
c,h.push({x:t,y:p,angle:D})},this);h.sort(function(a,b){return a.angle-b.angle});this.itemSize=l;return h}};c.prototype.translate=function(b){0===this.total&&p(this.options.startAngle)&&p(this.options.endAngle)&&(this.center=this.getCenter());this.slots||(this.slots=[]);p(this.options.startAngle)&&p(this.options.endAngle)?(a.seriesTypes.pie.prototype.translate.apply(this,arguments),this.slots=this.getSlots()):(this.generatePoints(),K(this,"afterTranslate"))};c.defaultOptions=C(y.defaultOptions,{endAngle:void 0,
innerSize:"40%",itemPadding:.1,layout:"vertical",marker:C(f.plotOptions.line.marker,{radius:null}),rows:void 0,crisp:!1,showInLegend:!0,startAngle:void 0});return c}(y);z(c.prototype,{markerAttribs:void 0});c.prototype.pointClass=b;x.registerSeriesType("item",c);"";return c});b(a,"masters/modules/item-series.src.js",[],function(){})});
//# sourceMappingURL=item-series.js.map