!/**
 * Highcharts JS v12.6.0 (2026-04-13)
 * @module highcharts/modules/navigator
 * @requires highcharts
 *
 * Standalone navigator module
 *
 * (c) 2009-2026 Highsoft AS
 * Author: Mateusz Bernacik
 *
 * A commercial license may be required depending on use.
 * See www.highcharts.com/license
 */function(t,i){"object"==typeof exports&&"object"==typeof module?module.exports=i(t._Highcharts,t._Highcharts.Chart,t._Highcharts.Axis,t._Highcharts.Color,t._Highcharts.SeriesRegistry,t._Highcharts.RendererRegistry):"function"==typeof define&&define.amd?define("highcharts/modules/navigator",["highcharts/highcharts"],function(t){return i(t,t.Chart,t.Axis,t.Color,t.SeriesRegistry,t.RendererRegistry)}):"object"==typeof exports?exports["highcharts/modules/navigator"]=i(t._Highcharts,t._Highcharts.Chart,t._Highcharts.Axis,t._Highcharts.Color,t._Highcharts.SeriesRegistry,t._Highcharts.RendererRegistry):t.Highcharts=i(t.Highcharts,t.Highcharts.Chart,t.Highcharts.Axis,t.Highcharts.Color,t.Highcharts.SeriesRegistry,t.Highcharts.RendererRegistry)}("u"<typeof window?this:window,(t,i,e,s,r,a)=>(()=>{"use strict";let o;var n,h={512:t=>{t.exports=r},532:t=>{t.exports=e},608:t=>{t.exports=a},620:t=>{t.exports=s},944:i=>{i.exports=t},960:t=>{t.exports=i}},l={};function d(t){var i=l[t];if(void 0!==i)return i.exports;var e=l[t]={exports:{}};return h[t](e,e.exports,d),e.exports}d.n=t=>{var i=t&&t.__esModule?()=>t.default:()=>t;return d.d(i,{a:i}),i},d.d=(t,i)=>{for(var e in i)d.o(i,e)&&!d.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:i[e]})},d.o=(t,i)=>Object.prototype.hasOwnProperty.call(t,i);var c={};d.d(c,{default:()=>tS});var g=d(944),p=d.n(g),u=d(960),x=d.n(u),f=d(532),v=d.n(f);let{doc:m,win:b}=p();function M(t,i,e,s={}){let r="function"==typeof t&&t.prototype||t;Object.hasOwnProperty.call(r,"hcEvents")||(r.hcEvents={});let a=r.hcEvents;p().Point&&t instanceof p().Point&&t.series&&t.series.chart&&(t.series.chart.runTrackerClick=!0);let o=t.addEventListener;o&&o.call(t,i,e,!!p().supportsPassiveEvents&&{passive:void 0===s.passive?-1!==i.indexOf("touch"):s.passive,capture:!1}),a[i]||(a[i]=[]);let n={fn:e,order:"number"==typeof s.order?s.order:1/0};return a[i].push(n),a[i].sort((t,i)=>t.order-i.order),function(){W(t,i,e)}}function y(t,i){return t>1e14?t:parseFloat(t.toPrecision(i||14))}function A(t,i=0,e){let s=i%2/2,r=e?-1:1;return(Math.round(t*r-s)+s)*r}function E(t){return null!=t}function O(t,i,e){C(t,function(s,r){s!==i&&s?.destroy&&s.destroy(),(s?.destroy||!e)&&delete t[r]})}function w(t,i){let e=t.length;for(;e--;)if(t[e]===i){t.splice(e,1);break}}function k(t,i){let e;for(e in t||(t={}),i)t[e]=i[e];return t}function S(t,i,e,s){if(e=e||{},m?.createEvent&&(t.dispatchEvent||t.fireEvent&&t!==p())){let s=m.createEvent("Events");s.initEvent(i,!0,!0),e=k(s,e),t.dispatchEvent?t.dispatchEvent(e):t.fireEvent(i,e)}else if(t.hcEvents){e.target||k(e,{preventDefault:function(){e.defaultPrevented=!0},target:t,type:i});let s=[],r=t,a=!1;for(;r.hcEvents;)Object.hasOwnProperty.call(r,"hcEvents")&&r.hcEvents[i]&&(s.length&&(a=!0),s.unshift.apply(s,r.hcEvents[i])),r=Object.getPrototypeOf(r);a&&s.sort((t,i)=>t.order-i.order),s.forEach(i=>{!1===i.fn.call(t,e,t)&&e.preventDefault()})}s&&!e.defaultPrevented&&s.call(t,e)}let z=Array.prototype.find?function(t,i){return t.find(i)}:function(t,i){let e,s=t.length;for(e=0;e<s;e++)if(i(t[e],e))return t[e]};function D(t){return B(t)&&"number"==typeof t.nodeType}function R(t){return"number"==typeof t&&!isNaN(t)&&t<1/0&&t>-1/0}function T(t){let i=Object.prototype.toString.call(t);return"[object Array]"===i||"[object Array Iterator]"===i}function B(t,i){return!!t&&"object"==typeof t&&(!i||!T(t))}function P(t,...i){let e,s=[t,...i],r={},a=function(t,i){return"object"!=typeof t&&(t={}),C(i,function(e,s){if("__proto__"!==s&&"constructor"!==s){let r;!B(e,!0)||(r=e?.constructor,B(e,!0)&&!D(e)&&r?.name&&"Object"!==r.name)||D(e)?t[s]=i[s]:t[s]=a(t[s]||{},e)}}),t};!0===t&&(r=s[1],s=Array.prototype.slice.call(s,2));let o=s.length;for(e=0;e<o;e++)r=a(r,s[e]);return r}function C(t,i,e){for(let s in t)Object.hasOwnProperty.call(t,s)&&i.call(e||t[s],t[s],s,t)}function H(){let t=arguments,i=t.length;for(let e=0;e<i;e++){let i=t[e];if(null!=i)return i}}function L(t,i){return 0>t.indexOf(i)&&!!t.push(i)}function W(t,i,e){function s(i,e){let s=t.removeEventListener;s&&s.call(t,i,e,!1)}function r(e){let r,a;t.nodeName&&(i?(r={})[i]=!0:r=e,C(r,function(t,i){if(e[i])for(a=e[i].length;a--;)s(i,e[i][a].fn)}))}let a="function"==typeof t&&t.prototype||t;if(Object.hasOwnProperty.call(a,"hcEvents")){let t=a.hcEvents;if(i){let a=t[i]||[];e?(t[i]=a.filter(function(t){return e!==t.fn}),s(i,e)):(r(t),t[i]=[])}else r(t),delete a.hcEvents}}let{isTouchDevice:U}=p(),N=[];function I(){this.navigator&&this.navigator.setBaseSeries(null,!1)}function X(){let t,i,e,s=this.legend,r=this.navigator;if(r){t=s&&s.options,i=r.xAxis,e=r.yAxis;let{scrollbarHeight:a,scrollButtonSize:o}=r;this.inverted?(r.left=r.opposite?this.chartWidth-a-r.height:this.spacing[3]+a,r.top=this.plotTop+o):(r.left=H(i.left,this.plotLeft+o),r.top=r.navigatorOptions.top||this.chartHeight-r.height-a-(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+H(t.margin,10):0)-(this.titleOffset?this.titleOffset[2]:0)),i&&e&&(this.inverted?i.options.left=e.options.left=r.left:i.options.top=e.options.top=r.top,i.setAxisSize(),e.setAxisSize())}}function _(t){!this.navigator&&!this.scroller&&(this.options.navigator.enabled||this.options.scrollbar.enabled)&&(this.scroller=this.navigator=new o(this),H(t.redraw,!0)&&this.redraw(t.animation))}function Y(){let t=this.options;(t.navigator.enabled||t.scrollbar.enabled)&&(this.scroller=this.navigator=new o(this))}function j(){let t=this.options,i=t.navigator,e=t.rangeSelector;if((i&&i.enabled||e&&e.enabled)&&(!U&&"x"===this.zooming.type||U&&"x"===this.zooming.pinchType))return!1}function G(t){let i=t.navigator;if(i&&t.xAxis[0]){let e=t.xAxis[0].getExtremes();i.render(e.min,e.max)}}function F(t){let i=t.options.navigator||{},e=t.options.scrollbar||{};!this.navigator&&!this.scroller&&(i.enabled||e.enabled)&&(P(!0,this.options.navigator,i),P(!0,this.options.scrollbar,e),delete t.options.navigator,delete t.options.scrollbar)}let V=function(t,i){if(L(N,t)){let e=t.prototype;o=i,e.callbacks.push(G),M(t,"afterAddSeries",I),M(t,"afterSetChartSize",X),M(t,"afterUpdate",_),M(t,"beforeRender",Y),M(t,"beforeShowResetZoom",j),M(t,"update",F)}},{isTouchDevice:Z}=p();function $(){this.navigatorAxis||(this.navigatorAxis=new J(this))}function q(t){let i,e=this.chart,s=e.options,r=s.navigator,a=this.navigatorAxis,o=e.zooming.pinchType,n=s.rangeSelector,h=e.zooming.type;if(this.isXAxis&&(r?.enabled||n?.enabled)){if("y"===h&&"zoom"===t.trigger)i=!1;else if(("zoom"===t.trigger&&"xy"===h||Z&&"xy"===o)&&this.options.range){let i=a.previousZoom;E(t.min)?a.previousZoom=[this.min,this.max]:i&&(t.min=i[0],t.max=i[1],a.previousZoom=void 0)}}void 0!==i&&t.preventDefault()}class J{static compose(t){t.keepProps.includes("navigatorAxis")||(t.keepProps.push("navigatorAxis"),M(t,"init",$),M(t,"setExtremes",q))}constructor(t){this.axis=t}destroy(){this.axis=void 0}toFixedRange(t,i,e,s){let r=this.axis,a=(r.pointRange||0)/2,o=H(e,r.translate(t,!0,!r.horiz)),n=H(s,r.translate(i,!0,!r.horiz));return E(e)||(o=y(o+a)),E(s)||(n=y(n-a)),R(o)&&R(n)||(o=n=void 0),{min:o,max:n}}}var K=d(620),Q=d.n(K),tt=d(512),ti=d.n(tt);let{parse:te}=Q(),{seriesTypes:ts}=ti(),tr={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:te("#667aff").setOpacity(.3).get(),outlineColor:"#999999",outlineWidth:1,series:{type:void 0===ts.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}},ta={"navigator-handle":function(t,i,e,s,r={}){var a,o,n,h,l,d,c;let g=r.width?r.width/2:e,p=(a=r.borderRadius||0,o=Math.min(2*g,s),/%$/.test(a)?o*parseFloat(a)/100+0:parseFloat(a));return[["M",-1.5,(s=r.height||s)/2-3.5],["L",-1.5,s/2+4.5],["M",.5,s/2-3.5],["L",.5,s/2+4.5],...(n=-g-1,h=.5,l=2*g+1,d=s,c={r:p},c?.r?function(t,i,e,s,r){let a=r?.r||0;return[["M",t+a,i],["L",t+e-a,i],["A",a,a,0,0,1,t+e,i+a],["L",t+e,i+s-a],["A",a,a,0,0,1,t+e-a,i+s],["L",t+a,i+s],["A",a,a,0,0,1,t,i+s-a],["L",t,i+a],["A",a,a,0,0,1,t+a,i],["Z"]]}(n,.5,l,d,c):[["M",n,.5],["L",n+l,.5],["L",n+l,.5+d],["L",n,.5+d],["Z"]])]}};var to=d(608),tn=d.n(to);let{defaultOptions:th}=p(),{composed:tl}=p(),{getRendererType:td}=tn(),{setFixedRange:tc}={setFixedRange:function(t){let i=this.xAxis[0];E(i.dataMax)&&E(i.dataMin)&&t?this.fixedRange=Math.min(t,i.dataMax-i.dataMin):this.fixedRange=t}};function tg(){this.chart.navigator&&!this.options.isInternal&&this.chart.navigator.setBaseSeries(null,!1)}let tp=function(t,i,e){J.compose(i),L(tl,"Navigator")&&(t.prototype.setFixedRange=tc,k(td().prototype.symbols,ta),k(th,{navigator:tr}),M(e,"afterUpdate",tg))},{composed:tu}=p();!function(t){let i;function e(t){let i=H(t.options?.min,t.min),e=H(t.options?.max,t.max);return{axisMin:i,axisMax:e,scrollMin:E(t.dataMin)?Math.min(i,t.min??1/0,t.dataMin,t.threshold??1/0):i,scrollMax:t.treeGrid?.adjustedMax??(E(t.dataMax)?Math.max(e,t.max??-1/0,t.dataMax,t.threshold??-1/0):e)}}function s(){let t=this.scrollbar,i=t&&!t.options.opposite,e=this.horiz?2:i?3:1;t&&(this.chart.scrollbarsOffsets=[0,0],this.chart.axisOffset[e]+=t.size+(t.options.margin||0))}function r(){let t=this;t.options?.scrollbar?.enabled&&(t.options.scrollbar.vertical=!t.horiz,t.options.startOnTick=t.options.endOnTick=!1,t.scrollbar=new i(t.chart.renderer,t.options.scrollbar,t.chart),M(t.scrollbar,"changed",function(i){let s,r,{axisMin:a,axisMax:o,scrollMin:n,scrollMax:h}=e(t),l=t.toPixels(n),d=t.toPixels(h)-l;if(E(a)&&E(o))if(t.horiz&&!t.reversed||!t.horiz&&t.reversed?(s=Math.min(h,t.toValue(l+d*this.to)),r=Math.max(n,t.toValue(l+d*this.from))):(s=Math.min(h,t.toValue(l+d*(1-this.from))),r=Math.max(n,t.toValue(l+d*(1-this.to)))),this.shouldUpdateExtremes(i.DOMType)){let e="mousemove"!==i.DOMType&&"touchmove"!==i.DOMType&&void 0;t.setExtremes(y(r),y(s),!0,e,i)}else this.setRange(this.from,this.to)}))}function a(){let t,i,s,{scrollMin:r,scrollMax:a}=e(this),o=this.scrollbar,n=(this.axisTitleMargin||0)+(this.titleOffset||0),h=this.chart.scrollbarsOffsets,l=this.options.margin||0;if(o&&h){if(this.horiz)this.opposite||(h[1]+=n),o.position(this.left,this.top+this.height+2+h[1]-(this.opposite?l:0),this.width,this.height),this.opposite||(h[1]+=l),t=1;else{let i;this.opposite&&(h[0]+=n),i=o.options.opposite?this.left+this.width+2+h[0]-(this.opposite?0:l):this.opposite?0:l,o.position(i,this.top,this.width,this.height),this.opposite&&(h[0]+=l),t=0}if(h[t]+=o.size+(o.options.margin||0),isNaN(r)||isNaN(a)||!E(this.min)||!E(this.max)||E(this.dataMin)&&this.dataMin===this.dataMax)o.setRange(0,1);else if(this.min===this.max){let t=this.pointRange/(this.dataMax+1);i=t*this.min,s=t*(this.max+1),o.setRange(i,s)}else i=(this.toPixels(this.min)-this.toPixels(r))/(this.toPixels(a)-this.toPixels(r)),s=(this.toPixels(this.max)-this.toPixels(r))/(this.toPixels(a)-this.toPixels(r)),this.horiz&&!this.reversed||!this.horiz&&this.reversed?o.setRange(i,s):o.setRange(1-s,1-i)}}t.compose=function(t,e){L(tu,"Axis.Scrollbar")&&(i=e,M(t,"afterGetOffset",s),M(t,"afterInit",r),M(t,"afterRender",a))}}(n||(n={}));let tx=n,tf={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:tv}=p(),{composed:tm}=p();class tb{static compose(t){tx.compose(t,tb),L(tm,"Scrollbar")&&k(tv,{scrollbar:tf})}static swapXY(t,i){return i&&t.forEach(t=>{let i,e=t.length;for(let s=0;s<e;s+=2)"number"==typeof(i=t[s+1])&&(t[s+1]=t[s+2],t[s+2]=i)}),t}constructor(t,i,e){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,i,e)}addEvents(){let t=this.options.inverted?[1,0]:[0,1],i=this.scrollbarButtons,e=this.scrollbarGroup.element,s=this.track.element,r=this.mouseDownHandler.bind(this),a=this.mouseMoveHandler.bind(this),o=this.mouseUpHandler.bind(this),n=[[i[t[0]].element,"click",this.buttonToMinClick.bind(this)],[i[t[1]].element,"click",this.buttonToMaxClick.bind(this)],[s,"click",this.trackClick.bind(this)],[e,"mousedown",r],[e.ownerDocument,"mousemove",a],[e.ownerDocument,"mouseup",o],[e,"touchstart",r],[e.ownerDocument,"touchmove",a],[e.ownerDocument,"touchend",o]];n.forEach(function(t){M.apply(null,t)}),this._events=n}buttonToMaxClick(t){let i=(this.to-this.from)*H(this.options.step,.2);this.updatePosition(this.from+i,this.to+i),S(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:t})}buttonToMinClick(t){let i=y(this.to-this.from)*H(this.options.step,.2);this.updatePosition(y(this.from-i),y(this.to-i)),S(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:t})}cursorToScrollbarPosition(t){let i=this.options,e=i.minWidth>this.calculatedWidth?i.minWidth:0;return{chartX:(t.chartX-this.x-this.xOffset)/(this.barWidth-e),chartY:(t.chartY-this.y-this.yOffset)/(this.barWidth-e)}}destroy(){let t=this,i=t.chart.scroller;t.removeEvents(),["track","scrollbarRifles","scrollbar","scrollbarGroup","group"].forEach(function(i){t[i]&&t[i].destroy&&(t[i]=t[i].destroy())}),i&&t===i.scrollbar&&(i.scrollbar=null,O(i.scrollbarButtons))}drawScrollbarButton(t){let i=this.renderer,e=this.scrollbarButtons,s=this.options,r=this.size,a=i.g().add(this.group);if(e.push(a),s.buttonsEnabled){let o=i.rect().addClass("highcharts-scrollbar-button").add(a);this.chart.styledMode||o.attr({stroke:s.buttonBorderColor,"stroke-width":s.buttonBorderWidth,fill:s.buttonBackgroundColor}),o.attr(o.crisp({x:-.5,y:-.5,width:r,height:r,r:s.buttonBorderRadius},o.strokeWidth()));let n=i.path(tb.swapXY([["M",r/2+(t?-1:1),r/2-3],["L",r/2+(t?-1:1),r/2+3],["L",r/2+(t?2:-2),r/2]],s.vertical)).addClass("highcharts-scrollbar-arrow").add(e[t]);this.chart.styledMode||n.attr({fill:s.buttonArrowColor})}}init(t,i,e){this.scrollbarButtons=[],this.renderer=t,this.userOptions=i,this.options=P(tf,tv.scrollbar,i),this.options.margin=H(this.options.margin,10),this.chart=e,this.size=H(this.options.size,this.options.height),i.enabled&&(this.render(),this.addEvents())}mouseDownHandler(t){let i=this.chart.pointer?.normalize(t)||t,e=this.cursorToScrollbarPosition(i);this.chartX=e.chartX,this.chartY=e.chartY,this.initPositions=[this.from,this.to],this.grabbedCenter=!0}mouseMoveHandler(t){let i,e=this.chart.pointer?.normalize(t)||t,s=this.options.vertical?"chartY":"chartX",r=this.initPositions||[];this.grabbedCenter&&(!t.touches||0!==t.touches[0][s])&&(i=this.cursorToScrollbarPosition(e)[s]-this[s],this.hasDragged=!0,this.updatePosition(r[0]+i,r[1]+i),this.hasDragged&&S(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMType:t.type,DOMEvent:t}))}mouseUpHandler(t){this.hasDragged&&S(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,i,e,s){let{buttonsEnabled:r,margin:a=0,vertical:o}=this.options,n=this.rendered?"animate":"attr",h=s,l=0;this.group.show(),this.x=t,this.y=i+this.trackBorderWidth,this.width=e,this.height=s,this.xOffset=h,this.yOffset=l,o?(this.width=this.yOffset=e=l=this.size,this.xOffset=h=0,this.yOffset=l=r?this.size:0,this.barWidth=s-(r?2*e:0),this.x=t+=a):(this.height=s=this.size,this.xOffset=h=r?this.size:0,this.barWidth=e-(r?2*s:0),this.y=this.y+a),this.group[n]({translateX:t,translateY:this.y}),this.track[n]({width:e,height:s}),this.scrollbarButtons[1][n]({translateX:o?0:e-h,translateY:o?s-l:0})}removeEvents(){this._events.forEach(function(t){W.apply(null,t)}),this._events.length=0}render(){let t=this.renderer,i=this.options,e=this.size,s=this.chart.styledMode,r=t.g("scrollbar").attr({zIndex:i.zIndex}).hide().add();this.group=r,this.track=t.rect().addClass("highcharts-scrollbar-track").attr({r:i.trackBorderRadius||0,height:e,width:e}).add(r),s||this.track.attr({fill:i.trackBackgroundColor,stroke:i.trackBorderColor,"stroke-width":i.trackBorderWidth});let a=this.trackBorderWidth=this.track.strokeWidth();this.track.attr({x:-A(0,a),y:-A(0,a)}),this.scrollbarGroup=t.g().add(r),this.scrollbar=t.rect().addClass("highcharts-scrollbar-thumb").attr({height:e-a,width:e-a,r:i.barBorderRadius||0}).add(this.scrollbarGroup),this.scrollbarRifles=t.path(tb.swapXY([["M",-3,e/4],["L",-3,2*e/3],["M",0,e/4],["L",0,2*e/3],["M",3,e/4],["L",3,2*e/3]],i.vertical)).addClass("highcharts-scrollbar-rifles").add(this.scrollbarGroup),s||(this.scrollbar.attr({fill:i.barBackgroundColor,stroke:i.barBorderColor,"stroke-width":i.barBorderWidth}),this.scrollbarRifles.attr({stroke:i.rifleColor,"stroke-width":1})),this.scrollbarStrokeWidth=this.scrollbar.strokeWidth(),this.scrollbarGroup.translate(-A(0,this.scrollbarStrokeWidth),-A(0,this.scrollbarStrokeWidth)),this.drawScrollbarButton(0),this.drawScrollbarButton(1)}setRange(t,i){let e,s,r=this.options,a=r.vertical,o=r.minWidth,n=this.barWidth,h=!this.rendered||this.hasDragged||this.chart.navigator&&this.chart.navigator.hasDragged?"attr":"animate";if(!E(n))return;let l=n*Math.min(i,1);e=Math.ceil(n*(t=Math.max(t,0))),this.calculatedWidth=s=y(l-e),s<o&&(e=(n-o+s)*t,s=o);let d=Math.floor(e+this.xOffset+this.yOffset),c=s/2-.5;this.from=t,this.to=i,a?(this.scrollbarGroup[h]({translateY:d}),this.scrollbar[h]({height:s}),this.scrollbarRifles[h]({translateY:c}),this.scrollbarTop=d,this.scrollbarLeft=0):(this.scrollbarGroup[h]({translateX:d}),this.scrollbar[h]({width:s}),this.scrollbarRifles[h]({translateX:c}),this.scrollbarLeft=d,this.scrollbarTop=0),s<=12?this.scrollbarRifles.hide():this.scrollbarRifles.show(),!1===r.showFull&&(t<=0&&i>=1?this.group.hide():this.group.show()),this.rendered=!0}shouldUpdateExtremes(t){return H(this.options.liveRedraw,p().svg&&!p().isTouchDevice&&!this.chart.boosted)||"mouseup"===t||"touchend"===t||!E(t)}trackClick(t){let i=this.chart.pointer?.normalize(t)||t,e=this.to-this.from,s=this.y+this.scrollbarTop,r=this.x+this.scrollbarLeft;this.options.vertical&&i.chartY>s||!this.options.vertical&&i.chartX>r?this.updatePosition(this.from+e,this.to+e):this.updatePosition(this.from-e,this.to-e),S(this,"changed",{from:this.from,to:this.to,trigger:"scrollbar",DOMEvent:t})}update(t){this.destroy(),this.init(this.chart.renderer,P(!0,this.options,t),this.chart)}updatePosition(t,i){i>1&&(t=y(1-y(i-t)),i=1),t<0&&(i=y(i-t),t=0),this.from=t,this.to=i}}tb.defaultOptions=tf;let{defaultOptions:tM}=p(),{isTouchDevice:ty}=p();function tA(t,...i){let e=[].filter.call(i,R);if(e.length)return Math[t].apply(0,e)}class tE{static compose(t,i,e){V(t,tE),tp(t,i,e)}constructor(t){this.isDirty=!1,this.scrollbarHeight=0,this.init(t)}drawHandle(t,i,e,s){let r=this.navigatorOptions.handles.height;this.handles[i][s](e?{translateX:Math.round(this.left+this.height/2),translateY:Math.round(this.top+parseInt(t,10)+.5-r)}:{translateX:Math.round(this.left+parseInt(t,10)),translateY:Math.round(this.top+this.height/2-r/2-1)})}drawOutline(t,i,e,s){let r=this.navigatorOptions.maskInside,a=this.outline.strokeWidth(),o=a/2,n=a%2/2,h=this.scrollButtonSize,l=this.size,d=this.top,c=this.height,g=d-o,p=d+c,u=this.left,x,f;e?(x=d+i+n,i=d+t+n,f=[["M",u+c,d-h-n],["L",u+c,x],["L",u,x],["M",u,i],["L",u+c,i],["L",u+c,d+l+h]],r&&f.push(["M",u+c,x-o],["L",u+c,i+o])):(u-=h,t+=u+h-n,i+=u+h-n,f=[["M",u,g],["L",t,g],["L",t,p],["M",i,p],["L",i,g],["L",u+l+2*h,g]],r&&f.push(["M",t-o,g],["L",i+o,g])),this.outline[s]({d:f})}drawMasks(t,i,e,s){let r,a,o,n,h=this.left,l=this.top,d=this.height;e?(o=[h,h,h],n=[l,l+t,l+i],a=[d,d,d],r=[t,i-t,this.size-i]):(o=[h,h+t,h+i],n=[l,l,l],a=[t,i-t,this.size-i],r=[d,d,d]),this.shades.forEach((t,i)=>{t[s]({x:o[i],y:n[i],width:a[i],height:r[i]})})}renderElements(){let t=this,i=t.navigatorOptions,e=i.maskInside,s=t.chart,r=s.inverted,a=s.renderer,o={cursor:r?"ns-resize":"ew-resize"},n=t.navigatorGroup??(t.navigatorGroup=a.g("navigator").attr({zIndex:8,visibility:"hidden"}).add());if([!e,e,!e].forEach((e,r)=>{let h=t.shades[r]??(t.shades[r]=a.rect().addClass("highcharts-navigator-mask"+(1===r?"-inside":"-outside")).add(n));s.styledMode||(h.attr({fill:e?i.maskFill:"rgba(0,0,0,0)"}),1===r&&h.css(o))}),t.outline||(t.outline=a.path().addClass("highcharts-navigator-outline").add(n)),s.styledMode||t.outline.attr({"stroke-width":i.outlineWidth,stroke:i.outlineColor}),i.handles?.enabled){let e=!1,r=i.handles,{height:h,width:l}=r;[0,1].forEach(i=>{let d=r.symbols[i];(e=e||t.handles[i]?.symbolName!==d)&&(t.handles[i]?.destroy(),t.handles[i]=a.symbol(d,-l/2-1,0,l,h,r),t.handles[i].attr({zIndex:7-i}).addClass("highcharts-navigator-handle highcharts-navigator-handle-"+["left","right"][i]).add(n)),s.inverted&&t.handles[i].attr({rotation:90,rotationOriginX:Math.floor(-l/2),rotationOriginY:(h+l)/2}),s.styledMode||t.handles[i].attr({fill:r.backgroundColor,stroke:r.borderColor,"stroke-width":r.lineWidth,width:r.width,height:r.height,x:-l/2-1,y:0}).css(o)}),e&&(t.partsEventsToUnbind?.forEach(t=>{t()}),t.partsEventsToUnbind=[...t.getPartsEvents("mousedown"),...t.getPartsEvents("touchstart")])}}update(t,i=!1){let e=this.chart,s=e.options.chart.inverted!==e.scrollbar?.options.vertical;if(P(!0,e.options.navigator,t),this.navigatorOptions=e.options.navigator||{},this.setOpposite(),E(t.enabled)||s)return this.destroy(),this.navigatorEnabled=t.enabled||this.navigatorEnabled,this.init(e);if(this.navigatorEnabled&&(this.isDirty=!0,!1===t.adaptToUpdatedData&&this.baseSeries.forEach(t=>{W(t,"updatedData",this.updatedDataHandler)},this),t.adaptToUpdatedData&&this.baseSeries.forEach(t=>{t.eventsToUnbind.push(M(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 i=this.getXAxisOffsets();this.xAxis.update({...t.xAxis,offsets:i,[e.inverted?"width":"height"]:this.height,[e.inverted?"height":"width"]:void 0},!1),this.yAxis.update({...t.yAxis,[e.inverted?"width":"height"]:this.height},!1)}i&&e.redraw()}render(t,i,e,s){var r,a,o,n;let h=this.chart,l=this.xAxis,d=l.pointRange||0,c=l.navigatorAxis.fake?h.xAxis[0]:l,g=this.navigatorEnabled,p=this.rendered,u=h.inverted,x=h.xAxis[0].minRange,f=h.xAxis[0].options.maxRange,v=this.scrollButtonSize,m,b,M,A=this.scrollbarHeight,O,w;if(this.hasDragged&&!E(e))return;if(this.isDirty&&this.renderElements(),t=y(t-d/2),i=y(i+d/2),!R(t)||!R(i))if(!p)return;else e=0,s=H(l.width,c.width);this.left=H(l.left,h.plotLeft+v+(u?h.plotWidth:0));let k=this.size=O=H(l.len,(u?h.plotHeight:h.plotWidth)-2*v);m=u?A:O+2*v,e=H(e,l.toPixels(t,!0)),s=H(s,l.toPixels(i,!0)),R(e)&&Math.abs(e)!==1/0||(e=0,s=m);let z=l.toValue(e,!0),D=l.toValue(s,!0),T=Math.abs(y(D-z));E(x)&&T<x?this.grabbedLeft?e=l.toPixels(D-x-d,!0):this.grabbedRight&&(s=l.toPixels(z+x+d,!0)):E(f)&&y(T-d)>f&&(this.grabbedLeft?e=l.toPixels(D-f-d,!0):this.grabbedRight&&(s=l.toPixels(z+f+d,!0))),this.zoomedMax=(r=Math.max(e,s),a=k,r>0?r<a?r:a:0),this.zoomedMin=(o=this.fixedWidth?this.zoomedMax-this.fixedWidth:Math.min(e,s),n=k,o>0?o<n?o:n:0),this.range=this.zoomedMax-this.zoomedMin,k=Math.round(this.zoomedMax);let B=Math.round(this.zoomedMin);g&&(this.navigatorGroup.attr({visibility:"inherit"}),w=p&&!this.hasDragged?"animate":"attr",this.drawMasks(B,k,u,w),this.drawOutline(B,k,u,w),this.navigatorOptions.handles?.enabled&&(this.drawHandle(B,0,u,w),this.drawHandle(k,1,u,w))),this.scrollbar&&(u?(M=this.top-v,b=this.left-A+(g||!c.opposite?0:(c.titleOffset||0)+c.axisTitleMargin),A=O+2*v):(M=this.top+(g?this.height:-A),b=this.left-v),this.scrollbar.position(b,M,m,A),this.scrollbar.setRange(this.zoomedMin/(O||1),this.zoomedMax/(O||1))),this.rendered=!0,this.isDirty=!1,S(this,"afterRender")}addMouseEvents(){let t,i,e=this,s=e.chart,r=s.container,a=[];e.mouseMoveHandler=t=function(t){e.onMouseMove(t)},e.mouseUpHandler=i=function(t){e.onMouseUp(t)},a.push(M(s.renderTo,"mousemove",t),M(r.ownerDocument,"mouseup",i),M(s.renderTo,"touchmove",t),M(r.ownerDocument,"touchend",i)),e.eventsToUnbind=a,e.series&&e.series[0]&&a.push(M(e.series[0].xAxis,"foundExtremes",function(){s.navigator?.modifyNavigatorAxisExtremes()}))}getPartsEvents(t){let i=this,e=[];return["shades","handles"].forEach(s=>{i[s].forEach(function(r,a){e.push(M(r.element,t,function(t){i[`${s}Mousedown`](t,a)}))})}),e}shadesMousedown(t,i){t=this.chart.pointer?.normalize(t)||t;let e=this.chart,s=this.xAxis,r=this.zoomedMin,a=this.size,o=this.range,n=this.left,h=t.chartX,l,d,c,g;e.inverted&&(h=t.chartY,n=this.top),1===i?(this.grabbedCenter=h,this.fixedWidth=o,this.dragOffset=h-r):(g=h-n-o/2,0===i?g=Math.max(0,g):2===i&&g+o>=a&&(g=a-o,this.reversedExtremes?(g-=o,d=this.getUnionExtremes()?.dataMin):l=this.getUnionExtremes()?.dataMax),g!==r&&(this.fixedWidth=o,E((c=s.navigatorAxis.toFixedRange(g,g+o,d,l)).min)&&S(this,"setRange",{min:Math.min(c.min,c.max),max:Math.max(c.min,c.max),redraw:!0,eventArguments:{trigger:"navigator"}})))}handlesMousedown(t,i){t=this.chart.pointer?.normalize(t)||t;let e=this.chart,s=e.xAxis[0],r=this.reversedExtremes;0===i?(this.grabbedLeft=!0,this.otherHandlePos=this.zoomedMax,this.fixedExtreme=r?s.min:s.max):(this.grabbedRight=!0,this.otherHandlePos=this.zoomedMin,this.fixedExtreme=r?s.max:s.min),e.setFixedRange(void 0)}onMouseMove(t){let i=this,e=i.chart,s=i.navigatorSize,r=i.range,a=i.dragOffset,o=e.inverted,n=i.left,h;(!t.touches||0!==t.touches[0].pageX)&&(h=(t=e.pointer?.normalize(t)||t).chartX,o&&(n=i.top,h=t.chartY),i.grabbedLeft?(i.hasDragged=!0,i.render(0,0,h-n,i.otherHandlePos)):i.grabbedRight?(i.hasDragged=!0,i.render(0,0,i.otherHandlePos,h-n)):i.grabbedCenter&&a&&(i.hasDragged=!0,h<a?h=a:h>s+a-r&&(h=s+a-r),i.render(0,0,h-a,h-a+r)),i.hasDragged&&H(i.scrollbarOptions?.liveRedraw,!ty&&!this.chart.boosted)&&(t.DOMType=t.type,setTimeout(function(){i.onMouseUp(t)},0)))}onMouseUp(t){let i,e,s,r,a,o,n=this.chart,h=this.xAxis,l=this.scrollbar,d=t.DOMEvent||t,c=n.inverted,g=this.rendered&&!this.hasDragged?"animate":"attr";(this.hasDragged&&(!l||!l.hasDragged)||"scrollbar"===t.trigger)&&(s=this.getUnionExtremes(),this.zoomedMin===this.otherHandlePos?r=this.fixedExtreme:this.zoomedMax===this.otherHandlePos&&(a=this.fixedExtreme),this.zoomedMax===this.size&&(a=this.reversedExtremes?s.dataMin:s.dataMax),0===this.zoomedMin&&(r=this.reversedExtremes?s.dataMax:s.dataMin),E((o=h.navigatorAxis.toFixedRange(this.zoomedMin,this.zoomedMax,r,a)).min)&&S(this,"setRange",{min:Math.min(o.min,o.max),max:Math.max(o.min,o.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&&R(this.zoomedMin)&&R(this.zoomedMax)&&(e=Math.round(this.zoomedMin),i=Math.round(this.zoomedMax),this.shades&&this.drawMasks(e,i,c,g),this.outline&&this.drawOutline(e,i,c,g),this.navigatorOptions.handles?.enabled&&Object.keys(this.handles).length===this.handles.length&&(this.drawHandle(e,0,c,g),this.drawHandle(i,1,c,g)))}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){W(t,"updatedData",this.updatedDataHandler)},this),t[0].xAxis&&W(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 i=t.options,e=i.navigator||{},s=e.enabled,r=i.scrollbar||{},a=r.enabled,o=s&&e.height||0,n=a&&r.height||0,h=r.buttonsEnabled&&n||0;this.handles=[],this.shades=[],this.chart=t,this.setBaseSeries(),this.height=o,this.scrollbarHeight=n,this.scrollButtonSize=h,this.scrollbarEnabled=a,this.navigatorEnabled=!!s,this.navigatorOptions=e,this.scrollbarOptions=r,this.setOpposite();let l=this,d=l.baseSeries,c=t.xAxis.length,g=t.yAxis.length,p=d&&d[0]&&d[0].xAxis||t.xAxis[0]||{options:{}};if(t.isDirtyBox=!0,l.navigatorEnabled){let i=this.getXAxisOffsets();l.xAxis=new(v())(t,P({breaks:p.options.breaks,ordinal:p.options.ordinal,overscroll:p.options.overscroll},e.xAxis,{type:"datetime",yAxis:e.yAxis?.id,index:c,isInternal:!0,offset:0,keepOrdinalPadding:!0,startOnTick:!1,endOnTick:!1,minPadding:p.options.ordinal?0:p.options.minPadding,maxPadding:p.options.ordinal?0:p.options.maxPadding,zoomEnabled:!1},t.inverted?{offsets:i,width:o}:{offsets:i,height:o}),"xAxis"),l.yAxis=new(v())(t,P(e.yAxis,{alignTicks:!1,offset:0,index:g,isInternal:!0,reversed:H(e.yAxis&&e.yAxis.reversed,t.yAxis[0]&&t.yAxis[0].reversed,!1),zoomEnabled:!1},t.inverted?{width:o}:{height:o}),"yAxis"),d||e.series?.data?l.updateNavigatorSeries(!1):0===t.series.length&&(l.unbindRedraw=M(t,"beforeRedraw",function(){t.series.length>0&&!l.series&&(l.setBaseSeries(),l.unbindRedraw?.())})),l.reversedExtremes=t.inverted&&!l.xAxis.reversed||!t.inverted&&l.xAxis.reversed,l.renderElements(),l.addMouseEvents()}else l.xAxis={chart:t,navigatorAxis:{fake:!0},translate:function(i,e){let s=t.xAxis[0],r=s.getExtremes(),a=s.len-2*h,o=tA("min",s.options.min,r.dataMin),n=tA("max",s.options.max,r.dataMax)-o;return e?i*n/a+o:a*(i-o)/n},toPixels:function(t){return this.translate(t)},toValue:function(t){return this.translate(t,!0)}},l.xAxis.navigatorAxis.axis=l.xAxis,l.xAxis.navigatorAxis.toFixedRange=J.prototype.toFixedRange.bind(l.xAxis.navigatorAxis);if(t.options.scrollbar?.enabled){let i=P(t.options.scrollbar,{vertical:t.inverted});R(i.margin)||(i.margin=t.inverted?-3:3),t.scrollbar=l.scrollbar=new tb(t.renderer,i,t),M(l.scrollbar,"changed",function(t){let i=l.size,e=i*this.to,s=i*this.from;l.hasDragged=l.scrollbar?.hasDragged,l.render(0,0,s,e),this.shouldUpdateExtremes(t.DOMType)&&setTimeout(function(){l.onMouseUp(t)})})}l.addBaseSeriesEvents(),l.addChartEvents()}setOpposite(){let t=this.navigatorOptions,i=this.navigatorEnabled,e=this.chart;this.opposite=H(t.opposite,!!(!i&&e.inverted))}getUnionExtremes(t){let i,e=this.chart.xAxis[0],s=this.chart.time,r=this.xAxis,a=r.options,o=e.options;return t&&null===e.dataMin||(i={dataMin:H(s.parse(a?.min),tA("min",s.parse(o.min),e.dataMin,r.dataMin,r.min)),dataMax:H(s.parse(a?.max),tA("max",s.parse(o.max),e.dataMax,r.dataMax,r.max))}),i}setBaseSeries(t,i){let e=this.chart,s=this.baseSeries=[];t=t||e.options.navigator?.baseSeries||(e.series.length?z(e.series,t=>!t.options.isInternal).index:0),(e.series||[]).forEach((i,e)=>{!i.options.isInternal&&(i.options.showInNavigator||(e===t||i.options.id===t)&&!1!==i.options.showInNavigator)&&s.push(i)}),this.xAxis&&!this.xAxis.navigatorAxis.fake&&this.updateNavigatorSeries(!0,i)}updateNavigatorSeries(t,i){let e=this,s=e.chart,r=e.baseSeries,a={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}}},o=e.series=(e.series||[]).filter(t=>{let i=t.baseSeries;return!(i&&0>r.indexOf(i))||(i&&(W(i,"updatedData",e.updatedDataHandler),delete i.navigatorSeries),t.chart&&t.destroy(),!1)}),n,h,l=e.navigatorOptions.series,d;if(r&&r.length&&r.forEach(t=>{var c;let g=t.navigatorSeries,p=k({color:t.color,visible:t.visible},T(l)?tM.navigator.series:l);if(g&&!1===e.navigatorOptions.adaptToUpdatedData)return;a.name="Navigator "+r.length,d=(n=t.options||{}).navigatorOptions||{},p.dataLabels=T(c=p.dataLabels)?c:[c],(h=P(n,a,p,d)).pointRange=H(p.pointRange,d.pointRange,tM.plotOptions[h.type||"line"]?.pointRange);let u=d.data||p.data;e.hasNavigatorData=e.hasNavigatorData||!!u,h.data=u||n.data?.slice(0),g&&g.options?g.update(h,i):(t.navigatorSeries=s.initSeries(h),s.setSortedData(),t.navigatorSeries.baseSeries=t,o.push(t.navigatorSeries))}),l?.data&&!(r&&r.length)||T(l)){var c;e.hasNavigatorData=!1,(l=T(c=l)?c:[c]).forEach((t,i)=>{a.name="Navigator "+(o.length+1),(h=P(tM.navigator?.series,{color:s.series[i]&&!s.series[i].options.isInternal&&s.series[i].color||s.options.colors?.[i]||s.options.colors?.[0]},a,t)).data=t.data,h.data&&(e.hasNavigatorData=!0,o.push(s.initSeries(h)))})}t&&this.addBaseSeriesEvents()}addBaseSeriesEvents(){let t=this,i=t.baseSeries||[];i[0]&&i[0].xAxis&&i[0].eventsToUnbind.push(M(i[0].xAxis,"foundExtremes",this.modifyBaseAxisExtremes)),i.forEach(e=>{e.eventsToUnbind.push(M(e,"show",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!0,!1)})),e.eventsToUnbind.push(M(e,"hide",function(){this.navigatorSeries&&this.navigatorSeries.setVisible(!1,!1)})),!1!==this.navigatorOptions.adaptToUpdatedData&&e.xAxis&&e.eventsToUnbind.push(M(e,"updatedData",this.updatedDataHandler)),e.eventsToUnbind.push(M(e,"remove",function(){i&&w(i,e),this.navigatorSeries&&t.series&&(w(t.series,this.navigatorSeries),E(this.navigatorSeries.options)&&this.navigatorSeries.remove(!1),delete this.navigatorSeries)}))})}getBaseSeriesMin(t){return this.baseSeries.reduce(function(t,i){return Math.min(t,i.getColumn("x")[0]??t)},t)}modifyNavigatorAxisExtremes(){let t=this.xAxis;if(void 0!==t.getExtremes){let i=this.getUnionExtremes(!0);i&&(i.dataMin!==t.min||i.dataMax!==t.max)&&(t.min=i.dataMin,t.max=i.dataMax)}}modifyBaseAxisExtremes(){let t,i,e=this.chart.navigator,s=this.getExtremes(),r=s.min,a=s.max,o=s.dataMin,n=s.dataMax,h=a-r,l=e?.stickToMin,d=e?.stickToMax,c=H(this.ordinal?.convertOverscroll(this.options.overscroll),0),g=e.series&&e.series[0],p=!!this.setExtremes;!(this.eventArgs&&"rangeSelectorButton"===this.eventArgs.trigger)&&(l&&(t=(i=o)+h),d&&(t=n+c,l||(i=Math.max(o,t-h,e.getBaseSeriesMin(g&&g.xData?g.xData[0]:-Number.MAX_VALUE)))),p&&(l||d)&&R(i)&&(this.min=this.userMin=i,this.max=this.userMax=t)),e.stickToMin=e.stickToMax=null}updatedDataHandler(){let t=this.chart.navigator,i=this.navigatorSeries,e=t.reversedExtremes?0===Math.round(t.zoomedMin):Math.round(t.zoomedMax)>=Math.round(t.size);t.stickToMax=H(this.chart.options.navigator&&this.chart.options.navigator.stickToMax,e),t.stickToMin=t.shouldStickToMin(this,t),i&&!t.hasNavigatorData&&(i.options.pointStart=this.getColumn("x")[0],i.setData(this.options.data,!1,void 0,!1))}shouldStickToMin(t,i){let e=i.getBaseSeriesMin(t.getColumn("x")[0]),s=t.xAxis,r=s.max,a=s.min,o=s.options.range;return!!(R(r)&&R(a))&&(o&&r-e>0?r-e<o:a<=e)}addChartEvents(){this.eventsToUnbind||(this.eventsToUnbind=[]),this.eventsToUnbind.push(M(this.chart,"redraw",function(){let t=this.navigator,i=t&&(t.baseSeries&&t.baseSeries[0]&&t.baseSeries[0].xAxis||this.xAxis[0]);i&&t.render(i.min,i.max)}),M(this.chart,"getMargins",function(){let t=this.navigator,i=t.opposite?"plotTop":"marginBottom";this.inverted&&(i=t.opposite?"marginRight":"plotLeft"),this[i]=(this[i]||0)+(t.navigatorEnabled||!this.inverted?t.height+(this.scrollbar?.options.margin||0)+t.scrollbarHeight:0)+(t.navigatorOptions.margin||0)}),M(this,"setRange",function(t){this.chart.xAxis[0].setExtremes(t.min,t.max,t.redraw,t.animation,t.eventArguments)}))}destroy(){this.removeEvents(),this.xAxis&&(w(this.chart.xAxis,this.xAxis),w(this.chart.axes,this.xAxis)),this.yAxis&&(w(this.chart.yAxis,this.yAxis),w(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=>{O(t)}),this.baseSeries.forEach(t=>{t.navigatorSeries=void 0}),this.navigatorEnabled=!1}}let tO={chart:{height:70,margin:[0,5,0,5]},exporting:{enabled:!1},legend:{enabled:!1},navigator:{enabled:!1},plotOptions:{series:{states:{hover:{enabled:!1}},marker:{enabled:!1}}},scrollbar:{enabled:!1},title:{text:""},tooltip:{enabled:!1},xAxis:{visible:!1},yAxis:{height:0,visible:!1}};class tw{static navigator(t,i){let e=new tw(t,i);return p().navigators?p().navigators.push(e):p().navigators=[e],e}constructor(t,i){this.boundAxes=[],this.userOptions=i,this.chartOptions=P(p().getOptions(),tO,i.chart,{navigator:i}),this.chartOptions.chart&&i.height&&(this.chartOptions.chart.height=i.height);const e=new(x())(t,this.chartOptions);e.options=P(e.options,{navigator:{enabled:!0},scrollbar:{enabled:!0}}),this.chartOptions.navigator&&this.chartOptions.scrollbar&&(this.chartOptions.navigator.enabled=!0,this.chartOptions.scrollbar.enabled=!0),this.navigator=new tE(e),e.navigator=this.navigator,this.initNavigator()}bind(t,i=!0){let e=this,s=t instanceof x()?t.xAxis[0]:t;if(!(s instanceof v()))return;let{min:r,max:a}=this.navigator.xAxis,o=[];if(i){let t=M(s,"setExtremes",t=>{("pan"===t.trigger||"zoom"===t.trigger||"mousewheel"===t.trigger||"rangeSelectorButton"===t.trigger||"rangeSelectorInput"===t.trigger)&&e.setRange(t.min,t.max,!0,"pan"!==t.trigger&&"mousewheel"!==t.trigger,{trigger:s})});o.push(t)}let n=M(this.navigator,"setRange",t=>{s.setExtremes(t.min,t.max,t.redraw,t.animation)});o.push(n);let h=this.boundAxes.filter(function(t){return t.axis===s})[0];h||(h={axis:s,callbacks:[]},this.boundAxes.push(h)),h.callbacks=o,s.series.forEach(t=>{t.options.showInNavigator&&e.addSeries(t.options)}),s.setExtremes(r,a),M(s,"destroy",t=>{t.keepEvents||this.unbind(s)})}unbind(t){if(!t){this.boundAxes.forEach(({callbacks:t})=>{t.forEach(t=>t())}),this.boundAxes.length=0;return}let i=t instanceof v()?t:t.xAxis[0];for(let t=this.boundAxes.length-1;t>=0;t--)this.boundAxes[t].axis===i&&(this.boundAxes[t].callbacks.forEach(t=>t()),this.boundAxes.splice(t,1))}destroy(){this.boundAxes.forEach(({callbacks:t})=>{t.forEach(t=>t())}),this.boundAxes.length=0,this.navigator.destroy(),this.navigator.chart.destroy()}update(t,i){this.chartOptions=P(this.chartOptions,t.height&&{chart:{height:t.height}},t.chart,{navigator:t}),this.navigator.chart.update(this.chartOptions,i)}redraw(){this.navigator.chart.redraw()}addSeries(t){this.navigator.chart.addSeries(P(t,{showInNavigator:H(t.showInNavigator,!0)})),this.navigator.setBaseSeries()}initNavigator(){let t=this.navigator;t.top=1,t.xAxis.setScale(),t.yAxis.setScale(),t.xAxis.render(),t.yAxis.render(),t.series?.forEach(t=>{t.translate(),t.render(),t.redraw()});let{min:i,max:e}=this.getInitialExtremes();t.chart.xAxis[0].userMin=i,t.chart.xAxis[0].userMax=e,t.render(i,e)}getRange(){let{min:t,max:i}=this.navigator.chart.xAxis[0].getExtremes(),{userMin:e,userMax:s,min:r,max:a}=this.navigator.xAxis.getExtremes();return{min:H(t,r),max:H(i,a),dataMin:r,dataMax:a,userMin:e,userMax:s}}setRange(t,i,e,s,r){S(this.navigator,"setRange",{min:t,max:i,redraw:e,animation:s,eventArguments:P(r,{trigger:"navigator"})})}getInitialExtremes(){let{min:t,max:i}=this.navigator.xAxis.getExtremes();return{min:t,max:i}}}let tk=p();tk.StandaloneNavigator=tk.StandaloneNavigator||tw,tk.navigator=tk.StandaloneNavigator.navigator,tp(tk.Chart,tk.Axis,tk.Series);let tS=p();return c.default})());