import{o as he}from"./entry.223f6570.js";function de(ee,Z){for(var g=0;g<Z.length;g++){const I=Z[g];if(typeof I!="string"&&!Array.isArray(I)){for(const u in I)if(u!=="default"&&!(u in ee)){const v=Object.getOwnPropertyDescriptor(I,u);v&&Object.defineProperty(ee,u,v.get?v:{enumerable:!0,get:()=>I[u]})}}}return Object.freeze(Object.defineProperty(ee,Symbol.toStringTag,{value:"Module"}))}var ne={exports:{}};(function(ee){(function(Z){ee.exports?(Z.default=Z,ee.exports=Z):Z(typeof Highcharts<"u"?Highcharts:void 0)})(function(Z){var g=Z?Z._modules:{};function I(u,v,S,L){u.hasOwnProperty(v)||(u[v]=L.apply(null,S),typeof CustomEvent=="function"&&Z.win.dispatchEvent(new CustomEvent("HighchartsModuleLoaded",{detail:{path:v,module:u[v]}})))}I(g,"Extensions/Breadcrumbs/BreadcrumbsDefaults.js",[],function(){return{lang:{mainBreadcrumb:"Main"},options:{buttonTheme:{fill:"none",height:18,padding:2,"stroke-width":0,zIndex:7,states:{select:{fill:"none"}},style:{color:"#334eff"}},buttonSpacing:5,floating:!1,format:void 0,relativeTo:"plotBox",rtl:!1,position:{align:"left",verticalAlign:"top",x:0,y:void 0},separator:{text:"/",style:{color:"#666666",fontSize:"0.8em"}},showFullPath:!0,style:{},useHTML:!1,zIndex:7}}}),I(g,"Extensions/Breadcrumbs/Breadcrumbs.js",[g["Extensions/Breadcrumbs/BreadcrumbsDefaults.js"],g["Core/Templating.js"],g["Core/Globals.js"],g["Core/Utilities.js"]],function(u,v,S,L){let{format:P}=v,{composed:B}=S,{addEvent:R,defined:C,extend:_,fireEvent:m,isString:h,merge:f,objectEach:T,pick:N,pushUnique:k}=L;function W(){if(this.breadcrumbs){let w=this.resetZoomButton&&this.resetZoomButton.getBBox(),o=this.breadcrumbs.options;w&&o.position.align==="right"&&o.relativeTo==="plotBox"&&this.breadcrumbs.alignBreadcrumbsGroup(-w.width-o.buttonSpacing)}}function U(){this.breadcrumbs&&(this.breadcrumbs.destroy(),this.breadcrumbs=void 0)}function $(){let w=this.breadcrumbs;if(w&&!w.options.floating&&w.level){let o=w.options,d=o.buttonTheme,y=(d.height||0)+2*(d.padding||0)+o.buttonSpacing,b=o.position.verticalAlign;b==="bottom"?(this.marginBottom=(this.marginBottom||0)+y,w.yOffset=y):b!=="middle"?(this.plotTop+=y,w.yOffset=-y):w.yOffset=void 0}}function K(){this.breadcrumbs&&this.breadcrumbs.redraw()}function H(w){w.resetSelection===!0&&this.breadcrumbs&&this.breadcrumbs.alignBreadcrumbsGroup()}class D{static compose(o,d){k(B,"Breadcrumbs")&&(R(o,"destroy",U),R(o,"afterShowResetZoom",W),R(o,"getMargins",$),R(o,"redraw",K),R(o,"selection",H),_(d.lang,u.lang))}constructor(o,d){this.elementList={},this.isDirty=!0,this.level=0,this.list=[];let y=f(o.options.drilldown&&o.options.drilldown.drillUpButton,D.defaultOptions,o.options.navigation&&o.options.navigation.breadcrumbs,d);this.chart=o,this.options=y||{}}updateProperties(o){this.setList(o),this.setLevel(),this.isDirty=!0}setList(o){this.list=o}setLevel(){this.level=this.list.length&&this.list.length-1}getLevel(){return this.level}getButtonText(o){let d=this.chart,y=this.options,b=d.options.lang,M=N(y.format,y.showFullPath?"{level.name}":"← {level.name}"),A=b&&N(b.drillUpText,b.mainBreadcrumb),G=y.formatter&&y.formatter(o)||P(M,{level:o.levelOptions},d)||"";return(h(G)&&!G.length||G==="← ")&&C(A)&&(G=y.showFullPath?A:"← "+A),G}redraw(){this.isDirty&&this.render(),this.group&&this.group.align(),this.isDirty=!1}render(){let o=this.chart,d=this.options;!this.group&&d&&(this.group=o.renderer.g("breadcrumbs-group").addClass("highcharts-no-tooltip highcharts-breadcrumbs").attr({zIndex:d.zIndex}).add()),d.showFullPath?this.renderFullPathButtons():this.renderSingleButton(),this.alignBreadcrumbsGroup()}renderFullPathButtons(){this.destroySingleButton(),this.resetElementListState(),this.updateListElements(),this.destroyListElements()}renderSingleButton(){let o=this.chart,d=this.list,y=this.options.buttonSpacing;this.destroyListElements();let b=this.group?this.group.getBBox().width:y,M=d[d.length-2];!o.drillUpButton&&this.level>0?o.drillUpButton=this.renderButton(M,b,y):o.drillUpButton&&(this.level>0?this.updateSingleButton():this.destroySingleButton())}alignBreadcrumbsGroup(o){if(this.group){let d=this.options,y=d.buttonTheme,b=d.position,M=d.relativeTo==="chart"||d.relativeTo==="spacingBox"?void 0:"plotBox",A=this.group.getBBox(),G=2*(y.padding||0)+d.buttonSpacing;b.width=A.width+G,b.height=A.height+G;let O=f(b);o&&(O.x+=o),this.options.rtl&&(O.x+=b.width),O.y=N(O.y,this.yOffset,0),this.group.align(O,!0,M)}}renderButton(o,d,y){let b=this,M=this.chart,A=b.options,G=f(A.buttonTheme),O=M.renderer.button(b.getButtonText(o),d,y,function(j){let E,F=A.events&&A.events.click;F&&(E=F.call(b,j,o)),E!==!1&&(A.showFullPath?j.newLevel=o.level:j.newLevel=b.level-1,m(b,"up",j))},G).addClass("highcharts-breadcrumbs-button").add(b.group);return M.styledMode||O.attr(A.style),O}renderSeparator(o,d){let y=this.chart,b=this.options.separator,M=y.renderer.label(b.text,o,d,void 0,void 0,void 0,!1).addClass("highcharts-breadcrumbs-separator").add(this.group);return y.styledMode||M.css(b.style),M}update(o){f(!0,this.options,o),this.destroy(),this.isDirty=!0}updateSingleButton(){let o=this.chart,d=this.list[this.level-1];o.drillUpButton&&o.drillUpButton.attr({text:this.getButtonText(d)})}destroy(){this.destroySingleButton(),this.destroyListElements(!0),this.group&&this.group.destroy(),this.group=void 0}destroyListElements(o){let d=this.elementList;T(d,(y,b)=>{(o||!d[b].updated)&&((y=d[b]).button&&y.button.destroy(),y.separator&&y.separator.destroy(),delete y.button,delete y.separator,delete d[b])}),o&&(this.elementList={})}destroySingleButton(){this.chart.drillUpButton&&(this.chart.drillUpButton.destroy(),this.chart.drillUpButton=void 0)}resetElementListState(){T(this.elementList,o=>{o.updated=!1})}updateListElements(){let o=this.elementList,d=this.options.buttonSpacing,y=this.list,b=this.options.rtl,M=b?-1:1,A=function(F,Q){return M*F.getBBox().width+M*Q},G=function(F,Q,X){F.translate(Q-F.getBBox().width,X)},O=this.group?A(this.group,d):d,j,E;for(let F=0,Q=y.length;F<Q;++F){let X,te,J=F===Q-1;o[(E=y[F]).level]?(X=(j=o[E.level]).button,j.separator||J?j.separator&&J&&(j.separator.destroy(),delete j.separator):(O+=M*d,j.separator=this.renderSeparator(O,d),b&&G(j.separator,O,d),O+=A(j.separator,d)),o[E.level].updated=!0):(X=this.renderButton(E,O,d),b&&G(X,O,d),O+=A(X,d),J||(te=this.renderSeparator(O,d),b&&G(te,O,d),O+=A(te,d)),o[E.level]={button:X,separator:te,updated:!0}),X&&X.setState(J?2:0)}}}return D.defaultOptions=u.options,D}),I(g,"Series/ColorMapComposition.js",[g["Core/Series/SeriesRegistry.js"],g["Core/Renderer/SVG/SVGElement.js"],g["Core/Utilities.js"]],function(u,v,S){var L;let{column:{prototype:P}}=u.seriesTypes,{addEvent:B,defined:R}=S;return function(C){function _(m){let h=this.series,f=h.chart.renderer;this.moveToTopOnHover&&this.graphic&&(h.stateMarkerGraphic||(h.stateMarkerGraphic=new v(f,"use").css({pointerEvents:"none"}).add(this.graphic.parentGroup)),(m==null?void 0:m.state)==="hover"?(this.graphic.attr({id:this.id}),h.stateMarkerGraphic.attr({href:`${f.url}#${this.id}`,visibility:"visible"})):h.stateMarkerGraphic.attr({href:""}))}C.pointMembers={dataLabelOnNull:!0,moveToTopOnHover:!0,isValid:function(){return this.value!==null&&this.value!==1/0&&this.value!==-1/0&&(this.value===void 0||!isNaN(this.value))}},C.seriesMembers={colorKey:"value",axisTypes:["xAxis","yAxis","colorAxis"],parallelArrays:["x","y","value"],pointArrayMap:["value"],trackerGroups:["group","markerGroup","dataLabelsGroup"],colorAttribs:function(m){let h={};return R(m.color)&&(!m.state||m.state==="normal")&&(h[this.colorProp||"fill"]=m.color),h},pointAttribs:P.pointAttribs},C.compose=function(m){return B(m.prototype.pointClass,"afterSetState",_),m}}(L||(L={})),L}),I(g,"Series/Treemap/TreemapAlgorithmGroup.js",[],function(){return class{constructor(u,v,S,L){this.height=u,this.width=v,this.plot=L,this.direction=S,this.startDirection=S,this.total=0,this.nW=0,this.lW=0,this.nH=0,this.lH=0,this.elArr=[],this.lP={total:0,lH:0,nH:0,lW:0,nW:0,nR:0,lR:0,aspectRatio:function(P,B){return Math.max(P/B,B/P)}}}addElement(u){this.lP.total=this.elArr[this.elArr.length-1],this.total=this.total+u,this.direction===0?(this.lW=this.nW,this.lP.lH=this.lP.total/this.lW,this.lP.lR=this.lP.aspectRatio(this.lW,this.lP.lH),this.nW=this.total/this.height,this.lP.nH=this.lP.total/this.nW,this.lP.nR=this.lP.aspectRatio(this.nW,this.lP.nH)):(this.lH=this.nH,this.lP.lW=this.lP.total/this.lH,this.lP.lR=this.lP.aspectRatio(this.lP.lW,this.lH),this.nH=this.total/this.width,this.lP.nW=this.lP.total/this.nH,this.lP.nR=this.lP.aspectRatio(this.lP.nW,this.nH)),this.elArr.push(u)}reset(){this.nW=0,this.lW=0,this.elArr=[],this.total=0}}}),I(g,"Series/Treemap/TreemapNode.js",[],function(){return class{constructor(){this.childrenTotal=0,this.visible=!1}init(u,v,S,L,P,B,R){return this.id=u,this.i=v,this.children=S,this.height=L,this.level=P,this.series=B,this.parent=R,this}}}),I(g,"Series/DrawPointUtilities.js",[],function(){return{draw:function(u,v){let{animatableAttribs:S,onComplete:L,css:P,renderer:B}=v,R=u.series&&u.series.chart.hasRendered?void 0:u.series&&u.series.options.animation,C=u.graphic;if(v.attribs={...v.attribs,class:u.getClassName()},u.shouldDraw())C||(C=v.shapeType==="text"?B.text():v.shapeType==="image"?B.image(v.imageUrl||"").attr(v.shapeArgs||{}):B[v.shapeType](v.shapeArgs||{}),u.graphic=C,C.add(v.group)),P&&C.css(P),C.attr(v.attribs).animate(S,!v.isNew&&R,L);else if(C){let _=()=>{u.graphic=C=C&&C.destroy(),typeof L=="function"&&L()};Object.keys(S).length?C.animate(S,void 0,()=>_()):_()}}}}),I(g,"Series/Treemap/TreemapPoint.js",[g["Series/DrawPointUtilities.js"],g["Core/Series/SeriesRegistry.js"],g["Core/Utilities.js"]],function(u,v,S){let{pie:{prototype:{pointClass:L}},scatter:{prototype:{pointClass:P}}}=v.seriesTypes,{extend:B,isNumber:R,pick:C}=S;class _ extends P{constructor(){super(...arguments),this.shapeType="rect"}draw(h){u.draw(this,h)}getClassName(){let h=this.series,f=h.options,T=super.getClassName();return this.node.level<=h.nodeMap[h.rootNode].level&&this.node.children.length?T+=" highcharts-above-level":this.node.isLeaf||C(f.interactByLeaf,!f.allowTraversingTree)?this.node.isLeaf||(T+=" highcharts-internal-node"):T+=" highcharts-internal-node-interactive",T}isValid(){return!!(this.id||R(this.value))}setState(h){super.setState.apply(this,arguments),this.graphic&&this.graphic.attr({zIndex:h==="hover"?1:0})}shouldDraw(){return R(this.plotY)&&this.y!==null}}return B(_.prototype,{setVisible:L.prototype.setVisible}),_}),I(g,"Series/Treemap/TreemapSeriesDefaults.js",[g["Core/Series/SeriesRegistry.js"],g["Core/Utilities.js"]],function(u,v){let{isString:S}=v;return{allowTraversingTree:!1,animationLimit:250,borderRadius:0,showInLegend:!1,marker:void 0,colorByPoint:!1,dataLabels:{defer:!1,enabled:!0,formatter:function(){let L=this&&this.point?this.point:{};return S(L.name)?L.name:""},inside:!0,verticalAlign:"middle"},tooltip:{headerFormat:"",pointFormat:"<b>{point.name}</b>: {point.value}<br/>"},ignoreHiddenPoint:!0,layoutAlgorithm:"sliceAndDice",layoutStartingDirection:"vertical",alternateStartingDirection:!1,levelIsConstant:!0,traverseUpButton:{position:{align:"right",x:-10,y:10}},borderColor:"#e6e6e6",borderWidth:1,colorKey:"colorValue",opacity:.15,states:{hover:{borderColor:"#999999",brightness:u.seriesTypes.heatmap?0:.1,halo:!1,opacity:.75,shadow:!1}},legendSymbol:"rectangle",traverseToLeaf:!1}}),I(g,"Series/Treemap/TreemapUtilities.js",[],function(){var u;return(u||(u={})).recursive=function v(S,L,P){let B=L.call(P||this,S);B!==!1&&v(B,L,P)},u}),I(g,"Series/TreeUtilities.js",[g["Core/Color/Color.js"],g["Core/Utilities.js"]],function(u,v){let{extend:S,isArray:L,isNumber:P,isObject:B,merge:R,pick:C,relativeLength:_}=v;return{getColor:function(m,h){let f,T,N,k,W,U,$=h.index,K=h.mapOptionsToLevel,H=h.parentColor,D=h.parentColorIndex,w=h.series,o=h.colors,d=h.siblings,y=w.points,b=w.chart.options.chart;return m&&(f=y[m.i],T=K[m.level]||{},f&&T.colorByPoint&&(k=f.index%(o?o.length:b.colorCount),N=o&&o[k]),w.chart.styledMode||(W=C(f&&f.options.color,T&&T.color,N,H&&(M=>{let A=T&&T.colorVariation;return A&&A.key==="brightness"&&$&&d?u.parse(M).brighten(A.to*($/d)).get():M})(H),w.color)),U=C(f&&f.options.colorIndex,T&&T.colorIndex,k,D,h.colorIndex)),{color:W,colorIndex:U}},getLevelOptions:function(m){let h,f,T,N,k,W,U={};if(B(m))for(N=P(m.from)?m.from:1,W=m.levels,f={},h=B(m.defaults)?m.defaults:{},L(W)&&(f=W.reduce(($,K)=>{let H,D,w;return B(K)&&P(K.level)&&(D=C((w=R({},K)).levelIsConstant,h.levelIsConstant),delete w.levelIsConstant,delete w.level,B($[H=K.level+(D?0:N-1)])?R(!0,$[H],w):$[H]=w),$},{})),k=P(m.to)?m.to:1,T=0;T<=k;T++)U[T]=R({},h,B(f[T])?f[T]:{});return U},getNodeWidth:function(m,h){let{chart:f,options:T}=m,{nodeDistance:N=0,nodeWidth:k=0}=T,{plotSizeX:W=1}=f;if(k==="auto"){if(typeof N=="string"&&/%$/.test(N))return W/(h+parseFloat(N)/100*(h-1));let U=Number(N);return(W+U)/(h||1)-U}return _(k,W)},setTreeValues:function m(h,f){let T=f.before,N=f.idRoot,k=f.mapIdToNode[N],W=f.levelIsConstant!==!1,U=f.points[h.i],$=U&&U.options||{},K=[],H=0;h.levelDynamic=h.level-(W?0:k.level),h.name=C(U&&U.name,""),h.visible=N===h.id||f.visible===!0,typeof T=="function"&&(h=T(h,f)),h.children.forEach((w,o)=>{let d=S({},f);S(d,{index:o,siblings:h.children.length,visible:h.visible}),w=m(w,d),K.push(w),w.visible&&(H+=w.val)});let D=C($.value,H);return h.visible=D>=0&&(H>0||h.visible),h.children=K,h.childrenTotal=H,h.isLeaf=h.visible&&!H,h.val=D,h},updateRootId:function(m){let h,f;return B(m)&&(f=B(m.options)?m.options:{},h=C(m.rootNode,f.rootId,""),B(m.userOptions)&&(m.userOptions.rootId=h),m.rootNode=h),h}}}),I(g,"Series/Treemap/TreemapSeries.js",[g["Extensions/Breadcrumbs/Breadcrumbs.js"],g["Core/Color/Color.js"],g["Series/ColorMapComposition.js"],g["Core/Globals.js"],g["Core/Series/SeriesRegistry.js"],g["Series/Treemap/TreemapAlgorithmGroup.js"],g["Series/Treemap/TreemapNode.js"],g["Series/Treemap/TreemapPoint.js"],g["Series/Treemap/TreemapSeriesDefaults.js"],g["Series/Treemap/TreemapUtilities.js"],g["Series/TreeUtilities.js"],g["Core/Utilities.js"]],function(u,v,S,L,P,B,R,C,_,m,h,f){let{parse:T}=v,{composed:N,noop:k}=L,{column:W,scatter:U}=P.seriesTypes,{getColor:$,getLevelOptions:K,updateRootId:H}=h,{addEvent:D,correctFloat:w,crisp:o,defined:d,error:y,extend:b,fireEvent:M,isArray:A,isObject:G,isString:O,merge:j,pick:E,pushUnique:F,stableSort:Q}=f,X=!1;function te(){let oe,e=this.xAxis,t=this.yAxis;e&&t&&(this.is("treemap")?(oe={endOnTick:!1,gridLineWidth:0,lineWidth:0,min:0,minPadding:0,max:100,maxPadding:0,startOnTick:!1,title:void 0,tickPositions:[]},b(t.options,oe),b(e.options,oe),X=!0):X&&(t.setOptions(t.userOptions),e.setOptions(e.userOptions),X=!1))}class J extends U{static compose(e){F(N,"TreemapSeries")&&D(e,"afterBindAxes",te)}algorithmCalcPoints(e,t,i,s){let l=i.plot,a=i.elArr.length-1,r,p,c,n,x=i.lW,Y=i.lH,z,V=0;for(let q of(t?(x=i.nW,Y=i.nH):z=i.elArr[a],i.elArr))(t||V<a)&&(i.direction===0?(r=l.x,p=l.y,n=q/(c=x)):(r=l.x,p=l.y,c=q/(n=Y)),s.push({x:r,y:p,width:c,height:w(n)}),i.direction===0?l.y=l.y+n:l.x=l.x+c),V+=1;i.reset(),i.direction===0?i.width=i.width-x:i.height=i.height-Y,l.y=l.parent.y+(l.parent.height-i.height),l.x=l.parent.x+(l.parent.width-i.width),e&&(i.direction=1-i.direction),t||i.addElement(z)}algorithmFill(e,t,i){let s=[],l,a=t.direction,r=t.x,p=t.y,c=t.width,n=t.height,x,Y,z,V;for(let q of i)l=t.width*t.height*(q.val/t.val),x=r,Y=p,a===0?(c-=z=l/(V=n),r+=z):(n-=V=l/(z=c),p+=V),s.push({x,y:Y,width:z,height:V}),e&&(a=1-a);return s}algorithmLowAspectRatio(e,t,i){let s=[],l={x:t.x,y:t.y,parent:t},a=t.direction,r=i.length-1,p=new B(t.height,t.width,a,l),c,n=0;for(let x of i)c=t.width*t.height*(x.val/t.val),p.addElement(c),p.lP.nR>p.lP.lR&&this.algorithmCalcPoints(e,!1,p,s,l),n===r&&this.algorithmCalcPoints(e,!0,p,s,l),++n;return s}alignDataLabel(e,t,i){let s=i.style;s&&!d(s.textOverflow)&&t.text&&t.getBBox().width>(t.text.textWidth||0)&&t.css({textOverflow:"ellipsis",width:s.width+="px"}),W.prototype.alignDataLabel.apply(this,arguments),e.dataLabel&&e.dataLabel.attr({zIndex:(e.node.zIndex||0)+1})}calculateChildrenAreas(e,t){let i=this.options,s=this.mapOptionsToLevel[e.level+1],l=E(this[s&&s.layoutAlgorithm]&&s.layoutAlgorithm,i.layoutAlgorithm),a=i.alternateStartingDirection,r=e.children.filter(n=>!n.ignore),p=[];s&&s.layoutStartingDirection&&(t.direction=s.layoutStartingDirection==="vertical"?0:1),p=this[l](t,r);let c=-1;for(let n of r){let x=p[++c];n.values=j(x,{val:n.childrenTotal,direction:a?1-t.direction:t.direction}),n.pointValues=j(x,{x:x.x/this.axisRatio,y:100-x.y-x.height,width:x.width/this.axisRatio}),n.children.length&&this.calculateChildrenAreas(n,n.values)}}createList(e){let t=this.chart,i=t.breadcrumbs,s=[];if(i){let l=0;s.push({level:l,levelOptions:t.series[0]});let a=e.target.nodeMap[e.newRootId],r=[];for(;a.parent||a.parent==="";)r.push(a),a=e.target.nodeMap[a.parent];for(let p of r.reverse())s.push({level:++l,levelOptions:p});s.length<=1&&(s.length=0)}return s}drawDataLabels(){let e,t,i=this.mapOptionsToLevel;for(let s of this.points.filter(function(l){return l.node.visible}))t=i[s.node.level],e={style:{}},s.node.isLeaf||(e.enabled=!1),t&&t.dataLabels&&(e=j(e,t.dataLabels),this.hasDataLabels=()=>!0),s.shapeArgs&&(e.style.width=s.shapeArgs.width,s.dataLabel&&s.dataLabel.css({width:s.shapeArgs.width+"px"})),s.dlOptions=j(e,s.options.dataLabels);super.drawDataLabels()}drawPoints(e=this.points){let t=this.chart,i=t.renderer,s=t.styledMode,l=this.options,a=s?{}:l.shadow,r=l.borderRadius,p=t.pointCount<l.animationLimit,c=l.allowTraversingTree;for(let n of e){let x=n.node.levelDynamic,Y={},z={},V={},q="level-group-"+n.node.level,ie=!!n.graphic,le=p&&ie,re=n.shapeArgs;n.shouldDraw()&&(n.isInside=!0,r&&(z.r=r),j(!0,le?Y:z,ie?re:{},s?{}:this.pointAttribs(n,n.selected?"select":void 0)),this.colorAttribs&&s&&b(V,this.colorAttribs(n)),this[q]||(this[q]=i.g(q).attr({zIndex:1e3-(x||0)}).add(this.group),this[q].survive=!0)),n.draw({animatableAttribs:Y,attribs:z,css:V,group:this[q],imageUrl:n.imageUrl,renderer:i,shadow:a,shapeArgs:re,shapeType:n.shapeType}),c&&n.graphic&&(n.drillId=l.interactByLeaf?this.drillToByLeaf(n):this.drillToByGroup(n))}}drillToByGroup(e){let t=!1;return e.node.isLeaf||e.node.level-this.nodeMap[this.rootNode].level!=1||(t=e.id),t}drillToByLeaf(e){let{traverseToLeaf:t}=e.series.options,i=!1,s;if(e.node.parent!==this.rootNode&&e.node.isLeaf)if(t)i=e.id;else for(s=e.node;!i;)s.parent!==void 0&&(s=this.nodeMap[s.parent]),s.parent===this.rootNode&&(i=s.id);return i}drillToNode(e,t){y(32,!1,void 0,{"treemap.drillToNode":"use treemap.setRootNode"}),this.setRootNode(e,t)}drillUp(){let e=this.nodeMap[this.rootNode];e&&O(e.parent)&&this.setRootNode(e.parent,!0,{trigger:"traverseUpButton"})}getExtremes(){let{dataMin:e,dataMax:t}=super.getExtremes(this.colorValueData);return this.valueMin=e,this.valueMax=t,super.getExtremes()}getListOfParents(e,t){let i=A(e)?e:[],s=A(t)?t:[],l=i.reduce(function(a,r,p){let c=E(r.parent,"");return a[c]===void 0&&(a[c]=[]),a[c].push(p),a},{"":[]});for(let a of Object.keys(l)){let r=l[a];if(a!==""&&s.indexOf(a)===-1){for(let p of r)l[""].push(p);delete l[a]}}return l}getTree(){let e=this.data.map(function(i){return i.id}),t=this.getListOfParents(this.data,e);return this.nodeMap={},this.nodeList=[],this.buildTree("",-1,0,t)}buildTree(e,t,i,s,l){let a=[],r=this.points[t],p=0,c;for(let x of s[e]||[])p=Math.max((c=this.buildTree(this.points[x].id,x,i+1,s,e)).height+1,p),a.push(c);let n=new this.NodeClass().init(e,t,a,p,i,this,l);for(let x of a)x.parentNode=n;return this.nodeMap[n.id]=n,this.nodeList.push(n),r&&(r.node=n,n.point=r),n}hasData(){return!!this.processedXData.length}init(e,t){let i=this,s=j(t.drillUpButton,t.breadcrumbs),l=D(i,"setOptions",a=>{let r=a.userOptions;d(r.allowDrillToNode)&&!d(r.allowTraversingTree)&&(r.allowTraversingTree=r.allowDrillToNode,delete r.allowDrillToNode),d(r.drillUpButton)&&!d(r.traverseUpButton)&&(r.traverseUpButton=r.drillUpButton,delete r.drillUpButton)});super.init(e,t),delete i.opacity,i.eventsToUnbind.push(l),i.options.allowTraversingTree&&(i.eventsToUnbind.push(D(i,"click",i.onClickDrillToNode)),i.eventsToUnbind.push(D(i,"setRootNode",function(a){let r=i.chart;r.breadcrumbs&&r.breadcrumbs.updateProperties(i.createList(a))})),i.eventsToUnbind.push(D(i,"update",function(a,r){let p=this.chart.breadcrumbs;p&&a.options.breadcrumbs&&p.update(a.options.breadcrumbs)})),i.eventsToUnbind.push(D(i,"destroy",function(a){let r=this.chart;r.breadcrumbs&&!a.keepEventsForUpdate&&(r.breadcrumbs.destroy(),r.breadcrumbs=void 0)}))),e.breadcrumbs||(e.breadcrumbs=new u(e,s)),i.eventsToUnbind.push(D(e.breadcrumbs,"up",function(a){let r=this.level-a.newLevel;for(let p=0;p<r;p++)i.drillUp()}))}onClickDrillToNode(e){let t=e.point,i=t&&t.drillId;O(i)&&(t.setState(""),this.setRootNode(i,!0,{trigger:"click"}))}pointAttribs(e,t){let i,s=G(this.mapOptionsToLevel)?this.mapOptionsToLevel:{},l=e&&s[e.node.level]||{},a=this.options,r=t&&a.states&&a.states[t]||{},p=e&&e.getClassName()||"",c={stroke:e&&e.borderColor||l.borderColor||r.borderColor||a.borderColor,"stroke-width":E(e&&e.borderWidth,l.borderWidth,r.borderWidth,a.borderWidth),dashstyle:e&&e.borderDashStyle||l.borderDashStyle||r.borderDashStyle||a.borderDashStyle,fill:e&&e.color||this.color};return p.indexOf("highcharts-above-level")!==-1?(c.fill="none",c["stroke-width"]=0):p.indexOf("highcharts-internal-node-interactive")!==-1?(i=E(r.opacity,a.opacity),c.fill=T(c.fill).setOpacity(i).get(),c.cursor="pointer"):p.indexOf("highcharts-internal-node")!==-1?c.fill="none":t&&(c.fill=T(c.fill).brighten(r.brightness).get()),c}setColorRecursive(e,t,i,s,l){let a=this&&this.chart,r=a&&a.options&&a.options.colors;if(e){let p=$(e,{colors:r,index:s,mapOptionsToLevel:this.mapOptionsToLevel,parentColor:t,parentColorIndex:i,series:this,siblings:l}),c=this.points[e.i];c&&(c.color=p.color,c.colorIndex=p.colorIndex);let n=-1;for(let x of e.children||[])this.setColorRecursive(x,p.color,p.colorIndex,++n,e.children.length)}}setPointValues(){let e=this,{points:t,xAxis:i,yAxis:s}=e,l=e.chart.styledMode,a=r=>l?0:e.pointAttribs(r)["stroke-width"]||0;for(let r of t){let{pointValues:p,visible:c}=r.node;if(p&&c){let{height:n,width:x,x:Y,y:z}=p,V=a(r),q=o(i.toPixels(Y,!0),V,!0),ie=o(i.toPixels(Y+x,!0),V,!0),le=o(s.toPixels(z,!0),V,!0),re=o(s.toPixels(z+n,!0),V,!0),se={x:Math.min(q,ie),y:Math.min(le,re),width:Math.abs(ie-q),height:Math.abs(re-le)};r.plotX=se.x+se.width/2,r.plotY=se.y+se.height/2,r.shapeArgs=se}else delete r.plotX,delete r.plotY}}setRootNode(e,t,i){M(this,"setRootNode",b({newRootId:e,previousRootId:this.rootNode,redraw:E(t,!0),series:this},i),function(s){let l=s.series;l.idPreviousRoot=s.previousRootId,l.rootNode=s.newRootId,l.isDirty=!0,s.redraw&&l.chart.redraw()})}setState(e){this.options.inactiveOtherPoints=!0,super.setState(e,!1),this.options.inactiveOtherPoints=!1}setTreeValues(e){let t=this.options,i=this.rootNode,s=this.nodeMap[i],l=typeof t.levelIsConstant!="boolean"||t.levelIsConstant,a=[],r=this.points[e.i],p=0;for(let n of e.children)n=this.setTreeValues(n),a.push(n),n.ignore||(p+=n.val);Q(a,(n,x)=>(n.sortIndex||0)-(x.sortIndex||0));let c=E(r&&r.options.value,p);return r&&(r.value=c),b(e,{children:a,childrenTotal:p,ignore:!(E(r&&r.visible,!0)&&c>0),isLeaf:e.visible&&!p,levelDynamic:e.level-(l?0:s.level),name:E(r&&r.name,""),sortIndex:E(r&&r.sortIndex,-c),val:c}),e}sliceAndDice(e,t){return this.algorithmFill(!0,e,t)}squarified(e,t){return this.algorithmLowAspectRatio(!0,e,t)}strip(e,t){return this.algorithmLowAspectRatio(!1,e,t)}stripes(e,t){return this.algorithmFill(!1,e,t)}translate(){let e=this,t=e.options,i=H(e),s,l,a,r;super.translate();let p=e.tree=e.getTree();s=e.nodeMap[i],i===""||s||(e.setRootNode("",!1),i=e.rootNode,s=e.nodeMap[i]),e.mapOptionsToLevel=K({from:s.level+1,levels:t.levels,to:p.height,defaults:{levelIsConstant:e.options.levelIsConstant,colorByPoint:t.colorByPoint}}),m.recursive(e.nodeMap[e.rootNode],c=>{let n=c.parent,x=!1;return c.visible=!0,(n||n==="")&&(x=e.nodeMap[n]),x}),m.recursive(e.nodeMap[e.rootNode].children,c=>{let n=!1;for(let x of c)x.visible=!0,x.children.length&&(n=(n||[]).concat(x.children));return n}),e.setTreeValues(p),e.axisRatio=e.xAxis.len/e.yAxis.len,e.nodeMap[""].pointValues=l={x:0,y:0,width:100,height:100},e.nodeMap[""].values=a=j(l,{width:l.width*e.axisRatio,direction:t.layoutStartingDirection==="vertical"?0:1,val:p.val}),e.calculateChildrenAreas(p,a),e.colorAxis||t.colorByPoint||e.setColorRecursive(e.tree),t.allowTraversingTree&&(r=s.pointValues,e.xAxis.setExtremes(r.x,r.x+r.width,!1),e.yAxis.setExtremes(r.y,r.y+r.height,!1),e.xAxis.setScale(),e.yAxis.setScale()),e.setPointValues()}}return J.defaultOptions=j(U.defaultOptions,_),b(J.prototype,{buildKDTree:k,colorAttribs:S.seriesMembers.colorAttribs,colorKey:"colorValue",directTouch:!0,getExtremesFromAll:!0,getSymbol:k,optionalAxis:"colorAxis",parallelArrays:["x","y","value","colorValue"],pointArrayMap:["value"],pointClass:C,NodeClass:R,trackerGroups:["group","dataLabelsGroup"],utils:m}),S.compose(J),P.registerSeriesType("treemap",J),J}),I(g,"masters/modules/treemap.src.js",[g["Core/Globals.js"],g["Extensions/Breadcrumbs/Breadcrumbs.js"],g["Series/Treemap/TreemapSeries.js"]],function(u,v,S){return u.Breadcrumbs=u.Breadcrumbs||v,u.Breadcrumbs.compose(u.Chart,u.defaultOptions),S.compose(u.Series),u})})})(ne);var ae=ne.exports;const pe=he(ae),ce=de({__proto__:null,default:pe},[ae]);export{ce as t};
