!/**
 * Highcharts Gantt JS v13.0.0 (2026-06-11)
 * @module highcharts/modules/treegrid
 * @requires highcharts
 *
 * Tree Grid
 *
 * (c) 2016-2026 Highsoft AS
 * Author: Jon Arild Nygård
 *
 * A commercial license may be required depending on use,
 * see www.highcharts.com/license
 */function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(t._Highcharts,t._Highcharts.StackItem,t._Highcharts.Axis,t._Highcharts.Color):"function"==typeof define&&define.amd?define("highcharts/modules/treegrid",["highcharts/highcharts"],function(t){return e(t,t.StackItem,t.Axis,t.Color)}):"object"==typeof exports?exports["highcharts/modules/treegrid"]=e(t._Highcharts,t._Highcharts.StackItem,t._Highcharts.Axis,t._Highcharts.Color):t.Highcharts=e(t.Highcharts,t.Highcharts.StackItem,t.Highcharts.Axis,t.Highcharts.Color)}("u"<typeof window?this:window,function(t,e,i,r){return function(){"use strict";var s,n,o,a,l={184:function(t){t.exports=e},532:function(t){t.exports=i},620:function(t){t.exports=r},944:function(e){e.exports=t}},d={};function h(t){var e=d[t];if(void 0!==e)return e.exports;var i=d[t]={exports:{}};return l[t](i,i.exports,h),i.exports}h.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return h.d(e,{a:e}),e},h.d=function(t,e){for(var i in e)h.o(e,i)&&!h.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},h.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var c={};h.d(c,{default:function(){return ts}});var u=h(944),f=h.n(u),p=h(184),v=h.n(p);!function(t){function e(){void 0!==this.brokenAxis&&this.brokenAxis.setBreaks(this.options.breaks,!1)}function i(){var t;Object.keys((null==(t=this.options.breaks)?void 0:t[0])||{}).length&&(this.options.ordinal=!1)}function r(){var t=this.brokenAxis;if(null==t?void 0:t.hasBreaks){for(var e=this.tickPositions,i=this.tickPositions.info,r=[],s=0;s<e.length;s++)t.isInAnyBreak(e[s])||r.push(e[s]);this.tickPositions=r,this.tickPositions.info=i}}function s(){this.brokenAxis||(this.brokenAxis=new d(this))}function n(){var t,e,i=this.isDirty,r=this.options.connectNulls,s=this.points,n=this.xAxis,o=this.yAxis;if(i)for(var a=s.length;a--;){var l=s[a],d=(null!==l.y||!1!==r)&&((null==(t=null==n?void 0:n.brokenAxis)?void 0:t.isInAnyBreak(l.x,!0))||(null==(e=null==o?void 0:o.brokenAxis)?void 0:e.isInAnyBreak(l.y,!0)));l.visible=!d&&!1!==l.options.visible}}function o(){this.drawBreaks(this.xAxis,["x"]),this.drawBreaks(this.yAxis,(0,u.pick)(this.pointArrayMap,["y"]))}function a(t,e){var i,r,s,n,o=this,a=o.points;if(null==(i=null==t?void 0:t.brokenAxis)?void 0:i.hasBreaks){var l=t.brokenAxis;e.forEach(function(e){r=(null==l?void 0:l.breakArray)||[],s=t.isXAxis?t.min:(0,u.pick)(o.options.threshold,t.min),a.forEach(function(i){var o;n=null!=(o=i["stack"+e.toUpperCase()])?o:i[e],r.forEach(function(e){if((0,u.isNumber)(s)&&(0,u.isNumber)(n)){var r="";s<e.from&&n>e.to||s>e.from&&n<e.from?r="pointBreak":(s<e.from&&n>e.from&&n<e.to||s>e.from&&n>e.to&&n<e.from)&&(r="pointInBreak"),r&&(0,u.fireEvent)(t,r,{point:i,brk:e})}})})})}}function l(){var t,e=this.currentDataGrouping,i=null==e?void 0:e.gapSize,r=this.points.slice(),s=this.yAxis,n=this.options.gapSize,o=r.length-1;if(n&&o>0){"value"!==this.options.gapUnit&&(n*=this.basePointRange),i&&i>n&&i>=this.basePointRange&&(n=i);for(var a=void 0,l=void 0;o--;)if(l&&!1!==l.visible||(l=r[o+1]),a=r[o],!1!==l.visible&&!1!==a.visible){if(l.x-a.x>n){var d=(a.x+l.x)/2;r.splice(o+1,0,{isNull:!0,x:d}),s.stacking&&this.options.stacking&&((s.stacking.stacks[this.stackKey][d]=new(v())(s,s.options.stackLabels,!1,d,null!=(t=this.stack)?t:"")).total=0)}l=a}}return this.getGraphPath(r)}t.compose=function(t,d){if(!t.keepProps.includes("brokenAxis")){t.keepProps.push("brokenAxis"),(0,u.addEvent)(t,"init",s),(0,u.addEvent)(t,"afterInit",e),(0,u.addEvent)(t,"afterSetTickPositions",r),(0,u.addEvent)(t,"afterSetOptions",i);var h=d.prototype;h.drawBreaks=a,h.gappedPath=l,(0,u.addEvent)(d,"afterGeneratePoints",n),(0,u.addEvent)(d,"afterRender",o)}return t};var d=function(){function t(t){this.axis=t}return t.isInBreak=function(t,e){var i=t.repeat||1/0,r=t.from,s=t.to-t.from,n=e>=r?(e-r)%i:i-(r-e)%i;return t.inclusive?n<=s:n<s&&0!==n},t.lin2Val=function(e){var i=this.min||0,r=this.brokenAxis,s=null==r?void 0:r.breakArray;if(!(null==s?void 0:s.length)||!(0,u.isNumber)(e))return e;var n=e;if(e>i)for(var o=0;o<s.length;o++){var a=s[o];if(a.from>n)break;a.to<=n&&a.to>i?n+=a.len:t.isInBreak(a,n)&&(n+=a.len)}else if(e<i)for(var l=0;l<s.length;l++){var a=s[l];if(a.from>i)break;a.from>=n&&a.from<i?n-=a.len:t.isInBreak(a,n)&&(n-=a.len)}return n},t.val2Lin=function(e){var i=this.min||0,r=this.brokenAxis,s=null==r?void 0:r.breakArray;if(!(null==s?void 0:s.length)||!(0,u.isNumber)(e))return e;var n=e;if(e>i)for(var o=0;o<s.length;o++){var a=s[o];if(a.to<=e&&a.to>i)n-=a.len;else if(a.from>e)break;else if(t.isInBreak(a,e)){n-=e-a.from;break}}else if(e<i)for(var l=0;l<s.length;l++){var a=s[l];if(a.from>=e&&a.from<i)n+=a.len;else if(a.from>i)break;else if(t.isInBreak(a,e)){n+=a.to-e;break}}return n},t.prototype.findBreakAt=function(t,e){return(0,u.find)(e,function(e){return e.from<t&&t<e.to})},t.prototype.isInAnyBreak=function(e,i){var r,s,n,o=this.axis,a=o.options.breaks||[],l=a.length;if(l&&(0,u.isNumber)(e)){for(;l--;)t.isInBreak(a[l],e)&&(r=!0,s||(s=(0,u.pick)(a[l].showPoints,!o.isXAxis)));n=r&&i?r&&!s:r}return n},t.prototype.setBreaks=function(e,i){var r,s=this,n=s.axis,o=n.chart.time,a=(0,u.isArray)(e)&&!!Object.keys((null==e?void 0:e[0])||{}).length;n.isDirty=(null!=(r=s.hasBreaks)&&r)!==a,s.hasBreaks=a,null==e||e.forEach(function(t){t.from=o.parse(t.from)||0,t.to=o.parse(t.to)||0}),e!==n.options.breaks&&(n.options.breaks=n.userOptions.breaks=e),n.forceRedraw=!0,n.series.forEach(function(t){t.isDirty=!0}),a||n.val2lin!==t.val2Lin||(delete n.val2lin,delete n.lin2val),a&&(n.userOptions.ordinal=!1,n.lin2val=t.lin2Val,n.val2lin=t.val2Lin,n.setExtremes=function(t,e,i,r,o){var a;if(s.hasBreaks&&!(null==(a=n.treeGrid)?void 0:a.tree)){for(var l=this.brokenAxis.breakArray||[],d=void 0;d=s.findBreakAt(t,l);)t=d.to;for(;d=s.findBreakAt(e,l);)e=d.from;e<t&&(e=t)}n.constructor.prototype.setExtremes.call(this,t,e,i,r,o)},n.setAxisTranslation=function(){if(n.constructor.prototype.setAxisTranslation.call(this),s.unitLength=void 0,s.hasBreaks){var e,i,r,o,a,l,d,h,c,f,p,v,m=n.options.breaks||[],g=[],k=[],x=null!=(e=n.pointRangePadding)?e:0,b=0,y=null!=(i=n.userMin)?i:n.min,P=null!=(r=n.userMax)?r:n.max,O=(0,u.isNumber)(y)?Math.min(null!=(o=n.dataMin)?o:y,y):null!=(a=n.dataMin)?a:y,E=(0,u.isNumber)(P)?Math.max(null!=(l=n.dataMax)?l:P,P):null!=(d=n.dataMax)?d:P;(null==(h=n.treeGrid)?void 0:h.tree)||m.forEach(function(e){f=e.repeat||1/0,(0,u.isNumber)(y)&&(0,u.isNumber)(P)&&(t.isInBreak(e,y)&&(y+=e.to%f-y%f),t.isInBreak(e,P)&&(P-=P%f-e.from%f))}),(0,u.isNumber)(O)&&(0,u.isNumber)(E)&&m.forEach(function(t){for(p=t.from,f=t.repeat||1/0;p-f>O;)p-=f;for(;p<O;)p+=f;for(v=p;v<E;v+=f)g.push({value:v,move:"in"}),g.push({value:v+t.to-t.from,move:"out",size:t.breakSize})}),g.sort(function(t,e){return t.value===e.value?("in"!==t.move)-("in"!==e.move):t.value-e.value}),c=0,p=O,g.forEach(function(t){1===(c+="in"===t.move?1:-1)&&"in"===t.move&&(p=t.value),0===c&&(0,u.isNumber)(p)&&(k.push({from:p,to:t.value,len:t.value-p-(t.size||0)}),(0,u.isNumber)(y)&&(0,u.isNumber)(P)&&p<P&&t.value>y&&(b+=t.value-p-(t.size||0)))}),s.breakArray=k,(0,u.isNumber)(y)&&(0,u.isNumber)(P)&&(0,u.isNumber)(n.min)&&(s.unitLength=P-y-b+x,(0,u.fireEvent)(n,"afterBreaks"),n.staticScale?n.transA=n.staticScale:s.unitLength&&(n.transA*=(P-n.min+x)/s.unitLength),x&&(n.minPixelPadding=n.transA*(n.minPointOffset||0)),n.min=y,n.max=P)}}),(0,u.pick)(i,!0)&&n.chart.redraw()},t}();t.Additions=d}(n||(n={}));var m=n,g=h(532),k=h.n(g),x=f().dateFormats;function b(t){return(0,u.isObject)(t,!0)}function y(t,e){var i={width:0,height:0};if(e.forEach(function(e){var r,s=t[e],n=0,o=0;b(s)&&(n=(r=b(s.label)?s.label:{}).getBBox?r.getBBox().height:0,r.textStr&&!(0,u.isNumber)(r.textPxLength)&&(r.textPxLength=r.getBBox().width),o=(0,u.isNumber)(r.textPxLength)?Math.round(r.textPxLength):0,r.textStr&&(o=Math.round(r.getBBox().width)),i.height=Math.max(n,i.height),i.width=Math.max(o,i.width))}),"treegrid"===this.type&&this.treeGrid&&this.treeGrid.mapOfPosToGridNode){var r=this.treeGrid.mapOfPosToGridNode[-1].height||0;i.width+=this.options.labels.indentation*(r-1)}return i}function P(t){var e=this.grid,i=3===this.side;if(i||t.apply(this),!(null==e?void 0:e.isColumn)){var r=(null==e?void 0:e.columns)||[];i&&(r=r.slice().reverse()),r.forEach(function(t){t.getOffset()})}i&&t.apply(this)}function O(t){var e;if(!0===(this.options.grid||{}).enabled){var i=this.axisTitle,r=this.height,s=this.horiz,n=this.left,a=this.offset,l=this.opposite,d=this.options,h=this.top,c=this.width,u=this.tickSize(),f=null==i?void 0:i.getBBox().width,p=d.title,v=p.x,m=p.y,g=null!=(e=p.margin)?e:s?5:10,k=i?this.chart.renderer.fontMetrics(i).f:0,x=(s?h+r:n)+(s?1:-1)*(l?-1:1)*(u?u[0]/2:0)+(this.side===o.bottom?k:0);if(t.titlePosition.x=s?n-(f||0)/2-g+v:x+(l?c:0)+a+v,t.titlePosition.y=s?x-(l?r:0)+(l?k:-k)/2+a+m:h-g+m,!s){var b=(u||[])[0],y=void 0===b?0:b;"left"===p.textAlign?t.titlePosition.x-=y/2:"right"===p.textAlign&&(t.titlePosition.x+=y/2)}}}function E(){var t,e=this.chart,i=this.options.grid,r=void 0===i?{}:i,s=this.userOptions;if(r.enabled&&((t=this.options).labels.align=(0,u.pick)(t.labels.align,"center"),this.categories||(t.showLastLabel=!1),this.labelRotation=0,t.labels.rotation=0,t.minTickInterval=1),r.columns)for(var n=this.grid.columns=[],o=this.grid.columnIndex=0;++o<r.columns.length;){var a=(0,u.merge)(s,r.columns[o],{isInternal:!0,linkedTo:0,scrollbar:{enabled:!1}},{grid:{columns:void 0}}),l=new(k())(this.chart,a,this.coll);l.grid.isColumn=!0,l.grid.columnIndex=o,(0,u.erase)(e.axes,l),(0,u.erase)(e[this.coll]||[],l),n.push(l)}}function A(){var t,e,i=this.axisTitle,r=this.grid,s=this.options;if(!0===(s.grid||{}).enabled){var n=this.min||0,a=this.max||0,l=this.ticks[this.tickPositions[0]];if(i&&!this.chart.styledMode&&(null==l?void 0:l.slotWidth)&&!this.options.title.style.width&&i.css({width:""+l.slotWidth+"px"}),this.maxLabelDimensions=this.getMaxLabelDimensions(this.ticks,this.tickPositions),this.rightWall&&this.rightWall.destroy(),(null==(t=this.grid)?void 0:t.isOuterAxis())&&this.axisLine){var d=s.lineWidth;if(d){var h=this.getLinePath(d),c=h[0],u=h[1],f=(this.tickSize("tick")||[1])[0]*(this.side===o.top||this.side===o.left?-1:1);if("M"===c[0]&&"L"===u[0]&&(this.horiz?(c[2]+=f,u[2]+=f):(c[1]+=f,u[1]+=f)),!this.horiz&&this.chart.marginRight){var p=["L",this.left,c[2]||0],v=[c,p],m=["L",this.chart.chartWidth-this.chart.marginRight,this.toPixels(a+this.tickmarkOffset)],g=[["M",u[1]||0,this.toPixels(a+this.tickmarkOffset)],m];this.grid.upperBorder||n%1==0||(this.grid.upperBorder=this.grid.renderBorder(v)),this.grid.upperBorder&&(this.grid.upperBorder.attr({stroke:s.lineColor,"stroke-width":s.lineWidth}),this.grid.upperBorder.animate({d:v})),this.grid.lowerBorder||a%1==0||(this.grid.lowerBorder=this.grid.renderBorder(g)),this.grid.lowerBorder&&(this.grid.lowerBorder.attr({stroke:s.lineColor,"stroke-width":s.lineWidth}),this.grid.lowerBorder.animate({d:g}))}this.grid.axisLineExtra?(this.grid.axisLineExtra.attr({stroke:s.lineColor,"stroke-width":s.lineWidth}),this.grid.axisLineExtra.animate({d:h})):this.grid.axisLineExtra=this.grid.renderBorder(h),this.axisLine[this.showAxis?"show":"hide"]()}}if(((null==r?void 0:r.columns)||[]).forEach(function(t){return t.render()}),!this.horiz&&this.chart.hasRendered&&(this.scrollbar||(null==(e=this.linkedParent)?void 0:e.scrollbar))&&this.tickPositions.length){for(var k=this.tickmarkOffset,x=this.tickPositions[this.tickPositions.length-1],b=this.tickPositions[0],y=void 0,P=void 0;(y=this.hiddenLabels.pop())&&y.element;)y.show();for(;(P=this.hiddenMarks.pop())&&P.element;)P.show();(y=this.ticks[b].label)&&(n-b>k?this.hiddenLabels.push(y.hide()):y.show()),(y=this.ticks[x].label)&&(x-a>k?this.hiddenLabels.push(y.hide()):y.show());var O=this.ticks[x].mark;O&&x-a<k&&x-a>0&&this.ticks[x].isLast&&this.hiddenMarks.push(O.hide())}}}function N(){var t,e=null==(t=this.tickPositions)?void 0:t.info,i=this.options,r=i.grid||{},s=this.userOptions.labels||{};r.enabled&&(this.horiz?(this.series.forEach(function(t){t.options.pointRange=0}),e&&i.dateTimeLabelFormats&&i.labels&&!(0,u.defined)(s.align)&&(!1===i.dateTimeLabelFormats[e.unitName].range||e.count>1)&&(i.labels.align="left",(0,u.defined)(s.x)||(i.labels.x=3))):"treegrid"!==this.type&&this.grid&&this.grid.columns&&(this.minPointOffset=this.tickInterval))}function w(t){var e,i=this.options,r=t.userOptions,s=i&&b(i.grid)?i.grid:{};!0===s.enabled&&(e=(0,u.merge)(!0,{className:"highcharts-grid-axis "+(r.className||""),dateTimeLabelFormats:{hour:{list:["%[HM]","%[H]"]},day:{list:["%[AeB]","%[aeb]","%[E]"]},week:{list:["Week %W","W%W"]},month:{list:["%[B]","%[b]","%o"]}},grid:{borderWidth:1},labels:{padding:2,style:{fontSize:"0.9em"}},margin:0,title:{text:null,reserveSpace:!1,rotation:0,style:{textOverflow:"ellipsis"}},units:[["millisecond",[1,10,100]],["second",[1,10]],["minute",[1,5,15]],["hour",[1,6]],["day",[1]],["week",[1]],["month",[1]],["year",null]]},r),"xAxis"===this.coll&&((0,u.defined)(r.linkedTo)&&!(0,u.defined)(r.tickPixelInterval)&&(e.tickPixelInterval=350),!(!(0,u.defined)(r.tickPixelInterval)&&(0,u.defined)(r.linkedTo))||(0,u.defined)(r.tickPositioner)||(0,u.defined)(r.tickInterval)||(0,u.defined)(r.units)||(e.tickPositioner=function(t,i){var r,s,n=null==(s=null==(r=this.linkedParent)?void 0:r.tickPositions)?void 0:s.info;if(n){for(var o=e.units||[],a=void 0,l=1,d="year",h=0;h<o.length;h++){var c=o[h];if(c&&c[0]===n.unitName){a=h;break}}var f=(0,u.isNumber)(a)&&o[a+1];if(f){d=f[0]||"year";var p=f[1];l=(null==p?void 0:p[0])||1}else"year"===n.unitName&&(l=10*n.count);var v=u.timeUnits[d];return this.tickInterval=v*l,this.chart.time.getTimeTicks({unitRange:v,count:l,unitName:d},t,i,this.options.startOfWeek)}})),(0,u.merge)(!0,this.options,e),this.horiz&&(i.minPadding=(0,u.pick)(r.minPadding,0),i.maxPadding=(0,u.pick)(r.maxPadding,0)),(0,u.isNumber)(i.grid.borderWidth)&&(i.tickWidth=i.lineWidth=s.borderWidth))}function G(t){var e=t.userOptions,i=(null==e?void 0:e.grid)||{},r=i.columns;i.enabled&&r&&(0,u.merge)(!0,this.options,r[0])}function B(){(this.grid.columns||[]).forEach(function(t){return t.setScale()})}function T(t){var e=this.horiz,i=this.maxLabelDimensions,r=this.options.grid,s=void 0===r?{}:r;if(s.enabled&&i){var n=2*this.options.labels.distance,o=e?s.cellHeight||n+i.height:n+i.width;(0,u.isArray)(t.tickSize)?t.tickSize[0]=o:t.tickSize=[o,0]}}function I(){this.axes.forEach(function(t){var e;((null==(e=t.grid)?void 0:e.columns)||[]).forEach(function(t){t.setAxisSize(),t.setAxisTranslation()})})}function M(t){var e=this.grid;(e.columns||[]).forEach(function(e){return e.destroy(t.keepEvents)}),e.columns=void 0}function S(t){var e=t.userOptions||{},i=(0,u.merge)({borderColor:"var(--highcharts-neutral-color-20)"},e.grid||{});i.enabled&&(0,u.defined)(i.borderColor)&&(e.tickColor=e.lineColor=i.borderColor),this.grid||(this.grid=new W(this)),this.hiddenLabels=[],this.hiddenMarks=[],this.clippable=!1}function C(t){var e=this.label,i=this.axis,r=i.reversed,s=i.chart,n=i.options.grid||{},a=i.options.labels,l=a.align,d=o[i.side],h=t.tickmarkOffset,c=i.tickPositions,f=this.pos-h,p=(0,u.isNumber)(c[t.index+1])?c[t.index+1]-h:(i.max||0)+h,v=i.tickSize("tick"),m=v?v[0]:0,g=v?v[1]/2:0;if(!0===n.enabled){var k,x=void 0,b=void 0,y=void 0;if("top"===d?k=(x=i.top+i.offset)-m:"bottom"===d?x=(k=s.chartHeight-i.bottom+i.offset)+m:(x=i.top+i.len-(i.translate(r?p:f)||0),k=i.top+i.len-(i.translate(r?f:p)||0)),"right"===d?y=(b=s.chartWidth-i.right+i.offset)+m:"left"===d?b=(y=i.left+i.offset)-m:(b=Math.round(i.left+(i.translate(r?p:f)||0))-g,y=Math.min(Math.round(i.left+(i.translate(r?f:p)||0))-g,i.left+i.len)),this.slotWidth=y-b,t.pos.x="left"===l?b:"right"===l?y:b+(y-b)/2,t.pos.y=k+(x-k)/2,e){var P=s.renderer.fontMetrics(e),O=e.getBBox().height;if(a.useHTML)t.pos.y+=P.b+-(O/2);else{var E=Math.round(O/P.h);t.pos.y+=(P.b-(P.h-P.f))/2+-((E-1)*P.h/2)}}t.pos.x+=i.horiz&&a.x||0}}function L(t){var e,i,r=t.axis,s=t.value;if(null==(e=r.options.grid)?void 0:e.enabled){var n=r.tickPositions,o=(r.linkedParent||r).series,a=null!=(i=o.reduce(function(t,e){var i,r;return e.is("gantt")?null==t?void 0:t.concat(null!=(r=null==(i=e.options)?void 0:i.data)?r:[]):t},[]))?i:[],l=s===n[0],d=s===n[n.length-1],h=o[0]&&(0,u.find)(a,function(t){return t[r.isXAxis?"x":"y"]===s}),c=void 0;h&&(c=(0,u.merge)(h),f().seriesTypes.gantt.prototype.pointClass.setGanttPointAliases(c,r.chart)),t.isFirst=l,t.isLast=d,t.point=c}}function j(){var t,e,i=this.options,r=i.grid||{},s=this.categories,n=this.tickPositions,o=n[0],a=n[1],l=n[n.length-1],d=n[n.length-2],h=null==(t=this.linkedParent)?void 0:t.min,c=null==(e=this.linkedParent)?void 0:e.max,f=h||this.min,p=c||this.max,v=this.tickInterval,m=(0,u.isNumber)(f)&&f>=o+v&&f<a,g=(0,u.isNumber)(f)&&o<f&&o+v>f,k=(0,u.isNumber)(p)&&l>p&&l-v<p,x=(0,u.isNumber)(p)&&p<=l-v&&p>d;!0===r.enabled&&!s&&(this.isXAxis||this.isLinked)&&((g||m)&&!i.startOnTick&&(n[0]=f),(k||x)&&!i.endOnTick&&(n[n.length-1]=p))}function z(t){var e,i=this.options.grid;return!0===(void 0===i?{}:i).enabled&&this.categories?this.tickInterval:t.apply(this,(e=arguments,Array.prototype.slice.call(e,1)))}(s=o||(o={}))[s.top=0]="top",s[s.right=1]="right",s[s.bottom=2]="bottom",s[s.left=3]="left";var W=function(){function t(t){this.axis=t}return t.prototype.isOuterAxis=function(){var t,e=this.axis,i=e.chart,r=e.grid.columnIndex,s=(null==(t=e.linkedParent)?void 0:t.grid.columns)||e.grid.columns||[],n=r?e.linkedParent:e,o=-1,a=0;return 3===e.side&&!i.inverted&&s.length?!e.linkedParent:((i[e.coll]||[]).forEach(function(t,i){t.side!==e.side||t.options.isInternal||(a=i,t===n&&(o=i))}),a===o&&(!(0,u.isNumber)(r)||s.length===r))},t.prototype.renderBorder=function(t){var e=this.axis,i=e.chart.renderer,r=e.options,s=i.path(t).addClass("highcharts-axis-line").add(e.axisGroup);return i.styledMode||s.attr({stroke:r.lineColor,"stroke-width":r.lineWidth,zIndex:7}),s},t}();x.E=function(t){return this.dateFormat("%a",t,!0).charAt(0)},x.W=function(t){var e=this.toParts(t),i=(e[7]+6)%7,r=e.slice(0);r[2]=e[2]-i+3;var s=this.toParts(this.makeTime(r[0],0,1));return 4!==s[7]&&(e[1]=0,e[2]=1+(11-s[7])%7),(1+Math.floor((this.makeTime(r[0],r[1],r[2])-this.makeTime(s[0],s[1],s[2]))/6048e5)).toString()};var R=function(t,e){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(i[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var s=0,r=Object.getOwnPropertySymbols(t);s<r.length;s++)0>e.indexOf(r[s])&&Object.prototype.propertyIsEnumerable.call(t,r[s])&&(i[r[s]]=t[r[s]]);return i};function H(t,e,i,r,s,n){var o,a,l=n&&n.after,d=n&&n.before,h={data:r,depth:i-1,id:t,level:i,parent:e||""},c=0,f=0;"function"==typeof d&&d(h,n);var p=(s[t]||[]).map(function(e){var r=H(e.id,t,i+1,e,s,n),l=e.start||NaN,d=!0===e.milestone?l:e.end||NaN;return o=!(0,u.isNumber)(o)||l<o?l:o,a=!(0,u.isNumber)(a)||d>a?d:a,c=c+1+r.descendants,f=Math.max(r.height+1,f),r});return r&&(null!=r.start||(r.start=o),null!=r.end||(r.end=a)),(0,u.extend)(h,{children:p,descendants:c,height:f}),"function"==typeof l&&l(h,n),h}var D=function(t,e){var i,r;return H("",null,1,null,(i=[],Object.keys(r=t.reduce(function(t,e){var r=e.parent,s=void 0===r?"":r,n=e.id;return void 0===t[s]&&(t[s]=[]),t[s].push(e),n&&i.push(n),t},{})).forEach(function(t){var e;if(""!==t&&-1===i.indexOf(t)){var s=r[t].map(function(t){return R(t,[])});(e=r[""]).push.apply(e,s),delete r[t]}}),r),e)};function _(){this.treeGrid||(this.treeGrid=new X(this))}function F(t,e,i,r,s,n,o,a,l){var d,h,c,f,p=(0,u.pick)(null==(d=this.options)?void 0:d.labels,n),v=this.pos,m=this.axis,g="treegrid"===m.type,k=t.apply(this,[e,i,r,s,p,o,a,l]);if(g){var x=p&&(0,u.isObject)(p.symbol,!0)?p.symbol:{},b=x.width,y=x.padding,P=void 0===y?5*!m.linkedParent:y,O=p&&(0,u.isNumber)(p.indentation)?p.indentation:0;f=(null==(c=null==(h=m.treeGrid.mapOfPosToGridNode)?void 0:h[v])?void 0:c.depth)||1,k.x+=(void 0===b?0:b)+2*P+(f-1)*O}return k}function V(t){var e,i,r,s,n,o,a,l,d,h,c,f,p,v,m,g=this.pos,k=this.axis,x=this.label,b=this.treeGrid,y=this.options,P=null==b?void 0:b.labelIcon,O=null==x?void 0:x.element,E=k.treeGrid,A=k.options,N=k.chart,w=k.tickPositions,G=E.mapOfPosToGridNode,B=(0,u.pick)(null==y?void 0:y.labels,null==A?void 0:A.labels),T=B&&(0,u.isObject)(B.symbol,!0)?B.symbol:{},I=null==G?void 0:G[g],M=I||{},S=M.descendants,C=M.depth,L=I&&S&&S>0,j="treegrid"===k.type&&O,z=w.indexOf(g)>-1,W="highcharts-treegrid-node-",R=W+"level-",H=N.styledMode;(j&&I&&x.removeClass(RegExp(R+".*")).addClass(R+C),t.apply(this,Array.prototype.slice.call(arguments,1)),j&&L)?(m=E.isCollapsed(I),e={color:!H&&x.styles.color||"",collapsed:m,group:x.parentGroup,options:T,renderer:x.renderer,show:z,xy:x.xy},s=!(r=this.treeGrid).labelIcon,n=e.renderer,o=e.xy,l=(a=e.options).width||0,d=a.height||0,h=5*(null!=(i=a.padding)?!i:!this.axis.linkedParent),c={x:o.x-l/2-h,y:o.y-d/2},f=e.collapsed?90:180,p=e.show&&(0,u.isNumber)(c.y),(v=r.labelIcon)||(r.labelIcon=v=n.path(n.symbols[a.type](a.x||0,a.y||0,l,d)).addClass("highcharts-label-icon").add(e.group)),v[p?"show":"hide"](),n.styledMode||v.attr({cursor:"pointer",fill:e.color||"var(--highcharts-neutral-color-60)","stroke-width":1,stroke:a.lineColor,strokeWidth:a.lineWidth||0}),v[s?"attr":"animate"]({translateX:c.x,translateY:c.y,rotation:f}),x.addClass(W+(m?"collapsed":"expanded")).removeClass(W+(m?"expanded":"collapsed")),H||x.css({cursor:"pointer"}),[x,P].forEach(function(t){t&&!t.attachedTreeGridEvents&&((0,u.addEvent)(t.element,"mouseover",function(){x.addClass("highcharts-treegrid-node-active"),x.renderer.styledMode||x.css({textDecoration:"underline"})}),(0,u.addEvent)(t.element,"mouseout",function(){var t;t=(0,u.isObject)(B.style)?B.style:{},x.removeClass("highcharts-treegrid-node-active"),x.renderer.styledMode||x.css({textDecoration:t.textDecoration||"none"})}),(0,u.addEvent)(t.element,"click",function(){b.toggleCollapse()}),t.attachedTreeGridEvents=!0)})):P&&((0,u.removeEvent)(O),null==x||x.css({cursor:"default"}),P.destroy(),b.labelIcon=void 0)}var X=function(){function t(t){this.tick=t}return t.compose=function(t){var e=t.prototype;e.toggleCollapse||((0,u.addEvent)(t,"init",_),(0,u.wrap)(e,"getLabelPosition",F),(0,u.wrap)(e,"renderLabel",V),e.collapse=function(t){this.treeGrid.collapse(t)},e.expand=function(t){this.treeGrid.expand(t)},e.toggleCollapse=function(t){this.treeGrid.toggleCollapse(t)})},t.prototype.collapse=function(t){var e=this.tick,i=e.pos,r=e.axis,s=r.treeGrid,n=r.brokenAxis,o=s.mapOfPosToGridNode;n&&o&&n.setBreaks(s.collapse(o[i]),null==t||t)},t.prototype.destroy=function(){var t;null==(t=this.labelIcon)||t.destroy()},t.prototype.expand=function(t){var e=this.tick,i=e.pos,r=e.axis,s=r.treeGrid,n=r.brokenAxis,o=s.mapOfPosToGridNode;n&&o&&n.setBreaks(s.expand(o[i]),null==t||t)},t.prototype.toggleCollapse=function(t){void 0===t&&(t=!0);var e,i,r=this.tick,s=r.axis,n=r.pos,o=s.brokenAxis,a=s.treeGrid;if(o&&a.mapOfPosToGridNode){var l=!!(s.scrollbar&&s.staticScale),d=s.pos+s.len+(a.pendingSizeAdjustment||0);if(a.pendingSizeAdjustment=0,o.setBreaks(a.toggleCollapse(a.mapOfPosToGridNode[n]),l&&t),l){var h=s.toValue(s.toPixels(s.dataMax)),c=s.toValue(d)-s.tickmarkOffset,f=null!=(e=s.userMin)?e:s.min;if(a.adjustedMax=h!==s.dataMax?h-s.tickmarkOffset:void 0,c>s.dataMax){var p=d-s.toPixels(s.dataMax+s.tickmarkOffset);c=null!=(i=a.adjustedMax)?i:s.dataMax,(f=s.toValue(s.toPixels(f-s.tickmarkOffset)-p)+s.tickmarkOffset)<s.dataMin&&(p=s.toPixels(s.dataMin)-s.toPixels(f),f=s.dataMin,a.pendingSizeAdjustment=p)}s.setExtremes((0,u.correctFloat)(f),(0,u.correctFloat)(c),!1,!1,{trigger:"toggleCollapse"})}t&&s.chart.redraw()}},t}(),q=h(620),U=function(t){var e,i,r,s,n,o,a={};if((0,u.isObject)(t))for(s=(0,u.isNumber)(t.from)?t.from:1,o=t.levels,i={},e=(0,u.isObject)(t.defaults)?t.defaults:{},(0,u.isArray)(o)&&(i=o.reduce(function(t,i){var r,n,o;return(0,u.isObject)(i)&&(0,u.isNumber)(i.level)&&(o=(0,u.merge)({},i),n=(0,u.pick)(o.levelIsConstant,e.levelIsConstant),delete o.levelIsConstant,delete o.level,r=i.level+(n?0:s-1),(0,u.isObject)(t[r])?(0,u.merge)(!0,t[r],o):t[r]=o),t},{})),n=(0,u.isNumber)(t.to)?t.to:1,r=0;r<=n;r++)a[r]=(0,u.merge)({},e,(0,u.isObject)(i[r])?i[r]:{});return a};function K(t){return Array(t.dataTable.rowCount).fill(void 0).map(function(e,i){return t.dataTable.getRowObject(i)})}function Y(t){return{from:t.collapseStart||0,to:t.collapseEnd||0,showPoints:!1}}function J(t,e,i){var r,s,n=[],o=[],a={},l=e||!1,d={},h=-1,c=D(t,{after:function(t){var e=d[t.pos],i=0,r=0;e.children.forEach(function(t){r+=(t.descendants||0)+1,i=Math.max((t.height||0)+1,i)}),e.descendants=r,e.height=i,e.collapsed&&o.push(e)},before:function(t){var e,i,r=(0,u.isObject)(t.data,!0)?t.data:{},s=(0,u.isString)(r.name)?r.name:"",o=a[t.parent],c=(0,u.isObject)(o,!0)?d[o.pos]:null;l&&(0,u.isObject)(c,!0)&&(e=(0,u.find)(c.children,function(t){return t.name===s}))?(i=e.pos,e.nodes.push(t)):i=h++,!d[i]&&(d[i]=e={depth:c?c.depth+1:0,name:s,id:r.id,nodes:[t],children:[],pos:i},-1!==i&&n.push(s),(0,u.isObject)(c,!0)&&c.children.push(e)),(0,u.isString)(t.id)&&(a[t.id]=t),e&&!0===r.collapsed&&(e.collapsed=!0),t.pos=i}});return r=d,{categories:n,mapOfIdToNode:a,mapOfPosToGridNode:d=(s=function(t,e,r){var n=t.nodes,o=e+(-1===e?0:i-1),a=(o-e)/2,l=e+a;return n.forEach(function(t){var i=t.data;(0,u.isObject)(i,!0)&&(i.y=e+(i.yIndex||0)),t.pos=l}),r[l]=t,t.pos=l,t.tickmarkOffset=a+.5,t.collapseStart=o+.5,t.children.forEach(function(t){s(t,o+1,r),o=(t.collapseEnd||0)-.5}),t.collapseEnd=o+.5,r})(r["-1"],-1,{}),collapsedNodes:o,tree:c}}function Q(t){var e=t.target;e.axes.filter(function(t){return"treegrid"===t.type}).forEach(function(i){var r,s,n,o=i.options,a=o.labels,l=i.uniqueNames,d=e.time.parse(o.max),h=!i.treeGrid.mapOfPosToGridNode||i.series.some(function(t){return!t.hasRendered||t.isDirtyData||t.isDirty}),c=0;if(h){var f=[];if(s=i.series.reduce(function(t,i){var r=K(i),s=r[0],n=Array.isArray(s)&&!s.find(function(t){return"object"==typeof t});return f.push(n),i.visible&&(r.forEach(function(r){var s;(n||(null==(s=i.options.keys)?void 0:s.length))&&(r=i.pointClass.prototype.optionsToObject.call({series:i},r),i.pointClass.setGanttPointAliases(r,e)),(0,u.isObject)(r,!0)&&(r.yIndex=c,r.seriesIndex=i.index,t.push(r))}),!0===l&&c++),t},[]),d&&s.length<d)for(var p=s.length;p<=d;p++)s.push({name:p+"​"});i.categories=(n=J(s,l||!1,!0===l?c:1)).categories,i.treeGrid.mapOfPosToGridNode=n.mapOfPosToGridNode,i.hasNames=!0,i.treeGrid.tree=n.tree,i.series.forEach(function(t){var e=s.filter(function(e){return e.seriesIndex===t.index});e.forEach(function(t){delete t.seriesIndex,delete t.yIndex}),t.visible&&t.setData(e,!1)}),i.treeGrid.mapOptionsToLevel=U({defaults:a,from:1,levels:null==a?void 0:a.levels,to:null==(r=i.treeGrid.tree)?void 0:r.height}),"beforeRender"===t.type&&(i.treeGrid.collapsedNodes=n.collapsedNodes)}})}function Z(t,e){var i,r,s,n=this.treeGrid.mapOptionsToLevel||{},o="treegrid"===this.type,l=this.ticks,d=l[e];o&&this.treeGrid.mapOfPosToGridNode?((i=n[(s=this.treeGrid.mapOfPosToGridNode[e]).depth])&&(r={labels:i}),!d&&a?l[e]=d=new a(this,e,void 0,void 0,{category:s.name,tickmarkOffset:s.tickmarkOffset,options:r}):(d.parameters.category=s.name,d.options=r,d.addLabel(),this.isDirty=!0)):t.apply(this,Array.prototype.slice.call(arguments,1))}function $(t,e,i,r){var s=this,n="treegrid"===i.type;s.treeGrid||(s.treeGrid=new ti(s)),n&&((0,u.addEvent)(e,"beforeRender",Q),(0,u.addEvent)(e,"beforeRedraw",Q),(0,u.addEvent)(e,"addSeries",function(t){if(t.options.data){var e=J(t.options.data,i.uniqueNames||!1,1);s.treeGrid.collapsedNodes=(s.treeGrid.collapsedNodes||[]).concat(e.collapsedNodes)}}),(0,u.addEvent)(s,"foundExtremes",function(){var t;null==(t=s.treeGrid.collapsedNodes)||t.forEach(function(t){var e=s.treeGrid.collapse(t);s.brokenAxis&&(s.brokenAxis.setBreaks(e,!1),s.treeGrid.collapsedNodes&&(s.treeGrid.collapsedNodes=s.treeGrid.collapsedNodes.filter(function(e){return t.collapseStart!==e.collapseStart||t.collapseEnd!==e.collapseEnd})))})}),(0,u.addEvent)(s,"afterBreaks",function(){"yAxis"===s.coll&&!s.staticScale&&s.chart.options.chart.height&&(s.isDirty=!0)}),i=(0,u.merge)({grid:{enabled:!0},labels:{align:"left",levels:[{level:void 0},{level:1,style:{fontWeight:"bold"}}],symbol:{type:"triangle",x:-5,y:-3,height:6,width:8}},uniqueNames:!1},i,{reversed:!0})),t.apply(s,[e,i,r]),n&&(s.hasNames=!0,s.options.showLastLabel=!0)}function tt(t){var e,i,r,s,n,o,a,l=this.options,d=this.chart.time,h="number"==typeof l.linkedTo?null==(e=this.chart[this.coll])?void 0:e[l.linkedTo]:void 0;if("treegrid"===this.type){if(this.min=null!=(r=null!=(i=this.userMin)?i:d.parse(l.min))?r:this.dataMin,this.max=null!=(n=null!=(s=this.userMax)?s:d.parse(l.max))?n:this.dataMax,(0,u.fireEvent)(this,"foundExtremes"),this.setAxisTranslation(),this.tickInterval=1,this.tickmarkOffset=.5,this.tickPositions=this.treeGrid.mapOfPosToGridNode?this.treeGrid.getTickPositions():[],h){var c=h.getExtremes();this.min=null!=(o=c.min)?o:c.dataMin,this.max=null!=(a=c.max)?a:c.dataMax,this.tickPositions=h.tickPositions}this.linkedParent=h}else t.apply(this,Array.prototype.slice.call(arguments,1))}function te(t){var e=this;"treegrid"===this.type&&e.visible&&e.tickPositions.forEach(function(t){var i,r=e.ticks[t];(null==(i=r.label)?void 0:i.attachedTreeGridEvents)&&((0,u.removeEvent)(r.label.element),r.label.attachedTreeGridEvents=!1)}),t.apply(e,Array.prototype.slice.call(arguments,1))}var ti=function(){function t(t){this.pendingSizeAdjustment=0,this.axis=t}return t.compose=function(t,e,i,r){if(!t.keepProps.includes("treeGrid")){var s,n,o,l=t.prototype;t.keepProps.push("treeGrid"),(0,u.wrap)(l,"generateTick",Z),(0,u.wrap)(l,"init",$),(0,u.wrap)(l,"setTickInterval",tt),(0,u.wrap)(l,"redraw",te),l.utils={getNode:H},a||(a=r)}return s=t,n=e,o=r,s.keepProps.includes("grid")||(s.keepProps.push("grid"),s.prototype.getMaxLabelDimensions=y,(0,u.wrap)(s.prototype,"unsquish",z),(0,u.wrap)(s.prototype,"getOffset",P),(0,u.addEvent)(s,"init",S),(0,u.addEvent)(s,"afterGetTitlePosition",O),(0,u.addEvent)(s,"afterInit",E),(0,u.addEvent)(s,"afterRender",A),(0,u.addEvent)(s,"afterSetAxisTranslation",N),(0,u.addEvent)(s,"afterSetOptions",w),(0,u.addEvent)(s,"afterSetOptions",G),(0,u.addEvent)(s,"afterSetScale",B),(0,u.addEvent)(s,"afterTickSize",T),(0,u.addEvent)(s,"trimTicks",j),(0,u.addEvent)(s,"destroy",M),(0,u.addEvent)(n,"afterSetChartSize",I),(0,u.addEvent)(o,"afterGetLabelPosition",C),(0,u.addEvent)(o,"labelFormat",L)),m.compose(t,i),X.compose(r),t},t.prototype.setCollapsedStatus=function(t){var e=this.axis,i=e.chart;e.series.forEach(function(e){var r=K(e);if(t.id&&r){var s=i.get(t.id),n=r[e.data.indexOf(s)];e.dataTable.setRow({collapsed:t.collapsed},e.data.indexOf(s)),s&&(0,u.isObject)(n,!0)&&(s.collapsed=t.collapsed,n.collapsed=t.collapsed)}})},t.prototype.collapse=function(t){var e=this.axis,i=e.options.breaks||[],r=Y(t);return i.push(r),t.collapsed=!0,e.treeGrid.setCollapsedStatus(t),i},t.prototype.expand=function(t){var e,i=this.axis,r=Y(t);return t.collapsed=!1,i.treeGrid.setCollapsedStatus(t),(null==(e=i.options.breaks)?void 0:e.reduce(function(t,e){return(e.to!==r.to||e.from!==r.from)&&t.push(e),t},[]))||[]},t.prototype.getTickPositions=function(){var t=this.axis,e=Math.floor(t.min/t.tickInterval)*t.tickInterval,i=Math.ceil(t.max/t.tickInterval)*t.tickInterval;return Object.keys(t.treeGrid.mapOfPosToGridNode||{}).reduce(function(r,s){var n,o=+s;return o>=e&&o<=i&&!(null==(n=t.brokenAxis)?void 0:n.isInAnyBreak(o))&&r.push(o),r},[])},t.prototype.isCollapsed=function(t){var e=this.axis.options.breaks||[],i=Y(t);return e.some(function(t){return t.from===i.from&&t.to===i.to})},t.prototype.toggleCollapse=function(t){return this.isCollapsed(t)?this.expand(t):this.collapse(t)},t}(),tr=f();ti.compose(tr.Axis,tr.Chart,tr.Series,tr.Tick);var ts=f();return c.default}()});