!/**
 * Highcharts Gantt JS v12.6.0 (2026-04-13)
 * @module highcharts/modules/gantt
 * @requires highcharts
 *
 * Gantt series
 *
 * (c) 2016-2026 Highsoft AS
 * Author: Lars A. V. Cabrera
 *
 * 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.Chart,t._Highcharts.Axis,t._Highcharts.Color,t._Highcharts.SeriesRegistry,t._Highcharts.RendererRegistry,t._Highcharts.SVGElement,t._Highcharts.Templating,t._Highcharts.Point,t._Highcharts.StackItem):"function"==typeof define&&define.amd?define("highcharts/modules/gantt",["highcharts/highcharts"],function(t){return e(t,t.Chart,t.Axis,t.Color,t.SeriesRegistry,t.RendererRegistry,t.SVGElement,t.Templating,t.Point,t.StackItem)}):"object"==typeof exports?exports["highcharts/modules/gantt"]=e(t._Highcharts,t._Highcharts.Chart,t._Highcharts.Axis,t._Highcharts.Color,t._Highcharts.SeriesRegistry,t._Highcharts.RendererRegistry,t._Highcharts.SVGElement,t._Highcharts.Templating,t._Highcharts.Point,t._Highcharts.StackItem):t.Highcharts=e(t.Highcharts,t.Highcharts.Chart,t.Highcharts.Axis,t.Highcharts.Color,t.Highcharts.SeriesRegistry,t.Highcharts.RendererRegistry,t.Highcharts.SVGElement,t.Highcharts.Templating,t.Highcharts.Point,t.Highcharts.StackItem)}("u"<typeof window?this:window,(t,e,i,s,o,r,n,a,l,h)=>(()=>{"use strict";let d,c,p;var u,g,x,f,m,b,y={28:t=>{t.exports=n},184:t=>{t.exports=h},260:t=>{t.exports=l},512:t=>{t.exports=o},532:t=>{t.exports=i},608:t=>{t.exports=r},620:t=>{t.exports=s},944:e=>{e.exports=t},960:t=>{t.exports=e},984:t=>{t.exports=a}},v={};function M(t){var e=v[t];if(void 0!==e)return e.exports;var i=v[t]={exports:{}};return y[t](i,i.exports,M),i.exports}M.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return M.d(e,{a:e}),e},M.d=(t,e)=>{for(var i in e)M.o(e,i)&&!M.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},M.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var k={};M.d(k,{default:()=>iC});var A=M(944),w=M.n(A);function S(t,e,i,s){return[["M",t,e+s/2],["L",t+i,e],["L",t,e+s/2],["L",t+i,e+s]]}function B(t,e,i,s){return S(t,e,i/2,s)}function E(t,e,i,s){return[["M",t+i,e],["L",t,e+s/2],["L",t+i,e+s],["Z"]]}function P(t,e,i,s){return E(t,e,i/2,s)}let O=function(t){let e=t.prototype.symbols;e.arrow=S,e["arrow-filled"]=E,e["arrow-filled-half"]=P,e["arrow-half"]=B,e["triangle-left"]=E,e["triangle-left-half"]=P},{doc:T,win:C}=w();function I(t,e,i,s={}){let o="function"==typeof t&&t.prototype||t;Object.hasOwnProperty.call(o,"hcEvents")||(o.hcEvents={});let r=o.hcEvents;w().Point&&t instanceof w().Point&&t.series&&t.series.chart&&(t.series.chart.runTrackerClick=!0);let n=t.addEventListener;n&&n.call(t,e,i,!!w().supportsPassiveEvents&&{passive:void 0===s.passive?-1!==e.indexOf("touch"):s.passive,capture:!1}),r[e]||(r[e]=[]);let a={fn:i,order:"number"==typeof s.order?s.order:1/0};return r[e].push(a),r[e].sort((t,e)=>t.order-e.order),function(){tt(t,e,i)}}function D(t,e,i){return t>e?t<i?t:i:e}function L(t,e){return t>1e14?t:parseFloat(t.toPrecision(e||14))}function R(t,e,i,s,o){let r=T.createElement(t);return e&&F(r,e),o&&G(r,{padding:"0",border:"none",margin:"0"}),i&&G(r,i),s&&s.appendChild(r),r}function z(t,e=0,i){let s=e%2/2,o=i?-1:1;return(Math.round(t*o-s)+s)*o}function G(t,e){F(t.style,e)}function W(t){return null!=t}function N(t,e,i){$(t,function(s,o){s!==e&&s?.destroy&&s.destroy(),(s?.destroy||!i)&&delete t[o]})}function H(t,e){let i=t.length;for(;i--;)if(t[i]===e){t.splice(i,1);break}}function F(t,e){let i;for(i in t||(t={}),e)t[i]=e[i];return t}function U(t,e,i,s){if(i=i||{},T?.createEvent&&(t.dispatchEvent||t.fireEvent&&t!==w())){let s=T.createEvent("Events");s.initEvent(e,!0,!0),i=F(s,i),t.dispatchEvent?t.dispatchEvent(i):t.fireEvent(e,i)}else if(t.hcEvents){i.target||F(i,{preventDefault:function(){i.defaultPrevented=!0},target:t,type:e});let s=[],o=t,r=!1;for(;o.hcEvents;)Object.hasOwnProperty.call(o,"hcEvents")&&o.hcEvents[e]&&(s.length&&(r=!0),s.unshift.apply(s,o.hcEvents[e])),o=Object.getPrototypeOf(o);r&&s.sort((t,e)=>t.order-e.order),s.forEach(e=>{!1===e.fn.call(t,i,t)&&i.preventDefault()})}s&&!i.defaultPrevented&&s.call(t,i)}let X=Array.prototype.find?function(t,e){return t.find(e)}:function(t,e){let i,s=t.length;for(i=0;i<s;i++)if(e(t[i],i))return t[i]};function Y(t){return q(t)&&"number"==typeof t.nodeType}function V(t){return"number"==typeof t&&!isNaN(t)&&t<1/0&&t>-1/0}function _(t){return"string"==typeof t}function j(t){let e=Object.prototype.toString.call(t);return"[object Array]"===e||"[object Array Iterator]"===e}function q(t,e){return!!t&&"object"==typeof t&&(!e||!j(t))}function Z(t,...e){let i,s=[t,...e],o={},r=function(t,e){return"object"!=typeof t&&(t={}),$(e,function(i,s){if("__proto__"!==s&&"constructor"!==s){let o;!q(i,!0)||(o=i?.constructor,q(i,!0)&&!Y(i)&&o?.name&&"Object"!==o.name)||Y(i)?t[s]=e[s]:t[s]=r(t[s]||{},i)}}),t};!0===t&&(o=s[1],s=Array.prototype.slice.call(s,2));let n=s.length;for(i=0;i<n;i++)o=r(o,s[i]);return o}function $(t,e,i){for(let s in t)Object.hasOwnProperty.call(t,s)&&e.call(i||t[s],t[s],s,t)}function K(){let t=arguments,e=t.length;for(let i=0;i<e;i++){let e=t[i];if(null!=e)return e}}function J(t,e){return 0>t.indexOf(e)&&!!t.push(e)}function Q(t,e,i){return/%$/.test(t)?e*parseFloat(t)/100+(i||0):parseFloat(t)}function tt(t,e,i){function s(e,i){let s=t.removeEventListener;s&&s.call(t,e,i,!1)}function o(i){let o,r;t.nodeName&&(e?(o={})[e]=!0:o=i,$(o,function(t,e){if(i[e])for(r=i[e].length;r--;)s(e,i[e][r].fn)}))}let r="function"==typeof t&&t.prototype||t;if(Object.hasOwnProperty.call(r,"hcEvents")){let t=r.hcEvents;if(e){let r=t[e]||[];i?(t[e]=r.filter(function(t){return i!==t.fn}),s(e,i)):(o(t),t[e]=[])}else o(t),delete r.hcEvents}}function te(t){return j(t)?t:[t]}function ti(t,e,i){let s=t[e];t[e]=function(){let t=arguments,e=this;return i.apply(this,[function(){return s.apply(e,arguments.length?arguments:t)}].concat([].slice.call(arguments)))}}let ts=w().deg2rad,to=Math.max,tr=Math.min,tn=class{constructor(t,e,i){this.init(t,e,i)}init(t,e,i){this.fromPoint=t,this.toPoint=e,this.options=i,this.chart=t.series.chart,this.pathfinder=this.chart.pathfinder}renderPath(t,e){let i=this.chart,s=i.styledMode,o=this.pathfinder,r={},n=this.graphics&&this.graphics.path;o.group||(o.group=i.renderer.g().addClass("highcharts-pathfinder-group").attr({zIndex:-1}).add(i.seriesGroup)),o.group.translate(i.plotLeft,i.plotTop),!(n&&n.renderer)&&(n=i.renderer.path().add(o.group),s||n.attr({opacity:0})),n.attr(e),r.d=t,s||(r.opacity=1),n.animate(r),this.graphics=this.graphics||{},this.graphics.path=n}addMarker(t,e,i){let s,o,r,n,a,l,h,d=this.fromPoint.series.chart,c=d.pathfinder,p=d.renderer,u="start"===t?this.fromPoint:this.toPoint,g=u.getPathfinderAnchorPoint(e);e.enabled&&((h="start"===t?i[1]:i[i.length-2])&&"M"===h[0]||"L"===h[0])&&(l={x:h[1],y:h[2]},o=u.getRadiansToVector(l,g),s=u.getMarkerVector(o,e.radius,g),e.width&&e.height?(n=e.width,a=e.height):n=a=2*e.radius,this.graphics=this.graphics||{},r={x:s.x-n/2,y:s.y-a/2,width:n,height:a,rotation:-o/ts,rotationOriginX:s.x,rotationOriginY:s.y},this.graphics[t]?this.graphics[t].animate(r):(this.graphics[t]=p.symbol(e.symbol).addClass("highcharts-point-connecting-path-"+t+"-marker highcharts-color-"+this.fromPoint.colorIndex).attr(r).add(c.group),p.styledMode||this.graphics[t].attr({fill:e.color||this.fromPoint.color,stroke:e.lineColor,"stroke-width":e.lineWidth,opacity:0}).animate({opacity:1},u.series.options.animation)))}getPath(t){let e=this.pathfinder,i=this.chart,s=e.algorithms[t.type],o=e.chartObstacles;return"function"!=typeof s?((0,A.error)('"'+t.type+'" is not a Pathfinder algorithm.'),{path:[],obstacles:[]}):(s.requiresObstacles&&!o&&(o=e.chartObstacles=e.getChartObstacles(t),i.options.connectors.algorithmMargin=t.algorithmMargin,e.chartObstacleMetrics=e.getObstacleMetrics(o)),s(this.fromPoint.getPathfinderAnchorPoint(t.startMarker),this.toPoint.getPathfinderAnchorPoint(t.endMarker),Z({chartObstacles:o,lineObstacles:e.lineObstacles||[],obstacleMetrics:e.chartObstacleMetrics,hardBounds:{xMin:0,xMax:i.plotWidth,yMin:0,yMax:i.plotHeight},obstacleOptions:{margin:t.algorithmMargin},startDirectionX:e.getAlgorithmStartDirection(t.startMarker)},t)))}render(){let t=this.fromPoint,e=t.series,i=e.chart,s=i.pathfinder,o={},r=Z(i.options.connectors,e.options.connectors,t.options.connectors,this.options);!i.styledMode&&(o.stroke=r.lineColor||t.color,o["stroke-width"]=r.lineWidth,r.dashStyle&&(o.dashstyle=r.dashStyle)),o.class="highcharts-point-connecting-path highcharts-color-"+t.colorIndex,W((r=Z(o,r)).marker.radius)||(r.marker.radius=tr(to(Math.ceil((r.algorithmMargin||8)/2)-1,1),5));let n=this.getPath(r),a=n.path;n.obstacles&&(s.lineObstacles=s.lineObstacles||[],s.lineObstacles=s.lineObstacles.concat(n.obstacles)),this.renderPath(a,o),this.addMarker("start",Z(r.marker,r.startMarker),a),this.addMarker("end",Z(r.marker,r.endMarker),a)}destroy(){this.graphics&&($(this.graphics,function(t){t.destroy()}),delete this.graphics)}},{composed:ta}=w(),tl={color:"#ccd3ff",width:2,label:{format:"%[abdYHM]",formatter:function(t,e){return this.axis.chart.time.dateFormat(e||"",t,!0)},rotation:0,style:{fontSize:"0.7em"}}};function th(){let t=this.options,e=t.currentDateIndicator;if(e){let i="object"==typeof e?Z(tl,e):Z(tl);i.value=Date.now(),i.className="highcharts-current-date-indicator",t.plotLines||(t.plotLines=[]),t.plotLines.push(i)}}function td(){this.label&&this.label.attr({text:this.getLabelText(this.options.label)})}function tc(t,e){let i=this.options;return i&&i.className&&-1!==i.className.indexOf("highcharts-current-date-indicator")&&i.label&&"function"==typeof i.label.formatter?(i.value=Date.now(),i.label.formatter.call(this,i.value,i.label.format,this)):t.call(this,e)}var tp=M(960),tu=M.n(tp);let{defaultOptions:tg}=w();class tx extends tu(){init(t,e){let i,s=t.xAxis,o=t.yAxis;t.xAxis=t.yAxis=void 0;let r=Z(!0,{chart:{type:"gantt"},title:{text:""},legend:{enabled:!1},navigator:{series:{type:"gantt"},yAxis:{type:"category"}}},t,{isGantt:!0});t.xAxis=s,t.yAxis=o,r.xAxis=(!j(t.xAxis)?[t.xAxis||{},{}]:t.xAxis).map((t,e)=>(1===e&&(i=0),Z({grid:{borderColor:tg.xAxis?.grid?.borderColor||"#cccccc",enabled:!0},opposite:tg.xAxis?.opposite??t.opposite??!0,linkedTo:i},t,{type:"datetime"}))),r.yAxis=te(t.yAxis||{}).map(t=>Z({grid:{borderColor:tg.yAxis?.grid?.borderColor||"#cccccc",enabled:!0},staticScale:50,reversed:!0,type:t.categories?t.type:"treegrid"},t)),super.init(r,e)}}(u=tx||(tx={})).ganttChart=function(t,e,i){return new u(t,e,i)};let tf=tx;var tm=M(532),tb=M.n(tm);let{isTouchDevice:ty}=w(),tv=[];function tM(){this.navigator&&this.navigator.setBaseSeries(null,!1)}function tk(){let t,e,i,s=this.legend,o=this.navigator;if(o){t=s&&s.options,e=o.xAxis,i=o.yAxis;let{scrollbarHeight:r,scrollButtonSize:n}=o;this.inverted?(o.left=o.opposite?this.chartWidth-r-o.height:this.spacing[3]+r,o.top=this.plotTop+n):(o.left=K(e.left,this.plotLeft+n),o.top=o.navigatorOptions.top||this.chartHeight-o.height-r-(this.scrollbar?.options.margin||0)-this.spacing[2]-(this.rangeSelector&&this.extraBottomMargin?this.rangeSelector.getHeight():0)-(t&&"bottom"===t.verticalAlign&&"proximate"!==t.layout&&t.enabled&&!t.floating?s.legendHeight+K(t.margin,10):0)-(this.titleOffset?this.titleOffset[2]:0)),e&&i&&(this.inverted?e.options.left=i.options.left=o.left:e.options.top=i.options.top=o.top,e.setAxisSize(),i.setAxisSize())}}function tA(t){!this.navigator&&!this.scroller&&(this.options.navigator.enabled||this.options.scrollbar.enabled)&&(this.scroller=this.navigator=new d(this),K(t.redraw,!0)&&this.redraw(t.animation))}function tw(){let t=this.options;(t.navigator.enabled||t.scrollbar.enabled)&&(this.scroller=this.navigator=new d(this))}function tS(){let t=this.options,e=t.navigator,i=t.rangeSelector;if((e&&e.enabled||i&&i.enabled)&&(!ty&&"x"===this.zooming.type||ty&&"x"===this.zooming.pinchType))return!1}function tB(t){let e=t.navigator;if(e&&t.xAxis[0]){let i=t.xAxis[0].getExtremes();e.render(i.min,i.max)}}function tE(t){let e=t.options.navigator||{},i=t.options.scrollbar||{};!this.navigator&&!this.scroller&&(e.enabled||i.enabled)&&(Z(!0,this.options.navigator,e),Z(!0,this.options.scrollbar,i),delete t.options.navigator,delete t.options.scrollbar)}let tP=function(t,e){if(J(tv,t)){let i=t.prototype;d=e,i.callbacks.push(tB),I(t,"afterAddSeries",tM),I(t,"afterSetChartSize",tk),I(t,"afterUpdate",tA),I(t,"beforeRender",tw),I(t,"beforeShowResetZoom",tS),I(t,"update",tE)}},{isTouchDevice:tO}=w();function tT(){this.navigatorAxis||(this.navigatorAxis=new tI(this))}function tC(t){let e,i=this.chart,s=i.options,o=s.navigator,r=this.navigatorAxis,n=i.zooming.pinchType,a=s.rangeSelector,l=i.zooming.type;if(this.isXAxis&&(o?.enabled||a?.enabled)){if("y"===l&&"zoom"===t.trigger)e=!1;else if(("zoom"===t.trigger&&"xy"===l||tO&&"xy"===n)&&this.options.range){let e=r.previousZoom;W(t.min)?r.previousZoom=[this.min,this.max]:e&&(t.min=e[0],t.max=e[1],r.previousZoom=void 0)}}void 0!==e&&t.preventDefault()}class tI{static compose(t){t.keepProps.includes("navigatorAxis")||(t.keepProps.push("navigatorAxis"),I(t,"init",tT),I(t,"setExtremes",tC))}constructor(t){this.axis=t}destroy(){this.axis=void 0}toFixedRange(t,e,i,s){let o=this.axis,r=(o.pointRange||0)/2,n=K(i,o.translate(t,!0,!o.horiz)),a=K(s,o.translate(e,!0,!o.horiz));return W(i)||(n=L(n+r)),W(s)||(a=L(a-r)),V(n)&&V(a)||(n=a=void 0),{min:n,max:a}}}var tD=M(620),tL=M.n(tD),tR=M(512),tz=M.n(tR);let{parse:tG}=tL(),{seriesTypes:tW}=tz(),tN={height:40,margin:22,maskInside:!0,handles:{width:7,borderRadius:0,height:15,symbols:["navigator-handle","navigator-handle"],enabled:!0,lineWidth:1,backgroundColor:"#f2f2f2",borderColor:"#999999"},maskFill:tG("#667aff").setOpacity(.3).get(),outlineColor:"#999999",outlineWidth:1,series:{type:void 0===tW.areaspline?"line":"areaspline",fillOpacity:.05,lineWidth:1,compare:null,sonification:{enabled:!1},dataGrouping:{approximation:"average",enabled:!0,groupPixelWidth:2,firstAnchor:"firstPoint",anchor:"middle",lastAnchor:"lastPoint",units:[["millisecond",[1,2,5,10,20,25,50,100,200,500]],["second",[1,2,5,10,15,30]],["minute",[1,2,5,10,15,30]],["hour",[1,2,3,4,6,8,12]],["day",[1,2,3,4]],["week",[1,2,3]],["month",[1,3,6]],["year",null]]},dataLabels:{enabled:!1,zIndex:2},id:"highcharts-navigator-series",className:"highcharts-navigator-series",lineColor:null,marker:{enabled:!1},threshold:null},xAxis:{className:"highcharts-navigator-xaxis",tickLength:0,lineWidth:0,gridLineColor:"#e6e6e6",id:"navigator-x-axis",gridLineWidth:1,tickPixelInterval:200,labels:{align:"left",style:{color:"#000000",fontSize:"0.7em",opacity:.6,textOutline:"2px contrast"},x:3,y:-4},crosshair:!1},yAxis:{className:"highcharts-navigator-yaxis",gridLineWidth:0,startOnTick:!1,endOnTick:!1,minPadding:.1,id:"navigator-y-axis",maxPadding:.1,labels:{enabled:!1},crosshair:!1,title:{text:void 0},tickLength:0,tickWidth:0}},tH={"navigator-handle":function(t,e,i,s,o={}){var r,n,a,l,h;let d=o.width?o.width/2:i,c=Q(o.borderRadius||0,Math.min(2*d,s));return[["M",-1.5,(s=o.height||s)/2-3.5],["L",-1.5,s/2+4.5],["M",.5,s/2-3.5],["L",.5,s/2+4.5],...(r=-d-1,n=.5,a=2*d+1,l=s,h={r:c},h?.r?function(t,e,i,s,o){let r=o?.r||0;return[["M",t+r,e],["L",t+i-r,e],["A",r,r,0,0,1,t+i,e+r],["L",t+i,e+s-r],["A",r,r,0,0,1,t+i-r,e+s],["L",t+r,e+s],["A",r,r,0,0,1,t,e+s-r],["L",t,e+r],["A",r,r,0,0,1,t+r,e],["Z"]]}(r,.5,a,l,h):[["M",r,.5],["L",r+a,.5],["L",r+a,.5+l],["L",r,.5+l],["Z"]])]}};var tF=M(608),tU=M.n(tF);let{defaultOptions:tX}=w(),{composed:tY}=w(),{getRendererType:tV}=tU(),{setFixedRange:t_}={setFixedRange:function(t){let e=this.xAxis[0];W(e.dataMax)&&W(e.dataMin)&&t?this.fixedRange=Math.min(t,e.dataMax-e.dataMin):this.fixedRange=t}};function tj(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1)}let tq=function(t,e,i){tI.compose(e),J(tY,"Navigator")&&(t.prototype.setFixedRange=t_,F(tV().prototype.symbols,tH),F(tX,{navigator:tN}),I(i,"afterUpdate",tj))},{composed:tZ}=w();!function(t){let e;function i(t){let e=K(t.options?.min,t.min),i=K(t.options?.max,t.max);return{axisMin:e,axisMax:i,scrollMin:W(t.dataMin)?Math.min(e,t.min??1/0,t.dataMin,t.threshold??1/0):e,scrollMax:t.treeGrid?.adjustedMax??(W(t.dataMax)?Math.max(i,t.max??-1/0,t.dataMax,t.threshold??-1/0):i)}}function s(){let t=this.scrollbar,e=t&&!t.options.opposite,i=this.horiz?2:e?3:1;t&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[i]+=t.size+(t.options.margin||0))}function o(){let t=this;t.options?.scrollbar?.enabled&&(t.options.scrollbar.vertical=!t.horiz,t.options.startOnTick=t.options.endOnTick=!1,t.scrollbar=new e(t.chart.renderer,t.options.scrollbar,t.chart),I(t.scrollbar,"changed",function(e){let s,o,{axisMin:r,axisMax:n,scrollMin:a,scrollMax:l}=i(t),h=t.toPixels(a),d=t.toPixels(l)-h;if(W(r)&&W(n))if(t.horiz&&!t.reversed||!t.horiz&&t.reversed?(s=Math.min(l,t.toValue(h+d*this.to)),o=Math.max(a,t.toValue(h+d*this.from))):(s=Math.min(l,t.toValue(h+d*(1-this.from))),o=Math.max(a,t.toValue(h+d*(1-this.to)))),this.shouldUpdateExtremes(e.DOMType)){let i="mousemove"!==e.DOMType&&"touchmove"!==e.DOMType&&void 0;t.setExtremes(L(o),L(s),!0,i,e)}else this.setRange(this.from,this.to)}))}function r(){let t,e,s,{scrollMin:o,scrollMax:r}=i(this),n=this.scrollbar,a=(this.axisTitleMargin||0)+(this.titleOffset||0),l=this.chart.scrollbarsOffsets,h=this.options.margin||0;if(n&&l){if(this.horiz)this.opposite||(l[1]+=a),n.position(this.left,this.top+this.height+2+l[1]-(this.opposite?h:0),this.width,this.height),this.opposite||(l[1]+=h),t=1;else{let e;this.opposite&&(l[0]+=a),e=n.options.opposite?this.left+this.width+2+l[0]-(this.opposite?0:h):this.opposite?0:h,n.position(e,this.top,this.width,this.height),this.opposite&&(l[0]+=h),t=0}if(l[t]+=n.size+(n.options.margin||0),isNaN(o)||isNaN(r)||!W(this.min)||!W(this.max)||W(this.dataMin)&&this.dataMin===this.dataMax)n.setRange(0,1);else if(this.min===this.max){let t=this.pointRange/(this.dataMax+1);e=t*this.min,s=t*(this.max+1),n.setRange(e,s)}else e=(this.toPixels(this.min)-this.toPixels(o))/(this.toPixels(r)-this.toPixels(o)),s=(this.toPixels(this.max)-this.toPixels(o))/(this.toPixels(r)-this.toPixels(o)),this.horiz&&!this.reversed||!this.horiz&&this.reversed?n.setRange(e,s):n.setRange(1-s,1-e)}}t.compose=function(t,i){J(tZ,"Axis.Scrollbar")&&(e=i,I(t,"afterGetOffset",s),I(t,"afterInit",o),I(t,"afterRender",r))}}(x||(x={}));let t$=x,tK={height:10,barBorderRadius:5,buttonBorderRadius:0,buttonsEnabled:!1,liveRedraw:void 0,margin:void 0,minWidth:6,opposite:!0,step:.2,zIndex:3,barBackgroundColor:"#cccccc",barBorderWidth:0,barBorderColor:"#cccccc",buttonArrowColor:"#333333",buttonBackgroundColor:"#e6e6e6",buttonBorderColor:"#cccccc",buttonBorderWidth:1,rifleColor:"none",trackBackgroundColor:"rgba(255, 255, 255, 0.001)",trackBorderColor:"#cccccc",trackBorderRadius:5,trackBorderWidth:1},{defaultOptions:tJ}=w(),{composed:tQ}=w();class t0{static compose(t){t$.compose(t,t0),J(tQ,"Scrollbar")&&F(tJ,{scrollbar:tK})}static swapXY(t,e){return e&&t.forEach(t=>{let e,i=t.length;for(let s=0;s<i;s+=2)"number"==typeof(e=t[s+1])&&(t[s+1]=t[s+2],t[s+2]=e)}),t}constructor(t,e,i){this._events=[],this.chartX=0,this.chartY=0,this.from=0,this.scrollbarButtons=[],this.scrollbarLeft=0,this.scrollbarStrokeWidth=1,this.scrollbarTop=0,this.size=0,this.to=0,this.trackBorderWidth=1,this.x=0,this.y=0,this.init(t,e,i)}addEvents(){let t=this.options.inverted?[1,0]:[0,1],e=this.scrollbarButtons,i=this.scrollbarGroup.element,s=this.track.element,o=this.mouseDownHandler.bind(this),r=this.mouseMoveHandler.bind(this),n=this.mouseUpHandler.bind(this),a=[[e[t[0]].element,"click",this.buttonToMinClick.bind(this)],[e[t[1]].element,"click",this.buttonToMaxClick.bind(this)],[s,"click",this.trackClick.bind(this)],[i,"mousedown",o],[i.ownerDocument,"mousemove",r],[i.ownerDocument,"mouseup",n],[i,"touchstart",o],[i.ownerDocument,"touchmove",r],[i.ownerDocument,"touchend",n]];a.forEach(function(t){I.apply(null,t)}),this._events=a}buttonToMaxClick(t){let e=(this.to-this.from)*K(this.options.step,.2);this.updatePosition(this.from+e,this.to+e),U(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:t})}buttonToMinClick(t){let e=L(this.to-this.from)*K(this.options.step,.2);this.updatePosition(L(this.from-e),L(this.to-e)),U(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:t})}cursorToScrollbarPosition(t){let e=this.options,i=e.minWidth>this.calculatedWidth?e.minWidth:0;return{chartX:(t.chartX-this.x-this.xOffset)/(this.barWidth-i),chartY:(t.chartY-this.y-this.yOffset)/(this.barWidth-i)}}destroy(){let t=this,e=t.chart.scroller;t.removeEvents(),["track","scrollbarRifles","scrollbar","scrollbarGroup","group"].forEach(function(e){t[e]&&t[e].destroy&&(t[e]=t[e].destroy())}),e&&t===e.scrollbar&&(e.scrollbar=null,N(e.scrollbarButtons))}drawScrollbarButton(t){let e=this.renderer,i=this.scrollbarButtons,s=this.options,o=this.size,r=e.g().add(this.group);if(i.push(r),s.buttonsEnabled){let n=e.rect().addClass("highcharts-scrollbar-button").add(r);this.chart.styledMode||n.attr({stroke:s.buttonBorderColor,"stroke-width":s.buttonBorderWidth,fill:s.buttonBackgroundColor}),n.attr(n.crisp({x:-.5,y:-.5,width:o,height:o,r:s.buttonBorderRadius},n.strokeWidth()));let a=e.path(t0.swapXY([["M",o/2+(t?-1:1),o/2-3],["L",o/2+(t?-1:1),o/2+3],["L",o/2+(t?2:-2),o/2]],s.vertical)).addClass("highcharts-scrollbar-arrow").add(i[t]);this.chart.styledMode||a.attr({fill:s.buttonArrowColor})}}init(t,e,i){this.scrollbarButtons=[],this.renderer=t,this.userOptions=e,this.options=Z(tK,tJ.scrollbar,e),this.options.margin=K(this.options.margin,10),this.chart=i,this.size=K(this.options.size,this.options.height),e.enabled&&(this.render(),this.addEvents())}mouseDownHandler(t){let e=this.chart.pointer?.normalize(t)||t,i=this.cursorToScrollbarPosition(e);this.chartX=i.chartX,this.chartY=i.chartY,this.initPositions=[this.from,this.to],this.grabbedCenter=!0}mouseMoveHandler(t){let e,i=this.chart.pointer?.normalize(t)||t,s=this.options.vertical?"chartY":"chartX",o=this.initPositions||[];this.grabbedCenter&&(!t.touches||0!==t.touches[0][s])&&(e=this.cursorToScrollbarPosition(i)[s]-this[s],this.hasDragged=!0,this.updatePosition(o[0]+e,o[1]+e),this.hasDragged&&U(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:t.type,DOMEvent:t}))}mouseUpHandler(t){this.hasDragged&&U(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:t.type,DOMEvent:t}),this.grabbedCenter=this.hasDragged=this.chartX=this.chartY=null}position(t,e,i,s){let{buttonsEnabled:o,margin:r=0,vertical:n}=this.options,a=this.rendered?"animate":"attr",l=s,h=0;this.group.show(),this.x=t,this.y=e+this.trackBorderWidth,this.width=i,this.height=s,this.xOffset=l,this.yOffset=h,n?(this.width=this.yOffset=i=h=this.size,this.xOffset=l=0,this.yOffset=h=o?this.size:0,this.barWidth=s-(o?2*i:0),this.x=t+=r):(this.height=s=this.size,this.xOffset=l=o?this.size:0,this.barWidth=i-(o?2*s:0),this.y=this.y+r),this.group[a]({translateX:t,translateY:this.y}),this.track[a]({width:i,height:s}),this.scrollbarButtons[1][a]({translateX:n?0:i-l,translateY:n?s-h:0})}removeEvents(){this._events.forEach(function(t){tt.apply(null,t)}),this._events.length=0}render(){let t=this.renderer,e=this.options,i=this.size,s=this.chart.styledMode,o=t.g("scrollbar").attr({zIndex:e.zIndex}).hide().add();this.group=o,this.track=t.rect().addClass("highcharts-scrollbar-track").attr({r:e.trackBorderRadius||0,height:i,width:i}).add(o),s||this.track.attr({fill:e.trackBackgroundColor,stroke:e.trackBorderColor,"stroke-width":e.trackBorderWidth});let r=this.trackBorderWidth=this.track.strokeWidth();this.track.attr({x:-z(0,r),y:-z(0,r)}),this.scrollbarGroup=t.g().add(o),this.scrollbar=t.rect().addClass("highcharts-scrollbar-thumb").attr({height:i-r,width:i-r,r:e.barBorderRadius||0}).add(this.scrollbarGroup),this.scrollbarRifles=t.path(t0.swapXY([["M",-3,i/4],["L",-3,2*i/3],["M",0,i/4],["L",0,2*i/3],["M",3,i/4],["L",3,2*i/3]],e.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup),s||(this.scrollbar.attr({fill:e.barBackgroundColor,stroke:e.barBorderColor,"stroke-width":e.barBorderWidth}),this.scrollbarRifles.attr({stroke:e.rifleColor,"stroke-width":1})),this.scrollbarStrokeWidth=this.scrollbar.strokeWidth(),this.scrollbarGroup.translate(-z(0,this.scrollbarStrokeWidth),-z(0,this.scrollbarStrokeWidth)),this.drawScrollbarButton(0),this.drawScrollbarButton(1)}setRange(t,e){let i,s,o=this.options,r=o.vertical,n=o.minWidth,a=this.barWidth,l=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?"attr":"animate";if(!W(a))return;let h=a*Math.min(e,1);i=Math.ceil(a*(t=Math.max(t,0))),this.calculatedWidth=s=L(h-i),s<n&&(i=(a-n+s)*t,s=n);let d=Math.floor(i+this.xOffset+this.yOffset),c=s/2-.5;this.from=t,this.to=e,r?(this.scrollbarGroup[l]({translateY:d}),this.scrollbar[l]({height:s}),this.scrollbarRifles[l]({translateY:c}),this.scrollbarTop=d,this.scrollbarLeft=0):(this.scrollbarGroup[l]({translateX:d}),this.scrollbar[l]({width:s}),this.scrollbarRifles[l]({translateX:c}),this.scrollbarLeft=d,this.scrollbarTop=0),s<=12?this.scrollbarRifles.hide():this.scrollbarRifles.show(),!1===o.showFull&&(t<=0&&e>=1?this.group.hide():this.group.show()),this.rendered=!0}shouldUpdateExtremes(t){return K(this.options.liveRedraw,w().svg&&!w().isTouchDevice&&!this.chart.boosted)||"mouseup"===t||"touchend"===t||!W(t)}trackClick(t){let e=this.chart.pointer?.normalize(t)||t,i=this.to-this.from,s=this.y+this.scrollbarTop,o=this.x+this.scrollbarLeft;this.options.vertical&&e.chartY>s||!this.options.vertical&&e.chartX>o?this.updatePosition(this.from+i,this.to+i):this.updatePosition(this.from-i,this.to-i),U(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:t})}update(t){this.destroy(),this.init(this.chart.renderer,Z(!0,this.options,t),this.chart)}updatePosition(t,e){e>1&&(t=L(1-L(e-t)),e=1),t<0&&(e=L(e-t),t=0),this.from=t,this.to=e}}t0.defaultOptions=tK;let{defaultOptions:t1}=w(),{isTouchDevice:t2}=w();function t3(t,...e){let i=[].filter.call(e,V);if(i.length)return Math[t].apply(0,i)}class t5{static compose(t,e,i){tP(t,t5),tq(t,e,i)}constructor(t){this.isDirty=!1,this.scrollbarHeight=0,this.init(t)}drawHandle(t,e,i,s){let o=this.navigatorOptions.handles.height;this.handles[e][s](i?{translateX:Math.round(this.left+this.height/2),translateY:Math.round(this.top+parseInt(t,10)+.5-o)}:{translateX:Math.round(this.left+parseInt(t,10)),translateY:Math.round(this.top+this.height/2-o/2-1)})}drawOutline(t,e,i,s){let o=this.navigatorOptions.maskInside,r=this.outline.strokeWidth(),n=r/2,a=r%2/2,l=this.scrollButtonSize,h=this.size,d=this.top,c=this.height,p=d-n,u=d+c,g=this.left,x,f;i?(x=d+e+a,e=d+t+a,f=[["M",g+c,d-l-a],["L",g+c,x],["L",g,x],["M",g,e],["L",g+c,e],["L",g+c,d+h+l]],o&&f.push(["M",g+c,x-n],["L",g+c,e+n])):(g-=l,t+=g+l-a,e+=g+l-a,f=[["M",g,p],["L",t,p],["L",t,u],["M",e,u],["L",e,p],["L",g+h+2*l,p]],o&&f.push(["M",t-n,p],["L",e+n,p])),this.outline[s]({d:f})}drawMasks(t,e,i,s){let o,r,n,a,l=this.left,h=this.top,d=this.height;i?(n=[l,l,l],a=[h,h+t,h+e],r=[d,d,d],o=[t,e-t,this.size-e]):(n=[l,l+t,l+e],a=[h,h,h],r=[t,e-t,this.size-e],o=[d,d,d]),this.shades.forEach((t,e)=>{t[s]({x:n[e],y:a[e],width:r[e],height:o[e]})})}renderElements(){let t=this,e=t.navigatorOptions,i=e.maskInside,s=t.chart,o=s.inverted,r=s.renderer,n={cursor:o?"ns-resize":"ew-resize"},a=t.navigatorGroup??(t.navigatorGroup=r.g("navigator").attr({zIndex:8,visibility:"hidden"}).add());if([!i,i,!i].forEach((i,o)=>{let l=t.shades[o]??(t.shades[o]=r.rect().addClass("highcharts-navigator-mask"+(1===o?"-inside":"-outside")).add(a));s.styledMode||(l.attr({fill:i?e.maskFill:"rgba(0,0,0,0)"}),1===o&&l.css(n))}),t.outline||(t.outline=r.path().addClass("highcharts-navigator-outline").add(a)),s.styledMode||t.outline.attr({"stroke-width":e.outlineWidth,stroke:e.outlineColor}),e.handles?.enabled){let i=!1,o=e.handles,{height:l,width:h}=o;[0,1].forEach(e=>{let d=o.symbols[e];(i=i||t.handles[e]?.symbolName!==d)&&(t.handles[e]?.destroy(),t.handles[e]=r.symbol(d,-h/2-1,0,h,l,o),t.handles[e].attr({zIndex:7-e}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][e]).add(a)),s.inverted&&t.handles[e].attr({rotation:90,rotationOriginX:Math.floor(-h/2),rotationOriginY:(l+h)/2}),s.styledMode||t.handles[e].attr({fill:o.backgroundColor,stroke:o.borderColor,"stroke-width":o.lineWidth,width:o.width,height:o.height,x:-h/2-1,y:0}).css(n)}),i&&(t.partsEventsToUnbind?.forEach(t=>{t()}),t.partsEventsToUnbind=[...t.getPartsEvents("mousedown"),...t.getPartsEvents("touchstart")])}}update(t,e=!1){let i=this.chart,s=i.options.chart.inverted!==i.scrollbar?.options.vertical;if(Z(!0,i.options.navigator,t),this.navigatorOptions=i.options.navigator||{},this.setOpposite(),W(t.enabled)||s)return this.destroy(),this.navigatorEnabled=t.enabled||this.navigatorEnabled,this.init(i);if(this.navigatorEnabled&&(this.isDirty=!0,!1===t.adaptToUpdatedData&&this.baseSeries.forEach(t=>{tt(t,"updatedData",this.updatedDataHandler)},this),t.adaptToUpdatedData&&this.baseSeries.forEach(t=>{t.eventsToUnbind.push(I(t,"updatedData",this.updatedDataHandler))},this),(t.series||t.baseSeries)&&this.setBaseSeries(void 0,!1),t.height||t.xAxis||t.yAxis)){this.height=t.height??this.height;let e=this.getXAxisOffsets();this.xAxis.update({...t.xAxis,offsets:e,[i.inverted?"width":"height"]:this.height,[i.inverted?"height":"width"]:void 0},!1),this.yAxis.update({...t.yAxis,[i.inverted?"width":"height"]:this.height},!1)}e&&i.redraw()}render(t,e,i,s){let o=this.chart,r=this.xAxis,n=r.pointRange||0,a=r.navigatorAxis.fake?o.xAxis[0]:r,l=this.navigatorEnabled,h=this.rendered,d=o.inverted,c=o.xAxis[0].minRange,p=o.xAxis[0].options.maxRange,u=this.scrollButtonSize,g,x,f,m=this.scrollbarHeight,b,y;if(this.hasDragged&&!W(i))return;if(this.isDirty&&this.renderElements(),t=L(t-n/2),e=L(e+n/2),!V(t)||!V(e))if(!h)return;else i=0,s=K(r.width,a.width);this.left=K(r.left,o.plotLeft+u+(d?o.plotWidth:0));let v=this.size=b=K(r.len,(d?o.plotHeight:o.plotWidth)-2*u);g=d?m:b+2*u,i=K(i,r.toPixels(t,!0)),s=K(s,r.toPixels(e,!0)),V(i)&&Math.abs(i)!==1/0||(i=0,s=g);let M=r.toValue(i,!0),k=r.toValue(s,!0),A=Math.abs(L(k-M));W(c)&&A<c?this.grabbedLeft?i=r.toPixels(k-c-n,!0):this.grabbedRight&&(s=r.toPixels(M+c+n,!0)):W(p)&&L(A-n)>p&&(this.grabbedLeft?i=r.toPixels(k-p-n,!0):this.grabbedRight&&(s=r.toPixels(M+p+n,!0))),this.zoomedMax=D(Math.max(i,s),0,v),this.zoomedMin=D(this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(i,s),0,v),this.range=this.zoomedMax-this.zoomedMin,v=Math.round(this.zoomedMax);let w=Math.round(this.zoomedMin);l&&(this.navigatorGroup.attr({visibility:"inherit"}),y=h&&!this.hasDragged?"animate":"attr",this.drawMasks(w,v,d,y),this.drawOutline(w,v,d,y),this.navigatorOptions.handles?.enabled&&(this.drawHandle(w,0,d,y),this.drawHandle(v,1,d,y))),this.scrollbar&&(d?(f=this.top-u,x=this.left-m+(l||!a.opposite?0:(a.titleOffset||0)+a.axisTitleMargin),m=b+2*u):(f=this.top+(l?this.height:-m),x=this.left-u),this.scrollbar.position(x,f,g,m),this.scrollbar.setRange(this.zoomedMin/(b||1),this.zoomedMax/(b||1))),this.rendered=!0,this.isDirty=!1,U(this,"afterRender")}addMouseEvents(){let t,e,i=this,s=i.chart,o=s.container,r=[];i.mouseMoveHandler=t=function(t){i.onMouseMove(t)},i.mouseUpHandler=e=function(t){i.onMouseUp(t)},r.push(I(s.renderTo,"mousemove",t),I(o.ownerDocument,"mouseup",e),I(s.renderTo,"touchmove",t),I(o.ownerDocument,"touchend",e)),i.eventsToUnbind=r,i.series&&i.series[0]&&r.push(I(i.series[0].xAxis,"foundExtremes",function(){s.navigator?.modifyNavigatorAxisExtremes()}))}getPartsEvents(t){let e=this,i=[];return["shades","handles"].forEach(s=>{e[s].forEach(function(o,r){i.push(I(o.element,t,function(t){e[`${s}Mousedown`](t,r)}))})}),i}shadesMousedown(t,e){t=this.chart.pointer?.normalize(t)||t;let i=this.chart,s=this.xAxis,o=this.zoomedMin,r=this.size,n=this.range,a=this.left,l=t.chartX,h,d,c,p;i.inverted&&(l=t.chartY,a=this.top),1===e?(this.grabbedCenter=l,this.fixedWidth=n,this.dragOffset=l-o):(p=l-a-n/2,0===e?p=Math.max(0,p):2===e&&p+n>=r&&(p=r-n,this.reversedExtremes?(p-=n,d=this.getUnionExtremes()?.dataMin):h=this.getUnionExtremes()?.dataMax),p!==o&&(this.fixedWidth=n,W((c=s.navigatorAxis.toFixedRange(p,p+n,d,h)).min)&&U(this,"setRange",{min:Math.min(c.min,c.max),max:Math.max(c.min,c.max),redraw:!0,eventArguments:{trigger:"navigator"}})))}handlesMousedown(t,e){t=this.chart.pointer?.normalize(t)||t;let i=this.chart,s=i.xAxis[0],o=this.reversedExtremes;0===e?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=o?s.min:s.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=o?s.max:s.min),i.setFixedRange(void 0)}onMouseMove(t){let e=this,i=e.chart,s=e.navigatorSize,o=e.range,r=e.dragOffset,n=i.inverted,a=e.left,l;(!t.touches||0!==t.touches[0].pageX)&&(l=(t=i.pointer?.normalize(t)||t).chartX,n&&(a=e.top,l=t.chartY),e.grabbedLeft?(e.hasDragged=!0,e.render(0,0,l-a,e.otherHandlePos)):e.grabbedRight?(e.hasDragged=!0,e.render(0,0,e.otherHandlePos,l-a)):e.grabbedCenter&&r&&(e.hasDragged=!0,l<r?l=r:l>s+r-o&&(l=s+r-o),e.render(0,0,l-r,l-r+o)),e.hasDragged&&K(e.scrollbarOptions?.liveRedraw,!t2&&!this.chart.boosted)&&(t.DOMType=t.type,setTimeout(function(){e.onMouseUp(t)},0)))}onMouseUp(t){let e,i,s,o,r,n,a=this.chart,l=this.xAxis,h=this.scrollbar,d=t.DOMEvent||t,c=a.inverted,p=this.rendered&&!this.hasDragged?"animate":"attr";(this.hasDragged&&(!h||!h.hasDragged)||"scrollbar"===t.trigger)&&(s=this.getUnionExtremes(),this.zoomedMin===this.otherHandlePos?o=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(r=this.fixedExtreme),this.zoomedMax===this.size&&(r=this.reversedExtremes?s.dataMin:s.dataMax),0===this.zoomedMin&&(o=this.reversedExtremes?s.dataMax:s.dataMin),W((n=l.navigatorAxis.toFixedRange(this.zoomedMin,this.zoomedMax,o,r)).min)&&U(this,"setRange",{min:Math.min(n.min,n.max),max:Math.max(n.min,n.max),redraw:!0,animation:!this.hasDragged&&null,eventArguments:{trigger:"navigator",triggerOp:"navigator-drag",DOMEvent:d}})),"mousemove"!==t.DOMType&&"touchmove"!==t.DOMType&&(this.grabbedLeft=this.grabbedRight=this.grabbedCenter=this.fixedWidth=this.fixedExtreme=this.otherHandlePos=this.hasDragged=this.dragOffset=null),this.navigatorEnabled&&V(this.zoomedMin)&&V(this.zoomedMax)&&(i=Math.round(this.zoomedMin),e=Math.round(this.zoomedMax),this.shades&&this.drawMasks(i,e,c,p),this.outline&&this.drawOutline(i,e,c,p),this.navigatorOptions.handles?.enabled&&Object.keys(this.handles).length===this.handles.length&&(this.drawHandle(i,0,c,p),this.drawHandle(e,1,c,p)))}removeEvents(){this.eventsToUnbind?.forEach(t=>{t()}),this.eventsToUnbind=void 0,this.removeBaseSeriesEvents()}removeBaseSeriesEvents(){let t=this.baseSeries||[];this.navigatorEnabled&&t[0]&&(!1!==this.navigatorOptions.adaptToUpdatedData&&t.forEach(function(t){tt(t,"updatedData",this.updatedDataHandler)},this),t[0].xAxis&&tt(t[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes))}getXAxisOffsets(){return this.chart.inverted?[this.scrollButtonSize,0,-this.scrollButtonSize,0]:[0,-this.scrollButtonSize,0,this.scrollButtonSize]}init(t){let e=t.options,i=e.navigator||{},s=i.enabled,o=e.scrollbar||{},r=o.enabled,n=s&&i.height||0,a=r&&o.height||0,l=o.buttonsEnabled&&a||0;this.handles=[],this.shades=[],this.chart=t,this.setBaseSeries(),this.height=n,this.scrollbarHeight=a,this.scrollButtonSize=l,this.scrollbarEnabled=r,this.navigatorEnabled=!!s,this.navigatorOptions=i,this.scrollbarOptions=o,this.setOpposite();let h=this,d=h.baseSeries,c=t.xAxis.length,p=t.yAxis.length,u=d&&d[0]&&d[0].xAxis||t.xAxis[0]||{options:{}};if(t.isDirtyBox=!0,h.navigatorEnabled){let e=this.getXAxisOffsets();h.xAxis=new(tb())(t,Z({breaks:u.options.breaks,ordinal:u.options.ordinal,overscroll:u.options.overscroll},i.xAxis,{type:"datetime",yAxis:i.yAxis?.id,index:c,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:u.options.ordinal?0:u.options.minPadding,maxPadding:u.options.ordinal?0:u.options.maxPadding,zoomEnabled:!1},t.inverted?{offsets:e,width:n}:{offsets:e,height:n}),"xAxis"),h.yAxis=new(tb())(t,Z(i.yAxis,{alignTicks:!1,offset:0,index:p,isInternal:!0,reversed:K(i.yAxis&&i.yAxis.reversed,t.yAxis[0]&&t.yAxis[0].reversed,!1),zoomEnabled:!1},t.inverted?{width:n}:{height:n}),"yAxis"),d||i.series?.data?h.updateNavigatorSeries(!1):0===t.series.length&&(h.unbindRedraw=I(t,"beforeRedraw",function(){t.series.length>0&&!h.series&&(h.setBaseSeries(),h.unbindRedraw?.())})),h.reversedExtremes=t.inverted&&!h.xAxis.reversed||!t.inverted&&h.xAxis.reversed,h.renderElements(),h.addMouseEvents()}else h.xAxis={chart:t,navigatorAxis:{fake:!0},translate:function(e,i){let s=t.xAxis[0],o=s.getExtremes(),r=s.len-2*l,n=t3("min",s.options.min,o.dataMin),a=t3("max",s.options.max,o.dataMax)-n;return i?e*a/r+n:r*(e-n)/a},toPixels:function(t){return this.translate(t)},toValue:function(t){return this.translate(t,!0)}},h.xAxis.navigatorAxis.axis=h.xAxis,h.xAxis.navigatorAxis.toFixedRange=tI.prototype.toFixedRange.bind(h.xAxis.navigatorAxis);if(t.options.scrollbar?.enabled){let e=Z(t.options.scrollbar,{vertical:t.inverted});V(e.margin)||(e.margin=t.inverted?-3:3),t.scrollbar=h.scrollbar=new t0(t.renderer,e,t),I(h.scrollbar,"changed",function(t){let e=h.size,i=e*this.to,s=e*this.from;h.hasDragged=h.scrollbar?.hasDragged,h.render(0,0,s,i),this.shouldUpdateExtremes(t.DOMType)&&setTimeout(function(){h.onMouseUp(t)})})}h.addBaseSeriesEvents(),h.addChartEvents()}setOpposite(){let t=this.navigatorOptions,e=this.navigatorEnabled,i=this.chart;this.opposite=K(t.opposite,!!(!e&&i.inverted))}getUnionExtremes(t){let e,i=this.chart.xAxis[0],s=this.chart.time,o=this.xAxis,r=o.options,n=i.options;return t&&null===i.dataMin||(e={dataMin:K(s.parse(r?.min),t3("min",s.parse(n.min),i.dataMin,o.dataMin,o.min)),dataMax:K(s.parse(r?.max),t3("max",s.parse(n.max),i.dataMax,o.dataMax,o.max))}),e}setBaseSeries(t,e){let i=this.chart,s=this.baseSeries=[];t=t||i.options.navigator?.baseSeries||(i.series.length?X(i.series,t=>!t.options.isInternal).index:0),(i.series||[]).forEach((e,i)=>{!e.options.isInternal&&(e.options.showInNavigator||(i===t||e.options.id===t)&&!1!==e.options.showInNavigator)&&s.push(e)}),this.xAxis&&!this.xAxis.navigatorAxis.fake&&this.updateNavigatorSeries(!0,e)}updateNavigatorSeries(t,e){let i=this,s=i.chart,o=i.baseSeries,r={enableMouseTracking:!1,index:null,linkedTo:null,group:"nav",padXAxis:!1,xAxis:this.navigatorOptions.xAxis?.id,yAxis:this.navigatorOptions.yAxis?.id,showInLegend:!1,stacking:void 0,isInternal:!0,states:{inactive:{opacity:1}}},n=i.series=(i.series||[]).filter(t=>{let e=t.baseSeries;return!(e&&0>o.indexOf(e))||(e&&(tt(e,"updatedData",i.updatedDataHandler),delete e.navigatorSeries),t.chart&&t.destroy(),!1)}),a,l,h=i.navigatorOptions.series,d;o&&o.length&&o.forEach(t=>{let c=t.navigatorSeries,p=F({color:t.color,visible:t.visible},j(h)?t1.navigator.series:h);if(c&&!1===i.navigatorOptions.adaptToUpdatedData)return;r.name="Navigator "+o.length,d=(a=t.options||{}).navigatorOptions||{},p.dataLabels=te(p.dataLabels),(l=Z(a,r,p,d)).pointRange=K(p.pointRange,d.pointRange,t1.plotOptions[l.type||"line"]?.pointRange);let u=d.data||p.data;i.hasNavigatorData=i.hasNavigatorData||!!u,l.data=u||a.data?.slice(0),c&&c.options?c.update(l,e):(t.navigatorSeries=s.initSeries(l),s.setSortedData(),t.navigatorSeries.baseSeries=t,n.push(t.navigatorSeries))}),(h?.data&&!(o&&o.length)||j(h))&&(i.hasNavigatorData=!1,(h=te(h)).forEach((t,e)=>{r.name="Navigator "+(n.length+1),(l=Z(t1.navigator?.series,{color:s.series[e]&&!s.series[e].options.isInternal&&s.series[e].color||s.options.colors?.[e]||s.options.colors?.[0]},r,t)).data=t.data,l.data&&(i.hasNavigatorData=!0,n.push(s.initSeries(l)))})),t&&this.addBaseSeriesEvents()}addBaseSeriesEvents(){let t=this,e=t.baseSeries||[];e[0]&&e[0].xAxis&&e[0].eventsToUnbind.push(I(e[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes)),e.forEach(i=>{i.eventsToUnbind.push(I(i,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)})),i.eventsToUnbind.push(I(i,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)})),!1!==this.navigatorOptions.adaptToUpdatedData&&i.xAxis&&i.eventsToUnbind.push(I(i,"updatedData",this.updatedDataHandler)),i.eventsToUnbind.push(I(i,"remove",function(){e&&H(e,i),this.navigatorSeries&&t.series&&(H(t.series,this.navigatorSeries),W(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)}))})}getBaseSeriesMin(t){return this.baseSeries.reduce(function(t,e){return Math.min(t,e.getColumn("x")[0]??t)},t)}modifyNavigatorAxisExtremes(){let t=this.xAxis;if(void 0!==t.getExtremes){let e=this.getUnionExtremes(!0);e&&(e.dataMin!==t.min||e.dataMax!==t.max)&&(t.min=e.dataMin,t.max=e.dataMax)}}modifyBaseAxisExtremes(){let t,e,i=this.chart.navigator,s=this.getExtremes(),o=s.min,r=s.max,n=s.dataMin,a=s.dataMax,l=r-o,h=i?.stickToMin,d=i?.stickToMax,c=K(this.ordinal?.convertOverscroll(this.options.overscroll),0),p=i.series&&i.series[0],u=!!this.setExtremes;!(this.eventArgs&&"rangeSelectorButton"===this.eventArgs.trigger)&&(h&&(t=(e=n)+l),d&&(t=a+c,h||(e=Math.max(n,t-l,i.getBaseSeriesMin(p&&p.xData?p.xData[0]:-Number.MAX_VALUE)))),u&&(h||d)&&V(e)&&(this.min=this.userMin=e,this.max=this.userMax=t)),i.stickToMin=i.stickToMax=null}updatedDataHandler(){let t=this.chart.navigator,e=this.navigatorSeries,i=t.reversedExtremes?0===Math.round(t.zoomedMin):Math.round(t.zoomedMax)>=Math.round(t.size);t.stickToMax=K(this.chart.options.navigator&&this.chart.options.navigator.stickToMax,i),t.stickToMin=t.shouldStickToMin(this,t),e&&!t.hasNavigatorData&&(e.options.pointStart=this.getColumn("x")[0],e.setData(this.options.data,!1,void 0,!1))}shouldStickToMin(t,e){let i=e.getBaseSeriesMin(t.getColumn("x")[0]),s=t.xAxis,o=s.max,r=s.min,n=s.options.range;return!!(V(o)&&V(r))&&(n&&o-i>0?o-i<n:r<=i)}addChartEvents(){this.eventsToUnbind||(this.eventsToUnbind=[]),this.eventsToUnbind.push(I(this.chart,"redraw",function(){let t=this.navigator,e=t&&(t.baseSeries&&t.baseSeries[0]&&t.baseSeries[0].xAxis||this.xAxis[0]);e&&t.render(e.min,e.max)}),I(this.chart,"getMargins",function(){let t=this.navigator,e=t.opposite?"plotTop":"marginBottom";this.inverted&&(e=t.opposite?"marginRight":"plotLeft"),this[e]=(this[e]||0)+(t.navigatorEnabled||!this.inverted?t.height+(this.scrollbar?.options.margin||0)+t.scrollbarHeight:0)+(t.navigatorOptions.margin||0)}),I(this,"setRange",function(t){this.chart.xAxis[0].setExtremes(t.min,t.max,t.redraw,t.animation,t.eventArguments)}))}destroy(){this.removeEvents(),this.xAxis&&(H(this.chart.xAxis,this.xAxis),H(this.chart.axes,this.xAxis)),this.yAxis&&(H(this.chart.yAxis,this.yAxis),H(this.chart.axes,this.yAxis)),(this.series||[]).forEach(t=>{t.destroy&&t.destroy()}),["series","xAxis","yAxis","shades","outline","scrollbarTrack","scrollbarRifles","scrollbarGroup","scrollbar","navigatorGroup","rendered"].forEach(t=>{this[t]&&this[t].destroy&&this[t].destroy(),this[t]=null}),[this.handles].forEach(t=>{N(t)}),this.baseSeries.forEach(t=>{t.navigatorSeries=void 0}),this.navigatorEnabled=!1}}let t6={rangeSelectorZoom:"Zoom",rangeSelectorFrom:"",rangeSelectorTo:"→",rangeSelector:{allText:"All",allTitle:"View all",monthText:"{count}m",monthTitle:"View {count} {#eq count 1}month{else}months{/eq}",yearText:"{count}y",yearTitle:"View {count} {#eq count 1}year{else}years{/eq}",ytdText:"YTD",ytdTitle:"View year to date"}},t4={allButtonsEnabled:!1,buttons:[{type:"month",count:1},{type:"month",count:3},{type:"month",count:6},{type:"ytd"},{type:"year",count:1},{type:"all"}],buttonSpacing:5,dropdown:"responsive",enabled:void 0,verticalAlign:"top",buttonTheme:{width:28,height:18,padding:2,zIndex:7},floating:!1,x:0,y:0,height:void 0,inputBoxBorderColor:"none",inputBoxHeight:17,inputBoxWidth:void 0,inputDateFormat:"%[ebY]",inputDateParser:void 0,inputEditDateFormat:"%Y-%m-%d",inputEnabled:!0,inputPosition:{align:"right",x:0,y:0},inputSpacing:5,selected:void 0,buttonPosition:{align:"left",x:0,y:0},inputStyle:{color:"#334eff",cursor:"pointer",fontSize:"0.8em"},labelStyle:{color:"#666666",fontSize:"0.8em"}},{defaultOptions:t9}=w(),{composed:t8}=w(),t7=[];function et(){let t,e,i=this.range,s=i.type,o=this.max,r=this.chart.time,n=function(t,e){let i=r.toParts(t),o=i.slice();"year"===s?o[0]+=e:o[1]+=e;let n=r.makeTime.apply(r,o),a=r.toParts(n);return"month"===s&&i[1]===a[1]&&1===Math.abs(e)&&(o[0]=i[0],o[1]=i[1],o[2]=0),(n=r.makeTime.apply(r,o))-t};V(i)?(t=o-i,e=i):i&&(t=o+n(o,-(i.count||1)),this.chart&&this.chart.setFixedRange(o-t));let a=K(this.dataMin,5e-324);return V(t)||(t=a),t<=a&&(t=a,void 0===e&&(e=n(t,i.count)),this.newMax=Math.min(t+e,K(this.dataMax,Number.MAX_VALUE))),V(o)?!V(i)&&i&&i._offsetMin&&(t+=i._offsetMin):t=void 0,t}function ee(){this.rangeSelector?.redrawElements()}function ei(){this.options.rangeSelector&&this.options.rangeSelector.enabled&&(this.rangeSelector=new c(this))}function es(){let t=this.rangeSelector;if(t){V(t.deferredYTDClick)&&(t.clickButton(t.deferredYTDClick),delete t.deferredYTDClick);let e=t.options.verticalAlign;t.options.floating||("bottom"===e?this.extraBottomMargin=!0:"top"===e&&(this.extraTopMargin=!0))}}function eo(){let t,e=this.rangeSelector;if(!e)return;let i=this.xAxis[0].getExtremes(),s=this.legend,o=e&&e.options.verticalAlign;V(i.min)&&e.render(i.min,i.max),s?.display&&"top"===o&&o===s.options.verticalAlign&&(t=Z(this.spacingBox),"vertical"===s.options.layout?t.y=this.plotTop:t.y+=e.getHeight(),s.group.placed=!1,s.align(t))}function er(){for(let t=0,e=t7.length;t<e;++t){let e=t7[t];if(e[0]===this){e[1].forEach(t=>t()),t7.splice(t,1);return}}}function en(){let t=this.rangeSelector;if(t?.options?.enabled){let{min:e,max:i}=this.xAxis[0].getExtremes();V(e)&&t.inputGroup&&t.inputGroup.getBBox().width<20&&t.render(e,i);let s=t.getHeight(),o=t.options.verticalAlign;t.options.floating||("bottom"===o?this.marginBottom+=s:"middle"!==o&&(this.plotTop+=s))}}function ea(t){let e=t.options.rangeSelector,i=this.extraBottomMargin,s=this.extraTopMargin,o=this.rangeSelector;if(e&&e.enabled&&!W(o)&&this.options.rangeSelector&&(this.options.rangeSelector.enabled=!0,this.rangeSelector=o=new c(this)),this.extraBottomMargin=!1,this.extraTopMargin=!1,o){let t=e&&e.verticalAlign||o.options&&o.options.verticalAlign;o.options.floating||("bottom"===t?this.extraBottomMargin=!0:"middle"!==t&&(this.extraTopMargin=!0)),(this.extraBottomMargin!==i||this.extraTopMargin!==s)&&(this.isDirtyBox=!0)}}let el=function(t,e,i){if(c=i,J(t8,"RangeSelector")){let i=e.prototype;t.prototype.minFromRange=et,I(e,"afterGetContainer",ei),I(e,"beforeRender",es),I(e,"destroy",er),I(e,"getMargins",en),I(e,"redraw",eo),I(e,"update",ea),I(e,"beforeRedraw",ee),i.callbacks.push(eo),F(t9,{rangeSelector:t4}),F(t9.lang,t6)}};var eh=M(28),ed=M.n(eh),ec=M(984),ep=M.n(ec);let{defaultOptions:eu}=w(),{format:eg}=ep();function ex(t){let e=e=>RegExp(`%[[a-zA-Z]*${e}`).test(t);if(_(t)?-1!==t.indexOf("%L"):t.fractionalSecondDigits)return"text";let i=_(t)?["a","A","d","e","w","b","B","m","o","y","Y"].some(e):t.dateStyle||t.day||t.month||t.year,s=_(t)?["H","k","I","l","M","S"].some(e):t.timeStyle||t.hour||t.minute||t.second;return i&&s?"datetime-local":i?"date":s?"time":"text"}class ef{static compose(t,e){el(t,e,ef)}constructor(t){this.isDirty=!1,this.buttonOptions=[],this.initialButtonGroupWidth=0,this.maxButtonWidth=()=>{let t=0;return this.buttons.forEach(e=>{let i=e.getBBox();i.width>t&&(t=i.width)}),t},this.init(t)}clickButton(t,e){let i=this.chart,s=this.buttonOptions[t],o=i.xAxis[0],r=i.scroller&&i.scroller.getUnionExtremes()||o||{},n=s.type,a=s.dataGrouping,l=r.dataMin,h=r.dataMax,d,c=V(o?.max)?Math.round(Math.min(o.max,h??o.max)):void 0,p,u=s._range,g,x,f,m=!0;if(null!==l&&null!==h){if(this.setSelected(t),a&&(this.forcedDataGrouping=!0,tb().prototype.setDataGrouping.call(o||{chart:this.chart},a,!1),this.frozenStates=s.preserveDataGrouping),"month"===n||"year"===n)o?(x={range:s,max:c,chart:i,dataMin:l,dataMax:h},d=o.minFromRange.call(x),V(x.newMax)&&(c=x.newMax),m=!1):u=s;else if(u)V(c)&&(c=Math.min((d=Math.max(c-u,l))+u,h),m=!1);else if("ytd"===n)if(o)!o.hasData()||V(h)&&V(l)||(l=Number.MAX_VALUE,h=-Number.MAX_VALUE,i.series.forEach(t=>{let e=t.getColumn("x");e.length&&(l=Math.min(e[0],l),h=Math.max(e[e.length-1],h))}),e=!1),V(h)&&V(l)&&(d=g=(f=this.getYTDExtremes(h,l)).min,c=f.max);else{this.deferredYTDClick=t;return}else"all"===n&&o&&(i.navigator&&i.navigator.baseSeries[0]&&(i.navigator.baseSeries[0].xAxis.options.range=void 0),d=l,c=h);if(m&&s._offsetMin&&W(d)&&(d+=s._offsetMin),s._offsetMax&&W(c)&&(c+=s._offsetMax),this.dropdown&&(this.dropdown.selectedIndex=t+1),o)(V(d)||V(c))&&(o.setExtremes(d,c,K(e,!0),void 0,{trigger:"rangeSelectorButton",rangeSelectorButton:s}),i.setFixedRange(s._range));else{p=te(i.options.xAxis||{})[0];let t=I(i,"afterCreateAxes",function(){let t=i.xAxis[0];t.range=t.options.range=u,t.min=t.options.min=g});I(i,"load",function(){let e=i.xAxis[0];i.setFixedRange(s._range),e.options.range=p.range,e.options.min=p.min,t()})}U(this,"afterBtnClick")}}setSelected(t){this.selected=this.options.selected=t}init(t){let e=this,i=t.options.rangeSelector,s=t.options.lang,o=i.buttons,r=i.selected,n=function(){let t=e.minInput,i=e.maxInput;t&&t.blur&&U(t,"blur"),i&&i.blur&&U(i,"blur")};e.chart=t,e.options=i,e.buttons=[],e.buttonOptions=o.map(t=>(t.type&&s.rangeSelector&&(t.text??(t.text=s.rangeSelector[`${t.type}Text`]),t.title??(t.title=s.rangeSelector[`${t.type}Title`])),t.text=eg(t.text,{count:t.count||1}),t.title=eg(t.title,{count:t.count||1}),t)),this.eventsToUnbind=[],this.eventsToUnbind.push(I(t.container,"mousedown",n)),this.eventsToUnbind.push(I(t,"resize",n)),o.forEach(e.computeButtonRange),void 0!==r&&o[r]&&this.clickButton(r,!1),this.eventsToUnbind.push(I(t,"load",function(){t.xAxis&&t.xAxis[0]&&I(t.xAxis[0],"setExtremes",function(i){V(this.max)&&V(this.min)&&this.max-this.min!==t.fixedRange&&"rangeSelectorButton"!==i.trigger&&"updatedData"!==i.trigger&&e.forcedDataGrouping&&!e.frozenStates&&this.setDataGrouping(!1,!1)})})),this.createElements()}updateButtonStates(){let t=this,e=this.chart,i=this.dropdown,s=this.dropdownLabel,o=e.xAxis[0],r=Math.round(o.max-o.min),n=!o.hasVisibleSeries,a=24*36e5,l=e.scroller&&e.scroller.getUnionExtremes()||o,h=l.dataMin,d=l.dataMax,c=t.getYTDExtremes(d,h),p=c.min,u=c.max,g=t.selected,x=t.options.allButtonsEnabled,f=Array(t.buttonOptions.length).fill(0),m=V(g),b=t.buttons,y=!1,v=null;t.buttonOptions.forEach((e,i)=>{let s=e._range,l=e.type,c=e.count||1,b=e._offsetMax-e._offsetMin,M=i===g,k=s>d-h,A=s<o.minRange,w=!1,S=s===r;if(M&&k&&(y=!0),o.isOrdinal&&o.ordinal?.positions&&s&&r<s){let t=o.ordinal.positions;t[t.length-1]-t[0]>s&&(S=!0)}else("month"===l||"year"===l)&&r+36e5>=({month:28,year:365})[l]*a*c-b&&r-36e5<=({month:31,year:366})[l]*a*c+b?S=!0:"ytd"===l?(S=u-p+b===r,w=!M):"all"===l&&(S=o.max-o.min>=d-h);let B=!x&&!(y&&"all"===l)&&(k||A||n),E=y&&"all"===l||!w&&S||M&&t.frozenStates;B?f[i]=3:E&&(!m||i===g)&&(v=i)}),null!==v?(f[v]=2,t.setSelected(v),this.dropdown&&(this.dropdown.selectedIndex=v+1)):(t.setSelected(),this.dropdown&&(this.dropdown.selectedIndex=-1),s&&(s.setState(0),s.attr({text:(eu.lang.rangeSelectorZoom||"")+" ▾"})));for(let e=0;e<f.length;e++){let o=f[e],r=b[e];if(r.state!==o&&(r.setState(o),i)){i.options[e+1].disabled=3===o,2===o&&(s&&(s.setState(2),s.attr({text:t.buttonOptions[e].text+" ▾"})),i.selectedIndex=e+1);let r=s.getBBox();G(i,{width:`${r.width}px`,height:`${r.height}px`})}}}computeButtonRange(t){let e=t.type,i=t.count||1,s={millisecond:1,second:1e3,minute:6e4,hour:36e5,day:864e5,week:6048e5};s[e]?t._range=s[e]*i:("month"===e||"year"===e)&&(t._range=24*({month:30,year:365})[e]*36e5*i),t._offsetMin=K(t.offsetMin,0),t._offsetMax=K(t.offsetMax,0),t._range+=t._offsetMax-t._offsetMin}getInputValue(t){let e="min"===t?this.minInput:this.maxInput,i=this.chart.options.rangeSelector,s=this.chart.time;return e?("text"===e.type&&i.inputDateParser||this.defaultInputDateParser)(e.value,"UTC"===s.timezone,s):0}setInputValue(t,e){let i=this.options,s=this.chart.time,o="min"===t?this.minInput:this.maxInput,r="min"===t?this.minDateBox:this.maxDateBox;if(o){o.setAttribute("type",ex(i.inputDateFormat||"%e %b %Y"));let t=o.getAttribute("data-hc-time"),n=W(t)?Number(t):void 0;if(W(e)){let t=n;W(t)&&o.setAttribute("data-hc-time-previous",t),o.setAttribute("data-hc-time",e),n=e}o.value=s.dateFormat(this.inputTypeFormats[o.type]||i.inputEditDateFormat,n),r&&r.attr({text:s.dateFormat(i.inputDateFormat,n)})}}setInputExtremes(t,e,i){let s="min"===t?this.minInput:this.maxInput;if(s){let t=this.inputTypeFormats[s.type],o=this.chart.time;if(t){let r=o.dateFormat(t,e);s.min!==r&&(s.min=r);let n=o.dateFormat(t,i);s.max!==n&&(s.max=n)}}}showInput(t){let e="min"===t?this.minDateBox:this.maxDateBox,i="min"===t?this.minInput:this.maxInput;if(i&&e&&this.inputGroup){let t="text"===i.type,{translateX:s=0,translateY:o=0}=this.inputGroup,{x:r=0,width:n=0,height:a=0}=e,{inputBoxWidth:l}=this.options;G(i,{width:t?n+(l?-2:20)+"px":"auto",height:a-2+"px",border:"2px solid silver"}),t&&l?G(i,{left:s+r+"px",top:o+"px"}):G(i,{left:Math.min(Math.round(r+s-(i.offsetWidth-n)/2),this.chart.chartWidth-i.offsetWidth)+"px",top:o-(i.offsetHeight-a)/2+"px"})}}hideInput(t){let e="min"===t?this.minInput:this.maxInput;e&&G(e,{top:"-9999em",border:0,width:"1px",height:"1px"})}defaultInputDateParser(t,e,i){return i?.parse(t)||0}drawInput(t){let{chart:e,div:i,inputGroup:s}=this,o=this,r=e.renderer.style||{},n=e.renderer,a=e.options.rangeSelector,l=eu.lang,h="min"===t;function d(t){let{maxInput:i,minInput:s}=o,r=e.xAxis[0],n=e.scroller?.getUnionExtremes()||r,a=n.dataMin,l=n.dataMax,d=e.xAxis[0].getExtremes()[t],c=o.getInputValue(t);V(c)&&c!==d&&(h&&i&&V(a)?c>Number(i.getAttribute("data-hc-time"))?c=void 0:c<a&&(c=a):s&&V(l)&&(c<Number(s.getAttribute("data-hc-time"))?c=void 0:c>l&&(c=l)),void 0!==c&&r.setExtremes(h?c:r.min,h?r.max:c,void 0,void 0,{trigger:"rangeSelectorInput"}))}let c=l[h?"rangeSelectorFrom":"rangeSelectorTo"]||"",p=n.label(c,0).addClass("highcharts-range-label").attr({padding:2*!!c,height:c?a.inputBoxHeight:0}).add(s),u=n.label("",0).addClass("highcharts-range-input").attr({padding:2,width:a.inputBoxWidth,height:a.inputBoxHeight,"text-align":"center"}).on("click",function(){o.showInput(t),o[t+"Input"].focus()});e.styledMode||u.attr({stroke:a.inputBoxBorderColor,"stroke-width":1}),u.add(s);let g=R("input",{name:t,className:"highcharts-range-selector"},void 0,i);g.setAttribute("type",ex(a.inputDateFormat||"%e %b %Y")),e.styledMode||(p.css(Z(r,a.labelStyle)),u.css(Z({color:"#333333"},r,a.inputStyle)),G(g,F({position:"absolute",border:0,boxShadow:"0 0 15px rgba(0,0,0,0.3)",width:"1px",height:"1px",padding:0,textAlign:"center",fontSize:r.fontSize,fontFamily:r.fontFamily,top:"-9999em"},a.inputStyle))),g.onfocus=()=>{o.showInput(t)},g.onblur=()=>{g===w().doc.activeElement&&d(t),o.hideInput(t),o.setInputValue(t),g.blur()};let x=!1;return g.onchange=()=>{x||(d(t),o.hideInput(t),g.blur())},g.onkeypress=e=>{13===e.keyCode&&d(t)},g.onkeydown=e=>{x=!0,("ArrowUp"===e.key||"ArrowDown"===e.key||"Tab"===e.key)&&d(t)},g.onkeyup=()=>{x=!1},{dateBox:u,input:g,label:p}}getPosition(){let t=this.chart,e=t.options.rangeSelector,i="top"===e.verticalAlign?t.plotTop-t.axisOffset[0]:0;return{buttonTop:i+e.buttonPosition.y,inputTop:i+e.inputPosition.y-10}}getYTDExtremes(t,e){let i=this.chart.time,s=i.toParts(t)[0];return{max:t,min:Math.max(e,i.makeTime(s,0))}}createElements(){let t=this.chart,e=t.renderer,i=t.container,s=t.options,o=s.rangeSelector,r=o.inputEnabled,n=K(s.chart.style?.zIndex,0)+1;!1!==o.enabled&&(this.group=e.g("range-selector-group").attr({zIndex:7}).add(),this.div=R("div",void 0,{position:"relative",height:0,zIndex:n}),this.buttonOptions.length&&this.renderButtons(),i.parentNode&&i.parentNode.insertBefore(this.div,i),r&&this.createInputs())}createInputs(){this.inputGroup=this.chart.renderer.g("input-group").add(this.group);let t=this.drawInput("min");this.minDateBox=t.dateBox,this.minLabel=t.label,this.minInput=t.input;let e=this.drawInput("max");this.maxDateBox=e.dateBox,this.maxLabel=e.label,this.maxInput=e.input}render(t,e){if(!1===this.options.enabled)return;let i=this.chart,s=i.options.rangeSelector;if(s.inputEnabled){this.inputGroup||this.createInputs(),this.setInputValue("min",t),this.setInputValue("max",e),this.chart.styledMode||(this.maxLabel?.css(s.labelStyle),this.minLabel?.css(s.labelStyle));let o=i.scroller&&i.scroller.getUnionExtremes()||i.xAxis[0]||{};if(W(o.dataMin)&&W(o.dataMax)){let t=i.xAxis[0].minRange||0;this.setInputExtremes("min",o.dataMin,Math.min(o.dataMax,this.getInputValue("max"))-t),this.setInputExtremes("max",Math.max(o.dataMin,this.getInputValue("min"))+t,o.dataMax)}if(this.inputGroup){let t=0;[this.minLabel,this.minDateBox,this.maxLabel,this.maxDateBox].forEach(e=>{if(e){let{width:i}=e.getBBox();i&&(e.attr({x:t}),t+=i+s.inputSpacing)}})}}else this.inputGroup&&(this.inputGroup.destroy(),delete this.inputGroup);!this.chart.styledMode&&this.zoomText&&this.zoomText.css(s.labelStyle),this.alignElements(),this.updateButtonStates()}renderButtons(){var t;let{chart:e,options:i}=this,s=eu.lang,o=e.renderer,r=Z(i.buttonTheme),n=r&&r.states;delete r.width,delete r.states,this.buttonGroup=o.g("range-selector-buttons").add(this.group);let a=this.dropdown=R("select",void 0,{position:"absolute",padding:0,border:0,cursor:"pointer",opacity:1e-4},this.div),l=e.userOptions.rangeSelector?.buttonTheme;this.dropdownLabel=o.button("",0,0,()=>{},Z(r,{"stroke-width":K(r["stroke-width"],0),width:"auto",paddingLeft:K(i.buttonTheme.paddingLeft,l?.padding,8),paddingRight:K(i.buttonTheme.paddingRight,l?.padding,8)}),n&&n.hover,n&&n.select,n&&n.disabled).hide().add(this.group),I(a,"touchstart",()=>{a.style.fontSize="16px"});let h=w().isMS?"mouseover":"mouseenter",d=w().isMS?"mouseout":"mouseleave";I(a,h,()=>{U(this.dropdownLabel.element,h)}),I(a,d,()=>{U(this.dropdownLabel.element,d)}),I(a,"change",()=>{U(this.buttons[a.selectedIndex-1].element,"click")}),this.zoomText=o.label(s.rangeSelectorZoom||"",0).attr({padding:i.buttonTheme.padding,height:i.buttonTheme.height,paddingLeft:0,paddingRight:0}).add(this.buttonGroup),this.chart.styledMode||(this.zoomText.css(i.labelStyle),(t=i.buttonTheme)["stroke-width"]??(t["stroke-width"]=0)),R("option",{textContent:this.zoomText.textStr,disabled:!0},void 0,a),this.createButtons()}createButtons(){let{options:t}=this,e=Z(t.buttonTheme),i=e&&e.states,s=e.width||28;delete e.width,delete e.states,this.buttonOptions.forEach((t,e)=>{this.createButton(t,e,s,i)})}createButton(t,e,i,s){let{dropdown:o,buttons:r,chart:n,options:a}=this,l=n.renderer,h=Z(a.buttonTheme);o?.add(R("option",{textContent:t.title||t.text}),e+2),r[e]=l.button(t.text??"",0,0,i=>{let s,o=t.events&&t.events.click;o&&(s=o.call(t,i)),!1!==s&&this.clickButton(e),this.isActive=!0},h,s&&s.hover,s&&s.select,s&&s.disabled).attr({"text-align":"center",width:i}).add(this.buttonGroup),t.title&&r[e].attr("title",t.title)}alignElements(){let{buttonGroup:t,buttons:e,chart:i,group:s,inputGroup:o,options:r,zoomText:n}=this,a=i.options,l=a.exporting&&!1!==a.exporting.enabled&&a.navigation&&a.navigation.buttonOptions,{buttonPosition:h,inputPosition:d,verticalAlign:c}=r,p=(t,e,s)=>l&&this.titleCollision(i)&&"top"===c&&s&&e.y-t.getBBox().height-12<(l.y||0)+(l.height||0)+i.spacing[0]?-40:0,u=i.plotLeft;if(s&&h&&d){let a=h.x-i.spacing[3];if(t){if(this.positionButtons(),!this.initialButtonGroupWidth){let t=0;n&&(t+=n.getBBox().width+5),e.forEach((i,s)=>{t+=i.width||0,s!==e.length-1&&(t+=r.buttonSpacing)}),this.initialButtonGroupWidth=t}u-=i.spacing[3];let o=p(t,h,"right"===h.align||"right"===d.align);this.alignButtonGroup(o),this.buttonGroup?.translateY&&this.dropdownLabel.attr({y:this.buttonGroup.translateY}),s.placed=t.placed=i.hasLoaded}let l=0;r.inputEnabled&&o&&(l=p(o,d,"right"===h.align||"right"===d.align),"left"===d.align?a=u:"right"===d.align&&(a=-Math.max(i.axisOffset[1],-l)),o.align({y:d.y,width:o.getBBox().width,align:d.align,x:d.x+a-2},!0,i.spacingBox),o.placed=i.hasLoaded),this.handleCollision(l),s.align({verticalAlign:c},!0,i.spacingBox);let g=s.alignAttr.translateY,x=s.getBBox().height+20,f=0;if("bottom"===c){let t=i.legend&&i.legend.options;f=g-(x=x+(t&&"bottom"===t.verticalAlign&&t.enabled&&!t.floating?i.legend.legendHeight+K(t.margin,10):0)-20)-(r.floating?0:r.y)-(i.titleOffset?i.titleOffset[2]:0)-10}"top"===c?(r.floating&&(f=0),i.titleOffset&&i.titleOffset[0]&&(f=i.titleOffset[0]),f+=i.margin[0]-i.spacing[0]||0):"middle"===c&&(d.y===h.y?f=g:(d.y||h.y)&&(d.y<0||h.y<0?f-=Math.min(d.y,h.y):f=g-x)),s.translate(r.x,r.y+Math.floor(f));let{minInput:m,maxInput:b,dropdown:y}=this;r.inputEnabled&&m&&b&&(m.style.marginTop=s.translateY+"px",b.style.marginTop=s.translateY+"px"),y&&(y.style.marginTop=s.translateY+"px")}}redrawElements(){let t=this.chart,{inputBoxHeight:e,inputBoxBorderColor:i}=this.options;if(this.maxDateBox?.attr({height:e}),this.minDateBox?.attr({height:e}),t.styledMode||(this.maxDateBox?.attr({stroke:i}),this.minDateBox?.attr({stroke:i})),this.isDirty){this.isDirty=!1,this.isCollapsed=void 0;let t=this.options.buttons??[],e=Math.min(t.length,this.buttonOptions.length),{dropdown:i,options:s}=this,o=Z(s.buttonTheme),r=o&&o.states,n=o.width||28;if(t.length<this.buttonOptions.length)for(let e=this.buttonOptions.length-1;e>=t.length;e--){let t=this.buttons.pop();t?.destroy(),this.dropdown?.options.remove(e+1)}for(let s=e-1;s>=0;s--){let e=t[s];this.buttons[s].destroy(),i?.options.remove(s+1),this.createButton(e,s,n,r),this.computeButtonRange(e)}if(t.length>this.buttonOptions.length)for(let e=this.buttonOptions.length;e<t.length;e++)this.createButton(t[e],e,n,r),this.computeButtonRange(t[e]);this.buttonOptions=this.options.buttons??[],W(this.options.selected)&&this.buttons.length&&this.clickButton(this.options.selected,!1)}}alignButtonGroup(t,e){let{chart:i,options:s,buttonGroup:o,dropdown:r,dropdownLabel:n}=this,{buttonPosition:a}=s,l=i.plotLeft-i.spacing[3],h=a.x-i.spacing[3],d=i.plotLeft;"right"===a.align?(h+=t-l,this.hasVisibleDropdown&&(d=i.chartWidth+t-this.maxButtonWidth()-20)):"center"===a.align&&(h-=l/2,this.hasVisibleDropdown&&(d=i.chartWidth/2-this.maxButtonWidth())),r&&G(r,{left:d+"px",top:o?.translateY+"px"}),n?.attr({x:d}),o&&o.align({y:a.y,width:K(e,this.initialButtonGroupWidth),align:a.align,x:h},!0,i.spacingBox)}positionButtons(){let{buttons:t,chart:e,options:i,zoomText:s}=this,o=e.hasLoaded?"animate":"attr",{buttonPosition:r}=i,n=e.plotLeft,a=n;s&&"hidden"!==s.visibility&&(s[o]({x:K(n+r.x,n)}),a+=r.x+s.getBBox().width+5);for(let e=0,s=this.buttonOptions.length;e<s;++e)"hidden"!==t[e].visibility?(t[e][o]({x:a}),a+=(t[e].width||0)+i.buttonSpacing):t[e][o]({x:n})}handleCollision(t){let{chart:e,buttonGroup:i,inputGroup:s,initialButtonGroupWidth:o}=this,{buttonPosition:r,dropdown:n,inputPosition:a}=this.options,l=()=>{s&&i&&s.attr({translateX:s.alignAttr.translateX+(e.axisOffset[1]>=-t?0:-t),translateY:s.alignAttr.translateY+i.getBBox().height+10})};s&&i?a.align===r.align?(l(),o>e.plotWidth+t-20?this.collapseButtons():this.expandButtons()):o-t+s.getBBox().width>e.plotWidth?"responsive"===n||"always"===n?this.collapseButtons():l():this.expandButtons():i&&"responsive"===n&&(o>e.plotWidth?this.collapseButtons():this.expandButtons()),i&&("always"===n&&this.collapseButtons(),"never"===n&&this.expandButtons()),this.alignButtonGroup(t)}collapseButtons(){let{buttons:t,zoomText:e}=this;!0!==this.isCollapsed&&(this.isCollapsed=!0,e.hide(),t.forEach(t=>void t.hide()),this.showDropdown())}expandButtons(){let{buttons:t,zoomText:e}=this;!1!==this.isCollapsed&&(this.isCollapsed=!1,this.hideDropdown(),e.show(),t.forEach(t=>void t.show()),this.positionButtons())}showDropdown(){let{buttonGroup:t,dropdownLabel:e,dropdown:i}=this;t&&i&&(e.show(),G(i,{visibility:"inherit"}),this.hasVisibleDropdown=!0)}hideDropdown(){let{dropdown:t}=this;t&&(this.dropdownLabel.hide(),G(t,{visibility:"hidden"}),this.hasVisibleDropdown=!1)}getHeight(){let t=this.options,e=this.group,i=t.inputPosition,s=t.buttonPosition,o=t.y,r=s.y,n=i.y,a=0;if(t.height)return t.height;this.alignElements(),a=e?e.getBBox(!0).height+13+o:0;let l=Math.min(n,r);return(n<0&&r<0||n>0&&r>0)&&(a+=Math.abs(l)),a}titleCollision(t){return!(t.options.title.text||t.options.subtitle.text)}update(t,e=!0){let i=this.chart;if(Z(!0,this.options,t),this.options.selected&&this.options.selected>=this.options.buttons.length&&(this.options.selected=void 0,i.options.rangeSelector.selected=void 0),W(t.enabled))return this.destroy(),this.init(i);this.isDirty=!!t.buttons||!!t.buttonTheme,e&&this.render()}destroy(){let t=this,e=t.minInput,i=t.maxInput;t.eventsToUnbind&&(t.eventsToUnbind.forEach(t=>t()),t.eventsToUnbind=void 0),N(t.buttons),e&&(e.onfocus=e.onblur=e.onchange=null),i&&(i.onfocus=i.onblur=i.onchange=null),$(t,function(e,i){if(e&&"chart"!==i){if(e instanceof ed())e.destroy();else e instanceof window.HTMLElement&&e?.parentElement?.removeChild(e);delete t[i]}e!==ef.prototype[i]&&(t[i]=null)},this),this.buttons=[]}}F(ef.prototype,{inputTypeFormats:{"datetime-local":"%Y-%m-%dT%H:%M:%S",date:"%Y-%m-%d",time:"%H:%M:%S"}});function em(t,e){let i=[];for(let s=0;s<t.length;s++){let o=t[s][1],r=t[s][2];if("number"==typeof o&&"number"==typeof r)if(0===s)i.push(["M",o,r]);else if(s===t.length-1)i.push(["L",o,r]);else if(e){let n=t[s-1],a=t[s+1];if(n&&a){let t=n[1],s=n[2],l=a[1],h=a[2];if("number"==typeof t&&"number"==typeof l&&"number"==typeof s&&"number"==typeof h&&t!==l&&s!==h){let n=t<l?1:-1,a=s<h?1:-1;i.push(["L",o-n*Math.min(Math.abs(o-t),e),r-a*Math.min(Math.abs(r-s),e)],["C",o,r,o,r,o+n*Math.min(Math.abs(o-l),e),r+a*Math.min(Math.abs(r-h),e)])}}}else i.push(["L",o,r])}return i}let{min:eb,max:ey,abs:ev}=Math;function eM(t,e,i){let s=e-1e-7,o=i||0,r=t.length-1,n,a;for(;o<=r;)if((a=s-t[n=r+o>>1].xMin)>0)o=n+1;else{if(!(a<0))return n;r=n-1}return o>0?o-1:0}function ek(t,e){let i=eM(t,e.x+1)+1;for(;i--;){var s;if(t[i].xMax>=e.x&&(s=t[i],e.x<=s.xMax&&e.x>=s.xMin&&e.y<=s.yMax&&e.y>=s.yMin))return i}return -1}function eA(t){let e=[];if(t.length){e.push(["M",t[0].start.x,t[0].start.y]);for(let i=0;i<t.length;++i)e.push(["L",t[i].end.x,t[i].end.y])}return e}function ew(t,e){t.yMin=ey(t.yMin,e.yMin),t.yMax=eb(t.yMax,e.yMax),t.xMin=ey(t.xMin,e.xMin),t.xMax=eb(t.xMax,e.xMax)}let eS=function(t,e,i){let s=[],o=i.chartObstacles,r=ek(o,t),n=ek(o,e),a,l=K(i.startDirectionX,ev(e.x-t.x)>ev(e.y-t.y))?"x":"y",h,d,c,p;function u(t,e,i,s,o){let r={x:t.x,y:t.y};return r[e]=i[s||e]+(o||0),r}function g(t,e,i){let s=ev(e[i]-t[i+"Min"])>ev(e[i]-t[i+"Max"]);return u(e,i,t,i+(s?"Max":"Min"),s?1:-1)}n>-1?(a={start:d=g(o[n],e,l),end:e},p=d):p=e,r>-1&&(d=g(h=o[r],t,l),s.push({start:t,end:d}),d[l]>=t[l]==d[l]>=p[l]&&(c=t[l="y"===l?"x":"y"]<e[l],s.push({start:d,end:u(d,l,h,l+(c?"Max":"Min"),c?1:-1)}),l="y"===l?"x":"y"));let x=s.length?s[s.length-1].end:t;d=u(x,l,p),s.push({start:x,end:d});let f=u(d,l="y"===l?"x":"y",p);return s.push({start:d,end:f}),s.push(a),{path:em(eA(s),i.radius),obstacles:s}};function eB(t,e,i){let s=K(i.startDirectionX,ev(e.x-t.x)>ev(e.y-t.y)),o=s?"x":"y",r=[],n=i.obstacleMetrics,a=eb(t.x,e.x)-n.maxWidth-10,l=ey(t.x,e.x)+n.maxWidth+10,h=eb(t.y,e.y)-n.maxHeight-10,d=ey(t.y,e.y)+n.maxHeight+10,c,p,u,g=!1,x=i.chartObstacles,f=eM(x,l),m=eM(x,a);function b(t,e,i){let s,o,r,n,a=t.x<e.x?1:-1;t.x<e.x?(s=t,o=e):(s=e,o=t),t.y<e.y?(n=t,r=e):(n=e,r=t);let l=a<0?eb(eM(x,o.x),x.length-1):0;for(;x[l]&&(a>0&&x[l].xMin<=o.x||a<0&&x[l].xMax>=s.x);){if(x[l].xMin<=o.x&&x[l].xMax>=s.x&&x[l].yMin<=r.y&&x[l].yMax>=n.y){if(i)return{y:t.y,x:t.x<e.x?x[l].xMin-1:x[l].xMax+1,obstacle:x[l]};return{x:t.x,y:t.y<e.y?x[l].yMin-1:x[l].yMax+1,obstacle:x[l]}}l+=a}return e}function y(t,e,i,s,o){let r=o.soft,n=o.hard,a=s?"x":"y",l={x:e.x,y:e.y},h={x:e.x,y:e.y},d=t[a+"Max"]>=r[a+"Max"],c=t[a+"Min"]<=r[a+"Min"],p=t[a+"Max"]>=n[a+"Max"],u=t[a+"Min"]<=n[a+"Min"],g=ev(t[a+"Min"]-e[a]),x=ev(t[a+"Max"]-e[a]),f=10>ev(g-x)?e[a]<i[a]:x<g;h[a]=t[a+"Min"],l[a]=t[a+"Max"];let m=b(e,h,s)[a]!==h[a],y=b(e,l,s)[a]!==l[a];return f=m?!y||f:!y&&f,f=c?!d||f:!d&&f,f=u?!p||f:!p&&f}if((f=ek(x=x.slice(m,f+1),e))>-1){var v,M;let s,o;v=x[f],M=e,s=eb(v.xMax-M.x,M.x-v.xMin)<eb(v.yMax-M.y,M.y-v.yMin),o=y(v,M,t,s,{soft:i.hardBounds,hard:i.hardBounds}),u=s?{y:M.y,x:v[o?"xMax":"xMin"]+(o?1:-1)}:{x:M.x,y:v[o?"yMax":"yMin"]+(o?1:-1)},r.push({end:e,start:u}),e=u}for(;(f=ek(x,e))>-1;)p=e[o]-t[o]<0,(u={x:e.x,y:e.y})[o]=x[f][p?o+"Max":o+"Min"]+(p?1:-1),r.push({end:e,start:u}),e=u;return{path:eA(c=(c=function t(e,s,o){let r,n,c,p,u,f,m;if(e.x===s.x&&e.y===s.y)return[];let v=o?"x":"y",M=i.obstacleOptions.margin,k={soft:{xMin:a,xMax:l,yMin:h,yMax:d},hard:i.hardBounds};return(u=ek(x,e))>-1?(p=y(u=x[u],e,s,o,k),ew(u,i.hardBounds),m=o?{y:e.y,x:u[p?"xMax":"xMin"]+(p?1:-1)}:{x:e.x,y:u[p?"yMax":"yMin"]+(p?1:-1)},(f=ek(x,m))>-1&&(ew(f=x[f],i.hardBounds),m[v]=p?ey(u[v+"Max"]-M+1,(f[v+"Min"]+u[v+"Max"])/2):eb(u[v+"Min"]+M-1,(f[v+"Max"]+u[v+"Min"])/2),e.x===m.x&&e.y===m.y?(g&&(m[v]=p?ey(u[v+"Max"],f[v+"Max"])+1:eb(u[v+"Min"],f[v+"Min"])-1),g=!g):g=!1),n=[{start:e,end:m}]):(r=b(e,{x:o?s.x:e.x,y:o?e.y:s.y},o),n=[{start:e,end:{x:r.x,y:r.y}}],r[o?"x":"y"]!==s[o?"x":"y"]&&(p=y(r.obstacle,r,s,!o,k),ew(r.obstacle,i.hardBounds),c={x:o?r.x:r.obstacle[p?"xMax":"xMin"]+(p?1:-1),y:o?r.obstacle[p?"yMax":"yMin"]+(p?1:-1):r.y},o=!o,n=n.concat(t({x:r.x,y:r.y},c,o)))),n=n.concat(t(n[n.length-1].end,s,!o))}(t,e,s)).concat(r.reverse())),obstacles:c}}eS.requiresObstacles=!0,eB.requiresObstacles=!0;let eE={connectors:{type:"straight",radius:0,lineWidth:1,marker:{enabled:!1,align:"center",verticalAlign:"middle",inside:!1,lineWidth:1},startMarker:{symbol:"diamond"},endMarker:{symbol:"arrow-filled"}}},{setOptions:eP}=w();function eO(t){let e=t.shapeArgs;if(e)return{xMin:e.x||0,xMax:(e.x||0)+(e.width||0),yMin:e.y||0,yMax:(e.y||0)+(e.height||0)};let i=t.graphic&&t.graphic.getBBox();return i?{xMin:t.plotX-i.width/2,xMax:t.plotX+i.width/2,yMin:t.plotY-i.height/2,yMax:t.plotY+i.height/2}:null}!function(t){function e(t){let e,i,s=eO(this);switch(t.align){case"right":e="xMax";break;case"left":e="xMin"}switch(t.verticalAlign){case"top":i="yMin";break;case"bottom":i="yMax"}return{x:e?s[e]:(s.xMin+s.xMax)/2,y:i?s[i]:(s.yMin+s.yMax)/2}}function i(t,e){let i;return!W(e)&&(i=eO(this))&&(e={x:(i.xMin+i.xMax)/2,y:(i.yMin+i.yMax)/2}),Math.atan2(e.y-t.y,t.x-e.x)}function s(t,e,i){let s=2*Math.PI,o=eO(this),r=o.xMax-o.xMin,n=o.yMax-o.yMin,a=Math.atan2(n,r),l=r/2,h=n/2,d=o.xMin+l,c=o.yMin+h,p={x:d,y:c},u=t,g=1,x=!1,f=1,m=1;for(;u<-Math.PI;)u+=s;for(;u>Math.PI;)u-=s;return g=Math.tan(u),u>-a&&u<=a?(m=-1,x=!0):u>a&&u<=Math.PI-a?m=-1:u>Math.PI-a||u<=-(Math.PI-a)?(f=-1,x=!0):f=-1,x?(p.x+=f*l,p.y+=m*l*g):(p.x+=n/(2*g)*f,p.y+=m*h),i.x!==d&&(p.x=i.x),i.y!==c&&(p.y=i.y),{x:p.x+e*Math.cos(u),y:p.y-e*Math.sin(u)}}t.compose=function(t,o,r){let n=r.prototype;n.getPathfinderAnchorPoint||(t.prototype.callbacks.push(function(t){!1!==t.options.connectors.enabled&&((t.options.pathfinder||t.series.reduce(function(t,e){return e.options&&Z(!0,e.options.connectors=e.options.connectors||{},e.options.pathfinder),t||e.options&&e.options.pathfinder},!1))&&(Z(!0,t.options.connectors=t.options.connectors||{},t.options.pathfinder),(0,A.error)('WARNING: Pathfinder options have been renamed. Use "chart.connectors" or "series.connectors" instead.')),this.pathfinder=new o(this),this.pathfinder.update(!0))}),n.getMarkerVector=s,n.getPathfinderAnchorPoint=e,n.getRadiansToVector=i,eP(eE))}}(f||(f={}));let eT=f;var eC=M(260),eI=M.n(eC);let eD=Math.max,eL=Math.min;class eR{static compose(t,e){eT.compose(t,eR,e)}constructor(t){this.init(t)}init(t){this.chart=t,this.connections=[],I(t,"redraw",function(){this.pathfinder.update()})}update(t){let e=this.chart,i=this,s=i.connections;i.connections=[],e.series.forEach(function(t){t.visible&&!t.options.isInternal&&t.points.forEach(function(t){let s,o=t.options;o&&o.dependency&&(o.connect=o.dependency);let r=t.options?.connect?te(t.options.connect):[];t.visible&&!1!==t.isInside&&r.forEach(o=>{let r="string"==typeof o?o:o.to;r&&(s=e.get(r)),s instanceof eI()&&s.series.visible&&s.visible&&!1!==s.isInside&&i.connections.push(new tn(t,s,"string"==typeof o?{}:o))})})});for(let t=0,e,o,r=s.length,n=i.connections.length;t<r;++t){o=!1;let r=s[t];for(e=0;e<n;++e){let t=i.connections[e];if((r.options&&r.options.type)===(t.options&&t.options.type)&&r.fromPoint===t.fromPoint&&r.toPoint===t.toPoint){t.graphics=r.graphics,o=!0;break}}o||r.destroy()}delete this.chartObstacles,delete this.lineObstacles,i.renderConnections(t)}renderConnections(t){t?this.chart.series.forEach(function(t){let e=function(){let e=t.chart.pathfinder;(e&&e.connections||[]).forEach(function(e){e.fromPoint&&e.fromPoint.series===t&&e.render()}),t.pathfinderRemoveRenderEvent&&(t.pathfinderRemoveRenderEvent(),delete t.pathfinderRemoveRenderEvent)};!1===t.options.animation?e():t.pathfinderRemoveRenderEvent=I(t,"afterAnimate",e)}):this.connections.forEach(function(t){t.render()})}getChartObstacles(t){let e=this.chart.series,i=K(t.algorithmMargin,0),s=[],o;for(let t=0,o=e.length;t<o;++t)if(e[t].visible&&!e[t].options.isInternal)for(let o=0,r=e[t].points.length,n,a;o<r;++o)(a=e[t].points[o]).visible&&(n=function(t){let e=t.shapeArgs;if(e)return{xMin:e.x||0,xMax:(e.x||0)+(e.width||0),yMin:e.y||0,yMax:(e.y||0)+(e.height||0)};let i=t.graphic&&t.graphic.getBBox();return i?{xMin:t.plotX-i.width/2,xMax:t.plotX+i.width/2,yMin:t.plotY-i.height/2,yMax:t.plotY+i.height/2}:null}(a))&&s.push({xMin:n.xMin-i,xMax:n.xMax+i,yMin:n.yMin-i,yMax:n.yMax+i});return s=s.sort(function(t,e){return t.xMin-e.xMin}),W(t.algorithmMargin)||(o=t.algorithmMargin=function(t){let e,i=t.length,s=[];for(let o=0;o<i;++o)for(let r=o+1;r<i;++r)(e=function t(e,i,s){let o=K(s,10),r=e.yMax+o>i.yMin-o&&e.yMin-o<i.yMax+o,n=e.xMax+o>i.xMin-o&&e.xMin-o<i.xMax+o,a=r?e.xMin>i.xMax?e.xMin-i.xMax:i.xMin-e.xMax:1/0,l=n?e.yMin>i.yMax?e.yMin-i.yMax:i.yMin-e.yMax:1/0;return n&&r?o?t(e,i,Math.floor(o/2)):1/0:eL(a,l)}(t[o],t[r]))<80&&s.push(e);return s.push(80),eD(Math.floor(s.sort(function(t,e){return t-e})[Math.floor(s.length/10)]/2-1),1)}(s),s.forEach(function(t){t.xMin-=o,t.xMax+=o,t.yMin-=o,t.yMax+=o})),s}getObstacleMetrics(t){let e=0,i=0,s,o,r=t.length;for(;r--;)s=t[r].xMax-t[r].xMin,o=t[r].yMax-t[r].yMin,e<s&&(e=s),i<o&&(i=o);return{maxHeight:i,maxWidth:e}}getAlgorithmStartDirection(t){let e="left"!==t.align&&"right"!==t.align,i="top"!==t.verticalAlign&&"bottom"!==t.verticalAlign;return e?!!i&&void 0:!!i||void 0}}eR.prototype.algorithms={fastAvoid:eB,straight:function(t,e){return{path:[["M",t.x,t.y],["L",e.x,e.y]],obstacles:[{start:t,end:e}]}},simpleConnect:eS};/**
 * @license Highcharts Gantt JS v12.6.0 (2026-04-13)
 * @module highcharts/modules/pathfinder
 * @requires highcharts
 *
 * Pathfinder
 *
 * (c) 2016-2026 Highsoft AS
 * Author: Øystein Moseng
 *
 * A commercial license may be required depending on use.
 * See www.highcharts.com/license
 */let ez=w();function eG(){let t=this.chart.userOptions.chart;!this.horiz&&V(this.options.staticScale)&&(!t?.height||t.scrollablePlotArea?.minHeight)&&(this.staticScale=this.options.staticScale)}function eW(){if("adjustHeight"!==this.redrawTrigger){for(let t of this.axes||[]){let e=t.chart,i=t.options.staticScale;if(t.staticScale&&i&&W(t.min)&&W(t.max)){let s=(t.brokenAxis?.unitLength??t.max+t.tickInterval-t.min)*i,o=(s=Math.max(s,i))-e.plotHeight;!e.scrollablePixelsY&&Math.abs(o)>=1&&(e.plotHeight=s,e.redrawTrigger="adjustHeight",e.setSize(void 0,e.chartHeight+o,!!e.initiatedScale&&void 0)),t.series.forEach(function(t){let i=t.sharedClipKey&&e.sharedClips[t.sharedClipKey];i&&i.attr(e.inverted?{width:e.plotHeight}:{height:e.plotHeight})})}}this.initiatedScale=!0}this.redrawTrigger=void 0}ez.Pathfinder=ez.Pathfinder||eR,O(ez.SVGRenderer),ez.Pathfinder.compose(ez.Chart,ez.Point);let eN=function(t,e){let i=e.prototype;i.adjustHeight||(I(t,"afterSetOptions",eG),i.adjustHeight=eW,I(e,"render",i.adjustHeight))},eH=w();eN(eH.Axis,eH.Chart);let{column:{prototype:{pointClass:eF}}}=tz().seriesTypes;class eU extends eF{static getColorByCategory(t,e){let i=t.options.colors||t.chart.options.colors,s=i?i.length:t.chart.options.chart.colorCount,o=e.y%s,r=i?.[o];return{colorIndex:o,color:r}}resolveColor(){let t=this.series;if(t.options.colorByPoint&&!this.options.color){let e=eU.getColorByCategory(t,this);t.chart.styledMode||(this.color=e.color),(void 0===this.options.colorIndex||null===this.options.colorIndex)&&(this.colorIndex=e.colorIndex)}else this.color=this.options.color||t.color}constructor(t,e){super(t,e),this.y||(this.y=0)}applyOptions(t,e){return super.applyOptions(t,e),this.x2=this.series.chart.time.parse(this.x2),this.isNull=!this.isValid?.(),this.formatPrefix=this.isNull?"null":"point",this}setState(){super.setState.apply(this,arguments),this.series.drawPoint(this,this.series.getAnimationVerb())}isValid(){return"number"==typeof this.x&&"number"==typeof this.x2}}F(eU.prototype,{ttBelow:!1,tooltipDateKeys:["x","x2"]});let{composed:eX,noop:eY}=w(),{parse:eV}=tL(),{column:e_}=tz().seriesTypes;function ej(){let t,e;if(this.isXAxis){for(let i of(t=K(this.dataMax,-Number.MAX_VALUE),this.series)){let s=i.dataTable.getColumn("x2",!0)||i.dataTable.getColumn("end",!0);if(s)for(let i of s)V(i)&&i>t&&(t=i,e=!0)}e&&(this.dataMax=t)}}class eq extends e_{static compose(t){J(eX,"Series.XRange")&&I(t,"afterGetSeriesExtremes",ej)}init(){super.init.apply(this,arguments),this.options.stacking=void 0}getColumnMetrics(){let t=()=>{for(let t of this.chart.series){let e=t.xAxis;t.xAxis=t.yAxis,t.yAxis=e}};t();let e=super.getColumnMetrics();return t(),e}cropData(t,e,i){let s=t.getColumn("x")||[],o=t.getColumn("x2");t.setColumn("x",o,void 0,{silent:!0});let r=super.cropData(t,e,i);return t.setColumn("x",s.slice(r.start,r.end),void 0,{silent:!0}),r}findPointIndex(t){let e,{cropStart:i,points:s}=this,{id:o}=t;if(o){let t=X(s,t=>t.id===o);e=t?t.index:void 0}if(void 0===e){let i=X(s,e=>e.x===t.x&&e.x2===t.x2&&!e.touched);e=i?i.index:void 0}return this.cropped&&V(e)&&V(i)&&e>=i&&(e-=i),e}alignDataLabel(t){let e=t.plotX;t.plotX=K(t.dlBox?.centerX,t.plotX),t.dataLabel&&t.shapeArgs?.width&&t.dataLabel.css({width:`${t.shapeArgs.width}px`}),super.alignDataLabel.apply(this,arguments),t.plotX=e}translatePoint(t){let e=this.xAxis,i=this.yAxis,s=this.columnMetrics,o=this.options,r=o.minPointLength||0,n=(t.shapeArgs?.width||0)/2,a=this.pointXOffset=s.offset,l=K(t.x2,t.x+(t.len||0)),h=o.borderRadius,d=this.chart.plotTop,c=this.chart.plotLeft,p=t.plotX,u=e.translate(l,0,0,0,1),g=Math.abs(u-p),x=this.chart.inverted,f=K(o.borderWidth,1),m,b,y=s.offset,v=Math.round(s.width),M,k,A,w;r&&((m=r-g)<0&&(m=0),p-=m/2,u+=m/2),p=Math.max(p,-10),u=D(u,-10,e.len+10),W(t.options.pointWidth)&&(y-=(Math.ceil(t.options.pointWidth)-v)/2,v=Math.ceil(t.options.pointWidth)),o.pointPlacement&&V(t.plotY)&&i.categories&&(t.plotY=i.translate(t.y,0,1,0,1,o.pointPlacement));let S=z(Math.min(p,u),f),B=z(Math.max(p,u),f)-S,E=Math.min(Q("object"==typeof h?h.radius:h||0,v),Math.min(B,v)/2),P={x:S,y:z((t.plotY||0)+y,f),width:B,height:v,r:E};t.shapeArgs=P,x?t.tooltipPos[1]+=a+n:t.tooltipPos[0]-=n+a-P.width/2,k=(M=P.x)+P.width,M<0||k>e.len?(M=D(M,0,e.len),A=(k=D(k,0,e.len))-M,t.dlBox=Z(P,{x:M,width:k-M,centerX:A?A/2:null})):t.dlBox=null;let O=t.tooltipPos,T=+!!x,C=+!x,I=this.columnMetrics?this.columnMetrics.offset:-s.width/2;x?O[T]+=P.width/2:O[T]=D(O[T]+(e.reversed?-1:0)*P.width,e.left-c,e.left+e.len-c-1),O[C]=D(O[C]+(x?-1:1)*I,i.top-d,i.top+i.len-d-1),(b=t.partialFill??0)&&(q(b)&&(b=b.amount||0),V(b)||(b=0),t.partShapeArgs=Z(P),w=Math.max(Math.round(g*b+t.plotX-p),0),t.clipRectArgs={x:e.reversed?P.x+g-w:P.x,y:P.y,width:w,height:P.height}),t.key=t.category||t.name,t.yCategory=i.categories?.[t.y??-1]}translate(){for(let t of(super.translate.apply(this,arguments),this.points))this.translatePoint(t)}drawPoint(t,e){let i=this.options,s=this.chart.renderer,o=t.shapeType,r=t.shapeArgs,n=t.partShapeArgs,a=t.clipRectArgs,l=t.state,h=i.states[l||"normal"]||{},d=void 0===l?"attr":e,c=this.pointAttribs(t,l),p=K(this.chart.options.chart.animation,h.animation),u=t.graphic,g=t.partialFill;if(t.isNull||!1===t.visible)u&&(t.graphic=u.destroy());else if(u?u.rect[e](r):(t.graphic=u=s.g("point").addClass(t.getClassName()).add(t.group||this.group),u.rect=s[o](Z(r)).addClass(t.getClassName()).addClass("highcharts-partfill-original").add(u)),n&&(u.partRect?(u.partRect[e](Z(n)),u.partialClipRect[e](Z(a))):(u.partialClipRect=s.clipRect(a.x,a.y,a.width,a.height),u.partRect=s[o](n).addClass("highcharts-partfill-overlay").add(u).clip(u.partialClipRect))),!this.chart.styledMode&&(u.rect[e](c,p).shadow(i.shadow),n)){q(g)||(g={}),q(i.partialFill)&&(g=Z(i.partialFill,g));let e=g.fill||eV(c.fill).brighten(-.3).get()||eV(t.color||this.color).brighten(-.3).get();c.fill=e,u.partRect[d](c,p).shadow(i.shadow)}}drawPoints(){let t=this.getAnimationVerb();for(let e of this.points)this.drawPoint(e,t)}getAnimationVerb(){return this.chart.pointCount<(this.options.animationLimit||250)?"animate":"attr"}isPointInside(t){let e=t.shapeArgs,i=t.plotX,s=t.plotY;return e?void 0!==i&&void 0!==s&&s>=0&&s<=this.yAxis.len&&(e.x||0)+(e.width||0)>=0&&i<=this.xAxis.len:super.isPointInside.apply(this,arguments)}}eq.defaultOptions=Z(e_.defaultOptions,{colorByPoint:!0,dataLabels:{formatter:function(){let t=this.partialFill;if(q(t)&&(t=t.amount),V(t)&&t>0)return L(100*t)+"%"},inside:!0,verticalAlign:"middle",style:{whiteSpace:"nowrap"}},tooltip:{headerFormat:'<span style="font-size: 0.8em">{ucfirst point.x} - {point.x2}</span><br/>',pointFormat:'<span style="color:{point.color}">●</span> {series.name}: <b>{point.yCategory}</b><br/>'},borderRadius:3,pointRange:0}),F(eq.prototype,{pointClass:eU,pointArrayMap:["x2","y"],getExtremesFromAll:!0,keysAffectYAxis:["y"],parallelArrays:["x","x2","y"],requireSorting:!1,type:"xrange",animate:tz().series.prototype.animate,autoIncrement:eY,buildKDTree:eY}),tz().registerSeriesType("xrange",eq);/**
 * @license Highcharts JS v12.6.0 (2026-04-13)
 * @module highcharts/modules/xrange
 * @requires highcharts
 *
 * X-range series
 *
 * (c) 2010-2026 Highsoft AS
 * Author: Torstein Hønsi, Lars A. V. Cabrera
 *
 * A commercial license may be required depending on use.
 * See www.highcharts.com/license
 */let eZ=w();eq.compose(eZ.Axis);let{xrange:{prototype:{pointClass:e$}}}=tz().seriesTypes;class eK extends e${static setGanttPointAliases(t,e){t.x=t.start=e.time.parse(t.start??t.x),t.x2=t.end=e.time.parse(t.end??t.x2),t.partialFill=t.completed=t.completed??t.partialFill}applyOptions(t,e){let i=super.applyOptions(t,e);return eK.setGanttPointAliases(i,i.series.chart),this.isNull=!this.isValid?.(),this.formatPrefix=this.isNull?"null":"point",i}isValid(){return("number"==typeof this.start||"number"==typeof this.x)&&("number"==typeof this.end||"number"==typeof this.x2||this.milestone)}}var eJ=M(184),eQ=M.n(eJ);!function(t){function e(){void 0!==this.brokenAxis&&this.brokenAxis.setBreaks(this.options.breaks,!1)}function i(){Object.keys(this.options.breaks?.[0]||{}).length&&(this.options.ordinal=!1)}function s(){let t=this.brokenAxis;if(t?.hasBreaks){let e=this.tickPositions,i=this.tickPositions.info,s=[];for(let i=0;i<e.length;i++)t.isInAnyBreak(e[i])||s.push(e[i]);this.tickPositions=s,this.tickPositions.info=i}}function o(){this.brokenAxis||(this.brokenAxis=new h(this))}function r(){let{isDirty:t,options:{connectNulls:e},points:i,xAxis:s,yAxis:o}=this;if(t){let t=i.length;for(;t--;){let r=i[t],n=(null!==r.y||!1!==e)&&(s?.brokenAxis?.isInAnyBreak(r.x,!0)||o?.brokenAxis?.isInAnyBreak(r.y,!0));r.visible=!n&&!1!==r.options.visible}}}function n(){this.drawBreaks(this.xAxis,["x"]),this.drawBreaks(this.yAxis,K(this.pointArrayMap,["y"]))}function a(t,e){let i,s,o,r=this,n=r.points;if(t?.brokenAxis?.hasBreaks){let a=t.brokenAxis;e.forEach(function(e){i=a?.breakArray||[],s=t.isXAxis?t.min:K(r.options.threshold,t.min),n.forEach(function(r){o=r["stack"+e.toUpperCase()]??r[e],i.forEach(function(e){if(V(s)&&V(o)){let i="";s<e.from&&o>e.to||s>e.from&&o<e.from?i="pointBreak":(s<e.from&&o>e.from&&o<e.to||s>e.from&&o>e.to&&o<e.from)&&(i="pointInBreak"),i&&U(t,i,{point:r,brk:e})}})})})}}function l(){let t=this.currentDataGrouping,e=t?.gapSize,i=this.points.slice(),s=this.yAxis,o=this.options.gapSize,r=i.length-1;if(o&&r>0){let t,n;for("value"!==this.options.gapUnit&&(o*=this.basePointRange),e&&e>o&&e>=this.basePointRange&&(o=e);r--;)if(n&&!1!==n.visible||(n=i[r+1]),t=i[r],!1!==n.visible&&!1!==t.visible){if(n.x-t.x>o){let e=(t.x+n.x)/2;i.splice(r+1,0,{isNull:!0,x:e}),s.stacking&&this.options.stacking&&((s.stacking.stacks[this.stackKey][e]=new(eQ())(s,s.options.stackLabels,!1,e,this.stack??"")).total=0)}n=t}}return this.getGraphPath(i)}t.compose=function(t,h){if(!t.keepProps.includes("brokenAxis")){t.keepProps.push("brokenAxis"),I(t,"init",o),I(t,"afterInit",e),I(t,"afterSetTickPositions",s),I(t,"afterSetOptions",i);let d=h.prototype;d.drawBreaks=a,d.gappedPath=l,I(h,"afterGeneratePoints",r),I(h,"afterRender",n)}return t};class h{static isInBreak(t,e){let i=t.repeat||1/0,s=t.from,o=t.to-t.from,r=e>=s?(e-s)%i:i-(s-e)%i;return t.inclusive?r<=o:r<o&&0!==r}static lin2Val(t){let e=this.min||0,i=this.brokenAxis,s=i?.breakArray;if(!s?.length||!V(t))return t;let o=t;if(t>e)for(let t of s)if(t.from>o)break;else t.to<=o&&t.to>e?o+=t.len:h.isInBreak(t,o)&&(o+=t.len);else if(t<e)for(let t of s)if(t.from>e)break;else t.from>=o&&t.from<e?o-=t.len:h.isInBreak(t,o)&&(o-=t.len);return o}static val2Lin(t){let e=this.min||0,i=this.brokenAxis,s=i?.breakArray;if(!s?.length||!V(t))return t;let o=t;if(t>e){for(let i of s)if(i.to<=t&&i.to>e)o-=i.len;else if(i.from>t)break;else if(h.isInBreak(i,t)){o-=t-i.from;break}}else if(t<e){for(let i of s)if(i.from>=t&&i.from<e)o+=i.len;else if(i.from>e)break;else if(h.isInBreak(i,t)){o+=i.to-t;break}}return o}constructor(t){this.axis=t}findBreakAt(t,e){return X(e,function(e){return e.from<t&&t<e.to})}isInAnyBreak(t,e){let i=this.axis,s=i.options.breaks||[],o=s.length,r,n,a;if(o&&V(t)){for(;o--;)h.isInBreak(s[o],t)&&(r=!0,n||(n=K(s[o].showPoints,!i.isXAxis)));a=r&&e?r&&!n:r}return a}setBreaks(t,e){let i=this,s=i.axis,o=s.chart.time,r=j(t)&&!!Object.keys(t?.[0]||{}).length;s.isDirty=(i.hasBreaks??!1)!==r,i.hasBreaks=r,t?.forEach(t=>{t.from=o.parse(t.from)||0,t.to=o.parse(t.to)||0}),t!==s.options.breaks&&(s.options.breaks=s.userOptions.breaks=t),s.forceRedraw=!0,s.series.forEach(function(t){t.isDirty=!0}),r||s.val2lin!==h.val2Lin||(delete s.val2lin,delete s.lin2val),r&&(s.userOptions.ordinal=!1,s.lin2val=h.lin2Val,s.val2lin=h.val2Lin,s.setExtremes=function(t,e,o,r,n){if(i.hasBreaks&&!s.treeGrid?.tree){let s,o=this.brokenAxis.breakArray||[];for(;s=i.findBreakAt(t,o);)t=s.to;for(;s=i.findBreakAt(e,o);)e=s.from;e<t&&(e=t)}s.constructor.prototype.setExtremes.call(this,t,e,o,r,n)},s.setAxisTranslation=function(){if(s.constructor.prototype.setAxisTranslation.call(this),i.unitLength=void 0,i.hasBreaks){let t=s.options.breaks||[],e=[],o=[],r=s.pointRangePadding??0,n=0,a,l,d=s.userMin??s.min,c=s.userMax??s.max,p=s.dataMin??d,u=s.dataMax??c,g,x;V(s.threshold)&&(p=Math.min(p??s.threshold,s.threshold),u=Math.max(u??s.threshold,s.threshold)),s.treeGrid?.tree||t.forEach(function(t){l=t.repeat||1/0,V(d)&&V(c)&&(h.isInBreak(t,d)&&(d+=t.to%l-d%l),h.isInBreak(t,c)&&(c-=c%l-t.from%l))}),V(p)&&V(u)&&t.forEach(function(t){for(g=t.from,l=t.repeat||1/0;g-l>p;)g-=l;for(;g<p;)g+=l;for(x=g;x<u;x+=l)e.push({value:x,move:"in"}),e.push({value:x+t.to-t.from,move:"out",size:t.breakSize})}),e.sort(function(t,e){return t.value===e.value?("in"!==t.move)-("in"!==e.move):t.value-e.value}),a=0,g=p,e.forEach(t=>{1===(a+="in"===t.move?1:-1)&&"in"===t.move&&(g=t.value),0===a&&V(g)&&(o.push({from:g,to:t.value,len:t.value-g-(t.size||0)}),V(d)&&V(c)&&g<c&&t.value>d&&(n+=t.value-g-(t.size||0)))}),i.breakArray=o,V(d)&&V(c)&&V(s.min)&&(i.unitLength=c-d-n+r,U(s,"afterBreaks"),s.staticScale?s.transA=s.staticScale:i.unitLength&&(s.transA*=(c-s.min+r)/i.unitLength),r&&(s.minPixelPadding=s.transA*(s.minPointOffset||0)),s.min=d,s.max=c)}}),K(e,!0)&&s.chart.redraw()}}t.Additions=h}(m||(m={}));let e0=m,{dateFormats:e1}=w();(g=b||(b={}))[g.top=0]="top",g[g.right=1]="right",g[g.bottom=2]="bottom",g[g.left=3]="left";function e2(t,e){let i={width:0,height:0};if(e.forEach(function(e){let s=t[e],o=0,r=0,n;q(s,!0)&&(o=(n=q(s.label,!0)?s.label:{}).getBBox?n.getBBox().height:0,n.textStr&&!V(n.textPxLength)&&(n.textPxLength=n.getBBox().width),r=V(n.textPxLength)?Math.round(n.textPxLength):0,n.textStr&&(r=Math.round(n.getBBox().width)),i.height=Math.max(o,i.height),i.width=Math.max(r,i.width))}),"treegrid"===this.type&&this.treeGrid&&this.treeGrid.mapOfPosToGridNode){let t=this.treeGrid.mapOfPosToGridNode[-1].height||0;i.width+=this.options.labels.indentation*(t-1)}return i}function e3(t){let{grid:e}=this,i=3===this.side;if(i||t.apply(this),!e?.isColumn){let t=e?.columns||[];i&&(t=t.slice().reverse()),t.forEach(t=>{t.getOffset()})}i&&t.apply(this)}function e5(t){if(!0===(this.options.grid||{}).enabled){let{axisTitle:e,height:i,horiz:s,left:o,offset:r,opposite:n,options:a,top:l,width:h}=this,d=this.tickSize(),c=e?.getBBox().width,p=a.title.x,u=a.title.y,g=K(a.title.margin,s?5:10),x=e?this.chart.renderer.fontMetrics(e).f:0,f=(s?l+i:o)+(s?1:-1)*(n?-1:1)*(d?d[0]/2:0)+(this.side===b.bottom?x:0);t.titlePosition.x=s?o-(c||0)/2-g+p:f+(n?h:0)+r+p,t.titlePosition.y=s?f-(n?i:0)+(n?x:-x)/2+r+u:l-g+u}}function e6(){let t,{chart:e,options:{grid:i={}},userOptions:s}=this;if(i.enabled&&((t=this.options).labels.align=K(t.labels.align,"center"),this.categories||(t.showLastLabel=!1),this.labelRotation=0,t.labels.rotation=0,t.minTickInterval=1),i.columns){let t=this.grid.columns=[],o=this.grid.columnIndex=0;for(;++o<i.columns.length;){let r=Z(s,i.columns[o],{isInternal:!0,linkedTo:0,scrollbar:{enabled:!1}},{grid:{columns:void 0}}),n=new(tb())(this.chart,r,this.coll);n.grid.isColumn=!0,n.grid.columnIndex=o,H(e.axes,n),H(e[this.coll]||[],n),t.push(n)}}}function e4(){let{axisTitle:t,grid:e,options:i}=this;if(!0===(i.grid||{}).enabled){let s=this.min||0,o=this.max||0,r=this.ticks[this.tickPositions[0]];if(t&&!this.chart.styledMode&&r?.slotWidth&&!this.options.title.style.width&&t.css({width:`${r.slotWidth}px`}),this.maxLabelDimensions=this.getMaxLabelDimensions(this.ticks,this.tickPositions),this.rightWall&&this.rightWall.destroy(),this.grid?.isOuterAxis()&&this.axisLine){let t=i.lineWidth;if(t){let e=this.getLinePath(t),r=e[0],n=e[1],a=(this.tickSize("tick")||[1])[0]*(this.side===b.top||this.side===b.left?-1:1);if("M"===r[0]&&"L"===n[0]&&(this.horiz?(r[2]+=a,n[2]+=a):(r[1]+=a,n[1]+=a)),!this.horiz&&this.chart.marginRight){let t=["L",this.left,r[2]||0],e=[r,t],a=["L",this.chart.chartWidth-this.chart.marginRight,this.toPixels(o+this.tickmarkOffset)],l=[["M",n[1]||0,this.toPixels(o+this.tickmarkOffset)],a];this.grid.upperBorder||s%1==0||(this.grid.upperBorder=this.grid.renderBorder(e)),this.grid.upperBorder&&(this.grid.upperBorder.attr({stroke:i.lineColor,"stroke-width":i.lineWidth}),this.grid.upperBorder.animate({d:e})),this.grid.lowerBorder||o%1==0||(this.grid.lowerBorder=this.grid.renderBorder(l)),this.grid.lowerBorder&&(this.grid.lowerBorder.attr({stroke:i.lineColor,"stroke-width":i.lineWidth}),this.grid.lowerBorder.animate({d:l}))}this.grid.axisLineExtra?(this.grid.axisLineExtra.attr({stroke:i.lineColor,"stroke-width":i.lineWidth}),this.grid.axisLineExtra.animate({d:e})):this.grid.axisLineExtra=this.grid.renderBorder(e),this.axisLine[this.showAxis?"show":"hide"]()}}if((e?.columns||[]).forEach(t=>t.render()),!this.horiz&&this.chart.hasRendered&&(this.scrollbar||this.linkedParent?.scrollbar)&&this.tickPositions.length){let t,e,i=this.tickmarkOffset,r=this.tickPositions[this.tickPositions.length-1],n=this.tickPositions[0];for(;(t=this.hiddenLabels.pop())&&t.element;)t.show();for(;(e=this.hiddenMarks.pop())&&e.element;)e.show();(t=this.ticks[n].label)&&(s-n>i?this.hiddenLabels.push(t.hide()):t.show()),(t=this.ticks[r].label)&&(r-o>i?this.hiddenLabels.push(t.hide()):t.show());let a=this.ticks[r].mark;a&&r-o<i&&r-o>0&&this.ticks[r].isLast&&this.hiddenMarks.push(a.hide())}}}function e9(){let t=this.tickPositions?.info,e=this.options,i=e.grid||{},s=this.userOptions.labels||{};i.enabled&&(this.horiz?(this.series.forEach(t=>{t.options.pointRange=0}),t&&e.dateTimeLabelFormats&&e.labels&&!W(s.align)&&(!1===e.dateTimeLabelFormats[t.unitName].range||t.count>1)&&(e.labels.align="left",W(s.x)||(e.labels.x=3))):"treegrid"!==this.type&&this.grid&&this.grid.columns&&(this.minPointOffset=this.tickInterval))}function e8(t){let e,i=this.options,s=t.userOptions,o=i&&q(i.grid,!0)?i.grid:{};!0===o.enabled&&(e=Z(!0,{className:"highcharts-grid-axis "+(s.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]]},s),"xAxis"===this.coll&&(W(s.linkedTo)&&!W(s.tickPixelInterval)&&(e.tickPixelInterval=350),!(!W(s.tickPixelInterval)&&W(s.linkedTo))||W(s.tickPositioner)||W(s.tickInterval)||W(s.units)||(e.tickPositioner=function(t,i){let s=this.linkedParent?.tickPositions?.info;if(s){let o=e.units||[],r,n=1,a="year";for(let t=0;t<o.length;t++){let e=o[t];if(e&&e[0]===s.unitName){r=t;break}}let l=V(r)&&o[r+1];if(l){a=l[0]||"year";let t=l[1];n=t?.[0]||1}else"year"===s.unitName&&(n=10*s.count);let h=A.timeUnits[a];return this.tickInterval=h*n,this.chart.time.getTimeTicks({unitRange:h,count:n,unitName:a},t,i,this.options.startOfWeek)}})),Z(!0,this.options,e),this.horiz&&(i.minPadding=K(s.minPadding,0),i.maxPadding=K(s.maxPadding,0)),V(i.grid.borderWidth)&&(i.tickWidth=i.lineWidth=o.borderWidth))}function e7(t){let e=t.userOptions,i=e?.grid||{},s=i.columns;i.enabled&&s&&Z(!0,this.options,s[0])}function it(){(this.grid.columns||[]).forEach(t=>t.setScale())}function ie(t){let{horiz:e,maxLabelDimensions:i,options:{grid:s={}}}=this;if(s.enabled&&i){let o=2*this.options.labels.distance,r=e?s.cellHeight||o+i.height:o+i.width;j(t.tickSize)?t.tickSize[0]=r:t.tickSize=[r,0]}}function ii(){this.axes.forEach(t=>{(t.grid?.columns||[]).forEach(t=>{t.setAxisSize(),t.setAxisTranslation()})})}function is(t){let{grid:e}=this;(e.columns||[]).forEach(e=>e.destroy(t.keepEvents)),e.columns=void 0}function io(t){let e=t.userOptions||{},i=e.grid||{};i.enabled&&W(i.borderColor)&&(e.tickColor=e.lineColor=i.borderColor),this.grid||(this.grid=new id(this)),this.hiddenLabels=[],this.hiddenMarks=[]}function ir(t){let e=this.label,i=this.axis,s=i.reversed,o=i.chart,r=i.options.grid||{},n=i.options.labels,a=n.align,l=b[i.side],h=t.tickmarkOffset,d=i.tickPositions,c=this.pos-h,p=V(d[t.index+1])?d[t.index+1]-h:(i.max||0)+h,u=i.tickSize("tick"),g=u?u[0]:0,x=u?u[1]/2:0;if(!0===r.enabled){let r,h,d,u;if("top"===l?h=(r=i.top+i.offset)-g:"bottom"===l?r=(h=o.chartHeight-i.bottom+i.offset)+g:(r=i.top+i.len-(i.translate(s?p:c)||0),h=i.top+i.len-(i.translate(s?c:p)||0)),"right"===l?u=(d=o.chartWidth-i.right+i.offset)+g:"left"===l?d=(u=i.left+i.offset)-g:(d=Math.round(i.left+(i.translate(s?p:c)||0))-x,u=Math.min(Math.round(i.left+(i.translate(s?c:p)||0))-x,i.left+i.len)),this.slotWidth=u-d,t.pos.x="left"===a?d:"right"===a?u:d+(u-d)/2,t.pos.y=h+(r-h)/2,e){let i=o.renderer.fontMetrics(e),s=e.getBBox().height;if(n.useHTML)t.pos.y+=i.b+-(s/2);else{let e=Math.round(s/i.h);t.pos.y+=(i.b-(i.h-i.f))/2+-((e-1)*i.h/2)}}t.pos.x+=i.horiz&&n.x||0}}function ia(t){let{axis:e,value:i}=t;if(e.options.grid?.enabled){let s,o=e.tickPositions,r=(e.linkedParent||e).series[0],n=i===o[0],a=i===o[o.length-1],l=r&&X(r.options.data,function(t){return t[e.isXAxis?"x":"y"]===i});l&&r.is("gantt")&&(s=Z(l),w().seriesTypes.gantt.prototype.pointClass.setGanttPointAliases(s,e.chart)),t.isFirst=n,t.isLast=a,t.point=s}}function il(){let t=this.options,e=t.grid||{},i=this.categories,s=this.tickPositions,o=s[0],r=s[1],n=s[s.length-1],a=s[s.length-2],l=this.linkedParent?.min,h=this.linkedParent?.max,d=l||this.min,c=h||this.max,p=this.tickInterval,u=V(d)&&d>=o+p&&d<r,g=V(d)&&o<d&&o+p>d,x=V(c)&&n>c&&n-p<c,f=V(c)&&c<=n-p&&c>a;!0===e.enabled&&!i&&(this.isXAxis||this.isLinked)&&((g||u)&&!t.startOnTick&&(s[0]=d),(x||f)&&!t.endOnTick&&(s[s.length-1]=c))}function ih(t){var e;let{options:{grid:i={}}}=this;return!0===i.enabled&&this.categories?this.tickInterval:t.apply(this,(e=arguments,Array.prototype.slice.call(e,1)))}class id{constructor(t){this.axis=t}isOuterAxis(){let t=this.axis,e=t.chart,i=t.grid.columnIndex,s=t.linkedParent?.grid.columns||t.grid.columns||[],o=i?t.linkedParent:t,r=-1,n=0;return 3===t.side&&!e.inverted&&s.length?!t.linkedParent:((e[t.coll]||[]).forEach((e,i)=>{e.side!==t.side||e.options.isInternal||(n=i,e===o&&(r=i))}),n===r&&(!V(i)||s.length===i))}renderBorder(t){let e=this.axis,i=e.chart.renderer,s=e.options,o=i.path(t).addClass("highcharts-axis-line").add(e.axisGroup);return i.styledMode||o.attr({stroke:s.lineColor,"stroke-width":s.lineWidth,zIndex:7}),o}}e1.E=function(t){return this.dateFormat("%a",t,!0).charAt(0)},e1.W=function(t){let e=this.toParts(t),i=(e[7]+6)%7,s=e.slice(0);s[2]=e[2]-i+3;let o=this.toParts(this.makeTime(s[0],0,1));return 4!==o[7]&&(e[1]=0,e[2]=1+(11-o[7])%7),(1+Math.floor((this.makeTime(s[0],s[1],s[2])-this.makeTime(o[0],o[1],o[2]))/6048e5)).toString()};function ic(t,e,i,s,o,r){let n=r&&r.after,a=r&&r.before,l={data:s,depth:i-1,id:t,level:i,parent:e||""},h=0,d=0,c,p;"function"==typeof a&&a(l,r);let u=(o[t]||[]).map(e=>{let s=ic(e.id,t,i+1,e,o,r),n=e.start||NaN,a=!0===e.milestone?n:e.end||NaN;return c=!V(c)||n<c?n:c,p=!V(p)||a>p?a:p,h=h+1+s.descendants,d=Math.max(s.height+1,d),s});return s&&(s.start=K(s.start,c),s.end=K(s.end,p)),F(l,{children:u,descendants:h,height:d}),"function"==typeof n&&n(l,r),l}let ip=function(t,e){let i,s;return ic("",null,1,null,(i=[],Object.keys(s=t.reduce((t,e)=>{let{parent:s="",id:o}=e;return void 0===t[s]&&(t[s]=[]),t[s].push(e),o&&i.push(o),t},{})).forEach(t=>{if(""!==t&&-1===i.indexOf(t)){let e=s[t].map(function(t){let{...e}=t;return e});s[""].push(...e),delete s[t]}}),s),e)};function iu(){this.treeGrid||(this.treeGrid=new im(this))}function ig(t,e,i,s,o,r,n,a,l){let h,d,c,p=K(this.options?.labels,r),u=this.pos,g=this.axis,x="treegrid"===g.type,f=t.apply(this,[e,i,s,o,p,n,a,l]);if(x){let{width:t=0,padding:e=5*!g.linkedParent}=p&&q(p.symbol,!0)?p.symbol:{},i=p&&V(p.indentation)?p.indentation:0;h=g.treeGrid.mapOfPosToGridNode,d=h?.[u],c=d?.depth||1,f.x+=t+2*e+(c-1)*i}return f}function ix(t){let e,{pos:i,axis:s,label:o,treeGrid:r,options:n}=this,a=r?.labelIcon,l=o?.element,{treeGrid:h,options:d,chart:c,tickPositions:p}=s,u=h.mapOfPosToGridNode,g=K(n?.labels,d?.labels),x=g&&q(g.symbol,!0)?g.symbol:{},f=u?.[i],{descendants:m,depth:b}=f||{},y=f&&m&&m>0,v="treegrid"===s.type&&l,M=p.indexOf(i)>-1,k="highcharts-treegrid-node-",A=k+"level-",w=c.styledMode;if(v&&f&&o.removeClass(RegExp(A+".*")).addClass(A+b),t.apply(this,Array.prototype.slice.call(arguments,1)),v&&y){var S;let t,i,s,n,l,d,c,p,u,m,b,y;e=h.isCollapsed(f),S={color:!w&&o.styles.color||"",collapsed:e,group:o.parentGroup,options:x,renderer:o.renderer,show:M,xy:o.xy},i=!(t=this.treeGrid).labelIcon,s=S.renderer,n=S.xy,d=(l=S.options).width||0,c=l.height||0,p=l.padding??this.axis.linkedParent?0:5,u={x:n.x-d/2-p,y:n.y-c/2},m=S.collapsed?90:180,b=S.show&&V(u.y),(y=t.labelIcon)||(t.labelIcon=y=s.path(s.symbols[l.type](l.x||0,l.y||0,d,c)).addClass("highcharts-label-icon").add(S.group)),y[b?"show":"hide"](),s.styledMode||y.attr({cursor:"pointer",fill:K(S.color,"#666666"),"stroke-width":1,stroke:l.lineColor,strokeWidth:l.lineWidth||0}),y[i?"attr":"animate"]({translateX:u.x,translateY:u.y,rotation:m}),o.addClass(k+(e?"collapsed":"expanded")).removeClass(k+(e?"expanded":"collapsed")),w||o.css({cursor:"pointer"}),[o,a].forEach(t=>{t&&!t.attachedTreeGridEvents&&(I(t.element,"mouseover",function(){o.addClass("highcharts-treegrid-node-active"),o.renderer.styledMode||o.css({textDecoration:"underline"})}),I(t.element,"mouseout",function(){let t;t=q(g.style)?g.style:{},o.removeClass("highcharts-treegrid-node-active"),o.renderer.styledMode||o.css({textDecoration:t.textDecoration||"none"})}),I(t.element,"click",function(){r.toggleCollapse()}),t.attachedTreeGridEvents=!0)})}else a&&(tt(l),o?.css({cursor:"default"}),a.destroy(),r.labelIcon=void 0)}class im{static compose(t){let e=t.prototype;e.toggleCollapse||(I(t,"init",iu),ti(e,"getLabelPosition",ig),ti(e,"renderLabel",ix),e.collapse=function(t){this.treeGrid.collapse(t)},e.expand=function(t){this.treeGrid.expand(t)},e.toggleCollapse=function(t){this.treeGrid.toggleCollapse(t)})}constructor(t){this.tick=t}collapse(t){let{pos:e,axis:i}=this.tick,{treeGrid:s,brokenAxis:o}=i,r=s.mapOfPosToGridNode;o&&r&&o.setBreaks(s.collapse(r[e]),t??!0)}destroy(){this.labelIcon?.destroy()}expand(t){let{pos:e,axis:i}=this.tick,{treeGrid:s,brokenAxis:o}=i,r=s.mapOfPosToGridNode;o&&r&&o.setBreaks(s.expand(r[e]),t??!0)}toggleCollapse(t=!0){let{axis:e,pos:i}=this.tick,{brokenAxis:s,treeGrid:o}=e;if(s&&o.mapOfPosToGridNode){let r=!!(e.scrollbar&&e.staticScale),n=e.pos+e.len+(o.pendingSizeAdjustment||0);if(o.pendingSizeAdjustment=0,s.setBreaks(o.toggleCollapse(o.mapOfPosToGridNode[i]),r&&t),r){let t=e.toValue(e.toPixels(e.dataMax)),i=e.toValue(n)-e.tickmarkOffset,s=e.userMin??e.min;if(o.adjustedMax=t!==e.dataMax?t-e.tickmarkOffset:void 0,i>e.dataMax){let t=n-e.toPixels(e.dataMax+e.tickmarkOffset);i=o.adjustedMax??e.dataMax,(s=e.toValue(e.toPixels(s-e.tickmarkOffset)-t)+e.tickmarkOffset)<e.dataMin&&(t=e.toPixels(e.dataMin)-e.toPixels(s),s=e.dataMin,o.pendingSizeAdjustment=t)}e.setExtremes(L(s),L(i),!1,!1,{trigger:"toggleCollapse"})}t&&e.chart.redraw()}}}let{getLevelOptions:ib}={getColor:function(t,e){let i,s,o,r,n,a,l=e.index,h=e.mapOptionsToLevel,d=e.parentColor,c=e.parentColorIndex,p=e.series,u=e.colors,g=e.siblings,x=p.points,f=p.chart.options.chart;if(t){let m;i=x[t.i],s=h[t.level]||{},i&&s.colorByPoint&&(r=i.index%(u?u.length:f.colorCount),o=u&&u[r]),p.chart.styledMode||(n=K(i&&i.options.color,s&&s.color,o,d&&((m=s&&s.colorVariation)&&"brightness"===m.key&&l&&g?tL().parse(d).brighten(m.to*(l/g)).get():d),p.color)),a=K(i&&i.options.colorIndex,s&&s.colorIndex,r,c,e.colorIndex)}return{color:n,colorIndex:a}},getLevelOptions:function(t){let e,i,s,o,r,n,a={};if(q(t))for(o=V(t.from)?t.from:1,n=t.levels,i={},e=q(t.defaults)?t.defaults:{},j(n)&&(i=n.reduce((t,i)=>{let s,r,n;return q(i)&&V(i.level)&&(r=K((n=Z({},i)).levelIsConstant,e.levelIsConstant),delete n.levelIsConstant,delete n.level,q(t[s=i.level+(r?0:o-1)])?Z(!0,t[s],n):t[s]=n),t},{})),r=V(t.to)?t.to:1,s=0;s<=r;s++)a[s]=Z({},e,q(i[s])?i[s]:{});return a},getNodeWidth:function(t,e){let{chart:i,options:s}=t,{nodeDistance:o=0,nodeWidth:r=0}=s,{plotSizeX:n=1}=i;if("auto"===r){if("string"==typeof o&&/%$/.test(o))return n/(e+parseFloat(o)/100*(e-1));let t=Number(o);return(n+t)/(e||1)-t}return Q(r,n)},setTreeValues:function t(e,i){let s=i.before,o=i.idRoot,r=i.mapIdToNode[o],n=!1!==i.levelIsConstant,a=i.points[e.i],l=a&&a.options||{},h=[],d=0;e.levelDynamic=e.level-(n?0:r.level),e.name=K(a&&a.name,""),e.visible=o===e.id||!0===i.visible,"function"==typeof s&&(e=s(e,i)),e.children.forEach((s,o)=>{let r=F({},i);F(r,{index:o,siblings:e.children.length,visible:e.visible}),s=t(s,r),h.push(s),s.visible&&(d+=s.val)});let c=K(l.value,d);return e.visible=c>=0&&(d>0||e.visible),e.children=h,e.childrenTotal=d,e.isLeaf=e.visible&&!d,e.val=c,e},updateRootId:function(t){let e,i;return q(t)&&(i=q(t.options)?t.options:{},e=K(t.rootNode,i.rootId,""),q(t.userOptions)&&(t.userOptions.rootId=e),t.rootNode=e),e}};function iy(t){return{from:t.collapseStart||0,to:t.collapseEnd||0,showPoints:!1}}function iv(t,e,i){var s;let o,r=[],n=[],a={},l=e||!1,h={},d=-1,c=ip(t,{after:function(t){let e=h[t.pos],i=0,s=0;e.children.forEach(function(t){s+=(t.descendants||0)+1,i=Math.max((t.height||0)+1,i)}),e.descendants=s,e.height=i,e.collapsed&&n.push(e)},before:function(t){let e,i,s=q(t.data,!0)?t.data:{},o=_(s.name)?s.name:"",n=a[t.parent],c=q(n,!0)?h[n.pos]:null;l&&q(c,!0)&&(e=X(c.children,function(t){return t.name===o}))?(i=e.pos,e.nodes.push(t)):i=d++,!h[i]&&(h[i]=e={depth:c?c.depth+1:0,name:o,id:s.id,nodes:[t],children:[],pos:i},-1!==i&&r.push(o),q(c,!0)&&c.children.push(e)),_(t.id)&&(a[t.id]=t),e&&!0===s.collapsed&&(e.collapsed=!0),t.pos=i}});return s=h,{categories:r,mapOfIdToNode:a,mapOfPosToGridNode:h=(o=function(t,e,s){let r=t.nodes,n=e+(-1===e?0:i-1),a=(n-e)/2,l=e+a;return r.forEach(function(t){let i=t.data;q(i,!0)&&(i.y=e+(i.seriesIndex||0),delete i.seriesIndex),t.pos=l}),s[l]=t,t.pos=l,t.tickmarkOffset=a+.5,t.collapseStart=n+.5,t.children.forEach(function(t){o(t,n+1,s),n=(t.collapseEnd||0)-.5}),t.collapseEnd=n+.5,s})(s["-1"],-1,{}),collapsedNodes:n,tree:c}}function iM(t){let e=t.target;e.axes.filter(t=>"treegrid"===t.type).forEach(function(i){let s=i.options,o=s.labels,r=i.uniqueNames,n=e.time.parse(s.max),a=!i.treeGrid.mapOfPosToGridNode||i.series.some(function(t){return!t.hasRendered||t.isDirtyData||t.isDirty}),l=0,h,d;if(a){let s=[];if(h=i.series.reduce(function(t,i){let o=i.options.data||[],n=o[0],a=Array.isArray(n)&&!n.find(t=>"object"==typeof t);return s.push(a),i.visible&&(o.forEach(function(s){(a||i.options.keys?.length)&&(s=i.pointClass.prototype.optionsToObject.call({series:i},s),i.pointClass.setGanttPointAliases(s,e)),q(s,!0)&&(s.seriesIndex=l,t.push(s))}),!0===r&&l++),t},[]),n&&h.length<n)for(let t=h.length;t<=n;t++)h.push({name:t+"​"});i.categories=(d=iv(h,r||!1,!0===r?l:1)).categories,i.treeGrid.mapOfPosToGridNode=d.mapOfPosToGridNode,i.hasNames=!0,i.treeGrid.tree=d.tree,i.series.forEach(function(t,e){let i=(t.options.data||[]).map(function(i){return(s[e]||j(i)&&t.options.keys?.length)&&h.forEach(function(t){let e=te(i);e.indexOf(t.x||0)>=0&&e.indexOf(t.x2||0)>=0&&(i=t)}),q(i,!0)?Z(i):i});t.visible&&t.setData(i,!1)}),i.treeGrid.mapOptionsToLevel=ib({defaults:o,from:1,levels:o?.levels,to:i.treeGrid.tree?.height}),"beforeRender"===t.type&&(i.treeGrid.collapsedNodes=d.collapsedNodes)}})}function ik(t,e){let i=this.treeGrid.mapOptionsToLevel||{},s="treegrid"===this.type,o=this.ticks,r=o[e],n,a,l;s&&this.treeGrid.mapOfPosToGridNode?((n=i[(l=this.treeGrid.mapOfPosToGridNode[e]).depth])&&(a={labels:n}),!r&&p?o[e]=r=new p(this,e,void 0,void 0,{category:l.name,tickmarkOffset:l.tickmarkOffset,options:a}):(r.parameters.category=l.name,r.options=a,r.addLabel())):t.apply(this,Array.prototype.slice.call(arguments,1))}function iA(t,e,i,s){let o=this,r="treegrid"===i.type;o.treeGrid||(o.treeGrid=new iB(o)),r&&(I(e,"beforeRender",iM),I(e,"beforeRedraw",iM),I(e,"addSeries",function(t){if(t.options.data){let e=iv(t.options.data,i.uniqueNames||!1,1);o.treeGrid.collapsedNodes=(o.treeGrid.collapsedNodes||[]).concat(e.collapsedNodes)}}),I(o,"foundExtremes",function(){o.treeGrid.collapsedNodes?.forEach(function(t){let e=o.treeGrid.collapse(t);o.brokenAxis&&(o.brokenAxis.setBreaks(e,!1),o.treeGrid.collapsedNodes&&(o.treeGrid.collapsedNodes=o.treeGrid.collapsedNodes.filter(e=>t.collapseStart!==e.collapseStart||t.collapseEnd!==e.collapseEnd)))})}),I(o,"afterBreaks",function(){"yAxis"===o.coll&&!o.staticScale&&o.chart.options.chart.height&&(o.isDirty=!0)}),i=Z({grid:{enabled:!0},labels:{align:"left",levels:[{level:void 0},{level:1,style:{fontWeight:"bold"}}],symbol:{type:"triangle",x:-5,y:-5,height:10,width:10}},uniqueNames:!1},i,{reversed:!0})),t.apply(o,[e,i,s]),r&&(o.hasNames=!0,o.options.showLastLabel=!0)}function iw(t){let e=this.options,i=this.chart.time,s="number"==typeof e.linkedTo?this.chart[this.coll]?.[e.linkedTo]:void 0;if("treegrid"===this.type){if(this.min=this.userMin??i.parse(e.min)??this.dataMin,this.max=this.userMax??i.parse(e.max)??this.dataMax,U(this,"foundExtremes"),this.setAxisTranslation(),this.tickInterval=1,this.tickmarkOffset=.5,this.tickPositions=this.treeGrid.mapOfPosToGridNode?this.treeGrid.getTickPositions():[],s){let t=s.getExtremes();this.min=t.min??t.dataMin,this.max=t.max??t.dataMax,this.tickPositions=s.tickPositions}this.linkedParent=s}else t.apply(this,Array.prototype.slice.call(arguments,1))}function iS(t){let e=this;"treegrid"===this.type&&e.visible&&e.tickPositions.forEach(function(t){let i=e.ticks[t];i.label?.attachedTreeGridEvents&&(tt(i.label.element),i.label.attachedTreeGridEvents=!1)}),t.apply(e,Array.prototype.slice.call(arguments,1))}class iB{static compose(t,e,i,s){var o,r,n;if(!t.keepProps.includes("treeGrid")){let e=t.prototype;t.keepProps.push("treeGrid"),ti(e,"generateTick",ik),ti(e,"init",iA),ti(e,"setTickInterval",iw),ti(e,"redraw",iS),e.utils={getNode:ic},p||(p=s)}return o=t,r=e,n=s,o.keepProps.includes("grid")||(o.keepProps.push("grid"),o.prototype.getMaxLabelDimensions=e2,ti(o.prototype,"unsquish",ih),ti(o.prototype,"getOffset",e3),I(o,"init",io),I(o,"afterGetTitlePosition",e5),I(o,"afterInit",e6),I(o,"afterRender",e4),I(o,"afterSetAxisTranslation",e9),I(o,"afterSetOptions",e8),I(o,"afterSetOptions",e7),I(o,"afterSetScale",it),I(o,"afterTickSize",ie),I(o,"trimTicks",il),I(o,"destroy",is),I(r,"afterSetChartSize",ii),I(n,"afterGetLabelPosition",ir),I(n,"labelFormat",ia)),e0.compose(t,i),im.compose(s),t}constructor(t){this.pendingSizeAdjustment=0,this.axis=t}setCollapsedStatus(t){let e=this.axis,i=e.chart;e.series.forEach(function(e){let s=e.options.data;if(t.id&&s){let o=i.get(t.id),r=s[e.data.indexOf(o)];o&&r&&(o.collapsed=t.collapsed,r.collapsed=t.collapsed)}})}collapse(t){let e=this.axis,i=e.options.breaks||[],s=iy(t);return i.push(s),t.collapsed=!0,e.treeGrid.setCollapsedStatus(t),i}expand(t){let e=this.axis,i=iy(t);return t.collapsed=!1,e.treeGrid.setCollapsedStatus(t),e.options.breaks?.reduce(function(t,e){return(e.to!==i.to||e.from!==i.from)&&t.push(e),t},[])||[]}getTickPositions(){let 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(s,o){let r=+o;return r>=e&&r<=i&&!t.brokenAxis?.isInAnyBreak(r)&&s.push(r),s},[])}isCollapsed(t){let e=this.axis.options.breaks||[],i=iy(t);return e.some(function(t){return t.from===i.from&&t.to===i.to})}toggleCollapse(t){return this.isCollapsed(t)?this.expand(t):this.collapse(t)}}let{series:iE,seriesTypes:{xrange:iP}}=tz();class iO extends iP{static compose(t,e,i,s){iP.compose(t),e&&(eN(t,e),!i||(eR.compose(e,i.prototype.pointClass),s&&iB.compose(t,e,i,s)))}drawPoint(t,e){let i=this.options,s=this.chart.renderer,o=t.shapeArgs,r=t.plotY,n=t.selected&&"select",a=i.stacking&&!i.borderRadius,l=t.graphic,h;t.options.milestone?V(r)&&null!==t.y&&!1!==t.visible?(h=s.symbols.diamond(o.x||0,o.y||0,o.width||0,o.height||0),l?l[e]({d:h}):t.graphic=l=s.path(h).addClass(t.getClassName(),!0).add(t.group||this.group),this.chart.styledMode||t.graphic.attr(this.pointAttribs(t,n)).shadow(i.shadow,null,a)):l&&(t.graphic=l.destroy()):super.drawPoint(t,e)}translatePoint(t){let e,i;super.translatePoint(t),t.options.milestone&&(i=(e=t.shapeArgs).height||0,t.shapeArgs={x:(e.x||0)-i/2,y:e.y,width:i,height:i})}}iO.defaultOptions=Z(iP.defaultOptions,{grouping:!1,dataLabels:{enabled:!0},tooltip:{headerFormat:'<span style="font-size: 0.8em">{series.name}</span><br/>',pointFormat:null,pointFormatter:function(){let t=this.series,e=t.xAxis,i=t.tooltipOptions.dateTimeLabelFormats,s=e.options.startOfWeek,o=t.tooltipOptions,r=this.options.milestone,n=o.xDateFormat,a="<b>"+(this.name||this.yCategory)+"</b>";if(o.pointFormat)return this.tooltipFormatter(o.pointFormat);!n&&V(this.start)&&(n=t.chart.time.getDateFormat(e.closestPointRange,this.start,s,i||{}));let l=t.chart.time.dateFormat(n,this.start),h=t.chart.time.dateFormat(n,this.end);return a+="<br/>",r?a+=l+"<br/>":a+="Start: "+l+"<br/>"+("End: "+h)+"<br/>",a}},connectors:{type:"simpleConnect",animation:{reversed:!0},radius:0,startMarker:{enabled:!0,symbol:"arrow-filled",radius:4,align:"left"},endMarker:{enabled:!1,align:"right"}}}),F(iO.prototype,{pointArrayMap:["start","end","y"],pointClass:eK,setData:iE.prototype.setData}),tz().registerSeriesType("gantt",iO);let iT=w();iT.Connection=iT.Connection||tn,iT.GanttChart=iT.GanttChart||tf,iT.Navigator=iT.Navigator||t5,iT.RangeSelector=iT.RangeSelector||ef,iT.Scrollbar=iT.Scrollbar||t0,iT.ganttChart=iT.GanttChart.ganttChart,O(iT.SVGRenderer),({compose:function(t,e){J(ta,"CurrentDateIndication")&&(I(t,"afterSetOptions",th),I(e,"render",td),ti(e.prototype,"getLabelText",tc))}}).compose(iT.Axis,iT.PlotLineOrBand),iO.compose(iT.Axis,iT.Chart,iT.Series,iT.Tick),iT.Navigator.compose(iT.Chart,iT.Axis,iT.Series),iT.RangeSelector.compose(iT.Axis,iT.Chart),iT.Scrollbar.compose(iT.Axis);let iC=w();return k.default})());