this.wheelDelay&&(this.executeMouseWheelZoom(i),r.globals.lastWheelExecution=s),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){s-r.globals.lastWheelExecution>a.wheelDelay&&(a.executeMouseWheelZoom(i),r.globals.lastWheelExecution=s)},this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(i){var a,r=this.w;this.minX=r.globals.isRangeBar?r.globals.minY:r.globals.minX,this.maxX=r.globals.isRangeBar?r.globals.maxY:r.globals.maxX;var s=(a=this.gridRect)===null||a===void 0?void 0:a.getBoundingClientRect();if(s){var n,o,h,d=(i.clientX-s.left)/s.width,c=this.minX,g=this.maxX,f=g-c;if(i.deltaY<0){var x=c+d*f;o=x-(n=.5*f)/2,h=x+n/2}else o=c-(n=1.5*f)/2,h=g+n/2;if(!r.globals.isRangeBar){o=Math.max(o,r.globals.initialMinX),h=Math.min(h,r.globals.initialMaxX);var p=.01*(r.globals.initialMaxX-r.globals.initialMinX);if(h-o0&&a.height>0&&this.slDraggableRect.selectize({points:"l, r",pointSize:8,pointType:"rect"}).resize({constraint:{minX:0,minY:0,maxX:i.globals.gridWidth,maxY:i.globals.gridHeight}}).on("resizing",this.selectionDragging.bind(this,"resizing"))}}},{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(i.globals.selection);else if(i.config.chart.selection.xaxis.min!==void 0&&i.config.chart.selection.xaxis.max!==void 0){var r=(i.config.chart.selection.xaxis.min-i.globals.minX)/a.xRatio,s=i.globals.gridWidth-(i.globals.maxX-i.config.chart.selection.xaxis.max)/a.xRatio-r;i.globals.isRangeBar&&(r=(i.config.chart.selection.xaxis.min-i.globals.yAxisScale[0].niceMin)/a.invertedYRatio,s=(i.config.chart.selection.xaxis.max-i.config.chart.selection.xaxis.min)/a.invertedYRatio);var n={x:r,y:0,width:s,height:i.globals.gridHeight,translateX:0,translateY:0,selectionEnabled:!0};this.drawSelectionRect(n),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,r=i.y,s=i.width,n=i.height,o=i.translateX,h=o===void 0?0:o,d=i.translateY,c=d===void 0?0:d,g=this.w,f=this.zoomRect,x=this.selectionRect;if(this.dragged||g.globals.selection!==null){var p={transform:"translate("+h+", "+c+")"};g.globals.zoomEnabled&&this.dragged&&(s<0&&(s=1),f.attr({x:a,y:r,width:s,height:n,fill:g.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":g.config.chart.zoom.zoomedArea.fill.opacity,stroke:g.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":g.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":g.config.chart.zoom.zoomedArea.stroke.opacity}),X.setAttrs(f.node,p)),g.globals.selectionEnabled&&(x.attr({x:a,y:r,width:s>0?s:0,height:n>0?n:0,fill:g.config.chart.selection.fill.color,"fill-opacity":g.config.chart.selection.fill.opacity,stroke:g.config.chart.selection.stroke.color,"stroke-width":g.config.chart.selection.stroke.width,"stroke-dasharray":g.config.chart.selection.stroke.dashArray,"stroke-opacity":g.config.chart.selection.stroke.opacity}),X.setAttrs(x.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,r=i.zoomtype,s=this.w,n=a,o=this.gridRect.getBoundingClientRect(),h=n.startX-1,d=n.startY,c=!1,g=!1,f=n.clientX-o.left-h,x=n.clientY-o.top-d,p={};return Math.abs(f+h)>s.globals.gridWidth?f=s.globals.gridWidth-h:n.clientX-o.left<0&&(f=h),h>n.clientX-o.left&&(c=!0,f=Math.abs(f)),d>n.clientY-o.top&&(g=!0,x=Math.abs(x)),p=r==="x"?{x:c?h-f:h,y:0,width:f,height:s.globals.gridHeight}:r==="y"?{x:0,y:g?d-x:d,width:s.globals.gridWidth,height:x}:{x:c?h-f:h,y:g?d-x:d,width:f,height:x},n.drawSelectionRect(p),n.selectionDragging("resizing"),p}},{key:"selectionDragging",value:function(i,a){var r=this,s=this.w,n=this.xyRatios,o=this.selectionRect,h=0;i==="resizing"&&(h=30);var d=function(g){return parseFloat(o.node.getAttribute(g))},c={x:d("x"),y:d("y"),width:d("width"),height:d("height")};s.globals.selection=c,typeof s.config.chart.events.selection=="function"&&s.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(function(){var g,f,x,p,v=r.gridRect.getBoundingClientRect(),y=o.node.getBoundingClientRect();s.globals.isRangeBar?(g=s.globals.yAxisScale[0].niceMin+(y.left-v.left)*n.invertedYRatio,f=s.globals.yAxisScale[0].niceMin+(y.right-v.left)*n.invertedYRatio,x=0,p=1):(g=s.globals.xAxisScale.niceMin+(y.left-v.left)*n.xRatio,f=s.globals.xAxisScale.niceMin+(y.right-v.left)*n.xRatio,x=s.globals.yAxisScale[0].niceMin+(v.bottom-y.bottom)*n.yRatio[0],p=s.globals.yAxisScale[0].niceMax-(y.top-v.top)*n.yRatio[0]);var w={xaxis:{min:g,max:f},yaxis:{min:x,max:p}};s.config.chart.events.selection(r.ctx,w),s.config.chart.brush.enabled&&s.config.chart.events.brushScrolled!==void 0&&s.config.chart.events.brushScrolled(r.ctx,w)},h))}},{key:"selectionDrawn",value:function(i){var a=i.context,r=i.zoomtype,s=this.w,n=a,o=this.xyRatios,h=this.ctx.toolbar;if(n.startX>n.endX){var d=n.startX;n.startX=n.endX,n.endX=d}if(n.startY>n.endY){var c=n.startY;n.startY=n.endY,n.endY=c}var g=void 0,f=void 0;s.globals.isRangeBar?(g=s.globals.yAxisScale[0].niceMin+n.startX*o.invertedYRatio,f=s.globals.yAxisScale[0].niceMin+n.endX*o.invertedYRatio):(g=s.globals.xAxisScale.niceMin+n.startX*o.xRatio,f=s.globals.xAxisScale.niceMin+n.endX*o.xRatio);var x=[],p=[];if(s.config.yaxis.forEach(function(A,k){var S=s.globals.seriesYAxisMap[k][0];x.push(s.globals.yAxisScale[k].niceMax-o.yRatio[S]*n.startY),p.push(s.globals.yAxisScale[k].niceMax-o.yRatio[S]*n.endY)}),n.dragged&&(n.dragX>10||n.dragY>10)&&g!==f){if(s.globals.zoomEnabled){var v=P.clone(s.globals.initialConfig.yaxis),y=P.clone(s.globals.initialConfig.xaxis);if(s.globals.zoomed=!0,s.config.xaxis.convertedCatToNumeric&&(g=Math.floor(g),f=Math.floor(f),g<1&&(g=1,f=s.globals.dataPoints),f-g<2&&(f=g+1)),r!=="xy"&&r!=="x"||(y={min:g,max:f}),r!=="xy"&&r!=="y"||v.forEach(function(A,k){v[k].min=p[k],v[k].max=x[k]}),h){var w=h.getBeforeZoomRange(y,v);w&&(y=w.xaxis?w.xaxis:y,v=w.yaxis?w.yaxis:v)}var l={xaxis:y};s.config.chart.group||(l.yaxis=v),n.ctx.updateHelpers._updateOptions(l,!1,n.w.config.chart.animations.dynamicAnimation.enabled),typeof s.config.chart.events.zoomed=="function"&&h.zoomCallback(y,v)}else if(s.globals.selectionEnabled){var u,b=null;u={min:g,max:f},r!=="xy"&&r!=="y"||(b=P.clone(s.config.yaxis)).forEach(function(A,k){b[k].min=p[k],b[k].max=x[k]}),s.globals.selection=n.selection,typeof s.config.chart.events.selection=="function"&&s.config.chart.events.selection(n.ctx,{xaxis:u,yaxis:b})}}}},{key:"panDragging",value:function(i){var a=i.context,r=this.w,s=a;if(r.globals.lastClientPosition.x!==void 0){var n=r.globals.lastClientPosition.x-s.clientX,o=r.globals.lastClientPosition.y-s.clientY;Math.abs(n)>Math.abs(o)&&n>0?this.moveDirection="left":Math.abs(n)>Math.abs(o)&&n<0?this.moveDirection="right":Math.abs(o)>Math.abs(n)&&o>0?this.moveDirection="up":Math.abs(o)>Math.abs(n)&&o<0&&(this.moveDirection="down")}r.globals.lastClientPosition={x:s.clientX,y:s.clientY};var h=r.globals.isRangeBar?r.globals.minY:r.globals.minX,d=r.globals.isRangeBar?r.globals.maxY:r.globals.maxX;r.config.xaxis.convertedCatToNumeric||s.panScrolled(h,d)}},{key:"delayedPanScrolled",value:function(){var i=this.w,a=i.globals.minX,r=i.globals.maxX,s=(i.globals.maxX-i.globals.minX)/2;this.moveDirection==="left"?(a=i.globals.minX+s,r=i.globals.maxX+s):this.moveDirection==="right"&&(a=i.globals.minX-s,r=i.globals.maxX-s),a=Math.floor(a),r=Math.floor(r),this.updateScrolledChart({xaxis:{min:a,max:r}},a,r)}},{key:"panScrolled",value:function(i,a){var r=this.w,s=this.xyRatios,n=P.clone(r.globals.initialConfig.yaxis),o=s.xRatio,h=r.globals.minX,d=r.globals.maxX;r.globals.isRangeBar&&(o=s.invertedYRatio,h=r.globals.minY,d=r.globals.maxY),this.moveDirection==="left"?(i=h+r.globals.gridWidth/15*o,a=d+r.globals.gridWidth/15*o):this.moveDirection==="right"&&(i=h-r.globals.gridWidth/15*o,a=d-r.globals.gridWidth/15*o),r.globals.isRangeBar||(ir.globals.initialMaxX)&&(i=h,a=d);var c={xaxis:{min:i,max:a}};r.config.chart.group||(c.yaxis=n),this.updateScrolledChart(c,i,a)}},{key:"updateScrolledChart",value:function(i,a,r){var s=this.w;this.ctx.updateHelpers._updateOptions(i,!1,!1),typeof s.config.chart.events.scrolled=="function"&&s.config.chart.events.scrolled(this.ctx,{xaxis:{min:a,max:r}})}}]),t}(),Lt=function(){function m(e){R(this,m),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return F(m,[{key:"getNearestValues",value:function(e){var t=e.hoverArea,i=e.elGrid,a=e.clientX,r=e.clientY,s=this.w,n=i.getBoundingClientRect(),o=n.width,h=n.height,d=o/(s.globals.dataPoints-1),c=h/s.globals.dataPoints,g=this.hasBars();!s.globals.comboCharts&&!g||s.config.xaxis.convertedCatToNumeric||(d=o/s.globals.dataPoints);var f=a-n.left-s.globals.barPadForNumericAxis,x=r-n.top;f<0||x<0||f>o||x>h?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):s.globals.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):s.globals.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));var p=Math.round(f/d),v=Math.floor(x/c);g&&!s.config.xaxis.convertedCatToNumeric&&(p=Math.ceil(f/d),p-=1);var y=null,w=null,l=s.globals.seriesXvalues.map(function(S){return S.filter(function(C){return P.isNumber(C)})}),u=s.globals.seriesYvalues.map(function(S){return S.filter(function(C){return P.isNumber(C)})});if(s.globals.isXNumeric){var b=this.ttCtx.getElGrid().getBoundingClientRect(),A=f*(b.width/o),k=x*(b.height/h);y=(w=this.closestInMultiArray(A,k,l,u)).index,p=w.j,y!==null&&(l=s.globals.seriesXvalues[y],p=(w=this.closestInArray(A,l)).index)}return s.globals.capturedSeriesIndex=y===null?-1:y,(!p||p<1)&&(p=0),s.globals.isBarHorizontal?s.globals.capturedDataPointIndex=v:s.globals.capturedDataPointIndex=p,{capturedSeries:y,j:s.globals.isBarHorizontal?v:p,hoverX:f,hoverY:x}}},{key:"closestInMultiArray",value:function(e,t,i,a){var r=this.w,s=0,n=null,o=-1;r.globals.series.length>1?s=this.getFirstActiveXArray(i):n=0;var h=i[s][0],d=Math.abs(e-h);if(i.forEach(function(f){f.forEach(function(x,p){var v=Math.abs(e-x);v<=d&&(d=v,o=p)})}),o!==-1){var c=a[s][o],g=Math.abs(t-c);n=s,a.forEach(function(f,x){var p=Math.abs(t-f[o]);p<=g&&(g=p,n=x)})}return{index:n,j:o}}},{key:"getFirstActiveXArray",value:function(e){for(var t=this.w,i=0,a=e.map(function(s,n){return s.length>0?n:-1}),r=0;r0)for(var a=0;a *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var e=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(e=K(e)).sort(function(i,a){var r=Number(i.getAttribute("data:realIndex")),s=Number(a.getAttribute("data:realIndex"));return sr?-1:0});var t=[];return e.forEach(function(i){t.push(i.querySelector(".apexcharts-marker"))}),t}},{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")),r=e.getAttribute("shape");return new X(this.ctx).getMarkerPath(i,a,r,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,r=0;r";g.forEach(function(L,M){S+=' ').concat(L.attrs.name,"
"),C+="".concat(L.val,"
")}),l.innerHTML=S+"",u.innerHTML=C+""};n?h.globals.seriesGoals[t][i]&&Array.isArray(h.globals.seriesGoals[t][i])?b():(l.innerHTML="",u.innerHTML=""):b()}else l.innerHTML="",u.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:""),n&&v[0]){if(h.config.tooltip.hideEmptySeries){var A=a[t].querySelector(".apexcharts-tooltip-marker"),k=a[t].querySelector(".apexcharts-tooltip-text");parseFloat(c)==0?(A.style.display="none",k.style.display="none"):(A.style.display="block",k.style.display="block")}c==null||h.globals.ancillaryCollapsedSeriesIndices.indexOf(t)>-1||h.globals.collapsedSeriesIndices.indexOf(t)>-1||Array.isArray(d.tConfig.enabledOnSeries)&&d.tConfig.enabledOnSeries.indexOf(t)===-1?v[0].parentNode.style.display="none":v[0].parentNode.style.display=h.config.tooltip.items.display}else Array.isArray(d.tConfig.enabledOnSeries)&&d.tConfig.enabledOnSeries.indexOf(t)===-1&&(v[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,r=this.ctx.series.filteredSeriesX(),s="",n="",o=null,h=null,d={series:a.globals.series,seriesIndex:t,dataPointIndex:i,w:a},c=a.globals.ttZFormatter;i===null?h=a.globals.series[t]:a.globals.isXNumeric&&a.config.chart.type!=="treemap"?(s=r[t][i],r[t].length===0&&(s=r[this.tooltipUtil.getFirstActiveXArray(r)][i])):s=new Ke(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 g=s;return a.globals.isXNumeric&&a.config.xaxis.type==="datetime"?s=new Ie(this.ctx).xLabelFormat(a.globals.ttKeyFormatter,g,g,{i:void 0,dateFormatter:new Q(this.ctx).formatDate,w:this.w}):s=a.globals.isBarHorizontal?a.globals.yLabelFormatters[0](g,d):a.globals.xLabelFormatter(g,d),a.config.tooltip.x.formatter!==void 0&&(s=a.globals.ttKeyFormatter(g,d)),a.globals.seriesZ.length>0&&a.globals.seriesZ[t].length>0&&(o=c(a.globals.seriesZ[t][i],a)),n=typeof a.config.xaxis.tooltip.formatter=="function"?a.globals.xaxisTooltipFormatter(g,d):s,{val:Array.isArray(h)?h.join(" "):h,xVal:Array.isArray(s)?s.join(" "):s,xAxisTTVal:Array.isArray(n)?n.join(" "):n,zVal:o}}},{key:"handleCustomTooltip",value:function(e){var t=e.i,i=e.j,a=e.y1,r=e.y2,s=e.w,n=this.ttCtx.getElTooltip(),o=s.config.tooltip.custom;Array.isArray(o)&&o[t]&&(o=o[t]),n.innerHTML=o({ctx:this.ctx,series:s.globals.series,seriesIndex:t,dataPointIndex:i,y1:a,y2:r,w:s})}}]),m}(),Pt=function(){function m(e){R(this,m),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return F(m,[{key:"moveXCrosshairs",value:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,i=this.ttCtx,a=this.w,r=i.getElXCrosshairs(),s=e-i.xcrosshairsWidth/2,n=a.globals.labels.slice().length;if(t!==null&&(s=a.globals.gridWidth/n*t),r===null||a.globals.isBarHorizontal||(r.setAttribute("x",s),r.setAttribute("x1",s),r.setAttribute("x2",s),r.setAttribute("y2",a.globals.gridHeight),r.classList.add("apexcharts-active")),s<0&&(s=0),s>a.globals.gridWidth&&(s=a.globals.gridWidth),i.isXAxisTooltipEnabled){var o=s;a.config.xaxis.crosshairs.width!=="tickWidth"&&a.config.xaxis.crosshairs.width!=="barWidth"||(o=s+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(e){var t=this.ttCtx;t.ycrosshairs!==null&&X.setAttrs(t.ycrosshairs,{y1:e,y2:e}),t.ycrosshairsHidden!==null&&X.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 r;r=new X(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=r.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),r=t.globals.translateY+a,s=i.yaxisTTEls[e].getBoundingClientRect().height,n=t.globals.translateYAxisX[e]-2;t.config.yaxis[e].opposite&&(n-=26),r-=s/2,t.globals.ignoreYAxisIndexes.indexOf(e)===-1?(i.yaxisTTEls[e].classList.add("apexcharts-active"),i.yaxisTTEls[e].style.top=r+"px",i.yaxisTTEls[e].style.left=n+t.config.yaxis[e].tooltip.offsetX+"px"):i.yaxisTTEls[e].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(e,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,a=this.w,r=this.ttCtx,s=r.getElTooltip(),n=r.tooltipRect,o=i!==null?parseFloat(i):1,h=parseFloat(e)+o+5,d=parseFloat(t)+o/2;if(h>a.globals.gridWidth/2&&(h=h-n.ttWidth-o-10),h>a.globals.gridWidth-n.ttWidth-10&&(h=a.globals.gridWidth-n.ttWidth),h<-20&&(h=-20),a.config.tooltip.followCursor){var c=r.getElGrid().getBoundingClientRect();(h=r.e.clientX-c.left)>a.globals.gridWidth/2&&(h-=r.tooltipRect.ttWidth),(d=r.e.clientY+a.globals.translateY-c.top)>a.globals.gridHeight/2&&(d-=r.tooltipRect.ttHeight)}else a.globals.isBarHorizontal||n.ttHeight/2+d>a.globals.gridHeight&&(d=a.globals.gridHeight-n.ttHeight+a.globals.translateY);isNaN(h)||(h+=a.globals.translateX,s.style.left=h+"px",s.style.top=d+"px")}},{key:"moveMarkers",value:function(e,t){var i=this.w,a=this.ttCtx;if(i.globals.markers.size[e]>0)for(var r=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(e,"'] .apexcharts-marker")),s=0;s0){var x=f.getAttribute("shape"),p=h.getMarkerPath(r,s,x,1.5*c);f.setAttribute("d",p)}this.moveXCrosshairs(r),o.fixedTooltip||this.moveTooltip(r,s,c)}}},{key:"moveDynamicPointsOnHover",value:function(e){var t,i=this.ttCtx,a=i.w,r=0,s=0,n=a.globals.pointsArray,o=new re(this.ctx),h=new X(this.ctx);t=o.getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var d=i.tooltipUtil.getHoverMarkerSize(t);n[t]&&(r=n[t][e][0],s=n[t][e][1]);var c=i.tooltipUtil.getAllMarkers();if(c!==null)for(var g=0;g0){var w=h.getMarkerPath(r,x,v,d);c[g].setAttribute("d",w)}else c[g].setAttribute("d","")}}this.moveXCrosshairs(r),i.fixedTooltip||this.moveTooltip(r,s||a.globals.gridHeight,d)}},{key:"moveStickyTooltipOverBars",value:function(e,t){var i=this.w,a=this.ttCtx,r=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length,s=r>=2&&r%2==0?Math.floor(r/2):Math.floor(r/2)+1;i.globals.isBarHorizontal&&(s=new re(this.ctx).getActiveConfigSeriesIndex("desc")+1);var n=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(s,"'] path[j='").concat(e,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(s,"'] path[j='").concat(e,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(s,"'] path[j='").concat(e,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(s,"'] path[j='").concat(e,"']"));n||typeof t!="number"||(n=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 o=n?parseFloat(n.getAttribute("cx")):0,h=n?parseFloat(n.getAttribute("cy")):0,d=n?parseFloat(n.getAttribute("barWidth")):0,c=a.getElGrid().getBoundingClientRect(),g=n&&(n.classList.contains("apexcharts-candlestick-area")||n.classList.contains("apexcharts-boxPlot-area"));i.globals.isXNumeric?(n&&!g&&(o-=r%2!=0?d/2:0),n&&g&&i.globals.comboCharts&&(o-=d/2)):i.globals.isBarHorizontal||(o=a.xAxisTicksPositions[e-1]+a.dataPointsDividedWidth/2,isNaN(o)&&(o=a.xAxisTicksPositions[e]-a.dataPointsDividedWidth/2)),i.globals.isBarHorizontal?h-=a.tooltipRect.ttHeight:i.config.tooltip.followCursor?h=a.e.clientY-c.top-a.tooltipRect.ttHeight/2:h+a.tooltipRect.ttHeight+15>i.globals.gridHeight&&(h=i.globals.gridHeight),i.globals.isBarHorizontal||this.moveXCrosshairs(o),a.fixedTooltip||this.moveTooltip(o,h||i.globals.gridHeight)}}]),m}(),ni=function(){function m(e){R(this,m),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new Pt(e)}return F(m,[{key:"drawDynamicPoints",value:function(){var e=this.w,t=new X(this.ctx),i=new ve(this.ctx),a=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series");a=K(a),e.config.chart.stacked&&a.sort(function(c,g){return parseFloat(c.getAttribute("data:realIndex"))-parseFloat(g.getAttribute("data:realIndex"))});for(var r=0;r2&&arguments[2]!==void 0?arguments[2]:null,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,r=this.w;r.config.chart.type!=="bubble"&&this.newPointSize(e,t);var s=t.getAttribute("cx"),n=t.getAttribute("cy");if(i!==null&&a!==null&&(s=i,n=a),this.tooltipPosition.moveXCrosshairs(s),!this.fixedTooltip){if(r.config.chart.type==="radar"){var o=this.ttCtx.getElGrid().getBoundingClientRect();s=this.ttCtx.e.clientX-o.left}this.tooltipPosition.moveTooltip(s,n,r.config.markers.hover.size)}}},{key:"enlargePoints",value:function(e){for(var t=this.w,i=this,a=this.ttCtx,r=e,s=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),n=t.config.markers.hover.size,o=0;o=0){var a=this.ttCtx.tooltipUtil.getPathFromPoint(e[t],i);e[t].setAttribute("d",a)}else e[t].setAttribute("d","M0,0")}}}]),m}(),oi=function(){function m(e){R(this,m),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(m,[{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,r=e.y,s=e.type,n=this.ttCtx,o=this.w;if(t.target.classList.contains("apexcharts-".concat(s,"-rect"))){var h=this.getAttr(t,"i"),d=this.getAttr(t,"j"),c=this.getAttr(t,"cx"),g=this.getAttr(t,"cy"),f=this.getAttr(t,"width"),x=this.getAttr(t,"height");if(n.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:h,j:d,shared:!1,e:t}),o.globals.capturedSeriesIndex=h,o.globals.capturedDataPointIndex=d,a=c+n.tooltipRect.ttWidth/2+f,r=g+n.tooltipRect.ttHeight/2-x/2,n.tooltipPosition.moveXCrosshairs(c+f/2),a>o.globals.gridWidth/2&&(a=c-n.tooltipRect.ttWidth/2+f),n.w.config.tooltip.followCursor){var p=o.globals.dom.elWrap.getBoundingClientRect();a=o.globals.clientX-p.left-(a>o.globals.gridWidth/2?n.tooltipRect.ttWidth:0),r=o.globals.clientY-p.top-(r>o.globals.gridHeight/2?n.tooltipRect.ttHeight:0)}}return{x:a,y:r}}},{key:"handleMarkerTooltip",value:function(e){var t,i,a=e.e,r=e.opt,s=e.x,n=e.y,o=this.w,h=this.ttCtx;if(a.target.classList.contains("apexcharts-marker")){var d=parseInt(r.paths.getAttribute("cx"),10),c=parseInt(r.paths.getAttribute("cy"),10),g=parseFloat(r.paths.getAttribute("val"));if(i=parseInt(r.paths.getAttribute("rel"),10),t=parseInt(r.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,h.intersect){var f=P.findAncestor(r.paths,"apexcharts-series");f&&(t=parseInt(f.getAttribute("data:realIndex"),10))}if(h.tooltipLabels.drawSeriesTexts({ttItems:r.ttItems,i:t,j:i,shared:!h.showOnIntersect&&o.config.tooltip.shared,e:a}),a.type==="mouseup"&&h.markerClick(a,t,i),o.globals.capturedSeriesIndex=t,o.globals.capturedDataPointIndex=i,s=d,n=c+o.globals.translateY-1.4*h.tooltipRect.ttHeight,h.w.config.tooltip.followCursor){var x=h.getElGrid().getBoundingClientRect();n=h.e.clientY+o.globals.translateY-x.top}g<0&&(n=c),h.marker.enlargeCurrentPoint(i,r.paths,s,n)}return{x:s,y:n}}},{key:"handleBarTooltip",value:function(e){var t,i,a=e.e,r=e.opt,s=this.w,n=this.ttCtx,o=n.getElTooltip(),h=0,d=0,c=0,g=this.getBarTooltipXY({e:a,opt:r});t=g.i;var f=g.j;s.globals.capturedSeriesIndex=t,s.globals.capturedDataPointIndex=f,s.globals.isBarHorizontal&&n.tooltipUtil.hasBars()||!s.config.tooltip.shared?(d=g.x,c=g.y,i=Array.isArray(s.config.stroke.width)?s.config.stroke.width[t]:s.config.stroke.width,h=d):s.globals.comboCharts||s.config.tooltip.shared||(h/=2),isNaN(c)&&(c=s.globals.svgHeight-n.tooltipRect.ttHeight);var x=parseInt(r.paths.parentNode.getAttribute("data:realIndex"),10);if(s.globals.isMultipleYAxis?s.config.yaxis[x]&&s.config.yaxis[x].reversed:s.config.yaxis[0].reversed,d+n.tooltipRect.ttWidth>s.globals.gridWidth?d-=n.tooltipRect.ttWidth:d<0&&(d=0),n.w.config.tooltip.followCursor){var p=n.getElGrid().getBoundingClientRect();c=n.e.clientY-p.top}n.tooltip===null&&(n.tooltip=s.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),s.config.tooltip.shared||(s.globals.comboBarCount>0?n.tooltipPosition.moveXCrosshairs(h+i/2):n.tooltipPosition.moveXCrosshairs(h)),!n.fixedTooltip&&(!s.config.tooltip.shared||s.globals.isBarHorizontal&&n.tooltipUtil.hasBars())&&(c=c+s.globals.translateY-n.tooltipRect.ttHeight/2,o.style.left=d+s.globals.translateX+"px",o.style.top=c+"px")}},{key:"getBarTooltipXY",value:function(e){var t=this,i=e.e,a=e.opt,r=this.w,s=null,n=this.ttCtx,o=0,h=0,d=0,c=0,g=0,f=i.target.classList;if(f.contains("apexcharts-bar-area")||f.contains("apexcharts-candlestick-area")||f.contains("apexcharts-boxPlot-area")||f.contains("apexcharts-rangebar-area")){var x=i.target,p=x.getBoundingClientRect(),v=a.elGrid.getBoundingClientRect(),y=p.height;g=p.height;var w=p.width,l=parseInt(x.getAttribute("cx"),10),u=parseInt(x.getAttribute("cy"),10);c=parseFloat(x.getAttribute("barWidth"));var b=i.type==="touchmove"?i.touches[0].clientX:i.clientX;s=parseInt(x.getAttribute("j"),10),o=parseInt(x.parentNode.getAttribute("rel"),10)-1;var A=x.getAttribute("data-range-y1"),k=x.getAttribute("data-range-y2");r.globals.comboCharts&&(o=parseInt(x.parentNode.getAttribute("data:realIndex"),10));var S=function(L){return r.globals.isXNumeric?l-w/2:t.isVerticalGroupedRangeBar?l+w/2:l-n.dataPointsDividedWidth+w/2},C=function(){return u-n.dataPointsDividedHeight+y/2-n.tooltipRect.ttHeight/2};n.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:o,j:s,y1:A?parseInt(A,10):null,y2:k?parseInt(k,10):null,shared:!n.showOnIntersect&&r.config.tooltip.shared,e:i}),r.config.tooltip.followCursor?r.globals.isBarHorizontal?(h=b-v.left+15,d=C()):(h=S(),d=i.clientY-v.top-n.tooltipRect.ttHeight/2-15):r.globals.isBarHorizontal?((h=l)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,r=this.w,s=r.globals,n=s.seriesYAxisMap[e];if(a.yaxisTooltips[e]&&n.length>0){var o=s.yLabelFormatters[e],h=a.getElGrid().getBoundingClientRect(),d=n[0],c=0;i.yRatio.length>1&&(c=d);var g=(t-h.top)*i.yRatio[c],f=s.maxYArr[d]-s.minYArr[d],x=s.minYArr[d]+(f-g);r.config.yaxis[e].reversed&&(x=s.maxYArr[d]-(f-g)),a.tooltipPosition.moveYCrosshairs(t-h.top),a.yaxisTooltipText[e].innerHTML=o(x),a.tooltipPosition.moveYAxisTooltip(e)}}}]),m}(),ht=function(){function m(e){R(this,m),this.ctx=e,this.w=e.w;var t=this.w;this.tConfig=t.config.tooltip,this.tooltipUtil=new Lt(this),this.tooltipLabels=new ri(this),this.tooltipPosition=new Pt(this),this.marker=new ni(this),this.intersect=new oi(this),this.axesTooltip=new li(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(m,[{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(s,n){return!!(s.show&&s.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)),t.globals.dom.elWrap.appendChild(i),t.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var a=new Le(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 r=t.globals.series.length;(t.globals.xyCharts||t.globals.comboCharts)&&this.tConfig.shared&&(r=this.showOnIntersect?1:t.globals.series.length),this.legendLabels=t.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(r),this.addSVGEvents()}}},{key:"createTTElements",value:function(e){for(var t=this,i=this.w,a=[],r=this.getElTooltip(),s=function(o){var h=document.createElement("div");h.classList.add("apexcharts-tooltip-series-group","apexcharts-tooltip-series-group-".concat(o)),h.style.order=i.config.tooltip.inverseOrder?e-o:o+1;var d=document.createElement("span");d.classList.add("apexcharts-tooltip-marker"),d.style.backgroundColor=i.globals.colors[o],h.appendChild(d);var c=document.createElement("div");c.classList.add("apexcharts-tooltip-text"),c.style.fontFamily=t.tConfig.style.fontFamily||i.config.chart.fontFamily,c.style.fontSize=t.tConfig.style.fontSize,["y","goals","z"].forEach(function(g){var f=document.createElement("div");f.classList.add("apexcharts-tooltip-".concat(g,"-group"));var x=document.createElement("span");x.classList.add("apexcharts-tooltip-text-".concat(g,"-label")),f.appendChild(x);var p=document.createElement("span");p.classList.add("apexcharts-tooltip-text-".concat(g,"-value")),f.appendChild(p),c.appendChild(f)}),h.appendChild(c),r.appendChild(h),a.push(h)},n=0;n0&&this.addPathsEventListeners(x,c),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(c)}}},{key:"drawFixedTooltipRect",value:function(){var e=this.w,t=this.getElTooltip(),i=t.getBoundingClientRect(),a=i.width+10,r=i.height+10,s=this.tConfig.fixed.offsetX,n=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(s=s+e.globals.svgWidth-a+10),o.indexOf("bottom")>-1&&(n=n+e.globals.svgHeight-r-10),t.style.left=s+"px",t.style.top=n+"px",{x:s,y:n,ttWidth:a,ttHeight:r}}},{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(s){var n={paths:e[s],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(o){return e[s].addEventListener(o,i.onSeriesHover.bind(i,n),{capture:!1,passive:!0})})},r=0;r=100?this.seriesHover(e,t):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout(function(){i.seriesHover(e,t)},100-a))}},{key:"seriesHover",value:function(e,t){var i=this;this.lastHoverTime=Date.now();var a=[],r=this.w;r.config.chart.group&&(a=this.ctx.getGroupedCharts()),r.globals.axisCharts&&(r.globals.minX===-1/0&&r.globals.maxX===1/0||r.globals.dataPoints===0)||(a.length?a.forEach(function(s){var n=i.getElTooltip(s),o={paths:e.paths,tooltipEl:n,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:s.w.globals.tooltip.ttItems};s.w.globals.minX===i.w.globals.minX&&s.w.globals.maxX===i.w.globals.maxX&&s.w.globals.tooltip.seriesHoverByContext({chartCtx:s,ttCtx:s.w.globals.tooltip,opt:o,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,r=e.e,s=t.w,n=this.getElTooltip(t);n&&(i.tooltipRect={x:0,y:0,ttWidth:n.getBoundingClientRect().width,ttHeight:n.getBoundingClientRect().height},i.e=r,i.tooltipUtil.hasBars()&&!s.globals.comboCharts&&!i.isBarShared&&this.tConfig.onDatasetHover.highlightDataSeries&&new re(t).toggleSeriesOnHover(r,r.target.parentNode),i.fixedTooltip&&i.drawFixedTooltipRect(),s.globals.axisCharts?i.axisChartsTooltips({e:r,opt:a,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:r,opt:a,tooltipRect:i.tooltipRect}))}},{key:"axisChartsTooltips",value:function(e){var t,i,a=e.e,r=e.opt,s=this.w,n=r.elGrid.getBoundingClientRect(),o=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=o,s.globals.capturedSeriesIndex=-1,s.globals.capturedDataPointIndex=-1,hn.top+n.height)this.handleMouseOut(r);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!s.config.tooltip.shared){var d=parseInt(r.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(d)<0)return void this.handleMouseOut(r)}var c=this.getElTooltip(),g=this.getElXCrosshairs(),f=[];s.config.chart.group&&(f=this.ctx.getSyncedCharts());var x=s.globals.xyCharts||s.config.chart.type==="bar"&&!s.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||s.globals.comboCharts&&this.tooltipUtil.hasBars();if(a.type==="mousemove"||a.type==="touchmove"||a.type==="mouseup"){if(s.globals.collapsedSeries.length+s.globals.ancillaryCollapsedSeries.length===s.globals.series.length)return;g!==null&&g.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter(function(w){return w===!0});if(this.ycrosshairs!==null&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),x&&!this.showOnIntersect||f.length>1)this.handleStickyTooltip(a,o,h,r);else if(s.config.chart.type==="heatmap"||s.config.chart.type==="treemap"){var v=this.intersect.handleHeatTreeTooltip({e:a,opt:r,x:t,y:i,type:s.config.chart.type});t=v.x,i=v.y,c.style.left=t+"px",c.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:a,opt:r}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:a,opt:r,x:t,y:i});if(this.yaxisTooltips.length)for(var y=0;yh.width)this.handleMouseOut(a);else if(o!==null)this.handleStickyCapturedSeries(e,o,a,n);else if(this.tooltipUtil.isXoverlap(n)||r.globals.isBarHorizontal){var d=r.globals.series.findIndex(function(c,g){return!r.globals.collapsedSeriesIndices.includes(g)});this.create(e,this,d,n,a.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(e,t,i,a){var r=this.w;if(!this.tConfig.shared&&r.globals.series[t][a]===null)return void this.handleMouseOut(i);if(r.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 s=r.globals.series.findIndex(function(n,o){return!r.globals.collapsedSeriesIndices.includes(o)});this.create(e,this,s,a,i.ttItems)}}},{key:"deactivateHoverFilter",value:function(){for(var e=this.w,t=new X(this.ctx),i=e.globals.dom.Paper.select(".apexcharts-bar-area"),a=0;a5&&arguments[5]!==void 0?arguments[5]:null,k=this.w,S=t;e.type==="mouseup"&&this.markerClick(e,i,a),A===null&&(A=this.tConfig.shared);var C=this.tooltipUtil.hasMarkers(i),L=this.tooltipUtil.getElBars();if(k.config.legend.tooltipHoverFormatter){var M=k.config.legend.tooltipHoverFormatter,T=Array.from(this.legendLabels);T.forEach(function(q){var Z=q.getAttribute("data:default-text");q.innerHTML=decodeURIComponent(Z)});for(var I=0;I0?S.marker.enlargePoints(a):S.tooltipPosition.moveDynamicPointsOnHover(a);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(L),this.barSeriesHeight>0)){var B=new X(this.ctx),N=k.globals.dom.Paper.select(".apexcharts-bar-area[j='".concat(a,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(a,i);for(var W=0;W0&&t.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(f-=d*k)),A&&(f=f+g.height/2-w/2-2);var C=t.globals.series[i][a]<0,L=o;switch(this.barCtx.isReversed&&(L=o+(C?c:-c)),v.position){case"center":x=A?C?L-c/2+u:L+c/2-u:C?L-c/2+g.height/2+u:L+c/2+g.height/2-u;break;case"bottom":x=A?C?L-c+u:L+c-u:C?L-c+g.height+w+u:L+c-g.height/2+w-u;break;case"top":x=A?C?L+u:L-u:C?L-g.height/2-u:L+g.height+u}if(this.barCtx.lastActiveBarSerieIndex===r&&y.enabled){var M=new X(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:a}),p.fontSize);s=C?L-M.height/2-u-y.offsetY+18:L+M.height+u+y.offsetY-18;var T=S;n=b+(t.globals.isXNumeric?-d*t.globals.barGroups.length/2:t.globals.barGroups.length*d/2-(t.globals.barGroups.length-1)*d-T)+y.offsetX}return t.config.chart.stacked||(x<0?x=0+w:x+g.height/3>t.globals.gridHeight&&(x=t.globals.gridHeight-w)),{bcx:h,bcy:o,dataLabelsX:f,dataLabelsY:x,totalDataLabelsX:n,totalDataLabelsY:s,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(e){var t=this.w,i=e.x,a=e.i,r=e.j,s=e.realIndex,n=e.bcy,o=e.barHeight,h=e.barWidth,d=e.textRects,c=e.dataLabelsX,g=e.strokeWidth,f=e.dataLabelsConfig,x=e.barDataLabelsConfig,p=e.barTotalDataLabelsConfig,v=e.offX,y=e.offY,w=t.globals.gridHeight/t.globals.dataPoints;h=Math.abs(h);var l,u,b=n-(this.barCtx.isRangeBar?0:w)+o/2+d.height/2+y-3,A="start",k=t.globals.series[a][r]<0,S=i;switch(this.barCtx.isReversed&&(S=i+(k?-h:h),A=k?"start":"end"),x.position){case"center":c=k?S+h/2-v:Math.max(d.width/2,S-h/2)+v;break;case"bottom":c=k?S+h-g-v:S-h+g+v;break;case"top":c=k?S-g-v:S-g+v}if(this.barCtx.lastActiveBarSerieIndex===s&&p.enabled){var C=new X(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:s,j:r}),f.fontSize);k?(l=S-g-v-p.offsetX,A="end"):l=S+v+p.offsetX+(this.barCtx.isReversed?-(h+g):g),u=b-d.height/2+C.height/2+p.offsetY+g}return t.config.chart.stacked||(f.textAnchor==="start"?c-d.width<0?c=k?d.width+g:g:c+d.width>t.globals.gridWidth&&(c=k?t.globals.gridWidth-g:t.globals.gridWidth-d.width-g):f.textAnchor==="middle"?c-d.width/2<0?c=d.width/2+g:c+d.width/2>t.globals.gridWidth&&(c=t.globals.gridWidth-d.width/2-g):f.textAnchor==="end"&&(c<1?c=d.width+g:c+1>t.globals.gridWidth&&(c=t.globals.gridWidth-d.width-g))),{bcx:i,bcy:n,dataLabelsX:c,dataLabelsY:b,totalDataLabelsX:l,totalDataLabelsY:u,totalDataLabelsAnchor:A}}},{key:"drawCalculatedDataLabels",value:function(e){var t=e.x,i=e.y,a=e.val,r=e.i,s=e.j,n=e.textRects,o=e.barHeight,h=e.barWidth,d=e.dataLabelsConfig,c=this.w,g="rotate(0)";c.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(g="rotate(-90, ".concat(t,", ").concat(i,")"));var f=new xe(this.barCtx.ctx),x=new X(this.barCtx.ctx),p=d.formatter,v=null,y=c.globals.collapsedSeriesIndices.indexOf(r)>-1;if(d.enabled&&!y){v=x.group({class:"apexcharts-data-labels",transform:g});var w="";a!==void 0&&(w=p(a,E(E({},c),{},{seriesIndex:r,dataPointIndex:s,w:c}))),!a&&c.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(w="");var l=c.globals.series[r][s]<0,u=c.config.plotOptions.bar.dataLabels.position;c.config.plotOptions.bar.dataLabels.orientation==="vertical"&&(u==="top"&&(d.textAnchor=l?"end":"start"),u==="center"&&(d.textAnchor="middle"),u==="bottom"&&(d.textAnchor=l?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&hMath.abs(h)&&(w=""):n.height/1.6>Math.abs(o)&&(w=""));var b=E({},d);this.barCtx.isHorizontal&&a<0&&(d.textAnchor==="start"?b.textAnchor="end":d.textAnchor==="end"&&(b.textAnchor="start")),f.plotDataLabelsText({x:t,y:i,text:w,i:r,j:s,parent:v,dataLabelsConfig:b,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return v}},{key:"drawTotalDataLabels",value:function(e){var t=e.x,i=e.y,a=e.val,r=e.realIndex,s=e.textAnchor,n=e.barTotalDataLabelsConfig;this.w;var o,h=new X(this.barCtx.ctx);return n.enabled&&t!==void 0&&i!==void 0&&this.barCtx.lastActiveBarSerieIndex===r&&(o=h.drawText({x:t,y:i,foreColor:n.style.color,text:a,textAnchor:s,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight})),o}}]),m}(),ci=function(){function m(e){R(this,m),this.w=e.w,this.barCtx=e}return F(m,[{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&&(a=h.globals.minXDiff/g),(s=a/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(s=1)}String(this.barCtx.barOptions.columnWidth).indexOf("%")===-1&&(s=parseInt(this.barCtx.barOptions.columnWidth,10)),n=h.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?h.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),e=h.globals.padHorizontal+(a-s*this.barCtx.seriesLen)/2}return h.globals.barHeight=r,h.globals.barWidth=s,{x:e,y:t,yDivision:i,xDivision:a,barHeight:r,barWidth:s,zeroH:n,zeroW:o}}},{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 r,s,n,o,h,d=this.w,c=this.barCtx.ctx.fill,g=null,f=this.barCtx.barOptions.distributed?i:t;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map(function(x){e[t][i]>=x.from&&e[t][i]<=x.to&&(g=x.color)}),(r=d.config.series[t].data[i])!==null&&r!==void 0&&r.fillColor&&(g=d.config.series[t].data[i].fillColor),c.fillPath({seriesNumber:this.barCtx.barOptions.distributed?f:a,dataPointIndex:i,color:g,value:e[t][i],fillConfig:(s=d.config.series[t].data[i])===null||s===void 0?void 0:s.fill,fillType:(n=d.config.series[t].data[i])!==null&&n!==void 0&&(o=n.fill)!==null&&o!==void 0&&o.type?(h=d.config.series[t].data[i])===null||h===void 0?void 0:h.fill.type:Array.isArray(d.config.fill.type)?d.config.fill.type[a]:d.config.fill.type})}},{key:"getStrokeWidth",value:function(e,t,i){var a=0,r=this.w;return this.barCtx.series[e][t]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,r.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=this.w,i=!this.w.config.chart.stacked||t.config.plotOptions.bar.borderRadiusWhenStacked!=="last"||t.config.plotOptions.bar.borderRadius<=0,a=e.length,r=e[0].length,s=Array.from({length:a},function(){return Array(r).fill(i?"top":"none")});if(i)return s;for(var n=0;n0?(o.push(c),d++):g<0&&(h.push(c),d++)}if(o.length>0&&h.length===0)if(o.length===1)s[o[0]][n]="both";else{var f,x=o[0],p=o[o.length-1],v=Te(o);try{for(v.s();!(f=v.n()).done;){var y=f.value;s[y][n]=y===x?"bottom":y===p?"top":"none"}}catch(Y){v.e(Y)}finally{v.f()}}else if(h.length>0&&o.length===0)if(h.length===1)s[h[0]][n]="both";else{var w,l=h[0],u=h[h.length-1],b=Te(h);try{for(b.s();!(w=b.n()).done;){var A=w.value;s[A][n]=A===l?"bottom":A===u?"top":"none"}}catch(Y){b.e(Y)}finally{b.f()}}else if(o.length>0&&h.length>0){var k,S=o[o.length-1],C=Te(o);try{for(C.s();!(k=C.n()).done;){var L=k.value;s[L][n]=L===S?"top":"none"}}catch(Y){C.e(Y)}finally{C.f()}var M,T=h[h.length-1],I=Te(h);try{for(I.s();!(M=I.n()).done;){var z=M.value;s[z][n]=z===T?"bottom":"none"}}catch(Y){I.e(Y)}finally{I.f()}}else d===1&&(s[o[0]||h[0]][n]="both")}return s}},{key:"barBackground",value:function(e){var t=e.j,i=e.i,a=e.x1,r=e.x2,s=e.y1,n=e.y2,o=e.elSeries,h=this.w,d=new X(this.barCtx.ctx),c=new re(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&c===i){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);var g=this.barCtx.barOptions.colors.backgroundBarColors[t],f=d.drawRect(a!==void 0?a:0,s!==void 0?s:0,r!==void 0?r:h.globals.gridWidth,n!==void 0?n:h.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,g,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(f),f.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(e){var t,i=e.barWidth,a=e.barXPosition,r=e.y1,s=e.y2,n=e.strokeWidth,o=e.isReversed,h=e.series,d=e.seriesGroup,c=e.realIndex,g=e.i,f=e.j,x=e.w,p=new X(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var v=i,y=a;(t=x.config.series[c].data[f])!==null&&t!==void 0&&t.columnWidthOffset&&(y=a-x.config.series[c].data[f].columnWidthOffset/2,v=i+x.config.series[c].data[f].columnWidthOffset);var w=n/2,l=y+w,u=y+v-w,b=(h[g][f]>=0?1:-1)*(o?-1:1);r+=.001-w*b,s+=.001+w*b;var A=p.move(l,r),k=p.move(l,r),S=p.line(u,r);if(x.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,f,!1)),A=A+p.line(l,s)+p.line(u,s)+S+(x.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[c][f]==="both"?" Z":" z"),k=k+p.line(l,r)+S+S+S+S+S+p.line(l,r)+(x.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[c][f]==="both"?" Z":" z"),this.arrBorderRadius[c][f]!=="none"&&(A=p.roundPathCorners(A,x.config.plotOptions.bar.borderRadius)),x.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[d]).yArrj.push(s-w*b),C.yArrjF.push(Math.abs(r-s+n*b)),C.yArrjVal.push(this.barCtx.series[g][f])}return{pathTo:A,pathFrom:k}}},{key:"getBarpaths",value:function(e){var t,i=e.barYPosition,a=e.barHeight,r=e.x1,s=e.x2,n=e.strokeWidth,o=e.isReversed,h=e.series,d=e.seriesGroup,c=e.realIndex,g=e.i,f=e.j,x=e.w,p=new X(this.barCtx.ctx);(n=Array.isArray(n)?n[c]:n)||(n=0);var v=i,y=a;(t=x.config.series[c].data[f])!==null&&t!==void 0&&t.barHeightOffset&&(v=i-x.config.series[c].data[f].barHeightOffset/2,y=a+x.config.series[c].data[f].barHeightOffset);var w=n/2,l=v+w,u=v+y-w,b=(h[g][f]>=0?1:-1)*(o?-1:1);r+=.001+w*b,s+=.001-w*b;var A=p.move(r,l),k=p.move(r,l);x.globals.previousPaths.length>0&&(k=this.barCtx.getPreviousPath(c,f,!1));var S=p.line(r,u);if(A=A+p.line(s,l)+p.line(s,u)+S+(x.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[c][f]==="both"?" Z":" z"),k=k+p.line(r,l)+S+S+S+S+S+p.line(r,l)+(x.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[c][f]==="both"?" Z":" z"),this.arrBorderRadius[c][f]!=="none"&&(A=p.roundPathCorners(A,x.config.plotOptions.bar.borderRadius)),x.config.chart.stacked){var C=this.barCtx;(C=this.barCtx[d]).xArrj.push(s+w*b),C.xArrjF.push(Math.abs(r-s-n*b)),C.xArrjVal.push(this.barCtx.series[g][f])}return{pathTo:A,pathFrom:k}}},{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,r,s){var n=this,o=this.w,h=[],d=function(f,x){var p;h.push((ze(p={},e,e==="x"?n.getXForValue(f,t,!1):n.getYForValue(f,i,s,!1)),ze(p,"attrs",x),p))};if(o.globals.seriesGoals[a]&&o.globals.seriesGoals[a][r]&&Array.isArray(o.globals.seriesGoals[a][r])&&o.globals.seriesGoals[a][r].forEach(function(f){d(f.value,f)}),this.barCtx.barOptions.isDumbbell&&o.globals.seriesRange.length){var c=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:o.globals.colors,g={strokeHeight:e==="x"?0:o.globals.markers.size[a],strokeWidth:e==="x"?o.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(c[a])?c[a][0]:c[a]};d(o.globals.seriesRangeStart[a][r],g),d(o.globals.seriesRangeEnd[a][r],E(E({},g),{},{strokeColor:Array.isArray(c[a])?c[a][1]:c[a]}))}return h}},{key:"drawGoalLine",value:function(e){var t=e.barXPosition,i=e.barYPosition,a=e.goalX,r=e.goalY,s=e.barWidth,n=e.barHeight,o=new X(this.barCtx.ctx),h=o.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 d=null;return this.barCtx.isHorizontal?Array.isArray(a)&&a.forEach(function(c){if(c.x>=-1&&c.x<=o.w.globals.gridWidth+1){var g=c.attrs.strokeHeight!==void 0?c.attrs.strokeHeight:n/2,f=i+g+n/2;d=o.drawLine(c.x,f-2*g,c.x,f,c.attrs.strokeColor?c.attrs.strokeColor:void 0,c.attrs.strokeDashArray,c.attrs.strokeWidth?c.attrs.strokeWidth:2,c.attrs.strokeLineCap),h.add(d)}}):Array.isArray(r)&&r.forEach(function(c){if(c.y>=-1&&c.y<=o.w.globals.gridHeight+1){var g=c.attrs.strokeWidth!==void 0?c.attrs.strokeWidth:s/2,f=t+g+s/2;d=o.drawLine(f-2*g,c.y,f,c.y,c.attrs.strokeColor?c.attrs.strokeColor:void 0,c.attrs.strokeDashArray,c.attrs.strokeHeight?c.attrs.strokeHeight:2,c.attrs.strokeLineCap),h.add(d)}}),h}},{key:"drawBarShadow",value:function(e){var t=e.prevPaths,i=e.currPaths,a=e.color,r=this.w,s=t.x,n=t.x1,o=t.barYPosition,h=i.x,d=i.x1,c=i.barYPosition,g=o+i.barHeight,f=new X(this.barCtx.ctx),x=new P,p=f.move(n,g)+f.line(s,g)+f.line(h,c)+f.line(d,c)+f.line(n,g)+(r.config.plotOptions.bar.borderRadiusApplication==="around"||this.arrBorderRadius[realIndex][j]==="both"?" Z":" z");return f.drawPath({d:p,fill:x.shadeColor(.5,P.rgb2hex(a)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadows"})}},{key:"getZeroValueEncounters",value:function(e){var t,i=e.i,a=e.j,r=this.w,s=0,n=0;return(r.config.plotOptions.bar.horizontal?r.globals.series.map(function(o,h){return h}):((t=r.globals.columnSeries)===null||t===void 0?void 0:t.i.map(function(o){return o}))||[]).forEach(function(o){var h=r.globals.seriesPercent[o][a];h&&s++,o-1}),a=this.barCtx.columnGroupIndices,r=a.indexOf(i);return r<0&&(a.push(i),r=a.length-1),{groupIndex:i,columnGroupIndex:r}}}]),m}(),be=function(){function m(e,t){R(this,m),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 re(this.ctx);this.lastActiveBarSerieIndex=a.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];var r=a.getBarSeriesIndices(),s=new $(this.ctx);this.stackedSeriesTotals=s.getStackedSeriesTotals(this.w.config.series.map(function(n,o){return r.indexOf(o)===-1?o:-1}).filter(function(n){return n!==-1})),this.barHelpers=new ci(this)}return F(m,[{key:"draw",value:function(e,t){var i=this.w,a=new X(this.ctx),r=new $(this.ctx,i);e=r.getLogSeries(e),this.series=e,this.yRatio=r.getLogYRatios(this.yRatio),this.barHelpers.initVariables(e);var s=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 n=0,o=0;n0&&(this.visibleI=this.visibleI+1);var u=0,b=0;this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[y],this.translationsIndex=y);var A=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var k=this.barHelpers.initialPositions();x=k.y,u=k.barHeight,d=k.yDivision,g=k.zeroW,f=k.x,b=k.barWidth,h=k.xDivision,c=k.zeroH,this.horizontal||v.push(f+b/2);var S=a.group({class:"apexcharts-datalabels","data:realIndex":y});i.globals.delayedElements.push({el:S.node}),S.node.classList.add("apexcharts-element-hidden");var C=a.group({class:"apexcharts-bar-goals-markers"}),L=a.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:L.node}),L.node.classList.add("apexcharts-element-hidden");for(var M=0;M0){var D=this.barHelpers.drawBarShadow({color:typeof Y=="string"&&(Y==null?void 0:Y.indexOf("url"))===-1?Y:P.hexToRgba(i.globals.colors[n]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:I});D&&L.add(D)}this.pathArr.push(I);var H=this.barHelpers.drawGoalLine({barXPosition:I.barXPosition,barYPosition:I.barYPosition,goalX:I.goalX,goalY:I.goalY,barHeight:u,barWidth:b});H&&C.add(H),x=I.y,f=I.x,M>0&&v.push(f+b/2),p.push(x),this.renderSeries({realIndex:y,pathFill:Y,j:M,i:n,columnGroupIndex:w,pathFrom:I.pathFrom,pathTo:I.pathTo,strokeWidth:T,elSeries:l,x:f,y:x,series:e,barHeight:Math.abs(I.barHeight?I.barHeight:u),barWidth:Math.abs(I.barWidth?I.barWidth:b),elDataLabelsWrap:S,elGoalsMarkers:C,elBarShadows:L,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[y]=v,i.globals.seriesYvalues[y]=p,s.add(l)}return s}},{key:"renderSeries",value:function(e){var t=e.realIndex,i=e.pathFill,a=e.lineFill,r=e.j,s=e.i,n=e.columnGroupIndex,o=e.pathFrom,h=e.pathTo,d=e.strokeWidth,c=e.elSeries,g=e.x,f=e.y,x=e.y1,p=e.y2,v=e.series,y=e.barHeight,w=e.barWidth,l=e.barXPosition,u=e.barYPosition,b=e.elDataLabelsWrap,A=e.elGoalsMarkers,k=e.elBarShadows,S=e.visibleSeries,C=e.type,L=e.classes,M=this.w,T=new X(this.ctx);if(!a){var I=typeof M.globals.stroke.colors[t]=="function"?function(O){var B,N=M.config.stroke.colors;return Array.isArray(N)&&N.length>0&&((B=N[O])||(B=""),typeof B=="function")?B({value:M.globals.series[O][r],dataPointIndex:r,w:M}):B}(t):M.globals.stroke.colors[t];a=this.barOptions.distributed?M.globals.stroke.colors[r]:I}M.config.series[s].data[r]&&M.config.series[s].data[r].strokeColor&&(a=M.config.series[s].data[r].strokeColor),this.isNullValue&&(i="none");var z=r/M.config.chart.animations.animateGradually.delay*(M.config.chart.animations.speed/M.globals.dataPoints)/2.4,Y=T.renderPaths({i:s,j:r,realIndex:t,pathFrom:o,pathTo:h,stroke:a,strokeWidth:d,strokeLineCap:M.config.stroke.lineCap,fill:i,animationDelay:z,initialSpeed:M.config.chart.animations.speed,dataChangeSpeed:M.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(C,"-area ").concat(L),chartType:C});Y.attr("clip-path","url(#gridRectBarMask".concat(M.globals.cuid,")"));var D=M.config.forecastDataPoints;D.count>0&&r>=M.globals.dataPoints-D.count&&(Y.node.setAttribute("stroke-dasharray",D.dashArray),Y.node.setAttribute("stroke-width",D.strokeWidth),Y.node.setAttribute("fill-opacity",D.fillOpacity)),x!==void 0&&p!==void 0&&(Y.attr("data-range-y1",x),Y.attr("data-range-y2",p)),new ie(this.ctx).setSelectionFilter(Y,t,r),c.add(Y);var H=new hi(this).handleBarDataLabels({x:g,y:f,y1:x,y2:p,i:s,j:r,series:v,realIndex:t,columnGroupIndex:n,barHeight:y,barWidth:w,barXPosition:l,barYPosition:u,renderedPath:Y,visibleSeries:S});return H.dataLabels!==null&&b.add(H.dataLabels),H.totalDataLabels&&b.add(H.totalDataLabels),c.add(b),A&&c.add(A),k&&c.add(k),c}},{key:"drawBarPaths",value:function(e){var t,i=e.indexes,a=e.barHeight,r=e.strokeWidth,s=e.zeroW,n=e.x,o=e.y,h=e.yDivision,d=e.elSeries,c=this.w,g=i.i,f=i.j;if(c.globals.isXNumeric)t=(o=(c.globals.seriesX[g][f]-c.globals.minX)/this.invertedXRatio-a)+a*this.visibleI;else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var x=0,p=0;c.globals.seriesPercent.forEach(function(y,w){y[f]&&x++,w0&&(a=this.seriesLen*a/x),t=o+a*this.visibleI,t-=a*p}else t=o+a*this.visibleI;this.isFunnel&&(s-=(this.barHelpers.getXForValue(this.series[g][f],s)-s)/2),n=this.barHelpers.getXForValue(this.series[g][f],s);var v=this.barHelpers.getBarpaths({barYPosition:t,barHeight:a,x1:s,x2:n,strokeWidth:r,isReversed:this.isReversed,series:this.series,realIndex:i.realIndex,i:g,j:f,w:c});return c.globals.isXNumeric||(o+=h),this.barHelpers.barBackground({j:f,i:g,y1:t-a*this.visibleI,y2:a*this.seriesLen,elSeries:d}),{pathTo:v.pathTo,pathFrom:v.pathFrom,x1:s,x:n,y:o,goalX:this.barHelpers.getGoalValues("x",s,null,g,f),barYPosition:t,barHeight:a}}},{key:"drawColumnPaths",value:function(e){var t,i=e.indexes,a=e.x,r=e.y,s=e.xDivision,n=e.barWidth,o=e.zeroH,h=e.strokeWidth,d=e.elSeries,c=this.w,g=i.realIndex,f=i.translationsIndex,x=i.i,p=i.j,v=i.bc;if(c.globals.isXNumeric){var y=this.getBarXForNumericXAxis({x:a,j:p,realIndex:g,barWidth:n});a=y.x,t=y.barXPosition}else if(c.config.plotOptions.bar.hideZeroBarsWhenGrouped){var w=this.barHelpers.getZeroValueEncounters({i:x,j:p}),l=w.nonZeroColumns,u=w.zeroEncounters;l>0&&(n=this.seriesLen*n/l),t=a+n*this.visibleI,t-=n*u}else t=a+n*this.visibleI;r=this.barHelpers.getYForValue(this.series[x][p],o,f);var b=this.barHelpers.getColumnPaths({barXPosition:t,barWidth:n,y1:o,y2:r,strokeWidth:h,isReversed:this.isReversed,series:this.series,realIndex:g,i:x,j:p,w:c});return c.globals.isXNumeric||(a+=s),this.barHelpers.barBackground({bc:v,j:p,i:x,x1:t-h/2-n*this.visibleI,x2:n*this.seriesLen+h/2,elSeries:d}),{pathTo:b.pathTo,pathFrom:b.pathFrom,x:a,y:r,goalY:this.barHelpers.getGoalValues("y",null,o,x,p,f),barXPosition:t,barWidth:n}}},{key:"getBarXForNumericXAxis",value:function(e){var t=e.x,i=e.barWidth,a=e.realIndex,r=e.j,s=this.w,n=a;return s.globals.seriesX[a].length||(n=s.globals.maxValsInArrayIndex),s.globals.seriesX[n][r]&&(t=(s.globals.seriesX[n][r]-s.globals.minX)/this.xRatio-i*this.seriesLen/2),{barXPosition:t+i*this.visibleI,x:t}}},{key:"getPreviousPath",value:function(e,t){for(var i,a=this.w,r=0;r0&&parseInt(s.realIndex,10)===parseInt(e,10)&&a.globals.previousPaths[r].paths[t]!==void 0&&(i=a.globals.previousPaths[r].paths[t].d)}return i}}]),m}(),ct=function(m){Me(t,be);var e=Pe(t);function t(){return R(this,t),e.apply(this,arguments)}return F(t,[{key:"draw",value:function(i,a){var r=this,s=this.w;this.graphics=new X(this.ctx),this.bar=new be(this.ctx,this.xyRatios);var n=new $(this.ctx,s);i=n.getLogSeries(i),this.yRatio=n.getLogYRatios(this.yRatio),this.barHelpers.initVariables(i),s.config.chart.stackType==="100%"&&(i=s.globals.comboCharts?a.map(function(x){return s.globals.seriesPercent[x]}):s.globals.seriesPercent.slice()),this.series=i,this.barHelpers.initializeStackedPrevVars(this);for(var o=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),h=0,d=0,c=function(x,p){var v=void 0,y=void 0,w=void 0,l=void 0,u=s.globals.comboCharts?a[x]:x,b=r.barHelpers.getGroupIndex(u),A=b.groupIndex,k=b.columnGroupIndex;r.groupCtx=r[s.globals.seriesGroups[A]];var S=[],C=[],L=0;r.yRatio.length>1&&(r.yaxisIndex=s.globals.seriesYAxisReverseMap[u][0],L=u),r.isReversed=s.config.yaxis[r.yaxisIndex]&&s.config.yaxis[r.yaxisIndex].reversed;var M=r.graphics.group({class:"apexcharts-series",seriesName:P.escapeString(s.globals.seriesNames[u]),rel:x+1,"data:realIndex":u});r.ctx.series.addCollapsedClassToSeries(M,u);var T=r.graphics.group({class:"apexcharts-datalabels","data:realIndex":u}),I=r.graphics.group({class:"apexcharts-bar-goals-markers"}),z=0,Y=0,D=r.initialPositions(h,d,v,y,w,l,L);d=D.y,z=D.barHeight,y=D.yDivision,l=D.zeroW,h=D.x,Y=D.barWidth,v=D.xDivision,w=D.zeroH,s.globals.barHeight=z,s.globals.barWidth=Y,r.barHelpers.initializeStackedXYVars(r),r.groupCtx.prevY.length===1&&r.groupCtx.prevY[0].every(function(U){return isNaN(U)})&&(r.groupCtx.prevY[0]=r.groupCtx.prevY[0].map(function(){return w}),r.groupCtx.prevYF[0]=r.groupCtx.prevYF[0].map(function(){return 0}));for(var H=0;H0&&(Z="apexcharts-flip-x"):r.barHelpers.arrBorderRadius[u][H]==="bottom"&&s.globals.series[u][H]>0&&(Z="apexcharts-flip-y"),M=r.renderSeries({realIndex:u,pathFill:q,j:H,i:x,columnGroupIndex:k,pathFrom:N.pathFrom,pathTo:N.pathTo,strokeWidth:O,elSeries:M,x:h,y:d,series:i,barHeight:z,barWidth:Y,elDataLabelsWrap:T,elGoalsMarkers:I,type:"bar",visibleSeries:k,classes:Z})}s.globals.seriesXvalues[u]=S,s.globals.seriesYvalues[u]=C,r.groupCtx.prevY.push(r.groupCtx.yArrj),r.groupCtx.prevYF.push(r.groupCtx.yArrjF),r.groupCtx.prevYVal.push(r.groupCtx.yArrjVal),r.groupCtx.prevX.push(r.groupCtx.xArrj),r.groupCtx.prevXF.push(r.groupCtx.xArrjF),r.groupCtx.prevXVal.push(r.groupCtx.xArrjVal),o.add(M)},g=0,f=0;g1?c=(r=g.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:String(x).indexOf("%")===-1?c=parseInt(x,10):c*=parseInt(x,10)/100,n=this.isReversed?this.baseLineY[h]:g.globals.gridHeight-this.baseLineY[h],i=g.globals.padHorizontal+(r-c)/2}var p=g.globals.barGroups.length||1;return{x:i,y:a,yDivision:s,xDivision:r,barHeight:d/p,barWidth:c/p,zeroH:n,zeroW:o}}},{key:"drawStackedBarPaths",value:function(i){for(var a,r=i.indexes,s=i.barHeight,n=i.strokeWidth,o=i.zeroW,h=i.x,d=i.y,c=i.columnGroupIndex,g=i.seriesGroup,f=i.yDivision,x=i.elSeries,p=this.w,v=d+c*s,y=r.i,w=r.j,l=r.realIndex,u=r.translationsIndex,b=0,A=0;A0){var S=o;this.groupCtx.prevXVal[k-1][w]<0?S=this.series[y][w]>=0?this.groupCtx.prevX[k-1][w]+b-2*(this.isReversed?b:0):this.groupCtx.prevX[k-1][w]:this.groupCtx.prevXVal[k-1][w]>=0&&(S=this.series[y][w]>=0?this.groupCtx.prevX[k-1][w]:this.groupCtx.prevX[k-1][w]-b+2*(this.isReversed?b:0)),a=S}else a=o;h=this.series[y][w]===null?a:a+this.series[y][w]/this.invertedYRatio-2*(this.isReversed?this.series[y][w]/this.invertedYRatio:0);var C=this.barHelpers.getBarpaths({barYPosition:v,barHeight:s,x1:a,x2:h,strokeWidth:n,isReversed:this.isReversed,series:this.series,realIndex:r.realIndex,seriesGroup:g,i:y,j:w,w:p});return this.barHelpers.barBackground({j:w,i:y,y1:v,y2:s,elSeries:x}),d+=f,{pathTo:C.pathTo,pathFrom:C.pathFrom,goalX:this.barHelpers.getGoalValues("x",o,null,y,w,u),barXPosition:a,barYPosition:v,x:h,y:d}}},{key:"drawStackedColumnPaths",value:function(i){var a=i.indexes,r=i.x,s=i.y,n=i.xDivision,o=i.barWidth,h=i.zeroH,d=i.columnGroupIndex,c=i.seriesGroup,g=i.elSeries,f=this.w,x=a.i,p=a.j,v=a.bc,y=a.realIndex,w=a.translationsIndex;if(f.globals.isXNumeric){var l=f.globals.seriesX[y][p];l||(l=0),r=(l-f.globals.minX)/this.xRatio-o/2*f.globals.barGroups.length}for(var u,b=r+d*o,A=0,k=0;k0&&!f.globals.isXNumeric||S>0&&f.globals.isXNumeric&&f.globals.seriesX[y-1][p]===f.globals.seriesX[y][p]){var C,L,M,T=Math.min(this.yRatio.length+1,y+1);if(this.groupCtx.prevY[S-1]!==void 0&&this.groupCtx.prevY[S-1].length)for(var I=1;I=0?M-A+2*(this.isReversed?A:0):M;break}if(((H=this.groupCtx.prevYVal[S-Y])===null||H===void 0?void 0:H[p])>=0){L=this.series[x][p]>=0?M:M+A-2*(this.isReversed?A:0);break}}L===void 0&&(L=f.globals.gridHeight),u=(C=this.groupCtx.prevYF[0])!==null&&C!==void 0&&C.every(function(B){return B===0})&&this.groupCtx.prevYF.slice(1,S).every(function(B){return B.every(function(N){return isNaN(N)})})?h:L}else u=h;s=this.series[x][p]?u-this.series[x][p]/this.yRatio[w]+2*(this.isReversed?this.series[x][p]/this.yRatio[w]:0):u;var O=this.barHelpers.getColumnPaths({barXPosition:b,barWidth:o,y1:u,y2:s,yRatio:this.yRatio[w],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:c,realIndex:a.realIndex,i:x,j:p,w:f});return this.barHelpers.barBackground({bc:v,j:p,i:x,x1:b,x2:o,elSeries:g}),{pathTo:O.pathTo,pathFrom:O.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,h,x,p),barXPosition:b,x:f.globals.isXNumeric?r:r+n,y:s}}}]),t}(),Ne=function(m){Me(t,be);var e=Pe(t);function t(){return R(this,t),e.apply(this,arguments)}return F(t,[{key:"draw",value:function(i,a,r){var s=this,n=this.w,o=new X(this.ctx),h=n.globals.comboCharts?a:n.config.chart.type,d=new oe(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=n.config.plotOptions.bar.horizontal;var c=new $(this.ctx,n);i=c.getLogSeries(i),this.series=i,this.yRatio=c.getLogYRatios(this.yRatio),this.barHelpers.initVariables(i);for(var g=o.group({class:"apexcharts-".concat(h,"-series apexcharts-plot-series")}),f=function(p){s.isBoxPlot=n.config.chart.type==="boxPlot"||n.config.series[p].type==="boxPlot";var v,y,w,l,u=void 0,b=void 0,A=[],k=[],S=n.globals.comboCharts?r[p]:p,C=s.barHelpers.getGroupIndex(S).columnGroupIndex,L=o.group({class:"apexcharts-series",seriesName:P.escapeString(n.globals.seriesNames[S]),rel:p+1,"data:realIndex":S});s.ctx.series.addCollapsedClassToSeries(L,S),i[p].length>0&&(s.visibleI=s.visibleI+1);var M,T,I=0;s.yRatio.length>1&&(s.yaxisIndex=n.globals.seriesYAxisReverseMap[S][0],I=S);var z=s.barHelpers.initialPositions();b=z.y,M=z.barHeight,y=z.yDivision,l=z.zeroW,u=z.x,T=z.barWidth,v=z.xDivision,w=z.zeroH,k.push(u+T/2);for(var Y=o.group({class:"apexcharts-datalabels","data:realIndex":S}),D=function(O){var B=s.barHelpers.getStrokeWidth(p,O,S),N=null,W={indexes:{i:p,j:O,realIndex:S,translationsIndex:I},x:u,y:b,strokeWidth:B,elSeries:L};N=s.isHorizontal?s.drawHorizontalBoxPaths(E(E({},W),{},{yDivision:y,barHeight:M,zeroW:l})):s.drawVerticalBoxPaths(E(E({},W),{},{xDivision:v,barWidth:T,zeroH:w})),b=N.y,u=N.x,O>0&&k.push(u+T/2),A.push(b),N.pathTo.forEach(function(q,Z){var U=!s.isBoxPlot&&s.candlestickOptions.wick.useFillColor?N.color[Z]:n.globals.stroke.colors[p],se=d.fillPath({seriesNumber:S,dataPointIndex:O,color:N.color[Z],value:i[p][O]});s.renderSeries({realIndex:S,pathFill:se,lineFill:U,j:O,i:p,pathFrom:N.pathFrom,pathTo:q,strokeWidth:B,elSeries:L,x:u,y:b,series:i,columnGroupIndex:C,barHeight:M,barWidth:T,elDataLabelsWrap:Y,visibleSeries:s.visibleI,type:n.config.chart.type})})},H=0;Hu.c&&(x=!1);var k=Math.min(u.o,u.c),S=Math.max(u.o,u.c),C=u.m;d.globals.isXNumeric&&(r=(d.globals.seriesX[l][f]-d.globals.minX)/this.xRatio-n/2);var L=r+n*this.visibleI;this.series[g][f]===void 0||this.series[g][f]===null?(k=o,S=o):(k=o-k/w,S=o-S/w,b=o-u.h/w,A=o-u.l/w,C=o-u.m/w);var M=c.move(L,o),T=c.move(L+n/2,k);return d.globals.previousPaths.length>0&&(T=this.getPreviousPath(l,f,!0)),M=this.isBoxPlot?[c.move(L,k)+c.line(L+n/2,k)+c.line(L+n/2,b)+c.line(L+n/4,b)+c.line(L+n-n/4,b)+c.line(L+n/2,b)+c.line(L+n/2,k)+c.line(L+n,k)+c.line(L+n,C)+c.line(L,C)+c.line(L,k+h/2),c.move(L,C)+c.line(L+n,C)+c.line(L+n,S)+c.line(L+n/2,S)+c.line(L+n/2,A)+c.line(L+n-n/4,A)+c.line(L+n/4,A)+c.line(L+n/2,A)+c.line(L+n/2,S)+c.line(L,S)+c.line(L,C)+"z"]:[c.move(L,S)+c.line(L+n/2,S)+c.line(L+n/2,b)+c.line(L+n/2,S)+c.line(L+n,S)+c.line(L+n,k)+c.line(L+n/2,k)+c.line(L+n/2,A)+c.line(L+n/2,k)+c.line(L,k)+c.line(L,S-h/2)],T+=c.move(L,k),d.globals.isXNumeric||(r+=s),{pathTo:M,pathFrom:T,x:r,y:S,barXPosition:L,color:this.isBoxPlot?y:x?[p]:[v]}}},{key:"drawHorizontalBoxPaths",value:function(i){var a=i.indexes;i.x;var r=i.y,s=i.yDivision,n=i.barHeight,o=i.zeroW,h=i.strokeWidth,d=this.w,c=new X(this.ctx),g=a.i,f=a.j,x=this.boxOptions.colors.lower;this.isBoxPlot&&(x=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var p=this.invertedYRatio,v=a.realIndex,y=this.getOHLCValue(v,f),w=o,l=o,u=Math.min(y.o,y.c),b=Math.max(y.o,y.c),A=y.m;d.globals.isXNumeric&&(r=(d.globals.seriesX[v][f]-d.globals.minX)/this.invertedXRatio-n/2);var k=r+n*this.visibleI;this.series[g][f]===void 0||this.series[g][f]===null?(u=o,b=o):(u=o+u/p,b=o+b/p,w=o+y.h/p,l=o+y.l/p,A=o+y.m/p);var S=c.move(o,k),C=c.move(u,k+n/2);return d.globals.previousPaths.length>0&&(C=this.getPreviousPath(v,f,!0)),S=[c.move(u,k)+c.line(u,k+n/2)+c.line(w,k+n/2)+c.line(w,k+n/2-n/4)+c.line(w,k+n/2+n/4)+c.line(w,k+n/2)+c.line(u,k+n/2)+c.line(u,k+n)+c.line(A,k+n)+c.line(A,k)+c.line(u+h/2,k),c.move(A,k)+c.line(A,k+n)+c.line(b,k+n)+c.line(b,k+n/2)+c.line(l,k+n/2)+c.line(l,k+n-n/4)+c.line(l,k+n/4)+c.line(l,k+n/2)+c.line(b,k+n/2)+c.line(b,k)+c.line(A,k)+"z"],C+=c.move(u,k),d.globals.isXNumeric||(r+=s),{pathTo:S,pathFrom:C,x:b,y:r,barYPosition:k,color:x}}},{key:"getOHLCValue",value:function(i,a){var r=this.w;return{o:this.isBoxPlot?r.globals.seriesCandleH[i][a]:r.globals.seriesCandleO[i][a],h:this.isBoxPlot?r.globals.seriesCandleO[i][a]:r.globals.seriesCandleH[i][a],m:r.globals.seriesCandleM[i][a],l:this.isBoxPlot?r.globals.seriesCandleC[i][a]:r.globals.seriesCandleL[i][a],c:this.isBoxPlot?r.globals.seriesCandleL[i][a]:r.globals.seriesCandleC[i][a]}}}]),t}(),Mt=function(){function m(e){R(this,m),this.ctx=e,this.w=e.w}return F(m,[{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,r){a.from<=0&&(t=!0)}),t}},{key:"getShadeColor",value:function(e,t,i,a){var r=this.w,s=1,n=r.config.plotOptions[e].shadeIntensity,o=this.determineColor(e,t,i);r.globals.hasNegs||a?s=r.config.plotOptions[e].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*n):(1-o.percent/100)*(1.25*n):o.percent<=0?1-(1+o.percent/100)*n:(1-o.percent/100)*n:(s=1-o.percent/100,e==="treemap"&&(s=(1-o.percent/100)*(1.25*n)));var h=o.color,d=new P;if(r.config.plotOptions[e].enableShades)if(this.w.config.theme.mode==="dark"){var c=d.shadeColor(-1*s,o.color);h=P.hexToRgba(P.isColorHex(c)?c:P.rgb2hex(c),r.config.fill.opacity)}else{var g=d.shadeColor(s,o.color);h=P.hexToRgba(P.isColorHex(g)?g:P.rgb2hex(g),r.config.fill.opacity)}return{color:h,colorProps:o}}},{key:"determineColor",value:function(e,t,i){var a=this.w,r=a.globals.series[t][i],s=a.config.plotOptions[e],n=s.colorScale.inverse?i:t;s.distributed&&a.config.chart.type==="treemap"&&(n=i);var o=a.globals.colors[n],h=null,d=Math.min.apply(Math,K(a.globals.series[t])),c=Math.max.apply(Math,K(a.globals.series[t]));s.distributed||e!=="heatmap"||(d=a.globals.minY,c=a.globals.maxY),s.colorScale.min!==void 0&&(d=s.colorScale.mina.globals.maxY?s.colorScale.max:a.globals.maxY);var g=Math.abs(c)+Math.abs(d),f=100*r/(g===0?g-1e-6:g);return s.colorScale.ranges.length>0&&s.colorScale.ranges.map(function(x,p){if(r>=x.from&&r<=x.to){o=x.color,h=x.foreColor?x.foreColor:null,d=x.from,c=x.to;var v=Math.abs(c)+Math.abs(d);f=100*r/(v===0?v-1e-6:v)}}),{color:o,foreColor:h,percent:f}}},{key:"calculateDataLabels",value:function(e){var t=e.text,i=e.x,a=e.y,r=e.i,s=e.j,n=e.colorProps,o=e.fontSize,h=this.w.config.dataLabels,d=new X(this.ctx),c=new xe(this.ctx),g=null;if(h.enabled){g=d.group({class:"apexcharts-data-labels"});var f=h.offsetX,x=h.offsetY,p=i+f,v=a+parseFloat(h.style.fontSize)/3+x;c.plotDataLabelsText({x:p,y:v,text:t,i:r,j:s,color:n.foreColor,parent:g,fontSize:o,dataLabelsConfig:h})}return g}},{key:"addListeners",value:function(e){var t=new X(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))}}]),m}(),di=function(){function m(e,t){R(this,m),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 Mt(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return F(m,[{key:"draw",value:function(e){var t=this.w,i=new X(this.ctx),a=i.group({class:"apexcharts-heatmap"});a.attr("clip-path","url(#gridRectMask".concat(t.globals.cuid,")"));var r=t.globals.gridWidth/t.globals.dataPoints,s=t.globals.gridHeight/t.globals.series.length,n=0,o=!1;this.negRange=this.helpers.checkColorRange();var h=e.slice();t.config.yaxis[0].reversed&&(o=!0,h.reverse());for(var d=o?0:h.length-1;o?d=0;o?d++:d--){var c=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:P.escapeString(t.globals.seriesNames[d]),rel:d+1,"data:realIndex":d});if(this.ctx.series.addCollapsedClassToSeries(c,d),t.config.chart.dropShadow.enabled){var g=t.config.chart.dropShadow;new ie(this.ctx).dropShadow(c,g,d)}for(var f=0,x=t.config.plotOptions.heatmap.shadeIntensity,p=0;p-1&&this.pieClicked(g),i.config.dataLabels.enabled){var b=l.x,A=l.y,k=100*x/this.fullAngle+"%";if(x!==0&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?t.endAngle=t.endAngle-(a+n):a+n=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(d=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(d)>this.fullAngle&&(d-=this.fullAngle);var c=Math.PI*(d-90)/180,g=i.centerX+s*Math.cos(h),f=i.centerY+s*Math.sin(h),x=i.centerX+s*Math.cos(c),p=i.centerY+s*Math.sin(c),v=P.polarToCartesian(i.centerX,i.centerY,i.donutSize,d),y=P.polarToCartesian(i.centerX,i.centerY,i.donutSize,o),w=r>180?1:0,l=["M",g,f,"A",s,s,0,w,1,x,p];return t=i.chartType==="donut"?[].concat(l,["L",v.x,v.y,"A",i.donutSize,i.donutSize,0,w,0,y.x,y.y,"L",g,f,"z"]).join(" "):i.chartType==="pie"||i.chartType==="polarArea"?[].concat(l,["L",i.centerX,i.centerY,"L",g,f]).join(" "):[].concat(l).join(" "),n.roundPathCorners(t,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(e){var t=this.w,i=new At(this.ctx),a=new X(this.ctx),r=new It(this.ctx),s=a.group(),n=a.group(),o=i.niceScale(0,Math.ceil(this.maxY),0),h=o.result.reverse(),d=o.result.length;this.maxY=o.niceMax;for(var c=t.globals.radialSize,g=c/(d-1),f=0;f1&&e.total.show&&(r=e.total.color);var n=s.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=s.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,e.value.formatter)(i,s),a||typeof e.total.formatter!="function"||(i=e.total.formatter(s));var h=t===e.total.label;t=this.donutDataLabels.total.label?e.name.formatter(t,h,s):"",n!==null&&(n.textContent=t),o!==null&&(o.textContent=i),n!==null&&(n.style.fill=r)}},{key:"printDataLabelsInner",value:function(e,t){var i=this.w,a=e.getAttribute("data:value"),r=i.globals.seriesNames[parseInt(e.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(t,r,a,e);var s=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");s!==null&&(s.style.opacity=1)}},{key:"drawSpokes",value:function(e){var t=this,i=this.w,a=new X(this.ctx),r=i.config.plotOptions.polarArea.spokes;if(r.strokeWidth!==0){for(var s=[],n=360/i.globals.series.length,o=0;o0&&(A=t.getPreviousPath(y));for(var k=0;k=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?r-=10:e.y>0&&(r+=10)),{textAnchor:i,newX:a,newY:r}}},{key:"getPreviousPath",value:function(e){for(var t=this.w,i=null,a=0;a0&&parseInt(r.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=[],r=0;r=360&&(p=360-Math.abs(this.startAngle)-.1);var v=r.drawPath({d:"",stroke:f,strokeWidth:h*parseInt(g.strokeWidth,10)/100,fill:"none",strokeOpacity:g.opacity,classes:"apexcharts-radialbar-area"});if(g.dropShadow.enabled){var y=g.dropShadow;n.dropShadow(v,y)}c.add(v),v.attr("id","apexcharts-radialbarTrack-"+d),this.animatePaths(v,{centerX:i.centerX,centerY:i.centerY,endAngle:p,startAngle:x,size:i.size,i:d,totalItems:2,animBeginArr:0,dur:0,isTrack:!0,easing:a.globals.easing})}return s}},{key:"drawArcs",value:function(i){var a=this.w,r=new X(this.ctx),s=new oe(this.ctx),n=new ie(this.ctx),o=r.group(),h=this.getStrokeWidth(i);i.size=i.size-h/2;var d=a.config.plotOptions.radialBar.hollow.background,c=i.size-h*i.series.length-this.margin*i.series.length-h*parseInt(a.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,g=c-a.config.plotOptions.radialBar.hollow.margin;a.config.plotOptions.radialBar.hollow.image!==void 0&&(d=this.drawHollowImage(i,o,c,d));var f=this.drawHollow({size:g,centerX:i.centerX,centerY:i.centerY,fill:d||"transparent"});if(a.config.plotOptions.radialBar.hollow.dropShadow.enabled){var x=a.config.plotOptions.radialBar.hollow.dropShadow;n.dropShadow(f,x)}var p=1;!this.radialDataLabels.total.show&&a.globals.series.length>1&&(p=0);var v=null;if(this.radialDataLabels.show){var y=a.globals.dom.Paper.select(".apexcharts-datalabels-group").members[0];v=this.renderInnerDataLabels(y,this.radialDataLabels,{hollowSize:c,centerX:i.centerX,centerY:i.centerY,opacity:p})}a.config.plotOptions.radialBar.hollow.position==="back"&&(o.add(f),v&&o.add(v));var w=!1;a.config.plotOptions.radialBar.inverseOrder&&(w=!0);for(var l=w?i.series.length-1:0;w?l>=0:l100?100:i.series[l])/100,C=Math.round(this.totalAngle*S)+this.startAngle,L=void 0;a.globals.dataChanged&&(k=this.startAngle,L=Math.round(this.totalAngle*P.negToZero(a.globals.previousPaths[l])/100)+k),Math.abs(C)+Math.abs(A)>360&&(C-=.01),Math.abs(L)+Math.abs(k)>360&&(L-=.01);var M=C-A,T=Array.isArray(a.config.stroke.dashArray)?a.config.stroke.dashArray[l]:a.config.stroke.dashArray,I=r.drawPath({d:"",stroke:b,strokeWidth:h,fill:"none",fillOpacity:a.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+l,strokeDashArray:T});if(X.setAttrs(I.node,{"data:angle":M,"data:value":i.series[l]}),a.config.chart.dropShadow.enabled){var z=a.config.chart.dropShadow;n.dropShadow(I,z,l)}if(n.setSelectionFilter(I,0,l),this.addListeners(I,this.radialDataLabels),u.add(I),I.attr({index:0,j:l}),this.barLabels.enabled){var Y=P.polarToCartesian(i.centerX,i.centerY,i.size,A),D=this.barLabels.formatter(a.globals.seriesNames[l],{seriesIndex:l,w:a}),H=["apexcharts-radialbar-label"];this.barLabels.onClick||H.push("apexcharts-no-click");var O=this.barLabels.useSeriesColors?a.globals.colors[l]:a.config.chart.foreColor;O||(O=a.config.chart.foreColor);var B=Y.x+this.barLabels.offsetX,N=Y.y+this.barLabels.offsetY,W=r.drawText({x:B,y:N,text:D,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:O,cssClass:H.join(" ")});W.on("click",this.onBarLabelClick),W.attr({rel:l+1}),A!==0&&W.attr({"transform-origin":"".concat(B," ").concat(N),transform:"rotate(".concat(A," 0 0)")}),u.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:C,startAngle:A,prevEndAngle:L,prevStartAngle:k,size:i.size,i:l,totalItems:2,animBeginArr:this.animBeginArr,dur:q,shouldSetPrevPaths:!0,easing:a.globals.easing})}return{g:o,elHollow:f,dataLabels:v}}},{key:"drawHollow",value:function(i){var a=new X(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,r,s){var n=this.w,o=new oe(this.ctx),h=P.randomId(),d=n.config.plotOptions.radialBar.hollow.image;if(n.config.plotOptions.radialBar.hollow.imageClipped)o.clippedImgArea({width:r,height:r,image:d,patternID:"pattern".concat(n.globals.cuid).concat(h)}),s="url(#pattern".concat(n.globals.cuid).concat(h,")");else{var c=n.config.plotOptions.radialBar.hollow.imageWidth,g=n.config.plotOptions.radialBar.hollow.imageHeight;if(c===void 0&&g===void 0){var f=n.globals.dom.Paper.image(d).loaded(function(p){this.move(i.centerX-p.width/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,i.centerY-p.height/2+n.config.plotOptions.radialBar.hollow.imageOffsetY)});a.add(f)}else{var x=n.globals.dom.Paper.image(d).loaded(function(p){this.move(i.centerX-c/2+n.config.plotOptions.radialBar.hollow.imageOffsetX,i.centerY-g/2+n.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(c,g)});a.add(x)}}return s}},{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,r=this.barLabels.onClick,s=this.w;r&&r(s.globals.seriesNames[a],{w:s,seriesIndex:a})}}]),t}(),fi=function(m){Me(t,be);var e=Pe(t);function t(){return R(this,t),e.apply(this,arguments)}return F(t,[{key:"draw",value:function(i,a){var r=this.w,s=new X(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=i,this.seriesRangeStart=r.globals.seriesRangeStart,this.seriesRangeEnd=r.globals.seriesRangeEnd,this.barHelpers.initVariables(i);for(var n=s.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),o=0;o0&&(this.visibleI=this.visibleI+1);var w=0,l=0,u=0;this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[p][0],u=p);var b=this.barHelpers.initialPositions();x=b.y,g=b.zeroW,f=b.x,l=b.barWidth,w=b.barHeight,h=b.xDivision,d=b.yDivision,c=b.zeroH;for(var A=s.group({class:"apexcharts-datalabels","data:realIndex":p}),k=s.group({class:"apexcharts-rangebar-goals-markers"}),S=0;S0});return this.isHorizontal?(s=p.config.plotOptions.bar.rangeBarGroupRows?o+g*u:o+d*this.visibleI+g*u,b>-1&&!p.config.plotOptions.bar.rangeBarOverlap&&(v=p.globals.seriesRange[a][b].overlaps).indexOf(y)>-1&&(s=(d=x.barHeight/v.length)*this.visibleI+g*(100-parseInt(this.barOptions.barHeight,10))/100/2+d*(this.visibleI+v.indexOf(y))+g*u)):(u>-1&&!p.globals.timescaleLabels.length&&(n=p.config.plotOptions.bar.rangeBarGroupRows?h+f*u:h+c*this.visibleI+f*u),b>-1&&!p.config.plotOptions.bar.rangeBarOverlap&&(v=p.globals.seriesRange[a][b].overlaps).indexOf(y)>-1&&(n=(c=x.barWidth/v.length)*this.visibleI+f*(100-parseInt(this.barOptions.barWidth,10))/100/2+c*(this.visibleI+v.indexOf(y))+f*u)),{barYPosition:s,barXPosition:n,barHeight:d,barWidth:c}}},{key:"drawRangeColumnPaths",value:function(i){var a=i.indexes,r=i.x,s=i.xDivision,n=i.barWidth,o=i.barXPosition,h=i.zeroH,d=this.w,c=a.i,g=a.j,f=a.realIndex,x=a.translationsIndex,p=this.yRatio[x],v=this.getRangeValue(f,g),y=Math.min(v.start,v.end),w=Math.max(v.start,v.end);this.series[c][g]===void 0||this.series[c][g]===null?y=h:(y=h-y/p,w=h-w/p);var l=Math.abs(w-y),u=this.barHelpers.getColumnPaths({barXPosition:o,barWidth:n,y1:y,y2:w,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:f,i:f,j:g,w:d});if(d.globals.isXNumeric){var b=this.getBarXForNumericXAxis({x:r,j:g,realIndex:f,barWidth:n});r=b.x,o=b.barXPosition}else r+=s;return{pathTo:u.pathTo,pathFrom:u.pathFrom,barHeight:l,x:r,y:v.start<0&&v.end<0?y:w,goalY:this.barHelpers.getGoalValues("y",null,h,c,g,x),barXPosition:o}}},{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,r=i.y,s=i.y1,n=i.y2,o=i.yDivision,h=i.barHeight,d=i.barYPosition,c=i.zeroW,g=this.w,f=a.realIndex,x=a.j,p=this.preventBarOverflow(c+s/this.invertedYRatio),v=this.preventBarOverflow(c+n/this.invertedYRatio),y=this.getRangeValue(f,x),w=Math.abs(v-p),l=this.barHelpers.getBarpaths({barYPosition:d,barHeight:h,x1:p,x2:v,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:f,realIndex:f,j:x,w:g});return g.globals.isXNumeric||(r+=o),{pathTo:l.pathTo,pathFrom:l.pathFrom,barWidth:w,x:y.start<0&&y.end<0?p:v,goalX:this.barHelpers.getGoalValues("x",c,null,f,x),y:r}}},{key:"getRangeValue",value:function(i,a){var r=this.w;return{start:r.globals.seriesRangeStart[i][a],end:r.globals.seriesRangeEnd[i][a]}}}]),t}(),pi=function(){function m(e){R(this,m),this.w=e.w,this.lineCtx=e}return F(m,[{key:"sameValueSeriesFix",value:function(e,t){var i=this.w;if((i.config.fill.type==="gradient"||i.config.fill.type[e]==="gradient")&&new $(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,r=e.y,s=e.i,n=e.j,o=e.prevY,h=this.w,d=[],c=[];if(n===0){var g=this.lineCtx.categoryAxisCorrection+h.config.markers.offsetX;h.globals.isXNumeric&&(g=(h.globals.seriesX[i][0]-h.globals.minX)/this.lineCtx.xRatio+h.config.markers.offsetX),d.push(g),c.push(P.isNumber(t[s][0])?o+h.config.markers.offsetY:null),d.push(a+h.config.markers.offsetX),c.push(P.isNumber(t[s][n+1])?r+h.config.markers.offsetY:null)}else d.push(a+h.config.markers.offsetX),c.push(P.isNumber(t[s][n+1])?r+h.config.markers.offsetY:null);return{x:d,y:c}}},{key:"checkPreviousPaths",value:function(e){for(var t=e.pathFromLine,i=e.pathFromArea,a=e.realIndex,r=this.w,s=0;s0&&parseInt(n.realIndex,10)===parseInt(a,10)&&(n.type==="line"?(this.lineCtx.appendPathFrom=!1,t=r.globals.previousPaths[s].paths[0].d):n.type==="area"&&(this.lineCtx.appendPathFrom=!1,i=r.globals.previousPaths[s].paths[0].d,r.config.stroke.show&&r.globals.previousPaths[s].paths[1]&&(t=r.globals.previousPaths[s].paths[1].d)))}return{pathFromLine:t,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(e){var t,i,a,r=e.i,s=e.realIndex,n=e.series,o=e.prevY,h=e.lineYPosition,d=e.translationsIndex,c=this.w,g=c.config.chart.stacked&&!c.globals.comboCharts||c.config.chart.stacked&&c.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((t=this.w.config.series[s])===null||t===void 0?void 0:t.type)==="bar"||((i=this.w.config.series[s])===null||i===void 0?void 0:i.type)==="column");if(((a=n[r])===null||a===void 0?void 0:a[0])!==void 0)o=(h=g&&r>0?this.lineCtx.prevSeriesY[r-1][0]:this.lineCtx.zeroY)-n[r][0]/this.lineCtx.yRatio[d]+2*(this.lineCtx.isReversed?n[r][0]/this.lineCtx.yRatio[d]:0);else if(g&&r>0&&n[r][0]===void 0){for(var f=r-1;f>=0;f--)if(n[f][0]!==null&&n[f][0]!==void 0){o=h=this.lineCtx.prevSeriesY[f][0];break}}return{prevY:o,lineYPosition:h}}}]),m}(),xi=function(m){for(var e,t,i,a,r=function(d){for(var c=[],g=d[0],f=d[1],x=c[0]=Be(g,f),p=1,v=d.length-1;p9&&(a=3*i/Math.sqrt(a),r[o]=a*e,r[o+1]=a*t);for(var h=0;h<=s;h++)a=(m[Math.min(s,h+1)][0]-m[Math.max(0,h-1)][0])/(6*(1+r[h]*r[h])),n.push([a||0,r[h]*a||0]);return n},bi=function(m){var e=xi(m),t=m[1],i=m[0],a=[],r=e[1],s=e[0];a.push(i,[i[0]+s[0],i[1]+s[1],t[0]-r[0],t[1]-r[1],t[0],t[1]]);for(var n=2,o=e.length;n1&&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 Be(m,e){return(e[1]-m[1])/(e[0]-m[0])}var We=function(){function m(e,t,i){R(this,m),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 wt(this.ctx),this.noNegatives=this.w.globals.minX===Number.MAX_VALUE,this.lineHelpers=new pi(this),this.markers=new ve(this.ctx),this.prevSeriesY=[],this.categoryAxisCorrection=0,this.yaxisIndex=0}return F(m,[{key:"draw",value:function(e,t,i,a){var r,s=this.w,n=new X(this.ctx),o=s.globals.comboCharts?t:s.config.chart.type,h=n.group({class:"apexcharts-".concat(o,"-series apexcharts-plot-series")}),d=new $(this.ctx,s);this.yRatio=this.xyRatios.yRatio,this.zRatio=this.xyRatios.zRatio,this.xRatio=this.xyRatios.xRatio,this.baseLineY=this.xyRatios.baseLineY,e=d.getLogSeries(e),this.yRatio=d.getLogYRatios(this.yRatio),this.prevSeriesY=[];for(var c=[],g=0;g1?f:0;this._initSerieVariables(e,g,f);var p=[],v=[],y=[],w=s.globals.padHorizontal+this.categoryAxisCorrection;this.ctx.series.addCollapsedClassToSeries(this.elSeries,f),s.globals.isXNumeric&&s.globals.seriesX.length>0&&(w=(s.globals.seriesX[f][0]-s.globals.minX)/this.xRatio),y.push(w);var l,u=w,b=void 0,A=u,k=this.zeroY,S=this.zeroY;k=this.lineHelpers.determineFirstPrevY({i:g,realIndex:f,series:e,prevY:k,lineYPosition:0,translationsIndex:x}).prevY,s.config.stroke.curve==="monotoneCubic"&&e[g][0]===null?p.push(null):p.push(k),l=k,o==="rangeArea"&&(b=S=this.lineHelpers.determineFirstPrevY({i:g,realIndex:f,series:a,prevY:S,lineYPosition:0,translationsIndex:x}).prevY,v.push(p[0]!==null?S:null));var C=this._calculatePathsFrom({type:o,series:e,i:g,realIndex:f,translationsIndex:x,prevX:A,prevY:k,prevY2:S}),L=[p[0]],M=[v[0]],T={type:o,series:e,realIndex:f,translationsIndex:x,i:g,x:w,y:1,pX:u,pY:l,pathsFrom:C,linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:y,yArrj:p,y2Arrj:v,seriesRangeEnd:a},I=this._iterateOverDataPoints(E(E({},T),{},{iterations:o==="rangeArea"?e[g].length-1:void 0,isRangeStart:!0}));if(o==="rangeArea"){for(var z=this._calculatePathsFrom({series:a,i:g,realIndex:f,prevX:A,prevY:S}),Y=this._iterateOverDataPoints(E(E({},T),{},{series:a,xArrj:[w],yArrj:L,y2Arrj:M,pY:b,areaPaths:I.areaPaths,pathsFrom:z,iterations:a[g].length-1,isRangeStart:!1})),D=I.linePaths.length/2,H=0;H=0;O--)h.add(c[O]);else for(var B=0;B1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[i],s=i),this.isReversed=a.config.yaxis[this.yaxisIndex]&&a.config.yaxis[this.yaxisIndex].reversed,this.zeroY=a.globals.gridHeight-this.baseLineY[s]-(this.isReversed?a.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[s]: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=r.group({class:"apexcharts-series",zIndex:a.config.series[i].zIndex!==void 0?a.config.series[i].zIndex:i,seriesName:P.escapeString(a.globals.seriesNames[i])}),this.elPointsMain=r.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=r.group({class:"apexcharts-datalabels","data:realIndex":i});var n=e[t].length===a.globals.dataPoints;this.elSeries.attr({"data:longestSeries":n,rel:t+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(e){var t,i,a,r,s=e.type,n=e.series,o=e.i,h=e.realIndex,d=e.translationsIndex,c=e.prevX,g=e.prevY,f=e.prevY2,x=this.w,p=new X(this.ctx);if(n[o][0]===null){for(var v=0;v0){var y=this.lineHelpers.checkPreviousPaths({pathFromLine:a,pathFromArea:r,realIndex:h});a=y.pathFromLine,r=y.pathFromArea}return{prevX:c,prevY:g,linePath:t,areaPath:i,pathFromLine:a,pathFromArea:r}}},{key:"_handlePaths",value:function(e){var t=e.type,i=e.realIndex,a=e.i,r=e.paths,s=this.w,n=new X(this.ctx),o=new oe(this.ctx);this.prevSeriesY.push(r.yArrj),s.globals.seriesXvalues[i]=r.xArrj,s.globals.seriesYvalues[i]=r.yArrj;var h=s.config.forecastDataPoints;if(h.count>0&&t!=="rangeArea"){var d=s.globals.seriesXvalues[i][s.globals.seriesXvalues[i].length-h.count-1],c=n.drawRect(d,0,s.globals.gridWidth,s.globals.gridHeight,0);s.globals.dom.elForecastMask.appendChild(c.node);var g=n.drawRect(0,0,d,s.globals.gridHeight,0);s.globals.dom.elNonForecastMask.appendChild(g.node)}this.pointsChart||s.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var f={i:a,realIndex:i,animationDelay:a,initialSpeed:s.config.chart.animations.speed,dataChangeSpeed:s.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(t)};if(t==="area")for(var x=o.fillPath({seriesNumber:i}),p=0;p0&&t!=="rangeArea"){var k=n.renderPaths(b);k.node.setAttribute("stroke-dasharray",h.dashArray),h.strokeWidth&&k.node.setAttribute("stroke-width",h.strokeWidth),this.elSeries.add(k),k.attr("clip-path","url(#forecastMask".concat(s.globals.cuid,")")),A.attr("clip-path","url(#nonForecastMask".concat(s.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(e){var t,i,a=this,r=e.type,s=e.series,n=e.iterations,o=e.realIndex,h=e.translationsIndex,d=e.i,c=e.x,g=e.y,f=e.pX,x=e.pY,p=e.pathsFrom,v=e.linePaths,y=e.areaPaths,w=e.seriesIndex,l=e.lineYPosition,u=e.xArrj,b=e.yArrj,A=e.y2Arrj,k=e.isRangeStart,S=e.seriesRangeEnd,C=this.w,L=new X(this.ctx),M=this.yRatio,T=p.prevY,I=p.linePath,z=p.areaPath,Y=p.pathFromLine,D=p.pathFromArea,H=P.isNumber(C.globals.minYArr[o])?C.globals.minYArr[o]:C.globals.minY;n||(n=C.globals.dataPoints>1?C.globals.dataPoints-1:C.globals.dataPoints);var O=function(ee,te){return te-ee/M[h]+2*(a.isReversed?ee/M[h]:0)},B=g,N=C.config.chart.stacked&&!C.globals.comboCharts||C.config.chart.stacked&&C.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||((t=this.w.config.series[o])===null||t===void 0?void 0:t.type)==="bar"||((i=this.w.config.series[o])===null||i===void 0?void 0:i.type)==="column"),W=C.config.stroke.curve;Array.isArray(W)&&(W=Array.isArray(w)?W[w[d]]:W[d]);for(var q,Z=0,U=0;U0&&C.globals.collapsedSeries.length0;te--){if(!(C.globals.collapsedSeriesIndices.indexOf((w==null?void 0:w[te])||te)>-1))return te;te--}return 0}(d-1)][U+1]:l=this.zeroY:l=this.zeroY,se?g=O(H,l):(g=O(s[d][U+1],l),r==="rangeArea"&&(B=O(S[d][U+1],l))),u.push(c),!se||C.config.stroke.curve!=="smooth"&&C.config.stroke.curve!=="monotoneCubic"?(b.push(g),A.push(B)):(b.push(null),A.push(null));var G=this.lineHelpers.calculatePoints({series:s,x:c,y:g,realIndex:o,i:d,j:U,prevY:T}),_=this._createPaths({type:r,series:s,i:d,realIndex:o,j:U,x:c,y:g,y2:B,xArrj:u,yArrj:b,y2Arrj:A,pX:f,pY:x,pathState:Z,segmentStartX:q,linePath:I,areaPath:z,linePaths:v,areaPaths:y,curve:W,isRangeStart:k});y=_.areaPaths,v=_.linePaths,f=_.pX,x=_.pY,Z=_.pathState,q=_.segmentStartX,z=_.areaPath,I=_.linePath,!this.appendPathFrom||W==="monotoneCubic"&&r==="rangeArea"||(Y+=L.line(c,this.zeroY),D+=L.line(c,this.zeroY)),this.handleNullDataPoints(s,G,d,U,o),this._handleMarkersAndLabels({type:r,pointsPos:G,i:d,j:U,realIndex:o,isRangeStart:k})}return{yArrj:b,xArrj:u,pathFromArea:D,areaPaths:y,pathFromLine:Y,linePaths:v,linePath:I,areaPath:z}}},{key:"_handleMarkersAndLabels",value:function(e){var t=e.type,i=e.pointsPos,a=e.isRangeStart,r=e.i,s=e.j,n=e.realIndex,o=this.w,h=new xe(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,s,{realIndex:n,pointsPos:i,zRatio:this.zRatio,elParent:this.elPointsMain});else{o.globals.series[r].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var d=this.markers.plotChartMarkers(i,n,s+1);d!==null&&this.elPointsMain.add(d)}var c=h.drawDataLabel({type:t,isRangeStart:a,pos:i,i:n,j:s+1});c!==null&&this.elDataLabelsWrap.add(c)}},{key:"_createPaths",value:function(e){var t=e.type,i=e.series,a=e.i;e.realIndex;var r,s=e.j,n=e.x,o=e.y,h=e.xArrj,d=e.yArrj,c=e.y2,g=e.y2Arrj,f=e.pX,x=e.pY,p=e.pathState,v=e.segmentStartX,y=e.linePath,w=e.areaPath,l=e.linePaths,u=e.areaPaths,b=e.curve,A=e.isRangeStart,k=new X(this.ctx),S=this.areaBottomY,C=t==="rangeArea",L=t==="rangeArea"&&A;switch(b){case"monotoneCubic":var M=A?d:g;switch(p){case 0:if(M[s+1]===null)break;p=1;case 1:if(!(C?h.length===i[a].length:s===i[a].length-2))break;case 2:var T=A?h:h.slice().reverse(),I=A?M:M.slice().reverse(),z=(r=I,T.map(function(V,G){return[V,r[G]]}).filter(function(V){return V[1]!==null})),Y=z.length>1?bi(z):z,D=[];C&&(L?u=z:D=u.reverse());var H=0,O=0;if(function(V,G){for(var _=function(ye){var ae=[],he=0;return ye.forEach(function(Xt){Xt!==null?he++:he>0&&(ae.push(he),he=0)}),he>0&&ae.push(he),ae}(V),ee=[],te=0,le=0;te<_.length;le+=_[te++])ee[te]=mi(G,le,le+_[te]);return ee}(I,Y).forEach(function(V){H++;var G=function(te){for(var le="",ye=0;ye4?(le+="C".concat(ae[0],", ").concat(ae[1]),le+=", ".concat(ae[2],", ").concat(ae[3]),le+=", ".concat(ae[4],", ").concat(ae[5])):he>2&&(le+="S".concat(ae[0],", ").concat(ae[1]),le+=", ".concat(ae[2],", ").concat(ae[3]))}return le}(V),_=O,ee=(O+=V.length)-1;L?y=k.move(z[_][0],z[_][1])+G:C?y=k.move(D[_][0],D[_][1])+k.line(z[_][0],z[_][1])+G+k.line(D[ee][0],D[ee][1]):(y=k.move(z[_][0],z[_][1])+G,w=y+k.line(z[ee][0],S)+k.line(z[_][0],S)+"z",u.push(w)),l.push(y)}),C&&H>1&&!L){var B=l.slice(H).reverse();l.splice(H),B.forEach(function(V){return l.push(V)})}p=0}break;case"smooth":var N=.35*(n-f);if(i[a][s]===null)p=0;else switch(p){case 0:if(v=f,y=L?k.move(f,g[s])+k.line(f,x):k.move(f,x),w=k.move(f,x),i[a][s+1]===null){l.push(y),u.push(w);break}if(p=1,s=i[a].length-2&&(L&&(y+=k.curve(n,o,n,o,n,c)+k.move(n,c)),w+=k.curve(n,o,n,o,n,S)+k.line(v,S)+"z",l.push(y),u.push(w),p=-1)}}f=n,x=o;break;default:var Z=function(V,G,_){var ee=[];switch(V){case"stepline":ee=k.line(G,null,"H")+k.line(null,_,"V");break;case"linestep":ee=k.line(null,_,"V")+k.line(G,null,"H");break;case"straight":ee=k.line(G,_)}return ee};if(i[a][s]===null)p=0;else switch(p){case 0:if(v=f,y=L?k.move(f,g[s])+k.line(f,x):k.move(f,x),w=k.move(f,x),i[a][s+1]===null){l.push(y),u.push(w);break}if(p=1,s=i[a].length-2&&(L&&(y+=k.line(n,c)),w+=k.line(n,S)+k.line(v,S)+"z",l.push(y),u.push(w),p=-1)}}f=n,x=o}return{linePaths:l,areaPaths:u,pX:f,pY:x,pathState:p,segmentStartX:v,linePath:y,areaPath:w}}},{key:"handleNullDataPoints",value:function(e,t,i,a,r){var s=this.w;if(e[i][a]===null&&s.config.markers.showNullDataPoints||e[i].length===1){var n=this.strokeWidth-s.config.markers.strokeWidth/2;n>0||(n=0);var o=this.markers.plotChartMarkers(t,r,a+1,n,!0);o!==null&&this.elPointsMain.add(o)}}}]),m}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function m(n,o,h,d){this.xoffset=n,this.yoffset=o,this.height=d,this.width=h,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(c){var g,f=[],x=this.xoffset,p=this.yoffset,v=r(c)/this.height,y=r(c)/this.width;if(this.width>=this.height)for(g=0;g=this.height){var f=c/this.height,x=this.width-f;g=new m(this.xoffset+f,this.yoffset,x,this.height)}else{var p=c/this.width,v=this.height-p;g=new m(this.xoffset,this.yoffset+p,this.width,v)}return g}}function e(n,o,h,d,c){d=d===void 0?0:d,c=c===void 0?0:c;var g=t(function(f,x){var p,v=[],y=x/r(f);for(p=0;p=l}(o,g=n[0],c)?(o.push(g),t(n.slice(1),o,h,d)):(f=h.cutArea(r(o),d),d.push(h.getCoordinates(o)),t(n,[],f,d)),d;d.push(h.getCoordinates(o))}function i(n,o){var h=Math.min.apply(Math,n),d=Math.max.apply(Math,n),c=r(n);return Math.max(Math.pow(o,2)*d/Math.pow(c,2),Math.pow(c,2)/(Math.pow(o,2)*h))}function a(n){return n&&n.constructor===Array}function r(n){var o,h=0;for(o=0;os-a&&h.width<=n-r){var d=o.rotateAroundCenter(e.node);e.node.setAttribute("transform","rotate(-90 ".concat(d.x," ").concat(d.y,") translate(").concat(h.height/3,")"))}}},{key:"truncateLabels",value:function(e,t,i,a,r,s){var n=new X(this.ctx),o=n.getTextRects(e,t).width+this.w.config.stroke.width+5>r-i&&s-a>r-i?s-a:r-i,h=n.getTextBasedOnMaxWidth({text:e,maxWidth:o,fontSize:t});return e.length!==h.length&&o/t<5?"":h}},{key:"animateTreemap",value:function(e,t,i,a){var r=new me(this.ctx);r.animateRect(e,{x:t.x,y:t.y,width:t.width,height:t.height},{x:i.x,y:i.y,width:i.width,height:i.height},a,function(){r.animationCompleted(e)})}}]),m}(),zt=86400,yi=10/zt,wi=function(){function m(e){R(this,m),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return F(m,[{key:"calculateTimeScaleTicks",value:function(e,t){var i=this,a=this.w;if(a.globals.allSeriesCollapsed)return a.globals.labels=[],a.globals.timescaleLabels=[],[];var r=new Q(this.ctx),s=(t-e)/864e5;this.determineInterval(s),a.globals.disableZoomIn=!1,a.globals.disableZoomOut=!1,s