// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built define("exports ./Theme ./ColorSet ./DefaultTheme ./Tick ./Button2 ./tslib.es6".split(" "),function(H,f,Z,A,y,na,N){function aa(a){return"object"===typeof a&&"length"in a?a:Array.from(a)}function ba(a){this._context=a}function ca(a){return new ba(a)}function da(a){return a[0]}function ea(a){return a[1]}function fa(a,b){function c(l){var p,n=(l=aa(l)).length,m,q=!1,t;null==e&&(g=h(t=k()));for(p=0;p<=n;++p)!(p=B;--t)p.point(x[t],z[t]);p.lineEnd();p.areaEnd()}v&&(x[q]=+a(u,q,m),z[q]=+b(u,q,m),p.point(h?+h(u,q,m):x[q],c?+c(u,q,m):z[q]))}if(w)return p= null,w+""||null}function e(){return fa().defined(g).curve(l).context(k)}var h=null,g=y.constant(!0),k=null,l=ca,p=null,n=y.withPath(d);a="function"===typeof a?a:void 0===a?da:y.constant(+a);b="function"===typeof b?b:void 0===b?y.constant(0):y.constant(+b);c="function"===typeof c?c:void 0===c?ea:y.constant(+c);d.x=function(m){return arguments.length?(a="function"===typeof m?m:y.constant(+m),h=null,d):a};d.x0=function(m){return arguments.length?(a="function"===typeof m?m:y.constant(+m),d):a};d.x1=function(m){return arguments.length? (h=null==m?null:"function"===typeof m?m:y.constant(+m),d):h};d.y=function(m){return arguments.length?(b="function"===typeof m?m:y.constant(+m),c=null,d):b};d.y0=function(m){return arguments.length?(b="function"===typeof m?m:y.constant(+m),d):b};d.y1=function(m){return arguments.length?(c=null==m?null:"function"===typeof m?m:y.constant(+m),d):c};d.lineX0=d.lineY0=function(){return e().x(a).y(b)};d.lineY1=function(){return e().x(a).y(c)};d.lineX1=function(){return e().x(h).y(b)};d.defined=function(m){return arguments.length? (g="function"===typeof m?m:y.constant(!!m),d):g};d.curve=function(m){return arguments.length?(l=m,null!=k&&(p=l(k)),d):l};d.context=function(m){return arguments.length?(null==m?k=p=null:p=l(k=m),d):k};return d}ba.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath();this._line=1-this._line},point:function(a,b){a=+a;b=+b;switch(this._point){case 0:this._point= 1;this._line?this._context.lineTo(a,b):this._context.moveTo(a,b);break;case 1:this._point=2;default:this._context.lineTo(a,b)}}};class pa extends f.Theme{setupDefaultRules(){super.setupDefaultRules();const a=this._root.interfaceColors;var b=this._root.language;const c=this.rule.bind(this);c("XYChart").setAll({colors:Z.ColorSet.new(this._root,{}),paddingLeft:20,paddingRight:20,paddingTop:16,paddingBottom:16,panX:!1,panY:!1,wheelStep:.25,arrangeTooltips:!0,pinchZoomX:!1,pinchZoomY:!1});c("XYSeries").setAll({legendLabelText:"{name}"}); c("Rectangle",["plotbackground","xy","background"]).setAll({fill:f.Color.fromHex(0),fillOpacity:0});c("XYChart",["scrollbar","chart"]).setAll({paddingBottom:0,paddingLeft:0,paddingTop:0,paddingRight:0,colors:Z.ColorSet.new(this._root,{saturation:0})});var d=c("Graphics",["scrollbar","overlay"]);d.setAll({fillOpacity:.5});A.setColor(d,"fill",a,"background");c("RoundedRectangle",["xy","scrollbar","thumb"]).setAll({cornerRadiusTR:0,cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusBL:0,fillOpacity:0,focusable:!0}); c("RoundedRectangle",["xy","scrollbar","thumb"]).states.create("hover",{fillOpacity:.4});c("RoundedRectangle",["xy","scrollbar","chart","background"]).setAll({cornerRadiusTL:0,cornerRadiusBL:0,cornerRadiusTR:0,cornerRadiusBR:0});c("RoundedRectangle","xy scrollbar chart background resize button".split(" ")).setAll({cornerRadiusBL:40,cornerRadiusBR:40,cornerRadiusTL:40,cornerRadiusTR:40});c("AxisRendererX",["xy","chart","scrollbar"]).setAll({strokeOpacity:0,inside:!0});c("AxisRendererY",["xy","chart", "scrollbar"]).setAll({strokeOpacity:0,inside:!0,minGridDistance:5});c("AxisLabel",["xy","scrollbar","x"]).setAll({opacity:.5,centerY:f.p100,minPosition:.01,maxPosition:.99,fontSize:"0.8em"});c("AxisLabel",["category"]).setAll({text:"{category}",populateText:!0});c("AxisLabel",["x"]).setAll({centerY:0});c("AxisLabel",["x","inside"]).setAll({centerY:f.p100});c("AxisLabel",["x","inside","opposite"]).setAll({centerY:0});c("AxisLabel",["x","opposite"]).setAll({centerY:f.p100});c("AxisLabel",["y"]).setAll({centerX:f.p100}); c("AxisLabel",["y","inside"]).setAll({centerX:0});c("AxisLabel",["y","inside","opposite"]).setAll({centerX:f.p100});c("AxisLabel",["y","opposite"]).setAll({centerX:0});c("AxisLabel",["minor"]).setAll({fontSize:"0.6em"});c("AxisLabel",["xy","scrollbar","y"]).setAll({visible:!1});c("Grid",["xy","scrollbar","y"]).setAll({visible:!1});c("Grid",["xy","scrollbar","x"]).setAll({opacity:.5});c("XYCursor").setAll({behavior:"none",layer:30,exportable:!1,snapToSeriesBy:"xy",moveThreshold:1});d=c("Grid",["cursor", "x"]);d.setAll({forceInactive:!0,strokeOpacity:.8,strokeDasharray:[2,2],role:"slider",ariaLabel:b.translate("Use left and right arrows to move selection")});A.setColor(d,"stroke",a,"alternativeBackground");d=c("Grid",["cursor","y"]);d.setAll({forceInactive:!0,strokeOpacity:.8,strokeDasharray:[2,2],role:"slider",ariaLabel:b.translate("Use up and down arrows to move selection")});A.setColor(d,"stroke",a,"alternativeBackground");d=c("Graphics",["cursor","selection"]);d.setAll({fillOpacity:.15});A.setColor(d, "fill",a,"alternativeBackground");c("Axis").setAll({start:0,end:1,minZoomCount:1,maxZoomCount:Infinity,maxZoomFactor:1E3,maxDeviation:.1,snapTooltip:!0,tooltipLocation:.5,panX:!0,panY:!0,zoomX:!0,zoomY:!0,fixAxisSize:!0});c("AxisLabel").setAll({location:.5,multiLocation:0,centerX:f.p50,centerY:f.p50,paddingTop:3,paddingBottom:3,paddingLeft:5,paddingRight:5});c("Container",["axis","header"]).setAll({layer:30});c("Rectangle",["axis","header","background"]).setAll({crisp:!0});d=c("AxisRenderer");d.setAll({crisp:!0, strokeOpacity:0});A.setColor(d,"stroke",a,"grid");c("AxisRendererX").setAll({minGridDistance:120,opposite:!1,inversed:!1,cellStartLocation:0,cellEndLocation:1,width:f.p100});c("AxisRendererY").setAll({minGridDistance:40,opposite:!1,inversed:!1,cellStartLocation:0,cellEndLocation:1,height:f.p100});d=c("Rectangle",["axis","thumb"]);d.setAll({fillOpacity:0});A.setColor(d,"fill",a,"alternativeBackground");d.states.create("hover",{fillOpacity:.1});c("Rectangle",["axis","thumb","x"]).setAll({cursorOverStyle:"ew-resize"}); c("Rectangle",["axis","thumb","y"]).setAll({cursorOverStyle:"ns-resize"});d=c("Grid");d.setAll({location:0,strokeOpacity:.15,crisp:!0});A.setColor(d,"stroke",a,"grid");d=c("Grid",["minor"]);d.setAll({location:0,strokeOpacity:.07,crisp:!0});A.setColor(d,"stroke",a,"grid");c("Grid",["base"]).setAll({strokeOpacity:.3});d=c("Graphics",["axis","fill"]);d.setAll({visible:!1,isMeasured:!1,position:"absolute",fillOpacity:.05});A.setColor(d,"fill",a,"alternativeBackground");c("Graphics",["axis","fill","range"]).setAll({isMeasured:!0}); c("Graphics",["series","fill","range"]).setAll({visible:!1,isMeasured:!0});c("Grid",["series","range"]).setAll({visible:!1});c("AxisTick",["series","range"]).setAll({visible:!1});c("AxisLabel",["series","range"]).setAll({visible:!1});d=c("AxisTick");d.setAll({location:.5,multiLocation:0,strokeOpacity:1,isMeasured:!1,position:"absolute",visible:!1});A.setColor(d,"stroke",a,"grid");c("CategoryAxis").setAll({startLocation:0,endLocation:1,fillRule:(g,k)=>{(g=g.get("axisFill"))&&(f.isNumber(k)&&0!=k%2? g.setPrivate("visible",!1):g.setPrivate("visible",!0))}});d=[{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}];const e={millisecond:b.translate("_date_millisecond"),second:b.translate("_date_second"),minute:b.translate("_date_minute"),hour:b.translate("_date_hour"),day:b.translate("_date_day"),week:b.translate("_date_day"),month:b.translate("_date_month"),year:b.translate("_date_year")}, h={millisecond:b.translate("_date_millisecond"),second:b.translate("_date_second"),minute:b.translate("_date_minute"),hour:b.translate("_date_day"),day:b.translate("_date_day"),week:b.translate("_date_day"),month:b.translate("_date_month")+" "+b.translate("_date_year"),year:b.translate("_date_year")};b={millisecond:b.translate("_date_millisecond_full"),second:b.translate("_date_second_full"),minute:b.translate("_date_minute_full"),hour:b.translate("_date_hour_full"),day:b.translate("_date_day_full"), week:b.translate("_date_week_full"),month:b.translate("_date_month_full"),year:b.translate("_date_year")};c("CategoryDateAxis").setAll({markUnitChange:!0,gridIntervals:f.copy$1(d),dateFormats:f.copy(e),periodChangeDateFormats:f.copy(h)});c("DateAxis").setAll({maxZoomFactor:null,strictMinMax:!0,startLocation:0,endLocation:1,markUnitChange:!0,groupData:!1,groupCount:500,gridIntervals:f.copy$1(d),dateFormats:f.copy(e),periodChangeDateFormats:f.copy(h),tooltipDateFormats:b,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:g=>{const k=g.get("axisFill");if(k){var l=g.component,p=g.get("value");g=g.get("endValue");const m=l.intervalDuration();var n=l.getPrivate("baseInterval");n=l.getPrivate("gridInterval", n);l=l.getPrivate("min",0);l=y.round(new Date(l),n.timeUnit,n.count,this._root.locale.firstDayOfWeek,this._root.utc,void 0,this._root.timezone).getTime();null!=p&&null!=g&&(p=Math.round(Math.round((p-l)/m))/2,p==Math.round(p)?k.setPrivate("visible",!0):k.setPrivate("visible",!1))}}});c("GaplessDateAxis").setAll({fillRule:g=>{const k=g.get("axisFill");if(k){g=g.get("index");let l=!1;f.isNumber(g)&&0!=g%2||(l=!0);k.setPrivate("visible",l)}}});c("ValueAxis").setAll({baseValue:0,logarithmic:!1,strictMinMax:!1, autoZoom:!0,fillRule:g=>{const k=g.get("axisFill");if(k){var l=g.component;g=g.get("value");l=l.getPrivate("step");f.isNumber(g)&&f.isNumber(l)&&(f.round(g/l/2,5)==Math.round(g/l/2)?k.setPrivate("visible",!1):k.setPrivate("visible",!0))}}});c("DurationAxis").setAll({baseUnit:"second"});c("XYSeries").setAll({maskBullets:!0,stackToNegative:!0,locationX:.5,locationY:.5,snapTooltip:!1,openValueXGrouped:"open",openValueYGrouped:"open",valueXGrouped:"close",valueYGrouped:"close",seriesTooltipTarget:"series"}); c("BaseColumnSeries").setAll({adjustBulletPosition:!0});c("ColumnSeries").setAll({clustered:!0});c("RoundedRectangle",["series","column"]).setAll({position:"absolute",isMeasured:!1,width:f.percent(70),height:f.percent(70),strokeWidth:1,strokeOpacity:1,cornerRadiusBL:0,cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusTR:0,fillOpacity:1,role:"figure"});c("LineSeries").setAll({connect:!0,autoGapCount:1.1,stackToNegative:!1});c("Graphics",["series","stroke"]).setAll({position:"absolute",strokeWidth:1,strokeOpacity:1, isMeasured:!1});c("Graphics",["series","fill"]).setAll({visible:!1,fillOpacity:0,position:"absolute",strokeWidth:0,strokeOpacity:0,isMeasured:!1});c("Graphics",["line","series","legend","marker","stroke"]).setAll({draw:(g,k)=>{var l=k.parent;l&&(k=l.height(),l=l.width(),g.moveTo(0,k/2),g.lineTo(l,k/2))}});b=c("Graphics",["line","series","legend","marker","stroke"]).states.create("disabled",{});A.setColor(b,"stroke",a,"disabled");c("Graphics",["line","series","legend","marker","fill"]).setAll({draw:(g, k)=>{var l=k.parent;l&&(k=l.height(),l=l.width(),g.moveTo(0,0),g.lineTo(l,0),g.lineTo(l,k),g.lineTo(0,k),g.lineTo(0,0))}});b=c("Graphics",["line","series","legend","marker","fill"]).states.create("disabled",{});A.setColor(b,"stroke",a,"disabled");c("SmoothedXYLineSeries").setAll({tension:.5});c("SmoothedXLineSeries").setAll({tension:.5});c("SmoothedYLineSeries").setAll({tension:.5});c("Candlestick").setAll({position:"absolute",isMeasured:!1,width:f.percent(50),height:f.percent(50),strokeWidth:1,strokeOpacity:1, cornerRadiusBL:0,cornerRadiusTL:0,cornerRadiusBR:0,cornerRadiusTR:0,fillOpacity:1,role:"figure"});c("OHLC").setAll({width:f.percent(80),height:f.percent(80)});c("CandlestickSeries").setAll({lowValueXGrouped:"low",lowValueYGrouped:"low",highValueXGrouped:"high",highValueYGrouped:"high",openValueXGrouped:"open",openValueYGrouped:"open",valueXGrouped:"close",valueYGrouped:"close"});b=c("Rectangle",["column","autocolor"]).states.create("riseFromOpen",{});A.setColor(b,"fill",a,"positive");A.setColor(b, "stroke",a,"positive");b=c("Rectangle",["column","autocolor"]).states.create("dropFromOpen",{});A.setColor(b,"fill",a,"negative");A.setColor(b,"stroke",a,"negative");c("Rectangle",["column","autocolor","pro"]).states.create("riseFromOpen",{fillOpacity:0});c("Rectangle",["column","autocolor","pro"]).states.create("dropFromOpen",{fillOpacity:1});b=c("Rectangle",["column","autocolor","pro"]).states.create("riseFromPrevious",{});A.setColor(b,"fill",a,"positive");A.setColor(b,"stroke",a,"positive");b= c("Rectangle",["column","autocolor","pro"]).states.create("dropFromPrevious",{});A.setColor(b,"fill",a,"negative");A.setColor(b,"stroke",a,"negative");c("RoundedRectangle",["rangegrip"]).setAll({strokeOpacity:0,fillOpacity:0,strokeWidth:1,width:12,height:12});b=c("Graphics",["rangegrip","button","icon"]);b.setAll({interactive:!1,crisp:!0,strokeOpacity:.5,draw:g=>{g.moveTo(0,.5);g.lineTo(0,12.5);g.moveTo(2,.5);g.lineTo(2,12.5);g.moveTo(4,.5);g.lineTo(4,12.5)}});A.setColor(b,"stroke",a,"secondaryButtonText"); c("Button",["rangegrip"]).setAll({draggable:!0,paddingTop:0,paddingBottom:0});c("Button",["rangegrip","vertical"]).setAll({rotation:90,cursorOverStyle:"ns-resize",centerX:f.p50});c("Button",["rangegrip","horizontal"]).setAll({cursorOverStyle:"ew-resize",centerX:f.p50});c("Button",["rangegrip","vertical","left"]).setAll({centerY:f.p100});c("Button",["rangegrip","vertical","right"]).setAll({centerY:0});c("Button",["rangegrip","horizontal","top"]).setAll({centerY:0});c("Button",["rangegrip","horizontal", "bottom"]).setAll({centerY:f.p100})}}class O extends y.SerialChart{constructor(){super(...arguments);Object.defineProperty(this,"xAxes",{enumerable:!0,configurable:!0,writable:!0,value:new f.ListAutoDispose});Object.defineProperty(this,"yAxes",{enumerable:!0,configurable:!0,writable:!0,value:new f.ListAutoDispose});Object.defineProperty(this,"topAxesContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.chartContainer.children.push(f.Container.new(this._root,{width:f.p100,layout:this._root.verticalLayout}))}); Object.defineProperty(this,"yAxesAndPlotContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.chartContainer.children.push(f.Container.new(this._root,{width:f.p100,height:f.p100,layout:this._root.horizontalLayout}))});Object.defineProperty(this,"bottomAxesContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.chartContainer.children.push(f.Container.new(this._root,{width:f.p100,layout:this._root.verticalLayout}))});Object.defineProperty(this,"leftAxesContainer",{enumerable:!0, configurable:!0,writable:!0,value:this.yAxesAndPlotContainer.children.push(f.Container.new(this._root,{height:f.p100,layout:this._root.horizontalLayout}))});Object.defineProperty(this,"plotsContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.yAxesAndPlotContainer.children.push(f.Container.new(this._root,{width:f.p100,height:f.p100,maskContent:!1}))});Object.defineProperty(this,"plotContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.plotsContainer.children.push(f.Container.new(this._root, {width:f.p100,height:f.p100}))});Object.defineProperty(this,"topPlotContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.plotsContainer.children.push(f.Container.new(this._root,{width:f.p100,height:f.p100}))});Object.defineProperty(this,"gridContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.plotContainer.children.push(f.Container.new(this._root,{width:f.p100,height:f.p100,isMeasured:!1}))});Object.defineProperty(this,"topGridContainer",{enumerable:!0,configurable:!0,writable:!0, value:f.Container.new(this._root,{width:f.p100,height:f.p100,isMeasured:!1})});Object.defineProperty(this,"rightAxesContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.yAxesAndPlotContainer.children.push(f.Container.new(this._root,{height:f.p100,layout:this._root.horizontalLayout}))});Object.defineProperty(this,"axisHeadersContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.plotContainer.children.push(f.Container.new(this._root,{}))});Object.defineProperty(this,"zoomOutButton", {enumerable:!0,configurable:!0,writable:!0,value:this.topPlotContainer.children.push(na.Button.new(this._root,{themeTags:["zoom"],icon:f.Graphics.new(this._root,{themeTags:["button","icon"]})}))});Object.defineProperty(this,"_movePoint",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0}});Object.defineProperty(this,"_wheelDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_otherCharts",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this, "_movePoints",{enumerable:!0,configurable:!0,writable:!0,value:{}});Object.defineProperty(this,"_downStartX",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_downEndX",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_downStartY",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_downEndY",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_afterNew(){this._defaultThemes.push(pa.new(this._root)); super._afterNew();this._disposers.push(this.xAxes);this._disposers.push(this.yAxes);const a=this._root;var b=this._root.verticalLayout;const c=this.zoomOutButton;c.events.on("click",()=>{this.zoomOut()});c.hide(0);c.states.lookup("default").set("opacity",1);this.chartContainer.set("layout",b);b=this.plotContainer;b.children.push(this.seriesContainer);this._disposers.push(this._processAxis(this.xAxes,this.bottomAxesContainer));this._disposers.push(this._processAxis(this.yAxes,this.leftAxesContainer)); b.children.push(this.topGridContainer);b.children.push(this.bulletsContainer);b.set("interactive",!0);b.set("interactiveChildren",!1);b.set("background",f.Rectangle.new(a,{themeTags:["plotbackground","xy","background"]}));this._disposers.push(b.events.on("pointerdown",d=>{this._handlePlotDown(d)}));this._disposers.push(b.events.on("globalpointerup",d=>{this._handlePlotUp(d)}));this._disposers.push(b.events.on("globalpointermove",d=>{this._handlePlotMove(d)}));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")?!0:!1)}_maskGrid(){this.gridContainer.set("maskContent",!0);this.topGridContainer.set("maskContent",!0)}_removeSeries(a){a._unstack();a._posXDp&&a._posXDp.dispose();a._posYDp&&a._posYDp.dispose();a.set("baseAxis", void 0);var b=a.get("xAxis");b&&(f.remove(b.series,a),b.markDirtyExtremes());if(b=a.get("yAxis"))f.remove(b.series,a),b.markDirtyExtremes();(b=this.get("cursor"))&&(b=b.get("snapToSeries"))&&f.remove(b,a);super._removeSeries(a)}handleWheel(a){const b=this.get("wheelX"),c=this.get("wheelY"),d=this.plotContainer,e=a.originalEvent;if(f.isLocalEvent(e,this)){e.preventDefault();var h=d.toLocal(a.point),g=this.get("wheelStep",.2),k=e.deltaY/100,l=e.deltaX/100,p=this.get("wheelZoomPositionX"),n=this.get("wheelZoomPositionY"); "zoomX"!==b&&"zoomXY"!==b||0==l||this.xAxes.each(m=>{if(m.get("zoomX")){var q=m.get("start");let t=m.get("end"),r=m.fixPosition(h.x/d.width());null!=p&&(r=p);let u=q-g*(t-q)*l*r;q=t+g*(t-q)*l*(1-r);1/(q-u){if(m.get("zoomX")){var q=m.get("start");let t=m.get("end"),r=m.fixPosition(h.x/d.width());null!=p&&(r=p);let u=q-g*(t-q)*k*r;q=t+g*(t-q)* k*(1-r);1/(q-u){if(m.get("zoomY")){var q=m.get("start");let t=m.get("end"),r=m.fixPosition(h.y/d.height());null!=n&&(r=n);let u=q-g*(t-q)*l*r;q=t+g*(t-q)*l*(1-r);1/(q-u){if(m.get("zoomY")){var q= m.get("start");let t=m.get("end"),r=m.fixPosition(h.y/d.height());null!=n&&(r=n);let u=q-g*(t-q)*k*r;q=t+g*(t-q)*k*(1-r);1/(q-u){if(m.get("panX")){var q=m.get("start");let t=m.get("end"),r=this._getWheelSign(m)*g*(t-q)*l;q=this._fixWheel(q+r,t+r);this._handleWheelAnimation(m.zoom(q[0],q[1]))}});"panX"!==c&&"panXY"!==c||0==k||this.xAxes.each(m=> {if(m.get("panX")){var q=m.get("start");let t=m.get("end"),r=this._getWheelSign(m)*g*(t-q)*k;q=this._fixWheel(q+r,t+r);this._handleWheelAnimation(m.zoom(q[0],q[1]))}});"panY"!==b&&"panXY"!==b||0==l||this.yAxes.each(m=>{if(m.get("panY")){var q=m.get("start");let t=m.get("end"),r=this._getWheelSign(m)*g*(t-q)*l;q=this._fixWheel(q+r,t+r);this._handleWheelAnimation(m.zoom(q[0],q[1]))}});"panY"!==c&&"panXY"!==c||0==k||this.yAxes.each(m=>{if(m.get("panY")){var q=m.get("start");let t=m.get("end"),r=this._getWheelSign(m)* g*(t-q)*k;q=this._fixWheel(q-r,t-r);this._handleWheelAnimation(m.zoom(q[0],q[1]))}})}}_handleSetWheel(){const a=this.get("wheelX"),b=this.get("wheelY"),c=this.plotContainer;"none"!==a||"none"!==b?(this._wheelDp=c.events.on("wheel",d=>{const e=d.originalEvent;("none"!==a&&0!=Math.abs(e.deltaX)||"none"!==b&&0!=Math.abs(e.deltaY))&&this.handleWheel(d)}),this._disposers.push(this._wheelDp)):this._wheelDp&&this._wheelDp.dispose()}_getWheelSign(a){let b=1;a.get("renderer").get("inversed")&&(b=-1);return b}_fixWheel(a, b){const c=b-a;0>a&&(a=0,b=a+c);1{e._panStart=e.get("start");e._panEnd=e.get("end")}),c&&this.yAxes.each(e=>{e._panStart=e.get("start");e._panEnd=e.get("end")}),this.events.isEnabled("panstarted")&&this.events.dispatch("panstarted",{type:"panstarted",target:this,originalEvent:a.originalEvent}))}}_handleWheelAnimation(a){if(a)a.events.on("stopped",()=>{this._dispatchWheelAnimation()}); else this._dispatchWheelAnimation()}_dispatchWheelAnimation(){this.events.isEnabled("wheelended")&&this.events.dispatch("wheelended",{type:"wheelended",target:this})}_handlePlotUp(a){const b=this._downPoint;b&&(this.get("panX")||this.get("panY"))&&(a.originalEvent.clientX==b.x&&a.originalEvent.clientY==b.y&&this.events.isEnabled("pancancelled")&&this.events.dispatch("pancancelled",{type:"pancancelled",target:this,originalEvent:a.originalEvent}),this.events.isEnabled("panended")&&this.events.dispatch("panended", {type:"panended",target:this,originalEvent:a.originalEvent}));this._downPoint=void 0;this.xAxes.each(c=>{c._isPanning=!1});this.yAxes.each(c=>{c._isPanning=!1})}_handlePlotMove(a){const b=this.plotContainer;if(this.get("pinchZoomX")||this.get("pinchZoomY")){var c=a.originalEvent.pointerId;if(c&&(this._movePoints[c]=a.point,1{if(h.get("panX")){h._isPanning=!0;var g=h._panStart,k=h._panEnd;let l=(k-g)*(d.x-e.x)/b.width();h.get("renderer").get("inversed")&&(l*=-1);g+=l;k+=l;k-g<1+2*h.get("maxDeviation",1)&&(h.set("start",g),h.set("end",k))}}),c&&c.events.enableType("rangechanged"));a&&((a=this.get("scrollbarY"))&&a.events.disableType("rangechanged"),this.yAxes.each(h=>{if(h.get("panY")){h._isPanning=!0;var g=h._panStart, k=h._panEnd;let l=(k-g)*(d.y-e.y)/b.height();h.get("renderer").get("inversed")&&(l*=-1);g-=l;k-=l;k-g<1+2*h.get("maxDeviation",1)&&(h.set("start",g),h.set("end",k))}}),a&&a.events.enableType("rangechanged"))}}_handlePinch(){var a=this.plotContainer;let b=0,c=[],d=[];f.each$1(a._downPoints,(m,q)=>{c[b]=q;(m=this._movePoints[m])&&(d[b]=m);b++});if(1k.x&&([g,k]=[k,g],[l,p]=[p,l]);let m=a+g.x/e*(n-a),q=a+k.x/e*(n-a),t=a+l.x/e*(n-a);e=a+p.x/e*(n-a);let r=Math.max(.001,q-m)/Math.max(.001,e-t),u=a*r+m-t*r,v=n*r+q-e*r;this.xAxes.each(w=>{let x=w.fixPosition(u),z=w.fixPosition(v);w.zoom(x,z,0)})}}if(this.get("pinchZoomY")&&(a=this._downStartY,n=this._downEndY,null!=a&&null!=n)){g.y{let r=t.fixPosition(m),u=t.fixPosition(q);t.zoom(r,u,0)})}}}}_handleCursorPosition(){const a=this.get("cursor");if(a){const c=a.getPrivate("point");var b=a.get("snapToSeries");a._downPoint&&(b=void 0);if(b&&c){const d=a.get("snapToSeriesBy"),e=[];f.each(b,k=>{if(!k.isHidden()&&!k.isHiding())if("x!"!=d&&"y!"!=d){var l=k.startIndex();const p=k.endIndex();for(;l{const l=k.get("point");if(l){let p=0;p="x"==d||"x!"==d?Math.abs(c.x-l.x):"y"==d||"y!"==d?Math.abs(c.y-l.y):Math.hypot(c.x-l.x,c.y-l.y);p{(k=k.get("tooltip"))&&k._setDataItem(void 0)});if(g){b=g.component;b.showDataItemTooltip(g);b.setRaw("tooltipDataItem",g);const k=g.get("point");k&&a.handleMove(b.toGlobal({x:k.x-b.x(),y:k.y-b.y()}),!0)}}}}_updateCursor(){let a=this.get("cursor"); a&&a.updateCursor()}_addCursor(a){this.plotContainer.children.push(a)}_prepareChildren(){super._prepareChildren();this.series.each(c=>{this._colorize(c)});(this.isDirty("wheelX")||this.isDirty("wheelY"))&&this._handleSetWheel();if(this.isDirty("cursor")){var a=this._prevSettings.cursor,b=this.get("cursor");b!==a&&(this._disposeProperty("cursor"),a&&a.dispose(),b&&(b._setChart(this),this._addCursor(b),this._pushPropertyDisposer("cursor",b.events.on("selectended",()=>{this._handleCursorSelectEnd()}))), this._prevSettings.cursor=b)}this.isDirty("scrollbarX")&&(a=this._prevSettings.scrollbarX,b=this.get("scrollbarX"),b!==a&&(this._disposeProperty("scrollbarX"),a&&a.dispose(),b&&(b.parent||this.topAxesContainer.children.push(b),this._pushPropertyDisposer("scrollbarX",b.events.on("rangechanged",c=>{this._handleScrollbar(this.xAxes,c.start,c.end,c.grip)})),this._pushPropertyDisposer("scrollbarX",b.events.on("released",()=>{this.xAxes.each(c=>{c.get("zoomable")&&this._handleAxisSelection(c)})})),b.setPrivate("positionTextFunction", c=>{const d=this.xAxes.getIndex(0);return d?d.getTooltipText(c,!1)||"":""})),this._prevSettings.scrollbarX=b));this.isDirty("scrollbarY")&&(a=this._prevSettings.scrollbarY,b=this.get("scrollbarY"),b!==a&&(this._disposeProperty("scrollbarY"),a&&a.dispose(),b&&(b.parent||this.rightAxesContainer.children.push(b),this._pushPropertyDisposer("scrollbarY",b.events.on("rangechanged",c=>{this._handleScrollbar(this.yAxes,c.start,c.end,c.grip)})),this._pushPropertyDisposer("scrollbarY",b.events.on("released", ()=>{this.yAxes.each(c=>{c.get("zoomable")&&this._handleAxisSelection(c)})})),b.setPrivate("positionTextFunction",c=>{const d=this.yAxes.getIndex(0);return d?d.getTooltipText(c,!1)||"":""})),this._prevSettings.scrollbarY=b));this._handleZoomOut()}_processSeries(a){super._processSeries(a);const b=a.get("xAxis"),c=a.get("yAxis");f.move(b.series,a);f.move(c.series,a);a._posXDp=a.addDisposer(b.events.on("positionchanged",()=>{a._fixPosition()}));a._posXDp=a.addDisposer(c.events.on("positionchanged",()=> {a._fixPosition()}));a.get("baseAxis")||(c.isType("CategoryAxis")||c.isType("DateAxis")?a.set("baseAxis",c):a.set("baseAxis",b));a.get("stacked")&&(a._markDirtyKey("stacked"),f.each(a.dataItems,d=>{d.set("stackToItemY",void 0);d.set("stackToItemX",void 0)}));a._markDirtyAxes();c.markDirtyExtremes();b.markDirtyExtremes();b._seriesAdded=!0;c._seriesAdded=!0;this._colorize(a)}_colorize(a){var b=this.get("colors");b&&null==a.get("fill")&&(b=b.next(),a._setSoft("stroke",b),a._setSoft("fill",b))}_handleCursorSelectEnd(){const a= this.get("cursor"),b=a.get("behavior"),c=a.getPrivate("downPositionX",0),d=a.getPrivate("downPositionY",0),e=Math.min(1,Math.max(0,a.getPrivate("positionX",.5))),h=Math.min(1,Math.max(0,a.getPrivate("positionY",.5)));this.xAxes.each(g=>{if("zoomX"===b||"zoomXY"===b){let k=g.toAxisPosition(c),l=g.toAxisPosition(e);g.zoom(k,l)}g.setPrivate("updateScrollbar",!0)});this.yAxes.each(g=>{if("zoomY"===b||"zoomXY"===b){let k=g.toAxisPosition(d),l=g.toAxisPosition(h);g.zoom(k,l)}g.setPrivate("updateScrollbar", !0)})}_handleScrollbar(a,b,c,d){a.each(e=>{var h=e.fixPosition(b);let g=e.fixPosition(c);h=e.zoom(h,g,void 0,d);e.setPrivateRaw("updateScrollbar",!1);if(h)h.events.on("stopped",()=>{e.setPrivateRaw("updateScrollbar",!0)});else e.setPrivateRaw("updateScrollbar",!0)})}_processAxis(a,b){return a.events.onAll(c=>{if("clear"===c.type)f.each(c.oldValues,d=>{this._removeAxis(d)});else if("push"===c.type)b.children.push(c.newValue),c.newValue.processChart(this);else if("setIndex"===c.type)b.children.setIndex(c.index, c.newValue),c.newValue.processChart(this);else if("insertIndex"===c.type)b.children.insertIndex(c.index,c.newValue),c.newValue.processChart(this);else if("removeIndex"===c.type)this._removeAxis(c.oldValue);else if("moveIndex"===c.type)b.children.moveValue(c.value,c.newIndex),c.value.processChart(this);else throw Error("Unknown IListEvent type");})}_removeAxis(a){if(!a.isDisposed()){var b=a.parent;b&&b.children.removeValue(a);b=a.gridContainer;const c=b.parent;c&&c.children.removeValue(b);a=a.topGridContainer; (b=a.parent)&&b.children.removeValue(a)}}_updateChartLayout(){const a=this.leftAxesContainer.width(),b=this.rightAxesContainer.width();var c=this.bottomAxesContainer;c.set("paddingLeft",a);c.set("paddingRight",b);c=this.topAxesContainer;c.set("paddingLeft",a);c.set("paddingRight",b)}processAxis(a){this.get("cursor")&&(this.addDisposer(a.on("start",()=>{this._updateCursor()})),this.addDisposer(a.on("end",()=>{this._updateCursor()})))}_handleAxisSelection(a,b){let c=a.fixPosition(a.get("start",0)), d=a.fixPosition(a.get("end",1));c>d&&([c,d]=[d,c]);if(-1!=this.xAxes.indexOf(a)){if(b||a.getPrivate("updateScrollbar"))!(a=this.get("scrollbarX"))||a.getPrivate("isBusy")&&!b||(a.setRaw("start",c),a.setRaw("end",d),a.updateGrips())}else-1!=this.yAxes.indexOf(a)&&(b||a.getPrivate("updateScrollbar"))&&(!(a=this.get("scrollbarY"))||a.getPrivate("isBusy")&&!b||(a.setRaw("start",c),a.setRaw("end",d),a.updateGrips()));this._handleZoomOut()}_handleZoomOut(){let a=this.zoomOutButton;if(a&&a.parent){let b= !1;this.xAxes.each(c=>{if(0!=c.get("start")||1!=c.get("end"))b=!0});this.yAxes.each(c=>{if(0!=c.get("start")||1!=c.get("end"))b=!0});b?a.isHidden()&&a.show():a.hide()}}inPlot(a){var b=this.plotContainer;const c=this.getPrivate("otherCharts",this._otherCharts),d=b.toGlobal(a);if(-.5<=a.x&&-.5<=a.y&&a.x<=b.width()+.5&&a.y<=b.height()+.5)return!0;if(c)for(a=c.length-1;0<=a;a--){var e=c[a];if(e!=this){b=e.plotContainer;const h=this._root.rootPointToDocument(d);e=e._root.documentPointToRoot(h);e=b.toLocal(e); if(-.1<=e.x&&-.1<=e.y&&e.x<=b.width()+.1&&e.y<=b.height()+.1)return!0}}return!1}arrangeTooltips(){const a=this.plotContainer,b=a.width(),c=a.height(),d=this.height();let e=a._display.toGlobal({x:0,y:0}),h=a._display.toGlobal({x:b,y:c});const g=[];let k=0,l=Infinity,p=this._movePoint,n=this.get("maxTooltipDistance"),m=this.get("maxTooltipDistanceBy","xy"),q,t;f.isNumber(n)&&this.series.each(u=>{if(!u.isHidden()){var v=u.get("tooltip");if(v&&(v=v.get("pointTo"))){let w=Math.hypot(p.x-v.x,p.y-v.y);"x"== m?w=Math.abs(p.x-v.x):"y"==m&&(w=Math.abs(p.y-v.y));w{const v=u.get("tooltip");if(v&&!v.get("forceHidden")){let w=!1,x=v.get("pointTo");if(x){if(0<=n){let z=v.get("pointTo");if(z&&t&&u!=q){let B=Math.hypot(t.x-z.x,t.y-z.y);"x"==m?B=Math.abs(t.x-z.x):"y"==m&&(B=Math.abs(t.y-z.y));B>n&&(w=!0)}}else-1==n&&u!=q&&(w=!0);this.inPlot(this._tooltipToLocal(x))&&v.dataItem?w||(k+=x.y):w=!0;w||u.isHidden()||u.isHiding()?v.hide(0):(v.show(),g.push(v),r.push(u))}}}); this.setPrivate("tooltipSeries",r);if(this.get("arrangeTooltips")){const u=this._root.tooltipContainer;if(k/g.length>c/2+e.y){g.sort((w,x)=>f.compareNumber(x.get("pointTo").y,w.get("pointTo").y));let v=h.y;f.each(g,w=>{let x=w.height(),z=w.get("centerY");z instanceof f.Percent&&(x*=z.value);x+=w.get("marginBottom",0);w.set("bounds",{left:e.x,top:e.y,right:h.x,bottom:v});w.setPrivate("customData",{left:e.x,top:e.y,right:h.x,bottom:v});v=Math.min(v-x,w._fy-x);w.parent==u&&u.children.moveValue(w,0)}); if(0>v){g.reverse();let w=v;f.each(g,x=>{let z=x.get("bounds");if(z){let B=z.top-v,D=z.bottom-v;Bf.compareNumber(w.get("pointTo").y,x.get("pointTo").y));let v=0;f.each(g,w=>{let x=w.height(),z=w.get("centerY");z instanceof f.Percent&&(x*=z.value);x+=w.get("marginBottom",0);w.set("bounds",{left:e.x,top:v,right:h.x,bottom:Math.max(e.y+d,v+x)});w.parent== u&&u.children.moveValue(w,0);v=Math.max(v+x,w._fy+x)});if(v>d){g.reverse();let w=d;f.each(g,x=>{let z=x.get("bounds");if(z){let B=z.top-(d-v),D=z.bottom-(d-v);D>w&&(D=w,B=D-x.height());x.set("bounds",{left:z.left,top:B,right:z.right,bottom:D});w=D-x.height()-x.get("marginBottom",0)}})}}}}_tooltipToLocal(a){return this.plotContainer.toLocal(a)}zoomOut(){this.xAxes.each(a=>{a.setPrivate("updateScrollbar",!0);a.zoom(0,1)});this.yAxes.each(a=>{a.setPrivate("updateScrollbar",!0);a.zoom(0,1)})}_dispose(){super._dispose(); const a=this.get("cursor");a&&a.dispose()}}Object.defineProperty(O,"className",{enumerable:!0,configurable:!0,writable:!0,value:"XYChart"});Object.defineProperty(O,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:y.SerialChart.classNames.concat([O.className])});class J extends f.Graphics{_beforeChanged(){super._beforeChanged();if(this.isPrivateDirty("width")||this.isPrivateDirty("height"))this._clear=!0}}Object.defineProperty(J,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Grid"}); Object.defineProperty(J,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:f.Graphics.classNames.concat([J.className])});class P extends f.Container{constructor(){super(...arguments);Object.defineProperty(this,"_alwaysShow",{enumerable:!0,configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"lineX",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(J.new(this._root,{themeTags:["x"]}))});Object.defineProperty(this,"lineY",{enumerable:!0,configurable:!0,writable:!0, value:this.children.push(J.new(this._root,{themeTags:["y"]}))});Object.defineProperty(this,"selection",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(f.Graphics.new(this._root,{themeTags:["selection","cursor"],layer:30}))});Object.defineProperty(this,"_movePoint",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_lastPoint",{enumerable:!0,configurable:!0,writable:!0,value:{x:0,y:0}});Object.defineProperty(this,"_lastPoint2",{enumerable:!0,configurable:!0, writable:!0,value:{x:0,y:0}});Object.defineProperty(this,"_tooltipX",{enumerable:!0,configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"_tooltipY",{enumerable:!0,configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"chart",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_toX",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_toY",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}_afterNew(){this._settings.themeTags= f.mergeTags(this._settings.themeTags,["xy","cursor"]);super._afterNew();this.setAll({width:f.p100,height:f.p100,isMeasured:!0,position:"absolute"});this.states.create("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()));f.supports("keyboardevents")&&this._disposers.push(f.addEventListener(document,"keydown",a=>{this._handleLineMove(f.getEventKey(a),a.ctrlKey)}))}_setUpTouch(){const a=this.chart;a&&(a.plotContainer._display.cancelTouch= "none"!=this.get("behavior")?!0:!1)}_handleXLine(){let a=this.lineX.x(),b=!0;if(0>a||a>this.width())b=!1;this.lineX.setPrivate("visible",b)}_handleYLine(){let a=this.lineY.y(),b=!0;if(0>a||a>this.height())b=!1;this.lineY.setPrivate("visible",b)}_handleLineMove(a,b){let c="";var d=this.chart;let e;if(d&&d.xAxes.length&&(this._root.focused(this.lineX)?(c="positionX",e=d.xAxes.getIndex(0)):this._root.focused(this.lineY)&&(e=d.yAxes.getIndex(0),c="positionY"),d=1,b&&(d=5),e)){b=e.get("renderer").get("inversed", !1);let h;"ArrowRight"==a||"ArrowDown"==a?h=1:"ArrowLeft"==a||"ArrowUp"==a?h=-1:"Tab"==a&&(h=0);null!=h&&(b&&(h*=-1),this.set(c,e.nextPosition(h*d)))}}_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(){super._prepareChildren(); if(this.isDirty("xAxis")){this._tooltipX=!1;var a=this.get("xAxis");if(a){const b=a.get("tooltip");b&&(this._tooltipX=!0,this._disposers.push(b.on("pointTo",()=>{this._updateXLine(b)})))}}if(this.isDirty("yAxis")&&(this._tooltipY=!1,a=this.get("yAxis"))){const b=a.get("tooltip");b&&(this._tooltipY=!0,this._disposers.push(b.on("pointTo",()=>{this._updateYLine(b)})))}}_handleSyncWith(){const a=this.chart;if(a){const b=this.get("syncWith"),c=[];b&&f.each(b,d=>{(d=d.chart)&&c.push(d)});a._otherCharts= c}}_updateChildren(){super._updateChildren();this._handleSyncWith();if(this.isDirty("positionX")||this.isDirty("positionY")){const a=this.get("positionX"),b=this.get("positionY");null==a&&null==b?this.hide(0):(this._movePoint=this.toGlobal(this._getPoint(this.get("positionX",0),this.get("positionY",0))),this.handleMove())}}_updateXLine(a){let b=f.round(this._display.toLocal(a.get("pointTo",{x:0,y:0})).x,3);this._toX!=b&&(this.lineX.animate({key:"x",to:b,duration:a.get("animationDuration",0),easing:a.get("animationEasing")}), this._toX=b)}_updateYLine(a){let b=f.round(this._display.toLocal(a.get("pointTo",{x:0,y:0})).y,3);this._toY!=b&&(this.lineY.animate({key:"y",to:b,duration:a.get("animationDuration",0),easing:a.get("animationEasing")}),this._toY=b)}_drawLines(){this.lineX.set("draw",a=>{a.moveTo(0,0);a.lineTo(0,this.height())});this.lineY.set("draw",a=>{a.moveTo(0,0);a.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(a){this.chart=a;this._handleSyncWith();const b=a.plotContainer;this.events.on("boundschanged",()=>{this._disposers.push(this.setTimeout(()=>{this.updateCursor()},50))});f.supports("touchevents")&&(this._disposers.push(b.events.on("click",c=>{f.isTouchEvent(c.originalEvent)&&this._handleMove(c)})),this._setUpTouch());this._disposers.push(b.events.on("pointerdown",c=>{this._handleCursorDown(c)}));this._disposers.push(b.events.on("globalpointerup",c=>{this._handleCursorUp(c); c.native||this.isHidden()||this._handleMove(c)}));this._disposers.push(b.events.on("globalpointermove",c=>{if(this.get("syncWith")||0!=f.keys(b._downPoints).length||c.native||!this.isHidden())this._handleMove(c),1{});c&&this._inPlot(b)&&(this._downPoint=b,"none"!=this.get("behavior")&&(this.selection.show(),this.events.isEnabled("selectstarted")&&this.events.dispatch("selectstarted",{type:"selectstarted",target:this,originalEvent:a.originalEvent})),a=this._getPosition(b).x,b=this._getPosition(b).y,this.setPrivate("downPositionX",a),this.setPrivate("downPositionY",b))}}_handleCursorUp(a){if(this._downPoint){const b=this.get("behavior", "none");if("none"!=b){"z"===b.charAt(0)&&this.selection.hide();let c=this._display.toLocal(a.point);const d=this._downPoint,e=this.get("moveThreshold",1);if(c&&d){let h=!1;("zoomX"===b||"zoomXY"===b||"selectX"===b||"selectXY"===b)&&Math.abs(c.x-d.x)>e&&(h=!0);("zoomY"===b||"zoomXY"===b||"selectY"===b||"selectXY"===b)&&Math.abs(c.y-d.y)>e&&(h=!0);h?this.events.isEnabled("selectended")&&this.events.dispatch("selectended",{type:"selectended",target:this,originalEvent:a.originalEvent}):this.events.isEnabled("selectcancelled")&& this.events.dispatch("selectcancelled",{type:"selectcancelled",target:this,originalEvent:a.originalEvent})}}}this._downPoint=void 0}_handleMove(a){if(this.getPrivate("visible")){var b=this.chart;if(b&&1{}));var g=e.x,k=e.y;g=this._getPosition(e);this.setPrivate("point",e);let l=this.get("snapToSeries");this._downPoint&&(l=void 0);k=this.get("positionX");let p=g.x;f.isNumber(k)&& (p=k);k=this.get("positionY");let n=g.y;f.isNumber(k)&&(n=k);this.setPrivate("positionX",p);this.setPrivate("positionY",n);k=this._getPoint(p,n);g=k.x;k=k.y;h.xAxes.each(m=>{m._handleCursorPosition(p,l);d&&m.handleCursorShow()});h.yAxes.each(m=>{m._handleCursorPosition(n,l);d&&m.handleCursorShow()});b||(h._handleCursorPosition(),this.events.isEnabled("cursormoved")&&this.events.dispatch("cursormoved",{type:"cursormoved",target:this,point:a,originalEvent:c}));this._updateLines(g,k);h.arrangeTooltips()}else this._downPoint|| d||(this.hide(0),this.events.isEnabled("cursorhidden")&&this.events.dispatch("cursorhidden",{type:"cursorhidden",target:this}));this._downPoint&&"none"!=this.get("behavior")&&this._updateSelection(e)}else this.hide(0)}_getPoint(a,b){return{x:this.width()*a,y:this.height()*b}}_updateLines(a,b){this._tooltipX||this.lineX.set("x",a);this._tooltipY||this.lineY.set("y",b);this._drawLines()}_updateSelection(a){const b=this.selection,c=this.get("behavior"),d=this.width(),e=this.height();0>a.x&&(a.x=0);a.x> d&&(a.x=d);0>a.y&&(a.y=0);a.y>e&&(a.y=e);b.set("draw",h=>{const g=this._downPoint;if(g)if("zoomXY"===c||"selectXY"===c)h.moveTo(g.x,g.y),h.lineTo(g.x,a.y),h.lineTo(a.x,a.y),h.lineTo(a.x,g.y),h.lineTo(g.x,g.y);else if("zoomX"===c||"selectX"===c)h.moveTo(g.x,0),h.lineTo(g.x,e),h.lineTo(a.x,e),h.lineTo(a.x,0),h.lineTo(g.x,0);else if("zoomY"===c||"selectY"===c)h.moveTo(0,g.y),h.lineTo(d,g.y),h.lineTo(d,a.y),h.lineTo(0,a.y),h.lineTo(0,g.y)})}_onHide(){if(this.isHidden()){let a=this.chart;a&&(a.xAxes.each(b=> {b.handleCursorHide()}),a.yAxes.each(b=>{b.handleCursorHide()}),a.series.each(b=>{b.handleCursorHide()}))}super._onHide()}_onShow(){if(!this.isHidden()){let a=this.chart;a&&(a.xAxes.each(b=>{b.handleCursorShow()}),a.yAxes.each(b=>{b.handleCursorShow()}))}super._onShow()}_dispose(){super._dispose();this.selection.dispose()}}Object.defineProperty(P,"className",{enumerable:!0,configurable:!0,writable:!0,value:"XYCursor"});Object.defineProperty(P,"classNames",{enumerable:!0,configurable:!0,writable:!0, value:f.Container.classNames.concat([P.className])});class K extends y.Series{constructor(){super(...arguments);Object.defineProperty(this,"_xField",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_yField",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_xOpenField",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_yOpenField",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this, "_xLowField",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_xHighField",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_yLowField",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_yHighField",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_axesDirty",{enumerable:!0,configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"_stackDirty", {enumerable:!0,configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"_selectionProcessed",{enumerable:!0,configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"_dataSets",{enumerable:!0,configurable:!0,writable:!0,value:{}});Object.defineProperty(this,"_mainContainerMask",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_x",{enumerable:!0,configurable:!0,writable:!0,value:0});Object.defineProperty(this,"_y",{enumerable:!0,configurable:!0, writable:!0,value:0});Object.defineProperty(this,"_bullets",{enumerable:!0,configurable:!0,writable:!0,value:{}});Object.defineProperty(this,"mainContainer",{enumerable:!0,configurable:!0,writable:!0,value:this.children.push(f.Container.new(this._root,{}))});Object.defineProperty(this,"axisRanges",{enumerable:!0,configurable:!0,writable:!0,value:new f.List});Object.defineProperty(this,"_skipped",{enumerable:!0,configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"_couldStackTo",{enumerable:!0, configurable:!0,writable:!0,value:[]});Object.defineProperty(this,"_reallyStackedTo",{enumerable:!0,configurable:!0,writable:!0,value:{}});Object.defineProperty(this,"_stackedSeries",{enumerable:!0,configurable:!0,writable:!0,value:{}});Object.defineProperty(this,"_aLocationX0",{enumerable:!0,configurable:!0,writable:!0,value:0});Object.defineProperty(this,"_aLocationX1",{enumerable:!0,configurable:!0,writable:!0,value:1});Object.defineProperty(this,"_aLocationY0",{enumerable:!0,configurable:!0,writable:!0, value:0});Object.defineProperty(this,"_aLocationY1",{enumerable:!0,configurable:!0,writable:!0,value:1});Object.defineProperty(this,"_showBullets",{enumerable:!0,configurable:!0,writable:!0,value:!0});Object.defineProperty(this,"valueXFields",{enumerable:!0,configurable:!0,writable:!0,value:["valueX","openValueX","lowValueX","highValueX"]});Object.defineProperty(this,"valueYFields",{enumerable:!0,configurable:!0,writable:!0,value:["valueY","openValueY","lowValueY","highValueY"]});Object.defineProperty(this, "_valueXFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_valueYFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_valueXShowFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_valueYShowFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"__valueXShowFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this, "__valueYShowFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_emptyDataItem",{enumerable:!0,configurable:!0,writable:!0,value:new y.DataItem(this,void 0,{})});Object.defineProperty(this,"_dataSetId",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_tooltipFieldX",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_tooltipFieldY",{enumerable:!0,configurable:!0,writable:!0,value:void 0}); Object.defineProperty(this,"_posXDp",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_posYDp",{enumerable:!0,configurable:!0,writable:!0,value: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");super._afterNew();this.set("maskContent",!0);this._disposers.push(this.axisRanges.events.onAll(a=>{if("clear"===a.type)f.each(a.oldValues,b=>{this._removeAxisRange(b)});else if("push"===a.type)this._processAxisRange(a.newValue);else if("setIndex"===a.type)this._processAxisRange(a.newValue);else if("insertIndex"===a.type)this._processAxisRange(a.newValue);else if("removeIndex"===a.type)this._removeAxisRange(a.oldValue);else if("moveIndex"===a.type)this._processAxisRange(a.value); else throw Error("Unknown IStreamEvent type");}));this.states.create("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()}_processAxisRange(a){const b=f.Container.new(this._root,{});a.container=b;this.children.push(b);a.series=this;a=a.axisDataItem;a.setRaw("isRange",!0);const c=a.component;if(c){c._processAxisRange(a, ["range","series"]);var d=a.get("bullet");d&&(d=d.get("sprite"))&&d.setPrivate("visible",!1);(d=a.get("axisFill"))&&b.set("mask",d);c._seriesAxisRanges.push(a)}}_removeAxisRange(a){const b=a.axisDataItem,c=b.component;c.disposeDataItem(b);f.remove(c._seriesAxisRanges,b);(a=a.container)&&a.dispose()}_updateFields(){super._updateFields();this._valueXFields=[];this._valueYFields=[];this._valueXShowFields=[];this._valueYShowFields=[];this.__valueXShowFields=[];this.__valueYShowFields=[];this.valueXFields&& f.each(this.valueXFields,a=>{this.get(a+"Field")&&(this._valueXFields.push(a),a=this.get(a+"Show"),this.__valueXShowFields.push(a),-1!=a.indexOf("Working")?this._valueXShowFields.push(a.split("Working")[0]):this._valueXShowFields.push(a))});this.valueYFields&&f.each(this.valueYFields,a=>{this.get(a+"Field")&&(this._valueYFields.push(a),a=this.get(a+"Show"),this.__valueYShowFields.push(a),-1!=a.indexOf("Working")?this._valueYShowFields.push(a.split("Working")[0]):this._valueYShowFields.push(a))})}_dispose(){super._dispose(); this._bullets={};const a=this.chart;a&&a.series.removeValue(this);f.removeFirst(this.get("xAxis").series,this);f.removeFirst(this.get("yAxis").series,this)}_min(a,b){var c=this.getPrivate(a);this.setPrivate(a,null==c?b:null==b?c:bc?b:c)}_shouldMakeBullet(a){const b=this.get("xAxis"),c=this.get("yAxis"),d=this.get("baseAxis");if(!b.inited||!c.inited)return!1;const e=this.get("minBulletDistance",0);if(0{f.each(this._valueXShowFields,l=>{let p=k.get(l);null!=p&&(e&&(p+= this.getStackedXValue(k,l)),this._min("minX",p),this._max("maxX",p))});f.each(this._valueYShowFields,l=>{let p=k.get(l);null!=p&&(e&&(p+=this.getStackedYValue(k,l)),this._min("minY",p),this._max("maxY",p))});a.processSeriesDataItem(k,this._valueXFields);b.processSeriesDataItem(k,this._valueYFields)}),a._seriesValuesDirty=!0,b._seriesValuesDirty=!0,this.get("ignoreMinMax")||((this.isPrivateDirty("minX")||this.isPrivateDirty("maxX"))&&a.markDirtyExtremes(),(this.isPrivateDirty("minY")||this.isPrivateDirty("maxY"))&& b.markDirtyExtremes()),this._markStakedDirtyStack(),this.get("tooltipDataItem")||this.updateLegendValue(void 0));(this.isDirty("vcx")||this.isDirty("vcy"))&&this._markStakedDirtyStack();this._dataGrouped||(a._groupSeriesData(this),b._groupSeriesData(this),this._dataGrouped=!0);if(this._valuesDirty||this.isPrivateDirty("startIndex")||this.isPrivateDirty("adjustedStartIndex")||this.isPrivateDirty("endIndex")||this.isDirty("vcx")||this.isDirty("vcy")||this._stackDirty||this._sizeDirty){var h=this.startIndex(); d=this.endIndex();var g=this.get("minBulletDistance",0);0g?this._showBullets=!0:this._showBullets=!1);if((this._psi!=h||this._pei!=d||this.isDirty("vcx")||this.isDirty("vcy")||this.isPrivateDirty("adjustedStartIndex")||this._stackDirty||this._valuesDirty)&&!this._selectionProcessed){this._selectionProcessed=!0;g=this.get("vcx",1);const k=this.get("vcy",1),l=this.get("stacked",!1),p=this.getPrivate("outOfSelection");if(c===a||!c)if(b._calculateTotals(), this.setPrivateRaw("selectionMinY",void 0),this.setPrivateRaw("selectionMaxY",void 0),p)b.markDirtySelectionExtremes();else for(let n=h;n{const d=this.parent;if(d){const e=this._root.container.width(),h=this._root.container.height();b.moveTo(-e,-h);b.lineTo(-e,2*h);b.lineTo(2*e,2*h);b.lineTo(2*e,-h);b.lineTo(-e,-h);this.axisRanges.each(g=>{g=g.axisDataItem.get("axisFill"); d&&g&&(g=g.get("draw"))&&g(b,c)})}this.mainContainer._display.mask=a._display}));a.markDirty();a._markDirtyKey("fill")}else this.mainContainer._display.mask=null}_updateChildren(){super._updateChildren();this._x=this.x();this._y=this.y();this._makeRangeMask()}_stack(){const a=this.chart;if(a){var b=a.series.indexOf(this);this._couldStackTo=[];if(0{delete b._stackedSeries[this.uid]});this._reallyStackedTo={};f.each(this.dataItems,a=>{a.setRaw("stackToItemY",void 0);a.setRaw("stackToItemX",void 0)})}_stackDataItems(){const a=this.get("baseAxis"),b=this.get("xAxis"),c=this.get("yAxis");let d,e;a===b?(d="valueY",e="stackToItemY"):a===c&&(d="valueX",e="stackToItemX");let h=this._couldStackTo.length,g=0;const k=this.get("stackToNegative");this._reallyStackedTo= {};f.each(this.dataItems,l=>{for(let p=0;pq&&0>t){l.setRaw(e,m);this._reallyStackedTo[n.uid]=n;n._stackedSeries[this.uid]=this;break}}}else break;else if(f.isNumber(q)&&f.isNumber(t)){l.setRaw(e,m);this._reallyStackedTo[n.uid]=n;n._stackedSeries[this.uid]=this;break}}}g++})}processXSelectionDataItem(a, b,c){f.each(this.__valueXShowFields,d=>{let e=a.get(d);null!=e&&(c&&(e+=this.getStackedXValueWorking(a,d)),this._min("selectionMinX",e),this._max("selectionMaxX",e*b))})}processYSelectionDataItem(a,b,c){f.each(this.__valueYShowFields,d=>{let e=a.get(d);null!=e&&(c&&(e+=this.getStackedYValueWorking(a,d)),this._min("selectionMinY",e),this._max("selectionMaxY",e*b))})}getStackedYValueWorking(a,b){if(a=a.get("stackToItemY")){const c=a.component;return a.get(b,0)*c.get("vcy",1)+this.getStackedYValueWorking(a, b)}return 0}getStackedXValueWorking(a,b){if(a=a.get("stackToItemX")){const c=a.component;return a.get(b,0)*c.get("vcx",1)+this.getStackedXValueWorking(a,b)}return 0}getStackedYValue(a,b){return(a=a.get("stackToItemY"))?a.get(b,0)+this.getStackedYValue(a,b):0}getStackedXValue(a,b){return(a=a.get("stackToItemX"))?a.get(b,0)+this.getStackedXValue(a,b):0}createLegendMarker(a){this.updateLegendMarker()}_markDirtyAxes(){this._axesDirty=!0;this.markDirty()}_markDataSetDirty(){this._afterDataChange();this._valuesDirty= !0;this._aggregatesCalculated=this._dataProcessed=!1;this.markDirty()}_clearDirty(){super._clearDirty();this._dataProcessed=this._stackDirty=this._selectionProcessed=this._axesDirty=!1}_positionBullet(a){let b=a.get("sprite");if(b){var c=b.dataItem,d=a.get("locationX",c.get("locationX",.5)),e=a.get("locationY",c.get("locationY",.5)),h=this.get("xAxis"),g=this.get("yAxis");h=h.getDataItemPositionX(c,this._xField,d,this.get("vcx",1));g=g.getDataItemPositionY(c,this._yField,e,this.get("vcy",1));var k= this.getPoint(h,g);let m=c.get("left",k.x);var l=c.get("right",k.x),p=c.get("top",k.y);let q=c.get("bottom",k.y),t=k=0;l-=m;p=q-p;if(this._shouldShowBullet(h,g)){b.setPrivate("visible",!a.getPrivate("hidden"));let r=a.get("field");const u=this.get("baseAxis"),v=this.get("xAxis"),w=this.get("yAxis");if(void 0!=r)if(u==v){if("value"==r)var n=this._yField;else"open"==r?n=this._yOpenField:"high"==r?n=this._yHighField:"low"==r&&(n=this._yLowField);n&&(g=w.getDataItemPositionY(c,n,0,this.get("vcy",1)), k=w.get("renderer").positionToPoint(g),t=k.y,k=m+l*d)}else"value"==r?n=this._xField:"open"==r?n=this._xOpenField:"high"==r?n=this._xHighField:"low"==r&&(n=this._xLowField),n&&(h=v.getDataItemPositionX(c,n,0,this.get("vcx",1)),k=v.get("renderer").positionToPoint(h),k=k.x,t=q-p*e);else k=m+l*d,t=q-p*e;if(a=a.get("stacked")){c=this.chart;if(u==v){if(d=this._bullets[h+"_"+g])d=d.bounds(),e=b.localBounds(),n=t,t=d.top,"down"==a?t=d.bottom-e.top:"auto"==a?c&&(t=n{b!=this._mainDataItems&&f.each(b,c=>{this.disposeDataItem(c)})});this._dataSets={};this._dataItems=this.mainDataItems}_handleDataSetChange(){f.each(this._dataItems,a=>{(a=a.bullets)&&f.each(a,b=>{b&&(b=b.get("sprite"))&&b.setPrivate("visible",!1)})});this._selectionProcessed= !1}show(a){const b=Object.create(null,{show:{get:()=>super.show}});return N.__awaiter(this,void 0,void 0,function*(){this._fixVC();let c=[];c.push(b.show.call(this,a).then(()=>{this._isShowing=!1;let d=this.get("xAxis"),e=this.get("yAxis"),h=this.get("baseAxis");e!==h&&e.markDirtySelectionExtremes();d!==h&&d.markDirtySelectionExtremes()}));c.push(this.bulletsContainer.show(a));c.push(this._sequencedShowHide(!0,a));yield Promise.all(c)})}hide(a){const b=Object.create(null,{hide:{get:()=>super.hide}}); return N.__awaiter(this,void 0,void 0,function*(){this._fixVC();let c=[];c.push(b.hide.call(this,a).then(()=>{this._isHiding=!1}));c.push(this.bulletsContainer.hide(a));c.push(this._sequencedShowHide(!1,a));yield Promise.all(c)})}showDataItem(a,b){const c=Object.create(null,{showDataItem:{get:()=>super.showDataItem}});return N.__awaiter(this,void 0,void 0,function*(){const d=[c.showDataItem.call(this,a,b)];f.isNumber(b)||(b=this.get("stateAnimationDuration",0));const e=this.get("stateAnimationEasing"); f.each(this._valueFields,h=>{d.push(a.animate({key:h+"Working",to:a.get(h),duration:b,easing:e}).waitForStop())});yield Promise.all(d)})}hideDataItem(a,b){const c=Object.create(null,{hideDataItem:{get:()=>super.hideDataItem}});return N.__awaiter(this,void 0,void 0,function*(){const d=[c.hideDataItem.call(this,a,b)];var e=this.states.create("hidden",{});f.isNumber(b)||(b=e.get("stateAnimationDuration",this.get("stateAnimationDuration",0)));const h=e.get("stateAnimationEasing",this.get("stateAnimationEasing")); e=this.get("xAxis");const g=this.get("yAxis");var k=this.get("baseAxis");const l=this.get("stacked");k!==e&&k||f.each(this._valueYFields,p=>{let n=g.getPrivate("min"),m=g.baseValue();f.isNumber(n)&&n>m&&(m=n);l&&(m=0);null!=a.get(p)&&d.push(a.animate({key:p+"Working",to:m,duration:b,easing:h}).waitForStop())});if(k===g||!k){k=e.getPrivate("min");let p=e.baseValue();f.isNumber(k)&&k>p&&(p=k);l&&(p=0);f.each(this._valueXFields,n=>{null!=a.get(n)&&d.push(a.animate({key:n+"Working",to:p,duration:b,easing:h}).waitForStop())})}yield Promise.all(d)})}_markDirtyStack(){this._stackDirty= !0;this.markDirty();this._markStakedDirtyStack()}_markStakedDirtyStack(){const a=this._stackedSeries;a&&f.each$1(a,(b,c)=>{c._stackDirty||c._markDirtyStack()})}_afterChanged(){super._afterChanged();this._skipped&&(this._markDirtyAxes(),this._skipped=!1)}showDataItemTooltip(a){this.getPrivate("doNotUpdateLegend")||(this.updateLegendMarker(a),this.updateLegendValue(a));const b=this.get("tooltip");if(b)if(!this.isHidden()&&this.get("visible")){if(b._setDataItem(a),a){var c=this.get("locationX",0),d= this.get("locationY",1);c=a.get("locationX",c);d=a.get("locationY",d);const e=this.get("xAxis"),h=this.get("yAxis"),g=this.get("vcx",1),k=this.get("vcy",1);c=e.getDataItemPositionX(a,this._tooltipFieldX,this._aLocationX0+(this._aLocationX1-this._aLocationX0)*c,g);d=h.getDataItemPositionY(a,this._tooltipFieldY,this._aLocationY0+(this._aLocationY1-this._aLocationY0)*d,k);c=this.getPoint(c,d);let l=!0;f.each(this._valueFields,p=>{null==a.get(p)&&(l=!1)});l?(d=this.chart)&&d.inPlot(c)?(b.label.text.markDirtyText(), b.set("tooltipTarget",this._getTooltipTarget(a)),b.set("pointTo",this._display.toGlobal({x:c.x,y:c.y}))):b._setDataItem(void 0):b._setDataItem(void 0)}}else this.hideTooltip()}hideTooltip(){const a=this.get("tooltip");a&&a.set("tooltipTarget",this);return super.hideTooltip()}_getTooltipTarget(a){return"bullet"==this.get("seriesTooltipTarget")&&(a=a.bullets)&&0b&&(b=-999999999);999999999a&&(a=-999999999);999999999{if("clear"===b.type)f.each(b.oldValues, c=>{this.disposeDataItem(c)});else if("push"===b.type)this._processAxisRange(b.newValue,["range"]);else if("setIndex"===b.type)this._processAxisRange(b.newValue,["range"]);else if("insertIndex"===b.type)this._processAxisRange(b.newValue,["range"]);else if("removeIndex"===b.type)this.disposeDataItem(b.oldValue);else if("moveIndex"===b.type)this._processAxisRange(b.value,["range"]);else throw Error("Unknown IStreamEvent type");}));const a=this.get("renderer");a&&(a.axis=this,a.processAxis());this.children.push(a); this.ghostLabel=a.makeLabel(new y.DataItem(this,void 0,{}),[]);this.ghostLabel.adapters.disable("text");this.ghostLabel.setAll({opacity:0,tooltipText:void 0,tooltipHTML:void 0,interactive:!1});this.ghostLabel.events.disable()}_updateFinals(a,b){}zoom(a,b,c,d){if(this.get("zoomable",!0))if(this._updateFinals(a,b),this.get("start")!==a||this.get("end")!=b){var e=this._sAnimation;let g=this._eAnimation;var h=this.get("maxDeviation",.5)*Math.min(1,b-a);a<-h&&(a=-h);b>1+h&&(b=1+h);a>b&&([a,b]=[b,a]);f.isNumber(c)|| (c=this.get("interpolationDuration",0));d||="end";let k=h=this.getPrivate("maxZoomFactor",this.get("maxZoomFactor",100));1===b&&0!==a&&(d=athis.get("end",1)?"end":"start");let l=this.get("minZoomCount",0),p=this.get("maxZoomCount",Infinity);f.isNumber(l)&&(h=k/l);let n=1;f.isNumber(p)&&(n=k/p);"start"===d?(0h&&(b=a+1/h),1h&&(a=b-1/h),0>a&&b-a<1/h&&(b=a+ 1/h));1/(b-a)>h&&(b=a+1/h);1/(b-a)>h&&(a=b-1/h);null!=p&&null!=l&&a==this.get("start")&&b==this.get("end")&&(d=this.chart)&&d._handleAxisSelection(this,!0);if(!(e&&e.playing&&e.to==a||this.get("start")==a)||!(g&&g.playing&&g.to==b||this.get("end")==b))if(0{this._prepareDataItem(a)});f.each(this._seriesAxisRanges,a=>{this._prepareDataItem(a)})}_prepareChildren(){super._prepareChildren();this.get("fixAxisSize")?this.ghostLabel.set("visible",!0):this.ghostLabel.set("visible",!1);if(this.isDirty("start")||this.isDirty("end")){var a=this.chart;a&&a._updateCursor();a=this.get("start",0);var b=this.get("end",1),c=this.get("maxDeviation",.5)*Math.min(1,b-a);if(a<-c){let d=a+c;a=-c;this.setRaw("start",a);this.isDirty("end")&&this.setRaw("end", b-d)}b>1+c&&(b=b-1-c,this.setRaw("end",1+c),this.isDirty("start")&&this.setRaw("start",a-b))}c=this.get("renderer");c._start=this.get("start");c._end=this.get("end");c._inversed=c.get("inversed",!1);c._axisLength=c.axisLength()/(c._end-c._start);c._updateLC();this.isDirty("tooltip")&&(a=this.get("tooltip"))&&(c=c.get("themeTags"),a.addTag("axis"),a.addTag(this.className.toLowerCase()),a._applyThemes(),c&&(a.set("themeTags",f.mergeTags(a.get("themeTags"),c)),a.label._applyThemes()))}_updateTooltipBounds(){const a= this.get("tooltip");a&&this.get("renderer").updateTooltipBounds(a)}_updateBounds(){super._updateBounds();this._updateTooltipBounds()}processChart(a){this.chart=a;this.get("renderer").chart=a;a.gridContainer.children.push(this.gridContainer);a.topGridContainer.children.push(this.topGridContainer);a.axisHeadersContainer.children.push(this.axisHeader);this.on("start",()=>{a._handleAxisSelection(this)});this.on("end",()=>{a._handleAxisSelection(this)});a.plotContainer.onPrivate("width",()=>{this.markDirtySize()}); a.plotContainer.onPrivate("height",()=>{this.markDirtySize()});a.processAxis(this)}hideDataItem(a){this._toggleFHDataItem(a,!0);return super.hideDataItem(a)}showDataItem(a){this._toggleFHDataItem(a,!1);return super.showDataItem(a)}_toggleFHDataItem(a,b){var c=a.get("label");c&&c.set("forceHidden",b);(c=a.get("grid"))&&c.set("forceHidden",b);(c=a.get("tick"))&&c.set("forceHidden",b);(c=a.get("axisFill"))&&c.set("forceHidden",b);(a=a.get("bullet"))&&(a=a.get("sprite"))&&a.set("forceHidden",b)}_toggleDataItem(a, b){var c=a.get("label");c&&c.setPrivate("visible",b);(c=a.get("grid"))&&c.setPrivate("visible",b);(c=a.get("tick"))&&c.setPrivate("visible",b);(c=a.get("axisFill"))&&c.setPrivate("visible",b);(a=a.get("bullet"))&&(a=a.get("sprite"))&&a.setPrivate("visible",b)}_createAssets(a,b,c){var d,e,h;const g=this.get("renderer");var k=a.get("label");if(k){var l=k.get("themeTags");let p=!1;c?-1==(null===l||void 0===l?void 0:l.indexOf("minor"))&&(p=!0):-1!=(null===l||void 0===l?void 0:l.indexOf("minor"))&&(p= !0);p&&(null===(d=k.parent)||void 0===d?void 0:d.children.removeValue(k),g.makeLabel(a,b),k.dispose(),g.labels.removeValue(k))}else g.makeLabel(a,b);(d=a.get("grid"))?(k=d.get("themeTags"),l=!1,c?-1==(null===k||void 0===k?void 0:k.indexOf("minor"))&&(l=!0):-1!=(null===k||void 0===k?void 0:k.indexOf("minor"))&&(l=!0),l&&(null===(e=d.parent)||void 0===e?void 0:e.children.removeValue(d),g.makeGrid(a,b),d.dispose(),g.grid.removeValue(d))):g.makeGrid(a,b);(e=a.get("tick"))?(d=!1,k=e.get("themeTags"),c? -1==(null===k||void 0===k?void 0:k.indexOf("minor"))&&(d=!0):-1!=(null===k||void 0===k?void 0:k.indexOf("minor"))&&(d=!0),d&&(null===(h=e.parent)||void 0===h?void 0:h.children.removeValue(e),g.makeTick(a,b),e.dispose(),g.ticks.removeValue(e))):g.makeTick(a,b);c||a.get("axisFill")||g.makeAxisFill(a,b);this._processBullet(a)}_processBullet(a){let b=a.get("bullet");var c=this.get("bullet");b||!c||a.get("isRange")||(b=c(this._root,this,a));b&&(b.axis=this,c=b.get("sprite"))&&(c._setDataItem(a),a.setRaw("bullet", b),c.parent||this.bulletsContainer.children.push(c))}_afterChanged(){super._afterChanged();const a=this.chart;a&&(a._updateChartLayout(),a.axisHeadersContainer.markDirtySize());this.get("renderer")._updatePositions();this._seriesAdded=!1}disposeDataItem(a){super.disposeDataItem(a);const b=this.get("renderer");var c=a.get("label");c&&(b.labels.removeValue(c),c.dispose());if(c=a.get("tick"))b.ticks.removeValue(c),c.dispose();if(c=a.get("grid"))b.grid.removeValue(c),c.dispose();if(c=a.get("axisFill"))b.axisFills.removeValue(c), c.dispose();(a=a.get("bullet"))&&a.dispose()}_updateGhost(){this.setPrivate("cellWidth",this.getCellWidthPosition()*this.get("renderer").axisLength());const a=this.ghostLabel;if(!a.isHidden()){var b=a.localBounds();const d=Math.ceil(b.right-b.left);let e=a.get("text");f.each(this.dataItems,h=>{if((h=h.get("label"))&&!h.isHidden()){const g=h.localBounds();Math.ceil(g.right-g.left)>d&&(e=h.text._getText())}});a.set("text",e)}b=this.get("start",0);let c=this.get("end",1);this.get("renderer").updateLabel(a, b+.5*(c-b))}_handleCursorPosition(a,b){this._cursorPosition=a=this.get("renderer").toAxisPosition(a);this._snapToSeries=b;this.updateTooltip()}updateTooltip(){const a=this._snapToSeries;let b=this._cursorPosition;const c=this.get("tooltip"),d=this.get("renderer");f.isNumber(b)&&(f.each(this.series,e=>{if(e.get("baseAxis")===this){const h=this.getSeriesItem(e,b,this.get("tooltipLocation"));a&&-1!=a.indexOf(e)?(e.updateLegendMarker(h),e.updateLegendValue(h),e._settings.tooltipDataItem=h):(e.showDataItemTooltip(h), e.setRaw("tooltipDataItem",h))}}),this.get("snapTooltip")&&(b=this.roundAxisPosition(b,this.get("tooltipLocation",.5))),this.setPrivateRaw("tooltipPosition",b),c&&(d.updateTooltipBounds(c),f.isNaN(b)?c.hide(0):(this._updateTooltipText(c,b),d.positionTooltip(c,b),bthis.get("end",1)?c.hide(0):c.show(0))))}_updateTooltipText(a,b){a.label.set("text",this.getTooltipText(b))}roundAxisPosition(a,b){return a}handleCursorShow(){let a=this.get("tooltip");a&&a.show()}handleCursorHide(){let a= this.get("tooltip");a&&a.hide()}processSeriesDataItem(a,b){}_clearDirty(){super._clearDirty();this._rangesDirty=this._sizeDirty=!1}coordinateToPosition(a){const b=this.get("renderer");return b.toAxisPosition(a/b.axisLength())}toAxisPosition(a){return this.get("renderer").toAxisPosition(a)}toGlobalPosition(a){return this.get("renderer").toGlobalPosition(a)}fixPosition(a){return this.get("renderer").fixPosition(a)}shouldGap(a,b,c,d){return!1}createAxisRange(a){return this.axisRanges.push(a)}_groupSeriesData(a){}getCellWidthPosition(){return.05}} Object.defineProperty(L,"className",{enumerable:!0,configurable:!0,writable:!0,value:"Axis"});Object.defineProperty(L,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:y.Component.classNames.concat([L.className])});class Q extends L{constructor(){super(...arguments);Object.defineProperty(this,"_dirtyExtremes",{enumerable:!0,configurable:!0,writable:!0,value:!1});Object.defineProperty(this,"_dirtySelectionExtremes",{enumerable:!0,configurable:!0,writable:!0,value:!1});Object.defineProperty(this, "_deltaMinMax",{enumerable:!0,configurable:!0,writable:!0,value:1});Object.defineProperty(this,"_minReal",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_maxReal",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_minRealLog",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_baseValue",{enumerable:!0,configurable:!0,writable:!0,value:0});Object.defineProperty(this,"_syncDp",{enumerable:!0, configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_minLogAdjusted",{enumerable:!0,configurable:!0,writable:!0,value:1})}markDirtyExtremes(){this._dirtyExtremes=!0;this.markDirty()}markDirtySelectionExtremes(){this._dirtySelectionExtremes=!0;this.markDirty()}_afterNew(){this._settings.themeTags=f.mergeTags(this._settings.themeTags,["axis"]);this.setPrivateRaw("name","value");this.addTag("value");super._afterNew()}_prepareChildren(){super._prepareChildren();if(this.isDirty("syncWithAxis")){this._prevSettings.syncWithAxis&& this._syncDp&&this._syncDp.dispose();var a=this.get("syncWithAxis");a&&(this._syncDp=new f.MultiDisposer([a.onPrivate("selectionMinFinal",()=>{this._dirtySelectionExtremes=!0}),a.onPrivate("selectionMaxFinal",()=>{this._dirtySelectionExtremes=!0})]))}a=!1;if(this.isDirty("min")||this.isDirty("max")||this.isDirty("maxPrecision")||this.isDirty("numberFormat"))a=!0,this.ghostLabel.set("text","");if(this._sizeDirty||this._dirtyExtremes||this._valuesDirty||a||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)&&(this._getSelectionMinMax(),this._dirtySelectionExtremes=!1);this._groupData();if(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"))this._handleRangeChange(),this._prepareAxisItems(),this._updateAxisRanges();this._baseValue=this.baseValue()}_handleSizeDirty(){this._sizeDirty&&(this._dirtySelectionExtremes=!0)}_groupData(){}_formatText(a){const b=this.get("numberFormat"),c=this.getNumberFormatter(); let d="";return d=b?c.format(a,b):c.format(a,void 0,this.getPrivate("stepDecimalPlaces"))}_prepareAxisItems(){var a=this.getPrivate("min"),b=this.getPrivate("max");if(f.isNumber(a)&&f.isNumber(b)){b=this.get("logarithmic");const n=this.getPrivate("step");var c=this.getPrivate("selectionMin");const m=this.getPrivate("selectionMax")+n;var d=c-n;let q=1;if(b){d=this._minLogAdjusted;if(d=a&&(a=1,1>n&&(a=f.isNumber(this._minRealLog)?this._minRealLog:Math.pow(10,-50)));q=Math.log(m- n)*Math.LOG10E-Math.log(a)*Math.LOG10E;2k&&!b&&(d=f.round(d,Math.round(Math.abs(Math.log(Math.abs(k))*Math.LOG10E))+2));t++;k=d}for(b=t;b{r.inited&&r._markDirtyAxes()});this._updateGhost()}}_prepareDataItem(a,b){let c=this.get("renderer"),d=a.get("value");var e=a.get("endValue");let h=this.valueToPosition(d),g=h,k=this.valueToPosition(d+this.getPrivate("step"));f.isNumber(e)&&(k=g=this.valueToPosition(e));a.get("isRange")&&null==e&&(k=h);e=g;var l=a.get("labelEndValue");null!=l&&(e=this.valueToPosition(l));c.updateLabel(a.get("label"),h,e,b);l=a.get("grid");c.updateGrid(l,h,g);l&&(d==this.get("baseValue",0)?(l.addTag("base"),l._applyThemes()): l.hasTag("base")&&(l.removeTag("base"),l._applyThemes()));c.updateTick(a.get("tick"),h,e,b);c.updateFill(a.get("axisFill"),h,k);this._processBullet(a);c.updateBullet(a.get("bullet"),h,g);a.get("isRange")||(b=this.get("fillRule"))&&b(a)}_handleRangeChange(){let a=this.positionToValue(this.get("start",0)),b=this.positionToValue(this.get("end",1));var c=this.get("renderer").gridCount(),d=this._adjustMinMax(a,b,c,!0);d=f.decimalPlaces(d.step);this.setPrivateRaw("stepDecimalPlaces",d);a=f.round(a,d);b= f.round(b,d);d=this._adjustMinMax(a,b,c,!0);c=d.step;a=d.min;b=d.max;if(this.getPrivate("selectionMin")!==a||this.getPrivate("selectionMax")!==b||this.getPrivate("step")!==c)this.setPrivateRaw("selectionMin",a),this.setPrivateRaw("selectionMax",b),this.setPrivateRaw("step",c)}positionToValue(a){const b=this.getPrivate("min"),c=this.getPrivate("max");return this.get("logarithmic")?Math.pow(Math.E,(a*(Math.log(c)*Math.LOG10E-Math.log(b)*Math.LOG10E)+Math.log(b)*Math.LOG10E)/Math.LOG10E):a*(c-b)+b}valueToPosition(a){const b= this.getPrivate("min"),c=this.getPrivate("max");if(this.get("logarithmic")){if(0>=a){let d=this.get("treatZeroAs");f.isNumber(d)&&(a=d)}return(Math.log(a)*Math.LOG10E-Math.log(b)*Math.LOG10E)/(Math.log(c)*Math.LOG10E-Math.log(b)*Math.LOG10E)}return(a-b)/(c-b)}valueToFinalPosition(a){const b=this.getPrivate("minFinal"),c=this.getPrivate("maxFinal");if(this.get("logarithmic")){if(0>=a){let d=this.get("treatZeroAs");f.isNumber(d)&&(a=d)}return(Math.log(a)*Math.LOG10E-Math.log(b)*Math.LOG10E)/(Math.log(c)* Math.LOG10E-Math.log(b)*Math.LOG10E)}return(a-b)/(c-b)}getX(a,b,c){a=this.valueToPosition(c+(a-c)*b);return this._settings.renderer.positionToCoordinate(a)}getY(a,b,c){a=this.valueToPosition(c+(a-c)*b);return this._settings.renderer.positionToCoordinate(a)}getDataItemCoordinateX(a,b,c,d){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionX(a,b,c,d))}getDataItemPositionX(a,b,c,d){c=a.get(b);c=a.get("stackToItemX")?c*d+a.component.getStackedXValueWorking(a,b):this._baseValue+ (c-this._baseValue)*d;return this.valueToPosition(c)}getDataItemCoordinateY(a,b,c,d){return this._settings.renderer.positionToCoordinate(this.getDataItemPositionY(a,b,c,d))}getDataItemPositionY(a,b,c,d){c=a.get(b);c=a.get("stackToItemY")?c*d+a.component.getStackedYValueWorking(a,b):this._baseValue+(c-this._baseValue)*d;return this.valueToPosition(c)}basePosition(){return this.valueToPosition(this.baseValue())}baseValue(){const a=Math.min(this.getPrivate("minFinal",-Infinity),this.getPrivate("selectionMin", -Infinity)),b=Math.max(this.getPrivate("maxFinal",Infinity),this.getPrivate("selectionMax",Infinity));let c=this.get("baseValue",0);cb&&(c=b);return c}cellEndValue(a){return a}fixSmallStep(a){return 1===1+a?this.fixSmallStep(2*a):a}_fixMin(a){return a}_fixMax(a){return a}_calculateTotals(){if(this.get("calculateTotals")){let a=this.series[0];if(a){let b=a.startIndex();if(0{if(!p.get("excludeFromTotal")){let n=p.dataItems[g];n&&(p=n.get(h)*p.get(e),f.isNaN(p)||(k+=p,l+=Math.abs(p)))}});f.each(this.series,p=>{if(!p.get("excludeFromTotal")){let n=p.dataItems[g];n&&(p=n.get(h)*p.get(e),f.isNaN(p)||(n.set(d+"Total",l),n.set(d+"Sum",k),n.set(d+"TotalPercent",p/l*100)))}})}}}}}_getSelectionMinMax(){var a=this.getPrivate("minFinal"),b=this.getPrivate("maxFinal"); const c=this.get("min"),d=this.get("max");let e=this.get("extraMin",0),h=this.get("extraMax",0);this.get("logarithmic")&&(null==this.get("extraMin")&&(e=.1),null==this.get("extraMax")&&(h=.2));var g=this.get("renderer").gridCount();const k=this.get("strictMinMaxSelection");var l=this.get("strictMinMax");if(f.isNumber(a)&&f.isNumber(b)){let n=b,m=a;f.each(this.series,r=>{if(!r.get("ignoreMinMax")){const w=r.getPrivate("outOfSelection");if(r.get("xAxis")===this){if(!w){var u=r.getPrivate("minX");var v= r.getPrivate("maxX");if(0!=r.startIndex()||r.endIndex()!=r.dataItems.length)v=u=void 0;u=r.getPrivate("selectionMinX",u);v=r.getPrivate("selectionMaxX",v)}}else if(r.get("yAxis")===this&&!w){u=r.getPrivate("minY");v=r.getPrivate("maxY");if(0!=r.startIndex()||r.endIndex()!=r.dataItems.length)v=u=void 0;u=r.getPrivate("selectionMinY",u);v=r.getPrivate("selectionMaxY",v)}r.isHidden()||r.isShowing()||(f.isNumber(u)&&(n=Math.min(n,u)),f.isNumber(v)&&(m=Math.max(m,v)))}});this.axisRanges.each(r=>{if(r.get("affectsMinMax")){let u= r.get("value");null!=u&&(n=Math.min(n,u),m=Math.max(m,u));u=r.get("endValue");null!=u&&(n=Math.min(n,u),m=Math.max(m,u))}});n>m&&([n,m]=[m,n]);f.isNumber(c)?n=l?c:a:l&&f.isNumber(this._minReal)&&(n=this._minReal);f.isNumber(d)?m=l?d:b:l&&f.isNumber(this._maxReal)&&(m=this._maxReal);if(n===m){var p=n;n-=this._deltaMinMax;m+=this._deltaMinMax;nb&&(p.max=b),n=p.min,m=p.max;l&&(f.isNumber(c)&&(n=Math.max(n,c)),f.isNumber(d)&&(m=Math.min(m,d)));k&&(n=q-(m-n)*e,m=t+ (m-n)*h);this.get("logarithmic")&&(0>=n&&(n=q*(1-Math.min(e,.99))),nb&&(m=b));b=Math.min(20,Math.ceil(Math.log(this.getPrivate("maxZoomFactor",100)+1)/Math.LN10)+2);a=f.round(this.valueToFinalPosition(n),b);b=f.round(this.valueToFinalPosition(m),b);this.setPrivateRaw("selectionMinFinal",n);this.setPrivateRaw("selectionMaxFinal",m);this.setPrivateRaw("selectionStepFinal",p.step);this.zoom(a,b)}}_getMinMax(){var a=this.get("min");let b=this.get("max"),c=Infinity,d=-Infinity;var e=this.get("extraMin", 0);let h=this.get("extraMax",0);this.get("logarithmic")&&(null==this.get("extraMin")&&(e=.1),null==this.get("extraMax")&&(h=.2));let g=Infinity;f.each(this.series,m=>{if(!m.get("ignoreMinMax")){let q,t;m.get("xAxis")===this?(q=m.getPrivate("minX"),t=m.getPrivate("maxX")):m.get("yAxis")===this&&(q=m.getPrivate("minY"),t=m.getPrivate("maxY"));f.isNumber(q)&&f.isNumber(t)&&(c=Math.min(c,q),d=Math.max(d,t),m=t-q,0>=m&&(m=Math.abs(t/100)),m{if(m.get("affectsMinMax")){let q= m.get("value");null!=q&&(c=Math.min(c,q),d=Math.max(d,q));q=m.get("endValue");null!=q&&(c=Math.min(c,q),d=Math.max(d,q))}});if(this.get("logarithmic")){var k=this.get("treatZeroAs");f.isNumber(k)&&0>=c&&(c=k)}0===c&&0===d&&(d=.9,c=-.9);f.isNumber(a)&&(c=a);f.isNumber(b)&&(d=b);if(Infinity===c||-Infinity===d)this.setPrivate("minFinal",void 0),this.setPrivate("maxFinal",void 0);else{c>d&&([c,d]=[d,c]);k=c;var l=d,p=this.adapters.fold("min",c),n=this.adapters.fold("max",d);this._minRealLog=c;f.isNumber(p)&& (c=p);f.isNumber(n)&&(d=n);c=this._fixMin(c);d=this._fixMax(d);d-c<=1/Math.pow(10,15)&&(0!==d-c?this._deltaMinMax=(d-c)/2:this._getDelta(d),c-=this._deltaMinMax,d+=this._deltaMinMax);c-=(d-c)*e;d+=(d-c)*h;this.get("logarithmic")&&(0>c&&0<=k&&(c=0),0=l&&(d=0));this._minReal=c;this._maxReal=d;p=this.get("strictMinMax");(l=this.get("strictMinMaxSelection",!1))&&(p=l);l=p;f.isNumber(b)&&(l=!0);n=this.get("renderer").gridCount();l=this._adjustMinMax(c,d,n,l);c=l.min;d=l.max;l=this._adjustMinMax(c, d,n,!0);c=l.min;d=l.max;p&&(c=f.isNumber(a)?a:this._minReal,d=f.isNumber(b)?b:this._maxReal,1E-8>=d-c&&(c-=this._deltaMinMax,d+=this._deltaMinMax),c-=(d-c)*e,d+=(d-c)*h);p=this.adapters.fold("min",c);n=this.adapters.fold("max",d);f.isNumber(p)&&(c=p);f.isNumber(n)&&(d=n);Infinity==g&&(g=d-c);a=Math.round(Math.abs(Math.log(Math.abs(d-c))*Math.LOG10E))+5;c=f.round(c,a);d=f.round(d,a);if(a=this.get("syncWithAxis"))l=this._syncAxes(c,d,l.step,a.getPrivate("minFinal",a.getPrivate("min",0)),a.getPrivate("maxFinal", a.getPrivate("max",1)),a.getPrivate("step",1)),c=l.min,d=l.max;this.setPrivateRaw("maxZoomFactor",Math.max(1,Math.ceil((d-c)/g*this.get("maxZoomFactor",100))));this._fixZoomFactor();this.get("logarithmic")&&(this._minLogAdjusted=c,c=this._minReal,d=this._maxReal,0>=c&&(c=k*(1-Math.min(e,.99))));f.isNumber(c)&&f.isNumber(d)&&(this.getPrivate("minFinal")!==c||this.getPrivate("maxFinal")!==d)&&(this.setPrivate("minFinal",c),this.setPrivate("maxFinal",d),this._saveMinMax(c,d),e=this.get("interpolationDuration", 0),k=this.get("interpolationEasing"),this.animatePrivate({key:"min",to:c,duration:e,easing:k}),this.animatePrivate({key:"max",to:d,duration:e,easing:k}))}}_fixZoomFactor(){}_getDelta(a){this._deltaMinMax=Math.pow(10,Math.floor(Math.log(Math.abs(a))*Math.LOG10E))/10}_saveMinMax(a,b){}_adjustMinMax(a,b,c,d){1>=c&&(c=1);c=Math.round(c);let e=a,h=b;var g=b-a;0===g&&(g=Math.abs(b));var k=Math.log(Math.abs(g))*Math.LOG10E;k=Math.pow(10,Math.floor(k));var l=k/=10;d&&(l=0);d?(a=Math.floor(a/k)*k,b=Math.ceil(b/ k)*k):(a=Math.ceil(a/k)*k-l,b=Math.floor(b/k)*k+l);0>a&&0<=e&&(a=0);0=h&&(b=0);k=Math.log(Math.abs(g))*Math.LOG10E;k=Math.pow(10,Math.floor(k));k/=100;c=Math.ceil(g/c/k)*k;g=Math.pow(10,Math.floor(Math.log(Math.abs(c))*Math.LOG10E));k=Math.ceil(c/g);5=k&&2g&&(k=Math.round(Math.abs(Math.log(Math.abs(g))*Math.LOG10E))+1,c=f.round(c,k));g=Math.floor(a/ c);a=f.round(c*g,k);b=d?Math.floor(b/c):Math.ceil(b/c);b===g&&b++;b=f.round(c*b,k);be&&(a-=c);c=this.fixSmallStep(c);return{min:a,max:b,step:c}}getTooltipText(a,b){b=this.get("tooltipNumberFormat",this.get("numberFormat"));const c=this.getNumberFormatter();var d=this.get("extraTooltipPrecision",0);d=this.getPrivate("stepDecimalPlaces",0)+d;a=f.round(this.positionToValue(a),d);return b?c.format(a,b):c.format(a,void 0,d)}getSeriesItem(a,b){let c=this.getPrivate("name")+this.get("renderer").getPrivate("letter"), d=this.positionToValue(b),e=void 0,h;f.each(a.dataItems,(g,k)=>{g=Math.abs(g.get(c)-d);if(void 0===e||gp&&(p=0)):(n=b+l*k,0>=n&&0S._new(this._root,{themeTags:f.mergeTags(this.ticks.template.get("themeTags",[]),this.get("themeTags",[]))},[this.ticks.template]))});Object.defineProperty(this,"grid",{enumerable:!0,configurable:!0,writable:!0,value:new f.ListTemplate(f.Template.new({}),()=>J._new(this._root,{themeTags:f.mergeTags(this.grid.template.get("themeTags",[]),this.get("themeTags",[]))},[this.grid.template]))});Object.defineProperty(this,"axisFills",{enumerable:!0,configurable:!0,writable:!0,value:new f.ListTemplate(f.Template.new({}), ()=>f.Graphics._new(this._root,{themeTags:f.mergeTags(this.axisFills.template.get("themeTags",["axis","fill"]),this.get("themeTags",[]))},[this.axisFills.template]))});Object.defineProperty(this,"labels",{enumerable:!0,configurable:!0,writable:!0,value:new f.ListTemplate(f.Template.new({}),()=>R._new(this._root,{themeTags:f.mergeTags(this.labels.template.get("themeTags",[]),this.get("themeTags",[]))},[this.labels.template]))});Object.defineProperty(this,"axis",{enumerable:!0,configurable:!0,writable:!0, value:void 0});Object.defineProperty(this,"thumb",{enumerable:!0,configurable:!0,writable:!0,value:void 0})}makeTick(a,b){const c=this.ticks.make();c._setDataItem(a);a.setRaw("tick",c);c.set("themeTags",f.mergeTags(c.get("themeTags"),b));this.axis.labelsContainer.children.push(c);this.ticks.push(c);return c}makeGrid(a,b){const c=this.grid.make();c._setDataItem(a);a.setRaw("grid",c);c.set("themeTags",f.mergeTags(c.get("themeTags"),b));this.axis.gridContainer.children.push(c);this.grid.push(c);return c}makeAxisFill(a, b){const c=this.axisFills.make();c._setDataItem(a);c.set("themeTags",f.mergeTags(c.get("themeTags"),b));this.axis.gridContainer.children.push(c);a.setRaw("axisFill",c);this.axisFills.push(c);return c}makeLabel(a,b){const c=this.labels.make();c.set("themeTags",f.mergeTags(c.get("themeTags"),b));this.axis.labelsContainer.children.moveValue(c,0);c._setDataItem(a);a.setRaw("label",c);this.labels.push(c);return c}axisLength(){return 0}gridCount(){return this.axisLength()/this.get("minGridDistance",50)}_updatePositions(){}_afterNew(){super._afterNew(); this.set("isMeasured",!1);const a=this.thumb;a&&(this._disposers.push(a.events.on("pointerdown",b=>{this._handleThumbDown(b)})),this._disposers.push(a.events.on("globalpointerup",b=>{this._handleThumbUp(b)})),this._disposers.push(a.events.on("globalpointermove",b=>{this._handleThumbMove(b)})))}_beforeChanged(){super._beforeChanged();if(this.isDirty("minGridDistance"))this.root.events.once("frameended",()=>{this.axis.markDirtySize()})}_changed(){super._changed();if(this.isDirty("pan")){const a=this.thumb; if(a){const b=this.axis.labelsContainer,c=this.get("pan");"zoom"==c?b.children.push(a):"none"==c&&b.children.removeValue(a)}}}_handleThumbDown(a){this._thumbDownPoint=this.toLocal(a.point);a=this.axis;this._downStart=a.get("start");this._downEnd=a.get("end")}_handleThumbUp(a){this._thumbDownPoint=void 0}_handleThumbMove(a){var b=this._thumbDownPoint;if(b){const c=this.toLocal(a.point);a=this._downStart;const d=this._downEnd;b=this._getPan(c,b)*Math.min(1,d-a)/2;this.axis.zoom(a-b,d+b,0)}}_getPan(a, b){return 0}positionToCoordinate(a){return this._inversed?(this._end-a)*this._axisLength:(a-this._start)*this._axisLength}updateTooltipBounds(a){}_updateSize(){this.markDirty();this._clear=!0}toAxisPosition(a){const b=this._start||0,c=this._end||1;a*=c-b;return a=this.get("inversed")?c-a:b+a}toGlobalPosition(a){const b=this._start||0,c=this._end||1;a=this.get("inversed")?c-a:a-b;return a/=c-b}fixPosition(a){return this.get("inversed")?1-a:a}_updateLC(){}toggleVisibility(a,b,c,d){var e=this.axis;const h= e.get("start",0);e=e.get("end",1);bh+(e-h)*(d+1E-4)?a.setPrivate("visible",!1):a.setPrivate("visible",!0)}_positionTooltip(a,b){const c=this.chart;c&&(a.set("pointTo",this._display.toGlobal(b)),c.inPlot(b)||a.hide())}processAxis(){}}Object.defineProperty(I,"className",{enumerable:!0,configurable:!0,writable:!0,value:"AxisRenderer"});Object.defineProperty(I,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:f.Graphics.classNames.concat([I.className])});class T extends I{constructor(){super(...arguments); Object.defineProperty(this,"thumb",{enumerable:!0,configurable:!0,writable:!0,value:f.Rectangle.new(this._root,{width:f.p100,isMeasured:!1,themeTags:["axis","x","thumb"]})})}_afterNew(){this._settings.themeTags=f.mergeTags(this._settings.themeTags,["renderer","x"]);super._afterNew();this.setPrivateRaw("letter","X");const a=this.grid.template;a.set("height",f.p100);a.set("width",0);a.set("draw",(b,c)=>{b.moveTo(0,0);b.lineTo(0,c.height())});this.set("draw",(b,c)=>{b.moveTo(0,0);b.lineTo(c.width(), 0)})}_changed(){super._changed();const a=this.axis;a.ghostLabel.setPrivate("visible",!this.get("inside"));a.ghostLabel.set("x",-1E3);if(this.isDirty("opposite")||this.isDirty("inside")){var b=this.chart;const c=a.children;this.get("inside")?a.addTag("inside"):a.removeTag("inside");b&&(this.get("opposite")?(b=b.topAxesContainer.children,-1==b.indexOf(a)&&b.insertIndex(0,a),a.addTag("opposite"),c.moveValue(this)):(b=b.bottomAxesContainer.children,-1==b.indexOf(a)&&b.moveValue(a),a.removeTag("opposite"), c.moveValue(this,0)),a.ghostLabel._applyThemes(),this.labels.each(d=>{d._applyThemes()}),this.root._markDirtyRedraw());a.markDirtySize()}this.thumb.setPrivate("height",a.labelsContainer.height())}_getPan(a,b){return(b.x-a.x)/this.width()}toAxisPosition(a){const b=this._start||0,c=this._end||1;a-=this._ls;a=a*(c-b)/this._lc;return a=this.get("inversed")?c-a:b+a}toGlobalPosition(a){const b=this._start||0,c=this._end||1;a=this.get("inversed")?c-a:a-b;a=a/(c-b)*this._lc;return a+=this._ls}_updateLC(){const a= this.axis,b=a.parent;if(b){const c=b.innerWidth();this._lc=this.axisLength()/c;this._ls=(a.x()-b.get("paddingLeft",0))/c}}_updatePositions(){const a=this.axis;var b=a.x()-f.relativeToValue(a.get("centerX",0),a.width())-a.parent.get("paddingLeft",0);a.gridContainer.set("x",b);a.topGridContainer.set("x",b);a.bulletsContainer.set("y",this.y());if(b=a.chart){b=b.plotContainer;const c=a.axisHeader;let d=a.get("marginLeft",0),e=a.x()-d;const h=a.parent;h&&(e-=h.get("paddingLeft",0));0{g.moveTo(0,0);g.lineTo(0,h)});this.toggleVisibility(a,b,a.get("minPosition",0),a.get("maxPosition",1))}}updateLabel(a,b,c,d){if(a){let e=.5;e=f.isNumber(d)&&1{const e=this.axis.gridContainer.height(),h=this.width();ch||0>c||(d.moveTo(b,0),d.lineTo(c,0),d.lineTo(c,e),d.lineTo(b,e),d.lineTo(b,0))})}positionTooltip(a,b){this._positionTooltip(a,{x:this.positionToCoordinate(b),y:0})}updateTooltipBounds(a){var b=this.get("inside"),c=this._display.toGlobal({x:0,y:0}); let d=c.x,e=0,h=this.axisLength(),g="up";this.get("opposite")?b?(g="up",e=c.y):(g="down",e=c.y-1E5):b?(g="down",e=c.y-1E5):(g="up",e=c.y);b={left:d,right:d+h,top:e,bottom:e+1E5};c=a.get("bounds");f.sameBounds(b,c)||(a.set("bounds",b),a.set("pointerOrientation",g))}}Object.defineProperty(T,"className",{enumerable:!0,configurable:!0,writable:!0,value:"AxisRendererX"});Object.defineProperty(T,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:I.classNames.concat([T.className])});class U extends I{constructor(){super(...arguments); Object.defineProperty(this,"_downY",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"thumb",{enumerable:!0,configurable:!0,writable:!0,value:f.Rectangle.new(this._root,{height:f.p100,isMeasured:!1,themeTags:["axis","y","thumb"]})})}_afterNew(){this._settings.themeTags=f.mergeTags(this._settings.themeTags,["renderer","y"]);this._settings.opposite&&this._settings.themeTags.push("opposite");super._afterNew();this.setPrivateRaw("letter","Y");const a=this.grid.template; a.set("width",f.p100);a.set("height",0);a.set("draw",(b,c)=>{b.moveTo(0,0);b.lineTo(c.width(),0)});this.set("draw",(b,c)=>{b.moveTo(0,0);b.lineTo(0,c.height())})}_getPan(a,b){return(a.y-b.y)/this.height()}_changed(){super._changed();var a=this.axis;a.ghostLabel.setPrivate("visible",!this.get("inside"));a.ghostLabel.set("y",-1E3);const b=this.thumb,c=this.chart;if(this.isDirty("opposite")||this.isDirty("inside")){const e=a.children;this.get("inside")?a.addTag("inside"):a.removeTag("inside");if(c){if(this.get("opposite")){var d= c.rightAxesContainer.children;-1==d.indexOf(a)&&d.moveValue(a,0);a.addTag("opposite");e.moveValue(this,0)}else d=c.leftAxesContainer.children,-1==d.indexOf(a)&&d.moveValue(a),a.removeTag("opposite"),e.moveValue(this);a.ghostLabel._applyThemes();this.labels.each(h=>{h._applyThemes()});this.root._markDirtyRedraw()}a.markDirtySize()}a=a.labelsContainer.width();c&&(this.get("opposite")?b.set("centerX",0):b.set("centerX",a));b.setPrivate("width",a)}processAxis(){super.processAxis();const a=this.axis;null== a.get("height")&&a.set("height",f.p100);const b=this._root.horizontalLayout;a.set("layout",b);a.labelsContainer.set("height",f.p100);a.axisHeader.set("layout",b)}_updatePositions(){const a=this.axis;var b=a.y()-f.relativeToValue(a.get("centerY",0),a.height());a.gridContainer.set("y",b);a.topGridContainer.set("y",b);a.bulletsContainer.set("x",this.x());if(b=a.chart){b=b.plotContainer;const c=a.axisHeader;let d=a.get("marginTop",0);0{g.moveTo(0,0);g.lineTo(h,0)});this.toggleVisibility(a,b,a.get("minPosition",0),a.get("maxPosition",1))}}updateBullet(a,b,c){if(a){const h=a.get("sprite");if(h){f.isNumber(b)||(b=0);var d=a.get("location",.5);f.isNumber(c)&&c!=b&&(b+=(c-b)*d);c=this.axis.roundAxisPosition(b,d);var e=this.axis._bullets[c];d=1;this.get("opposite")&& (d=-1);a.get("stacked")&&(e?(e=e.get("sprite"))&&h.set("x",e.x()+e.width()*d):h.set("x",0));this.axis._bullets[c]=a;h.set("y",this.positionToCoordinate(b));this.toggleVisibility(h,b,0,1)}}}updateFill(a,b,c){a&&(f.isNumber(b)||(b=0),f.isNumber(c)||(c=1),b=this.positionToCoordinate(b),c=this.positionToCoordinate(c),this.fillDrawMethod(a,b,c))}fillDrawMethod(a,b,c){a.set("draw",d=>{const e=this.axis.gridContainer.width(),h=this.height();ch||0>c||(d.moveTo(0,b),d.lineTo(e,b),d.lineTo(e, c),d.lineTo(0,c),d.lineTo(0,b))})}positionToCoordinate(a){return this._inversed?(a-this._start)*this._axisLength:(this._end-a)*this._axisLength}positionTooltip(a,b){this._positionTooltip(a,{x:0,y:this.positionToCoordinate(b)})}updateTooltipBounds(a){var b=this.get("inside"),c=this._display.toGlobal({x:0,y:0});let d=c.y,e=0,h=this.axisLength(),g="right";this.get("opposite")?b?(g="right",e=c.x-1E5):(g="left",e=c.x):b?(g="left",e=c.x):(g="right",e=c.x-1E5);b={left:e,right:e+1E5,top:d,bottom:d+h};c=a.get("bounds"); f.sameBounds(b,c)||(a.set("bounds",b),a.set("pointerOrientation",g))}_updateLC(){const a=this.axis;var b=a.parent;b&&(b=b.innerHeight(),this._lc=this.axisLength()/b,this._ls=a.y()/b)}toAxisPosition(a){const b=this._start||0,c=this._end||1;a-=this._ls;a=a*(c-b)/this._lc;return a=this.get("inversed")?b+a:c-a}toGlobalPosition(a){const b=this._start||0,c=this._end||1;a=this.get("inversed")?a-b:c-a;a=a/(c-b)*this._lc;return a+=this._ls}fixPosition(a){return this.get("inversed")?a:1-a}}Object.defineProperty(U, "className",{enumerable:!0,configurable:!0,writable:!0,value:"AxisRendererY"});Object.defineProperty(U,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:I.classNames.concat([U.className])});class V extends K{constructor(){super(...arguments);Object.defineProperty(this,"_endIndex",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_strokeGenerator",{enumerable:!0,configurable:!0,writable:!0,value:fa()});Object.defineProperty(this,"_fillGenerator",{enumerable:!0, configurable:!0,writable:!0,value:oa()});Object.defineProperty(this,"_legendStroke",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_legendFill",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"strokes",{enumerable:!0,configurable:!0,writable:!0,value:new f.ListTemplate(f.Template.new({}),()=>f.Graphics._new(this._root,{themeTags:f.mergeTags(this.strokes.template.get("themeTags",[]),["line","series","stroke"])},[this.strokes.template]))}); Object.defineProperty(this,"fills",{enumerable:!0,configurable:!0,writable:!0,value:new f.ListTemplate(f.Template.new({}),()=>f.Graphics._new(this._root,{themeTags:f.mergeTags(this.strokes.template.get("themeTags",[]),["line","series","fill"])},[this.fills.template]))});Object.defineProperty(this,"_fillTemplate",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this,"_strokeTemplate",{enumerable:!0,configurable:!0,writable:!0,value:void 0});Object.defineProperty(this, "_previousPoint",{enumerable:!0,configurable:!0,writable:!0,value:[0,0,0,0]});Object.defineProperty(this,"_dindex",{enumerable:!0,configurable:!0,writable:!0,value:0});Object.defineProperty(this,"_sindex",{enumerable:!0,configurable:!0,writable:!0,value:0})}_afterNew(){this._fillGenerator.y0(function(a){return a[3]});this._fillGenerator.x0(function(a){return a[2]});this._fillGenerator.y1(function(a){return a[1]});this._fillGenerator.x1(function(a){return a[0]});super._afterNew()}makeStroke(a){const b= this.mainContainer.children.push(a.make());a.push(b);return b}makeFill(a){const b=this.mainContainer.children.push(a.make());a.push(b);return b}_updateChildren(){this._fillTemplate=this._strokeTemplate=void 0;var a=this.get("xAxis"),b=this.get("yAxis");if(this.isDirty("stroke")){var c=this.get("stroke");this.strokes.template.set("stroke",c);var d=this._legendStroke;d&&d.states.lookup("default").set("stroke",c)}this.isDirty("fill")&&(c=this.get("fill"),this.fills.template.set("fill",c),(d=this._legendFill)&& d.states.lookup("default").set("fill",c));this.isDirty("curveFactory")&&(c=this.get("curveFactory"))&&(this._strokeGenerator.curve(c),this._fillGenerator.curve(c));if(a.inited&&b.inited){if(this._axesDirty||this._valuesDirty||this._stackDirty||this.isDirty("vcx")||this.isDirty("vcy")||this._sizeDirty||this.isDirty("connect")||this.isDirty("curveFactory")){this.fills.each(h=>{h.setPrivate("visible",!1)});this.strokes.each(h=>{h.setPrivate("visible",!1)});this.axisRanges.each(h=>{let g=h.fills;g&&g.each(k=> {k.setPrivate("visible",!1)});(h=h.strokes)&&h.each(k=>{k.setPrivate("visible",!1)})});a=this.startIndex();b=this.strokes.template.get("templateField");c=this.fills.template.get("templateField");let e=d=!0;b&&(d=!1);c&&(e=!1);for(let h=a-1;0<=h;h--){let g=this.dataItems[h],k=!0,l=g.dataContext;b&&l[b]&&(d=!0);c&&l[c]&&(e=!0);f.each(this._valueFields,p=>{f.isNumber(g.get(p))||(k=!1)});if(k&&d&&e){a=h;break}}b=this.dataItems.length;c=this.endIndex();if(c{f.isNumber(h.get(k))||(g=!1)});if(g){c=d+1;break}}0a){c=C;break}else W=n,g.template=n;if(ia&&(n=p.dataContext[ia]))if(n instanceof f.Template||(n=f.Template.new(n)),this._fillTemplate=n,C>a){c=C;break}else X=n,h.template=n;e||(n=this.dataItems[C+1])&&k.shouldGap(p,n,d,D)&&(F=[],E.push(F),l.points=F)}h.setRaw("userData",[a,C]);g.setRaw("userData",[a,C]);C===b&&this._endLine(F,E[0][0]);g&&this._drawStroke(g,E);h&&this._drawFill(h,E);this.axisRanges.each(G=>{const Y=G.container,M=this.makeFill(G.fills);Y&&Y.children.push(M);M.setPrivate("visible", !0);this._drawFill(M,E);G=this.makeStroke(G.strokes);Y&&Y.children.push(G);W&&W!=this.strokes.template&&(G.template=W);X&&X!=this.fills.template&&(M.template=X);G.setPrivate("visible",!0);this._drawStroke(G,E);M.setRaw("userData",[a,C]);G.setRaw("userData",[a,C])})}_getPoints(a,b){let c=b.points;var d=a.get("locationX",b.locationX),e=a.get("locationY",b.locationY);d=b.xAxis.getDataItemPositionX(a,b.xField,d,b.vcx);var h=b.yAxis.getDataItemPositionY(a,b.yField,e,b.vcy);if(this._shouldInclude(d)){var g= this.getPoint(d,h);e=[g.x,g.y];g.x+=this._x;g.y+=this._y;a.set("point",g);if(b.fillVisible){b.baseAxis===b.xAxis?h=b.basePosY:b.baseAxis===b.yAxis&&(d=b.basePosX);if(b.getOpen){g=a.get(b.xOpenField);var k=a.get(b.yOpenField);null!=g&&null!=k&&(d=a.get("openLocationX",b.openLocationX),h=a.get("openLocationY",b.openLocationY),b.stacked?(k=a.get("stackToItemX"),g=a.get("stackToItemY"),k?(d=b.xAxis.getDataItemPositionX(k,b.xField,d,k.component.get("vcx")),f.isNaN(d)&&(d=b.basePosX)):d=b.yAxis===b.baseAxis? b.basePosX:b.xAxis.getDataItemPositionX(a,b.xOpenField,d,b.vcx),g?(h=b.yAxis.getDataItemPositionY(g,b.yField,h,g.component.get("vcy")),f.isNaN(h)&&(h=b.basePosY)):h=b.xAxis===b.baseAxis?b.basePosY:b.yAxis.getDataItemPositionY(a,b.yOpenField,h,b.vcy)):(d=b.xAxis.getDataItemPositionX(a,b.xOpenField,d,b.vcx),h=b.yAxis.getDataItemPositionY(a,b.yOpenField,h,b.vcy)))}a=this.getPoint(d,h);e[2]=a.x;e[3]=a.y}if(0b.minDistance||a&&d&&Math.hypot(a-g,d-k)>b.minDistance)c.push(e),this._previousPoint=e}else c.push(e)}}_endLine(a,b){}_drawStroke(a,b){a.get("visible")&&!a.get("forceHidden")&&a.set("draw",c=>{f.each(b,d=>{this._strokeGenerator.context(c);this._strokeGenerator(d)})})}_drawFill(a,b){a.get("visible")&&!a.get("forceHidden")&&a.set("draw",c=>{f.each(b,d=>{this._fillGenerator.context(c);this._fillGenerator(d)})})}_processAxisRange(a){super._processAxisRange(a);a.fills=new f.ListTemplate(f.Template.new({}), ()=>f.Graphics._new(this._root,{themeTags:f.mergeTags(a.fills.template.get("themeTags",[]),["line","series","fill"])},[this.fills.template,a.fills.template]));a.strokes=new f.ListTemplate(f.Template.new({}),()=>f.Graphics._new(this._root,{themeTags:f.mergeTags(a.strokes.template.get("themeTags",[]),["line","series","stroke"])},[this.strokes.template,a.strokes.template]))}createLegendMarker(a){if(a=this.get("legendDataItem")){const c=a.get("marker");(a=a.get("markerRectangle"))&&a.setPrivate("visible", !1);c.set("background",f.Rectangle.new(c._root,{fillOpacity:0,fill:f.color(0)}));var b=c.children.push(f.Graphics._new(c._root,{themeTags:["line","series","legend","marker","stroke"],interactive:!1},[this.strokes.template]));this._legendStroke=b;const d=c.children.push(f.Graphics._new(c._root,{themeTags:["line","series","legend","marker","fill"]},[this.fills.template]));this._legendFill=d;a=this._root.interfaceColors.get("disabled");b.states.create("disabled",{fill:a,stroke:a});d.states.create("disabled", {fill:a,stroke:a});if(0{e.setAll({x:c.width()/2,y:c.height()/2})}))}}}}Object.defineProperty(V,"className",{enumerable:!0,configurable:!0,writable:!0, value:"LineSeries"});Object.defineProperty(V,"classNames",{enumerable:!0,configurable:!0,writable:!0,value:K.classNames.concat([V.className])});H.Axis=L;H.AxisRendererX=T;H.AxisRendererY=U;H.LineSeries=V;H.ValueAxis=Q;H.XYChart=O;H.XYCursor=P;H.XYSeries=K});