this.wheelDelay&&(this.executeMouseWheelZoom(i),s.globals.lastWheelExecution=r),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){r-s.globals.lastWheelExecution>a.wheelDelay&&(a.executeMouseWheelZoom(i),s.globals.lastWheelExecution=r)},this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(i){var a,s=this.w;this.minX=s.globals.isRangeBar?s.globals.minY:s.globals.minX,this.maxX=s.globals.isRangeBar?s.globals.maxY:s.globals.maxX;var r=(a=this.gridRect)===null||a===void 0?void 0:a.getBoundingClientRect();if(r){var o,l,h,c=(i.clientX-r.left)/r.width,d=this.minX,u=this.maxX,g=u-d;if(i.deltaY<0){var f=d+c*g;l=f-(o=.5*g)/2,h=f+o/2}else l=d-(o=1.5*g)/2,h=u+o/2;if(!s.globals.isRangeBar){l=Math.max(l,s.globals.initialMinX),h=Math.min(h,s.globals.initialMaxX);var p=.01*(s.globals.initialMaxX-s.globals.initialMinX);if(h-l0&&s.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(r,o,l,h,c){return c==="l"||c==="r"?r.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):r.circle(0)},updateHandle:function(r,o){return r.center(o[0],o[1])}}).resize().on("resize",function(){var r=a.globals.zoomEnabled?a.config.chart.zoom.type:a.config.chart.selection.type;i.handleMouseUp({zoomtype:r,isResized:!0})}))}}},{key:"preselectedSelection",value:function(){var i=this.w,a=this.xyRatios;if(!i.globals.zoomEnabled){if(i.globals.selection!==void 0&&i.globals.selection!==null)this.drawSelectionRect(O(O({},i.globals.selection),{},{translateX:i.globals.translateX,translateY:i.globals.translateY}));else if(i.config.chart.selection.xaxis.min!==void 0&&i.config.chart.selection.xaxis.max!==void 0){var s=(i.config.chart.selection.xaxis.min-i.globals.minX)/a.xRatio,r=i.globals.gridWidth-(i.globals.maxX-i.config.chart.selection.xaxis.max)/a.xRatio-s;i.globals.isRangeBar&&(s=(i.config.chart.selection.xaxis.min-i.globals.yAxisScale[0].niceMin)/a.invertedYRatio,r=(i.config.chart.selection.xaxis.max-i.config.chart.selection.xaxis.min)/a.invertedYRatio);var o={x:s,y:0,width:r,height:i.globals.gridHeight,translateX:i.globals.translateX,translateY:i.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(o),this.makeSelectionRectDraggable(),typeof i.config.chart.events.selection=="function"&&i.config.chart.events.selection(this.ctx,{xaxis:{min:i.config.chart.selection.xaxis.min,max:i.config.chart.selection.xaxis.max},yaxis:{}})}}}},{key:"drawSelectionRect",value:function(i){var a=i.x,s=i.y,r=i.width,o=i.height,l=i.translateX,h=l===void 0?0:l,c=i.translateY,d=c===void 0?0:c,u=this.w,g=this.zoomRect,f=this.selectionRect;if(this.dragged||u.globals.selection!==null){var p={transform:"translate("+h+", "+d+")"};u.globals.zoomEnabled&&this.dragged&&(r<0&&(r=1),g.attr({x:a,y:s,width:r,height:o,fill:u.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":u.config.chart.zoom.zoomedArea.fill.opacity,stroke:u.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":u.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":u.config.chart.zoom.zoomedArea.stroke.opacity}),R.setAttrs(g.node,p)),u.globals.selectionEnabled&&(f.attr({x:a,y:s,width:r>0?r:0,height:o>0?o:0,fill:u.config.chart.selection.fill.color,"fill-opacity":u.config.chart.selection.fill.opacity,stroke:u.config.chart.selection.stroke.color,"stroke-width":u.config.chart.selection.stroke.width,"stroke-dasharray":u.config.chart.selection.stroke.dashArray,"stroke-opacity":u.config.chart.selection.stroke.opacity}),R.setAttrs(f.node,p))}}},{key:"hideSelectionRect",value:function(i){i&&i.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(i){var a=i.context,s=i.zoomtype,r=this.w,o=a,l=this.gridRect.getBoundingClientRect(),h=o.startX-1,c=o.startY,d=!1,u=!1,g=o.clientX-l.left-r.globals.barPadForNumericAxis,f=o.clientY-l.top,p=g-h,x=f-c,b={translateX:r.globals.translateX,translateY:r.globals.translateY};return Math.abs(p+h)>r.globals.gridWidth?p=r.globals.gridWidth-h:g<0&&(p=h),h>g&&(d=!0,p=Math.abs(p)),c>f&&(u=!0,x=Math.abs(x)),b=O(O({},b=s==="x"?{x:d?h-p:h,y:0,width:p,height:r.globals.gridHeight}:s==="y"?{x:0,y:u?c-x:c,width:r.globals.gridWidth,height:x}:{x:d?h-p:h,y:u?c-x:c,width:p,height:x}),{},{translateX:r.globals.translateX,translateY:r.globals.translateY}),o.drawSelectionRect(b),o.selectionDragging("resizing"),b}},{key:"selectionDragging",value:function(i,a){var s=this,r=this.w;if(a){a.preventDefault();var o=a.detail,l=o.handler,h=o.box,c=h.x,d=h.y;cthis.constraints.x2&&(c=this.constraints.x2-h.w),h.y2>this.constraints.y2&&(d=this.constraints.y2-h.h),l.move(c,d);var u=this.xyRatios,g=this.selectionRect,f=0;i==="resizing"&&(f=30);var p=function(b){return parseFloat(g.node.getAttribute(b))},x={x:p("x"),y:p("y"),width:p("width"),height:p("height")};r.globals.selection=x,typeof r.config.chart.events.selection=="function"&&r.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(function(){var b,m,y,k,v=s.gridRect.getBoundingClientRect(),C=g.node.getBoundingClientRect();r.globals.isRangeBar?(b=r.globals.yAxisScale[0].niceMin+(C.left-v.left)*u.invertedYRatio,m=r.globals.yAxisScale[0].niceMin+(C.right-v.left)*u.invertedYRatio,y=0,k=1):(b=r.globals.xAxisScale.niceMin+(C.left-v.left)*u.xRatio,m=r.globals.xAxisScale.niceMin+(C.right-v.left)*u.xRatio,y=r.globals.yAxisScale[0].niceMin+(v.bottom-C.bottom)*u.yRatio[0],k=r.globals.yAxisScale[0].niceMax-(C.top-v.top)*u.yRatio[0]);var w={xaxis:{min:b,max:m},yaxis:{min:y,max:k}};r.config.chart.events.selection(s.ctx,w),r.config.chart.brush.enabled&&r.config.chart.events.brushScrolled!==void 0&&r.config.chart.events.brushScrolled(s.ctx,w)},f))}}},{key:"selectionDrawn",value:function(i){var a,s,r=i.context,o=i.zoomtype,l=this.w,h=r,c=this.xyRatios,d=this.ctx.toolbar,u=l.globals.zoomEnabled?h.zoomRect.node.getBoundingClientRect():h.selectionRect.node.getBoundingClientRect(),g=h.gridRect.getBoundingClientRect(),f=u.left-g.left-l.globals.barPadForNumericAxis,p=u.right-g.left-l.globals.barPadForNumericAxis,x=u.top-g.top,b=u.bottom-g.top;l.globals.isRangeBar?(a=l.globals.yAxisScale[0].niceMin+f*c.invertedYRatio,s=l.globals.yAxisScale[0].niceMin+p*c.invertedYRatio):(a=l.globals.xAxisScale.niceMin+f*c.xRatio,s=l.globals.xAxisScale.niceMin+p*c.xRatio);var m=[],y=[];if(l.config.yaxis.forEach(function(M,P){var T=l.globals.seriesYAxisMap[P][0],I=l.globals.yAxisScale[P].niceMax-c.yRatio[T]*x,z=l.globals.yAxisScale[P].niceMax-c.yRatio[T]*b;m.push(I),y.push(z)}),h.dragged&&(h.dragX>10||h.dragY>10)&&a!==s){if(l.globals.zoomEnabled){var k=L.clone(l.globals.initialConfig.yaxis),v=L.clone(l.globals.initialConfig.xaxis);if(l.globals.zoomed=!0,l.config.xaxis.convertedCatToNumeric&&(a=Math.floor(a),s=Math.floor(s),a<1&&(a=1,s=l.globals.dataPoints),s-a<2&&(s=a+1)),o!=="xy"&&o!=="x"||(v={min:a,max:s}),o!=="xy"&&o!=="y"||k.forEach(function(M,P){k[P].min=y[P],k[P].max=m[P]}),d){var C=d.getBeforeZoomRange(v,k);C&&(v=C.xaxis?C.xaxis:v,k=C.yaxis?C.yaxis:k)}var w={xaxis:v};l.config.chart.group||(w.yaxis=k),h.ctx.updateHelpers._updateOptions(w,!1,h.w.config.chart.animations.dynamicAnimation.enabled),typeof l.config.chart.events.zoomed=="function"&&d.zoomCallback(v,k)}else if(l.globals.selectionEnabled){var A,S=null;A={min:a,max:s},o!=="xy"&&o!=="y"||(S=L.clone(l.config.yaxis)).forEach(function(M,P){S[P].min=y[P],S[P].max=m[P]}),l.globals.selection=h.selection,typeof l.config.chart.events.selection=="function"&&l.config.chart.events.selection(h.ctx,{xaxis:A,yaxis:S})}}}},{key:"panDragging",value:function(i){var a=i.context,s=this.w,r=a;if(s.globals.lastClientPosition.x!==void 0){var o=s.globals.lastClientPosition.x-r.clientX,l=s.globals.lastClientPosition.y-r.clientY;Math.abs(o)>Math.abs(l)&&o>0?this.moveDirection="left":Math.abs(o)>Math.abs(l)&&o<0?this.moveDirection="right":Math.abs(l)>Math.abs(o)&&l>0?this.moveDirection="up":Math.abs(l)>Math.abs(o)&&l<0&&(this.moveDirection="down")}s.globals.lastClientPosition={x:r.clientX,y:r.clientY};var h=s.globals.isRangeBar?s.globals.minY:s.globals.minX,c=s.globals.isRangeBar?s.globals.maxY:s.globals.maxX;r.panScrolled(h,c)}},{key:"panScrolled",value:function(i,a){var s=this.w,r=this.xyRatios,o=L.clone(s.globals.initialConfig.yaxis),l=r.xRatio,h=s.globals.minX,c=s.globals.maxX;s.globals.isRangeBar&&(l=r.invertedYRatio,h=s.globals.minY,c=s.globals.maxY),this.moveDirection==="left"?(i=h+s.globals.gridWidth/15*l,a=c+s.globals.gridWidth/15*l):this.moveDirection==="right"&&(i=h-s.globals.gridWidth/15*l,a=c-s.globals.gridWidth/15*l),s.globals.isRangeBar||(is.globals.initialMaxX)&&(i=h,a=c);var d={xaxis:{min:i,max:a}};s.config.chart.group||(d.yaxis=o),this.updateScrolledChart(d,i,a)}},{key:"updateScrolledChart",value:function(i,a,s){var r=this.w;if(this.ctx.updateHelpers._updateOptions(i,!1,!1),typeof r.config.chart.events.scrolled=="function"){var o={xaxis:{min:a,max:s}};r.config.chart.events.scrolled(this.ctx,o),this.ctx.events.fireEvent("scrolled",o)}}}]),t}(),ws=function(){function n(e){Y(this,n),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return F(n,[{key:"getNearestValues",value:function(e){var t=e.hoverArea,i=e.elGrid,a=e.clientX,s=e.clientY,r=this.w,o=i.getBoundingClientRect(),l=o.width,h=o.height,c=l/(r.globals.dataPoints-1),d=h/r.globals.dataPoints,u=this.hasBars();!r.globals.comboCharts&&!u||r.config.xaxis.convertedCatToNumeric||(c=l/r.globals.dataPoints);var g=a-o.left-r.globals.barPadForNumericAxis,f=s-o.top;g<0||f<0||g>l||f>h?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):r.globals.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):r.globals.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));var p=Math.round(g/c),x=Math.floor(f/d);u&&!r.config.xaxis.convertedCatToNumeric&&(p=Math.ceil(g/c),p-=1);var b=null,m=null,y=r.globals.seriesXvalues.map(function(A){return A.filter(function(S){return L.isNumber(S)})}),k=r.globals.seriesYvalues.map(function(A){return A.filter(function(S){return L.isNumber(S)})});if(r.globals.isXNumeric){var v=this.ttCtx.getElGrid().getBoundingClientRect(),C=g*(v.width/l),w=f*(v.height/h);b=(m=this.closestInMultiArray(C,w,y,k)).index,p=m.j,b!==null&&r.globals.hasNullValues&&(y=r.globals.seriesXvalues[b],p=(m=this.closestInArray(C,y)).j)}return r.globals.capturedSeriesIndex=b===null?-1:b,(!p||p<1)&&(p=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=x:r.globals.capturedDataPointIndex=p,{capturedSeries:b,j:r.globals.isBarHorizontal?x:p,hoverX:g,hoverY:f}}},{key:"getFirstActiveXArray",value:function(e){for(var t=this.w,i=0,a=e.map(function(r,o){return r.length>0?o:-1}),s=0;s0)for(var a=0;a *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0&&arguments[0],i=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");i=ge(i),t&&(i=i.filter(function(s){var r=Number(s.getAttribute("data:realIndex"));return e.w.globals.collapsedSeriesIndices.indexOf(r)===-1})),i.sort(function(s,r){var o=Number(s.getAttribute("data:realIndex")),l=Number(r.getAttribute("data:realIndex"));return lo?-1:0});var a=[];return i.forEach(function(s){a.push(s.querySelector(".apexcharts-marker"))}),a}},{key:"hasMarkers",value:function(e){return this.getElMarkers(e).length>0}},{key:"getPathFromPoint",value:function(e,t){var i=Number(e.getAttribute("cx")),a=Number(e.getAttribute("cy")),s=e.getAttribute("shape");return new R(this.ctx).getMarkerPath(i,a,s,t)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(e){var t=this.w,i=t.config.markers.hover.size;return i===void 0&&(i=t.globals.markers.size[e]+t.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(e){var t=this.w,i=this.ttCtx;i.allTooltipSeriesGroups.length===0&&(i.allTooltipSeriesGroups=t.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,s=0;s";u.forEach(function(M,P){A+=' ').concat(M.attrs.name,"
"),S+="".concat(M.val,"
")}),y.innerHTML=A+"",k.innerHTML=S+""};o?h.globals.seriesGoals[t][i]&&Array.isArray(h.globals.seriesGoals[t][i])?v():(y.innerHTML="",k.innerHTML=""):v()}else y.innerHTML="",k.innerHTML="";if(p!==null&&(a[t].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=h.config.tooltip.z.title,a[t].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=p!==void 0?p:""),o&&x[0]){if(h.config.tooltip.hideEmptySeries){var C=a[t].querySelector(".apexcharts-tooltip-marker"),w=a[t].querySelector(".apexcharts-tooltip-text");parseFloat(d)==0?(C.style.display="none",w.style.display="none"):(C.style.display="block",w.style.display="block")}d==null||h.globals.ancillaryCollapsedSeriesIndices.indexOf(t)>-1||h.globals.collapsedSeriesIndices.indexOf(t)>-1||Array.isArray(c.tConfig.enabledOnSeries)&&c.tConfig.enabledOnSeries.indexOf(t)===-1?x[0].parentNode.style.display="none":x[0].parentNode.style.display=h.config.tooltip.items.display}else Array.isArray(c.tConfig.enabledOnSeries)&&c.tConfig.enabledOnSeries.indexOf(t)===-1&&(x[0].parentNode.style.display="none")}},{key:"toggleActiveInactiveSeries",value:function(e,t){var i=this.w;if(e)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var a=i.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group-".concat(t));a&&(a.classList.add("apexcharts-active"),a.style.display=i.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(e){var t=e.i,i=e.j,a=this.w,s=this.ctx.series.filteredSeriesX(),r="",o="",l=null,h=null,c={series:a.globals.series,seriesIndex:t,dataPointIndex:i,w:a},d=a.globals.ttZFormatter;i===null?h=a.globals.series[t]:a.globals.isXNumeric&&a.config.chart.type!=="treemap"?(r=s[t][i],s[t].length===0&&(r=s[this.tooltipUtil.getFirstActiveXArray(s)][i])):r=new ca(this.ctx).isFormatXY()?a.config.series[t].data[i]!==void 0?a.config.series[t].data[i].x:"":a.globals.labels[i]!==void 0?a.globals.labels[i]:"";var u=r;return a.globals.isXNumeric&&a.config.xaxis.type==="datetime"?r=new $t(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,u,u,{i:void 0,dateFormatter:new pe(this.ctx).formatDate,w:this.w}):r=a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](u,c):a.globals.xLabelFormatter(u,c),a.config.tooltip.x.formatter!==void 0&&(r=a.globals.ttKeyFormatter(u,c)),a.globals.seriesZ.length>0&&a.globals.seriesZ[t].length>0&&(l=d(a.globals.seriesZ[t][i],a)),o=typeof a.config.xaxis.tooltip.formatter=="function"?a.globals.xaxisTooltipFormatter(u,c):r,{val:Array.isArray(h)?h.join(" "):h,xVal:Array.isArray(r)?r.join(" "):r,xAxisTTVal:Array.isArray(o)?o.join(" "):o,zVal:l}}},{key:"handleCustomTooltip",value:function(e){var t=e.i,i=e.j,a=e.y1,s=e.y2,r=e.w,o=this.ttCtx.getElTooltip(),l=r.config.tooltip.custom;Array.isArray(l)&&l[t]&&(l=l[t]);var h=l({ctx:this.ctx,series:r.globals.series,seriesIndex:t,dataPointIndex:i,y1:a,y2:s,w:r});typeof h=="string"||typeof h=="number"?o.innerHTML=h:(h instanceof Element||typeof h.nodeName=="string")&&(o.innerHTML="",o.appendChild(h.cloneNode(!0)))}}]),n}(),ks=function(){function n(e){Y(this,n),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return F(n,[{key:"moveXCrosshairs",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,i=this.ttCtx,a=this.w,s=i.getElXCrosshairs(),r=e-i.xcrosshairsWidth/2,o=a.globals.labels.slice().length;if(t!==null&&(r=a.globals.gridWidth/o*t),s===null||a.globals.isBarHorizontal||(s.setAttribute("x",r),s.setAttribute("x1",r),s.setAttribute("x2",r),s.setAttribute("y2",a.globals.gridHeight),s.classList.add("apexcharts-active")),r<0&&(r=0),r>a.globals.gridWidth&&(r=a.globals.gridWidth),i.isXAxisTooltipEnabled){var l=r;a.config.xaxis.crosshairs.width!=="tickWidth"&&a.config.xaxis.crosshairs.width!=="barWidth"||(l=r+i.xcrosshairsWidth/2),this.moveXAxisTooltip(l)}}},{key:"moveYCrosshairs",value:function(e){var t=this.ttCtx;t.ycrosshairs!==null&&R.setAttrs(t.ycrosshairs,{y1:e,y2:e}),t.ycrosshairsHidden!==null&&R.setAttrs(t.ycrosshairsHidden,{y1:e,y2:e})}},{key:"moveXAxisTooltip",value:function(e){var t=this.w,i=this.ttCtx;if(i.xaxisTooltip!==null&&i.xcrosshairsWidth!==0){i.xaxisTooltip.classList.add("apexcharts-active");var a=i.xaxisOffY+t.config.xaxis.tooltip.offsetY+t.globals.translateY+1+t.config.xaxis.offsetY;if(e-=i.xaxisTooltip.getBoundingClientRect().width/2,!isNaN(e)){e+=t.globals.translateX;var s;s=new R(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=s.width+"px",i.xaxisTooltip.style.left=e+"px",i.xaxisTooltip.style.top=a+"px"}}}},{key:"moveYAxisTooltip",value:function(e){var t=this.w,i=this.ttCtx;i.yaxisTTEls===null&&(i.yaxisTTEls=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var a=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),s=t.globals.translateY+a,r=i.yaxisTTEls[e].getBoundingClientRect(),o=r.height,l=t.globals.translateYAxisX[e]-2;t.config.yaxis[e].opposite&&(l-=r.width),s-=o/2,t.globals.ignoreYAxisIndexes.indexOf(e)===-1&&s>0&&s2&&arguments[2]!==void 0?arguments[2]:null,a=this.w,s=this.ttCtx,r=s.getElTooltip(),o=s.tooltipRect,l=i!==null?parseFloat(i):1,h=parseFloat(e)+l+5,c=parseFloat(t)+l/2;if(h>a.globals.gridWidth/2&&(h=h-o.ttWidth-l-10),h>a.globals.gridWidth-o.ttWidth-10&&(h=a.globals.gridWidth-o.ttWidth),h<-20&&(h=-20),a.config.tooltip.followCursor){var d=s.getElGrid().getBoundingClientRect();(h=s.e.clientX-d.left)>a.globals.gridWidth/2&&(h-=s.tooltipRect.ttWidth),(c=s.e.clientY+a.globals.translateY-d.top)>a.globals.gridHeight/2&&(c-=s.tooltipRect.ttHeight)}else a.globals.isBarHorizontal||o.ttHeight/2+c>a.globals.gridHeight&&(c=a.globals.gridHeight-o.ttHeight+a.globals.translateY);isNaN(h)||(h+=a.globals.translateX,r.style.left=h+"px",r.style.top=c+"px")}},{key:"moveMarkers",value:function(e,t){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[e]>0)for(var s=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-marker")),r=0;r0){var f=g.getAttribute("shape"),p=h.getMarkerPath(s,r,f,1.5*d);g.setAttribute("d",p)}this.moveXCrosshairs(s),l.fixedTooltip||this.moveTooltip(s,r,d)}}},{key:"moveDynamicPointsOnHover",value:function(e){var t,i=this.ttCtx,a=i.w,s=0,r=0,o=a.globals.pointsArray,l=new Pe(this.ctx),h=new R(this.ctx);t=l.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var c=i.tooltipUtil.getHoverMarkerSize(t);if(o[t]&&(s=o[t][e][0],r=o[t][e][1]),!isNaN(s)){var d=i.tooltipUtil.getAllMarkers();if(d.length)for(var u=0;u0){var m=h.getMarkerPath(s,f,x,c);d[u].setAttribute("d",m)}else d[u].setAttribute("d","")}}this.moveXCrosshairs(s),i.fixedTooltip||this.moveTooltip(s,r||a.globals.gridHeight,c)}}},{key:"moveStickyTooltipOverBars",value:function(e,t){var i=this.w,a=this.ttCtx,s=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length;i.config.chart.stacked&&(s=i.globals.barGroups.length);var r=s>=2&&s%2==0?Math.floor(s/2):Math.floor(s/2)+1;i.globals.isBarHorizontal&&(r=new Pe(this.ctx).getActiveConfigSeriesIndex("desc")+1);var o=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r,"'] path[j='").concat(e,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(e,"']"));o||typeof t!="number"||(o=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(t,"'] path[j='").concat(e,`'],
- .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='`).concat(t,"'] path[j='").concat(e,`'],
- .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='`).concat(t,"'] path[j='").concat(e,`'],
- .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='`).concat(t,"'] path[j='").concat(e,"']")));var l=o?parseFloat(o.getAttribute("cx")):0,h=o?parseFloat(o.getAttribute("cy")):0,c=o?parseFloat(o.getAttribute("barWidth")):0,d=a.getElGrid().getBoundingClientRect(),u=o&&(o.classList.contains("apexcharts-candlestick-area")||o.classList.contains("apexcharts-boxPlot-area"));i.globals.isXNumeric?(o&&!u&&(l-=s%2!=0?c/2:0),o&&u&&(l-=c/2)):i.globals.isBarHorizontal||(l=a.xAxisTicksPositions[e-1]+a.dataPointsDividedWidth/2,isNaN(l)&&(l=a.xAxisTicksPositions[e]-a.dataPointsDividedWidth/2)),i.globals.isBarHorizontal?h-=a.tooltipRect.ttHeight:i.config.tooltip.followCursor?h=a.e.clientY-d.top-a.tooltipRect.ttHeight/2:h+a.tooltipRect.ttHeight+15>i.globals.gridHeight&&(h=i.globals.gridHeight),i.globals.isBarHorizontal||this.moveXCrosshairs(l),a.fixedTooltip||this.moveTooltip(l,h||i.globals.gridHeight)}}]),n}(),an=function(){function n(e){Y(this,n),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new ks(e)}return F(n,[{key:"drawDynamicPoints",value:function(){var e=this.w,t=new R(this.ctx),i=new At(this.ctx),a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=ge(a),e.config.chart.stacked&&a.sort(function(d,u){return parseFloat(d.getAttribute("data:realIndex"))-parseFloat(u.getAttribute("data:realIndex"))});for(var s=0;s2&&arguments[2]!==void 0?arguments[2]:null,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,s=this.w;s.config.chart.type!=="bubble"&&this.newPointSize(e,t);var r=t.getAttribute("cx"),o=t.getAttribute("cy");if(i!==null&&a!==null&&(r=i,o=a),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if(s.config.chart.type==="radar"){var l=this.ttCtx.getElGrid().getBoundingClientRect();r=this.ttCtx.e.clientX-l.left}this.tooltipPosition.moveTooltip(r,o,s.config.markers.hover.size)}}},{key:"enlargePoints",value:function(e){for(var t=this.w,i=this,a=this.ttCtx,s=e,r=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),o=t.config.markers.hover.size,l=0;l0){var a=this.ttCtx.tooltipUtil.getPathFromPoint(e[t],i);e[t].setAttribute("d",a)}else e[t].setAttribute("d","M0,0")}}}]),n}(),sn=function(){function n(e){Y(this,n),this.w=e.w;var t=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&t.config.chart.type==="rangeBar"&&t.config.plotOptions.bar.rangeBarGroupRows}return F(n,[{key:"getAttr",value:function(e,t){return parseFloat(e.target.getAttribute(t))}},{key:"handleHeatTreeTooltip",value:function(e){var t=e.e,i=e.opt,a=e.x,s=e.y,r=e.type,o=this.ttCtx,l=this.w;if(t.target.classList.contains("apexcharts-".concat(r,"-rect"))){var h=this.getAttr(t,"i"),c=this.getAttr(t,"j"),d=this.getAttr(t,"cx"),u=this.getAttr(t,"cy"),g=this.getAttr(t,"width"),f=this.getAttr(t,"height");if(o.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:h,j:c,shared:!1,e:t}),l.globals.capturedSeriesIndex=h,l.globals.capturedDataPointIndex=c,a=d+o.tooltipRect.ttWidth/2+g,s=u+o.tooltipRect.ttHeight/2-f/2,o.tooltipPosition.moveXCrosshairs(d+g/2),a>l.globals.gridWidth/2&&(a=d-o.tooltipRect.ttWidth/2+g),o.w.config.tooltip.followCursor){var p=l.globals.dom.elWrap.getBoundingClientRect();a=l.globals.clientX-p.left-(a>l.globals.gridWidth/2?o.tooltipRect.ttWidth:0),s=l.globals.clientY-p.top-(s>l.globals.gridHeight/2?o.tooltipRect.ttHeight:0)}}return{x:a,y:s}}},{key:"handleMarkerTooltip",value:function(e){var t,i,a=e.e,s=e.opt,r=e.x,o=e.y,l=this.w,h=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var c=parseInt(s.paths.getAttribute("cx"),10),d=parseInt(s.paths.getAttribute("cy"),10),u=parseFloat(s.paths.getAttribute("val"));if(i=parseInt(s.paths.getAttribute("rel"),10),t=parseInt(s.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,h.intersect){var g=L.findAncestor(s.paths,"apexcharts-series");g&&(t=parseInt(g.getAttribute("data:realIndex"),10))}if(h.tooltipLabels.drawSeriesTexts({ttItems:s.ttItems,i:t,j:i,shared:!h.showOnIntersect&&l.config.tooltip.shared,e:a}),a.type==="mouseup"&&h.markerClick(a,t,i),l.globals.capturedSeriesIndex=t,l.globals.capturedDataPointIndex=i,r=c,o=d+l.globals.translateY-1.4*h.tooltipRect.ttHeight,h.w.config.tooltip.followCursor){var f=h.getElGrid().getBoundingClientRect();o=h.e.clientY+l.globals.translateY-f.top}u<0&&(o=d),h.marker.enlargeCurrentPoint(i,s.paths,r,o)}return{x:r,y:o}}},{key:"handleBarTooltip",value:function(e){var t,i,a=e.e,s=e.opt,r=this.w,o=this.ttCtx,l=o.getElTooltip(),h=0,c=0,d=0,u=this.getBarTooltipXY({e:a,opt:s});if(u.j!==null||u.barHeight!==0||u.barWidth!==0){t=u.i;var g=u.j;if(r.globals.capturedSeriesIndex=t,r.globals.capturedDataPointIndex=g,r.globals.isBarHorizontal&&o.tooltipUtil.hasBars()||!r.config.tooltip.shared?(c=u.x,d=u.y,i=Array.isArray(r.config.stroke.width)?r.config.stroke.width[t]:r.config.stroke.width,h=c):r.globals.comboCharts||r.config.tooltip.shared||(h/=2),isNaN(d)&&(d=r.globals.svgHeight-o.tooltipRect.ttHeight),parseInt(s.paths.parentNode.getAttribute("data:realIndex"),10),c+o.tooltipRect.ttWidth>r.globals.gridWidth?c-=o.tooltipRect.ttWidth:c<0&&(c=0),o.w.config.tooltip.followCursor){var f=o.getElGrid().getBoundingClientRect();d=o.e.clientY-f.top}o.tooltip===null&&(o.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?o.tooltipPosition.moveXCrosshairs(h+i/2):o.tooltipPosition.moveXCrosshairs(h)),!o.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&o.tooltipUtil.hasBars())&&(d=d+r.globals.translateY-o.tooltipRect.ttHeight/2,l.style.left=c+r.globals.translateX+"px",l.style.top=d+"px")}}},{key:"getBarTooltipXY",value:function(e){var t=this,i=e.e,a=e.opt,s=this.w,r=null,o=this.ttCtx,l=0,h=0,c=0,d=0,u=0,g=i.target.classList;if(g.contains("apexcharts-bar-area")||g.contains("apexcharts-candlestick-area")||g.contains("apexcharts-boxPlot-area")||g.contains("apexcharts-rangebar-area")){var f=i.target,p=f.getBoundingClientRect(),x=a.elGrid.getBoundingClientRect(),b=p.height;u=p.height;var m=p.width,y=parseInt(f.getAttribute("cx"),10),k=parseInt(f.getAttribute("cy"),10);d=parseFloat(f.getAttribute("barWidth"));var v=i.type==="touchmove"?i.touches[0].clientX:i.clientX;r=parseInt(f.getAttribute("j"),10),l=parseInt(f.parentNode.getAttribute("rel"),10)-1;var C=f.getAttribute("data-range-y1"),w=f.getAttribute("data-range-y2");s.globals.comboCharts&&(l=parseInt(f.parentNode.getAttribute("data:realIndex"),10));var A=function(M){return s.globals.isXNumeric?y-m/2:t.isVerticalGroupedRangeBar?y+m/2:y-o.dataPointsDividedWidth+m/2},S=function(){return k-o.dataPointsDividedHeight+b/2-o.tooltipRect.ttHeight/2};o.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:l,j:r,y1:C?parseInt(C,10):null,y2:w?parseInt(w,10):null,shared:!o.showOnIntersect&&s.config.tooltip.shared,e:i}),s.config.tooltip.followCursor?s.globals.isBarHorizontal?(h=v-x.left+15,c=S()):(h=A(),c=i.clientY-x.top-o.tooltipRect.ttHeight/2-15):s.globals.isBarHorizontal?((h=y)0&&i.setAttribute("width",t.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var e=this.w,t=this.ttCtx;t.ycrosshairs=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),t.ycrosshairsHidden=e.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(e,t,i){var a=this.ttCtx,s=this.w,r=s.globals,o=r.seriesYAxisMap[e];if(a.yaxisTooltips[e]&&o.length>0){var l=r.yLabelFormatters[e],h=a.getElGrid().getBoundingClientRect(),c=o[0],d=0;i.yRatio.length>1&&(d=c);var u=(t-h.top)*i.yRatio[d],g=r.maxYArr[c]-r.minYArr[c],f=r.minYArr[c]+(g-u);s.config.yaxis[e].reversed&&(f=r.maxYArr[c]-(g-u)),a.tooltipPosition.moveYCrosshairs(t-h.top),a.yaxisTooltipText[e].innerHTML=l(f),a.tooltipPosition.moveYAxisTooltip(e)}}}]),n}(),Ra=function(){function n(e){Y(this,n),this.ctx=e,this.w=e.w;var t=this.w;this.tConfig=t.config.tooltip,this.tooltipUtil=new ws(this),this.tooltipLabels=new tn(this),this.tooltipPosition=new ks(this),this.marker=new an(this),this.intersect=new sn(this),this.axesTooltip=new rn(this),this.showOnIntersect=this.tConfig.intersect,this.showTooltipTitle=this.tConfig.x.show,this.fixedTooltip=this.tConfig.fixed.enabled,this.xaxisTooltip=null,this.yaxisTTEls=null,this.isBarShared=!t.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return F(n,[{key:"getElTooltip",value:function(e){return e||(e=this),e.w.globals.dom.baseEl?e.w.globals.dom.baseEl.querySelector(".apexcharts-tooltip"):null}},{key:"getElXCrosshairs",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-xcrosshairs")}},{key:"getElGrid",value:function(){return this.w.globals.dom.baseEl.querySelector(".apexcharts-grid")}},{key:"drawTooltip",value:function(e){var t=this.w;this.xyRatios=e,this.isXAxisTooltipEnabled=t.config.xaxis.tooltip.enabled&&t.globals.axisCharts,this.yaxisTooltips=t.config.yaxis.map(function(r,o){return!!(r.show&&r.tooltip.enabled&&t.globals.axisCharts)}),this.allTooltipSeriesGroups=[],t.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),t.config.tooltip.cssClass&&i.classList.add(t.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme||"light")),t.globals.dom.elWrap.appendChild(i),t.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new Vt(this.ctx);this.xAxisTicksPositions=a.getXAxisTicksPositions()}if(!t.globals.comboCharts&&!this.tConfig.intersect&&t.config.chart.type!=="rangeBar"||this.tConfig.shared||(this.showOnIntersect=!0),t.config.markers.size!==0&&t.globals.markers.largestSize!==0||this.marker.drawDynamicPoints(this),t.globals.collapsedSeries.length!==t.globals.series.length){this.dataPointsDividedHeight=t.globals.gridHeight/t.globals.dataPoints,this.dataPointsDividedWidth=t.globals.gridWidth/t.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||t.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var s=t.globals.series.length;(t.globals.xyCharts||t.globals.comboCharts)&&this.tConfig.shared&&(s=this.showOnIntersect?1:t.globals.series.length),this.legendLabels=t.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(s),this.addSVGEvents()}}},{key:"createTTElements",value:function(e){for(var t=this,i=this.w,a=[],s=this.getElTooltip(),r=function(l){var h=document.createElement("div");h.classList.add("apexcharts-tooltip-series-group","apexcharts-tooltip-series-group-".concat(l)),h.style.order=i.config.tooltip.inverseOrder?e-l:l+1;var c=document.createElement("span");c.classList.add("apexcharts-tooltip-marker"),i.config.tooltip.fillSeriesColor?c.style.backgroundColor=i.globals.colors[l]:c.style.color=i.globals.colors[l];var d=i.config.markers.shape,u=d;Array.isArray(d)&&(u=d[l]),c.setAttribute("shape",u),h.appendChild(c);var g=document.createElement("div");g.classList.add("apexcharts-tooltip-text"),g.style.fontFamily=t.tConfig.style.fontFamily||i.config.chart.fontFamily,g.style.fontSize=t.tConfig.style.fontSize,["y","goals","z"].forEach(function(f){var p=document.createElement("div");p.classList.add("apexcharts-tooltip-".concat(f,"-group"));var x=document.createElement("span");x.classList.add("apexcharts-tooltip-text-".concat(f,"-label")),p.appendChild(x);var b=document.createElement("span");b.classList.add("apexcharts-tooltip-text-".concat(f,"-value")),p.appendChild(b),g.appendChild(p)}),h.appendChild(g),s.appendChild(h),a.push(h)},o=0;o0&&this.addPathsEventListeners(f,d),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(d)}}},{key:"drawFixedTooltipRect",value:function(){var e=this.w,t=this.getElTooltip(),i=t.getBoundingClientRect(),a=i.width+10,s=i.height+10,r=this.tConfig.fixed.offsetX,o=this.tConfig.fixed.offsetY,l=this.tConfig.fixed.position.toLowerCase();return l.indexOf("right")>-1&&(r=r+e.globals.svgWidth-a+10),l.indexOf("bottom")>-1&&(o=o+e.globals.svgHeight-s-10),t.style.left=r+"px",t.style.top=o+"px",{x:r,y:o,ttWidth:a,ttHeight:s}}},{key:"addDatapointEventsListeners",value:function(e){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers .apexcharts-marker, .apexcharts-bar-area, .apexcharts-candlestick-area, .apexcharts-boxPlot-area, .apexcharts-rangebar-area");this.addPathsEventListeners(t,e)}},{key:"addPathsEventListeners",value:function(e,t){for(var i=this,a=function(r){var o={paths:e[r],tooltipEl:t.tooltipEl,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:t.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map(function(l){return e[r].addEventListener(l,i.onSeriesHover.bind(i,o),{capture:!1,passive:!0})})},s=0;s=20?this.seriesHover(e,t):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(function(){i.seriesHover(e,t)},20-a))}},{key:"seriesHover",value:function(e,t){var i=this;this.lastHoverTime=Date.now();var a=[],s=this.w;s.config.chart.group&&(a=this.ctx.getGroupedCharts()),s.globals.axisCharts&&(s.globals.minX===-1/0&&s.globals.maxX===1/0||s.globals.dataPoints===0)||(a.length?a.forEach(function(r){var o=i.getElTooltip(r),l={paths:e.paths,tooltipEl:o,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:r.w.globals.tooltip.ttItems};r.w.globals.minX===i.w.globals.minX&&r.w.globals.maxX===i.w.globals.maxX&&r.w.globals.tooltip.seriesHoverByContext({chartCtx:r,ttCtx:r.w.globals.tooltip,opt:l,e:t})}):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:e,e:t}))}},{key:"seriesHoverByContext",value:function(e){var t=e.chartCtx,i=e.ttCtx,a=e.opt,s=e.e,r=t.w,o=this.getElTooltip(t);o&&(i.tooltipRect={x:0,y:0,ttWidth:o.getBoundingClientRect().width,ttHeight:o.getBoundingClientRect().height},i.e=s,i.tooltipUtil.hasBars()&&!r.globals.comboCharts&&!i.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new Pe(t).toggleSeriesOnHover(s,s.target.parentNode),r.globals.axisCharts?i.axisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:s,opt:a,tooltipRect:i.tooltipRect}),i.fixedTooltip&&i.drawFixedTooltipRect())}},{key:"axisChartsTooltips",value:function(e){var t,i,a=e.e,s=e.opt,r=this.w,o=s.elGrid.getBoundingClientRect(),l=a.type==="touchmove"?a.touches[0].clientX:a.clientX,h=a.type==="touchmove"?a.touches[0].clientY:a.clientY;if(this.clientY=h,this.clientX=l,r.globals.capturedSeriesIndex=-1,r.globals.capturedDataPointIndex=-1,ho.top+o.height)this.handleMouseOut(s);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!r.config.tooltip.shared){var c=parseInt(s.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(c)<0)return void this.handleMouseOut(s)}var d=this.getElTooltip(),u=this.getElXCrosshairs(),g=[];r.config.chart.group&&(g=this.ctx.getSyncedCharts());var f=r.globals.xyCharts||r.config.chart.type==="bar"&&!r.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||r.globals.comboCharts&&this.tooltipUtil.hasBars();if(a.type==="mousemove"||a.type==="touchmove"||a.type==="mouseup"){if(r.globals.collapsedSeries.length+r.globals.ancillaryCollapsedSeries.length===r.globals.series.length)return;u!==null&&u.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter(function(m){return m===!0});if(this.ycrosshairs!==null&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),f&&!this.showOnIntersect||g.length>1)this.handleStickyTooltip(a,l,h,s);else if(r.config.chart.type==="heatmap"||r.config.chart.type==="treemap"){var x=this.intersect.handleHeatTreeTooltip({e:a,opt:s,x:t,y:i,type:r.config.chart.type});t=x.x,i=x.y,d.style.left=t+"px",d.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:s}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:s,x:t,y:i});if(this.yaxisTooltips.length)for(var b=0;bh.width)this.handleMouseOut(a);else if(l!==null)this.handleStickyCapturedSeries(e,l,a,o);else if(this.tooltipUtil.isXoverlap(o)||s.globals.isBarHorizontal){var c=s.globals.series.findIndex(function(d,u){return!s.globals.collapsedSeriesIndices.includes(u)});this.create(e,this,c,o,a.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(e,t,i,a){var s=this.w;if(!this.tConfig.shared&&s.globals.series[t][a]===null)return void this.handleMouseOut(i);if(s.globals.series[t][a]!==void 0)this.tConfig.shared&&this.tooltipUtil.isXoverlap(a)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(e,this,t,a,i.ttItems):this.create(e,this,t,a,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(a)){var r=s.globals.series.findIndex(function(o,l){return!s.globals.collapsedSeriesIndices.includes(l)});this.create(e,this,r,a,i.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var e=this.w,t=new R(this.ctx),i=e.globals.dom.Paper.find(".apexcharts-bar-area"),a=0;a5&&arguments[5]!==void 0?arguments[5]:null,w=this.w,A=t;e.type==="mouseup"&&this.markerClick(e,i,a),C===null&&(C=this.tConfig.shared);var S=this.tooltipUtil.hasMarkers(i),M=this.tooltipUtil.getElBars(),P=function(){w.globals.markers.largestSize>0?A.marker.enlargePoints(a):A.tooltipPosition.moveDynamicPointsOnHover(a)};if(w.config.legend.tooltipHoverFormatter){var T=w.config.legend.tooltipHoverFormatter,I=Array.from(this.legendLabels);I.forEach(function(oe){var U=oe.getAttribute("data:default-text");oe.innerHTML=decodeURIComponent(U)});for(var z=0;z0)){var N=new R(this.ctx),W=w.globals.dom.Paper.find(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),A.tooltipUtil.getAllMarkers(!0).length&&!this.barSeriesHeight&&P(),A.tooltipPosition.moveStickyTooltipOverBars(a,i);for(var Q=0;Q0&&i.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(f-=d*A)),w&&(f=f+g.height/2-y/2-2);var M=i.globals.series[a][s]<0,P=h;switch(this.barCtx.isReversed&&(P=h+(M?u:-u)),b.position){case"center":p=w?M?P-u/2+v:P+u/2-v:M?P-u/2+g.height/2+v:P+u/2+g.height/2-v;break;case"bottom":p=w?M?P-u+v:P+u-v:M?P-u+g.height+y+v:P+u-g.height/2+y-v;break;case"top":p=w?M?P+v:P-v:M?P-g.height/2-v:P+g.height+v}var T=P;if(i.globals.seriesGroups.forEach(function(X){var E;(E=t.barCtx[X.join(",")])===null||E===void 0||E.prevY.forEach(function(H){T=M?Math.max(H[s],T):Math.min(H[s],T)})}),this.barCtx.lastActiveBarSerieIndex===r&&m.enabled){var I=new R(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:s}),x.fontSize);o=M?T-I.height/2-v-m.offsetY+18:T+I.height+v+m.offsetY-18;var z=S;l=C+(i.globals.isXNumeric?-d*i.globals.barGroups.length/2:i.globals.barGroups.length*d/2-(i.globals.barGroups.length-1)*d-z)+m.offsetX}return i.config.chart.stacked||(p<0?p=0+y:p+g.height/3>i.globals.gridHeight&&(p=i.globals.gridHeight-y)),{bcx:c,bcy:h,dataLabelsX:f,dataLabelsY:p,totalDataLabelsX:l,totalDataLabelsY:o,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(e){var t=this,i=this.w,a=e.x,s=e.i,r=e.j,o=e.realIndex,l=e.bcy,h=e.barHeight,c=e.barWidth,d=e.textRects,u=e.dataLabelsX,g=e.strokeWidth,f=e.dataLabelsConfig,p=e.barDataLabelsConfig,x=e.barTotalDataLabelsConfig,b=e.offX,m=e.offY,y=i.globals.gridHeight/i.globals.dataPoints,k=this.barCtx.barHelpers.getZeroValueEncounters({i:s,j:r}).zeroEncounters;c=Math.abs(c);var v,C,w=l-(this.barCtx.isRangeBar?0:y)+h/2+d.height/2+m-3;!i.config.chart.stacked&&k>0&&i.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(w-=h*k);var A="start",S=i.globals.series[s][r]<0,M=a;switch(this.barCtx.isReversed&&(M=a+(S?-c:c),A=S?"start":"end"),p.position){case"center":u=S?M+c/2-b:Math.max(d.width/2,M-c/2)+b;break;case"bottom":u=S?M+c-g-b:M-c+g+b;break;case"top":u=S?M-g-b:M-g+b}var P=M;if(i.globals.seriesGroups.forEach(function(I){var z;(z=t.barCtx[I.join(",")])===null||z===void 0||z.prevX.forEach(function(X){P=S?Math.min(X[r],P):Math.max(X[r],P)})}),this.barCtx.lastActiveBarSerieIndex===o&&x.enabled){var T=new R(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:r}),f.fontSize);S?(v=P-g-b-x.offsetX,A="end"):v=P+b+x.offsetX+(this.barCtx.isReversed?-(c+g):g),C=w-d.height/2+T.height/2+x.offsetY+g,i.globals.barGroups.length>1&&(C-=i.globals.barGroups.length/2*(h/2))}return i.config.chart.stacked||(f.textAnchor==="start"?u-d.width<0?u=S?d.width+g:g:u+d.width>i.globals.gridWidth&&(u=S?i.globals.gridWidth-g:i.globals.gridWidth-d.width-g):f.textAnchor==="middle"?u-d.width/2<0?u=d.width/2+g:u+d.width/2>i.globals.gridWidth&&(u=i.globals.gridWidth-d.width/2-g):f.textAnchor==="end"&&(u<1?u=d.width+g:u+1>i.globals.gridWidth&&(u=i.globals.gridWidth-d.width-g))),{bcx:a,bcy:l,dataLabelsX:u,dataLabelsY:w,totalDataLabelsX:v,totalDataLabelsY:C,totalDataLabelsAnchor:A}}},{key:"drawCalculatedDataLabels",value:function(e){var t=e.x,i=e.y,a=e.val,s=e.i,r=e.j,o=e.textRects,l=e.barHeight,h=e.barWidth,c=e.dataLabelsConfig,d=this.w,u="rotate(0)";d.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(u="rotate(-90, ".concat(t,", ").concat(i,")"));var g=new bt(this.barCtx.ctx),f=new R(this.barCtx.ctx),p=c.formatter,x=null,b=d.globals.collapsedSeriesIndices.indexOf(s)>-1;if(c.enabled&&!b){x=f.group({class:"apexcharts-data-labels",transform:u});var m="";a!==void 0&&(m=p(a,O(O({},d),{},{seriesIndex:s,dataPointIndex:r,w:d}))),!a&&d.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(m="");var y=d.globals.series[s][r]<0,k=d.config.plotOptions.bar.dataLabels.position;d.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(k==="top"&&(c.textAnchor=y?"end":"start"),k==="center"&&(c.textAnchor="middle"),k==="bottom"&&(c.textAnchor=y?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&hMath.abs(h)&&(m=""):o.height/1.6>Math.abs(l)&&(m=""));var v=O({},c);this.barCtx.isHorizontal&&a<0&&(c.textAnchor==="start"?v.textAnchor="end":c.textAnchor==="end"&&(v.textAnchor="start")),g.plotDataLabelsText({x:t,y:i,text:m,i:s,j:r,parent:x,dataLabelsConfig:v,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return x}},{key:"drawTotalDataLabels",value:function(e){var t=e.x,i=e.y,a=e.val,s=e.realIndex,r=e.textAnchor,o=e.barTotalDataLabelsConfig;this.w;var l,h=new R(this.barCtx.ctx);return o.enabled&&t!==void 0&&i!==void 0&&this.barCtx.lastActiveBarSerieIndex===s&&(l=h.drawText({x:t,y:i,foreColor:o.style.color,text:a,textAnchor:r,fontFamily:o.style.fontFamily,fontSize:o.style.fontSize,fontWeight:o.style.fontWeight})),l}}]),n}(),on=function(){function n(e){Y(this,n),this.w=e.w,this.barCtx=e}return F(n,[{key:"initVariables",value:function(e){var t=this.w;this.barCtx.series=e,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(var i=0;i0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=e[i].length),t.globals.isXNumeric)for(var a=0;at.globals.minX&&t.globals.seriesX[i][a]0&&(s=c.globals.minXDiff/g),(o=s/u*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(o=1)}String(this.barCtx.barOptions.columnWidth).indexOf("%")===-1&&(o=parseInt(this.barCtx.barOptions.columnWidth,10)),l=c.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?c.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),c.globals.isXNumeric?t=this.barCtx.getBarXForNumericXAxis({x:t,j:0,realIndex:e,barWidth:o}).x:t=c.globals.padHorizontal+L.noExponents(s-o*this.barCtx.seriesLen)/2}return c.globals.barHeight=r,c.globals.barWidth=o,{x:t,y:i,yDivision:a,xDivision:s,barHeight:r,barWidth:o,zeroH:l,zeroW:h}}},{key:"initializeStackedPrevVars",value:function(e){e.w.globals.seriesGroups.forEach(function(t){e[t]||(e[t]={}),e[t].prevY=[],e[t].prevX=[],e[t].prevYF=[],e[t].prevXF=[],e[t].prevYVal=[],e[t].prevXVal=[]})}},{key:"initializeStackedXYVars",value:function(e){e.w.globals.seriesGroups.forEach(function(t){e[t]||(e[t]={}),e[t].xArrj=[],e[t].xArrjF=[],e[t].xArrjVal=[],e[t].yArrj=[],e[t].yArrjF=[],e[t].yArrjVal=[]})}},{key:"getPathFillColor",value:function(e,t,i,a){var s,r,o,l,h=this.w,c=this.barCtx.ctx.fill,d=null,u=this.barCtx.barOptions.distributed?i:t,g=!1;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(function(f){e[t][i]>=f.from&&e[t][i]<=f.to&&(d=f.color,g=!0)}),{color:c.fillPath({seriesNumber:this.barCtx.barOptions.distributed?u:a,dataPointIndex:i,color:d,value:e[t][i],fillConfig:(s=h.config.series[t].data[i])===null||s===void 0?void 0:s.fill,fillType:(r=h.config.series[t].data[i])!==null&&r!==void 0&&(o=r.fill)!==null&&o!==void 0&&o.type?(l=h.config.series[t].data[i])===null||l===void 0?void 0:l.fill.type:Array.isArray(h.config.fill.type)?h.config.fill.type[a]:h.config.fill.type}),useRangeColor:g}}},{key:"getStrokeWidth",value:function(e,t,i){var a=0,s=this.w;return this.barCtx.series[e][t]===void 0||this.barCtx.series[e][t]===null?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,s.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),a}},{key:"createBorderRadiusArr",value:function(e){var t,i=this.w,a=!this.w.config.chart.stacked||i.config.plotOptions.bar.borderRadius<=0,s=e.length,r=0|((t=e[0])===null||t===void 0?void 0:t.length),o=Array.from({length:s},function(){return Array(r).fill(a?"top":"none")});if(a)return o;for(var l=0;l0?(h.push(u),d++):g<0&&(c.push(u),d++)}if(h.length>0&&c.length===0)if(h.length===1)o[h[0]][l]="both";else{var f,p=h[0],x=h[h.length-1],b=Tt(h);try{for(b.s();!(f=b.n()).done;){var m=f.value;o[m][l]=m===p?"bottom":m===x?"top":"none"}}catch(E){b.e(E)}finally{b.f()}}else if(c.length>0&&h.length===0)if(c.length===1)o[c[0]][l]="both";else{var y,k=Math.max.apply(Math,c),v=Math.min.apply(Math,c),C=Tt(c);try{for(C.s();!(y=C.n()).done;){var w=y.value;o[w][l]=w===k?"bottom":w===v?"top":"none"}}catch(E){C.e(E)}finally{C.f()}}else if(h.length>0&&c.length>0){var A,S=h[h.length-1],M=Tt(h);try{for(M.s();!(A=M.n()).done;){var P=A.value;o[P][l]=P===S?"top":"none"}}catch(E){M.e(E)}finally{M.f()}var T,I=Math.max.apply(Math,c),z=Tt(c);try{for(z.s();!(T=z.n()).done;){var X=T.value;o[X][l]=X===I?"bottom":"none"}}catch(E){z.e(E)}finally{z.f()}}else d===1&&(o[h[0]||c[0]][l]="both")}return o}},{key:"barBackground",value:function(e){var t=e.j,i=e.i,a=e.x1,s=e.x2,r=e.y1,o=e.y2,l=e.elSeries,h=this.w,c=new R(this.barCtx.ctx),d=new Pe(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&d===i){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);var u=this.barCtx.barOptions.colors.backgroundBarColors[t],g=c.drawRect(a!==void 0?a:0,r!==void 0?r:0,s!==void 0?s:h.globals.gridWidth,o!==void 0?o:h.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,u,this.barCtx.barOptions.colors.backgroundBarOpacity);l.add(g),g.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(e){var t,i=e.barWidth,a=e.barXPosition,s=e.y1,r=e.y2,o=e.strokeWidth,l=e.isReversed,h=e.series,c=e.seriesGroup,d=e.realIndex,u=e.i,g=e.j,f=e.w,p=new R(this.barCtx.ctx);(o=Array.isArray(o)?o[d]:o)||(o=0);var x=i,b=a;(t=f.config.series[d].data[g])!==null&&t!==void 0&&t.columnWidthOffset&&(b=a-f.config.series[d].data[g].columnWidthOffset/2,x=i+f.config.series[d].data[g].columnWidthOffset);var m=o/2,y=b+m,k=b+x-m,v=(h[u][g]>=0?1:-1)*(l?-1:1);s+=.001-m*v,r+=.001+m*v;var C=p.move(y,s),w=p.move(y,s),A=p.line(k,s);if(f.globals.previousPaths.length>0&&(w=this.barCtx.getPreviousPath(d,g,!1)),C=C+p.line(y,r)+p.line(k,r)+A+(f.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[d][g]==="both"?" Z":" z"),w=w+p.line(y,s)+A+A+A+A+A+p.line(y,s)+(f.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[d][g]==="both"?" Z":" z"),this.arrBorderRadius[d][g]!=="none"&&(C=p.roundPathCorners(C,f.config.plotOptions.bar.borderRadius)),f.config.chart.stacked){var S=this.barCtx;(S=this.barCtx[c]).yArrj.push(r-m*v),S.yArrjF.push(Math.abs(s-r+o*v)),S.yArrjVal.push(this.barCtx.series[u][g])}return{pathTo:C,pathFrom:w}}},{key:"getBarpaths",value:function(e){var t,i=e.barYPosition,a=e.barHeight,s=e.x1,r=e.x2,o=e.strokeWidth,l=e.isReversed,h=e.series,c=e.seriesGroup,d=e.realIndex,u=e.i,g=e.j,f=e.w,p=new R(this.barCtx.ctx);(o=Array.isArray(o)?o[d]:o)||(o=0);var x=i,b=a;(t=f.config.series[d].data[g])!==null&&t!==void 0&&t.barHeightOffset&&(x=i-f.config.series[d].data[g].barHeightOffset/2,b=a+f.config.series[d].data[g].barHeightOffset);var m=o/2,y=x+m,k=x+b-m,v=(h[u][g]>=0?1:-1)*(l?-1:1);s+=.001+m*v,r+=.001-m*v;var C=p.move(s,y),w=p.move(s,y);f.globals.previousPaths.length>0&&(w=this.barCtx.getPreviousPath(d,g,!1));var A=p.line(s,k);if(C=C+p.line(r,y)+p.line(r,k)+A+(f.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[d][g]==="both"?" Z":" z"),w=w+p.line(s,y)+A+A+A+A+A+p.line(s,y)+(f.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[d][g]==="both"?" Z":" z"),this.arrBorderRadius[d][g]!=="none"&&(C=p.roundPathCorners(C,f.config.plotOptions.bar.borderRadius)),f.config.chart.stacked){var S=this.barCtx;(S=this.barCtx[c]).xArrj.push(r+m*v),S.xArrjF.push(Math.abs(s-r-o*v)),S.xArrjVal.push(this.barCtx.series[u][g])}return{pathTo:C,pathFrom:w}}},{key:"checkZeroSeries",value:function(e){for(var t=e.series,i=this.w,a=0;a2&&arguments[2]!==void 0)||arguments[2]?t:null;return e!=null&&(i=t+e/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?e/this.barCtx.invertedYRatio:0)),i}},{key:"getYForValue",value:function(e,t,i){var a=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3]?t:null;return e!=null&&(a=t-e/this.barCtx.yRatio[i]+2*(this.barCtx.isReversed?e/this.barCtx.yRatio[i]:0)),a}},{key:"getGoalValues",value:function(e,t,i,a,s,r){var o=this,l=this.w,h=[],c=function(g,f){var p;h.push((ri(p={},e,e==="x"?o.getXForValue(g,t,!1):o.getYForValue(g,i,r,!1)),ri(p,"attrs",f),p))};if(l.globals.seriesGoals[a]&&l.globals.seriesGoals[a][s]&&Array.isArray(l.globals.seriesGoals[a][s])&&l.globals.seriesGoals[a][s].forEach(function(g){c(g.value,g)}),this.barCtx.barOptions.isDumbbell&&l.globals.seriesRange.length){var d=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:l.globals.colors,u={strokeHeight:e==="x"?0:l.globals.markers.size[a],strokeWidth:e==="x"?l.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(d[a])?d[a][0]:d[a]};c(l.globals.seriesRangeStart[a][s],u),c(l.globals.seriesRangeEnd[a][s],O(O({},u),{},{strokeColor:Array.isArray(d[a])?d[a][1]:d[a]}))}return h}},{key:"drawGoalLine",value:function(e){var t=e.barXPosition,i=e.barYPosition,a=e.goalX,s=e.goalY,r=e.barWidth,o=e.barHeight,l=new R(this.barCtx.ctx),h=l.group({className:"apexcharts-bar-goals-groups"});h.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:h.node}),h.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var c=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach(function(d){if(d.x>=-1&&d.x<=l.w.globals.gridWidth+1){var u=d.attrs.strokeHeight!==void 0?d.attrs.strokeHeight:o/2,g=i+u+o/2;c=l.drawLine(d.x,g-2*u,d.x,g,d.attrs.strokeColor?d.attrs.strokeColor:void 0,d.attrs.strokeDashArray,d.attrs.strokeWidth?d.attrs.strokeWidth:2,d.attrs.strokeLineCap),h.add(c)}}):Array.isArray(s)&&s.forEach(function(d){if(d.y>=-1&&d.y<=l.w.globals.gridHeight+1){var u=d.attrs.strokeWidth!==void 0?d.attrs.strokeWidth:r/2,g=t+u+r/2;c=l.drawLine(g-2*u,d.y,g,d.y,d.attrs.strokeColor?d.attrs.strokeColor:void 0,d.attrs.strokeDashArray,d.attrs.strokeHeight?d.attrs.strokeHeight:2,d.attrs.strokeLineCap),h.add(c)}}),h}},{key:"drawBarShadow",value:function(e){var t=e.prevPaths,i=e.currPaths,a=e.color,s=this.w,r=t.x,o=t.x1,l=t.barYPosition,h=i.x,c=i.x1,d=i.barYPosition,u=l+i.barHeight,g=new R(this.barCtx.ctx),f=new L,p=g.move(o,u)+g.line(r,u)+g.line(h,d)+g.line(c,d)+g.line(o,u)+(s.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[realIndex][j]==="both"?" Z":" z");return g.drawPath({d:p,fill:f.shadeColor(.5,L.rgb2hex(a)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}},{key:"getZeroValueEncounters",value:function(e){var t,i=e.i,a=e.j,s=this.w,r=0,o=0;return(s.config.plotOptions.bar.horizontal?s.globals.series.map(function(l,h){return h}):((t=s.globals.columnSeries)===null||t===void 0?void 0:t.i.map(function(l){return l}))||[]).forEach(function(l){var h=s.globals.seriesPercent[l][a];h&&r++,l-1}),a=this.barCtx.columnGroupIndices,s=a.indexOf(i);return s<0&&(a.push(i),s=a.length-1),{groupIndex:i,columnGroupIndex:s}}}]),n}(),mt=function(){function n(e,t){Y(this,n),this.ctx=e,this.w=e.w;var i=this.w;this.barOptions=i.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=i.config.stroke.width,this.isNullValue=!1,this.isRangeBar=i.globals.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!i.globals.isBarHorizontal&&i.globals.seriesRange.length&&i.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.xyRatios=t,this.xyRatios!==null&&(this.xRatio=t.xRatio,this.yRatio=t.yRatio,this.invertedXRatio=t.invertedXRatio,this.invertedYRatio=t.invertedYRatio,this.baseLineY=t.baseLineY,this.baseLineInvertedY=t.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[];var a=new Pe(this.ctx);this.lastActiveBarSerieIndex=a.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var s=a.getBarSeriesIndices(),r=new he(this.ctx);this.stackedSeriesTotals=r.getStackedSeriesTotals(this.w.config.series.map(function(o,l){return s.indexOf(l)===-1?l:-1}).filter(function(o){return o!==-1})),this.barHelpers=new on(this)}return F(n,[{key:"draw",value:function(e,t){var i=this.w,a=new R(this.ctx),s=new he(this.ctx,i);e=s.getLogSeries(e),this.series=e,this.yRatio=s.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);var r=a.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&this.totalItems>this.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var o=0,l=0;o0&&(this.visibleI=this.visibleI+1);var k=0,v=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[b],this.translationsIndex=b);var C=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var w=this.barHelpers.initialPositions(b);f=w.y,k=w.barHeight,c=w.yDivision,u=w.zeroW,g=w.x,v=w.barWidth,h=w.xDivision,d=w.zeroH,this.isHorizontal||x.push(g+v/2);var A=a.group({class:"apexcharts-datalabels","data:realIndex":b});i.globals.delayedElements.push({el:A.node}),A.node.classList.add("apexcharts-element-hidden");var S=a.group({class:"apexcharts-bar-goals-markers"}),M=a.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:M.node}),M.node.classList.add("apexcharts-element-hidden");for(var P=0;P0){var E,H=this.barHelpers.drawBarShadow({color:typeof X.color=="string"&&((E=X.color)===null||E===void 0?void 0:E.indexOf("url"))===-1?X.color:L.hexToRgba(i.globals.colors[o]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:I});M.add(H),i.config.chart.dropShadow.enabled&&new fe(this.ctx).dropShadow(H,i.config.chart.dropShadow,b)}this.pathArr.push(I);var D=this.barHelpers.drawGoalLine({barXPosition:I.barXPosition,barYPosition:I.barYPosition,goalX:I.goalX,goalY:I.goalY,barHeight:k,barWidth:v});D&&S.add(D),f=I.y,g=I.x,P>0&&x.push(g+v/2),p.push(f),this.renderSeries(O(O({realIndex:b,pathFill:X.color},X.useRangeColor?{lineFill:X.color}:{}),{},{j:P,i:o,columnGroupIndex:m,pathFrom:I.pathFrom,pathTo:I.pathTo,strokeWidth:T,elSeries:y,x:g,y:f,series:e,barHeight:Math.abs(I.barHeight?I.barHeight:k),barWidth:Math.abs(I.barWidth?I.barWidth:v),elDataLabelsWrap:A,elGoalsMarkers:S,elBarShadows:M,visibleSeries:this.visibleI,type:"bar"}))}i.globals.seriesXvalues[b]=x,i.globals.seriesYvalues[b]=p,r.add(y)}return r}},{key:"renderSeries",value:function(e){var t=e.realIndex,i=e.pathFill,a=e.lineFill,s=e.j,r=e.i,o=e.columnGroupIndex,l=e.pathFrom,h=e.pathTo,c=e.strokeWidth,d=e.elSeries,u=e.x,g=e.y,f=e.y1,p=e.y2,x=e.series,b=e.barHeight,m=e.barWidth,y=e.barXPosition,k=e.barYPosition,v=e.elDataLabelsWrap,C=e.elGoalsMarkers,w=e.elBarShadows,A=e.visibleSeries,S=e.type,M=e.classes,P=this.w,T=new R(this.ctx),I=!1;if(!a){var z=typeof P.globals.stroke.colors[t]=="function"?function(_){var N,W=P.config.stroke.colors;return Array.isArray(W)&&W.length>0&&((N=W[_])||(N=""),typeof N=="function")?N({value:P.globals.series[_][s],dataPointIndex:s,w:P}):N}(t):P.globals.stroke.colors[t];a=this.barOptions.distributed?P.globals.stroke.colors[s]:z}var X=new nn(this).handleBarDataLabels({x:u,y:g,y1:f,y2:p,i:r,j:s,series:x,realIndex:t,columnGroupIndex:o,barHeight:b,barWidth:m,barXPosition:y,barYPosition:k,visibleSeries:A});P.globals.isBarHorizontal||(X.dataLabelsPos.dataLabelsX+Math.max(m,P.globals.barPadForNumericAxis)<0||X.dataLabelsPos.dataLabelsX-Math.max(m,P.globals.barPadForNumericAxis)>P.globals.gridWidth)&&(I=!0),P.config.series[r].data[s]&&P.config.series[r].data[s].strokeColor&&(a=P.config.series[r].data[s].strokeColor),this.isNullValue&&(i="none");var E=s/P.config.chart.animations.animateGradually.delay*(P.config.chart.animations.speed/P.globals.dataPoints)/2.4;if(!I){var H=T.renderPaths({i:r,j:s,realIndex:t,pathFrom:l,pathTo:h,stroke:a,strokeWidth:c,strokeLineCap:P.config.stroke.lineCap,fill:i,animationDelay:E,initialSpeed:P.config.chart.animations.speed,dataChangeSpeed:P.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(S,"-area ").concat(M),chartType:S});H.attr("clip-path","url(#gridRectBarMask".concat(P.globals.cuid,")"));var D=P.config.forecastDataPoints;D.count>0&&s>=P.globals.dataPoints-D.count&&(H.node.setAttribute("stroke-dasharray",D.dashArray),H.node.setAttribute("stroke-width",D.strokeWidth),H.node.setAttribute("fill-opacity",D.fillOpacity)),f!==void 0&&p!==void 0&&(H.attr("data-range-y1",f),H.attr("data-range-y2",p)),new fe(this.ctx).setSelectionFilter(H,t,s),d.add(H),H.attr({cy:X.dataLabelsPos.bcy,cx:X.dataLabelsPos.bcx,j:s,val:P.globals.series[r][s],barHeight:b,barWidth:m}),X.dataLabels!==null&&v.add(X.dataLabels),X.totalDataLabels&&v.add(X.totalDataLabels),d.add(v),C&&d.add(C),w&&d.add(w)}return d}},{key:"drawBarPaths",value:function(e){var t,i=e.indexes,a=e.barHeight,s=e.strokeWidth,r=e.zeroW,o=e.x,l=e.y,h=e.yDivision,c=e.elSeries,d=this.w,u=i.i,g=i.j;if(d.globals.isXNumeric)t=(l=(d.globals.seriesX[u][g]-d.globals.minX)/this.invertedXRatio-a)+a*this.visibleI;else if(d.config.plotOptions.bar.hideZeroBarsWhenGrouped){var f=this.barHelpers.getZeroValueEncounters({i:u,j:g}),p=f.nonZeroColumns,x=f.zeroEncounters;p>0&&(a=this.seriesLen*a/p),t=l+a*this.visibleI,t-=a*x}else t=l+a*this.visibleI;this.isFunnel&&(r-=(this.barHelpers.getXForValue(this.series[u][g],r)-r)/2),o=this.barHelpers.getXForValue(this.series[u][g],r);var b=this.barHelpers.getBarpaths({barYPosition:t,barHeight:a,x1:r,x2:o,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,i:u,j:g,w:d});return d.globals.isXNumeric||(l+=h),this.barHelpers.barBackground({j:g,i:u,y1:t-a*this.visibleI,y2:a*this.seriesLen,elSeries:c}),{pathTo:b.pathTo,pathFrom:b.pathFrom,x1:r,x:o,y:l,goalX:this.barHelpers.getGoalValues("x",r,null,u,g),barYPosition:t,barHeight:a}}},{key:"drawColumnPaths",value:function(e){var t,i=e.indexes,a=e.x,s=e.y,r=e.xDivision,o=e.barWidth,l=e.zeroH,h=e.strokeWidth,c=e.elSeries,d=this.w,u=i.realIndex,g=i.translationsIndex,f=i.i,p=i.j,x=i.bc;if(d.globals.isXNumeric){var b=this.getBarXForNumericXAxis({x:a,j:p,realIndex:u,barWidth:o});a=b.x,t=b.barXPosition}else if(d.config.plotOptions.bar.hideZeroBarsWhenGrouped){var m=this.barHelpers.getZeroValueEncounters({i:f,j:p}),y=m.nonZeroColumns,k=m.zeroEncounters;y>0&&(o=this.seriesLen*o/y),t=a+o*this.visibleI,t-=o*k}else t=a+o*this.visibleI;s=this.barHelpers.getYForValue(this.series[f][p],l,g);var v=this.barHelpers.getColumnPaths({barXPosition:t,barWidth:o,y1:l,y2:s,strokeWidth:h,isReversed:this.isReversed,series:this.series,realIndex:u,i:f,j:p,w:d});return d.globals.isXNumeric||(a+=r),this.barHelpers.barBackground({bc:x,j:p,i:f,x1:t-h/2-o*this.visibleI,x2:o*this.seriesLen+h/2,elSeries:c}),{pathTo:v.pathTo,pathFrom:v.pathFrom,x:a,y:s,goalY:this.barHelpers.getGoalValues("y",null,l,f,p,g),barXPosition:t,barWidth:o}}},{key:"getBarXForNumericXAxis",value:function(e){var t=e.x,i=e.barWidth,a=e.realIndex,s=e.j,r=this.w,o=a;return r.globals.seriesX[a].length||(o=r.globals.maxValsInArrayIndex),L.isNumber(r.globals.seriesX[o][s])&&(t=(r.globals.seriesX[o][s]-r.globals.minX)/this.xRatio-i*this.seriesLen/2),{barXPosition:t+i*this.visibleI,x:t}}},{key:"getPreviousPath",value:function(e,t){for(var i=this.w,a="M 0 0",s=0;s0&&parseInt(r.realIndex,10)===parseInt(e,10)&&i.globals.previousPaths[s].paths[t]!==void 0&&(a=i.globals.previousPaths[s].paths[t].d)}return a}}]),n}(),Xa=function(n){qt(t,mt);var e=Ut(t);function t(){return Y(this,t),e.apply(this,arguments)}return F(t,[{key:"draw",value:function(i,a){var s=this,r=this.w;this.graphics=new R(this.ctx),this.bar=new mt(this.ctx,this.xyRatios);var o=new he(this.ctx,r);i=o.getLogSeries(i),this.yRatio=o.getLogYRatios(this.yRatio),this.barHelpers.initVariables(i),r.config.chart.stackType==="100%"&&(i=r.globals.comboCharts?a.map(function(f){return r.globals.seriesPercent[f]}):r.globals.seriesPercent.slice()),this.series=i,this.barHelpers.initializeStackedPrevVars(this);for(var l=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),h=0,c=0,d=function(f,p){var x=void 0,b=void 0,m=void 0,y=void 0,k=r.globals.comboCharts?a[f]:f,v=s.barHelpers.getGroupIndex(k),C=v.groupIndex,w=v.columnGroupIndex;s.groupCtx=s[r.globals.seriesGroups[C]];var A=[],S=[],M=0;s.yRatio.length>1&&(s.yaxisIndex=r.globals.seriesYAxisReverseMap[k][0],M=k),s.isReversed=r.config.yaxis[s.yaxisIndex]&&r.config.yaxis[s.yaxisIndex].reversed;var P=s.graphics.group({class:"apexcharts-series",seriesName:L.escapeString(r.globals.seriesNames[k]),rel:f+1,"data:realIndex":k});s.ctx.series.addCollapsedClassToSeries(P,k);var T=s.graphics.group({class:"apexcharts-datalabels","data:realIndex":k}),I=s.graphics.group({class:"apexcharts-bar-goals-markers"}),z=0,X=0,E=s.initialPositions(h,c,x,b,m,y,M);c=E.y,z=E.barHeight,b=E.yDivision,y=E.zeroW,h=E.x,X=E.barWidth,x=E.xDivision,m=E.zeroH,r.globals.barHeight=z,r.globals.barWidth=X,s.barHelpers.initializeStackedXYVars(s),s.groupCtx.prevY.length===1&&s.groupCtx.prevY[0].every(function(de){return isNaN(de)})&&(s.groupCtx.prevY[0]=s.groupCtx.prevY[0].map(function(){return m}),s.groupCtx.prevYF[0]=s.groupCtx.prevYF[0].map(function(){return 0}));for(var H=0;H0||s.barHelpers.arrBorderRadius[k][H]==="top"&&r.globals.series[k][H]<0)&&(oe=U),P=s.renderSeries(O(O({realIndex:k,pathFill:Q.color},Q.useRangeColor?{lineFill:Q.color}:{}),{},{j:H,i:f,columnGroupIndex:w,pathFrom:N.pathFrom,pathTo:N.pathTo,strokeWidth:D,elSeries:P,x:h,y:c,series:i,barHeight:z,barWidth:X,elDataLabelsWrap:T,elGoalsMarkers:I,type:"bar",visibleSeries:w,classes:oe}))}r.globals.seriesXvalues[k]=A,r.globals.seriesYvalues[k]=S,s.groupCtx.prevY.push(s.groupCtx.yArrj),s.groupCtx.prevYF.push(s.groupCtx.yArrjF),s.groupCtx.prevYVal.push(s.groupCtx.yArrjVal),s.groupCtx.prevX.push(s.groupCtx.xArrj),s.groupCtx.prevXF.push(s.groupCtx.xArrjF),s.groupCtx.prevXVal.push(s.groupCtx.xArrjVal),l.add(P)},u=0,g=0;u1?d=(s=u.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:String(f).indexOf("%")===-1?d=parseInt(f,10):d*=parseInt(f,10)/100,o=this.isReversed?this.baseLineY[h]:u.globals.gridHeight-this.baseLineY[h],i=u.globals.padHorizontal+(s-d)/2}var p=u.globals.barGroups.length||1;return{x:i,y:a,yDivision:r,xDivision:s,barHeight:c/p,barWidth:d/p,zeroH:o,zeroW:l}}},{key:"drawStackedBarPaths",value:function(i){for(var a,s=i.indexes,r=i.barHeight,o=i.strokeWidth,l=i.zeroW,h=i.x,c=i.y,d=i.columnGroupIndex,u=i.seriesGroup,g=i.yDivision,f=i.elSeries,p=this.w,x=c+d*r,b=s.i,m=s.j,y=s.realIndex,k=s.translationsIndex,v=0,C=0;C0){var A=l;this.groupCtx.prevXVal[w-1][m]<0?A=this.series[b][m]>=0?this.groupCtx.prevX[w-1][m]+v-2*(this.isReversed?v:0):this.groupCtx.prevX[w-1][m]:this.groupCtx.prevXVal[w-1][m]>=0&&(A=this.series[b][m]>=0?this.groupCtx.prevX[w-1][m]:this.groupCtx.prevX[w-1][m]-v+2*(this.isReversed?v:0)),a=A}else a=l;h=this.series[b][m]===null?a:a+this.series[b][m]/this.invertedYRatio-2*(this.isReversed?this.series[b][m]/this.invertedYRatio:0);var S=this.barHelpers.getBarpaths({barYPosition:x,barHeight:r,x1:a,x2:h,strokeWidth:o,isReversed:this.isReversed,series:this.series,realIndex:s.realIndex,seriesGroup:u,i:b,j:m,w:p});return this.barHelpers.barBackground({j:m,i:b,y1:x,y2:r,elSeries:f}),c+=g,{pathTo:S.pathTo,pathFrom:S.pathFrom,goalX:this.barHelpers.getGoalValues("x",l,null,b,m,k),barXPosition:a,barYPosition:x,x:h,y:c}}},{key:"drawStackedColumnPaths",value:function(i){var a=i.indexes,s=i.x,r=i.y,o=i.xDivision,l=i.barWidth,h=i.zeroH,c=i.columnGroupIndex,d=i.seriesGroup,u=i.elSeries,g=this.w,f=a.i,p=a.j,x=a.bc,b=a.realIndex,m=a.translationsIndex;if(g.globals.isXNumeric){var y=g.globals.seriesX[b][p];y||(y=0),s=(y-g.globals.minX)/this.xRatio-l/2*g.globals.barGroups.length}for(var k,v=s+c*l,C=0,w=0;w0&&!g.globals.isXNumeric||A>0&&g.globals.isXNumeric&&g.globals.seriesX[b-1][p]===g.globals.seriesX[b][p]){var S,M,P,T=Math.min(this.yRatio.length+1,b+1);if(this.groupCtx.prevY[A-1]!==void 0&&this.groupCtx.prevY[A-1].length)for(var I=1;I=0?P-C+2*(this.isReversed?C:0):P;break}if(((H=this.groupCtx.prevYVal[A-X])===null||H===void 0?void 0:H[p])>=0){M=this.series[f][p]>=0?P:P+C-2*(this.isReversed?C:0);break}}M===void 0&&(M=g.globals.gridHeight),k=(S=this.groupCtx.prevYF[0])!==null&&S!==void 0&&S.every(function(_){return _===0})&&this.groupCtx.prevYF.slice(1,A).every(function(_){return _.every(function(N){return isNaN(N)})})?h:M}else k=h;r=this.series[f][p]?k-this.series[f][p]/this.yRatio[m]+2*(this.isReversed?this.series[f][p]/this.yRatio[m]:0):k;var D=this.barHelpers.getColumnPaths({barXPosition:v,barWidth:l,y1:k,y2:r,yRatio:this.yRatio[m],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:d,realIndex:a.realIndex,i:f,j:p,w:g});return this.barHelpers.barBackground({bc:x,j:p,i:f,x1:v,x2:l,elSeries:u}),{pathTo:D.pathTo,pathFrom:D.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,h,f,p),barXPosition:v,x:g.globals.isXNumeric?s:s+o,y:r}}}]),t}(),Ri=function(n){qt(t,mt);var e=Ut(t);function t(){return Y(this,t),e.apply(this,arguments)}return F(t,[{key:"draw",value:function(i,a,s){var r=this,o=this.w,l=new R(this.ctx),h=o.globals.comboCharts?a:o.config.chart.type,c=new ze(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=o.config.plotOptions.bar.horizontal,this.isOHLC=this.candlestickOptions&&this.candlestickOptions.type==="ohlc";var d=new he(this.ctx,o);i=d.getLogSeries(i),this.series=i,this.yRatio=d.getLogYRatios(this.yRatio),this.barHelpers.initVariables(i);for(var u=l.group({class:"apexcharts-".concat(h,"-series apexcharts-plot-series")}),g=function(p){r.isBoxPlot=o.config.chart.type==="boxPlot"||o.config.series[p].type==="boxPlot";var x,b,m,y,k=void 0,v=void 0,C=[],w=[],A=o.globals.comboCharts?s[p]:p,S=r.barHelpers.getGroupIndex(A).columnGroupIndex,M=l.group({class:"apexcharts-series",seriesName:L.escapeString(o.globals.seriesNames[A]),rel:p+1,"data:realIndex":A});r.ctx.series.addCollapsedClassToSeries(M,A),i[p].length>0&&(r.visibleI=r.visibleI+1);var P,T,I=0;r.yRatio.length>1&&(r.yaxisIndex=o.globals.seriesYAxisReverseMap[A][0],I=A);var z=r.barHelpers.initialPositions(A);v=z.y,P=z.barHeight,b=z.yDivision,y=z.zeroW,k=z.x,T=z.barWidth,x=z.xDivision,m=z.zeroH,w.push(k+T/2);for(var X=l.group({class:"apexcharts-datalabels","data:realIndex":A}),E=l.group({class:"apexcharts-bar-goals-markers"}),H=function(_){var N=r.barHelpers.getStrokeWidth(p,_,A),W=null,Q={indexes:{i:p,j:_,realIndex:A,translationsIndex:I},x:k,y:v,strokeWidth:N,elSeries:M};W=r.isHorizontal?r.drawHorizontalBoxPaths(O(O({},Q),{},{yDivision:b,barHeight:P,zeroW:y})):r.drawVerticalBoxPaths(O(O({},Q),{},{xDivision:x,barWidth:T,zeroH:m})),v=W.y,k=W.x;var oe=r.barHelpers.drawGoalLine({barXPosition:W.barXPosition,barYPosition:W.barYPosition,goalX:W.goalX,goalY:W.goalY,barHeight:P,barWidth:T});oe&&E.add(oe),_>0&&w.push(k+T/2),C.push(v),W.pathTo.forEach(function(U,de){var Z=!r.isBoxPlot&&r.candlestickOptions.wick.useFillColor?W.color[de]:o.globals.stroke.colors[p],q=c.fillPath({seriesNumber:A,dataPointIndex:_,color:W.color[de],value:i[p][_]});r.renderSeries({realIndex:A,pathFill:q,lineFill:Z,j:_,i:p,pathFrom:W.pathFrom,pathTo:U,strokeWidth:N,elSeries:M,x:k,y:v,series:i,columnGroupIndex:S,barHeight:P,barWidth:T,elDataLabelsWrap:X,elGoalsMarkers:E,visibleSeries:r.visibleI,type:o.config.chart.type})})},D=0;D0&&(z=this.getPreviousPath(x,g,!0)),this.isOHLC){var X=T+o/2,E=l-v.o/k,H=l-v.c/k;I=[d.move(X,C)+d.line(X,w)+d.move(X,E)+d.line(T,E)+d.move(X,H)+d.line(T+o,H)]}else I=this.isBoxPlot?[d.move(T,S)+d.line(T+o/2,S)+d.line(T+o/2,C)+d.line(T+o/4,C)+d.line(T+o-o/4,C)+d.line(T+o/2,C)+d.line(T+o/2,S)+d.line(T+o,S)+d.line(T+o,P)+d.line(T,P)+d.line(T,S+h/2),d.move(T,P)+d.line(T+o,P)+d.line(T+o,M)+d.line(T+o/2,M)+d.line(T+o/2,w)+d.line(T+o-o/4,w)+d.line(T+o/4,w)+d.line(T+o/2,w)+d.line(T+o/2,M)+d.line(T,M)+d.line(T,P)+"z"]:[d.move(T,M)+d.line(T+o/2,M)+d.line(T+o/2,C)+d.line(T+o/2,M)+d.line(T+o,M)+d.line(T+o,S)+d.line(T+o/2,S)+d.line(T+o/2,w)+d.line(T+o/2,S)+d.line(T,S)+d.line(T,M-h/2)];return z+=d.move(T,S),c.globals.isXNumeric||(s+=r),{pathTo:I,pathFrom:z,x:s,y:M,goalY:this.barHelpers.getGoalValues("y",null,l,u,g,a.translationsIndex),barXPosition:T,color:A}}},{key:"drawHorizontalBoxPaths",value:function(i){var a=i.indexes;i.x;var s=i.y,r=i.yDivision,o=i.barHeight,l=i.zeroW,h=i.strokeWidth,c=this.w,d=new R(this.ctx),u=a.i,g=a.j,f=this.boxOptions.colors.lower;this.isBoxPlot&&(f=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var p=this.invertedYRatio,x=a.realIndex,b=this.getOHLCValue(x,g),m=l,y=l,k=Math.min(b.o,b.c),v=Math.max(b.o,b.c),C=b.m;c.globals.isXNumeric&&(s=(c.globals.seriesX[x][g]-c.globals.minX)/this.invertedXRatio-o/2);var w=s+o*this.visibleI;this.series[u][g]===void 0||this.series[u][g]===null?(k=l,v=l):(k=l+k/p,v=l+v/p,m=l+b.h/p,y=l+b.l/p,C=l+b.m/p);var A=d.move(l,w),S=d.move(k,w+o/2);return c.globals.previousPaths.length>0&&(S=this.getPreviousPath(x,g,!0)),A=[d.move(k,w)+d.line(k,w+o/2)+d.line(m,w+o/2)+d.line(m,w+o/2-o/4)+d.line(m,w+o/2+o/4)+d.line(m,w+o/2)+d.line(k,w+o/2)+d.line(k,w+o)+d.line(C,w+o)+d.line(C,w)+d.line(k+h/2,w),d.move(C,w)+d.line(C,w+o)+d.line(v,w+o)+d.line(v,w+o/2)+d.line(y,w+o/2)+d.line(y,w+o-o/4)+d.line(y,w+o/4)+d.line(y,w+o/2)+d.line(v,w+o/2)+d.line(v,w)+d.line(C,w)+"z"],S+=d.move(k,w),c.globals.isXNumeric||(s+=r),{pathTo:A,pathFrom:S,x:v,y:s,goalX:this.barHelpers.getGoalValues("x",l,null,u,g),barYPosition:w,color:f}}},{key:"getOHLCValue",value:function(i,a){var s=this.w,r=new he(this.ctx,s),o=r.getLogValAtSeriesIndex(s.globals.seriesCandleH[i][a],i),l=r.getLogValAtSeriesIndex(s.globals.seriesCandleO[i][a],i),h=r.getLogValAtSeriesIndex(s.globals.seriesCandleM[i][a],i),c=r.getLogValAtSeriesIndex(s.globals.seriesCandleC[i][a],i),d=r.getLogValAtSeriesIndex(s.globals.seriesCandleL[i][a],i);return{o:this.isBoxPlot?o:l,h:this.isBoxPlot?l:o,m:h,l:this.isBoxPlot?c:d,c:this.isBoxPlot?d:c}}}]),t}(),As=function(){function n(e){Y(this,n),this.ctx=e,this.w=e.w}return F(n,[{key:"checkColorRange",value:function(){var e=this.w,t=!1,i=e.config.plotOptions[e.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map(function(a,s){a.from<=0&&(t=!0)}),t}},{key:"getShadeColor",value:function(e,t,i,a){var s=this.w,r=1,o=s.config.plotOptions[e].shadeIntensity,l=this.determineColor(e,t,i);s.globals.hasNegs||a?r=s.config.plotOptions[e].reverseNegativeShade?l.percent<0?l.percent/100*(1.25*o):(1-l.percent/100)*(1.25*o):l.percent<=0?1-(1+l.percent/100)*o:(1-l.percent/100)*o:(r=1-l.percent/100,e==="treemap"&&(r=(1-l.percent/100)*(1.25*o)));var h=l.color,c=new L;if(s.config.plotOptions[e].enableShades)if(this.w.config.theme.mode==="dark"){var d=c.shadeColor(-1*r,l.color);h=L.hexToRgba(L.isColorHex(d)?d:L.rgb2hex(d),s.config.fill.opacity)}else{var u=c.shadeColor(r,l.color);h=L.hexToRgba(L.isColorHex(u)?u:L.rgb2hex(u),s.config.fill.opacity)}return{color:h,colorProps:l}}},{key:"determineColor",value:function(e,t,i){var a=this.w,s=a.globals.series[t][i],r=a.config.plotOptions[e],o=r.colorScale.inverse?i:t;r.distributed&&a.config.chart.type==="treemap"&&(o=i);var l=a.globals.colors[o],h=null,c=Math.min.apply(Math,ge(a.globals.series[t])),d=Math.max.apply(Math,ge(a.globals.series[t]));r.distributed||e!=="heatmap"||(c=a.globals.minY,d=a.globals.maxY),r.colorScale.min!==void 0&&(c=r.colorScale.mina.globals.maxY?r.colorScale.max:a.globals.maxY);var u=Math.abs(d)+Math.abs(c),g=100*s/(u===0?u-1e-6:u);return r.colorScale.ranges.length>0&&r.colorScale.ranges.map(function(f,p){if(s>=f.from&&s<=f.to){l=f.color,h=f.foreColor?f.foreColor:null,c=f.from,d=f.to;var x=Math.abs(d)+Math.abs(c);g=100*s/(x===0?x-1e-6:x)}}),{color:l,foreColor:h,percent:g}}},{key:"calculateDataLabels",value:function(e){var t=e.text,i=e.x,a=e.y,s=e.i,r=e.j,o=e.colorProps,l=e.fontSize,h=this.w.config.dataLabels,c=new R(this.ctx),d=new bt(this.ctx),u=null;if(h.enabled){u=c.group({class:"apexcharts-data-labels"});var g=h.offsetX,f=h.offsetY,p=i+g,x=a+parseFloat(h.style.fontSize)/3+f;d.plotDataLabelsText({x:p,y:x,text:t,i:s,j:r,color:o.foreColor,parent:u,fontSize:l,dataLabelsConfig:h})}return u}},{key:"addListeners",value:function(e){var t=new R(this.ctx);e.node.addEventListener("mouseenter",t.pathMouseEnter.bind(this,e)),e.node.addEventListener("mouseleave",t.pathMouseLeave.bind(this,e)),e.node.addEventListener("mousedown",t.pathMouseDown.bind(this,e))}}]),n}(),ln=function(){function n(e,t){Y(this,n),this.ctx=e,this.w=e.w,this.xRatio=t.xRatio,this.yRatio=t.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new As(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return F(n,[{key:"draw",value:function(e){var t=this.w,i=new R(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(t.globals.cuid,")"));var s=t.globals.gridWidth/t.globals.dataPoints,r=t.globals.gridHeight/t.globals.series.length,o=0,l=!1;this.negRange=this.helpers.checkColorRange();var h=e.slice();t.config.yaxis[0].reversed&&(l=!0,h.reverse());for(var c=l?0:h.length-1;l?c=0;l?c++:c--){var d=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:L.escapeString(t.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(this.ctx.series.addCollapsedClassToSeries(d,c),t.config.chart.dropShadow.enabled){var u=t.config.chart.dropShadow;new fe(this.ctx).dropShadow(d,u,c)}for(var g=0,f=t.config.plotOptions.heatmap.shadeIntensity,p=0,x=0;x=h[c].length)break;var b=this.helpers.getShadeColor(t.config.chart.type,c,p,this.negRange),m=b.color,y=b.colorProps;t.config.fill.type==="image"&&(m=new ze(this.ctx).fillPath({seriesNumber:c,dataPointIndex:p,opacity:t.globals.hasNegs?y.percent<0?1-(1+y.percent/100):f+y.percent/100:y.percent/100,patternID:L.randomId(),width:t.config.fill.image.width?t.config.fill.image.width:s,height:t.config.fill.image.height?t.config.fill.image.height:r}));var k=this.rectRadius,v=i.drawRect(g,o,s,r,k);if(v.attr({cx:g,cy:o}),v.node.classList.add("apexcharts-heatmap-rect"),d.add(v),v.attr({fill:m,i:c,index:c,j:p,val:e[c][p],"stroke-width":this.strokeWidth,stroke:t.config.plotOptions.heatmap.useFillColorAsStroke?m:t.globals.stroke.colors[0],color:m}),this.helpers.addListeners(v),t.config.chart.animations.enabled&&!t.globals.dataChanged){var C=1;t.globals.resized||(C=t.config.chart.animations.speed),this.animateHeatMap(v,g,o,s,r,C)}if(t.globals.dataChanged){var w=1;if(this.dynamicAnim.enabled&&t.globals.shouldAnimate){w=this.dynamicAnim.speed;var A=t.globals.previousPaths[c]&&t.globals.previousPaths[c][p]&&t.globals.previousPaths[c][p].color;A||(A="rgba(255, 255, 255, 0)"),this.animateHeatColor(v,L.isColorHex(A)?A:L.rgb2hex(A),L.isColorHex(m)?m:L.rgb2hex(m),w)}}var S=(0,t.config.dataLabels.formatter)(t.globals.series[c][p],{value:t.globals.series[c][p],seriesIndex:c,dataPointIndex:p,w:t}),M=this.helpers.calculateDataLabels({text:S,x:g+s/2,y:o+r/2,i:c,j:p,colorProps:y,series:h});M!==null&&d.add(M),g+=s,p++}o+=r,a.add(d)}var P=t.globals.yAxisScale[0].result.slice();return t.config.yaxis[0].reversed?P.unshift(""):P.push(""),t.globals.yAxisScale[0].result=P,a}},{key:"animateHeatMap",value:function(e,t,i,a,s,r){var o=new vt(this.ctx);o.animateRect(e,{x:t+a/2,y:i+s/2,width:0,height:0},{x:t,y:i,width:a,height:s},r,function(){o.animationCompleted(e)})}},{key:"animateHeatColor",value:function(e,t,i,a){e.attr({fill:t}).animate(a).attr({fill:i})}}]),n}(),Cs=function(){function n(e){Y(this,n),this.ctx=e,this.w=e.w}return F(n,[{key:"drawYAxisTexts",value:function(e,t,i,a){var s=this.w,r=s.config.yaxis[0],o=s.globals.yLabelFormatters[0];return new R(this.ctx).drawText({x:e+r.labels.offsetX,y:t+r.labels.offsetY,text:o(a,i),textAnchor:"middle",fontSize:r.labels.style.fontSize,fontFamily:r.labels.style.fontFamily,foreColor:Array.isArray(r.labels.style.colors)?r.labels.style.colors[i]:r.labels.style.colors})}}]),n}(),Ss=function(){function n(e){Y(this,n),this.ctx=e,this.w=e.w;var t=this.w;this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels,this.lineColorArr=t.globals.stroke.colors!==void 0?t.globals.stroke.colors:t.globals.colors,this.defaultSize=Math.min(t.globals.gridWidth,t.globals.gridHeight),this.centerY=this.defaultSize/2,this.centerX=t.globals.gridWidth/2,t.config.chart.type==="radialBar"?this.fullAngle=360:this.fullAngle=Math.abs(t.config.plotOptions.pie.endAngle-t.config.plotOptions.pie.startAngle),this.initialAngle=t.config.plotOptions.pie.startAngle%this.fullAngle,t.globals.radialSize=this.defaultSize/2.05-t.config.stroke.width-(t.config.chart.sparkline.enabled?0:t.config.chart.dropShadow.blur),this.donutSize=t.globals.radialSize*parseInt(t.config.plotOptions.pie.donut.size,10)/100;var i=t.config.plotOptions.pie.customScale,a=t.globals.gridWidth/2,s=t.globals.gridHeight/2;this.translateX=a-a*i,this.translateY=s-s*i,this.dataLabelsGroup=new R(this.ctx).group({class:"apexcharts-datalabels-group",transform:"translate(".concat(this.translateX,", ").concat(this.translateY,") scale(").concat(i,")")}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSectorAngleArr=[]}return F(n,[{key:"draw",value:function(e){var t=this,i=this.w,a=new R(this.ctx),s=a.group({class:"apexcharts-pie"});if(i.globals.noData)return s;for(var r=0,o=0;o-1&&this.pieClicked(u),i.config.dataLabels.enabled){var v=y.x,C=y.y,w=100*f/this.fullAngle+"%";if(f!==0&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?t.endAngle=t.endAngle-(a+o):a+o=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(c=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(c)>this.fullAngle&&(c-=this.fullAngle);var d=Math.PI*(c-90)/180,u=i.centerX+r*Math.cos(h),g=i.centerY+r*Math.sin(h),f=i.centerX+r*Math.cos(d),p=i.centerY+r*Math.sin(d),x=L.polarToCartesian(i.centerX,i.centerY,i.donutSize,c),b=L.polarToCartesian(i.centerX,i.centerY,i.donutSize,l),m=s>180?1:0,y=["M",u,g,"A",r,r,0,m,1,f,p];return t=i.chartType==="donut"?[].concat(y,["L",x.x,x.y,"A",i.donutSize,i.donutSize,0,m,0,b.x,b.y,"L",u,g,"z"]).join(" "):i.chartType==="pie"||i.chartType==="polarArea"?[].concat(y,["L",i.centerX,i.centerY,"L",u,g]).join(" "):[].concat(y).join(" "),o.roundPathCorners(t,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(e){var t=this.w,i=new ms(this.ctx),a=new R(this.ctx),s=new Cs(this.ctx),r=a.group(),o=a.group(),l=i.niceScale(0,Math.ceil(this.maxY),0),h=l.result.reverse(),c=l.result.length;this.maxY=l.niceMax;for(var d=t.globals.radialSize,u=d/(c-1),g=0;g1&&e.total.show&&(s=e.total.color);var o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),l=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,e.value.formatter)(i,r),a||typeof e.total.formatter!="function"||(i=e.total.formatter(r));var h=t===e.total.label;t=this.donutDataLabels.total.label?e.name.formatter(t,h,r):"",o!==null&&(o.textContent=t),l!==null&&(l.textContent=i),o!==null&&(o.style.fill=s)}},{key:"printDataLabelsInner",value:function(e,t){var i=this.w,a=e.getAttribute("data:value"),s=i.globals.seriesNames[parseInt(e.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(t,s,a,e);var r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");r!==null&&(r.style.opacity=1)}},{key:"drawSpokes",value:function(e){var t=this,i=this.w,a=new R(this.ctx),s=i.config.plotOptions.polarArea.spokes;if(s.strokeWidth!==0){for(var r=[],o=360/i.globals.series.length,l=0;l0&&(C=t.getPreviousPath(b));for(var w=0;w=10?e.x>0?(i="start",a+=10):e.x<0&&(i="end",a-=10):i="middle",Math.abs(e.y)>=t-10&&(e.y<0?s-=10:e.y>0&&(s+=10)),{textAnchor:i,newX:a,newY:s}}},{key:"getPreviousPath",value:function(e){for(var t=this.w,i=null,a=0;a0&&parseInt(s.realIndex,10)===parseInt(e,10)&&t.globals.previousPaths[a].paths[0]!==void 0&&(i=t.globals.previousPaths[a].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.dataPointsLen;e=e||[],t=t||[];for(var a=[],s=0;s=360&&(p=360-Math.abs(this.startAngle)-.1);var x=s.drawPath({d:"",stroke:g,strokeWidth:h*parseInt(u.strokeWidth,10)/100,fill:"none",strokeOpacity:u.opacity,classes:"apexcharts-radialbar-area"});if(u.dropShadow.enabled){var b=u.dropShadow;o.dropShadow(x,b)}d.add(x),x.attr("id","apexcharts-radialbarTrack-"+c),this.animatePaths(x,{centerX:i.centerX,centerY:i.centerY,endAngle:p,startAngle:f,size:i.size,i:c,totalItems:2,animBeginArr:0,dur:0,isTrack:!0})}return r}},{key:"drawArcs",value:function(i){var a=this.w,s=new R(this.ctx),r=new ze(this.ctx),o=new fe(this.ctx),l=s.group(),h=this.getStrokeWidth(i);i.size=i.size-h/2;var c=a.config.plotOptions.radialBar.hollow.background,d=i.size-h*i.series.length-this.margin*i.series.length-h*parseInt(a.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,u=d-a.config.plotOptions.radialBar.hollow.margin;a.config.plotOptions.radialBar.hollow.image!==void 0&&(c=this.drawHollowImage(i,l,d,c));var g=this.drawHollow({size:u,centerX:i.centerX,centerY:i.centerY,fill:c||"transparent"});if(a.config.plotOptions.radialBar.hollow.dropShadow.enabled){var f=a.config.plotOptions.radialBar.hollow.dropShadow;o.dropShadow(g,f)}var p=1;!this.radialDataLabels.total.show&&a.globals.series.length>1&&(p=0);var x=null;if(this.radialDataLabels.show){var b=a.globals.dom.Paper.findOne(".apexcharts-datalabels-group");x=this.renderInnerDataLabels(b,this.radialDataLabels,{hollowSize:d,centerX:i.centerX,centerY:i.centerY,opacity:p})}a.config.plotOptions.radialBar.hollow.position==="back"&&(l.add(g),x&&l.add(x));var m=!1;a.config.plotOptions.radialBar.inverseOrder&&(m=!0);for(var y=m?i.series.length-1:0;m?y>=0:y100?100:i.series[y])/100,S=Math.round(this.totalAngle*A)+this.startAngle,M=void 0;a.globals.dataChanged&&(w=this.startAngle,M=Math.round(this.totalAngle*L.negToZero(a.globals.previousPaths[y])/100)+w),Math.abs(S)+Math.abs(C)>360&&(S-=.01),Math.abs(M)+Math.abs(w)>360&&(M-=.01);var P=S-C,T=Array.isArray(a.config.stroke.dashArray)?a.config.stroke.dashArray[y]:a.config.stroke.dashArray,I=s.drawPath({d:"",stroke:v,strokeWidth:h,fill:"none",fillOpacity:a.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+y,strokeDashArray:T});if(R.setAttrs(I.node,{"data:angle":P,"data:value":i.series[y]}),a.config.chart.dropShadow.enabled){var z=a.config.chart.dropShadow;o.dropShadow(I,z,y)}if(o.setSelectionFilter(I,0,y),this.addListeners(I,this.radialDataLabels),k.add(I),I.attr({index:0,j:y}),this.barLabels.enabled){var X=L.polarToCartesian(i.centerX,i.centerY,i.size,C),E=this.barLabels.formatter(a.globals.seriesNames[y],{seriesIndex:y,w:a}),H=["apexcharts-radialbar-label"];this.barLabels.onClick||H.push("apexcharts-no-click");var D=this.barLabels.useSeriesColors?a.globals.colors[y]:a.config.chart.foreColor;D||(D=a.config.chart.foreColor);var _=X.x+this.barLabels.offsetX,N=X.y+this.barLabels.offsetY,W=s.drawText({x:_,y:N,text:E,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:D,cssClass:H.join(" ")});W.on("click",this.onBarLabelClick),W.attr({rel:y+1}),C!==0&&W.attr({"transform-origin":"".concat(_," ").concat(N),transform:"rotate(".concat(C," 0 0)")}),k.add(W)}var Q=0;!this.initialAnim||a.globals.resized||a.globals.dataChanged||(Q=a.config.chart.animations.speed),a.globals.dataChanged&&(Q=a.config.chart.animations.dynamicAnimation.speed),this.animDur=Q/(1.2*i.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(I,{centerX:i.centerX,centerY:i.centerY,endAngle:S,startAngle:C,prevEndAngle:M,prevStartAngle:w,size:i.size,i:y,totalItems:2,animBeginArr:this.animBeginArr,dur:Q,shouldSetPrevPaths:!0})}return{g:l,elHollow:g,dataLabels:x}}},{key:"drawHollow",value:function(i){var a=new R(this.ctx).drawCircle(2*i.size);return a.attr({class:"apexcharts-radialbar-hollow",cx:i.centerX,cy:i.centerY,r:i.size,fill:i.fill}),a}},{key:"drawHollowImage",value:function(i,a,s,r){var o=this.w,l=new ze(this.ctx),h=L.randomId(),c=o.config.plotOptions.radialBar.hollow.image;if(o.config.plotOptions.radialBar.hollow.imageClipped)l.clippedImgArea({width:s,height:s,image:c,patternID:"pattern".concat(o.globals.cuid).concat(h)}),r="url(#pattern".concat(o.globals.cuid).concat(h,")");else{var d=o.config.plotOptions.radialBar.hollow.imageWidth,u=o.config.plotOptions.radialBar.hollow.imageHeight;if(d===void 0&&u===void 0){var g=o.globals.dom.Paper.image(c,function(p){this.move(i.centerX-p.width/2+o.config.plotOptions.radialBar.hollow.imageOffsetX,i.centerY-p.height/2+o.config.plotOptions.radialBar.hollow.imageOffsetY)});a.add(g)}else{var f=o.globals.dom.Paper.image(c,function(p){this.move(i.centerX-d/2+o.config.plotOptions.radialBar.hollow.imageOffsetX,i.centerY-u/2+o.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(d,u)});a.add(f)}}return r}},{key:"getStrokeWidth",value:function(i){var a=this.w;return i.size*(100-parseInt(a.config.plotOptions.radialBar.hollow.size,10))/100/(i.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(i){var a=parseInt(i.target.getAttribute("rel"),10)-1,s=this.barLabels.onClick,r=this.w;s&&s(r.globals.seriesNames[a],{w:r,seriesIndex:a})}}]),t}(),dn=function(n){qt(t,mt);var e=Ut(t);function t(){return Y(this,t),e.apply(this,arguments)}return F(t,[{key:"draw",value:function(i,a){var s=this.w,r=new R(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=i,this.seriesRangeStart=s.globals.seriesRangeStart,this.seriesRangeEnd=s.globals.seriesRangeEnd,this.barHelpers.initVariables(i);for(var o=r.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),l=0;l0&&(this.visibleI=this.visibleI+1);var m=0,y=0,k=0;this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[p][0],k=p);var v=this.barHelpers.initialPositions(p);f=v.y,u=v.zeroW,g=v.x,y=v.barWidth,m=v.barHeight,h=v.xDivision,c=v.yDivision,d=v.zeroH;for(var C=r.group({class:"apexcharts-datalabels","data:realIndex":p}),w=r.group({class:"apexcharts-rangebar-goals-markers"}),A=0;A0});return this.isHorizontal?(r=p.config.plotOptions.bar.rangeBarGroupRows?l+u*k:l+c*this.visibleI+u*k,v>-1&&!p.config.plotOptions.bar.rangeBarOverlap&&(x=p.globals.seriesRange[a][v].overlaps).indexOf(b)>-1&&(r=(c=f.barHeight/x.length)*this.visibleI+u*(100-parseInt(this.barOptions.barHeight,10))/100/2+c*(this.visibleI+x.indexOf(b))+u*k)):(k>-1&&!p.globals.timescaleLabels.length&&(o=p.config.plotOptions.bar.rangeBarGroupRows?h+g*k:h+d*this.visibleI+g*k),v>-1&&!p.config.plotOptions.bar.rangeBarOverlap&&(x=p.globals.seriesRange[a][v].overlaps).indexOf(b)>-1&&(o=(d=f.barWidth/x.length)*this.visibleI+g*(100-parseInt(this.barOptions.barWidth,10))/100/2+d*(this.visibleI+x.indexOf(b))+g*k)),{barYPosition:r,barXPosition:o,barHeight:c,barWidth:d}}},{key:"drawRangeColumnPaths",value:function(i){var a=i.indexes,s=i.x,r=i.xDivision,o=i.barWidth,l=i.barXPosition,h=i.zeroH,c=this.w,d=a.i,u=a.j,g=a.realIndex,f=a.translationsIndex,p=this.yRatio[f],x=this.getRangeValue(g,u),b=Math.min(x.start,x.end),m=Math.max(x.start,x.end);this.series[d][u]===void 0||this.series[d][u]===null?b=h:(b=h-b/p,m=h-m/p);var y=Math.abs(m-b),k=this.barHelpers.getColumnPaths({barXPosition:l,barWidth:o,y1:b,y2:m,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:g,i:g,j:u,w:c});if(c.globals.isXNumeric){var v=this.getBarXForNumericXAxis({x:s,j:u,realIndex:g,barWidth:o});s=v.x,l=v.barXPosition}else s+=r;return{pathTo:k.pathTo,pathFrom:k.pathFrom,barHeight:y,x:s,y:x.start<0&&x.end<0?b:m,goalY:this.barHelpers.getGoalValues("y",null,h,d,u,f),barXPosition:l}}},{key:"preventBarOverflow",value:function(i){var a=this.w;return i<0&&(i=0),i>a.globals.gridWidth&&(i=a.globals.gridWidth),i}},{key:"drawRangeBarPaths",value:function(i){var a=i.indexes,s=i.y,r=i.y1,o=i.y2,l=i.yDivision,h=i.barHeight,c=i.barYPosition,d=i.zeroW,u=this.w,g=a.realIndex,f=a.j,p=this.preventBarOverflow(d+r/this.invertedYRatio),x=this.preventBarOverflow(d+o/this.invertedYRatio),b=this.getRangeValue(g,f),m=Math.abs(x-p),y=this.barHelpers.getBarpaths({barYPosition:c,barHeight:h,x1:p,x2:x,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:g,realIndex:g,j:f,w:u});return u.globals.isXNumeric||(s+=l),{pathTo:y.pathTo,pathFrom:y.pathFrom,barWidth:m,x:b.start<0&&b.end<0?p:x,goalX:this.barHelpers.getGoalValues("x",d,null,g,f),y:s}}},{key:"getRangeValue",value:function(i,a){var s=this.w;return{start:s.globals.seriesRangeStart[i][a],end:s.globals.seriesRangeEnd[i][a]}}}]),t}(),un=function(){function n(e){Y(this,n),this.w=e.w,this.lineCtx=e}return F(n,[{key:"sameValueSeriesFix",value:function(e,t){var i=this.w;if((i.config.fill.type==="gradient"||i.config.fill.type[e]==="gradient")&&new he(this.lineCtx.ctx,i).seriesHaveSameValues(e)){var a=t[e].slice();a[a.length-1]=a[a.length-1]+1e-6,t[e]=a}return t}},{key:"calculatePoints",value:function(e){var t=e.series,i=e.realIndex,a=e.x,s=e.y,r=e.i,o=e.j,l=e.prevY,h=this.w,c=[],d=[],u=this.lineCtx.categoryAxisCorrection+h.config.markers.offsetX;return h.globals.isXNumeric&&(u=(h.globals.seriesX[i][0]-h.globals.minX)/this.lineCtx.xRatio+h.config.markers.offsetX),o===0&&(c.push(u),d.push(L.isNumber(t[r][0])?l+h.config.markers.offsetY:null)),c.push(a+h.config.markers.offsetX),d.push(L.isNumber(t[r][o+1])?s+h.config.markers.offsetY:null),{x:c,y:d}}},{key:"checkPreviousPaths",value:function(e){for(var t=e.pathFromLine,i=e.pathFromArea,a=e.realIndex,s=this.w,r=0;r0&&parseInt(o.realIndex,10)===parseInt(a,10)&&(o.type==="line"?(this.lineCtx.appendPathFrom=!1,t=s.globals.previousPaths[r].paths[0].d):o.type==="area"&&(this.lineCtx.appendPathFrom=!1,i=s.globals.previousPaths[r].paths[0].d,s.config.stroke.show&&s.globals.previousPaths[r].paths[1]&&(t=s.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:t,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(e){var t,i,a,s=e.i,r=e.realIndex,o=e.series,l=e.prevY,h=e.lineYPosition,c=e.translationsIndex,d=this.w,u=d.config.chart.stacked&&!d.globals.comboCharts||d.config.chart.stacked&&d.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((t=this.w.config.series[r])===null||t===void 0?void 0:t.type)==="bar"||((i=this.w.config.series[r])===null||i===void 0?void 0:i.type)==="column");if(((a=o[s])===null||a===void 0?void 0:a[0])!==void 0)l=(h=u&&s>0?this.lineCtx.prevSeriesY[s-1][0]:this.lineCtx.zeroY)-o[s][0]/this.lineCtx.yRatio[c]+2*(this.lineCtx.isReversed?o[s][0]/this.lineCtx.yRatio[c]:0);else if(u&&s>0&&o[s][0]===void 0){for(var g=s-1;g>=0;g--)if(o[g][0]!==null&&o[g][0]!==void 0){l=h=this.lineCtx.prevSeriesY[g][0];break}}return{prevY:l,lineYPosition:h}}}]),n}(),gn=function(n){for(var e,t,i,a,s=function(c){for(var d=[],u=c[0],g=c[1],f=d[0]=Xi(u,g),p=1,x=c.length-1;p9&&(a=3*i/Math.sqrt(a),s[l]=a*e,s[l+1]=a*t);for(var h=0;h<=r;h++)a=(n[Math.min(r,h+1)][0]-n[Math.max(0,h-1)][0])/(6*(1+s[h]*s[h])),o.push([a||0,s[h]*a||0]);return o},pn=function(n){var e=gn(n),t=n[1],i=n[0],a=[],s=e[1],r=e[0];a.push(i,[i[0]+r[0],i[1]+r[1],t[0]-s[0],t[1]-s[1],t[0],t[1]]);for(var o=2,l=e.length;o1&&i[1].length<6){var a=i[0].length;i[1]=[2*i[0][a-2]-i[0][a-4],2*i[0][a-1]-i[0][a-3]].concat(i[1])}i[0]=i[0].slice(-2)}return i};function Xi(n,e){return(e[1]-n[1])/(e[0]-n[0])}var Ei=function(){function n(e,t,i){Y(this,n),this.ctx=e,this.w=e.w,this.xyRatios=t,this.pointsChart=!(this.w.config.chart.type!=="bubble"&&this.w.config.chart.type!=="scatter")||i,this.scatter=new xs(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new un(this),this.markers=new At(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return F(n,[{key:"draw",value:function(e,t,i,a){var s,r=this.w,o=new R(this.ctx),l=r.globals.comboCharts?t:r.config.chart.type,h=o.group({class:"apexcharts-".concat(l,"-series apexcharts-plot-series")}),c=new he(this.ctx,r);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=c.getLogSeries(e),this.yRatio=c.getLogYRatios(this.yRatio),this.prevSeriesY=[];for(var d=[],u=0;u1?g:0;this._initSerieVariables(e,u,g);var p=[],x=[],b=[],m=r.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,g),r.globals.isXNumeric&&r.globals.seriesX.length>0&&(m=(r.globals.seriesX[g][0]-r.globals.minX)/this.xRatio),b.push(m);var y,k=m,v=void 0,C=k,w=this.zeroY,A=this.zeroY;w=this.lineHelpers.determineFirstPrevY({i:u,realIndex:g,series:e,prevY:w,lineYPosition:0,translationsIndex:f}).prevY,r.config.stroke.curve==="monotoneCubic"&&e[u][0]===null?p.push(null):p.push(w),y=w,l==="rangeArea"&&(v=A=this.lineHelpers.determineFirstPrevY({i:u,realIndex:g,series:a,prevY:A,lineYPosition:0,translationsIndex:f}).prevY,x.push(p[0]!==null?A:null));var S=this._calculatePathsFrom({type:l,series:e,i:u,realIndex:g,translationsIndex:f,prevX:C,prevY:w,prevY2:A}),M=[p[0]],P=[x[0]],T={type:l,series:e,realIndex:g,translationsIndex:f,i:u,x:m,y:1,pX:k,pY:y,pathsFrom:S,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:b,yArrj:p,y2Arrj:x,seriesRangeEnd:a},I=this._iterateOverDataPoints(O(O({},T),{},{iterations:l==="rangeArea"?e[u].length-1:void 0,isRangeStart:!0}));if(l==="rangeArea"){for(var z=this._calculatePathsFrom({series:a,i:u,realIndex:g,prevX:C,prevY:A}),X=this._iterateOverDataPoints(O(O({},T),{},{series:a,xArrj:[m],yArrj:M,y2Arrj:P,pY:v,areaPaths:I.areaPaths,pathsFrom:z,iterations:a[u].length-1,isRangeStart:!1})),E=I.linePaths.length/2,H=0;H=0;D--)h.add(d[D]);else for(var _=0;_1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[i],r=i),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[r]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[r]:0),this.areaBottomY=this.zeroY,(this.zeroY>a.globals.gridHeight||a.config.plotOptions.area.fillTo==="end")&&(this.areaBottomY=a.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=s.group({class:"apexcharts-series",zIndex:a.config.series[i].zIndex!==void 0?a.config.series[i].zIndex:i,seriesName:L.escapeString(a.globals.seriesNames[i])}),this.elPointsMain=s.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),a.globals.hasNullValues){var o=this.markers.plotChartMarkers({pointsPos:{x:[0],y:[a.globals.gridHeight+a.globals.markers.largestSize]},seriesIndex:t,j:0,pSize:.1,alwaysDrawMarker:!0,isVirtualPoint:!0});o!==null&&this.elPointsMain.add(o)}this.elDataLabelsWrap=s.group({class:"apexcharts-datalabels","data:realIndex":i});var l=e[t].length===a.globals.dataPoints;this.elSeries.attr({"data:longestSeries":l,rel:t+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(e){var t,i,a,s,r=e.type,o=e.series,l=e.i,h=e.realIndex,c=e.translationsIndex,d=e.prevX,u=e.prevY,g=e.prevY2,f=this.w,p=new R(this.ctx);if(o[l][0]===null){for(var x=0;x0){var b=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:s,realIndex:h});a=b.pathFromLine,s=b.pathFromArea}return{prevX:d,prevY:u,linePath:t,areaPath:i,pathFromLine:a,pathFromArea:s}}},{key:"_handlePaths",value:function(e){var t=e.type,i=e.realIndex,a=e.i,s=e.paths,r=this.w,o=new R(this.ctx),l=new ze(this.ctx);this.prevSeriesY.push(s.yArrj),r.globals.seriesXvalues[i]=s.xArrj,r.globals.seriesYvalues[i]=s.yArrj;var h=r.config.forecastDataPoints;if(h.count>0&&t!=="rangeArea"){var c=r.globals.seriesXvalues[i][r.globals.seriesXvalues[i].length-h.count-1],d=o.drawRect(c,0,r.globals.gridWidth,r.globals.gridHeight,0);r.globals.dom.elForecastMask.appendChild(d.node);var u=o.drawRect(0,0,c,r.globals.gridHeight,0);r.globals.dom.elNonForecastMask.appendChild(u.node)}this.pointsChart||r.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var g={i:a,realIndex:i,animationDelay:a,initialSpeed:r.config.chart.animations.speed,dataChangeSpeed:r.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(t)};if(t==="area")for(var f=l.fillPath({seriesNumber:i}),p=0;p0&&t!=="rangeArea"){var w=o.renderPaths(v);w.node.setAttribute("stroke-dasharray",h.dashArray),h.strokeWidth&&w.node.setAttribute("stroke-width",h.strokeWidth),this.elSeries.add(w),w.attr("clip-path","url(#forecastMask".concat(r.globals.cuid,")")),C.attr("clip-path","url(#nonForecastMask".concat(r.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(e){var t,i,a=this,s=e.type,r=e.series,o=e.iterations,l=e.realIndex,h=e.translationsIndex,c=e.i,d=e.x,u=e.y,g=e.pX,f=e.pY,p=e.pathsFrom,x=e.linePaths,b=e.areaPaths,m=e.seriesIndex,y=e.lineYPosition,k=e.xArrj,v=e.yArrj,C=e.y2Arrj,w=e.isRangeStart,A=e.seriesRangeEnd,S=this.w,M=new R(this.ctx),P=this.yRatio,T=p.prevY,I=p.linePath,z=p.areaPath,X=p.pathFromLine,E=p.pathFromArea,H=L.isNumber(S.globals.minYArr[l])?S.globals.minYArr[l]:S.globals.minY;o||(o=S.globals.dataPoints>1?S.globals.dataPoints-1:S.globals.dataPoints);var D=function(le,ce){return ce-le/P[h]+2*(a.isReversed?le/P[h]:0)},_=u,N=S.config.chart.stacked&&!S.globals.comboCharts||S.config.chart.stacked&&S.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((t=this.w.config.series[l])===null||t===void 0?void 0:t.type)==="bar"||((i=this.w.config.series[l])===null||i===void 0?void 0:i.type)==="column"),W=S.config.stroke.curve;Array.isArray(W)&&(W=Array.isArray(m)?W[m[c]]:W[c]);for(var Q,oe=0,U=0;U0&&S.globals.collapsedSeries.length0;ce--){if(!(S.globals.collapsedSeriesIndices.indexOf(m?.[ce]||ce)>-1))return ce;ce--}return 0}(c-1)][U+1]:y=this.zeroY:y=this.zeroY,de?u=D(H,y):(u=D(r[c][U+1],y),s==="rangeArea"&&(_=D(A[c][U+1],y))),k.push(r[c][U+1]===null?null:d),!de||S.config.stroke.curve!=="smooth"&&S.config.stroke.curve!=="monotoneCubic"?(v.push(u),C.push(_)):(v.push(null),C.push(null));var q=this.lineHelpers.calculatePoints({series:r,x:d,y:u,realIndex:l,i:c,j:U,prevY:T}),ee=this._createPaths({type:s,series:r,i:c,realIndex:l,j:U,x:d,y:u,y2:_,xArrj:k,yArrj:v,y2Arrj:C,pX:g,pY:f,pathState:oe,segmentStartX:Q,linePath:I,areaPath:z,linePaths:x,areaPaths:b,curve:W,isRangeStart:w});b=ee.areaPaths,x=ee.linePaths,g=ee.pX,f=ee.pY,oe=ee.pathState,Q=ee.segmentStartX,z=ee.areaPath,I=ee.linePath,!this.appendPathFrom||S.globals.hasNullValues||W==="monotoneCubic"&&s==="rangeArea"||(X+=M.line(d,this.areaBottomY),E+=M.line(d,this.areaBottomY)),this.handleNullDataPoints(r,q,c,U,l),this._handleMarkersAndLabels({type:s,pointsPos:q,i:c,j:U,realIndex:l,isRangeStart:w})}return{yArrj:v,xArrj:k,pathFromArea:E,areaPaths:b,pathFromLine:X,linePaths:x,linePath:I,areaPath:z}}},{key:"_handleMarkersAndLabels",value:function(e){var t=e.type,i=e.pointsPos,a=e.isRangeStart,s=e.i,r=e.j,o=e.realIndex,l=this.w,h=new bt(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:o,pointsPos:i,zRatio:this.zRatio,elParent:this.elPointsMain});else{l.globals.series[s].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var c=this.markers.plotChartMarkers({pointsPos:i,seriesIndex:o,j:r+1});c!==null&&this.elPointsMain.add(c)}var d=h.drawDataLabel({type:t,isRangeStart:a,pos:i,i:o,j:r+1});d!==null&&this.elDataLabelsWrap.add(d)}},{key:"_createPaths",value:function(e){var t=e.type,i=e.series,a=e.i;e.realIndex;var s,r=e.j,o=e.x,l=e.y,h=e.xArrj,c=e.yArrj,d=e.y2,u=e.y2Arrj,g=e.pX,f=e.pY,p=e.pathState,x=e.segmentStartX,b=e.linePath,m=e.areaPath,y=e.linePaths,k=e.areaPaths,v=e.curve,C=e.isRangeStart,w=new R(this.ctx),A=this.areaBottomY,S=t==="rangeArea",M=t==="rangeArea"&&C;switch(v){case"monotoneCubic":var P=C?c:u;switch(p){case 0:if(P[r+1]===null)break;p=1;case 1:if(!(S?h.length===i[a].length:r===i[a].length-2))break;case 2:var T=C?h:h.slice().reverse(),I=C?P:P.slice().reverse(),z=(s=I,T.map(function(Z,q){return[Z,s[q]]}).filter(function(Z){return Z[1]!==null})),X=z.length>1?pn(z):z,E=[];S&&(M?k=z:E=k.reverse());var H=0,D=0;if(function(Z,q){for(var ee=function(Mt){var me=[],Ee=0;return Mt.forEach(function(rr){rr!==null?Ee++:Ee>0&&(me.push(Ee),Ee=0)}),Ee>0&&me.push(Ee),me}(Z),le=[],ce=0,be=0;ce4?(be+="C".concat(me[0],", ").concat(me[1]),be+=", ".concat(me[2],", ").concat(me[3]),be+=", ".concat(me[4],", ").concat(me[5])):Ee>2&&(be+="S".concat(me[0],", ").concat(me[1]),be+=", ".concat(me[2],", ").concat(me[3]))}return be}(Z),ee=D,le=(D+=Z.length)-1;M?b=w.move(z[ee][0],z[ee][1])+q:S?b=w.move(E[ee][0],E[ee][1])+w.line(z[ee][0],z[ee][1])+q+w.line(E[le][0],E[le][1]):(b=w.move(z[ee][0],z[ee][1])+q,m=b+w.line(z[le][0],A)+w.line(z[ee][0],A)+"z",k.push(m)),y.push(b)}),S&&H>1&&!M){var _=y.slice(H).reverse();y.splice(H),_.forEach(function(Z){return y.push(Z)})}p=0}break;case"smooth":var N=.35*(o-g);if(i[a][r]===null)p=0;else switch(p){case 0:if(x=g,b=M?w.move(g,u[r])+w.line(g,f):w.move(g,f),m=w.move(g,f),i[a][r+1]===null||i[a][r+1]===void 0){y.push(b),k.push(m);break}if(p=1,r=i[a].length-2&&(M&&(b+=w.curve(o,l,o,l,o,d)+w.move(o,d)),m+=w.curve(o,l,o,l,o,A)+w.line(x,A)+"z",y.push(b),k.push(m),p=-1)}}g=o,f=l;break;default:var oe=function(Z,q,ee){var le=[];switch(Z){case"stepline":le=w.line(q,null,"H")+w.line(null,ee,"V");break;case"linestep":le=w.line(null,ee,"V")+w.line(q,null,"H");break;case"straight":le=w.line(q,ee)}return le};if(i[a][r]===null)p=0;else switch(p){case 0:if(x=g,b=M?w.move(g,u[r])+w.line(g,f):w.move(g,f),m=w.move(g,f),i[a][r+1]===null||i[a][r+1]===void 0){y.push(b),k.push(m);break}if(p=1,r=i[a].length-2&&(M&&(b+=w.line(o,d)),m+=w.line(o,A)+w.line(x,A)+"z",y.push(b),k.push(m),p=-1)}}g=o,f=l}return{linePaths:y,areaPaths:k,pX:g,pY:f,pathState:p,segmentStartX:x,linePath:b,areaPath:m}}},{key:"handleNullDataPoints",value:function(e,t,i,a,s){var r=this.w;if(e[i][a]===null&&r.config.markers.showNullDataPoints||e[i].length===1){var o=this.strokeWidth-r.config.markers.strokeWidth/2;o>0||(o=0);var l=this.markers.plotChartMarkers({pointsPos:t,seriesIndex:s,j:a+1,pSize:o,alwaysDrawMarker:!0});l!==null&&this.elPointsMain.add(l)}}}]),n}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function n(o,l,h,c){this.xoffset=o,this.yoffset=l,this.height=c,this.width=h,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(d){var u,g=[],f=this.xoffset,p=this.yoffset,x=s(d)/this.height,b=s(d)/this.width;if(this.width>=this.height)for(u=0;u=this.height){var g=d/this.height,f=this.width-g;u=new n(this.xoffset+g,this.yoffset,f,this.height)}else{var p=d/this.width,x=this.height-p;u=new n(this.xoffset,this.yoffset+p,this.width,x)}return u}}function e(o,l,h,c,d){c=c===void 0?0:c,d=d===void 0?0:d;var u=t(function(g,f){var p,x=[],b=f/s(g);for(p=0;p=y}(l,u=o[0],d)?(l.push(u),t(o.slice(1),l,h,c)):(g=h.cutArea(s(l),c),c.push(h.getCoordinates(l)),t(o,[],g,c)),c;c.push(h.getCoordinates(l))}function i(o,l){var h=Math.min.apply(Math,o),c=Math.max.apply(Math,o),d=s(o);return Math.max(Math.pow(l,2)*c/Math.pow(d,2),Math.pow(d,2)/(Math.pow(l,2)*h))}function a(o){return o&&o.constructor===Array}function s(o){var l,h=0;for(l=0;l1&&f&&f.show){var p=i.config.series[h].name||"";if(p&&g.xMin<1/0&&g.yMin<1/0){var x=f.offsetX,b=f.offsetY,m=f.borderColor,y=f.borderWidth,k=f.borderRadius,v=f.style,C=v.color||i.config.chart.foreColor,w={left:v.padding.left,right:v.padding.right,top:v.padding.top,bottom:v.padding.bottom},A=a.getTextRects(p,v.fontSize,v.fontFamily),S=A.width+w.left+w.right,M=A.height+w.top+w.bottom,P=g.xMin+(x||0),T=g.yMin+(b||0),I=a.drawRect(P,T,S,M,k,v.background,1,y,m),z=a.drawText({x:P+w.left,y:T+w.top+.75*A.height,text:p,fontSize:v.fontSize,fontFamily:v.fontFamily,fontWeight:v.fontWeight,foreColor:C,cssClass:v.cssClass||""});c.add(I),c.add(z)}}c.add(u),r.add(c)}),r}},{key:"getFontSize",value:function(e){var t=this.w,i=function a(s){var r,o=0;if(Array.isArray(s[0]))for(r=0;rr-a&&h.width<=o-s){var c=l.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(-90 ".concat(c.x," ").concat(c.y,") translate(").concat(h.height/3,")"))}}},{key:"truncateLabels",value:function(e,t,i,a,s,r){var o=new R(this.ctx),l=o.getTextRects(e,t).width+this.w.config.stroke.width+5>s-i&&r-a>s-i?r-a:s-i,h=o.getTextBasedOnMaxWidth({text:e,maxWidth:l,fontSize:t});return e.length!==h.length&&l/t<5?"":h}},{key:"animateTreemap",value:function(e,t,i,a){var s=new vt(this.ctx);s.animateRect(e,t,i,a,function(){s.animationCompleted(e)})}}]),n}(),Ls=86400,bn=10/Ls,mn=function(){function n(e){Y(this,n),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return F(n,[{key:"calculateTimeScaleTicks",value:function(e,t){var i=this,a=this.w;if(a.globals.allSeriesCollapsed)return a.globals.labels=[],a.globals.timescaleLabels=[],[];var s=new pe(this.ctx),r=(t-e)/864e5;this.determineInterval(r),a.globals.disableZoomIn=!1,a.globals.disableZoomOut=!1,r5e4&&(a.globals.disableZoomOut=!0);var o=s.getTimeUnitsfromTimestamp(e,t,this.utc),l=a.globals.gridWidth/r,h=l/24,c=h/60,d=c/60,u=Math.floor(24*r),g=Math.floor(1440*r),f=Math.floor(r*Ls),p=Math.floor(r),x=Math.floor(r/30),b=Math.floor(r/365),m={minMillisecond:o.minMillisecond,minSecond:o.minSecond,minMinute:o.minMinute,minHour:o.minHour,minDate:o.minDate,minMonth:o.minMonth,minYear:o.minYear},y={firstVal:m,currentMillisecond:m.minMillisecond,currentSecond:m.minSecond,currentMinute:m.minMinute,currentHour:m.minHour,currentMonthDate:m.minDate,currentDate:m.minDate,currentMonth:m.minMonth,currentYear:m.minYear,daysWidthOnXAxis:l,hoursWidthOnXAxis:h,minutesWidthOnXAxis:c,secondsWidthOnXAxis:d,numberOfSeconds:f,numberOfMinutes:g,numberOfHours:u,numberOfDays:p,numberOfMonths:x,numberOfYears:b};switch(this.tickInterval){case"years":this.generateYearScale(y);break;case"months":case"half_year":this.generateMonthScale(y);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(y);break;case"hours":this.generateHourScale(y);break;case"minutes_fives":case"minutes":this.generateMinuteScale(y);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(y)}var k=this.timeScaleArray.map(function(v){var C={position:v.position,unit:v.unit,year:v.year,day:v.day?v.day:1,hour:v.hour?v.hour:0,month:v.month+1};return v.unit==="month"?O(O({},C),{},{day:1,value:v.value+1}):v.unit==="day"||v.unit==="hour"?O(O({},C),{},{value:v.value}):v.unit==="minute"?O(O({},C),{},{value:v.value,minute:v.value}):v.unit==="second"?O(O({},C),{},{value:v.value,minute:v.minute,second:v.second}):v});return k.filter(function(v){var C=1,w=Math.ceil(a.globals.gridWidth/120),A=v.value;a.config.xaxis.tickAmount!==void 0&&(w=a.config.xaxis.tickAmount),k.length>w&&(C=Math.floor(k.length/w));var S=!1,M=!1;switch(i.tickInterval){case"years":v.unit==="year"&&(S=!0);break;case"half_year":C=7,v.unit==="year"&&(S=!0);break;case"months":C=1,v.unit==="year"&&(S=!0);break;case"months_fortnight":C=15,v.unit!=="year"&&v.unit!=="month"||(S=!0),A===30&&(M=!0);break;case"months_days":C=10,v.unit==="month"&&(S=!0),A===30&&(M=!0);break;case"week_days":C=8,v.unit==="month"&&(S=!0);break;case"days":C=1,v.unit==="month"&&(S=!0);break;case"hours":v.unit==="day"&&(S=!0);break;case"minutes_fives":case"seconds_fives":A%5!=0&&(M=!0);break;case"seconds_tens":A%10!=0&&(M=!0)}if(i.tickInterval==="hours"||i.tickInterval==="minutes_fives"||i.tickInterval==="seconds_tens"||i.tickInterval==="seconds_fives"){if(!M)return!0}else if((A%C==0||S)&&!M)return!0})}},{key:"recalcDimensionsBasedOnFormat",value:function(e,t){var i=this.w,a=this.formatDates(e),s=this.removeOverlappingTS(a);i.globals.timescaleLabels=s.slice(),new ui(this.ctx).plotCoords()}},{key:"determineInterval",value:function(e){var t=24*e,i=60*t;switch(!0){case e/365>5:this.tickInterval="years";break;case e>800:this.tickInterval="half_year";break;case e>180:this.tickInterval="months";break;case e>90:this.tickInterval="months_fortnight";break;case e>60:this.tickInterval="months_days";break;case e>30:this.tickInterval="week_days";break;case e>2:this.tickInterval="days";break;case t>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(e){var t=e.firstVal,i=e.currentMonth,a=e.currentYear,s=e.daysWidthOnXAxis,r=e.numberOfYears,o=t.minYear,l=0,h=new pe(this.ctx),c="year";if(t.minDate>1||t.minMonth>0){var d=h.determineRemainingDaysOfYear(t.minYear,t.minMonth,t.minDate);l=(h.determineDaysOfYear(t.minYear)-d+1)*s,o=t.minYear+1,this.timeScaleArray.push({position:l,value:o,unit:c,year:o,month:L.monthMod(i+1)})}else t.minDate===1&&t.minMonth===0&&this.timeScaleArray.push({position:l,value:o,unit:c,year:a,month:L.monthMod(i+1)});for(var u=o,g=l,f=0;f1){h=(c.determineDaysOfMonths(a+1,t.minYear)-i+1)*r,l=L.monthMod(a+1);var g=s+u,f=L.monthMod(l),p=l;l===0&&(d="year",p=g,f=1,g+=u+=1),this.timeScaleArray.push({position:h,value:p,unit:d,year:g,month:f})}else this.timeScaleArray.push({position:h,value:l,unit:d,year:s,month:L.monthMod(a)});for(var x=l+1,b=h,m=0,y=1;mo.determineDaysOfMonths(k+1,v)&&(c=1,l="month",g=k+=1),k},u=(24-t.minHour)*s,g=h,f=d(c,i,a);t.minHour===0&&t.minDate===1?(u=0,g=L.monthMod(t.minMonth),l="month",c=t.minDate):t.minDate!==1&&t.minHour===0&&t.minMinute===0&&(u=0,h=t.minDate,g=h,f=d(c=h,i,a),g!==1&&(l="day")),this.timeScaleArray.push({position:u,value:g,unit:l,year:this._getYear(a,f,0),month:L.monthMod(f),day:c});for(var p=u,x=0;xl.determineDaysOfMonths(w+1,s)&&(x=1,w+=1),{month:w,date:x}},d=function(C,w){return C>l.determineDaysOfMonths(w+1,s)?w+=1:w},u=60-(t.minMinute+t.minSecond/60),g=u*r,f=t.minHour+1,p=f;u===60&&(g=0,p=f=t.minHour);var x=i;p>=24&&(p=0,h="day",f=x+=1);var b=c(x,a).month;b=d(x,b),f>31&&(f=x=1),this.timeScaleArray.push({position:g,value:f,unit:h,day:x,hour:p,year:s,month:L.monthMod(b)}),p++;for(var m=g,y=0;y=24&&(p=0,h="day",b=c(x+=1,b).month,b=d(x,b));var k=this._getYear(s,b,0);m=60*r+m;var v=p===0?x:p;this.timeScaleArray.push({position:m,value:v,unit:h,hour:p,day:x,year:k,month:L.monthMod(b)}),p++}}},{key:"generateMinuteScale",value:function(e){for(var t=e.currentMillisecond,i=e.currentSecond,a=e.currentMinute,s=e.currentHour,r=e.currentDate,o=e.currentMonth,l=e.currentYear,h=e.minutesWidthOnXAxis,c=e.secondsWidthOnXAxis,d=e.numberOfMinutes,u=a+1,g=r,f=o,p=l,x=s,b=(60-i-t/1e3)*c,m=0;m=60&&(u=0,(x+=1)===24&&(x=0)),this.timeScaleArray.push({position:b,value:u,unit:"minute",hour:x,minute:u,day:g,year:this._getYear(p,f,0),month:L.monthMod(f)}),b+=h,u++}},{key:"generateSecondScale",value:function(e){for(var t=e.currentMillisecond,i=e.currentSecond,a=e.currentMinute,s=e.currentHour,r=e.currentDate,o=e.currentMonth,l=e.currentYear,h=e.secondsWidthOnXAxis,c=e.numberOfSeconds,d=i+1,u=a,g=r,f=o,p=l,x=s,b=(1e3-t)/1e3*h,m=0;m=60&&(d=0,++u>=60&&(u=0,++x===24&&(x=0))),this.timeScaleArray.push({position:b,value:d,unit:"second",hour:x,minute:u,second:d,day:g,year:this._getYear(p,f,0),month:L.monthMod(f)}),b+=h,d++}},{key:"createRawDateString",value:function(e,t){var i=e.year;return e.month===0&&(e.month=1),i+="-"+("0"+e.month.toString()).slice(-2),e.unit==="day"?i+=e.unit==="day"?"-"+("0"+t).slice(-2):"-01":i+="-"+("0"+(e.day?e.day:"1")).slice(-2),e.unit==="hour"?i+=e.unit==="hour"?"T"+("0"+t).slice(-2):"T00":i+="T"+("0"+(e.hour?e.hour:"0")).slice(-2),e.unit==="minute"?i+=":"+("0"+t).slice(-2):i+=":"+(e.minute?("0"+e.minute).slice(-2):"00"),e.unit==="second"?i+=":"+("0"+t).slice(-2):i+=":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(e){var t=this,i=this.w;return e.map(function(a){var s=a.value.toString(),r=new pe(t.ctx),o=t.createRawDateString(a,s),l=r.getDate(r.parseDate(o));if(t.utc||(l=r.getDate(r.parseDateWithTimezone(o))),i.config.xaxis.labels.format===void 0){var h="dd MMM",c=i.config.xaxis.labels.datetimeFormatter;a.unit==="year"&&(h=c.year),a.unit==="month"&&(h=c.month),a.unit==="day"&&(h=c.day),a.unit==="hour"&&(h=c.hour),a.unit==="minute"&&(h=c.minute),a.unit==="second"&&(h=c.second),s=r.formatDate(l,h)}else s=r.formatDate(l,i.config.xaxis.labels.format);return{dateString:o,position:a.position,value:s,unit:a.unit,year:a.year,month:a.month}})}},{key:"removeOverlappingTS",value:function(e){var t,i=this,a=new R(this.ctx),s=!1;e.length>0&&e[0].value&&e.every(function(l){return l.value.length===e[0].value.length})&&(s=!0,t=a.getTextRects(e[0].value).width);var r=0,o=e.map(function(l,h){if(h>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var c=s?t:a.getTextRects(e[r].value).width,d=e[r].position;return l.position>d+c+10?(r=h,l):null}return l});return o=o.filter(function(l){return l!==null})}},{key:"_getYear",value:function(e,t,i){return e+Math.floor(t/12)+i}}]),n}(),vn=function(){function n(e,t){Y(this,n),this.ctx=t,this.w=t.w,this.el=e}return F(n,[{key:"setupElements",value:function(){var e=this.w,t=e.globals,i=e.config,a=i.chart.type;t.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].includes(a),t.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].includes(a),t.isBarHorizontal=["bar","rangeBar","boxPlot"].includes(a)&&i.plotOptions.bar.horizontal,t.chartClass=".apexcharts".concat(t.chartID),t.dom.baseEl=this.el,t.dom.elWrap=document.createElement("div"),R.setAttrs(t.dom.elWrap,{id:t.chartClass.substring(1),class:"apexcharts-canvas ".concat(t.chartClass.substring(1))}),this.el.appendChild(t.dom.elWrap),t.dom.Paper=window.SVG().addTo(t.dom.elWrap),t.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(i.chart.offsetX,", ").concat(i.chart.offsetY,")")}),t.dom.Paper.node.style.background=i.theme.mode!=="dark"||i.chart.background?i.theme.mode!=="light"||i.chart.background?i.chart.background:"#fff":"#343A3F",this.setSVGDimensions(),t.dom.elLegendForeign=document.createElementNS(t.SVGNS,"foreignObject"),R.setAttrs(t.dom.elLegendForeign,{x:0,y:0,width:t.svgWidth,height:t.svgHeight}),t.dom.elLegendWrap=document.createElement("div"),t.dom.elLegendWrap.classList.add("apexcharts-legend"),t.dom.elWrap.appendChild(t.dom.elLegendWrap),t.dom.Paper.node.appendChild(t.dom.elLegendForeign),t.dom.elGraphical=t.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),t.dom.elDefs=t.dom.Paper.defs(),t.dom.Paper.add(t.dom.elGraphical),t.dom.elGraphical.add(t.dom.elDefs)}},{key:"plotChartType",value:function(e,t){var i=this.w,a=this.ctx,s=i.config,r=i.globals,o={line:{series:[],i:[]},area:{series:[],i:[]},scatter:{series:[],i:[]},bubble:{series:[],i:[]},bar:{series:[],i:[]},candlestick:{series:[],i:[]},boxPlot:{series:[],i:[]},rangeBar:{series:[],i:[]},rangeArea:{series:[],seriesRangeEnd:[],i:[]}},l=s.chart.type||"line",h=null,c=0;r.series.forEach(function(C,w){var A=e[w].type==="column"?"bar":e[w].type||(l==="column"?"bar":l);o[A]?(A==="rangeArea"?(o[A].series.push(r.seriesRangeStart[w]),o[A].seriesRangeEnd.push(r.seriesRangeEnd[w])):o[A].series.push(C),o[A].i.push(w),A==="bar"&&(i.globals.columnSeries=o.bar)):["heatmap","treemap","pie","donut","polarArea","radialBar","radar"].includes(A)?h=A:console.warn("You have specified an unrecognized series type (".concat(A,").")),l!==A&&A!=="scatter"&&c++}),c>0&&(h&&console.warn("Chart or series type ".concat(h," cannot appear with other chart or series types.")),o.bar.series.length>0&&s.plotOptions.bar.horizontal&&(c-=o.bar.series.length,o.bar={series:[],i:[]},i.globals.columnSeries={series:[],i:[]},console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"))),r.comboCharts||(r.comboCharts=c>0);var d=new Ei(a,t),u=new Ri(a,t);a.pie=new Ss(a);var g=new cn(a);a.rangeBar=new dn(a,t);var f=new hn(a),p=[];if(r.comboCharts){var x,b,m=new he(a);if(o.area.series.length>0&&(x=p).push.apply(x,ge(m.drawSeriesByGroup(o.area,r.areaGroups,"area",d))),o.bar.series.length>0)if(s.chart.stacked){var y=new Xa(a,t);p.push(y.draw(o.bar.series,o.bar.i))}else a.bar=new mt(a,t),p.push(a.bar.draw(o.bar.series,o.bar.i));if(o.rangeArea.series.length>0&&p.push(d.draw(o.rangeArea.series,"rangeArea",o.rangeArea.i,o.rangeArea.seriesRangeEnd)),o.line.series.length>0&&(b=p).push.apply(b,ge(m.drawSeriesByGroup(o.line,r.lineGroups,"line",d))),o.candlestick.series.length>0&&p.push(u.draw(o.candlestick.series,"candlestick",o.candlestick.i)),o.boxPlot.series.length>0&&p.push(u.draw(o.boxPlot.series,"boxPlot",o.boxPlot.i)),o.rangeBar.series.length>0&&p.push(a.rangeBar.draw(o.rangeBar.series,o.rangeBar.i)),o.scatter.series.length>0){var k=new Ei(a,t,!0);p.push(k.draw(o.scatter.series,"scatter",o.scatter.i))}if(o.bubble.series.length>0){var v=new Ei(a,t,!0);p.push(v.draw(o.bubble.series,"bubble",o.bubble.i))}}else switch(s.chart.type){case"line":p=d.draw(r.series,"line");break;case"area":p=d.draw(r.series,"area");break;case"bar":s.chart.stacked?p=new Xa(a,t).draw(r.series):(a.bar=new mt(a,t),p=a.bar.draw(r.series));break;case"candlestick":p=new Ri(a,t).draw(r.series,"candlestick");break;case"boxPlot":p=new Ri(a,t).draw(r.series,s.chart.type);break;case"rangeBar":p=a.rangeBar.draw(r.series);break;case"rangeArea":p=d.draw(r.seriesRangeStart,"rangeArea",void 0,r.seriesRangeEnd);break;case"heatmap":p=new ln(a,t).draw(r.series);break;case"treemap":p=new xn(a,t).draw(r.series);break;case"pie":case"donut":case"polarArea":p=a.pie.draw(r.series);break;case"radialBar":p=g.draw(r.series);break;case"radar":p=f.draw(r.series);break;default:p=d.draw(r.series)}return p}},{key:"setSVGDimensions",value:function(){var e=this.w,t=e.globals,i=e.config;i.chart.width=i.chart.width||"100%",i.chart.height=i.chart.height||"auto",t.svgWidth=i.chart.width,t.svgHeight=i.chart.height;var a=L.getDimensions(this.el),s=i.chart.width.toString().split(/[0-9]+/g).pop();s==="%"?L.isNumber(a[0])&&(a[0].width===0&&(a=L.getDimensions(this.el.parentNode)),t.svgWidth=a[0]*parseInt(i.chart.width,10)/100):s!=="px"&&s!==""||(t.svgWidth=parseInt(i.chart.width,10));var r=String(i.chart.height).toString().split(/[0-9]+/g).pop();if(t.svgHeight!=="auto"&&t.svgHeight!=="")if(r==="%"){var o=L.getDimensions(this.el.parentNode);t.svgHeight=o[1]*parseInt(i.chart.height,10)/100}else t.svgHeight=parseInt(i.chart.height,10);else t.svgHeight=t.axisCharts?t.svgWidth/1.61:t.svgWidth/1.2;if(t.svgWidth=Math.max(t.svgWidth,0),t.svgHeight=Math.max(t.svgHeight,0),R.setAttrs(t.dom.Paper.node,{width:t.svgWidth,height:t.svgHeight}),r!=="%"){var l=i.chart.sparkline.enabled?0:t.axisCharts?i.chart.parentHeightOffset:0;t.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(t.svgHeight+l,"px")}t.dom.elWrap.style.width="".concat(t.svgWidth,"px"),t.dom.elWrap.style.height="".concat(t.svgHeight,"px")}},{key:"shiftGraphPosition",value:function(){var e=this.w.globals,t=e.translateY,i=e.translateX;R.setAttrs(e.dom.elGraphical.node,{transform:"translate(".concat(i,", ").concat(t,")")})}},{key:"resizeNonAxisCharts",value:function(){var e=this.w,t=e.globals,i=0,a=e.config.chart.sparkline.enabled?1:15;a+=e.config.grid.padding.bottom,["top","bottom"].includes(e.config.legend.position)&&e.config.legend.show&&!e.config.legend.floating&&(i=new vs(this.ctx).legendHelpers.getLegendDimensions().clwh+7);var s=e.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),r=2.05*e.globals.radialSize;if(s&&!e.config.chart.sparkline.enabled&&e.config.plotOptions.radialBar.startAngle!==0){var o=L.getBoundingClientRect(s);r=o.bottom;var l=o.bottom-o.top;r=Math.max(2.05*e.globals.radialSize,l)}var h=Math.ceil(r+t.translateY+i+a);t.dom.elLegendForeign&&t.dom.elLegendForeign.setAttribute("height",h),e.config.chart.height&&String(e.config.chart.height).includes("%")||(t.dom.elWrap.style.height="".concat(h,"px"),R.setAttrs(t.dom.Paper.node,{height:h}),t.dom.Paper.node.parentNode.parentNode.style.minHeight="".concat(h,"px"))}},{key:"coreCalculations",value:function(){new Ui(this.ctx).init()}},{key:"resetGlobals",value:function(){var e=this,t=function(){return e.w.config.series.map(function(){return[]})},i=new fs,a=this.w.globals;i.initGlobalVars(a),a.seriesXvalues=t(),a.seriesYvalues=t()}},{key:"isMultipleY",value:function(){return!!(Array.isArray(this.w.config.yaxis)&&this.w.config.yaxis.length>1)&&(this.w.globals.isMultipleYAxis=!0,!0)}},{key:"xySettings",value:function(){var e=this.w,t=null;if(e.globals.axisCharts){if(e.config.xaxis.crosshairs.position==="back"&&new qi(this.ctx).drawXCrosshairs(),e.config.yaxis[0].crosshairs.position==="back"&&new qi(this.ctx).drawYCrosshairs(),e.config.xaxis.type==="datetime"&&e.config.xaxis.labels.formatter===void 0){this.ctx.timeScale=new mn(this.ctx);var i=[];isFinite(e.globals.minX)&&isFinite(e.globals.maxX)&&!e.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minX,e.globals.maxX):e.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minY,e.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}t=new he(this.ctx).getCalculatedRatios()}return t}},{key:"updateSourceChart",value:function(e){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:e.w.globals.minX,max:e.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var e=this,t=this.ctx,i=this.w;if(i.config.chart.brush.enabled&&typeof i.config.chart.events.selection!="function"){var a=Array.isArray(i.config.chart.brush.targets)?i.config.chart.brush.targets:[i.config.chart.brush.target];a.forEach(function(s){var r=t.constructor.getChartByID(s);r.w.globals.brushSource=e.ctx,typeof r.w.config.chart.events.zoomed!="function"&&(r.w.config.chart.events.zoomed=function(){return e.updateSourceChart(r)}),typeof r.w.config.chart.events.scrolled!="function"&&(r.w.config.chart.events.scrolled=function(){return e.updateSourceChart(r)})}),i.config.chart.events.selection=function(s,r){a.forEach(function(o){t.constructor.getChartByID(o).ctx.updateHelpers._updateOptions({xaxis:{min:r.xaxis.min,max:r.xaxis.max}},!1,!1,!1,!1)})}}}}]),n}(),yn=function(){function n(e){Y(this,n),this.ctx=e,this.w=e.w}return F(n,[{key:"_updateOptions",value:function(e){var t=this,i=arguments.length>1&&arguments[1]!==void 0&&arguments[1],a=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],s=!(arguments.length>3&&arguments[3]!==void 0)||arguments[3],r=arguments.length>4&&arguments[4]!==void 0&&arguments[4];return new Promise(function(o){var l=[t.ctx];s&&(l=t.ctx.getSyncedCharts()),t.ctx.w.globals.isExecCalled&&(l=[t.ctx],t.ctx.w.globals.isExecCalled=!1),l.forEach(function(h,c){var d=h.w;if(d.globals.shouldAnimate=a,i||(d.globals.resized=!0,d.globals.dataChanged=!0,a&&h.series.getPreviousPaths()),e&>(e)==="object"&&(h.config=new jt(e),e=he.extendArrayProps(h.config,e,d),h.w.globals.chartID!==t.ctx.w.globals.chartID&&delete e.series,d.config=L.extend(d.config,e),r&&(d.globals.lastXAxis=e.xaxis?L.clone(e.xaxis):[],d.globals.lastYAxis=e.yaxis?L.clone(e.yaxis):[],d.globals.initialConfig=L.extend({},d.config),d.globals.initialSeries=L.clone(d.config.series),e.series))){for(var u=0;u2&&arguments[2]!==void 0&&arguments[2];return new Promise(function(s){var r,o=i.w;return o.globals.shouldAnimate=t,o.globals.dataChanged=!0,t&&i.ctx.series.getPreviousPaths(),o.globals.axisCharts?((r=e.map(function(l,h){return i._extendSeries(l,h)})).length===0&&(r=[{data:[]}]),o.config.series=r):o.config.series=e.slice(),a&&(o.globals.initialConfig.series=L.clone(o.config.series),o.globals.initialSeries=L.clone(o.config.series)),i.ctx.update().then(function(){s(i.ctx)})})}},{key:"_extendSeries",value:function(e,t){var i=this.w,a=i.config.series[t];return O(O({},i.config.series[t]),{},{name:e.name?e.name:a?.name,color:e.color?e.color:a?.color,type:e.type?e.type:a?.type,group:e.group?e.group:a?.group,hidden:e.hidden!==void 0?e.hidden:a?.hidden,data:e.data?e.data:a?.data,zIndex:e.zIndex!==void 0?e.zIndex:t})}},{key:"toggleDataPointSelection",value:function(e,t){var i=this.w,a=null,s=".apexcharts-series[data\\:realIndex='".concat(e,"']");return i.globals.axisCharts?a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(t,"'], ").concat(s," circle[j='").concat(t,"'], ").concat(s," rect[j='").concat(t,"']")):t===void 0&&(a=i.globals.dom.Paper.findOne("".concat(s," path[j='").concat(e,"']")),i.config.chart.type!=="pie"&&i.config.chart.type!=="polarArea"&&i.config.chart.type!=="donut"||this.ctx.pie.pieClicked(e)),a?(new R(this.ctx).pathMouseDown(a,null),a.node?a.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(e){var t=this.w;if(["min","max"].forEach(function(a){e.xaxis[a]!==void 0&&(t.config.xaxis[a]=e.xaxis[a],t.globals.lastXAxis[a]=e.xaxis[a])}),e.xaxis.categories&&e.xaxis.categories.length&&(t.config.xaxis.categories=e.xaxis.categories),t.config.xaxis.convertedCatToNumeric){var i=new Gt(e);e=i.convertCatToNumericXaxis(e,this.ctx)}return e}},{key:"forceYAxisUpdate",value:function(e){return e.chart&&e.chart.stacked&&e.chart.stackType==="100%"&&(Array.isArray(e.yaxis)?e.yaxis.forEach(function(t,i){e.yaxis[i].min=0,e.yaxis[i].max=100}):(e.yaxis.min=0,e.yaxis.max=100)),e}},{key:"revertDefaultAxisMinMax",value:function(e){var t=this,i=this.w,a=i.globals.lastXAxis,s=i.globals.lastYAxis;e&&e.xaxis&&(a=e.xaxis),e&&e.yaxis&&(s=e.yaxis),i.config.xaxis.min=a.min,i.config.xaxis.max=a.max;var r=function(o){s[o]!==void 0&&(i.config.yaxis[o].min=s[o].min,i.config.yaxis[o].max=s[o].max)};i.config.yaxis.map(function(o,l){i.globals.zoomed||s[l]!==void 0?r(l):t.ctx.opts.yaxis[l]!==void 0&&(o.min=t.ctx.opts.yaxis[l].min,o.max=t.ctx.opts.yaxis[l].max)})}}]),n}();(function(){function n(){for(var s=arguments.length>0&&arguments[0]!==d?arguments[0]:[],r=arguments.length>1?arguments[1]:d,o=arguments.length>2?arguments[2]:d,l=arguments.length>3?arguments[3]:d,h=arguments.length>4?arguments[4]:d,c=arguments.length>5?arguments[5]:d,d=arguments.length>6?arguments[6]:d,u=s.slice(r,o||d),g=l.slice(h,c||d),f=0,p={pos:[0,0],start:[0,0]},x={pos:[0,0],start:[0,0]};u[f]=e.call(p,u[f]),g[f]=e.call(x,g[f]),u[f][0]!=g[f][0]||u[f][0]=="M"||u[f][0]=="A"&&(u[f][4]!=g[f][4]||u[f][5]!=g[f][5])?(Array.prototype.splice.apply(u,[f,1].concat(i.call(p,u[f]))),Array.prototype.splice.apply(g,[f,1].concat(i.call(x,g[f])))):(u[f]=t.call(p,u[f]),g[f]=t.call(x,g[f])),!(++f==u.length&&f==g.length);)f==u.length&&u.push(["C",p.pos[0],p.pos[1],p.pos[0],p.pos[1],p.pos[0],p.pos[1]]),f==g.length&&g.push(["C",x.pos[0],x.pos[1],x.pos[0],x.pos[1],x.pos[0],x.pos[1]]);return{start:u,dest:g}}function e(s){switch(s[0]){case"z":case"Z":s[0]="L",s[1]=this.start[0],s[2]=this.start[1];break;case"H":s[0]="L",s[2]=this.pos[1];break;case"V":s[0]="L",s[2]=s[1],s[1]=this.pos[0];break;case"T":s[0]="Q",s[3]=s[1],s[4]=s[2],s[1]=this.reflection[1],s[2]=this.reflection[0];break;case"S":s[0]="C",s[6]=s[4],s[5]=s[3],s[4]=s[2],s[3]=s[1],s[2]=this.reflection[1],s[1]=this.reflection[0]}return s}function t(s){var r=s.length;return this.pos=[s[r-2],s[r-1]],"SCQT".indexOf(s[0])!=-1&&(this.reflection=[2*this.pos[0]-s[r-4],2*this.pos[1]-s[r-3]]),s}function i(s){var r=[s];switch(s[0]){case"M":return this.pos=this.start=[s[1],s[2]],r;case"L":s[5]=s[3]=s[1],s[6]=s[4]=s[2],s[1]=this.pos[0],s[2]=this.pos[1];break;case"Q":s[6]=s[4],s[5]=s[3],s[4]=1*s[4]/3+2*s[2]/3,s[3]=1*s[3]/3+2*s[1]/3,s[2]=1*this.pos[1]/3+2*s[2]/3,s[1]=1*this.pos[0]/3+2*s[1]/3;break;case"A":r=function(o,l){var h,c,d,u,g,f,p,x,b,m,y,k,v,C,w,A,S,M,P,T,I,z,X,E,H,D,_=Math.abs(l[1]),N=Math.abs(l[2]),W=l[3]%360,Q=l[4],oe=l[5],U=l[6],de=l[7],Z=new te(o),q=new te(U,de),ee=[];if(_===0||N===0||Z.x===q.x&&Z.y===q.y)return[["C",Z.x,Z.y,q.x,q.y,q.x,q.y]];for(h=new te((Z.x-q.x)/2,(Z.y-q.y)/2).transform(new V().rotate(W)),c=h.x*h.x/(_*_)+h.y*h.y/(N*N),c>1&&(_*=c=Math.sqrt(c),N*=c),d=new V().rotate(W).scale(1/_,1/N).rotate(-W),Z=Z.transform(d),q=q.transform(d),u=[q.x-Z.x,q.y-Z.y],f=u[0]*u[0]+u[1]*u[1],g=Math.sqrt(f),u[0]/=g,u[1]/=g,p=f<4?Math.sqrt(1-f/4):0,Q===oe&&(p*=-1),x=new te((q.x+Z.x)/2+p*-u[1],(q.y+Z.y)/2+p*u[0]),b=new te(Z.x-x.x,Z.y-x.y),m=new te(q.x-x.x,q.y-x.y),y=Math.acos(b.x/Math.sqrt(b.x*b.x+b.y*b.y)),b.y<0&&(y*=-1),k=Math.acos(m.x/Math.sqrt(m.x*m.x+m.y*m.y)),m.y<0&&(k*=-1),oe&&y>k&&(k+=2*Math.PI),!oe&&y0&&arguments[0]!==void 0?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;if(r===!1)return!1;for(var o=r,l=s.length;o(n.changedTouches&&(n=n.changedTouches[0]),{x:n.clientX,y:n.clientY}),Zi=class{constructor(e){e.remember("_draggable",this),this.el=e,this.drag=this.drag.bind(this),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this)}init(e){e?(this.el.on("mousedown.drag",this.startDrag),this.el.on("touchstart.drag",this.startDrag,{passive:!1})):(this.el.off("mousedown.drag"),this.el.off("touchstart.drag"))}startDrag(e){let t=!e.type.indexOf("mouse");if(t&&e.which!==1&&e.buttons!==0||this.el.dispatch("beforedrag",{event:e,handler:this}).defaultPrevented)return;e.preventDefault(),e.stopPropagation(),this.init(!1),this.box=this.el.bbox(),this.lastClick=this.el.point(Ea(e));let i=(t?"mouseup":"touchend")+".drag";He(window,(t?"mousemove":"touchmove")+".drag",this.drag,this,{passive:!1}),He(window,i,this.endDrag,this,{passive:!1}),this.el.fire("dragstart",{event:e,handler:this,box:this.box})}drag(e){let{box:t,lastClick:i}=this,a=this.el.point(Ea(e)),s=a.x-i.x,r=a.y-i.y;if(!s&&!r)return t;let o=t.x+s,l=t.y+r;this.box=new ue(o,l,t.w,t.h),this.lastClick=a,this.el.dispatch("dragmove",{event:e,handler:this,box:this.box}).defaultPrevented||this.move(o,l)}move(e,t){this.el.type==="svg"?Re.prototype.move.call(this.el,e,t):this.el.move(e,t)}endDrag(e){this.drag(e),this.el.fire("dragend",{event:e,handler:this,box:this.box}),Me(window,"mousemove.drag"),Me(window,"touchmove.drag"),Me(window,"mouseup.drag"),Me(window,"touchend.drag"),this.init(!0)}};function $i(n,e,t,i=null){return function(a){a.preventDefault(),a.stopPropagation();var s=a.pageX||a.touches[0].pageX,r=a.pageY||a.touches[0].pageY;e.fire(n,{x:s,y:r,event:a,index:i,points:t})}}function Ji([n,e],{a:t,b:i,c:a,d:s,e:r,f:o}){return[n*t+e*a+r,n*i+e*s+o]}B(xe,{draggable(n=!0){return(this.remember("_draggable")||new Zi(this)).init(n),this}});var Ms=class{constructor(n){this.el=n,n.remember("_selectHandler",this),this.selection=new Re,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);let e=Zt();this.observer=new e.MutationObserver(this.mutationHandler)}init(n){this.createHandle=n.createHandle||this.createHandleFn,this.createRot=n.createRot||this.createRotFn,this.updateHandle=n.updateHandle||this.updateHandleFn,this.updateRot=n.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(n,e){if(!n)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach((n,e,t)=>{let i=this.order[e];this.createHandle.call(this,this.selection,n,e,t,i),this.selection.get(e+1).addClass("svg_select_handle svg_select_handle_"+i).on("mousedown.selection touchstart.selection",$i(i,this.el,this.handlePoints,e))})}createHandleFn(n){n.polyline()}updateHandleFn(n,e,t,i){let a=i.at(t-1),s=i[(t+1)%i.length],r=e,o=[r[0]-a[0],r[1]-a[1]],l=[r[0]-s[0],r[1]-s[1]],h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),c=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=[o[0]/h,o[1]/h],u=[l[0]/c,l[1]/c],g=[r[0]-10*d[0],r[1]-10*d[1]],f=[r[0]-10*u[0],r[1]-10*u[1]];n.plot([g,r,f])}updateResizeHandles(){this.handlePoints.forEach((n,e,t)=>{let i=this.order[e];this.updateHandle.call(this,this.selection.get(e+1),n,e,t,i)})}createRotFn(n){n.line(),n.circle(5)}getPoint(n){return this.handlePoints[this.order.indexOf(n)]}getPointHandle(n){return this.selection.get(this.order.indexOf(n)+1)}updateRotFn(n,e){let t=this.getPoint("t");n.get(0).plot(t[0],t[1],e[0],e[1]),n.get(1).center(e[0],e[1])}createRotationHandle(){let n=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",$i("rot",this.el,this.handlePoints));this.createRot.call(this,n)}updateRotationHandle(){let n=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(n,this.rotationPoint,this.handlePoints)}updatePoints(){let n=this.el.bbox(),e=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(n).map(t=>Ji(t,e)),this.rotationPoint=Ji(this.getRotationPoint(n),e)}getHandlePoints({x:n,x2:e,y:t,y2:i,cx:a,cy:s}=this.el.bbox()){return[[n,t],[a,t],[e,t],[e,s],[e,i],[a,i],[n,i],[n,s]]}getRotationPoint({y:n,cx:e}=this.el.bbox()){return[e,n-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}},Oa=n=>function(e=!0,t={}){typeof e=="object"&&(t=e,e=!0);let i=this.remember("_"+n.name);return i||(e.prototype instanceof Ms?(i=new e(this),e=!0):i=new n(this),this.remember("_"+n.name,i)),i.active(e,t),this};function Ki(n,e,t,i=null){return function(a){a.preventDefault(),a.stopPropagation();var s=a.pageX||a.touches[0].pageX,r=a.pageY||a.touches[0].pageY;e.fire(n,{x:s,y:r,event:a,index:i,points:t})}}function Qi([n,e],{a:t,b:i,c:a,d:s,e:r,f:o}){return[n*t+e*a+r,n*i+e*s+o]}B(xe,{select:Oa(Ms)}),B([Ye,Fe,$e],{pointSelect:Oa(class{constructor(n){this.el=n,n.remember("_pointSelectHandler",this),this.selection=new Re,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);let e=Zt();this.observer=new e.MutationObserver(this.mutationHandler)}init(n){this.createHandle=n.createHandle||this.createHandleFn,this.updateHandle=n.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(n,e){if(!n)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach((n,e,t)=>{this.createHandle.call(this,this.selection,n,e,t),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",$i("point",this.el,this.points,e))})}createHandleFn(n){n.circle(5)}updateHandleFn(n,e){n.center(e[0],e[1])}updatePointHandles(){this.points.forEach((n,e,t)=>{this.updateHandle.call(this,this.selection.get(e+1),n,e,t)})}updatePoints(){let n=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map(e=>Ji(e,n))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});var gi=class{constructor(e){this.el=e,e.remember("_selectHandler",this),this.selection=new Re,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);let t=Zt();this.observer=new t.MutationObserver(this.mutationHandler)}init(e){this.createHandle=e.createHandle||this.createHandleFn,this.createRot=e.createRot||this.createRotFn,this.updateHandle=e.updateHandle||this.updateHandleFn,this.updateRot=e.updateRot||this.updateRotFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createResizeHandles(),this.updateResizeHandles(),this.createRotationHandle(),this.updateRotationHandle(),this.observer.observe(this.el.node,{attributes:!0})}active(e,t){if(!e)return this.selection.clear().remove(),void this.observer.disconnect();this.init(t)}createSelection(){this.selection.polygon(this.handlePoints).addClass("svg_select_shape")}updateSelection(){this.selection.get(0).plot(this.handlePoints)}createResizeHandles(){this.handlePoints.forEach((e,t,i)=>{let a=this.order[t];this.createHandle.call(this,this.selection,e,t,i,a),this.selection.get(t+1).addClass("svg_select_handle svg_select_handle_"+a).on("mousedown.selection touchstart.selection",Ki(a,this.el,this.handlePoints,t))})}createHandleFn(e){e.polyline()}updateHandleFn(e,t,i,a){let s=a.at(i-1),r=a[(i+1)%a.length],o=t,l=[o[0]-s[0],o[1]-s[1]],h=[o[0]-r[0],o[1]-r[1]],c=Math.sqrt(l[0]*l[0]+l[1]*l[1]),d=Math.sqrt(h[0]*h[0]+h[1]*h[1]),u=[l[0]/c,l[1]/c],g=[h[0]/d,h[1]/d],f=[o[0]-10*u[0],o[1]-10*u[1]],p=[o[0]-10*g[0],o[1]-10*g[1]];e.plot([f,o,p])}updateResizeHandles(){this.handlePoints.forEach((e,t,i)=>{let a=this.order[t];this.updateHandle.call(this,this.selection.get(t+1),e,t,i,a)})}createRotFn(e){e.line(),e.circle(5)}getPoint(e){return this.handlePoints[this.order.indexOf(e)]}getPointHandle(e){return this.selection.get(this.order.indexOf(e)+1)}updateRotFn(e,t){let i=this.getPoint("t");e.get(0).plot(i[0],i[1],t[0],t[1]),e.get(1).center(t[0],t[1])}createRotationHandle(){let e=this.selection.group().addClass("svg_select_handle_rot").on("mousedown.selection touchstart.selection",Ki("rot",this.el,this.handlePoints));this.createRot.call(this,e)}updateRotationHandle(){let e=this.selection.findOne("g.svg_select_handle_rot");this.updateRot(e,this.rotationPoint,this.handlePoints)}updatePoints(){let e=this.el.bbox(),t=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.handlePoints=this.getHandlePoints(e).map(i=>Qi(i,t)),this.rotationPoint=Qi(this.getRotationPoint(e),t)}getHandlePoints({x:e,x2:t,y:i,y2:a,cx:s,cy:r}=this.el.bbox()){return[[e,i],[s,i],[t,i],[t,r],[t,a],[s,a],[e,a],[e,r]]}getRotationPoint({y:e,cx:t}=this.el.bbox()){return[t,e-20]}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updateResizeHandles(),this.updateRotationHandle()}},Ha=n=>function(e=!0,t={}){typeof e=="object"&&(t=e,e=!0);let i=this.remember("_"+n.name);return i||(e.prototype instanceof gi?(i=new e(this),e=!0):i=new n(this),this.remember("_"+n.name,i)),i.active(e,t),this};B(xe,{select:Ha(gi)}),B([Ye,Fe,$e],{pointSelect:Ha(class{constructor(n){this.el=n,n.remember("_pointSelectHandler",this),this.selection=new Re,this.order=["lt","t","rt","r","rb","b","lb","l","rot"],this.mutationHandler=this.mutationHandler.bind(this);let e=Zt();this.observer=new e.MutationObserver(this.mutationHandler)}init(n){this.createHandle=n.createHandle||this.createHandleFn,this.updateHandle=n.updateHandle||this.updateHandleFn,this.el.root().put(this.selection),this.updatePoints(),this.createSelection(),this.createPointHandles(),this.updatePointHandles(),this.observer.observe(this.el.node,{attributes:!0})}active(n,e){if(!n)return this.selection.clear().remove(),void this.observer.disconnect();this.init(e)}createSelection(){this.selection.polygon(this.points).addClass("svg_select_shape_pointSelect")}updateSelection(){this.selection.get(0).plot(this.points)}createPointHandles(){this.points.forEach((n,e,t)=>{this.createHandle.call(this,this.selection,n,e,t),this.selection.get(e+1).addClass("svg_select_handle_point").on("mousedown.selection touchstart.selection",Ki("point",this.el,this.points,e))})}createHandleFn(n){n.circle(5)}updateHandleFn(n,e){n.center(e[0],e[1])}updatePointHandles(){this.points.forEach((n,e,t)=>{this.updateHandle.call(this,this.selection.get(e+1),n,e,t)})}updatePoints(){let n=this.el.parent().screenCTM().inverseO().multiplyO(this.el.screenCTM());this.points=this.el.array().map(e=>Qi(e,n))}mutationHandler(){this.updatePoints(),this.updateSelection(),this.updatePointHandles()}})});var ii=n=>(n.changedTouches&&(n=n.changedTouches[0]),{x:n.clientX,y:n.clientY}),Ya=n=>{let e=1/0,t=1/0,i=-1/0,a=-1/0;for(let s=0;s{let C=k-b[0],w=(v-b[1])*m;return[C*m+b[0],w+b[1]]});return Ya(y)}(this.box,f,p)}this.el.dispatch("resize",{box:new ue(h),angle:0,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.size(h.width,h.height).move(h.x,h.y)}movePoint(e){this.lastEvent=e;let{x:t,y:i}=this.snapToGrid(this.el.point(ii(e))),a=this.el.array().slice();a[this.index]=[t,i],this.el.dispatch("resize",{box:Ya(a),angle:0,eventType:this.eventType,event:e,handler:this}).defaultPrevented||this.el.plot(a)}rotate(e){this.lastEvent=e;let t=this.startPoint,i=this.el.point(ii(e)),{cx:a,cy:s}=this.box,r=t.x-a,o=t.y-s,l=i.x-a,h=i.y-s,c=Math.sqrt(r*r+o*o)*Math.sqrt(l*l+h*h);if(c===0)return;let d=Math.acos((r*l+o*h)/c)/Math.PI*180;if(!d)return;i.x`;return u.w.globals.comboCharts?u.w.config.series[n].type==="rangeArea"||u.w.config.series[n].type==="rangeBar"?c=h:c=`${l}`:c=h,'"},Lt=class u{constructor(t){this.opts=t}static forType(t){var e,s;let i=new u(t),a=["line","area","bar","candlestick","boxPlot","violin","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","unit","sunburst","pie","polarArea","donut","radar","radialBar"],n=t.chart.requestedType,r;return n==="funnel"||n==="pyramid"?r=i[n]():n==="gauge"?r=i.gauge():n==="histogram"?r=i.histogram():a.indexOf(t.chart.type)!==-1?r=i[t.chart.type]():r=i.line(),(s=(e=t.plotOptions)==null?void 0:e.bar)!=null&&s.isFunnel&&(r=i.funnel()),t.chart.stacked&&t.chart.type==="bar"&&(r=i.stackedBars()),r}static handOverTypeDefaults(t,e,s){let i=t.chart.requestedType||t.chart.type;if(!e||e===i)return;let a=new wt().init(),n=T.extend(a,u.forType(ln(e,t))),r=T.extend(a,u.forType(ln(i,t)));for(let o of al){if(s&&Ke(s,o)!==void 0)continue;let l=Ke(n,o),c=Ke(r,o);l===void 0&&c===void 0||ol(Ke(t,o),l)&&nl(t,o,c)}}hideYAxis(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}line(){return{dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}sparkline(t){this.hideYAxis();let e={grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}};return T.extend(t,e)}slope(){return this.hideYAxis(),{chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!0,formatter(t,e){let s=e.w.config.series[e.seriesIndex].name;return t!==null?s+": "+t:""},background:{enabled:!1},offsetX:-5},grid:{xaxis:{lines:{show:!0}},yaxis:{lines:{show:!1}}},xaxis:{position:"top",labels:{style:{fontSize:14,fontWeight:900}},tooltip:{enabled:!1},crosshairs:{show:!1}},markers:{size:8,hover:{sizeOffset:1}},legend:{show:!1},tooltip:{shared:!1,intersect:!0,followCursor:!0},stroke:{width:5,curve:"straight"}}}bar(){return{chart:{stacked:!1},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"square"},fill:{opacity:.85},legend:{markers:{shape:"square"}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}funnel(){return this.hideYAxis(),j(G({},this.bar()),{chart:{animations:{speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}pyramid(){return this.funnel()}gauge(){let t=this.radialBar();return j(G({},t),{plotOptions:{radialBar:{startAngle:-135,endAngle:135,hollow:{margin:0,size:"60%"},track:{background:"#e7e7e7",strokeWidth:"100%",margin:5},dataLabels:{name:{show:!1},value:{show:!0,fontSize:"32px",fontWeight:600,offsetY:8}}}}})}histogram(){var t,e,s,i;let a=Array.isArray((t=this.opts)==null?void 0:t.series)&&this.opts.series.length>1&&((i=(s=(e=this.opts)==null?void 0:e.plotOptions)==null?void 0:s.histogram)==null?void 0:i.overlap)!==!1;return j(G({},this.bar()),{chart:{stacked:!1,zoom:{enabled:!1},animations:{animateGradually:{enabled:!1}}},plotOptions:{bar:{columnWidth:"100%",borderRadius:0,dataLabels:{position:"top"}}},dataLabels:{enabled:!1},fill:a?{opacity:.65}:{},stroke:a?{show:!1}:{show:!0,width:1,colors:["#fff"]},xaxis:{type:"numeric",tooltip:{enabled:!1}},tooltip:{shared:a,intersect:!1,x:{formatter:(n,r)=>{var o,l;let c=(l=(o=r?.w)==null?void 0:o.histogramData)==null?void 0:l.edges,h=r?.dataPointIndex;if(!Array.isArray(c)||typeof h!="number"||h<0)return String(n);let d=c[h],f=c[h+1];if(d===void 0||f===void 0)return String(n);let g=p=>Number.isInteger(p)?String(p):p.toFixed(2);return`${g(d)} to ${g(f)}`}}}})}candlestick(){return{stroke:{width:1},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:Se(["candlestick"],({seriesIndex:t,dataPointIndex:e,w:s})=>this._getBoxTooltip(s,t,e,["Open","High","","Low","Close"],"candlestick"))},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}boxPlot(){return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:Se(["boxPlot"],({seriesIndex:t,dataPointIndex:e,w:s})=>this._getBoxTooltip(s,t,e,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot"))},markers:{size:7,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}violin(){return{chart:{zoom:{enabled:!1},animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},fill:{opacity:.7},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:Se(["violin"],({seriesIndex:t,dataPointIndex:e,w:s})=>this._getViolinTooltip(s,t,e))},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}rangeBar(){let t=s=>{let{color:i,seriesName:a,ylabel:n,startVal:r,endVal:o}=Ys(j(G({},s),{isTimeline:!0}));return zs(j(G({},s),{color:i,seriesName:a,ylabel:n,start:r,end:o}))},e=s=>{let{color:i,seriesName:a,ylabel:n,start:r,end:o}=Ys(s);return zs(j(G({},s),{color:i,seriesName:a,ylabel:n,start:r,end:o}))};return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter(s,{seriesIndex:i,dataPointIndex:a,w:n}){let r=()=>{let o=n.rangeData.seriesRangeStart[i][a];return n.rangeData.seriesRangeEnd[i][a]-o};return n.globals.comboCharts?n.config.series[i].type==="rangeBar"||n.config.series[i].type==="rangeArea"?r():s:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:Se(["rangeBar"],s=>s.w.config.plotOptions&&s.w.config.plotOptions.bar&&s.w.config.plotOptions.bar.horizontal?t(s):e(s))},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}dumbbell(t){var e,s;return(e=t.plotOptions.bar)!=null&&e.barHeight||(t.plotOptions.bar.barHeight=2),(s=t.plotOptions.bar)!=null&&s.columnWidth||(t.plotOptions.bar.columnWidth=2),t}area(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}rangeArea(){let t=e=>{let{color:s,seriesName:i,ylabel:a,start:n,end:r}=Ys(e);return zs(j(G({},e),{color:s,seriesName:i,ylabel:a,start:n,end:r}))};return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:Se(["rangeArea"],e=>t(e))}}}brush(t){let e={chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}};return T.extend(t,e)}stacked100(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;let e=t.dataLabels.formatter;return t.yaxis.forEach((i,a)=>{t.yaxis[a].min=0,t.yaxis[a].max=100}),t.chart.type==="bar"&&(t.dataLabels.formatter=e||function(i){return typeof i=="number"?i&&i.toFixed(0)+"%":i}),t}stackedBars(){let t=this.bar();return j(G({},t),{plotOptions:j(G({},t.plotOptions),{bar:j(G({},t.plotOptions.bar),{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}convertCatToNumeric(t){return t.xaxis.convertedCatToNumeric=!0,t}convertCatToNumericXaxis(t,e){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(a){return T.isNumber(a)?Math.floor(a):a};let s=t.xaxis.labels.formatter,i=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return e&&e.length&&(i=e.map(a=>Array.isArray(a)?a:String(a))),i&&i.length&&(t.xaxis.labels.formatter=function(a){return T.isNumber(a)?s(i[Math.floor(a)-1]):s(a)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}bubble(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}scatter(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}heatmap(){return{chart:{stacked:!1,zoom:{enabled:!1}},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!1,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square"}},grid:{padding:{right:20}}}}treemap(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{opacity:1,gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1},axisTicks:{show:!1}}}}unit(){return{chart:{toolbar:{show:!1}},dataLabels:{enabled:!1},stroke:{show:!1,width:0},fill:{opacity:1},tooltip:{followCursor:!0,x:{show:!1}},legend:{show:!0,position:"bottom"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}sunburst(){return{chart:{toolbar:{show:!1}},dataLabels:{style:{colors:["#fff"]},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}pie(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter(t){return typeof t=="number"?t.toFixed(1)+"%":t},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}donut(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter(t){return typeof t=="number"?t.toFixed(1)+"%":t},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}polarArea(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter(t){return typeof t=="number"?t.toFixed(1)+"%":t},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}radar(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:5,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},xaxis:{labels:{formatter:t=>t,style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}radialBar(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},stroke:{lineCap:"butt"},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0},grid:{padding:{left:0,right:0,top:0,bottom:0}}}}_getBoxTooltip(t,e,s,i,a){let n=t.candleData.seriesCandleO[e][s],r=t.candleData.seriesCandleH[e][s],o=t.candleData.seriesCandleM[e][s],l=t.candleData.seriesCandleL[e][s],c=t.candleData.seriesCandleC[e][s],h=t.config.series[e];return h.type&&h.type!==a?`
+ ${h.name?h.name:"series-"+(e+1)}: ${t.seriesData.series[e][s]}
+
`:`"}_getViolinTooltip(t,e,s){var i,a,n;let r=(i=t.violinData.seriesViolinMin[e])==null?void 0:i[s],o=(a=t.violinData.seriesViolinMax[e])==null?void 0:a[s],l=((n=t.violinData.seriesViolinPoints[e])==null?void 0:n[s])||[],c=t.config.series[e].name||"series-"+(e+1);return``}},se=class{constructor(t){this.opts=t}init({responsiveOverride:t}){var e,s,i,a,n,r,o,l;let c=this.opts,h=new wt,d=new Lt(c);c=this.normalizeAliasedChartType(c),this.chartType=c.chart.type,c=this.extendYAxis(c),c=this.extendAnnotations(c);let f=h.init(),g={};if(c&&typeof c=="object"){let m=Lt.forType(c);(e=c.chart.brush)!=null&&e.enabled&&(m=d.brush(m)),(i=(s=c.plotOptions)==null?void 0:s.line)!=null&&i.isSlopeChart&&(m=d.slope()),c.chart.stacked&&c.chart.stackType==="100%"&&(c=d.stacked100(c)),(n=(a=c.plotOptions)==null?void 0:a.bar)!=null&&n.isDumbbell&&(c=d.dumbbell(c)),this.checkForDarkTheme(H.getApex()),this.checkForDarkTheme(c),c.xaxis=c.xaxis||H.getApex().xaxis||{},t||(c.xaxis.convertedCatToNumeric=!1),c=this.checkForCatToNumericXAxis(this.chartType,m,c),((r=c.chart.sparkline)!=null&&r.enabled||(l=(o=H.getApex().chart)==null?void 0:o.sparkline)!=null&&l.enabled)&&(m=d.sparkline(m)),g=T.extend(f,m)}let p=T.extend(g,H.getApex());return f=T.extend(p,c),f=this.handleUserInputErrors(f),f}normalizeAliasedChartType(t){if(!t||!t.chart)return t;let e=t.chart.type;return e!=="funnel"&&e!=="pyramid"&&e!=="gauge"&&e!=="waffle"&&e!=="histogram"||(t.chart.requestedType=e,e==="waffle"?(t.plotOptions=t.plotOptions||{},t.plotOptions.unit=t.plotOptions.unit||{},t.plotOptions.unit.layout==null&&(t.plotOptions.unit.layout="grid"),t.plotOptions.unit.shape==null&&(t.plotOptions.unit.shape="square"),t.chart.type="unit"):e==="funnel"||e==="pyramid"?(t.plotOptions=t.plotOptions||{},t.plotOptions.bar=t.plotOptions.bar||{},t.plotOptions.bar.isFunnel=!0,t.plotOptions.bar.horizontal=!0,t.chart.type="bar",e==="pyramid"?t.plotOptions.bar.isPyramid=!0:t.plotOptions.bar.isPyramid=!1):e==="gauge"?t.chart.type="radialBar":e==="histogram"&&(t.xaxis=t.xaxis||{},t.xaxis.type==null&&(t.xaxis.type="numeric"),t.chart.type="bar")),t}checkForCatToNumericXAxis(t,e,s){var i,a,n,r,o;let l=new Lt(s),c=(t==="bar"||t==="boxPlot"||t==="violin")&&((a=(i=s.plotOptions)==null?void 0:i.bar)==null?void 0:a.horizontal),h=t==="pie"||t==="polarArea"||t==="donut"||t==="radar"||t==="radialBar"||t==="heatmap"||t==="unit"||t==="sunburst",d=s.xaxis.type!=="datetime"&&s.xaxis.type!=="numeric",f=(t==="scatter"||t==="bubble")&&((o=(r=(n=s.plotOptions)==null?void 0:n.scatter)==null?void 0:r.jitter)==null?void 0:o.enabled),g=s.xaxis.tickPlacement?s.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return!c&&!h&&!f&&d&&g!=="between"&&(s=l.convertCatToNumeric(s)),s}extendYAxis(t,e){let s=new wt;(typeof t.yaxis>"u"||!t.yaxis||Array.isArray(t.yaxis)&&t.yaxis.length===0)&&(t.yaxis={});let i=H.getApex();t.yaxis.constructor!==Array&&i.yaxis&&i.yaxis.constructor!==Array&&(t.yaxis=T.extend(t.yaxis,i.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[T.extend(s.yAxis,t.yaxis)]:t.yaxis=T.extendArray(t.yaxis,s.yAxis);let a=!1;t.yaxis.forEach(r=>{r.logarithmic&&(a=!0)});let n=t.series;return e&&!n&&(n=e.config.series),a&&n.length!==t.yaxis.length&&n.length&&(t.yaxis=n.map((r,o)=>{if(r.name||(n[o].name=`series-${o+1}`),t.yaxis[o])return t.yaxis[o].seriesName=n[o].name,t.yaxis[o];{let l=T.extend(s.yAxis,t.yaxis[0]);return l.show=!1,l}})),a&&n.length>1&&n.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}extendAnnotations(t){return typeof t.annotations>"u"&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),t=this.extendPointAnnotations(t),t}extendYAxisAnnotations(t){let e=new wt;return t.annotations.yaxis=T.extendArray(typeof t.annotations.yaxis<"u"?t.annotations.yaxis:[],e.yAxisAnnotation),t}extendXAxisAnnotations(t){let e=new wt;return t.annotations.xaxis=T.extendArray(typeof t.annotations.xaxis<"u"?t.annotations.xaxis:[],e.xAxisAnnotation),t}extendPointAnnotations(t){let e=new wt;return t.annotations.points=T.extendArray(typeof t.annotations.points<"u"?t.annotations.points:[],e.pointAnnotation),t}checkForDarkTheme(t){t.theme&&t.theme.mode==="dark"&&(t.tooltip||(t.tooltip={}),t.tooltip.theme!=="light"&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.theme.palette||(t.theme.palette="palette4"))}handleUserInputErrors(t){let e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if(e.chart.type==="bar"&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return(e.chart.type==="bar"||e.chart.type==="rangeBar")&&e.tooltip.shared&&e.xaxis.crosshairs.width==="barWidth"&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),(e.chart.type==="candlestick"||e.chart.type==="boxPlot")&&e.yaxis[0].reversed&&(console.warn(`Reversed y-axis in ${e.chart.type} chart is not supported.`),e.yaxis[0].reversed=!1),e}},hi=1.618,Cr=[[1,1,2,5,5,5,10,10,10,10,10],[1,1,2,5,5,5,10,10,10,10,10]],di=[1,2,4,4,6,6,6,6,6,6,6,6,6,6,6,6,6,6,12,12,12,12,12,12,12,12,12,24],ls=class{initGlobalVars(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRange=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.dataWasParsed=!1,t.originalSeries=null,t.maxValsInArrayIndex=0,t.yValueDecimal=0,t.allSeriesHasEqualX=!0,t.hasNullValues=!1,t.invalidLogScale=!1,t.seriesRangeName={},t.labels=[],t.hasXaxisGroups=!1,t.groups=[],t.barGroups=[],t.lineGroups=[],t.areaGroups=[],t.hasSeriesGroups=!1,t.seriesGroups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.isXNumeric=!1,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0,t.multiAxisTickAmount=0,t.disableZoomIn=!1,t.disableZoomOut=!1,t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.rotateXLabels=!1,t.overlappingXLabels=!1,t.radialSize=0,t.barHeight=0,t.barWidth=0,t.animationEnded=!1,t.isDestroyed=!1,t.bulkRevealScheduled=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.delayedElements=[],t.pointsArray=[],t.barCanvasCoords=null,t.activeRenderer=null,t.dataLabelsRects=[],t.lastDrawnDataLabelsIndexes=[],t.textRectsCache=new Map,t.domCache=new Map,t.dimensionCache={},t.cachedSelectors={},t.seriesNS||this._attachNamespaces(t)}_attachNamespaces(t){let e=(r,o,l=o)=>{Object.defineProperty(r,l,{get(){return t[o]},set(c){t[o]=c},enumerable:!0,configurable:!0})},s={};e(s,"series","data");for(let r of["seriesNames","seriesX","seriesZ","seriesXvalues","seriesYvalues","seriesGoals","seriesLog","seriesColors","seriesPercent","seriesTotals","stackedSeriesTotals","seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC","seriesRangeStart","seriesRangeEnd","seriesRange","seriesYAxisMap","seriesYAxisReverseMap","seriesGroups","barGroups","lineGroups","areaGroups","originalSeries","collapsedSeries","collapsedSeriesIndices","ancillaryCollapsedSeries","ancillaryCollapsedSeriesIndices","allSeriesCollapsed","risingSeries","previousPaths","ignoreYAxisIndexes","labels","categoryLabels","timescaleLabels","groups"])e(s,r);Object.defineProperty(t,"seriesNS",{value:s,writable:!1,enumerable:!1,configurable:!0});let i={};for(let r of["minX","maxX","initialMinX","initialMaxX","minY","maxY","minYArr","maxYArr","minZ","maxZ","minDate","maxDate","minXDiff","xRange","yRange","zRange","xAxisScale","yAxisScale","xAxisTicksPositions","xTickAmount","multiAxisTickAmount","dataPoints","maxValsInArrayIndex","isXNumeric","isMultipleYAxis","isMultiLineX","isDataXYZ","dataFormatXNumeric","allSeriesHasEqualX","hasNullValues","dataWasParsed","hasXaxisGroups","hasSeriesGroups","skipFirstTimelinelabel","skipLastTimelinelabel","yValueDecimal","invalidLogScale","noLabelsProvided"])e(i,r);Object.defineProperty(t,"axes",{value:i,writable:!1,enumerable:!1,configurable:!0});let a={};for(let r of["svgWidth","svgHeight","gridWidth","gridHeight","translateX","translateY","translateXAxisX","translateXAxisY","translateYAxisX","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","yAxisLabelsWidth","yAxisWidths","yLabelsCoords","yTitleCoords","padHorizontal","barPadForNumericAxis","rotateXLabels","scaleX","scaleY","radialSize","defaultLabels","overlappingXLabels"])e(a,r);Object.defineProperty(t,"layout",{value:a,writable:!1,enumerable:!1,configurable:!0});let n={};for(let r of["domCache","dimensionCache","cachedSelectors","textRectsCache","pointsArray","dataLabelsRects","lastDrawnDataLabelsIndexes","delayedElements","resizeTimer","selectionResizeTimer","resizeObserver"])e(n,r);Object.defineProperty(t,"cache",{value:n,writable:!1,enumerable:!1,configurable:!0})}globalVars(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],fill:{colors:[]},radialNeedleRAF:null,unitGatherRAF:null,unitExitRAF:null,stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},LINE_HEIGHT_RATIO:hi,axisCharts:!0,isSlopeChart:t.plotOptions.line.isSlopeChart,comboCharts:!1,initialConfig:null,initialSeries:[],tokenSurface:void 0,lastXAxis:[],lastYAxis:[],allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],ignoreYAxisIndexes:[],isDirty:!1,isExecCalled:!1,dataChanged:!1,resized:!1,columnSeries:null,yaxis:null,total:0,shouldAnimate:!0,previousPaths:[],prevPolarAngles:null,prevStreamFrame:null,prevChromeFrame:null,svgWidth:0,svgHeight:0,lastResizeSignature:null,defaultLabels:!1,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateYAxisX:[],yAxisWidths:[],tooltip:null,resizeObserver:null,locale:{},memory:{methodsToExec:[]},niceScaleAllowedMagMsd:Cr,niceScaleDefaultTicks:di,seriesYAxisMap:[],seriesYAxisReverseMap:[],noData:!1}}defineLazyInitialSeries(t){let e=[],s=null;Object.defineProperty(t,"initialSeries",{configurable:!0,enumerable:!0,get(){return s===null&&(s=T.clone(e)),s},set(i){e=Array.isArray(i)?i.map(a=>a&&typeof a=="object"&&!Array.isArray(a)?G({},a):a):i,s=null,t._initialSeriesPeek=e}}),t._initialSeriesPeek=e}init(t){let e=this.globalVars(t);return this.initGlobalVars(e),this.defineLazyInitialSeries(e),e.initialConfig=T.extend({},t),e.initialSeries=t.series,e.lastXAxis=T.clone(e.initialConfig.xaxis),e.lastYAxis=T.clone(e.initialConfig.yaxis),e}},ui=class{constructor(t){this.opts=t}init(){let t=new se(this.opts).init({responsiveOverride:!1}),e=new ls().init(t),s={config:t,globals:e,dom:{},interact:{zoomEnabled:t.chart.toolbar.autoSelected==="zoom"&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:t.chart.toolbar.autoSelected==="pan"&&t.chart.toolbar.tools.pan,selectionEnabled:t.chart.toolbar.autoSelected==="selection"&&t.chart.toolbar.tools.selection,measureEnabled:t.chart.toolbar.autoSelected==="measure"&&!!t.chart.toolbar.tools.measure&&!!(t.chart.measure&&t.chart.measure.enabled),zoomed:!1,selection:void 0,visibleXRange:void 0,selectedDataPoints:[],mousedown:!1,clientX:null,clientY:null,lastClientPosition:{},capturedSeriesIndex:-1,capturedDataPointIndex:-1,disableZoomIn:!1,disableZoomOut:!1,isTouchDevice:H.isBrowser()?"ontouchstart"in window||navigator.maxTouchPoints>0:!1},formatters:{xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,legendFormatter:void 0},candleData:{seriesCandleO:[],seriesCandleH:[],seriesCandleM:[],seriesCandleL:[],seriesCandleC:[],seriesBoxPoints:[]},rangeData:{seriesRangeStart:[],seriesRangeEnd:[],seriesRange:[]},violinData:{seriesViolinDensity:[],seriesViolinPoints:[],seriesViolinMin:[],seriesViolinMax:[]},histogramData:{edges:[],binWidth:0,counts:[],rule:"",capped:!1},labelData:{labels:[],categoryLabels:[],timescaleLabels:[],hasXaxisGroups:!1,groups:[],seriesGroups:[]},axisFlags:{isXNumeric:!1,dataFormatXNumeric:!1,isDataXYZ:!1,isRangeData:!1,isRangeBar:!1,isMultiLineX:!1,noLabelsProvided:!1,dataWasParsed:!1},seriesData:{series:[],seriesNames:[],seriesX:[],seriesZ:[],seriesColors:[],seriesGoals:[],stackedSeriesTotals:[],stackedSeriesTotalsByGroups:[],unitData:[]},layout:{gridHeight:0,gridWidth:0,translateX:0,translateY:0,translateXAxisX:0,translateXAxisY:0,rotateXLabels:!1,xAxisHeight:0,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yLabelsCoords:[],yTitleCoords:[],gridPad:{top:0,right:0,bottom:0,left:0}}};Object.defineProperty(e,"dom",{get(){return s.dom},set(i){s.dom=i},enumerable:!1,configurable:!0});for(let i of["xLabelFormatter","yLabelFormatters","xaxisTooltipFormatter","ttKeyFormatter","ttVal","ttZFormatter","legendFormatter"])Object.defineProperty(e,i,{get(){return s.formatters[i]},set(a){s.formatters[i]=a},enumerable:!1,configurable:!0});for(let i of["zoomEnabled","panEnabled","selectionEnabled","zoomed","selection","visibleXRange","selectedDataPoints","mousedown","clientX","clientY","lastClientPosition","capturedSeriesIndex","capturedDataPointIndex","disableZoomIn","disableZoomOut","isTouchDevice"])Object.defineProperty(e,i,{get(){return s.interact[i]},set(a){s.interact[i]=a},enumerable:!1,configurable:!0});for(let i of["gridHeight","gridWidth","translateX","translateY","translateXAxisX","translateXAxisY","rotateXLabels","xAxisHeight","xAxisLabelsHeight","xAxisGroupLabelsHeight","xAxisLabelsWidth","yLabelsCoords","yTitleCoords","gridPad"])Object.defineProperty(e,i,{get(){return s.layout[i]},set(a){s.layout[i]=a},enumerable:!1,configurable:!0});for(let i of["series","seriesNames","seriesX","seriesZ","seriesColors","seriesGoals","stackedSeriesTotals","stackedSeriesTotalsByGroups"])Object.defineProperty(e,i,{get(){return s.seriesData[i]},set(a){s.seriesData[i]=a},enumerable:!1,configurable:!0});for(let i of["isXNumeric","dataFormatXNumeric","isDataXYZ","isRangeData","isRangeBar","isMultiLineX","noLabelsProvided","dataWasParsed"])Object.defineProperty(e,i,{get(){return s.axisFlags[i]},set(a){s.axisFlags[i]=a},enumerable:!1,configurable:!0});for(let i of["labels","categoryLabels","timescaleLabels","hasXaxisGroups","groups","seriesGroups"])Object.defineProperty(e,i,{get(){return s.labelData[i]},set(a){s.labelData[i]=a},enumerable:!1,configurable:!0});for(let i of["seriesRangeStart","seriesRangeEnd","seriesRange"])Object.defineProperty(e,i,{get(){return s.rangeData[i]},set(a){s.rangeData[i]=a},enumerable:!1,configurable:!0});for(let i of["seriesCandleO","seriesCandleH","seriesCandleM","seriesCandleL","seriesCandleC"])Object.defineProperty(e,i,{get(){return s.candleData[i]},set(a){s.candleData[i]=a},enumerable:!1,configurable:!0});for(let i of["seriesViolinDensity","seriesViolinPoints","seriesViolinMin","seriesViolinMax"])Object.defineProperty(e,i,{get(){return s.violinData[i]},set(a){s.violinData[i]=a},enumerable:!1,configurable:!0});return s}},lt=class{constructor(t){this.w=t}static checkComboSeries(t,e){let s=!1,i=0,a=0;return e===void 0&&(e="line"),t.length&&typeof t[0].type<"u"&&t.forEach(n=>{(n.type==="bar"||n.type==="column"||n.type==="candlestick"||n.type==="boxPlot"||n.type==="violin")&&i++,typeof n.type<"u"&&n.type!==e&&a++}),a>0&&(s=!0),{comboBarCount:i,comboCharts:s}}getStackedSeriesTotals(t=[]){let e=this.w,s=[];if(e.seriesData.series.length===0)return s;for(let i=0;ie+s,0);{let e=this.w.seriesData.series[t];return Array.isArray(e)?e.reduce((s,i)=>s+i,0):e??0}}getStackedSeriesTotalsByGroups(){let t=this.w,e=[];return t.labelData.seriesGroups.forEach(s=>{let i=[];t.config.series.forEach((n,r)=>{s.indexOf(t.seriesData.seriesNames[r])>-1&&i.push(r)});let a=t.seriesData.series.map((n,r)=>i.indexOf(r)===-1?r:-1).filter(n=>n!==-1);e.push(this.getStackedSeriesTotals(a))}),e}setSeriesYAxisMappings(){let t=this.w.globals,e=this.w.config,s=[],i=[],a=[],n=this.w.seriesData.series.length>e.yaxis.length||e.yaxis.some(l=>Array.isArray(l.seriesName));e.series.forEach((l,c)=>{a.push(c),i.push(null)}),e.yaxis.forEach((l,c)=>{s[c]=[]});let r=[];e.yaxis.forEach((l,c)=>{let h=!1;if(l.seriesName){let d=[];Array.isArray(l.seriesName)?d=l.seriesName:d.push(l.seriesName),d.forEach(f=>{e.series.forEach((g,p)=>{if(g.name===f){let m=p;c===p||n?!n||a.indexOf(p)>-1?s[c].push([c,p]):console.warn("Series '"+g.name+"' referenced more than once in what looks like the new style. That is, when using either seriesName: [], or when there are more series than yaxes."):(s[p].push([p,c]),m=c),h=!0,m=a.indexOf(m),m!==-1&&a.splice(m,1)}})})}h||r.push(c)}),s=s.map(l=>{let c=[];return l.forEach(h=>{i[h[1]]=h[0],c.push(h[1])}),c});let o=e.yaxis.length-1;for(let l=0;l{s[o].push(l),i[l]=o}),t.seriesYAxisMap=s.map(l=>l),t.seriesYAxisReverseMap=i.map(l=>l),t.seriesYAxisMap.forEach((l,c)=>{l.forEach(h=>{if(e.series[h]&&e.series[h].group===void 0){let d=e.series[h];d.group="apexcharts-axis-".concat(c.toString())}})})}isSeriesNull(t=null){let e=[],s=this.w.config.series;return t===null?e=s.filter(i=>i!==null):s[t]&&Array.isArray(s[t].data)?e=s[t].data.filter(i=>i!==null):e=s[t]!==null&&s[t]!==void 0?[s[t]]:[],e.length===0}seriesHaveSameValues(t){let e=this.w.seriesData.series[t];return Array.isArray(e)?e.every((s,i,a)=>s===a[0]):!0}getCategoryLabels(t){let e=this.w,s=t.slice();return e.config.xaxis.convertedCatToNumeric&&(s=t.map(i=>e.config.xaxis.labels.formatter(i-e.globals.minX+1))),s}getLargestSeries(){let t=this.w;t.globals.maxValsInArrayIndex=t.seriesData.series.map(e=>e.length).indexOf(Math.max.apply(Math,t.seriesData.series.map(e=>e.length)))}getLargestMarkerSize(){let t=this.w,e=0;return t.globals.markers.size.forEach(s=>{e=Math.max(e,s)}),t.config.markers.discrete&&t.config.markers.discrete.length&&t.config.markers.discrete.forEach(s=>{e=Math.max(e,s.size)}),e>0&&(t.config.markers.hover.size>0?e=t.config.markers.hover.size:e+=t.config.markers.hover.sizeOffset),t.globals.markers.largestSize=e,e}getSeriesTotals(){let t=this.w;t.globals.seriesTotals=t.seriesData.series.map(e=>{let s=0;if(Array.isArray(e))for(let i=0;i{let r=0;for(let o=0;ot&&s.seriesData.seriesX[n][o]{let s=[];if(Array.isArray(e))for(let i=0;in+r,0),a=100*e/i;s.push(a)}return s})}getCalculatedRatios(){let t=this.w,e=t.globals,s=[],i=0,a=0,n=0,r=0,o=[],l=.1,c=0;if(e.yRange=[],e.isMultipleYAxis)for(let h=0;h0){let h=(d,f)=>{let g=t.config.yaxis[t.globals.seriesYAxisReverseMap[f]];if(!g)return 0;let p=d<0?-1:1;return d=Math.abs(d),g.logarithmic&&(d=this.getBaseLog(g.logBase,d)),-p*d/s[f]};if(e.isMultipleYAxis){o=[];for(let d=0;d{let a=e.globals.seriesYAxisReverseMap[i];return e.config.yaxis[a]&&e.config.yaxis[a].logarithmic?s.map(n=>n===null?null:this.getLogVal(e.config.yaxis[a].logBase,n,i)):s}),e.globals.invalidLogScale?t:e.globals.seriesLog}getLogValAtSeriesIndex(t,e){if(t===null)return null;let s=this.w,i=s.globals.seriesYAxisReverseMap[e];return s.config.yaxis[i]&&s.config.yaxis[i].logarithmic?this.getLogVal(s.config.yaxis[i].logBase,t,e):t}getBaseLog(t,e){return Math.log(e)/Math.log(t)}getLogVal(t,e,s){if(e<=0)return 0;let i=this.w,a=i.globals.minYArr[s]===0?-1:this.getBaseLog(t,i.globals.minYArr[s]),r=(i.globals.maxYArr[s]===0?0:this.getBaseLog(t,i.globals.maxYArr[s]))-a;return e<1?e/r:(this.getBaseLog(t,e)-a)/r}getLogYRatios(t){let e=this.w,s=this.w.globals,i=s;return i.yLogRatio=t.slice(),i.logYRange=s.yRange.map((a,n)=>{let r=e.globals.seriesYAxisReverseMap[n];if(e.config.yaxis[r]&&this.w.config.yaxis[r].logarithmic){let o=-Number.MAX_VALUE,l=Number.MIN_VALUE,c=1;return s.seriesLog.forEach((h,d)=>{h.forEach(f=>{e.config.yaxis[d]&&e.config.yaxis[d].logarithmic&&(o=Math.max(f,o),l=Math.min(f,l))})}),c=Math.pow(s.yRange[n],Math.abs(l-o)/s.yRange[n]),i.yLogRatio[n]=c/this.w.layout.gridHeight,c}}),i.invalidLogScale?t.slice():i.yLogRatio}static extendArrayProps(t,e,s){var i,a;return e?.yaxis&&(e=t.extendYAxis(e,s)),e?.annotations&&(e.annotations.yaxis&&(e=t.extendYAxisAnnotations(e)),(i=e?.annotations)!=null&&i.xaxis&&(e=t.extendXAxisAnnotations(e)),(a=e?.annotations)!=null&&a.points&&(e=t.extendPointAnnotations(e))),e}drawSeriesByGroup(t,e,s,i){let a=this.w,n=[];return t.series.length>0&&e.forEach(r=>{let o=[],l=[];t.i.forEach((c,h)=>{a.config.series[c].group===r&&(o.push(t.series[h]),l.push(c))}),o.length>0&&n.push(i.draw(o,s,l))}),n}},et="http://www.w3.org/2000/svg",vt=class u{constructor(t,e){typeof t=="object"?(this.x=t.x,this.y=t.y):(this.x=t||0,this.y=e||0)}transform(t){return t.apply(this)}clone(){return new u(this.x,this.y)}},Pe=class u{constructor(t,e,s,i,a,n){this.a=t??1,this.b=e??0,this.c=s??0,this.d=i??1,this.e=a??0,this.f=n??0}rotate(t){let e=t*Math.PI/180,s=Math.cos(e),i=Math.sin(e);return this.multiply(new u(s,i,-i,s,0,0))}scale(t,e){return this.multiply(new u(t,0,0,e??t,0,0))}multiply(t){return new u(this.a*t.a+this.c*t.b,this.b*t.a+this.d*t.b,this.a*t.c+this.c*t.d,this.b*t.c+this.d*t.d,this.a*t.e+this.c*t.f+this.e,this.b*t.e+this.d*t.f+this.f)}apply(t){return new vt(this.a*t.x+this.c*t.y+this.e,this.b*t.x+this.d*t.y+this.f)}},fi=class{constructor(t,e,s,i){this.x=t,this.y=e,this.w=s,this.h=i,this.width=s,this.height=i,this.x2=t+s,this.y2=e+i}};function ie(u){if(!u||typeof u!="string")return[["M",0,0]];let t=[],e=/([MmLlHhVvCcSsQqTtAaZz])\s*/g,s=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi,i,a=[],n=[];for(;(i=e.exec(u))!==null;)a.push(i[1]),n.push(i.index);for(let r=0;r{for(let n=1;ns&&(s=r),oi&&(i=o))}}),t===1/0?{x:0,y:0,width:0,height:0}:{x:t,y:e,width:s-t,height:i-e}}function gi(u){return u.map(t=>t.join(" ")).join(" ")}function cn(u){switch(u[0]){case"z":case"Z":u[0]="L",u[1]=this.start[0],u[2]=this.start[1];break;case"H":u[0]="L",u[2]=this.pos[1];break;case"V":u[0]="L",u[2]=u[1],u[1]=this.pos[0];break;case"T":u[0]="Q",u[3]=u[1],u[4]=u[2],u[1]=this.reflection[1],u[2]=this.reflection[0];break;case"S":u[0]="C",u[6]=u[4],u[5]=u[3],u[4]=u[2],u[3]=u[1],u[2]=this.reflection[1],u[1]=this.reflection[0];break}return u}function hn(u){var t=u.length;return this.pos=[u[t-2],u[t-1]],"SCQT".indexOf(u[0])!=-1&&(this.reflection=[2*this.pos[0]-u[t-4],2*this.pos[1]-u[t-3]]),u}function dn(u){var t,e=[u];switch(u[0]){case"M":return this.pos=this.start=[u[1],u[2]],e;case"L":u[5]=u[3]=u[1],u[6]=u[4]=u[2],u[1]=this.pos[0],u[2]=this.pos[1];break;case"Q":u[6]=u[4],u[5]=u[3],u[4]=u[4]*1/3+u[2]*2/3,u[3]=u[3]*1/3+u[1]*2/3,u[2]=this.pos[1]*1/3+u[2]*2/3,u[1]=this.pos[0]*1/3+u[1]*2/3;break;case"A":e=ll((t=this.pos)!=null?t:[],u),u=e[0];break}return u[0]="C",this.pos=[u[5],u[6]],this.reflection=[2*u[5]-u[3],2*u[6]-u[4]],e}function un(u,t){if(t===!1)return!1;for(var e=t,s=u.length;e1&&(d=Math.sqrt(d),e=d*e,s=d*s),f=new Pe().rotate(i).scale(1/e,1/s).rotate(-i),l=l.transform(f),c=c.transform(f),g=[c.x-l.x,c.y-l.y],m=g[0]*g[0]+g[1]*g[1],p=Math.sqrt(m),g[0]/=p,g[1]/=p,b=m<4?Math.sqrt(1-m/4):0,a===n&&(b*=-1),x=new vt((c.x+l.x)/2+b*-g[1],(c.y+l.y)/2+b*g[0]),_=new vt(l.x-x.x,l.y-x.y),w=new vt(c.x-x.x,c.y-x.y),y=Math.acos(_.x/Math.sqrt(_.x*_.x+_.y*_.y)),_.y<0&&(y*=-1),v=Math.acos(w.x/Math.sqrt(w.x*w.x+w.y*w.y)),w.y<0&&(v*=-1),n&&y>v&&(v+=2*Math.PI),!n&&y=n)break}l>16&255,s>>8&255,s&255,1]}let t=u.match(/rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+))?\s*\)/);return t?[+t[1],+t[2],+t[3],t[4]!==void 0?+t[4]:1]:null}function gl(u,t,e){return`rgba(${Math.round(u[0]+(t[0]-u[0])*e)},${Math.round(u[1]+(t[1]-u[1])*e)},${Math.round(u[2]+(t[2]-u[2])*e)},${u[3]+(t[3]-u[3])*e})`}var pi=class u{constructor(t,e,s){this.el=t,this.duration=e??300,this.delay=s||0,this._attrTarget=null,this._plotTarget=null,this._plotSnap=null,this._plotAlgorithm="commands",this._afterCb=null,this._duringCb=null,this._easing=null,this._next=null,this._root=null,this._scheduled=!1}ease(t){return typeof t=="function"&&(this._easing=t),this._schedule(),this}attr(t){return this._attrTarget=t,this._schedule(),this}plot(t,e,s){return this._plotTarget=t,e&&(this._plotAlgorithm=e),this._plotSnap=s||null,this._schedule(),this}after(t){return this._afterCb=t,this._schedule(),this}during(t){return this._duringCb=t,this._schedule(),this}animate(t,e){let s=new u(this.el,t,e);return this._next=s,s._root=this._root||this,s}_schedule(){let t=this._root||this;t._scheduled||(t._scheduled=!0,queueMicrotask(()=>t._executeChain()))}_executeChain(){let t=[],e=this;for(;e;)t.push(e),e=e._next;let s=0;t.forEach(i=>{s+=i.delay,i._execute(s),s+=i.duration})}_execute(t){let e=this.el,s=this.duration;if(s<=1){let a=()=>{this._attrTarget&&e.attr(this._attrTarget),this._plotTarget&&e.plot(this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(e)};t>0?setTimeout(a,t):a();return}let i=()=>{let a={},n={},r={};if(this._attrTarget)for(let d of Object.keys(this._attrTarget)){let f=e.attr(d);a[d]=f;let g=gn(f),p=gn(String(this._attrTarget[d]));g&&p&&(n[d]=g,r[d]=p)}let o=null;if(this._plotTarget){let d=e.attr("d")||"";try{o=this._plotAlgorithm==="polygons"?ul(d,this._plotTarget):dl(d,this._plotTarget)}catch{o=null}}let l=performance.now(),c=this._easing||Mr,h=d=>{let f=d-l,g=Math.min(f/s,1),p=c(g);if(this._attrTarget)if(g>=1)e.attr(this._attrTarget);else{let m={};for(let b of Object.keys(this._attrTarget))if(n[b]&&r[b])m[b]=gl(n[b],r[b],p);else{let x=parseFloat(a[b]),_=parseFloat(this._attrTarget[b]);!isNaN(x)&&!isNaN(_)&&(m[b]=x+(_-x)*p)}e.attr(m)}o&&g<1&&e.attr("d",o(p)),this._duringCb&&this._duringCb(p),g<1?O.requestAnimationFrame(h):(this._plotTarget&&e.attr("d",this._plotSnap||this._plotTarget),this._afterCb&&this._afterCb.call(e))};O.requestAnimationFrame(h)};t>0?setTimeout(i,t):i()}};function pl(u){u.prototype.animate=function(t,e){return new pi(this,t,e)}}function Lr(u){return-Math.cos(u*Math.PI)/2+.5}function ml(u,t,e,s){u=Math.min(Math.max(u,0),1),e=Math.min(Math.max(e,0),1);let i=3*u,a=3*(e-u)-i,n=1-i-a,r=3*t,o=3*(s-t)-r,l=1-r-o,c=f=>((n*f+a)*f+i)*f,h=f=>((l*f+o)*f+r)*f,d=f=>{let g=0,p=1,m=f;if(mp)return p;for(;gb?g=m:p=m,m=(g+p)/2}return m};return f=>f<=0?0:f>=1?1:h(d(f))}var xt=new Map,xl=u=>u;xt.set("linear",xl);xt.set("easeInOutSine",Lr);xt.set("easeInSine",u=>1-Math.cos(u*Math.PI/2));xt.set("easeOutSine",u=>Math.sin(u*Math.PI/2));xt.set("easeInQuad",u=>u*u);xt.set("easeOutQuad",u=>1-(1-u)*(1-u));xt.set("easeInOutQuad",u=>u<.5?2*u*u:1-Math.pow(-2*u+2,2)/2);xt.set("easeInCubic",u=>u*u*u);xt.set("easeOutCubic",u=>1-Math.pow(1-u,3));xt.set("easeInOutCubic",u=>u<.5?4*u*u*u:1-Math.pow(-2*u+2,3)/2);xt.set("easeOutBack",u=>1+2.70158*Math.pow(u-1,3)+1.70158*Math.pow(u-1,2));xt.set("easeInOutBack",u=>{let e=2.5949095;return u<.5?Math.pow(2*u,2)*((e+1)*2*u-e)/2:(Math.pow(2*u-2,2)*((e+1)*(u*2-2)+e)+2)/2});function bl(u,t){typeof u=="string"&&u&&typeof t=="function"&&xt.set(u,t)}function yl(u){return Array.isArray(u)&&u.length===4&&u.every(t=>typeof t=="number")}function hs(u){return typeof u=="function"?pn(u):yl(u)?ml(u[0],u[1],u[2],u[3]):typeof u=="string"&&xt.has(u)?pn(xt.get(u)):Lr}function pn(u){return t=>{let e=u(t);return typeof e=="number"&&isFinite(e)?e:t}}var Ws="http://www.w3.org/2000/svg";function mn(u){return 1-Math.pow(1-u,3)}function wl(u){return 1+2.70158*Math.pow(u-1,3)+1.70158*Math.pow(u-1,2)}var Hs=null;function ks(){if(!H.isBrowser())return!1;try{return Hs||(Hs=window.matchMedia("(prefers-reduced-motion: reduce)")),!!Hs.matches}catch{return!1}}function Dt(u,t,e){if(!H.isBrowser()||e.globals.dataChanged||e.globals.resized)return!1;let s=e.config.chart.animations;if(!s||s.enabled===!1)return!1;let i=e.config.chart.type;if(i!=="line"&&i!=="area"&&i!=="rangeArea"||!(e.layout.gridWidth>0))return!1;let a=(s.speed||800)*2,n=Math.max(0,Math.min(1,t/e.layout.gridWidth)),o=(1-Math.cbrt(1-n))*a,c=u.node.style;c.opacity="0";let h=null,d=f=>{h===null&&(h=f),f-h>=o?c.opacity="":O.requestAnimationFrame(d)};return O.requestAnimationFrame(d),!0}function xn(u){let t=u.config.chart.animations;t&&(t.respectReducedMotion!==!1&&ks()&&(t.enabled=!1,t.dynamicAnimation&&(t.dynamicAnimation.enabled=!1)),fl(hs(t.easing)))}function Ya(u){let t=u.style,e=u.index||0,s=typeof u.baseDelay=="number"?u.baseDelay:40,i=u.row||0,a=u.col||0,n=u.groupIndex||0,r=u.perGroup||1,o=u.centerDistance||0;switch(t){case"none":return 0;case"diagonal":return(i+a)*s;case"group":return n*s+e%r*(s/4);case"centroid":return o*s*(e+1);default:return e*s}}var St=class{constructor(t,e){this.w=t,this.ctx=e}animateLine(t,e,s,i){t.attr(e).animate(i).attr(s)}animateMarker(t,e,s,i){t.attr({opacity:0}).animate(e).attr({opacity:1}).after(()=>{i()})}animatePop(t,{speed:e,delay:s=0,onComplete:i}){let a=this.w;if(!H.isBrowser()||!a.globals.shouldAnimate||e<1){i&&i();return}let r=t.node.style;r.transformBox="fill-box",r.transformOrigin="center",r.transform="scale(0)",r.opacity="0";let o=performance.now()+s,l=c=>{if(a.globals.isDestroyed)return;let h=Math.max(0,Math.min(1,(c-o)/e));r.transform=`scale(${wl(h)})`,r.opacity=String(Math.min(1,h*2)),h<1?O.requestAnimationFrame(l):(r.transform="",r.transformOrigin="",r.transformBox="",r.opacity="",i&&i())};O.requestAnimationFrame(l)}animateRect(t,e,s,i,a,n=0){t.attr(e).animate(i,n).attr(s).after(()=>a())}animatePathsGradually(t){let{el:e,realIndex:s,j:i,fill:a,pathFrom:n,pathTo:r,pathToInterp:o,speed:l,delay:c,scrollMorph:h}=t,d=this,f=this.w,g=0;f.config.chart.animations.animateGradually.enabled&&(g=f.config.chart.animations.animateGradually.delay),f.config.chart.animations.dynamicAnimation.enabled&&f.globals.dataChanged&&f.config.chart.type!=="bar"&&(g=0),d.morphSVG(e,s,i,f.config.chart.type==="line"&&!f.globals.comboCharts?"stroke":a,n,r,l,c*g,h,o)}revealBulk(t){let e=this.w;if(t.node.classList.add("apexcharts-element-hidden"),e.globals.delayedElements.push({el:t.node}),!H.isBrowser()||!e.globals.shouldAnimate){this.animationCompleted(t);return}e.globals.bulkRevealScheduled||(e.globals.bulkRevealScheduled=!0,O.requestAnimationFrame(()=>{e.globals.isDestroyed||(e.globals.bulkRevealScheduled=!1,this.animationCompleted(t))}))}showDelayedElements(){this.w.globals.delayedElements.forEach(t=>{if(t.holdUntilComplete&&!this.w.globals.animationEnded)return;let e=t.el;e.classList.remove("apexcharts-element-hidden"),e.classList.add("apexcharts-hidden-element-shown")})}animationCompleted(t){let e=this.w;e.globals.animationEnded||(e.globals.animationEnded=!0,this.showDelayedElements(),typeof e.config.chart.events.animationEnd=="function"&&e.config.chart.events.animationEnd(this.ctx,{el:t,w:e}))}animateDraw(t,{realIndex:e,j:s,isFill:i,isLast:a,speed:n,delay:r,mask:o}){let l=this.w,c=this,h=()=>{a&&l.globals.shouldAnimate&&c.animationCompleted(t),c.showDelayedElements()};if(!H.isBrowser()||!l.globals.shouldAnimate||n<1){h();return}let d=t.node,f=()=>{let m=o&&o.type==="radial",b=l.layout.gridWidth+8,x=o&&o.cx||0,_=o&&o.cy||0,w=(o&&o.r||l.layout.gridWidth/2)+4,y=`apexDrawMask${l.globals.cuid}-${e}-${s??0}-${i?"f":"s"}`,v=O.createElementNS(Ws,"mask");v.setAttribute("id",y),v.setAttribute("maskUnits","userSpaceOnUse");let A;if(m){let M=w;v.setAttribute("x",String(x-M)),v.setAttribute("y",String(_-M)),v.setAttribute("width",String(M*2)),v.setAttribute("height",String(M*2)),A=O.createElementNS(Ws,"circle"),A.setAttribute("cx",String(x)),A.setAttribute("cy",String(_)),A.setAttribute("r","0"),A.setAttribute("fill","#fff")}else v.setAttribute("x",String(-4)),v.setAttribute("y",String(-4)),v.setAttribute("width",String(b)),v.setAttribute("height",String(l.layout.gridHeight+8)),A=O.createElementNS(Ws,"rect"),A.setAttribute("x",String(-4)),A.setAttribute("y",String(-4)),A.setAttribute("width","0"),A.setAttribute("height",String(l.layout.gridHeight+8)),A.setAttribute("fill","#fff");v.appendChild(A),l.dom.elDefs.node.appendChild(v),d.setAttribute("mask",`url(#${y})`);let S=performance.now()+(r||0),C=M=>{if(l.globals.isDestroyed)return;let k=Math.max(0,Math.min(1,(M-S)/n)),L=mn(k);m?A.setAttribute("r",String(L*w)):A.setAttribute("width",String(L*b)),k<1?O.requestAnimationFrame(C):(d.removeAttribute("mask"),v.parentNode&&v.parentNode.removeChild(v),h())};O.requestAnimationFrame(C)},g=p=>{d.setAttribute("stroke-dasharray",String(p)),d.setAttribute("stroke-dashoffset",String(p));let m=performance.now()+(r||0),b=x=>{if(l.globals.isDestroyed)return;let _=Math.max(0,Math.min(1,(x-m)/n));d.setAttribute("stroke-dashoffset",String(p*(1-mn(_)))),_<1?O.requestAnimationFrame(b):(d.removeAttribute("stroke-dasharray"),d.removeAttribute("stroke-dashoffset"),h())};O.requestAnimationFrame(b)};O.requestAnimationFrame(()=>{if(l.globals.isDestroyed)return;if(i){f();return}let p=d.getAttribute("stroke-dasharray");if(!!p&&p!=="0"&&p!==""){f();return}let b=0;try{typeof d.getTotalLength=="function"&&(b=d.getTotalLength())}catch{b=0}if(!b){h();return}g(b)})}morphSVG(t,e,s,i,a,n,r,o,l,c){var h,d;let f=this.w;a||(a=t.attr("pathFrom")),n||(n=t.attr("pathTo"));let g=()=>(f.config.chart.type==="radar"&&(r=1),`M 0 ${f.layout.gridHeight}`);(!a||a.indexOf("undefined")>-1||a.indexOf("NaN")>-1)&&(a=g()),(!n.trim()||n.indexOf("undefined")>-1||n.indexOf("NaN")>-1)&&(n=g(),c=void 0),c&&(!c.trim()||c.indexOf("undefined")>-1||c.indexOf("NaN")>-1)&&(c=void 0),f.globals.shouldAnimate||(r=1);let m=((d=(h=this.ctx)==null?void 0:h.morphTypeChange)==null?void 0:d.isActive())===!0?"polygons":"commands",b=null;if(f.globals.dataChanged){let _=f.config.chart.animations.dynamicAnimation.easing;_!=null?b=hs(_):l&&(b=hs("linear"))}let x=t.plot(a).animate(1,o).plot(a).animate(r,o);b&&x.ease(b),x.plot(c||n,m,c?n:void 0).after(()=>{if(T.isNumber(s)){let _=f.seriesData.series[f.globals.maxValsInArrayIndex];_&&s===_.length-2&&f.globals.shouldAnimate&&this.animationCompleted(t)}else i!=="none"&&f.globals.shouldAnimate&&(!f.globals.comboCharts&&e===f.seriesData.series.length-1||f.globals.comboCharts)&&this.animationCompleted(t);this.showDelayedElements()})}},bn={lighten:.15,darken:.35},at=class u{constructor(t){this.w=t}static isSliceChart(t){let e=t.config.chart.type;return e==="pie"||e==="donut"||e==="polarArea"}static hoverOutlineOwnsHoverState(t){var e;return u.isSliceChart(t)&&t.config.states.hover.filter.type!=="none"&&((e=t.config.plotOptions.pie.hoverOutline)==null?void 0:e.show)===!0}static sliceOffsetOwnsActiveState(t){return u.isSliceChart(t)&&t.config.chart.type!=="polarArea"&&t.config.plotOptions.pie.expandOnClick===!0&&t.config.plotOptions.pie.expandOffset>0&&!u.drilldownBlocksSliceOffset(t)}static drilldownBlocksSliceOffset(t){var e;return u.isSliceChart(t)&&((e=t.config.drilldown)==null?void 0:e.enabled)===!0}getDefaultFilter(t,e){let s=this.w;t.unfilter&&t.unfilter(!0),s.config.chart.dropShadow.enabled&&this.dropShadow(t,s.config.chart.dropShadow,e)}applyFilter(t,e,s,i){var a,n,r;let o=this.w;if(t.unfilter&&t.unfilter(!0),s==="none"){this.getDefaultFilter(t,e);return}let l=o.config.chart.dropShadow,c=s==="lighten"?bn.lighten:bn.darken,h=Math.max(0,Math.min(1,typeof i=="number"?i:c)),d=1-h,f=s==="lighten"?h:0;t.filterWith&&(t.filterWith(g=>{g.colorMatrix({type:"matrix",values:`
+ ${d} 0 0 0 ${f}
+ 0 ${d} 0 0 ${f}
+ 0 0 ${d} 0 ${f}
+ 0 0 0 1 0
+ `,in:"SourceGraphic",result:"brightness"}),l.enabled&&this.addShadow(g,e,l,"brightness")}),l.noUserSpaceOnUse||(n=(a=t.filterer())==null?void 0:a.node)==null||n.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((r=t.filterer())==null?void 0:r.node))}addShadow(t,e,s,i){var a;let n=this.w,{blur:r,top:o,left:l,color:c,opacity:h}=s;if(c=Array.isArray(c)?c[e]:c,((a=n.config.chart.dropShadow.enabledOnSeries)==null?void 0:a.length)>0&&n.config.chart.dropShadow.enabledOnSeries.indexOf(e)===-1)return t;t.offset({in:i,dx:l,dy:o,result:"offset"}),t.gaussianBlur({in:"offset",stdDeviation:r,result:"blur"}),t.flood({"flood-color":c,"flood-opacity":h,result:"flood"}),t.composite({in:"flood",in2:"blur",operator:"in",result:"shadow"}),t.merge(["shadow",i])}dropShadow(t,e,s=0){var i,a,n,r,o;let l=this.w;return t.unfilter&&t.unfilter(!0),T.isMsEdge()&&l.config.chart.type==="radialBar"||((i=l.config.chart.dropShadow.enabledOnSeries)==null?void 0:i.length)>0&&((a=l.config.chart.dropShadow.enabledOnSeries)==null?void 0:a.indexOf(s))===-1||t.filterWith&&(t.filterWith(c=>{this.addShadow(c,s,e,"SourceGraphic")}),e.noUserSpaceOnUse||(r=(n=t.filterer())==null?void 0:n.node)==null||r.setAttribute("filterUnits","userSpaceOnUse"),this._scaleFilterSize((o=t.filterer())==null?void 0:o.node)),t}setSelectionFilter(t,e,s){let i=this.w;if(typeof i.interact.selectedDataPoints[e]<"u"&&i.interact.selectedDataPoints[e].indexOf(s)>-1){if(t.node.setAttribute("selected",!0),u.sliceOffsetOwnsActiveState(i))return;let a=i.config.states.active.filter;a.type!=="none"&&this.applyFilter(t,e,a.type,a.value)}}_scaleFilterSize(t){if(!t)return;(s=>{for(let i in s)Object.prototype.hasOwnProperty.call(s,i)&&t.setAttribute(i,s[i])})({width:"200%",height:"200%",x:"-50%",y:"-50%"})}},B=class u{constructor(t,e=null){this.w=t,this.ctx=e}roundPathCorners(t,e){t.indexOf("NaN")>-1&&(t="");function s(C,M,k){var L=M.x-C.x,E=M.y-C.y,D=Math.sqrt(L*L+E*E);return i(C,M,Math.min(1,k/D))}function i(C,M,k){return{x:C.x+(M.x-C.x)*k,y:C.y+(M.y-C.y)*k}}function a(C,M){C.length>2&&(C[C.length-2]=M.x,C[C.length-1]=M.y)}function n(C){return{x:parseFloat(C[C.length-2]),y:parseFloat(C[C.length-1])}}var r=t.split(/[,\s]/).reduce(function(C,M){var k=M.match(/^([a-zA-Z])(.+)/);return k?(C.push(k[1]),C.push(k[2])):C.push(M),C},[]),o=r.reduce(function(C,M){return parseFloat(M)==M&&C.length?C[C.length-1].push(M):C.push([M]),C},[]),l=[];if(o.length>1){var c=n(o[0]),h=null;o[o.length-1][0]=="Z"&&o[0].length>2&&(h=["L",c.x,c.y],o[o.length-1]=h),l.push(o[0]);for(var d=1;d2&&g[0]=="L"&&p.length>2&&p[0]=="L"){var m=n(f),b=n(g),x=n(p),_,w;_=s(b,m,e),w=s(b,x,e),a(g,_),g.origPoint=b,l.push(g);var y=i(_,b,.5),v=i(b,w,.5),A=["C",y.x,y.y,v.x,v.y,w.x,w.y];A.origPoint=b,l.push(A)}else l.push(g)}if(h){var S=n(l[l.length-1]);l.push(["Z"]),a(l[0],S)}}else l=o;return l.reduce(function(C,M){return C+M.join(" ")+" "},"")}drawLine(t,e,s,i,a="#a8a8a8",n=0,r=null,o="butt"){return this.w.dom.Paper.line().attr({x1:t,y1:e,x2:s,y2:i,stroke:a,"stroke-dasharray":n,"stroke-width":r,"stroke-linecap":o})}drawRect(t=0,e=0,s=0,i=0,a=0,n="#fefefe",r=1,o=null,l=null,c=0){let d=this.w.dom.Paper.rect();return d.attr({x:t,y:e,width:s>0?s:0,height:i>0?i:0,rx:a,ry:a,opacity:r,"stroke-width":o!==null?o:0,stroke:l!==null?l:"none","stroke-dasharray":c}),d.node.setAttribute("fill",n),d}drawPolygon(t,e="#e1e1e1",s=1,i="none"){return this.w.dom.Paper.polygon(t).attr({fill:i,stroke:e,"stroke-width":s})}drawCircle(t,e=null){let s=this.w;t<0&&(t=0);let i=s.dom.Paper.circle(t*2);return e!==null&&i.attr(e),i}drawPath({d:t="",stroke:e="#a8a8a8",strokeWidth:s=1,fill:i,fillOpacity:a=1,strokeOpacity:n=1,classes:r,strokeLinecap:o=null,strokeDashArray:l=0}){let c=this.w;return o===null&&(o=c.config.stroke.lineCap),(t.indexOf("undefined")>-1||t.indexOf("NaN")>-1)&&(t=`M 0 ${c.layout.gridHeight}`),c.dom.Paper.path(t).attr({fill:i,"fill-opacity":a,stroke:e,"stroke-opacity":n,"stroke-linecap":o,"stroke-width":s,"stroke-dasharray":l,class:r})}group(t=null){let s=this.w.dom.Paper.group();return t!==null&&s.attr(t),s}move(t,e){return["M",t,e].join(" ")}line(t,e,s=null){return s==="H"?[" H",t].join(" "):s==="V"?[" V",e].join(" "):[" L",t,e].join(" ")}curve(t,e,s,i,a,n){return["C",t,e,s,i,a,n].join(" ")}quadraticCurve(t,e,s,i){return["Q",t,e,s,i].join(" ")}arc(t,e,s,i,a,n,r,o=!1){let l="A";return o&&(l="a"),[l,t,e,s,i,a,n,r].join(" ")}renderPaths({j:t,realIndex:e,pathFrom:s,pathTo:i,pathToInterp:a,stroke:n,strokeWidth:r,strokeLinecap:o,fill:l,animationDelay:c,initialSpeed:h,dataChangeSpeed:d,className:f,chartType:g,shouldClipToGrid:p=!0,bindEventsOnPaths:m=!0,drawShadow:b=!0,drawMask:x=null,scrollMorph:_=!1}){var w,y,v,A;let S=this.w,C=new at(this.w),M=new St(this.w,(w=this.ctx)!=null?w:void 0),k=this.w.config.chart.animations.enabled,L=k&&this.w.config.chart.animations.dynamicAnimation.enabled;if(s&&s.startsWith("M 0 0 ")&&i){let Z=i.match(/^M\s+[\d.-]+\s+[\d.-]+/);Z&&(s=s.replace(/^M\s+0\s+0/,Z[0]))}let E,D=((v=(y=this.ctx)==null?void 0:y.morphTypeChange)==null?void 0:v.isActive())===!0,P=!!(k&&!S.globals.resized||L&&S.globals.dataChanged&&S.globals.shouldAnimate||D&&k&&S.globals.shouldAnimate),F=typeof f=="string"&&(f.indexOf("apexcharts-line")>-1||f.indexOf("apexcharts-area")>-1||f.indexOf("apexcharts-rangeArea")>-1||f.indexOf("apexcharts-radar")>-1),R=!!(k&&!S.globals.resized&&!S.globals.dataChanged&&F),N=(A=S.config.chart.animations.largeDatasetThreshold)!=null?A:0,z=!!(P&&!R&&N>0&&S.globals.dataPoints>N),W=!!((g==="candlestick"||g==="boxPlot")&&P&&!R&&S.globals.dataChanged&&!D),Y=z||W;P&&!R&&!Y?E=s:(E=i,P||(S.globals.animationEnded=!0));let I=S.config.stroke.dashArray,U=0;Array.isArray(I)?U=I[e]:U=S.config.stroke.dashArray;let X=this.drawPath({d:E,stroke:n,strokeWidth:r,fill:l,fillOpacity:1,classes:f,strokeLinecap:o,strokeDashArray:U});X.attr("index",e),p&&(g==="bar"&&!S.globals.isBarHorizontal||S.globals.comboCharts?X.attr({"clip-path":`url(#gridRectBarMask${S.globals.cuid})`}):X.attr({"clip-path":`url(#gridRectMask${S.globals.cuid})`})),S.config.chart.dropShadow.enabled&&b&&C.dropShadow(X,S.config.chart.dropShadow,e),m&&(X.node.addEventListener("mouseenter",this.pathMouseEnter.bind(this,X)),X.node.addEventListener("mouseleave",this.pathMouseLeave.bind(this,X)),X.node.addEventListener("mousedown",this.pathMouseDown.bind(this,X))),X.attr({pathTo:i,pathFrom:s});let V={el:X,j:t,realIndex:e,pathFrom:s,pathTo:i,pathToInterp:a,fill:l,strokeWidth:r,delay:c,scrollMorph:_};if(k&&!S.globals.resized&&!S.globals.dataChanged)if(R){let Z=h*2,K=n==="none"||r===0,Q=S.seriesData.series.length,tt=S.globals.comboCharts?!0:e===Q-1;M.animateDraw(X,{realIndex:e,j:t,isFill:K,isLast:tt,speed:Z,delay:0,mask:x})}else Y||M.animatePathsGradually(j(G({},V),{speed:h}));else(S.globals.resized||!S.globals.dataChanged)&&!Y&&M.showDelayedElements();return P&&!Y&&(S.globals.dataChanged&&L||D)&&M.animatePathsGradually(j(G({},V),{speed:d})),Y&&M.revealBulk(X),X}drawPattern(t,e,s,i="#a8a8a8",a=0){return this.w.dom.Paper.pattern(e,s,o=>{t==="horizontalLines"?o.line(0,0,s,0).stroke({color:i,width:a+1}):t==="verticalLines"?o.line(0,0,0,e).stroke({color:i,width:a+1}):t==="slantedLines"?o.line(0,0,e,s).stroke({color:i,width:a}):t==="squares"?o.rect(e,s).fill("none").stroke({color:i,width:a}):t==="circles"&&o.circle(e).fill("none").stroke({color:i,width:a})})}drawGradient(t,e,s,i,a,n=null,r=null,o=[],l=0,c=!1){let h=this.w,d;e.length<9&&e.indexOf("#")===0&&(e=T.hexToRgba(e,i)),s.length<9&&s.indexOf("#")===0&&(s=T.hexToRgba(s,a));let f=0,g=1,p=1,m=null;r!==null&&(f=typeof r[0]<"u"?r[0]/100:0,g=typeof r[1]<"u"?r[1]/100:1,p=typeof r[2]<"u"?r[2]/100:1,m=typeof r[3]<"u"?r[3]/100:null);let b=h.config.chart.type==="donut"||h.config.chart.type==="pie"||h.config.chart.type==="polarArea"||h.config.chart.type==="bubble";if(!o||o.length===0?d=h.dom.Paper.gradient(b?"radial":"linear",x=>{x.stop(f,e,i),x.stop(g,s,a),x.stop(p,s,a),m!==null&&x.stop(m,e,i)}):d=h.dom.Paper.gradient(b?"radial":"linear",x=>{(Array.isArray(o[l])?o[l]:Array.isArray(o[0])?o[0]||[]:o).forEach(w=>{x.stop(w.offset/100,w.color,w.opacity)})}),!b)t==="vertical"?c?(d.attr({gradientUnits:"userSpaceOnUse"}),d.from(0,0).to(0,h.layout.gridHeight)):d.from(0,0).to(0,1):t==="diagonal"?d.from(0,0).to(1,1):t==="horizontal"?d.from(0,1).to(1,1):t==="diagonal2"&&d.from(1,0).to(0,1);else{let x=h.layout.gridWidth/2,_=h.layout.gridHeight/2;h.config.chart.type!=="bubble"?d.attr({gradientUnits:"userSpaceOnUse",cx:x,cy:_,r:n}):d.attr({cx:.5,cy:.5,r:.8,fx:.2,fy:.2})}return d}getTextBasedOnMaxWidth({text:t,maxWidth:e,fontSize:s,fontFamily:i}){let a=this.getTextRects(t,s,i,""),n=a.width/t.length,r=Math.floor(e/n);return e"u"&&(s="");let p=s;i||(i="start"),(!o||!o.length)&&(o=g.config.chart.foreColor),n=n||g.config.chart.fontFamily,a=a||"11px",r=r||"regular";let m={maxWidth:c,fontSize:a,fontFamily:n},b;return Array.isArray(s)?b=g.dom.Paper.text(x=>{for(let _=0;_x.tspan(p))),b.attr({x:t,y:e,"text-anchor":i,"dominant-baseline":f,"font-size":a,"font-family":n,"font-weight":r,fill:o,class:"apexcharts-text "+h}),b.node.style.fontFamily=n,b.node.style.opacity=l,b}getMarkerPath(t,e,s,i){let f="";switch(s){case"cross":i=i/1.4,f=`M ${t-i} ${e-i} L ${t+i} ${e+i} M ${t-i} ${e+i} L ${t+i} ${e-i}`;break;case"plus":i=i/1.12,f=`M ${t-i} ${e} L ${t+i} ${e} M ${t} ${e-i} L ${t} ${e+i}`;break;case"star":case"sparkle":{let g=5;i=i*1.15,s==="sparkle"&&(i=i/1.1,g=4);let p=Math.PI/g;for(let m=0;m<=2*g;m++){let b=m*p,x=m%2===0?i:i/2,_=t+x*Math.sin(b),w=e-x*Math.cos(b);f+=(m===0?"M":"L")+_+","+w}f+="Z";break}case"triangle":f=`M ${t} ${e-i}
+ L ${t+i} ${e+i}
+ L ${t-i} ${e+i}
+ Z`;break;case"square":case"rect":i=i/1.125,f=`M ${t-i} ${e-i}
+ L ${t+i} ${e-i}
+ L ${t+i} ${e+i}
+ L ${t-i} ${e+i}
+ Z`;break;case"diamond":i=i*1.05,f=`M ${t} ${e-i}
+ L ${t+i} ${e}
+ L ${t} ${e+i}
+ L ${t-i} ${e}
+ Z`;break;case"line":i=i/1.1,f=`M ${t-i} ${e}
+ L ${t+i} ${e}`;break;default:i=i*2,f=`M ${t}, ${e}
+ m -${i/2}, 0
+ a ${i/2},${i/2} 0 1,0 ${i},0
+ a ${i/2},${i/2} 0 1,0 -${i},0`;break}return f}drawMarkerShape(t,e,s,i,a){let n=this.drawPath({d:this.getMarkerPath(t,e,s,i),stroke:a.pointStrokeColor,strokeDashArray:a.pointStrokeDashArray,strokeWidth:a.pointStrokeWidth,fill:a.pointFillColor,fillOpacity:a.pointFillOpacity,strokeOpacity:a.pointStrokeOpacity});return n.attr({cx:t,cy:e,shape:a.shape,class:a.class?a.class:""}),n}drawMarker(t,e,s){t=t||0;let i=s.pSize||0;return T.isNumber(e)||(i=0,e=0),this.drawMarkerShape(t,e,s?.shape,i,G(G({},s),s.shape==="line"||s.shape==="plus"||s.shape==="cross"?{pointStrokeColor:s.pointFillColor,pointStrokeOpacity:s.pointFillOpacity}:{}))}pathMouseEnter(t,e){var s,i;let a=this.w,n=new at(this.w),r=parseInt((s=t.node.getAttribute("index"))!=null?s:"",10),o=parseInt((i=t.node.getAttribute("j"))!=null?i:"",10);if(!(isNaN(r)||isNaN(o))&&(typeof a.config.chart.events.dataPointMouseEnter=="function"&&a.config.chart.events.dataPointMouseEnter(e,this.ctx,{seriesIndex:r,dataPointIndex:o,w:a}),u._fireEvent(a,"dataPointMouseEnter",[e,this.ctx,{seriesIndex:r,dataPointIndex:o,w:a}]),!(a.config.states.active.filter.type!=="none"&&t.node.getAttribute("selected")==="true")&&!at.hoverOutlineOwnsHoverState(a)&&a.config.states.hover.filter.type!=="none"&&!a.interact.isTouchDevice)){let l=a.config.states.hover.filter;n.applyFilter(t,r,l.type,l.value)}}pathMouseLeave(t,e){var s,i;let a=this.w,n=new at(this.w),r=parseInt((s=t.node.getAttribute("index"))!=null?s:"",10),o=parseInt((i=t.node.getAttribute("j"))!=null?i:"",10);isNaN(r)||isNaN(o)||(typeof a.config.chart.events.dataPointMouseLeave=="function"&&a.config.chart.events.dataPointMouseLeave(e,this.ctx,{seriesIndex:r,dataPointIndex:o,w:a}),u._fireEvent(a,"dataPointMouseLeave",[e,this.ctx,{seriesIndex:r,dataPointIndex:o,w:a}]),!(a.config.states.active.filter.type!=="none"&&t.node.getAttribute("selected")==="true")&&(at.hoverOutlineOwnsHoverState(a)||a.config.states.hover.filter.type!=="none"&&n.getDefaultFilter(t,r)))}_clearAllDataPointSelections(t,e){let s=this.w;s.interact.selectedDataPoints=[];let i=s.dom.Paper.find(".apexcharts-series path:not(.apexcharts-decoration-element)"),a=s.dom.Paper.find(".apexcharts-series circle:not(.apexcharts-decoration-element), .apexcharts-series rect:not(.apexcharts-decoration-element)"),n=r=>{Array.prototype.forEach.call(r,o=>{o.node.setAttribute("selected","false"),t.getDefaultFilter(o,e)})};n(i),n(a)}_togglePointSelection(t,e,s,i){let a=this.w;if(t.node.getAttribute("selected")==="true"){t.node.setAttribute("selected","false");let n=a.interact.selectedDataPoints[s].indexOf(i);return n>-1&&a.interact.selectedDataPoints[s].splice(n,1),"false"}return!a.config.states.active.allowMultipleDataPointsSelection&&a.interact.selectedDataPoints.length>0&&this._clearAllDataPointSelections(e,s),t.node.setAttribute("selected","true"),typeof a.interact.selectedDataPoints[s]>"u"&&(a.interact.selectedDataPoints[s]=[]),a.interact.selectedDataPoints[s].push(i),"true"}_applyPointSelectionFilter(t,e,s,i){let a=this.w;if(!at.sliceOffsetOwnsActiveState(a)){if(i==="true"){let n=a.config.states.active.filter;if(n!=="none")e.applyFilter(t,s,n.type,n.value);else if(a.config.states.hover.filter!=="none"&&!a.interact.isTouchDevice){let r=a.config.states.hover.filter;e.applyFilter(t,s,r.type,r.value)}}else if(a.config.states.active.filter.type!=="none")if(a.config.states.hover.filter.type!=="none"&&!a.interact.isTouchDevice){let n=a.config.states.hover.filter;e.applyFilter(t,s,n.type,n.value)}else e.getDefaultFilter(t,s)}}pathMouseDown(t,e){var s,i;let a=this.w,n=new at(this.w),r=parseInt((s=t.node.getAttribute("index"))!=null?s:"",10),o=parseInt((i=t.node.getAttribute("j"))!=null?i:"",10);if(isNaN(r)||isNaN(o))return;let l=a.config.chart.link;if(!!!(l&&(typeof l.dimension=="function"||l.enabled))){let h=this._togglePointSelection(t,n,r,o);this._applyPointSelectionFilter(t,n,r,h)}typeof a.config.chart.events.dataPointSelection=="function"&&a.config.chart.events.dataPointSelection(e,this.ctx,{selectedDataPoints:a.interact.selectedDataPoints,seriesIndex:r,dataPointIndex:o,w:a}),e&&u._fireEvent(a,"dataPointSelection",[e,this.ctx,{selectedDataPoints:a.interact.selectedDataPoints,seriesIndex:r,dataPointIndex:o,w:a}])}rotateAroundCenter(t){let e={};t&&typeof t.getBBox=="function"&&(e=t.getBBox());let s=e.x+e.width/2,i=e.y+e.height/2;return{x:s,y:i}}setupEventDelegation(t,e){let s=null;t.node.addEventListener("mouseover",i=>{let a=u._findDelegateTarget(i.target,t.node,e);!a||a===s||(s&&s.instance&&this.pathMouseLeave(s.instance,i),s=a,a.instance&&this.pathMouseEnter(a.instance,i))}),t.node.addEventListener("mouseout",i=>{if(!s)return;(i.relatedTarget?u._findDelegateTarget(i.relatedTarget,t.node,e):null)!==s&&(s&&s.instance&&this.pathMouseLeave(s.instance,i),s=null)}),t.node.addEventListener("mousedown",i=>{let a=u._findDelegateTarget(i.target,t.node,e);a&&a.instance&&this.pathMouseDown(a.instance,i)})}static _fireEvent(t,e,s){let i=t.globals.events;if(!i||!Object.prototype.hasOwnProperty.call(i,e))return;let a=i[e];for(let n=0;n0&&t.getComputedTextLength()>=s/1.1)){for(let i=e.length-3;i>0;i-=3)if(t.getSubStringLength(0,i)<=s/1.1){t.textContent=e.substring(0,i)+"...";return}t.textContent="."}}},pt=class{constructor(t){this.w=t,this.opts=null,this.seriesIndex=0,this.patternIDs=[]}clippedImgArea(t){let e=this.w,s=e.config,i=parseInt(String(e.layout.gridWidth),10),a=parseInt(String(e.layout.gridHeight),10),n=i>a?i:a,r=t.image,o=0,l=0;typeof t.width>"u"&&typeof t.height>"u"?s.fill.image.width!==void 0&&s.fill.image.height!==void 0?(o=s.fill.image.width+1,l=s.fill.image.height):(o=n+1,l=n):(o=t.width,l=t.height);let c=O.createElementNS(et,"pattern");B.setAttrs(c,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:o+"px",height:l+"px"});let h=O.createElementNS(et,"image");c.appendChild(h);let d=H.isBrowser()?window.SVG:global.SVG;h.setAttributeNS(d.xlink,"href",r),B.setAttrs(h,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:l+"px"}),h.style.opacity=t.opacity,e.dom.elDefs.node.appendChild(c)}getSeriesIndex(t){let e=this.w,s=e.config.chart.type;return(s==="bar"||s==="rangeBar")&&e.config.plotOptions.bar.distributed||s==="heatmap"||s==="treemap"?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.seriesData.series.length,this.seriesIndex}getSeriesAxisRange(t){var e,s,i;let a=this.w,n=(s=(e=a.globals.seriesYAxisReverseMap)==null?void 0:e[t])!=null?s:0;return{minY:T.isNumber(a.globals.minYArr[t])?a.globals.minYArr[t]:a.globals.minY,maxY:T.isNumber(a.globals.maxYArr[t])?a.globals.maxYArr[t]:a.globals.maxY,reversed:!!((i=a.config.yaxis[n])!=null&&i.reversed)}}computeColorStops(t,e){let s=this.w,{threshold:i,colorAboveThreshold:a,colorBelowThreshold:n}=e,{minY:r,maxY:o}=t,l=o-r,c=l===0?i>o?0:100:(o-i)/l*100;t.reversed&&(c=100-c),c=Math.max(0,Math.min(c,100));let h=Array.isArray(s.config.fill.opacity)?s.config.fill.opacity[this.seriesIndex]:s.config.fill.opacity,d={offset:c,color:a,opacity:h},f={offset:c,color:n,opacity:h};return t.reversed?[f,d]:[d,f]}fillPath(t){var e,s,i,a;let n=this.w;this.opts=t;let r=this.w.config,o,l,c;this.seriesIndex=this.getSeriesIndex(t);let h=r.plotOptions.line.colors.colorAboveThreshold&&r.plotOptions.line.colors.colorBelowThreshold,f=this.getFillColors()[this.seriesIndex];n.seriesData.seriesColors[this.seriesIndex]!==void 0&&(f=n.seriesData.seriesColors[this.seriesIndex]),typeof f=="function"&&(f=f({seriesIndex:this.seriesIndex,dataPointIndex:t.dataPointIndex,value:t.value,w:n}));let g=t.fillType?t.fillType:this.getFillType(this.seriesIndex),p=Array.isArray(r.fill.opacity)?r.fill.opacity[this.seriesIndex]:r.fill.opacity,m=g==="gradient"||h;t.color&&(f=t.color);let b=n.config.series[this.seriesIndex];(s=(e=b?.data)==null?void 0:e[t.dataPointIndex])!=null&&s.fillColor&&(f=(a=(i=b?.data)==null?void 0:i[t.dataPointIndex])==null?void 0:a.fillColor),f||(f="#fff",console.warn("undefined color - ApexCharts")),t.opacity!==void 0&&t.opacity!==null&&(p=t.opacity);let x=f;T.isCSSVariable(f)?x=T.applyOpacityToColor(f,p):f.indexOf("rgb")===-1?f.indexOf("#")===-1?x=f:f.length<9&&(x=T.hexToRgba(f,p)):f.indexOf("rgba")>-1?p=T.getOpacityFromRGBA(f):x=T.hexToRgba(T.rgb2hex(f),p);let _=T.isCSSVariable(f)?T.getThemeColor(f):f;if(g==="pattern"&&(l=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:l,fillColor:_,defaultColor:x})),m){let w=r.fill.gradient.colorStops?[...r.fill.gradient.colorStops]:[],y=r.fill.gradient.type;h&&(w[this.seriesIndex]=this.computeColorStops(this.getSeriesAxisRange(this.seriesIndex),r.plotOptions.line.colors),y="vertical"),c=this.handleGradientFill({type:y,fillConfig:t.fillConfig,fillColor:_,fillOpacity:p,colorStops:w,i:this.seriesIndex,verticalUserSpace:h})}if(g==="image"){let w=r.fill.image.src,y=t.patternID?t.patternID:"",v=`pattern${n.globals.cuid}${t.seriesNumber+1}${y}`;this.patternIDs.indexOf(v)===-1&&(this.clippedImgArea({opacity:p,image:Array.isArray(w)?t.seriesNumber-1&&(g=T.getOpacityFromRGBA(d));let p=o.gradient.opacityTo===void 0?s:Array.isArray(o.gradient.opacityTo)?o.gradient.opacityTo[n]:o.gradient.opacityTo;if(o.gradient.gradientToColors===void 0||o.gradient.gradientToColors.length===0)o.gradient.shade==="dark"?f=h.shadeColor(parseFloat(o.gradient.shadeIntensity)*-1,e.indexOf("rgb")>-1?T.rgb2hex(e):e):f=h.shadeColor(parseFloat(o.gradient.shadeIntensity),e.indexOf("rgb")>-1?T.rgb2hex(e):e);else if(o.gradient.gradientToColors[l.seriesNumber]){let m=o.gradient.gradientToColors[l.seriesNumber];f=m,m.indexOf("rgba")>-1&&(p=T.getOpacityFromRGBA(m))}else f=e;if(o.gradient.gradientFrom&&(d=o.gradient.gradientFrom),o.gradient.gradientTo&&(f=o.gradient.gradientTo),o.gradient.inverseColors){let m=d;d=f,f=m}return d.indexOf("rgb")>-1&&(d=T.rgb2hex(d)),f.indexOf("rgb")>-1&&(f=T.rgb2hex(f)),c.drawGradient(t,d,f,g,p,l.size,o.gradient.stops,a,n,r)}},yn=["none","lighten","darken"];function ae(u,t){let e=u&&u.renderer;return e&&e.kind&&e.kind!=="svg"?e:t}function vl(u){let t=u.config.series||[],e=u.config.chart.type,s=e==="scatter"||e==="bubble",i=u.config.markers&&u.config.markers.size,a=Array.isArray(i)?i.some(h=>h>0):(i||0)>0,n=!!(u.config.dataLabels&&u.config.dataLabels.enabled),r=e==="heatmap",o=0,l=0;return t.forEach(h=>{let d=Array.isArray(h.data)?h.data.length:0;d>l&&(l=d),(s||a||r)&&(o+=d),n&&(o+=d)}),l>=5e4&&(o=Math.max(o,l)),o}function wn(u){var t,e;let s=u.config.fill&&u.config.fill.type,i=l=>l==="pattern"||l==="image"||l==="gradient";if(Array.isArray(s)?s.some(i):i(s))return!0;let a=(e=(t=u.config.plotOptions)==null?void 0:t.line)==null?void 0:e.colors;if(a&&a.colorAboveThreshold&&a.colorBelowThreshold)return!0;let n=u.config.states||{},r=n.hover&&n.hover.filter&&n.hover.filter.type,o=n.active&&n.active.filter&&n.active.filter.type;return!!(r&&!yn.includes(r)||o&&!yn.includes(o))}var zt=class{constructor(t,e){this.w=t,this.ctx=e,this._filters=new at(this.w),this._graphics=new B(this.w,this.ctx),this._seriesWrap=null,this._seriesWrapIndex=-1}resetSeriesWrapCache(){this._seriesWrap=null,this._seriesWrapIndex=-1}setGlobalMarkerSize(){let t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length"u"&&t.globals.markers.size.push(t.globals.markers.size[0])}else t.globals.markers.size=t.config.series.map(()=>t.config.markers.size)}plotChartMarkers({pointsPos:t,seriesIndex:e,j:s,pSize:i,alwaysDrawMarker:a=!1,isVirtualPoint:n=!1}){let r=this.w,o=e,l=t,c=null,h=new B(this.w),d=ae(this.ctx,h),f=r.config.markers.discrete&&r.config.markers.discrete.length;if(Array.isArray(l.x))for(let g=0;g0:r.config.markers.size>0)||a||f){d.kind==="canvas"&&(typeof r.globals.pointsArray[e]>"u"&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e][m]=[l.x[g],l.y[g]]),b||(x+=` w${T.randomId()}`);let w=this.getMarkerConfig({cssClass:x,seriesIndex:e,dataPointIndex:m}),y=r.config.series[o];if(y.data[m]&&(y.data[m].fillColor&&(w.pointFillColor=y.data[m].fillColor),y.data[m].strokeColor&&(w.pointStrokeColor=y.data[m].strokeColor)),typeof i<"u"&&(w.pSize=i),(l.x[g]<-r.globals.markers.largestSize||l.x[g]>r.layout.gridWidth+r.globals.markers.largestSize||l.y[g]<-r.globals.markers.largestSize||l.y[g]>r.layout.gridHeight+r.globals.markers.largestSize)&&(w.pSize=0),!b){if((r.globals.markers.size[e]>0||a||f)&&!c){let A=!a&&!f;A&&this._seriesWrap&&this._seriesWrapIndex===e?c=this._seriesWrap:(c=d.group({class:A?"apexcharts-series-markers":""}),c.attr("clip-path",`url(#gridRectMarkerMask${r.globals.cuid})`),this.setupMarkerDelegation(c),A&&(this._seriesWrap=c,this._seriesWrapIndex=e))}p=d.drawMarker(l.x[g],l.y[g],w),p.attr("rel",m),p.attr("j",m),p.attr("index",e),p.node.setAttribute("default-marker-size",w.pSize),Dt(p,l.x[g],r),this._filters.setSelectionFilter(p,e,m),c&&c.add(p)}}else typeof r.globals.pointsArray[e]>"u"&&(r.globals.pointsArray[e]=[]),r.globals.pointsArray[e].push([l.x[g],l.y[g]])}return c}getMarkerConfig({cssClass:t,seriesIndex:e,dataPointIndex:s=null,radius:i=null,size:a=null,strokeWidth:n=null}){let r=this.w,o=this.getMarkerStyle(e),l=a===null?r.globals.markers.size[e]:a,c=r.config.markers;return s!==null&&c.discrete.length&&c.discrete.map(h=>{h.seriesIndex===e&&h.dataPointIndex===s&&(h.strokeColor!==void 0&&(o.pointStrokeColor=h.strokeColor),h.fillColor!==void 0&&(o.pointFillColor=h.fillColor),h.size!==void 0&&(l=h.size),h.shape!==void 0&&(o.pointShape=h.shape))}),{pSize:i===null?l:i,pRadius:i!==null?i:c.radius,pointStrokeWidth:n!==null?n:Array.isArray(c.strokeWidth)?c.strokeWidth[e]:c.strokeWidth,pointStrokeColor:o.pointStrokeColor,pointFillColor:o.pointFillColor,shape:o.pointShape||(Array.isArray(c.shape)?c.shape[e]:c.shape),class:t,pointStrokeOpacity:Array.isArray(c.strokeOpacity)?c.strokeOpacity[e]:c.strokeOpacity,pointStrokeDashArray:Array.isArray(c.strokeDashArray)?c.strokeDashArray[e]:c.strokeDashArray,pointFillOpacity:Array.isArray(c.fillOpacity)?c.fillOpacity[e]:c.fillOpacity,seriesIndex:e}}setupMarkerDelegation(t){let e=this.w,s=".apexcharts-marker";this._graphics.setupEventDelegation(t,s),t.node.addEventListener("click",i=>{e.config.markers.onClick&&B._findDelegateTarget(i.target,t.node,s)&&e.config.markers.onClick(i)}),t.node.addEventListener("dblclick",i=>{e.config.markers.onDblClick&&B._findDelegateTarget(i.target,t.node,s)&&e.config.markers.onDblClick(i)}),t.node.addEventListener("touchstart",i=>{let a=B._findDelegateTarget(i.target,t.node,s);a&&a.instance&&this._graphics.pathMouseDown(a.instance,i)},{passive:!0})}getMarkerStyle(t){let e=this.w,s=e.globals.markers.colors,i=e.config.markers.strokeColor||e.config.markers.strokeColors,a=Array.isArray(i)?i[t]:i,n=Array.isArray(s)?s[t]:s;return{pointStrokeColor:a,pointFillColor:n}}},ds=class{constructor(t,e){this.ctx=e,this.w=t,this.initialAnim=this.w.config.chart.animations.enabled,this.anim=new St(this.w),this.filters=new at(this.w),this.fill=new pt(this.w),this.markers=new zt(this.w,this.ctx),this.graphics=new B(this.w),this._elPointsWrap=null,this._elPointsWrapParent=null,this._perSeries=null}draw(t,e,s){let i=this.w,a=this.graphics,n=ae(this.ctx,a),r=s.realIndex,o=s.pointsPos,l=s.zRatio,c=s.elParent,h=this._elPointsWrap;if((!h||this._elPointsWrapParent!==c)&&(h=n.group({class:`apexcharts-series-markers apexcharts-series-${i.config.chart.type}`}),h.attr("clip-path",`url(#gridRectMarkerMask${i.globals.cuid})`),this.markers.setupMarkerDelegation(h),c.add(h),this._elPointsWrap=h,this._elPointsWrapParent=c,this._perSeries=this._buildPerSeriesCache(r,n)),Array.isArray(o.x))for(let d=0;dx.maxBubbleRadius&&(p=x.maxBubbleRadius)}let m=o.x[d],b=o.y[d];if(p=p||0,(b===null||typeof i.seriesData.series[r][f]>"u")&&(g=!1),g){let x=this.drawPoint(m,b,p,r,f,e);h.add(x),n.kind==="canvas"&&(typeof i.globals.pointsArray[r]>"u"&&(i.globals.pointsArray[r]=[]),i.globals.pointsArray[r][f]=[m,b])}}}_buildPerSeriesCache(t,e){var s;let i=this.w;return{realIndex:t,emit:e,isBubble:i.config.chart.type==="bubble"||i.globals.comboCharts&&i.config.series[t]&&i.config.series[t].type==="bubble",canCacheConfig:!i.config.markers.discrete.length,markerConfig:null,fillCacheable:void 0,fillCircle:void 0,dropShadowEnabled:i.config.chart.dropShadow.enabled,doInitialAnim:this.initialAnim&&!i.globals.dataChanged&&!i.globals.resized,jitter:(s=i.config.plotOptions.scatter)==null?void 0:s.jitter,anim:null}}drawPoint(t,e,s,i,a,n){var r;let o=this.w,l=i,c=this.anim,h=this.filters,d=this.fill,f=this.markers,g=this._perSeries;(!g||g.realIndex!==i)&&(g=this._perSeries=this._buildPerSeriesCache(i,ae(this.ctx,this.graphics)));let p=g.emit,m;g.canCacheConfig?(g.markerConfig||(g.markerConfig=f.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:a,radius:g.isBubble?s:null})),m=g.markerConfig,g.isBubble&&(m.pSize=s,m.pRadius=s)):m=f.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:a,radius:g.isBubble?s:null});let x=o.config.series[l].data[a],_;g.fillCircle!==void 0?_=g.fillCircle:(_=d.fillPath({seriesNumber:i,dataPointIndex:a,color:m.pointFillColor,patternUnits:"objectBoundingBox",value:o.seriesData.series[i][n]}),g.fillCacheable===void 0&&(g.fillCacheable=g.canCacheConfig&&d.getFillType(i)==="solid"&&typeof m.pointFillColor=="string"&&!!m.pointFillColor),g.fillCacheable&&!x?.fillColor&&(g.fillCircle=_));let w=p.drawMarker(t,e,m);x?.fillColor&&(_=x.fillColor);let y=g.jitter;if(y?.enabled&&y.distributed&&o.globals.colors.length){let v=Math.round((r=o.seriesData.seriesX[i])==null?void 0:r[a]);isNaN(v)||(_=o.globals.colors[v%o.globals.colors.length])}if(w.attr({fill:_}),g.dropShadowEnabled){let v=o.config.chart.dropShadow;h.dropShadow(w,v,i)}if(g.doInitialAnim){if(!g.anim){let A=o.config.chart.animations,S=o.globals.dataPoints||1,C=A.animateGradually,M=C&&C.enabled!==!1;g.anim={popSpeed:A.speed,baseDelay:M?Math.min(20,A.speed*.5/Math.max(1,S)):0}}let v=Ya({style:g.anim.baseDelay>0?"sequential":"none",index:a,baseDelay:g.anim.baseDelay});c.animatePop(w,{speed:g.anim.popSpeed,delay:v,onComplete:()=>c.animationCompleted(w)})}else o.globals.animationEnded=!0;return w.attr({rel:a,j:a,index:i,"default-marker-size":m.pSize}),h.setSelectionFilter(w,i,a),w}centerTextInBubble(t){let e=this.w;return t=t+parseInt(e.config.dataLabels.style.fontSize,10)/4,{y:t}}},Bt=(u,t,e,s)=>{if(typeof u!="function")return u;let i=u({series:t.seriesData.series,seriesIndex:e,dataPointIndex:s,w:t});return Number.isFinite(i)?i:0},Et=class{constructor(t,e=null){this.w=t,this.ctx=e}dataLabelsCorrection(t,e,s,i,a,n,r){let o=this.w,l=new B(this.w),c=!1,h=l.getTextRects(s,r),d=h.width,f=h.height;e<0&&(e=0),e>o.layout.gridHeight+f&&(e=o.layout.gridHeight+f/2),typeof o.globals.dataLabelsRects[i]>"u"&&(o.globals.dataLabelsRects[i]=[]),o.globals.dataLabelsRects[i].push({x:t,y:e,width:d,height:f});let g=o.globals.dataLabelsRects[i].length-2,p=typeof o.globals.lastDrawnDataLabelsIndexes[i]<"u"?o.globals.lastDrawnDataLabelsIndexes[i][o.globals.lastDrawnDataLabelsIndexes[i].length-1]:0;if(typeof o.globals.dataLabelsRects[i][g]<"u"){let m=o.globals.dataLabelsRects[i][p];(t>m.x+m.width||e>m.y+m.height||e+fr.config.dataLabels.formatter(w,{seriesIndex:s,dataPointIndex:d,w:r});r.config.chart.type==="bubble"?(m=r.seriesData.seriesZ[s][d],b=x(m),h=e.y[p],h=new ds(this.w,this.ctx).centerTextInBubble(h).y):typeof m<"u"&&(b=x(m));let _=r.config.dataLabels.textAnchor;r.globals.isSlopeChart&&(d===0?_="end":d===r.config.series[s].data.length-1?_="start":_="middle"),this.plotDataLabelsText({x:c,y:h,text:b,i:s,j:d,parent:f,offsetCorrection:!0,dataLabelsConfig:r.config.dataLabels,textAnchor:_})}return f}plotDataLabelsText(t){let e=this.w,s=new B(this.w),{x:i,y:a,i:n,j:r,text:o,textAnchor:l,fontSize:c,parent:h,dataLabelsConfig:d,color:f,alwaysDrawDataLabel:g,offsetCorrection:p,className:m,seriesIndex:b=n,dataPointIndex:x=r}=t,_=null;if(Array.isArray(e.config.dataLabels.enabledOnSeries)&&e.config.dataLabels.enabledOnSeries.indexOf(n)<0)return _;let w={x:i,y:a,drawnextLabel:!0,textRects:null};if(p&&(w=this.dataLabelsCorrection(i,a,o,n,r,g,parseInt(d.style.fontSize,10).toString())),e.interact.zoomed||(i=w.x,a=w.y),w.textRects){let k=e.globals.barPadForNumericAxis||0;(i<-(k+20)-w.textRects.width||i>e.layout.gridWidth+w.textRects.width+k+30)&&(o="")}let y=e.globals.dataLabels.style.colors[n];((e.config.chart.type==="bar"||e.config.chart.type==="rangeBar")&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(y=e.globals.dataLabels.style.colors[r]),typeof y=="function"&&(y=y({series:e.seriesData.series,seriesIndex:n,dataPointIndex:r,w:e})),f&&(y=f);let v=e.config.chart.type==="bar"||e.config.chart.type==="rangeBar",A=v?0:Bt(d.offsetX,e,b,x),S=v?0:Bt(d.offsetY,e,b,x),C=A,M=S;if(e.globals.isSlopeChart&&(r!==0&&(C=A*-2+5),r!==0&&r!==e.config.series[n].data.length-1&&(C=0)),w.drawnextLabel){if(l==="middle"&&i===e.layout.gridWidth&&(l="end"),_=s.drawText({x:i+C,y:a+M,foreColor:y,textAnchor:l||d.textAnchor,text:o,fontSize:c||d.style.fontSize,fontFamily:d.style.fontFamily,fontWeight:d.style.fontWeight||"normal"}),_.attr({class:m||"apexcharts-datalabel",cx:i,cy:a}),d.dropShadow.enabled){let k=d.dropShadow;new at(this.w).dropShadow(_,k)}h.add(_),Dt(_,i,e),typeof e.globals.lastDrawnDataLabelsIndexes[n]>"u"&&(e.globals.lastDrawnDataLabelsIndexes[n]=[]),e.globals.lastDrawnDataLabelsIndexes[n].push(r)}return _}addBackgroundToDataLabel(t,e){let s=this.w,i=s.config.dataLabels.background,a=i.padding,n=i.padding/2,r=e.width,o=e.height,c=new B(this.w).drawRect(e.x-a,e.y-n/2,r+a*2,o+n,i.borderRadius,s.config.chart.background==="transparent"||!s.config.chart.background?"#fff":s.config.chart.background,i.opacity,i.borderWidth,i.borderColor);return i.dropShadow.enabled&&new at(this.w).dropShadow(c,i.dropShadow),c}dataLabelsBackground(){var t;let e=this.w;if(e.config.chart.type==="bubble")return;let s=e.dom.baseEl.querySelectorAll(".apexcharts-datalabels text");for(let i=0;i"u"?"":t[i],c=l,h=o.formatters.xLabelFormatter,d=o.config.xaxis.labels.formatter,f=new ee(this.w),g=l;r&&(c=f.xLabelFormat(h,l,g,{i,dateFormatter:new mt(this.w).formatDate,w:o}),d!==void 0&&(c=d(l,t[i],{i,dateFormatter:new mt(this.w).formatDate,w:o}))),e.length>0?(s=e[i].position,c=e[i].value):o.config.xaxis.type==="datetime"&&d===void 0&&(c=""),typeof c>"u"&&(c=""),c=Array.isArray(c)?c:c.toString();let p=new B(this.w),m={};o.layout.rotateXLabels&&r?m=p.getTextRects(c,parseInt(n,10).toString(),null,`rotate(${o.config.xaxis.labels.rotate} 0 0)`,!1):m=p.getTextRects(c,parseInt(n,10).toString());let b=!o.config.xaxis.labels.showDuplicates&&this.timeScale;return!Array.isArray(c)&&(String(c)==="NaN"||a.indexOf(c)>=0&&b)&&(c=""),{x:s,text:c,textRect:m}}checkLabelBasedOnTickamount(t,e,s){let i=this.w,a=i.config.xaxis.tickAmount;if(a==="dataPoints"&&(a=Math.round(i.layout.gridWidth/120)),a>s)return e;let n=Math.round(s/(a+1));return t%n===0||(e.text=""),e}checkForOverflowingLabels(t,e,s,i,a){let n=this.w;if(t===0&&n.globals.skipFirstTimelinelabel&&(e.text=""),t===s-1&&n.globals.skipLastTimelinelabel&&(e.text=""),n.config.xaxis.labels.hideOverlappingLabels&&i.length>0){let r=a[a.length-1];if(n.config.xaxis.labels.trim&&n.config.xaxis.type!=="datetime")return e;e.xe.collapsedSeriesIndices.indexOf(s)===-1)}translateYAxisIndex(t){let e=this.w,s=e.globals,i=e.config.yaxis;return e.seriesData.series.length>i.length||i.some(n=>Array.isArray(n.seriesName))?t:s.seriesYAxisReverseMap[t]}isYAxisHidden(t){let e=this.w,s=e.config.yaxis[t];if(!s.show||this.yAxisAllSeriesCollapsed(t))return!0;if(!s.showForNullSeries){let i=e.globals.seriesYAxisMap[t],a=new lt(this.w);return i.every(n=>a.isSeriesNull(n))}return!1}getYAxisForeColor(t,e){var s;let i=this.w;return Array.isArray(t)&&i.globals.yAxisScale[e]&&((s=this.theme)==null||s.pushExtraColors(t,i.globals.yAxisScale[e].result.length,!1)),t}drawYAxisTicks(t,e,s,i,a,n,r){let o=this.w,l=new B(this.w),c=o.layout.translateY+o.config.yaxis[a].labels.offsetY;if(o.globals.isBarHorizontal?c=0:o.config.chart.type==="heatmap"&&(c+=n/2),i.show&&e>0){o.config.yaxis[a].opposite===!0&&(t=t+i.width);for(let h=e;h>=0;h--){let d=l.drawLine(t+s.offsetX-i.width+i.offsetX,c+i.offsetY,t+s.offsetX+i.offsetX,c+i.offsetY,i.color);r.add(d),c+=n}}}},Wt=class{constructor(t,e,s){this.w=t,this.ctx=e,this.elgrid=s,this.axesUtils=new Ct(t,{theme:e.theme,timeScale:e.timeScale}),this.xaxisLabels=t.labelData.labels.slice(),t.labelData.timescaleLabels.length>0&&!t.globals.isBarHorizontal&&(this.xaxisLabels=t.labelData.timescaleLabels.slice()),t.config.xaxis.overwriteCategories&&(this.xaxisLabels=t.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],t.config.xaxis.position==="top"?this.offY=0:this.offY=t.layout.gridHeight,this.offY=this.offY+t.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal=t.config.chart.type==="bar"&&t.config.plotOptions.bar.horizontal,this.xaxisFontSize=t.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=t.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=t.config.xaxis.labels.style.colors,this.xaxisBorderWidth=t.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=t.config.yaxis[0].axisBorder.width.toString()),String(this.xaxisBorderWidth).indexOf("%")>-1?this.xaxisBorderWidth=t.layout.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=t.config.xaxis.axisBorder.height,this.yaxis=t.config.yaxis[0]}drawXaxis(){let t=this.w,e=new B(this.w),s=e.group({class:"apexcharts-xaxis",transform:`translate(${t.config.xaxis.offsetX}, ${t.config.xaxis.offsetY})`}),i=e.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${t.layout.translateXAxisX}, ${t.layout.translateXAxisY})`});s.add(i);let a=[];for(let n=0;nr),t.labelData.hasXaxisGroups){let n=t.labelData.groups;a=[];for(let o=0;on[o].cols*l,r)}if(t.config.xaxis.title.text!==void 0){let n=e.group({class:"apexcharts-xaxis-title"}),r=e.drawText({x:t.layout.gridWidth/2+t.config.xaxis.title.offsetX,y:this.offY+parseFloat(this.xaxisFontSize)+(t.config.xaxis.position==="bottom"?t.layout.xAxisLabelsHeight:-t.layout.xAxisLabelsHeight-10)+t.config.xaxis.title.offsetY,text:t.config.xaxis.title.text,textAnchor:"middle",fontSize:t.config.xaxis.title.style.fontSize,fontFamily:t.config.xaxis.title.style.fontFamily,fontWeight:t.config.xaxis.title.style.fontWeight,foreColor:t.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+t.config.xaxis.title.style.cssClass});n.add(r),s.add(n)}if(t.config.xaxis.axisBorder.show){let n=t.globals.barPadForNumericAxis,r=e.drawLine(t.globals.padHorizontal+t.config.xaxis.axisBorder.offsetX-n,this.offY,this.xaxisBorderWidth+n,this.offY,t.config.xaxis.axisBorder.color,0,this.xaxisBorderHeight);this.elgrid&&this.elgrid.elGridBorders&&t.config.grid.show?this.elgrid.elGridBorders.add(r):s.add(r)}return s}drawXAxisLabelAndGroup(t,e,s,i,a,n,r={}){var o,l;let c=[],h=[],d=this.w,f=r.xaxisFontSize||this.xaxisFontSize,g=r.xaxisFontFamily||this.xaxisFontFamily,p=r.xaxisForeColors||this.xaxisForeColors,m=r.fontWeight||d.config.xaxis.labels.style.fontWeight,b=r.cssClass||d.config.xaxis.labels.style.cssClass,x,_=d.globals.padHorizontal,w=i.length,y=d.config.xaxis.type==="category"?d.globals.dataPoints:w;if(y===0&&w>y&&(y=w),a){let v=Math.max(Number(d.config.xaxis.tickAmount)||1,y>1?y-1:y);x=d.layout.gridWidth/Math.min(v,w-1),_=_+n(0,x)/2+d.config.xaxis.labels.offsetX}else x=d.layout.gridWidth/y,_=_+n(0,x)+d.config.xaxis.labels.offsetX;for(let v=0;v<=w-1;v++){let A=_-n(v,x)/2+d.config.xaxis.labels.offsetX;v===0&&w===1&&x/2===_&&y===1&&(A=d.layout.gridWidth/2);let S=this.axesUtils.getLabel(i,d.labelData.timescaleLabels,A,v,c,f,t),C=28;d.layout.rotateXLabels&&t&&(C=22),d.config.xaxis.title.text&&d.config.xaxis.position==="top"&&(C+=parseFloat(d.config.xaxis.title.style.fontSize)+2),t||(C=C+parseFloat(f)+(d.layout.xAxisLabelsHeight-d.layout.xAxisGroupLabelsHeight)+(d.layout.rotateXLabels?10:0)),typeof d.config.xaxis.tickAmount<"u"&&d.config.xaxis.tickAmount!=="dataPoints"&&d.config.xaxis.type!=="datetime"?S=this.axesUtils.checkLabelBasedOnTickamount(v,S,w):S=this.axesUtils.checkForOverflowingLabels(v,S,w,c,h);let k=()=>t&&d.config.xaxis.convertedCatToNumeric?p[d.globals.minX+v-1]:p[v],E=((l=(o=S.textRect)==null?void 0:o.width)!=null?l:0)/2,D=S.x+E<0;if(d.config.xaxis.labels.show&&!D){let P=e.drawText({x:S.x,y:this.offY+d.config.xaxis.labels.offsetY+C-(d.config.xaxis.position==="top"?d.layout.xAxisHeight+d.config.xaxis.axisTicks.height-2:0),text:S.text,textAnchor:"middle",fontWeight:m,fontSize:f,fontFamily:g,foreColor:Array.isArray(p)?k():p,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+b});if(s.add(P),P.on("click",F=>{if(typeof d.config.chart.events.xAxisLabelClick=="function"){let R=Object.assign({},d,{labelIndex:v});d.config.chart.events.xAxisLabelClick(F,this.ctx,R)}}),t){let F=O.createElementNS(et,"title");F.textContent=Array.isArray(S.text)?S.text.join(" "):S.text,P.node.appendChild(F),S.text!==""&&(c.push(S.text),h.push(S))}}v"u"?"":r[g];p=c(p,{seriesIndex:t,dataPointIndex:g,w:e});let m=this.axesUtils.getYAxisForeColor(h.style.colors,t),b=()=>Array.isArray(m)?m[g]:m,x=0;Array.isArray(p)&&(x=p.length/2*parseInt(h.style.fontSize,10));let _=h.offsetX-15,w="end";this.yaxis.opposite&&(w="start"),e.config.yaxis[0].labels.align==="left"?(_=h.offsetX,w="start"):e.config.yaxis[0].labels.align==="center"?(_=h.offsetX,w="middle"):e.config.yaxis[0].labels.align==="right"&&(w="end");let y=s.drawText({x:_,y:l+o+h.offsetY-x,text:p,textAnchor:w,foreColor:b(),fontSize:h.style.fontSize,fontFamily:h.style.fontFamily,fontWeight:h.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+h.style.cssClass,maxWidth:h.maxWidth});n.add(y),y.on("click",A=>{if(typeof e.config.chart.events.xAxisLabelClick=="function"){let S=Object.assign({},e,{labelIndex:g});e.config.chart.events.xAxisLabelClick(A,this.ctx,S)}});let v=O.createElementNS(et,"title");if(v.textContent=Array.isArray(p)?p.join(" "):p,y.node.appendChild(v),e.config.yaxis[t].labels.rotate!==0){let A=s.rotateAroundCenter(y.node);y.node.setAttribute("transform",`rotate(${e.config.yaxis[t].labels.rotate} 0 ${A.y})`)}l=l+o}if(e.config.yaxis[0].title.text!==void 0){let g=s.group({class:"apexcharts-yaxis-title apexcharts-xaxis-title-inversed",transform:"translate("+i+", 0)"}),p=s.drawText({x:e.config.yaxis[0].title.offsetX,y:e.layout.gridHeight/2+e.config.yaxis[0].title.offsetY,text:e.config.yaxis[0].title.text,textAnchor:"middle",foreColor:e.config.yaxis[0].title.style.color,fontSize:e.config.yaxis[0].title.style.fontSize,fontWeight:e.config.yaxis[0].title.style.fontWeight,fontFamily:e.config.yaxis[0].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+e.config.yaxis[0].title.style.cssClass});g.add(p),a.add(g)}let d=0;this.isCategoryBarHorizontal&&e.config.yaxis[0].opposite&&(d=e.layout.gridWidth);let f=e.config.xaxis.axisBorder;if(f.show){let g=s.drawLine(e.globals.padHorizontal+f.offsetX+d,1+f.offsetY,e.globals.padHorizontal+f.offsetX+d,e.layout.gridHeight+f.offsetY,f.color,0);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(g):a.add(g)}return e.config.yaxis[0].axisTicks.show&&this.axesUtils.drawYAxisTicks(d,r.length,e.config.yaxis[0].axisBorder,e.config.yaxis[0].axisTicks,0,o,a),a}drawXaxisTicks(t,e,s){let i=this.w,a=t;if(t<0||t-2>i.layout.gridWidth)return;let n=this.offY+i.config.xaxis.axisTicks.offsetY;if(e=e+n+i.config.xaxis.axisTicks.height,i.config.xaxis.position==="top"&&(e=n-i.config.xaxis.axisTicks.height),i.config.xaxis.axisTicks.show){let o=new B(this.w).drawLine(t+i.config.xaxis.axisTicks.offsetX,n+i.config.xaxis.offsetY,a+i.config.xaxis.axisTicks.offsetX,e+i.config.xaxis.offsetY,i.config.xaxis.axisTicks.color);s.add(o),o.node.classList.add("apexcharts-xaxis-tick")}}getXAxisTicksPositions(){let t=this.w,e=[],s=this.xaxisLabels.length,i=t.globals.padHorizontal;if(t.labelData.timescaleLabels.length>0)for(let a=0;a{a.placeTextWithEllipsis(f,f.textContent,i.layout.xAxisLabelsHeight-(i.config.legend.position==="bottom"?20:10))})}else{let c=i.layout.gridWidth/(i.labelData.labels.length+1);for(let h=0;h{a.placeTextWithEllipsis(f,f.textContent,c)})}}if(o.length>0){let c=o[o.length-1].getBBox(),h=o[0].getBBox();c.x<-20&&((t=o[o.length-1].parentNode)==null||t.removeChild(o[o.length-1])),h.x+h.width>i.layout.gridWidth&&!i.globals.isBarHorizontal&&((e=o[0].parentNode)==null||e.removeChild(o[0]));for(let d=0;d0&&(this.xaxisLabels=t.labelData.timescaleLabels.slice())}drawGridArea(t=null){let e=this.w,s=new B(this.w);t||(t=s.group({class:"apexcharts-grid"}));let i=s.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.layout.gridHeight,"transparent"),a=s.drawLine(e.globals.padHorizontal,e.layout.gridHeight,e.layout.gridWidth,e.layout.gridHeight,"transparent");return t.add(a),t.add(i),t}drawGrid(){if(this.w.globals.axisCharts){let e=this.renderGrid();return this.drawGridArea(e.el),e}return null}createGridMask(){let t=this.w,e=t.globals,s=new B(this.w),i=Array.isArray(t.config.stroke.width)?Math.max(...t.config.stroke.width):t.config.stroke.width,a=h=>{let d=O.createElementNS(et,"clipPath");return d.setAttribute("id",h),d};t.dom.elGridRectMask=a(`gridRectMask${e.cuid}`),t.dom.elGridRectBarMask=a(`gridRectBarMask${e.cuid}`),t.dom.elGridRectMarkerMask=a(`gridRectMarkerMask${e.cuid}`),t.dom.elForecastMask=a(`forecastMask${e.cuid}`),t.dom.elNonForecastMask=a(`nonForecastMask${e.cuid}`);let n=["bar","rangeBar","candlestick","boxPlot","violin"].includes(t.config.chart.type)||t.globals.comboBarCount>0,r=0,o=0;n&&t.axisFlags.isXNumeric&&!t.globals.isBarHorizontal&&(r=Math.max(t.layout.gridPad.left,e.barPadForNumericAxis),o=Math.max(t.layout.gridPad.right,e.barPadForNumericAxis)),t.dom.elGridRect=s.drawRect(-i/2-2,-i/2-2,t.layout.gridWidth+i+4,t.layout.gridHeight+i+4,0,"#fff"),t.dom.elGridRectBar=s.drawRect(-i/2-r-2,-i/2-2,t.layout.gridWidth+i+o+r+4,t.layout.gridHeight+i+4,0,"#fff");let l=t.globals.markers.largestSize;t.dom.elGridRectMarker=s.drawRect(Math.min(-i/2-r-2,-l),-l,t.layout.gridWidth+Math.max(i+o+r+4,l*2),t.layout.gridHeight+l*2,0,"#fff"),t.dom.elGridRectMask.appendChild(t.dom.elGridRect.node),t.dom.elGridRectBarMask.appendChild(t.dom.elGridRectBar.node),t.dom.elGridRectMarkerMask.appendChild(t.dom.elGridRectMarker.node);let c=t.dom.elDefs.node;c.appendChild(t.dom.elGridRectMask),c.appendChild(t.dom.elGridRectBarMask),c.appendChild(t.dom.elGridRectMarkerMask),c.appendChild(t.dom.elForecastMask),c.appendChild(t.dom.elNonForecastMask)}_drawGridLines({i:t,x1:e,y1:s,x2:i,y2:a,xCount:n,parent:r}){let o=this.w;if(!(t===0&&o.globals.skipFirstTimelinelabel||t===n-1&&o.globals.skipLastTimelinelabel&&!o.config.xaxis.labels.formatter||o.config.chart.type==="radar")){o.config.grid.xaxis.lines.show&&this._drawGridLine({i:t,x1:e,y1:s,x2:i,y2:a,xCount:n,parent:r});let c=0;if(o.labelData.hasXaxisGroups&&o.config.xaxis.tickPlacement==="between"){let d=o.labelData.groups;if(d){let f=0;for(let g=0;f{for(let d=0;di.layout.gridWidth)&&this._drawGridLines({i:d,x1:o,y1:l,x2:c,y2:h,xCount:t,parent:this.elgridLinesV})},n=({xC:r,x1:o,y1:l,x2:c,y2:h})=>{for(let d=0;d0&&i.config.xaxis.type!=="datetime"&&(l=a.yAxisScale[r].result.length-1)),this._drawXYLines({xCount:l,tickAmount:o})):(l=o,o=a.xTickAmount,this._drawInvertedXYLines({xCount:l,tickAmount:o})),this.drawGridBands(l,o),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:i.layout.gridWidth/l}}drawGridBands(t,e){var s,i,a,n,r;let o=this.w,l=(c,h,d,f,g,p)=>{for(let m=0,b=0;m=o.config.grid[c].colors.length&&(b=0),this._drawGridBandRect({c:b,x1:d,y1:f,x2:g,y2:p,type:c}),f+=o.layout.gridHeight/e};if(((s=o.config.grid.row.colors)==null?void 0:s.length)>0&&l("row",e,0,0,o.layout.gridWidth,o.layout.gridHeight/e),((i=o.config.grid.column.colors)==null?void 0:i.length)>0){let c=!o.globals.isBarHorizontal&&o.config.xaxis.tickPlacement==="on"&&(o.config.xaxis.type==="category"||o.config.xaxis.convertedCatToNumeric)?t-1:t;o.axisFlags.isXNumeric&&(c=((n=(a=o.globals.xAxisScale)==null?void 0:a.result.length)!=null?n:1)-1);let h=o.globals.padHorizontal,d=0,f=o.globals.padHorizontal+o.layout.gridWidth/c,g=o.layout.gridHeight;for(let p=0,m=0;p=o.config.grid.column.colors.length&&(m=0),o.config.xaxis.type==="datetime"&&(h=this.xaxisLabels[p].position,f=(((r=this.xaxisLabels[p+1])==null?void 0:r.position)||o.layout.gridWidth)-this.xaxisLabels[p].position),this._drawGridBandRect({c:m,x1:h,y1:d,x2:f,y2:g,type:"column"}),h+=o.layout.gridWidth/c}}},us=class{constructor(t){this.w=t,this.coreUtils=new lt(this.w)}niceScale(t,e,s=0){let a=this.w,n=a.globals,r,o,l,c;n.isBarHorizontal?(r=a.config.xaxis,o=Math.max((n.svgWidth-100)/25,2)):(r=a.config.yaxis[s],o=Math.max((n.svgHeight-100)/15,2)),T.isNumber(o)||(o=10),l=r.min!==void 0&&r.min!==null,c=r.max!==void 0&&r.max!==null;let h=r.stepSize!==void 0&&r.stepSize!==null,d=r.tickAmount!==void 0&&r.tickAmount!==null,f=d?r.tickAmount:di[Math.min(Math.round(o/2),di.length-1)];if(n.isMultipleYAxis&&!d&&n.multiAxisTickAmount>0&&(f=n.multiAxisTickAmount,d=!0),f==="dataPoints"?f=n.dataPoints-1:f=Math.abs(Math.round(f)),(t===Number.MIN_VALUE&&e===0||!T.isNumber(t)&&!T.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)&&(t=T.isNumber(r.min)?r.min:0,e=T.isNumber(r.max)?r.max:t+f,n.allSeriesCollapsed=!1),t>e){console.warn("axis.min cannot be greater than axis.max: swapping min and max");let L=e;e=t,t=L}else t===e&&(t=t===0?0:t-1,e=e===0?2:e+1);let g=[];f<1&&(f=1);let p=f,m=Math.abs(e-t),b=.15;!l&&t>0&&t/m0&&to&&(t=e-x*f,t+=x*Math.floor((L-t)/x))}else if(l)if(d)e=t+x*p;else{let L=e;e=x*Math.ceil(e/x),Math.abs(e-t)/T.getGCD(m,x)>o&&(e=t+x*f,e+=x*Math.ceil((L-e)/x))}m=Math.abs(e-t),x=T.getGCD(m,x),p=Math.round(m/x)}if(!d&&!(l||c)&&(p=Math.ceil((m-1e-11)/(x+1e-11)),p>16&&T.getPrimeFactors(p).length<2&&p++),!d&&r.forceNiceScale&&n.yValueDecimal===0&&p>m&&(p=m,x=Math.round(m/p)),p>o&&(!(d||h)||r.forceNiceScale)){let L=T.getPrimeFactors(p),E=L.length-1,D=p;t:for(var A=0;Ak);return{result:g,niceMin:g[0],niceMax:g[g.length-1]}}linearScale(t,e,s=10,i=0,a=void 0){let n=Math.abs(e-t),r=[];if(t===e)return r=[t],{result:r,niceMin:r[0],niceMax:r[r.length-1]};s=this._adjustTicksForSmallRange(s,i,n),s==="dataPoints"&&(s=this.w.globals.dataPoints-1);let o=s;a||(a=n/o);let l=2;if(a!==0&&isFinite(a)){let d=Math.floor(Math.log10(Math.abs(a))),f=Math.max(l,-d+l),g=Math.pow(10,f);a=Math.round((a+Number.EPSILON)*g)/g}let c=s===Number.MAX_VALUE?5:o;s===Number.MAX_VALUE&&(a=1);let h=t;for(;c>=0;)r.push(h),h=T.preciseAddition(h,a),c-=1;return{result:r,niceMin:r[0],niceMax:r[r.length-1]}}logarithmicScaleNice(t,e,s){e<=0&&(e=Math.max(t,s)),t<=0&&(t=Math.min(e,s));let i=[],a=Math.ceil(Math.log(e)/Math.log(s)+1),n=Math.floor(Math.log(t)/Math.log(s));for(let r=n;r"u"&&(i.yAxisScale[t]=[]);let r=Math.abs(s-e);n.logarithmic&&r<=5&&(i.invalidLogScale=!0),n.logarithmic&&r>5?(i.allSeriesCollapsed=!1,i.yAxisScale[t]=n.forceNiceScale?this.logarithmicScaleNice(e,s,n.logBase):this.logarithmicScale(e,s,n.logBase)):s===-Number.MAX_VALUE||!T.isNumber(s)||e===Number.MAX_VALUE||!T.isNumber(e)?i.yAxisScale[t]=this.niceScale(Number.MIN_VALUE,0,t):(i.allSeriesCollapsed=!1,i.yAxisScale[t]=this.niceScale(e,s,t))}setXScale(t,e){let s=this.w,i=s.globals;if(e===-Number.MAX_VALUE||!T.isNumber(e))i.xAxisScale=this.linearScale(0,10,10);else{let a=i.xTickAmount;i.xAxisScale=this.linearScale(t,e,a,0,s.config.xaxis.max===void 0?s.config.xaxis.stepSize:void 0)}return i.xAxisScale}scaleMultipleYAxes(){let t=this.w.config,e=this.w.globals;this.coreUtils.setSeriesYAxisMappings();let s=e.seriesYAxisMap,i=e.minYArr,a=e.maxYArr,n=[],r=!e.isBarHorizontal;if(e.allSeriesCollapsed=!0,e.barGroups=[],s.forEach((o,l)=>{let c=[];if(o.forEach(h=>{var d;let f=(d=t.series[h])==null?void 0:d.group;c.indexOf(f)<0&&c.push(f)}),o.length>0){let h=Number.MAX_VALUE,d=-Number.MAX_VALUE,f=h,g=d,p,m;if(t.chart.stacked){let _=new Array(e.dataPoints).fill(0),w=[],y=[],v=[];c.forEach(()=>{w.push(_.map(()=>Number.MIN_VALUE)),y.push(_.map(()=>Number.MIN_VALUE)),v.push(_.map(()=>Number.MIN_VALUE))});for(let A=0;A{if(t.series[S].group===M)for(let L=0;L=0?y[k][L]+=E:v[k][L]+=E,w[k][L]+=E,f=Math.min(f,E),g=Math.max(g,E)}})),(p==="bar"||p==="column")&&e.barGroups.push(m)}p||(p=t.chart.type),p==="bar"||p==="column"?c.forEach((A,S)=>{h=Math.min(h,Math.min.apply(null,v[S])),d=Math.max(d,Math.max.apply(null,y[S]))}):(c.forEach((A,S)=>{f=Math.min(f,Math.min.apply(null,w[S])),g=Math.max(g,Math.max.apply(null,w[S]))}),h=f,d=g),h===Number.MIN_VALUE&&d===Number.MIN_VALUE&&(d=-Number.MAX_VALUE)}else for(let _=0;_y.indexOf(_)===w);let b=t.yaxis[l];r&&b.alignZero===!0&&!b.logarithmic&&b.min===void 0&&b.max===void 0&&e.ignoreYAxisIndexes.indexOf(l)<0&&T.isNumber(h)&&T.isNumber(d)?n.push({ai:l,minY:h,maxY:d}):(this.setYScaleForIndex(l,h,d),o.forEach(_=>{i[_]=e.yAxisScale[l].niceMin,a[_]=e.yAxisScale[l].niceMax}))}else this.setYScaleForIndex(l,0,-Number.MAX_VALUE)}),n.length>=2){n.forEach(c=>{this.setYScaleForIndex(c.ai,c.minY,c.maxY),s[c.ai].forEach(h=>{i[h]=e.yAxisScale[c.ai].niceMin,a[h]=e.yAxisScale[c.ai].niceMax})});let o=0;n.forEach(c=>{let h=e.yAxisScale[c.ai],d=h.niceMax-h.niceMin;if(d>0){let f=-h.niceMin/d;f>o&&(o=f)}}),o>1&&(o=1),o<0&&(o=0);let l=c=>{if(c<=0)return 1;let h=Math.floor(Math.log10(c)),d=Math.pow(10,h),f=c/d,g;return f<=1+1e-9?g=1:f<=2+1e-9?g=2:f<=2.5+1e-9?g=2.5:f<=5+1e-9?g=5:g=10,g*d};n.forEach(c=>{let h=e.yAxisScale[c.ai];if(!h.result||h.result.length<2)return;let d=h.niceMax-h.niceMin;if(d<=0)return;let f=-h.niceMin/d;if(Math.abs(f-o)<=1e-9)return;let g=fo&&o>1e-9;if(!g&&!p)return;let m=g?-o*h.niceMax/(1-o):h.niceMin,b=p?-h.niceMin*(1-o)/o:h.niceMax,x=b-m;if(x<=0)return;let _=Math.max(h.result.length,5),w=l(x/Math.max(_-1,1));if(w<=0)return;let y,v;if(g){y=Math.floor(m/w+1e-9)*w;let A=o>1e-9?y*(o-1)/o:h.niceMax,S=Math.max(A,h.niceMax);v=Math.ceil(S/w-1e-9)*w}else{v=Math.ceil(b/w-1e-9)*w;let A=o<1-1e-9?-o*v/(1-o):h.niceMin,S=Math.min(A,h.niceMin);y=Math.floor(S/w+1e-9)*w}h.result=[];for(let A=y;A<=v+w*1e-9;A=T.preciseAddition(A,w))h.result.push(T.stripNumber(A,7));h.niceMin=y,h.niceMax=v,s[c.ai].forEach(A=>{i[A]=h.niceMin,a[A]=h.niceMax})})}else if(n.length===1){let o=n[0];this.setYScaleForIndex(o.ai,o.minY,o.maxY),s[o.ai].forEach(l=>{i[l]=e.yAxisScale[o.ai].niceMin,a[l]=e.yAxisScale[o.ai].niceMax})}}},Oe=class{constructor(t){this.w=t,this.scales=new us(this.w)}init(){this.setYRange(),this.setXRange(),this.setZRange()}_xPixelTolerance(t){let e=this.w.layout.gridWidth;if(!e||!t||!t.length)return 0;let s=this.w.config.xaxis,i=typeof s.min=="number"?s.min:t[0],a=typeof s.max=="number"?s.max:t[t.length-1];return a>i?(a-i)/e:0}getMinYMaxY(t,e=Number.MAX_VALUE,s=-Number.MAX_VALUE,i=null){var a,n,r,o,l,c,h,d,f;let g=this.w.config,p=this.w.globals,m=-Number.MAX_VALUE,b=Number.MIN_VALUE;i===null&&(i=t+1);let x=this.w.seriesData.series,_=x,w=x;g.chart.type==="candlestick"?(_=this.w.candleData.seriesCandleL,w=this.w.candleData.seriesCandleH):g.chart.type==="boxPlot"?(_=this.w.candleData.seriesCandleO,w=this.w.candleData.seriesCandleC):g.chart.type==="violin"?(_=this.w.violinData.seriesViolinMin,w=this.w.violinData.seriesViolinMax):this.w.axisFlags.isRangeData&&(_=this.w.rangeData.seriesRangeStart,w=this.w.rangeData.seriesRangeEnd);let y=!1;if(this.w.seriesData.seriesX.length>=i){let v=(a=p.brushSource)==null?void 0:a.w.config.chart.brush;(g.chart.zoom.enabled&&g.chart.zoom.autoScaleYaxis||v?.enabled&&v?.autoScaleYaxis)&&(y=!0)}for(let v=t;vtypeof k<"u").length),this.w.labelData.labels.length&&g.xaxis.type!=="datetime"&&this.w.seriesData.series.reduce((k,L)=>k+L.length,0)!==0&&(p.dataPoints=Math.max(p.dataPoints,this.w.labelData.labels.length));let S=0,C=x[v].length-1;if(y){let k=this._xPixelTolerance(this.w.seriesData.seriesX[v]);if(g.xaxis.min){let L=g.xaxis.min-k;for(;SS&&this.w.seriesData.seriesX[v][C]>L;C--);}}if(_===x&&w===x&&g.chart.type!=="boxPlot"&&A!=="candlestick"&&A!=="boxPlot"&&A!=="violin"&&A!=="rangeArea"&&A!=="rangeBar"&&!(this.w.seriesData.seriesGoals[v]&&this.w.seriesData.seriesGoals[v].length)){let k=x[v],L=Math.min(C,k.length-1),E=(n=this.w.seriesData._parsedExtrema)==null?void 0:n[v];if(E&&E.ref===k&&E.len===k.length&&S===0&&L===k.length-1)E.maxY>m&&(m=E.maxY),E.lowestYp.yValueDecimal&&(p.yValueDecimal=E.yDec),E.hasNulls&&(p.hasNullValues=!0);else{let D=p.yValueDecimal,P=!1;for(let F=S;F<=L;F++){let R=k[F];if(R!==null&&typeof R=="number"&&R===R&&R!==1/0&&R!==-1/0){if(R>m&&(m=R),RR&&R<0&&(b=R),!Number.isInteger(R)){let N=R<0?-R:R;if(N>=1e-6&&N<1e21){let z=""+R,$=z.indexOf("."),W=$===-1?0:z.length-$-1;W>D&&(D=W)}else{let z=T.noExponents(R);T.isFloat(z)&&(D=Math.max(D,z.toString().split(".")[1].length))}}}else P=!0}p.yValueDecimal=D,P&&(p.hasNullValues=!0)}s=m,(A==="bar"||A==="column")&&(b<0&&m<0&&(m=0,s=Math.max(s,0)),b===Number.MIN_VALUE&&(b=0,e=Math.min(e,0)));continue}for(let k=S;k<=C&&k{m=Math.max(m,E.value),e=Math.min(e,E.value)}),this.w.config.chart.type==="boxPlot"||A==="boxPlot"){let E=(h=(c=this.w.candleData.seriesBoxPoints)==null?void 0:c[v])==null?void 0:h[k];if(E)for(let D=0;D((d=_[v])==null?void 0:d[k])&&((f=_[v])==null?void 0:f[k])<0&&(b=_[v][k])}else p.hasNullValues=!0}(A==="bar"||A==="column")&&(b<0&&m<0&&(m=0,s=Math.max(s,0)),b===Number.MIN_VALUE&&(b=0,e=Math.min(e,0)))}return g.chart.type==="rangeBar"&&this.w.rangeData.seriesRangeStart.length&&p.isBarHorizontal&&(b=e),g.chart.type==="bar"&&(b<0&&m<0&&(m=0),b===Number.MIN_VALUE&&(b=0)),{minY:b,maxY:m,lowestY:e,highestY:s}}setYRange(){let t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;let s=Number.MAX_VALUE,i;if(t.isMultipleYAxis){s=Number.MAX_VALUE;for(let a=0;a{a.max!==void 0&&(typeof a.max=="number"?t.maxYArr[n]=a.max:typeof a.max=="function"&&(t.maxYArr[n]=a.max(t.isMultipleYAxis?t.maxYArr[n]:t.maxY)),t.maxY=t.maxYArr[n]),a.min!==void 0&&(typeof a.min=="number"?t.minYArr[n]=a.min:typeof a.min=="function"&&(t.minYArr[n]=a.min(t.isMultipleYAxis?t.minYArr[n]===Number.MIN_VALUE?0:t.minYArr[n]:t.minY)),t.minY=t.minYArr[n])}),t.isBarHorizontal&&["min","max"].forEach(n=>{e.xaxis[n]!==void 0&&typeof e.xaxis[n]=="number"&&(n==="min"?t.minY=e.xaxis[n]:t.maxY=e.xaxis[n])}),t.isMultipleYAxis?(this.scales.scaleMultipleYAxes(),t.minY=s):(this.scales.setYScaleForIndex(0,t.minY,t.maxY),t.minY=t.yAxisScale[0].niceMin,t.maxY=t.yAxisScale[0].niceMax,t.minYArr[0]=t.minY,t.maxYArr[0]=t.maxY),t.barGroups=[],t.lineGroups=[],t.areaGroups=[],e.series.forEach(a=>{let n=a;switch(n.type||e.chart.type){case"bar":case"column":t.barGroups.push(n.group);break;case"line":t.lineGroups.push(n.group);break;case"area":t.areaGroups.push(n.group);break}}),t.barGroups=t.barGroups.filter((a,n,r)=>r.indexOf(a)===n),t.lineGroups=t.lineGroups.filter((a,n,r)=>r.indexOf(a)===n),t.areaGroups=t.areaGroups.filter((a,n,r)=>r.indexOf(a)===n),{minY:t.minY,maxY:t.maxY,minYArr:t.minYArr,maxYArr:t.maxYArr,yAxisScale:t.yAxisScale}}setXRange(){let t=this.w.globals,e=this.w.config,s=e.xaxis.type==="numeric"||e.xaxis.type==="datetime"||e.xaxis.type==="category"&&!this.w.axisFlags.noLabelsProvided||this.w.axisFlags.noLabelsProvided||this.w.axisFlags.isXNumeric,i=()=>{var a;let n=t.minX,r=t.maxX;for(let o=0;or&&(r=c.maxX),c.minXr&&(r=d),dt.dataPoints&&t.dataPoints!==0&&(a=t.dataPoints-1);else if(e.xaxis.tickAmount==="dataPoints"){if(this.w.seriesData.series.length>1&&(a=this.w.seriesData.series[t.maxValsInArrayIndex].length-1),this.w.axisFlags.isXNumeric){let n=Math.round(t.maxX-t.minX);n<30&&(a=n)}}else a=e.xaxis.tickAmount;if(t.xTickAmount=a,e.xaxis.max!==void 0&&typeof e.xaxis.max=="number"&&(t.maxX=e.xaxis.max),e.xaxis.min!==void 0&&typeof e.xaxis.min=="number"&&(t.minX=e.xaxis.min),e.xaxis.range!==void 0&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!this.w.axisFlags.dataFormatXNumeric){let n=[];for(let r=t.minX-1;r0&&(t.xAxisScale=this.scales.linearScale(1,this.w.labelData.labels.length,a-1,0,e.xaxis.stepSize),this.w.seriesData.seriesX=this.w.labelData.labels.slice());s&&(this.w.labelData.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&this.w.labelData.labels.length&&(t.xTickAmount=this.w.labelData.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}setZRange(){let t=this.w.globals;if(this.w.axisFlags.isDataXYZ){for(let e=0;e{var i;if(e.length){e.length===1&&e.push(this.w.seriesData.seriesX[t.maxValsInArrayIndex][this.w.seriesData.seriesX[t.maxValsInArrayIndex].length-1]);let a=(i=this.w.seriesData._parsedExtrema)==null?void 0:i[s];if(a&&a.xNumeric&&a.xSorted&&a.xref===e&&a.len===e.length){a.minXDiff0)cl-c),o.forEach((l,c)=>{if(c>0){let h=l-o[c-1];h>0&&(t.minXDiff=Math.min(h,t.minXDiff))}}),(t.dataPoints===1||t.minXDiff===Number.MAX_VALUE)&&(t.minXDiff=.5)}})}_setStackedMinMax(){let t=this.w.globals;if(!this.w.seriesData.series.length)return;let e=this.w.labelData.seriesGroups;e.length||(e=[this.w.seriesData.seriesNames.map(a=>a)]);let s={},i={};e.forEach(a=>{s[a]=[],i[a]=[],this.w.config.series.map((r,o)=>a.indexOf(this.w.seriesData.seriesNames[o])>-1?o:null).filter(r=>r!==null).forEach(r=>{var o,l,c,h;for(let d=0;d"u"&&(s[a][d]=0,i[a][d]=0),(this.w.config.chart.stacked&&!t.comboCharts||this.w.config.chart.stacked&&t.comboCharts&&(!this.w.config.chart.stackOnlyBar||((l=(o=this.w.config.series)==null?void 0:o[r])==null?void 0:l.type)==="bar"||((h=(c=this.w.config.series)==null?void 0:c[r])==null?void 0:h.type)==="column"))&&this.w.seriesData.series[r][d]!==null&&T.isNumber(this.w.seriesData.series[r][d])&&(this.w.seriesData.series[r][d]>0?s[a][d]+=parseFloat(String(this.w.seriesData.series[r][d]))+1e-4:i[a][d]+=parseFloat(String(this.w.seriesData.series[r][d])))})}),Object.entries(s).forEach(([a])=>{s[a].forEach((n,r)=>{t.maxY=Math.max(t.maxY,s[a][r]),t.minY=Math.min(t.minY,i[a][r])})})}};function mi(){return{palette1:["#008FFB","#00A86F","#CA8501","#FF4560","#846DD5"],palette2:["#6978CB","#039DE2","#49A84D","#B39105","#D68000"],palette3:["#209FCC","#648291","#D4526E","#0FA783","#A19285"],palette4:["#2FA59D","#73A20B","#099DE1","#FD5D5D","#648291"],palette5:["#2B908F","#F56566","#2EAB16","#FA4443","#1EA2BD"],palette6:["#449DD1","#F86624","#EA3A4A","#9C63D1","#899E2A"],palette7:["#DF475B","#1B998B","#7E75B7","#F46036","#B1911B"],palette8:["#9C63D1","#F86624","#B38F04","#EA3A4A","#2FA2B3"],palette9:["#98776F","#A19285","#A8705E","#BA6560","#A0927F"],palette10:["#C91EFF","#A94BFD","#6C6AFE","#2983FF","#009ED8"],cvdDeuteranopia:["#0072B2","#E69F00","#56B4E9","#009E73","#F0E442","#D55E00","#CC79A7"],cvdProtanopia:["#0077BB","#EE7733","#009988","#EE3377","#BBBBBB","#33BBEE","#CC3311"],cvdTritanopia:["#CC3311","#009988","#EE7733","#0077BB","#EE3377","#BBBBBB","#33BBEE"],highContrast:["#005A9C","#C00000","#007A33","#6C3483","#7B3F00","#0097A7","#4A235A"]}}var be=class{constructor(t,{theme:e=null,timeScale:s=null}={},i){this.w=t,this.elgrid=i,this.xaxisFontSize=t.config.xaxis.labels.style.fontSize,this.axisFontFamily=t.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=t.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal=t.config.chart.type==="bar"&&t.config.plotOptions.bar.horizontal,this.xAxisoffX=t.config.xaxis.position==="bottom"?t.layout.gridHeight:0,this.drawnLabels=[],this.axesUtils=new Ct(t,{theme:e,timeScale:s})}drawYaxis(t){let e=this.w,s=new B(this.w),i=e.config.yaxis[t].labels.style,{fontSize:a,fontFamily:n,fontWeight:r}=i,o=s.group({class:"apexcharts-yaxis",rel:t,transform:`translate(${e.globals.translateYAxisX[t]}, 0)`});if(this.axesUtils.isYAxisHidden(t))return o;let l=s.group({class:"apexcharts-yaxis-texts-g"});o.add(l);let c=e.globals.yAxisScale[t].result.length-1,h=e.layout.gridHeight/c,d=e.formatters.yLabelFormatters[t],f=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice()),g=1;if(e.config.chart.type==="heatmap"&&!e.config.yaxis[t].labels.formatter){let p=parseInt(a,10)||11,m=Math.max(1,Math.floor(e.layout.gridHeight/(p*1.4))),b=c+1;b>m&&(g=Math.ceil(b/m))}if(e.config.yaxis[t].labels.show){let p=e.layout.translateY+e.config.yaxis[t].labels.offsetY;e.globals.isBarHorizontal?p=0:e.config.chart.type==="heatmap"&&(p-=h/2),p+=parseInt(a,10)/3;let m=null;for(let b=c;b>=0;b--){let _=g>1&&b%g!==0?"":d(f[b],b,e),w=e.config.yaxis[t].labels.padding;e.config.yaxis[t].opposite&&e.config.yaxis.length!==0&&(w*=-1);let y=this.getTextAnchor(e.config.yaxis[t].labels.align,e.config.yaxis[t].opposite),v=this.axesUtils.getYAxisForeColor(i.colors,t),A=Array.isArray(v)?v[b]:v,S=Array.from(e.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-label tspan`)).map(M=>M.textContent),C=s.drawText({x:w,y:p,text:S.includes(_)&&!e.config.yaxis[t].labels.showDuplicates?"":_,textAnchor:y,fontSize:a,fontFamily:n,fontWeight:r,maxWidth:e.config.yaxis[t].labels.maxWidth,foreColor:A,isPlainText:!1,cssClass:`apexcharts-yaxis-label ${i.cssClass}`});l.add(C),this.addTooltip(C,_),m===null&&(m=C),e.config.yaxis[t].labels.rotate!==0&&this.rotateLabel(s,C,m,e.config.yaxis[t].labels.rotate),p+=h}}return this.addYAxisTitle(s,o,t),this.addAxisBorder(s,o,t,c,h),o}getTextAnchor(t,e){return t==="left"?"start":t==="center"?"middle":t==="right"?"end":e?"start":"end"}addTooltip(t,e){let s=O.createElementNS(et,"title");s.textContent=Array.isArray(e)?e.join(" "):e,t.node.appendChild(s)}rotateLabel(t,e,s,i){let a=t.rotateAroundCenter(s.node),n=t.rotateAroundCenter(e.node);e.node.setAttribute("transform",`rotate(${i} ${a.x} ${n.y})`)}addYAxisTitle(t,e,s){let i=this.w;if(i.config.yaxis[s].title.text!==void 0){let a=t.group({class:"apexcharts-yaxis-title"}),n=i.config.yaxis[s].opposite?i.globals.translateYAxisX[s]:0,r=t.drawText({x:n,y:i.layout.gridHeight/2+i.layout.translateY+i.config.yaxis[s].title.offsetY,text:i.config.yaxis[s].title.text,textAnchor:"end",foreColor:i.config.yaxis[s].title.style.color,fontSize:i.config.yaxis[s].title.style.fontSize,fontWeight:i.config.yaxis[s].title.style.fontWeight,fontFamily:i.config.yaxis[s].title.style.fontFamily,cssClass:`apexcharts-yaxis-title-text ${i.config.yaxis[s].title.style.cssClass}`});a.add(r),e.add(a)}}addAxisBorder(t,e,s,i,a){let n=this.w,r=n.config.yaxis[s].axisBorder,o=31+r.offsetX;if(n.config.yaxis[s].opposite&&(o=-31-r.offsetX),r.show){let l=t.drawLine(o,n.layout.translateY+r.offsetY-2,o,n.layout.gridHeight+n.layout.translateY+r.offsetY+2,r.color,0,r.width);e.add(l)}n.config.yaxis[s].axisTicks.show&&this.axesUtils.drawYAxisTicks(o,i,r,n.config.yaxis[s].axisTicks,s,a,e)}drawYaxisInversed(t){let e=this.w,s=new B(this.w),i=s.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),a=s.group({class:"apexcharts-xaxis-texts-g",transform:`translate(${e.layout.translateXAxisX}, ${e.layout.translateXAxisY})`});i.add(a);let n=e.globals.yAxisScale[t].result.length-1,r=e.layout.gridWidth/n+.1,o=r+e.config.xaxis.labels.offsetX,l=e.formatters.xLabelFormatter,c=this.axesUtils.checkForReversedLabels(t,e.globals.yAxisScale[t].result.slice()),h=e.labelData.timescaleLabels;if(h.length>0&&(this.xaxisLabels=h.slice(),c=h.slice(),n=c.length),e.config.xaxis.labels.show)for(let d=h.length?0:n;h.length?d=0;h.length?d++:d--){let f=l?.(c[d],d,e),g=e.layout.gridWidth+e.globals.padHorizontal-(o-r+e.config.xaxis.labels.offsetX);if(h.length){let m=this.axesUtils.getLabel(c,h,g,d,this.drawnLabels,this.xaxisFontSize);g=m.x,f=m.text,this.drawnLabels.push(m.text),d===0&&e.globals.skipFirstTimelinelabel&&(f=""),d===c.length-1&&e.globals.skipLastTimelinelabel&&(f="")}let p=s.drawText({x:g,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-(e.config.xaxis.position==="top"?e.layout.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:f,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.axisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:`apexcharts-xaxis-label ${e.config.xaxis.labels.style.cssClass}`});a.add(p),this.addTooltip(p,f),o+=r}return this.inversedYAxisTitleText(i),this.inversedYAxisBorder(i),i}inversedYAxisBorder(t){let e=this.w,s=new B(this.w),i=e.config.xaxis.axisBorder;if(i.show){let a=0;e.config.chart.type==="bar"&&e.axisFlags.isXNumeric&&(a-=15);let n=s.drawLine(e.globals.padHorizontal+a+i.offsetX,this.xAxisoffX,e.layout.gridWidth,this.xAxisoffX,i.color,0,i.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(n):t.add(n)}}inversedYAxisTitleText(t){let e=this.w,s=new B(this.w);if(e.config.xaxis.title.text!==void 0){let i=s.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),a=s.drawText({x:e.layout.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:`apexcharts-xaxis-title-text ${e.config.xaxis.title.style.cssClass}`});i.add(a),t.add(i)}}yAxisTitleRotate(t,e){let s=this.w,i=new B(this.w),a=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-texts-g`),n=a?a.getBoundingClientRect():{width:0,height:0},r=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${t}'] .apexcharts-yaxis-title text`),o=r?r.getBoundingClientRect():{width:0,height:0};if(r){let l=this.xPaddingForYAxisTitle(t,n,o,e);r.setAttribute("x",String(l.xPos-(e?10:0)));let c=i.rotateAroundCenter(r);r.setAttribute("transform",`rotate(${e?s.config.yaxis[t].title.rotate*-1:s.config.yaxis[t].title.rotate} ${c.x} ${c.y})`)}}xPaddingForYAxisTitle(t,e,s,i){let a=this.w,n=0,r=10;return a.config.yaxis[t].title.text===void 0||t<0?{xPos:n,padd:0}:(i?n=e.width+a.config.yaxis[t].title.offsetX+s.width/2+r/2:(n=e.width*-1+a.config.yaxis[t].title.offsetX+r/2+s.width/2,a.globals.isBarHorizontal&&(r=25,n=e.width*-1-a.config.yaxis[t].title.offsetX-r)),{xPos:n,padd:r})}setYAxisXPosition(t,e){let s=this.w,i=0,a=0,n=18,r=1;s.config.yaxis.length>1&&(this.multipleYs=!0),s.config.yaxis.forEach((o,l)=>{let c=s.globals.ignoreYAxisIndexes.includes(l)||!o.show||o.floating||t[l].width===0,h=t[l].width+e[l].width;o.opposite?s.globals.isBarHorizontal?(a=s.layout.gridWidth+s.layout.translateX-1,s.globals.translateYAxisX[l]=a-o.labels.offsetX):(a=s.layout.gridWidth+s.layout.translateX+r,c||(r+=h+20),s.globals.translateYAxisX[l]=a-o.labels.offsetX+20):(i=s.layout.translateX-n,c||(n+=h+20),s.globals.translateYAxisX[l]=i+o.labels.offsetX)})}setYAxisTextAlignments(){let t=this.w;Array.from(t.dom.baseEl.getElementsByClassName("apexcharts-yaxis")).forEach((s,i)=>{let a=t.config.yaxis[i];if(a&&!a.floating&&a.labels.align!==void 0){let n=t.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${i}'] .apexcharts-yaxis-texts-g`),r=Array.from(t.dom.baseEl.querySelectorAll(`.apexcharts-yaxis[rel='${i}'] .apexcharts-yaxis-label`)),o=n.getBoundingClientRect();r.forEach(l=>{l.setAttribute("text-anchor",a.labels.align)}),a.labels.align==="left"&&!a.opposite?n.setAttribute("transform",`translate(-${o.width}, 0)`):a.labels.align==="center"?n.setAttribute("transform",`translate(${o.width/2*(a.opposite?1:-1)}, 0)`):a.labels.align==="right"&&a.opposite&&n.setAttribute("transform",`translate(${o.width}, 0)`)}})}},xi=class{constructor(t,e){this.w=t,this.ctx=e,this.documentEvent=this.documentEvent.bind(this)}addEventListener(t,e){let s=this.w;Object.prototype.hasOwnProperty.call(s.globals.events,t)?s.globals.events[t].push(e):s.globals.events[t]=[e]}removeEventListener(t,e){let s=this.w;if(!Object.prototype.hasOwnProperty.call(s.globals.events,t))return;let i=s.globals.events[t].indexOf(e);i!==-1&&s.globals.events[t].splice(i,1)}fireEvent(t,e){let s=this.w;if(!Object.prototype.hasOwnProperty.call(s.globals.events,t))return;(!e||!e.length)&&(e=[]);let i=s.globals.events[t],a=i.length;for(let n=0;n{s?.addEventListener(i,a=>{let n=a.target.getAttribute("i")===null&&t.interact.capturedSeriesIndex!==-1?t.interact.capturedSeriesIndex:a.target.getAttribute("i"),r=a.target.getAttribute("j")===null&&t.interact.capturedDataPointIndex!==-1?t.interact.capturedDataPointIndex:a.target.getAttribute("j"),o=Object.assign({},t,{seriesIndex:t.globals.axisCharts?n:0,dataPointIndex:r});a.type==="keydown"?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&(e.ctx.keyboardNavigation&&e.ctx.keyboardNavigation.handleKey(a),typeof t.config.chart.events.keyDown=="function"&&t.config.chart.events.keyDown(a,e,o),e.ctx.events.fireEvent("keydown",[a,e,o])):a.type==="keyup"?t.config.chart.accessibility.enabled&&t.config.chart.accessibility.keyboard.enabled&&(typeof t.config.chart.events.keyUp=="function"&&t.config.chart.events.keyUp(a,e,o),e.ctx.events.fireEvent("keyup",[a,e,o])):a.type==="mousemove"||a.type==="touchmove"?typeof t.config.chart.events.mouseMove=="function"&&t.config.chart.events.mouseMove(a,e,o):a.type==="mouseleave"||a.type==="touchleave"?typeof t.config.chart.events.mouseLeave=="function"&&t.config.chart.events.mouseLeave(a,e,o):(a.type==="mouseup"&&a.which===1||a.type==="touchend")&&(typeof t.config.chart.events.click=="function"&&t.config.chart.events.click(a,e,o),e.ctx.events.fireEvent("click",[a,e,o]))},{capture:!1,passive:!0})}),this.ctx.eventList.forEach(i=>{t.dom.baseEl.addEventListener(i,this.documentEvent,{passive:!0})}),this.ctx.core.setupBrushHandler()}documentEvent(t){let e=this.w,s=t.target.className;if(t.type==="click"){let i=e.dom.baseEl.querySelector(".apexcharts-menu");i&&i.classList.contains("apexcharts-menu-open")&&s!=="apexcharts-menu-icon"&&i.classList.remove("apexcharts-menu-open")}e.interact.clientX=t.type==="touchmove"?t.touches[0].clientX:t.clientX,e.interact.clientY=t.type==="touchmove"?t.touches[0].clientY:t.clientY}},bi=class{constructor(t){this.w=t}setCurrentLocaleValues(t){let e=this.w.config.chart.locales,s=H.getApex();s.chart&&s.chart.locales&&s.chart.locales.length>0&&(e=this.w.config.chart.locales.concat(s.chart.locales));let i=e.filter(a=>a.name===t)[0];if(i){let a=T.extend(Ar,i);this.w.globals.locale=a.options}else throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options")}},yi=class{constructor(t,e){this.w=t,this.ctx=e}drawAxis(t,e){let s=this.w.globals,i=this.w.config,a=new Wt(this.w,this.ctx,e),n=new be(this.w,{theme:this.ctx.theme,timeScale:this.ctx.timeScale},e);if(s.axisCharts&&t!=="radar"){let r,o;s.isBarHorizontal?(o=n.drawYaxisInversed(0),r=a.drawXaxisInversed(0),this.w.dom.elGraphical.add(r),this.w.dom.elGraphical.add(o)):(r=a.drawXaxis(),this.w.dom.elGraphical.add(r),i.yaxis.map((l,c)=>{if(s.ignoreYAxisIndexes.indexOf(c)===-1&&(o=n.drawYaxis(c),this.w.dom.Paper.add(o),this.w.config.grid.position==="back")){let h=this.w.dom.Paper.children()[1];h&&(h.remove(),this.w.dom.Paper.add(h))}}))}}},Be=class{constructor(t){this.w=t}drawXCrosshairs(){let t=this.w;t.dom.elGraphical.node.querySelectorAll(":scope > .apexcharts-xcrosshairs").forEach(w=>w.remove());let e=new B(this.w),s=new at(this.w),i=t.config.xaxis.crosshairs.fill.gradient,a=t.config.xaxis.crosshairs.dropShadow,n=t.config.xaxis.crosshairs.fill.type,r=i.colorFrom,o=i.colorTo,l=i.opacityFrom,c=i.opacityTo,h=i.stops,d="none",f=a.enabled,g=a.left,p=a.top,m=a.blur,b=a.color,x=a.opacity,_=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){n==="gradient"&&(_=e.drawGradient("vertical",r,o,l,c,null,h,[]));let w=t.config.xaxis.crosshairs.width===1?e.drawLine(0,0,0,0):e.drawRect(),y=t.layout.gridHeight;(!T.isNumber(y)||y<0)&&(y=0);let v=t.config.xaxis.crosshairs.width;(!T.isNumber(v)||Number(v)<0)&&(v=0),w.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:y,width:v,height:y,fill:_,filter:d,"fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),f&&(w=s.dropShadow(w,{left:g,top:p,blur:m,color:b,opacity:x})),t.dom.elGraphical.add(w)}}drawYCrosshairs(){let t=this.w;t.dom.elGraphical.node.querySelectorAll(":scope > .apexcharts-ycrosshairs, :scope > .apexcharts-ycrosshairs-hidden").forEach(n=>n.remove());let e=new B(this.w),s=t.config.yaxis[0].crosshairs,i=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){let n=e.drawLine(-i,0,t.layout.gridWidth+i,0,s.stroke.color,s.stroke.dashArray,s.stroke.width);n.attr({class:"apexcharts-ycrosshairs"}),t.dom.elGraphical.add(n)}let a=e.drawLine(-i,0,t.layout.gridWidth+i,0,s.stroke.color,0,0);a.attr({class:"apexcharts-ycrosshairs-hidden"}),t.dom.elGraphical.add(a)}};function Dr(u,t){if(!T.isObject(u)||!T.isObject(t))return t!==void 0?t:u;let e=G({},u);for(let s of Object.keys(t)){let i=t[s];i!==void 0&&(T.isObject(i)&&T.isObject(u[s])?e[s]=Dr(u[s],i):e[s]=i)}return e}var wi=class{constructor(t){this.w=t,this._activeBreakpoint=null}checkResponsiveConfig(t){let e=this.w,s=e.config;if(s.responsive.length===0)return;let i=s.responsive.slice();i.sort((r,o)=>r.breakpoint>o.breakpoint?1:o.breakpoint>r.breakpoint?-1:0).reverse();let a=new se({}),n=(r={})=>{var o;let l=i[0].breakpoint,c=H.isBrowser()?window.innerWidth>0?window.innerWidth:screen.width:0;if(c>l){if(this._activeBreakpoint!==null){if(!e.globals.initialConfig)return;let h=T.clone(e.globals.initialConfig);h.series=T.clone(e.config.series);let d=lt.extendArrayProps(a,h,e);r=T.extend(d,r),this.overrideResponsiveOptions(r),this._activeBreakpoint=null}}else for(let h=0;hDr(g,f[p]))})}this.overrideResponsiveOptions(r),this._activeBreakpoint=i[h].breakpoint}};if(t){let r=lt.extendArrayProps(a,t,e);r=T.extend(e.config,r),r=T.extend(r,t),n(r)}else n({})}overrideResponsiveOptions(t){let e=new se(t).init({responsiveOverride:!0});this.w.config=e}};function _l(u){var t,e,s;let i=u.globals;if(!i.axisCharts||!u.seriesData||!Array.isArray(u.seriesData.series)||u.seriesData.series.length===0){i.prevStreamFrame=null;return}let a=[];(e=(t=u.dom)==null?void 0:t.baseEl)!=null&&e.querySelectorAll&&u.dom.baseEl.querySelectorAll(".apexcharts-marker").forEach(n=>{var r,o,l,c,h;let d=parseInt((r=n.getAttribute("index"))!=null?r:"",10),f=parseInt((l=(o=n.getAttribute("j"))!=null?o:n.getAttribute("rel"))!=null?l:"",10),g=parseFloat((h=(c=n.getAttribute("r"))!=null?c:n.getAttribute("default-marker-size"))!=null?h:"");isFinite(d)&&isFinite(f)&&isFinite(g)&&((a[d]=a[d]||[])[f]=g)}),i.prevStreamFrame={seriesX:(u.seriesData.seriesX||[]).slice(),seriesY:u.seriesData.series.slice(),xPixels:(i.seriesXvalues||[]).slice(),yPixels:(i.seriesYvalues||[]).slice(),rPixels:a,labels:(i.labels||[]).slice(),isXNumeric:!!((s=u.axisFlags)!=null&&s.isXNumeric)}}function Al(u,t,e,s){var i;let a=u.globals,n=a.prevStreamFrame;if(!n||!a.dataChanged||!((i=u.axisFlags)!=null&&i.isXNumeric))return null;let r=n.seriesX[t],o=n.seriesY[t],l=u.seriesData.seriesX[t],c=u.seriesData.series[t];if(!r||!o||!l||!c||r.length<3||l.length<3)return null;let h=-1;for(let P=0;P.02||Math.abs(A)<.5)return null;let S=m,C=m;for(let P=m;P<=b;P++){let F=s[P];F==null||p[h+P]==null||(Fs[C]&&(C=P))}let M=1,k=0,L=s[S],E=s[C];if(Math.abs(E-L)>1e-6?(M=(p[h+C]-p[h+S])/(E-L),k=p[h+S]-M*L):k=p[h+S]-L,!isFinite(M)||!isFinite(k)||M<.2||M>5)return null;let D=Math.floor((m+b)/2);if(D!==m&&D!==b&&e[D]!=null&&g[h+D]!=null){let P=v*e[D]+A;if(Math.abs(P-g[h+D])>1.5)return null;if(s[D]!=null&&p[h+D]!=null){let F=M*s[D]+k;if(Math.abs(F-p[h+D])>1.5)return null}}return{ax:v,bx:A,ay:M,by:k}}var Sl=/[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?/gi;function vn(u,t){let{ax:e,bx:s,ay:i,by:a}=t,n=[],r=/([MmLlHhVvCcSsQqTtAaZz])([^MmLlHhVvCcSsQqTtAaZz]*)/g,o;for(;(o=r.exec(u))!==null;){let l=o[1].toUpperCase(),c=(o[2].match(Sl)||[]).map(parseFloat);if(l==="Z"){n.push("z");continue}if(l==="H"){for(let d of c)n.push(`H ${e*d+s}`);continue}if(l==="V"){for(let d of c)n.push(`V ${i*d+a}`);continue}if(l==="A"){for(let d=0;d+6n==null?null:Array.isArray(n)?typeof n[0]=="number"?n[0]:null:typeof n=="object"&&typeof n.x=="number"?n.x:null;u.forEach(n=>{var r;let o=n?.data;if(!Array.isArray(o)||o.length<2)return;if(typeof s=="number"&&s>0){o.length>s&&(n.data=o.slice(o.length-s));return}if(!i)return;let l=a(o[o.length-1]),c=a(o[0]);if(l==null||c==null||l<=c)return;let h=(l-c)/(o.length-1),d=l-i-2*h,f=0;for(;f0&&(n.data=o.slice(f))})}function kl(u,t){let e=new Set(u.exits),s=[],i=0;for(let a=0;ao[0]==="C"?[Number(o[5]),Number(o[6])]:[Number(o[1]),Number(o[2])]);for(let o of r)if(!isFinite(o[0])||!isFinite(o[1]))return null;return{body:i,closing:a,segType:n,anchors:r}}function jt(u,t,e){return[u[0]+(t[0]-u[0])*e,u[1]+(t[1]-u[1])*e]}function Ml(u,t,e){let s=u,i=[t[1],t[2]],a=[t[3],t[4]],n=[t[5],t[6]],r=jt(s,i,e),o=jt(i,a,e),l=jt(a,n,e),c=jt(r,o,e),h=jt(o,l,e),d=jt(c,h,e);return{first:["C",r[0],r[1],c[0],c[1],d[0],d[1]],second:["C",h[0],h[1],l[0],l[1],n[0],n[1]],mid:d}}function Ll(u,t,e){let s=[t[1],t[2]],i=jt(u,s,e);return{first:["L",i[0],i[1]],second:["L",s[0],s[1]],mid:i}}function An(u,t){let{body:e,closing:s,segType:i,anchors:a}=u,n=a.length,r=t.length,o=d=>i==="C"?["C",d[0],d[1],d[0],d[1],d[0],d[1]]:["L",d[0],d[1]],l=[["M",a[0][0],a[0][1]]],c=0;for(;cl.push(d.slice())),l}function Sn(u,t,e,s,i,a){let n=_n(u,s,a);if(!n)return null;let r=_n(t,i,a);if(!r||n.segType!==r.segType||(n.closing||r.closing)&&(!n.closing||!r.closing||n.closing[0][0]!==r.closing[0][0]))return null;let o=e.map(c=>c.oldJ),l=e.map(c=>c.newJ);return{from:gi(An(n,o)),toInterp:gi(An(r,l))}}function te(u){var t;let e=u.config.chart.animations;if(!e||e.enabled===!1||!e.dynamicAnimation||e.dynamicAnimation.enabled===!1)return!1;let s=(t=e.largeDatasetThreshold)!=null?t:0;return s>0&&u.globals.dataPoints>s?!1:!!(H.isBrowser()&&u.globals.dataChanged&&u.globals.shouldAnimate)}function fe(u,t,e){var s,i,a,n;if((s=u.axisFlags)!=null&&s.isXNumeric){let o=(a=(i=u.seriesData)==null?void 0:i.seriesX)==null?void 0:a[t];if(o&&o.length&&o[e]!=null)return"x:"+o[e]}let r=(n=u.globals.labels)==null?void 0:n[e];return r!=null&&String(r)!==""?"c:"+(Array.isArray(r)?r.join(" "):String(r)):"j:"+e}function Dl(u,t,e){var s,i;if(u.isXNumeric){let n=(s=u.seriesX)==null?void 0:s[t];if(n&&n.length&&n[e]!=null)return"x:"+n[e]}let a=(i=u.labels)==null?void 0:i[e];return a!=null&&String(a)!==""?"c:"+(Array.isArray(a)?a.join(" "):String(a)):"j:"+e}function El(u,t){let e=new Map;u.forEach((l,c)=>{e.has(l)||e.set(l,c)});let s=new Array(t.length),i=new Set,a=-1,n=!0,r=u.length===t.length;t.forEach((l,c)=>{let h=e.has(l)&&!i.has(e.get(l))?e.get(l):-1;s[c]=h,h!==-1&&(i.add(h),h{let s=t.get(e)||0;return t.set(e,s+1),s===0?e:`${e}#${s}`})}function Ge(u,t,e=!1,s=!1){var i,a;if(!te(u))return null;let n=u.globals.prevStreamFrame;if(!n)return null;let r=(i=n.seriesY)==null?void 0:i[t],o=(a=u.seriesData.series)==null?void 0:a[t];if(!Array.isArray(r)||!Array.isArray(o)||!r.length||!o.length)return null;let l=Cn(r.map((d,f)=>Dl(n,t,f))),c=Cn(o.map((d,f)=>fe(u,t,f))),h=El(l,c);return!h.ordered&&!s||!h.changed&&!e?null:{join:h,oldKeys:l,newKeys:c}}function za(u){var t,e;let s=u.config.chart.animations;return hs((e=(t=s.dynamicAnimation)==null?void 0:t.easing)!=null?e:s.easing)}function Tt(u,t,e,s,i){let a=performance.now(),n=r=>{if(u.globals.isDestroyed)return;let o=Math.max(0,Math.min(1,(r-a)/t));s(e(o),o),o<1?O.requestAnimationFrame(n):i&&i()};O.requestAnimationFrame(n)}function kn(u,{elPointsMain:t,realIndex:e,speed:s}){var i,a,n,r;if(!t?.node)return!1;let o=Ge(u,e,!0);if(!o)return!1;let l=u.globals.prevStreamFrame;if(!l)return!1;let c=(i=l.xPixels)==null?void 0:i[e],h=(a=l.yPixels)==null?void 0:a[e];if(!c||!h)return!1;let d=t.node.querySelectorAll(".apexcharts-marker");if(!d.length)return!1;let f=((n=u.globals.seriesXvalues)==null?void 0:n[e])||[],g=((r=u.globals.seriesYvalues)==null?void 0:r[e])||[],p=za(u),m=Math.max(1,s||1);return t.node.classList.remove("apexcharts-element-hidden"),d.forEach(b=>{var x,_,w,y,v,A,S,C,M;let k=parseInt((_=(x=b.getAttribute("j"))!=null?x:b.getAttribute("rel"))!=null?_:"",10);if(!isFinite(k)||k<0||k>=o.join.toOld.length)return;let L=o.join.toOld[k],E=f[k]!=null&&g[k]!=null?[f[k],g[k]]:null;if(L===-1||!E){let W=b.style;W.opacity="0",Tt(u,m,p,Y=>{W.opacity=String(Y)},()=>{W.opacity=""});return}let D=((w=c[L])!=null?w:NaN)-E[0],P=((y=h[L])!=null?y:NaN)-E[1];if(!isFinite(D)||!isFinite(P))return;let F=(S=(A=(v=l.rPixels)==null?void 0:v[e])==null?void 0:A[L])!=null?S:NaN,R=parseFloat((M=(C=b.getAttribute("r"))!=null?C:b.getAttribute("default-marker-size"))!=null?M:""),N=isFinite(F)&&isFinite(R)&&R>0&&Math.abs(F-R)>.25;if(!(Math.abs(D)>=.5||Math.abs(P)>=.5)&&!N)return;let $=W=>{let Y=D*(1-W),I=P*(1-W);if(N){let U=(F+(R-F)*W)/R;b.setAttribute("transform",`translate(${Y+E[0]*(1-U)}, ${I+E[1]*(1-U)}) scale(${U})`)}else b.setAttribute("transform",`translate(${Y}, ${I})`)};$(0),Tt(u,m,p,$,()=>{b.removeAttribute("transform")})}),!0}function Tl(u,{type:t,realIndex:e,pathFromLine:s,pathFromArea:i,linePaths:a,areaPaths:n}){var r,o;let l=Ge(u,e);if(!l)return null;let{join:c,oldKeys:h,newKeys:d}=l,f=u.globals.prevStreamFrame;if(!f)return null;let g=(r=f.seriesY)==null?void 0:r[e],p=(o=u.seriesData.series)==null?void 0:o[e];if(g.length<2||p.length<2||g.some(x=>x===null)||p.some(x=>x===null))return null;let m=kl(c,h.length),b={};return Array.isArray(a)&&a.length===1&&s&&(b.line=Sn(s,a[0],m,h.length,d.length,!1)),t==="area"&&Array.isArray(n)&&n.length===1&&i&&(b.area=Sn(i,n[0],m,h.length,d.length,!0)),!b.line&&!b.area?null:b}function Pl(u){let t=/^M\s*([+-]?[\d.eE]+)[\s,]+([+-]?[\d.eE]+)/.exec(u||"");if(!t)return null;let e=parseFloat(t[1]),s=parseFloat(t[2]);return isFinite(e)&&isFinite(s)?{x:e,y:s}:null}function Rl({w:u,elSeries:t,record:e,newKeys:s,isHorizontal:i,speed:a}){var n;if(!te(u)||!e||!Array.isArray(e.paths)||!t?.node)return;let r=new Set(s),o=e.paths.filter(h=>h&&h.d&&h.key!=null&&!r.has(h.key));if(!o.length)return;let l=new B(u),c=(n=u.globals.colors)==null?void 0:n[parseInt(String(e.realIndex),10)];o.forEach(h=>{let d=h.fill||c||"#c8c8c8";String(d).indexOf("url(")===0&&(d=c||"#c8c8c8");let f=l.drawPath({d:h.d,stroke:"none",strokeWidth:0,fill:d,fillOpacity:1,classes:"apexcharts-bar-ghost"}),g=f.node;g.setAttribute("pointer-events","none"),f.attr("clip-path",`url(#gridRectBarMask${u.globals.cuid})`),t.node.insertBefore(g,t.node.firstChild);let p=Pl(h.d),m=i?"left center":"center bottom";try{let y=g.getBBox();p&&y&&(i?m=Math.abs(p.x-y.x)<=Math.abs(p.x-(y.x+y.width))?"left center":"right center":m=Math.abs(p.y-(y.y+y.height))<=Math.abs(p.y-y.y)?"center bottom":"center top")}catch{}let b=g.style;b.transformBox="fill-box",b.transformOrigin=m;let x=Math.max(1,a||1),_=performance.now(),w=y=>{if(u.globals.isDestroyed||!g.parentNode)return;let v=Math.max(0,Math.min(1,(y-_)/x)),A=1-Math.pow(1-v,3),S=1-A;b.transform=i?`scaleX(${S})`:`scaleY(${S})`,b.opacity=String(1-A),v<1?O.requestAnimationFrame(w):g.parentNode.removeChild(g)};O.requestAnimationFrame(w)})}function Mn(u,t,e){return[...u.querySelectorAll(t)].map(s=>{var i,a,n;return{text:s.textContent||"",display:(n=(a=(i=s.querySelector("tspan"))==null?void 0:i.textContent)!=null?a:s.textContent)!=null?n:"",pos:parseFloat(s.getAttribute(e)||""),transform:s.getAttribute("transform")}})}function Ln(u,t,e){return[...u.querySelectorAll(t)].map(s=>parseFloat(s.getAttribute(e)||""))}var Ms=":not(.apexcharts-tick-ghost)",Er=`.apexcharts-xaxis-texts-g text:not(.apexcharts-xaxis-group-label)${Ms}`,Tr=`.apexcharts-yaxis-texts-g text${Ms}`,Pr=`.apexcharts-gridlines-vertical line${Ms}`,Rr=`.apexcharts-gridlines-horizontal line${Ms}`;function Fr(u){var t,e;let s=u.globals;if(!((t=u.axisFlags)!=null&&t.isXNumeric)||s.isBarHorizontal||(e=u.config.xaxis)!=null&&e.reversed)return null;let i=s.minX,a=s.maxX,n=u.layout.gridWidth;return!isFinite(i)||!isFinite(a)||!(a>i)||!(n>0)?null:{min:i,max:a,width:n}}function Ir(u,t){var e;let s=u.globals;if(s.isBarHorizontal||!Array.isArray(u.config.yaxis)||u.config.yaxis.length!==1||(e=u.config.yaxis[0])!=null&&e.logarithmic)return null;let i=s.minY,a=s.maxY;if(!isFinite(i)||!isFinite(a)||!(a>i))return null;let n=t.map(r=>r.pos).filter(r=>isFinite(r));return n.length<2?null:{min:i,max:a,pLo:Math.max(...n),pHi:Math.min(...n)}}function Fl(u,t){if(!u||!t)return null;let e=u.max-u.min,s=t.max-t.min;return!(e>0)||!(s>0)||!(u.width>0)||!(t.width>0)?null:{toNew:i=>(u.min+i/u.width*e-t.min)/s*t.width,toOld:i=>(t.min+i/t.width*s-u.min)/e*u.width}}function Il(u,t){if(!u||!t)return null;let e=u.pHi-u.pLo,s=t.pHi-t.pLo,i=u.max-u.min,a=t.max-t.min;if(!e||!s||!(i>0)||!(a>0))return null;let n=o=>u.min+(o-u.pLo)/e*i,r=o=>t.min+(o-t.pLo)/s*a;return{toNew:o=>t.pLo+(n(o)-t.min)/a*s,toOld:o=>u.pLo+(r(o)-u.min)/i*e}}function Nl(u){let t=u.globals;if(t.prevChromeFrame=null,!t.axisCharts||!H.isBrowser())return;let e=u.dom.baseEl;if(T.elementExists(e))try{let s=Mn(e,Tr,"y");t.prevChromeFrame={xLabels:Mn(e,Er,"x"),yLabels:s,vGrid:Ln(e,Pr,"x1"),hGrid:Ln(e,Rr,"y1"),xScale:Fr(u),yAnchors:Ir(u,s)}}catch{t.prevChromeFrame=null}}function Dn(u,t,e,s){let i=t.style;i.opacity="0",Tt(u,e,s,a=>{i.opacity=String(a)},()=>{i.opacity=""})}function Je(u,t,e,s,i,a,n){e.forEach(r=>t.setAttribute(r,String(s))),Tt(u,a,n,r=>{let o=String(s+(i-s)*r);e.forEach(l=>t.setAttribute(l,o))},()=>{e.forEach(r=>t.setAttribute(r,String(i)))})}function En(u,{template:t,display:e,attrs:s,from:i,to:a,duration:n,ease:r}){let o=t.parentNode;if(!o)return;let l=t.cloneNode(!0);if(l.classList.add("apexcharts-tick-ghost"),l.setAttribute("pointer-events","none"),l.removeAttribute("id"),e!==void 0){let h=l.querySelector("tspan");h?h.textContent=e:l.textContent=e;let d=l.querySelector("title");d&&(d.textContent=e)}s.forEach(h=>l.setAttribute(h,String(i)));let c=l.style;c.opacity="1",o.appendChild(l),Tt(u,n,r,h=>{let d=String(i+(a-i)*h);s.forEach(f=>l.setAttribute(f,d)),c.opacity=String(1-h)},()=>{l.parentNode&&l.parentNode.removeChild(l)})}var Xl=20;function Tn(u,{newLabels:t,oldLabels:e,posAttr:s,newLines:i,oldLines:a,lineAttrs:n,duration:r,ease:o,project:l}){let c=new Map;e.forEach((y,v)=>{c.has(y.text)||c.set(y.text,j(G({},y),{i:v}))});let h=new Set,d=i.length===t.length,f=a.length===e.length,g=e.map(y=>y.pos).concat(t.map(y=>parseFloat(y.getAttribute(s)||""))).filter(y=>isFinite(y)),p=Math.min(...g),m=Math.max(...g),b=Math.max(40,(m-p)*.25),x=y=>Math.max(p-b,Math.min(m+b,y)),_=(y,v)=>{if(!y)return;let A=parseFloat(y.getAttribute(n[0])||""),S=a[v.i];isFinite(A)&&isFinite(S)&&Je(u,y,n,S,A,r,o)};if(t.forEach((y,v)=>{let A=parseFloat(y.getAttribute(s)||""),S=c.get(y.textContent||""),C=d?i[v]:null;S&&h.add(S.i);let M=y.getAttribute("transform");if(!S||!isFinite(S.pos)){if(!S){if(l&&isFinite(A)&&!M){let k=isFinite(l.toOld(A))?x(l.toOld(A)):NaN;isFinite(k)&&Math.abs(k-A)>.5&&(Je(u,y,[s],k,A,r,o),C&&Je(u,C,n,k,A,r,o))}Dn(u,y,r,o),C&&Dn(u,C,r,o)}return}if(!(!isFinite(A)||Math.abs(S.pos-A)<.5)){if(M||S.transform){let k=S.pos-A;if(isFinite(k)){let L=M||"";Tt(u,r,o,E=>{let D=k*(1-E),P=s==="x"?`translate(${D} 0)`:`translate(0 ${D})`;y.setAttribute("transform",`${P} ${L}`.trim())},()=>{L?y.setAttribute("transform",L):y.removeAttribute("transform")})}_(C,S);return}Je(u,y,[s],S.pos,A,r,o),_(C,S)}}),!l||!t.length)return;let w=0;e.forEach((y,v)=>{if(h.has(v)||!isFinite(y.pos)||y.transform||w>=Xl)return;let A=l.toNew(y.pos);!isFinite(A)||Math.abs(A-y.pos)<.5||(w++,En(u,{template:t[0],display:y.display,attrs:[s],from:y.pos,to:x(A),duration:r,ease:o}),f&&i.length&&isFinite(a[v])&&En(u,{template:i[0],attrs:n,from:a[v],to:x(l.toNew(a[v])),duration:r,ease:o}))})}function Ol(u){let t=u.globals,e=t.prevChromeFrame;if(t.prevChromeFrame=null,!e||!t.axisCharts||!H.isBrowser()||!te(u)||!(u.seriesData.series||[]).some((r,o)=>Ge(u,o,!0,!0)!==null))return;let i=u.dom.baseEl;if(!T.elementExists(i))return;let a=Math.max(1,u.config.chart.animations.dynamicAnimation.speed||1),n=za(u);try{let r=[...i.querySelectorAll(Tr)],o=Fl(e.xScale,Fr(u)),l=Il(e.yAnchors,Ir(u,r.map(c=>({pos:parseFloat(c.getAttribute("y")||"")}))));Tn(u,{newLabels:[...i.querySelectorAll(Er)],oldLabels:e.xLabels,posAttr:"x",newLines:[...i.querySelectorAll(Pr)],oldLines:e.vGrid,lineAttrs:["x1","x2"],duration:a,ease:n,project:o}),Tn(u,{newLabels:r,oldLabels:e.yLabels,posAttr:"y",newLines:[...i.querySelectorAll(Rr)],oldLines:e.hGrid,lineAttrs:["y1","y2"],duration:a,ease:n,project:l})}catch{}}var Nr=".apexcharts-data-labels[data\\:dlKey]",Xr=".apexcharts-datalabel";function Or(u){var t,e;let s=u.config.dataLabels;return!!((t=s?.animate)!=null&&t.enabled||(e=s?.countUp)!=null&&e.enabled)}function Pn(u){if(!isFinite(u))return 0;let t=String(Math.abs(u)),e=t.indexOf("e");if(e!==-1){let i=t.slice(0,e),a=parseInt(t.slice(e+1),10),n=i.indexOf("."),r=n===-1?0:i.length-n-1;return Math.min(6,Math.max(0,r-a))}let s=t.indexOf(".");return s===-1?0:Math.min(6,t.length-s-1)}function Rn(u,t){let e=u.querySelector("tspan");e?e.textContent=t:u.textContent=t}function Bl(u){let t=u.globals;if(t.prevDataLabels=null,!t.axisCharts||!H.isBrowser()||!Or(u))return;let e=u.dom.baseEl;if(T.elementExists(e))try{let s=new Map;e.querySelectorAll(Nr).forEach(i=>{let a=i.getAttribute("data:dlKey");if(!a)return;let n=i.querySelector(Xr);n&&s.set(a,{cx:parseFloat(n.getAttribute("cx")||""),cy:parseFloat(n.getAttribute("cy")||""),val:parseFloat(i.getAttribute("data:dlVal")||"")})}),t.prevDataLabels=s.size?s:null}catch{t.prevDataLabels=null}}function Yl(u,t,e,s){let i=t.style;i.opacity="0",Tt(u,e,s,a=>{i.opacity=String(a)},()=>{i.opacity=""})}function zl(u){var t,e;let s=u.globals,i=s.prevDataLabels;if(s.prevDataLabels=null,!i||!s.axisCharts||!H.isBrowser()||!Or(u)||!te(u))return;let a=u.dom.baseEl;if(!T.elementExists(a))return;let n=u.config.dataLabels,r=!!((t=n.animate)!=null&&t.enabled),o=!!((e=n.countUp)!=null&&e.enabled),l=n.formatter,c=Math.max(1,u.config.chart.animations.dynamicAnimation.speed||1),h=za(u);try{a.querySelectorAll(Nr).forEach(d=>{let f=d.getAttribute("data:dlKey");if(!f)return;let g=d.querySelector(Xr);if(!g)return;let p=i.get(f);if(r)if(p&&isFinite(p.cx)&&isFinite(p.cy)){let m=parseFloat(g.getAttribute("cx")||""),b=parseFloat(g.getAttribute("cy")||""),x=p.cx-m,_=p.cy-b;if(isFinite(x)&&isFinite(_)&&Math.abs(x)+Math.abs(_)>.5){let w=d.getAttribute("transform")||"";Tt(u,c,h,y=>{let v=1-y;d.setAttribute("transform",`translate(${x*v} ${_*v}) ${w}`.trim())},()=>{d.setAttribute("transform",w)})}}else p||Yl(u,d,c,h);if(o&&p&&isFinite(p.val)){let m=parseFloat(d.getAttribute("data:dlVal")||"");if(isFinite(m)&&Math.abs(m-p.val)>1e-9){let b=p.val,x=Math.max(Pn(b),Pn(m)),_=parseInt(f,10),w=parseInt(d.getAttribute("data:dlJ")||"",10),y=j(G({},u),{seriesIndex:_,dataPointIndex:isFinite(w)?w:0,w:u}),v=A=>{let S=Number(A.toFixed(x)),C=S;if(typeof l=="function")try{C=l(S,y)}catch{C=S}return String(C)};Tt(u,c,h,A=>{Rn(g,v(b+(m-b)*A))},()=>{Rn(g,v(m))})}}})}catch{}}var ct=class u{constructor(t,{toggleDataSeries:e=void 0,revertDefaultAxisMinMax:s=void 0,updateSeries:i=void 0}={}){this.w=t,this._toggleDataSeries=e||null,this._revertDefaultAxisMinMax=s||null,this._updateSeries=i||null,this.legendInactiveClass="legend-mouseover-inactive"}clearSeriesCache(){let t=this.w;t.globals.cachedSelectors&&(delete t.globals.cachedSelectors.allSeriesEls,delete t.globals.cachedSelectors.highlightSeriesEls)}getAllSeriesEls(){let t=this.w,e="allSeriesEls";return t.globals.cachedSelectors[e]||(t.globals.cachedSelectors[e]=t.dom.baseEl.getElementsByClassName("apexcharts-series")),t.globals.cachedSelectors[e]}getSeriesByName(t){return this.w.dom.baseEl.querySelector(`.apexcharts-inner .apexcharts-series[seriesName='${T.escapeString(t)}']`)}isSeriesHidden(t){var e;let i=this.getSeriesByName(t),a=parseInt((e=i.getAttribute("data:realIndex"))!=null?e:"0",10);return{isHidden:i.classList.contains("apexcharts-series-collapsed"),realIndex:a}}addCollapsedClassToSeries(t,e){u.addCollapsedClassToSeries(this.w,t,e)}static addCollapsedClassToSeries(t,e,s){function i(a){for(let n=0;n-1&&(t[s]&&typeof t[s]=="object"?t[s].data=[]:t[s]=0);return t}_deriveSeriesNames(){let t=this.w,e=t.config.series||[],s=t.config.labels||[];return e.map((i,a)=>i&&typeof i=="object"&&i.name!=null?String(i.name):s[a]!=null?String(s[a]):`series-${a+1}`)}reconcileCollapsedByName(){let t=this.w,e=t.globals,s=this._deriveSeriesNames(),i=r=>{let o=[],l=[];return r.forEach(c=>{let h=c&&c.name!=null?s.indexOf(c.name):c.index;if(h==null||h<0||h>=t.config.series.length)return;let d=t.config.series[h];c.index=h,c.data=e.axisCharts?d&&d.data?d.data.slice():[]:d,o.push(c),l.push(h)}),{records:o,indices:l}},a=i(e.collapsedSeries);e.collapsedSeries=a.records,e.collapsedSeriesIndices=a.indices;let n=i(e.ancillaryCollapsedSeries);e.ancillaryCollapsedSeries=n.records,e.ancillaryCollapsedSeriesIndices=n.indices,e.allSeriesCollapsed=e.collapsedSeries.length+e.ancillaryCollapsedSeries.length===t.config.series.length,this.emptyCollapsedSeries(t.config.series)}canvasRestyle(t){let e=this.w.globals.activeRenderer;e&&e.kind==="canvas"&&typeof e.restyle=="function"&&e.restyle(t)}highlightSeries(t){var e;let s=this.w,i=this.getSeriesByName(t),a=parseInt((e=i?.getAttribute("data:realIndex"))!=null?e:"",10),n="highlightSeriesEls",r=s.globals.cachedSelectors[n];r||(r=s.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels, .apexcharts-yaxis"),s.globals.cachedSelectors[n]=r);let o=null,l=null,c=null;if(s.globals.axisCharts||s.config.chart.type==="radialBar")if(s.globals.axisCharts){o=s.dom.baseEl.querySelector(`.apexcharts-series[data\\:realIndex='${a}']`),l=s.dom.baseEl.querySelector(`.apexcharts-datalabels[data\\:realIndex='${a}']`);let h=s.globals.seriesYAxisReverseMap[a];c=s.dom.baseEl.querySelector(`.apexcharts-yaxis[rel='${h}']`)}else o=s.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}']`);else o=s.dom.baseEl.querySelector(`.apexcharts-series[rel='${a+1}'] path`);for(let h=0;h{for(let l=0;l