s){var c=s;s=n,n=c}var d=this.annoCtx.graphics.drawRect(0+t.offsetX,n+t.offsetY,this._getYAxisAnnotationWidth(t),s-n,0,t.fillColor,t.opacity,1,t.borderColor,r);d.node.classList.add("apexcharts-annotation-rect"),d.attr("clip-path","url(#gridRectMask".concat(a.globals.cuid,")")),e.appendChild(d.node),t.id&&d.node.classList.add(t.id)}var h="right"===t.label.position?a.globals.gridWidth:"center"===t.label.position?a.globals.gridWidth/2:0,u=this.annoCtx.graphics.drawText({x:h+t.label.offsetX,y:(null!=n?n:s)+t.label.offsetY-3,text:o,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-yaxis-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});u.attr({rel:i}),e.appendChild(u.node)}},{key:"_getYAxisAnnotationWidth",value:function(t){var e=this.w;return e.globals.gridWidth,(t.width.indexOf("%")>-1?e.globals.gridWidth*parseInt(t.width,10)/100:parseInt(t.width,10))+t.offsetX}},{key:"drawYAxisAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-yaxis-annotations"});return e.config.annotations.yaxis.map((function(e,n){t.addYaxisAnnotation(e,i.node,n)})),i}}]),t}(),T=function(){function t(e){o(this,t),this.w=e.w,this.annoCtx=e,this.helpers=new A(this.annoCtx)}return c(t,[{key:"addPointAnnotation",value:function(t,e,i){this.w;var n=this.helpers.getX1X2("x1",t),a=this.helpers.getY1Y2("y1",t);if(y.isNumber(n)){var r={pSize:t.marker.size,pointStrokeWidth:t.marker.strokeWidth,pointFillColor:t.marker.fillColor,pointStrokeColor:t.marker.strokeColor,shape:t.marker.shape,pRadius:t.marker.radius,class:"apexcharts-point-annotation-marker ".concat(t.marker.cssClass," ").concat(t.id?t.id:"")},s=this.annoCtx.graphics.drawMarker(n+t.marker.offsetX,a+t.marker.offsetY,r);e.appendChild(s.node);var o=t.label.text?t.label.text:"",l=this.annoCtx.graphics.drawText({x:n+t.label.offsetX,y:a+t.label.offsetY-t.marker.size-parseFloat(t.label.style.fontSize)/1.6,text:o,textAnchor:t.label.textAnchor,fontSize:t.label.style.fontSize,fontFamily:t.label.style.fontFamily,fontWeight:t.label.style.fontWeight,foreColor:t.label.style.color,cssClass:"apexcharts-point-annotation-label ".concat(t.label.style.cssClass," ").concat(t.id?t.id:"")});if(l.attr({rel:i}),e.appendChild(l.node),t.customSVG.SVG){var c=this.annoCtx.graphics.group({class:"apexcharts-point-annotations-custom-svg "+t.customSVG.cssClass});c.attr({transform:"translate(".concat(n+t.customSVG.offsetX,", ").concat(a+t.customSVG.offsetY,")")}),c.node.innerHTML=t.customSVG.SVG,e.appendChild(c.node)}if(t.image.path){var d=t.image.width?t.image.width:20,h=t.image.height?t.image.height:20;s=this.annoCtx.addImage({x:n+t.image.offsetX-d/2,y:a+t.image.offsetY-h/2,width:d,height:h,path:t.image.path,appendTo:".apexcharts-point-annotations"})}t.mouseEnter&&s.node.addEventListener("mouseenter",t.mouseEnter.bind(this,t)),t.mouseLeave&&s.node.addEventListener("mouseleave",t.mouseLeave.bind(this,t)),t.click&&s.node.addEventListener("click",t.click.bind(this,t))}}},{key:"drawPointAnnotations",value:function(){var t=this,e=this.w,i=this.annoCtx.graphics.group({class:"apexcharts-point-annotations"});return e.config.annotations.points.map((function(e,n){t.addPointAnnotation(e,i.node,n)})),i}}]),t}(),O={name:"en",options:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],toolbar:{exportToSVG:"Download SVG",exportToPNG:"Download PNG",exportToCSV:"Download CSV",menu:"Menu",selection:"Selection",selectionZoom:"Selection Zoom",zoomIn:"Zoom In",zoomOut:"Zoom Out",pan:"Panning",reset:"Reset Zoom"}}},I=function(){function t(){o(this,t),this.yAxis={show:!0,showAlways:!1,showForNullSeries:!0,seriesName:void 0,opposite:!1,reversed:!1,logarithmic:!1,logBase:10,tickAmount:void 0,stepSize:void 0,forceNiceScale:!1,max:void 0,min:void 0,floating:!1,decimalsInFloat:void 0,labels:{show:!0,minWidth:0,maxWidth:160,offsetX:0,offsetY:0,align:void 0,rotate:0,padding:20,style:{colors:[],fontSize:"11px",fontWeight:400,fontFamily:void 0,cssClass:""},formatter:void 0},axisBorder:{show:!1,color:"#e0e0e0",width:1,offsetX:0,offsetY:0},axisTicks:{show:!1,color:"#e0e0e0",width:6,offsetX:0,offsetY:0},title:{text:void 0,rotate:-90,offsetY:0,offsetX:0,style:{color:void 0,fontSize:"11px",fontWeight:900,fontFamily:void 0,cssClass:""}},tooltip:{enabled:!1,offsetX:0},crosshairs:{show:!0,position:"front",stroke:{color:"#b6b6b6",width:1,dashArray:0}}},this.pointAnnotation={id:void 0,x:0,y:null,yAxisIndex:0,seriesIndex:void 0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,marker:{size:4,fillColor:"#fff",strokeWidth:2,strokeColor:"#333",shape:"circle",offsetX:0,offsetY:0,radius:2,cssClass:""},label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}},customSVG:{SVG:void 0,cssClass:void 0,offsetX:0,offsetY:0},image:{path:void 0,width:20,height:20,offsetX:0,offsetY:0}},this.yAxisAnnotation={id:void 0,y:0,y2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,width:"100%",yAxisIndex:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"end",position:"right",offsetX:0,offsetY:-3,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.xAxisAnnotation={id:void 0,x:0,x2:null,strokeDashArray:1,fillColor:"#c2c2c2",borderColor:"#c2c2c2",borderWidth:1,opacity:.3,offsetX:0,offsetY:0,label:{borderColor:"#c2c2c2",borderWidth:1,borderRadius:2,text:void 0,textAnchor:"middle",orientation:"vertical",position:"top",offsetX:0,offsetY:0,mouseEnter:void 0,mouseLeave:void 0,click:void 0,style:{background:"#fff",color:void 0,fontSize:"11px",fontFamily:void 0,fontWeight:400,cssClass:"",padding:{left:5,right:5,top:2,bottom:2}}}},this.text={x:0,y:0,text:"",textAnchor:"start",foreColor:void 0,fontSize:"13px",fontFamily:void 0,fontWeight:400,appendTo:".apexcharts-annotations",backgroundColor:"transparent",borderColor:"#c2c2c2",borderRadius:0,borderWidth:0,paddingLeft:4,paddingRight:4,paddingTop:2,paddingBottom:2}}return c(t,[{key:"init",value:function(){return{annotations:{yaxis:[this.yAxisAnnotation],xaxis:[this.xAxisAnnotation],points:[this.pointAnnotation],texts:[],images:[],shapes:[]},chart:{animations:{enabled:!0,easing:"easeinout",speed:800,animateGradually:{delay:150,enabled:!0},dynamicAnimation:{enabled:!0,speed:350}},background:"transparent",locales:[O],defaultLocale:"en",dropShadow:{enabled:!1,enabledOnSeries:void 0,top:2,left:2,blur:4,color:"#000",opacity:.35},events:{animationEnd:void 0,beforeMount:void 0,mounted:void 0,updated:void 0,click:void 0,mouseMove:void 0,mouseLeave:void 0,xAxisLabelClick:void 0,legendClick:void 0,markerClick:void 0,selection:void 0,dataPointSelection:void 0,dataPointMouseEnter:void 0,dataPointMouseLeave:void 0,beforeZoom:void 0,beforeResetZoom:void 0,zoomed:void 0,scrolled:void 0,brushScrolled:void 0},foreColor:"#373d3f",fontFamily:"Helvetica, Arial, sans-serif",height:"auto",parentHeightOffset:15,redrawOnParentResize:!0,redrawOnWindowResize:!0,id:void 0,group:void 0,nonce:void 0,offsetX:0,offsetY:0,selection:{enabled:!1,type:"x",fill:{color:"#24292e",opacity:.1},stroke:{width:1,color:"#24292e",opacity:.4,dashArray:3},xaxis:{min:void 0,max:void 0},yaxis:{min:void 0,max:void 0}},sparkline:{enabled:!1},brush:{enabled:!1,autoScaleYaxis:!0,target:void 0,targets:void 0},stacked:!1,stackOnlyBar:!0,stackType:"normal",toolbar:{show:!0,offsetX:0,offsetY:0,tools:{download:!0,selection:!0,zoom:!0,zoomin:!0,zoomout:!0,pan:!0,reset:!0,customIcons:[]},export:{csv:{filename:void 0,columnDelimiter:",",headerCategory:"category",headerValue:"value",dateFormatter:function(t){return new Date(t).toDateString()}},png:{filename:void 0},svg:{filename:void 0}},autoSelected:"zoom"},type:"line",width:"100%",zoom:{enabled:!0,type:"x",autoScaleYaxis:!1,zoomedArea:{fill:{color:"#90CAF9",opacity:.4},stroke:{color:"#0D47A1",opacity:.4,width:1}}}},plotOptions:{area:{fillTo:"origin"},bar:{horizontal:!1,columnWidth:"70%",barHeight:"70%",distributed:!1,borderRadius:0,borderRadiusApplication:"around",borderRadiusWhenStacked:"last",rangeBarOverlap:!0,rangeBarGroupRows:!1,hideZeroBarsWhenGrouped:!1,isDumbbell:!1,dumbbellColors:void 0,isFunnel:!1,isFunnel3d:!0,colors:{ranges:[],backgroundBarColors:[],backgroundBarOpacity:1,backgroundBarRadius:0},dataLabels:{position:"top",maxItems:100,hideOverflowingLabels:!0,orientation:"horizontal",total:{enabled:!1,formatter:void 0,offsetX:0,offsetY:0,style:{color:"#373d3f",fontSize:"12px",fontFamily:void 0,fontWeight:600}}}},bubble:{zScaling:!0,minBubbleRadius:void 0,maxBubbleRadius:void 0},candlestick:{colors:{upward:"#00B746",downward:"#EF403C"},wick:{useFillColor:!0}},boxPlot:{colors:{upper:"#00E396",lower:"#008FFB"}},heatmap:{radius:2,enableShades:!0,shadeIntensity:.5,reverseNegativeShade:!1,distributed:!1,useFillColorAsStroke:!1,colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},treemap:{enableShades:!0,shadeIntensity:.5,distributed:!1,reverseNegativeShade:!1,useFillColorAsStroke:!1,dataLabels:{format:"scale"},colorScale:{inverse:!1,ranges:[],min:void 0,max:void 0}},radialBar:{inverseOrder:!1,startAngle:0,endAngle:360,offsetX:0,offsetY:0,hollow:{margin:5,size:"50%",background:"transparent",image:void 0,imageWidth:150,imageHeight:150,imageOffsetX:0,imageOffsetY:0,imageClipped:!0,position:"front",dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},track:{show:!0,startAngle:void 0,endAngle:void 0,background:"#f2f2f2",strokeWidth:"97%",opacity:1,margin:5,dropShadow:{enabled:!1,top:0,left:0,blur:3,color:"#000",opacity:.5}},dataLabels:{show:!0,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:0,formatter:function(t){return t}},value:{show:!0,fontSize:"14px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:16,formatter:function(t){return t+"%"}},total:{show:!1,label:"Total",fontSize:"16px",fontWeight:600,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)/t.globals.series.length+"%"}}},barLabels:{enabled:!1,margin:5,useSeriesColors:!0,fontFamily:void 0,fontWeight:600,fontSize:"16px",formatter:function(t){return t},onClick:void 0}},pie:{customScale:1,offsetX:0,offsetY:0,startAngle:0,endAngle:360,expandOnClick:!0,dataLabels:{offset:0,minAngleToShowLabel:10},donut:{size:"65%",background:"transparent",labels:{show:!1,name:{show:!0,fontSize:"16px",fontFamily:void 0,fontWeight:600,color:void 0,offsetY:-10,formatter:function(t){return t}},value:{show:!0,fontSize:"20px",fontFamily:void 0,fontWeight:400,color:void 0,offsetY:10,formatter:function(t){return t}},total:{show:!1,showAlways:!1,label:"Total",fontSize:"16px",fontWeight:400,fontFamily:void 0,color:void 0,formatter:function(t){return t.globals.seriesTotals.reduce((function(t,e){return t+e}),0)}}}}},polarArea:{rings:{strokeWidth:1,strokeColor:"#e8e8e8"},spokes:{strokeWidth:1,connectorColors:"#e8e8e8"}},radar:{size:void 0,offsetX:0,offsetY:0,polygons:{strokeWidth:1,strokeColors:"#e8e8e8",connectorColors:"#e8e8e8",fill:{colors:void 0}}}},colors:void 0,dataLabels:{enabled:!0,enabledOnSeries:void 0,formatter:function(t){return null!==t?t:""},textAnchor:"middle",distributed:!1,offsetX:0,offsetY:0,style:{fontSize:"12px",fontFamily:void 0,fontWeight:600,colors:void 0},background:{enabled:!0,foreColor:"#fff",borderRadius:2,padding:4,opacity:.9,borderWidth:1,borderColor:"#fff",dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},dropShadow:{enabled:!1,top:1,left:1,blur:1,color:"#000",opacity:.45}},fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]},image:{src:[],width:void 0,height:void 0},pattern:{style:"squares",width:6,height:6,strokeWidth:2}},forecastDataPoints:{count:0,fillOpacity:.5,strokeWidth:void 0,dashArray:4},grid:{show:!0,borderColor:"#e0e0e0",strokeDashArray:0,position:"back",xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}},row:{colors:void 0,opacity:.5},column:{colors:void 0,opacity:.5},padding:{top:0,right:10,bottom:0,left:12}},labels:[],legend:{show:!0,showForSingleSeries:!1,showForNullSeries:!0,showForZeroSeries:!0,floating:!1,position:"bottom",horizontalAlign:"center",inverseOrder:!1,fontSize:"12px",fontFamily:void 0,fontWeight:400,width:void 0,height:void 0,formatter:void 0,tooltipHoverFormatter:void 0,offsetX:-20,offsetY:4,customLegendItems:[],labels:{colors:void 0,useSeriesColors:!1},markers:{width:12,height:12,strokeWidth:0,fillColors:void 0,strokeColor:"#fff",radius:12,customHTML:void 0,offsetX:0,offsetY:0,onClick:void 0},itemMargin:{horizontal:5,vertical:2},onItemClick:{toggleDataSeries:!0},onItemHover:{highlightDataSeries:!0}},markers:{discrete:[],size:0,colors:void 0,strokeColors:"#fff",strokeWidth:2,strokeOpacity:.9,strokeDashArray:0,fillOpacity:1,shape:"circle",width:8,height:8,radius:2,offsetX:0,offsetY:0,onClick:void 0,onDblClick:void 0,showNullDataPoints:!0,hover:{size:void 0,sizeOffset:3}},noData:{text:void 0,align:"center",verticalAlign:"middle",offsetX:0,offsetY:0,style:{color:void 0,fontSize:"14px",fontFamily:void 0}},responsive:[],series:void 0,states:{normal:{filter:{type:"none",value:0}},hover:{filter:{type:"lighten",value:.1}},active:{allowMultipleDataPointsSelection:!1,filter:{type:"darken",value:.5}}},title:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:0,floating:!1,style:{fontSize:"14px",fontWeight:900,fontFamily:void 0,color:void 0}},subtitle:{text:void 0,align:"left",margin:5,offsetX:0,offsetY:30,floating:!1,style:{fontSize:"12px",fontWeight:400,fontFamily:void 0,color:void 0}},stroke:{show:!0,curve:"smooth",lineCap:"butt",width:2,colors:void 0,dashArray:0,fill:{type:"solid",colors:void 0,opacity:.85,gradient:{shade:"dark",type:"horizontal",shadeIntensity:.5,gradientToColors:void 0,inverseColors:!0,opacityFrom:1,opacityTo:1,stops:[0,50,100],colorStops:[]}}},tooltip:{enabled:!0,enabledOnSeries:void 0,shared:!0,hideEmptySeries:!0,followCursor:!1,intersect:!1,inverseOrder:!1,custom:void 0,fillSeriesColor:!1,theme:"light",cssClass:"",style:{fontSize:"12px",fontFamily:void 0},onDatasetHover:{highlightDataSeries:!1},x:{show:!0,format:"dd MMM",formatter:void 0},y:{formatter:void 0,title:{formatter:function(t){return t?t+": ":""}}},z:{formatter:void 0,title:"Size: "},marker:{show:!0,fillColors:void 0},items:{display:"flex"},fixed:{enabled:!1,position:"topRight",offsetX:0,offsetY:0}},xaxis:{type:"category",categories:[],convertedCatToNumeric:!1,offsetX:0,offsetY:0,overwriteCategories:void 0,labels:{show:!0,rotate:-45,rotateAlways:!1,hideOverlappingLabels:!0,trim:!1,minHeight:void 0,maxHeight:120,showDuplicates:!0,style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""},offsetX:0,offsetY:0,format:void 0,formatter:void 0,datetimeUTC:!0,datetimeFormatter:{year:"yyyy",month:"MMM 'yy",day:"dd MMM",hour:"HH:mm",minute:"HH:mm:ss",second:"HH:mm:ss"}},group:{groups:[],style:{colors:[],fontSize:"12px",fontWeight:400,fontFamily:void 0,cssClass:""}},axisBorder:{show:!0,color:"#e0e0e0",width:"100%",height:1,offsetX:0,offsetY:0},axisTicks:{show:!0,color:"#e0e0e0",height:6,offsetX:0,offsetY:0},stepSize:void 0,tickAmount:void 0,tickPlacement:"on",min:void 0,max:void 0,range:void 0,floating:!1,decimalsInFloat:void 0,position:"bottom",title:{text:void 0,offsetX:0,offsetY:0,style:{color:void 0,fontSize:"12px",fontWeight:900,fontFamily:void 0,cssClass:""}},crosshairs:{show:!0,width:1,position:"back",opacity:.9,stroke:{color:"#b6b6b6",width:1,dashArray:3},fill:{type:"solid",color:"#B1B9C4",gradient:{colorFrom:"#D8E3F0",colorTo:"#BED1E6",stops:[0,100],opacityFrom:.4,opacityTo:.5}},dropShadow:{enabled:!1,left:0,top:0,blur:1,opacity:.4}},tooltip:{enabled:!0,offsetY:0,formatter:void 0,style:{fontSize:"12px",fontFamily:void 0}}},yaxis:this.yAxis,theme:{mode:"light",palette:"palette1",monochrome:{enabled:!1,color:"#008FFB",shadeTo:"light",shadeIntensity:.65}}}}}]),t}(),L=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w,this.graphics=new S(this.ctx),this.w.globals.isBarHorizontal&&(this.invertAxis=!0),this.helpers=new A(this),this.xAxisAnnotations=new P(this),this.yAxisAnnotations=new E(this),this.pointsAnnotations=new T(this),this.w.globals.isBarHorizontal&&this.w.config.yaxis[0].reversed&&(this.inversedReversedAxis=!0),this.xDivision=this.w.globals.gridWidth/this.w.globals.dataPoints}return c(t,[{key:"drawAxesAnnotations",value:function(){var t=this.w;if(t.globals.axisCharts){for(var e=this.yAxisAnnotations.drawYAxisAnnotations(),i=this.xAxisAnnotations.drawXAxisAnnotations(),n=this.pointsAnnotations.drawPointAnnotations(),a=t.config.chart.animations.enabled,r=[e,i,n],s=[i.node,e.node,n.node],o=0;o<3;o++)t.globals.dom.elGraphical.add(r[o]),!a||t.globals.resized||t.globals.dataChanged||"scatter"!==t.config.chart.type&&"bubble"!==t.config.chart.type&&t.globals.dataPoints>1&&s[o].classList.add("apexcharts-element-hidden"),t.globals.delayedElements.push({el:s[o],index:0});this.helpers.annotationsBackground()}}},{key:"drawImageAnnos",value:function(){var t=this;this.w.config.annotations.images.map((function(e,i){t.addImage(e,i)}))}},{key:"drawTextAnnos",value:function(){var t=this;this.w.config.annotations.texts.map((function(e,i){t.addText(e,i)}))}},{key:"addXaxisAnnotation",value:function(t,e,i){this.xAxisAnnotations.addXaxisAnnotation(t,e,i)}},{key:"addYaxisAnnotation",value:function(t,e,i){this.yAxisAnnotations.addYaxisAnnotation(t,e,i)}},{key:"addPointAnnotation",value:function(t,e,i){this.pointsAnnotations.addPointAnnotation(t,e,i)}},{key:"addText",value:function(t,e){var i=t.x,n=t.y,a=t.text,r=t.textAnchor,s=t.foreColor,o=t.fontSize,l=t.fontFamily,c=t.fontWeight,d=t.cssClass,h=t.backgroundColor,u=t.borderWidth,p=t.strokeDashArray,f=t.borderRadius,g=t.borderColor,m=t.appendTo,v=void 0===m?".apexcharts-svg":m,b=t.paddingLeft,x=void 0===b?4:b,y=t.paddingRight,w=void 0===y?4:y,C=t.paddingBottom,S=void 0===C?2:C,k=t.paddingTop,A=void 0===k?2:k,P=this.w,E=this.graphics.drawText({x:i,y:n,text:a,textAnchor:r||"start",fontSize:o||"12px",fontWeight:c||"regular",fontFamily:l||P.config.chart.fontFamily,foreColor:s||P.config.chart.foreColor,cssClass:d}),T=P.globals.dom.baseEl.querySelector(v);T&&T.appendChild(E.node);var O=E.bbox();if(a){var I=this.graphics.drawRect(O.x-x,O.y-A,O.width+x+w,O.height+S+A,f,h||"transparent",1,u,g,p);T.insertBefore(I.node,E.node)}}},{key:"addImage",value:function(t,e){var i=this.w,n=t.path,a=t.x,r=void 0===a?0:a,s=t.y,o=void 0===s?0:s,l=t.width,c=void 0===l?20:l,d=t.height,h=void 0===d?20:d,u=t.appendTo,p=void 0===u?".apexcharts-svg":u,f=i.globals.dom.Paper.image(n);f.size(c,h).move(r,o);var g=i.globals.dom.baseEl.querySelector(p);return g&&g.appendChild(f.node),f}},{key:"addXaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"xaxis",contextMethod:i.addXaxisAnnotation}),i}},{key:"addYaxisAnnotationExternal",value:function(t,e,i){return this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"yaxis",contextMethod:i.addYaxisAnnotation}),i}},{key:"addPointAnnotationExternal",value:function(t,e,i){return void 0===this.invertAxis&&(this.invertAxis=i.w.globals.isBarHorizontal),this.addAnnotationExternal({params:t,pushToMemory:e,context:i,type:"point",contextMethod:i.addPointAnnotation}),i}},{key:"addAnnotationExternal",value:function(t){var e=t.params,i=t.pushToMemory,n=t.context,a=t.type,r=t.contextMethod,s=n,o=s.w,l=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(a,"-annotations")),c=l.childNodes.length+1,d=new I,h=Object.assign({},"xaxis"===a?d.xAxisAnnotation:"yaxis"===a?d.yAxisAnnotation:d.pointAnnotation),u=y.extend(h,e);switch(a){case"xaxis":this.addXaxisAnnotation(u,l,c);break;case"yaxis":this.addYaxisAnnotation(u,l,c);break;case"point":this.addPointAnnotation(u,l,c)}var p=o.globals.dom.baseEl.querySelector(".apexcharts-".concat(a,"-annotations .apexcharts-").concat(a,"-annotation-label[rel='").concat(c,"']")),f=this.helpers.addBackgroundToAnno(p,u);return f&&l.insertBefore(f.node,p),i&&o.globals.memory.methodsToExec.push({context:s,id:u.id?u.id:y.randomId(),method:r,label:"addAnnotation",params:e}),n}},{key:"clearAnnotations",value:function(t){var e=t.w,i=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis-annotations, .apexcharts-xaxis-annotations, .apexcharts-point-annotations");e.globals.memory.methodsToExec.map((function(t,i){"addText"!==t.label&&"addAnnotation"!==t.label||e.globals.memory.methodsToExec.splice(i,1)})),i=y.listToArray(i),Array.prototype.forEach.call(i,(function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}))}},{key:"removeAnnotation",value:function(t,e){var i=t.w,n=i.globals.dom.baseEl.querySelectorAll(".".concat(e));n&&(i.globals.memory.methodsToExec.map((function(t,n){t.id===e&&i.globals.memory.methodsToExec.splice(n,1)})),Array.prototype.forEach.call(n,(function(t){t.parentElement.removeChild(t)})))}}]),t}(),M=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w,this.months31=[1,3,5,7,8,10,12],this.months30=[2,4,6,9,11],this.daysCntOfYear=[0,31,59,90,120,151,181,212,243,273,304,334]}return c(t,[{key:"isValidDate",value:function(t){return"number"!=typeof t&&!isNaN(this.parseDate(t))}},{key:"getTimeStamp",value:function(t){return Date.parse(t)?this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toISOString().substr(0,25)).getTime():new Date(t).getTime():t}},{key:"getDate",value:function(t){return this.w.config.xaxis.labels.datetimeUTC?new Date(new Date(t).toUTCString()):new Date(t)}},{key:"parseDate",value:function(t){var e=Date.parse(t);if(!isNaN(e))return this.getTimeStamp(t);var i=Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "));return this.getTimeStamp(i)}},{key:"parseDateWithTimezone",value:function(t){return Date.parse(t.replace(/-/g,"/").replace(/[a-z]+/gi," "))}},{key:"formatDate",value:function(t,e){var i=this.w.globals.locale,n=this.w.config.xaxis.labels.datetimeUTC,a=["\0"].concat(v(i.months)),r=[""].concat(v(i.shortMonths)),s=[""].concat(v(i.days)),o=[""].concat(v(i.shortDays));function l(t,e){var i=t+"";for(e=e||2;i.length12?u-12:0===u?12:u;e=(e=(e=(e=e.replace(/(^|[^\\])HH+/g,"$1"+l(u))).replace(/(^|[^\\])H/g,"$1"+u)).replace(/(^|[^\\])hh+/g,"$1"+l(p))).replace(/(^|[^\\])h/g,"$1"+p);var f=n?t.getUTCMinutes():t.getMinutes();e=(e=e.replace(/(^|[^\\])mm+/g,"$1"+l(f))).replace(/(^|[^\\])m/g,"$1"+f);var g=n?t.getUTCSeconds():t.getSeconds();e=(e=e.replace(/(^|[^\\])ss+/g,"$1"+l(g))).replace(/(^|[^\\])s/g,"$1"+g);var m=n?t.getUTCMilliseconds():t.getMilliseconds();e=e.replace(/(^|[^\\])fff+/g,"$1"+l(m,3)),m=Math.round(m/10),e=e.replace(/(^|[^\\])ff/g,"$1"+l(m)),m=Math.round(m/10);var b=u<12?"AM":"PM";e=(e=(e=e.replace(/(^|[^\\])f/g,"$1"+m)).replace(/(^|[^\\])TT+/g,"$1"+b)).replace(/(^|[^\\])T/g,"$1"+b.charAt(0));var x=b.toLowerCase();e=(e=e.replace(/(^|[^\\])tt+/g,"$1"+x)).replace(/(^|[^\\])t/g,"$1"+x.charAt(0));var y=-t.getTimezoneOffset(),w=n||!y?"Z":y>0?"+":"-";if(!n){var C=(y=Math.abs(y))%60;w+=l(Math.floor(y/60))+":"+l(C)}e=e.replace(/(^|[^\\])K/g,"$1"+w);var S=(n?t.getUTCDay():t.getDay())+1;return(e=(e=(e=(e=e.replace(new RegExp(s[0],"g"),s[S])).replace(new RegExp(o[0],"g"),o[S])).replace(new RegExp(a[0],"g"),a[d])).replace(new RegExp(r[0],"g"),r[d])).replace(/\\(.)/g,"$1")}},{key:"getTimeUnitsfromTimestamp",value:function(t,e,i){var n=this.w;void 0!==n.config.xaxis.min&&(t=n.config.xaxis.min),void 0!==n.config.xaxis.max&&(e=n.config.xaxis.max);var a=this.getDate(t),r=this.getDate(e),s=this.formatDate(a,"yyyy MM dd HH mm ss fff").split(" "),o=this.formatDate(r,"yyyy MM dd HH mm ss fff").split(" ");return{minMillisecond:parseInt(s[6],10),maxMillisecond:parseInt(o[6],10),minSecond:parseInt(s[5],10),maxSecond:parseInt(o[5],10),minMinute:parseInt(s[4],10),maxMinute:parseInt(o[4],10),minHour:parseInt(s[3],10),maxHour:parseInt(o[3],10),minDate:parseInt(s[2],10),maxDate:parseInt(o[2],10),minMonth:parseInt(s[1],10)-1,maxMonth:parseInt(o[1],10)-1,minYear:parseInt(s[0],10),maxYear:parseInt(o[0],10)}}},{key:"isLeapYear",value:function(t){return t%4==0&&t%100!=0||t%400==0}},{key:"calculcateLastDaysOfMonth",value:function(t,e,i){return this.determineDaysOfMonths(t,e)-i}},{key:"determineDaysOfYear",value:function(t){var e=365;return this.isLeapYear(t)&&(e=366),e}},{key:"determineRemainingDaysOfYear",value:function(t,e,i){var n=this.daysCntOfYear[e]+i;return e>1&&this.isLeapYear()&&n++,n}},{key:"determineDaysOfMonths",value:function(t,e){var i=30;switch(t=y.monthMod(t),!0){case this.months30.indexOf(t)>-1:2===t&&(i=this.isLeapYear(e)?29:28);break;case this.months31.indexOf(t)>-1:default:i=31}return i}}]),t}(),_=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w,this.tooltipKeyFormat="dd MMM"}return c(t,[{key:"xLabelFormat",value:function(t,e,i,n){var a=this.w;if("datetime"===a.config.xaxis.type&&void 0===a.config.xaxis.labels.formatter&&void 0===a.config.tooltip.x.formatter){var r=new M(this.ctx);return r.formatDate(r.getDate(e),a.config.tooltip.x.format)}return t(e,i,n)}},{key:"defaultGeneralFormatter",value:function(t){return Array.isArray(t)?t.map((function(t){return t})):t}},{key:"defaultYFormatter",value:function(t,e,i){var n=this.w;return y.isNumber(t)&&(t=0!==n.globals.yValueDecimal?t.toFixed(void 0!==e.decimalsInFloat?e.decimalsInFloat:n.globals.yValueDecimal):n.globals.maxYArr[i]-n.globals.minYArr[i]<5?t.toFixed(1):t.toFixed(0)),t}},{key:"setLabelFormatters",value:function(){var t=this,e=this.w;return e.globals.xaxisTooltipFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttKeyFormatter=function(e){return t.defaultGeneralFormatter(e)},e.globals.ttZFormatter=function(t){return t},e.globals.legendFormatter=function(e){return t.defaultGeneralFormatter(e)},void 0!==e.config.xaxis.labels.formatter?e.globals.xLabelFormatter=e.config.xaxis.labels.formatter:e.globals.xLabelFormatter=function(t){if(y.isNumber(t)){if(!e.config.xaxis.convertedCatToNumeric&&"numeric"===e.config.xaxis.type){if(y.isNumber(e.config.xaxis.decimalsInFloat))return t.toFixed(e.config.xaxis.decimalsInFloat);var i=e.globals.maxX-e.globals.minX;return i>0&&i<100?t.toFixed(1):t.toFixed(0)}return e.globals.isBarHorizontal&&e.globals.maxY-e.globals.minYArr<4?t.toFixed(1):t.toFixed(0)}return t},"function"==typeof e.config.tooltip.x.formatter?e.globals.ttKeyFormatter=e.config.tooltip.x.formatter:e.globals.ttKeyFormatter=e.globals.xLabelFormatter,"function"==typeof e.config.xaxis.tooltip.formatter&&(e.globals.xaxisTooltipFormatter=e.config.xaxis.tooltip.formatter),(Array.isArray(e.config.tooltip.y)||void 0!==e.config.tooltip.y.formatter)&&(e.globals.ttVal=e.config.tooltip.y),void 0!==e.config.tooltip.z.formatter&&(e.globals.ttZFormatter=e.config.tooltip.z.formatter),void 0!==e.config.legend.formatter&&(e.globals.legendFormatter=e.config.legend.formatter),e.config.yaxis.forEach((function(i,n){void 0!==i.labels.formatter?e.globals.yLabelFormatters[n]=i.labels.formatter:e.globals.yLabelFormatters[n]=function(a){return e.globals.xyCharts?Array.isArray(a)?a.map((function(e){return t.defaultYFormatter(e,i,n)})):t.defaultYFormatter(a,i,n):a}})),e.globals}},{key:"heatmapLabelFormatters",value:function(){var t=this.w;if("heatmap"===t.config.chart.type){t.globals.yAxisScale[0].result=t.globals.seriesNames.slice();var e=t.globals.seriesNames.reduce((function(t,e){return t.length>e.length?t:e}),0);t.globals.yAxisScale[0].niceMax=e,t.globals.yAxisScale[0].niceMin=e}}}]),t}(),D=function(t){var e,i=t.isTimeline,n=t.ctx,a=t.seriesIndex,r=t.dataPointIndex,s=t.y1,o=t.y2,l=t.w,c=l.globals.seriesRangeStart[a][r],d=l.globals.seriesRangeEnd[a][r],h=l.globals.labels[r],u=l.config.series[a].name?l.config.series[a].name:"",p=l.globals.ttKeyFormatter,f=l.config.tooltip.y.title.formatter,g={w:l,seriesIndex:a,dataPointIndex:r,start:c,end:d};"function"==typeof f&&(u=f(u,g)),null!==(e=l.config.series[a].data[r])&&void 0!==e&&e.x&&(h=l.config.series[a].data[r].x),i||"datetime"===l.config.xaxis.type&&(h=new _(n).xLabelFormat(l.globals.ttKeyFormatter,h,h,{i:void 0,dateFormatter:new M(n).formatDate,w:l})),"function"==typeof p&&(h=p(h,g)),Number.isFinite(s)&&Number.isFinite(o)&&(c=s,d=o);var m="",v="",b=l.globals.colors[a];if(void 0===l.config.tooltip.x.formatter)if("datetime"===l.config.xaxis.type){var x=new M(n);m=x.formatDate(x.getDate(c),l.config.tooltip.x.format),v=x.formatDate(x.getDate(d),l.config.tooltip.x.format)}else m=c,v=d;else m=l.config.tooltip.x.formatter(c),v=l.config.tooltip.x.formatter(d);return{start:c,end:d,startVal:m,endVal:v,ylabel:h,color:b,seriesName:u}},z=function(t){var e=t.color,i=t.seriesName,n=t.ylabel,a=t.start,r=t.end,s=t.seriesIndex,o=t.dataPointIndex,l=t.ctx.tooltip.tooltipLabels.getFormatters(s);a=l.yLbFormatter(a),r=l.yLbFormatter(r);var c=l.yLbFormatter(t.w.globals.series[s][o]),d='\n '.concat(a,'\n - \n ').concat(r,"\n ");return'"},j=function(){function t(e){o(this,t),this.opts=e}return c(t,[{key:"hideYAxis",value:function(){this.opts.yaxis[0].show=!1,this.opts.yaxis[0].title.text="",this.opts.yaxis[0].axisBorder.show=!1,this.opts.yaxis[0].axisTicks.show=!1,this.opts.yaxis[0].floating=!0}},{key:"line",value:function(){return{chart:{animations:{easing:"swing"}},dataLabels:{enabled:!1},stroke:{width:5,curve:"straight"},markers:{size:0,hover:{sizeOffset:6}},xaxis:{crosshairs:{width:1}}}}},{key:"sparkline",value:function(t){return this.hideYAxis(),y.extend(t,{grid:{show:!1,padding:{left:0,right:0,top:0,bottom:0}},legend:{show:!1},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}},chart:{toolbar:{show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1}})}},{key:"bar",value:function(){return{chart:{stacked:!1,animations:{easing:"swing"}},plotOptions:{bar:{dataLabels:{position:"center"}}},dataLabels:{style:{colors:["#fff"]},background:{enabled:!1}},stroke:{width:0,lineCap:"round"},fill:{opacity:.85},legend:{markers:{shape:"square",radius:2,size:8}},tooltip:{shared:!1,intersect:!0},xaxis:{tooltip:{enabled:!1},tickPlacement:"between",crosshairs:{width:"barWidth",position:"back",fill:{type:"gradient"},dropShadow:{enabled:!1},stroke:{width:0}}}}}},{key:"funnel",value:function(){return this.hideYAxis(),r(r({},this.bar()),{},{chart:{animations:{easing:"linear",speed:800,animateGradually:{enabled:!1}}},plotOptions:{bar:{horizontal:!0,borderRadiusApplication:"around",borderRadius:0,dataLabels:{position:"center"}}},grid:{show:!1,padding:{left:0,right:0}},xaxis:{labels:{show:!1},tooltip:{enabled:!1},axisBorder:{show:!1},axisTicks:{show:!1}}})}},{key:"candlestick",value:function(){var t=this;return{stroke:{width:1,colors:["#333"]},fill:{opacity:1},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,n=e.dataPointIndex,a=e.w;return t._getBoxTooltip(a,i,n,["Open","High","","Low","Close"],"candlestick")}},states:{active:{filter:{type:"none"}}},xaxis:{crosshairs:{width:1}}}}},{key:"boxPlot",value:function(){var t=this;return{chart:{animations:{dynamicAnimation:{enabled:!1}}},stroke:{width:1,colors:["#24292e"]},dataLabels:{enabled:!1},tooltip:{shared:!0,custom:function(e){var i=e.seriesIndex,n=e.dataPointIndex,a=e.w;return t._getBoxTooltip(a,i,n,["Minimum","Q1","Median","Q3","Maximum"],"boxPlot")}},markers:{size:5,strokeWidth:1,strokeColors:"#111"},xaxis:{crosshairs:{width:1}}}}},{key:"rangeBar",value:function(){return{chart:{animations:{animateGradually:!1}},stroke:{width:0,lineCap:"square"},plotOptions:{bar:{borderRadius:0,dataLabels:{position:"center"}}},dataLabels:{enabled:!1,formatter:function(t,e){e.ctx;var i=e.seriesIndex,n=e.dataPointIndex,a=e.w,r=function(){var t=a.globals.seriesRangeStart[i][n];return a.globals.seriesRangeEnd[i][n]-t};return a.globals.comboCharts?"rangeBar"===a.config.series[i].type||"rangeArea"===a.config.series[i].type?r():t:r()},background:{enabled:!1},style:{colors:["#fff"]}},markers:{size:10},tooltip:{shared:!1,followCursor:!0,custom:function(t){return t.w.config.plotOptions&&t.w.config.plotOptions.bar&&t.w.config.plotOptions.bar.horizontal?function(t){var e=D(r(r({},t),{},{isTimeline:!0})),i=e.color,n=e.seriesName,a=e.ylabel,s=e.startVal,o=e.endVal;return z(r(r({},t),{},{color:i,seriesName:n,ylabel:a,start:s,end:o}))}(t):function(t){var e=D(t),i=e.color,n=e.seriesName,a=e.ylabel,s=e.start,o=e.end;return z(r(r({},t),{},{color:i,seriesName:n,ylabel:a,start:s,end:o}))}(t)}},xaxis:{tickPlacement:"between",tooltip:{enabled:!1},crosshairs:{stroke:{width:0}}}}}},{key:"dumbbell",value:function(t){var e,i;return null!==(e=t.plotOptions.bar)&&void 0!==e&&e.barHeight||(t.plotOptions.bar.barHeight=2),null!==(i=t.plotOptions.bar)&&void 0!==i&&i.columnWidth||(t.plotOptions.bar.columnWidth=2),t}},{key:"area",value:function(){return{stroke:{width:4,fill:{type:"solid",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}}},fill:{type:"gradient",gradient:{inverseColors:!1,shade:"light",type:"vertical",opacityFrom:.65,opacityTo:.5,stops:[0,100,100]}},markers:{size:0,hover:{sizeOffset:6}},tooltip:{followCursor:!1}}}},{key:"rangeArea",value:function(){return{stroke:{curve:"straight",width:0},fill:{type:"solid",opacity:.6},markers:{size:0},states:{hover:{filter:{type:"none"}},active:{filter:{type:"none"}}},tooltip:{intersect:!1,shared:!0,followCursor:!0,custom:function(t){return function(t){var e=D(t),i=e.color,n=e.seriesName,a=e.ylabel,s=e.start,o=e.end;return z(r(r({},t),{},{color:i,seriesName:n,ylabel:a,start:s,end:o}))}(t)}}}}},{key:"brush",value:function(t){return y.extend(t,{chart:{toolbar:{autoSelected:"selection",show:!1},zoom:{enabled:!1}},dataLabels:{enabled:!1},stroke:{width:1},tooltip:{enabled:!1},xaxis:{tooltip:{enabled:!1}}})}},{key:"stacked100",value:function(t){t.dataLabels=t.dataLabels||{},t.dataLabels.formatter=t.dataLabels.formatter||void 0;var e=t.dataLabels.formatter;return t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})),"bar"===t.chart.type&&(t.dataLabels.formatter=e||function(t){return"number"==typeof t&&t?t.toFixed(0)+"%":t}),t}},{key:"stackedBars",value:function(){var t=this.bar();return r(r({},t),{},{plotOptions:r(r({},t.plotOptions),{},{bar:r(r({},t.plotOptions.bar),{},{borderRadiusApplication:"end",borderRadiusWhenStacked:"last"})})})}},{key:"convertCatToNumeric",value:function(t){return t.xaxis.convertedCatToNumeric=!0,t}},{key:"convertCatToNumericXaxis",value:function(t,e,i){t.xaxis.type="numeric",t.xaxis.labels=t.xaxis.labels||{},t.xaxis.labels.formatter=t.xaxis.labels.formatter||function(t){return y.isNumber(t)?Math.floor(t):t};var n=t.xaxis.labels.formatter,a=t.xaxis.categories&&t.xaxis.categories.length?t.xaxis.categories:t.labels;return i&&i.length&&(a=i.map((function(t){return Array.isArray(t)?t:String(t)}))),a&&a.length&&(t.xaxis.labels.formatter=function(t){return y.isNumber(t)?n(a[Math.floor(t)-1]):n(t)}),t.xaxis.categories=[],t.labels=[],t.xaxis.tickAmount=t.xaxis.tickAmount||"dataPoints",t}},{key:"bubble",value:function(){return{dataLabels:{style:{colors:["#fff"]}},tooltip:{shared:!1,intersect:!0},xaxis:{crosshairs:{width:0}},fill:{type:"solid",gradient:{shade:"light",inverse:!0,shadeIntensity:.55,opacityFrom:.4,opacityTo:.8}}}}},{key:"scatter",value:function(){return{dataLabels:{enabled:!1},tooltip:{shared:!1,intersect:!0},markers:{size:6,strokeWidth:1,hover:{sizeOffset:2}}}}},{key:"heatmap",value:function(){return{chart:{stacked:!1},fill:{opacity:1},dataLabels:{style:{colors:["#fff"]}},stroke:{colors:["#fff"]},tooltip:{followCursor:!0,marker:{show:!1},x:{show:!1}},legend:{position:"top",markers:{shape:"square",size:10,offsetY:2}},grid:{padding:{right:20}}}}},{key:"treemap",value:function(){return{chart:{zoom:{enabled:!1}},dataLabels:{style:{fontSize:14,fontWeight:600,colors:["#fff"]}},stroke:{show:!0,width:2,colors:["#fff"]},legend:{show:!1},fill:{gradient:{stops:[0,100]}},tooltip:{followCursor:!0,x:{show:!1}},grid:{padding:{left:0,right:0}},xaxis:{crosshairs:{show:!1},tooltip:{enabled:!1}}}}},{key:"pie",value:function(){return{chart:{toolbar:{show:!1}},plotOptions:{pie:{donut:{labels:{show:!1}}}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",stops:[0,100]}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"donut",value:function(){return{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},style:{colors:["#fff"]},background:{enabled:!1},dropShadow:{enabled:!0}},stroke:{colors:["#fff"]},fill:{opacity:1,gradient:{shade:"light",shadeIntensity:.35,stops:[80,100],opacityFrom:1,opacityTo:1}},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"polarArea",value:function(){return this.opts.yaxis[0].tickAmount=this.opts.yaxis[0].tickAmount?this.opts.yaxis[0].tickAmount:6,{chart:{toolbar:{show:!1}},dataLabels:{formatter:function(t){return t.toFixed(1)+"%"},enabled:!1},stroke:{show:!0,width:2},fill:{opacity:.7},tooltip:{theme:"dark",fillSeriesColor:!0},legend:{position:"right"}}}},{key:"radar",value:function(){return this.opts.yaxis[0].labels.offsetY=this.opts.yaxis[0].labels.offsetY?this.opts.yaxis[0].labels.offsetY:6,{dataLabels:{enabled:!1,style:{fontSize:"11px"}},stroke:{width:2},markers:{size:3,strokeWidth:1,strokeOpacity:1},fill:{opacity:.2},tooltip:{shared:!1,intersect:!0,followCursor:!0},grid:{show:!1},xaxis:{labels:{formatter:function(t){return t},style:{colors:["#a8a8a8"],fontSize:"11px"}},tooltip:{enabled:!1},crosshairs:{show:!1}}}}},{key:"radialBar",value:function(){return{chart:{animations:{dynamicAnimation:{enabled:!0,speed:800}},toolbar:{show:!1}},fill:{gradient:{shade:"dark",shadeIntensity:.4,inverseColors:!1,type:"diagonal2",opacityFrom:1,opacityTo:1,stops:[70,98,100]}},legend:{show:!1,position:"right"},tooltip:{enabled:!1,fillSeriesColor:!0}}}},{key:"_getBoxTooltip",value:function(t,e,i,n,a){var r=t.globals.seriesCandleO[e][i],s=t.globals.seriesCandleH[e][i],o=t.globals.seriesCandleM[e][i],l=t.globals.seriesCandleL[e][i],c=t.globals.seriesCandleC[e][i];return t.config.series[e].type&&t.config.series[e].type!==a?'\n '.concat(t.config.series[e].name?t.config.series[e].name:"series-"+(e+1),": ").concat(t.globals.series[e][i],"\n
"):'"}}]),t}(),N=function(){function t(e){o(this,t),this.opts=e}return c(t,[{key:"init",value:function(t){var e=t.responsiveOverride,i=this.opts,n=new I,a=new j(i);this.chartType=i.chart.type,i=this.extendYAxis(i),i=this.extendAnnotations(i);var r=n.init(),o={};if(i&&"object"===s(i)){var l,c,d,h,u,p,f,g,m,v,b={};b=-1!==["line","area","bar","candlestick","boxPlot","rangeBar","rangeArea","bubble","scatter","heatmap","treemap","pie","polarArea","donut","radar","radialBar"].indexOf(i.chart.type)?a[i.chart.type]():a.line(),null!==(l=i.plotOptions)&&void 0!==l&&null!==(c=l.bar)&&void 0!==c&&c.isFunnel&&(b=a.funnel()),i.chart.stacked&&"bar"===i.chart.type&&(b=a.stackedBars()),null!==(d=i.chart.brush)&&void 0!==d&&d.enabled&&(b=a.brush(b)),i.chart.stacked&&"100%"===i.chart.stackType&&(i=a.stacked100(i)),null!==(h=i.plotOptions)&&void 0!==h&&null!==(u=h.bar)&&void 0!==u&&u.isDumbbell&&(i=a.dumbbell(i)),"monotoneCubic"===(null===(p=i)||void 0===p||null===(f=p.stroke)||void 0===f?void 0:f.curve)&&(i.stroke.curve="smooth"),this.checkForDarkTheme(window.Apex),this.checkForDarkTheme(i),i.xaxis=i.xaxis||window.Apex.xaxis||{},e||(i.xaxis.convertedCatToNumeric=!1),(null!==(g=(i=this.checkForCatToNumericXAxis(this.chartType,b,i)).chart.sparkline)&&void 0!==g&&g.enabled||null!==(m=window.Apex.chart)&&void 0!==m&&null!==(v=m.sparkline)&&void 0!==v&&v.enabled)&&(b=a.sparkline(b)),o=y.extend(r,b)}var x=y.extend(o,window.Apex);return r=y.extend(x,i),this.handleUserInputErrors(r)}},{key:"checkForCatToNumericXAxis",value:function(t,e,i){var n,a,r=new j(i),s=("bar"===t||"boxPlot"===t)&&(null===(n=i.plotOptions)||void 0===n||null===(a=n.bar)||void 0===a?void 0:a.horizontal),o="pie"===t||"polarArea"===t||"donut"===t||"radar"===t||"radialBar"===t||"heatmap"===t,l="datetime"!==i.xaxis.type&&"numeric"!==i.xaxis.type,c=i.xaxis.tickPlacement?i.xaxis.tickPlacement:e.xaxis&&e.xaxis.tickPlacement;return s||o||!l||"between"===c||(i=r.convertCatToNumeric(i)),i}},{key:"extendYAxis",value:function(t,e){var i=new I;(void 0===t.yaxis||!t.yaxis||Array.isArray(t.yaxis)&&0===t.yaxis.length)&&(t.yaxis={}),t.yaxis.constructor!==Array&&window.Apex.yaxis&&window.Apex.yaxis.constructor!==Array&&(t.yaxis=y.extend(t.yaxis,window.Apex.yaxis)),t.yaxis.constructor!==Array?t.yaxis=[y.extend(i.yAxis,t.yaxis)]:t.yaxis=y.extendArray(t.yaxis,i.yAxis);var n=!1;t.yaxis.forEach((function(t){t.logarithmic&&(n=!0)}));var a=t.series;return e&&!a&&(a=e.config.series),n&&a.length!==t.yaxis.length&&a.length&&(t.yaxis=a.map((function(e,n){if(e.name||(a[n].name="series-".concat(n+1)),t.yaxis[n])return t.yaxis[n].seriesName=a[n].name,t.yaxis[n];var r=y.extend(i.yAxis,t.yaxis[0]);return r.show=!1,r}))),n&&a.length>1&&a.length!==t.yaxis.length&&console.warn("A multi-series logarithmic chart should have equal number of series and y-axes"),t}},{key:"extendAnnotations",value:function(t){return void 0===t.annotations&&(t.annotations={},t.annotations.yaxis=[],t.annotations.xaxis=[],t.annotations.points=[]),t=this.extendYAxisAnnotations(t),t=this.extendXAxisAnnotations(t),this.extendPointAnnotations(t)}},{key:"extendYAxisAnnotations",value:function(t){var e=new I;return t.annotations.yaxis=y.extendArray(void 0!==t.annotations.yaxis?t.annotations.yaxis:[],e.yAxisAnnotation),t}},{key:"extendXAxisAnnotations",value:function(t){var e=new I;return t.annotations.xaxis=y.extendArray(void 0!==t.annotations.xaxis?t.annotations.xaxis:[],e.xAxisAnnotation),t}},{key:"extendPointAnnotations",value:function(t){var e=new I;return t.annotations.points=y.extendArray(void 0!==t.annotations.points?t.annotations.points:[],e.pointAnnotation),t}},{key:"checkForDarkTheme",value:function(t){t.theme&&"dark"===t.theme.mode&&(t.tooltip||(t.tooltip={}),"light"!==t.tooltip.theme&&(t.tooltip.theme="dark"),t.chart.foreColor||(t.chart.foreColor="#f6f7f8"),t.chart.background||(t.chart.background="#424242"),t.theme.palette||(t.theme.palette="palette4"))}},{key:"handleUserInputErrors",value:function(t){var e=t;if(e.tooltip.shared&&e.tooltip.intersect)throw new Error("tooltip.shared cannot be enabled when tooltip.intersect is true. Turn off any other option by setting it to false.");if("bar"===e.chart.type&&e.plotOptions.bar.horizontal){if(e.yaxis.length>1)throw new Error("Multiple Y Axis for bars are not supported. Switch to column chart by setting plotOptions.bar.horizontal=false");e.yaxis[0].reversed&&(e.yaxis[0].opposite=!0),e.xaxis.tooltip.enabled=!1,e.yaxis[0].tooltip.enabled=!1,e.chart.zoom.enabled=!1}return"bar"!==e.chart.type&&"rangeBar"!==e.chart.type||e.tooltip.shared&&"barWidth"===e.xaxis.crosshairs.width&&e.series.length>1&&(e.xaxis.crosshairs.width="tickWidth"),"candlestick"!==e.chart.type&&"boxPlot"!==e.chart.type||e.yaxis[0].reversed&&(console.warn("Reversed y-axis in ".concat(e.chart.type," chart is not supported.")),e.yaxis[0].reversed=!1),e}}]),t}(),H=function(){function t(){o(this,t)}return c(t,[{key:"initGlobalVars",value:function(t){t.series=[],t.seriesCandleO=[],t.seriesCandleH=[],t.seriesCandleM=[],t.seriesCandleL=[],t.seriesCandleC=[],t.seriesRangeStart=[],t.seriesRangeEnd=[],t.seriesRange=[],t.seriesPercent=[],t.seriesGoals=[],t.seriesX=[],t.seriesZ=[],t.seriesNames=[],t.seriesTotals=[],t.seriesLog=[],t.seriesColors=[],t.stackedSeriesTotals=[],t.seriesXvalues=[],t.seriesYvalues=[],t.labels=[],t.hasXaxisGroups=!1,t.groups=[],t.hasSeriesGroups=!1,t.seriesGroups=[],t.categoryLabels=[],t.timescaleLabels=[],t.noLabelsProvided=!1,t.resizeTimer=null,t.selectionResizeTimer=null,t.delayedElements=[],t.pointsArray=[],t.dataLabelsRects=[],t.isXNumeric=!1,t.skipLastTimelinelabel=!1,t.skipFirstTimelinelabel=!1,t.isDataXYZ=!1,t.isMultiLineX=!1,t.isMultipleYAxis=!1,t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE,t.minYArr=[],t.maxYArr=[],t.maxX=-Number.MAX_VALUE,t.minX=Number.MAX_VALUE,t.initialMaxX=-Number.MAX_VALUE,t.initialMinX=Number.MAX_VALUE,t.maxDate=0,t.minDate=Number.MAX_VALUE,t.minZ=Number.MAX_VALUE,t.maxZ=-Number.MAX_VALUE,t.minXDiff=Number.MAX_VALUE,t.yAxisScale=[],t.xAxisScale=null,t.xAxisTicksPositions=[],t.yLabelsCoords=[],t.yTitleCoords=[],t.barPadForNumericAxis=0,t.padHorizontal=0,t.xRange=0,t.yRange=[],t.zRange=0,t.dataPoints=0,t.xTickAmount=0}},{key:"globalVars",value:function(t){return{chartID:null,cuid:null,events:{beforeMount:[],mounted:[],updated:[],clicked:[],selection:[],dataPointSelection:[],zoomed:[],scrolled:[]},colors:[],clientX:null,clientY:null,fill:{colors:[]},stroke:{colors:[]},dataLabels:{style:{colors:[]}},radarPolygons:{fill:{colors:[]}},markers:{colors:[],size:t.markers.size,largestSize:0},animationEnded:!1,isTouchDevice:"ontouchstart"in window||navigator.msMaxTouchPoints,isDirty:!1,isExecCalled:!1,initialConfig:null,initialSeries:[],lastXAxis:[],lastYAxis:[],columnSeries:null,labels:[],timescaleLabels:[],noLabelsProvided:!1,allSeriesCollapsed:!1,collapsedSeries:[],collapsedSeriesIndices:[],ancillaryCollapsedSeries:[],ancillaryCollapsedSeriesIndices:[],risingSeries:[],dataFormatXNumeric:!1,capturedSeriesIndex:-1,capturedDataPointIndex:-1,selectedDataPoints:[],goldenPadding:35,invalidLogScale:!1,ignoreYAxisIndexes:[],yAxisSameScaleIndices:[],maxValsInArrayIndex:0,radialSize:0,selection:void 0,zoomEnabled:"zoom"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.zoom&&t.chart.zoom.enabled,panEnabled:"pan"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.pan,selectionEnabled:"selection"===t.chart.toolbar.autoSelected&&t.chart.toolbar.tools.selection,yaxis:null,mousedown:!1,lastClientPosition:{},visibleXRange:void 0,yValueDecimal:0,total:0,SVGNS:"http://www.w3.org/2000/svg",svgWidth:0,svgHeight:0,noData:!1,locale:{},dom:{},memory:{methodsToExec:[]},shouldAnimate:!0,skipLastTimelinelabel:!1,skipFirstTimelinelabel:!1,delayedElements:[],axisCharts:!0,isDataXYZ:!1,resized:!1,resizeTimer:null,comboCharts:!1,dataChanged:!1,previousPaths:[],allSeriesHasEqualX:!0,pointsArray:[],dataLabelsRects:[],lastDrawnDataLabelsIndexes:[],hasNullValues:!1,easing:null,zoomed:!1,gridWidth:0,gridHeight:0,rotateXLabels:!1,defaultLabels:!1,xLabelFormatter:void 0,yLabelFormatters:[],xaxisTooltipFormatter:void 0,ttKeyFormatter:void 0,ttVal:void 0,ttZFormatter:void 0,LINE_HEIGHT_RATIO:1.618,xAxisLabelsHeight:0,xAxisGroupLabelsHeight:0,xAxisLabelsWidth:0,yAxisLabelsWidth:0,scaleX:1,scaleY:1,translateX:0,translateY:0,translateYAxisX:[],yAxisWidths:[],translateXAxisY:0,translateXAxisX:0,tooltip:null}}},{key:"init",value:function(t){var e=this.globalVars(t);return this.initGlobalVars(e),e.initialConfig=y.extend({},t),e.initialSeries=y.clone(t.series),e.lastXAxis=y.clone(e.initialConfig.xaxis),e.lastYAxis=y.clone(e.initialConfig.yaxis),e}}]),t}(),R=function(){function t(e){o(this,t),this.opts=e}return c(t,[{key:"init",value:function(){var t=new N(this.opts).init({responsiveOverride:!1});return{config:t,globals:(new H).init(t)}}}]),t}(),X=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w,this.opts=null,this.seriesIndex=0}return c(t,[{key:"clippedImgArea",value:function(t){var e=this.w,i=e.config,n=parseInt(e.globals.gridWidth,10),a=parseInt(e.globals.gridHeight,10),r=n>a?n:a,s=t.image,o=0,l=0;void 0===t.width&&void 0===t.height?void 0!==i.fill.image.width&&void 0!==i.fill.image.height?(o=i.fill.image.width+1,l=i.fill.image.height):(o=r+1,l=r):(o=t.width,l=t.height);var c=document.createElementNS(e.globals.SVGNS,"pattern");S.setAttrs(c,{id:t.patternID,patternUnits:t.patternUnits?t.patternUnits:"userSpaceOnUse",width:o+"px",height:l+"px"});var d=document.createElementNS(e.globals.SVGNS,"image");c.appendChild(d),d.setAttributeNS(window.SVG.xlink,"href",s),S.setAttrs(d,{x:0,y:0,preserveAspectRatio:"none",width:o+"px",height:l+"px"}),d.style.opacity=t.opacity,e.globals.dom.elDefs.node.appendChild(c)}},{key:"getSeriesIndex",value:function(t){var e=this.w,i=e.config.chart.type;return("bar"===i||"rangeBar"===i)&&e.config.plotOptions.bar.distributed||"heatmap"===i||"treemap"===i?this.seriesIndex=t.seriesNumber:this.seriesIndex=t.seriesNumber%e.globals.series.length,this.seriesIndex}},{key:"fillPath",value:function(t){var e=this.w;this.opts=t;var i,n,a,r=this.w.config;this.seriesIndex=this.getSeriesIndex(t);var s=this.getFillColors()[this.seriesIndex];void 0!==e.globals.seriesColors[this.seriesIndex]&&(s=e.globals.seriesColors[this.seriesIndex]),"function"==typeof s&&(s=s({seriesIndex:this.seriesIndex,dataPointIndex:t.dataPointIndex,value:t.value,w:e}));var o=t.fillType?t.fillType:this.getFillType(this.seriesIndex),l=Array.isArray(r.fill.opacity)?r.fill.opacity[this.seriesIndex]:r.fill.opacity;t.color&&(s=t.color),s||(s="#fff",console.warn("undefined color - ApexCharts"));var c=s;if(-1===s.indexOf("rgb")?s.length<9&&(c=y.hexToRgba(s,l)):s.indexOf("rgba")>-1&&(l=y.getOpacityFromRGBA(s)),t.opacity&&(l=t.opacity),"pattern"===o&&(n=this.handlePatternFill({fillConfig:t.fillConfig,patternFill:n,fillColor:s,fillOpacity:l,defaultColor:c})),"gradient"===o&&(a=this.handleGradientFill({fillConfig:t.fillConfig,fillColor:s,fillOpacity:l,i:this.seriesIndex})),"image"===o){var d=r.fill.image.src,h=t.patternID?t.patternID:"";this.clippedImgArea({opacity:l,image:Array.isArray(d)?t.seriesNumber-1&&(p=y.getOpacityFromRGBA(u));var f=void 0===s.gradient.opacityTo?i:Array.isArray(s.gradient.opacityTo)?s.gradient.opacityTo[a]:s.gradient.opacityTo;if(void 0===s.gradient.gradientToColors||0===s.gradient.gradientToColors.length)o="dark"===s.gradient.shade?d.shadeColor(-1*parseFloat(s.gradient.shadeIntensity),e.indexOf("rgb")>-1?y.rgb2hex(e):e):d.shadeColor(parseFloat(s.gradient.shadeIntensity),e.indexOf("rgb")>-1?y.rgb2hex(e):e);else if(s.gradient.gradientToColors[l.seriesNumber]){var g=s.gradient.gradientToColors[l.seriesNumber];o=g,g.indexOf("rgba")>-1&&(f=y.getOpacityFromRGBA(g))}else o=e;if(s.gradient.gradientFrom&&(u=s.gradient.gradientFrom),s.gradient.gradientTo&&(o=s.gradient.gradientTo),s.gradient.inverseColors){var m=u;u=o,o=m}return u.indexOf("rgb")>-1&&(u=y.rgb2hex(u)),o.indexOf("rgb")>-1&&(o=y.rgb2hex(o)),c.drawGradient(h,u,o,p,f,l.size,s.gradient.stops,s.gradient.colorStops,a)}}]),t}(),F=function(){function t(e,i){o(this,t),this.ctx=e,this.w=e.w}return c(t,[{key:"setGlobalMarkerSize",value:function(){var t=this.w;if(t.globals.markers.size=Array.isArray(t.config.markers.size)?t.config.markers.size:[t.config.markers.size],t.globals.markers.size.length>0){if(t.globals.markers.size.length4&&void 0!==arguments[4]&&arguments[4],s=this.w,o=e,l=t,c=null,d=new S(this.ctx),h=s.config.markers.discrete&&s.config.markers.discrete.length;if((s.globals.markers.size[e]>0||r||h)&&(c=d.group({class:r||h?"":"apexcharts-series-markers"})).attr("clip-path","url(#gridRectMarkerMask".concat(s.globals.cuid,")")),Array.isArray(l.x))for(var u=0;u0:s.config.markers.size>0)||r||h){y.isNumber(l.y[u])?f+=" w".concat(y.randomId()):f="apexcharts-nullpoint";var g=this.getMarkerConfig({cssClass:f,seriesIndex:e,dataPointIndex:p});s.config.series[o].data[p]&&(s.config.series[o].data[p].fillColor&&(g.pointFillColor=s.config.series[o].data[p].fillColor),s.config.series[o].data[p].strokeColor&&(g.pointStrokeColor=s.config.series[o].data[p].strokeColor)),n&&(g.pSize=n),(l.x[u]<0||l.x[u]>s.globals.gridWidth||l.y[u]<-s.globals.markers.largestSize||l.y[u]>s.globals.gridHeight+s.globals.markers.largestSize)&&(g.pSize=0),(a=d.drawMarker(l.x[u],l.y[u],g)).attr("rel",p),a.attr("j",p),a.attr("index",e),a.node.setAttribute("default-marker-size",g.pSize),new C(this.ctx).setSelectionFilter(a,e,p),this.addEvents(a),c&&c.add(a)}else void 0===s.globals.pointsArray[e]&&(s.globals.pointsArray[e]=[]),s.globals.pointsArray[e].push([l.x[u],l.y[u]])}return c}},{key:"getMarkerConfig",value:function(t){var e=t.cssClass,i=t.seriesIndex,n=t.dataPointIndex,a=void 0===n?null:n,r=t.finishRadius,s=void 0===r?null:r,o=this.w,l=this.getMarkerStyle(i),c=o.globals.markers.size[i],d=o.config.markers;return null!==a&&d.discrete.length&&d.discrete.map((function(t){t.seriesIndex===i&&t.dataPointIndex===a&&(l.pointStrokeColor=t.strokeColor,l.pointFillColor=t.fillColor,c=t.size,l.pointShape=t.shape)})),{pSize:null===s?c:s,pRadius:d.radius,width:Array.isArray(d.width)?d.width[i]:d.width,height:Array.isArray(d.height)?d.height[i]:d.height,pointStrokeWidth:Array.isArray(d.strokeWidth)?d.strokeWidth[i]:d.strokeWidth,pointStrokeColor:l.pointStrokeColor,pointFillColor:l.pointFillColor,shape:l.pointShape||(Array.isArray(d.shape)?d.shape[i]:d.shape),class:e,pointStrokeOpacity:Array.isArray(d.strokeOpacity)?d.strokeOpacity[i]:d.strokeOpacity,pointStrokeDashArray:Array.isArray(d.strokeDashArray)?d.strokeDashArray[i]:d.strokeDashArray,pointFillOpacity:Array.isArray(d.fillOpacity)?d.fillOpacity[i]:d.fillOpacity,seriesIndex:i}}},{key:"addEvents",value:function(t){var e=this.w,i=new S(this.ctx);t.node.addEventListener("mouseenter",i.pathMouseEnter.bind(this.ctx,t)),t.node.addEventListener("mouseleave",i.pathMouseLeave.bind(this.ctx,t)),t.node.addEventListener("mousedown",i.pathMouseDown.bind(this.ctx,t)),t.node.addEventListener("click",e.config.markers.onClick),t.node.addEventListener("dblclick",e.config.markers.onDblClick),t.node.addEventListener("touchstart",i.pathMouseDown.bind(this.ctx,t),{passive:!0})}},{key:"getMarkerStyle",value:function(t){var e=this.w,i=e.globals.markers.colors,n=e.config.markers.strokeColor||e.config.markers.strokeColors;return{pointStrokeColor:Array.isArray(n)?n[t]:n,pointFillColor:Array.isArray(i)?i[t]:i}}}]),t}(),$=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled}return c(t,[{key:"draw",value:function(t,e,i){var n=this.w,a=new S(this.ctx),r=i.realIndex,s=i.pointsPos,o=i.zRatio,l=i.elParent,c=a.group({class:"apexcharts-series-markers apexcharts-series-".concat(n.config.chart.type)});if(c.attr("clip-path","url(#gridRectMarkerMask".concat(n.globals.cuid,")")),Array.isArray(s.x))for(var d=0;dg.maxBubbleRadius&&(f=g.maxBubbleRadius)}n.config.chart.animations.enabled||(p=f);var m=s.x[d],v=s.y[d];if(p=p||0,null!==v&&void 0!==n.globals.series[r][h]||(u=!1),u){var b=this.drawPoint(m,v,p,f,r,h,e);c.add(b)}l.add(c)}}},{key:"drawPoint",value:function(t,e,i,n,a,r,s){var o=this.w,l=a,c=new w(this.ctx),d=new C(this.ctx),h=new X(this.ctx),u=new F(this.ctx),p=new S(this.ctx),f=u.getMarkerConfig({cssClass:"apexcharts-marker",seriesIndex:l,dataPointIndex:r,finishRadius:"bubble"===o.config.chart.type||o.globals.comboCharts&&o.config.series[a]&&"bubble"===o.config.series[a].type?n:null});n=f.pSize;var g,m=h.fillPath({seriesNumber:a,dataPointIndex:r,color:f.pointFillColor,patternUnits:"objectBoundingBox",value:o.globals.series[a][s]});if("circle"===f.shape?g=p.drawCircle(i):"square"!==f.shape&&"rect"!==f.shape||(g=p.drawRect(0,0,f.width-f.pointStrokeWidth/2,f.height-f.pointStrokeWidth/2,f.pRadius)),o.config.series[l].data[r]&&o.config.series[l].data[r].fillColor&&(m=o.config.series[l].data[r].fillColor),g.attr({x:t-f.width/2-f.pointStrokeWidth/2,y:e-f.height/2-f.pointStrokeWidth/2,cx:t,cy:e,fill:m,"fill-opacity":f.pointFillOpacity,stroke:f.pointStrokeColor,r:n,"stroke-width":f.pointStrokeWidth,"stroke-dasharray":f.pointStrokeDashArray,"stroke-opacity":f.pointStrokeOpacity}),o.config.chart.dropShadow.enabled){var v=o.config.chart.dropShadow;d.dropShadow(g,v,a)}if(!this.initialAnim||o.globals.dataChanged||o.globals.resized)o.globals.animationEnded=!0;else{var b=o.config.chart.animations.speed;c.animateMarker(g,0,"circle"===f.shape?n:{width:f.width,height:f.height},b,o.globals.easing,(function(){window.setTimeout((function(){c.animationCompleted(g)}),100)}))}if(o.globals.dataChanged&&"circle"===f.shape)if(this.dynamicAnim){var x,y,k,A,P=o.config.chart.animations.dynamicAnimation.speed;null!=(A=o.globals.previousPaths[a]&&o.globals.previousPaths[a][s])&&(x=A.x,y=A.y,k=void 0!==A.r?A.r:n);for(var E=0;Eo.globals.gridHeight+h&&(e=o.globals.gridHeight+h/2),void 0===o.globals.dataLabelsRects[n]&&(o.globals.dataLabelsRects[n]=[]),o.globals.dataLabelsRects[n].push({x:t,y:e,width:d,height:h});var u=o.globals.dataLabelsRects[n].length-2,p=void 0!==o.globals.lastDrawnDataLabelsIndexes[n]?o.globals.lastDrawnDataLabelsIndexes[n][o.globals.lastDrawnDataLabelsIndexes[n].length-1]:0;if(void 0!==o.globals.dataLabelsRects[n][u]){var f=o.globals.dataLabelsRects[n][p];(t>f.x+f.width||e>f.y+f.height||e+he.globals.gridWidth+g.textRects.width+30)&&(o="");var m=e.globals.dataLabels.style.colors[r];(("bar"===e.config.chart.type||"rangeBar"===e.config.chart.type)&&e.config.plotOptions.bar.distributed||e.config.dataLabels.distributed)&&(m=e.globals.dataLabels.style.colors[s]),"function"==typeof m&&(m=m({series:e.globals.series,seriesIndex:r,dataPointIndex:s,w:e})),u&&(m=u);var v=h.offsetX,b=h.offsetY;if("bar"!==e.config.chart.type&&"rangeBar"!==e.config.chart.type||(v=0,b=0),g.drawnextLabel){var x=i.drawText({width:100,height:parseInt(h.style.fontSize,10),x:n+v,y:a+b,foreColor:m,textAnchor:l||h.textAnchor,text:o,fontSize:c||h.style.fontSize,fontFamily:h.style.fontFamily,fontWeight:h.style.fontWeight||"normal"});if(x.attr({class:"apexcharts-datalabel",cx:n,cy:a}),h.dropShadow.enabled){var y=h.dropShadow;new C(this.ctx).dropShadow(x,y)}d.add(x),void 0===e.globals.lastDrawnDataLabelsIndexes[r]&&(e.globals.lastDrawnDataLabelsIndexes[r]=[]),e.globals.lastDrawnDataLabelsIndexes[r].push(s)}}}},{key:"addBackgroundToDataLabel",value:function(t,e){var i=this.w,n=i.config.dataLabels.background,a=n.padding,r=n.padding/2,s=e.width,o=e.height,l=new S(this.ctx).drawRect(e.x-a,e.y-r/2,s+2*a,o+r,n.borderRadius,"transparent"===i.config.chart.background?"#fff":i.config.chart.background,n.opacity,n.borderWidth,n.borderColor);return n.dropShadow.enabled&&new C(this.ctx).dropShadow(l,n.dropShadow),l}},{key:"dataLabelsBackground",value:function(){var t=this.w;if("bubble"!==t.config.chart.type)for(var e=t.globals.dom.baseEl.querySelectorAll(".apexcharts-datalabels text"),i=0;i0&&void 0!==arguments[0])||arguments[0],e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=this.w,a=y.clone(n.globals.initialSeries);n.globals.previousPaths=[],i?(n.globals.collapsedSeries=[],n.globals.ancillaryCollapsedSeries=[],n.globals.collapsedSeriesIndices=[],n.globals.ancillaryCollapsedSeriesIndices=[]):a=this.emptyCollapsedSeries(a),n.config.series=a,t&&(e&&(n.globals.zoomed=!1,this.ctx.updateHelpers.revertDefaultAxisMinMax()),this.ctx.updateHelpers._updateSeries(a,n.config.chart.animations.dynamicAnimation.enabled))}},{key:"emptyCollapsedSeries",value:function(t){for(var e=this.w,i=0;i-1&&(t[i].data=[]);return t}},{key:"toggleSeriesOnHover",value:function(t,e){var i=this.w;e||(e=t.target);var n=i.globals.dom.baseEl.querySelectorAll(".apexcharts-series, .apexcharts-datalabels");if("mousemove"===t.type){var a=parseInt(e.getAttribute("rel"),10)-1,r=null,s=null;i.globals.axisCharts||"radialBar"===i.config.chart.type?i.globals.axisCharts?(r=i.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(a,"']")),s=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels[data\\:realIndex='".concat(a,"']"))):r=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"']")):r=i.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(a+1,"'] path"));for(var o=0;o=t.from&&n<=t.to&&a[e].classList.remove(i.legendInactiveClass)}}(n.config.plotOptions.heatmap.colorScale.ranges[s])}else"mouseout"===t.type&&r("remove")}},{key:"getActiveConfigSeriesIndex",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"asc",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=this.w,n=0;if(i.config.series.length>1)for(var a=i.config.series.map((function(t,n){return t.data&&t.data.length>0&&-1===i.globals.collapsedSeriesIndices.indexOf(n)&&(!i.globals.comboCharts||0===e.length||e.length&&e.indexOf(i.config.series[n].type)>-1)?n:-1})),r="asc"===t?0:a.length-1;"asc"===t?r=0;"asc"===t?r++:r--)if(-1!==a[r]){n=a[r];break}return n}},{key:"getBarSeriesIndices",value:function(){return this.w.globals.comboCharts?this.w.config.series.map((function(t,e){return"bar"===t.type||"column"===t.type?e:-1})).filter((function(t){return-1!==t})):this.w.config.series.map((function(t,e){return e}))}},{key:"getPreviousPaths",value:function(){var t=this.w;function e(e,i,n){for(var a=e[i].childNodes,r={type:n,paths:[],realIndex:e[i].getAttribute("data:realIndex")},s=0;s0)for(var n=function(e){for(var i=t.globals.dom.baseEl.querySelectorAll(".apexcharts-".concat(t.config.chart.type," .apexcharts-series[data\\:realIndex='").concat(e,"'] rect")),n=[],a=function(t){var e=function(e){return i[t].getAttribute(e)},a={x:parseFloat(e("x")),y:parseFloat(e("y")),width:parseFloat(e("width")),height:parseFloat(e("height"))};n.push({rect:a,color:i[t].getAttribute("color")})},r=0;r0)for(var n=0;n0?t:[]}))}}]),t}(),W=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w,this.twoDSeries=[],this.threeDSeries=[],this.twoDSeriesX=[],this.seriesGoals=[],this.coreUtils=new k(this.ctx)}return c(t,[{key:"isMultiFormat",value:function(){return this.isFormatXY()||this.isFormat2DArray()}},{key:"isFormatXY",value:function(){var t=this.w.config.series.slice(),e=new Y(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&null!==t[this.activeSeriesIndex].data[0]&&void 0!==t[this.activeSeriesIndex].data[0].x&&null!==t[this.activeSeriesIndex].data[0])return!0}},{key:"isFormat2DArray",value:function(){var t=this.w.config.series.slice(),e=new Y(this.ctx);if(this.activeSeriesIndex=e.getActiveConfigSeriesIndex(),void 0!==t[this.activeSeriesIndex].data&&t[this.activeSeriesIndex].data.length>0&&void 0!==t[this.activeSeriesIndex].data[0]&&null!==t[this.activeSeriesIndex].data[0]&&t[this.activeSeriesIndex].data[0].constructor===Array)return!0}},{key:"handleFormat2DArray",value:function(t,e){for(var i=this.w.config,n=this.w.globals,a="boxPlot"===i.chart.type||"boxPlot"===i.series[e].type,r=0;r=5?this.twoDSeries.push(y.parseNumber(t[e].data[r][4])):this.twoDSeries.push(y.parseNumber(t[e].data[r][1])),n.dataFormatXNumeric=!0),"datetime"===i.xaxis.type){var s=new Date(t[e].data[r][0]);s=new Date(s).getTime(),this.twoDSeriesX.push(s)}else this.twoDSeriesX.push(t[e].data[r][0]);for(var o=0;o-1&&(r=this.activeSeriesIndex);for(var s=0;s1&&void 0!==arguments[1]?arguments[1]:this.ctx,a=this.w.config,r=this.w.globals,s=new M(n),o=a.labels.length>0?a.labels.slice():a.xaxis.categories.slice();if(r.isRangeBar="rangeBar"===a.chart.type&&r.isBarHorizontal,r.hasXaxisGroups="category"===a.xaxis.type&&a.xaxis.group.groups.length>0,r.hasXaxisGroups&&(r.groups=a.xaxis.group.groups),r.hasSeriesGroups=null===(e=t[0])||void 0===e?void 0:e.group,r.hasSeriesGroups){var l=[],c=v(new Set(t.map((function(t){return t.group}))));t.forEach((function(t,e){var i=c.indexOf(t.group);l[i]||(l[i]=[]),l[i].push(t.name)})),r.seriesGroups=l}for(var d=function(){for(var t=0;t0&&(this.twoDSeriesX=o,r.seriesX.push(this.twoDSeriesX))),r.labels.push(this.twoDSeriesX);var u=t[h].data.map((function(t){return y.parseNumber(t)}));r.series.push(u)}r.seriesZ.push(this.threeDSeries),void 0!==t[h].name?r.seriesNames.push(t[h].name):r.seriesNames.push("series-"+parseInt(h+1,10)),void 0!==t[h].color?r.seriesColors.push(t[h].color):r.seriesColors.push(void 0)}return this.w}},{key:"parseDataNonAxisCharts",value:function(t){var e=this.w.globals,i=this.w.config;e.series=t.slice(),e.seriesNames=i.labels.slice();for(var n=0;n0?i.labels=e.xaxis.categories:e.labels.length>0?i.labels=e.labels.slice():this.fallbackToCategory?(i.labels=i.labels[0],i.seriesRange.length&&(i.seriesRange.map((function(t){t.forEach((function(t){i.labels.indexOf(t.x)<0&&t.x&&i.labels.push(t.x)}))})),i.labels=Array.from(new Set(i.labels.map(JSON.stringify)),JSON.parse)),e.xaxis.convertedCatToNumeric&&(new j(e).convertCatToNumericXaxis(e,this.ctx,i.seriesX[0]),this._generateExternalLabels(t))):this._generateExternalLabels(t)}},{key:"_generateExternalLabels",value:function(t){var e=this.w.globals,i=this.w.config,n=[];if(e.axisCharts){if(e.series.length>0)if(this.isFormatXY())for(var a=i.series.map((function(t,e){return t.data.filter((function(t,e,i){return i.findIndex((function(e){return e.x===t.x}))===e}))})),r=a.reduce((function(t,e,i,n){return n[t].length>e.length?t:i}),0),s=0;s4&&void 0!==arguments[4]?arguments[4]:[],o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"12px",l=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],c=this.w,d=void 0===t[n]?"":t[n],h=d,u=c.globals.xLabelFormatter,p=c.config.xaxis.labels.formatter,f=!1,g=new _(this.ctx),m=d;l&&(h=g.xLabelFormat(u,d,m,{i:n,dateFormatter:new M(this.ctx).formatDate,w:c}),void 0!==p&&(h=p(d,t[n],{i:n,dateFormatter:new M(this.ctx).formatDate,w:c}))),e.length>0?(a=e[n].unit,r=null,e.forEach((function(t){"month"===t.unit?r="year":"day"===t.unit?r="month":"hour"===t.unit?r="day":"minute"===t.unit&&(r="hour")})),f=r===a,i=e[n].position,h=e[n].value):"datetime"===c.config.xaxis.type&&void 0===p&&(h=""),void 0===h&&(h=""),h=Array.isArray(h)?h:h.toString();var v,b=new S(this.ctx);v=c.globals.rotateXLabels&&l?b.getTextRects(h,parseInt(o,10),null,"rotate(".concat(c.config.xaxis.labels.rotate," 0 0)"),!1):b.getTextRects(h,parseInt(o,10));var x=!c.config.xaxis.labels.showDuplicates&&this.ctx.timeScale;return!Array.isArray(h)&&(0===h.indexOf("NaN")||0===h.toLowerCase().indexOf("invalid")||h.toLowerCase().indexOf("infinity")>=0||s.indexOf(h)>=0&&x)&&(h=""),{x:i,text:h,textRect:v,isBold:f}}},{key:"checkLabelBasedOnTickamount",value:function(t,e,i){var n=this.w,a=n.config.xaxis.tickAmount;return"dataPoints"===a&&(a=Math.round(n.globals.gridWidth/120)),a>i||t%Math.round(i/(a+1))==0||(e.text=""),e}},{key:"checkForOverflowingLabels",value:function(t,e,i,n,a){var r=this.w;if(0===t&&r.globals.skipFirstTimelinelabel&&(e.text=""),t===i-1&&r.globals.skipLastTimelinelabel&&(e.text=""),r.config.xaxis.labels.hideOverlappingLabels&&n.length>0){var s=a[a.length-1];e.x0){!0===o.config.yaxis[a].opposite&&(t+=n.width);for(var d=e;d>=0;d--){var h=c+e/10+o.config.yaxis[a].labels.offsetY-1;o.globals.isBarHorizontal&&(h=r*d),"heatmap"===o.config.chart.type&&(h+=r/2);var u=l.drawLine(t+i.offsetX-n.width+n.offsetX,h+n.offsetY,t+i.offsetX+n.offsetX,h+n.offsetY,n.color);s.add(u),c+=r}}}}]),t}(),V=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w}return c(t,[{key:"scaleSvgNode",value:function(t,e){var i=parseFloat(t.getAttributeNS(null,"width")),n=parseFloat(t.getAttributeNS(null,"height"));t.setAttributeNS(null,"width",i*e),t.setAttributeNS(null,"height",n*e),t.setAttributeNS(null,"viewBox","0 0 "+i+" "+n)}},{key:"fixSvgStringForIe11",value:function(t){if(!y.isIE11())return t.replace(/ /g," ");var e=0,i=t.replace(/xmlns="http:\/\/www.w3.org\/2000\/svg"/g,(function(t){return 2==++e?'xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.dev"':t}));return(i=i.replace(/xmlns:NS\d+=""/g,"")).replace(/NS\d+:(\w+:\w+=")/g,"$1")}},{key:"getSvgString",value:function(t){null==t&&(t=1);var e=this.w.globals.dom.Paper.svg();if(1!==t){var i=this.w.globals.dom.Paper.node.cloneNode(!0);this.scaleSvgNode(i,t),e=(new XMLSerializer).serializeToString(i)}return this.fixSvgStringForIe11(e)}},{key:"cleanup",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-xcrosshairs"),i=t.globals.dom.baseEl.getElementsByClassName("apexcharts-ycrosshairs"),n=t.globals.dom.baseEl.querySelectorAll(".apexcharts-zoom-rect, .apexcharts-selection-rect");Array.prototype.forEach.call(n,(function(t){t.setAttribute("width",0)})),e&&e[0]&&(e[0].setAttribute("x",-500),e[0].setAttribute("x1",-500),e[0].setAttribute("x2",-500)),i&&i[0]&&(i[0].setAttribute("y",-100),i[0].setAttribute("y1",-100),i[0].setAttribute("y2",-100))}},{key:"svgUrl",value:function(){this.cleanup();var t=this.getSvgString(),e=new Blob([t],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(e)}},{key:"dataURI",value:function(t){var e=this;return new Promise((function(i){var n=e.w,a=t?t.scale||t.width/n.globals.svgWidth:1;e.cleanup();var r=document.createElement("canvas");r.width=n.globals.svgWidth*a,r.height=parseInt(n.globals.dom.elWrap.style.height,10)*a;var s="transparent"===n.config.chart.background?"#fff":n.config.chart.background,o=r.getContext("2d");o.fillStyle=s,o.fillRect(0,0,r.width*a,r.height*a);var l=e.getSvgString(a);if(window.canvg&&y.isIE11()){var c=window.canvg.Canvg.fromString(o,l,{ignoreClear:!0,ignoreDimensions:!0});c.start();var d=r.msToBlob();c.stop(),i({blob:d})}else{var h="data:image/svg+xml,"+encodeURIComponent(l),u=new Image;u.crossOrigin="anonymous",u.onload=function(){if(o.drawImage(u,0,0),r.msToBlob){var t=r.msToBlob();i({blob:t})}else{var e=r.toDataURL("image/png");i({imgURI:e})}},u.src=h}}))}},{key:"exportToSVG",value:function(){this.triggerDownload(this.svgUrl(),this.w.config.chart.toolbar.export.svg.filename,".svg")}},{key:"exportToPng",value:function(){var t=this;this.dataURI().then((function(e){var i=e.imgURI,n=e.blob;n?navigator.msSaveOrOpenBlob(n,t.w.globals.chartID+".png"):t.triggerDownload(i,t.w.config.chart.toolbar.export.png.filename,".png")}))}},{key:"exportToCSV",value:function(t){var e=this,i=t.series,n=t.fileName,a=t.columnDelimiter,r=void 0===a?",":a,s=t.lineDelimiter,o=void 0===s?"\n":s,l=this.w;i||(i=l.config.series);var c,d,h=[],u=[],p="",f=l.globals.series.map((function(t,e){return-1===l.globals.collapsedSeriesIndices.indexOf(e)?t:[]})),g=function(t){return"datetime"===l.config.xaxis.type&&String(t).length>=10},m=Math.max.apply(Math,v(i.map((function(t){return t.data?t.data.length:0})))),b=new W(this.ctx),x=new G(this.ctx),w=function(t){var i="";if(l.globals.axisCharts){if("category"===l.config.xaxis.type||l.config.xaxis.convertedCatToNumeric)if(l.globals.isBarHorizontal){var n=l.globals.yLabelFormatters[0],a=new Y(e.ctx).getActiveConfigSeriesIndex();i=n(l.globals.labels[t],{seriesIndex:a,dataPointIndex:t,w:l})}else i=x.getLabel(l.globals.labels,l.globals.timescaleLabels,0,t).text;"datetime"===l.config.xaxis.type&&(l.config.xaxis.categories.length?i=l.config.xaxis.categories[t]:l.config.labels.length&&(i=l.config.labels[t]))}else i=l.config.labels[t];return Array.isArray(i)&&(i=i.join(" ")),y.isNumber(i)?i:i.split(r).join("")};h.push(l.config.chart.toolbar.export.csv.headerCategory),"boxPlot"===l.config.chart.type?(h.push("minimum"),h.push("q1"),h.push("median"),h.push("q3"),h.push("maximum")):"candlestick"===l.config.chart.type?(h.push("open"),h.push("high"),h.push("low"),h.push("close")):"rangeBar"===l.config.chart.type?(h.push("minimum"),h.push("maximum")):i.map((function(t,e){var i=(t.name?t.name:"series-".concat(e))+"";l.globals.axisCharts&&h.push(i.split(r).join("")?i.split(r).join(""):"series-".concat(e))})),l.globals.axisCharts||(h.push(l.config.chart.toolbar.export.csv.headerValue),u.push(h.join(r))),l.globals.allSeriesHasEqualX||!l.globals.axisCharts||l.config.xaxis.categories.length||l.config.labels.length?i.map((function(t,e){l.globals.axisCharts?function(t,e){if(h.length&&0===e&&u.push(h.join(r)),t.data){t.data=t.data.length&&t.data||v(Array(m)).map((function(){return""}));for(var n=0;n0&&!n.globals.isBarHorizontal&&(this.xaxisLabels=n.globals.timescaleLabels.slice()),n.config.xaxis.overwriteCategories&&(this.xaxisLabels=n.config.xaxis.overwriteCategories),this.drawnLabels=[],this.drawnLabelsRects=[],"top"===n.config.xaxis.position?this.offY=0:this.offY=n.globals.gridHeight+1,this.offY=this.offY+n.config.xaxis.axisBorder.offsetY,this.isCategoryBarHorizontal="bar"===n.config.chart.type&&n.config.plotOptions.bar.horizontal,this.xaxisFontSize=n.config.xaxis.labels.style.fontSize,this.xaxisFontFamily=n.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=n.config.xaxis.labels.style.colors,this.xaxisBorderWidth=n.config.xaxis.axisBorder.width,this.isCategoryBarHorizontal&&(this.xaxisBorderWidth=n.config.yaxis[0].axisBorder.width.toString()),this.xaxisBorderWidth.indexOf("%")>-1?this.xaxisBorderWidth=n.globals.gridWidth*parseInt(this.xaxisBorderWidth,10)/100:this.xaxisBorderWidth=parseInt(this.xaxisBorderWidth,10),this.xaxisBorderHeight=n.config.xaxis.axisBorder.height,this.yaxis=n.config.yaxis[0]}return c(t,[{key:"drawXaxis",value:function(){var t=this.w,e=new S(this.ctx),i=e.group({class:"apexcharts-xaxis",transform:"translate(".concat(t.config.xaxis.offsetX,", ").concat(t.config.xaxis.offsetY,")")}),n=e.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(t.globals.translateXAxisX,", ").concat(t.globals.translateXAxisY,")")});i.add(n);for(var a=[],r=0;r6&&void 0!==arguments[6]?arguments[6]:{},c=[],d=[],h=this.w,u=l.xaxisFontSize||this.xaxisFontSize,p=l.xaxisFontFamily||this.xaxisFontFamily,f=l.xaxisForeColors||this.xaxisForeColors,g=l.fontWeight||h.config.xaxis.labels.style.fontWeight,m=l.cssClass||h.config.xaxis.labels.style.cssClass,v=h.globals.padHorizontal,b=n.length,x="category"===h.config.xaxis.type?h.globals.dataPoints:b;if(0===x&&b>x&&(x=b),a){var y=x>1?x-1:x;s=h.globals.gridWidth/Math.min(y,b-1),v=v+r(0,s)/2+h.config.xaxis.labels.offsetX}else s=h.globals.gridWidth/x,v=v+r(0,s)+h.config.xaxis.labels.offsetX;for(var w=function(a){var l=v-r(a,s)/2+h.config.xaxis.labels.offsetX;0===a&&1===b&&s/2===v&&1===x&&(l=h.globals.gridWidth/2);var y=o.axesUtils.getLabel(n,h.globals.timescaleLabels,l,a,c,u,t),w=28;if(h.globals.rotateXLabels&&t&&(w=22),h.config.xaxis.title.text&&"top"===h.config.xaxis.position&&(w+=parseFloat(h.config.xaxis.title.style.fontSize)+2),t||(w=w+parseFloat(u)+(h.globals.xAxisLabelsHeight-h.globals.xAxisGroupLabelsHeight)+(h.globals.rotateXLabels?10:0)),y=void 0!==h.config.xaxis.tickAmount&&"dataPoints"!==h.config.xaxis.tickAmount&&"datetime"!==h.config.xaxis.type?o.axesUtils.checkLabelBasedOnTickamount(a,y,b):o.axesUtils.checkForOverflowingLabels(a,y,b,c,d),h.config.xaxis.labels.show){var C=e.drawText({x:y.x,y:o.offY+h.config.xaxis.labels.offsetY+w-("top"===h.config.xaxis.position?h.globals.xAxisHeight+h.config.xaxis.axisTicks.height-2:0),text:y.text,textAnchor:"middle",fontWeight:y.isBold?600:g,fontSize:u,fontFamily:p,foreColor:Array.isArray(f)?t&&h.config.xaxis.convertedCatToNumeric?f[h.globals.minX+a-1]:f[a]:f,isPlainText:!1,cssClass:(t?"apexcharts-xaxis-label ":"apexcharts-xaxis-group-label ")+m});if(i.add(C),C.on("click",(function(t){if("function"==typeof h.config.chart.events.xAxisLabelClick){var e=Object.assign({},h,{labelIndex:a});h.config.chart.events.xAxisLabelClick(t,o.ctx,e)}})),t){var S=document.createElementNS(h.globals.SVGNS,"title");S.textContent=Array.isArray(y.text)?y.text.join(" "):y.text,C.node.appendChild(S),""!==y.text&&(c.push(y.text),d.push(y))}}an.globals.gridWidth)){var r=this.offY+n.config.xaxis.axisTicks.offsetY;if(e=e+r+n.config.xaxis.axisTicks.height,"top"===n.config.xaxis.position&&(e=r-n.config.xaxis.axisTicks.height),n.config.xaxis.axisTicks.show){var s=new S(this.ctx).drawLine(t+n.config.xaxis.axisTicks.offsetX,r+n.config.xaxis.offsetY,a+n.config.xaxis.axisTicks.offsetX,e+n.config.xaxis.offsetY,n.config.xaxis.axisTicks.color);i.add(s),s.node.classList.add("apexcharts-xaxis-tick")}}}},{key:"getXAxisTicksPositions",value:function(){var t=this.w,e=[],i=this.xaxisLabels.length,n=t.globals.padHorizontal;if(t.globals.timescaleLabels.length>0)for(var a=0;a0){var c=a[a.length-1].getBBox(),d=a[0].getBBox();c.x<-20&&a[a.length-1].parentNode.removeChild(a[a.length-1]),d.x+d.width>t.globals.gridWidth&&!t.globals.isBarHorizontal&&a[0].parentNode.removeChild(a[0]);for(var h=0;h0&&(this.xaxisLabels=i.globals.timescaleLabels.slice())}return c(t,[{key:"drawGridArea",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,e=this.w,i=new S(this.ctx);null===t&&(t=i.group({class:"apexcharts-grid"}));var n=i.drawLine(e.globals.padHorizontal,1,e.globals.padHorizontal,e.globals.gridHeight,"transparent"),a=i.drawLine(e.globals.padHorizontal,e.globals.gridHeight,e.globals.gridWidth,e.globals.gridHeight,"transparent");return t.add(a),t.add(n),t}},{key:"drawGrid",value:function(){var t=null;return this.w.globals.axisCharts&&(t=this.renderGrid(),this.drawGridArea(t.el)),t}},{key:"createGridMask",value:function(){var t=this.w,e=t.globals,i=new S(this.ctx),n=Array.isArray(t.config.stroke.width)?0:t.config.stroke.width;if(Array.isArray(t.config.stroke.width)){var a=0;t.config.stroke.width.forEach((function(t){a=Math.max(a,t)})),n=a}e.dom.elGridRectMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elGridRectMask.setAttribute("id","gridRectMask".concat(e.cuid)),e.dom.elGridRectMarkerMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elGridRectMarkerMask.setAttribute("id","gridRectMarkerMask".concat(e.cuid)),e.dom.elForecastMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elForecastMask.setAttribute("id","forecastMask".concat(e.cuid)),e.dom.elNonForecastMask=document.createElementNS(e.SVGNS,"clipPath"),e.dom.elNonForecastMask.setAttribute("id","nonForecastMask".concat(e.cuid));var r=t.config.chart.type,s=0,o=0;("bar"===r||"rangeBar"===r||"candlestick"===r||"boxPlot"===r||t.globals.comboBarCount>0)&&t.globals.isXNumeric&&!t.globals.isBarHorizontal&&(s=t.config.grid.padding.left,o=t.config.grid.padding.right,e.barPadForNumericAxis>s&&(s=e.barPadForNumericAxis,o=e.barPadForNumericAxis)),e.dom.elGridRect=i.drawRect(-n-s-2,2*-n-2,e.gridWidth+n+o+s+4,e.gridHeight+4*n+4,0,"#fff");var l=t.globals.markers.largestSize+1;e.dom.elGridRectMarker=i.drawRect(2*-l,2*-l,e.gridWidth+4*l,e.gridHeight+4*l,0,"#fff"),e.dom.elGridRectMask.appendChild(e.dom.elGridRect.node),e.dom.elGridRectMarkerMask.appendChild(e.dom.elGridRectMarker.node);var c=e.dom.baseEl.querySelector("defs");c.appendChild(e.dom.elGridRectMask),c.appendChild(e.dom.elForecastMask),c.appendChild(e.dom.elNonForecastMask),c.appendChild(e.dom.elGridRectMarkerMask)}},{key:"_drawGridLines",value:function(t){var e=t.i,i=t.x1,n=t.y1,a=t.x2,r=t.y2,s=t.xCount,o=t.parent,l=this.w;if(!(0===e&&l.globals.skipFirstTimelinelabel||e===s-1&&l.globals.skipLastTimelinelabel&&!l.config.xaxis.labels.formatter||"radar"===l.config.chart.type)){l.config.grid.xaxis.lines.show&&this._drawGridLine({i:e,x1:i,y1:n,x2:a,y2:r,xCount:s,parent:o});var c=0;if(l.globals.hasXaxisGroups&&"between"===l.config.xaxis.tickPlacement){var d=l.globals.groups;if(d){for(var h=0,u=0;h2));o++);return!n.globals.isBarHorizontal||this.isRangeBar?(r=this.xaxisLabels.length,this.isRangeBar&&(r--,s=n.globals.labels.length,n.config.xaxis.tickAmount&&n.config.xaxis.labels.formatter&&(r=n.config.xaxis.tickAmount),(null===(t=n.globals.yAxisScale)||void 0===t||null===(e=t[0])||void 0===e||null===(i=e.result)||void 0===i?void 0:i.length)>0&&"datetime"!==n.config.xaxis.type&&(r=n.globals.yAxisScale[0].result.length-1)),this._drawXYLines({xCount:r,tickAmount:s})):(r=s,s=n.globals.xTickAmount,this._drawInvertedXYLines({xCount:r,tickAmount:s})),this.drawGridBands(r,s),{el:this.elg,elGridBorders:this.elGridBorders,xAxisTickWidth:n.globals.gridWidth/r}}},{key:"drawGridBands",value:function(t,e){var i=this.w;if(void 0!==i.config.grid.row.colors&&i.config.grid.row.colors.length>0)for(var n=0,a=i.globals.gridHeight/e,r=i.globals.gridWidth,s=0,o=0;s=i.config.grid.row.colors.length&&(o=0),this._drawGridBandRect({c:o,x1:0,y1:n,x2:r,y2:a,type:"row"}),n+=i.globals.gridHeight/e;if(void 0!==i.config.grid.column.colors&&i.config.grid.column.colors.length>0)for(var l=i.globals.isBarHorizontal||"on"!==i.config.xaxis.tickPlacement||"category"!==i.config.xaxis.type&&!i.config.xaxis.convertedCatToNumeric?t:t-1,c=i.globals.padHorizontal,d=i.globals.padHorizontal+i.globals.gridWidth/l,h=i.globals.gridHeight,u=0,p=0;u=i.config.grid.column.colors.length&&(p=0),this._drawGridBandRect({c:p,x1:c,y1:0,x2:d,y2:h,type:"column"}),c+=i.globals.gridWidth/l}}]),t}(),Z=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w}return c(t,[{key:"niceScale",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4?arguments[4]:void 0,r=this.w,s=Math.abs(e-t);if("dataPoints"===(i=this._adjustTicksForSmallRange(i,n,s))&&(i=r.globals.dataPoints-1),t===Number.MIN_VALUE&&0===e||!y.isNumber(t)&&!y.isNumber(e)||t===Number.MIN_VALUE&&e===-Number.MAX_VALUE)return t=0,e=i,this.linearScale(t,e,i,n,r.config.yaxis[n].stepSize);t>e?(console.warn("axis.min cannot be greater than axis.max"),e=t+.1):t===e&&(t=0===t?0:t-.5,e=0===e?2:e+.5);var o=[];s<1&&a&&("candlestick"===r.config.chart.type||"candlestick"===r.config.series[n].type||"boxPlot"===r.config.chart.type||"boxPlot"===r.config.series[n].type||r.globals.isRangeData)&&(e*=1.01);var l=i+1;l<2?l=2:l>2&&(l-=2);var c=s/l,d=Math.floor(y.log10(c)),h=Math.pow(10,d),u=Math.round(c/h);u<1&&(u=1);var p=u*h;r.config.yaxis[n].stepSize&&(p=r.config.yaxis[n].stepSize),r.globals.isBarHorizontal&&r.config.xaxis.stepSize&&"datetime"!==r.config.xaxis.type&&(p=r.config.xaxis.stepSize);var f=p*Math.floor(t/p),g=p*Math.ceil(e/p),m=f;if(a&&s>2){for(;o.push(y.stripNumber(m,7)),!((m+=p)>g););return{result:o,niceMin:o[0],niceMax:o[o.length-1]}}var v=t;(o=[]).push(y.stripNumber(v,7));for(var b=Math.abs(e-t)/i,x=0;x<=i;x++)v+=b,o.push(v);return o[o.length-2]>=e&&o.pop(),{result:o,niceMin:o[0],niceMax:o[o.length-1]}}},{key:"linearScale",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,r=Math.abs(e-t);"dataPoints"===(i=this._adjustTicksForSmallRange(i,n,r))&&(i=this.w.globals.dataPoints-1),a||(a=r/i),i===Number.MAX_VALUE&&(i=5,a=1);for(var s=[],o=t;i>=0;)s.push(o),o+=a,i-=1;return{result:s,niceMin:s[0],niceMax:s[s.length-1]}}},{key:"logarithmicScaleNice",value:function(t,e,i){e<=0&&(e=Math.max(t,i)),t<=0&&(t=Math.min(e,i));for(var n=[],a=Math.ceil(Math.log(e)/Math.log(i)+1),r=Math.floor(Math.log(t)/Math.log(i));r5)n.allSeriesCollapsed=!1,n.yAxisScale[t]=this.logarithmicScale(e,i,r.logBase),n.yAxisScale[t]=r.forceNiceScale?this.logarithmicScaleNice(e,i,r.logBase):this.logarithmicScale(e,i,r.logBase);else if(i!==-Number.MAX_VALUE&&y.isNumber(i))if(n.allSeriesCollapsed=!1,void 0===r.min&&void 0===r.max||r.forceNiceScale){var o=void 0===a.yaxis[t].max&&void 0===a.yaxis[t].min||a.yaxis[t].forceNiceScale;n.yAxisScale[t]=this.niceScale(e,i,r.tickAmount?r.tickAmount:s<5&&s>1?s+1:5,t,o)}else n.yAxisScale[t]=this.linearScale(e,i,r.tickAmount,t,a.yaxis[t].stepSize);else n.yAxisScale[t]=this.linearScale(0,5,5,t,a.yaxis[t].stepSize)}},{key:"setXScale",value:function(t,e){var i=this.w,n=i.globals,a=Math.abs(e-t);return e!==-Number.MAX_VALUE&&y.isNumber(e)?n.xAxisScale=this.linearScale(t,e,i.config.xaxis.tickAmount?i.config.xaxis.tickAmount:a<5&&a>1?a+1:5,0,i.config.xaxis.stepSize):n.xAxisScale=this.linearScale(0,5,5),n.xAxisScale}},{key:"setMultipleYScales",value:function(){var t=this,e=this.w.globals,i=this.w.config,n=e.minYArr.concat([]),a=e.maxYArr.concat([]),r=[];i.yaxis.forEach((function(e,s){var o=s;i.series.forEach((function(t,i){t.name===e.seriesName&&(o=i,s!==i?r.push({index:i,similarIndex:s,alreadyExists:!0}):r.push({index:i}))}));var l=n[o],c=a[o];t.setYScaleForIndex(s,l,c)})),this.sameScaleInMultipleAxes(n,a,r)}},{key:"sameScaleInMultipleAxes",value:function(t,e,i){var n=this,a=this.w.config,r=this.w.globals,s=[];i.forEach((function(t){t.alreadyExists&&(void 0===s[t.index]&&(s[t.index]=[]),s[t.index].push(t.index),s[t.index].push(t.similarIndex))})),r.yAxisSameScaleIndices=s,s.forEach((function(t,e){s.forEach((function(i,n){var a,r;e!==n&&(a=t,r=i,a.filter((function(t){return-1!==r.indexOf(t)}))).length>0&&(s[e]=s[e].concat(s[n]))}))}));var o=s.map((function(t){return t.filter((function(e,i){return t.indexOf(e)===i}))})).map((function(t){return t.sort()}));s=s.filter((function(t){return!!t}));var l=o.slice(),c=l.map((function(t){return JSON.stringify(t)}));l=l.filter((function(t,e){return c.indexOf(JSON.stringify(t))===e}));var d=[],h=[];t.forEach((function(t,i){l.forEach((function(n,a){n.indexOf(i)>-1&&(void 0===d[a]&&(d[a]=[],h[a]=[]),d[a].push({key:i,value:t}),h[a].push({key:i,value:e[i]}))}))}));var u=Array.apply(null,Array(l.length)).map(Number.prototype.valueOf,Number.MIN_VALUE),p=Array.apply(null,Array(l.length)).map(Number.prototype.valueOf,-Number.MAX_VALUE);d.forEach((function(t,e){t.forEach((function(t,i){u[e]=Math.min(t.value,u[e])}))})),h.forEach((function(t,e){t.forEach((function(t,i){p[e]=Math.max(t.value,p[e])}))})),t.forEach((function(t,e){h.forEach((function(t,i){var s=u[i],o=p[i];a.chart.stacked&&(o=0,t.forEach((function(t,e){t.value!==-Number.MAX_VALUE&&(o+=t.value),s!==Number.MIN_VALUE&&(s+=d[i][e].value)}))),t.forEach((function(i,l){t[l].key===e&&(void 0!==a.yaxis[e].min&&(s="function"==typeof a.yaxis[e].min?a.yaxis[e].min(r.minY):a.yaxis[e].min),void 0!==a.yaxis[e].max&&(o="function"==typeof a.yaxis[e].max?a.yaxis[e].max(r.maxY):a.yaxis[e].max),n.setYScaleForIndex(e,s,o))}))}))}))}},{key:"autoScaleY",value:function(t,e,i){t||(t=this);var n=t.w;if(n.globals.isMultipleYAxis||n.globals.collapsedSeries.length)return console.warn("autoScaleYaxis not supported in a multi-yaxis chart."),e;var a=n.globals.seriesX[0],r=n.config.chart.stacked;return e.forEach((function(t,s){for(var o=0,l=0;l=i.xaxis.min){o=l;break}var c,d,h=n.globals.minYArr[s],u=n.globals.maxYArr[s],p=n.globals.stackedSeriesTotals;n.globals.series.forEach((function(s,l){var f=s[o];r?(f=p[o],c=d=f,p.forEach((function(t,e){a[e]<=i.xaxis.max&&a[e]>=i.xaxis.min&&(t>d&&null!==t&&(d=t),s[e]=i.xaxis.min){var r=t,s=t;n.globals.series.forEach((function(i,n){null!==t&&(r=Math.min(i[e],r),s=Math.max(i[e],s))})),s>d&&null!==s&&(d=s),rh&&(c=h),e.length>1?(e[l].min=void 0===t.min?c:t.min,e[l].max=void 0===t.max?d:t.max):(e[0].min=void 0===t.min?c:t.min,e[0].max=void 0===t.max?d:t.max)}))})),e}}]),t}(),K=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w,this.scales=new Z(e)}return c(t,[{key:"init",value:function(){this.setYRange(),this.setXRange(),this.setZRange()}},{key:"getMinYMaxY",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MAX_VALUE,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-Number.MAX_VALUE,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=this.w.config,r=this.w.globals,s=-Number.MAX_VALUE,o=Number.MIN_VALUE;null===n&&(n=t+1);var l=r.series,c=l,d=l;"candlestick"===a.chart.type?(c=r.seriesCandleL,d=r.seriesCandleH):"boxPlot"===a.chart.type?(c=r.seriesCandleO,d=r.seriesCandleC):r.isRangeData&&(c=r.seriesRangeStart,d=r.seriesRangeEnd);for(var h=t;hc[h][u]&&c[h][u]<0&&(o=c[h][u])):r.hasNullValues=!0}}return"rangeBar"===a.chart.type&&r.seriesRangeStart.length&&r.isBarHorizontal&&(o=e),"bar"===a.chart.type&&(o<0&&s<0&&(s=0),o===Number.MIN_VALUE&&(o=0)),{minY:o,maxY:s,lowestY:e,highestY:i}}},{key:"setYRange",value:function(){var t=this.w.globals,e=this.w.config;t.maxY=-Number.MAX_VALUE,t.minY=Number.MIN_VALUE;var i=Number.MAX_VALUE;if(t.isMultipleYAxis)for(var n=0;n=0&&i<=10||void 0!==e.yaxis[0].min||void 0!==e.yaxis[0].max)&&(s=0),t.minY=i-5*s/100,i>0&&t.minY<0&&(t.minY=0),t.maxY=t.maxY+5*s/100}return e.yaxis.forEach((function(e,i){void 0!==e.max&&("number"==typeof e.max?t.maxYArr[i]=e.max:"function"==typeof e.max&&(t.maxYArr[i]=e.max(t.isMultipleYAxis?t.maxYArr[i]:t.maxY)),t.maxY=t.maxYArr[i]),void 0!==e.min&&("number"==typeof e.min?t.minYArr[i]=e.min:"function"==typeof e.min&&(t.minYArr[i]=e.min(t.isMultipleYAxis?t.minYArr[i]===Number.MIN_VALUE?0:t.minYArr[i]:t.minY)),t.minY=t.minYArr[i])})),t.isBarHorizontal&&["min","max"].forEach((function(i){void 0!==e.xaxis[i]&&"number"==typeof e.xaxis[i]&&("min"===i?t.minY=e.xaxis[i]:t.maxY=e.xaxis[i])})),t.isMultipleYAxis?(this.scales.setMultipleYScales(),t.minY=i,t.yAxisScale.forEach((function(e,i){t.minYArr[i]=e.niceMin,t.maxYArr[i]=e.niceMax}))):(this.scales.setYScaleForIndex(0,t.minY,t.maxY),t.minY=t.yAxisScale[0].niceMin,t.maxY=t.yAxisScale[0].niceMax,t.minYArr[0]=t.yAxisScale[0].niceMin,t.maxYArr[0]=t.yAxisScale[0].niceMax),{minY:t.minY,maxY:t.maxY,minYArr:t.minYArr,maxYArr:t.maxYArr,yAxisScale:t.yAxisScale}}},{key:"setXRange",value:function(){var t=this.w.globals,e=this.w.config,i="numeric"===e.xaxis.type||"datetime"===e.xaxis.type||"category"===e.xaxis.type&&!t.noLabelsProvided||t.noLabelsProvided||t.isXNumeric;if(t.isXNumeric&&function(){for(var e=0;et.dataPoints&&0!==t.dataPoints&&(n=t.dataPoints-1)):"dataPoints"===e.xaxis.tickAmount?(t.series.length>1&&(n=t.series[t.maxValsInArrayIndex].length-1),t.isXNumeric&&(n=t.maxX-t.minX-1)):n=e.xaxis.tickAmount,t.xTickAmount=n,void 0!==e.xaxis.max&&"number"==typeof e.xaxis.max&&(t.maxX=e.xaxis.max),void 0!==e.xaxis.min&&"number"==typeof e.xaxis.min&&(t.minX=e.xaxis.min),void 0!==e.xaxis.range&&(t.minX=t.maxX-e.xaxis.range),t.minX!==Number.MAX_VALUE&&t.maxX!==-Number.MAX_VALUE)if(e.xaxis.convertedCatToNumeric&&!t.dataFormatXNumeric){for(var a=[],r=t.minX-1;r0&&(t.xAxisScale=this.scales.linearScale(1,t.labels.length,n-1,0,e.xaxis.stepSize),t.seriesX=t.labels.slice());i&&(t.labels=t.xAxisScale.result.slice())}return t.isBarHorizontal&&t.labels.length&&(t.xTickAmount=t.labels.length),this._handleSingleDataPoint(),this._getMinXDiff(),{minX:t.minX,maxX:t.maxX}}},{key:"setZRange",value:function(){var t=this.w.globals;if(t.isDataXYZ)for(var e=0;e0){var a=e-n[i-1];a>0&&(t.minXDiff=Math.min(a,t.minXDiff))}})),1!==t.dataPoints&&t.minXDiff!==Number.MAX_VALUE||(t.minXDiff=.5)}))}},{key:"_setStackedMinMax",value:function(){var t=this,e=this.w.globals;if(e.series.length){var i=e.seriesGroups;i.length||(i=[this.w.config.series.map((function(t){return t.name}))]);var n={},a={};i.forEach((function(i){n[i]=[],a[i]=[],t.w.config.series.map((function(t,e){return i.indexOf(t.name)>-1?e:null})).filter((function(t){return null!==t})).forEach((function(r){for(var s=0;s0?n[i][s]+=parseFloat(e.series[r][s])+1e-4:a[i][s]+=parseFloat(e.series[r][s]))}}))})),Object.entries(n).forEach((function(t){var i=m(t,1)[0];n[i].forEach((function(t,r){e.maxY=Math.max(e.maxY,n[i][r]),e.minY=Math.min(e.minY,a[i][r])}))}))}}}]),t}(),Q=function(){function t(e,i){o(this,t),this.ctx=e,this.elgrid=i,this.w=e.w;var n=this.w;this.xaxisFontSize=n.config.xaxis.labels.style.fontSize,this.axisFontFamily=n.config.xaxis.labels.style.fontFamily,this.xaxisForeColors=n.config.xaxis.labels.style.colors,this.isCategoryBarHorizontal="bar"===n.config.chart.type&&n.config.plotOptions.bar.horizontal,this.xAxisoffX=0,"bottom"===n.config.xaxis.position&&(this.xAxisoffX=n.globals.gridHeight),this.drawnLabels=[],this.axesUtils=new G(e)}return c(t,[{key:"drawYaxis",value:function(t){var e=this,i=this.w,n=new S(this.ctx),a=i.config.yaxis[t].labels.style,r=a.fontSize,s=a.fontFamily,o=a.fontWeight,l=n.group({class:"apexcharts-yaxis",rel:t,transform:"translate("+i.globals.translateYAxisX[t]+", 0)"});if(this.axesUtils.isYAxisHidden(t))return l;var c=n.group({class:"apexcharts-yaxis-texts-g"});l.add(c);var d=i.globals.yAxisScale[t].result.length-1,h=i.globals.gridHeight/d,u=i.globals.translateY,p=i.globals.yLabelFormatters[t],f=i.globals.yAxisScale[t].result.slice();f=this.axesUtils.checkForReversedLabels(t,f);var g="";if(i.config.yaxis[t].labels.show)for(var m=function(l){var m=f[l];m=p(m,l,i);var v=i.config.yaxis[t].labels.padding;i.config.yaxis[t].opposite&&0!==i.config.yaxis.length&&(v*=-1);var b="end";i.config.yaxis[t].opposite&&(b="start"),"left"===i.config.yaxis[t].labels.align?b="start":"center"===i.config.yaxis[t].labels.align?b="middle":"right"===i.config.yaxis[t].labels.align&&(b="end");var x=e.axesUtils.getYAxisForeColor(a.colors,t),y=i.config.yaxis[t].labels.offsetY;"heatmap"===i.config.chart.type&&(y-=(i.globals.gridHeight/i.globals.series.length-1)/2);var w=n.drawText({x:v,y:u+d/10+y+1,text:m,textAnchor:b,fontSize:r,fontFamily:s,fontWeight:o,maxWidth:i.config.yaxis[t].labels.maxWidth,foreColor:Array.isArray(x)?x[l]:x,isPlainText:!1,cssClass:"apexcharts-yaxis-label "+a.cssClass});l===d&&(g=w),c.add(w);var C=document.createElementNS(i.globals.SVGNS,"title");if(C.textContent=Array.isArray(m)?m.join(" "):m,w.node.appendChild(C),0!==i.config.yaxis[t].labels.rotate){var S=n.rotateAroundCenter(g.node),k=n.rotateAroundCenter(w.node);w.node.setAttribute("transform","rotate(".concat(i.config.yaxis[t].labels.rotate," ").concat(S.x," ").concat(k.y,")"))}u+=h},v=d;v>=0;v--)m(v);if(void 0!==i.config.yaxis[t].title.text){var b=n.group({class:"apexcharts-yaxis-title"}),x=0;i.config.yaxis[t].opposite&&(x=i.globals.translateYAxisX[t]);var y=n.drawText({x:x,y:i.globals.gridHeight/2+i.globals.translateY+i.config.yaxis[t].title.offsetY,text:i.config.yaxis[t].title.text,textAnchor:"end",foreColor:i.config.yaxis[t].title.style.color,fontSize:i.config.yaxis[t].title.style.fontSize,fontWeight:i.config.yaxis[t].title.style.fontWeight,fontFamily:i.config.yaxis[t].title.style.fontFamily,cssClass:"apexcharts-yaxis-title-text "+i.config.yaxis[t].title.style.cssClass});b.add(y),l.add(b)}var w=i.config.yaxis[t].axisBorder,C=31+w.offsetX;if(i.config.yaxis[t].opposite&&(C=-31-w.offsetX),w.show){var k=n.drawLine(C,i.globals.translateY+w.offsetY-2,C,i.globals.gridHeight+i.globals.translateY+w.offsetY+2,w.color,0,w.width);l.add(k)}return i.config.yaxis[t].axisTicks.show&&this.axesUtils.drawYAxisTicks(C,d,w,i.config.yaxis[t].axisTicks,t,h,l),l}},{key:"drawYaxisInversed",value:function(t){var e=this.w,i=new S(this.ctx),n=i.group({class:"apexcharts-xaxis apexcharts-yaxis-inversed"}),a=i.group({class:"apexcharts-xaxis-texts-g",transform:"translate(".concat(e.globals.translateXAxisX,", ").concat(e.globals.translateXAxisY,")")});n.add(a);var r=e.globals.yAxisScale[t].result.length-1,s=e.globals.gridWidth/r+.1,o=s+e.config.xaxis.labels.offsetX,l=e.globals.xLabelFormatter,c=e.globals.yAxisScale[t].result.slice(),d=e.globals.timescaleLabels;d.length>0&&(this.xaxisLabels=d.slice(),r=(c=d.slice()).length),c=this.axesUtils.checkForReversedLabels(t,c);var h=d.length;if(e.config.xaxis.labels.show)for(var u=h?0:r;h?u=0;h?u++:u--){var p=c[u];p=l(p,u,e);var f=e.globals.gridWidth+e.globals.padHorizontal-(o-s+e.config.xaxis.labels.offsetX);if(d.length){var g=this.axesUtils.getLabel(c,d,f,u,this.drawnLabels,this.xaxisFontSize);f=g.x,p=g.text,this.drawnLabels.push(g.text),0===u&&e.globals.skipFirstTimelinelabel&&(p=""),u===c.length-1&&e.globals.skipLastTimelinelabel&&(p="")}var m=i.drawText({x:f,y:this.xAxisoffX+e.config.xaxis.labels.offsetY+30-("top"===e.config.xaxis.position?e.globals.xAxisHeight+e.config.xaxis.axisTicks.height-2:0),text:p,textAnchor:"middle",foreColor:Array.isArray(this.xaxisForeColors)?this.xaxisForeColors[t]:this.xaxisForeColors,fontSize:this.xaxisFontSize,fontFamily:this.xaxisFontFamily,fontWeight:e.config.xaxis.labels.style.fontWeight,isPlainText:!1,cssClass:"apexcharts-xaxis-label "+e.config.xaxis.labels.style.cssClass});a.add(m),m.tspan(p);var v=document.createElementNS(e.globals.SVGNS,"title");v.textContent=p,m.node.appendChild(v),o+=s}return this.inversedYAxisTitleText(n),this.inversedYAxisBorder(n),n}},{key:"inversedYAxisBorder",value:function(t){var e=this.w,i=new S(this.ctx),n=e.config.xaxis.axisBorder;if(n.show){var a=0;"bar"===e.config.chart.type&&e.globals.isXNumeric&&(a-=15);var r=i.drawLine(e.globals.padHorizontal+a+n.offsetX,this.xAxisoffX,e.globals.gridWidth,this.xAxisoffX,n.color,0,n.height);this.elgrid&&this.elgrid.elGridBorders&&e.config.grid.show?this.elgrid.elGridBorders.add(r):t.add(r)}}},{key:"inversedYAxisTitleText",value:function(t){var e=this.w,i=new S(this.ctx);if(void 0!==e.config.xaxis.title.text){var n=i.group({class:"apexcharts-xaxis-title apexcharts-yaxis-title-inversed"}),a=i.drawText({x:e.globals.gridWidth/2+e.config.xaxis.title.offsetX,y:this.xAxisoffX+parseFloat(this.xaxisFontSize)+parseFloat(e.config.xaxis.title.style.fontSize)+e.config.xaxis.title.offsetY+20,text:e.config.xaxis.title.text,textAnchor:"middle",fontSize:e.config.xaxis.title.style.fontSize,fontFamily:e.config.xaxis.title.style.fontFamily,fontWeight:e.config.xaxis.title.style.fontWeight,foreColor:e.config.xaxis.title.style.color,cssClass:"apexcharts-xaxis-title-text "+e.config.xaxis.title.style.cssClass});n.add(a),t.add(n)}}},{key:"yAxisTitleRotate",value:function(t,e){var i=this.w,n=new S(this.ctx),a={width:0,height:0},r={width:0,height:0},s=i.globals.dom.baseEl.querySelector(" .apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-texts-g"));null!==s&&(a=s.getBoundingClientRect());var o=i.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(t,"'] .apexcharts-yaxis-title text"));if(null!==o&&(r=o.getBoundingClientRect()),null!==o){var l=this.xPaddingForYAxisTitle(t,a,r,e);o.setAttribute("x",l.xPos-(e?10:0))}if(null!==o){var c=n.rotateAroundCenter(o);o.setAttribute("transform","rotate(".concat(e?-1*i.config.yaxis[t].title.rotate:i.config.yaxis[t].title.rotate," ").concat(c.x," ").concat(c.y,")"))}}},{key:"xPaddingForYAxisTitle",value:function(t,e,i,n){var a=this.w,r=0,s=0,o=10;return void 0===a.config.yaxis[t].title.text||t<0?{xPos:s,padd:0}:(n?(s=e.width+a.config.yaxis[t].title.offsetX+i.width/2+o/2,0===(r+=1)&&(s-=o/2)):(s=-1*e.width+a.config.yaxis[t].title.offsetX+o/2+i.width/2,a.globals.isBarHorizontal&&(o=25,s=-1*e.width-a.config.yaxis[t].title.offsetX-o)),{xPos:s,padd:o})}},{key:"setYAxisXPosition",value:function(t,e){var i=this.w,n=0,a=0,r=18,s=1;i.config.yaxis.length>1&&(this.multipleYs=!0),i.config.yaxis.map((function(o,l){var c=i.globals.ignoreYAxisIndexes.indexOf(l)>-1||!o.show||o.floating||0===t[l].width,d=t[l].width+e[l].width;o.opposite?i.globals.isBarHorizontal?(a=i.globals.gridWidth+i.globals.translateX-1,i.globals.translateYAxisX[l]=a-o.labels.offsetX):(a=i.globals.gridWidth+i.globals.translateX+s,c||(s=s+d+20),i.globals.translateYAxisX[l]=a-o.labels.offsetX+20):(n=i.globals.translateX-r,c||(r=r+d+20),i.globals.translateYAxisX[l]=n+o.labels.offsetX)}))}},{key:"setYAxisTextAlignments",value:function(){var t=this.w,e=t.globals.dom.baseEl.getElementsByClassName("apexcharts-yaxis");(e=y.listToArray(e)).forEach((function(e,i){var n=t.config.yaxis[i];if(n&&!n.floating&&void 0!==n.labels.align){var a=t.globals.dom.baseEl.querySelector(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-texts-g")),r=t.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxis[rel='".concat(i,"'] .apexcharts-yaxis-label"));r=y.listToArray(r);var s=a.getBoundingClientRect();"left"===n.labels.align?(r.forEach((function(t,e){t.setAttribute("text-anchor","start")})),n.opposite||a.setAttribute("transform","translate(-".concat(s.width,", 0)"))):"center"===n.labels.align?(r.forEach((function(t,e){t.setAttribute("text-anchor","middle")})),a.setAttribute("transform","translate(".concat(s.width/2*(n.opposite?1:-1),", 0)"))):"right"===n.labels.align&&(r.forEach((function(t,e){t.setAttribute("text-anchor","end")})),n.opposite&&a.setAttribute("transform","translate(".concat(s.width,", 0)")))}}))}}]),t}(),J=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w,this.documentEvent=y.bind(this.documentEvent,this)}return c(t,[{key:"addEventListener",value:function(t,e){var i=this.w;i.globals.events.hasOwnProperty(t)?i.globals.events[t].push(e):i.globals.events[t]=[e]}},{key:"removeEventListener",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){var n=i.globals.events[t].indexOf(e);-1!==n&&i.globals.events[t].splice(n,1)}}},{key:"fireEvent",value:function(t,e){var i=this.w;if(i.globals.events.hasOwnProperty(t)){e&&e.length||(e=[]);for(var n=i.globals.events[t],a=n.length,r=0;r0&&(e=this.w.config.chart.locales.concat(window.Apex.chart.locales));var i=e.filter((function(e){return e.name===t}))[0];if(!i)throw new Error("Wrong locale name provided. Please make sure you set the correct locale name in options");var n=y.extend(O,i);this.w.globals.locale=n.options}}]),t}(),et=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w}return c(t,[{key:"drawAxis",value:function(t,e){var i,n,a=this,r=this.w.globals,s=this.w.config,o=new U(this.ctx,e),l=new Q(this.ctx,e);r.axisCharts&&"radar"!==t&&(r.isBarHorizontal?(n=l.drawYaxisInversed(0),i=o.drawXaxisInversed(0),r.dom.elGraphical.add(i),r.dom.elGraphical.add(n)):(i=o.drawXaxis(),r.dom.elGraphical.add(i),s.yaxis.map((function(t,e){if(-1===r.ignoreYAxisIndexes.indexOf(e)&&(n=l.drawYaxis(e),r.dom.Paper.add(n),"back"===a.w.config.grid.position)){var i=r.dom.Paper.children()[1];i.remove(),r.dom.Paper.add(i)}}))))}}]),t}(),it=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w}return c(t,[{key:"drawXCrosshairs",value:function(){var t=this.w,e=new S(this.ctx),i=new C(this.ctx),n=t.config.xaxis.crosshairs.fill.gradient,a=t.config.xaxis.crosshairs.dropShadow,r=t.config.xaxis.crosshairs.fill.type,s=n.colorFrom,o=n.colorTo,l=n.opacityFrom,c=n.opacityTo,d=n.stops,h=a.enabled,u=a.left,p=a.top,f=a.blur,g=a.color,m=a.opacity,v=t.config.xaxis.crosshairs.fill.color;if(t.config.xaxis.crosshairs.show){"gradient"===r&&(v=e.drawGradient("vertical",s,o,l,c,null,d,null));var b=e.drawRect();1===t.config.xaxis.crosshairs.width&&(b=e.drawLine());var x=t.globals.gridHeight;(!y.isNumber(x)||x<0)&&(x=0);var w=t.config.xaxis.crosshairs.width;(!y.isNumber(w)||w<0)&&(w=0),b.attr({class:"apexcharts-xcrosshairs",x:0,y:0,y2:x,width:w,height:x,fill:v,filter:"none","fill-opacity":t.config.xaxis.crosshairs.opacity,stroke:t.config.xaxis.crosshairs.stroke.color,"stroke-width":t.config.xaxis.crosshairs.stroke.width,"stroke-dasharray":t.config.xaxis.crosshairs.stroke.dashArray}),h&&(b=i.dropShadow(b,{left:u,top:p,blur:f,color:g,opacity:m})),t.globals.dom.elGraphical.add(b)}}},{key:"drawYCrosshairs",value:function(){var t=this.w,e=new S(this.ctx),i=t.config.yaxis[0].crosshairs,n=t.globals.barPadForNumericAxis;if(t.config.yaxis[0].crosshairs.show){var a=e.drawLine(-n,0,t.globals.gridWidth+n,0,i.stroke.color,i.stroke.dashArray,i.stroke.width);a.attr({class:"apexcharts-ycrosshairs"}),t.globals.dom.elGraphical.add(a)}var r=e.drawLine(-n,0,t.globals.gridWidth+n,0,i.stroke.color,0,0);r.attr({class:"apexcharts-ycrosshairs-hidden"}),t.globals.dom.elGraphical.add(r)}}]),t}(),nt=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w}return c(t,[{key:"checkResponsiveConfig",value:function(t){var e=this,i=this.w,n=i.config;if(0!==n.responsive.length){var a=n.responsive.slice();a.sort((function(t,e){return t.breakpoint>e.breakpoint?1:e.breakpoint>t.breakpoint?-1:0})).reverse();var r=new N({}),s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=a[0].breakpoint,s=window.innerWidth>0?window.innerWidth:screen.width;if(s>n){var o=k.extendArrayProps(r,i.globals.initialConfig,i);t=y.extend(o,t),t=y.extend(i.config,t),e.overrideResponsiveOptions(t)}else for(var l=0;l0&&"function"==typeof i.config.colors[0]&&(i.globals.colors=i.config.series.map((function(t,n){var a=i.config.colors[n];return a||(a=i.config.colors[0]),"function"==typeof a?(e.isColorFn=!0,a({value:i.globals.axisCharts?i.globals.series[n][0]?i.globals.series[n][0]:0:i.globals.series[n],seriesIndex:n,dataPointIndex:n,w:i})):a})))),i.globals.seriesColors.map((function(t,e){t&&(i.globals.colors[e]=t)})),i.config.theme.monochrome.enabled){var a=[],r=i.globals.series.length;(this.isBarDistributed||this.isHeatmapDistributed)&&(r=i.globals.series[0].length*i.globals.series.length);for(var s=i.config.theme.monochrome.color,o=1/(r/i.config.theme.monochrome.shadeIntensity),l=i.config.theme.monochrome.shadeTo,c=0,d=0;d2&&void 0!==arguments[2]?arguments[2]:null,n=this.w,a=e||n.globals.series.length;if(null===i&&(i=this.isBarDistributed||this.isHeatmapDistributed||"heatmap"===n.config.chart.type&&n.config.plotOptions.heatmap.colorScale.inverse),i&&n.globals.series.length&&(a=n.globals.series[n.globals.maxValsInArrayIndex].length*n.globals.series.length),t.lengtht.globals.svgWidth&&(this.dCtx.lgRect.width=t.globals.svgWidth/1.5),this.dCtx.lgRect}},{key:"getLargestStringFromMultiArr",value:function(t,e){var i=t;if(this.w.globals.isMultiLineX){var n=e.map((function(t,e){return Array.isArray(t)?t.length:1})),a=Math.max.apply(Math,v(n));i=e[n.indexOf(a)]}return i}}]),t}(),ot=function(){function t(e){o(this,t),this.w=e.w,this.dCtx=e}return c(t,[{key:"getxAxisLabelsCoords",value:function(){var t,e=this.w,i=e.globals.labels.slice();if(e.config.xaxis.convertedCatToNumeric&&0===i.length&&(i=e.globals.categoryLabels),e.globals.timescaleLabels.length>0){var n=this.getxAxisTimeScaleLabelsCoords();t={width:n.width,height:n.height},e.globals.rotateXLabels=!1}else{this.dCtx.lgWidthForSideLegends="left"!==e.config.legend.position&&"right"!==e.config.legend.position||e.config.legend.floating?0:this.dCtx.lgRect.width;var a=e.globals.xLabelFormatter,r=y.getLargestStringFromArr(i),s=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,i);e.globals.isBarHorizontal&&(s=r=e.globals.yAxisScale[0].result.reduce((function(t,e){return t.length>e.length?t:e}),0));var o=new _(this.dCtx.ctx),l=r;r=o.xLabelFormat(a,r,l,{i:void 0,dateFormatter:new M(this.dCtx.ctx).formatDate,w:e}),s=o.xLabelFormat(a,s,l,{i:void 0,dateFormatter:new M(this.dCtx.ctx).formatDate,w:e}),(e.config.xaxis.convertedCatToNumeric&&void 0===r||""===String(r).trim())&&(s=r="1");var c=new S(this.dCtx.ctx),d=c.getTextRects(r,e.config.xaxis.labels.style.fontSize),h=d;if(r!==s&&(h=c.getTextRects(s,e.config.xaxis.labels.style.fontSize)),(t={width:d.width>=h.width?d.width:h.width,height:d.height>=h.height?d.height:h.height}).width*i.length>e.globals.svgWidth-this.dCtx.lgWidthForSideLegends-this.dCtx.yAxisWidth-this.dCtx.gridPad.left-this.dCtx.gridPad.right&&0!==e.config.xaxis.labels.rotate||e.config.xaxis.labels.rotateAlways){if(!e.globals.isBarHorizontal){e.globals.rotateXLabels=!0;var u=function(t){return c.getTextRects(t,e.config.xaxis.labels.style.fontSize,e.config.xaxis.labels.style.fontFamily,"rotate(".concat(e.config.xaxis.labels.rotate," 0 0)"),!1)};d=u(r),r!==s&&(h=u(s)),t.height=(d.height>h.height?d.height:h.height)/1.5,t.width=d.width>h.width?d.width:h.width}}else e.globals.rotateXLabels=!1}return e.config.xaxis.labels.show||(t={width:0,height:0}),{width:t.width,height:t.height}}},{key:"getxAxisGroupLabelsCoords",value:function(){var t,e=this.w;if(!e.globals.hasXaxisGroups)return{width:0,height:0};var i,n=(null===(t=e.config.xaxis.group.style)||void 0===t?void 0:t.fontSize)||e.config.xaxis.labels.style.fontSize,a=e.globals.groups.map((function(t){return t.title})),r=y.getLargestStringFromArr(a),s=this.dCtx.dimHelpers.getLargestStringFromMultiArr(r,a),o=new S(this.dCtx.ctx),l=o.getTextRects(r,n),c=l;return r!==s&&(c=o.getTextRects(s,n)),i={width:l.width>=c.width?l.width:c.width,height:l.height>=c.height?l.height:c.height},e.config.xaxis.labels.show||(i={width:0,height:0}),{width:i.width,height:i.height}}},{key:"getxAxisTitleCoords",value:function(){var t=this.w,e=0,i=0;if(void 0!==t.config.xaxis.title.text){var n=new S(this.dCtx.ctx).getTextRects(t.config.xaxis.title.text,t.config.xaxis.title.style.fontSize);e=n.width,i=n.height}return{width:e,height:i}}},{key:"getxAxisTimeScaleLabelsCoords",value:function(){var t,e=this.w;this.dCtx.timescaleLabels=e.globals.timescaleLabels.slice();var i=this.dCtx.timescaleLabels.map((function(t){return t.value})),n=i.reduce((function(t,e){return void 0===t?(console.error("You have possibly supplied invalid Date format. Please supply a valid JavaScript Date"),0):t.length>e.length?t:e}),0);return 1.05*(t=new S(this.dCtx.ctx).getTextRects(n,e.config.xaxis.labels.style.fontSize)).width*i.length>e.globals.gridWidth&&0!==e.config.xaxis.labels.rotate&&(e.globals.overlappingXLabels=!0),t}},{key:"additionalPaddingXLabels",value:function(t){var e=this,i=this.w,n=i.globals,a=i.config,r=a.xaxis.type,s=t.width;n.skipLastTimelinelabel=!1,n.skipFirstTimelinelabel=!1;var o=i.config.yaxis[0].opposite&&i.globals.isBarHorizontal,l=function(t,o){a.yaxis.length>1&&function(t){return-1!==n.collapsedSeriesIndices.indexOf(t)}(o)||function(t){if(e.dCtx.timescaleLabels&&e.dCtx.timescaleLabels.length){var o=e.dCtx.timescaleLabels[0],l=e.dCtx.timescaleLabels[e.dCtx.timescaleLabels.length-1].position+s/1.75-e.dCtx.yAxisWidthRight,c=o.position-s/1.75+e.dCtx.yAxisWidthLeft,d="right"===i.config.legend.position&&e.dCtx.lgRect.width>0?e.dCtx.lgRect.width:0;l>n.svgWidth-n.translateX-d&&(n.skipLastTimelinelabel=!0),c<-(t.show&&!t.floating||"bar"!==a.chart.type&&"candlestick"!==a.chart.type&&"rangeBar"!==a.chart.type&&"boxPlot"!==a.chart.type?10:s/1.75)&&(n.skipFirstTimelinelabel=!0)}else"datetime"===r?e.dCtx.gridPad.right(null===(n=String(d(e,o)))||void 0===n?void 0:n.length)?t:e}),h),p=u=d(u,o);if(void 0!==u&&0!==u.length||(u=l.niceMax),e.globals.isBarHorizontal){n=0;var f=e.globals.labels.slice();u=y.getLargestStringFromArr(f),u=d(u,{seriesIndex:s,dataPointIndex:-1,w:e}),p=t.dCtx.dimHelpers.getLargestStringFromMultiArr(u,f)}var g=new S(t.dCtx.ctx),m="rotate(".concat(r.labels.rotate," 0 0)"),v=g.getTextRects(u,r.labels.style.fontSize,r.labels.style.fontFamily,m,!1),b=v;u!==p&&(b=g.getTextRects(p,r.labels.style.fontSize,r.labels.style.fontFamily,m,!1)),i.push({width:(c>b.width||c>v.width?c:b.width>v.width?b.width:v.width)+n,height:b.height>v.height?b.height:v.height})}else i.push({width:0,height:0})})),i}},{key:"getyAxisTitleCoords",value:function(){var t=this,e=this.w,i=[];return e.config.yaxis.map((function(e,n){if(e.show&&void 0!==e.title.text){var a=new S(t.dCtx.ctx),r="rotate(".concat(e.title.rotate," 0 0)"),s=a.getTextRects(e.title.text,e.title.style.fontSize,e.title.style.fontFamily,r,!1);i.push({width:s.width,height:s.height})}else i.push({width:0,height:0})})),i}},{key:"getTotalYAxisWidth",value:function(){var t=this.w,e=0,i=0,n=0,a=t.globals.yAxisScale.length>1?10:0,r=new G(this.dCtx.ctx),s=function(s,o){var l=t.config.yaxis[o].floating,c=0;s.width>0&&!l?(c=s.width+a,function(e){return t.globals.ignoreYAxisIndexes.indexOf(e)>-1}(o)&&(c=c-s.width-a)):c=l||r.isYAxisHidden(o)?0:5,t.config.yaxis[o].opposite?n+=c:i+=c,e+=c};return t.globals.yLabelsCoords.map((function(t,e){s(t,e)})),t.globals.yTitleCoords.map((function(t,e){s(t,e)})),t.globals.isBarHorizontal&&!t.config.yaxis[0].floating&&(e=t.globals.yLabelsCoords[0].width+t.globals.yTitleCoords[0].width+15),this.dCtx.yAxisWidthLeft=i,this.dCtx.yAxisWidthRight=n,e}}]),t}(),ct=function(){function t(e){o(this,t),this.w=e.w,this.dCtx=e}return c(t,[{key:"gridPadForColumnsInNumericAxis",value:function(t){var e=this.w;if(e.globals.noData||e.globals.allSeriesCollapsed)return 0;var i=function(t){return"bar"===t||"rangeBar"===t||"candlestick"===t||"boxPlot"===t},n=e.config.chart.type,a=0,r=i(n)?e.config.series.length:1;if(e.globals.comboBarCount>0&&(r=e.globals.comboBarCount),e.globals.collapsedSeries.forEach((function(t){i(t.type)&&(r-=1)})),e.config.chart.stacked&&(r=1),(i(n)||e.globals.comboBarCount>0)&&e.globals.isXNumeric&&!e.globals.isBarHorizontal&&r>0){var s,o,l=Math.abs(e.globals.initialMaxX-e.globals.initialMinX);l<=3&&(l=e.globals.dataPoints),s=l/t,e.globals.minXDiff&&e.globals.minXDiff/s>0&&(o=e.globals.minXDiff/s),o>t/2&&(o/=2),(a=o/r*parseInt(e.config.plotOptions.bar.columnWidth,10)/100)<1&&(a=1),a=a/(r>1?1:1.5)+5,e.globals.barPadForNumericAxis=a}return a}},{key:"gridPadFortitleSubtitle",value:function(){var t=this,e=this.w,i=e.globals,n=this.dCtx.isSparkline||!e.globals.axisCharts?0:10;["title","subtitle"].forEach((function(i){void 0!==e.config[i].text?n+=e.config[i].margin:n+=t.dCtx.isSparkline||!e.globals.axisCharts?0:5})),!e.config.legend.show||"bottom"!==e.config.legend.position||e.config.legend.floating||e.globals.axisCharts||(n+=10);var a=this.dCtx.dimHelpers.getTitleSubtitleCoords("title"),r=this.dCtx.dimHelpers.getTitleSubtitleCoords("subtitle");i.gridHeight=i.gridHeight-a.height-r.height-n,i.translateY=i.translateY+a.height+r.height+n}},{key:"setGridXPosForDualYAxis",value:function(t,e){var i=this.w,n=new G(this.dCtx.ctx);i.config.yaxis.map((function(a,r){-1!==i.globals.ignoreYAxisIndexes.indexOf(r)||a.floating||n.isYAxisHidden(r)||(a.opposite&&(i.globals.translateX=i.globals.translateX-(e[r].width+t[r].width)-parseInt(i.config.yaxis[r].labels.style.fontSize,10)/1.2-12),i.globals.translateX<2&&(i.globals.translateX=2))}))}}]),t}(),dt=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w,this.lgRect={},this.yAxisWidth=0,this.yAxisWidthLeft=0,this.yAxisWidthRight=0,this.xAxisHeight=0,this.isSparkline=this.w.config.chart.sparkline.enabled,this.dimHelpers=new st(this),this.dimYAxis=new lt(this),this.dimXAxis=new ot(this),this.dimGrid=new ct(this),this.lgWidthForSideLegends=0,this.gridPad=this.w.config.grid.padding,this.xPadRight=0,this.xPadLeft=0}return c(t,[{key:"plotCoords",value:function(){var t=this,e=this.w,i=e.globals;this.lgRect=this.dimHelpers.getLegendsRect(),this.isSparkline&&((e.config.markers.discrete.length>0||e.config.markers.size>0)&&Object.entries(this.gridPad).forEach((function(e){var i=m(e,2),n=i[0],a=i[1];t.gridPad[n]=Math.max(a,t.w.globals.markers.largestSize/1.5)})),this.gridPad.top=Math.max(e.config.stroke.width/2,this.gridPad.top),this.gridPad.bottom=Math.max(e.config.stroke.width/2,this.gridPad.bottom)),i.axisCharts?this.setDimensionsForAxisCharts():this.setDimensionsForNonAxisCharts(),this.dimGrid.gridPadFortitleSubtitle(),i.gridHeight=i.gridHeight-this.gridPad.top-this.gridPad.bottom,i.gridWidth=i.gridWidth-this.gridPad.left-this.gridPad.right-this.xPadRight-this.xPadLeft;var n=this.dimGrid.gridPadForColumnsInNumericAxis(i.gridWidth);i.gridWidth=i.gridWidth-2*n,i.translateX=i.translateX+this.gridPad.left+this.xPadLeft+(n>0?n+4:0),i.translateY=i.translateY+this.gridPad.top}},{key:"setDimensionsForAxisCharts",value:function(){var t=this,e=this.w,i=e.globals,n=this.dimYAxis.getyAxisLabelsCoords(),a=this.dimYAxis.getyAxisTitleCoords();e.globals.yLabelsCoords=[],e.globals.yTitleCoords=[],e.config.yaxis.map((function(t,i){e.globals.yLabelsCoords.push({width:n[i].width,index:i}),e.globals.yTitleCoords.push({width:a[i].width,index:i})})),this.yAxisWidth=this.dimYAxis.getTotalYAxisWidth();var r=this.dimXAxis.getxAxisLabelsCoords(),s=this.dimXAxis.getxAxisGroupLabelsCoords(),o=this.dimXAxis.getxAxisTitleCoords();this.conditionalChecksForAxisCoords(r,o,s),i.translateXAxisY=e.globals.rotateXLabels?this.xAxisHeight/8:-4,i.translateXAxisX=e.globals.rotateXLabels&&e.globals.isXNumeric&&e.config.xaxis.labels.rotate<=-45?-this.xAxisWidth/4:0,e.globals.isBarHorizontal&&(i.rotateXLabels=!1,i.translateXAxisY=parseInt(e.config.xaxis.labels.style.fontSize,10)/1.5*-1),i.translateXAxisY=i.translateXAxisY+e.config.xaxis.labels.offsetY,i.translateXAxisX=i.translateXAxisX+e.config.xaxis.labels.offsetX;var l=this.yAxisWidth,c=this.xAxisHeight;i.xAxisLabelsHeight=this.xAxisHeight-o.height,i.xAxisGroupLabelsHeight=i.xAxisLabelsHeight-r.height,i.xAxisLabelsWidth=this.xAxisWidth,i.xAxisHeight=this.xAxisHeight;var d=10;("radar"===e.config.chart.type||this.isSparkline)&&(l=0,c=i.goldenPadding),this.isSparkline&&(this.lgRect={height:0,width:0}),(this.isSparkline||"treemap"===e.config.chart.type)&&(l=0,c=0,d=0),this.isSparkline||this.dimXAxis.additionalPaddingXLabels(r);var h=function(){i.translateX=l,i.gridHeight=i.svgHeight-t.lgRect.height-c-(t.isSparkline||"treemap"===e.config.chart.type?0:e.globals.rotateXLabels?10:15),i.gridWidth=i.svgWidth-l};switch("top"===e.config.xaxis.position&&(d=i.xAxisHeight-e.config.xaxis.axisTicks.height-5),e.config.legend.position){case"bottom":i.translateY=d,h();break;case"top":i.translateY=this.lgRect.height+d,h();break;case"left":i.translateY=d,i.translateX=this.lgRect.width+l,i.gridHeight=i.svgHeight-c-12,i.gridWidth=i.svgWidth-this.lgRect.width-l;break;case"right":i.translateY=d,i.translateX=l,i.gridHeight=i.svgHeight-c-12,i.gridWidth=i.svgWidth-this.lgRect.width-l-5;break;default:throw new Error("Legend position not supported")}this.dimGrid.setGridXPosForDualYAxis(a,n),new Q(this.ctx).setYAxisXPosition(n,a)}},{key:"setDimensionsForNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=t.config,n=0;t.config.legend.show&&!t.config.legend.floating&&(n=20);var a="pie"===i.chart.type||"polarArea"===i.chart.type||"donut"===i.chart.type?"pie":"radialBar",r=i.plotOptions[a].offsetY,s=i.plotOptions[a].offsetX;if(!i.legend.show||i.legend.floating)return e.gridHeight=e.svgHeight-i.grid.padding.left+i.grid.padding.right,e.gridWidth=e.gridHeight,e.translateY=r,void(e.translateX=s+(e.svgWidth-e.gridWidth)/2);switch(i.legend.position){case"bottom":e.gridHeight=e.svgHeight-this.lgRect.height-e.goldenPadding,e.gridWidth=e.svgWidth,e.translateY=r-10,e.translateX=s+(e.svgWidth-e.gridWidth)/2;break;case"top":e.gridHeight=e.svgHeight-this.lgRect.height-e.goldenPadding,e.gridWidth=e.svgWidth,e.translateY=this.lgRect.height+r+10,e.translateX=s+(e.svgWidth-e.gridWidth)/2;break;case"left":e.gridWidth=e.svgWidth-this.lgRect.width-n,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=s+this.lgRect.width+n;break;case"right":e.gridWidth=e.svgWidth-this.lgRect.width-n-5,e.gridHeight="auto"!==i.chart.height?e.svgHeight:e.gridWidth,e.translateY=r,e.translateX=s+10;break;default:throw new Error("Legend position not supported")}}},{key:"conditionalChecksForAxisCoords",value:function(t,e,i){var n=this.w,a=n.globals.hasXaxisGroups?2:1,r=i.height+t.height+e.height,s=n.globals.isMultiLineX?1.2:n.globals.LINE_HEIGHT_RATIO,o=n.globals.rotateXLabels?22:10,l=n.globals.rotateXLabels&&"bottom"===n.config.legend.position?10:0;this.xAxisHeight=r*s+a*o+l,this.xAxisWidth=t.width,this.xAxisHeight-e.height>n.config.xaxis.labels.maxHeight&&(this.xAxisHeight=n.config.xaxis.labels.maxHeight),n.config.xaxis.labels.minHeight&&this.xAxisHeightd&&(this.yAxisWidth=d)}}]),t}(),ht=function(){function t(e){o(this,t),this.w=e.w,this.lgCtx=e}return c(t,[{key:"getLegendStyles",value:function(){var t,e,i,n=document.createElement("style");n.setAttribute("type","text/css");var a=(null===(t=this.lgCtx.ctx)||void 0===t||null===(e=t.opts)||void 0===e||null===(i=e.chart)||void 0===i?void 0:i.nonce)||this.w.config.chart.nonce;a&&n.setAttribute("nonce",a);var r=document.createTextNode("\t\n \t\n .apexcharts-legend {\t\n display: flex;\t\n overflow: auto;\t\n padding: 0 10px;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom, .apexcharts-legend.apx-legend-position-top {\t\n flex-wrap: wrap\t\n }\t\n .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\t\n flex-direction: column;\t\n bottom: 0;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-left, .apexcharts-legend.apx-legend-position-top.apexcharts-align-left, .apexcharts-legend.apx-legend-position-right, .apexcharts-legend.apx-legend-position-left {\t\n justify-content: flex-start;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-center, .apexcharts-legend.apx-legend-position-top.apexcharts-align-center {\t\n justify-content: center; \t\n }\t\n .apexcharts-legend.apx-legend-position-bottom.apexcharts-align-right, .apexcharts-legend.apx-legend-position-top.apexcharts-align-right {\t\n justify-content: flex-end;\t\n }\t\n .apexcharts-legend-series {\t\n cursor: pointer;\t\n line-height: normal;\t\n }\t\n .apexcharts-legend.apx-legend-position-bottom .apexcharts-legend-series, .apexcharts-legend.apx-legend-position-top .apexcharts-legend-series{\t\n display: flex;\t\n align-items: center;\t\n }\t\n .apexcharts-legend-text {\t\n position: relative;\t\n font-size: 14px;\t\n }\t\n .apexcharts-legend-text *, .apexcharts-legend-marker * {\t\n pointer-events: none;\t\n }\t\n .apexcharts-legend-marker {\t\n position: relative;\t\n display: inline-block;\t\n cursor: pointer;\t\n margin-right: 3px;\t\n border-style: solid;\n }\t\n \t\n .apexcharts-legend.apexcharts-align-right .apexcharts-legend-series, .apexcharts-legend.apexcharts-align-left .apexcharts-legend-series{\t\n display: inline-block;\t\n }\t\n .apexcharts-legend-series.apexcharts-no-click {\t\n cursor: auto;\t\n }\t\n .apexcharts-legend .apexcharts-hidden-zero-series, .apexcharts-legend .apexcharts-hidden-null-series {\t\n display: none !important;\t\n }\t\n .apexcharts-inactive-legend {\t\n opacity: 0.45;\t\n }");return n.appendChild(r),n}},{key:"getLegendBBox",value:function(){var t=this.w.globals.dom.baseEl.querySelector(".apexcharts-legend").getBoundingClientRect(),e=t.width;return{clwh:t.height,clww:e}}},{key:"appendToForeignObject",value:function(){this.w.globals.dom.elLegendForeign.appendChild(this.getLegendStyles())}},{key:"toggleDataSeries",value:function(t,e){var i=this,n=this.w;if(n.globals.axisCharts||"radialBar"===n.config.chart.type){n.globals.resized=!0;var a=null,r=null;n.globals.risingSeries=[],n.globals.axisCharts?(a=n.globals.dom.baseEl.querySelector(".apexcharts-series[data\\:realIndex='".concat(t,"']")),r=parseInt(a.getAttribute("data:realIndex"),10)):(a=n.globals.dom.baseEl.querySelector(".apexcharts-series[rel='".concat(t+1,"']")),r=parseInt(a.getAttribute("rel"),10)-1),e?[{cs:n.globals.collapsedSeries,csi:n.globals.collapsedSeriesIndices},{cs:n.globals.ancillaryCollapsedSeries,csi:n.globals.ancillaryCollapsedSeriesIndices}].forEach((function(t){i.riseCollapsedSeries(t.cs,t.csi,r)})):this.hideSeries({seriesEl:a,realIndex:r})}else{var s=n.globals.dom.Paper.select(" .apexcharts-series[rel='".concat(t+1,"'] path")),o=n.config.chart.type;if("pie"===o||"polarArea"===o||"donut"===o){var l=n.config.plotOptions.pie.donut.labels;new S(this.lgCtx.ctx).pathMouseDown(s.members[0],null),this.lgCtx.ctx.pie.printDataLabelsInner(s.members[0].node,l)}s.fire("click")}}},{key:"hideSeries",value:function(t){var e=t.seriesEl,i=t.realIndex,n=this.w,a=y.clone(n.config.series);if(n.globals.axisCharts){var r=!1;if(n.config.yaxis[i]&&n.config.yaxis[i].show&&n.config.yaxis[i].showAlways&&(r=!0,n.globals.ancillaryCollapsedSeriesIndices.indexOf(i)<0&&(n.globals.ancillaryCollapsedSeries.push({index:i,data:a[i].data.slice(),type:e.parentNode.className.baseVal.split("-")[1]}),n.globals.ancillaryCollapsedSeriesIndices.push(i))),!r){n.globals.collapsedSeries.push({index:i,data:a[i].data.slice(),type:e.parentNode.className.baseVal.split("-")[1]}),n.globals.collapsedSeriesIndices.push(i);var s=n.globals.risingSeries.indexOf(i);n.globals.risingSeries.splice(s,1)}}else n.globals.collapsedSeries.push({index:i,data:a[i]}),n.globals.collapsedSeriesIndices.push(i);for(var o=e.childNodes,l=0;l0){for(var r=0;r-1&&(t[n].data=[])})):t.forEach((function(i,n){e.globals.collapsedSeriesIndices.indexOf(n)>-1&&(t[n]=0)})),t}}]),t}(),ut=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w,this.onLegendClick=this.onLegendClick.bind(this),this.onLegendHovered=this.onLegendHovered.bind(this),this.isBarsDistributed="bar"===this.w.config.chart.type&&this.w.config.plotOptions.bar.distributed&&1===this.w.config.series.length,this.legendHelpers=new ht(this)}return c(t,[{key:"init",value:function(){var t=this.w,e=t.globals,i=t.config;if((i.legend.showForSingleSeries&&1===e.series.length||this.isBarsDistributed||e.series.length>1||!e.axisCharts)&&i.legend.show){for(;e.dom.elLegendWrap.firstChild;)e.dom.elLegendWrap.removeChild(e.dom.elLegendWrap.firstChild);this.drawLegends(),y.isIE11()?document.getElementsByTagName("head")[0].appendChild(this.legendHelpers.getLegendStyles()):this.legendHelpers.appendToForeignObject(),"bottom"===i.legend.position||"top"===i.legend.position?this.legendAlignHorizontal():"right"!==i.legend.position&&"left"!==i.legend.position||this.legendAlignVertical()}}},{key:"drawLegends",value:function(){var t=this,e=this.w,i=e.config.legend.fontFamily,n=e.globals.seriesNames,a=e.globals.colors.slice();if("heatmap"===e.config.chart.type){var r=e.config.plotOptions.heatmap.colorScale.ranges;n=r.map((function(t){return t.name?t.name:t.from+" - "+t.to})),a=r.map((function(t){return t.color}))}else this.isBarsDistributed&&(n=e.globals.labels.slice());e.config.legend.customLegendItems.length&&(n=e.config.legend.customLegendItems);for(var s=e.globals.legendFormatter,o=e.config.legend.inverseOrder,l=o?n.length-1:0;o?l>=0:l<=n.length-1;o?l--:l++){var c,d=s(n[l],{seriesIndex:l,w:e}),h=!1,u=!1;if(e.globals.collapsedSeries.length>0)for(var p=0;p0)for(var f=0;f0?l-10:0)+(c>0?c-10:0)}n.style.position="absolute",r=r+t+i.config.legend.offsetX,s=s+e+i.config.legend.offsetY,n.style.left=r+"px",n.style.top=s+"px","bottom"===i.config.legend.position?(n.style.top="auto",n.style.bottom=5-i.config.legend.offsetY+"px"):"right"===i.config.legend.position&&(n.style.left="auto",n.style.right=25+i.config.legend.offsetX+"px"),["width","height"].forEach((function(t){n.style[t]&&(n.style[t]=parseInt(i.config.legend[t],10)+"px")}))}},{key:"legendAlignHorizontal",value:function(){var t=this.w;t.globals.dom.elLegendWrap.style.right=0;var e=this.legendHelpers.getLegendBBox(),i=new dt(this.ctx),n=i.dimHelpers.getTitleSubtitleCoords("title"),a=i.dimHelpers.getTitleSubtitleCoords("subtitle"),r=0;"bottom"===t.config.legend.position?r=-e.clwh/1.8:"top"===t.config.legend.position&&(r=n.height+a.height+t.config.title.margin+t.config.subtitle.margin-10),this.setLegendWrapXY(20,r)}},{key:"legendAlignVertical",value:function(){var t=this.w,e=this.legendHelpers.getLegendBBox(),i=0;"left"===t.config.legend.position&&(i=20),"right"===t.config.legend.position&&(i=t.globals.svgWidth-e.clww-10),this.setLegendWrapXY(i,20)}},{key:"onLegendHovered",value:function(t){var e=this.w,i=t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker");if("heatmap"===e.config.chart.type||this.isBarsDistributed){if(i){var n=parseInt(t.target.getAttribute("rel"),10)-1;this.ctx.events.fireEvent("legendHover",[this.ctx,n,this.w]),new Y(this.ctx).highlightRangeInSeries(t,t.target)}}else!t.target.classList.contains("apexcharts-inactive-legend")&&i&&new Y(this.ctx).toggleSeriesOnHover(t,t.target)}},{key:"onLegendClick",value:function(t){var e=this.w;if(!e.config.legend.customLegendItems.length&&(t.target.classList.contains("apexcharts-legend-series")||t.target.classList.contains("apexcharts-legend-text")||t.target.classList.contains("apexcharts-legend-marker"))){var i=parseInt(t.target.getAttribute("rel"),10)-1,n="true"===t.target.getAttribute("data:collapsed"),a=this.w.config.chart.events.legendClick;"function"==typeof a&&a(this.ctx,i,this.w),this.ctx.events.fireEvent("legendClick",[this.ctx,i,this.w]);var r=this.w.config.legend.markers.onClick;"function"==typeof r&&t.target.classList.contains("apexcharts-legend-marker")&&(r(this.ctx,i,this.w),this.ctx.events.fireEvent("legendMarkerClick",[this.ctx,i,this.w])),"treemap"!==e.config.chart.type&&"heatmap"!==e.config.chart.type&&!this.isBarsDistributed&&e.config.legend.onItemClick.toggleDataSeries&&this.legendHelpers.toggleDataSeries(i,n)}}}]),t}(),pt=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w;var i=this.w;this.ev=this.w.config.chart.events,this.selectedClass="apexcharts-selected",this.localeValues=this.w.globals.locale.toolbar,this.minX=i.globals.minX,this.maxX=i.globals.maxX}return c(t,[{key:"createToolbar",value:function(){var t=this,e=this.w,i=function(){return document.createElement("div")},n=i();if(n.setAttribute("class","apexcharts-toolbar"),n.style.top=e.config.chart.toolbar.offsetY+"px",n.style.right=3-e.config.chart.toolbar.offsetX+"px",e.globals.dom.elWrap.appendChild(n),this.elZoom=i(),this.elZoomIn=i(),this.elZoomOut=i(),this.elPan=i(),this.elSelection=i(),this.elZoomReset=i(),this.elMenuIcon=i(),this.elMenu=i(),this.elCustomIcons=[],this.t=e.config.chart.toolbar.tools,Array.isArray(this.t.customIcons))for(var a=0;a\n \n \n\n'),s("zoomOut",this.elZoomOut,'\n');var o=function(i){t.t[i]&&e.config.chart[i].enabled&&r.push({el:"zoom"===i?t.elZoom:t.elSelection,icon:"string"==typeof t.t[i]?t.t[i]:"zoom"===i?'':'',title:t.localeValues["zoom"===i?"selectionZoom":"selection"],class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-".concat(i,"-icon")})};o("zoom"),o("selection"),this.t.pan&&e.config.chart.zoom.enabled&&r.push({el:this.elPan,icon:"string"==typeof this.t.pan?this.t.pan:'',title:this.localeValues.pan,class:e.globals.isTouchDevice?"apexcharts-element-hidden":"apexcharts-pan-icon"}),s("reset",this.elZoomReset,''),this.t.download&&r.push({el:this.elMenuIcon,icon:"string"==typeof this.t.download?this.t.download:'',title:this.localeValues.menu,class:"apexcharts-menu-icon"});for(var l=0;l0&&e.height>0&&this.slDraggableRect.selectize({points:"l, r",pointSize:8,pointType:"rect"}).resize({constraint:{minX:0,minY:0,maxX:t.globals.gridWidth,maxY:t.globals.gridHeight}}).on("resizing",this.selectionDragging.bind(this,"resizing"))}}},{key:"preselectedSelection",value:function(){var t=this.w,e=this.xyRatios;if(!t.globals.zoomEnabled)if(void 0!==t.globals.selection&&null!==t.globals.selection)this.drawSelectionRect(t.globals.selection);else if(void 0!==t.config.chart.selection.xaxis.min&&void 0!==t.config.chart.selection.xaxis.max){var i=(t.config.chart.selection.xaxis.min-t.globals.minX)/e.xRatio,n=t.globals.gridWidth-(t.globals.maxX-t.config.chart.selection.xaxis.max)/e.xRatio-i;t.globals.isRangeBar&&(i=(t.config.chart.selection.xaxis.min-t.globals.yAxisScale[0].niceMin)/e.invertedYRatio,n=(t.config.chart.selection.xaxis.max-t.config.chart.selection.xaxis.min)/e.invertedYRatio);var a={x:i,y:0,width:n,height:t.globals.gridHeight,translateX:0,translateY:0,selectionEnabled:!0};this.drawSelectionRect(a),this.makeSelectionRectDraggable(),"function"==typeof t.config.chart.events.selection&&t.config.chart.events.selection(this.ctx,{xaxis:{min:t.config.chart.selection.xaxis.min,max:t.config.chart.selection.xaxis.max},yaxis:{}})}}},{key:"drawSelectionRect",value:function(t){var e=t.x,i=t.y,n=t.width,a=t.height,r=t.translateX,s=void 0===r?0:r,o=t.translateY,l=void 0===o?0:o,c=this.w,d=this.zoomRect,h=this.selectionRect;if(this.dragged||null!==c.globals.selection){var u={transform:"translate("+s+", "+l+")"};c.globals.zoomEnabled&&this.dragged&&(n<0&&(n=1),d.attr({x:e,y:i,width:n,height:a,fill:c.config.chart.zoom.zoomedArea.fill.color,"fill-opacity":c.config.chart.zoom.zoomedArea.fill.opacity,stroke:c.config.chart.zoom.zoomedArea.stroke.color,"stroke-width":c.config.chart.zoom.zoomedArea.stroke.width,"stroke-opacity":c.config.chart.zoom.zoomedArea.stroke.opacity}),S.setAttrs(d.node,u)),c.globals.selectionEnabled&&(h.attr({x:e,y:i,width:n>0?n:0,height:a>0?a:0,fill:c.config.chart.selection.fill.color,"fill-opacity":c.config.chart.selection.fill.opacity,stroke:c.config.chart.selection.stroke.color,"stroke-width":c.config.chart.selection.stroke.width,"stroke-dasharray":c.config.chart.selection.stroke.dashArray,"stroke-opacity":c.config.chart.selection.stroke.opacity}),S.setAttrs(h.node,u))}}},{key:"hideSelectionRect",value:function(t){t&&t.attr({x:0,y:0,width:0,height:0})}},{key:"selectionDrawing",value:function(t){var e,i=t.context,n=t.zoomtype,a=this.w,r=i,s=this.gridRect.getBoundingClientRect(),o=r.startX-1,l=r.startY,c=!1,d=!1,h=r.clientX-s.left-o,u=r.clientY-s.top-l;return Math.abs(h+o)>a.globals.gridWidth?h=a.globals.gridWidth-o:r.clientX-s.left<0&&(h=o),o>r.clientX-s.left&&(c=!0,h=Math.abs(h)),l>r.clientY-s.top&&(d=!0,u=Math.abs(u)),e="x"===n?{x:c?o-h:o,y:0,width:h,height:a.globals.gridHeight}:"y"===n?{x:0,y:d?l-u:l,width:a.globals.gridWidth,height:u}:{x:c?o-h:o,y:d?l-u:l,width:h,height:u},r.drawSelectionRect(e),r.selectionDragging("resizing"),e}},{key:"selectionDragging",value:function(t,e){var i=this,n=this.w,a=this.xyRatios,r=this.selectionRect,s=0;"resizing"===t&&(s=30);var o=function(t){return parseFloat(r.node.getAttribute(t))},l={x:o("x"),y:o("y"),width:o("width"),height:o("height")};n.globals.selection=l,"function"==typeof n.config.chart.events.selection&&n.globals.selectionEnabled&&(clearTimeout(this.w.globals.selectionResizeTimer),this.w.globals.selectionResizeTimer=window.setTimeout((function(){var t,e,s,o,l=i.gridRect.getBoundingClientRect(),c=r.node.getBoundingClientRect();n.globals.isRangeBar?(t=n.globals.yAxisScale[0].niceMin+(c.left-l.left)*a.invertedYRatio,e=n.globals.yAxisScale[0].niceMin+(c.right-l.left)*a.invertedYRatio,s=0,o=1):(t=n.globals.xAxisScale.niceMin+(c.left-l.left)*a.xRatio,e=n.globals.xAxisScale.niceMin+(c.right-l.left)*a.xRatio,s=n.globals.yAxisScale[0].niceMin+(l.bottom-c.bottom)*a.yRatio[0],o=n.globals.yAxisScale[0].niceMax-(c.top-l.top)*a.yRatio[0]);var d={xaxis:{min:t,max:e},yaxis:{min:s,max:o}};n.config.chart.events.selection(i.ctx,d),n.config.chart.brush.enabled&&void 0!==n.config.chart.events.brushScrolled&&n.config.chart.events.brushScrolled(i.ctx,d)}),s))}},{key:"selectionDrawn",value:function(t){var e=t.context,i=t.zoomtype,n=this.w,a=e,r=this.xyRatios,s=this.ctx.toolbar;if(a.startX>a.endX){var o=a.startX;a.startX=a.endX,a.endX=o}if(a.startY>a.endY){var l=a.startY;a.startY=a.endY,a.endY=l}var c=void 0,d=void 0;n.globals.isRangeBar?(c=n.globals.yAxisScale[0].niceMin+a.startX*r.invertedYRatio,d=n.globals.yAxisScale[0].niceMin+a.endX*r.invertedYRatio):(c=n.globals.xAxisScale.niceMin+a.startX*r.xRatio,d=n.globals.xAxisScale.niceMin+a.endX*r.xRatio);var h=[],u=[];if(n.config.yaxis.forEach((function(t,e){h.push(n.globals.yAxisScale[e].niceMax-r.yRatio[e]*a.startY),u.push(n.globals.yAxisScale[e].niceMax-r.yRatio[e]*a.endY)})),a.dragged&&(a.dragX>10||a.dragY>10)&&c!==d)if(n.globals.zoomEnabled){var p=y.clone(n.globals.initialConfig.yaxis),f=y.clone(n.globals.initialConfig.xaxis);if(n.globals.zoomed=!0,n.config.xaxis.convertedCatToNumeric&&(c=Math.floor(c),d=Math.floor(d),c<1&&(c=1,d=n.globals.dataPoints),d-c<2&&(d=c+1)),"xy"!==i&&"x"!==i||(f={min:c,max:d}),"xy"!==i&&"y"!==i||p.forEach((function(t,e){p[e].min=u[e],p[e].max=h[e]})),n.config.chart.zoom.autoScaleYaxis){var g=new Z(a.ctx);p=g.autoScaleY(a.ctx,p,{xaxis:f})}if(s){var m=s.getBeforeZoomRange(f,p);m&&(f=m.xaxis?m.xaxis:f,p=m.yaxis?m.yaxis:p)}var v={xaxis:f};n.config.chart.group||(v.yaxis=p),a.ctx.updateHelpers._updateOptions(v,!1,a.w.config.chart.animations.dynamicAnimation.enabled),"function"==typeof n.config.chart.events.zoomed&&s.zoomCallback(f,p)}else if(n.globals.selectionEnabled){var b,x=null;b={min:c,max:d},"xy"!==i&&"y"!==i||(x=y.clone(n.config.yaxis)).forEach((function(t,e){x[e].min=u[e],x[e].max=h[e]})),n.globals.selection=a.selection,"function"==typeof n.config.chart.events.selection&&n.config.chart.events.selection(a.ctx,{xaxis:b,yaxis:x})}}},{key:"panDragging",value:function(t){var e=t.context,i=this.w,n=e;if(void 0!==i.globals.lastClientPosition.x){var a=i.globals.lastClientPosition.x-n.clientX,r=i.globals.lastClientPosition.y-n.clientY;Math.abs(a)>Math.abs(r)&&a>0?this.moveDirection="left":Math.abs(a)>Math.abs(r)&&a<0?this.moveDirection="right":Math.abs(r)>Math.abs(a)&&r>0?this.moveDirection="up":Math.abs(r)>Math.abs(a)&&r<0&&(this.moveDirection="down")}i.globals.lastClientPosition={x:n.clientX,y:n.clientY};var s=i.globals.isRangeBar?i.globals.minY:i.globals.minX,o=i.globals.isRangeBar?i.globals.maxY:i.globals.maxX;i.config.xaxis.convertedCatToNumeric||n.panScrolled(s,o)}},{key:"delayedPanScrolled",value:function(){var t=this.w,e=t.globals.minX,i=t.globals.maxX,n=(t.globals.maxX-t.globals.minX)/2;"left"===this.moveDirection?(e=t.globals.minX+n,i=t.globals.maxX+n):"right"===this.moveDirection&&(e=t.globals.minX-n,i=t.globals.maxX-n),e=Math.floor(e),i=Math.floor(i),this.updateScrolledChart({xaxis:{min:e,max:i}},e,i)}},{key:"panScrolled",value:function(t,e){var i=this.w,n=this.xyRatios,a=y.clone(i.globals.initialConfig.yaxis),r=n.xRatio,s=i.globals.minX,o=i.globals.maxX;i.globals.isRangeBar&&(r=n.invertedYRatio,s=i.globals.minY,o=i.globals.maxY),"left"===this.moveDirection?(t=s+i.globals.gridWidth/15*r,e=o+i.globals.gridWidth/15*r):"right"===this.moveDirection&&(t=s-i.globals.gridWidth/15*r,e=o-i.globals.gridWidth/15*r),i.globals.isRangeBar||(ti.globals.initialMaxX)&&(t=s,e=o);var l={min:t,max:e};i.config.chart.zoom.autoScaleYaxis&&(a=new Z(this.ctx).autoScaleY(this.ctx,a,{xaxis:l}));var c={xaxis:{min:t,max:e}};i.config.chart.group||(c.yaxis=a),this.updateScrolledChart(c,t,e)}},{key:"updateScrolledChart",value:function(t,e,i){var n=this.w;this.ctx.updateHelpers._updateOptions(t,!1,!1),"function"==typeof n.config.chart.events.scrolled&&n.config.chart.events.scrolled(this.ctx,{xaxis:{min:e,max:i}})}}]),i}(pt),gt=function(){function t(e){o(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx}return c(t,[{key:"getNearestValues",value:function(t){var e=t.hoverArea,i=t.elGrid,n=t.clientX,a=t.clientY,r=this.w,s=i.getBoundingClientRect(),o=s.width,l=s.height,c=o/(r.globals.dataPoints-1),d=l/r.globals.dataPoints,h=this.hasBars();!r.globals.comboCharts&&!h||r.config.xaxis.convertedCatToNumeric||(c=o/r.globals.dataPoints);var u=n-s.left-r.globals.barPadForNumericAxis,p=a-s.top;u<0||p<0||u>o||p>l?(e.classList.remove("hovering-zoom"),e.classList.remove("hovering-pan")):r.globals.zoomEnabled?(e.classList.remove("hovering-pan"),e.classList.add("hovering-zoom")):r.globals.panEnabled&&(e.classList.remove("hovering-zoom"),e.classList.add("hovering-pan"));var f=Math.round(u/c),g=Math.floor(p/d);h&&!r.config.xaxis.convertedCatToNumeric&&(f=Math.ceil(u/c),f-=1);var m=null,v=null,b=r.globals.seriesXvalues.map((function(t){return t.filter((function(t){return y.isNumber(t)}))})),x=r.globals.seriesYvalues.map((function(t){return t.filter((function(t){return y.isNumber(t)}))}));if(r.globals.isXNumeric){var w=this.ttCtx.getElGrid().getBoundingClientRect(),C=u*(w.width/o),S=p*(w.height/l);m=(v=this.closestInMultiArray(C,S,b,x)).index,f=v.j,null!==m&&(b=r.globals.seriesXvalues[m],f=(v=this.closestInArray(C,b)).index)}return r.globals.capturedSeriesIndex=null===m?-1:m,(!f||f<1)&&(f=0),r.globals.isBarHorizontal?r.globals.capturedDataPointIndex=g:r.globals.capturedDataPointIndex=f,{capturedSeries:m,j:r.globals.isBarHorizontal?g:f,hoverX:u,hoverY:p}}},{key:"closestInMultiArray",value:function(t,e,i,n){var a=this.w,r=0,s=null,o=-1;a.globals.series.length>1?r=this.getFirstActiveXArray(i):s=0;var l=i[r][0],c=Math.abs(t-l);if(i.forEach((function(e){e.forEach((function(e,i){var n=Math.abs(t-e);n<=c&&(c=n,o=i)}))})),-1!==o){var d=n[r][o],h=Math.abs(e-d);s=r,n.forEach((function(t,i){var n=Math.abs(e-t[o]);n<=h&&(h=n,s=i)}))}return{index:s,j:o}}},{key:"getFirstActiveXArray",value:function(t){for(var e=this.w,i=0,n=t.map((function(t,e){return t.length>0?e:-1})),a=0;a0)for(var n=0;n *")):this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap > *")}},{key:"getAllMarkers",value:function(){var t=this.w.globals.dom.baseEl.querySelectorAll(".apexcharts-series-markers-wrap");(t=v(t)).sort((function(t,e){var i=Number(t.getAttribute("data:realIndex")),n=Number(e.getAttribute("data:realIndex"));return ni?-1:0}));var e=[];return t.forEach((function(t){e.push(t.querySelector(".apexcharts-marker"))})),e}},{key:"hasMarkers",value:function(t){return this.getElMarkers(t).length>0}},{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(t){var e=this.w,i=e.config.markers.hover.size;return void 0===i&&(i=e.globals.markers.size[t]+e.config.markers.hover.sizeOffset),i}},{key:"toggleAllTooltipSeriesGroups",value:function(t){var e=this.w,i=this.ttCtx;0===i.allTooltipSeriesGroups.length&&(i.allTooltipSeriesGroups=e.globals.dom.baseEl.querySelectorAll(".apexcharts-tooltip-series-group"));for(var n=i.allTooltipSeriesGroups,a=0;a";h.forEach((function(i,n){t+=' ').concat(i.attrs.name,"
"),e+="".concat(i.val,"
")})),b.innerHTML=t+"",x.innerHTML=e+""};s?l.globals.seriesGoals[e][i]&&Array.isArray(l.globals.seriesGoals[e][i])?y():(b.innerHTML="",x.innerHTML=""):y()}else b.innerHTML="",x.innerHTML="";if(null!==f&&(n[e].querySelector(".apexcharts-tooltip-text-z-label").innerHTML=l.config.tooltip.z.title,n[e].querySelector(".apexcharts-tooltip-text-z-value").innerHTML=void 0!==f?f:""),s&&g[0]){if(l.config.tooltip.hideEmptySeries){var w=n[e].querySelector(".apexcharts-tooltip-marker"),C=n[e].querySelector(".apexcharts-tooltip-text");0==parseFloat(d)?(w.style.display="none",C.style.display="none"):(w.style.display="block",C.style.display="block")}null==d||l.globals.ancillaryCollapsedSeriesIndices.indexOf(e)>-1||l.globals.collapsedSeriesIndices.indexOf(e)>-1?g[0].parentNode.style.display="none":g[0].parentNode.style.display=l.config.tooltip.items.display}}},{key:"toggleActiveInactiveSeries",value:function(t){var e=this.w;if(t)this.tooltipUtil.toggleAllTooltipSeriesGroups("enable");else{this.tooltipUtil.toggleAllTooltipSeriesGroups("disable");var i=e.globals.dom.baseEl.querySelector(".apexcharts-tooltip-series-group");i&&(i.classList.add("apexcharts-active"),i.style.display=e.config.tooltip.items.display)}}},{key:"getValuesToPrint",value:function(t){var e=t.i,i=t.j,n=this.w,a=this.ctx.series.filteredSeriesX(),r="",s="",o=null,l=null,c={series:n.globals.series,seriesIndex:e,dataPointIndex:i,w:n},d=n.globals.ttZFormatter;null===i?l=n.globals.series[e]:n.globals.isXNumeric&&"treemap"!==n.config.chart.type?(r=a[e][i],0===a[e].length&&(r=a[this.tooltipUtil.getFirstActiveXArray(a)][i])):r=void 0!==n.globals.labels[i]?n.globals.labels[i]:"";var h=r;return r=n.globals.isXNumeric&&"datetime"===n.config.xaxis.type?new _(this.ctx).xLabelFormat(n.globals.ttKeyFormatter,h,h,{i:void 0,dateFormatter:new M(this.ctx).formatDate,w:this.w}):n.globals.isBarHorizontal?n.globals.yLabelFormatters[0](h,c):n.globals.xLabelFormatter(h,c),void 0!==n.config.tooltip.x.formatter&&(r=n.globals.ttKeyFormatter(h,c)),n.globals.seriesZ.length>0&&n.globals.seriesZ[e].length>0&&(o=d(n.globals.seriesZ[e][i],n)),s="function"==typeof n.config.xaxis.tooltip.formatter?n.globals.xaxisTooltipFormatter(h,c):r,{val:Array.isArray(l)?l.join(" "):l,xVal:Array.isArray(r)?r.join(" "):r,xAxisTTVal:Array.isArray(s)?s.join(" "):s,zVal:o}}},{key:"handleCustomTooltip",value:function(t){var e=t.i,i=t.j,n=t.y1,a=t.y2,r=t.w,s=this.ttCtx.getElTooltip(),o=r.config.tooltip.custom;Array.isArray(o)&&o[e]&&(o=o[e]),s.innerHTML=o({ctx:this.ctx,series:r.globals.series,seriesIndex:e,dataPointIndex:i,y1:n,y2:a,w:r})}}]),t}(),vt=function(){function t(e){o(this,t),this.ttCtx=e,this.ctx=e.ctx,this.w=e.w}return c(t,[{key:"moveXCrosshairs",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=this.ttCtx,n=this.w,a=i.getElXCrosshairs(),r=t-i.xcrosshairsWidth/2,s=n.globals.labels.slice().length;if(null!==e&&(r=n.globals.gridWidth/s*e),null===a||n.globals.isBarHorizontal||(a.setAttribute("x",r),a.setAttribute("x1",r),a.setAttribute("x2",r),a.setAttribute("y2",n.globals.gridHeight),a.classList.add("apexcharts-active")),r<0&&(r=0),r>n.globals.gridWidth&&(r=n.globals.gridWidth),i.isXAxisTooltipEnabled){var o=r;"tickWidth"!==n.config.xaxis.crosshairs.width&&"barWidth"!==n.config.xaxis.crosshairs.width||(o=r+i.xcrosshairsWidth/2),this.moveXAxisTooltip(o)}}},{key:"moveYCrosshairs",value:function(t){var e=this.ttCtx;null!==e.ycrosshairs&&S.setAttrs(e.ycrosshairs,{y1:t,y2:t}),null!==e.ycrosshairsHidden&&S.setAttrs(e.ycrosshairsHidden,{y1:t,y2:t})}},{key:"moveXAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;if(null!==i.xaxisTooltip&&0!==i.xcrosshairsWidth){i.xaxisTooltip.classList.add("apexcharts-active");var n,a=i.xaxisOffY+e.config.xaxis.tooltip.offsetY+e.globals.translateY+1+e.config.xaxis.offsetY;t-=i.xaxisTooltip.getBoundingClientRect().width/2,isNaN(t)||(t+=e.globals.translateX,n=new S(this.ctx).getTextRects(i.xaxisTooltipText.innerHTML),i.xaxisTooltipText.style.minWidth=n.width+"px",i.xaxisTooltip.style.left=t+"px",i.xaxisTooltip.style.top=a+"px")}}},{key:"moveYAxisTooltip",value:function(t){var e=this.w,i=this.ttCtx;null===i.yaxisTTEls&&(i.yaxisTTEls=e.globals.dom.baseEl.querySelectorAll(".apexcharts-yaxistooltip"));var n=parseInt(i.ycrosshairsHidden.getAttribute("y1"),10),a=e.globals.translateY+n,r=i.yaxisTTEls[t].getBoundingClientRect().height,s=e.globals.translateYAxisX[t]-2;e.config.yaxis[t].opposite&&(s-=26),a-=r/2,-1===e.globals.ignoreYAxisIndexes.indexOf(t)?(i.yaxisTTEls[t].classList.add("apexcharts-active"),i.yaxisTTEls[t].style.top=a+"px",i.yaxisTTEls[t].style.left=s+e.config.yaxis[t].tooltip.offsetX+"px"):i.yaxisTTEls[t].classList.remove("apexcharts-active")}},{key:"moveTooltip",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=this.w,a=this.ttCtx,r=a.getElTooltip(),s=a.tooltipRect,o=null!==i?parseFloat(i):1,l=parseFloat(t)+o+5,c=parseFloat(e)+o/2;if(l>n.globals.gridWidth/2&&(l=l-s.ttWidth-o-10),l>n.globals.gridWidth-s.ttWidth-10&&(l=n.globals.gridWidth-s.ttWidth),l<-20&&(l=-20),n.config.tooltip.followCursor){var d=a.getElGrid().getBoundingClientRect();(l=a.e.clientX-d.left)>n.globals.gridWidth/2&&(l-=a.tooltipRect.ttWidth),(c=a.e.clientY+n.globals.translateY-d.top)>n.globals.gridHeight/2&&(c-=a.tooltipRect.ttHeight)}else n.globals.isBarHorizontal||s.ttHeight/2+c>n.globals.gridHeight&&(c=n.globals.gridHeight-s.ttHeight+n.globals.translateY);isNaN(l)||(l+=n.globals.translateX,r.style.left=l+"px",r.style.top=c+"px")}},{key:"moveMarkers",value:function(t,e){var i=this.w,n=this.ttCtx;if(i.globals.markers.size[t]>0)for(var a=i.globals.dom.baseEl.querySelectorAll(" .apexcharts-series[data\\:realIndex='".concat(t,"'] .apexcharts-marker")),r=0;r0&&(c.setAttribute("r",o),c.setAttribute("cx",i),c.setAttribute("cy",n)),this.moveXCrosshairs(i),r.fixedTooltip||this.moveTooltip(i,n,o)}}},{key:"moveDynamicPointsOnHover",value:function(t){var e,i=this.ttCtx,n=i.w,a=0,r=0,s=n.globals.pointsArray;e=new Y(this.ctx).getActiveConfigSeriesIndex("asc",["line","area","scatter","bubble"]);var o=i.tooltipUtil.getHoverMarkerSize(e);s[e]&&(a=s[e][t][0],r=s[e][t][1]);var l=i.tooltipUtil.getAllMarkers();if(null!==l)for(var c=0;c0?(l[c]&&l[c].setAttribute("r",o),l[c]&&l[c].setAttribute("cy",h)):l[c]&&l[c].setAttribute("r",0)}}this.moveXCrosshairs(a),i.fixedTooltip||this.moveTooltip(a,r||n.globals.gridHeight,o)}},{key:"moveStickyTooltipOverBars",value:function(t,e){var i=this.w,n=this.ttCtx,a=i.globals.columnSeries?i.globals.columnSeries.length:i.globals.series.length,r=a>=2&&a%2==0?Math.floor(a/2):Math.floor(a/2)+1;i.globals.isBarHorizontal&&(r=new Y(this.ctx).getActiveConfigSeriesIndex("desc")+1);var s=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[rel='".concat(r,"'] path[j='").concat(t,"'], .apexcharts-candlestick-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-boxPlot-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"'], .apexcharts-rangebar-series .apexcharts-series[rel='").concat(r,"'] path[j='").concat(t,"']"));s||"number"!=typeof e||(s=i.globals.dom.baseEl.querySelector(".apexcharts-bar-series .apexcharts-series[data\\:realIndex='".concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-candlestick-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-boxPlot-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"'],\n .apexcharts-rangebar-series .apexcharts-series[data\\:realIndex='").concat(e,"'] path[j='").concat(t,"']")));var o=s?parseFloat(s.getAttribute("cx")):0,l=s?parseFloat(s.getAttribute("cy")):0,c=s?parseFloat(s.getAttribute("barWidth")):0,d=n.getElGrid().getBoundingClientRect(),h=s&&(s.classList.contains("apexcharts-candlestick-area")||s.classList.contains("apexcharts-boxPlot-area"));i.globals.isXNumeric?(s&&!h&&(o-=a%2!=0?c/2:0),s&&h&&i.globals.comboCharts&&(o-=c/2)):i.globals.isBarHorizontal||(o=n.xAxisTicksPositions[t-1]+n.dataPointsDividedWidth/2,isNaN(o)&&(o=n.xAxisTicksPositions[t]-n.dataPointsDividedWidth/2)),i.globals.isBarHorizontal?l-=n.tooltipRect.ttHeight:i.config.tooltip.followCursor?l=n.e.clientY-d.top-n.tooltipRect.ttHeight/2:l+n.tooltipRect.ttHeight+15>i.globals.gridHeight&&(l=i.globals.gridHeight),i.globals.isBarHorizontal||this.moveXCrosshairs(o),n.fixedTooltip||this.moveTooltip(o,l||i.globals.gridHeight)}}]),t}(),bt=function(){function t(e){o(this,t),this.w=e.w,this.ttCtx=e,this.ctx=e.ctx,this.tooltipPosition=new vt(e)}return c(t,[{key:"drawDynamicPoints",value:function(){var t=this.w,e=new S(this.ctx),i=new F(this.ctx),n=t.globals.dom.baseEl.querySelectorAll(".apexcharts-series");n=v(n),t.config.chart.stacked&&n.sort((function(t,e){return parseFloat(t.getAttribute("data:realIndex"))-parseFloat(e.getAttribute("data:realIndex"))}));for(var a=0;a2&&void 0!==arguments[2]?arguments[2]:null,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,a=this.w;"bubble"!==a.config.chart.type&&this.newPointSize(t,e);var r=e.getAttribute("cx"),s=e.getAttribute("cy");if(null!==i&&null!==n&&(r=i,s=n),this.tooltipPosition.moveXCrosshairs(r),!this.fixedTooltip){if("radar"===a.config.chart.type){var o=this.ttCtx.getElGrid().getBoundingClientRect();r=this.ttCtx.e.clientX-o.left}this.tooltipPosition.moveTooltip(r,s,a.config.markers.hover.size)}}},{key:"enlargePoints",value:function(t){for(var e=this.w,i=this,n=this.ttCtx,a=t,r=e.globals.dom.baseEl.querySelectorAll(".apexcharts-series:not(.apexcharts-series-collapsed) .apexcharts-marker"),s=e.config.markers.hover.size,o=0;o=0?t[e].setAttribute("r",i):t[e].setAttribute("r",0)}}}]),t}(),xt=function(){function t(e){o(this,t),this.w=e.w;var i=this.w;this.ttCtx=e,this.isVerticalGroupedRangeBar=!i.globals.isBarHorizontal&&"rangeBar"===i.config.chart.type&&i.config.plotOptions.bar.rangeBarGroupRows}return c(t,[{key:"getAttr",value:function(t,e){return parseFloat(t.target.getAttribute(e))}},{key:"handleHeatTreeTooltip",value:function(t){var e=t.e,i=t.opt,n=t.x,a=t.y,r=t.type,s=this.ttCtx,o=this.w;if(e.target.classList.contains("apexcharts-".concat(r,"-rect"))){var l=this.getAttr(e,"i"),c=this.getAttr(e,"j"),d=this.getAttr(e,"cx"),h=this.getAttr(e,"cy"),u=this.getAttr(e,"width"),p=this.getAttr(e,"height");if(s.tooltipLabels.drawSeriesTexts({ttItems:i.ttItems,i:l,j:c,shared:!1,e:e}),o.globals.capturedSeriesIndex=l,o.globals.capturedDataPointIndex=c,n=d+s.tooltipRect.ttWidth/2+u,a=h+s.tooltipRect.ttHeight/2-p/2,s.tooltipPosition.moveXCrosshairs(d+u/2),n>o.globals.gridWidth/2&&(n=d-s.tooltipRect.ttWidth/2+u),s.w.config.tooltip.followCursor){var f=o.globals.dom.elWrap.getBoundingClientRect();n=o.globals.clientX-f.left-(n>o.globals.gridWidth/2?s.tooltipRect.ttWidth:0),a=o.globals.clientY-f.top-(a>o.globals.gridHeight/2?s.tooltipRect.ttHeight:0)}}return{x:n,y:a}}},{key:"handleMarkerTooltip",value:function(t){var e,i,n=t.e,a=t.opt,r=t.x,s=t.y,o=this.w,l=this.ttCtx;if(n.target.classList.contains("apexcharts-marker")){var c=parseInt(a.paths.getAttribute("cx"),10),d=parseInt(a.paths.getAttribute("cy"),10),h=parseFloat(a.paths.getAttribute("val"));if(i=parseInt(a.paths.getAttribute("rel"),10),e=parseInt(a.paths.parentNode.parentNode.parentNode.getAttribute("rel"),10)-1,l.intersect){var u=y.findAncestor(a.paths,"apexcharts-series");u&&(e=parseInt(u.getAttribute("data:realIndex"),10))}if(l.tooltipLabels.drawSeriesTexts({ttItems:a.ttItems,i:e,j:i,shared:!l.showOnIntersect&&o.config.tooltip.shared,e:n}),"mouseup"===n.type&&l.markerClick(n,e,i),o.globals.capturedSeriesIndex=e,o.globals.capturedDataPointIndex=i,r=c,s=d+o.globals.translateY-1.4*l.tooltipRect.ttHeight,l.w.config.tooltip.followCursor){var p=l.getElGrid().getBoundingClientRect();s=l.e.clientY+o.globals.translateY-p.top}h<0&&(s=d),l.marker.enlargeCurrentPoint(i,a.paths,r,s)}return{x:r,y:s}}},{key:"handleBarTooltip",value:function(t){var e,i,n=t.e,a=t.opt,r=this.w,s=this.ttCtx,o=s.getElTooltip(),l=0,c=0,d=0,h=this.getBarTooltipXY({e:n,opt:a});e=h.i;var u=h.barHeight,p=h.j;r.globals.capturedSeriesIndex=e,r.globals.capturedDataPointIndex=p,r.globals.isBarHorizontal&&s.tooltipUtil.hasBars()||!r.config.tooltip.shared?(c=h.x,d=h.y,i=Array.isArray(r.config.stroke.width)?r.config.stroke.width[e]:r.config.stroke.width,l=c):r.globals.comboCharts||r.config.tooltip.shared||(l/=2),isNaN(d)&&(d=r.globals.svgHeight-s.tooltipRect.ttHeight);var f=parseInt(a.paths.parentNode.getAttribute("data:realIndex"),10),g=r.globals.isMultipleYAxis?r.config.yaxis[f]&&r.config.yaxis[f].reversed:r.config.yaxis[0].reversed;if(c+s.tooltipRect.ttWidth>r.globals.gridWidth&&!g?c-=s.tooltipRect.ttWidth:c<0&&(c=0),s.w.config.tooltip.followCursor){var m=s.getElGrid().getBoundingClientRect();d=s.e.clientY-m.top}null===s.tooltip&&(s.tooltip=r.globals.dom.baseEl.querySelector(".apexcharts-tooltip")),r.config.tooltip.shared||(r.globals.comboBarCount>0?s.tooltipPosition.moveXCrosshairs(l+i/2):s.tooltipPosition.moveXCrosshairs(l)),!s.fixedTooltip&&(!r.config.tooltip.shared||r.globals.isBarHorizontal&&s.tooltipUtil.hasBars())&&(g&&(c-=s.tooltipRect.ttWidth)<0&&(c=0),!g||r.globals.isBarHorizontal&&s.tooltipUtil.hasBars()||(d=d+u-2*(r.globals.series[e][p]<0?u:0)),d=d+r.globals.translateY-s.tooltipRect.ttHeight/2,o.style.left=c+r.globals.translateX+"px",o.style.top=d+"px")}},{key:"getBarTooltipXY",value:function(t){var e=this,i=t.e,n=t.opt,a=this.w,r=null,s=this.ttCtx,o=0,l=0,c=0,d=0,h=0,u=i.target.classList;if(u.contains("apexcharts-bar-area")||u.contains("apexcharts-candlestick-area")||u.contains("apexcharts-boxPlot-area")||u.contains("apexcharts-rangebar-area")){var p=i.target,f=p.getBoundingClientRect(),g=n.elGrid.getBoundingClientRect(),m=f.height;h=f.height;var v=f.width,b=parseInt(p.getAttribute("cx"),10),x=parseInt(p.getAttribute("cy"),10);d=parseFloat(p.getAttribute("barWidth"));var y="touchmove"===i.type?i.touches[0].clientX:i.clientX;r=parseInt(p.getAttribute("j"),10),o=parseInt(p.parentNode.getAttribute("rel"),10)-1;var w=p.getAttribute("data-range-y1"),C=p.getAttribute("data-range-y2");a.globals.comboCharts&&(o=parseInt(p.parentNode.getAttribute("data:realIndex"),10));var S=function(t){return a.globals.isXNumeric?b-v/2:e.isVerticalGroupedRangeBar?b+v/2:b-s.dataPointsDividedWidth+v/2},k=function(){return x-s.dataPointsDividedHeight+m/2-s.tooltipRect.ttHeight/2};s.tooltipLabels.drawSeriesTexts({ttItems:n.ttItems,i:o,j:r,y1:w?parseInt(w,10):null,y2:C?parseInt(C,10):null,shared:!s.showOnIntersect&&a.config.tooltip.shared,e:i}),a.config.tooltip.followCursor?a.globals.isBarHorizontal?(l=y-g.left+15,c=k()):(l=S(),c=i.clientY-g.top-s.tooltipRect.ttHeight/2-15):a.globals.isBarHorizontal?((l=b)0&&i.setAttribute("width",e.xcrosshairsWidth)}},{key:"handleYCrosshair",value:function(){var t=this.w,e=this.ttCtx;e.ycrosshairs=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs"),e.ycrosshairsHidden=t.globals.dom.baseEl.querySelector(".apexcharts-ycrosshairs-hidden")}},{key:"drawYaxisTooltipText",value:function(t,e,i){var n=this.ttCtx,a=this.w,r=a.globals.yLabelFormatters[t];if(n.yaxisTooltips[t]){var s=n.getElGrid().getBoundingClientRect(),o=(e-s.top)*i.yRatio[t],l=a.globals.maxYArr[t]-a.globals.minYArr[t],c=a.globals.minYArr[t]+(l-o);n.tooltipPosition.moveYCrosshairs(e-s.top),n.yaxisTooltipText[t].innerHTML=r(c),n.tooltipPosition.moveYAxisTooltip(t)}}}]),t}(),wt=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w;var i=this.w;this.tConfig=i.config.tooltip,this.tooltipUtil=new gt(this),this.tooltipLabels=new mt(this),this.tooltipPosition=new vt(this),this.marker=new bt(this),this.intersect=new xt(this),this.axesTooltip=new yt(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=!i.globals.isBarHorizontal&&this.tConfig.shared,this.lastHoverTime=Date.now()}return c(t,[{key:"getElTooltip",value:function(t){return t||(t=this),t.w.globals.dom.baseEl?t.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(t){var e=this.w;this.xyRatios=t,this.isXAxisTooltipEnabled=e.config.xaxis.tooltip.enabled&&e.globals.axisCharts,this.yaxisTooltips=e.config.yaxis.map((function(t,i){return!!(t.show&&t.tooltip.enabled&&e.globals.axisCharts)})),this.allTooltipSeriesGroups=[],e.globals.axisCharts||(this.showTooltipTitle=!1);var i=document.createElement("div");if(i.classList.add("apexcharts-tooltip"),e.config.tooltip.cssClass&&i.classList.add(e.config.tooltip.cssClass),i.classList.add("apexcharts-theme-".concat(this.tConfig.theme)),e.globals.dom.elWrap.appendChild(i),e.globals.axisCharts){this.axesTooltip.drawXaxisTooltip(),this.axesTooltip.drawYaxisTooltip(),this.axesTooltip.setXCrosshairWidth(),this.axesTooltip.handleYCrosshair();var n=new U(this.ctx);this.xAxisTicksPositions=n.getXAxisTicksPositions()}if(!e.globals.comboCharts&&!this.tConfig.intersect&&"rangeBar"!==e.config.chart.type||this.tConfig.shared||(this.showOnIntersect=!0),0!==e.config.markers.size&&0!==e.globals.markers.largestSize||this.marker.drawDynamicPoints(this),e.globals.collapsedSeries.length!==e.globals.series.length){this.dataPointsDividedHeight=e.globals.gridHeight/e.globals.dataPoints,this.dataPointsDividedWidth=e.globals.gridWidth/e.globals.dataPoints,this.showTooltipTitle&&(this.tooltipTitle=document.createElement("div"),this.tooltipTitle.classList.add("apexcharts-tooltip-title"),this.tooltipTitle.style.fontFamily=this.tConfig.style.fontFamily||e.config.chart.fontFamily,this.tooltipTitle.style.fontSize=this.tConfig.style.fontSize,i.appendChild(this.tooltipTitle));var a=e.globals.series.length;(e.globals.xyCharts||e.globals.comboCharts)&&this.tConfig.shared&&(a=this.showOnIntersect?1:e.globals.series.length),this.legendLabels=e.globals.dom.baseEl.querySelectorAll(".apexcharts-legend-text"),this.ttItems=this.createTTElements(a),this.addSVGEvents()}}},{key:"createTTElements",value:function(t){for(var e=this,i=this.w,n=[],a=this.getElTooltip(),r=function(r){var s=document.createElement("div");s.classList.add("apexcharts-tooltip-series-group"),s.style.order=i.config.tooltip.inverseOrder?t-r:r+1,e.tConfig.shared&&e.tConfig.enabledOnSeries&&Array.isArray(e.tConfig.enabledOnSeries)&&e.tConfig.enabledOnSeries.indexOf(r)<0&&s.classList.add("apexcharts-tooltip-series-group-hidden");var o=document.createElement("span");o.classList.add("apexcharts-tooltip-marker"),o.style.backgroundColor=i.globals.colors[r],s.appendChild(o);var l=document.createElement("div");l.classList.add("apexcharts-tooltip-text"),l.style.fontFamily=e.tConfig.style.fontFamily||i.config.chart.fontFamily,l.style.fontSize=e.tConfig.style.fontSize,["y","goals","z"].forEach((function(t){var e=document.createElement("div");e.classList.add("apexcharts-tooltip-".concat(t,"-group"));var i=document.createElement("span");i.classList.add("apexcharts-tooltip-text-".concat(t,"-label")),e.appendChild(i);var n=document.createElement("span");n.classList.add("apexcharts-tooltip-text-".concat(t,"-value")),e.appendChild(n),l.appendChild(e)})),s.appendChild(l),a.appendChild(s),n.push(s)},s=0;s0&&this.addPathsEventListeners(p,d),this.tooltipUtil.hasBars()&&!this.tConfig.shared&&this.addDatapointEventsListeners(d)}}},{key:"drawFixedTooltipRect",value:function(){var t=this.w,e=this.getElTooltip(),i=e.getBoundingClientRect(),n=i.width+10,a=i.height+10,r=this.tConfig.fixed.offsetX,s=this.tConfig.fixed.offsetY,o=this.tConfig.fixed.position.toLowerCase();return o.indexOf("right")>-1&&(r=r+t.globals.svgWidth-n+10),o.indexOf("bottom")>-1&&(s=s+t.globals.svgHeight-a-10),e.style.left=r+"px",e.style.top=s+"px",{x:r,y:s,ttWidth:n,ttHeight:a}}},{key:"addDatapointEventsListeners",value:function(t){var e=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(e,t)}},{key:"addPathsEventListeners",value:function(t,e){for(var i=this,n=function(n){var a={paths:t[n],tooltipEl:e.tooltipEl,tooltipY:e.tooltipY,tooltipX:e.tooltipX,elGrid:e.elGrid,hoverArea:e.hoverArea,ttItems:e.ttItems};["mousemove","mouseup","touchmove","mouseout","touchend"].map((function(e){return t[n].addEventListener(e,i.onSeriesHover.bind(i,a),{capture:!1,passive:!0})}))},a=0;a=100?this.seriesHover(t,e):(clearTimeout(this.seriesHoverTimeout),this.seriesHoverTimeout=setTimeout((function(){i.seriesHover(t,e)}),100-n))}},{key:"seriesHover",value:function(t,e){var i=this;this.lastHoverTime=Date.now();var n=[],a=this.w;a.config.chart.group&&(n=this.ctx.getGroupedCharts()),a.globals.axisCharts&&(a.globals.minX===-1/0&&a.globals.maxX===1/0||0===a.globals.dataPoints)||(n.length?n.forEach((function(n){var a=i.getElTooltip(n),r={paths:t.paths,tooltipEl:a,tooltipY:t.tooltipY,tooltipX:t.tooltipX,elGrid:t.elGrid,hoverArea:t.hoverArea,ttItems:n.w.globals.tooltip.ttItems};n.w.globals.minX===i.w.globals.minX&&n.w.globals.maxX===i.w.globals.maxX&&n.w.globals.tooltip.seriesHoverByContext({chartCtx:n,ttCtx:n.w.globals.tooltip,opt:r,e:e})})):this.seriesHoverByContext({chartCtx:this.ctx,ttCtx:this.w.globals.tooltip,opt:t,e:e}))}},{key:"seriesHoverByContext",value:function(t){var e=t.chartCtx,i=t.ttCtx,n=t.opt,a=t.e,r=e.w,s=this.getElTooltip();s&&(i.tooltipRect={x:0,y:0,ttWidth:s.getBoundingClientRect().width,ttHeight:s.getBoundingClientRect().height},i.e=a,!i.tooltipUtil.hasBars()||r.globals.comboCharts||i.isBarShared||this.tConfig.onDatasetHover.highlightDataSeries&&new Y(e).toggleSeriesOnHover(a,a.target.parentNode),i.fixedTooltip&&i.drawFixedTooltipRect(),r.globals.axisCharts?i.axisChartsTooltips({e:a,opt:n,tooltipRect:i.tooltipRect}):i.nonAxisChartsTooltips({e:a,opt:n,tooltipRect:i.tooltipRect}))}},{key:"axisChartsTooltips",value:function(t){var e,i,n=t.e,a=t.opt,r=this.w,s=a.elGrid.getBoundingClientRect(),o="touchmove"===n.type?n.touches[0].clientX:n.clientX,l="touchmove"===n.type?n.touches[0].clientY:n.clientY;if(this.clientY=l,this.clientX=o,r.globals.capturedSeriesIndex=-1,r.globals.capturedDataPointIndex=-1,ls.top+s.height)this.handleMouseOut(a);else{if(Array.isArray(this.tConfig.enabledOnSeries)&&!r.config.tooltip.shared){var c=parseInt(a.paths.getAttribute("index"),10);if(this.tConfig.enabledOnSeries.indexOf(c)<0)return void this.handleMouseOut(a)}var d=this.getElTooltip(),h=this.getElXCrosshairs(),u=r.globals.xyCharts||"bar"===r.config.chart.type&&!r.globals.isBarHorizontal&&this.tooltipUtil.hasBars()&&this.tConfig.shared||r.globals.comboCharts&&this.tooltipUtil.hasBars();if("mousemove"===n.type||"touchmove"===n.type||"mouseup"===n.type){if(r.globals.collapsedSeries.length+r.globals.ancillaryCollapsedSeries.length===r.globals.series.length)return;null!==h&&h.classList.add("apexcharts-active");var p=this.yaxisTooltips.filter((function(t){return!0===t}));if(null!==this.ycrosshairs&&p.length&&this.ycrosshairs.classList.add("apexcharts-active"),u&&!this.showOnIntersect)this.handleStickyTooltip(n,o,l,a);else if("heatmap"===r.config.chart.type||"treemap"===r.config.chart.type){var f=this.intersect.handleHeatTreeTooltip({e:n,opt:a,x:e,y:i,type:r.config.chart.type});e=f.x,i=f.y,d.style.left=e+"px",d.style.top=i+"px"}else this.tooltipUtil.hasBars()&&this.intersect.handleBarTooltip({e:n,opt:a}),this.tooltipUtil.hasMarkers()&&this.intersect.handleMarkerTooltip({e:n,opt:a,x:e,y:i});if(this.yaxisTooltips.length)for(var g=0;gl.width)this.handleMouseOut(n);else if(null!==o)this.handleStickyCapturedSeries(t,o,n,s);else if(this.tooltipUtil.isXoverlap(s)||a.globals.isBarHorizontal){var c=a.globals.series.findIndex((function(t,e){return!a.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,c,s,n.ttItems)}}},{key:"handleStickyCapturedSeries",value:function(t,e,i,n){var a=this.w;if(this.tConfig.shared||null!==a.globals.series[e][n]){if(void 0!==a.globals.series[e][n])this.tConfig.shared&&this.tooltipUtil.isXoverlap(n)&&this.tooltipUtil.isInitialSeriesSameLen()?this.create(t,this,e,n,i.ttItems):this.create(t,this,e,n,i.ttItems,!1);else if(this.tooltipUtil.isXoverlap(n)){var r=a.globals.series.findIndex((function(t,e){return!a.globals.collapsedSeriesIndices.includes(e)}));this.create(t,this,r,n,i.ttItems)}}else this.handleMouseOut(i)}},{key:"deactivateHoverFilter",value:function(){for(var t=this.w,e=new S(this.ctx),i=t.globals.dom.Paper.select(".apexcharts-bar-area"),n=0;n5&&void 0!==arguments[5]?arguments[5]:null,k=this.w,A=e;"mouseup"===t.type&&this.markerClick(t,i,n),null===C&&(C=this.tConfig.shared);var P=this.tooltipUtil.hasMarkers(i),E=this.tooltipUtil.getElBars();if(k.config.legend.tooltipHoverFormatter){var T=k.config.legend.tooltipHoverFormatter,O=Array.from(this.legendLabels);O.forEach((function(t){var e=t.getAttribute("data:default-text");t.innerHTML=decodeURIComponent(e)}));for(var I=0;I0?A.marker.enlargePoints(n):A.tooltipPosition.moveDynamicPointsOnHover(n);else if(this.tooltipUtil.hasBars()&&(this.barSeriesHeight=this.tooltipUtil.getBarsHeight(E),this.barSeriesHeight>0)){var j=new S(this.ctx),N=k.globals.dom.Paper.select(".apexcharts-bar-area[j='".concat(n,"']"));this.deactivateHoverFilter(),this.tooltipPosition.moveStickyTooltipOverBars(n,i);for(var H=0;H0&&n.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(p-=d*C)),w&&(p=p+u.height/2-b/2-2);var A=this.barCtx.series[a][r]<0,P=l;switch(this.barCtx.isReversed&&(P=l-h+(A?2*h:0),l-=h),m.position){case"center":f=w?A?P-h/2+y:P+h/2-y:A?P-h/2+u.height/2+y:P+h/2+u.height/2-y;break;case"bottom":f=w?A?P-h+y:P+h-y:A?P-h+u.height+b+y:P+h-u.height/2+b-y;break;case"top":f=w?A?P+y:P-y:A?P-u.height/2-y:P+u.height+y}if(this.barCtx.lastActiveBarSerieIndex===s&&v.enabled){var E=new S(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:s,j:r}),g.fontSize);e=A?P-E.height/2-y-v.offsetY+18:P+E.height+y+v.offsetY-18,i=p+v.offsetX}return n.config.chart.stacked||(f<0?f=0+b:f+u.height/3>n.globals.gridHeight&&(f=n.globals.gridHeight-b)),{bcx:c,bcy:l,dataLabelsX:p,dataLabelsY:f,totalDataLabelsX:i,totalDataLabelsY:e,totalDataLabelsAnchor:"middle"}}},{key:"calculateBarsDataLabelsPosition",value:function(t){var e=this.w,i=t.x,n=t.i,a=t.j,r=t.realIndex,s=t.groupIndex,o=t.bcy,l=t.barHeight,c=t.barWidth,d=t.textRects,h=t.dataLabelsX,u=t.strokeWidth,p=t.dataLabelsConfig,f=t.barDataLabelsConfig,g=t.barTotalDataLabelsConfig,m=t.offX,v=t.offY,b=e.globals.gridHeight/e.globals.dataPoints;c=Math.abs(c);var x,y,w=(o+=-1!==s?s*l:0)-(this.barCtx.isRangeBar?0:b)+l/2+d.height/2+v-3,C="start",k=this.barCtx.series[n][a]<0,A=i;switch(this.barCtx.isReversed&&(A=i+c-(k?2*c:0),i=e.globals.gridWidth-c),f.position){case"center":h=k?A+c/2-m:Math.max(d.width/2,A-c/2)+m;break;case"bottom":h=k?A+c-u-Math.round(d.width/2)-m:A-c+u+Math.round(d.width/2)+m;break;case"top":h=k?A-u+Math.round(d.width/2)-m:A-u-Math.round(d.width/2)+m}if(this.barCtx.lastActiveBarSerieIndex===r&&g.enabled){var P=new S(this.barCtx.ctx).getTextRects(this.getStackedTotalDataLabel({realIndex:r,j:a}),p.fontSize);k?(x=A-u+Math.round(P.width/2)-m-g.offsetX-15,C="end"):x=A-u-Math.round(P.width/2)+m+g.offsetX+15,y=w+g.offsetY}return e.config.chart.stacked||(h<0?h=h+d.width+u:h+d.width/2>e.globals.gridWidth&&(h=e.globals.gridWidth-d.width-u)),{bcx:i,bcy:o,dataLabelsX:h,dataLabelsY:w,totalDataLabelsX:x,totalDataLabelsY:y,totalDataLabelsAnchor:C}}},{key:"drawCalculatedDataLabels",value:function(t){var e=t.x,i=t.y,n=t.val,a=t.i,s=t.j,o=t.textRects,l=t.barHeight,c=t.barWidth,d=t.dataLabelsConfig,h=this.w,u="rotate(0)";"vertical"===h.config.plotOptions.bar.dataLabels.orientation&&(u="rotate(-90, ".concat(e,", ").concat(i,")"));var p=new B(this.barCtx.ctx),f=new S(this.barCtx.ctx),g=d.formatter,m=null,v=h.globals.collapsedSeriesIndices.indexOf(a)>-1;if(d.enabled&&!v){m=f.group({class:"apexcharts-data-labels",transform:u});var b="";void 0!==n&&(b=g(n,r(r({},h),{},{seriesIndex:a,dataPointIndex:s,w:h}))),!n&&h.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(b="");var x=h.globals.series[a][s]<0,y=h.config.plotOptions.bar.dataLabels.position;"vertical"===h.config.plotOptions.bar.dataLabels.orientation&&("top"===y&&(d.textAnchor=x?"end":"start"),"center"===y&&(d.textAnchor="middle"),"bottom"===y&&(d.textAnchor=x?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&cMath.abs(c)&&(b=""):o.height/1.6>Math.abs(l)&&(b=""));var w=r({},d);this.barCtx.isHorizontal&&n<0&&("start"===d.textAnchor?w.textAnchor="end":"end"===d.textAnchor&&(w.textAnchor="start")),p.plotDataLabelsText({x:e,y:i,text:b,i:a,j:s,parent:m,dataLabelsConfig:w,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return m}},{key:"drawTotalDataLabels",value:function(t){var e,i=t.x,n=t.y,a=t.val,r=t.barWidth,s=t.barHeight,o=t.realIndex,l=t.textAnchor,c=t.barTotalDataLabelsConfig,d=this.w,h=new S(this.barCtx.ctx);return c.enabled&&void 0!==i&&void 0!==n&&this.barCtx.lastActiveBarSerieIndex===o&&(e=h.drawText({x:i-(!d.globals.isBarHorizontal&&d.globals.seriesGroups.length?r/d.globals.seriesGroups.length:0),y:n-(d.globals.isBarHorizontal&&d.globals.seriesGroups.length?s/d.globals.seriesGroups.length:0),foreColor:c.style.color,text:a,textAnchor:l,fontFamily:c.style.fontFamily,fontSize:c.style.fontSize,fontWeight:c.style.fontWeight})),e}}]),t}(),St=function(){function t(e){o(this,t),this.w=e.w,this.barCtx=e}return c(t,[{key:"initVariables",value:function(t){var e=this.w;this.barCtx.series=t,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+=t[i].length),e.globals.isXNumeric)for(var n=0;ne.globals.minX&&e.globals.seriesX[i][n]0&&(n=l.globals.minXDiff/h),(r=n/d*parseInt(this.barCtx.barOptions.columnWidth,10)/100)<1&&(r=1)}-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(r=parseInt(this.barCtx.barOptions.columnWidth,10)),s=l.globals.gridHeight-this.barCtx.baseLineY[this.barCtx.yaxisIndex]-(this.barCtx.isReversed?l.globals.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.yaxisIndex]:0),t=l.globals.padHorizontal+(n-r*this.barCtx.seriesLen)/2}return l.globals.barHeight=a,l.globals.barWidth=r,{x:t,y:e,yDivision:i,xDivision:n,barHeight:a,barWidth:r,zeroH:s,zeroW:o}}},{key:"initializeStackedPrevVars",value:function(t){var e=t.w;e.globals.hasSeriesGroups?e.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]})):(t.prevY=[],t.prevX=[],t.prevYF=[],t.prevXF=[],t.prevYVal=[],t.prevXVal=[])}},{key:"initializeStackedXYVars",value:function(t){var e=t.w;e.globals.hasSeriesGroups?e.globals.seriesGroups.forEach((function(e){t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]})):(t.xArrj=[],t.xArrjF=[],t.xArrjVal=[],t.yArrj=[],t.yArrjF=[],t.yArrjVal=[])}},{key:"getPathFillColor",value:function(t,e,i,n){var a,r,s,o,l=this.w,c=new X(this.barCtx.ctx),d=null,h=this.barCtx.barOptions.distributed?i:e;return this.barCtx.barOptions.colors.ranges.length>0&&this.barCtx.barOptions.colors.ranges.map((function(n){t[e][i]>=n.from&&t[e][i]<=n.to&&(d=n.color)})),l.config.series[e].data[i]&&l.config.series[e].data[i].fillColor&&(d=l.config.series[e].data[i].fillColor),c.fillPath({seriesNumber:this.barCtx.barOptions.distributed?h:n,dataPointIndex:i,color:d,value:t[e][i],fillConfig:null===(a=l.config.series[e].data[i])||void 0===a?void 0:a.fill,fillType:null!==(r=l.config.series[e].data[i])&&void 0!==r&&null!==(s=r.fill)&&void 0!==s&&s.type?null===(o=l.config.series[e].data[i])||void 0===o?void 0:o.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[e]:l.config.fill.type})}},{key:"getStrokeWidth",value:function(t,e,i){var n=0,a=this.w;return this.barCtx.series[t][e]?this.barCtx.isNullValue=!1:this.barCtx.isNullValue=!0,a.config.stroke.show&&(this.barCtx.isNullValue||(n=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[i]:this.barCtx.strokeWidth)),n}},{key:"shouldApplyRadius",value:function(t){var e=this.w,i=!1;return e.config.plotOptions.bar.borderRadius>0&&(e.config.chart.stacked&&"last"===e.config.plotOptions.bar.borderRadiusWhenStacked?this.barCtx.lastActiveBarSerieIndex===t&&(i=!0):i=!0),i}},{key:"barBackground",value:function(t){var e=t.j,i=t.i,n=t.x1,a=t.x2,r=t.y1,s=t.y2,o=t.elSeries,l=this.w,c=new S(this.barCtx.ctx),d=new Y(this.barCtx.ctx).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&d===i){e>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(e%=this.barCtx.barOptions.colors.backgroundBarColors.length);var h=this.barCtx.barOptions.colors.backgroundBarColors[e],u=c.drawRect(void 0!==n?n:0,void 0!==r?r:0,void 0!==a?a:l.globals.gridWidth,void 0!==s?s:l.globals.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,h,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(u),u.node.classList.add("apexcharts-backgroundBar")}}},{key:"getColumnPaths",value:function(t){var e,i=t.barWidth,n=t.barXPosition,a=t.y1,r=t.y2,s=t.strokeWidth,o=t.seriesGroup,l=t.realIndex,c=t.i,d=t.j,h=t.w,u=new S(this.barCtx.ctx);(s=Array.isArray(s)?s[l]:s)||(s=0);var p=i,f=n;null!==(e=h.config.series[l].data[d])&&void 0!==e&&e.columnWidthOffset&&(f=n-h.config.series[l].data[d].columnWidthOffset/2,p=i+h.config.series[l].data[d].columnWidthOffset);var g=f,m=f+p;a+=.001,r+=.001;var v=u.move(g,a),b=u.move(g,a),x=u.line(m-s,a);if(h.globals.previousPaths.length>0&&(b=this.barCtx.getPreviousPath(l,d,!1)),v=v+u.line(g,r)+u.line(m-s,r)+u.line(m-s,a)+("around"===h.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),b=b+u.line(g,a)+x+x+x+x+x+u.line(g,a)+("around"===h.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),this.shouldApplyRadius(l)&&(v=u.roundPathCorners(v,h.config.plotOptions.bar.borderRadius)),h.config.chart.stacked){var y=this.barCtx;h.globals.hasSeriesGroups&&o&&(y=this.barCtx[o]),y.yArrj.push(r),y.yArrjF.push(Math.abs(a-r)),y.yArrjVal.push(this.barCtx.series[c][d])}return{pathTo:v,pathFrom:b}}},{key:"getBarpaths",value:function(t){var e,i=t.barYPosition,n=t.barHeight,a=t.x1,r=t.x2,s=t.strokeWidth,o=t.seriesGroup,l=t.realIndex,c=t.i,d=t.j,h=t.w,u=new S(this.barCtx.ctx);(s=Array.isArray(s)?s[l]:s)||(s=0);var p=i,f=n;null!==(e=h.config.series[l].data[d])&&void 0!==e&&e.barHeightOffset&&(p=i-h.config.series[l].data[d].barHeightOffset/2,f=n+h.config.series[l].data[d].barHeightOffset);var g=p,m=p+f;a+=.001,r+=.001;var v=u.move(a,g),b=u.move(a,g);h.globals.previousPaths.length>0&&(b=this.barCtx.getPreviousPath(l,d,!1));var x=u.line(a,m-s);if(v=v+u.line(r,g)+u.line(r,m-s)+x+("around"===h.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),b=b+u.line(a,g)+x+x+x+x+x+u.line(a,g)+("around"===h.config.plotOptions.bar.borderRadiusApplication?" Z":" z"),this.shouldApplyRadius(l)&&(v=u.roundPathCorners(v,h.config.plotOptions.bar.borderRadius)),h.config.chart.stacked){var y=this.barCtx;h.globals.hasSeriesGroups&&o&&(y=this.barCtx[o]),y.xArrj.push(r),y.xArrjF.push(Math.abs(a-r)),y.xArrjVal.push(this.barCtx.series[c][d])}return{pathTo:v,pathFrom:b}}},{key:"checkZeroSeries",value:function(t){for(var e=t.series,i=this.w,n=0;n2&&void 0!==arguments[2]&&!arguments[2]?null:e;return null!=t&&(i=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),i}},{key:"getYForValue",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]&&!arguments[2]?null:e;return null!=t&&(i=e-t/this.barCtx.yRatio[this.barCtx.yaxisIndex]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[this.barCtx.yaxisIndex]:0)),i}},{key:"getGoalValues",value:function(t,e,i,n,a){var s=this,o=this.w,l=[],c=function(n,a){var r;l.push((d(r={},t,"x"===t?s.getXForValue(n,e,!1):s.getYForValue(n,i,!1)),d(r,"attrs",a),r))};if(o.globals.seriesGoals[n]&&o.globals.seriesGoals[n][a]&&Array.isArray(o.globals.seriesGoals[n][a])&&o.globals.seriesGoals[n][a].forEach((function(t){c(t.value,t)})),this.barCtx.barOptions.isDumbbell&&o.globals.seriesRange.length){var h=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:o.globals.colors,u={strokeHeight:"x"===t?0:o.globals.markers.size[n],strokeWidth:"x"===t?o.globals.markers.size[n]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(h[n])?h[n][0]:h[n]};c(o.globals.seriesRangeStart[n][a],u),c(o.globals.seriesRangeEnd[n][a],r(r({},u),{},{strokeColor:Array.isArray(h[n])?h[n][1]:h[n]}))}return l}},{key:"drawGoalLine",value:function(t){var e=t.barXPosition,i=t.barYPosition,n=t.goalX,a=t.goalY,r=t.barWidth,s=t.barHeight,o=new S(this.barCtx.ctx),l=o.group({className:"apexcharts-bar-goals-groups"});l.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:l.node}),l.attr("clip-path","url(#gridRectMarkerMask".concat(this.barCtx.w.globals.cuid,")"));var c=null;return this.barCtx.isHorizontal?Array.isArray(n)&&n.forEach((function(t){var e=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:s/2,n=i+e+s/2;c=o.drawLine(t.x,n-2*e,t.x,n,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),l.add(c)})):Array.isArray(a)&&a.forEach((function(t){var i=void 0!==t.attrs.strokeWidth?t.attrs.strokeWidth:r/2,n=e+i+r/2;c=o.drawLine(n-2*i,t.y,n,t.y,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeHeight?t.attrs.strokeHeight:2,t.attrs.strokeLineCap),l.add(c)})),l}},{key:"drawBarShadow",value:function(t){var e=t.prevPaths,i=t.currPaths,n=t.color,a=this.w,r=e.x,s=e.x1,o=e.barYPosition,l=i.x,c=i.x1,d=i.barYPosition,h=o+i.barHeight,u=new S(this.barCtx.ctx),p=new y,f=u.move(s,h)+u.line(r,h)+u.line(l,d)+u.line(c,d)+u.line(s,h)+("around"===a.config.plotOptions.bar.borderRadiusApplication?" Z":" z");return u.drawPath({d:f,fill:p.shadeColor(.5,y.rgb2hex(n)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadows"})}},{key:"getZeroValueEncounters",value:function(t){var e=t.i,i=t.j,n=this.w,a=0,r=0;return n.globals.seriesPercent.forEach((function(t,n){t[i]&&a++,nthis.barOptions.dataLabels.maxItems&&console.warn("WARNING: DataLabels are enabled but there are too many to display. This may cause performance issue when rendering - ApexCharts");for(var o=0,l=0;o0&&(this.visibleI=this.visibleI+1);var x=0,w=0;this.yRatio.length>1&&(this.yaxisIndex=v),this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed;var C=this.barHelpers.initialPositions();f=C.y,x=C.barHeight,d=C.yDivision,u=C.zeroW,p=C.x,w=C.barWidth,c=C.xDivision,h=C.zeroH,this.horizontal||m.push(p+w/2);var A=n.group({class:"apexcharts-datalabels","data:realIndex":v});i.globals.delayedElements.push({el:A.node}),A.node.classList.add("apexcharts-element-hidden");var P=n.group({class:"apexcharts-bar-goals-markers"}),E=n.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:E.node}),E.node.classList.add("apexcharts-element-hidden");for(var T=0;T0){var _=this.barHelpers.drawBarShadow({color:"string"==typeof M&&-1===(null==M?void 0:M.indexOf("url"))?M:y.hexToRgba(i.globals.colors[o]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:I});_&&E.add(_)}this.pathArr.push(I);var D=this.barHelpers.drawGoalLine({barXPosition:I.barXPosition,barYPosition:I.barYPosition,goalX:I.goalX,goalY:I.goalY,barHeight:x,barWidth:w});D&&P.add(D),f=I.y,p=I.x,T>0&&m.push(p+w/2),g.push(f),this.renderSeries({realIndex:v,pathFill:M,j:T,i:o,pathFrom:I.pathFrom,pathTo:I.pathTo,strokeWidth:O,elSeries:b,x:p,y:f,series:t,barHeight:I.barHeight?I.barHeight:x,barWidth:I.barWidth?I.barWidth:w,elDataLabelsWrap:A,elGoalsMarkers:P,elBarShadows:E,visibleSeries:this.visibleI,type:"bar"})}i.globals.seriesXvalues[v]=m,i.globals.seriesYvalues[v]=g,s.add(b)}return s}},{key:"renderSeries",value:function(t){var e=t.realIndex,i=t.pathFill,n=t.lineFill,a=t.j,r=t.i,s=t.groupIndex,o=t.pathFrom,l=t.pathTo,c=t.strokeWidth,d=t.elSeries,h=t.x,u=t.y,p=t.y1,f=t.y2,g=t.series,m=t.barHeight,v=t.barWidth,b=t.barXPosition,x=t.barYPosition,y=t.elDataLabelsWrap,w=t.elGoalsMarkers,k=t.elBarShadows,A=t.visibleSeries,P=t.type,E=this.w,T=new S(this.ctx);n||(n=this.barOptions.distributed?E.globals.stroke.colors[a]:E.globals.stroke.colors[e]),E.config.series[r].data[a]&&E.config.series[r].data[a].strokeColor&&(n=E.config.series[r].data[a].strokeColor),this.isNullValue&&(i="none");var O=a/E.config.chart.animations.animateGradually.delay*(E.config.chart.animations.speed/E.globals.dataPoints)/2.4,I=T.renderPaths({i:r,j:a,realIndex:e,pathFrom:o,pathTo:l,stroke:n,strokeWidth:c,strokeLineCap:E.config.stroke.lineCap,fill:i,animationDelay:O,initialSpeed:E.config.chart.animations.speed,dataChangeSpeed:E.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(P,"-area")});I.attr("clip-path","url(#gridRectMask".concat(E.globals.cuid,")"));var L=E.config.forecastDataPoints;L.count>0&&a>=E.globals.dataPoints-L.count&&(I.node.setAttribute("stroke-dasharray",L.dashArray),I.node.setAttribute("stroke-width",L.strokeWidth),I.node.setAttribute("fill-opacity",L.fillOpacity)),void 0!==p&&void 0!==f&&(I.attr("data-range-y1",p),I.attr("data-range-y2",f)),new C(this.ctx).setSelectionFilter(I,e,a),d.add(I);var M=new Ct(this).handleBarDataLabels({x:h,y:u,y1:p,y2:f,i:r,j:a,series:g,realIndex:e,groupIndex:s,barHeight:m,barWidth:v,barXPosition:b,barYPosition:x,renderedPath:I,visibleSeries:A});return null!==M.dataLabels&&y.add(M.dataLabels),M.totalDataLabels&&y.add(M.totalDataLabels),d.add(y),w&&d.add(w),k&&d.add(k),d}},{key:"drawBarPaths",value:function(t){var e,i=t.indexes,n=t.barHeight,a=t.strokeWidth,r=t.zeroW,s=t.x,o=t.y,l=t.yDivision,c=t.elSeries,d=this.w,h=i.i,u=i.j;if(d.globals.isXNumeric)e=(o=(d.globals.seriesX[h][u]-d.globals.minX)/this.invertedXRatio-n)+n*this.visibleI;else if(d.config.plotOptions.bar.hideZeroBarsWhenGrouped){var p=0,f=0;d.globals.seriesPercent.forEach((function(t,e){t[u]&&p++,e0&&(n=this.seriesLen*n/p),e=o+n*this.visibleI,e-=n*f}else e=o+n*this.visibleI;this.isFunnel&&(r-=(this.barHelpers.getXForValue(this.series[h][u],r)-r)/2),s=this.barHelpers.getXForValue(this.series[h][u],r);var g=this.barHelpers.getBarpaths({barYPosition:e,barHeight:n,x1:r,x2:s,strokeWidth:a,series:this.series,realIndex:i.realIndex,i:h,j:u,w:d});return d.globals.isXNumeric||(o+=l),this.barHelpers.barBackground({j:u,i:h,y1:e-n*this.visibleI,y2:n*this.seriesLen,elSeries:c}),{pathTo:g.pathTo,pathFrom:g.pathFrom,x1:r,x:s,y:o,goalX:this.barHelpers.getGoalValues("x",r,null,h,u),barYPosition:e,barHeight:n}}},{key:"drawColumnPaths",value:function(t){var e,i=t.indexes,n=t.x,a=t.y,r=t.xDivision,s=t.barWidth,o=t.zeroH,l=t.strokeWidth,c=t.elSeries,d=this.w,h=i.realIndex,u=i.i,p=i.j,f=i.bc;if(d.globals.isXNumeric){var g=this.getBarXForNumericXAxis({x:n,j:p,realIndex:h,barWidth:s});n=g.x,e=g.barXPosition}else if(d.config.plotOptions.bar.hideZeroBarsWhenGrouped){var m=this.barHelpers.getZeroValueEncounters({i:u,j:p}),v=m.nonZeroColumns,b=m.zeroEncounters;v>0&&(s=this.seriesLen*s/v),e=n+s*this.visibleI,e-=s*b}else e=n+s*this.visibleI;a=this.barHelpers.getYForValue(this.series[u][p],o);var x=this.barHelpers.getColumnPaths({barXPosition:e,barWidth:s,y1:o,y2:a,strokeWidth:l,series:this.series,realIndex:i.realIndex,i:u,j:p,w:d});return d.globals.isXNumeric||(n+=r),this.barHelpers.barBackground({bc:f,j:p,i:u,x1:e-l/2-s*this.visibleI,x2:s*this.seriesLen+l/2,elSeries:c}),{pathTo:x.pathTo,pathFrom:x.pathFrom,x:n,y:a,goalY:this.barHelpers.getGoalValues("y",null,o,u,p),barXPosition:e,barWidth:s}}},{key:"getBarXForNumericXAxis",value:function(t){var e=t.x,i=t.barWidth,n=t.realIndex,a=t.j,r=this.w,s=n;return r.globals.seriesX[n].length||(s=r.globals.maxValsInArrayIndex),r.globals.seriesX[s][a]&&(e=(r.globals.seriesX[s][a]-r.globals.minX)/this.xRatio-i*this.seriesLen/2),{barXPosition:e+i*this.visibleI,x:e}}},{key:"getPreviousPath",value:function(t,e){for(var i,n=this.w,a=0;a0&&parseInt(r.realIndex,10)===parseInt(t,10)&&void 0!==n.globals.previousPaths[a].paths[e]&&(i=n.globals.previousPaths[a].paths[e].d)}return i}}]),t}(),At=function(t){h(i,t);var e=g(i);function i(){return o(this,i),e.apply(this,arguments)}return c(i,[{key:"draw",value:function(t,e){var i=this,n=this.w;this.graphics=new S(this.ctx),this.bar=new kt(this.ctx,this.xyRatios);var a=new k(this.ctx,n);t=a.getLogSeries(t),this.yRatio=a.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===n.config.chart.stackType&&(t=n.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);for(var s=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"}),o=0,l=0,c=function(a,c){var d=void 0,h=void 0,u=void 0,p=void 0,f=-1;i.groupCtx=i,n.globals.seriesGroups.forEach((function(t,e){t.indexOf(n.config.series[a].name)>-1&&(f=e)})),-1!==f&&(i.groupCtx=i[n.globals.seriesGroups[f]]);var g=[],m=[],v=n.globals.comboCharts?e[a]:a;i.yRatio.length>1&&(i.yaxisIndex=v),i.isReversed=n.config.yaxis[i.yaxisIndex]&&n.config.yaxis[i.yaxisIndex].reversed;var b=i.graphics.group({class:"apexcharts-series",seriesName:y.escapeString(n.globals.seriesNames[v]),rel:a+1,"data:realIndex":v});i.ctx.series.addCollapsedClassToSeries(b,v);var x=i.graphics.group({class:"apexcharts-datalabels","data:realIndex":v}),w=i.graphics.group({class:"apexcharts-bar-goals-markers"}),C=0,S=0,k=i.initialPositions(o,l,d,h,u,p);l=k.y,C=k.barHeight,h=k.yDivision,p=k.zeroW,o=k.x,S=k.barWidth,d=k.xDivision,u=k.zeroH,n.globals.barHeight=C,n.globals.barWidth=S,i.barHelpers.initializeStackedXYVars(i),1===i.groupCtx.prevY.length&&i.groupCtx.prevY[0].every((function(t){return isNaN(t)}))&&(i.groupCtx.prevY[0]=i.groupCtx.prevY[0].map((function(t){return u})),i.groupCtx.prevYF[0]=i.groupCtx.prevYF[0].map((function(t){return 0})));for(var A=0;A1?(i=d.globals.minXDiff/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:c*parseInt(d.config.plotOptions.bar.columnWidth,10)/100,-1===String(d.config.plotOptions.bar.columnWidth).indexOf("%")&&(c=parseInt(d.config.plotOptions.bar.columnWidth,10)),a=d.globals.gridHeight-this.baseLineY[this.yaxisIndex]-(this.isReversed?d.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),t=d.globals.padHorizontal+(i-c)/2),{x:t,y:e,yDivision:n,xDivision:i,barHeight:null!==(s=d.globals.seriesGroups)&&void 0!==s&&s.length?l/d.globals.seriesGroups.length:l,barWidth:null!==(o=d.globals.seriesGroups)&&void 0!==o&&o.length?c/d.globals.seriesGroups.length:c,zeroH:a,zeroW:r}}},{key:"drawStackedBarPaths",value:function(t){for(var e,i=t.indexes,n=t.barHeight,a=t.strokeWidth,r=t.zeroW,s=t.x,o=t.y,l=t.groupIndex,c=t.seriesGroup,d=t.yDivision,h=t.elSeries,u=this.w,p=o+(-1!==l?l*n:0),f=i.i,g=i.j,m=0,v=0;v0){var x=r;this.groupCtx.prevXVal[b-1][g]<0?x=this.series[f][g]>=0?this.groupCtx.prevX[b-1][g]+m-2*(this.isReversed?m:0):this.groupCtx.prevX[b-1][g]:this.groupCtx.prevXVal[b-1][g]>=0&&(x=this.series[f][g]>=0?this.groupCtx.prevX[b-1][g]:this.groupCtx.prevX[b-1][g]-m+2*(this.isReversed?m:0)),e=x}else e=r;s=null===this.series[f][g]?e:e+this.series[f][g]/this.invertedYRatio-2*(this.isReversed?this.series[f][g]/this.invertedYRatio:0);var y=this.barHelpers.getBarpaths({barYPosition:p,barHeight:n,x1:e,x2:s,strokeWidth:a,series:this.series,realIndex:i.realIndex,seriesGroup:c,i:f,j:g,w:u});return this.barHelpers.barBackground({j:g,i:f,y1:p,y2:n,elSeries:h}),o+=d,{pathTo:y.pathTo,pathFrom:y.pathFrom,goalX:this.barHelpers.getGoalValues("x",r,null,f,g),barYPosition:p,x:s,y:o}}},{key:"drawStackedColumnPaths",value:function(t){var e=t.indexes,i=t.x,n=t.y,a=t.xDivision,r=t.barWidth,s=t.zeroH,o=t.groupIndex,l=t.seriesGroup,c=t.elSeries,d=this.w,h=e.i,u=e.j,p=e.bc;if(d.globals.isXNumeric){var f=d.globals.seriesX[h][u];f||(f=0),i=(f-d.globals.minX)/this.xRatio-r/2,d.globals.seriesGroups.length&&(i=(f-d.globals.minX)/this.xRatio-r/2*d.globals.seriesGroups.length)}for(var g,m=i+(-1!==o?o*r:0),v=0,b=0;b0&&!d.globals.isXNumeric||x>0&&d.globals.isXNumeric&&d.globals.seriesX[h-1][u]===d.globals.seriesX[h][u]){var y,w,C,S=Math.min(this.yRatio.length+1,h+1);if(void 0!==this.groupCtx.prevY[x-1]&&this.groupCtx.prevY[x-1].length)for(var k=1;k=0?C-v+2*(this.isReversed?v:0):C;break}if((null===(T=this.groupCtx.prevYVal[x-P])||void 0===T?void 0:T[u])>=0){w=this.series[h][u]>=0?C:C+v-2*(this.isReversed?v:0);break}}void 0===w&&(w=d.globals.gridHeight),g=null!==(y=this.groupCtx.prevYF[0])&&void 0!==y&&y.every((function(t){return 0===t}))&&this.groupCtx.prevYF.slice(1,x).every((function(t){return t.every((function(t){return isNaN(t)}))}))?s:w}else g=s;n=this.series[h][u]?g-this.series[h][u]/this.yRatio[this.yaxisIndex]+2*(this.isReversed?this.series[h][u]/this.yRatio[this.yaxisIndex]:0):g;var O=this.barHelpers.getColumnPaths({barXPosition:m,barWidth:r,y1:g,y2:n,yRatio:this.yRatio[this.yaxisIndex],strokeWidth:this.strokeWidth,series:this.series,seriesGroup:l,realIndex:e.realIndex,i:h,j:u,w:d});return this.barHelpers.barBackground({bc:p,j:u,i:h,x1:m,x2:r,elSeries:c}),i+=a,{pathTo:O.pathTo,pathFrom:O.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,s,h,u),barXPosition:m,x:d.globals.isXNumeric?i-a:i,y:n}}}]),i}(kt),Pt=function(t){h(i,t);var e=g(i);function i(){return o(this,i),e.apply(this,arguments)}return c(i,[{key:"draw",value:function(t,e,i){var n=this,a=this.w,s=new S(this.ctx),o=a.globals.comboCharts?e:a.config.chart.type,l=new X(this.ctx);this.candlestickOptions=this.w.config.plotOptions.candlestick,this.boxOptions=this.w.config.plotOptions.boxPlot,this.isHorizontal=a.config.plotOptions.bar.horizontal;var c=new k(this.ctx,a);t=c.getLogSeries(t),this.series=t,this.yRatio=c.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);for(var d=s.group({class:"apexcharts-".concat(o,"-series apexcharts-plot-series")}),h=function(e){n.isBoxPlot="boxPlot"===a.config.chart.type||"boxPlot"===a.config.series[e].type;var o,c,h,u,p,f,g=void 0,m=void 0,v=[],b=[],x=a.globals.comboCharts?i[e]:e,w=s.group({class:"apexcharts-series",seriesName:y.escapeString(a.globals.seriesNames[x]),rel:e+1,"data:realIndex":x});n.ctx.series.addCollapsedClassToSeries(w,x),t[e].length>0&&(n.visibleI=n.visibleI+1),n.yRatio.length>1&&(n.yaxisIndex=x);var C=n.barHelpers.initialPositions();m=C.y,p=C.barHeight,c=C.yDivision,u=C.zeroW,g=C.x,f=C.barWidth,o=C.xDivision,h=C.zeroH,b.push(g+f/2);for(var S=s.group({class:"apexcharts-datalabels","data:realIndex":x}),k=function(i){var s=n.barHelpers.getStrokeWidth(e,i,x),d=null,y={indexes:{i:e,j:i,realIndex:x},x:g,y:m,strokeWidth:s,elSeries:w};d=n.isHorizontal?n.drawHorizontalBoxPaths(r(r({},y),{},{yDivision:c,barHeight:p,zeroW:u})):n.drawVerticalBoxPaths(r(r({},y),{},{xDivision:o,barWidth:f,zeroH:h})),m=d.y,g=d.x,i>0&&b.push(g+f/2),v.push(m),d.pathTo.forEach((function(r,o){var c=!n.isBoxPlot&&n.candlestickOptions.wick.useFillColor?d.color[o]:a.globals.stroke.colors[e],h=l.fillPath({seriesNumber:x,dataPointIndex:i,color:d.color[o],value:t[e][i]});n.renderSeries({realIndex:x,pathFill:h,lineFill:c,j:i,i:e,pathFrom:d.pathFrom,pathTo:r,strokeWidth:s,elSeries:w,x:g,y:m,series:t,barHeight:p,barWidth:f,elDataLabelsWrap:S,visibleSeries:n.visibleI,type:a.config.chart.type})}))},A=0;Av.c&&(h=!1);var y=Math.min(v.o,v.c),w=Math.max(v.o,v.c),C=v.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[m][d]-o.globals.minX)/this.xRatio-a/2);var k=i+a*this.visibleI;void 0===this.series[c][d]||null===this.series[c][d]?(y=r,w=r):(y=r-y/g,w=r-w/g,b=r-v.h/g,x=r-v.l/g,C=r-v.m/g);var A=l.move(k,r),P=l.move(k+a/2,y);return o.globals.previousPaths.length>0&&(P=this.getPreviousPath(m,d,!0)),A=this.isBoxPlot?[l.move(k,y)+l.line(k+a/2,y)+l.line(k+a/2,b)+l.line(k+a/4,b)+l.line(k+a-a/4,b)+l.line(k+a/2,b)+l.line(k+a/2,y)+l.line(k+a,y)+l.line(k+a,C)+l.line(k,C)+l.line(k,y+s/2),l.move(k,C)+l.line(k+a,C)+l.line(k+a,w)+l.line(k+a/2,w)+l.line(k+a/2,x)+l.line(k+a-a/4,x)+l.line(k+a/4,x)+l.line(k+a/2,x)+l.line(k+a/2,w)+l.line(k,w)+l.line(k,C)+"z"]:[l.move(k,w)+l.line(k+a/2,w)+l.line(k+a/2,b)+l.line(k+a/2,w)+l.line(k+a,w)+l.line(k+a,y)+l.line(k+a/2,y)+l.line(k+a/2,x)+l.line(k+a/2,y)+l.line(k,y)+l.line(k,w-s/2)],P+=l.move(k,y),o.globals.isXNumeric||(i+=n),{pathTo:A,pathFrom:P,x:i,y:w,barXPosition:k,color:this.isBoxPlot?f:h?[u]:[p]}}},{key:"drawHorizontalBoxPaths",value:function(t){var e=t.indexes;t.x;var i=t.y,n=t.yDivision,a=t.barHeight,r=t.zeroW,s=t.strokeWidth,o=this.w,l=new S(this.ctx),c=e.i,d=e.j,h=this.boxOptions.colors.lower;this.isBoxPlot&&(h=[this.boxOptions.colors.lower,this.boxOptions.colors.upper]);var u=this.invertedYRatio,p=e.realIndex,f=this.getOHLCValue(p,d),g=r,m=r,v=Math.min(f.o,f.c),b=Math.max(f.o,f.c),x=f.m;o.globals.isXNumeric&&(i=(o.globals.seriesX[p][d]-o.globals.minX)/this.invertedXRatio-a/2);var y=i+a*this.visibleI;void 0===this.series[c][d]||null===this.series[c][d]?(v=r,b=r):(v=r+v/u,b=r+b/u,g=r+f.h/u,m=r+f.l/u,x=r+f.m/u);var w=l.move(r,y),C=l.move(v,y+a/2);return o.globals.previousPaths.length>0&&(C=this.getPreviousPath(p,d,!0)),w=[l.move(v,y)+l.line(v,y+a/2)+l.line(g,y+a/2)+l.line(g,y+a/2-a/4)+l.line(g,y+a/2+a/4)+l.line(g,y+a/2)+l.line(v,y+a/2)+l.line(v,y+a)+l.line(x,y+a)+l.line(x,y)+l.line(v+s/2,y),l.move(x,y)+l.line(x,y+a)+l.line(b,y+a)+l.line(b,y+a/2)+l.line(m,y+a/2)+l.line(m,y+a-a/4)+l.line(m,y+a/4)+l.line(m,y+a/2)+l.line(b,y+a/2)+l.line(b,y)+l.line(x,y)+"z"],C+=l.move(v,y),o.globals.isXNumeric||(i+=n),{pathTo:w,pathFrom:C,x:b,y:i,barYPosition:y,color:h}}},{key:"getOHLCValue",value:function(t,e){var i=this.w;return{o:this.isBoxPlot?i.globals.seriesCandleH[t][e]:i.globals.seriesCandleO[t][e],h:this.isBoxPlot?i.globals.seriesCandleO[t][e]:i.globals.seriesCandleH[t][e],m:i.globals.seriesCandleM[t][e],l:this.isBoxPlot?i.globals.seriesCandleC[t][e]:i.globals.seriesCandleL[t][e],c:this.isBoxPlot?i.globals.seriesCandleL[t][e]:i.globals.seriesCandleC[t][e]}}}]),i}(kt),Et=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w}return c(t,[{key:"checkColorRange",value:function(){var t=this.w,e=!1,i=t.config.plotOptions[t.config.chart.type];return i.colorScale.ranges.length>0&&i.colorScale.ranges.map((function(t,i){t.from<=0&&(e=!0)})),e}},{key:"getShadeColor",value:function(t,e,i,n){var a=this.w,r=1,s=a.config.plotOptions[t].shadeIntensity,o=this.determineColor(t,e,i);a.globals.hasNegs||n?r=a.config.plotOptions[t].reverseNegativeShade?o.percent<0?o.percent/100*(1.25*s):(1-o.percent/100)*(1.25*s):o.percent<=0?1-(1+o.percent/100)*s:(1-o.percent/100)*s:(r=1-o.percent/100,"treemap"===t&&(r=(1-o.percent/100)*(1.25*s)));var l=o.color,c=new y;return a.config.plotOptions[t].enableShades&&(l="dark"===this.w.config.theme.mode?y.hexToRgba(c.shadeColor(-1*r,o.color),a.config.fill.opacity):y.hexToRgba(c.shadeColor(r,o.color),a.config.fill.opacity)),{color:l,colorProps:o}}},{key:"determineColor",value:function(t,e,i){var n=this.w,a=n.globals.series[e][i],r=n.config.plotOptions[t],s=r.colorScale.inverse?i:e;r.distributed&&"treemap"===n.config.chart.type&&(s=i);var o=n.globals.colors[s],l=null,c=Math.min.apply(Math,v(n.globals.series[e])),d=Math.max.apply(Math,v(n.globals.series[e]));r.distributed||"heatmap"!==t||(c=n.globals.minY,d=n.globals.maxY),void 0!==r.colorScale.min&&(c=r.colorScale.minn.globals.maxY?r.colorScale.max:n.globals.maxY);var h=Math.abs(d)+Math.abs(c),u=100*a/(0===h?h-1e-6:h);return r.colorScale.ranges.length>0&&r.colorScale.ranges.map((function(t,e){if(a>=t.from&&a<=t.to){o=t.color,l=t.foreColor?t.foreColor:null,c=t.from,d=t.to;var i=Math.abs(d)+Math.abs(c);u=100*a/(0===i?i-1e-6:i)}})),{color:o,foreColor:l,percent:u}}},{key:"calculateDataLabels",value:function(t){var e=t.text,i=t.x,n=t.y,a=t.i,r=t.j,s=t.colorProps,o=t.fontSize,l=this.w.config.dataLabels,c=new S(this.ctx),d=new B(this.ctx),h=null;if(l.enabled){h=c.group({class:"apexcharts-data-labels"});var u=l.offsetX,p=l.offsetY,f=i+u,g=n+parseFloat(l.style.fontSize)/3+p;d.plotDataLabelsText({x:f,y:g,text:e,i:a,j:r,color:s.foreColor,parent:h,fontSize:o,dataLabelsConfig:l})}return h}},{key:"addListeners",value:function(t){var e=new S(this.ctx);t.node.addEventListener("mouseenter",e.pathMouseEnter.bind(this,t)),t.node.addEventListener("mouseleave",e.pathMouseLeave.bind(this,t)),t.node.addEventListener("mousedown",e.pathMouseDown.bind(this,t))}}]),t}(),Tt=function(){function t(e,i){o(this,t),this.ctx=e,this.w=e.w,this.xRatio=i.xRatio,this.yRatio=i.yRatio,this.dynamicAnim=this.w.config.chart.animations.dynamicAnimation,this.helpers=new Et(e),this.rectRadius=this.w.config.plotOptions.heatmap.radius,this.strokeWidth=this.w.config.stroke.show?this.w.config.stroke.width:0}return c(t,[{key:"draw",value:function(t){var e=this.w,i=new S(this.ctx),n=i.group({class:"apexcharts-heatmap"});n.attr("clip-path","url(#gridRectMask".concat(e.globals.cuid,")"));var a=e.globals.gridWidth/e.globals.dataPoints,r=e.globals.gridHeight/e.globals.series.length,s=0,o=!1;this.negRange=this.helpers.checkColorRange();var l=t.slice();e.config.yaxis[0].reversed&&(o=!0,l.reverse());for(var c=o?0:l.length-1;o?c=0;o?c++:c--){var d=i.group({class:"apexcharts-series apexcharts-heatmap-series",seriesName:y.escapeString(e.globals.seriesNames[c]),rel:c+1,"data:realIndex":c});if(this.ctx.series.addCollapsedClassToSeries(d,c),e.config.chart.dropShadow.enabled){var h=e.config.chart.dropShadow;new C(this.ctx).dropShadow(d,h,c)}for(var u=0,p=e.config.plotOptions.heatmap.shadeIntensity,f=0;f-1&&this.pieClicked(h),i.config.dataLabels.enabled){var w=b.x,k=b.y,A=100*p/this.fullAngle+"%";if(0!==p&&i.config.plotOptions.pie.dataLabels.minAngleToShowLabelthis.fullAngle?e.endAngle=e.endAngle-(n+s):n+s=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(c=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01),Math.ceil(c)>this.fullAngle&&(c-=this.fullAngle);var d=Math.PI*(c-90)/180,h=i.centerX+r*Math.cos(l),u=i.centerY+r*Math.sin(l),p=i.centerX+r*Math.cos(d),f=i.centerY+r*Math.sin(d),g=y.polarToCartesian(i.centerX,i.centerY,i.donutSize,c),m=y.polarToCartesian(i.centerX,i.centerY,i.donutSize,o),v=a>180?1:0,b=["M",h,u,"A",r,r,0,v,1,p,f];return e="donut"===i.chartType?[].concat(b,["L",g.x,g.y,"A",i.donutSize,i.donutSize,0,v,0,m.x,m.y,"L",h,u,"z"]).join(" "):"pie"===i.chartType||"polarArea"===i.chartType?[].concat(b,["L",i.centerX,i.centerY,"L",h,u]).join(" "):[].concat(b).join(" "),s.roundPathCorners(e,2*this.strokeWidth)}},{key:"drawPolarElements",value:function(t){var e=this.w,i=new Z(this.ctx),n=new S(this.ctx),a=new Ot(this.ctx),r=n.group(),s=n.group(),o=i.niceScale(0,Math.ceil(this.maxY),e.config.yaxis[0].tickAmount,0,!0),l=o.result.reverse(),c=o.result.length;this.maxY=o.niceMax;for(var d=e.globals.radialSize,h=d/(c-1),u=0;u1&&t.total.show&&(a=t.total.color);var s=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-label"),o=r.globals.dom.baseEl.querySelector(".apexcharts-datalabel-value");i=(0,t.value.formatter)(i,r),n||"function"!=typeof t.total.formatter||(i=t.total.formatter(r));var l=e===t.total.label;e=t.name.formatter(e,l,r),null!==s&&(s.textContent=e),null!==o&&(o.textContent=i),null!==s&&(s.style.fill=a)}},{key:"printDataLabelsInner",value:function(t,e){var i=this.w,n=t.getAttribute("data:value"),a=i.globals.seriesNames[parseInt(t.parentNode.getAttribute("rel"),10)-1];i.globals.series.length>1&&this.printInnerLabels(e,a,n,t);var r=i.globals.dom.baseEl.querySelector(".apexcharts-datalabels-group");null!==r&&(r.style.opacity=1)}},{key:"drawSpokes",value:function(t){var e=this,i=this.w,n=new S(this.ctx),a=i.config.plotOptions.polarArea.spokes;if(0!==a.strokeWidth){for(var r=[],s=360/i.globals.series.length,o=0;o1)s&&!e.total.showAlways?l({makeSliceOut:!1,printLabel:!0}):this.printInnerLabels(e,e.total.label,e.total.formatter(a));else if(l({makeSliceOut:!1,printLabel:!0}),!s)if(a.globals.selectedDataPoints.length&&a.globals.series.length>1)if(a.globals.selectedDataPoints[0].length>0){var c=a.globals.selectedDataPoints[0],d=a.globals.dom.baseEl.querySelector(".apexcharts-".concat(this.chartType.toLowerCase(),"-slice-").concat(c));this.printDataLabelsInner(d,e)}else r&&a.globals.selectedDataPoints.length&&0===a.globals.selectedDataPoints[0].length&&(r.style.opacity=0);else r&&a.globals.series.length>1&&(r.style.opacity=0)}}]),t}(),Lt=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animDur=0;var i=this.w;this.graphics=new S(this.ctx),this.lineColorArr=void 0!==i.globals.stroke.colors?i.globals.stroke.colors:i.globals.colors,this.defaultSize=i.globals.svgHeight0&&(g=e.getPreviousPath(o));for(var m=0;m=10?t.x>0?(i="start",n+=10):t.x<0&&(i="end",n-=10):i="middle",Math.abs(t.y)>=e-10&&(t.y<0?a-=10:t.y>0&&(a+=10)),{textAnchor:i,newX:n,newY:a}}},{key:"getPreviousPath",value:function(t){for(var e=this.w,i=null,n=0;n0&&parseInt(a.realIndex,10)===parseInt(t,10)&&void 0!==e.globals.previousPaths[n].paths[0]&&(i=e.globals.previousPaths[n].paths[0].d)}return i}},{key:"getDataPointsPos",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.dataPointsLen;t=t||[],e=e||[];for(var n=[],a=0;a=360&&(u=360-Math.abs(this.startAngle)-.1);var p=i.drawPath({d:"",stroke:d,strokeWidth:s*parseInt(c.strokeWidth,10)/100,fill:"none",strokeOpacity:c.opacity,classes:"apexcharts-radialbar-area"});if(c.dropShadow.enabled){var f=c.dropShadow;a.dropShadow(p,f)}l.add(p),p.attr("id","apexcharts-radialbarTrack-"+o),this.animatePaths(p,{centerX:t.centerX,centerY:t.centerY,endAngle:u,startAngle:h,size:t.size,i:o,totalItems:2,animBeginArr:0,dur:0,isTrack:!0,easing:e.globals.easing})}return n}},{key:"drawArcs",value:function(t){var e=this.w,i=new S(this.ctx),n=new X(this.ctx),a=new C(this.ctx),r=i.group(),s=this.getStrokeWidth(t);t.size=t.size-s/2;var o=e.config.plotOptions.radialBar.hollow.background,l=t.size-s*t.series.length-this.margin*t.series.length-s*parseInt(e.config.plotOptions.radialBar.track.strokeWidth,10)/100/2,c=l-e.config.plotOptions.radialBar.hollow.margin;void 0!==e.config.plotOptions.radialBar.hollow.image&&(o=this.drawHollowImage(t,r,l,o));var d=this.drawHollow({size:c,centerX:t.centerX,centerY:t.centerY,fill:o||"transparent"});if(e.config.plotOptions.radialBar.hollow.dropShadow.enabled){var h=e.config.plotOptions.radialBar.hollow.dropShadow;a.dropShadow(d,h)}var u=1;!this.radialDataLabels.total.show&&e.globals.series.length>1&&(u=0);var p=null;this.radialDataLabels.show&&(p=this.renderInnerDataLabels(this.radialDataLabels,{hollowSize:l,centerX:t.centerX,centerY:t.centerY,opacity:u})),"back"===e.config.plotOptions.radialBar.hollow.position&&(r.add(d),p&&r.add(p));var f=!1;e.config.plotOptions.radialBar.inverseOrder&&(f=!0);for(var g=f?t.series.length-1:0;f?g>=0:g100?100:t.series[g])/100,k=Math.round(this.totalAngle*w)+this.startAngle,A=void 0;e.globals.dataChanged&&(x=this.startAngle,A=Math.round(this.totalAngle*y.negToZero(e.globals.previousPaths[g])/100)+x),Math.abs(k)+Math.abs(b)>=360&&(k-=.01),Math.abs(A)+Math.abs(x)>=360&&(A-=.01);var P=k-b,E=Array.isArray(e.config.stroke.dashArray)?e.config.stroke.dashArray[g]:e.config.stroke.dashArray,T=i.drawPath({d:"",stroke:v,strokeWidth:s,fill:"none",fillOpacity:e.config.fill.opacity,classes:"apexcharts-radialbar-area apexcharts-radialbar-slice-"+g,strokeDashArray:E});if(S.setAttrs(T.node,{"data:angle":P,"data:value":t.series[g]}),e.config.chart.dropShadow.enabled){var O=e.config.chart.dropShadow;a.dropShadow(T,O,g)}if(a.setSelectionFilter(T,0,g),this.addListeners(T,this.radialDataLabels),m.add(T),T.attr({index:0,j:g}),this.barLabels.enabled){var I=y.polarToCartesian(t.centerX,t.centerY,t.size,b),L=this.barLabels.formatter(e.globals.seriesNames[g],{seriesIndex:g,w:e}),M=["apexcharts-radialbar-label"];this.barLabels.onClick||M.push("apexcharts-no-click");var _=this.barLabels.useSeriesColors?e.globals.colors[g]:e.config.chart.foreColor;_||(_=e.config.chart.foreColor);var D=I.x-this.barLabels.margin,z=I.y,j=i.drawText({x:D,y:z,text:L,textAnchor:"end",dominantBaseline:"middle",fontFamily:this.barLabels.fontFamily,fontWeight:this.barLabels.fontWeight,fontSize:this.barLabels.fontSize,foreColor:_,cssClass:M.join(" ")});j.on("click",this.onBarLabelClick),j.attr({rel:g+1}),0!==b&&j.attr({"transform-origin":"".concat(D," ").concat(z),transform:"rotate(".concat(b," 0 0)")}),m.add(j)}var N=0;!this.initialAnim||e.globals.resized||e.globals.dataChanged||(N=e.config.chart.animations.speed),e.globals.dataChanged&&(N=e.config.chart.animations.dynamicAnimation.speed),this.animDur=N/(1.2*t.series.length)+this.animDur,this.animBeginArr.push(this.animDur),this.animatePaths(T,{centerX:t.centerX,centerY:t.centerY,endAngle:k,startAngle:b,prevEndAngle:A,prevStartAngle:x,size:t.size,i:g,totalItems:2,animBeginArr:this.animBeginArr,dur:N,shouldSetPrevPaths:!0,easing:e.globals.easing})}return{g:r,elHollow:d,dataLabels:p}}},{key:"drawHollow",value:function(t){var e=new S(this.ctx).drawCircle(2*t.size);return e.attr({class:"apexcharts-radialbar-hollow",cx:t.centerX,cy:t.centerY,r:t.size,fill:t.fill}),e}},{key:"drawHollowImage",value:function(t,e,i,n){var a=this.w,r=new X(this.ctx),s=y.randomId(),o=a.config.plotOptions.radialBar.hollow.image;if(a.config.plotOptions.radialBar.hollow.imageClipped)r.clippedImgArea({width:i,height:i,image:o,patternID:"pattern".concat(a.globals.cuid).concat(s)}),n="url(#pattern".concat(a.globals.cuid).concat(s,")");else{var l=a.config.plotOptions.radialBar.hollow.imageWidth,c=a.config.plotOptions.radialBar.hollow.imageHeight;if(void 0===l&&void 0===c){var d=a.globals.dom.Paper.image(o).loaded((function(e){this.move(t.centerX-e.width/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-e.height/2+a.config.plotOptions.radialBar.hollow.imageOffsetY)}));e.add(d)}else{var h=a.globals.dom.Paper.image(o).loaded((function(e){this.move(t.centerX-l/2+a.config.plotOptions.radialBar.hollow.imageOffsetX,t.centerY-c/2+a.config.plotOptions.radialBar.hollow.imageOffsetY),this.size(l,c)}));e.add(h)}}return n}},{key:"getStrokeWidth",value:function(t){var e=this.w;return t.size*(100-parseInt(e.config.plotOptions.radialBar.hollow.size,10))/100/(t.series.length+1)-this.margin}},{key:"onBarLabelClick",value:function(t){var e=parseInt(t.target.getAttribute("rel"),10)-1,i=this.barLabels.onClick,n=this.w;i&&i(n.globals.seriesNames[e],{w:n,seriesIndex:e})}}]),i}(It),_t=function(t){h(i,t);var e=g(i);function i(){return o(this,i),e.apply(this,arguments)}return c(i,[{key:"draw",value:function(t,e){var i=this.w,n=new S(this.ctx);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=i.globals.seriesRangeStart,this.seriesRangeEnd=i.globals.seriesRangeEnd,this.barHelpers.initVariables(t);for(var a=n.group({class:"apexcharts-rangebar-series apexcharts-plot-series"}),s=0;s0&&(this.visibleI=this.visibleI+1);var m=0,v=0;this.yRatio.length>1&&(this.yaxisIndex=f);var b=this.barHelpers.initialPositions();p=b.y,h=b.zeroW,u=b.x,v=b.barWidth,m=b.barHeight,o=b.xDivision,l=b.yDivision,c=b.zeroH;for(var x=n.group({class:"apexcharts-datalabels","data:realIndex":f}),w=n.group({class:"apexcharts-rangebar-goals-markers"}),C=0;C0}));return this.isHorizontal?(n=u.config.plotOptions.bar.rangeBarGroupRows?r+c*v:r+o*this.visibleI+c*v,b>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(p=u.globals.seriesRange[e][b].overlaps).indexOf(f)>-1&&(n=(o=h.barHeight/p.length)*this.visibleI+c*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+p.indexOf(f))+c*v)):(v>-1&&(a=u.config.plotOptions.bar.rangeBarGroupRows?s+d*v:s+l*this.visibleI+d*v),b>-1&&!u.config.plotOptions.bar.rangeBarOverlap&&(p=u.globals.seriesRange[e][b].overlaps).indexOf(f)>-1&&(a=(l=h.barWidth/p.length)*this.visibleI+d*(100-parseInt(this.barOptions.barWidth,10))/100/2+l*(this.visibleI+p.indexOf(f))+d*v)),{barYPosition:n,barXPosition:a,barHeight:o,barWidth:l}}},{key:"drawRangeColumnPaths",value:function(t){var e=t.indexes,i=t.x,n=t.xDivision,a=t.barWidth,r=t.barXPosition,s=t.zeroH,o=this.w,l=e.i,c=e.j,d=this.yRatio[this.yaxisIndex],h=e.realIndex,u=this.getRangeValue(h,c),p=Math.min(u.start,u.end),f=Math.max(u.start,u.end);void 0===this.series[l][c]||null===this.series[l][c]?p=s:(p=s-p/d,f=s-f/d);var g=Math.abs(f-p),m=this.barHelpers.getColumnPaths({barXPosition:r,barWidth:a,y1:p,y2:f,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:e.realIndex,i:h,j:c,w:o});if(o.globals.isXNumeric){var v=this.getBarXForNumericXAxis({x:i,j:c,realIndex:h,barWidth:a});i=v.x,r=v.barXPosition}else i+=n;return{pathTo:m.pathTo,pathFrom:m.pathFrom,barHeight:g,x:i,y:f,goalY:this.barHelpers.getGoalValues("y",null,s,l,c),barXPosition:r}}},{key:"drawRangeBarPaths",value:function(t){var e=t.indexes,i=t.y,n=t.y1,a=t.y2,r=t.yDivision,s=t.barHeight,o=t.barYPosition,l=t.zeroW,c=this.w,d=l+n/this.invertedYRatio,h=l+a/this.invertedYRatio,u=Math.abs(h-d),p=this.barHelpers.getBarpaths({barYPosition:o,barHeight:s,x1:d,x2:h,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:e.realIndex,realIndex:e.realIndex,j:e.j,w:c});return c.globals.isXNumeric||(i+=r),{pathTo:p.pathTo,pathFrom:p.pathFrom,barWidth:u,x:h,goalX:this.barHelpers.getGoalValues("x",l,null,e.realIndex,e.j),y:i}}},{key:"getRangeValue",value:function(t,e){var i=this.w;return{start:i.globals.seriesRangeStart[t][e],end:i.globals.seriesRangeEnd[t][e]}}}]),i}(kt),Dt=function(){function t(e){o(this,t),this.w=e.w,this.lineCtx=e}return c(t,[{key:"sameValueSeriesFix",value:function(t,e){var i=this.w;if(("gradient"===i.config.fill.type||"gradient"===i.config.fill.type[t])&&new k(this.lineCtx.ctx,i).seriesHaveSameValues(t)){var n=e[t].slice();n[n.length-1]=n[n.length-1]+1e-6,e[t]=n}return e}},{key:"calculatePoints",value:function(t){var e=t.series,i=t.realIndex,n=t.x,a=t.y,r=t.i,s=t.j,o=t.prevY,l=this.w,c=[],d=[];if(0===s){var h=this.lineCtx.categoryAxisCorrection+l.config.markers.offsetX;l.globals.isXNumeric&&(h=(l.globals.seriesX[i][0]-l.globals.minX)/this.lineCtx.xRatio+l.config.markers.offsetX),c.push(h),d.push(y.isNumber(e[r][0])?o+l.config.markers.offsetY:null),c.push(n+l.config.markers.offsetX),d.push(y.isNumber(e[r][s+1])?a+l.config.markers.offsetY:null)}else c.push(n+l.config.markers.offsetX),d.push(y.isNumber(e[r][s+1])?a+l.config.markers.offsetY:null);return{x:c,y:d}}},{key:"checkPreviousPaths",value:function(t){for(var e=t.pathFromLine,i=t.pathFromArea,n=t.realIndex,a=this.w,r=0;r0&&parseInt(s.realIndex,10)===parseInt(n,10)&&("line"===s.type?(this.lineCtx.appendPathFrom=!1,e=a.globals.previousPaths[r].paths[0].d):"area"===s.type&&(this.lineCtx.appendPathFrom=!1,i=a.globals.previousPaths[r].paths[0].d,a.config.stroke.show&&a.globals.previousPaths[r].paths[1]&&(e=a.globals.previousPaths[r].paths[1].d)))}return{pathFromLine:e,pathFromArea:i}}},{key:"determineFirstPrevY",value:function(t){var e,i,n=t.i,a=t.series,r=t.prevY,s=t.lineYPosition,o=this.w,l=o.config.chart.stacked&&!o.globals.comboCharts||o.config.chart.stacked&&o.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[n])||void 0===e?void 0:e.type));if(void 0!==(null===(i=a[n])||void 0===i?void 0:i[0]))r=(s=l&&n>0?this.lineCtx.prevSeriesY[n-1][0]:this.lineCtx.zeroY)-a[n][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]+2*(this.lineCtx.isReversed?a[n][0]/this.lineCtx.yRatio[this.lineCtx.yaxisIndex]:0);else if(l&&n>0&&void 0===a[n][0])for(var c=n-1;c>=0;c--)if(null!==a[c][0]&&void 0!==a[c][0]){r=s=this.lineCtx.prevSeriesY[c][0];break}return{prevY:r,lineYPosition:s}}}]),t}(),zt=function(t,e){for(var i="",n=0;n1&&Math.abs(a[s-2]-r[o-2])4?(i+="C".concat(a[0],", ").concat(a[1]),i+=", ".concat(a[2],", ").concat(a[3]),i+=", ".concat(a[4],", ").concat(a[5])):s>2&&(i+="S".concat(a[0],", ").concat(a[1]),i+=", ".concat(a[2],", ").concat(a[3]))}return i},jt=function(t){var e=function(t){for(var e,i,n,a,r=function(t){for(var e=[],i=t[0],n=t[1],a=e[0]=Nt(i,n),r=1,s=t.length-1;r9&&(a=3*n/Math.sqrt(a),r[l]=a*e,r[l+1]=a*i);for(var c=0;c<=s;c++)a=(t[Math.min(s,c+1)][0]-t[Math.max(0,c-1)][0])/(6*(1+r[c]*r[c])),o.push([a||0,r[c]*a||0]);return o}(t),i=t[1],n=t[0],a=[],r=e[1],s=e[0];a.push(n,[n[0]+s[0],n[1]+s[1],i[0]-r[0],i[1]-r[1],i[0],i[1]]);for(var o=2,l=e.length;o0&&(v=(s.globals.seriesX[p][0]-s.globals.minX)/this.xRatio),m.push(v);var b=v,x=this.zeroY,y=this.zeroY;x=this.lineHelpers.determineFirstPrevY({i:u,series:t,prevY:x,lineYPosition:0}).prevY,"smooth"===s.config.stroke.curve&&null===t[u][0]?f.push(null):f.push(x),"rangeArea"===l&&(y=this.lineHelpers.determineFirstPrevY({i:u,series:n,prevY:y,lineYPosition:0}).prevY,g.push(y));var w={type:l,series:t,realIndex:p,i:u,x:v,y:1,pathsFrom:this._calculatePathsFrom({type:l,series:t,i:u,realIndex:p,prevX:b,prevY:x,prevY2:y}),linePaths:[],areaPaths:[],seriesIndex:i,lineYPosition:0,xArrj:m,yArrj:f,y2Arrj:g,seriesRangeEnd:n},C=this._iterateOverDataPoints(r(r({},w),{},{iterations:"rangeArea"===l?t[u].length-1:void 0,isRangeStart:!0}));if("rangeArea"===l){var A=this._calculatePathsFrom({series:n,i:u,realIndex:p,prevX:b,prevY:y}),P=this._iterateOverDataPoints(r(r({},w),{},{series:n,pathsFrom:A,iterations:n[u].length-1,isRangeStart:!1}));C.linePaths[0]=P.linePath+C.linePath,C.pathFromLine=P.pathFromLine+C.pathFromLine}this._handlePaths({type:l,realIndex:p,i:u,paths:C}),this.elSeries.add(this.elPointsMain),this.elSeries.add(this.elDataLabelsWrap),h.push(this.elSeries)}if(void 0!==(null===(a=s.config.series[0])||void 0===a?void 0:a.zIndex)&&h.sort((function(t,e){return Number(t.node.getAttribute("zIndex"))-Number(e.node.getAttribute("zIndex"))})),s.config.chart.stacked)for(var E=h.length;E>0;E--)c.add(h[E-1]);else for(var T=0;T1&&(this.yaxisIndex=i),this.isReversed=n.config.yaxis[this.yaxisIndex]&&n.config.yaxis[this.yaxisIndex].reversed,this.zeroY=n.globals.gridHeight-this.baseLineY[this.yaxisIndex]-(this.isReversed?n.globals.gridHeight:0)+(this.isReversed?2*this.baseLineY[this.yaxisIndex]:0),this.areaBottomY=this.zeroY,(this.zeroY>n.globals.gridHeight||"end"===n.config.plotOptions.area.fillTo)&&(this.areaBottomY=n.globals.gridHeight),this.categoryAxisCorrection=this.xDivision/2,this.elSeries=a.group({class:"apexcharts-series",zIndex:void 0!==n.config.series[i].zIndex?n.config.series[i].zIndex:i,seriesName:y.escapeString(n.globals.seriesNames[i])}),this.elPointsMain=a.group({class:"apexcharts-series-markers-wrap","data:realIndex":i}),this.elDataLabelsWrap=a.group({class:"apexcharts-datalabels","data:realIndex":i});var r=t[e].length===n.globals.dataPoints;this.elSeries.attr({"data:longestSeries":r,rel:e+1,"data:realIndex":i}),this.appendPathFrom=!0}},{key:"_calculatePathsFrom",value:function(t){var e,i,n,a,r=t.type,s=t.series,o=t.i,l=t.realIndex,c=t.prevX,d=t.prevY,h=t.prevY2,u=this.w,p=new S(this.ctx);if(null===s[o][0]){for(var f=0;f0){var g=this.lineHelpers.checkPreviousPaths({pathFromLine:n,pathFromArea:a,realIndex:l});n=g.pathFromLine,a=g.pathFromArea}return{prevX:c,prevY:d,linePath:e,areaPath:i,pathFromLine:n,pathFromArea:a}}},{key:"_handlePaths",value:function(t){var e=t.type,i=t.realIndex,n=t.i,a=t.paths,s=this.w,o=new S(this.ctx),l=new X(this.ctx);this.prevSeriesY.push(a.yArrj),s.globals.seriesXvalues[i]=a.xArrj,s.globals.seriesYvalues[i]=a.yArrj;var c=s.config.forecastDataPoints;if(c.count>0&&"rangeArea"!==e){var d=s.globals.seriesXvalues[i][s.globals.seriesXvalues[i].length-c.count-1],h=o.drawRect(d,0,s.globals.gridWidth,s.globals.gridHeight,0);s.globals.dom.elForecastMask.appendChild(h.node);var u=o.drawRect(0,0,d,s.globals.gridHeight,0);s.globals.dom.elNonForecastMask.appendChild(u.node)}this.pointsChart||s.globals.delayedElements.push({el:this.elPointsMain.node,index:i});var p={i:n,realIndex:i,animationDelay:n,initialSpeed:s.config.chart.animations.speed,dataChangeSpeed:s.config.chart.animations.dynamicAnimation.speed,className:"apexcharts-".concat(e)};if("area"===e)for(var f=l.fillPath({seriesNumber:i}),g=0;g0&&"rangeArea"!==e){var k=o.renderPaths(w);k.node.setAttribute("stroke-dasharray",c.dashArray),c.strokeWidth&&k.node.setAttribute("stroke-width",c.strokeWidth),this.elSeries.add(k),k.attr("clip-path","url(#forecastMask".concat(s.globals.cuid,")")),C.attr("clip-path","url(#nonForecastMask".concat(s.globals.cuid,")"))}}}}},{key:"_iterateOverDataPoints",value:function(t){var e,i=this,n=t.type,a=t.series,r=t.iterations,s=t.realIndex,o=t.i,l=t.x,c=t.y,d=t.pathsFrom,h=t.linePaths,u=t.areaPaths,p=t.seriesIndex,f=t.lineYPosition,g=t.xArrj,m=t.yArrj,v=t.y2Arrj,b=t.isRangeStart,x=t.seriesRangeEnd,w=this.w,C=new S(this.ctx),k=this.yRatio,A=d.prevY,P=d.linePath,E=d.areaPath,T=d.pathFromLine,O=d.pathFromArea,I=y.isNumber(w.globals.minYArr[s])?w.globals.minYArr[s]:w.globals.minY;r||(r=w.globals.dataPoints>1?w.globals.dataPoints-1:w.globals.dataPoints);for(var L=function(t,e){return e-t/k[i.yaxisIndex]+2*(i.isReversed?t/k[i.yaxisIndex]:0)},M=c,_=w.config.chart.stacked&&!w.globals.comboCharts||w.config.chart.stacked&&w.globals.comboCharts&&(!this.w.config.chart.stackOnlyBar||"bar"===(null===(e=this.w.config.series[s])||void 0===e?void 0:e.type)),D=0;D0&&w.globals.collapsedSeries.length-1){e--;break}return e>=0?e:0}(o-1)][D+1]:this.zeroY,z?c=L(I,f):(c=L(a[o][D+1],f),"rangeArea"===n&&(M=L(x[o][D+1],f))),g.push(l),z&&"smooth"===w.config.stroke.curve?m.push(null):m.push(c),v.push(M);var N=this.lineHelpers.calculatePoints({series:a,x:l,y:c,realIndex:s,i:o,j:D,prevY:A}),H=this._createPaths({type:n,series:a,i:o,realIndex:s,j:D,x:l,y:c,y2:M,xArrj:g,yArrj:m,y2Arrj:v,linePath:P,areaPath:E,linePaths:h,areaPaths:u,seriesIndex:p,isRangeStart:b});u=H.areaPaths,h=H.linePaths,E=H.areaPath,P=H.linePath,!this.appendPathFrom||"smooth"===w.config.stroke.curve&&"rangeArea"===n||(T+=C.line(l,this.zeroY),O+=C.line(l,this.zeroY)),this.handleNullDataPoints(a,N,o,D,s),this._handleMarkersAndLabels({type:n,pointsPos:N,i:o,j:D,realIndex:s,isRangeStart:b})}return{yArrj:m,xArrj:g,pathFromArea:O,areaPaths:u,pathFromLine:T,linePaths:h,linePath:P,areaPath:E}}},{key:"_handleMarkersAndLabels",value:function(t){var e=t.type,i=t.pointsPos,n=t.isRangeStart,a=t.i,r=t.j,s=t.realIndex,o=this.w,l=new B(this.ctx);if(this.pointsChart)this.scatter.draw(this.elSeries,r,{realIndex:s,pointsPos:i,zRatio:this.zRatio,elParent:this.elPointsMain});else{o.globals.series[a].length>1&&this.elPointsMain.node.classList.add("apexcharts-element-hidden");var c=this.markers.plotChartMarkers(i,s,r+1);null!==c&&this.elPointsMain.add(c)}var d=l.drawDataLabel({type:e,isRangeStart:n,pos:i,i:s,j:r+1});null!==d&&this.elDataLabelsWrap.add(d)}},{key:"_createPaths",value:function(t){var e=t.type,i=t.series,n=t.i,a=t.realIndex,r=t.j,s=t.x,o=t.y,l=t.xArrj,c=t.yArrj,d=t.y2,h=t.y2Arrj,u=t.linePath,p=t.areaPath,f=t.linePaths,g=t.areaPaths,m=t.seriesIndex,v=t.isRangeStart,b=this.w,x=new S(this.ctx),y=b.config.stroke.curve,w=this.areaBottomY;if(Array.isArray(b.config.stroke.curve)&&(y=Array.isArray(m)?b.config.stroke.curve[m[n]]:b.config.stroke.curve[n]),"rangeArea"===e&&(b.globals.hasNullValues||b.config.forecastDataPoints.count>0)&&"smooth"===y&&(y="straight"),"smooth"===y){var C="rangeArea"===e?l.length===b.globals.dataPoints:r===i[n].length-2,k=l.map((function(t,e){return[l[e],c[e]]})).filter((function(t){return null!==t[1]}));if(C&&k.length>1){var A=jt(k);if(u+=zt(A,b.globals.gridWidth),null===i[n][0]?p=u:p+=zt(A,b.globals.gridWidth),"rangeArea"===e&&v){u+=x.line(l[l.length-1],h[h.length-1]);var P=l.slice().reverse(),E=h.slice().reverse(),T=P.map((function(t,e){return[P[e],E[e]]})),O=jt(T);p=u+=zt(O,b.globals.gridWidth)}else p+=x.line(k[k.length-1][0],w)+x.line(k[0][0],w)+x.move(k[0][0],k[0][1])+"z";f.push(u),g.push(p)}}else{if(null===i[n][r+1]){u+=x.move(s,o);var I=b.globals.isXNumeric?(b.globals.seriesX[a][r]-b.globals.minX)/this.xRatio:s-this.xDivision;p=p+x.line(I,w)+x.move(s,o)+"z"}null===i[n][r]&&(u+=x.move(s,o),p+=x.move(s,w)),"stepline"===y?(u=u+x.line(s,null,"H")+x.line(null,o,"V"),p=p+x.line(s,null,"H")+x.line(null,o,"V")):"straight"===y&&(u+=x.line(s,o),p+=x.line(s,o)),r===i[n].length-2&&(p=p+x.line(s,w)+x.move(s,o)+"z","rangeArea"===e&&v?u=u+x.line(s,d)+x.move(s,d)+"z":(f.push(u),g.push(p)))}return{linePaths:f,areaPaths:g,linePath:u,areaPath:p}}},{key:"handleNullDataPoints",value:function(t,e,i,n,a){var r=this.w;if(null===t[i][n]&&r.config.markers.showNullDataPoints||1===t[i].length){var s=this.markers.plotChartMarkers(e,a,n+1,this.strokeWidth-r.config.markers.strokeWidth/2,!0);null!==s&&this.elPointsMain.add(s)}}}]),t}();window.TreemapSquared={},window.TreemapSquared.generate=function(){function t(e,i,n,a){this.xoffset=e,this.yoffset=i,this.height=a,this.width=n,this.shortestEdge=function(){return Math.min(this.height,this.width)},this.getCoordinates=function(t){var e,i=[],n=this.xoffset,a=this.yoffset,s=r(t)/this.height,o=r(t)/this.width;if(this.width>=this.height)for(e=0;e=this.height){var n=e/this.height,a=this.width-n;i=new t(this.xoffset+n,this.yoffset,a,this.height)}else{var r=e/this.width,s=this.height-r;i=new t(this.xoffset,this.yoffset+r,this.width,s)}return i}}function e(e,n,a,s,o){s=void 0===s?0:s,o=void 0===o?0:o;var l=i(function(t,e){var i,n=[],a=e/r(t);for(i=0;i=n(a,i))}(e,l=t[0],o)?(e.push(l),i(t.slice(1),e,a,s)):(c=a.cutArea(r(e),s),s.push(a.getCoordinates(e)),i(t,[],c,s)),s;s.push(a.getCoordinates(e))}function n(t,e){var i=Math.min.apply(Math,t),n=Math.max.apply(Math,t),a=r(t);return Math.max(Math.pow(e,2)*n/Math.pow(a,2),Math.pow(a,2)/(Math.pow(e,2)*i))}function a(t){return t&&t.constructor===Array}function r(t){var e,i=0;for(e=0;er-n&&l.width<=s-a){var c=o.rotateAroundCenter(t.node);t.node.setAttribute("transform","rotate(-90 ".concat(c.x," ").concat(c.y,") translate(").concat(l.height/3,")"))}}},{key:"truncateLabels",value:function(t,e,i,n,a,r){var s=new S(this.ctx),o=s.getTextRects(t,e).width+this.w.config.stroke.width+5>a-i&&r-n>a-i?r-n:a-i,l=s.getTextBasedOnMaxWidth({text:t,maxWidth:o,fontSize:e});return t.length!==l.length&&o/e<5?"":l}},{key:"animateTreemap",value:function(t,e,i,n){var a=new w(this.ctx);a.animateRect(t,{x:e.x,y:e.y,width:e.width,height:e.height},{x:i.x,y:i.y,width:i.width,height:i.height},n,(function(){a.animationCompleted(t)}))}}]),t}(),$t=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w,this.timeScaleArray=[],this.utc=this.w.config.xaxis.labels.datetimeUTC}return c(t,[{key:"calculateTimeScaleTicks",value:function(t,e){var i=this,n=this.w;if(n.globals.allSeriesCollapsed)return n.globals.labels=[],n.globals.timescaleLabels=[],[];var a=new M(this.ctx),s=(e-t)/864e5;this.determineInterval(s),n.globals.disableZoomIn=!1,n.globals.disableZoomOut=!1,s<.00011574074074074075?n.globals.disableZoomIn=!0:s>5e4&&(n.globals.disableZoomOut=!0);var o=a.getTimeUnitsfromTimestamp(t,e,this.utc),l=n.globals.gridWidth/s,c=l/24,d=c/60,h=d/60,u=Math.floor(24*s),p=Math.floor(1440*s),f=Math.floor(86400*s),g=Math.floor(s),m=Math.floor(s/30),v=Math.floor(s/365),b={minMillisecond:o.minMillisecond,minSecond:o.minSecond,minMinute:o.minMinute,minHour:o.minHour,minDate:o.minDate,minMonth:o.minMonth,minYear:o.minYear},x={firstVal:b,currentMillisecond:b.minMillisecond,currentSecond:b.minSecond,currentMinute:b.minMinute,currentHour:b.minHour,currentMonthDate:b.minDate,currentDate:b.minDate,currentMonth:b.minMonth,currentYear:b.minYear,daysWidthOnXAxis:l,hoursWidthOnXAxis:c,minutesWidthOnXAxis:d,secondsWidthOnXAxis:h,numberOfSeconds:f,numberOfMinutes:p,numberOfHours:u,numberOfDays:g,numberOfMonths:m,numberOfYears:v};switch(this.tickInterval){case"years":this.generateYearScale(x);break;case"months":case"half_year":this.generateMonthScale(x);break;case"months_days":case"months_fortnight":case"days":case"week_days":this.generateDayScale(x);break;case"hours":this.generateHourScale(x);break;case"minutes_fives":case"minutes":this.generateMinuteScale(x);break;case"seconds_tens":case"seconds_fives":case"seconds":this.generateSecondScale(x)}var y=this.timeScaleArray.map((function(t){var e={position:t.position,unit:t.unit,year:t.year,day:t.day?t.day:1,hour:t.hour?t.hour:0,month:t.month+1};return"month"===t.unit?r(r({},e),{},{day:1,value:t.value+1}):"day"===t.unit||"hour"===t.unit?r(r({},e),{},{value:t.value}):"minute"===t.unit?r(r({},e),{},{value:t.value,minute:t.value}):"second"===t.unit?r(r({},e),{},{value:t.value,minute:t.minute,second:t.second}):t}));return y.filter((function(t){var e=1,a=Math.ceil(n.globals.gridWidth/120),r=t.value;void 0!==n.config.xaxis.tickAmount&&(a=n.config.xaxis.tickAmount),y.length>a&&(e=Math.floor(y.length/a));var s=!1,o=!1;switch(i.tickInterval){case"years":"year"===t.unit&&(s=!0);break;case"half_year":e=7,"year"===t.unit&&(s=!0);break;case"months":e=1,"year"===t.unit&&(s=!0);break;case"months_fortnight":e=15,"year"!==t.unit&&"month"!==t.unit||(s=!0),30===r&&(o=!0);break;case"months_days":e=10,"month"===t.unit&&(s=!0),30===r&&(o=!0);break;case"week_days":e=8,"month"===t.unit&&(s=!0);break;case"days":e=1,"month"===t.unit&&(s=!0);break;case"hours":"day"===t.unit&&(s=!0);break;case"minutes_fives":case"seconds_fives":r%5!=0&&(o=!0);break;case"seconds_tens":r%10!=0&&(o=!0)}if("hours"===i.tickInterval||"minutes_fives"===i.tickInterval||"seconds_tens"===i.tickInterval||"seconds_fives"===i.tickInterval){if(!o)return!0}else if((r%e==0||s)&&!o)return!0}))}},{key:"recalcDimensionsBasedOnFormat",value:function(t,e){var i=this.w,n=this.formatDates(t),a=this.removeOverlappingTS(n);i.globals.timescaleLabels=a.slice(),new dt(this.ctx).plotCoords()}},{key:"determineInterval",value:function(t){var e=24*t,i=60*e;switch(!0){case t/365>5:this.tickInterval="years";break;case t>800:this.tickInterval="half_year";break;case t>180:this.tickInterval="months";break;case t>90:this.tickInterval="months_fortnight";break;case t>60:this.tickInterval="months_days";break;case t>30:this.tickInterval="week_days";break;case t>2:this.tickInterval="days";break;case e>2.4:this.tickInterval="hours";break;case i>15:this.tickInterval="minutes_fives";break;case i>5:this.tickInterval="minutes";break;case i>1:this.tickInterval="seconds_tens";break;case 60*i>20:this.tickInterval="seconds_fives";break;default:this.tickInterval="seconds"}}},{key:"generateYearScale",value:function(t){var e=t.firstVal,i=t.currentMonth,n=t.currentYear,a=t.daysWidthOnXAxis,r=t.numberOfYears,s=e.minYear,o=0,l=new M(this.ctx),c="year";if(e.minDate>1||e.minMonth>0){var d=l.determineRemainingDaysOfYear(e.minYear,e.minMonth,e.minDate);o=(l.determineDaysOfYear(e.minYear)-d+1)*a,s=e.minYear+1,this.timeScaleArray.push({position:o,value:s,unit:c,year:s,month:y.monthMod(i+1)})}else 1===e.minDate&&0===e.minMonth&&this.timeScaleArray.push({position:o,value:s,unit:c,year:n,month:y.monthMod(i+1)});for(var h=s,u=o,p=0;p1){l=(c.determineDaysOfMonths(n+1,e.minYear)-i+1)*r,o=y.monthMod(n+1);var u=a+h,p=y.monthMod(o),f=o;0===o&&(d="year",f=u,p=1,u+=h+=1),this.timeScaleArray.push({position:l,value:f,unit:d,year:u,month:p})}else this.timeScaleArray.push({position:l,value:o,unit:d,year:a,month:y.monthMod(n)});for(var g=o+1,m=l,v=0,b=1;vs.determineDaysOfMonths(e+1,i)?(c=1,o="month",u=e+=1,e):e},h=(24-e.minHour)*a,u=l,p=d(c,i,n);0===e.minHour&&1===e.minDate?(h=0,u=y.monthMod(e.minMonth),o="month",c=e.minDate):1!==e.minDate&&0===e.minHour&&0===e.minMinute&&(h=0,l=e.minDate,u=l,p=d(c=l,i,n)),this.timeScaleArray.push({position:h,value:u,unit:o,year:this._getYear(n,p,0),month:y.monthMod(p),day:c});for(var f=h,g=0;go.determineDaysOfMonths(e+1,a)&&(g=1,e+=1),{month:e,date:g}},d=function(t,e){return t>o.determineDaysOfMonths(e+1,a)?e+=1:e},h=60-(e.minMinute+e.minSecond/60),u=h*r,p=e.minHour+1,f=p;60===h&&(u=0,f=p=e.minHour);var g=i;f>=24&&(f=0,g+=1,l="day");var m=c(g,n).month;m=d(g,m),this.timeScaleArray.push({position:u,value:p,unit:l,day:g,hour:f,year:a,month:y.monthMod(m)}),f++;for(var v=u,b=0;b=24&&(f=0,l="day",m=c(g+=1,m).month,m=d(g,m));var x=this._getYear(a,m,0);v=60*r+v;var w=0===f?g:f;this.timeScaleArray.push({position:v,value:w,unit:l,hour:f,day:g,year:x,month:y.monthMod(m)}),f++}}},{key:"generateMinuteScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,n=t.currentMinute,a=t.currentHour,r=t.currentDate,s=t.currentMonth,o=t.currentYear,l=t.minutesWidthOnXAxis,c=t.secondsWidthOnXAxis,d=t.numberOfMinutes,h=n+1,u=r,p=s,f=o,g=a,m=(60-i-e/1e3)*c,v=0;v=60&&(h=0,24===(g+=1)&&(g=0)),this.timeScaleArray.push({position:m,value:h,unit:"minute",hour:g,minute:h,day:u,year:this._getYear(f,p,0),month:y.monthMod(p)}),m+=l,h++}},{key:"generateSecondScale",value:function(t){for(var e=t.currentMillisecond,i=t.currentSecond,n=t.currentMinute,a=t.currentHour,r=t.currentDate,s=t.currentMonth,o=t.currentYear,l=t.secondsWidthOnXAxis,c=t.numberOfSeconds,d=i+1,h=n,u=r,p=s,f=o,g=a,m=(1e3-e)/1e3*l,v=0;v=60&&(d=0,++h>=60&&(h=0,24==++g&&(g=0))),this.timeScaleArray.push({position:m,value:d,unit:"second",hour:g,minute:h,second:d,day:u,year:this._getYear(f,p,0),month:y.monthMod(p)}),m+=l,d++}},{key:"createRawDateString",value:function(t,e){var i=t.year;return 0===t.month&&(t.month=1),i+="-"+("0"+t.month.toString()).slice(-2),"day"===t.unit?i+="day"===t.unit?"-"+("0"+e).slice(-2):"-01":i+="-"+("0"+(t.day?t.day:"1")).slice(-2),"hour"===t.unit?i+="hour"===t.unit?"T"+("0"+e).slice(-2):"T00":i+="T"+("0"+(t.hour?t.hour:"0")).slice(-2),"minute"===t.unit?i+=":"+("0"+e).slice(-2):i+=":"+(t.minute?("0"+t.minute).slice(-2):"00"),"second"===t.unit?i+=":"+("0"+e).slice(-2):i+=":00",this.utc&&(i+=".000Z"),i}},{key:"formatDates",value:function(t){var e=this,i=this.w;return t.map((function(t){var n=t.value.toString(),a=new M(e.ctx),r=e.createRawDateString(t,n),s=a.getDate(a.parseDate(r));if(e.utc||(s=a.getDate(a.parseDateWithTimezone(r))),void 0===i.config.xaxis.labels.format){var o="dd MMM",l=i.config.xaxis.labels.datetimeFormatter;"year"===t.unit&&(o=l.year),"month"===t.unit&&(o=l.month),"day"===t.unit&&(o=l.day),"hour"===t.unit&&(o=l.hour),"minute"===t.unit&&(o=l.minute),"second"===t.unit&&(o=l.second),n=a.formatDate(s,o)}else n=a.formatDate(s,i.config.xaxis.labels.format);return{dateString:r,position:t.position,value:n,unit:t.unit,year:t.year,month:t.month}}))}},{key:"removeOverlappingTS",value:function(t){var e,i=this,n=new S(this.ctx),a=!1;t.length>0&&t[0].value&&t.every((function(e){return e.value.length===t[0].value.length}))&&(a=!0,e=n.getTextRects(t[0].value).width);var r=0,s=t.map((function(s,o){if(o>0&&i.w.config.xaxis.labels.hideOverlappingLabels){var l=a?e:n.getTextRects(t[r].value).width,c=t[r].position;return s.position>c+l+10?(r=o,s):null}return s}));return s.filter((function(t){return null!==t}))}},{key:"_getYear",value:function(t,e,i){return t+Math.floor(e/12)+i}}]),t}(),Bt=function(){function t(e,i){o(this,t),this.ctx=i,this.w=i.w,this.el=e}return c(t,[{key:"setupElements",value:function(){var t=this.w.globals,e=this.w.config,i=e.chart.type;t.axisCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble","radar","heatmap","treemap"].indexOf(i)>-1,t.xyCharts=["line","area","bar","rangeBar","rangeArea","candlestick","boxPlot","scatter","bubble"].indexOf(i)>-1,t.isBarHorizontal=("bar"===e.chart.type||"rangeBar"===e.chart.type||"boxPlot"===e.chart.type)&&e.plotOptions.bar.horizontal,t.chartClass=".apexcharts"+t.chartID,t.dom.baseEl=this.el,t.dom.elWrap=document.createElement("div"),S.setAttrs(t.dom.elWrap,{id:t.chartClass.substring(1),class:"apexcharts-canvas "+t.chartClass.substring(1)}),this.el.appendChild(t.dom.elWrap),t.dom.Paper=new window.SVG.Doc(t.dom.elWrap),t.dom.Paper.attr({class:"apexcharts-svg","xmlns:data":"ApexChartsNS",transform:"translate(".concat(e.chart.offsetX,", ").concat(e.chart.offsetY,")")}),t.dom.Paper.node.style.background="dark"!==e.theme.mode||e.chart.background?e.chart.background:"rgba(0, 0, 0, 0.8)",this.setSVGDimensions(),t.dom.elLegendForeign=document.createElementNS(t.SVGNS,"foreignObject"),S.setAttrs(t.dom.elLegendForeign,{x:0,y:0,width:t.svgWidth,height:t.svgHeight}),t.dom.elLegendWrap=document.createElement("div"),t.dom.elLegendWrap.classList.add("apexcharts-legend"),t.dom.elLegendWrap.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),t.dom.elLegendForeign.appendChild(t.dom.elLegendWrap),t.dom.Paper.node.appendChild(t.dom.elLegendForeign),t.dom.elGraphical=t.dom.Paper.group().attr({class:"apexcharts-inner apexcharts-graphical"}),t.dom.elDefs=t.dom.Paper.defs(),t.dom.Paper.add(t.dom.elGraphical),t.dom.elGraphical.add(t.dom.elDefs)}},{key:"plotChartType",value:function(t,e){var i=this.w,n=i.config,a=i.globals,r={series:[],i:[]},s={series:[],i:[]},o={series:[],i:[]},l={series:[],i:[]},c={series:[],i:[]},d={series:[],i:[]},h={series:[],i:[]},u={series:[],i:[]},p={series:[],seriesRangeEnd:[],i:[]};a.series.map((function(e,f){var g=0;void 0!==t[f].type?("column"===t[f].type||"bar"===t[f].type?(a.series.length>1&&n.plotOptions.bar.horizontal&&console.warn("Horizontal bars are not supported in a mixed/combo chart. Please turn off `plotOptions.bar.horizontal`"),c.series.push(e),c.i.push(f),g++,i.globals.columnSeries=c.series):"area"===t[f].type?(s.series.push(e),s.i.push(f),g++):"line"===t[f].type?(r.series.push(e),r.i.push(f),g++):"scatter"===t[f].type?(o.series.push(e),o.i.push(f)):"bubble"===t[f].type?(l.series.push(e),l.i.push(f),g++):"candlestick"===t[f].type?(d.series.push(e),d.i.push(f),g++):"boxPlot"===t[f].type?(h.series.push(e),h.i.push(f),g++):"rangeBar"===t[f].type?(u.series.push(e),u.i.push(f),g++):"rangeArea"===t[f].type?(p.series.push(a.seriesRangeStart[f]),p.seriesRangeEnd.push(a.seriesRangeEnd[f]),p.i.push(f),g++):console.warn("You have specified an unrecognized chart type. Available types for this property are line/area/column/bar/scatter/bubble/candlestick/boxPlot/rangeBar/rangeArea"),g>1&&(a.comboCharts=!0)):(r.series.push(e),r.i.push(f))}));var f=new Ht(this.ctx,e),g=new Pt(this.ctx,e);this.ctx.pie=new It(this.ctx);var m=new Mt(this.ctx);this.ctx.rangeBar=new _t(this.ctx,e);var v=new Lt(this.ctx),b=[];if(a.comboCharts){if(s.series.length>0&&b.push(f.draw(s.series,"area",s.i)),c.series.length>0)if(i.config.chart.stacked){var x=new At(this.ctx,e);b.push(x.draw(c.series,c.i))}else this.ctx.bar=new kt(this.ctx,e),b.push(this.ctx.bar.draw(c.series,c.i));if(p.series.length>0&&b.push(f.draw(p.series,"rangeArea",p.i,p.seriesRangeEnd)),r.series.length>0&&b.push(f.draw(r.series,"line",r.i)),d.series.length>0&&b.push(g.draw(d.series,"candlestick",d.i)),h.series.length>0&&b.push(g.draw(h.series,"boxPlot",h.i)),u.series.length>0&&b.push(this.ctx.rangeBar.draw(u.series,u.i)),o.series.length>0){var y=new Ht(this.ctx,e,!0);b.push(y.draw(o.series,"scatter",o.i))}if(l.series.length>0){var w=new Ht(this.ctx,e,!0);b.push(w.draw(l.series,"bubble",l.i))}}else switch(n.chart.type){case"line":b=f.draw(a.series,"line");break;case"area":b=f.draw(a.series,"area");break;case"bar":n.chart.stacked?b=new At(this.ctx,e).draw(a.series):(this.ctx.bar=new kt(this.ctx,e),b=this.ctx.bar.draw(a.series));break;case"candlestick":b=new Pt(this.ctx,e).draw(a.series,"candlestick");break;case"boxPlot":b=new Pt(this.ctx,e).draw(a.series,n.chart.type);break;case"rangeBar":b=this.ctx.rangeBar.draw(a.series);break;case"rangeArea":b=f.draw(a.seriesRangeStart,"rangeArea",void 0,a.seriesRangeEnd);break;case"heatmap":b=new Tt(this.ctx,e).draw(a.series);break;case"treemap":b=new Ft(this.ctx,e).draw(a.series);break;case"pie":case"donut":case"polarArea":b=this.ctx.pie.draw(a.series);break;case"radialBar":b=m.draw(a.series);break;case"radar":b=v.draw(a.series);break;default:b=f.draw(a.series)}return b}},{key:"setSVGDimensions",value:function(){var t=this.w.globals,e=this.w.config;t.svgWidth=e.chart.width,t.svgHeight=e.chart.height;var i=y.getDimensions(this.el),n=e.chart.width.toString().split(/[0-9]+/g).pop();"%"===n?y.isNumber(i[0])&&(0===i[0].width&&(i=y.getDimensions(this.el.parentNode)),t.svgWidth=i[0]*parseInt(e.chart.width,10)/100):"px"!==n&&""!==n||(t.svgWidth=parseInt(e.chart.width,10));var a=e.chart.height.toString().split(/[0-9]+/g).pop();if("auto"!==t.svgHeight&&""!==t.svgHeight)if("%"===a){var r=y.getDimensions(this.el.parentNode);t.svgHeight=r[1]*parseInt(e.chart.height,10)/100}else t.svgHeight=parseInt(e.chart.height,10);else t.axisCharts?t.svgHeight=t.svgWidth/1.61:t.svgHeight=t.svgWidth/1.2;if(t.svgWidth<0&&(t.svgWidth=0),t.svgHeight<0&&(t.svgHeight=0),S.setAttrs(t.dom.Paper.node,{width:t.svgWidth,height:t.svgHeight}),"%"!==a){var s=e.chart.sparkline.enabled?0:t.axisCharts?e.chart.parentHeightOffset:0;t.dom.Paper.node.parentNode.parentNode.style.minHeight=t.svgHeight+s+"px"}t.dom.elWrap.style.width=t.svgWidth+"px",t.dom.elWrap.style.height=t.svgHeight+"px"}},{key:"shiftGraphPosition",value:function(){var t=this.w.globals,e=t.translateY,i={transform:"translate("+t.translateX+", "+e+")"};S.setAttrs(t.dom.elGraphical.node,i)}},{key:"resizeNonAxisCharts",value:function(){var t=this.w,e=t.globals,i=0,n=t.config.chart.sparkline.enabled?1:15;n+=t.config.grid.padding.bottom,"top"!==t.config.legend.position&&"bottom"!==t.config.legend.position||!t.config.legend.show||t.config.legend.floating||(i=new ut(this.ctx).legendHelpers.getLegendBBox().clwh+10);var a=t.globals.dom.baseEl.querySelector(".apexcharts-radialbar, .apexcharts-pie"),r=2.05*t.globals.radialSize;if(a&&!t.config.chart.sparkline.enabled&&0!==t.config.plotOptions.radialBar.startAngle){var s=y.getBoundingClientRect(a);r=s.bottom;var o=s.bottom-s.top;r=Math.max(2.05*t.globals.radialSize,o)}var l=r+e.translateY+i+n;e.dom.elLegendForeign&&e.dom.elLegendForeign.setAttribute("height",l),t.config.chart.height&&String(t.config.chart.height).indexOf("%")>0||(e.dom.elWrap.style.height=l+"px",S.setAttrs(e.dom.Paper.node,{height:l}),e.dom.Paper.node.parentNode.parentNode.style.minHeight=l+"px")}},{key:"coreCalculations",value:function(){new K(this.ctx).init()}},{key:"resetGlobals",value:function(){var t=this,e=function(){return t.w.config.series.map((function(t){return[]}))},i=new H,n=this.w.globals;i.initGlobalVars(n),n.seriesXvalues=e(),n.seriesYvalues=e()}},{key:"isMultipleY",value:function(){if(this.w.config.yaxis.constructor===Array&&this.w.config.yaxis.length>1)return this.w.globals.isMultipleYAxis=!0,!0}},{key:"xySettings",value:function(){var t=null,e=this.w;if(e.globals.axisCharts){if("back"===e.config.xaxis.crosshairs.position&&new it(this.ctx).drawXCrosshairs(),"back"===e.config.yaxis[0].crosshairs.position&&new it(this.ctx).drawYCrosshairs(),"datetime"===e.config.xaxis.type&&void 0===e.config.xaxis.labels.formatter){this.ctx.timeScale=new $t(this.ctx);var i=[];isFinite(e.globals.minX)&&isFinite(e.globals.maxX)&&!e.globals.isBarHorizontal?i=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minX,e.globals.maxX):e.globals.isBarHorizontal&&(i=this.ctx.timeScale.calculateTimeScaleTicks(e.globals.minY,e.globals.maxY)),this.ctx.timeScale.recalcDimensionsBasedOnFormat(i)}t=new k(this.ctx).getCalculatedRatios()}return t}},{key:"updateSourceChart",value:function(t){this.ctx.w.globals.selection=void 0,this.ctx.updateHelpers._updateOptions({chart:{selection:{xaxis:{min:t.w.globals.minX,max:t.w.globals.maxX}}}},!1,!1)}},{key:"setupBrushHandler",value:function(){var t=this,e=this.w;if(e.config.chart.brush.enabled&&"function"!=typeof e.config.chart.events.selection){var i=Array.isArray(e.config.chart.brush.targets)||[e.config.chart.brush.target];i.forEach((function(e){var i=ApexCharts.getChartByID(e);i.w.globals.brushSource=t.ctx,"function"!=typeof i.w.config.chart.events.zoomed&&(i.w.config.chart.events.zoomed=function(){t.updateSourceChart(i)}),"function"!=typeof i.w.config.chart.events.scrolled&&(i.w.config.chart.events.scrolled=function(){t.updateSourceChart(i)})})),e.config.chart.events.selection=function(t,n){i.forEach((function(t){var i=ApexCharts.getChartByID(t),a=y.clone(e.config.yaxis);if(e.config.chart.brush.autoScaleYaxis&&1===i.w.globals.series.length){var s=new Z(i);a=s.autoScaleY(i,a,n)}var o=i.w.config.yaxis.reduce((function(t,e,n){return[].concat(v(t),[r(r({},i.w.config.yaxis[n]),{},{min:a[0].min,max:a[0].max})])}),[]);i.ctx.updateHelpers._updateOptions({xaxis:{min:n.xaxis.min,max:n.xaxis.max},yaxis:o},!1,!1,!1,!1)}))}}}}]),t}(),Yt=function(){function t(e){o(this,t),this.ctx=e,this.w=e.w}return c(t,[{key:"_updateOptions",value:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((function(o){var l=[e.ctx];a&&(l=e.ctx.getSyncedCharts()),e.ctx.w.globals.isExecCalled&&(l=[e.ctx],e.ctx.w.globals.isExecCalled=!1),l.forEach((function(a,c){var d=a.w;if(d.globals.shouldAnimate=n,i||(d.globals.resized=!0,d.globals.dataChanged=!0,n&&a.series.getPreviousPaths()),t&&"object"===s(t)&&(a.config=new N(t),t=k.extendArrayProps(a.config,t,d),a.w.globals.chartID!==e.ctx.w.globals.chartID&&delete t.series,d.config=y.extend(d.config,t),r&&(d.globals.lastXAxis=t.xaxis?y.clone(t.xaxis):[],d.globals.lastYAxis=t.yaxis?y.clone(t.yaxis):[],d.globals.initialConfig=y.extend({},d.config),d.globals.initialSeries=y.clone(d.config.series),t.series))){for(var h=0;h2&&void 0!==arguments[2]&&arguments[2];return new Promise((function(a){var r,s=i.w;return s.globals.shouldAnimate=e,s.globals.dataChanged=!0,e&&i.ctx.series.getPreviousPaths(),s.globals.axisCharts?(0===(r=t.map((function(t,e){return i._extendSeries(t,e)}))).length&&(r=[{data:[]}]),s.config.series=r):s.config.series=t.slice(),n&&(s.globals.initialConfig.series=y.clone(s.config.series),s.globals.initialSeries=y.clone(s.config.series)),i.ctx.update().then((function(){a(i.ctx)}))}))}},{key:"_extendSeries",value:function(t,e){var i=this.w,n=i.config.series[e];return r(r({},i.config.series[e]),{},{name:t.name?t.name:null==n?void 0:n.name,color:t.color?t.color:null==n?void 0:n.color,type:t.type?t.type:null==n?void 0:n.type,group:t.group?t.group:null==n?void 0:n.group,data:t.data?t.data:null==n?void 0:n.data,zIndex:void 0!==t.zIndex?t.zIndex:e})}},{key:"toggleDataPointSelection",value:function(t,e){var i=this.w,n=null,a=".apexcharts-series[data\\:realIndex='".concat(t,"']");return i.globals.axisCharts?n=i.globals.dom.Paper.select("".concat(a," path[j='").concat(e,"'], ").concat(a," circle[j='").concat(e,"'], ").concat(a," rect[j='").concat(e,"']")).members[0]:void 0===e&&(n=i.globals.dom.Paper.select("".concat(a," path[j='").concat(t,"']")).members[0],"pie"!==i.config.chart.type&&"polarArea"!==i.config.chart.type&&"donut"!==i.config.chart.type||this.ctx.pie.pieClicked(t)),n?(new S(this.ctx).pathMouseDown(n,null),n.node?n.node:null):(console.warn("toggleDataPointSelection: Element not found"),null)}},{key:"forceXAxisUpdate",value:function(t){var e=this.w;if(["min","max"].forEach((function(i){void 0!==t.xaxis[i]&&(e.config.xaxis[i]=t.xaxis[i],e.globals.lastXAxis[i]=t.xaxis[i])})),t.xaxis.categories&&t.xaxis.categories.length&&(e.config.xaxis.categories=t.xaxis.categories),e.config.xaxis.convertedCatToNumeric){var i=new j(t);t=i.convertCatToNumericXaxis(t,this.ctx)}return t}},{key:"forceYAxisUpdate",value:function(t){return t.chart&&t.chart.stacked&&"100%"===t.chart.stackType&&(Array.isArray(t.yaxis)?t.yaxis.forEach((function(e,i){t.yaxis[i].min=0,t.yaxis[i].max=100})):(t.yaxis.min=0,t.yaxis.max=100)),t}},{key:"revertDefaultAxisMinMax",value:function(t){var e=this,i=this.w,n=i.globals.lastXAxis,a=i.globals.lastYAxis;t&&t.xaxis&&(n=t.xaxis),t&&t.yaxis&&(a=t.yaxis),i.config.xaxis.min=n.min,i.config.xaxis.max=n.max;i.config.yaxis.map((function(t,n){i.globals.zoomed||void 0!==a[n]?function(t){void 0!==a[t]&&(i.config.yaxis[t].min=a[t].min,i.config.yaxis[t].max=a[t].max)}(n):void 0!==e.ctx.opts.yaxis[n]&&(t.min=e.ctx.opts.yaxis[n].min,t.max=e.ctx.opts.yaxis[n].max)}))}}]),t}();Rt="undefined"!=typeof window?window:void 0,Xt=function(t,e){var i=(void 0!==this?this:t).SVG=function(t){if(i.supported)return t=new i.Doc(t),i.parser.draw||i.prepare(),t};if(i.ns="http://www.w3.org/2000/svg",i.xmlns="http://www.w3.org/2000/xmlns/",i.xlink="http://www.w3.org/1999/xlink",i.svgjs="http://svgjs.dev",i.supported=!0,!i.supported)return!1;i.did=1e3,i.eid=function(t){return"Svgjs"+h(t)+i.did++},i.create=function(t){var i=e.createElementNS(this.ns,t);return i.setAttribute("id",this.eid(t)),i},i.extend=function(){var t,e;e=(t=[].slice.call(arguments)).pop();for(var n=t.length-1;n>=0;n--)if(t[n])for(var a in e)t[n].prototype[a]=e[a];i.Set&&i.Set.inherit&&i.Set.inherit()},i.invent=function(t){var e="function"==typeof t.create?t.create:function(){this.constructor.call(this,i.create(t.create))};return t.inherit&&(e.prototype=new t.inherit),t.extend&&i.extend(e,t.extend),t.construct&&i.extend(t.parent||i.Container,t.construct),e},i.adopt=function(e){return e?e.instance?e.instance:((n="svg"==e.nodeName?e.parentNode instanceof t.SVGElement?new i.Nested:new i.Doc:"linearGradient"==e.nodeName?new i.Gradient("linear"):"radialGradient"==e.nodeName?new i.Gradient("radial"):i[h(e.nodeName)]?new(i[h(e.nodeName)]):new i.Element(e)).type=e.nodeName,n.node=e,e.instance=n,n instanceof i.Doc&&n.namespace().defs(),n.setData(JSON.parse(e.getAttribute("svgjs:data"))||{}),n):null;var n},i.prepare=function(){var t=e.getElementsByTagName("body")[0],n=(t?new i.Doc(t):i.adopt(e.documentElement).nested()).size(2,0);i.parser={body:t||e.documentElement,draw:n.style("opacity:0;position:absolute;left:-100%;top:-100%;overflow:hidden").node,poly:n.polyline().node,path:n.path().node,native:i.create("svg")}},i.parser={native:i.create("svg")},e.addEventListener("DOMContentLoaded",(function(){i.parser.draw||i.prepare()}),!1),i.regex={numberAndUnit:/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,hex:/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,rgb:/rgb\((\d+),(\d+),(\d+)\)/,reference:/#([a-z0-9\-_]+)/i,transforms:/\)\s*,?\s*/,whitespace:/\s/g,isHex:/^#[a-f0-9]{3,6}$/i,isRgb:/^rgb\(/,isCss:/[^:]+:[^;]+;?/,isBlank:/^(\s+)?$/,isNumber:/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,isPercent:/^-?[\d\.]+%$/,isImage:/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,delimiter:/[\s,]+/,hyphen:/([^e])\-/gi,pathLetters:/[MLHVCSQTAZ]/gi,isPathLetter:/[MLHVCSQTAZ]/i,numbersWithDots:/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,dots:/\./g},i.utils={map:function(t,e){for(var i=t.length,n=[],a=0;a1?1:t,new i.Color({r:~~(this.r+(this.destination.r-this.r)*t),g:~~(this.g+(this.destination.g-this.g)*t),b:~~(this.b+(this.destination.b-this.b)*t)})):this}}),i.Color.test=function(t){return t+="",i.regex.isHex.test(t)||i.regex.isRgb.test(t)},i.Color.isRgb=function(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b},i.Color.isColor=function(t){return i.Color.isRgb(t)||i.Color.test(t)},i.Array=function(t,e){0==(t=(t||[]).valueOf()).length&&e&&(t=e.valueOf()),this.value=this.parse(t)},i.extend(i.Array,{toString:function(){return this.value.join(" ")},valueOf:function(){return this.value},parse:function(t){return t=t.valueOf(),Array.isArray(t)?t:this.split(t)}}),i.PointArray=function(t,e){i.Array.call(this,t,e||[[0,0]])},i.PointArray.prototype=new i.Array,i.PointArray.prototype.constructor=i.PointArray;for(var n={M:function(t,e,i){return e.x=i.x=t[0],e.y=i.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Z:function(t,e,i){return e.x=i.x,e.y=i.y,["Z"]}},a="mlhvqtcsaz".split(""),r=0,o=a.length;rl);return r},bbox:function(){return i.parser.draw||i.prepare(),i.parser.path.setAttribute("d",this.toString()),i.parser.path.getBBox()}}),i.Number=i.invent({create:function(t,e){this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(i.regex.numberAndUnit))&&(this.value=parseFloat(e[1]),"%"==e[5]?this.value/=100:"s"==e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof i.Number&&(this.value=t.valueOf(),this.unit=t.unit)},extend:{toString:function(){return("%"==this.unit?~~(1e8*this.value)/1e6:"s"==this.unit?this.value/1e3:this.value)+this.unit},toJSON:function(){return this.toString()},valueOf:function(){return this.value},plus:function(t){return t=new i.Number(t),new i.Number(this+t,this.unit||t.unit)},minus:function(t){return t=new i.Number(t),new i.Number(this-t,this.unit||t.unit)},times:function(t){return t=new i.Number(t),new i.Number(this*t,this.unit||t.unit)},divide:function(t){return t=new i.Number(t),new i.Number(this/t,this.unit||t.unit)},to:function(t){var e=new i.Number(this);return"string"==typeof t&&(e.unit=t),e},morph:function(t){return this.destination=new i.Number(t),t.relative&&(this.destination.value+=this.value),this},at:function(t){return this.destination?new i.Number(this.destination).minus(this).times(t).plus(this):this}}}),i.Element=i.invent({create:function(t){this._stroke=i.defaults.attrs.stroke,this._event=null,this.dom={},(this.node=t)&&(this.type=t.nodeName,this.node.instance=this,this._stroke=t.getAttribute("stroke")||this._stroke)},extend:{x:function(t){return this.attr("x",t)},y:function(t){return this.attr("y",t)},cx:function(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)},cy:function(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)},move:function(t,e){return this.x(t).y(e)},center:function(t,e){return this.cx(t).cy(e)},width:function(t){return this.attr("width",t)},height:function(t){return this.attr("height",t)},size:function(t,e){var n=p(this,t,e);return this.width(new i.Number(n.width)).height(new i.Number(n.height))},clone:function(t){this.writeDataToDom();var e=m(this.node.cloneNode(!0));return t?t.add(e):this.after(e),e},remove:function(){return this.parent()&&this.parent().removeElement(this),this},replace:function(t){return this.after(t).remove(),t},addTo:function(t){return t.put(this)},putIn:function(t){return t.add(this)},id:function(t){return this.attr("id",t)},show:function(){return this.style("display","")},hide:function(){return this.style("display","none")},visible:function(){return"none"!=this.style("display")},toString:function(){return this.attr("id")},classes:function(){var t=this.attr("class");return null==t?[]:t.trim().split(i.regex.delimiter)},hasClass:function(t){return-1!=this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){var e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!=t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)},reference:function(t){return i.get(this.attr(t))},parent:function(e){var n=this;if(!n.node.parentNode)return null;if(n=i.adopt(n.node.parentNode),!e)return n;for(;n&&n.node instanceof t.SVGElement;){if("string"==typeof e?n.matches(e):n instanceof e)return n;if(!n.node.parentNode||"#document"==n.node.parentNode.nodeName)return null;n=i.adopt(n.node.parentNode)}},doc:function(){return this instanceof i.Doc?this:this.parent(i.Doc)},parents:function(t){var e=[],i=this;do{if(!(i=i.parent(t))||!i.node)break;e.push(i)}while(i.parent);return e},matches:function(t){return function(t,e){return(t.matches||t.matchesSelector||t.msMatchesSelector||t.mozMatchesSelector||t.webkitMatchesSelector||t.oMatchesSelector).call(t,e)}(this.node,t)},native:function(){return this.node},svg:function(t){var n=e.createElement("svg");if(!(t&&this instanceof i.Parent))return n.appendChild(t=e.createElement("svg")),this.writeDataToDom(),t.appendChild(this.node.cloneNode(!0)),n.innerHTML.replace(/^