UNPKG

highcharts

Version:
13 lines 113 kB
!/** * 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