PageSourceSearch

https://cdn.amcharts.com/lib/5/xy.js

js amcharts.com collected 2026-10-01 08:28:03 UTC 185,124 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_am5=self.webpackChunk_am5||[]).push([[1758],{641:function(t,e,i){i.d(e,{C:function(){return x}});var s=i(7675),a=i(9484),o=i(2544),n=i(7197),r=i(3597),h=i(8636),l=i(9253),c=i(4092),d=i(4636),g=i(8297),u=i(4193),m=i(1478),p=i(3664),_=i(6251);class x extends n.d{constructor(){super(...arguments),this.xAxes=new r.fo,this.yAxes=new r.fo,this.topAxesContainer=this.chartContainer.children.push(a.m.new(this._root,{width:h.Q2,layout:this._root.verticalLayout})._markC("width","layout")),this.yAxesAndPlotContainer=this.chartContainer.children.push(a.m.new(this._root,{width:h.Q2,height:h.Q2,layout:this._root.horizontalLayout})._markC("width","height","layout")),this.bottomAxesContainer=this.chartContainer.children.push(a.m.new(this._root,{width:h.Q2,layout:this._root.verticalLayout})._markC("width","layout")),this.leftAxesContainer=this.yAxesAndPlotContainer.children.push(a.m.new(this._root,{height:h.Q2,layout:this._root.horizontalLayout})._markC("height","layout")),this.plotsContainer=this.yAxesAndPlotContainer.children.push(a.m.new(this._root,{width:h.Q2,height:h.Q2,maskContent:!1})._markC("width","height","maskContent")),this.plotContainer=this.plotsContainer.children.push(a.m.new(this._root,{width:h.Q2,height:h.Q2})._markC("width","height")),this.topPlotContainer=this.plotsContainer.children.push(a.m.new(this._root,{width:h.Q2,height:h.Q2})._markC("width","height")),this.gridContainer=this.plotContainer.children.push(a.m.new(this._root,{width:h.Q2,height:h.Q2,isMeasured:!1})._markC("width","height","isMeasured")),this.topGridContainer=a.m.new(this._root,{width:h.Q2,height:h.Q2,isMeasured:!1})._markC("width","height","isMeasured"),this.rightAxesContainer=this.yAxesAndPlotContainer.children.push(a.m.new(this._root,{height:h.Q2,layout:this._root.horizontalLayout})._markC("height","layout")),this.axisHeadersContainer=this.plotContainer.children.push(a.m.new(this._root,{})),this.zoomOutButton=this.topPlotContainer.children.push(l.$.new(this._root,{themeTags:["zoom"],icon:c.A.new(this._root,{themeTags:["button","icon"]})})),this._movePoint={x:0,y:0},this._movePoints={}}_afterNew(){this._defaultThemes.push(s.W.new(this._root)),super._afterNew(),this._disposers.push(this.xAxes),this._disposers.push(this.yAxes);const t=this._root;let e=this._root.verticalLayout;const i=this.zoomOutButton;i.events.on("click",()=>{this.zoomOut()}),i.hide(0),i.states.lookup("default")._setC("opacity",1),this.chartContainer.set("layout",e);const a=this.plotContainer;a.children.push(this.seriesContainer),this._disposers.push(this._processAxis(this.xAxes,this.bottomAxesContainer)),this._disposers.push(this._processAxis(this.yAxes,this.leftAxesContainer)),a.children.push(this.topGridContainer),a.children.push(this.bulletsContainer),a._setC("interactive",!0),a._setC("interactiveChildren",!1),a._setC("background",o.M.new(t,{themeTags:["plotbackground","xy","background"]})._markC("themeTags")),this._disposers.push(a.events.on("pointerdown",t=>{this._handlePlotDown(t)})),this._disposers.push(a.events.on("globalpointerup",t=>{this._handlePlotUp(t)})),this._disposers.push(a.events.on("globalpointermove",t=>{this._handlePlotMove(t)})),this._maskGrid(),this._setUpTouch()}_beforeChanged(){super._beforeChanged(),(this.isDirty("pinchZoomX")||this.isDirty("pinchZoomY")||this.get("panX")||this.get("panY"))&&this._setUpTouch()}_setUpTouch(){this.plotContainer._display.cancelTouch||(this.plotContainer._display.cancelTouch=!!(this.get("pinchZoomX")||this.get("pinchZoomY")||this.get("panX")||this.get("panY")))}_maskGrid(){this.gridContainer.set("maskContent",!0),this.topGridContainer.set("maskContent",!0)}_removeSeries(t){t._unstack(),t._posXDp&&t._posXDp.dispose(),t._posYDp&&t._posYDp.dispose(),t.set("baseAxis",void 0);const e=t.get("xAxis");e&&(d.remove(e.series,t),e.markDirtyExtremes());const i=t.get("yAxis");i&&(d.remove(i.series,t),i.markDirtyExtremes());const s=this.get("cursor");if(s){const e=s.get("snapToSeries");e&&d.remove(e,t)}super._removeSeries(t)}_applyThemes(t=!1){const e=this.get("colors");e&&e.reset();const i=super._applyThemes(t);return this.series.each(t=>{this._colorize(t)}),i}handleWheel(t){const e=this.get("wheelX"),i=this.get("wheelY"),s=this.plotContainer,a=t.originalEvent;let o=!1;if(!p.isLocalEvent(a,this))return;o=!0;const n=s.toLocal(t.point),r=this.get("wheelStep",.2),h=a.deltaY/100,l=a.deltaX/100,c=this.get("wheelZoomPositionX"),d=this.get("wheelZoomPositionY");"zoomX"!==e&&"zoomXY"!==e||0==l||this.xAxes.each(t=>{if(t.get("zoomX")){let e=t.get("start"),i=t.get("end"),a=t.fixPosition(n.x/s.width());null!=c&&(a=c);let h=t.get("maxDeviation",0),d=Math.min(1+h,Math.max(-h,e-r*(i-e)*l*a)),g=Math.max(-h,Math.min(1+h,i+r*(i-e)*l*(1-a)));d==e&&g==i&&(o=!1),1/(g-d)<t.getPrivate("maxZoomFactor",1/0)/t.get("minZoomCount",1)?this._handleWheelAnimation(t.zoom(d,g)):o=!1}}
1),"zoomX"!==i&&"zoomXY"!==i||0==h||this.xAxes.each(t=>{if(t.get("zoomX")){let e=t.get("start"),i=t.get("end"),a=t.fixPosition(n.x/s.width());null!=c&&(a=c);let l=t.get("maxDeviation",0),d=Math.min(1+l,Math.max(-l,e-r*(i-e)*h*a)),g=Math.max(-l,Math.min(1+l,i+r*(i-e)*h*(1-a)));d==e&&g==i&&(o=!1),1/(g-d)<t.getPrivate("maxZoomFactor",1/0)/t.get("minZoomCount",1)?this._handleWheelAnimation(t.zoom(d,g)):o=!1}}),"zoomY"!==e&&"zoomXY"!==e||0==l||this.yAxes.each(t=>{if(t.get("zoomY")){let e=t.get("start"),i=t.get("end"),a=t.fixPosition(n.y/s.height());null!=d&&(a=d);let h=t.get("maxDeviation",0),c=Math.min(1+h,Math.max(-h,e-r*(i-e)*l*a)),g=Math.max(-h,Math.min(1+h,i+r*(i-e)*l*(1-a)));c==e&&g==i&&(o=!1),1/(g-c)<t.getPrivate("maxZoomFactor",1/0)/t.get("minZoomCount",1)?this._handleWheelAnimation(t.zoom(c,g)):o=!1}}),"zoomY"!==i&&"zoomXY"!==i||0==h||this.yAxes.each(t=>{if(t.get("zoomY")){let e=t.get("start"),i=t.get("end"),a=t.fixPosition(n.y/s.height());null!=d&&(a=d);let l=t.get("maxDeviation",0),c=Math.min(1+l,Math.max(-l,e-r*(i-e)*h*a)),g=Math.max(-l,Math.min(1+l,i+r*(i-e)*h*(1-a)));c==e&&g==i&&(o=!1),1/(g-c)<t.getPrivate("maxZoomFactor",1/0)/t.get("minZoomCount",1)?this._handleWheelAnimation(t.zoom(c,g)):o=!1}}),"panX"!==e&&"panXY"!==e||0==l||this.xAxes.each(t=>{if(t.get("panX")){let e=t.get("start"),i=t.get("end"),s=this._getWheelSign(t)*r*(i-e)*l,a=e+s,n=i+s,h=this._fixWheel(a,n);a=h[0],n=h[1],a==e&&n==i&&(o=!1),this._handleWheelAnimation(t.zoom(a,n))}}),"panX"!==i&&"panXY"!==i||0==h||this.xAxes.each(t=>{if(t.get("panX")){let e=t.get("start"),i=t.get("end"),s=this._getWheelSign(t)*r*(i-e)*h,a=e+s,n=i+s,l=this._fixWheel(a,n);a=l[0],n=l[1],a==e&&n==i&&(o=!1),this._handleWheelAnimation(t.zoom(a,n))}}),"panY"!==e&&"panXY"!==e||0==l||this.yAxes.each(t=>{if(t.get("panY")){let e=t.get("start"),i=t.get("end"),s=this._getWheelSign(t)*r*(i-e)*l,a=e+s,n=i+s,h=this._fixWheel(a,n);a=h[0],n=h[1],a==e&&n==i&&(o=!1),this._handleWheelAnimation(t.zoom(a,n))}}),"panY"!==i&&"panXY"!==i||0==h||this.yAxes.each(t=>{if(t.get("panY")){let e=t.get("start"),i=t.get("end"),s=this._getWheelSign(t)*r*(i-e)*h,a=e-s,n=i-s,l=this._fixWheel(a,n);a=l[0],n=l[1],a==e&&n==i&&(o=!1),this._handleWheelAnimation(t.zoom(a,n))}}),o&&a.preventDefault()}_handleSetWheel(){const t=this.get("wheelX"),e=this.get("wheelY"),i=this.plotContainer;"none"!==t||"none"!==e?(this._wheelDp=i.events.on("wheel",i=>{const s=i.originalEvent;("none"!==t&&0!=Math.abs(s.deltaX)||"none"!==e&&0!=Math.abs(s.deltaY))&&this.handleWheel(i)}),this._disposers.push(this._wheelDp)):this._wheelDp&&this._wheelDp.dispose()}_getWheelSign(t){let e=1;return t.get("renderer").get("inversed")&&(e=-1),e}_fixWheel(t,e){const i=e-t;return t<0&&(e=(t=0)+i),e>1&&(t=(e=1)-i),[t,e]}_handlePlotDown(t){const e=t.originalEvent;if(2==e.button)return;const i=this.plotContainer;let s=i.toLocal(t.point);if((this.get("pinchZoomX")||this.get("pinchZoomY"))&&e.pointerId&&m.keys(i._downPoints).length>0){const t=this.xAxes.getIndex(0),e=this.yAxes.getIndex(0);t&&(this._downStartX=t.get("start",0),this._downEndX=t.get("end",1)),e&&(this._downStartY=e.get("start",0),this._downEndY=e.get("end",1))}if((this.get("panX")||this.get("panY"))&&s.x>=0&&s.y>=0&&s.x<=i.width()&&s.y<=this.height()){this._downPoint={x:e.clientX,y:e.clientY};const i=this.get("panX"),s=this.get("panY");i&&this.xAxes.each(t=>{t._panStart=t.get("start"),t._panEnd=t.get("end")}),s&&this.yAxes.each(t=>{t._panStart=t.get("start"),t._panEnd=t.get("end")});const a="panstarted";this.events.isEnabled(a)&&this.events.dispatch(a,{type:a,target:this,originalEvent:t.originalEvent})}}_handleWheelAnimation(t){t?t.events.on("stopped",()=>{this._dispatchWheelAnimation()}):this._dispatchWheelAnimation()}_dispatchWheelAnimation(){const t="wheelended";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this})}_handlePlotUp(t){const e=this._downPoint;if(e&&(this.get("panX")||this.get("panY"))){if(t.originalEvent.clientX==e.x&&t.originalEvent.clientY==e.y){const e="pancancelled";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,originalEvent:t.originalEvent})}const i="panended";this.events.isEnabled(i)&&this.events.dispatch(i,{type:i,target:this,originalEvent:t.originalEvent})}this._downPoint=void 0,this.xAxes.each(t=>{t._isPanning=!1}),this.yAxes.each(t=>{t._isPanning=!1})}_handlePlotMove(t){const e=this.plotContainer;if(this.get("pinchZoomX")||this.get("pinchZoomY")){const i=t.originalEvent.pointerId;if(i&&(this._movePoints[i]=t.point,m.keys(e._downPoints).length>1))return void this._handlePinch()}let i=this._downPoint;
1if(i){i=e.toLocal(this._root.documentPointToRoot(i));let s=e.toLocal(t.point);const a=this.get("panX"),o=this.get("panY");if(a){let t=this.get("scrollbarX");t&&t.events.disableType("rangechanged"),this.xAxes.each(t=>{if(t.get("panX")){t._isPanning=!0;let a=t._panStart,o=t._panEnd,n=(o-a)*(i.x-s.x)/e.width();t.get("renderer").get("inversed")&&(n*=-1);let r=a+n,h=o+n;h-r<1+2*t.get("maxDeviation",1)&&(t.set("start",r),t.set("end",h))}}),t&&t.events.enableType("rangechanged")}if(o){let t=this.get("scrollbarY");t&&t.events.disableType("rangechanged"),this.yAxes.each(t=>{if(t.get("panY")){t._isPanning=!0;let a=t._panStart,o=t._panEnd,n=(o-a)*(i.y-s.y)/e.height();t.get("renderer").get("inversed")&&(n*=-1);let r=a-n,h=o-n;h-r<1+2*t.get("maxDeviation",1)&&(t.set("start",r),t.set("end",h))}}),t&&t.events.enableType("rangechanged")}}}_handlePinch(){const t=this.plotContainer;let e=0,i=[],s=[];if(m.each(t._downPoints,(t,a)=>{i[e]=a;let o=this._movePoints[t];o&&(s[e]=o),e++}),i.length>1&&s.length>1){const e=t.width(),a=t.height();let o=i[0],n=i[1],r=s[0],h=s[1];if(o&&n&&r&&h){if(r=t.toLocal(r),h=t.toLocal(h),o=t.toLocal(o),n=t.toLocal(n),this.get("pinchZoomX")){const t=this._downStartX,i=this._downEndX;if(null!=t&&null!=i){o.x>n.x&&([o,n]=[n,o],[r,h]=[h,r]);let s=t+o.x/e*(i-t),a=t+n.x/e*(i-t),l=t+r.x/e*(i-t),c=t+h.x/e*(i-t),d=Math.max(.001,a-s)/Math.max(.001,c-l),g=t*d+s-l*d,u=i*d+a-c*d;this.xAxes.each(t=>{let e=t.fixPosition(g),i=t.fixPosition(u);t.zoom(e,i,0)})}}if(this.get("pinchZoomY")){const t=this._downStartY,e=this._downEndY;if(null!=t&&null!=e){o.y<n.y&&([o,n]=[n,o],[r,h]=[h,r]);let i=t+(1-o.y/a)*(e-t),s=t+(1-n.y/a)*(e-t),l=t+(1-r.y/a)*(e-t),c=t+(1-h.y/a)*(e-t),d=Math.max(.001,s-i)/Math.max(.001,c-l),g=t*d+i-l*d,u=e*d+s-c*d;this.yAxes.each(t=>{let e=t.fixPosition(g),i=t.fixPosition(u);t.zoom(e,i,0)})}}}}}_handleCursorPosition(){const t=this.get("cursor");if(t){const e=t.getPrivate("point");let i=t.get("snapToSeries");if(t._downPoint&&(i=void 0),i&&e){const s=t.get("snapToSeriesBy"),a=[];d.each(i,t=>{if(!t.isHidden()&&!t.isHiding())if("x!"!=s&&"y!"!=s){const e=t.startIndex(),i=t.endIndex();for(let s=e;s<i;s++){const e=t.dataItems[s];e&&!e.isHidden()&&a.push(e)}}else{const e=t.get("tooltipDataItem");e&&a.push(e)}});let o,n=1/0;if(d.each(a,t=>{const i=t.get("point");if(i){let a=0;a="x"==s||"x!"==s?Math.abs(e.x-i.x):"y"==s||"y!"==s?Math.abs(e.y-i.y):Math.hypot(e.x-i.x,e.y-i.y),a<n&&(n=a,o=t)}}),d.each(i,t=>{const e=t.get("tooltip");e&&e._setDataItem(void 0)}),o){let e=o.component;e.showDataItemTooltip(o),e.setRaw("tooltipDataItem",o);const i=o.get("point");i&&t.handleMove(e.toGlobal({x:i.x-e.x(),y:i.y-e.y()}),!0)}}}}_updateCursor(){let t=this.get("cursor");t&&t.updateCursor()}_addCursor(t){this.plotContainer.children.push(t)}_prepareChildren(){if(super._prepareChildren(),this.series.each(t=>{this._colorize(t)}),(this.isDirty("wheelX")||this.isDirty("wheelY"))&&this._handleSetWheel(),this.isDirty("cursor")){const t=this._prevSettings.cursor,e=this.get("cursor");e!==t&&(this._disposeProperty("cursor"),t&&t.dispose(),e&&(e._setChart(this),this._addCursor(e),this._pushPropertyDisposer("cursor",e.events.on("selectended",()=>{this._handleCursorSelectEnd()}))),this._prevSettings.cursor=e)}if(this.isDirty("scrollbarX")){const t=this._prevSettings.scrollbarX,e=this.get("scrollbarX");e!==t&&(this._disposeProperty("scrollbarX"),t&&t.dispose(),e&&(this._placeScrollbar("scrollbarX",e,this.topAxesContainer,this.bottomAxesContainer),this._pushPropertyDisposer("scrollbarX",e.events.on("rangechanged",t=>{this._handleScrollbar(this.xAxes,t.start,t.end,t.grip)})),this._pushPropertyDisposer("scrollbarX",e.events.on("released",()=>{this.xAxes.each(t=>{t.get("zoomable")&&this._handleAxisSelection(t)})})),e.setPrivate("positionTextFunction",t=>{const e=this.xAxes.getIndex(0);return e&&e.getTooltipText(t,!1)||""})),this._prevSettings.scrollbarX=e)}if(this.isDirty("scrollbarY")){const t=this._prevSettings.scrollbarY,e=this.get("scrollbarY");e!==t&&(this._disposeProperty("scrollbarY"),t&&t.dispose(),e&&(this._placeScrollbar("scrollbarY",e,this.rightAxesContainer,this.leftAxesContainer,!0),this._pushPropertyDisposer("scrollbarY",e.events.on("rangechanged",t=>{this._handleScrollbar(this.yAxes,t.start,t.end,t.grip)})),this._pushPropertyDisposer("scrollbarY",e.events.on("released",()=>{this.yAxes.each(t=>{t.get("zoomable")&&this._handleAxisSelection(t)})})),e.setPrivate("positionTextFunction",t=>{const e=this.yAxes.getIndex(0);return e&&e.getTooltipText(t,!1)||""})),this._prevSettings.scrollbarY=e)}this._handleZoomOut()}_placeScrollbar(t,e,i,s,a){const o=()=>{const t=e.get("opposite"),o=t?s:i,n=o.children,r=t&&a?0:n.length-1;e.parent==o&&n.indexOf(e)==r||(e.removePrivate("x"),e.removePrivate("y"),t&&a?n.moveValue(e,0):n.moveValue(e),o.markDirtyBounds(),this._root.events.once("frameended",()=>{this.isDisposed()||this._updateChartLayout()}))};e.parent||o(),this._pushPropertyDisposer(t,e.on("opposite",()=>{const t=e.parent;t!=i&&t!=s||o()}))}_processSeries(t){super._processSeries(t);const e=t.get("xAxis"),i=t.get("yAxis");d.move(e.series,t),d.move(i.series,t),t._posXDp=t.addDisposer(e.events.on("positionchanged",()=>{t._fixPosition()})),t._posYDp=t.addDisposer(i.events.on("positionchanged",()=>{t._fixPosition()}
1)),t.get("baseAxis")||(i.isType("CategoryAxis")||i.isType("DateAxis")?t._setC("baseAxis",i):t._setC("baseAxis",e)),t.get("stacked")&&(t._markDirtyKey("stacked"),d.each(t.dataItems,t=>{t.set("stackToItemY",void 0),t.set("stackToItemX",void 0)})),t._markDirtyAxes(),i.markDirtyExtremes(),e.markDirtyExtremes(),e._seriesAdded=!0,i._seriesAdded=!0,this._colorize(t)}_colorize(t){const e=this.get("colors");if(e&&null==t.get("fill")){const i=e.next();t._setSoft("stroke",i),t._setSoft("fill",i)}const i=this.get("patterns");if(i&&null==t.get("fillPattern")){const e=i.next();t._setSoft("fillPattern",e)}const s=this.get("strokeWidths"),a=this.get("strokeDasharrays");if(s||a){const e=t.strokes;if(e&&e.template){const i=this.series.indexOf(t);s&&s.length>0&&e.template._setC("strokeWidth",s[i%s.length]),a&&a.length>0&&e.template._setC("strokeDasharray",a[i%a.length])}}}_handleCursorSelectEnd(){const t=this.get("cursor"),e=t.get("behavior"),i=t.getPrivate("downPositionX",0),s=t.getPrivate("downPositionY",0),a=Math.min(1,Math.max(0,t.getPrivate("positionX",.5))),o=Math.min(1,Math.max(0,t.getPrivate("positionY",.5)));this.xAxes.each(t=>{if("zoomX"===e||"zoomXY"===e){let e=t.toAxisPosition(i),s=t.toAxisPosition(a);t.zoom(e,s)}t.setPrivate("updateScrollbar",!0)}),this.yAxes.each(t=>{if("zoomY"===e||"zoomXY"===e){let e=t.toAxisPosition(s),i=t.toAxisPosition(o);t.zoom(e,i)}t.setPrivate("updateScrollbar",!0)})}_handleScrollbar(t,e,i,s){t.each(t=>{let a=t.fixPosition(e),o=t.fixPosition(i),n=t.zoom(a,o,void 0,s);const r="updateScrollbar";t.setPrivateRaw(r,!1),n?n.events.on("stopped",()=>{t.setPrivateRaw(r,!0)}):t.setPrivateRaw(r,!0)})}_processAxis(t,e){return t.events.onAll(t=>{if("clear"===t.type)d.each(t.oldValues,t=>{this._removeAxis(t)});else if("push"===t.type)e.children.push(t.newValue),t.newValue.processChart(this);else if("setIndex"===t.type)e.children.setIndex(t.index,t.newValue),t.newValue.processChart(this);else if("insertIndex"===t.type)e.children.insertIndex(t.index,t.newValue),t.newValue.processChart(this);else if("removeIndex"===t.type)this._removeAxis(t.oldValue);else{if("moveIndex"!==t.type)throw new Error("Unknown IListEvent type");e.children.moveValue(t.value,t.newIndex),t.value.processChart(this)}})}_removeAxis(t){if(!t.isDisposed()){const e=t.parent;e&&e.children.removeValue(t);const i=t.gridContainer,s=i.parent;s&&s.children.removeValue(i);const a=t.topGridContainer,o=a.parent;o&&o.children.removeValue(a)}}_updateChartLayout(){const t=this.leftAxesContainer.width(),e=this.rightAxesContainer.width(),i=this.bottomAxesContainer;i.set("paddingLeft",t),i.set("paddingRight",e);const s=this.topAxesContainer;s.set("paddingLeft",t),s.set("paddingRight",e)}processAxis(t){this.get("cursor")&&(this.addDisposer(t.on("start",()=>{this._updateCursor()})),this.addDisposer(t.on("end",()=>{this._updateCursor()})))}_handleAxisSelection(t,e){let i=t.fixPosition(t.get("start",0)),s=t.fixPosition(t.get("end",1));if(i>s&&([i,s]=[s,i]),-1!=this.xAxes.indexOf(t)){if(e||t.getPrivate("updateScrollbar")){let t=this.get("scrollbarX");!t||t.getPrivate("isBusy")&&!e||(t._setCRaw("start",i),t._setCRaw("end",s),t.updateGrips())}}else if(-1!=this.yAxes.indexOf(t)&&(e||t.getPrivate("updateScrollbar"))){let t=this.get("scrollbarY");!t||t.getPrivate("isBusy")&&!e||(t._setCRaw("start",i),t._setCRaw("end",s),t.updateGrips())}this._handleZoomOut()}_handleZoomOut(){let t=this.zoomOutButton;if(t&&t.parent){let e=!1;this.xAxes.each(t=>{t.get("zoomOut",!0)&&!t._isSynced()&&(0==_.round(t.get("start",0),5)&&1==_.round(t.get("end",1),5)||(e=!0))}),this.yAxes.each(t=>{t.get("zoomOut",!0)&&!t._isSynced()&&(0==_.round(t.get("start",0),5)&&1==_.round(t.get("end",1),5)||(e=!0))}),e?t.isHidden()&&t.show():t.hide()}}inPlot(t){const e=this.plotContainer,i=this.getPrivate("otherCharts",this._otherCharts),s=e.toGlobal(t);if(t.x>=-.5&&t.y>=-.5&&t.x<=e.width()+.5&&t.y<=e.height()+.5)return!0;if(i)for(let t=i.length-1;t>=0;t--){const e=i[t];if(e!=this){const t=e.plotContainer,i=this._root.rootPointToDocument(s),a=e._root.documentPointToRoot(i),o=t.toLocal(a);if(o.x>=-.1&&o.y>=-.1&&o.x<=t.width()+.1&&o.y<=t.height()+.1)return!0}}return!1}arrangeTooltips(){const t=this.plotContainer,e=t.width(),i=t.height();let s=this.height();const a=this._root.tooltipContainer.get("layerMargin");a&&a.bottom>s&&(s=a.bottom);let o=t._display.toGlobal({x:0,y:0}),n=t._display.toGlobal({x:e,y:i});const r=[];let l,c,m=0,p=1/0,_=this._movePoint,x=this.get("maxTooltipDistance"),v=this.get("maxTooltipDistanceBy","xy");g.isNumber(x)&&this.series.each(t=>{if(!t.isHidden()){const e=t.get("tooltip");if(e){let i=e.get("pointTo");if(i){let e=Math.hypot(_.x-i.x,_.y-i.y);
1"x"==v?e=Math.abs(_.x-i.x):"y"==v&&(e=Math.abs(_.y-i.y)),e<p&&(p=e,l=t,c=i)}}}});const y=[];if(this.series.each(t=>{const e=t.get("tooltip");if(e&&!e.get("forceHidden")){let i=!1,s=e.get("pointTo");if(s){if(x>=0){let s=e.get("pointTo");if(s&&c&&t!=l){let t=Math.hypot(c.x-s.x,c.y-s.y);"x"==v?t=Math.abs(c.x-s.x):"y"==v&&(t=Math.abs(c.y-s.y)),t>x&&(i=!0)}}else-1==x&&t!=l&&(i=!0);this.inPlot(this._tooltipToLocal(s))&&e.dataItem?i||(m+=s.y):i=!0,i||t.isHidden()||t.isHiding()?e.hide(0):(e.show(),r.push(e),y.push(t))}}}),this.setPrivate("tooltipSeries",y),this.get("arrangeTooltips")){let t=0,e=0;const a=this._root.tooltipContainer,l=r.length;if(m/l>i/2+o.y){r.sort((t,e)=>u.r9(e.get("pointTo").y,t.get("pointTo").y));let i=n.y;if(d.each(r,s=>{let r=s.height();e++,t+=r;let l=s.get("centerY");l instanceof h.QE&&(r*=l.value),r+=s.get("marginBottom",0),s.set("bounds",{left:o.x,top:o.y,right:n.x,bottom:i}),s.setPrivate("customData",{left:o.x,top:o.y,right:n.x,bottom:i}),i=Math.min(i-r,s._fy-r),s.parent==a&&a.children.moveValue(s,0)}),i<0){r.reverse();let t=i;d.each(r,s=>{e++;let a=s.get("bounds");if(a){let e=a.top-i,o=a.bottom-i;e<t&&(e=t,o=e+s.height()),s.set("bounds",{left:a.left,top:e,right:a.right,bottom:o}),t=a.bottom-i+s.get("marginBottom",0)}})}}else{r.reverse(),r.sort((t,e)=>u.r9(t.get("pointTo").y,e.get("pointTo").y));let i=0;if(d.each(r,r=>{e++;let l=r.height();t+=l;let c=r.get("centerY");c instanceof h.QE&&(l*=c.value),l+=r.get("marginBottom",0),r.set("bounds",{left:o.x,top:i,right:n.x,bottom:Math.max(o.y+s,i+l)}),r.parent==a&&a.children.moveValue(r,0),i=Math.max(i+l,r._fy+l)}),i>s){r.reverse();let t=s;d.each(r,a=>{e++;let o=a.get("bounds");if(o){let e=o.top-(s-i),n=o.bottom-(s-i);n>t&&(n=t,e=n-a.height()),a.set("bounds",{left:o.left,top:e,right:o.right,bottom:n}),t=n-a.height()-a.get("marginBottom",0)}})}}0==t&&e>0&&this._disposers.push(this.root.events.once("frameended",()=>{this.arrangeTooltips()}))}}_tooltipToLocal(t){return this.plotContainer.toLocal(t)}zoomOut(){this.xAxes.each(t=>{t.get("zoomOut",!0)&&!t._isSynced()&&(t.setPrivate("updateScrollbar",!0),t.zoom(0,1))}),this.yAxes.each(t=>{t.get("zoomOut",!0)&&!t._isSynced()&&(t.setPrivate("updateScrollbar",!0),t.zoom(0,1))})}_dispose(){super._dispose();const t=this.get("cursor");t&&t.dispose()}}x.className="XYChart",x.classNames=n.d.classNames.concat([x.className])},7675:function(t,e,i){i.d(e,{W:function(){return u}});var s=i(5945),a=i(8636),o=i(2570),n=i(924),r=i(2975),h=i(7292),l=i(8297),c=i(6251),d=i(1478),g=i(4636);class u extends s.S{setupDefaultRules(){super.setupDefaultRules();const t=this._root.interfaceColors,e=this._root.language,i=this.rule.bind(this);i("XYChart").setAll({colors:n.e.new(this._root,{}),paddingLeft:20,paddingRight:20,paddingTop:16,paddingBottom:16,panX:!1,panY:!1,wheelStep:.25,arrangeTooltips:!0,pinchZoomX:!1,pinchZoomY:!1}),i("XYSeries").setAll({legendLabelText:"{name}"}),i("Rectangle",["plotbackground","xy","background"]).setAll({fill:o.Q1.fromHex(0),fillOpacity:0}),i("XYChart",["scrollbar","chart"]).setAll({paddingBottom:0,paddingLeft:0,paddingTop:0,paddingRight:0,colors:n.e.new(this._root,{saturation:0})._markC("saturation")});{const e=i("Graphics",["scrollbar","overlay"]);e.setAll({fillOpacity:.5}),(0,r.w)(e,"fill",t,"background")}i("RoundedRectangle",["xy","scrollbar","thumb"]).setAll({cornerRadiusTR:0,cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusBL:0,fillOpacity:0,focusable:!0}),i("RoundedRectangle",["xy","scrollbar","thumb"]).states.create("hover",{fillOpacity:.4}),i("RoundedRectangle",["xy","scrollbar","chart","background"]).setAll({cornerRadiusTL:0,cornerRadiusBL:0,
vendor: 6,209 bytes, line 1
1cornerRadiusTR:0,cornerRadiusBR:0}),i("RoundedRectangle",["xy","scrollbar","chart","background","resize","button"]).setAll({cornerRadiusBL:40,cornerRadiusBR:40,cornerRadiusTL:40,cornerRadiusTR:40}),i("AxisRendererX",["xy","chart","scrollbar"]).setAll({strokeOpacity:0,inside:!0}),i("AxisRendererY",["xy","chart","scrollbar"]).setAll({strokeOpacity:0,inside:!0,minGridDistance:5}),i("AxisLabel",["xy","scrollbar","x"]).setAll({opacity:.5,centerY:a.Q2,minPosition:.01,maxPosition:.99,fontSize:"0.8em"}),i("AxisLabel",["category"]).setAll({text:"{category}",populateText:!0}),i("AxisLabel",["x"]).setAll({centerY:0}),i("AxisLabel",["x","inside"]).setAll({centerY:a.Q2}),i("AxisLabel",["x","inside","opposite"]).setAll({centerY:0}),i("AxisLabel",["x","opposite"]).setAll({centerY:a.Q2}),i("AxisLabel",["y"]).setAll({centerX:a.Q2}),i("AxisLabel",["y","inside"]).setAll({centerX:0}),i("AxisLabel",["y","inside","opposite"]).setAll({centerX:a.Q2}),i("AxisLabel",["y","opposite"]).setAll({centerX:0}),i("AxisLabel",["minor"]).setAll({fontSize:"0.6em"}),i("AxisLabel",["xy","scrollbar","y"]).setAll({visible:!1}),i("Grid",["xy","scrollbar","y"]).setAll({visible:!1}),i("Grid",["xy","scrollbar","x"]).setAll({opacity:.5}),i("XYCursor").setAll({behavior:"none",layer:30,exportable:!1,snapToSeriesBy:"xy",moveThreshold:1});{const s=i("Grid",["cursor","x"]);s.setAll({forceInactive:!0,strokeOpacity:.8,strokeDasharray:[2,2],role:"slider",ariaLabel:e.translate("Use left and right arrows to move selection")}),(0,r.w)(s,"stroke",t,"alternativeBackground")}{const s=i("Grid",["cursor","y"]);s.setAll({forceInactive:!0,strokeOpacity:.8,strokeDasharray:[2,2],role:"slider",ariaLabel:e.translate("Use up and down arrows to move selection")}),(0,r.w)(s,"stroke",t,"alternativeBackground")}{const e=i("Graphics",["cursor","selection"]);e.setAll({fillOpacity:.15}),(0,r.w)(e,"fill",t,"alternativeBackground")}i("Axis").setAll({zoomOut:!0,start:0,end:1,minZoomCount:1,maxZoomCount:1/0,maxZoomFactor:1e3,maxDeviation:.1,snapTooltip:!0,tooltipLocation:.5,panX:!0,panY:!0,zoomX:!0,zoomY:!0,fixAxisSize:!0}),i("AxisLabel").setAll({location:.5,multiLocation:0,centerX:a.yP,centerY:a.yP,paddingTop:3,paddingBottom:3,paddingLeft:5,paddingRight:5}),i("Container",["axis","header"]).setAll({layer:30}),i("Rectangle",["axis","header","background"]).setAll({crisp:!0});{const e=i("AxisRenderer");e.setAll({crisp:!0,strokeOpacity:0}),(0,r.w)(e,"stroke",t,"grid")}i("AxisRendererX").setAll({minGridDistance:120,opposite:!1,inversed:!1,cellStartLocation:0,cellEndLocation:1,width:a.Q2}),i("AxisRendererY").setAll({minGridDistance:40,opposite:!1,inversed:!1,cellStartLocation:0,cellEndLocation:1,height:a.Q2});{const e=i("Rectangle",["axis","thumb","zoomgrip"]);e.setAll({fillOpacity:0}),(0,r.w)(e,"fill",t,"alternativeBackground"),e.states.create("hover",{fillOpacity:.1})}i("Rectangle",["axis","thumb","x","zoomgrip"]).setAll({cursorOverStyle:"ew-resize"}),i("Rectangle",["axis","thumb","y","zoomgrip"]).setAll({cursorOverStyle:"ns-resize"});{const e=i("Grid");e.setAll({location:0,strokeOpacity:.15,crisp:!0}),(0,r.w)(e,"stroke",t,"grid")}{const e=i("Grid",["minor"]);e.setAll({location:0,strokeOpacity:.07,crisp:!0}),(0,r.w)(e,"stroke",t,"grid")}i("Grid",["base"]).setAll({strokeOpacity:.3});{const e=i("Graphics",["axis","fill"]);e.setAll({visible:!1,isMeasured:!1,position:"absolute",fillOpacity:.05}),(0,r.w)(e,"fill",t,"alternativeBackground")}i("Graphics",["axis","fill","range"]).setAll({isMeasured:!0}),i("Graphics",["series","fill","range"]).setAll({visible:!1,isMeasured:!0}),i("Grid",["series","range"]).setAll({visible:!1}),i("AxisTick",["series","range"]).setAll({visible:!1}),i("AxisLabel",["series","range"]).setAll({visible:!1});{const e=i("AxisTick");e.setAll({location:.5,multiLocation:0,strokeOpacity:1,isMeasured:!1,position:"absolute",visible:!1}),(0,r.w)(e,"stroke",t,"grid")}i("CategoryAxis").setAll({startLocation:0,endLocation:1,fillRule:(t,e)=>{const i=t.get("axisFill");i&&(l.isNumber(e)&&e%2!=0?i.setPrivate("visible",!1):i.setPrivate("visible",!0))}});const s=[{timeUnit:"millisecond",count:1},{timeUnit:"millisecond",count:5},{timeUnit:"millisecond",count:10},{timeUnit:"millisecond",count:50},{timeUnit:"millisecond",count:100},{timeUnit:"millisecond",count:500},{timeUnit:"second",count:1},{timeUnit:"second",count:5},{timeUnit:"second",count:10},{timeUnit:"second",count:30},{timeUnit:"minute",count:1},{timeUnit:"minute",count:5},{timeUnit:"minute",count:10},{timeUnit:"minute",count:15},{timeUnit:"minute",count:30},{timeUnit:"hour",count:1},{timeUnit:"hour",count:3},{timeUnit:"hour",count:6},{timeUnit:"hour",count:12},{timeUnit:"day",count:1},{timeUnit:"day",count:2},{timeUnit:"day",count:3},{timeUnit:"day",count:4},{timeUnit:"day",count:5},{timeUnit:"week",count:1},{timeUnit:"month",count:1},{timeUnit:"month",count:2},{timeUnit:"month",count:3},{timeUnit:"month",count:6},{timeUnit:"year",count:1},{timeUnit:"year",count:2},{timeUnit:"year",count:5},{timeUnit:"year",count:10},{timeUnit:"year",count:50},{timeUnit:"year",count:100},{timeUnit:"year",count:200},{timeUnit:"year",count:500},{timeUnit:"year",count:1e3},{timeUnit:"year",count:2e3},{timeUnit:"year",count:5e3},{timeUnit:"year",count:1e4},{timeUnit:"year",count:1e5}],u={millisecond:e.translate("_date_millisecond"),second:e.translate("_date_second"),minute:e.translate("_date_minute"),hour:e.translate("_date_hour"),day:e.translate("_date_day"),week:e.translate("_date_day"),month:e.translate("_date_month"),year:e.translate("_date_year")},m={millisecond:e.translate("_date_millisecond"),second:e.translate("_date_second"),minute:e.translate("_date_minute"),hour:e.translate("_date_day"),day:e.translate("_date_day"),week:e.translate("_date_day"),month:e.translate("_date_month")+" "+e.translate("_date_year"),year:e.translate("_date_year")},p={millisecond:e.translate("_date_millisecond_full"),second:e.translate("_date_second_full"),minute:e.translate("_date_minute_full"),hour:e.translate("_date_hour_full"),day:e.translate("_date_day_full"),week:e.translate("_date_week_full"),month:e.translate("_date_month_full"),year:e.translate("_date_year")};i("CategoryDateAxis").setAll({markUnitChange:!0,gridIntervals:g.copy(s),dateFormats:d.c
1opy(u),periodChangeDateFormats:d.copy(m)}),i("DateAxis").setAll({maxZoomFactor:null,strictMinMax:!0,startLocation:0,endLocation:1,markUnitChange:!0,groupData:!1,groupCount:500,skipFirstMinor:!0,weekLabelLocation:0,gridIntervals:g.copy(s),dateFormats:d.copy(u),periodChangeDateFormats:d.copy(m),tooltipDateFormats:p,groupIntervals:[{timeUnit:"millisecond",count:1},{timeUnit:"millisecond",count:10},{timeUnit:"millisecond",count:100},{timeUnit:"second",count:1},{timeUnit:"second",count:10},{timeUnit:"minute",count:1},{timeUnit:"minute",count:10},{timeUnit:"hour",count:1},{timeUnit:"day",count:1},{timeUnit:"week",count:1},{timeUnit:"month",count:1},{timeUnit:"year",count:1}],fillRule:t=>{const e=t.get("axisFill");if(e){const i=t.component,s=t.get("value"),a=t.get("endValue"),o=i.intervalDuration(),n=i.getPrivate("baseInterval"),r=i.getPrivate("gridInterval",n);let l=i.getPrivate("min",0);if(l=h.round(new Date(l),r.timeUnit,r.count,this._root.locale.firstDayOfWeek,this._root.utc,void 0,this._root.timezone).getTime(),null!=s&&null!=a){const t=Math.round(Math.round((s-l)/o))/2;t==Math.round(t)?e.setPrivate("visible",!0):e.setPrivate("visible",!1)}}}}),i("GaplessDateAxis").setAll({fillRule:t=>{const e=t.get("axisFill");if(e){const i=t.get("index");let s=!1;l.isNumber(i)&&i%2!=0||(s=!0),e.setPrivate("visible",s)}}}),i("ValueAxis").setAll({baseValue:0,logarithmic:!1,strictMinMax:!1,autoZoom:!0,fillRule:t=>{const e=t.get("axisFill");if(e){const i=t.component,s=t.get("value"),a=i.getPrivate("step");l.isNumber(s)&&l.isNumber(a)&&(c.round(s/a/2,5)==Math.round(s/a/2)?e.setPrivate("visible",!1):e.setPrivate("visible",!0))}}}),i("DurationAxis").setAll({baseUnit:"second"}),i("XYSeries").setAll({maskBullets:!0,stackToNegative:!0,locationX:.5,locationY:.5,snapTooltip:!1,openValueXGrouped:"open",openValueYGrouped:"open",valueXGrouped:"close",valueYGrouped:"close",seriesTooltipTarget:"series"}),i("BaseColumnSeries").setAll({adjustBulletPosition:!0}),i("ColumnSeries").setAll({clustered:!0}),i("RoundedRectangle",["series","column"]).setAll({position:"absolute",isMeasured:!1,width:(0,a.KN)(70),height:(0,a.KN)(70),strokeWidth:1,strokeOpacity:1,cornerRadiusBL:0,
1cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusTR:0,fillOpacity:1,role:"figure"}),i("LineSeries").setAll({connect:!0,autoGapCount:1.1,stackToNegative:!1}),i("Graphics",["series","stroke"]).setAll({position:"absolute",strokeWidth:1,strokeOpacity:1,isMeasured:!1}),i("Graphics",["series","fill"]).setAll({visible:!1,fillOpacity:0,position:"absolute",strokeWidth:0,strokeOpacity:0,isMeasured:!1}),i("Graphics",["line","series","legend","marker","stroke"]).setAll({draw:(t,e)=>{const i=e.parent;if(i){const e=i.height(),s=i.width();t.moveTo(0,e/2),t.lineTo(s,e/2)}}});{const e=i("Graphics",["line","series","legend","marker","stroke"]).states.create("disabled",{});(0,r.w)(e,"stroke",t,"disabled")}i("Graphics",["line","series","legend","marker","fill"]).setAll({draw:(t,e)=>{const i=e.parent;if(i){const e=i.height(),s=i.width();t.moveTo(0,0),t.lineTo(s,0),t.lineTo(s,e),t.lineTo(0,e),t.lineTo(0,0)}}});{const e=i("Graphics",["line","series","legend","marker","fill"]).states.create("disabled",{});(0,r.w)(e,"stroke",t,"disabled")}i("SmoothedXYLineSeries").setAll({tension:.5}),i("SmoothedXLineSeries").setAll({tension:.5}),i("SmoothedYLineSeries").setAll({tension:.5}),i("Candlestick").setAll({position:"absolute",isMeasured:!1,width:(0,a.KN)(50),height:(0,a.KN)(50),strokeWidth:1,strokeOpacity:1,cornerRadiusBL:0,
1cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusTR:0,fillOpacity:1,role:"figure"}),i("OHLC").setAll({width:(0,a.KN)(80),height:(0,a.KN)(80)}),i("CandlestickSeries").setAll({lowValueXGrouped:"low",lowValueYGrouped:"low",highValueXGrouped:"high",highValueYGrouped:"high",openValueXGrouped:"open",openValueYGrouped:"open",valueXGrouped:"close",valueYGrouped:"close"});{const e=i("Rectangle",["column","autocolor"]).states.create("riseFromOpen",{});(0,r.w)(e,"fill",t,"positive"),(0,r.w)(e,"stroke",t,"positive")}{const e=i("Rectangle",["column","autocolor"]).states.create("dropFromOpen",{});(0,r.w)(e,"fill",t,"negative"),(0,r.w)(e,"stroke",t,"negative")}i("Rectangle",["column","autocolor","pro"]).states.create("riseFromOpen",{fillOpacity:0}),i("Rectangle",["column","autocolor","pro"]).states.create("dropFromOpen",{fillOpacity:1});{const e=i("Rectangle",["column","autocolor","pro"]).states.create("riseFromPrevious",{});(0,r.w)(e,"fill",t,"positive"),(0,r.w)(e,"stroke",t,"positive")}{const e=i("Rectangle",["column","autocolor","pro"]).states.create("dropFromPrevious",{});(0,r.w)(e,"fill",t,"negative"),(0,r.w)(e,"stroke",t,"negative")}i("RoundedRectangle",["rangegrip"]).setAll({strokeOpacity:0,fillOpacity:0,strokeWidth:1,width:12,height:12});{const e=i("Graphics",["rangegrip","button","icon"]);e.setAll({interactive:!1,crisp:!0,strokeOpacity:.5,draw:t=>{t.moveTo(0,.5),t.lineTo(0,12.5),t.moveTo(2,.5),t.lineTo(2,12.5),t.moveTo(4,.5),t.lineTo(4,12.5)}}),(0,r.w)(e,"stroke",t,"secondaryButtonText")}i("Button",["rangegrip"]).setAll({draggable:!0,paddingTop:0,paddingBottom:0}),i("Button",["rangegrip","vertical"]).setAll({rotation:90,cursorOverStyle:"ns-resize",centerX:a.yP}),i("Button",["rangegrip","horizontal"]).setAll({cursorOverStyle:"ew-resize",centerX:a.yP}),i("Button",["rangegrip","vertical","left"]).setAll({centerY:a.Q2}),i("Button",["rangegrip","vertical","right"]).setAll({centerY:0}),i("Button",["rangegrip","horizontal","top"]).setAll({centerY:0}),i("Button",["rangegrip","horizontal","bottom"]).setAll({centerY:a.Q2})}}},5407:function(t,e,i){i.d(e,{A:function(){return g}});var s=i(9484),a=i(8636),o=i(4092),n=i(4810),r=i(8297),h=i(3664),l=i(6251),c=i(4636),d=i(1478);class g extends s.m{constructor(){super(...arguments),this._alwaysShow=!1,this.lineX=this.children.push(n.x.new(this._root,{themeTags:["x"]})),this.lineY=this.children.push(n.x.new(this._root,{themeTags:["y"]})),this.selection=this.children.push(o.A.new(this._root,{themeTags:["selection","cursor"],layer:30})._markC("themeTags","layer")),this._lastPoint={x:0,y:0},this._lastPoint2={x:0,y:0},this._tooltipX=!1,this._tooltipY=!1}_afterNew(){this._settings.themeTags=h.mergeTags(this._settings.themeTags,["xy","cursor"]),super._afterNew(),this._setCAll({width:a.Q2,height:a.Q2,isMeasured:!0,position:"absolute"}),this.states._createC("hidden",{visible:!0,opacity:0}),this._drawLines(),this.setPrivateRaw("visible",!1),this._disposers.push(this.setTimeout(()=>{this.setPrivate("visible",!0)},500)),this._disposers.push(this.lineX.events.on("positionchanged",()=>{this._handleXLine()})),this._disposers.push(this.lineY.events.on("positionchanged",()=>{this._handleYLine()})),this._disposers.push(this.lineX.events.on("focus",()=>this._handleLineFocus())),this._disposers.push(this.lineX.events.on("blur",()=>this._handleLineBlur())),this._disposers.push(this.lineY.events.on("focus",()=>this._handleLineFocus())),this._disposers.push(this.lineY.events.on("blur",()=>this._handleLineBlur())),h.supports("keyboardevents")&&this._disposers.push(h.addEventListener(document,"keydown",t=>{this._handleLineMove(h.getEventKey(t),t.ctrlKey)}))}_setUpTouch(){const t=this.chart;t&&(t.plotContainer._display.cancelTouch="none"!=this.get("behavior"))}_handleXLine(){let t=this.lineX.x(),e=!0;(t<0||t>this.width())&&(e=!1),this.lineX.setPrivate("visible",e)}_handleYLine(){let t=this.lineY.y(),e=!0;(t<0||t>this.height())&&(e=!1),this.lineY.setPrivate("visible",e)}_handleLineMove(t,e){let i="";const s=this.chart;let a;if(s&&s.xAxes.length){this._root.focused(this.lineX)?(i="positionX",a=s.xAxes.getIndex(0)):this._root.focused(this.lineY)&&(a=s.yAxes.getIndex(0),i="positionY");let o=1;if(e&&(o=5),a){let e,s=a.get("renderer").get("inversed",!1);"ArrowRight"==t||"ArrowDown"==t?e=1:"ArrowLeft"==t||"ArrowUp"==t?e=-1:"Tab"==t&&(e=0),null!=e&&(s&&(e*=-1),this.set(i,a.nextPosition(e*o)
1))}}}_handleLineFocus(){this._alwaysShow=this.get("alwaysShow",!1),this.setAll({positionX:this.getPrivate("positionX",0),positionY:this.getPrivate("positionY",0),alwaysShow:!0}),this._handleLineMove("Tab")}_handleLineBlur(){(this.lineX.isFocus()||this.lineY.isFocus())&&this.setAll({positionX:void 0,positionY:void 0,alwaysShow:this._alwaysShow})}_prepareChildren(){if(super._prepareChildren(),this.isDirty("xAxis")){this._tooltipX=!1;const t=this.get("xAxis");if(t){const e=t.get("tooltip");e&&(this._tooltipX=!0,this._disposers.push(e.on("pointTo",()=>{this._updateXLine(e)})))}}if(this.isDirty("yAxis")){this._tooltipY=!1;const t=this.get("yAxis");if(t){const e=t.get("tooltip");e&&(this._tooltipY=!0,this._disposers.push(e.on("pointTo",()=>{this._updateYLine(e)})))}}}_handleSyncWith(){const t=this.chart;if(t){const e=this.get("syncWith"),i=[];e&&c.each(e,t=>{const e=t.chart;e&&i.push(e)}),t._otherCharts=i}}_updateChildren(){if(super._updateChildren(),this._handleSyncWith(),this.isDirty("positionX")||this.isDirty("positionY")){const t=this.get("positionX"),e=this.get("positionY");null==t&&null==e?this.hide(0):(this._movePoint=this.toGlobal(this._getPoint(this.get("positionX",0),this.get("positionY",0))),this.handleMove())}}_updateXLine(t){let e=l.round(this._display.toLocal(t.get("pointTo",{x:0,y:0})).x,3);this._toX!=e&&(this.lineX.animate({key:"x",to:e,duration:t.get("animationDuration",0),easing:t.get("animationEasing")}),this._toX=e)}_updateYLine(t){let e=l.round(this._display.toLocal(t.get("pointTo",{x:0,y:0})).y,3);this._toY!=e&&(this.lineY.animate({key:"y",to:e,duration:t.get("animationDuration",0),easing:t.get("animationEasing")}),this._toY=e)}_drawLines(){this.lineX.set("draw",t=>{t.moveTo(0,0),t.lineTo(0,this.height())}),this.lineY.set("draw",t=>{t.moveTo(0,0),t.lineTo(this.width(),0)})}updateCursor(){this.get("alwaysShow")&&(this._movePoint=this.toGlobal(this._getPoint(this.get("positionX",0),this.get("positionY",0)))),this.handleMove()}_setChart(t){this.chart=t,this._handleSyncWith();const e=t.plotContainer;this.events.on("boundschanged",()=>{this._boundsTimeout&&this._boundsTimeout.dispose(),this._boundsTimeout=this.setTimeout(()=>{this.updateCursor()},50),this._disposers.push(this._boundsTimeout)}),h.supports("touchevents")&&(this._disposers.push(e.events.on("click",t=>{h.isTouchEvent(t.originalEvent)&&this._handleMove(t)})),this._setUpTouch()),this._disposers.push(e.events.on("pointerdown",t=>{this._handleCursorDown(t)})),this._disposers.push(e.events.on("globalpointerdown",t=>{this._handleCursorDownGlobal(t)})),this._disposers.push(e.events.on("globalpointerup",t=>{this._handleCursorUp(t),t.native||this.isHidden()||this._handleMove(t)})),this._disposers.push(e.events.on("globalpointermove",t=>{(this.get("syncWith")||0!=d.keys(e._downPoints).length||this._downPoint||t.native||!this.isHidden())&&(this._handleMove(t),Math.hypot(this._lastPoint2.x-t.point.x,this._lastPoint2.y-t.point.y)>1&&(this._handleLineBlur(),this._lastPoint2=t.point))}));const i=this.parent;i&&i.children.moveValue(this.selection)}_inPlot(t){const e=this.chart;return!!e&&e.inPlot(t)}_handleCursorDown(t){if(2==t.originalEvent.button)return;const e=t.point;let i=this._display.toLocal(e);const s=this.chart;this.selection.set("draw",()=>{}),s&&this._inPlot(i)&&this._startSelection(i,t)}_handleCursorDownGlobal(t){const e=this.get("clickTolerance",0);if(e<=0||"none"==this.get("behavior","none"))return;if(2==t.originalEvent.button)return;if(!this.chart)return;const i=this._display.toLocal(t.point);if(this._inPlot(i))return;const s=this.width(),a=this.height(),o=Math.max(0,-i.x,i.x-s),n=Math.max(0,-i.y,i.y-a);o>e||n>e||(i.x=l.fitToRange(i.x,0,s),i.y=l.fitToRange(i.y,0,a),this.selection.set("draw",()=>{}),this._startSelection(i,t))}_startSelection(t,e){if(this._downPoint=t,"none"!=this.get("behavior")){this.selection.show();const t="selectstarted";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this,originalEvent:e.originalEvent})}let i=this._getPosition(t).x,s=this._getPosition(t).y;this.setPrivate("downPositionX",i),this.setPrivate("downPositionY",s)}_handleCursorUp(t){if(this._downPoint){const e=this.get("behavior","none");if("none"!=e){"z"===e.charAt(0)&&this.selection.hide();const i=t.point;let s=this._display.toLocal(i);s.x=l.fitToRange(s.x,0,this.width()),s.y=l.fitToRange(s.y,0,this.height());const a=this._downPoint,o=this.get("moveThreshold",1);if(s&&a){let i=!1;if("zoomX"!==e&&"zoomXY"!==e&&"selectX"!==e&&"selectXY"!==e||Math.abs(s.x-a.x)>o&&(i=!0),"zoomY"!==e&&"zoomXY"!==e&&"selectY"!==e&&"selectXY"!==e||Math.abs(s.y-a.y)>o&&(i=!0),i){const e="selectended";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,originalEvent:t.originalEvent})}else{const e="selectcancelled";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,originalEvent:t.originalEvent})}}}}this._downPoint=void 0}_handleMove(t){if(this.getPrivate("visible")){const e=this.chart;if(e&&d.keys(e.plotContainer._downPoints).length>1)return void this._setC("forceHidden",!0);this._setC("forceHidden",!1);const i=t.point,s=this._lastPoint;if(Math.round(s.x)===Math.round(i.x)&&Math.round(s.y)===Math.round(i.y))return;this._lastPoint=i,this.setPrivate("lastPoint",i),this.handleMove({x:i.x,y:i.y},!1,t.originalEvent)}}_getPosition(t){return{x:t.x/this.width(),y:t.y/this.height()}}handleMove(t,e,i){t||(t=this._movePoint);const s=this.get("alwaysShow");if(!t)return void this.hide(0);this._movePoint=t;let a=this._display.toLocal(t),o=this.chart;
1if(o&&(this._inPlot(a)||this._downPoint)){o._movePoint=t,this.isHidden()&&(this.show(),"z"==this.get("behavior","").charAt(0)&&this.selection.set("draw",()=>{}));let n=a.x,h=a.y,l=this._getPosition(a);this.setPrivate("point",a);let c=this.get("snapToSeries");this._downPoint&&(c=void 0);let d=this.get("positionX"),g=l.x;r.isNumber(d)&&(g=d);let u=this.get("positionY"),m=l.y;r.isNumber(u)&&(m=u),this.setPrivate("positionX",g),this.setPrivate("positionY",m);const p=this._getPoint(g,m);if(n=p.x,h=p.y,o.xAxes.each(t=>{t._handleCursorPosition(g,c),s&&t.handleCursorShow()}),o.yAxes.each(t=>{t._handleCursorPosition(m,c),s&&t.handleCursorShow()}),!e){o._handleCursorPosition();const e="cursormoved";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,point:t,originalEvent:i})}this._updateLines(n,h),o.arrangeTooltips()}else if(!this._downPoint&&!s){this.hide(0);const t="cursorhidden";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this})}this._downPoint&&"none"!=this.get("behavior")&&this._updateSelection(a)}_getPoint(t,e){return{x:this.width()*t,y:this.height()*e}}_updateLines(t,e){this._tooltipX||this.lineX._setC("x",t),this._tooltipY||this.lineY._setC("y",e),this._drawLines()}_updateSelection(t){const e=this.selection,i=this.get("behavior"),s=this.width(),a=this.height();t.x<0&&(t.x=0),t.x>s&&(t.x=s),t.y<0&&(t.y=0),t.y>a&&(t.y=a),e.set("draw",e=>{const o=this._downPoint;o&&("zoomXY"===i||"selectXY"===i?(e.moveTo(o.x,o.y),e.lineTo(o.x,t.y),e.lineTo(t.x,t.y),e.lineTo(t.x,o.y),e.lineTo(o.x,o.y)):"zoomX"===i||"selectX"===i?(e.moveTo(o.x,0),e.lineTo(o.x,a),e.lineTo(t.x,a),e.lineTo(t.x,0),e.lineTo(o.x,0)):"zoomY"!==i&&"selectY"!==i||(e.moveTo(0,o.y),e.lineTo(s,o.y),e.lineTo(s,t.y),e.lineTo(0,t.y),e.lineTo(0,o.y)))})}_onHide(){if(this.isHidden()){let t=this.chart;t&&(t.xAxes.each(t=>{t.handleCursorHide()}),t.yAxes.each(t=>{t.handleCursorHide()}),t.series.each(t=>{t.handleCursorHide()}))}super._onHide()}_onShow(){if(!this.isHidden()){let t=this.chart;t&&(t.xAxes.each(t=>{t.handleCursorShow()}),t.yAxes.each(t=>{t.handleCursorShow()}))}super._onShow()}_dispose(){super._dispose(),this.selection.dispose()}}g.className="XYCursor",g.classNames=s.m.classNames.concat([g.className])},2523:function(t,e,i){i.d(e,{_:function(){return d}});var s=i(3002),a=i(9484),o=i(8636),n=i(3597),r=i(2544),h=i(4636),l=i(8297),c=i(3664);class d extends s.u{constructor(){super(...arguments),this._series=[],this._isPanning=!1,this.minorDataItems=[],this.labelsContainer=this.children.push(a.m.new(this._root,{})),this.gridContainer=a.m.new(this._root,{width:o.Q2,height:o.Q2}),this.topGridContainer=a.m.new(this._root,{width:o.Q2,height:o.Q2}),this.bulletsContainer=this.children.push(a.m.new(this._root,{isMeasured:!1,width:o.Q2,height:o.Q2,position:"absolute"})),this._rangesDirty=!1,this._panStart=0,this._panEnd=1,this._skipSync=!1,this.axisRanges=new n.B8,this._seriesAxisRanges=[],this._cursorPosition=-1,this._seriesValuesDirty=!1,this._seriesAdded=!1,this.axisHeader=this.children.push(a.m.new(this._root,{themeTags:["axis","header"],position:"absolute",background:r.M.new(this._root,{themeTags:["header","background"],fill:this._root.interfaceColors.get("background")})})),this._bullets={}}_isSynced(){return!1}_dispose(){this.gridContainer.dispose(),this.topGridContainer.dispose(),this.bulletsContainer.dispose(),this.labelsContainer.dispose(),this.axisHeader.dispose(),super._dispose()}_afterNew(){super._afterNew(),this.setPrivate("updateScrollbar",!0),this._disposers.push(this.axisHeader.children.events.onAll(()=>{this.markDirty()})),this._disposers.push(this.axisRanges.events.onAll(t=>{if("clear"===t.type)h.each(t.oldValues,t=>{t.dispose()});else if("push"===t.type)this._processAxisRange(t.newValue,["range"]);else if("setIndex"===t.type)this._processAxisRange(t.newValue,["range"]);else if("insertIndex"===t.type)this._processAxisRange(t.newValue,["range"]);else if("removeIndex"===t.type)this.disposeDataItem(t.oldValue);else{if("moveIndex"!==t.type)throw new Error("Unknown IStreamEvent type");this._processAxisRange(t.value,["range"])}}));const t=this.get("renderer");t&&(t.axis=this,t.processAxis()),this.children.push(t),this._createGhostLabel()}_createGhostLabel(){const t=this.get("renderer").makeLabel(new s.s(this,void 0,{}),[]);t.adapters.disable("text"),t.setAll({opacity:0,tooltipText:void 0,tooltipHTML:void 0,interactive:!1}),t.events.disable(),this.ghostLabel=t}_updateFinals(t,e){}zoom(t,e,i,s){if(this.get("zoomable",!0))if(this._updateFinals(t,e),this.get("start")!==t||this.get("end")!=e){let a=this._sAnimation,o=this._eAnimation;if(t>e&&([t,e]=[e,t]),!this._isSynced()){let i=this.get("maxDeviation",.5)*Math.min(1,e-t);t<-i&&(t=-i),e>1+i&&(e=1+i)}let n=this.getPrivate("maxZoomFactor",this.get("maxZoomFactor",100)),r=n;l.isNumber(i)||(i=this.get("interpolationDuration",0)),s||(s="end"),1===e&&0!==t&&(s=t<this.get("start",0)?"start":"end"),0===t&&1!==e&&(s=e>this.get("end",1)?"end":"start");let h=this.get("minZoomCount",0);const c=this.dataItems;c&&c.length<h&&(h=c.length);let d=this.get("maxZoomCount",1/0);l.isNumber(h)&&(n=r/h);let g=1;if(l.isNumber(d)&&(g=r/d),t>e&&([t,e]=[e,t]),"start"===s?(d>0&&1/(e-t)<g&&(e=t+1/g),1/(e-t)>n&&(e=t+1/n),e>1&&e-t<1/n&&(t=e-1/n)):(d>0&&1/(e-t)<g&&(t=e-1/g),1/(e-t)>n&&(t=e-1/n),t<0&&e-t<1/n&&(e=t+1/n)),1/(e-t)>n&&(e=t+1/n),1/(e-t)>n&&(t=e-1/n),null!=d&&null!=h&&t==this.get("start")&&e==this.get("end")){const t=this.chart;t&&t._handleAxisSelection(this,!0)}if((a&&a.playing&&a.to==t||this.get("start")==t)&&(o&&o.playing&&o.to==e||this.get("end")==e))return;if(i>0){let s,a,o=this.get("interpolationEasing");if(this.get("start")!=t&&(s=this.animate({key:"start",to:t,duration:i,easing:o})),this.get("end")!=e&&(a=this.animate({key:"end",to:e,duration:i,easing:o})),this._sAnimation=s,this._eAnimation=a,s)return s;if(a)return a}else this._setC("start",t),this._setC("end",e),this.root.events.once("frameended",()=>{this.markDirtyKey("start")})}else this._sAnimation&&this._sAnimation.stop(),this._eAnimation&&this._eAnimation.stop()}get series(){return this._series}_processAxisRange(t,e){t.setRaw("isRange",!0),this._createAssets(t,e),this._rangesDirty=!0,this._prepareDataItem(t);const i=t.get("above"),s=this.topGridContainer,a=t.get("grid");i&&a&&s.children.moveValue(a);const o=t.get("axisFill");i&&o&&s.children.moveValue(o)}_prepareDataItem(t,e){}markDirtyExtremes(){}markDirtySelectionExtremes(){}_calculateTotals(){}_updateAxisRanges(){this._bullets={},this.axisRanges.each(t=>{this._prepareDataItem(t)}),h.each(this._seriesAxisRanges,t=>{this._prepareDataItem(t)})}_prepareChildren(){super._prepareChildren();const t=this.ghostLabel;if(t&&(this.get("fixAxisSize")?t.set("visible",!0):t.set("visible",!1)),this.isDirty("start")||this.isDirty("end")){const t=this.chart;
vendor: 5,953 bytes, line 1
1t&&t._updateCursor();let e=this.get("start",0),i=this.get("end",1);if(!this._isSynced()){let t=this.get("maxDeviation",.5)*Math.min(1,i-e);if(e<-t){let s=e+t;e=-t,this.setRaw("start",e),this.isDirty("end")&&this.setRaw("end",i-s)}if(i>1+t){let s=i-1-t;i=1+t,this.setRaw("end",i),this.isDirty("start")&&this.setRaw("start",e-s)}}}const e=this.get("renderer");if(e._start=this.get("start"),e._end=this.get("end"),e._inversed=e.get("inversed",!1),e._axisLength=e.axisLength()/(e._end-e._start),e._updateLC(),this.isDirty("tooltip")){const t=this.get("tooltip");if(t){const i=e.get("themeTags");t.addTag("axis"),t.addTag(this.className.toLowerCase()),t._applyThemes(),i&&(t.set("themeTags",c.mergeTags(t.get("themeTags"),i)),t.label._applyThemes())}}}_updateTooltipBounds(){const t=this.get("tooltip");t&&this.get("renderer").updateTooltipBounds(t)}_updateBounds(){super._updateBounds(),this._updateTooltipBounds()}processChart(t){this.chart=t,this.get("renderer").chart=t,t.gridContainer.children.push(this.gridContainer),t.topGridContainer.children.push(this.topGridContainer),t.axisHeadersContainer.children.push(this.axisHeader),this.on("start",()=>{t._handleAxisSelection(this)}),this.on("end",()=>{t._handleAxisSelection(this)}),t.plotContainer.onPrivate("width",()=>{this.markDirtySize()}),t.plotContainer.onPrivate("height",()=>{this.markDirtySize()}),t.processAxis(this)}hideDataItem(t){return this._toggleFHDataItem(t,!0),super.hideDataItem(t)}showDataItem(t){return this._toggleFHDataItem(t,!1),super.showDataItem(t)}_toggleFHDataItem(t,e){const i="forceHidden",s=t.get("label");s&&s._setC(i,e);const a=t.get("grid");a&&a._setC(i,e);const o=t.get("tick");o&&o._setC(i,e);const n=t.get("axisFill");n&&n._setC(i,e);const r=t.get("bullet");if(r){const t=r.get("sprite");t&&t._setC(i,e)}}_toggleDataItem(t,e){const i=t.get("label"),s="visible";i&&i.setPrivate(s,e);const a=t.get("grid");a&&a.setPrivate(s,e);const o=t.get("tick");o&&o.setPrivate(s,e);const n=t.get("axisFill");n&&n.setPrivate(s,e);const r=t.get("bullet");if(r){const t=r.get("sprite");t&&t.setPrivate(s,e)}}_createAssets(t,e,i){var s,a,o;const n=this.get("renderer");let r="minor";const h=t.get("label");if(h){let a=h.get("themeTags"),o=!1;i?-1==(null==a?void 0:a.indexOf(r))&&(o=!0):-1!=(null==a?void 0:a.indexOf(r))&&(o=!0),o&&(null===(s=h.parent)||void 0===s||s.children.removeValue(h),n.makeLabel(t,e),h.dispose(),n.labels.removeValue(h))}else n.makeLabel(t,e);const l=t.get("grid");if(l){let s=l.get("themeTags"),o=!1;i?-1==(null==s?void 0:s.indexOf(r))&&(o=!0):-1!=(null==s?void 0:s.indexOf(r))&&(o=!0),o&&(null===(a=l.parent)||void 0===a||a.children.removeValue(l),n.makeGrid(t,e),l.dispose(),n.grid.removeValue(l))}else n.makeGrid(t,e);const c=t.get("tick");if(c){let s=!1,a=c.get("themeTags");i?-1==(null==a?void 0:a.indexOf(r))&&(s=!0):-1!=(null==a?void 0:a.indexOf(r))&&(s=!0),s&&(null===(o=c.parent)||void 0===o||o.children.removeValue(c),n.makeTick(t,e),c.dispose(),n.ticks.removeValue(c))}else n.makeTick(t,e);i||t.get("axisFill")?i&&!t.get("axisFill")&&this.get("minorAxisFillsEnabled")&&n.makeAxisFill(t,e):n.makeAxisFill(t,e),this._processBullet(t)}_processBullet(t){let e=t.get("bullet"),i=this.get("bullet");if(e||!i||t.get("isRange")||(e=i(this._root,this,t)),e){e.axis=this;const i=e.get("sprite");i&&(i._setDataItem(t),t.setRaw("bullet",e),i.parent||this.bulletsContainer.children.push(i))}}_afterChanged(){super._afterChanged();const t=this.chart;t&&(t._updateChartLayout(),t.axisHeadersContainer.markDirtySize()),this.get("renderer")._updatePositions(),this._seriesAdded=!1}disposeDataItem(t){super.disposeDataItem(t);const e=this.get("renderer"),i=t.get("label");i&&(e.labels.removeValue(i),i.dispose());const s=t.get("tick");s&&(e.ticks.removeValue(s),s.dispose());const a=t.get("grid");a&&(e.grid.removeValue(a),a.dispose());const o=t.get("axisFill");o&&(e.axisFills.removeValue(o),o.dispose());const n=t.get("bullet");n&&n.dispose()}_updateGhost(){this.setPrivate("cellWidth",this.getCellWidthPosition()*this.get("renderer").axisLength());const t=this.ghostLabel;if(t){if(!t.isHidden()){const e=t.localBounds(),i=Math.ceil(e.right-e.left);let s=t.get("text");h.each(this.dataItems,t=>{const e=t.get("label");if(e&&!e.isHidden()){const t=e.localBounds();Math.ceil(t.right-t.left)>i&&(s=e.text._getText())}}),t.set("text",s)}let e=this.get("start",0),i=this.get("end",1);this.get("renderer").updateLabel(t,e+.5*(i-e))}}_handleCursorPosition(t,e){t=this.get("renderer").toAxisPosition(t),this._cursorPosition=t,this._snapToSeries=e,this.updateTooltip()}updateTooltip(){const t=this._snapToSeries;let e=this._cursorPosition;const i=this.get("tooltip"),s=this.get("renderer");l.isNumber(e)&&(h.each(this.series,i=>{if(i.get("baseAxis")===this){const s=this.getSeriesItem(i,e,this.get("tooltipLocation"));t&&-1!=t.indexOf(i)?(i.updateLegendMarker(s),i.updateLegendValue(s),i._settings.tooltipDataItem=s):(i.showDataItemTooltip(s),i.setRaw("tooltipDataItem",s))}}),this.get("snapTooltip")&&(e=this.roundAxisPosition(e,this.get("tooltipLocation",.5))),this.setPrivateRaw("tooltipPosition",e),i&&(s.updateTooltipBounds(i),l.isNaN(e)?i.hide(0):(this._updateTooltipText(i,e),s.positionTooltip(i,e),e<this.get("start",0)||e>this.get("end",1)?i.hide(0):i.show(0))))}_updateTooltipText(t,e){t.label.set("text",this.getTooltipText(e))}roundAxisPosition(t,e){return t}_handleSeriesRemoved(){}handleCursorShow(){let t=this.get("tooltip");t&&t.show()}handleCursorHide(){let t=this.get("tooltip");t&&t.hide()}processSeriesDataItem(t,e){}_clearDirty(){super._clearDirty(),this._sizeDirty=!1,this._rangesDirty=!1}coordinateToPosition(t){const e=this.get("renderer");return e.toAxisPosition(t/e.axisLength())}toAxisPosition(t){return this.get("renderer").toAxisPosition(t)}toGlobalPosition(t){return this.get("renderer").toGlobalPosition(t)}fixPosition(t){return this.get("renderer").fixPosition(t)}shouldGap(t,e,i,s){return!1}createAxisRange(t){return this.axisRanges.push(t)}
1_groupSeriesData(t){}getCellWidthPosition(){return.05}}d.className="Axis",d.classNames=s.u.classNames.concat([d.className])},747:function(t,e,i){i.d(e,{s:function(){return o}});var s=i(6540),a=i(1478);class o extends s.wC{_beforeChanged(){super._beforeChanged();const t=this.get("sprite");if(this.isDirty("sprite")&&t&&(t._setCAll({position:"absolute",role:"figure"}),this._disposers.push(t)),this.isDirty("location")){const e=t.dataItem;this.axis&&t&&e&&this.axis._prepareDataItem(e)}}_dispose(){const t=this.axis;t&&a.each(t._bullets,(e,i)=>{i.uid==this.uid&&delete t._bullets[e]}),super._dispose()}}o.className="AxisBullet",o.classNames=s.wC.classNames.concat([o.className])},3685:function(t,e,i){i.d(e,{a:function(){return a}});var s=i(1527);class a extends s.J{constructor(){super(...arguments),this._tickPoints=[]}}a.className="AxisLabel",a.classNames=s.J.classNames.concat([a.className])},5490:function(t,e,i){i.d(e,{H:function(){return a}});var s=i(4250);class a extends s.i{constructor(){super(...arguments),this._tickPoints=[]}}a.className="AxisLabelRadial",a.classNames=s.i.classNames.concat([a.className])},2272:function(t,e,i){i.d(e,{F:function(){return c}});var s=i(4092),a=i(7967),o=i(3597),n=i(410),r=i(4810),h=i(3685),l=i(3664);class c extends s.A{constructor(){super(...arguments),this._axisLength=100,this._start=0,this._end=1,this._inversed=!1,this._minSize=0,this._lc=1,this._ls=0,this.ticks=this.addDisposer(new o.TS(a.Bj.new({}),()=>n.r._new(this._root,{themeTags:l.mergeTags(this.ticks.template.get("themeTags",[]),this.get("themeTags",[]))},[this.ticks.template]))),this.grid=this.addDisposer(new o.TS(a.Bj.new({}),()=>r.x._new(this._root,{themeTags:l.mergeTags(this.grid.template.get("themeTags",[]),this.get("themeTags",[]))},[this.grid.template]))),this.axisFills=this.addDisposer(new o.TS(a.Bj.new({}),()=>s.A._new(this._root,{themeTags:l.mergeTags(this.axisFills.template.get("themeTags",["axis","fill"]),this.get("themeTags",[]))},[this.axisFills.template]))),this.labels=this.addDisposer(new o.TS(a.Bj.new({}),()=>h.a._new(this._root,{themeTags:l.mergeTags(this.labels.template.get("themeTags",[]),this.get("themeTags",[]))},[this.labels.template])))}makeTick(t,e){const i=this.ticks.make();return i._setDataItem(t),t.setRaw("tick",i),i.set("themeTags",l.mergeTags(i.get("themeTags"),e)),this.axis.labelsContainer.children.push(i),this.ticks.push(i),i}makeGrid(t,e){const i=this.grid.make();return i._setDataItem(t),t.setRaw("grid",i),i.set("themeTags",l.mergeTags(i.get("themeTags"),e)),this.axis.gridContainer.children.push(i),this.grid.push(i),i}makeAxisFill(t,e){const i=this.axisFills.make();return i._setDataItem(t),i.set("themeTags",l.mergeTags(i.get("themeTags"),e)),this.axis.gridContainer.children.push(i),t.setRaw("axisFill",i),this.axisFills.push(i),i}makeLabel(t,e){const i=this.labels.make();return i.set("themeTags",l.mergeTags(i.get("themeTags"),e)),t.get("isRange")?this.axis.labelsContainer.children.push(i):this.axis.labelsContainer.children.moveValue(i,0),i._setDataItem(t),t.setRaw("label",i),this.labels.push(i),i}axisLength(){return 0}gridCount(){return this.axisLength()/this.get("minGridDistance",50)}_updatePositions(){}_afterNew(){super._afterNew(),this._setC("isMeasured",!1);const t=this.thumb;t&&(this._disposers.push(t.events.on("pointerdown",t=>{this._handleThumbDown(t)})),this._disposers.push(t.events.on("globalpointerup",t=>{this._handleThumbUp(t)})),this._disposers.push(t.events.on("globalpointermove",t=>{this._handleThumbMove(t)})))}_beforeChanged(){super._beforeChanged(),this.isDirty("minGridDistance")&&this.root.events.once("frameended",()=>{this.axis.markDirtySize()})}_changed(){if(super._changed(),this.isDirty("pan")){const t=this.thumb;if(t){const e=this.axis.labelsContainer,i=this.get("pan");"zoom"==i?e.children.push(t):"none"==i&&e.children.removeValue(t)}}}_handleThumbDown(t){this._thumbDownPoint=this.toLocal(t.point);const e=this.axis;this._downStart=e.get("start"),this._downEnd=e.get("end")}_handleThumbUp(t){this._thumbDownPoint=void 0}_handleThumbMove(t){const e=this._thumbDownPoint;if(e){const i=this.toLocal(t.point),s=this._downStart,a=this._downEnd,o=this._getPan(i,e)*Math.min(1,a-s)/2*this.get("panSensitivity",1);this.axis.zoom(s-o,a+o,0)}}_getPan(t,e){return 0}positionToCoordinate(t){return this._inversed?(this._end-t)*this._axisLength:(t-this._start)*this._axisLength}updateTooltipBounds(t){}_updateSize(){this.markDirty(),this._clear=!0}toAxisPosition(t){const e=this._start||0,i=this._end||1;return t*=i-e,this.get("inversed")?i-t:e+t}toGlobalPosition(t){const e=this._start||0,i=this._end||1;return this.get("inversed")?t=i-t:t-=e,t/(i-e)}fixPosition(t){return this.get("inversed")?1-t:t}_updateLC(){}toggleVisibility(t,e,i,s){let a=this.axis;const o=a.get("start",0),n=a.get("end",1);e<o+(n-o)*(i-1e-4)||e>o+(n-o)*(s+1e-4)?t.setPrivate("visible",!1):t.setPrivate("visible",!0)}_positionTooltip(t,e){const i=this.chart;i&&(t.set("pointTo",this._display.toGlobal(e)),i.inPlot(e)||t.hide())}processAxis(){}}
1c.className="AxisRenderer",c.classNames=s.A.classNames.concat([c.className])},3226:function(t,e,i){i.d(e,{j:function(){return h}});var s=i(2272),a=i(8636),o=i(2544),n=i(8297),r=i(3664);class h extends s.F{constructor(){super(...arguments),this.thumb=o.M.new(this._root,{width:a.Q2,isMeasured:!1,themeTags:["axis","x","thumb","zoomgrip"]})._markC("width","isMeasured","themeTags")}_afterNew(){this._settings.themeTags=r.mergeTags(this._settings.themeTags,["renderer","x"]),super._afterNew(),this.setPrivateRaw("letter","X");const t=this.grid.template;t._setC("height",a.Q2),t._setC("width",0),t._setC("draw",(t,e)=>{t.moveTo(0,0),t.lineTo(0,e.height())}),this.set("draw",(t,e)=>{t.moveTo(0,0),t.lineTo(e.width(),0)})}_changed(){var t;super._changed();const e=this.axis,i=e.ghostLabel;i&&(i.setPrivate("visible",!this.get("inside")),i._setC("x",-1e3));const s="opposite",a="inside";if(this.isDirty(s)||this.isDirty(a)){const i=this.chart,o=e.children;if(this.get(a)?e.addTag(a):e.removeTag(a),i){if(this.get(s)){const t=i.topAxesContainer.children;-1==t.indexOf(e)&&t.insertIndex(0,e),e.addTag(s),o.moveValue(this)}else{const t=i.bottomAxesContainer.children;-1==t.indexOf(e)&&t.moveValue(e),e.removeTag(s),o.moveValue(this,0)}null===(t=e.ghostLabel)||void 0===t||t._applyThemes(),this.labels.each(t=>{t._applyThemes()}),this.root._markDirtyRedraw()}e.markDirtySize()}this.thumb.setPrivate("height",e.labelsContainer.height())}_getPan(t,e){return(e.x-t.x)/this.width()}toAxisPosition(t){const e=this._start||0,i=this._end||1;return t=(t-=this._ls)*(i-e)/this._lc,this.get("inversed")?i-t:e+t}toGlobalPosition(t){const e=this._start||0,i=this._end||1;return this.get("inversed")?t=i-t:t-=e,(t=t/(i-e)*this._lc)+this._ls}_updateLC(){const t=this.axis,e=t.parent;if(e){const i=e.innerWidth();this._lc=this.axisLength()/i,this._ls=(t.x()-e.get("paddingLeft",0))/i}}_updatePositions(){const t=this.axis,e=t.x()-r.relativeToValue(t.get("centerX",0),t.width())-t.parent.get("paddingLeft",0);t.gridContainer._setC("x",e),t.topGridContainer._setC("x",e),t.bulletsContainer._setC("y",this.y());const i=t.chart;if(i){const e=i.plotContainer,s=t.axisHeader;let a=t.get("marginLeft",0),o=t.x()-a;const n=t.parent;n&&(o-=n.get("paddingLeft",0)),s.children.length>0?(s.isComputedSetting("width")&&s.remove("width"),a=t.axisHeader.width(),t._setC("marginLeft",a+1)):s._setC("width",a),s.setAll({x:o,y:-1,height:e.height()+2})}}processAxis(){super.processAxis();const t=this.axis;null==t.get("width")&&t._setC("width",a.Q2);const e=this._root.verticalLayout;t._setC("layout",e),t.labelsContainer.set("width",a.Q2),t.axisHeader.setAll({layout:e})}axisLength(){return this.axis.width()}positionToPoint(t){return{x:this.positionToCoordinate(t),y:0}}updateTick(t,e,i,s){if(t){n.isNumber(e)||(e=0);let o=.5;o=n.isNumber(s)&&s>1?t.get("multiLocation",o):t.get("location",o),n.isNumber(i)&&i!=e&&(e+=(i-e)*o),t._setC("x",this.positionToCoordinate(e));let r=t.get("length",0);const h=t.get("inside",this.get("inside",!1));this.get("opposite")?(t._setC("y",a.Q2),h||(r*=-1)):(t._setC("y",0),h&&(r*=-1)),t.set("draw",t=>{t.moveTo(0,0),t.lineTo(0,r)}),this.toggleVisibility(t,e,t.get("minPosition",0),t.get("maxPosition",1))}}updateLabel(t,e,i,s){if(t){let o=.5;o=n.isNumber(s)&&s>1?t.get("multiLocation",o):t.get("location",o),n.isNumber(e)||(e=0);const r=t.get("inside",this.get("inside",!1));this.get("opposite")?r?(t._setC("position","absolute"),t._setC("y",0)):(t._setC("position","relative"),t._setC("y",a.Q2)):r?(t._setC("y",0),t._setC("position","absolute")):(t._setC("y",void 0),t._setC("position","relative")),n.isNumber(i)&&i!=e&&(e+=(i-e)*o),t._setC("x",this.positionToCoordinate(e)),this.toggleVisibility(t,e,t.get("minPosition",0),t.get("maxPosition",1))}}updateGrid(t,e,i){if(t){n.isNumber(e)||(e=0);let s=t.get("location",.5);n.isNumber(i)&&i!=e&&(e+=(i-e)*s),t._setC("x",this.positionToCoordinate(e)),this.toggleVisibility(t,e,0,1)}}updateBullet(t,e,i){if(t){const s=t.get("sprite");if(s){n.isNumber(e)||(e=0);let a=t.get("location",.5);n.isNumber(i)&&i!=e&&(e+=(i-e)*a);let o=this.axis.roundAxisPosition(e,a),r=this.axis._bullets[o],h=-1;if(this.get("opposite")&&(h=1),t.get("stacked"))if(r){let t=r.get("sprite");t&&s._setC("y",t.y()+t.height()*h)}else s._setC("y",0);this.axis._bullets[o]=t,s._setC("x",this.positionToCoordinate(e)),this.toggleVisibility(s,e,0,1)}}}updateFill(t,e,i){if(t){n.isNumber(e)||(e=0),n.isNumber(i)||(i=1);let s=this.positionToCoordinate(e),a=this.positionToCoordinate(i);this.fillDrawMethod(t,s,a)}}fillDrawMethod(t,e,i){t.set("draw",t=>{const s=this.axis.gridContainer.height(),a=this.width();i<e&&([i,e]=[e,i]),e>a||i<0||(t.moveTo(e,0),t.lineTo(i,0),t.lineTo(i,s),t.lineTo(e,s),t.lineTo(e,0))})}positionTooltip(t,e){this._positionTooltip(t,{x:this.positionToCoordinate(e),y:0})}updateTooltipBounds(t){const e=this.get("inside"),i=1e5;let s=this._display.toGlobal({x:0,y:0}),a=s.x,o=0,n=this.axisLength(),h=i,l="up";this.get("opposite")?e?(l="up",o=s.y,h=i):(l="down",o=s.y-i,h=i):e?(l="down",o=s.y-i,h=i):(l="up",o=s.y,h=i);const c={left:a,right:a+n,top:o,bottom:o+h},d=t.get("bounds");r.sameBounds(c,d)||(t.set("bounds",c),t._setC("pointerOrientation",l))}}
1h.className="AxisRendererX",h.classNames=s.F.classNames.concat([h.className])},6009:function(t,e,i){i.d(e,{Q:function(){return h}});var s=i(2272),a=i(8636),o=i(2544),n=i(8297),r=i(3664);class h extends s.F{constructor(){super(...arguments),this.thumb=o.M.new(this._root,{height:a.Q2,isMeasured:!1,themeTags:["axis","y","thumb","zoomgrip"]})._markC("height","isMeasured","themeTags")}_afterNew(){this._settings.themeTags=r.mergeTags(this._settings.themeTags,["renderer","y"]),this._settings.opposite&&this._settings.themeTags.push("opposite"),super._afterNew(),this.setPrivateRaw("letter","Y");const t=this.grid.template;t._setC("width",a.Q2),t._setC("height",0),t._setC("draw",(t,e)=>{t.moveTo(0,0),t.lineTo(e.width(),0)}),this.set("draw",(t,e)=>{t.moveTo(0,0),t.lineTo(0,e.height())})}_getPan(t,e){return(t.y-e.y)/this.height()}_changed(){var t;super._changed();const e=this.axis,i=e.ghostLabel;i&&(i.setPrivate("visible",!this.get("inside")),i._setC("y",-1e3));const s=this.thumb,a="opposite",o="inside",n=this.chart;if(this.isDirty(a)||this.isDirty(o)){const i=e.children;if(this.get(o)?e.addTag(o):e.removeTag(o),n){if(this.get(a)){const t=n.rightAxesContainer.children;-1==t.indexOf(e)&&t.moveValue(e,0),e.addTag(a),i.moveValue(this,0)}else{const t=n.leftAxesContainer.children;-1==t.indexOf(e)&&t.moveValue(e),e.removeTag(a),i.moveValue(this)}null===(t=e.ghostLabel)||void 0===t||t._applyThemes(),this.labels.each(t=>{t._applyThemes()}),this.root._markDirtyRedraw()}e.markDirtySize()}const r=e.labelsContainer.width();n&&(this.get(a)?s._setC("centerX",0):s._setC("centerX",r)),s.setPrivate("width",r)}processAxis(){super.processAxis();const t=this.axis;null==t.get("height")&&t._setC("height",a.Q2);const e=this._root.horizontalLayout;t._setC("layout",e),t.labelsContainer.set("height",a.Q2),t.axisHeader.set("layout",e)}_updatePositions(){const t=this.axis,e=t.y()-r.relativeToValue(t.get("centerY",0),t.height());t.gridContainer._setC("y",e),t.topGridContainer._setC("y",e),t.bulletsContainer._setC("x",this.x());const i=t.chart;if(i){const e=i.plotContainer,s=t.axisHeader;let a=t.get("marginTop",0);s.children.length>0?(s.isComputedSetting("height")&&s.remove("height"),a=t.axisHeader.height(),t._setC("marginTop",a+1)):s._setC("height",a),s.setAll({y:t.y()-a,x:-1,width:e.width()+2})}}axisLength(){return this.axis.innerHeight()}positionToPoint(t){return{x:0,y:this.positionToCoordinate(t)}}updateLabel(t,e,i,s){if(t){n.isNumber(e)||(e=0);let a=.5;a=n.isNumber(s)&&s>1?t.get("multiLocation",a):t.get("location",a);const o=this.get("opposite"),r=t.get("inside",this.get("inside",!1));o?(t._setC("x",0),r?t._setC("position","absolute"):t._setC("position","relative")):r?(t._setC("x",0),t._setC("position","absolute")):(t._setC("x",void 0),t._setC("position","relative")),n.isNumber(i)&&i!=e&&(e+=(i-e)*a),t._setC("y",this.positionToCoordinate(e)),this.toggleVisibility(t,e,t.get("minPosition",0),t.get("maxPosition",1))}}updateGrid(t,e,i){if(t){n.isNumber(e)||(e=0);let s=t.get("location",.5);n.isNumber(i)&&i!=e&&(e+=(i-e)*s),t._setC("y",this.positionToCoordinate(e)),this.toggleVisibility(t,e,0,1)}}updateTick(t,e,i,s){if(t){n.isNumber(e)||(e=0);let a=.5;a=n.isNumber(s)&&s>1?t.get("multiLocation",a):t.get("location",a),n.isNumber(i)&&i!=e&&(e+=(i-e)*a),t._setC("y",this.positionToCoordinate(e));let o=t.get("length",0);const r=t.get("inside",this.get("inside",!1));this.get("opposite")?(t._setC("x",0),r&&(o*=-1)):r||(o*=-1),t.set("draw",t=>{t.moveTo(0,0),t.lineTo(o,0)}),this.toggleVisibility(t,e,t.get("minPosition",0),t.get("maxPosition",1))}}updateBullet(t,e,i){if(t){const s=t.get("sprite");if(s){n.isNumber(e)||(e=0);let a=t.get("location",.5);n.isNumber(i)&&i!=e&&(e+=(i-e)*a);let o=this.axis.roundAxisPosition(e,a),r=this.axis._bullets[o],h=1;if(this.get("opposite")&&(h=-1),t.get("stacked"))if(r){let t=r.get("sprite");t&&s._setC("x",t.x()+t.width()*h)}else s._setC("x",0);this.axis._bullets[o]=t,s._setC("y",this.positionToCoordinate(e)),this.toggleVisibility(s,e,0,1)}}}updateFill(t,e,i){if(t){n.isNumber(e)||(e=0),n.isNumber(i)||(i=1);let s=this.positionToCoordinate(e),a=this.positionToCoordinate(i);this.fillDrawMethod(t,s,a)}}fillDrawMethod(t,e,i){t.set("draw",t=>{const s=this.axis.gridContainer.width(),a=this.height();i<e&&([i,e]=[e,i]),e>a||i<0||(t.moveTo(0,e),t.lineTo(s,e),t.lineTo(s,i),t.lineTo(0,i),t.lineTo(0,e))})}positionToCoordinate(t){return this._inversed?(t-this._start)*this._axisLength:(this._end-t)*this._axisLength}positionTooltip(t,e){this._positionTooltip(t,{x:0,y:this.positionToCoordinate(e)})}updateTooltipBounds(t){const e=this.get("inside"),i=1e5;let s=this._display.toGlobal({x:0,y:0}),a=s.y,o=0,n=this.axisLength(),h=i,l="right";this.get("opposite")?e?(l="right",o=s.x-i,h=i):(l="left",o=s.x,h=i):e?(l="left",o=s.x,h=i):(l="right",o=s.x-i,h=i);const c={left:o,right:o+h,top:a,bottom:a+n},d=t.get("bounds");r.sameBounds(c,d)||(t.set("bounds",c),t._setC("pointerOrientation",l))}_updateLC(){const t=this.axis,e=t.parent;
1if(e){const i=e.innerHeight();this._lc=this.axisLength()/i,this._ls=t.y()/i}}toAxisPosition(t){const e=this._start||0,i=this._end||1;return t=(t-=this._ls)*(i-e)/this._lc,this.get("inversed")?e+t:i-t}toGlobalPosition(t){const e=this._start||0,i=this._end||1;return this.get("inversed")?t-=e:t=i-t,(t=t/(i-e)*this._lc)+this._ls}fixPosition(t){return this.get("inversed")?t:1-t}}h.className="AxisRendererY",h.classNames=s.F.classNames.concat([h.className])},410:function(t,e,i){i.d(e,{r:function(){return a}});var s=i(6060);class a extends s.g{constructor(){super(...arguments),this._tickPoints=[]}}a.className="AxisTick",a.classNames=s.g.classNames.concat([a.className])},815:function(t,e,i){i.d(e,{a:function(){return c}});var s=i(2523),a=i(2790),o=i(3860),n=i(4636),r=i(8297),h=i(6251),l=i(3664);class c extends s._{constructor(){super(...arguments),this._frequency=1,this._itemMap={}}_afterNew(){this._settings.themeTags=l.mergeTags(this._settings.themeTags,["axis"]),this.fields.push("category","id","cellSize"),this.setPrivateRaw("name","category"),this.addTag("category"),super._afterNew()}_afterDataChange(){super._afterDataChange();const t=this.dataItems.length;t>0&&this.setPrivateRaw("maxZoomFactor",t),this.setPrivateRaw("startIndex",Math.min(this.getPrivate("startIndex",0),t)),this.setPrivateRaw("endIndex",Math.min(this.getPrivate("endIndex",t),1))}_prepareChildren(){super._prepareChildren(),(this.isDirty("startLocation")||this.isDirty("endLocation"))&&(this._sizeDirty=!0);const t=this.dataItems.length;let e=0;this._valuesDirty&&(this._itemMap={},n.each(this.dataItems,t=>{t.setRaw("index",e),this._itemMap[t.get("category")]=t,e++}),this.setPrivateRaw("maxZoomFactor",t));let i=this.get("start",0),s=this.get("end",1),a=this._getIndices(i,s);this.setPrivateRaw("startIndex",a.startIndex),this.setPrivateRaw("endIndex",a.endIndex),(this._sizeDirty||this._valuesDirty||this.isDirty("start")||this.isDirty("end")||this.isPrivateDirty("endIndex")||this.isPrivateDirty("startIndex")||this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&this.dataItems.length>0&&(this._handleRangeChange(),this._prepareAxisItems(),this._updateAxisRanges())}adjustZoom(){const t=this.dataItems.length;if(t>1){let e=this.get("maxZoomCount",this.dataItems.length),i=this.get("minZoomCount",1),s=0,a=this.getPrivate("startIndex",0),o=this.getPrivate("endIndex",0);const n=this._sAnimation,r=this._eAnimation;let h=this.get("start",0),l=!1;n&&!n.stopped&&(h=Number(n.to),l=!0);let c=this.get("end",1);if(r&&!r.stopped&&(c=Number(r.to),l=!0),l){const t=this._getIndices(h,c);a=t.startIndex,o=t.endIndex}for(let t=a;t<o;t++)s+=this.dataItems[t].get("finalCellSize",1);if(s<=i){let e=0;for(let s=a;s<t&&(e+=this.dataItems[s].get("finalCellSize",1),o=s+1,!(e>=i));s++);if(e<i)for(let t=a-1;t>=0&&(e+=this.dataItems[t].get("finalCellSize",1),a=t,!(e>=i));t--);this.zoomToIndexes(a,o)}else if(s>=e){let t=s;for(let i=o-1;i>=a;i--)if(t-=this.dataItems[i].get("finalCellSize",1),t<=e){o=i+1;break}this.zoomToIndexes(a,o)}}}_handleRangeChange(){n.each(this.series,t=>{let e=t.get("baseAxis"),i=t.get("xAxis"),s=t.get("yAxis");if(i instanceof c&&s instanceof c)t._markDirtyAxes();else if(e===this){let a,h,l=s;if(i===e?(t.get("categoryXField")&&(a="categoryX"),t.get("openCategoryXField")&&(h="openCategoryX")):s===e&&(t.get("categoryYField")&&(a="categoryY"),t.get("openCategoryYField")&&(h="openCategoryY"),l=i),l instanceof o.F&&(a||h)){let e=this.startIndex(),i=this.endIndex()-1,s=-1,o=0;for(let n=0,l=t.dataItems.length;n<l;n++){let l=t.dataItems[n],c=NaN,d=NaN;if(a&&(c=d=this.categoryToIndex(l.get(a))),h){let t=this.categoryToIndex(l.get(h));r.isNumber(t)&&(c=r.isNumber(c)?Math.min(c,t):t,d=r.isNumber(d)?Math.max(d,t):t)}r.isNumber(c)&&c<=i&&d>=e&&(-1==s&&(s=n),o=n+1)}-1==s&&(s=0),t.setPrivate("startIndex",s),t.setPrivate("endIndex",o);let l=!1;for(let e=s;e<o;e++){const i=t.dataItems[e];if(n.each(t.__valueXShowFields,t=>{null!=i.get(t)&&(l=!0)}),n.each(t.__valueYShowFields,t=>{null!=i.get(t)&&(l=!0)}),l)break}t.setPrivate("outOfSelection",!l)}t._markDirtyAxes()}})}_prepareAxisItems(){var t;const e=this.get("renderer"),i=this.dataItems.length;let s=this.startIndex();s>0&&s--;let a=this.endIndex();a<i&&a++;const o=e.get("minorLabelsEnabled"),n=e.get("minorGridEnabled",o);let h=e.axisLength()/Math.max(e.get("minGridDistance"),1),l=Math.max(1,Math.min(i,Math.ceil((a-s)/h)));r.isNumber(l)||(l=1),s=Math.floor(s/l)*l,this._frequency=l;for(let t=0;t<i;t++)this._toggleDataItem(this.dataItems[t],!1);let c=this.dataItems[s].get("index",0);for(let t=s;t<a;t+=l){let e=this.dataItems[t];this._createAssets(e,[]),this._toggleDataItem(e,!0);let i=l;n&&(i=1),this._prepareDataItem(e,c,i),c++}if(e.get("minorGridEnabled"))for(let e=s;e<a;e++){let i=this.dataItems[e];e%l!=0&&(this._createAssets(i,["minor"],!0),this._toggleDataItem(i,!0),this._prepareDataItem(i,0,1),o||null===(t=i.get("label"))||void 0===t||t.setPrivate("visible",!1))}this._updateGhost()}_prepareDataItem(t,e,i){let s=this.get("renderer"),a=t.get("categoryLocation",0),o=t.get("endCategoryLocation",1),n=t.get("index");r.isNumber(n)||(n=this.categoryToIndex(t.get("category")));let h,l=this.indexToPosition(n,a),c=t.get("endCategory");c?(h=this.categoryToIndex(c),r.isNumber(h)||(h=n)):h=n;let d,g,u=this.indexToPosition(h,o);if(t.get("isRange")){if(d=h,!r.isNumber(n))return void this._toggleDataItem(t,!1)}else d=n+this._frequency-1;g=this.indexToPosition(d,o),s.updateLabel(t.get("label"),l,u,i),s.updateGrid(t.get("grid"),l,u),s.updateTick(t.get("tick"),l,u,i),s.updateFill(t.get("axisFill"),l,g),this._processBullet(t),s.updateBullet(t.get("bullet"),l,u);const m=this.get("fillRule");m&&m(t,e)}startIndex(){let t=this.dataItems.length;return Math.min(Math.max(this.getPrivate("startIndex",0),0),t-1)}endIndex(){let t=this.dataItems.length;return Math.max(1,Math.min(this.getPrivate("endIndex",t),t))}baseValue(){}basePosition(){return 0}getX(t){let e=this._itemMap[t];return e?this._settings.renderer.positionToCoordinate(this.indexToPosition(e.get("index",0))):NaN}getY(t){let e=this._itemMap[t];return e?this._settings.renderer.positionToCoordinate(this.indexToPosition(e.get("index",0))):NaN}
1getDataItemPositionX(t,e,i,s){const a=t.get(e),o=this._itemMap[a];return o?this.indexToPosition(o.get("index",0),i):NaN}getDataItemCoordinateX(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(t,e,i,s))}getDataItemPositionY(t,e,i,s){const a=t.get(e),o=this._itemMap[a];return o?this.indexToPosition(o.get("index",0),i):NaN}getDataItemCoordinateY(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(t,e,i,s))}indexToPosition(t,e,i){let s=this.dataItems.length,a=0;if(0==s)return 0;if(t>=s&&(t=s-1,e=1),r.isNumber(e)||(e=.5),!r.isNumber(t))return 0;let o=this.get("startLocation",0),h=this.get("endLocation",1);if(this.get("cellSizeField")){let s=i?"finalCellSize":"cellSize";const r=this.dataItems;let l=0;n.each(this.dataItems,t=>{l+=t.get(s,1)}),l-=o*r[0].get(s,1),l-=(1-h)*r[r.length-1].get(s,1);let c=0;for(let e=0;e<t;e++)c+=r[e].get(s,1);a=(c+e*r[t].get(s,1)-o*r[0].get(s,1))/l}else s-=o,s-=1-h,a=(t+e-o)/s;if(!i){let e=this.dataItems[t];e&&(a+=e.get("deltaPosition",0))}return a}categoryToPosition(t){let e=this._itemMap[t];return e?this.indexToPosition(e.get("index")):NaN}categoryToIndex(t){let e=this._itemMap[t];return e?e.get("index"):NaN}dataItemToPosition(t){return this.indexToPosition(t.get("index"))}roundAxisPosition(t,e){return t+=(.5-e)/this.dataItems.length,this.indexToPosition(this.axisPositionToIndex(t),e)}axisPositionToIndex(t){let e=this.dataItems.length;if(0===e)return 0;if(this.get("cellSizeField")){let i=0,s=[];n.each(this.dataItems,t=>{const e=t.get("cellSize",1);s.push(e),i+=e});let a=this.get("startLocation",0),o=this.get("endLocation",1);i-=a,i-=1-o;let r=t*i+a,h=0;for(let t=0;t<e;t++){const e=s[t];if(r<h+e)return t;h+=e}return e-1}return h.fitToRange(Math.floor(t*e),0,e-1)}getTooltipText(t,e){const i=this.dataItems[this.axisPositionToIndex(t)];if(i){const t=i.get("label");if(t)return(0,a.Iy)(t,this.get("tooltipText",""))}}_updateTooltipText(t,e){t._setDataItem(this.dataItems[this.axisPositionToIndex(e)]),t.label.text.markDirtyText()}getSeriesItem(t,e){if(this.dataItems.length>0){let i=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),s=this.axisPositionToIndex(e),a=t.dataItems[s],o=this.dataItems[s],n=o.get("category");if(a&&o&&a.get(i)===n)return a;for(let e=0,s=t.dataItems.length;e<s;e++){let s=t.dataItems[e];if(s.get(i)===n)return s}}}_getIndices(t,e){let i=this.dataItems.length,s=0,a=i,o="cellSize";if(this.get("cellSizeField")){let r=0;const h=this.dataItems;if(0==h.length)return{startIndex:0,endIndex:0};n.each(h,t=>{r+=t.get(o,1)}),r-=this.get("startLocation",0)*h[0].get(o,1),r-=(1-this.get("endLocation",1))*h[h.length-1].get(o,1);let l=0;for(let e=0;e<i;e++)if(l+=this.dataItems[e].get(o,1),Math.round(l)>Math.round(t*r)){s=e;break}for(let t=s+1;t<i;t++)if(l+=this.dataItems[t].get(o,1),Math.round(l)>=Math.round(e*r)){a=t+1;break}s=Math.max(s,0),a=Math.min(a,i)}else s=Math.max(Math.round(this.get("start",0)*i),0),a=Math.min(Math.round(this.get("end",1)*i),i);return{startIndex:s,endIndex:a}}zoomToIndexes(t,e,i){let s=this.dataItems.length;this.get("cellSizeField")?(t=Math.min(Math.max(t,0),s),e=Math.max(Math.min(e,s),1),this.setPrivateRaw("startIndex",t),this.setPrivateRaw("endIndex",e),this.zoom(this.indexToPosition(t,0,!0),this.indexToPosition(e,0,!0),i)):this.zoom(t/s,e/s,i)}zoomToCategories(t,e,i){this.zoomToIndexes(this.categoryToIndex(t),this.categoryToIndex(e)+1,i)}getCellWidthPosition(){return this._frequency/this.dataItems.length/(this.get("end",1)-this.get("start",0))}nextPosition(t){null==t&&(t=1),"Y"==this.get("renderer").getPrivate("letter")&&(t*=-1);const e=this.getPrivate("tooltipPosition",0),i=h.fitToRange(this.axisPositionToIndex(e)+t,0,this.dataItems.length-1);return this.toGlobalPosition(this.indexToPosition(i))}}c.className="CategoryAxis",c.classNames=s._.classNames.concat([c.className])},2879:function(t,e,i){i.d(e,{c:function(){return g}});var s=i(3002),a=i(3860),o=i(8297),n=i(6251),r=i(4193),h=i(4636),l=i(1478),c=i(3664),d=i(7292);class g extends a.F{constructor(){super(...arguments),this._dataGrouped=!1,this._seriesDataGrouped=!1,this._groupingCalculated=!1,this._intervalDuration=1,this._baseDuration=1,this._intervalMax={},this._intervalMin={}}_afterNew(){this._settings.themeTags=c.mergeTags(this._settings.themeTags,["axis"]),super._afterNew(),this.addTag("date"),this._setBaseInterval(this.get("baseInterval")),this.on("baseInterval",()=>{this._setBaseInterval(this.get("baseInterval"))})}_setBaseInterval(t){this.setPrivateRaw("baseInterval",t),this._baseDuration=d.getIntervalDuration(t)}_prepareChildren(){(this.isDirty("startLocation")||this.isDirty("endLocation"))&&(this._dirtyExtremes=!0),(this.isDirty("markUnitChange")||this.isDirty("skipFirstMinor")||this.isDirty("weekLabelLocation"))&&(this._sizeDirty=!0),super._prepareChildren()}_fixZoomFactor(){const t=this.get("maxZoomFactor");null!=t&&t!=1/0?this.setPrivateRaw("maxZoomFactor",t):this.setPrivateRaw("maxZoomFactor",Math.round((this.getPrivate("max",0)-this.getPrivate("min",0))
1/this.baseMainDuration()))}_groupData(){const t=this.getPrivate("min"),e=this.getPrivate("max");if(o.isNumber(t)&&o.isNumber(e)){this._fixZoomFactor();const t=this.getPrivate("groupInterval");if(t?this._setBaseInterval(t):this._setBaseInterval(this.get("baseInterval")),this.isDirty("groupInterval")){let t=this.get("groupInterval");t&&(this.setRaw("groupIntervals",[t]),this._handleRangeChange())}if(this.isDirty("groupData")&&!this._dataGrouped){if(this.get("groupData"))h.each(this.series,t=>{this._groupSeriesData(t)}),this._handleRangeChange();else{let t=this.get("baseInterval"),e=t.timeUnit+t.count;h.each(this.series,t=>{t.setDataSet(e),t.resetGrouping()}),this._setBaseInterval(t),this.setPrivateRaw("groupInterval",void 0),this.markDirtyExtremes()}this._dataGrouped=!0}}}_groupSeriesData(t){if(this.get("groupData")&&!t.get("groupDataDisabled")){let e=this.get("groupIntervals");if(!e)return;this._dataGrouped=!0,this._seriesDataGrouped=!0;let i=[],a=this.baseMainDuration();h.each(e,t=>{d.getIntervalDuration(t)>a&&i.push(t)}),l.each(t._dataSets,(e,i)=>{i!=t._mainDataItems&&h.each(i,t=>{t.dispose()})}),t._dataSets={};const n=this.getPrivate("name")+this.get("renderer").getPrivate("letter");let r;const c=t.get("baseAxis");t.get("xAxis")===c?r=t._valueYFields:t.get("yAxis")===c&&(r=t._valueXFields);let g=t._mainDataItems,u=this.get("baseInterval"),m=u.timeUnit+u.count;t._dataSets[m]=g;const p=t.get("groupDataCallback");let _=t.get("groupDataWithOriginals",!1);p&&(_=!0),h.each(i,e=>{let i,a=-1/0,c=e.timeUnit+e.count;t._dataSets[c]=[];let u={},m={},x={},v={};h.each(r,e=>{u[e]=0,m[e]=0,x[e]=t.get(e+"Grouped"),v[e]=e+"Working"});let y,f,b=d.getDuration(e.timeUnit);g[0]&&(y=g[0].get(n)),h.each(g,g=>{let D,P=g.get(n),w=d.roun(P,e.timeUnit,e.count,this._root,y);if(a<w-b/24)D=l.copy(g.dataContext),i=new s.s(t,D,t._makeDataItem(D)),i.setRaw(n,w),t._dataSets[c].push(i),h.each(r,t=>{let e=g.get(t);o.isNumber(e)?(i.setRaw(t,e),i.setRaw(v[t],e),m[t]=1,u[t]=e):(u[t]=0,m[t]=0)}),_&&i.set("originals",[g]),p&&f&&p(f,e),f=i;else{let t=!1;if(h.each(r,e=>{let s=x[e],a=g.get(e);if(null!=a){t=!0;let o=i.get(e);switch(s){case"close":i.setRaw(e,a);break;case"sum":i.setRaw(e,o+a);break;case"open":break;case"low":a<o&&i.setRaw(e,a);break;case"high":a>o&&i.setRaw(e,a);break;case"average":m[e]++,u[e]+=a;let t=u[e]/m[e];i.setRaw(e,t);break;case"extreme":Math.abs(a)>Math.abs(o)&&i.setRaw(e,a)}i.setRaw(v[e],i.get(e))}}),t){let t=l.copy(g.dataContext);t[n]=w,i.dataContext=t}_&&i.get("originals").push(g)}a=w}),p&&f&&p(f,e)}),t._dataSetId&&t._dataSets[t._dataSetId]?t.setDataSet(t._dataSetId):t.setDataSet(m),this.markDirtySize(),this._seriesAdded&&this._root.events.once("frameended",()=>{this.markDirtySize()})}}_clearDirty(){super._clearDirty(),this._groupingCalculated=!1,this._dataGrouped=!1}getGroupInterval(t){let e=this.get("baseInterval"),i=d.chooseInterval(0,t,this.get("groupCount",1/0),this.get("groupIntervals"));return d.getIntervalDuration(i)<d.getIntervalDuration(e)&&(i=Object.assign({},e)),i}getIntervalMax(t){return this._intervalMax[t.timeUnit+t.count]}getIntervalMin(t){return this._intervalMin[t.timeUnit+t.count]}_handleRangeChange(){super._handleRangeChange();let t=Math.round(this.getPrivate("selectionMin")),e=Math.round(this.getPrivate("selectionMax"));if(o.isNumber(t)&&o.isNumber(e)){if(0==this.get("endLocation")&&(e+=1),this.get("groupData")&&!this._groupingCalculated){this._groupingCalculated=!0;let i=this.get("groupInterval"),s=this.getPrivate("groupInterval"),a=e-t+(this.get("startLocation",0)+(1-this.get("endLocation",1))*this._baseDuration);if(s){let t=d.getIntervalDuration(s);a=Math.ceil(a/t)*t}if(i||(i=this.getGroupInterval(a)),i&&(!s||s.timeUnit!==i.timeUnit||s.count!==i.count||this._seriesDataGrouped)){this._seriesDataGrouped=!1,this.setPrivateRaw("groupInterval",i),this._setBaseInterval(i);let t=i.timeUnit+i.count;h.each(this.series,e=>{e.get("baseAxis")===this&&e.setDataSet(t)}),this.markDirtyExtremes(),this._root.events.once("frameended",()=>{this._root.events.once("frameended",()=>{const t="groupintervalchanged";this.events.isEnabled(t)&&this.events.dispatch(t,{type:t,target:this})})})}}h.each(this.series,i=>{if(i.get("baseAxis")===this){let s=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),a=h.getFirstSortedIndex(i.dataItems,e=>r.UD(e.get(s),t)).index;a>0&&(a-=1),e+=this._baseDuration*(1-this.get("endLocation",1));let o=h.getSortedIndex(i.dataItems,t=>r.UD(t.get(s),e)).index,n=o;n>1&&n--;const l=i.dataItems[a],c=i.dataItems[n];let d,g;l&&(g=l.get(s)),c&&(d=c.get(s));let u=!1;null!=d&&null!=g&&(d<t||g>e)&&(u=!0),i.setPrivate("outOfSelection",u),i.setPrivate("startIndex",a);
1let m=i._adjustStartIndex(a);i.getPrivate("adjustedStartIndex")!==m&&(i.setPrivate("adjustedStartIndex",m),this.root.events.once("frameended",()=>{i._markDirtyPrivateKey("adjustedStartIndex")})),i.setPrivate("endIndex",o)}})}}_adjustMinMax(t,e,i,s){return{min:t,max:e,step:(e-t)/i}}intervalDuration(){return this._intervalDuration}_saveMinMax(t,e){let i=this.getPrivate("groupInterval");i||(i=this.get("baseInterval"));let s=i.timeUnit+i.count;this._intervalMin[s]=t,this._intervalMax[s]=e}_getM(t){return"day"==t||"month"==t||"year"==t?1.05:1.01}_getMinorInterval(t){var e;let i,s=t.count,a=t.timeUnit;return s>1&&(10==s||15==s?s=5:12==s?s=2:6==s?s=1:30==s?s=10:s<10&&(s=1),i={timeUnit:a,count:s}),"week"==a&&(i="week"!=(null===(e=this.getPrivate("baseInterval"))||void 0===e?void 0:e.timeUnit)?{timeUnit:"day",count:1}:{timeUnit:"week",count:1}),"year"==a&&1==s&&this.getPrivate("selectionMax",0)-this.getPrivate("selectionMin",0)<1264896e5&&(i={timeUnit:"month",count:1}),i}_prepareAxisItems(){const t=this.getPrivate("min"),e=this.getPrivate("max");if(o.isNumber(t)&&o.isNumber(e)){const e=this._root,i=Math.round(this.getPrivate("selectionMin")),a=Math.round(this.getPrivate("selectionMax")),n=this.get("renderer"),r=this.getPrivate("baseInterval");let l=i,c=0;const g=this.get("gridIntervals");let u=d.chooseInterval(0,a-i,n.gridCount(),g);d.getIntervalDuration(u)<this._baseDuration&&(u=Object.assign({},r));const m=d.getIntervalDuration(u);this._intervalDuration=m;const p=d.getNextUnit(u.timeUnit),_=e.utc,x=e.timezone;l=d.roun(i-m,u.timeUnit,u.count,e,t);let v,y=l-m;const f=this.get("dateFormats");this.setPrivateRaw("gridInterval",u);const b=n.get("minorLabelsEnabled"),D=n.get("minorGridEnabled",b);let P,w=0;D&&(P=this._getMinorInterval(u),w=d.getIntervalDuration(P));let T=0;for(;l<a+m;){let t;this.dataItems.length<c+1?(t=new s.s(this,void 0,{}),this._dataItems.push(t),this.processDataItem(t)):t=this.dataItems[c],this._createAssets(t,[]),this._toggleDataItem(t,!0),t.setRaw("value",l),t.setRaw("labelEndValue",void 0);let i=l+d.getDuration(u.timeUnit,u.count*this._getM(u.timeUnit));i=d.roun(i,u.timeUnit,1,e),t.setRaw("endValue",i);let a=new Date(l);v=f[u.timeUnit],p&&this.get("markUnitChange")&&o.isNumber(y)&&"year"!=u.timeUnit&&d.checkChange(l,y,p,_,x)&&(v=this.get("periodChangeDateFormats")[u.timeUnit]);const r=t.get("label");r&&r.set("text",e.dateFormatter.format(a,v));let h=u.count;if("week"==u.timeUnit?null==r||r.set("location",this.get("weekLabelLocation",0)):null==r||r.set("location",n.labels.template.get("location")),D){h=1;let i=u.timeUnit;"week"==i&&this.get("skipFirstMinor")&&(i="day");let s=l+d.getDuration(i,this._getM(i));s=d.roun(s,i,1,e),t.setRaw("labelEndValue",s)}if(this._prepareDataItem(t,h),y=l,l=i,P){const t=P.timeUnit,i=P.count,a=this._getM(t);this.get("skipFirstMinor")||(y-=w*a);let o,n=d.roun(y+w*a,t,i,e,y),r=this.get("minorDateFormats",this.get("dateFormats"));for(;n<l-.01*w;){let h;this.minorDataItems.length<T+1?(h=new s.s(this,void 0,{}),this.minorDataItems.push(h),this.processDataItem(h)):h=this.minorDataItems[T],this._createAssets(h,["minor"],!0),this._toggleDataItem(h,!0),h.setRaw("value",n);let l=n+d.getDuration(t,i*a);l=d.roun(l,t,1,e),h.setRaw("endValue",l);let c=new Date(n);v=r[t];const g=h.get("label");if(g&&b&&g.set("text",e.dateFormatter.format(c,v)),this._prepareDataItem(h,1),g&&!b&&g.setPrivate("visible",!1),n==o)break;if(!h.get("isRange")){const t=this.get("fillRule");t&&t(h)}o=n,n=l,T++}}if(l==y)break;c++}for(let t=c;t<this.dataItems.length;t++)this._toggleDataItem(this.dataItems[t],!1);for(let t=T;t<this.minorDataItems.length;t++)this._toggleDataItem(this.minorDataItems[t],!1);h.each(this.series,t=>{t.inited&&t._markDirtyAxes()})}this._updateGhost()}_updateFinals(t,e){this.setPrivateRaw("selectionMinFinal",this.positionToValue(t)),this.setPrivateRaw("selectionMaxFinal",this.positionToValue(e))}_getDelta(){this._deltaMinMax=this._baseDuration/2}_fixMin(t){const e=this.getPrivate("baseInterval"),i=e.timeUnit;let s=d.roun(t,i,e.count,this._root),a=s+d.getDuration(i,e.count*this._getM(i));return a=d.roun(a,i,1,this._root),s+(a-s)*this.get("startLocation",0)}_fixMax(t){const e=this.getPrivate("baseInterval"),i=e.timeUnit;let s=d.roun(t,i,e.count,this._root),a=s+d.getDuration(i,e.count*this._getM(i));return a=d.roun(a,i,1,this._root),s+(a-s)*this.get("endLocation",1)}_updateDates(t,e){}_handleSeriesRemoved(){this.setPrivate("baseInterval",this.get("baseInterval")),this.setPrivate("min",void 0),this.setPrivate("minFinal",void 0)}baseDuration(){return this._baseDuration}baseMainDuration(){return d.getIntervalDuration(this.get("baseInterval"))}
1processSeriesDataItem(t,e){const i=this.getPrivate("baseInterval");t.open||(t.open={}),t.close||(t.close={}),h.each(e,e=>{let s=t.get(e);if(o.isNumber(s)){let a=t.open[e],o=t.close[e];if(s>=a&&s<=o);else{const n=i.timeUnit,r=i.count;a=d.roun(s,n,r,this._root),o=a+d.getDuration(n,r*this._getM(n)),o=d.roun(o,n,1,this._root),t.open[e]=a,t.close[e]=o}this._updateDates(a,t.component)}})}_handleSizeDirty(){}getDataItemPositionX(t,e,i,s,a){let o,n,r;return a?r=t.get(e):(t.open&&t.close?(o=t.open[e],n=t.close[e]):(o=t.get(e),n=o),r=o+(n-o)*i,r=this._baseValue+(r-this._baseValue)*s),this.valueToPosition(r)}getDataItemCoordinateX(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(t,e,i,s))}getDataItemPositionY(t,e,i,s,a){let o,n,r;return a?r=t.get(e):(t.open&&t.close?(o=t.open[e],n=t.close[e]):(o=t.get(e),n=o),r=o+(n-o)*i,r=this._baseValue+(r-this._baseValue)*s),this.valueToPosition(r)}getDataItemCoordinateY(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(t,e,i,s))}roundAxisPosition(t,e){let i=this.positionToValue(t);i-=(e-.5)*this._baseDuration;let s=this.getPrivate("baseInterval");if(!o.isNaN(i)){const t=this._root.locale.firstDayOfWeek,a=s.timeUnit,o=this._root.utc,n=this._root.timezone,r=s.count;i=d.roun(i,a,r,this._root,this.getPrivate("min",0));let h=d.getDateIntervalDuration(s,new Date(i),t,o,n);return n&&(i=d.roun(i+.05*this._baseDuration,a,r,this._root,this.getPrivate("min",0)),h=d.getDateIntervalDuration(s,new Date(i+h*e),t,o,n)),this.valueToPosition(i+h*e)}return NaN}getTooltipText(t,e){if(null!=this.getPrivate("min")){let i=this.get("tooltipDateFormats")[this.getPrivate("baseInterval").timeUnit],s=this.positionToValue(t);if(o.isNumber(s)){let t=new Date(s),a=this.getPrivate("baseInterval"),o=d.getDateIntervalDuration(a,t,this._root.locale.firstDayOfWeek,this._root.utc,this._root.timezone);return!1!==e&&(t=new Date(s+this.get("tooltipIntervalOffset",-this.get("tooltipLocation",.5))*o)),this._root.dateFormatter.format(t,this.get("tooltipDateFormat",i))}}return""}getSeriesItem(t,e,i,s){let a=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),o=this.positionToValue(e);null==i&&(i=.5),o-=(i-.5)*this._baseDuration;const n=h.getSortedIndex(t.dataItems,t=>{let e=0;return t.open&&(e=t.open[a]),r.UD(e,o)});if(s||t.get("snapTooltip")){let e=t.dataItems[n.index-1],i=t.dataItems[n.index];if(e&&i&&e.open&&i.close){let t=e.open[a],s=i.close[a];if(Math.abs(o-t)>Math.abs(o-s))return i}if(e)return e;if(i)return i}else{const e=t.dataItems[n.index-1];if(e&&e.open&&e.close){let t=e.open[a],i=e.close[a];if(o>=t&&o<=i)return e}}}shouldGap(t,e,i,s){const a=t.get(s);return e.get(s)-a>this._baseDuration*i}zoomToDates(t,e,i){this.zoomToValues(t.getTime(),e.getTime(),i)}zoomToValues(t,e,i){const s=this.getPrivate("minFinal",this.getPrivate("min",0)),a=this.getPrivate("maxFinal",this.getPrivate("max",0));if(null!=this.getPrivate("min")&&null!=this.getPrivate("max"))if(this.get("groupData")){const s=this.getGroupInterval(e-t),a=this.get("baseInterval");let o=this.getIntervalMin(a),n=this.getIntervalMax(a)-1;n=d.roun(n,s.timeUnit,s.count,this.root),n+=this._getM(s.timeUnit)*d.getIntervalDuration(s),n=d.roun(n,s.timeUnit,s.count,this.root);let r=d.roun(o,s.timeUnit,s.count,this.root),h=d.roun(n,s.timeUnit,s.count,this.root),l=(t-r)/(h-r),c=(e-r)/(h-r);this.zoom(l,c,i)}else this.zoom((t-s)/(a-s),(e-s)/(a-s),i)}positionToDate(t){return new Date(this.positionToValue(t))}dateToPosition(t){return this.valueToPosition(t.getTime())}getCellWidthPosition(){let t=this.getPrivate("selectionMax",this.getPrivate("max")),e=this.getPrivate("selectionMin",this.getPrivate("min"));return o.isNumber(t)&&o.isNumber(e)?this._intervalDuration/(t-e):.05}nextPosition(t){null==t&&(t=1);let e=this.get("tooltipLocation",.5)*this._baseDuration;"Y"==this.get("renderer").getPrivate("letter")&&(t*=-1);let i=this.positionToValue(this.getPrivate("tooltipPosition",0));const s=this.getPrivate("baseInterval");let a=this._nextTime(i,t,s),o=this.getPrivate("selectionMin",0),r=this.getPrivate("selectionMax",0),h=d.roun(o,s.timeUnit,s.count,this._root),l=d.roun(r,s.timeUnit,s.count,this._root);return a+=e,a=n.fitToRange(a,h+e,l-e),this.toGlobalPosition(this.valueToPosition(a))}_nextTime(t,e,i){return d.roun(t+e*this._baseDuration,i.timeUnit,i.count,this._root)}}
1g.className="DateAxis",g.classNames=a.F.classNames.concat([g.className])},7169:function(t,e,i){i.d(e,{k:function(){return a}});var s=i(15);class a extends s.V{constructor(){super(...arguments),this._tickPoints=[]}}a.className="EditableAxisLabel",a.classNames=s.V.classNames.concat([a.className])},5160:function(t,e,i){i.d(e,{R:function(){return c}});var s=i(2879),a=i(3002),o=i(4636),n=i(4193),r=i(7292),h=i(8297),l=i(6251);class c extends s.c{constructor(){super(...arguments),this._frequency=1,this._m=0,this._dates=[]}_afterNew(){this.valueFields.push("date"),this.addTag("gapless"),super._afterNew()}_getDates(){return this._customDates?this._customDates:this._dates}_updateDates(t,e){if(!e.get("ignoreMinMax")){const e=this._getDates(),i=o.getSortedIndex(e,e=>n.UD(e,t));i.found||o.insertIndex(e,i.index,t)}}_updateAllDates(){if(!this._customDates){const t=new Set;o.each(this.series,e=>{if(e.get("ignoreMinMax"))return;let i="valueX";e.get("yAxis")==this&&(i="valueY"),o.each(e.dataItems,e=>{let s=e.get(i);h.isNumber(s)&&e.open&&t.add(e.open[i])})}),this._dates=Array.from(t).sort((t,e)=>t-e);const e=this._dates,i=this.get("extraMax",0),s=this.get("extraMin",0);let a=e.length;const n=this.getPrivate("baseInterval"),l=n.count,c=n.timeUnit;if(i>0){const t=a*i;let s=e[a-1];if(h.isNumber(s))for(let i=a-1;i<a+t;i++)s+=r.getDuration(c,l*this._getM(c)),s=r.roun(s,c,l,this._root),e.push(s)}if(s>0){const t=a*s;let i=e[0];if(h.isNumber(i)){const s=[];for(let e=0;e<t;e++)i-=r.getDuration(c,l),i=r.roun(i,c,l,this._root),s.push(i);s.reverse(),e.unshift(...s)}}}}valueToPosition(t){const e=this._getDates(),i=this.get("startLocation",0),s=this.get("endLocation",1),a=e.length-i-(1-s),r=o.getSortedIndex(e,e=>n.UD(e,t));let h=r.index;if(r.found)return(h-i)/a;{h>0&&(h-=1);let s=e[h];const o=e[h+1];if(o){let e=o;Math.abs(e-t)<Math.abs(s-t)&&(s=e,h++)}return(h-i)/a+(t-s)/this._baseDuration/a}}valueToIndex(t){const e=this._getDates(),i=o.getSortedIndex(e,e=>n.UD(e,t));let s=i.index;return i.found||s>0&&(s-=1),s}positionToValue(t){const e=this.get("startLocation",0),i=this.get("endLocation",1),s=this._getDates();let a=Math.round(s.length-e-(1-i)),o=t*a,n=Math.floor(o);return n<0&&(n=0),n>a-1&&(n=a-1),s[n]+(o-n+e)*this._baseDuration}_fixZoomFactor(){this.setPrivateRaw("maxZoomFactor",this._getDates().length-this.get("startLocation",0)-(1-this.get("endLocation",1)))}zoomToDates(t,e,i){const s=this._getDates(),a=s.length;let r=o.getSortedIndex(s,e=>n.UD(e,t.getTime())),h=s[Math.min(r.index,a-1)];r=o.getSortedIndex(s,t=>n.UD(t,e.getTime()));let l=s[r.index];r.index>=a&&(l=s[a-1]+this._baseDuration),this.zoomToValues(h,l,i)}zoomToValues(t,e,i){const s=this.getPrivate("min",0),a=this.getPrivate("max",0);t=l.fitToRange(t,s,a),e=l.fitToRange(e,s,a),this.zoom(this.valueToPosition(t),this.valueToPosition(e),i)}_prepareAxisItems(){let t=this.getPrivate("selectionMin",0),e=this.getPrivate("selectionMax",0);if(h.isNumber(t)&&h.isNumber(e)){this._seriesValuesDirty&&(this._seriesValuesDirty=!1,this._updateAllDates());const i=this._root,s=i.utc,n=i.timezone,l=this._getDates(),c=this.get("renderer"),d=l.length,g=this._baseDuration;let u=this.valueToIndex(t);u>0&&u--;let m=this.valueToIndex(e);m<d-1&&m++;let p=c.axisLength()/Math.max(c.get("minGridDistance"),1/Number.MAX_SAFE_INTEGER),_=Math.min(d,Math.ceil((m-u)/p));_=Math.max(1,_),u=Math.floor(u/_)*_,this._frequency=_,o.each(this.dataItems,t=>{this._toggleDataItem(t,!1)}),o.each(this.minorDataItems,t=>{this._toggleDataItem(t,!1)});let x=e-t-((e-t)/g-(m-u))*g,v=r.chooseInterval(0,x,p,this.get("gridIntervals"));const y=this.getPrivate("baseInterval");let f=r.getIntervalDuration(v);f<g&&(v=Object.assign({},y),f=r.getIntervalDuration(v)),this.setPrivateRaw("gridInterval",v),this._intervalDuration=f;const b=v.timeUnit,D=this.get("dateFormats");let P=Date.now();l[0]&&(P=l[0]);let w=r.roun(this.getPrivate("selectionMin",0),b,v.count,i,P);const T=c.get("minorLabelsEnabled"),I=c.get("minorGridEnabled",T);let A,k,M=0;I&&(A=this._getMinorInterval(v),M=r.getIntervalDuration(A));let C=this._getIndexes(w,this.getPrivate("selectionMax",w)+f,v,this.getPrivate("min",w));if(C.length>0){let t=0;this._m=0;let e=w-10*f;const d=r.getNextUnit(b);if(A){let t=l[C[0]];this._addMinorGrid(t-f,t,M,A)}let g=c.axisLength()/c.gridCount()*.5;o.each(C,o=>{var u;let m;this.dataItems.length<t+1?(m=new a.s(this,void 0,{}),this._dataItems.push(m),this.processDataItem(m)):m=this.dataItems[t];let p=l[o],_=new Date(p),x=p;t<C.length-1?x=l[C[t+1]]:x+=f,m.setRaw("value",p),m.setRaw("endValue",x),m.setRaw("index",t),m.setRaw("labelEndValue",void 0);let y=D[b];d&&this.get("markUnitChange")&&h.isNumber(e)&&"year"!=b&&r.checkChange(p,e,d,s,n)&&(y=this.get("periodChangeDateFormats")[b]),this._createAssets(m,[]);const P=m.get("label");P&&P.set("text",i.dateFormatter.format(_,y)),this._toggleDataItem(m,!0);let w=v.count;if("week"==b&&m.setRaw("labelEndValue",p),I){let t=v.timeUnit;if("week"==t&&(t="day"),w>1||"week"==v.timeUnit){let e=r.roun(p,t,1,i)+r.getDuration(t,this._getM(t)),s=this.valueToIndex(e);if(e=l[s],e==p){let t=l[s+1];t?e=t:e+=M}m.setRaw("labelEndValue",e)}w=1}if(this._prepareDataItem(m,w),P&&k&&"X"==c.getPrivate("letter")){let t=k.get("label");if(t&&P.x()-t.x()<g){let t=this._pickWorse(k,m,v);t&&(null===(u=t.get("label"))||void 0===u||u.setPrivate("visible",!1))}}A&&this._addMinorGrid(p,x,M,A),t++,P&&P.getPrivate("visible")&&(k=m),e=p})}o.each(this.series,t=>{t.inited&&t._markDirtyAxes()})}this._updateGhost()}_pickWorse(t,e,i){const s=i.timeUnit,a=t.get("value",0),o=e.get("value",0);return"hour"==s&&new Date(a).getDate()!=new Date(o).getDate()?t:e}_addMinorGrid(t,e,i,s){const n=this.get("minorDateFormats",this.get("dateFormats")),h=s.timeUnit;let l=t+r.getDuration(h,this._getM(h));l=r.roun(l,h,1,this._root);let c=e-.5*i,d=this._getIndexes(l,c,s,l);const g=this._getDates();o.each(d,t=>{let e;this.minorDataItems.length<this._m+1?(e=new a.s(this,void 0,{}),this.minorDataItems.push(e),this.processDataItem(e)):e=this.minorDataItems[this._m],l=g[t],e.setRaw("value",l),e.setRaw("endValue",l+i),e.setRaw("index",t),this._createAssets(e,["minor"],!0);const s=e.get("label");if(s)if(this.get("renderer").get("minorLabelsEnabled")){let t=new Date(l),e=n[h];s.set("text",this._root.dateFormatter.format(t,e))}else s.setPrivate("visible",!1);this._toggleDataItem(e,!0),this._prepareDataItem(e,1),this._m++})}_getIndexes(t,e,i,s){const a=[],n=i.timeUnit,h=i.count,l=this._getM(n),c=this.getPrivate("baseInterval"),d=this._root,g=this._getDates();let u=h-1,m=-1/0,p=r.getDuration(n,l),_=r.getDuration(n,h*l),x=t;for("day"==n&&(t=s);t<=e;){t=r.roun(t,n,h,d);let e=this.valueToIndex(t),i=g[e];if("day"==n&&"day"==c.timeUnit)this._hasDate(t)&&u++,u==h&&(t>=x-2*_&&o.move(a,e),u=0),t+=p,t=r.roun(t,n,1,d);else{if(i<t)for(let s=e,a=g.length;s<a;s++)if(i=g[s],i>=t){e=s;break}o.move(a,e),t+=_,t=r.roun(t,n,h,d)}if(t==m&&(t+=_+p,t=r.roun(t,n,h,d)),t==m)break;m=t}return a}_hasDate(t){return o.getSortedIndex(this._getDates(),e=>n.r9(e,t)).found}_nextTime(t,e,i){let s=l.fitToRange(this.valueToIndex(t)+e,0,this._dates.length-1);return this._dates[s]}}
1c.className="GaplessDateAxis",c.classNames=s.c.classNames.concat([c.className])},4810:function(t,e,i){i.d(e,{x:function(){return a}});var s=i(4092);class a extends s.A{_beforeChanged(){super._beforeChanged(),(this.isPrivateDirty("width")||this.isPrivateDirty("height"))&&(this._clear=!0)}}a.className="Grid",a.classNames=s.A.classNames.concat([a.className])},3860:function(t,e,i){i.d(e,{F:function(){return c}});var s=i(3002),a=i(2523),o=i(5636),n=i(8297),r=i(4636),h=i(6251),l=i(3664);class c extends a._{constructor(){super(...arguments),this._dirtyExtremes=!1,this._dirtySelectionExtremes=!1,this._dseHandled=!1,this._deltaMinMax=1,this._baseValue=0,this._minLogAdjusted=1}markDirtyExtremes(){this._dirtyExtremes=!0,this.markDirty()}markDirtySelectionExtremes(){this._dirtySelectionExtremes=!0,this.markDirty()}_isSynced(){return null!=this.get("syncWithAxis")}_afterNew(){this._settings.themeTags=l.mergeTags(this._settings.themeTags,["axis"]),this.setPrivateRaw("name","value"),this.addTag("value"),super._afterNew()}_prepareChildren(){var t;if(super._prepareChildren(),this.isDirty("syncWithAxis")){this._prevSettings.syncWithAxis&&this._syncDp&&this._syncDp.dispose();let t=this.get("syncWithAxis");if(t){const e=()=>{this.get("autoZoom",!0)?this.markDirtySelectionExtremes():this.markDirtyExtremes()};this._syncDp=new o.ZT([t.onPrivate("selectionMinFinal",e),t.onPrivate("selectionMaxFinal",e),t.onPrivate("selectionStepFinal",e),t.onPrivate("minFinal",e),t.onPrivate("maxFinal",e),t.onPrivate("step",e)])}}this.isDirty("syncZeros")&&(this._dirtyExtremes=!0,this._dirtySelectionExtremes=!0);let e=!1;(this.isDirty("min")||this.isDirty("max")||this.isDirty("maxPrecision")||this.isDirty("numberFormat"))&&(e=!0,null===(t=this.ghostLabel)||void 0===t||t.set("text",""));const i=this.getPrivate("selectionStepFinal");if((this._sizeDirty||this._dirtyExtremes||this._valuesDirty||e||this.isPrivateDirty("width")||this.isPrivateDirty("height")||this.isDirty("extraMin")||this.isDirty("extraMax")||this.isDirty("logarithmic")||this.isDirty("treatZeroAs")||this.isDirty("baseValue")||this.isDirty("strictMinMax")||this.isDirty("strictMinMaxSelection"))&&(this._getMinMax(),this._dirtyExtremes=!1),this._handleSizeDirty(),this._dirtySelectionExtremes&&!this._isPanning&&this.get("autoZoom",!0)){const t=this.chart;let e=!1;if(t){const i=this.get("renderer").getPrivate("letter");"Y"==i?t.xAxes.each(t=>{"ValueAxis"!=t.className&&(e=!0)}):"X"==i&&t.yAxes.each(t=>{"ValueAxis"!=t.className&&(e=!0)})}e&&this._getSelectionMinMax(),this._dirtySelectionExtremes=!1}this._groupData(),(this._sizeDirty||this._valuesDirty||this.isDirty("start")||this.isDirty("end")||this.isPrivateDirty("min")||this.isPrivateDirty("selectionMax")||this.isPrivateDirty("selectionMin")||this.isPrivateDirty("max")||this.isPrivateDirty("step")||this.isPrivateDirty("width")||this.isPrivateDirty("height")||this.isDirty("logarithmic")||i!==this.getPrivate("selectionStepFinal"))&&(this._handleRangeChange(),this._prepareAxisItems(),this._updateAxisRanges()),this._baseValue=this.baseValue()}_handleSizeDirty(){this._sizeDirty&&!this._dseHandled&&(this._dirtySelectionExtremes=!0,this._dseHandled=!0,this.getPrivate("selectionMinFinal")==this.getPrivate("selectionMin")&&this.getPrivate("selectionMaxFinal")==this.getPrivate("selectionMax")||(this._dirtySelectionExtremes=!1))}_clearDirty(){super._clearDirty(),this._dseHandled=!1}_groupData(){}_cleanLogValue(t){if(!(t>0))return t;const e=10-Math.floor(Math.log(t)*Math.LOG10E);return e>280?t:h.round(t,e)}_formatText(t){const e=this.get("numberFormat"),i=this.getNumberFormatter();let s="";if(e)s=i.format(t,e);else{let e=0;this.get("logarithmic")&&n.isNumber(t)&&0!=t&&(e=Math.min(l.decimalPlaces(t),20)),s=e>5?i.format(t,"#,###."+new Array(e+1).join("#")):i.format(t,void 0,this.getPrivate("stepDecimalPlaces"))}return s}_prepareAxisItems(){const t=this.getPrivate("min"),e=this.getPrivate("max");if(n.isNumber(t)&&n.isNumber(e)){const e=this.get("logarithmic"),i=this.getPrivate("step"),a=this.getPrivate("selectionMin"),o=this.getPrivate("selectionMax")+i,l=this.get("renderer").gridCount();let c=a-i,d=1,g=t,u=1,m=0;if(e){if(c=this._minLogAdjusted,c<a)for(;c<a;)c+=i;if(g=c,g<=0){let t=this._minRealLog;n.isNumber(t)||(t=1),g=Math.pow(10,Math.log(t)*Math.LOG10E),i<1&&(g=n.isNumber(this._minRealLog)?this._minRealLog:Math.pow(10,-50))}d=Math.log(o-i)*Math.LOG10E-Math.log(g)*Math.LOG10E,d>2&&(u=Math.max(1,Math.min(Math.ceil(d/Math.max(1,l)),Math.floor(d))),m=Math.floor(Math.log(g)*Math.LOG10E/u)*u,c=Math.pow(10,m))}const p=this.get("renderer"),_=p.get("minorLabelsEnabled"),x=p.get("minorGridEnabled",_);let v=Math.pow(10,Math.floor(Math.log(Math.abs(i))*Math.LOG10E));const y=Math.round(i/v);let f=2;h.round(y/5,10)%1==0&&(f=5),h.round(y/10,10)%1==0&&(f=10);let b=i/f,D=0,P=0,w=-1/0;for(;c<o;){let t;this.dataItems.length<D+1?(t=new s.s(this,void 0,{}),this._dataItems.push(t),this.processDataItem(t)):t=this.dataItems[D],this._createAssets(t,[]),this._toggleDataItem(t,!0);const a=e?this._cleanLogValue(c):c;t.setRaw("value",a);const o=t.get("label");o&&o.set("text",this._formatText(a)),this._prepareDataItem(t);let n=c;if(e&&d>2?n=Math.pow(10,m+(D+1)*u):n+=i,x){let t=c+b;for(e&&(d>2&&(b=this._adjustMinMax(c,n,10).step),t=c+b);t<n-1e-11*i;){let i;this.minorDataItems.length<P+1?(i=new s.s(this,void 0,{}),this.minorDataItems.push(i),this.processDataItem(i)):i=this.minorDataItems[P],this._createAssets(i,["minor"],!0),this._toggleDataItem(i,!0);const a=e?this._cleanLogValue(t):t;i.setRaw("value",a);const o=i.get("label");o&&_&&o.set("text",this._formatText(a)),this._prepareDataItem(i),o&&!_&&o.setPrivate("visible",!1),t+=b,P++}}if(c=n,w==c)break;let r=Math.pow(10,Math.floor(Math.log(Math.abs(i))*Math.LOG10E));if(r<1&&!e){let t=Math.round(Math.abs(Math.log(Math.abs(r))*Math.LOG10E))+2;c=h.round(c,t)}D++,e&&d<=2&&c-i<i&&(c=i),w=c}for(let t=D;t<this.dataItems.length;t++)this._toggleDataItem(this.dataItems[t],!1);for(let t=P;t<this.minorDataItems.length;t++)this._toggleDataItem(this.minorDataItems[t],!1);r.each(this.series,t=>{t.inited&&t._markDirtyAxes()}),this._updateGhost()}}_prepareDataItem(t,e){let i=this.get("renderer"),s=t.get("value"),a=t.get("endValue"),o=this.valueToPosition(s),r=o,h=this.valueToPosition(s+this.getPrivate("step"));n.isNumber(a)&&(r=this.valueToPosition(a),h=r),t.get("isRange")&&null==a&&(h=o);let l=r,c=t.get("labelEndValue");null!=c&&(l=this.valueToPosition(c)),i.updateLabel(t.get("label"),o,l,e);const d=t.get("grid");if(i.updateGrid(d,o,r),d&&(s==this.get("baseValue",0)?(d.addTag("base"),d._applyThemes()):d.hasTag("base")&&(d.removeTag("base"),d._applyThemes())
1),i.updateTick(t.get("tick"),o,l,e),i.updateFill(t.get("axisFill"),o,h),this._processBullet(t),i.updateBullet(t.get("bullet"),o,r),!t.get("isRange")){const e=this.get("fillRule");e&&e(t)}}_handleRangeChange(){let t,e=this.positionToValue(this.get("start",0)),i=this.positionToValue(this.get("end",1));if(this._isSynced()){e=this.getPrivate("selectionMinFinal",e),i=this.getPrivate("selectionMaxFinal",i);const s=this.getPrivate("selectionStepFinal");t=n.isNumber(s)&&s>0&&s<1/0?s:this._adjustMinMax(e,i,this.get("renderer").gridCount(),!0).step;const a=l.decimalPlaces(t);this.setPrivateRaw("stepDecimalPlaces",a)}else{const s=this.get("renderer").gridCount();let a=this._adjustMinMax(e,i,s,!0),o=l.decimalPlaces(a.step);this.setPrivateRaw("stepDecimalPlaces",o),e=h.round(e,o),i=h.round(i,o),a=this._adjustMinMax(e,i,s,!0),t=a.step,e=a.min,i=a.max}this.getPrivate("selectionMin")===e&&this.getPrivate("selectionMax")===i&&this.getPrivate("step")===t||(this.setPrivateRaw("selectionMin",e),this.setPrivateRaw("selectionMax",i),this.setPrivateRaw("step",t))}positionToValue(t){const e=this.getPrivate("min"),i=this.getPrivate("max");return this.get("logarithmic")?Math.pow(Math.E,(t*(Math.log(i)*Math.LOG10E-Math.log(e)*Math.LOG10E)+Math.log(e)*Math.LOG10E)/Math.LOG10E):t*(i-e)+e}valueToPosition(t){const e=this.getPrivate("min"),i=this.getPrivate("max");if(this.get("logarithmic")){if(t<=0){let e=this.get("treatZeroAs");n.isNumber(e)&&(t=e)}return(Math.log(t)*Math.LOG10E-Math.log(e)*Math.LOG10E)/(Math.log(i)*Math.LOG10E-Math.log(e)*Math.LOG10E)}return(t-e)/(i-e)}valueToFinalPosition(t){const e=this.getPrivate("minFinal"),i=this.getPrivate("maxFinal");if(this.get("logarithmic")){if(t<=0){let e=this.get("treatZeroAs");n.isNumber(e)&&(t=e)}return(Math.log(t)*Math.LOG10E-Math.log(e)*Math.LOG10E)/(Math.log(i)*Math.LOG10E-Math.log(e)*Math.LOG10E)}return(t-e)/(i-e)}getX(t,e,i){t=i+(t-i)*e;const s=this.valueToPosition(t);return this._settings.renderer.positionToCoordinate(s)}getY(t,e,i){t=i+(t-i)*e;const s=this.valueToPosition(t);return this._settings.renderer.positionToCoordinate(s)}getDataItemCoordinateX(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(t,e,i,s))}getDataItemPositionX(t,e,i,s){let a=t.get(e);return a=t.get("stackToItemX")?a*s+t.component.getStackedXValueWorking(t,e):this._baseValue+(a-this._baseValue)*s,this.valueToPosition(a)}getDataItemCoordinateY(t,e,i,s){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(t,e,i,s))}getDataItemPositionY(t,e,i,s){let a=t.get(e);return a=t.get("stackToItemY")?a*s+t.component.getStackedYValueWorking(t,e):this._baseValue+(a-this._baseValue)*s,this.valueToPosition(a)}basePosition(){return this.valueToPosition(this.baseValue())}baseValue(){const t=Math.min(this.getPrivate("minFinal",-1/0),this.getPrivate("selectionMin",-1/0)),e=Math.max(this.getPrivate("maxFinal",1/0),this.getPrivate("selectionMax",1/0));let i=this.get("baseValue",0);return i<t&&(i=t),i>e&&(i=e),i}cellEndValue(t){return t}fixSmallStep(t){return 1+t===1?(t*=2,this.fixSmallStep(t)):t}_fixMin(t){return t}_fixMax(t){return t}_calculateTotals(){if(this.get("calculateTotals")){let t=this.series[0];if(t){let e=t.startIndex();if(t.dataItems.length>0){e>0&&e--;let i,s,a=t.endIndex();a<t.dataItems.length&&a++,t.get("yAxis")==this?(i="valueY",s="vcy"):t.get("xAxis")==this&&(i="valueX",s="vcx");let o=i+"Working";if(i){let t=this.series.length,r=[],h=[];for(let e=0;e<t;e++){let t=this.series[e];t.get("excludeFromTotal")||(r.push(t),h.push(t.get(s)))}let l=r.length,c=i+"Total",d=i+"Sum",g=i+"TotalPercent";for(let t=e;t<a;t++){let e=0,i=0;for(let s=0;s<l;s++){let a=r[s].dataItems[t];if(a){let t=a.get(o)*h[s];n.isNaN(t)||(e+=t,i+=Math.abs(t))}}for(let s=0;s<l;s++){let a=r[s].dataItems[t];if(a){let t=a.get(o)*h[s];n.isNaN(t)||(a.set(c,i),a.set(d,e),a.set(g,0==i?0:t/i*100))}}}}}}}}_getSelectionMinMax(){const t=this.getPrivate("minFinal"),e=this.getPrivate("maxFinal"),i=this.get("min"),s=this.get("max");let a=this.get("extraMin",0),o=this.get("extraMax",0);this.get("logarithmic")&&(null==this.get("extraMin")&&(a=.1),null==this.get("extraMax")&&(o=.2));const l=this.get("renderer").gridCount(),c=this.get("strictMinMaxSelection");let d=this.get("strictMinMax");if(n.isNumber(t)&&n.isNumber(e)){let g=e,u=t;if(r.each(this.series,t=>{if(!t.get("ignoreMinMax")){let e,i;const s=t.getPrivate("outOfSelection");if(t.get("xAxis")===this){if(!s){let s=t.getPrivate("minX"),a=t.getPrivate("maxX");0==t.startIndex()&&t.endIndex()==t.dataItems.length||(s=void 0,a=void 0),e=t.getPrivate("selectionMinX",s),i=t.getPrivate("selectionMaxX",a)}}else if(t.get("yAxis")===this&&!s){let s=t.getPrivate("minY"),a=t.getPrivate("maxY");0==t.startIndex()&&t.endIndex()==t.dataItems.length||(s=void 0,a=void 0),e=t.getPrivate("selectionMinY",s),i=t.getPrivate("selectionMaxY",a)}t.isHidden()||t.isShowing()||(n.isNumber(e)&&(g=Math.min(g,e)),n.isNumber(i)&&(u=Math.max(u,i)))}}),this.axisRanges.each(t=>{if(t.get("affectsMinMax")){let e=t.get("value");null!=e&&(g=Math.min(g,e),u=Math.max(u,e)),e=t.get("endValue"),null!=e&&(g=Math.min(g,e),u=Math.max(u,e))}}),g>u&&([g,u]=[u,g]),n.isNumber(i)?g=d?i:t:d&&n.isNumber(this._minReal)&&(g=this._minReal),n.isNumber(s)?u=d?s:e:
1d&&n.isNumber(this._maxReal)&&(u=this._maxReal),g===u){let e=g;if(g-=this._deltaMinMax,u+=this._deltaMinMax,g<t){let i=e-t;0==i&&(i=this._deltaMinMax),g=e-i,u=e+i,d=!0}let i=this._adjustMinMax(g,u,l,d);g=i.min,u=i.max}let m=g,p=u,_=u-g;g-=_*a,u+=_*o;let x=this._adjustMinMax(g,u,l);g=x.min,u=x.max,g=h.fitToRange(g,t,e),u=h.fitToRange(u,t,e),x=this._adjustMinMax(g,u,l,!0),d||(g=x.min,u=x.max);const v=this.get("syncWithAxis");if(v&&(x=this._syncAxes(g,u,x.step,v.getPrivate("selectionMinFinal",v.getPrivate("minFinal",0)),v.getPrivate("selectionMaxFinal",v.getPrivate("maxFinal",1)),v.getPrivate("selectionStepFinal",v.getPrivate("step",1))),g=x.min,u=x.max),d&&!v&&(n.isNumber(i)&&(g=Math.max(g,i)),n.isNumber(s)&&(u=Math.min(u,s))),c&&!v&&(g=m-(p-m)*a,u=p+(p-m)*o),d&&!v){g=n.isNumber(i)?i:m,u=n.isNumber(s)?s:p,u-g<=1e-8&&(g-=this._deltaMinMax,u+=this._deltaMinMax);let t=u-g;g-=t*a,u+=t*o}this.get("logarithmic")&&(g<=0&&(g=m*(1-Math.min(a,.99))),g<t&&(g=t),u>e&&(u=e));let y=Math.min(20,Math.ceil(Math.log(this.getPrivate("maxZoomFactor",100)+1)/Math.LN10)+2),f=h.round(this.valueToFinalPosition(g),y),b=h.round(this.valueToFinalPosition(u),y);this.setPrivateRaw("selectionMinFinal",g),this.setPrivateRaw("selectionMaxFinal",u),this.setPrivateRaw("selectionStepFinal",x.step),this.zoom(f,b)}}_getMinMax(){let t=this.get("min"),e=this.get("max"),i=1/0,s=-1/0,a=this.get("extraMin",0),o=this.get("extraMax",0);this.get("logarithmic")&&(this.get("strictMinMax")||(null==this.get("extraMin")&&(a=.1),null==this.get("extraMax")&&(o=.2)));let l=1/0;if(r.each(this.series,t=>{if(!t.get("ignoreMinMax")){let e,a;if(t.get("xAxis")===this?(e=t.getPrivate("minX"),a=t.getPrivate("maxX")):t.get("yAxis")===this&&(e=t.getPrivate("minY"),a=t.getPrivate("maxY")),n.isNumber(e)&&n.isNumber(a)){i=Math.min(i,e),s=Math.max(s,a);let t=a-e;t<=0&&(t=Math.abs(a/100)),t<l&&(l=t)}}}),this.axisRanges.each(t=>{if(t.get("affectsMinMax")){let e=t.get("value");null!=e&&(i=Math.min(i,e),s=Math.max(s,e)),e=t.get("endValue"),null!=e&&(i=Math.min(i,e),s=Math.max(s,e))}}),this.get("logarithmic")){let t=this.get("treatZeroAs");n.isNumber(t)&&i<=0&&(i=t),i<=0&&new Error("Logarithmic value axis can not have values <= 0.")}if(0===i&&0===s&&(s=.9,i=-.9),n.isNumber(t)&&(i=t),n.isNumber(e)&&(s=e),i===1/0||s===-1/0)return this.setPrivate("minFinal",void 0),void this.setPrivate("maxFinal",void 0);i>s&&([i,s]=[s,i]);const c=i,d=s;let g=this.adapters.fold("min",i),u=this.adapters.fold("max",s);this._minRealLog=i,n.isNumber(g)&&(i=g),n.isNumber(u)&&(s=u),i=this._fixMin(i),s=this._fixMax(s),s-i<=1/Math.pow(10,15)&&(s-i!==0?this._deltaMinMax=(s-i)/2:this._getDelta(s),i-=this._deltaMinMax,s+=this._deltaMinMax),i-=(s-i)*a,s+=(s-i)*o,this.get("logarithmic")&&(i<0&&c>=0&&(i=0),s>0&&d<=0&&(s=0)),this._minReal=i,this._maxReal=s;let m=this.get("strictMinMax"),p=this.get("strictMinMaxSelection",!1);p&&(m=p);let _=m;n.isNumber(e)&&(_=!0);let x=this.get("renderer").gridCount(),v=this._adjustMinMax(i,s,x,_);if(i=v.min,s=v.max,v=this._adjustMinMax(i,s,x,!0),i=v.min,s=v.max,m){i=n.isNumber(t)?t:this._minReal,s=n.isNumber(e)?e:this._maxReal,s-i<=1e-8&&(i-=this._deltaMinMax,s+=this._deltaMinMax);let r=s-i;i-=r*a,s+=r*o}g=this.adapters.fold("min",i),u=this.adapters.fold("max",s),n.isNumber(g)&&(i=g),n.isNumber(u)&&(s=u),l==1/0&&(l=s-i);let y=Math.round(Math.abs(Math.log(Math.abs(s-i))*Math.LOG10E))+5;i=h.round(i,y),s=h.round(s,y);const f=this.get("syncWithAxis");if(f&&(v=this._syncAxes(i,s,v.step,f.getPrivate("minFinal",f.getPrivate("min",0)),f.getPrivate("maxFinal",f.getPrivate("max",1)),f.getPrivate("step",1)),i=v.min,s=v.max,this.get("autoZoom",!0)||(this.setPrivateRaw("selectionMinFinal",i),this.setPrivateRaw("selectionMaxFinal",s),this.setPrivateRaw("selectionStepFinal",v.step))),this.setPrivateRaw("maxZoomFactor",Math.max(1,Math.ceil((s-i)/l*this.get("maxZoomFactor",100)))),this._fixZoomFactor(),this.get("logarithmic")&&(this._minLogAdjusted=i,i=this._minReal,s=this._maxReal,i<=0&&(i=c*(1-Math.min(a,.99)))),n.isNumber(i)&&n.isNumber(s)&&(this.getPrivate("minFinal")!==i||this.getPrivate("maxFinal")!==s)){this.setPrivate("minFinal",i),this.setPrivate("maxFinal",s),this._saveMinMax(i,s);const t=this.get("interpolationDuration",0),e=this.get("interpolationEasing");this.animatePrivate({key:"min",to:i,duration:t,easing:e}),this.animatePrivate({key:"max",to:s,duration:t,easing:e})}}_fixZoomFactor(){}_getDelta(t){let e=Math.log(Math.abs(t))*Math.LOG10E,i=Math.pow(10,Math.floor(e));i/=10,this._deltaMinMax=i}
1_saveMinMax(t,e){}_adjustMinMax(t,e,i,s){i<=1&&(i=1),i=Math.round(i);let a=t,o=e,r=e-t;0===r&&(r=Math.abs(e));let l=Math.log(Math.abs(r))*Math.LOG10E,c=Math.pow(10,Math.floor(l));c/=10;let d=c;s&&(d=0),s?(t=Math.floor(t/c)*c,e=Math.ceil(e/c)*c):(t=Math.ceil(t/c)*c-d,e=Math.floor(e/c)*c+d),t<0&&a>=0&&(t=0),e>0&&o<=0&&(e=0),l=Math.log(Math.abs(r))*Math.LOG10E,c=Math.pow(10,Math.floor(l)),c/=100;let g=Math.ceil(r/i/c)*c,u=Math.pow(10,Math.floor(Math.log(Math.abs(g))*Math.LOG10E)),m=Math.ceil(g/u);m>5?m=10:m<=5&&m>2&&(m=5),g=Math.ceil(g/(u*m))*u*m;let p=this.get("maxPrecision");if(n.isNumber(p)){let t=h.ceil(g,p);p<Number.MAX_VALUE&&g!==t&&(g=t,0==g&&(g=1))}let _=0;u<1&&(_=Math.round(Math.abs(Math.log(Math.abs(u))*Math.LOG10E))+1,g=h.round(g,_));let x,v=Math.floor(t/g);return t=h.round(g*v,_),x=s?Math.floor(e/g):Math.ceil(e/g),x===v&&x++,(e=h.round(g*x,_))<o&&(e+=g),t>a&&(t-=g),g=this.fixSmallStep(g),{min:t,max:e,step:g}}getTooltipText(t,e){const i=this.get("tooltipNumberFormat",this.get("numberFormat")),s=this.getNumberFormatter(),a=this.get("extraTooltipPrecision",0),o=this.getPrivate("stepDecimalPlaces",0)+a,n=h.round(this.positionToValue(t),o);return i?s.format(n,i):s.format(n,void 0,o)}getSeriesItem(t,e){let i,s,a=this.getPrivate("name")+this.get("renderer").getPrivate("letter"),o=this.positionToValue(e);if(r.each(t.dataItems,(t,e)=>{const n=Math.abs(t.get(a)-o);(void 0===i||n<s)&&(i=e,s=n)}),null!=i)return t.dataItems[i]}zoomToValues(t,e,i){const s=this.getPrivate("minFinal",this.getPrivate("min",0)),a=this.getPrivate("maxFinal",this.getPrivate("max",1));null!=this.getPrivate("min")&&null!=this.getPrivate("max")&&this.zoom((t-s)/(a-s),(e-s)/(a-s),i)}_syncAxes(t,e,i,s,a,o){if(this.get("syncWithAxis")){let r=Math.round((a-s)/o);if(n.isNumber(r)&&r>0&&r<1/0)if(this.get("syncZeros")&&s<=0&&a>=0){let a=Math.round((0-s)/o),n=r-a;if(!(t<0&&0==a||e>0&&0==n)){let s=0;a>0&&t<0&&(s=Math.abs(t)/a),n>0&&e>0&&(s=Math.max(s,e/n)),0==s&&(s=(e-t)/r),s>0&&s<1/0&&(t=-(i=this._niceStep(s))*a,e=i*n)}}else{let s=(e-t)/r;if(s>0&&s<1/0){i=this._niceStep(s);let a=Math.floor(t/i)*i,o=a+i*r;o<e&&(a=Math.ceil(e/i)*i-i*r,o=a+i*r),t>=0&&a<0&&(a=0,o=i*r),e<=0&&o>0&&(o=0,a=-i*r),t=a,e=o}}}return{min:t,max:e,step:i}}_niceStep(t){if(!n.isNumber(t)||t<=0||t==1/0)return 1;let e=Math.pow(10,Math.floor(Math.log(Math.abs(t))*Math.LOG10E)),i=t/e;i=i<=1?1:i<=2?2:i<=5?5:10;let s=i*e;s>0&&s<1/0||(s=t);let a=this.get("maxPrecision");if(n.isNumber(a)){let t=h.ceil(s,a);a<Number.MAX_VALUE&&s!==t&&(s=t,0==s&&(s=1))}return s}getCellWidthPosition(){let t=this.getPrivate("selectionMax",this.getPrivate("max")),e=this.getPrivate("selectionMin",this.getPrivate("min"));return n.isNumber(t)&&n.isNumber(e)?this.getPrivate("step",1)/(t-e):.05}nextPosition(t){null==t&&(t=1),"Y"==this.get("renderer").getPrivate("letter")&&(t*=-1);let e=this.positionToValue(this.getPrivate("tooltipPosition",0));return e+=this.getPrivate("step",1)*t,e=h.fitToRange(e,this.getPrivate("selectionMin",0),this.getPrivate("selectionMax",1)),this.toGlobalPosition(this.valueToPosition(e))}}c.className="ValueAxis",c.classNames=a._.classNames.concat([c.className])},6160:function(t,e,i){i.d(e,{R:function(){return c}});var s=i(1635),a=i(7560),o=i(8636),n=i(924),r=i(4092),h=i(4636),l=i(8297);class c extends a.f{constructor(){super(...arguments),this._ph=0,this._pw=0,this._columnsUpdated=!1}_makeGraphics(t,e){return this.makeColumn(e,t)}_makeFieldNames(){super._makeFieldNames();const t=this.get("xAxis"),e=this.get("yAxis"),i="CategoryAxis",s="ValueAxis";t.isType(i)&&(this.get("openCategoryXField")||(this._xOpenField=this._xField)),t.isType(s)&&(this.get("openValueXField")||(this._xOpenField=this._xField)),e.isType(i)&&(this.get("openCategoryYField")||(this._yOpenField=this._yField)),e.isType(s)&&(this.get("openValueYField")||(this._yOpenField=this._yField))}_prepareChildren(){super._prepareChildren();const t=this.get("xAxis"),e=this.get("yAxis"),i=this.dataItems.length,s=Math.max(0,this.startIndex()-2),a=Math.min(this.endIndex()+2,i-1);if(t.inited&&e.inited)for(let t=s;t<=a;t++){let e=this.dataItems[t];this._createGraphics(e)}}_updateChildren(){const t=this.chart;t&&(this._ph=t.plotContainer.height(),this._pw=t.plotContainer.width());const e=this.get("xAxis"),i=this.get("yAxis"),s=this.get("baseAxis");this._colorColumns();const a=this.columns.template,o=this.get("colorByDataItem",!1);this.isDirty("fill")&&!o&&null==a.get("fill")&&a._setC("fill",this.get("fill")),this.isDirty("fillPattern")&&null==a.get("fillPattern")&&a._setC("fillPattern",this.get("fillPattern")),this.isDirty("stroke")&&!o&&null==a.get("stroke")&&a._setC("stroke",this.get("stroke")),(this.isDirty("clustered")||this.isDirty("stacked"))&&(this._valuesDirt
1y=!0,s&&h.each(s.series,t=>{t instanceof c&&t!==this&&t.markDirtyValues()}));let n=0,r=0,l=0;s&&h.each(s.series,t=>{if(t instanceof c){const e=t.get("stacked");e&&0==l&&r++,!e&&t.get("clustered")&&r++}t===this&&(n=r-1),l++}),this.get("clustered")||(n=0,r=1),0===r&&(r=1,n=0);const d="cellStartLocation",g="cellEndLocation",u=this._xRenderer.get(d,0),m=this._xRenderer.get(g,1),p=this._yRenderer.get(d,0),_=this._yRenderer.get(g,1);if(this._aLocationX0=u+n/r*(m-u),this._aLocationX1=u+(n+1)/r*(m-u),this._aLocationY0=p+n/r*(_-p),this._aLocationY1=p+(n+1)/r*(_-p),e.inited&&i.inited){if(this._axesDirty||this._valuesDirty||this._stackDirty||this.isDirty("vcx")||this.isDirty("vcy")||this._sizeDirty){const t=this.dataItems.length;let a=Math.max(0,this.startIndex()-2),o=Math.min(this.endIndex()+2,t-1);for(let t=0;t<a;t++)this._toggleColumn(this.dataItems[t],!1);let n=this.dataItems[a];for(let t=a;t<=o;t++){let e=this.dataItems[t];if(null!=e.get("valueX")&&null!=e.get("valueY")){if(n=e,t>0&&a>0)for(let e=t-1;e>=0;e--){let t=this.dataItems[e];if(null!=t.get("valueX")&&null!=t.get("valueY")){n=t;break}}break}this._toggleColumn(e,!1)}this._beforeColumnsDraw();let r=0;i.isType("CategoryAxis")&&e.isType("CategoryAxis")?r=2:e===s?r=0:i===s&&(r=1);for(let t=a;t<=o;t++){let e=this.dataItems[t];this._updateGraphics(e,n,r),null!=e.get("valueX")&&null!=e.get("valueY")&&(n=e)}this._afterColumnsDraw();for(let e=o+1;e<t;e++)this._toggleColumn(this.dataItems[e],!1);this._columnsUpdated=!0}}else this._skipped=!0;this.getPrivate("doNotUpdateLegend")||this.updateLegendMarker(this.get("tooltipDataItem")),super._updateChildren()}_afterChanged(){super._afterChanged(),this._columnsUpdated=!1}_beforeColumnsDraw(){}_afterColumnsDraw(){}_afterNew(){super._afterNew(),this.get("colors")||this._setC("colors",n.e.new(this._root,{}))}_colorSet(){return this.get("colors")}_colorColumns(){const t=this.columns.template;if(!this.get("colorByDataItem")){if(this.isDirty("colorByDataItem")){h.each(this.dataItems,t=>{t.setRaw("fill",void 0);const e=t.get("graphics");e&&(e.remove("fill"),e.remove("stroke"))});const e=this.get("fill");null!=e&&null==t.get("fill")&&t._setC("fill",e);const i=this.get("stroke");null!=i&&null==t.get("stroke")&&t._setC("stroke",i)}return}t._computedSettings.fill&&t.remove("fill"),t._computedSettings.stroke&&t.remove("stroke");const e=this._colorSet(),i=e.get("step",1),s=e.get("startIndex",0);h.each(this.dataItems,(t,a)=>{const o=e.getIndex(s+a*i);t.setRaw("fill",o);const n=t.get("graphics");n&&(n._setDefault("fill",o),n._setDefault("stroke",o))})}_createGraphics(t){let e=t.get("graphics");if(!e){e=this._makeGraphics(this.columns,t),t.set("graphics",e),e._setDataItem(t),this._linkSprite(e,t);const i=t.get("fill");null!=i&&(e._setDefault("fill",i),e._setDefault("stroke",i));const s=t.get("legendDataItem");if(s){const t=s.get("markerRectangle");if(t){const i=t.states.lookup("default");h.each(r.o,s=>{const a=e.get(s,this.get(s));t.set(s,a),i.set(s,a)})}}let a=t.get("rangeGraphics");a&&h.each(a,t=>{t.dispose()}),a=[],t.setRaw("rangeGraphics",a),this.axisRanges.each(e=>{const i=e.container,s=this._makeGraphics(e.columns,t);a&&a.push(s),s.setPrivate("list",e.columns),i.children.push(s)})}}createAxisRange(t){return h.each(this.dataItems,t=>{const e=t.get("graphics");e&&(e.dispose(),t.set("graphics",void 0))}),super.createAxisRange(t)}_updateGraphics(t,e,i){let s=t.get("graphics");const a=this._xField,n=this._yField,r=t.get(a),c=t.get(n),d=this.get("exactLocationX",!1);if(null!=r&&null!=c){const r=this._xOpenField,c=this._yOpenField,g=this.get("locationX",t.get("locationX",.5)),u=this.get("locationY",t.get("locationY",.5)),m=this.get("openLocationX",t.get("openLocationX",g)),p=this.get("openLocationY",t.get("openLocationY",u)),_=s.get("width"),x=s.get("height"),v=this.get("stacked"),y=this.get("xAxis"),f=this.get("yAxis"),b=y.get("start"),D=y.get("end"),P=f.get("start"),w=f.get("end");let T,I,A,k,M=this.get("vcy",1),C=this.get("vcx",1),S=!1,F=!1;if(0==i){let e=this._aLocationX0+m-.5,i=this._aLocationX1+g-.5;if(_ instanceof o.QE){let t=(i-e)*(1-_.value)/2;e+=t,i-=t}if(T=y.getDataItemPositionX(t,r,e,C,d),I=y.getDataItemPositionX(t,a,i,C,d),A=f.getDataItemPositionY(t,n,u,M),this._yOpenField!==this._yField)k=f.getDataItemPositionY(t,c,p,M);else if(v){let e=t.get("stackToItemY");k=e?f.getDataItemPositionY(e,n,p,e.component.get("vcy")):f.basePosition()}else k=f.basePosition();t.setRaw("point",{x:T+(I-T)/2,y:A}),F=!0}else if(1==i){let e=this._aLocationY0+p-.5,i=this._aLocationY1+u-.5;if(x instanceof o.QE){let t=(i-e)*(1-x.value)/2;e+=t,i-=t}if(A=f.getDataItemPositionY(t,c,e,M),k=f.getDataItemPositionY(t,n,i,M),I=y.getDataItemPositionX(t,a,g,C,d),this._xOpenField!==this._xField)T=y.getDataItemPositionX(t,r,m,C,d);else if(v){let e=t.get("stackToItemX");T=e?y.getDataItemPositionX(e,a,m,e.component.get("vcx"),d):y.basePosition()}else T=y.basePosition();S=!0,t.setRaw("point",{x:I,y:A+(k-A)/2})}else if(2==i){let e=this._aLocationX0+m-.5,i=this._aLocationX1+g-.5;if(_ instanceof o.QE){let t=(i-e)*(1-_.value)/2;e+=t,i-=t}if(T=y.getDataItemPositionX(t,r,e,C),I=y.getDataItemPositionX(t,a,i,C),e=this._aLocationY0+p-.5,i=this._aLocationY1+u-.5,x 
1instanceof o.QE){let t=(i-e)*(1-x.value)/2;e+=t,i-=t}A=f.getDataItemPositionY(t,c,e,M),k=f.getDataItemPositionY(t,n,i,M),t.setRaw("point",{x:T+(I-T)/2,y:A+(k-A)/2})}this._applyGraphicsStates(t,e),this._updateSeriesGraphics(t,s,T,I,A,k,S,F),T<b&&I<b||T>D&&I>D||A<P&&k<=P||A>=w&&k>w||l.isNaN(T)||l.isNaN(A)?this._toggleColumn(t,!1):this._toggleColumn(t,!0);let X=t.get("rangeGraphics");X&&h.each(X,e=>{this._updateSeriesGraphics(t,e,T,I,A,k,S,F)})}else this._toggleColumn(t,!1)}_updateSeriesGraphics(t,e,i,s,a,o,n,r){const h=e.get("width"),c=e.get("height"),d=e.get("maxWidth"),g=e.get("maxHeight"),u=this.getPoint(i,a),m=this.getPoint(s,o),p=t.get("point");if(p){const t=this.getPoint(p.x,p.y);p.x=t.x+this._x,p.y=t.y+this._y}if(i=u.x,s=m.x,a=u.y,o=m.y,l.isNumber(h)){const t=(s-i-h)/2;i+=t,s-=t}if(l.isNumber(d)&&d<Math.abs(s-i)){const t=(s-i-d)/2;i+=t,s-=t}if(l.isNumber(c)){const t=(o-a-c)/2;a+=t,o-=t}if(l.isNumber(g)&&g<Math.abs(o-a)){const t=(o-a-g)/2;a+=t,o-=t}this.get("adjustBulletPosition")&&(n&&(s=Math.min(Math.max(0,s),this._pw),i=Math.min(Math.max(0,i),this._pw)),r&&(a=Math.min(Math.max(0,a),this._ph),o=Math.min(Math.max(0,o),this._ph))),t.setRaw("left",i),t.setRaw("right",s),t.setRaw("top",a),t.setRaw("bottom",o),e.setPrivate("width",s-i),e.setPrivate("height",o-a),e.set("x",i),e.set("y",o-(o-a))}_handleDataSetChange(){super._handleDataSetChange(),h.each(this._dataItems,t=>{this._toggleColumn(t,!1)})}_applyGraphicsStates(t,e){const i=t.get("graphics"),s=i.states.lookup("dropFromOpen"),a=i.states.lookup("riseFromOpen"),o=i.states.lookup("dropFromPrevious"),n=i.states.lookup("riseFromPrevious");if(s||o||a||n){const i=this.get("xAxis"),r=this.get("yAxis"),h=this.get("baseAxis");let c,d,g;h===i&&r.isType("ValueAxis")?(c=t.get(this._yOpenField),d=t.get(this._yField),g=e.get(this._yField)):h===r&&i.isType("ValueAxis")&&(c=t.get(this._xOpenField),d=t.get(this._xField),g=e.get(this._xField)),l.isNumber(c)&&l.isNumber(d)&&(d<c?s&&s.apply():a&&a.apply(),l.isNumber(g)&&(d<g?o&&o.apply():n&&n.apply()))}}disposeDataItem(t){super.disposeDataItem(t);const e=t.get("graphics");e&&(this.columns.removeValue(e),e.dispose());const i=t.get("rangeGraphics");i&&h.each(i,t=>{const e=t.getPrivate("list");e&&e.removeValue(t),t.dispose()})}hideDataItem(t,e){const i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return(0,s.sH)(this,void 0,void 0,function*(){const s=[i.hideDataItem.call(this,t,e)],a=t.get("graphics");a&&s.push(a.hide(e));const o=t.get("rangeGraphics");o&&h.each(o,t=>{s.push(t.hide(e))}),yield Promise.all(s)})}_toggleColumn(t,e){const i=t.get("graphics");i&&i.setPrivate("visible",e);const s=t.get("rangeGraphics");s&&h.each(s,t=>{t.setPrivate("visible",e)});const a=t.bullets;a&&h.each(a,t=>{t.setPrivate("hidden",!e)})}showDataItem(t,e){const i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return(0,s.sH)(this,void 0,void 0,function*(){const s=[i.showDataItem.call(this,t,e)],a=t.get("graphics");a&&s.push(a.show(e));const o=t.get("rangeGraphics");o&&h.each(o,t=>{s.push(t.show(e))}),yield Promise.all(s)})}updateLegendMarker(t){let e=this.get("legendDataItem");if(this.get("useLastColorForLegendMarker")&&!t){const e=this.dataItems[this.endIndex()-1];e&&(t=e)}if(!t&&this.get("colorByDataItem")&&(t=this.dataItems[0]),e){let i=this.columns.template;if(t){let e=t.get("graphics");e&&(i=e)}const s=e.get("markerRectangle");if(s&&!e.get("itemContainer").get("disabled")){const t=s.states.lookup("default");h.each(r.o,e=>{const a=i.get(e,this.get(e));s.set(e,a),t.set(e,a)})}}}_getTooltipTarget(t){if("bullet"==this.get("seriesTooltipTarget"))return super._getTooltipTarget(t);return t.get("graphics")||this}}c.className="BaseColumnSeries",c.classNames=a.f.classNames.concat([c.className])},7159:function(t,e,i){i.d(e,{m:function(){return a}});var s=i(7895);class a extends s.T{_beforeChanged(){super._beforeChanged(),(this.isDirty("lowX0")||this.isDirty("lowY0")||this.isDirty("lowX1")||this.isDirty("lowY1")||this.isDirty("highX0")||this.isDirty("highX1")||this.isDirty("highY0")||this.isDirty("highY1"))&&(this._clear=!0)}_draw(){super._draw();const t=this._display;
1t.moveTo(this.get("lowX0",0),this.get("lowY0",0)),t.lineTo(this.get("lowX1",0),this.get("lowY1",0)),t.moveTo(this.get("highX0",0),this.get("highY0",0)),t.lineTo(this.get("highX1",0),this.get("highY1",0))}}a.className="Candlestick",a.classNames=s.T.classNames.concat([a.className])},1094:function(t,e,i){i.d(e,{H:function(){return l}});var s=i(4337),a=i(7159),o=i(7967),n=i(3597),r=i(3664),h=i(4636);class l extends s.k{constructor(){super(...arguments),this.columns=this.addDisposer(new n.TS(o.Bj.new({themeTags:["autocolor"]}),()=>a.m._new(this._root,{themeTags:r.mergeTags(this.columns.template.get("themeTags",[]),["candlestick","series","column"])},[this.columns.template])))}makeColumn(t,e){const i=e.make();return this.get("turboMode")?i.virtualParent=this.chart:this.mainContainer.children.push(i),i._setDataItem(t),e.push(i),i}_updateGraphics(t,e,i){super._updateGraphics(t,e,i);const s=this.getRaw("xAxis"),a=this.getRaw("yAxis");let o,n,r,h,l,c,d,g,u,m=this.get("vcy",1),p=this.get("vcx",1),_=this.get("locationX",t.get("locationX",.5)),x=this.get("locationY",t.get("locationY",.5)),v=this.get("openLocationX",t.get("openLocationX",_)),y=this.get("openLocationY",t.get("openLocationY",x));if(0==i){let e=a.getDataItemPositionY(t,this._yOpenField,1,m),i=a.getDataItemPositionY(t,this._yField,1,m);h=a.getDataItemPositionY(t,this._yLowField,1,m),g=a.getDataItemPositionY(t,this._yHighField,1,m),d=Math.max(e,i),r=Math.min(e,i);let x=this._aLocationX0+v-.5,y=this._aLocationX1+_-.5;o=s.getDataItemPositionX(t,this._xField,x+(y-x)/2,p),n=o,l=o,c=o,u="vertical"}else{let e=s.getDataItemPositionX(t,this._xOpenField,1,p),i=s.getDataItemPositionX(t,this._xField,1,p);n=s.getDataItemPositionX(t,this._xLowField,1,p),c=s.getDataItemPositionX(t,this._xHighField,1,p),l=Math.max(e,i),o=Math.min(e,i);let _=this._aLocationY0+y-.5,v=this._aLocationY1+x-.5;r=a.getDataItemPositionY(t,this._yField,_+(v-_)/2,m),h=r,d=r,g=r,u="horizontal"}this._updateCandleGraphics(t,o,n,r,h,l,c,d,g,u)}_updateCandleGraphics(t,e,i,s,a,o,n,r,l,c){let d=t.get("graphics");if(d){let g=this.getPoint(e,s),u=this.getPoint(i,a),m=this.getPoint(o,r),p=this.getPoint(n,l);if(this.get("turboMode")){const t=this.allColumnsData[this.allColumnsData.length-1];t.lowX0=g.x,t.lowY0=g.y,t.lowX1=u.x,t.lowY1=u.y,t.highX0=m.x,t.highY0=m.y,t.highX1=p.x,t.highY1=p.y}else{let e=d.x(),i=d.y();d.set("lowX0",g.x-e),d.set("lowY0",g.y-i),d.set("lowX1",u.x-e),d.set("lowY1",u.y-i),d.set("highX0",m.x-e),d.set("highY0",m.y-i),d.set("highX1",p.x-e),d.set("highY1",p.y-i),d.set("orientation",c);let s=t.get("rangeGraphics");s&&h.each(s,t=>{t.set("lowX0",g.x-e),t.set("lowY0",g.y-i),t.set("lowX1",u.x-e),t.set("lowY1",u.y-i),t.set("highX0",m.x-e),t.set("highY0",m.y-i),t.set("highX1",p.x-e),t.set("highY1",p.y-i),t.set("orientation",c)})}}}_afterColumnsDraw(){this.get("turboMode")&&this.allColumns.set("draw",t=>{t.clear(),h.each(this.allColumnsData,e=>{const i=e.width,s=e.height,a=e.x,o=e.y,n=e.stroke,r=e.fill,h=e.strokeWidth,l=e.strokeOpacity,c=e.fillOpacity,d=e.lowX0,g=e.lowY0,u=e.lowX1,m=e.lowY1,p=e.highX0,_=e.highY0,x=e.highX1,v=e.highY1;t.beginFill(r,c),t.beginPath(),t.lineStyle(h,n,l),t.drawRect(a,o,i,s),t.moveTo(d,g),t.lineTo(u,m),t.moveTo(p,_),t.lineTo(x,v),t.endStroke(),t.endFill()})})}_processAxisRange(t){super._processAxisRange(t),t.columns=new n.TS(o.Bj.new({}),()=>a.m._new(this._root,{themeTags:r.mergeTags(t.columns.template.get("themeTags",[]),["candlestick","series","column"])},[this.columns.template,t.columns.template]))}}l.className="CandlestickSeries",l.classNames=s.k.classNames.concat([l.className])},4337:function(t,e,i){i.d(e,{k:function(){return c}});var s=i(6160),a=i(7967),o=i(3597),n=i(7895),r=i(4092),h=i(3664),l=i(4636);class c extends s.R{constructor(){super(...arguments),this.allColumns=this.children.push(r.A.new(this._root,{})),this.allColumnsData=[],this.columns=this.addDisposer(new o.TS(a.Bj.new({}),()=>n.T._new(this._root,{position:"absolute",themeTags:h.mergeTags(this.columns.template.get("themeTags",[]),["series","column"])},[this.columns.template])))}makeColumn(t,e){const i=e.make();return this.get("turboMode")?i.virtualParent=this.chart:this.mainContainer.children.push(i),i._setDataItem(t),e.push(i),i}_processAxisRange(t){super._processAxisRange(t),t.columns=new o.TS(a.Bj.new({}),()=>n.T._new(this._root,{position:"absolute",themeTags:h.mergeTags(t.columns.template.get("themeTags",[]),["series","column"])},[this.columns.template,t.columns.template]))}_beforeColumnsDraw(){this.allColumnsData=[]}_afterColumnsDraw(){this.get("turboMode")&&this.allColumns.set("draw",t=>{t.clear(),l.each(this.allColumnsData,e=>
1{const i=e.width,s=e.height,a=e.x,o=e.y,n=e.stroke,r=e.fill,h=e.strokeWidth,l=e.strokeOpacity,c=e.fillOpacity;t.beginFill(r,c),t.beginPath(),t.lineStyle(h,n,l),t.drawRect(a,o,i,s),t.endStroke(),t.endFill()})})}_updateChildren(){this.isDirty("turboMode")&&(this.markDirtyValues(),this.get("turboMode")||this.allColumns.set("draw",void 0)),super._updateChildren()}_updateSeriesGraphics(t,e,i,s,a,o,n,r){if(this.get("turboMode")){e.virtualParent=this.chart,e.parent&&(this.mainContainer.children.removeValue(e),e._parent=void 0);const n=e.get("stroke"),r=e.get("fillOpacity",1),h=e.get("strokeOpacity",1),l=e.get("strokeWidth",1),c=e.get("fill"),d=this.getPoint(i,a),g=this.getPoint(s,o),u=t.get("point");if(u){const t=this.getPoint(u.x,u.y);u.x=t.x+this._x,u.y=t.y+this._y}i=d.x,s=g.x,a=d.y,o=g.y,t.setRaw("left",i),t.setRaw("right",s),t.setRaw("top",a),t.setRaw("bottom",o),this.allColumnsData.push({width:s-i,height:o-a,x:i,y:a,stroke:n,fill:c,strokeWidth:l,strokeOpacity:h,fillOpacity:r})}else e.parent||this.mainContainer.children.push(e),super._updateSeriesGraphics(t,e,i,s,a,o,n,r)}}c.className="ColumnSeries",c.classNames=s.R.classNames.concat([c.className])},1153:function(t,e,i){i.d(e,{I:function(){return p}});var s=i(7560),a=i(4092),o=i(2114),n=i(9917),r=i(7967),h=i(3597),l=i(2570),c=i(3002),d=i(2544),g=i(8297),u=i(4636),m=i(3664);class p extends s.f{constructor(){super(...arguments),this._strokeGenerator=(0,n.A)(),this._fillGenerator=(0,o.A)(),this.strokes=this.addDisposer(new h.TS(r.Bj.new({}),()=>a.A._new(this._root,{themeTags:m.mergeTags(this.strokes.template.get("themeTags",[]),["line","series","stroke"])},[this.strokes.template]))),this.fills=this.addDisposer(new h.TS(r.Bj.new({}),()=>a.A._new(this._root,{themeTags:m.mergeTags(this.strokes.template.get("themeTags",[]),["line","series","fill"])},[this.fills.template]))),this._previousPoint=[0,0,0,0],this._dindex=0,this._sindex=0}_afterNew(){this._fillGenerator.y0(function(t){return t[3]}),this._fillGenerator.x0(function(t){return t[2]}),this._fillGenerator.y1(function(t){return t[1]}),this._fillGenerator.x1(function(t){return t[0]}),super._afterNew()}makeStroke(t){const e=this.mainContainer.children.push(t.make());return t.push(e),e}makeFill(t){const e=this.mainContainer.children.push(t.make());return t.push(e),e}_updateChildren(){this._strokeTemplate=void 0,this._fillTemplate=void 0;let t=this.get("xAxis"),e=this.get("yAxis");if(this.isDirty("stroke")){const t=this.get("stroke");this.strokes.template._setC("stroke",t);const e=this._legendStroke;e&&e.states.lookup("default")._setC("stroke",t)}if(this.isDirty("fill")){const t=this.get("fill");this.fills.template._setC("fill",t);const e=this._legendFill;e&&e.states.lookup("default")._setC("fill",t)}if(this.isDirty("fillPattern")){const t=this.get("fillPattern");this.fills.template._setC("fillPattern",t);const e=this._legendFill;e&&e.states.lookup("default")._setC("fillPattern",t)}if(this.isDirty("curveFactory")){const t=this.get("curveFactory");t&&(this._strokeGenerator.curve(t),this._fillGenerator.curve(t))}if(t.inited&&e.inited){if(this._axesDirty||this._valuesDirty||this._stackDirty||this.isDirty("vcx")||this.isDirty("vcy")||this._sizeDirty||this.isDirty("connect")||this.isDirty("curveFactory")){const t=this.dataItems;this.fills.each(t=>{t.setPrivate("visible",!1)}),this.strokes.each(t=>{t.setPrivate("visible",!1)}),this.axisRanges.each(t=>{let e=t.fills;e&&e.each(t=>{t.setPrivate("visible",!1)});let i=t.strokes;i&&i.each(t=>{t.setPrivate("visible",!1)})});let e=this.startIndex(),i=this.strokes.template.get("templateField"),s=this.fills.template.get("templateField"),a=!0,o=!0;i&&(a=!1),s&&(o=!1);for(let n=e-1;n>=0;n--){let r=t[n],h=!0,l=r.dataContext;i&&l[i]&&(a=!0),s&&l[s]&&(o=!0);for(let t=0,e=this._valueFields.length;t<e;t++)if(!g.isNumber(r.get(this._valueFields[t]))){h=!1;break}if(h&&a&&o){e=n;break}}let n=t.length,r=this.endIndex();if(r<n){r++;for(let e=r;e<n;e++){let i=t[e],s=!0;for(let t=0,e=this._valueFields.length;t<e;t++)if(!g.isNumber(i.get(this._valueFields[t]))){s=!1;break}if(s){r=e+1;break}}}if(e>0&&e--,this._endIndex=r,this._clearGraphics(),this._sindex=0,this._dindex=e,1==n)this._startSegment(0);else for(;this._dindex<r-1;)this._startSegment(this._dindex),this._sindex++}}else this._skipped=!0;super._updateChildren()}_clearGraphics(){this.strokes.clear(),this.fills.clear(),this.axisRanges.each(t=>{t.fills.clear(),t.strokes.clear()})}_startSegment(t){const e=this.dataItems;let i=this._endIndex,s=i;const a=this.get("autoGapCount"),o=this.get("connect"),n=this.makeFill(this.fills),h=this._fillTemplate,l=this.fills.template;h&&h!=l&&(n.template=h),n.setPrivate("visible",!0);const c=this.makeStroke(this.strokes),d=this._strokeTemplate;d&&d!=this.strokes.template&&(c.template=d),c.setPrivate("visible",!0);let g=this.get("xAxis"),u=this.get("yAxis"),m=this.get("baseAxis"),p=this.get("vcx",1),_=this.get("vcy",1),x=this._xField,v=this._yField,y=this._xOpenField,f=this._yOpenField;const b=this.get("openValueXField"),D=this.get("openValueYField");b||(y=this._xField),D||(f=this._yField);const P=this.get("stacked"),w=g.basePosition(),T=u.basePosition();let I;I=m===u?this._yField:this._xField;const A=[];let k=[];A.push(k);const M=this.strokes.template.get("templateField"),C=this.fills.template.get("templateField");let S=this.get("locationX",.5),F=this.get("locationY",.5),X=this.get("openLocationX",S),Y=this.get("openLocationY",F);const N=this.get("minDistance",0);let L,R=this.fills.template.get("visible");this.axisRanges.length>0&&(R=!0);let V=!1;(P||b||D)&&(V=!0);const G={points:k,segments:A,stacked:P,getOpen:V,basePosX:w,basePosY:T,fillVisible:R,xField:x,yField:v,xOpenField:y,yOpenField:f,vcx:p,vcy:_,baseAxis:m,xAxis:g,yAxis:u,locationX:S,locationY:F,openLocationX:X,openLocationY:Y,minDistance:N};let O=this._strokeTemplate,E=this._fillTemplate;
1for(L=t;L<s;L++){this._dindex=L;const i=e[L];let h=i.get(x),l=i.get(v);if(null==h||null==l?o||(k=[],A.push(k),G.points=k):this._getPoints(i,G),M){let e=i.dataContext[M];if(e){if(e instanceof r.Bj||(e=r.Bj.new(e)),this._strokeTemplate=e,L>t){s=L;break}O=e,c.template=e}}if(C){let e=i.dataContext[C];if(e){if(e instanceof r.Bj||(e=r.Bj.new(e)),this._fillTemplate=e,L>t){s=L;break}E=e,n.template=e}}if(!o){let t=e[L+1];t&&m.shouldGap(i,t,a,I)&&(k=[],A.push(k),G.points=k)}}n.setRaw("userData",[t,L]),c.setRaw("userData",[t,L]),L===i&&this._endLine(k,A[0][0]),c&&this._drawStroke(c,A),n&&this._drawFill(n,A),this.axisRanges.each(e=>{const i=e.container,s=e.fills,a=this.makeFill(s);i&&i.children.push(a),a.setPrivate("visible",!0),this._drawFill(a,A);const o=e.strokes,n=this.makeStroke(o);i&&i.children.push(n),O&&O!=this.strokes.template&&(n.template=O),E&&E!=this.fills.template&&(a.template=E),n.setPrivate("visible",!0),this._drawStroke(n,A),a.setRaw("userData",[t,L]),n.setRaw("userData",[t,L])})}_getPoints(t,e){let i=e.points,s=t.get("locationX",e.locationX),a=t.get("locationY",e.locationY);const o=this.get("exactLocationX",!1),n=this.get("exactLocationY",!1);let r=e.xAxis.getDataItemPositionX(t,e.xField,s,e.vcx,o),h=e.yAxis.getDataItemPositionY(t,e.yField,a,e.vcy,n);if(this._shouldInclude(r)){const s=this.getPoint(r,h),a=[s.x,s.y];if(s.x+=this._x,s.y+=this._y,t.set("point",s),e.fillVisible){let i=r,s=h;if(e.baseAxis===e.xAxis?s=e.basePosY:e.baseAxis===e.yAxis&&(i=e.basePosX),e.getOpen){let a=t.get(e.xOpenField),r=t.get(e.yOpenField);if(null!=a&&null!=r){let a=t.get("openLocationX",e.openLocationX),r=t.get("openLocationY",e.openLocationY);if(e.stacked){let h=t.get("stackToItemX"),l=t.get("stackToItemY");h?(i=e.xAxis.getDataItemPositionX(h,e.xField,a,h.component.get("vcx"),o),g.isNaN(i)&&(i=e.basePosX)):i=e.yAxis===e.baseAxis?e.basePosX:e.xAxis.getDataItemPositionX(t,e.xOpenField,a,e.vcx,o),l?(s=e.yAxis.getDataItemPositionY(l,e.yField,r,l.component.get("vcy"),n),g.isNaN(s)&&(s=e.basePosY)):s=e.xAxis===e.baseAxis?e.basePosY:e.yAxis.getDataItemPositionY(t,e.yOpenField,r,e.vcy,n)}else i=e.xAxis.getDataItemPositionX(t,e.xOpenField,a,e.vcx,o),s=e.yAxis.getDataItemPositionY(t,e.yOpenField,r,e.vcy,n)}}let l=this.getPoint(i,s);a[2]=l.x,a[3]=l.y}if(e.minDistance>0){const t=a[0],s=a[1],o=a[2],n=a[3],r=this._previousPoint,h=r[0],l=r[1],c=r[2],d=r[3];(Math.hypot(t-h,s-l)>e.minDistance||o&&n&&Math.hypot(o-c,n-d)>e.minDistance)&&(i.push(a),this._previousPoint=a)}else i.push(a)}}_endLine(t,e){}_drawStroke(t,e){t.get("visible")&&!t.get("forceHidden")&&t.set("draw",t=>{u.each(e,e=>{this._strokeGenerator.context(t),this._strokeGenerator(e)})})}_drawFill(t,e){t.get("visible")&&!t.get("forceHidden")&&t.set("draw",t=>{u.each(e,e=>{this._fillGenerator.context(t),this._fillGenerator(e)})})}_processAxisRange(t){super._processAxisRange(t),t.fills=new h.TS(r.Bj.new({}),()=>a.A._new(this._root,{themeTags:m.mergeTags(t.fills.template.get("themeTags",[]),["line","series","fill"])},[this.fills.template,t.fills.template])),t.strokes=new h.TS(r.Bj.new({}),()=>a.A._new(this._root,{themeTags:m.mergeTags(t.strokes.template.get("themeTags",[]),["line","series","stroke"])},[this.strokes.template,t.strokes.template]))}createLegendMarker(t){const e=this.get("legendDataItem");if(e){const t=e.get("marker"),i=e.get("markerRectangle");i&&i.setPrivate("visible",!1),t.set("background",d.M.new(t._root,{fillOpacity:0,fill:(0,l.yW)(0)}));const s=t.children.push(a.A._new(t._root,{themeTags:["line","series","legend","marker","stroke"],interactive:!1},[this.strokes.template]));this._legendStroke=s;const o=t.children.push(a.A._new(t._root,{themeTags:["line","series","legend","marker","fill"]},[this.fills.template]));this._legendFill=o;const n=this._root.interfaceColors.get("disabled");if(s.states._createC("disabled",{fill:n,stroke:n}),o.states._createC("disabled",{fill:n,stroke:n}),this.bullets.length>0){const e=this.bullets.getIndex(0);if(e){const i=e(t._root,this,new c.s(this,{legend:!0},{}));if(i){const e=i.get("sprite");e instanceof a.A&&e.states._createC("disabled",{fill:n,stroke:n}),e&&(this._applyBulletDefaultPaint(e),e.setAll({tooltipText:void 0,tooltipHTML:void 0,focusable:void 0,focusableGroup:void 0,ariaLabel:void 0}),t.children.push(e),e.setAll({x:t.width()/2,y:t.height()/2}),t.events.on("boundschanged",()=>{e.setAll({x:t.width()/2,y:t.height()/2})}))}}}}}}
1p.className="LineSeries",p.classNames=s.f.classNames.concat([p.className])},7560:function(t,e,i){i.d(e,{f:function(){return p}});var s=i(1635),a=i(3002),o=i(9936),n=i(3597),r=i(9484),h=i(4092),l=i(8297),c=i(1478),d=i(4636),g=i(3664);function u(t,e){return null==t?e:null==e?t:e<t?e:t}function m(t,e){return null==t?e:null==e||t>e?t:e}class p extends o.s{constructor(){super(...arguments),this._axesDirty=!1,this._stackDirty=!1,this._selectionProcessed=!1,this._dataSets={},this._x=0,this._y=0,this._bullets={},this.mainContainer=this.children.push(r.m.new(this._root,{})),this.axisRanges=new n.B8,this._skipped=!1,this._couldStackTo=[],this._reallyStackedTo={},this._stackedSeries={},this._aLocationX0=0,this._aLocationX1=1,this._aLocationY0=0,this._aLocationY1=1,this._showBullets=!0,this.valueXFields=["valueX","openValueX","lowValueX","highValueX"],this.valueYFields=["valueY","openValueY","lowValueY","highValueY"],this._emptyDataItem=new a.s(this,void 0,{})}_afterNew(){this.fields.push("categoryX","categoryY","openCategoryX","openCategoryY"),this.valueFields.push("valueX","valueY","openValueX","openValueY","lowValueX","lowValueY","highValueX","highValueY"),this._setRawDefault("vcx",1),this._setRawDefault("vcy",1),this._setRawDefault("valueXShow","valueXWorking"),this._setRawDefault("valueYShow","valueYWorking"),this._setRawDefault("openValueXShow","openValueXWorking"),this._setRawDefault("openValueYShow","openValueYWorking"),this._setRawDefault("lowValueXShow","lowValueXWorking"),this._setRawDefault("lowValueYShow","lowValueYWorking"),this._setRawDefault("highValueXShow","highValueXWorking"),this._setRawDefault("highValueYShow","highValueYWorking"),this._setRawDefault("lowValueXGrouped","low"),this._setRawDefault("lowValueYGrouped","low"),this._setRawDefault("highValueXGrouped","high"),this._setRawDefault("highValueYGrouped","high");const t=this.get("xAxis");t&&(this._xRenderer=t.get("renderer"));const e=this.get("yAxis");e&&(this._yRenderer=e.get("renderer")),super._afterNew(),this._setC("maskContent",!0),this._disposers.push(this.on("xAxis",()=>{this._switchAxis("xAxis")})),this._disposers.push(this.on("yAxis",()=>{this._switchAxis("yAxis")})),this._disposers.push(this.axisRanges.events.onAll(t=>{if("clear"===t.type)d.each(t.oldValues,t=>{this._removeAxisRange(t)});else if("push"===t.type)this._processAxisRange(t.newValue);else if("setIndex"===t.type)this._processAxisRange(t.newValue);else if("insertIndex"===t.type)this._processAxisRange(t.newValue);else if("removeIndex"===t.type)this._removeAxisRange(t.oldValue);else{if("moveIndex"!==t.type)throw new Error("Unknown IStreamEvent type");this._processAxisRange(t.value)}})),this.states._createC("hidden",{opacity:1,visible:!1}),this.onPrivate("startIndex",()=>{this.root.events.once("frameended",()=>{this.updateLegendValue()})}),this.onPrivate("endIndex",()=>{this.root.events.once("frameended",()=>{this.updateLegendValue()})}),this._makeFieldNames();const i=()=>{this._updateFields(),this._makeFieldNames(),this.markDirtyValues()};d.each([...this.valueXFields,...this.valueYFields],t=>{this.on(t+"Field",i)})}_processAxisRange(t){const e=r.m.new(this._root,{});t.container=e,this.children.push(e),t.series=this;const i=t.axisDataItem;i.setRaw("isRange",!0);const s=i.component;if(s){s._processAxisRange(i,["range","series"]);const t=i.get("bullet");if(t){const e=t.get("sprite");e&&e.setPrivate("visible",!1)}const a=i.get("axisFill");a&&e._setC("mask",a),s._seriesAxisRanges.push(i)}}_onDataClear(){super._onDataClear(),c.each(this._dataSets,(t,e)=>{d.each(e,t=>{t.dispose()}),e.length=0})}_removeAxisRange(t){const e=t.axisDataItem,i=e.component;e.dispose(),d.remove(i._seriesAxisRanges,e);const s=t.container;s&&s.dispose()}_updateFields(){super._updateFields(),this._valueXFields=[],this._valueYFields=[],this._valueXShowFields=[],this._valueYShowFields=[],this.__valueXShowFields=[],this.__valueYShowFields=[],this.valueXFields&&d.each(this.valueXFields,t=>{if(this.get(t+"Field")){this._valueXFields.push(t);let e=this.get(t+"Show");this.__valueXShowFields.push(e),-1!=e.indexOf("Working")?this._valueXShowFields.push(e.split("Working")[0]):this._valueXShowFields.push(e)}}),this.valueYFields&&d.each(this.valueYFields,t=>{if(this.get(t+"Field")){this._valueYFields.push(t);let e=this.get(t+"Show");this.__valueYShowFields.push(e),-1!=e.indexOf("Working")?this._valueYShowFields.push(e.split("Working")[0]):this._valueYShowFields.push(e)}})}_dispose(){super._dispose(),this._bullets={};const t=this.chart;t&&t.series.removeValue(this);const e=this.get("xAxis");e&&d.removeFirst(e.series,this);const i=this.get("yAxis");i&&d.removeFirst(i.series,this)}_min(t,e){let i=u(this.getPrivate(t),e);this.setPrivate(t,i)}_max(t,e){let i=m(this.getPrivate(t),e);this.setPrivate(t,i)}_shouldMakeBullet(t){const e=this.get("xAxis"),i=this.get("yAxis"),s=this.get("baseAxis");if(!e.inited||!i.inited)return!1;const a=this.get("minBulletDistance",0);if(a>0){let t=this.startIndex(),o=this.endIndex()-t;if(e==s){if(this._xRenderer.axisLength()/o<a/5)return!1}else if(i==s&&this._yRenderer.axisLength()/o<a/5)return!1}return null!=t.get(this._xField)&&null!=t.get(this._yField)}_makeFieldNames(){const t=this.get("xAxis"),e=this.get("yAxis"),i=t.getPrivate("name"),s=g.capitalizeFirst(i),a=e.getPrivate("name"),o=g.capitalizeFirst(a),n=t.get("renderer").getPrivate("letter"),r=e.get("renderer").getPrivate("letter"),h="open",l="low",c="high",d="Show";"ValueAxis"===t.className?(this._xField=this.get(i+n+d),this._xOpenField=this.get(h+s+n+d),this._xLowField=this.get(l+s+n+d),this._xHighField=this.get(c+s+n+d)):(this._xField=i+n,this._xOpenField=h+s+n,this._xLowField=l+s+n,this._xHighField=c+s+n),"ValueAxis"===e.className?(this._yField=this.get(a+r+d),this._yOpenField=this.get(h+o+r+d),this._yLowField=this.get(l+o+r+d),this._yHighField=this.get(c+o+r+d)):(this._yField=a+r,this._yOpenField=h+o+r,this._yLowField=l+o+r,this._yHighField=c+o+r)}_fixVC(){const t=this.get("xAxis"),e=this.get("yAxis"),i=this.get("baseAxis"),s=this.states.lookup("hidden"),a=this.get("sequencedInterpolation");if(s){let o=0;a&&(o=.999999999999),t===i?s._setC("vcy",o):(e===i||s._setC("vcy",o),s._setC("vcx",o))}}_handleMaskBullets(){this.isDirty("maskBullets")&&this.bulletsContainer.set("maskContent",this.get("maskBullets"))}_fixPosition(){const t=this.get("xAxis"),e=this.get("yAxis");this._setC("x",t.x()-g.relativeToValue(t.get("centerX",0),t.width())-t.parent.get("paddingLeft",0)),this._setC("y",e.y()-g.relativeToValue(e.get("centerY",0),e.height())-e.parent.get("paddingTop",0)),this.bulletsContainer.set("y",this.y()),this.bulletsContainer.set("x",this.x())}_switchAxis(t){const e=this._prevSettings[t],i=this.get(t);if(e&&i&&e!==i){d.remove(e.series,this);const s="xAxis"==t?this._posXDp:this._posYDp;if(s&&s.dispose(),e.markDirtyExtremes(),this.get("baseAxis")===e)if(this._computedProperties.baseAxis){const t=this.get("xAxis"),e=this.get("yAxis");
1if(t&&e){const i=e.isType("CategoryAxis")||e.isType("DateAxis");this._setC("baseAxis",i?e:t)}else this._setC("baseAxis",i)}else this.set("baseAxis",i);d.move(i.series,this);const a=this.addDisposer(i.events.on("positionchanged",()=>{this._fixPosition()}));"xAxis"==t?this._posXDp=a:this._posYDp=a,i.markDirtyExtremes(),i._seriesAdded=!0,this._markDirtyAxes()}}_prepareChildren(){super._prepareChildren(),this._xRenderer=this.get("xAxis").get("renderer"),this._yRenderer=this.get("yAxis").get("renderer"),this._bullets={},(this.isDirty("valueYShow")||this.isDirty("valueXShow")||this.isDirty("openValueYShow")||this.isDirty("openValueXShow")||this.isDirty("lowValueYShow")||this.isDirty("lowValueXShow")||this.isDirty("highValueYShow")||this.isDirty("highValueXShow"))&&(this._updateFields(),this._makeFieldNames(),this._valuesDirty=!0),(this.isDirty("xAxis")||this.isDirty("yAxis"))&&(this._valuesDirty=!0),(this.isDirty("locationX")||this.isDirty("locationY")||this.isDirty("openLocationX")||this.isDirty("openLocationY")||this.isDirty("exactLocationX")||this.isDirty("exactLocationY"))&&(this._valuesDirty=!0),this._setC("width",this.get("xAxis").width()),this._setC("height",this.get("yAxis").height()),this._handleMaskBullets();const t=this.get("xAxis"),e=this.get("yAxis"),i=this.get("baseAxis");let s,a;switch(this.get("tooltipPositionX")){case"open":s=this._xOpenField;break;case"low":s=this._xLowField;break;case"high":s=this._xHighField;break;default:s=this._xField}switch(this._tooltipFieldX=s,this.get("tooltipPositionY")){case"open":a=this._yOpenField;break;case"low":a=this._yLowField;break;case"high":a=this._yHighField;break;default:a=this._yField}this._tooltipFieldY=a,this.isDirty("baseAxis")&&this._fixVC(),this._fixPosition();const o=this.get("stacked");if((this.isDirty("stacked")||this.isDirty("stackToNegative")&&o)&&(o?this._valuesDirty&&!this._dataProcessed||(this._valuesDirty=!0,this._stack()):(this._valuesDirty=!0,this._unstack())),this._valuesDirty&&!this._dataProcessed){let i,s,a,n;this._dataProcessed=!0,o&&this._stack(),d.each(this.dataItems,r=>{d.each(this._valueXShowFields,t=>{let e=r.get(t);null!=e&&(o&&(e+=this.getStackedXValue(r,t)),i=u(i,e),s=m(s,e))}),d.each(this._valueYShowFields,t=>{let e=r.get(t);null!=e&&(o&&(e+=this.getStackedYValue(r,t)),a=u(a,e),n=m(n,e))}),t.processSeriesDataItem(r,this._valueXFields),e.processSeriesDataItem(r,this._valueYFields)}),this._min("minX",i),this._max("maxX",s),this._min("minY",a),this._max("maxY",n),t._seriesValuesDirty=!0,e._seriesValuesDirty=!0,this.get("ignoreMinMax")||((this.isPrivateDirty("minX")||this.isPrivateDirty("maxX"))&&t.markDirtyExtremes(),(this.isPrivateDirty("minY")||this.isPrivateDirty("maxY"))&&e.markDirtyExtremes()),this._markStakedDirtyStack(),this.get("tooltipDataItem")||this.updateLegendValue(void 0)}if((this.isDirty("vcx")||this.isDirty("vcy"))&&this._markStakedDirtyStack(),this._dataGrouped||(t._groupSeriesD
1ata(this),e._groupSeriesData(this),this._dataGrouped=!0),this._valuesDirty||this.isPrivateDirty("startIndex")||this.isPrivateDirty("adjustedStartIndex")||this.isPrivateDirty("endIndex")||this.isDirty("vcx")||this.isDirty("vcy")||this._stackDirty||this._sizeDirty||this.isDirty("minBulletDistance")){let s=this.startIndex(),a=this.endIndex(),o=this.get("minBulletDistance",0);if(o>0&&i&&(i.get("renderer").axisLength()/(a-s)>o?this._showBullets=!0:this._showBullets=!1),(this._psi!=s||this._pei!=a||this.isDirty("vcx")||this.isDirty("vcy")||this.isPrivateDirty("adjustedStartIndex")||this._stackDirty||this._valuesDirty)&&!this._selectionProcessed){this._selectionProcessed=!0;const o=this.get("vcx",1),n=this.get("vcy",1),r=this.get("stacked",!1),h=this.getPrivate("outOfSelection");if(i===t||!i)if(e._calculateTotals(),this.setPrivateRaw("selectionMinY",void 0),this.setPrivateRaw("selectionMaxY",void 0),h)e.markDirtySelectionExtremes();else for(let t=s;t<a;t++)this.processYSelectionDataItem(this.dataItems[t],n,r);if(i===e||!i)if(t._calculateTotals(),this.setPrivateRaw("selectionMinX",void 0),this.setPrivateRaw("selectionMaxX",void 0),h)t.markDirtySelectionExtremes();else for(let t=s;t<a;t++)this.processXSelectionDataItem(this.dataItems[t],o,r);if((i===t||!i)&&("valueYWorking"!==this.get("valueYShow")||this.get("useSelectionExtremes"))){const t=this.getPrivate("selectionMinY");null!=t&&(this.setPrivateRaw("minY",t),e.markDirtyExtremes());const i=this.getPrivate("selectionMaxY");null!=i&&(this.setPrivateRaw("maxY",i),e.markDirtyExtremes())}if((i===e||!i)&&("valueXWorking"!==this.get("valueXShow")||this.get("useSelectionExtremes"))){const e=this.getPrivate("selectionMinX");null!=e&&(this.setPrivateRaw("minX",e),t.markDirtyExtremes());const i=this.getPrivate("selectionMaxX");null!=i&&(this.setPrivateRaw("maxX",i),t.markDirtyExtremes())}(this.isPrivateDirty("selectionMinX")||this.isPrivateDirty("selectionMaxX"))&&t.markDirtySelectionExtremes(),(this.isPrivateDirty("selectionMinY")||this.isPrivateDirty("selectionMaxY"))&&e.markDirtySelectionExtremes()}}}_postUpdateData(){const t=this.get("xAxis"),e=this.get("yAxis");t._seriesValuesDirty=!0,e._seriesValuesDirty=!0,d.each(this.dataItems,i=>{i.open=void 0,i.close=void 0,t.processSeriesDataItem(i,this._valueXFields),e.processSeriesDataItem(i,this._valueYFields)})}_makeRangeMask(){if(this.axisRanges.length>0){let t=this._mainContainerMask;null==t&&(t=this.children.push(h.A.new(this._root,{})),this._mainContainerMask=t,t.set("draw",(e,i)=>{const s=this.parent;if(s){const t=this._root.container.width(),a=this._root.container.height();e.moveTo(-t,-a),e.lineTo(-t,2*a),e.lineTo(2*t,2*a),e.lineTo(2*t,-a),e.lineTo(-t,-a),this.axisRanges.each(t=>{const a=t.axisDataItem.get("axisFill");if(s&&a){let t=a.get("draw");t&&t(e,i)}})}this.mainContainer._display.mask=t._display})),t.markDirty(),t._markDirtyKey("fill")}else this.mainContainer._display.mask=null}_updateChildren(){super._updateChildren(),this._x=this.x(),this._y=this.y(),this._makeRangeMask()}_stack(){const t=this.chart;if(t){const e=t.series.indexOf(this);if(this._couldStackTo=[],e>0){let i;for(let s=e-1;s>=0&&(i=t.series.getIndex(s),i.get("xAxis")!==this.get("xAxis")||i.get("yAxis")!==this.get("yAxis")||i.className!==this.className||(this._couldStackTo.push(i),i.get("stacked")));s--);}this._stackDataItems()}}_unstack(){c.each(this._reallyStackedTo,(t,e)=>{delete e._stackedSeries[this.uid]}),this._reallyStackedTo={},d.each(this.dataItems,t=>{t.setRaw("stackToItemY",void 0),t.setRaw("stackToItemX",void 0)})}_handleRemoved(){const t=this.get("xAxis");t&&t._handleSeriesRemoved();const e=this.get("yAxis");e&&e._handleSeriesRemoved()}_stackDataItems(){const t=this.get("baseAxis"),e=this.get("xAxis"),i=this.get("yAxis");let s,a;t===e?(s="valueY",a="stackToItemY"):t===i&&(s="valueX",a="stackToItemX");let o=this._couldStackTo.length,n=0;const r=this.get("stackToNegative");this._reallyStackedTo={},d.each(this.dataItems,t=>{for(let e=0;e<o;e++){let i=this._couldStackTo[e],h=i.dataItems[n],c=t.get(s);if(h){let n=h.get(s);if(r){if(!l.isNumber(c))break;if(l.isNumber(n)){if(e==o-1&&t.setRaw(a,void 0),c>=0&&n>=0){t.setRaw(a,h),this._reallyStackedTo[i.uid]=i,i._stackedSeries[this.uid]=this;break}if(c<0&&n<0){t.setRaw(a,h),this._reallyStackedTo[i.uid]=i,i._stackedSeries[this.uid]=this;break}}}else if(l.isNumber(c)&&l.isNumber(n)){t.setRaw(a,h),this._reallyStackedTo[i.uid]=i,i._stackedSeries[this.uid]=this;break}}}n++})}processXSelectionDataItem(t,e,i){d.each(this.__valueXShowFields,s=>{let a=t.get(s);null!=a&&(i&&(a+=this.getStackedXValueWorking(t,s)),this._min("selectionMinX",a),this._max("selectionMaxX",a*e))})}processYSelectionDataItem(t,e,i){d.each(this.__valueYShowFields,s=>{let a=t.get(s);null!=a&&(i&&(a+=this.getStackedYValueWorking(t,s)),this._min("selectionMinY",a),this._max("selectionMaxY",a*e))})}getStackedYValueWorking(t,e){const i=t.get("stackToItemY");
1if(i){const t=i.component;return i.get(e,0)*t.get("vcy",1)+this.getStackedYValueWorking(i,e)}return 0}getStackedXValueWorking(t,e){const i=t.get("stackToItemX");if(i){const t=i.component;return i.get(e,0)*t.get("vcx",1)+this.getStackedXValueWorking(i,e)}return 0}getStackedYValue(t,e){const i=t.get("stackToItemY");return i?i.get(e,0)+this.getStackedYValue(i,e):0}getStackedXValue(t,e){const i=t.get("stackToItemX");return i?i.get(e,0)+this.getStackedXValue(i,e):0}createLegendMarker(t){this.updateLegendMarker()}_markDirtyAxes(){this._axesDirty=!0,this.markDirty()}_markDataSetDirty(){this._afterDataChange(),this._valuesDirty=!0,this._dataProcessed=!1,this._aggregatesCalculated=!1,this.markDirty()}_clearDirty(){super._clearDirty(),this._axesDirty=!1,this._selectionProcessed=!1,this._stackDirty=!1,this._dataProcessed=!1}_positionBullet(t){let e=t.get("sprite");if(e){let i=e.dataItem,s=t.get("locationX",i.get("locationX",.5)),a=t.get("locationY",i.get("locationY",.5)),o=this.get("xAxis"),n=this.get("yAxis"),r=this.get("exactLocationX",!1),h=this.get("exactLocationY",!1),l=o.getDataItemPositionX(i,this._xField,s,this.get("vcx",1),r),c=n.getDataItemPositionY(i,this._yField,a,this.get("vcy",1),h),d=this.getPoint(l,c),g=i.get("left",d.x),u=i.get("right",d.x),m=i.get("top",d.y),p=i.get("bottom",d.y),_=0,x=0,v=u-g,y=p-m;if(this._shouldShowBullet(l,c)){e.setPrivate("visible",!t.getPrivate("hidden"));let o=t.get("field");const n=this.get("baseAxis"),u=this.get("xAxis"),m=this.get("yAxis");if(null!=o){let t;n==u?("value"==o?t=this._yField:"open"==o?t=this._yOpenField:"high"==o?t=this._yHighField:"low"==o&&(t=this._yLowField),t&&(c=m.getDataItemPositionY(i,t,0,this.get("vcy",1),h),d=this._yRenderer.positionToPoint(c),x=d.y,_=g+v*s)):("value"==o?t=this._xField:"open"==o?t=this._xOpenField:"high"==o?t=this._xHighField:"low"==o&&(t=this._xLowField),t&&(l=u.getDataItemPositionX(i,t,0,this.get("vcx",1),r),d=this._xRenderer.positionToPoint(l),_=d.x,x=p-y*a))}else _=g+v*s,x=p-y*a;const f=t.get("stacked");if(f){const t=this.chart;if(n==u){let i=this._bullets[l+"_"+c];if(i){let s=i.bounds(),a=e.localBounds(),o=x;x=s.top,"down"==f?x=s.bottom-a.top:"auto"==f?t&&(o<t.plotContainer.height()/2?x=s.bottom-a.top:x+=a.bottom):x+=a.bottom}this._bullets[l+"_"+c]=e}else{let i=this._bullets[l+"_"+c];if(i){let s=i.bounds(),a=e.localBounds(),o=_;_=s.right,"down"==f?_=s.left-a.right:"auto"==f?t&&(o<t.plotContainer.width()/2?_=s.left-a.right:_-=a.left):_-=a.left}this._bullets[l+"_"+c]=e}}e.isType("Label")&&(e.setPrivate("maxWidth",Math.abs(v)),e.setPrivate("maxHeight",Math.abs(y))),e.setAll({x:_,y:x})}else e.setPrivate("visible",!1)}}_shouldShowBullet(t,e){return this._showBullets}setDataSet(t){if(this._dataSets[t]){this._handleDataSetChange(),this._dataItems=this._dataSets[t],this._markDataSetDirty(),this._dataSetId=t;const e="datasetchanged";this.events.isEnabled(e)&&this.events.dispatch(e,{type:e,target:this,id:t})}}resetGrouping(){c.each(this._dataSets,(t,e)=>{e!=this._mainDataItems&&d.each(e,t=>{t.dispose()})}),this._dataSets={},this._dataItems=this.mainDataItems}_handleDataSetChange(){d.each(this._dataItems,t=>{let e=t.bullets;e&&d.each(e,t=>{if(t){let e=t.get("sprite");e&&e.setPrivate("visible",!1)}})}),this._selectionProcessed=!1}show(t){const e=Object.create(null,{show:{get:()=>super.show}});return(0,s.sH)(this,void 0,void 0,function*(){this._fixVC();let i=[];i.push(e.show.call(this,t).then(()=>{this._isShowing=!1;let t=this.get("xAxis"),e=this.get("yAxis"),i=this.get("baseAxis");e!==i&&e.markDirtySelectionExtremes(),t!==i&&t.markDirtySelectionExtremes()})),i.push(this.bulletsContainer.show(t)),i.push(this._sequencedShowHide(!0,t)),yield Promise.all(i)})}hide(t){const e=Object.create(null,{hide:{get:()=>super.hide}});return(0,s.sH)(this,void 0,void 0,function*(){this._fixVC();let i=[];i.push(e.hide.call(this,t).then(()=>{this._isHiding=!1})),i.push(this.bulletsContainer.hide(t)),i.push(this._sequencedShowHide(!1,t)),yield Promise.all(i)})}showDataItem(t,e){const i=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return(0,s.sH)(this,void 0,void 0,function*(){const s=[i.showDataItem.call(this,t,e)];l.isNumber(e)||(e=this.get("stateAnimationDuration",0));const a=this.get("stateAnimationEasing");d.each(this._valueFields,i=>{s.push(t.animate({key:i+"Working",to:t.get(i),duration:e,easing:a}).waitForStop())}),yield Promise.all(s)})}hideDataItem(t,e){const i=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return(0,s.sH)(this,void 0,void 0,function*(){const s=[i.hideDataItem.call(this,t,e)];let a=this.states.lookup("hidden");a||(a=this.states.create("hidden",{})),l.isNumber(e)||(e=a.get("stateAnimationDuration",this.get("stateAnimationDuration",0)));const o=a.get("stateAnimationEasing",this.get("stateAnimationEasing")),n=this.get("xAxis"),r=this.get("yAxis"),h=this.get("baseAxis"),c=this.get("stacked");if(h!==n&&h||d.each(this._valueYFields,i=>{let a=r.getPrivate("min"),n=r.baseValue();l.isNumber(a)&&a>n&&(n=a),c&&(n=0),null!=t.get(i)&&s.push(t.animate({key:i+"Working",to:n,duration:e,easing:o}).waitForStop())}),h===r||!h){let i=n.getPrivate("min"),a=n.baseValue();l.isNumber(i)&&i>a&&(a=i),c&&(a=0),d.each(this._valueXFields,i=>{null!=t.get(i)&&s.push(t.animate({key:i+"Working",to:a,duration:e,easing:o}).waitForStop())})}yield Promise.all(s)})}_markDirtyStack(){this._stackDirty=!0,this.markDirty(),this._markStakedDirtyStack()}_markStakedDirtyStack(){const t=this._stackedSeries;t&&c.each(t,(t,e)=>{e._stackDirty||e._markDirtyStack()})}_afterChanged(){super._afterChanged(),this._skipped&&(this._markDirtyAxes(),this._skipped=!1)}showDataItemTooltip(t){this.getPrivate("doNotUpdateLegend")||(this.updateLegendMarker(t),this.updateLegendValue(t));const e=this.get("tooltip"),i=this.get("exactLocationX",!1),s=this.get("exactLocationY",!1);if(e)if(!this.isHidden()&&this.get("visible")){if(e._setDataItem(t),t){let a=this.get("locationX",0),o=this.get("locationY",1),n=t.get("locationX",a),r=t.get("locationY",o);const h=this.get("xAxis"),l=this.get("yAxis"),c=this.get("vcx",1),g=this.get("vcy",1),u=h.getDataItemPositionX(t,this._tooltipFieldX,this._aLocationX0+(this._aLocationX1-this._aLocationX0)*n,c,i),m=l.getDataItemPositionY(t,this._tooltipFieldY,this._aLocationY0+(this._aLocationY1-this._aLocationY0)*r,g,s
1),p=this.getPoint(u,m);let _=!0;if(d.each(this._valueFields,e=>{null==t.get(e)&&(_=!1)}),_){const i=this.chart;i&&i.inPlot(p)?(e.label.text.markDirtyText(),e.set("tooltipTarget",this._getTooltipTarget(t)),e.set("pointTo",this._display.toGlobal({x:p.x,y:p.y}))):e._setDataItem(void 0)}else e._setDataItem(void 0)}}else this.hideTooltip()}hideTooltip(){const t=this.get("tooltip");return t&&t.set("tooltipTarget",this),super.hideTooltip()}_getTooltipTarget(t){if("bullet"==this.get("seriesTooltipTarget")){const e=t.bullets;if(e&&e.length>0){const t=e[0].get("sprite");if(t)return t}}return this}updateLegendValue(t){const e=this.get("legendDataItem");if(e){const i=e.get("label");if(i){let e="";t?(i._setDataItem(t),e=this.get("legendLabelText",i.get("text",this.get("name","")))):(i._setDataItem(this._emptyDataItem),e=this.get("legendRangeLabelText",this.get("legendLabelText",i.get("text",this.get("name",""))))),i.set("text",e)}const s=e.get("valueLabel");if(s){let e="";t?(s._setDataItem(t),e=this.get("legendValueText",s.get("text",""))):(s._setDataItem(this._emptyDataItem),e=this.get("legendRangeValueText",s.get("text",""))),s.set("text",e)}}}_getItemReaderLabel(){let t="X: {"+this._xField;return this.get("xAxis").isType("DateAxis")&&(t+=".formatDate()"),t+="}; Y: {"+this._yField,this.get("yAxis").isType("DateAxis")&&(t+=".formatDate()"),t+="}",t}getPoint(t,e){let i=this._xRenderer.positionToCoordinate(t),s=this._yRenderer.positionToCoordinate(e),a=999999999;return s<-a?s=-a:s>a&&(s=a),i<-a?i=-a:i>a&&(i=a),{x:i,y:s}}_shouldInclude(t){return!0}handleCursorHide(){this.hideTooltip(),this.updateLegendValue(void 0),this.updateLegendMarker(void 0)}_afterDataChange(){super._afterDataChange(),this.get("xAxis")._markDirtyKey("start"),this.get("yAxis")._markDirtyKey("start"),this.resetExtremes()}resetExtremes(){this.setPrivate("selectionMinX",void 0),this.setPrivate("selectionMaxX",void 0),this.setPrivate("selectionMinY",void 0),this.setPrivate("selectionMaxY",void 0),this.setPrivate("minX",void 0),this.setPrivate("minY",void 0),this.setPrivate("maxX",void 0),this.setPrivate("maxY",void 0)}createAxisRange(t){return this.axisRanges.push({axisDataItem:t})}get mainDataItems(){return this._mainDataItems}_adjustStartIndex(t){const e=this.get("xAxis");if(this.get("baseAxis")==e&&e.isType("DateAxis")){const i=e.baseDuration(),s=e.getPrivate("selectionMin",e.getPrivate("min",0)),a=i*this.get("locationX",.5);let o=-1/0;for(;o<s;){const e=this.dataItems[t];if(!e)break;{const i=e.open;if(o=i?i.valueX:e.get("valueX",0),o+=a,!(o<s))break;t++}}}return t}}p.className="XYSeries",p.classNames=o.s.classNames.concat([p.className])},1220:function(t,e,i){i.r(e),i.d(e,{Axis:function(){return c._},AxisBullet:function(){return b.s},AxisLabel:function(){return D.a},AxisLabelRadial:function(){return P.H},AxisRenderer:function(){return A.F},AxisRendererX:function(){return k.j},AxisRendererY:function(){return M.Q},AxisTick:function(){return w.r},BaseColumnSeries:function(){return l.R},Candlestick:function(){return S.m},CandlestickSeries:function(){return F.H},CategoryAxis:function(){return d.a},CategoryDateAxis:function(){return p},ColumnSeries:function(){return R.k},DateAxis:function(){return _.c},DefaultTheme:function(){return Q.W},DurationAxis:function(){return f},EditableAxisLabel:function(){return I.k},GaplessDateAxis:function(){return x.R},Grid:function(){return T.x},LineSeries:function(){return V.I},OHLC:function(){return X},OHLCSeries:function(){return L},SmoothedXLineSeries:function(){return U},SmoothedXYLineSeries:function(){return B},SmoothedYLineSeries:function(){return O},StepLineSeries:function(){return j},ValueAxis:function(){return v.F},XYChart:function(){return s.C},XYChartScrollbar:function(){return r},XYCursor:function(){return h.A},XYSeries:function(){return C.f}});var s=i(641),a=i(3003),o=i(4092),n=i(3664);class r extends a.Z{constructor(){super(...arguments),this.chart=this.children.push(s.C.new(this._root,{themeTags:["chart"],interactive:!1,interactiveChildren:!1,panX:!1,panY:!1,wheelX:"none",wheelY:"none"}))._markC("interactive","interactiveChildren","panX","panY","wheelX","wheelY"),this.overlay=this.children.push(o.A.new(this._root,{themeTags:["overlay"],interactive:!1})._markC("interactive"))}_afterNew(){this._addOrientationClass(),this._settings.themeTags=n.mergeTags(this._settings.themeTags,["scrollbar","xy","chart",this._settings.orientation]);const t=this.children;t.moveValue(this.thumb),t.moveValue(this.startGrip),t.moveValue(this.endGrip),this.thumb._setC("opacity",0),this.thumb.states._createC("hover",{opacity:.2});const e=this.chart.plotContainer;e._setC("interactive",!1),e.remove("background"),e.children.removeValue(this.chart.zoomOutButton),super._afterNew()}_updateThumb(){super._updateThumb(),this.overlay.set("draw",t=>{const e=this.startGrip,i=this.endGrip;let s=e.x(),a=e.y(),o=i.x(),n=i.y();const r=this.height(),h=this.width();s>o&&([s,o]=[o,s]),a>n&&([a,n]=[n,a]),"horizontal"===this.get("orientation")?(t.moveTo(0,0),t.lineTo(s,0),t.lineTo(s,r),t.lineTo(0,r),t.lineTo(0,0),t.moveTo(o,0),t.lineTo(h,0),t.lineTo(h,r),t.lineTo(o,r),t.lineTo(o,0)):(t.moveTo(0,0),t.lineTo(0,a),t.lineTo(h,a),t.lineTo(h,0),t.lineTo(0,0),t.moveTo(0,n),t.lineTo(0,r),t.lineTo(h,r),t.lineTo(h,n),t.lineTo(0,n))})}}
1r.className="XYChartScrollbar",r.classNames=a.Z.classNames.concat([r.className]);var h=i(5407),l=i(6160),c=i(2523),d=i(815),g=i(7292),u=i(8297),m=i(4636);class p extends d.a{constructor(){super(...arguments),this._frequency=1,this._itemMap={}}_afterNew(){this._settings.themeTags=n.mergeTags(this._settings.themeTags,["axis"]),this.fields.push("category"),super._afterNew()}_prepareChildren(){this.isDirty("baseInterval")&&(this._sizeDirty=!0),super._prepareChildren()}_prepareAxisItems(){this.setPrivateRaw("baseInterval",this.get("baseInterval"));const t=this.get("renderer"),e=this.dataItems.length;if(0===e)return;let i=this.startIndex();i>0&&i--;let s=this.endIndex();s<e&&s++;let a=t.axisLength()/Math.max(t.get("minGridDistance"),1/Number.MAX_SAFE_INTEGER),o=Math.min(e,Math.ceil((s-i)/a));i=Math.floor(i/o)*o,this._frequency=o;for(let t=0;t<e;t++)this._toggleDataItem(this.dataItems[t],!1);let n=Number(this.dataItems[i].get("category")),r=Number(this.dataItems[s-1].get("category")),h=r-n;s-i<a&&(h=r-n-((r-n)/this.baseDuration()-(s-i))*this.baseDuration());let l=g.chooseInterval(0,h,a,this.get("gridIntervals"));const c=g.getNextUnit(l.timeUnit),d=this.getPrivate("baseInterval");g.getIntervalDuration(l)<this.baseDuration()&&(l=Object.assign({},d));const p=this.get("dateFormats");let _,x=-1/0,v=-1/0,y=-1/0,f=[],b=!1;for(let t=i;t<s;t++){let e=this.dataItems[t],i=e.get("index"),s=!1,a=Number(e.get("category")),n=new Date(a),r=g.getUnitValue(n,l.timeUnit);_=p[l.timeUnit];let h=!1;"year"!=l.timeUnit&&"week"!=l.timeUnit&&c&&this.get("markUnitChange")&&u.isNumber(x)&&g.checkChange(a,x,c,this._root.utc)&&(_=this.get("periodChangeDateFormats")[l.timeUnit],i-.5*o<v&&f.pop(),f.push({format:_,dataItem:e}),b=!0,h=!0,v=i,y=r);let d=!1;"day"===l.timeUnit||"week"===l.timeUnit?i-v>=o&&(d=!0):r%l.count===0&&r!=y&&(d=!0),!h&&d&&(i-.7*o<v&&b&&(s=!0),s||(f.push({format:_,dataItem:e}),v=i,y=r),b=!1),x=a}if(f.length>0){let t=f[0].dataItem.get("index",0);m.each(f,e=>{const i=e.dataItem,s=e.format;this._createAssets(i,[]),this._toggleDataItem(i,!0);let a=Number(i.get("category")),n=new Date(a);const r=i.get("label");r&&r.set("text",this._root.dateFormatter.format(n,s)),t++,this._prepareDataItem(i,t,o)})}}baseDuration(){return g.getIntervalDuration(this.getPrivate("baseInterval"))}getTooltipText(t,e){let i=this.dataItems[this.axisPositionToIndex(t)];if(i){let t=this.get("dateFormats")[this.getPrivate("baseInterval").timeUnit];return this._root.dateFormatter.format(new Date(i.get("category",0)),this.get("tooltipDateFormat",t))}}_updateTooltipText(t,e){t.label.set("text",this.getTooltipText(e))}}p.className="CategoryDateAxis",p.classNames=d.a.classNames.concat([p.className]);var _=i(2879),x=i(5160),v=i(3860),y=i(6251);class f extends v.F{constructor(){super(...arguments),this._dataGrouped=!1,this._groupingCalculated=!1,this._intervalDuration=1}_afterNew(){this._settings.themeTags=n.mergeTags(this._settings.themeTags,["axis"]),super._afterNew()}_prepareChildren(){this.isDirty("baseUnit")&&(this._sizeDirty=!0),super._prepareChildren()}_adjustMinMax(t,e,i,s){let a;const o=this.getDurationFormatter(),n=this.get("baseUnit");if(this.setRaw("maxPrecision",0),"millisecond"==n||"second"==n||"minute"==n||"hour"==n){i<=1&&(i=1),i=Math.round(i);let s=e-t;0===s&&(s=Math.abs(e));let o=s/i,r=[60,30,20,15,10,2,1],h=1;"hour"==n&&(r=[24,12,6,4,2,1]);for(let t of r)if(s/t>i){h=t;break}let l=Math.ceil((e-t)/h/i),c=Math.log(Math.abs(l))*Math.LOG10E,d=Math.pow(10,Math.floor(c))/10,g=l/d;l=y.closest(r,g)*d,o=h*l,a={min:t=Math.floor(t/o)*o,max:e=Math.ceil(e/o)*o,step:o}}else a=super._adjustMinMax(t,e,i,s);return this.setPrivateRaw("durationFormat",o.getFormat(a.step,a.max,n)),a}_formatText(t){return this.getDurationFormatter().format(t,this.getPrivate("durationFormat"),this.get("baseUnit"))}getTooltipText(t,e){const i=this.getDurationFormatter(),s=this.get("extraTooltipPrecision",0),a=this.getPrivate("stepDecimalPlaces",0)+s,o=y.round(this.positionToValue(t),a);return i.format(o,this.getPrivate("durationFormat"),this.get("baseUnit"))}}
1f.className="DurationAxis",f.classNames=v.F.classNames.concat([f.className]);var b=i(747),D=i(3685),P=i(5490),w=i(410),T=i(4810),I=i(7169),A=i(2272),k=i(3226),M=i(6009),C=i(7560),S=i(7159),F=i(1094);class X extends S.m{_draw(){const t=this._display;t.moveTo(this.get("lowX1",0),this.get("lowY1",0)),t.lineTo(this.get("highX1",0),this.get("highY1",0));let e=this.width(),i=this.height();if("vertical"==this.get("orientation")){let s=i,a=0;t.moveTo(0,s),t.lineTo(e/2,s),t.moveTo(e/2,a),t.lineTo(e,a)}else{let s=0,a=e;t.moveTo(s,0),t.lineTo(s,i/2),t.moveTo(a,i/2),t.lineTo(a,i)}}}X.className="OHLC",X.classNames=S.m.classNames.concat([X.className]);var Y=i(7967),N=i(3597);class L extends F.H{constructor(){super(...arguments),this.columns=this.addDisposer(new N.TS(Y.Bj.new({themeTags:["autocolor"]}),()=>X._new(this._root,{themeTags:n.mergeTags(this.columns.template.get("themeTags",[]),["ohlc","series","column"])},[this.columns.template])))}makeColumn(t,e){const i=this.mainContainer.children.push(e.make());return i._setDataItem(t),e.push(i),i}_processAxisRange(t){super._processAxisRange(t),t.columns=new N.TS(Y.Bj.new({}),()=>X._new(this._root,{themeTags:n.mergeTags(t.columns.template.get("themeTags",[]),["ohlc","series","column"])},[this.columns.template,t.columns.template]))}}L.className="OHLCSeries",L.classNames=F.H.classNames.concat([L.className]);var R=i(4337),V=i(1153),G=i(2069);class O extends V.I{_afterNew(){this._setDefault("curveFactory",(0,G.w)(this.get("tension",.5))),super._afterNew()}_updateChildren(){this.isDirty("tension")&&(this.set("curveFactory",(0,G.w)(this.get("tension",.5))),this._valuesDirty=!0),super._updateChildren()}}O.className="SmoothedYLineSeries",O.classNames=V.I.classNames.concat([O.className]);var E=i(8380);class U extends V.I{_afterNew(){this._setDefault("curveFactory",(0,E.D)(this.get("tension",.5))),super._afterNew()}_updateChildren(){this.isDirty("tension")&&(this.set("curveFactory",(0,E.D)(this.get("tension",.5))),this._valuesDirty=!0),super._updateChildren()}}U.className="SmoothedXLineSeries",U.classNames=V.I.classNames.concat([U.className]);var z=i(3159);class B extends V.I{_afterNew(){this._setDefault("curveFactory",z.Ay.tension(this.get("tension",.5))),super._afterNew()}_updateChildren(){this.isDirty("tension")&&(this.set("curveFactory",z.Ay.tension(this.get("tension",.5))),this._valuesDirty=!0),super._updateChildren()}}B.className="SmoothedXYLineSeries",B.classNames=V.I.classNames.concat([B.className]);var W=i(8636);function H(t,e){this._context=t,this._t=e}function Z(t){return new H(t,1)}H.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var i=this._x*(1-this._t)+t*this._t;this._context.lineTo(i,this._y),this._context.lineTo(i,e)}}this._x=t,this._y=e}};class j extends V.I{_afterNew(){this._setDefault("curveFactory",Z),super._afterNew()}_prepareChildren(){super._prepareChildren(),(this.isDirty("stepWidth")||this.isDirty("noRisers"))&&(this._valuesDirty=!0)}_getPoints(t,e){let i=e.points,s=this.get("stepWidth",W.Q2).value/2,a=t.get("locationX",e.locationX),o=t.get("locationY",e.locationY),n=a,r=o;e.baseAxis===e.xAxis?(a-=s,n+=s):e.baseAxis===e.yAxis&&(o-=s,r+=s);let h=e.xAxis.getDataItemPositionX(t,e.xField,a,e.vcx),l=e.yAxis.getDataItemPositionY(t,e.yField,o,e.vcy),c=e.xAxis.getDataItemPositionX(t,e.xField,n,e.vcx),d=e.yAxis.getDataItemPositionY(t,e.yField,r,e.vcy);if(this._shouldInclude(h)){const g=this.getPoint(h,l),u=[g.x,g.y],m=this.getPoint(c,d),p=[m.x,m.y];if(e.fillVisible){let i=h,g=l,m=c,_=d;if(e.baseAxis===e.xAxis?(g=e.basePosY,_=e.basePosY):e.baseAxis===e.yAxis&&(i=e.basePosX,m=e.basePosX),e.getOpen){let h=t.get(e.xOpenField),l=t.get(e.yOpenField);if(null!=h&&null!=l)if(a=t.get("openLocationX",e.openLocationX),o=t.get("openLocationY",e.openLocationY),n=a,r=o,e.baseAxis===e.xAxis?(a-=s,n+=s):e.baseAxis===e.yAxis&&(o-=s,r+=s),e.stacked){let s=t.get("stackToItemX"),h=t.get("stackToItemY");s?(i=e.xAxis.getDataItemPositionX(s,e.xField,a,s.component.get("vcx")),m=e.xAxis.getDataItemPositionX(s,e.xField,n,s.component.get("vcx"))):e.yAxis===e.baseAxis?(i=e.basePosX,m=e.basePosX):e.baseAxis===e.xAxis&&(i=e.xAxis.getDataItemPositionX(t,e.xOpenField,a,e.vcx),m=e.xAxis.getDataItemPositionX(t,e.xOpenField,n,e.vcx)),h?(g=e.yAxis.getDataItemPositionY(h,e.yField,o,h.component.get("vcy")),_=e.yAxis.getDataItemPositionY(h,e.yField,r,h.component.get("vcy"))):e.xAxis===e.baseAxis?(g=e.basePosY,_=e.basePosY):e.baseAxis===e.yAxis&&(g=e.yAxis.getDataItemPositionY(t,e.yOpenField,o,e.vcy),_=e.yAxis.getDataItemPositionY(t,e.yOpenField,r,e.vcy))}else i=e.xAxis.getDataItemPositionX(t,e.xOpenField,a,e.vcx),g=e.yAxis.getDataItemPositionY(t,e.yOpenField,o,e.vcy),m=e.xAxis.getDataItemPositionX(t,e.xOpenField,n,e.vcx),_=e.yAxis.getDataItemPositionY(t,e.yOpenField,r,e.vcy)}let x=this.getPoint(i,g),v=this.getPoint(m,_);u[2]=x.x,u[3]=x.y,p[2]=v.x,p[3]=v.y}i.push(u),i.push(p),t.set("point",{x:u[0]+(p[0]-u[0])/2,y:u[1]+(p[1]-u[1])/2})}this.get("noRisers")&&(e.points=[],e.segments.push(i))}}
1j.className="StepLineSeries",j.classNames=V.I.classNames.concat([j.className]);var Q=i(7675)},3751:function(t,e,i){i.r(e),i.d(e,{am5xy:function(){return s}});const s=i(1220)},3159:function(t,e,i){function s(t,e,i){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-i),t._x2,t._y2)}function a(t,e){this._context=t,this._k=(1-e)/6}i.d(e,{zx:function(){return s}}),a.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:s(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:s(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},e.Ay=function t(e){function i(t){return new a(t,e)}return i.tension=function(e){return t(+e)},i}(0)}},function(t){var e=t(t.s=3751),i=window;for(var s in e)i[s]=e[s];e.__esModule&&Object.defineProperty(i,"__esModule",{value:!0})}]);
2//# sourceMappingURL=xy.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.