this.wheelDelay&&(this.executeMouseWheelZoom(i),s.globals.lastWheelExecution=r),this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(function(){r-s.globals.lastWheelExecution>a.wheelDelay&&(a.executeMouseWheelZoom(i),s.globals.lastWheelExecution=r)},this.debounceDelay)}},{key:"executeMouseWheelZoom",value:function(i){var a,s=this.w;this.minX=s.globals.isRangeBar?s.globals.minY:s.globals.minX,this.maxX=s.globals.isRangeBar?s.globals.maxY:s.globals.maxX;var r=(a=this.gridRect)===null||a===void 0?void 0:a.getBoundingClientRect();if(r){var o,l,h,c=(i.clientX-r.left)/r.width,d=this.minX,u=this.maxX,g=u-d;if(i.deltaY<0){var f=d+c*g;l=f-(o=.5*g)/2,h=f+o/2}else l=d-(o=1.5*g)/2,h=u+o/2;if(!s.globals.isRangeBar){l=Math.max(l,s.globals.initialMinX),h=Math.min(h,s.globals.initialMaxX);var p=.01*(s.globals.initialMaxX-s.globals.initialMinX);if(h-l0&&s.height>0&&(this.selectionRect.select(!1).resize(!1),this.selectionRect.select({createRot:function(){},updateRot:function(){},createHandle:function(r,o,l,h,c){return c==="l"||c==="r"?r.circle(8).css({"stroke-width":1,stroke:"#333",fill:"#fff"}):r.circle(0)},updateHandle:function(r,o){return r.center(o[0],o[1])}}).resize().on("resize",function(){var r=a.globals.zoomEnabled?a.config.chart.zoom.type:a.config.chart.selection.type;i.handleMouseUp({zoomtype:r,isResized:!0})}))}}},{key:"preselectedSelection",value:function(){var i=this.w,a=this.xyRatios;if(!i.globals.zoomEnabled){if(i.globals.selection!==void 0&&i.globals.selection!==null)this.drawSelectionRect(O(O({},i.globals.selection),{},{translateX:i.globals.translateX,translateY:i.globals.translateY}));else if(i.config.chart.selection.xaxis.min!==void 0&&i.config.chart.selection.xaxis.max!==void 0){var s=(i.config.chart.selection.xaxis.min-i.globals.minX)/a.xRatio,r=i.globals.gridWidth-(i.globals.maxX-i.config.chart.selection.xaxis.max)/a.xRatio-s;i.globals.isRangeBar&&(s=(i.config.chart.selection.xaxis.min-i.globals.yAxisScale[0].niceMin)/a.invertedYRatio,r=(i.config.chart.selection.xaxis.max-i.config.chart.selection.xaxis.min)/a.invertedYRatio);var o={x:s,y:0,width:r,height:i.globals.gridHeight,translateX:i.globals.translateX,translateY:i.globals.translateY,selectionEnabled:!0};this.drawSelectionRect(o),this.makeSelectionRectDraggable(),typeof i.config.chart.events.selection=="function"&&i.config.chart.events.selection(this.ctx,{xaxis:{min:i.config.chart.selection.xaxis.min,max:i.config.chart.selection.xaxis.max},yaxis:{}})}}}},{key:"drawSelectionRect",value:function(i){var a=i.x,s=i.y,r=i.width,o=i.height,l=i.translateX,h=l===void 0?0:l,c=i.translateY,d=c===void 0?0:c,u=this.w,g=this.zoomRect,f=this.selectionRect;if(this.dragged||u.globals.selection!==null){var p={transform:"translate("+h+", "+d+")"};u.globals.zoomEnabled&&this.dragged&&(r<0&&(r=1),g.attr({x:a,y:s,width:r,height:o,fill:u.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":u.config.chart.zoom.zoomedArea.fill.opacity,stroke:u.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":u.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":u.config.chart.zoom.zoomedArea.stroke.opacity}),X.setAttrs(g.node,p)),u.globals.selectionEnabled&&(f.attr({x:a,y:s,width:r>0?r:0,height:o>0?o:0,fill:u.config.chart.selection.fill.color,"fill-opacity":u.config.chart.selection.fill.opacity,stroke:u.config.chart.selection.stroke.color,"stroke-width":u.config.chart.selection.stroke.width,"stroke-dasharray":u.config.chart.selection.stroke.dashArray,"stroke-opacity":u.config.chart.selection.stroke.opacity}),X.setAttrs(f.node,p))}}},{key:"hideSelectionRect",value:function(i){i&&i.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(i){var a=i.context,s=i.zoomtype,r=this.w,o=a,l=this.gridRect.getBoundingClientRect(),h=o.startX-1,c=o.startY,d=!1,u=!1,g=o.clientX-l.left-r.globals.barPadForNumericAxis,f=o.clientY-l.top,p=g-h,x=f-c,b={translateX:r.globals.translateX,translateY:r.globals.translateY};return Math.abs(p+h)>r.globals.gridWidth?p=r.globals.gridWidth-h:g<0&&(p=h),h>g&&(d=!0,p=Math.abs(p)),c>f&&(u=!0,x=Math.abs(x)),b=O(O({},b=s==="x"?{x:d?h-p:h,y:0,width:p,height:r.globals.gridHeight}:s==="y"?{x:0,y:u?c-x:c,width:r.globals.gridWidth,height:x}:{x:d?h-p:h,y:u?c-x:c,width:p,height:x}),{},{translateX:r.globals.translateX,translateY:r.globals.translateY}),o.drawSelectionRect(b),o.selectionDragging("resizing"),b}},{key:"selectionDragging",value:function(i,a){var s=this,r=this.w;if(a){a.preventDefault();var o=a.detail,l=o.handler,h=o.box,c=h.x,d=h.y;cthis.constraints.x2&&(c=this.constraints.x2-h.w),h.y2>this.constraints.y2&&(d=this.constraints.y2-h.h),l.move(c,d);var u=this.xyRatios,g=this.selectionRect,f=0;i==="resizing"&&(f=30);var p=function(b){return parseFloat(g.node.getAttribute(b))},x={x:p("x"),y:p("y"),width:p("width"),height:p("height")};r.globals.selection=x,typeof r.config.chart.events.selection=="function"&&r.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout(function(){var b,m,v,k,y=s.gridRect.getBoundingClientRect(),C=g.node.getBoundingClientRect();r.globals.isRangeBar?(b=r.globals.yAxisScale[0].niceMin+(C.left-y.left)*u.invertedYRatio,m=r.globals.yAxisScale[0].niceMin+(C.right-y.left)*u.invertedYRatio,v=0,k=1):(b=r.globals.xAxisScale.niceMin+(C.left-y.left)*u.xRatio,m=r.globals.xAxisScale.niceMin+(C.right-y.left)*u.xRatio,v=r.globals.yAxisScale[0].niceMin+(y.bottom-C.bottom)*u.yRatio[0],k=r.globals.yAxisScale[0].niceMax-(C.top-y.top)*u.yRatio[0]);var w={xaxis:{min:b,max:m},yaxis:{min:v,max:k}};r.config.chart.events.selection(s.ctx,w),r.config.chart.brush.enabled&&r.config.chart.events.brushScrolled!==void 0&&r.config.chart.events.brushScrolled(s.ctx,w)},f))}}},{key:"selectionDrawn",value:function(i){var a,s,r=i.context,o=i.zoomtype,l=this.w,h=r,c=this.xyRatios,d=this.ctx.toolbar,u=l.globals.zoomEnabled?h.zoomRect.node.getBoundingClientRect():h.selectionRect.node.getBoundingClientRect(),g=h.gridRect.getBoundingClientRect(),f=u.left-g.left-l.globals.barPadForNumericAxis,p=u.right-g.left-l.globals.barPadForNumericAxis,x=u.top-g.top,b=u.bottom-g.top;l.globals.isRangeBar?(a=l.globals.yAxisScale[0].niceMin+f*c.invertedYRatio,s=l.globals.yAxisScale[0].niceMin+p*c.invertedYRatio):(a=l.globals.xAxisScale.niceMin+f*c.xRatio,s=l.globals.xAxisScale.niceMin+p*c.xRatio);var m=[],v=[];if(l.config.yaxis.forEach(function(M,P){var T=l.globals.seriesYAxisMap[P][0],I=l.globals.yAxisScale[P].niceMax-c.yRatio[T]*x,z=l.globals.yAxisScale[P].niceMax-c.yRatio[T]*b;m.push(I),v.push(z)}),h.dragged&&(h.dragX>10||h.dragY>10)&&a!==s){if(l.globals.zoomEnabled){var k=L.clone(l.globals.initialConfig.yaxis),y=L.clone(l.globals.initialConfig.xaxis);if(l.globals.zoomed=!0,l.config.xaxis.convertedCatToNumeric&&(a=Math.floor(a),s=Math.floor(s),a<1&&(a=1,s=l.globals.dataPoints),s-a<2&&(s=a+1)),o!=="xy"&&o!=="x"||(y={min:a,max:s}),o!=="xy"&&o!=="y"||k.forEach(function(M,P){k[P].min=v[P],k[P].max=m[P]}),d){var C=d.getBeforeZoomRange(y,k);C&&(y=C.xaxis?C.xaxis:y,k=C.yaxis?C.yaxis:k)}var w={xaxis:y};l.config.chart.group||(w.yaxis=k),h.ctx.updateHelpers._updateOptions(w,!1,h.w.config.chart.animations.dynamicAnimation.enabled),typeof l.config.chart.events.zoomed=="function"&&d.zoomCallback(y,k)}else if(l.globals.selectionEnabled){var A,S=null;A={min:a,max:s},o!=="xy"&&o!=="y"||(S=L.clone(l.config.yaxis)).forEach(function(M,P){S[P].min=v[P],S[P].max=m[P]}),l.globals.selection=h.selection,typeof l.config.chart.events.selection=="function"&&l.config.chart.events.selection(h.ctx,{xaxis:A,yaxis:S})}}}},{key:"panDragging",value:function(i){var a=i.context,s=this.w,r=a;if(s.globals.lastClientPosition.x!==void 0){var o=s.globals.lastClientPosition.x-r.clientX,l=s.globals.lastClientPosition.y-r.clientY;Math.abs(o)>Math.abs(l)&&o>0?this.moveDirection="left":Math.abs(o)>Math.abs(l)&&o<0?this.moveDirection="right":Math.abs(l)>Math.abs(o)&&l>0?this.moveDirection="up":Math.abs(l)>Math.abs(o)&&l<0&&(this.moveDirection="down")}s.globals.lastClientPosition={x:r.clientX,y:r.clientY};var h=s.globals.isRangeBar?s.globals.minY:s.globals.minX,c=s.globals.isRangeBar?s.globals.maxY:s.globals.maxX;s.config.xaxis.convertedCatToNumeric||r.panScrolled(h,c)}},{key:"delayedPanScrolled",value:function(){var i=this.w,a=i.globals.minX,s=i.globals.maxX,r=(i.globals.maxX-i.globals.minX)/2;this.moveDirection==="left"?(a=i.globals.minX+r,s=i.globals.maxX+r):this.moveDirection==="right"&&(a=i.globals.minX-r,s=i.globals.maxX-r),a=Math.floor(a),s=Math.floor(s),this.updateScrolledChart({xaxis:{min:a,max:s}},a,s)}},{key:"panScrolled",value:function(i,a){var s=this.w,r=this.xyRatios,o=L.clone(s.globals.initialConfig.yaxis),l=r.xRatio,h=s.globals.minX,c=s.globals.maxX;s.globals.isRangeBar&&(l=r.invertedYRatio,h=s.globals.minY,c=s.globals.maxY),this.moveDirection==="left"?(i=h+s.globals.gridWidth/15*l,a=c+s.globals.gridWidth/15*l):this.moveDirection==="right"&&(i=h-s.globals.gridWidth/15*l,a=c-s.globals.gridWidth/15*l),s.globals.isRangeBar||(is.globals.initialMaxX)&&(i=h,a=c);var d={xaxis:{min:i,max:a}};s.config.chart.group||(d.yaxis=o),this.updateScrolledChart(d,i,a)}},{key:"updateScrolledChart",value:function(i,a,s){var r=this.w;this.ctx.updateHelpers._updateOptions(i,!1,!1),typeof r.config.chart.events.scrolled=="function"&&r.config.chart.events.scrolled(this.ctx,{xaxis:{min:a,max:s}})}}]),t}(),ws=function(){function n(e){Y(this,n),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return F(n,[{key:"getNearestValues",value:function(e){var t=e.hoverArea,i=e.elGrid,a=e.clientX,s=e.clientY,r=this.w,o=i.getBoundingClientRect(),l=o.width,h=o.height,c=l/(r.globals.dataPoints-1),d=h/r.globals.dataPoints,u=this.hasBars();!r.globals.comboCharts&&!u||r.config.xaxis.convertedCatToNumeric||(c=l/r.globals.dataPoints);var g=a-o.left-r.globals.barPadForNumericAxis,f=s-o.top;g<0||f<0||g>l||f>h?(t.classList.remove("hovering-zoom"),t.classList.remove("hovering-pan")):r.globals.zoomEnabled?(t.classList.remove("hovering-pan"),t.classList.add("hovering-zoom")):r.globals.panEnabled&&(t.classList.remove("hovering-zoom"),t.classList.add("hovering-pan"));var p=Math.round(g/c),x=Math.floor(f/d);u&&!r.config.xaxis.convertedCatToNumeric&&(p=Math.ceil(g/c),p-=1);var b=null,m=null,v=r.globals.seriesXvalues.map(function(A){return A.filter(function(S){return L.isNumber(S)})}),k=r.globals.seriesYvalues.map(function(A){return A.filter(function(S){return L.isNumber(S)})});if(r.globals.isXNumeric){var y=this.ttCtx.getElGrid().getBoundingClientRect(),C=g*(y.width/l),w=f*(y.height/h);b=(m=this.closestInMultiArray(C,w,v,k)).index,p=m.j,b!==null&&r.globals.hasNullValues&&(v=r.globals.seriesXvalues[b],p=(m=this.closestInArray(C,v)).j)}return r.globals.capturedSeriesIndex=b===null?-1:b,(!p||p<1)&&(p=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=x:r.globals.capturedDataPointIndex=p,{capturedSeries:b,j:r.globals.isBarHorizontal?x:p,hoverX:g,hoverY:f}}},{key:"getFirstActiveXArray",value:function(e){for(var t=this.w,i=0,a=e.map(function(r,o){return r.length>0?o:-1}),s=0;s0)for(var a=0;a *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0&&arguments[0],i=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");i=ge(i),t&&(i=i.filter(function(s){var r=Number(s.getAttribute("data:realIndex"));return e.w.globals.collapsedSeriesIndices.indexOf(r)===-1})),i.sort(function(s,r){var o=Number(s.getAttribute("data:realIndex")),l=Number(r.getAttribute("data:realIndex"));return lo?-1:0});var a=[];return i.forEach(function(s){a.push(s.querySelector(".apexcharts-marker"))}),a}},{key:"hasMarkers",value:function(e){return this.getElMarkers(e).length>0}},{key:"getPathFromPoint",value:function(e,t){var i=Number(e.getAttribute("cx")),a=Number(e.getAttribute("cy")),s=e.getAttribute("shape");return new X(this.ctx).getMarkerPath(i,a,s,t)}},{key:"getElBars",value:function(){return this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-bar-series, .apexcharts-candlestick-series, .apexcharts-boxPlot-series, .apexcharts-rangebar-series")}},{key:"hasBars",value:function(){return this.getElBars().length>0}},{key:"getHoverMarkerSize",value:function(e){var t=this.w,i=t.config.markers.hover.size;return i===void 0&&(i=t.globals.markers.size[e]+t.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(e){var t=this.w,i=this.ttCtx;i.allTooltipSeriesGroups.length===0&&(i.allTooltipSeriesGroups=t.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var a=i.allTooltipSeriesGroups,s=0;s";u.forEach(function(M,P){A+=' ').concat(M.attrs.name,"
"),S+="".concat(M.val,"
")}),v.innerHTML=A+"