apexcharts 7.2.0 → 7.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +30 -11
- package/dist/apexcharts.common.js +2 -2
- package/dist/apexcharts.core.js +545 -463
- package/dist/apexcharts.core.min.js +2 -2
- package/dist/apexcharts.esm.js +1149 -801
- package/dist/apexcharts.js +684 -254
- package/dist/apexcharts.min.js +2 -2
- package/dist/apexcharts.ssr.common.js +2 -2
- package/dist/apexcharts.ssr.esm.js +684 -254
- package/dist/area.common.js +1 -1
- package/dist/area.esm.js +1 -1
- package/dist/bar.common.js +2 -2
- package/dist/bar.esm.js +20 -10
- package/dist/bar.js +2 -2
- package/dist/boxPlot.common.js +2 -2
- package/dist/boxPlot.esm.js +20 -10
- package/dist/bubble.common.js +1 -1
- package/dist/bubble.esm.js +1 -1
- package/dist/candlestick.common.js +2 -2
- package/dist/candlestick.esm.js +20 -10
- package/dist/candlestick.js +2 -2
- package/dist/column.common.js +2 -2
- package/dist/column.esm.js +20 -10
- package/dist/core.common.js +2 -2
- package/dist/core.esm.js +545 -463
- package/dist/donut.common.js +1 -1
- package/dist/donut.esm.js +1 -1
- package/dist/dumbbell.common.js +2 -2
- package/dist/dumbbell.esm.js +20 -10
- package/dist/features/all.common.js +2 -2
- package/dist/features/all.esm.js +364 -26
- package/dist/features/annotations.common.js +1 -1
- package/dist/features/annotations.esm.js +1 -1
- package/dist/features/annotations.js +1 -1
- package/dist/features/context-menu.common.js +1 -1
- package/dist/features/context-menu.esm.js +1 -1
- package/dist/features/context-menu.js +1 -1
- package/dist/features/drilldown.common.js +1 -1
- package/dist/features/drilldown.esm.js +1 -1
- package/dist/features/drilldown.js +1 -1
- package/dist/features/dumbbell.common.js +1 -1
- package/dist/features/dumbbell.esm.js +1 -1
- package/dist/features/dumbbell.js +1 -1
- package/dist/features/exports.common.js +2 -2
- package/dist/features/exports.esm.js +12 -14
- package/dist/features/exports.js +2 -2
- package/dist/features/facet.common.js +1 -1
- package/dist/features/facet.esm.js +1 -1
- package/dist/features/facet.js +1 -1
- package/dist/features/history.common.js +1 -1
- package/dist/features/history.esm.js +1 -1
- package/dist/features/history.js +1 -1
- package/dist/features/ink.common.js +1 -1
- package/dist/features/ink.esm.js +1 -1
- package/dist/features/ink.js +1 -1
- package/dist/features/keyboard.common.js +2 -2
- package/dist/features/keyboard.esm.js +14 -1
- package/dist/features/keyboard.js +2 -2
- package/dist/features/legend.common.js +1 -1
- package/dist/features/legend.esm.js +1 -1
- package/dist/features/legend.js +1 -1
- package/dist/features/link.common.js +1 -1
- package/dist/features/link.esm.js +38 -38
- package/dist/features/link.js +1 -1
- package/dist/features/marks.common.js +1 -1
- package/dist/features/marks.esm.js +1 -1
- package/dist/features/marks.js +1 -1
- package/dist/features/measure.common.js +1 -1
- package/dist/features/measure.esm.js +1 -1
- package/dist/features/measure.js +1 -1
- package/dist/features/morph.common.js +1 -1
- package/dist/features/morph.esm.js +1 -1
- package/dist/features/morph.js +1 -1
- package/dist/features/perspectives.common.js +1 -1
- package/dist/features/perspectives.esm.js +11 -11
- package/dist/features/perspectives.js +1 -1
- package/dist/features/raincloud.common.js +1 -1
- package/dist/features/raincloud.esm.js +1 -1
- package/dist/features/raincloud.js +1 -1
- package/dist/features/renderer-canvas.common.js +1 -1
- package/dist/features/renderer-canvas.esm.js +1 -1
- package/dist/features/renderer-canvas.js +1 -1
- package/dist/features/stats.common.js +1 -1
- package/dist/features/stats.esm.js +1 -1
- package/dist/features/stats.js +1 -1
- package/dist/features/storyboard.common.js +1 -1
- package/dist/features/storyboard.esm.js +11 -11
- package/dist/features/storyboard.js +1 -1
- package/dist/features/streamgraph.common.js +1 -1
- package/dist/features/streamgraph.esm.js +1 -1
- package/dist/features/streamgraph.js +1 -1
- package/dist/features/toolbar.common.js +2 -2
- package/dist/features/toolbar.esm.js +172 -25
- package/dist/features/toolbar.js +2 -2
- package/dist/features/trellis.common.js +1 -1
- package/dist/features/trellis.esm.js +1 -1
- package/dist/features/trellis.js +1 -1
- package/dist/features/waterfall.common.js +1 -1
- package/dist/features/waterfall.esm.js +1 -1
- package/dist/features/waterfall.js +1 -1
- package/dist/features/weave.common.js +2 -2
- package/dist/features/weave.esm.js +180 -2
- package/dist/features/weave.js +2 -2
- package/dist/heatmap.common.js +1 -1
- package/dist/heatmap.esm.js +1 -1
- package/dist/heatmap.js +1 -1
- package/dist/histogram.common.js +2 -2
- package/dist/histogram.esm.js +20 -10
- package/dist/line.common.js +1 -1
- package/dist/line.esm.js +1 -1
- package/dist/line.js +1 -1
- package/dist/pictograms.common.js +1 -1
- package/dist/pictograms.esm.js +1 -1
- package/dist/pictograms.js +1 -1
- package/dist/pie.common.js +1 -1
- package/dist/pie.esm.js +1 -1
- package/dist/pie.js +1 -1
- package/dist/polarArea.common.js +1 -1
- package/dist/polarArea.esm.js +1 -1
- package/dist/radar.common.js +1 -1
- package/dist/radar.esm.js +1 -1
- package/dist/radar.js +1 -1
- package/dist/radialBar.common.js +1 -1
- package/dist/radialBar.esm.js +1 -1
- package/dist/radialBar.js +1 -1
- package/dist/raincloud.common.js +2 -2
- package/dist/raincloud.esm.js +20 -10
- package/dist/rangeArea.common.js +1 -1
- package/dist/rangeArea.esm.js +1 -1
- package/dist/rangeBar.common.js +2 -2
- package/dist/rangeBar.esm.js +20 -10
- package/dist/scatter.common.js +1 -1
- package/dist/scatter.esm.js +1 -1
- package/dist/streamgraph.common.js +1 -1
- package/dist/streamgraph.esm.js +1 -1
- package/dist/sunburst.common.js +1 -1
- package/dist/sunburst.esm.js +1 -1
- package/dist/sunburst.js +1 -1
- package/dist/treemap.common.js +1 -1
- package/dist/treemap.esm.js +1 -1
- package/dist/treemap.js +1 -1
- package/dist/unit-shapes.common.js +1 -1
- package/dist/unit-shapes.esm.js +1 -1
- package/dist/unit-shapes.js +1 -1
- package/dist/unit.common.js +1 -1
- package/dist/unit.esm.js +79 -79
- package/dist/unit.js +1 -1
- package/dist/violin.common.js +2 -2
- package/dist/violin.esm.js +20 -10
- package/dist/violin.js +2 -2
- package/dist/waterfall.common.js +2 -2
- package/dist/waterfall.esm.js +20 -10
- package/package.json +2 -2
- package/src/apexcharts.js +39 -15
- package/src/charts/common/bar/Helpers.js +31 -12
- package/src/modules/Data.js +8 -2
- package/src/modules/Exports.js +14 -12
- package/src/modules/Formatters.js +24 -1
- package/src/modules/Range.js +28 -1
- package/src/modules/Toolbar.js +112 -2
- package/src/modules/ZoomPanSelection.js +85 -7
- package/src/modules/accessibility/KeyboardNavigation.js +14 -0
- package/src/modules/axes/YAxis.js +12 -15
- package/src/modules/helpers/UpdateHelpers.js +25 -8
- package/src/modules/settings/Globals.js +5 -10
- package/src/modules/settings/Options.js +15 -0
- package/src/modules/weave/PluginAPI.js +57 -1
- package/src/modules/weave/WeaveHost.js +148 -0
- package/src/ssr/DOMShim.js +50 -0
- package/src/types/internal.d.ts +1 -1
- package/src/utils/Utils.js +6 -9
- package/types/apexcharts.d.ts +17 -0
package/dist/donut.common.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.4.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
5
|
"use strict";var e=Object.defineProperty,t=Object.defineProperties,a=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable,l=(t,a,i)=>a in t?e(t,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[a]=i,r=(e,t)=>{for(var a in t||(t={}))s.call(t,a)&&l(e,a,t[a]);if(i)for(var a of i(t))n.call(t,a)&&l(e,a,t[a]);return e},o=(e,i)=>t(e,a(i));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function h(e){if(e&&e.__esModule)return e;const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e)for(const a in e)if("default"!==a){const i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,i.get?i:{enumerable:!0,get:()=>e[a]})}return t.default=e,Object.freeze(t)}const c=h(require("apexcharts/core")),d=c.__apex_Animations,g=c.__apex_Fill,p=c.__apex_Utils,f=c.__apex_Graphics,u=c.__apex_Filters,b=c.__apex_Scales;class m{constructor(e){this.w=e}drawYAxisTexts(e,t,a,i){const s=this.w,n=s.config.yaxis[0],l=s.formatters.yLabelFormatters[0];return new f(this.w).drawText({x:e+n.labels.offsetX,y:t+n.labels.offsetY,text:l(i,a),textAnchor:"middle",fontSize:n.labels.style.fontSize,fontFamily:n.labels.style.fontFamily,foreColor:Array.isArray(n.labels.style.colors)?n.labels.style.colors[a]:n.labels.style.colors})}getMaxLabelWidth(e,{fontSize:t,fontFamily:a}={}){const i=new f(this.w);let s=0;return e.forEach(e=>{if(null==e||""===e)return;const n=i.getTextRects(`${e}`,t||"12px",a,"");s=Math.max(s,n.width)}),s}drawExternalLabel(e){return function(e,t){const{lines:a,lineHeight:i,anchor:s,elbow:n,labelX:l,labelY:r,side:o,connector:h,style:c,foreColor:d}=t,g=new f(e),p=g.group({class:t.groupClass||"apexcharts-outer-label-group"});if(h.show){const e=`M ${s.x} ${s.y} L ${n.x} ${n.y} L ${l} ${r}`,a=g.drawPath({d:e,stroke:h.color,strokeWidth:h.width,fill:"none",strokeLinecap:"round"});a.node.classList.add(t.connectorClass||"apexcharts-outer-label-connector"),p.add(a)}const u="right"===o?l+4:l-4,b=a.length,m=r-(b-1)*i/2,x=g.drawText({x:u,y:m,text:1===b?a[0]:a,textAnchor:"right"===o?"start":"end",fontSize:c.fontSize,fontFamily:c.fontFamily,fontWeight:c.fontWeight,foreColor:d,dominantBaseline:"central",cssClass:t.textClass||"apexcharts-outer-label"});if(b>1){const e=x.node.getElementsByTagName("tspan");for(let t=0;t<e.length;t++)e[t].setAttribute("x",`${u}`),e[t].setAttribute("dy",0===t?"0":`${i}`)}return p.add(x),p}(this.w,o(r({},e),{groupClass:"apexcharts-pie-name-label-group",textClass:"apexcharts-pie-name-label",connectorClass:"apexcharts-pie-label-connector"}))}}const x=c.__apex_Environment_Environment,y=Math.PI/180,A=180/Math.PI;function w(e,t,a,i){return{x:e+a*Math.cos((i-90)*y),y:t+a*Math.sin((i-90)*y)}}const S=e=>`${e.x} ${e.y}`;function v({cx:e,cy:t,rIn:a,rOut:i,a0:s,a1:n,r:l,spanDeg:r}){const o=(a,i)=>w(e,t,a,i),h=l/i*A,c=l/a*A,d=o(i,s+h),g=o(i,n-h),p=r-2*h>180?1:0,f=o(i,n),u=o(i-l,n),b=o(i,s),m=o(i-l,s),x=o(a,n-c),y=o(a,s+c),v=r-2*c>180?1:0,L=o(a,n),O=o(a+l,n),z=o(a,s),C=o(a+l,s);return["M",S(d),"A",i,i,0,p,1,S(g),"Q",S(f),S(u),"L",S(O),"Q",S(L),S(x),"A",a,a,0,v,0,S(y),"Q",S(z),S(C),"L",S(m),"Q",S(b),S(d),"Z"].join(" ")}class L{constructor(e,t){this.ctx=t,this.w=e,this.chartType=this.w.config.chart.type,this.initialAnim=this.w.config.chart.animations.enabled,this.dynamicAnim=this.initialAnim&&this.w.config.chart.animations.dynamicAnimation.enabled,this.animBeginArr=[0],this.animDur=0,this.donutDataLabels=this.w.config.plotOptions.pie.donut.labels,this.lineColorArr=void 0!==e.globals.stroke.colors?e.globals.stroke.colors:e.globals.colors,this.defaultSize=Math.min(e.layout.gridWidth,e.layout.gridHeight),this.centerY=e.layout.gridHeight/2,this.centerX=e.layout.gridWidth/2,"radialBar"===e.config.chart.type?this.fullAngle=360:this.fullAngle=Math.abs(e.config.plotOptions.pie.endAngle-e.config.plotOptions.pie.startAngle),this.initialAngle=e.config.plotOptions.pie.startAngle%this.fullAngle,e.globals.radialSize=this.defaultSize/2.05-e.config.stroke.width-(e.config.chart.sparkline.enabled?0:e.config.chart.dropShadow.blur),this.externalCfg=e.config.plotOptions.pie.dataLabels.external;const a=e.config.dataLabels.style;this.externalLabelStyle={fontSize:this.externalCfg.fontSize||a.fontSize,fontFamily:this.externalCfg.fontFamily||a.fontFamily,fontWeight:this.externalCfg.fontWeight||a.fontWeight},this.externalLabels=[],this.externalLabelMaxLines=1,this.externalLabelLineH=parseFloat(this.externalLabelStyle.fontSize)||12,e.globals.pieExternalLabelMarginY=0,this.showExternalLabels=this.externalCfg.show&&"polarArea"!==this.chartType,this.showExternalLabels&&!e.globals.noData&&this.reserveExternalLabelSpace(),this.donutSize=e.globals.radialSize*parseInt(e.config.plotOptions.pie.donut.size,10)/100;const i=e.config.plotOptions.pie.customScale,s=e.layout.gridWidth/2,n=e.layout.gridHeight/2;this.translateX=s-s*i,this.translateY=n-n*i,this.dataLabelsGroup=new f(this.w).group({class:"apexcharts-datalabels-group",transform:`translate(${this.translateX}, ${this.translateY}) scale(${i})`}),this.maxY=0,this.sliceLabels=[],this.sliceSizes=[],this.prevSliceSizes=[],this.sliceLabelGroups={},this.externalLabelGroups={},this.elHoverOutline=null,this.elHoverOutlinePath=null,this.hoverOutlineIndex=-1,this.prevSectorAngleArr=[]}getExternalLabelText(e){var t,a,i;const s=this.w,n=s.seriesData.seriesNames[e],l=this.externalCfg.formatter;return"function"==typeof l?l(n,{seriesIndex:e,percent:null==(a=null==(t=s.globals.seriesPercent)?void 0:t[e])?void 0:a[0],value:null==(i=s.globals.seriesTotals)?void 0:i[e],w:s}):null==n?"":`${n}`}getExternalLabelLines(e){const t=this.getExternalLabelText(e);return(Array.isArray(t)?t:`${null==t?"":t}`.split("\n")).map(e=>null==e?"":`${e}`)}reserveExternalLabelSpace(){const e=this.w,t=new m(e),a=(e.seriesData.seriesNames||[]).map((e,t)=>this.getExternalLabelLines(t)),i=t.getMaxLabelWidth(a.flat(),{fontSize:this.externalLabelStyle.fontSize,fontFamily:this.externalLabelStyle.fontFamily});this.externalLabelMaxLines=a.reduce((e,t)=>Math.max(e,t.length),1),this.externalLabelLineH=Math.round(1.35*(parseFloat(this.externalLabelStyle.fontSize)||12));const s=this.externalCfg.connector,n=this.externalLabelMaxLines*this.externalLabelLineH,l=i+(s.length||0)+(s.gap||0)+12,r=n/2+(s.gap||0)+6,o=Math.min(e.globals.radialSize,e.layout.gridWidth/2-l,e.layout.gridHeight/2-r);e.globals.radialSize=Math.max(o,.15*this.defaultSize),e.globals.pieExternalLabelMarginY=r;const h=e.config.chart.height?String(e.config.chart.height):"",c=""!==h&&"auto"!==h;this.centerY=c?e.layout.gridHeight/2:e.globals.radialSize+r}draw(e){var t;const a=this.w,i=new f(this.w),s=i.group({class:"apexcharts-pie"});if(a.globals.noData)return s;let n=0;for(let t=0;t<e.length;t++)n+=p.negToZero(e[t]);const l=[],r=i.group();0===n&&(n=1e-5),e.forEach(e=>{this.maxY=Math.max(this.maxY,e)}),a.config.yaxis[0].max&&(this.maxY=a.config.yaxis[0].max),"back"===a.config.grid.position&&"polarArea"===this.chartType&&this.drawPolarElements(s);const o=a.globals.collapsedSeriesIndices||[];let h=1;if("polarArea"===this.chartType){let t=0;for(let a=0;a<e.length;a++)-1===o.indexOf(a)&&t++;h=Math.max(1,t)}for(let t=0;t<e.length;t++){const i=this.fullAngle*p.negToZero(e[t])/n;l.push(i),"polarArea"===this.chartType?(l[t]=o.indexOf(t)>-1?0:this.fullAngle/h,this.sliceSizes.push(a.globals.radialSize*e[t]/(this.maxY||1))):this.sliceSizes.push(a.globals.radialSize)}const c=!0===(null==(t=this.ctx.morphTypeChange)?void 0:t.isActive());if(a.globals.dataChanged&&!c)if("polarArea"===this.chartType){const e=a.globals.previousPaths,t=a.globals.prevPolarAngles;if(Array.isArray(t)&&t.length===e.length)this.prevSectorAngleArr=t.slice();else for(let t=0;t<e.length;t++)this.prevSectorAngleArr.push(this.fullAngle/Math.max(1,e.length));let i=0;for(let t=0;t<e.length;t++)i=Math.max(i,p.negToZero(e[t]));a.config.yaxis[0].max&&(i=a.config.yaxis[0].max),this.prevSliceSizes=e.map(e=>a.globals.radialSize*p.negToZero(e)/(i||1))}else{let e,t=0;for(let e=0;e<a.globals.previousPaths.length;e++)t+=p.negToZero(a.globals.previousPaths[e]);for(let i=0;i<a.globals.previousPaths.length;i++)e=this.fullAngle*p.negToZero(a.globals.previousPaths[i])/t,this.prevSectorAngleArr.push(e)}if("polarArea"===this.chartType&&(a.globals.prevPolarAngles=l.slice()),this.donutSize<0&&(this.donutSize=0),"donut"===this.chartType){const e=i.drawCircle(this.donutSize);e.attr({cx:this.centerX,cy:this.centerY,fill:a.config.plotOptions.pie.donut.background?a.config.plotOptions.pie.donut.background:"transparent"}),r.add(e)}const d=this.drawArcs(l,e);if(this.sliceLabels.forEach(e=>{d.add(e)}),r.attr({transform:`translate(${this.translateX}, ${this.translateY}) scale(${a.config.plotOptions.pie.customScale})`}),r.add(d),s.add(r),this.donutDataLabels.show){const e=this.initialAnim&&!a.globals.resized&&!a.globals.dataChanged&&this.animDur>0,t=this.renderInnerDataLabels(this.dataLabelsGroup,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:e?0:this.donutDataLabels.show});if(e){const e=this.dataLabelsGroup.node;e.style.transition="opacity 280ms ease-out",setTimeout(()=>{e.style.opacity="1"},this.animDur)}s.add(t)}return"front"===a.config.grid.position&&"polarArea"===this.chartType&&this.drawPolarElements(s),s}drawArcs(e,t){var a,i,s,n,l;const r=this.w,o=new u(this.w),h=new f(this.w),c=new g(this.w),d=h.group({class:"apexcharts-slices"});this.elHoverOutline=h.group({class:"apexcharts-pie-hover-outline"}),this.elHoverOutline.node.style.pointerEvents="none",this.elHoverOutline.node.style.opacity="0",r.config.chart.animations.enabled&&(this.elHoverOutline.node.style.transition="opacity 180ms ease-out"),d.add(this.elHoverOutline);let b=this.initialAngle,y=this.initialAngle,A=this.initialAngle,w=this.initialAngle;this.strokeWidth=r.config.stroke.show?r.config.stroke.width:0;const S=!0===(null==(a=this.ctx.morphTypeChange)?void 0:a.isActive());for(let a=0;a<e.length;a++){const g=h.group({class:"apexcharts-series apexcharts-pie-series",seriesName:p.escapeString(r.seriesData.seriesNames[a]),rel:a+1,"data:realIndex":a});d.add(g),b=A,y=w,A=b+e[a],w=y+this.prevSectorAngleArr[a];const m=A<b?this.fullAngle+A-b:A-b,x=c.fillPath({seriesNumber:a,size:this.sliceSizes[a],value:t[a]}),v=S?this.ctx.morphTypeChange.getInitialPathFor(a,0):null,L="polarArea"===this.chartType&&r.globals.dataChanged&&!S?this.prevSliceSizes[a]||0:void 0,O=v||this.getChangedPath(y,w,L),z=h.drawPath({d:O,stroke:Array.isArray(this.lineColorArr)?null!=(i=this.lineColorArr[a])?i:this.lineColorArr[a%this.lineColorArr.length]:this.lineColorArr,strokeWidth:0,fill:x,fillOpacity:r.config.fill.opacity,classes:`apexcharts-pie-area apexcharts-${this.chartType.toLowerCase()}-slice-${a}`});if(z.attr({index:0,j:a}),o.setSelectionFilter(z,0,a),r.config.chart.dropShadow.enabled){const e=r.config.chart.dropShadow;o.dropShadow(z,e,a)}this.addListeners(z,this.donutDataLabels,a);let C={x:0,y:0};const P=(b+m/2)%this.fullAngle;let T={x:this.centerX,y:this.centerY};"pie"===this.chartType||"polarArea"===this.chartType?(C=p.polarToCartesian(this.centerX,this.centerY,r.globals.radialSize/1.25+r.config.plotOptions.pie.dataLabels.offset,P),T=p.polarToCartesian(this.centerX,this.centerY,r.globals.radialSize/2,P)):"donut"===this.chartType&&(C=p.polarToCartesian(this.centerX,this.centerY,(r.globals.radialSize+this.donutSize)/2+r.config.plotOptions.pie.dataLabels.offset,P),T=p.polarToCartesian(this.centerX,this.centerY,(r.globals.radialSize+this.donutSize)/2,P)),f.setAttrs(z.node,{"data:angle":m,"data:startAngle":b,"data:strokeWidth":this.strokeWidth,"data:value":t[a],"data:cx":T.x,"data:cy":T.y}),g.add(z);let E=!1;if(S){const e=this.getPiePath({me:this,startAngle:b,angle:m,size:this.sliceSizes[a]});z.node.setAttribute("data:pathFinal",e),E=!0===(null==(n=(s=this.ctx.morphTypeChange).claimsTargetMark)?void 0:n.call(s,a,0)),E&&(z.attr({d:e}),z.node.setAttribute("data:pathOrig",e),z.node.setAttribute("opacity","0"),z.node.setAttribute("data-piece-hidden","1"))}let D=0;if(!this.initialAnim||r.globals.resized||r.globals.dataChanged?this.animBeginArr.push(0):(D=m/this.fullAngle*r.config.chart.animations.speed,0===D&&(D=1),this.animDur=D+this.animDur,this.animBeginArr.push(this.animDur)),E);else if(S&&v){const e=this.getPiePath({me:this,startAngle:b,angle:m,size:this.sliceSizes[a]}),t=this.ctx.morphTypeChange.getSpeed(),i=this.ctx.animations;z.node.setAttribute("data:pathOrig",e);const s=z.animate(t).plot(e,"polygons").attr({"stroke-width":this.strokeWidth});s&&"function"==typeof s.after?s.after(()=>i.animationCompleted(z)):i.animationCompleted(z)}else this.dynamicAnim&&r.globals.dataChanged?this.animatePaths(z,{size:this.sliceSizes[a],prevSize:L,endAngle:A,startAngle:b,prevStartAngle:y,prevEndAngle:w,animateStartingPos:!0,i:a,animBeginArr:this.animBeginArr,shouldSetPrevPaths:!0,dur:r.config.chart.animations.dynamicAnimation.speed}):this.animatePaths(z,{size:this.sliceSizes[a],endAngle:A,startAngle:b,i:a,totalItems:e.length-1,animBeginArr:this.animBeginArr,dur:D});if(this.getExpandOffset()>0?z.node.addEventListener("mouseup",this.pieClicked.bind(this,a)):0===a&&u.drilldownBlocksSliceOffset(r)&&(null==(l=this.ctx.drilldown)||l.warnSliceOffsetDisabled()),void 0!==r.interact.selectedDataPoints[0]&&r.interact.selectedDataPoints[0].indexOf(a)>-1)if(this.initialAnim&&!r.globals.resized&&!r.globals.dataChanged&&this.animDur>0){const e=this,t=a;setTimeout(()=>e.pieClicked(t,{animate:!1}),this.animDur)}else this.pieClicked(a,{animate:!1});if(r.config.dataLabels.enabled){const t=C.x,i=C.y;let s=100*m/this.fullAngle+"%";if(0!==m&&r.config.plotOptions.pie.dataLabels.minAngleToShowLabel<e[a]){const e=r.config.dataLabels.formatter;void 0!==e&&(s=e(r.globals.seriesPercent[a][0],{seriesIndex:a,w:r}));const n=r.globals.dataLabels.style.colors[a],l=h.group({class:"apexcharts-datalabels"}),c=h.drawText({x:t,y:i,text:s,textAnchor:"middle",fontSize:r.config.dataLabels.style.fontSize,fontFamily:r.config.dataLabels.style.fontFamily,fontWeight:r.config.dataLabels.style.fontWeight,foreColor:n});if(l.add(c),r.config.dataLabels.dropShadow.enabled){const e=r.config.dataLabels.dropShadow;o.dropShadow(c,e)}c.node.classList.add("apexcharts-pie-label"),r.config.chart.animations.animate&&!1===r.globals.resized&&(c.node.classList.add("apexcharts-pie-label-delay"),c.node.style.animationDelay=r.config.chart.animations.speed/940+"s"),this.sliceLabels.push(l),this.sliceLabelGroups[a]=l.node}}if(this.showExternalLabels&&0!==m){const e=this.getExternalLabelLines(a);if(e.some(e=>""!==e)){const t=p.polarToCartesian(this.centerX,this.centerY,r.globals.radialSize,P),i=p.polarToCartesian(this.centerX,this.centerY,r.globals.radialSize+(this.externalCfg.connector.gap||0),P),s=i.x>=this.centerX,n=s?i.x+(this.externalCfg.connector.length||0):i.x-(this.externalCfg.connector.length||0);this.externalLabels.push({i:a,lines:e,anchor:t,elbow:i,side:s?"right":"left",labelX:n+parseFloat(this.externalCfg.offsetX||0),idealY:i.y+parseFloat(this.externalCfg.offsetY||0),connectorColor:this.externalCfg.connector.color||r.globals.colors[a],foreColor:this.externalCfg.color||r.config.chart.foreColor})}}}if(this.showExternalLabels&&this.externalLabels.length){this.placeExternalLabels();const e=x.isBrowser()&&(S||this.dynamicAnim&&r.globals.dataChanged||this.initialAnim&&!r.globals.resized&&!r.globals.dataChanged);this.externalLabels.forEach(t=>{const a=new m(r).drawExternalLabel({lines:t.lines,lineHeight:this.externalLabelLineH,anchor:t.anchor,elbow:t.elbow,labelX:t.labelX,labelY:t.labelY,side:t.side,connector:{show:this.externalCfg.connector.show,width:this.externalCfg.connector.width,color:t.connectorColor},style:this.externalLabelStyle,foreColor:t.foreColor});e&&(a.node.classList.add("apexcharts-element-hidden"),r.globals.delayedElements.push({el:a.node})),this.externalLabelGroups[t.i]=a.node,d.add(a)})}return d}placeExternalLabels(){const e=this.w,t=this.externalLabelMaxLines*this.externalLabelLineH+2,a=this.centerY+e.globals.radialSize+e.globals.pieExternalLabelMarginY;["left","right"].forEach(e=>{!function(e,t,a){const i=e.slice().sort((e,t)=>e.idealY-t.idealY);i.forEach(e=>{e.labelY=e.idealY});for(let e=1;e<i.length;e++)i[e].labelY-i[e-1].labelY<t&&(i[e].labelY=i[e-1].labelY+t);const s=i[i.length-1],n=s?s.labelY-a:0;if(n>0)for(let e=i.length-1;e>=0;e--)i[e].labelY-=n,e<i.length-1&&i[e+1].labelY-i[e].labelY<t&&(i[e].labelY=i[e+1].labelY-t)}(this.externalLabels.filter(t=>t.side===e),t,a)})}addListeners(e,t,a){const i=new f(this.w,this.ctx);e.node.addEventListener("mouseenter",i.pathMouseEnter.bind(i,e)),e.node.addEventListener("mouseleave",i.pathMouseLeave.bind(i,e)),e.node.addEventListener("mouseleave",this.revertDataLabelsInner.bind(this)),"number"==typeof a&&(e.node.addEventListener("mouseenter",this.showHoverOutline.bind(this,a)),e.node.addEventListener("mouseleave",this.hideHoverOutline.bind(this))),e.node.addEventListener("mousedown",i.pathMouseDown.bind(i,e)),this.donutDataLabels.total.showAlways||(e.node.addEventListener("mouseenter",this.printDataLabelsInner.bind(this,e.node,t)),e.node.addEventListener("mousedown",this.printDataLabelsInner.bind(this,e.node,t)))}animatePaths(e,t){const a=this.w;let i=t.endAngle<t.startAngle?this.fullAngle+t.endAngle-t.startAngle:t.endAngle-t.startAngle,s=i,n=t.startAngle;const l=t.startAngle;void 0!==t.prevStartAngle&&void 0!==t.prevEndAngle&&(n=t.prevEndAngle,s=t.prevEndAngle<t.prevStartAngle?this.fullAngle+t.prevEndAngle-t.prevStartAngle:t.prevEndAngle-t.prevStartAngle),t.i===a.config.series.length-1&&(i+l>this.fullAngle?t.endAngle=t.endAngle-(i+l):i+l<this.fullAngle&&(t.endAngle=t.endAngle+(this.fullAngle-(i+l)))),i===this.fullAngle&&(i=this.fullAngle-.01),this.animateArc(e,n,l,i,s,t)}animateArc(e,t,a,i,s,n){const l=this,r=this.w,o=new d(this.w),h=n.size;let c;(isNaN(t)||isNaN(s))&&(t=a,s=i,n.dur=0);let g=i,p=a;const f=t<a?this.fullAngle+t-a:t-a,u="number"==typeof n.prevSize;r.globals.dataChanged&&n.shouldSetPrevPaths&&n.prevEndAngle&&(c=l.getPiePath({me:l,startAngle:n.prevStartAngle,angle:n.prevEndAngle<n.prevStartAngle?this.fullAngle+n.prevEndAngle-n.prevStartAngle:n.prevEndAngle-n.prevStartAngle,size:u?n.prevSize:h}),e.attr({d:c})),0!==n.dur?e.animate(n.dur,n.animBeginArr[n.i]).after(function(){"pie"!==l.chartType&&"donut"!==l.chartType&&"polarArea"!==l.chartType||this.animate(r.config.chart.animations.dynamicAnimation.speed).attr({"stroke-width":l.strokeWidth}),n.i===r.config.series.length-1&&o.animationCompleted(e)}).during(r=>{g=f+(i-f)*r,n.animateStartingPos&&(g=s+(i-s)*r,p=t-s+(a-(t-s))*r),c=l.getPiePath({me:l,startAngle:p,angle:g,size:u?n.prevSize+(h-n.prevSize)*r:h}),e.node.setAttribute("data:pathOrig",c),e.attr({d:c})}):(c=l.getPiePath({me:l,startAngle:p,angle:i,size:h}),n.isTrack||(r.globals.animationEnded=!0),e.node.setAttribute("data:pathOrig",c),e.attr({d:c,"stroke-width":l.strokeWidth}))}pieClicked(e,t){const a=this.w,i=!(t&&!1===t.animate),s=a.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`);if(!s)return;if("true"===s.attr("data:pieClicked"))return s.attr({"data:pieClicked":"false"}),this.revertDataLabelsInner(),void this.offsetSlice(e,0,i);const n=a.dom.baseEl.getElementsByClassName("apexcharts-pie-area");Array.prototype.forEach.call(n,e=>{const t="true"===e.getAttribute("data:pieClicked");e.setAttribute("data:pieClicked","false"),t&&this.offsetSlice(parseInt(e.getAttribute("j"),10),0,i)}),a.interact.capturedDataPointIndex=e,s.attr("data:pieClicked","true"),this.offsetSlice(e,this.getExpandOffset(),i)}getExpandOffset(){const e=this.w.config.plotOptions.pie;if(!e.expandOnClick||"polarArea"===this.chartType)return 0;if(u.drilldownBlocksSliceOffset(this.w))return 0;const t=Number(e.expandOffset);return Number.isFinite(t)&&t>0?t:0}getSliceMovers(e){const t=this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`);return[t?t.node:null,this.sliceLabelGroups[e],this.externalLabelGroups[e],this.hoverOutlineIndex===e&&this.elHoverOutlinePath?this.elHoverOutlinePath.node:null].filter(Boolean)}offsetSlice(e,t,a=!0){const i=this.w;if(!i.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`))return;const{dx:s,dy:n}=this.getSliceOffsetVector(e,t),l=`translate(${s} ${n})`,r=a&&i.config.chart.animations.enabled?"transform 320ms cubic-bezier(0.25, 0.8, 0.3, 1)":"";this.getSliceMovers(e).forEach(e=>{e.style.transition=r,e.setAttribute("transform",l)})}getSliceOffsetVector(e,t){const a=this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`),i=a?parseFloat(a.attr("data:angle")):NaN;if(!t||!Number.isFinite(i)||i>=this.fullAngle)return{dx:0,dy:0};const s=parseFloat(a.attr("data:startAngle")),n=Math.PI*(s+i/2-90)/180;return{dx:t*Math.cos(n),dy:t*Math.sin(n)}}showHoverOutline(e){const t=this.w;if(!u.hoverOutlineOwnsHoverState(t))return;if(!this.elHoverOutline)return;const a=this.getHoverOutlinePath(e);if(!a)return;const i=t.config.plotOptions.pie.hoverOutline,s=i.color||t.globals.colors[e];if(!this.elHoverOutlinePath){const e=new f(t);this.elHoverOutlinePath=e.drawPath({d:a,fill:s,strokeWidth:0,classes:"apexcharts-pie-hover-outline-band"}),this.elHoverOutline.add(this.elHoverOutlinePath)}this.elHoverOutlinePath.attr({d:a,fill:s,"fill-opacity":i.opacity});const{dx:n,dy:l}=this.getSliceOffsetVector(e,this.isSliceOut(e)?this.getExpandOffset():0);this.elHoverOutlinePath.node.style.transition="",this.elHoverOutlinePath.node.setAttribute("transform",`translate(${n} ${l})`),this.hoverOutlineIndex=e,this.elHoverOutline.node.style.opacity="1"}hideHoverOutline(){this.elHoverOutline&&(this.elHoverOutline.node.style.opacity="0")}isSliceOut(e){const t=this.w.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`);return!!t&&"true"===t.attr("data:pieClicked")}getHoverOutlinePath(e){const t=this.w,a=t.config.plotOptions.pie.hoverOutline,i=t.dom.Paper.findOne(`.apexcharts-${this.chartType.toLowerCase()}-slice-${e}`);if(!i)return null;const s=parseFloat(i.attr("data:angle"));if(!Number.isFinite(s)||s<=0)return null;const n=this.sliceSizes[e],l=Number(a.size);if(!Number.isFinite(n)||!Number.isFinite(l)||l<=0)return null;const{startDeg:h,spanDeg:c}=this.getSliceExtent({me:this,startAngle:parseFloat(i.attr("data:startAngle")),angle:s,size:n});if(!(c>0))return null;const d=n+(this.strokeWidth||0)/2+(Number(a.gap)||0),g=d+l,p={cx:this.centerX,cy:this.centerY,rIn:d,rOut:g,a0:h,a1:h+c,spanDeg:c},f=Math.min(l/2,c*Math.PI/180/2*d);return f>.5?v(o(r({},p),{r:f})):function({cx:e,cy:t,rIn:a,rOut:i,a0:s,a1:n,spanDeg:l}){const r=(a,i)=>w(e,t,a,i),o=l>180?1:0,h=r(i,s),c=r(i,n),d=r(a,n),g=r(a,s);return["M",S(h),"A",i,i,0,o,1,S(c),"L",S(d),"A",a,a,0,o,0,S(g),"Z"].join(" ")}(p)}getChangedPath(e,t,a){let i="";return this.dynamicAnim&&this.w.globals.dataChanged&&(i=this.getPiePath({me:this,startAngle:e,angle:t-e,size:"number"==typeof a?a:this.size})),i}getSliceExtent({me:e,startAngle:t,angle:a,size:i}){const s=this.w;let n=t,l=a+t;Math.ceil(l)>=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle&&(l=this.fullAngle+this.w.config.plotOptions.pie.startAngle%this.fullAngle-.01);let r=l-n;const o="pie"===e.chartType||"donut"===e.chartType||"polarArea"===e.chartType,h=s.config.plotOptions.pie.spacing;if(o&&h>0&&r>0){const t="donut"===e.chartType?(i+e.donutSize)/2:i,a=t>0?h/t*(180/Math.PI):0,s=Math.min(a/2,Math.max(0,r/2-.5));n+=s,r-=2*s}return l=n+r,Math.ceil(l)>this.fullAngle&&(l-=this.fullAngle),{startDeg:n,spanDeg:r,endDeg:l}}getPiePath({me:e,startAngle:t,angle:a,size:i}){let s;const n=this.w,l=new f(this.w),{startDeg:r,spanDeg:o,endDeg:h}=this.getSliceExtent({me:e,startAngle:t,angle:a,size:i}),c="pie"===e.chartType||"donut"===e.chartType||"polarArea"===e.chartType,d=Math.PI*(r-90)/180,g=n.config.plotOptions.pie.borderRadius;if(g>0&&c){const t=this.getRoundedSlicePath({me:e,startDeg:r,spanDeg:o,size:i,borderRadius:g});if(t)return t}const u=Math.PI*(h-90)/180,b=e.centerX+i*Math.cos(d),m=e.centerY+i*Math.sin(d),x=e.centerX+i*Math.cos(u),y=e.centerY+i*Math.sin(u),A=p.polarToCartesian(e.centerX,e.centerY,e.donutSize,h),w=p.polarToCartesian(e.centerX,e.centerY,e.donutSize,r),S=o>180?1:0,v=["M",b,m,"A",i,i,0,S,1,x,y];return s="donut"===e.chartType?[...v,"L",A.x,A.y,"A",e.donutSize,e.donutSize,0,S,0,w.x,w.y,"L",b,m,"z"].join(" "):"pie"===e.chartType||"polarArea"===e.chartType?[...v,"L",e.centerX,e.centerY,"L",b,m].join(" "):[...v].join(" "),l.roundPathCorners(s,2*this.strokeWidth)}getRoundedSlicePath({me:e,startDeg:t,spanDeg:a,size:i,borderRadius:s}){if(!(a>0))return null;const n=Math.PI/180,l=e.centerX,r=e.centerY,o="donut"===e.chartType,h=i,c=o?e.donutSize:0,d=a*n;let g=s;if(g=Math.min(g,d*h/2),o?(g=Math.min(g,d*c/2),g=Math.min(g,(h-c)/2)):g=Math.min(g,h/2),!(g>.5))return null;const p=t,f=t+a;return o?v({cx:l,cy:r,rIn:c,rOut:h,a0:p,a1:f,r:g,spanDeg:a}):function({cx:e,cy:t,rOut:a,a0:i,a1:s,r:n,spanDeg:l}){const r=(a,i)=>w(e,t,a,i),o=n/a*A,h=r(a,i+o),c=r(a,s-o),d=l-2*o>180?1:0,g=r(a,s),p=r(a-n,s),f=r(a,i),u=r(a-n,i);return["M",S(h),"A",a,a,0,d,1,S(c),"Q",S(g),S(p),"L",`${e} ${t}`,"L",S(u),"Q",S(f),S(h),"Z"].join(" ")}({cx:l,cy:r,rOut:h,a0:p,a1:f,r:g,spanDeg:a})}drawPolarElements(e){const t=this.w,a=new b(this.w),i=new f(this.w),s=new m(this.w),n=i.group(),l=i.group(),r=a.niceScale(0,Math.ceil(this.maxY),0),o=r.result.reverse(),h=r.result.length;this.maxY=r.niceMax;let c=t.globals.radialSize;const d=c/(h-1);for(let e=0;e<h-1;e++){const a=i.drawCircle(c);if(a.attr({cx:this.centerX,cy:this.centerY,fill:"none","stroke-width":t.config.plotOptions.polarArea.rings.strokeWidth,stroke:t.config.plotOptions.polarArea.rings.strokeColor}),t.config.yaxis[0].show){const a=s.drawYAxisTexts(this.centerX,this.centerY-c+parseInt(t.config.yaxis[0].labels.style.fontSize,10)/2,e,o[e]);l.add(a)}n.add(a),c-=d}this.drawSpokes(e),e.add(n),e.add(l)}renderInnerDataLabels(e,t,a){const i=this.w,s=new f(this.w),n=t.total.show;e.node.innerHTML="",e.node.style.opacity=a.opacity;const l=a.centerX,r=this.donutDataLabels.total.label?a.centerY:a.centerY-a.centerY/6;let o,h;o=void 0===t.name.color?i.globals.colors[0]:t.name.color;let c=t.name.fontSize,d=t.name.fontFamily,g=t.name.fontWeight;h=void 0===t.value.color?i.config.chart.foreColor:t.value.color;const p=t.value.formatter;let u="",b="";if(n?(o=t.total.color,c=t.total.fontSize,d=t.total.fontFamily,g=t.total.fontWeight,b=this.donutDataLabels.total.label?t.total.label:"",u=t.total.formatter(i)):1===i.seriesData.series.length&&(u=p(i.seriesData.series[0],i),b=i.seriesData.seriesNames[0]),b&&(b=t.name.formatter(b,t.total.show,i)),t.name.show){const a=s.drawText({x:l,y:r+parseFloat(t.name.offsetY),text:b,textAnchor:"middle",foreColor:o,fontSize:c,fontWeight:g,fontFamily:d});a.node.classList.add("apexcharts-datalabel-label"),e.add(a)}if(t.value.show){const a=t.name.show?parseFloat(t.value.offsetY)+16:t.value.offsetY,i=s.drawText({x:l,y:r+a,text:u,textAnchor:"middle",foreColor:h,fontWeight:t.value.fontWeight,fontSize:t.value.fontSize,fontFamily:t.value.fontFamily});i.node.classList.add("apexcharts-datalabel-value"),e.add(i)}return e}printInnerLabels(e,t,a,i){const s=this.w;let n;i?n=void 0===e.name.color?s.globals.colors[parseInt(i.parentNode.getAttribute("rel"),10)-1]:e.name.color:s.seriesData.series.length>1&&e.total.show&&(n=e.total.color);const l=s.dom.baseEl.querySelector(".apexcharts-datalabel-label"),r=s.dom.baseEl.querySelector(".apexcharts-datalabel-value");a=(0,e.value.formatter)(a,s),i||"function"!=typeof e.total.formatter||(a=e.total.formatter(s));const o=t===e.total.label;if(t=this.donutDataLabels.total.label?e.name.formatter(t,o,s):"",null!==l&&(l.textContent=t),null!==r&&(r.textContent=a),null!==l){l.style.fill=n}}printDataLabelsInner(e,t){const a=this.w,i=e.getAttribute("data:value"),s=a.seriesData.seriesNames[parseInt(e.parentNode.getAttribute("rel"),10)-1];a.seriesData.series.length>1&&this.printInnerLabels(t,s,i,e);const n=a.dom.baseEl.querySelector(".apexcharts-datalabels-group");if(null!==n){n.style.opacity="1"}}drawSpokes(e){const t=this.w,a=new f(this.w),i=t.config.plotOptions.polarArea.spokes;if(0===i.strokeWidth)return;const s=[],n=360/t.seriesData.series.length;for(let e=0;e<t.seriesData.series.length;e++)s.push(p.polarToCartesian(this.centerX,this.centerY,t.globals.radialSize,t.config.plotOptions.pie.startAngle+n*e));s.forEach((t,s)=>{const n=a.drawLine(t.x,t.y,this.centerX,this.centerY,Array.isArray(i.connectorColors)?i.connectorColors[s]:i.connectorColors);e.add(n)})}revertDataLabelsInner(){const e=this.w;if(this.donutDataLabels.show){const t=e.dom.Paper.findOne(".apexcharts-datalabels-group"),a=this.renderInnerDataLabels(t,this.donutDataLabels,{hollowSize:this.donutSize,centerX:this.centerX,centerY:this.centerY,opacity:this.donutDataLabels.show});e.dom.Paper.findOne(".apexcharts-radialbar, .apexcharts-pie").add(a)}}}c.default.use({pie:L,donut:L,polarArea:L}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>c.default});
|
package/dist/donut.esm.js
CHANGED
package/dist/dumbbell.common.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* ApexCharts v7.
|
|
2
|
+
* ApexCharts v7.4.0
|
|
3
3
|
* (c) 2018-2026 ApexCharts
|
|
4
4
|
*/
|
|
5
|
-
"use strict";var t=Object.defineProperty,e=Object.defineProperties,s=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,o=(e,s,a)=>s in e?t(e,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[s]=a,n=(t,e)=>{for(var s in e||(e={}))i.call(e,s)&&o(t,s,e[s]);if(a)for(var s of a(e))r.call(e,s)&&o(t,s,e[s]);return t},l=(t,a)=>e(t,s(a));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function h(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const s in t)if("default"!==s){const a=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,a.get?a:{enumerable:!0,get:()=>t[s]})}return e.default=t,Object.freeze(e)}const d=h(require("apexcharts/core")),b=d.__apex_Utils;function c(t,e,s){const a=s&&void 0!==s[e]?s[e]:e+1;return null==t?{x:a,y:null,rest:{}}:Array.isArray(t)?{x:void 0!==t[0]?t[0]:a,y:t[1],rest:{}}:"object"==typeof t?{x:void 0!==t.x?t.x:a,y:t.y,rest:t}:{x:a,y:t,rest:{}}}const u="__apexcharts_series_transforms__";var g,p;globalThis[u]||(globalThis[u]={}),g="dumbbell","function"==typeof(p=function(t,e){var s;const a=e.config,i=e.globals;if(!Array.isArray(t))return t;i.dumbbellRawSeries||(i.dumbbellRawSeries=t.map(t=>l(n({},t),{data:Array.isArray(null==t?void 0:t.data)?t.data.slice():null==t?void 0:t.data})));const r=i.dumbbellRawSeries;if(r.some(t=>function(t){for(let e=0;e<t.length;e++){const s=t[e],a=Array.isArray(s)?s[1]:s&&"object"==typeof s?s.y:s;if(Array.isArray(a)&&2===a.length)return!0}return!1}(Array.isArray(null==t?void 0:t.data)?t.data:[])))return e.dumbbellData={form:"pairs",names:[],values:[],order:[],carrier:0,hidden:[]},t;const o=null==(s=a.xaxis)?void 0:s.categories,h=i.collapsedSeriesIndices||[],{xs:d,rows:u,byX:g}=function(t,e){var s;const a=[],i=[],r=new Map,o=[];for(let l=0;l<t.length;l++){const h=Array.isArray(null==(s=t[l])?void 0:s.data)?t[l].data:[],d=new Map;for(let t=0;t<h.length;t++){const{x:s,y:o,rest:l}=c(h[t],t,e),u=s instanceof Date?s.getTime():s;r.has(u)||(r.set(u,a.length),a.push(s),i.push(n({},l)));const g=r.get(u);d.set(g,b.parseNumber(o))}o.push(d)}return{xs:a,rows:i,byX:o}}(r,o),p=[],x=[],f=[];for(let t=0;t<r.length;t++)-1===h.indexOf(t)&&f.push(t);const y=[];for(let t=0;t<d.length;t++){const e=[];for(let s=0;s<r.length;s++){const a=g[s].has(t)?g[s].get(t):null;e.push(null!=a&&isFinite(a)?a:null)}p.push(e);let s=null,a=null,i=-1,o=-1;for(let t=0;t<f.length;t++){const r=f[t],n=e[r];null!==n&&((null===s||n<s)&&(s=n,i=r),(null===a||n>a)&&(a=n,o=r))}null!==s&&null!==a?(x.push([i,o]),y.push(l(n({},u[t]),{x:d[t],y:[s,a]}))):(x.push(null),y.push(l(n({},u[t]),{x:d[t],y:null})))}e.dumbbellData={form:"series",names:r.map((t,e)=>{var s;return null!=(s=null==t?void 0:t.name)?s:`Series ${e+1}`}),values:p,order:x,carrier:f.length?f[0]:0,hidden:r.map((t,e)=>e).filter(t=>-1!==h.indexOf(t))};const v=e.dumbbellData.carrier;return r.map((t,e)=>l(n({},t),{data:e===v&&f.length?y:[]}))})&&(globalThis[u][g]=p);const x=d.__apex_Graphics,f=d.__apex_DataLabels,y=(t,e,s,a)=>{if("function"!=typeof t)return t;const i=t({series:e.seriesData.series,seriesIndex:s,dataPointIndex:a,w:e});return Number.isFinite(i)?i:0},v=d.__apex_BrowserAPIs_BrowserAPIs,m=d.__apex_Environment_Environment;function C(t){var e;const s=t.config.chart.animations;if(!s||!1===s.enabled)return!1;if(!s.dynamicAnimation||!1===s.dynamicAnimation.enabled)return!1;const a=null!=(e=s.largeDatasetThreshold)?e:0;return!(a>0&&t.globals.dataPoints>a)&&!!(m.isBrowser()&&t.globals.dataChanged&&t.globals.shouldAnimate)}function w(t,e,s){var a,i,r,o;if(null==(a=t.axisFlags)?void 0:a.isXNumeric){const a=null==(r=null==(i=t.seriesData)?void 0:i.seriesX)?void 0:r[e];if(a&&a.length&&null!=a[s])return"x:"+a[s]}const n=null==(o=t.globals.labels)?void 0:o[s];return null!=n&&""!==String(n)?"c:"+(Array.isArray(n)?n.join(" "):String(n)):"j:"+s}function I(t){const e=new Map;return t.map(t=>{const s=e.get(t)||0;return e.set(t,s+1),0===s?t:`${t}#${s}`})}function P(t,e,s=!1,a=!1){var i,r;if(!C(t))return null;const o=t.globals.prevStreamFrame;if(!o)return null;const n=null==(i=o.seriesY)?void 0:i[e],l=null==(r=t.seriesData.series)?void 0:r[e];if(!Array.isArray(n)||!Array.isArray(l))return null;if(!n.length||!l.length)return null;const h=I(n.map((t,s)=>function(t,e,s){var a,i;if(t.isXNumeric){const i=null==(a=t.seriesX)?void 0:a[e];if(i&&i.length&&null!=i[s])return"x:"+i[s]}const r=null==(i=t.labels)?void 0:i[s];return null!=r&&""!==String(r)?"c:"+(Array.isArray(r)?r.join(" "):String(r)):"j:"+s}(o,e,s))),d=I(l.map((s,a)=>w(t,e,a))),b=function(t,e){const s=new Map;t.forEach((t,e)=>{s.has(t)||s.set(t,e)});const a=new Array(e.length),i=new Set;let r=-1,o=!0,n=t.length===e.length;e.forEach((t,e)=>{const l=s.has(t)&&!i.has(s.get(t))?s.get(t):-1;a[e]=l,-1!==l&&(i.add(l),l<r&&(o=!1),r=l),l!==e&&(n=!1)});const l=[];for(let e=0;e<t.length;e++)i.has(e)||l.push(e);return{toOld:a,exits:l,ordered:o,changed:!n}}(h,d);return(b.ordered||a)&&(b.changed||s)?{join:b,oldKeys:h,newKeys:d}:null}function S({w:t,elSeries:e,record:s,newKeys:a,isHorizontal:i,speed:r}){var o;if(!C(t))return;if(!s||!Array.isArray(s.paths)||!(null==e?void 0:e.node))return;const n=new Set(a),l=s.paths.filter(t=>t&&t.d&&null!=t.key&&!n.has(t.key));if(!l.length)return;const h=new x(t),d=null==(o=t.globals.colors)?void 0:o[parseInt(String(s.realIndex),10)];l.forEach(s=>{let a=s.fill||d||"#c8c8c8";0===String(a).indexOf("url(")&&(a=d||"#c8c8c8");const o=h.drawPath({d:s.d,stroke:"none",strokeWidth:0,fill:a,fillOpacity:1,classes:"apexcharts-bar-ghost"}),n=o.node;n.setAttribute("pointer-events","none"),o.attr("clip-path",`url(#gridRectBarMask${t.globals.cuid})`),e.node.insertBefore(n,e.node.firstChild);const l=function(t){const e=/^M\s*([+-]?[\d.eE]+)[\s,]+([+-]?[\d.eE]+)/.exec(t||"");if(!e)return null;const s=parseFloat(e[1]),a=parseFloat(e[2]);return isFinite(s)&&isFinite(a)?{x:s,y:a}:null}(s.d);let b=i?"left center":"center bottom";try{const t=n.getBBox();l&&t&&(b=i?Math.abs(l.x-t.x)<=Math.abs(l.x-(t.x+t.width))?"left center":"right center":Math.abs(l.y-(t.y+t.height))<=Math.abs(l.y-t.y)?"center bottom":"center top")}catch(t){}const c=n.style;c.transformBox="fill-box",c.transformOrigin=b;const u=Math.max(1,r||1),g=performance.now(),p=e=>{if(t.globals.isDestroyed||!n.parentNode)return;const s=Math.max(0,Math.min(1,(e-g)/u)),a=1-Math.pow(1-s,3),r=1-a;c.transform=i?`scaleX(${r})`:`scaleY(${r})`,c.opacity=String(1-a),s<1?v.requestAnimationFrame(p):n.parentNode.removeChild(n)};v.requestAnimationFrame(p)})}class H{constructor(t){this.w=t.w,this.barCtx=t,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}handleBarDataLabels(t){var e,s;const{x:a,y:i,y1:r,y2:o,i:h,j:d,realIndex:b,columnGroupIndex:c,barHeight:u,barWidth:g,barXPosition:p,barYPosition:f,visibleSeries:v}=t,m=this.w,C=new x(this.barCtx.w),w=m.waterfallData&&m.waterfallData.values,I=w&&w[b]&&null!=w[b][d]?w[b][d]:null,P=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[b]:this.barCtx.strokeWidth;let S,H;m.axisFlags.isXNumeric&&!m.globals.isBarHorizontal?(S=a+g*(v+1),H=i+u*(v+1)-P):(S=a+g*v,H=i+u*v);let L=null,D=null,R=a,k=i,X={};const A=m.config.dataLabels,W=this.barCtx.barOptions.dataLabels,F=this.barCtx.barOptions.dataLabels.total;void 0!==f&&(this.barCtx.isRangeBar||this.barCtx.isPyramid)&&(H=f,k=f),void 0!==p&&this.barCtx.isVerticalGroupedRangeBar&&(S=p,R=p);const O=y(A.offsetX,m,b,d),Y=y(A.offsetY,m,b,d);let B={width:0,height:0};if(m.config.dataLabels.enabled){const t=null!==I?I:m.seriesData.series[b][d];B=C.getTextRects(m.config.dataLabels.formatter?m.config.dataLabels.formatter(t,l(n({},m),{seriesIndex:b,dataPointIndex:d,w:m})):m.formatters.yLabelFormatters[0](t),parseFloat(A.style.fontSize).toString(),A.style.fontFamily,void 0,!0,A.style.fontWeight)}const T={x:a,y:i,i:h,j:d,realIndex:b,columnGroupIndex:c,bcx:S,bcy:H,barHeight:u,barWidth:g,textRects:B,strokeWidth:P,dataLabelsX:R,dataLabelsY:k,dataLabelsConfig:A,barDataLabelsConfig:W,barTotalDataLabelsConfig:F,offX:O,offY:Y};if(X=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(T):this.calculateColumnsDataLabelsPosition(T),null!==I&&this.barCtx.isHorizontal&&"center"===W.position){const t=null==(s=null==(e=m.waterfallData.geometry)?void 0:e[b])?void 0:s[d];t&&t.horizontal&&(X.dataLabelsX=(t.levelStart+t.levelEnd)/2+O)}return L=this.drawCalculatedDataLabels({x:X.dataLabelsX,y:X.dataLabelsY,val:null!==I?I:this.barCtx.isRangeBar?[r,o]:"100%"===m.config.chart.stackType?m.globals.seriesPercent[b][d]:m.seriesData.series[b][d],i:b,j:d,barWidth:g,barHeight:u,textRects:B,dataLabelsConfig:A}),m.config.chart.stacked&&F.enabled&&(D=this.drawTotalDataLabels({x:X.totalDataLabelsX,y:X.totalDataLabelsY,barWidth:g,barHeight:u,realIndex:b,j:d,textAnchor:X.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:b,j:d}),rawVal:this.getStackedTotalValue({realIndex:b,j:d}),dataLabelsConfig:A,barTotalDataLabelsConfig:F})),{dataLabelsPos:X,dataLabels:L,totalDataLabels:D}}hasMultipleSeriesGroups(){return this.w.labelData.seriesGroups.length>1}getTotalGroupContext(t){if(!this.hasMultipleSeriesGroups())return null;const e=this.barCtx.barHelpers.getSeriesGroupIndex(t);return e<0?null:{groupIndex:e,group:this.w.labelData.seriesGroups[e]}}drawsStackedTotal(t){const e=this.barCtx.lastActiveBarSerieIndexByGroup,s=this.getTotalGroupContext(t);return s&&e&&e.length>s.groupIndex?e[s.groupIndex]===t:this.barCtx.lastActiveBarSerieIndex===t}getStackedTotalValue({realIndex:t,j:e}){const s=this.w,a=this.getTotalGroupContext(t),i=s.seriesData.stackedSeriesTotalsByGroups;return a&&i&&i[a.groupIndex]?i[a.groupIndex][e]:this.barCtx.stackedSeriesTotals[e]}getStackedTotalDataLabel({realIndex:t,j:e}){const s=this.w;let a=this.getStackedTotalValue({realIndex:t,j:e});return this.totalFormatter&&(a=this.totalFormatter(a,l(n({},s),{seriesIndex:t,dataPointIndex:e,w:s}))),a}calculateColumnsDataLabelsPosition(t){const e=this.w;let s,a,{i:i,j:r,realIndex:o,y:n,bcx:l,barWidth:h,barHeight:d,textRects:b,dataLabelsX:c,dataLabelsY:u,dataLabelsConfig:g,barDataLabelsConfig:p,barTotalDataLabelsConfig:f,strokeWidth:y,offX:v,offY:m}=t;const C=l;d=Math.abs(d);const w="vertical"===e.config.plotOptions.bar.dataLabels.orientation,{zeroEncounters:I}=this.barCtx.barHelpers.getZeroValueEncounters({i:i,j:r});l-=y/2;const P=e.layout.gridWidth/e.globals.dataPoints;if(this.barCtx.isVerticalGroupedRangeBar?c+=h/2:(c=e.axisFlags.isXNumeric?l-h/2+v:l-P+h/2+v,!e.config.chart.stacked&&I>0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(c-=h*I)),w){const t=2;c=c+b.height/2-y/2-t}const S=e.seriesData.series[i][r]<0;let H=n;switch(this.barCtx.isReversed&&(H=n+(S?d:-d)),p.position){case"center":u=w?S?H-d/2+m:H+d/2-m:S?H-d/2+b.height/2+m:H+d/2+b.height/2-m;break;case"bottom":u=w?S?H-d+m:H+d-m:S?H-d+b.height+y+m:H+d-b.height/2+y-m;break;case"top":u=w?S?H+m:H-m:S?H-b.height/2-m:H+b.height+m}let L=H;const D=this.getTotalGroupContext(o);if((D?[D.group]:e.labelData.seriesGroups).forEach(t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevY.forEach(t=>{L=S?Math.max(t[r],L):Math.min(t[r],L)})}),this.drawsStackedTotal(o)&&f.enabled){const t=18,i=new x(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:r}),g.fontSize);s=S?L-i.height/2-m-f.offsetY+t:L+i.height+m+f.offsetY-t;const n=P;a=C+(e.axisFlags.isXNumeric?-h/2:h/2-n)+f.offsetX}return e.config.chart.stacked||(u<0?u=0+y:u+b.height/3>e.layout.gridHeight&&(u=e.layout.gridHeight-y)),{bcx:l,bcy:n,dataLabelsX:c,dataLabelsY:u,totalDataLabelsX:a,totalDataLabelsY:s,totalDataLabelsAnchor:"middle"}}calculateBarsDataLabelsPosition(t){var e;const s=this.w;let{x:a,i:i,j:r,realIndex:o,bcy:n,barHeight:l,barWidth:h,textRects:d,dataLabelsX:b,strokeWidth:c,dataLabelsConfig:u,barDataLabelsConfig:g,barTotalDataLabelsConfig:p,offX:f,offY:y}=t;const v=s.layout.gridHeight/s.globals.dataPoints,{zeroEncounters:m}=this.barCtx.barHelpers.getZeroValueEncounters({i:i,j:r});let C,w,I;if(h=Math.abs(h),this.barCtx.isPyramid){C=n+l/2+y-(null!=(e=d.centerOffset)?e:0)}else C=n-(this.barCtx.isRangeBar?0:v)+l/2+d.height/2+y-3;!s.config.chart.stacked&&m>0&&s.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(C-=l*m);let P="start";const S=s.seriesData.series[i][r]<0;let H=a;if(this.barCtx.isReversed&&(H=a+(S?-h:h),P=S?"start":"end"),this.barCtx.isPyramid)b=s.layout.gridWidth/2+f;else switch(g.position){case"center":b=S?H+h/2-f:Math.max(d.width/2,H-h/2)+f;break;case"bottom":b=S?H+h-c-f:H-h+c+f;break;case"top":b=S?H-c-f:H-c+f}let L=H;const D=this.getTotalGroupContext(o);if((D?[D.group]:s.labelData.seriesGroups).forEach(t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevX.forEach(t=>{L=S?Math.min(t[r],L):Math.max(t[r],L)})}),this.drawsStackedTotal(o)&&p.enabled){const t=new x(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:r}),u.fontSize);S?(w=L-c-f-p.offsetX,P="end"):w=L+f+p.offsetX+(this.barCtx.isReversed?-(h+c):c),I=C-d.height/2+t.height/2+p.offsetY+c,s.globals.barGroups.length>1&&!D&&(I-=s.globals.barGroups.length/2*(l/2))}if(!s.config.chart.stacked){const t=S&&"middle"!==u.textAnchor?"start"===u.textAnchor?"end":"start":u.textAnchor;let e;e="vertical"===g.orientation?d.height/2:"end"===t?d.width:"middle"===t?d.width/2:0;const a=("vertical"===g.orientation?d.height:d.width)-e;b+a>s.layout.gridWidth-c&&(b=s.layout.gridWidth-a-c),b-e<c&&(b=e+c)}return{bcx:a,bcy:n,dataLabelsX:b,dataLabelsY:C,totalDataLabelsX:w,totalDataLabelsY:I,totalDataLabelsAnchor:P}}drawCalculatedDataLabels({x:t,y:e,val:s,i:a,j:i,textRects:r,barHeight:o,barWidth:h,dataLabelsConfig:d}){var b,c,u;const g=this.w;let p="rotate(0)";"vertical"===g.config.plotOptions.bar.dataLabels.orientation&&(p=`rotate(-90, ${t}, ${e})`);const y=new f(this.barCtx.w,this.barCtx.ctx),v=new x(this.barCtx.w),m=d.formatter;let C=null;const I=g.globals.collapsedSeriesIndices.indexOf(a)>-1,P=(g.globals.collapsingSeriesIndices||[]).indexOf(a)>-1;if(P){const t=null==(b=g.globals.prevDataLabels)?void 0:b.get(`${a}::${w(g,a,i)}`);t&&isFinite(t.val)&&(s=t.val)}if(d.enabled&&(!I||P)){C=v.group({class:"apexcharts-data-labels",transform:p});const b=g.config.dataLabels;((null==(c=b.animate)?void 0:c.enabled)||(null==(u=b.countUp)?void 0:u.enabled))&&(C.node.setAttribute("data:dlKey",`${a}::${w(g,a,i)}`),C.node.setAttribute("data:dlJ",String(i)),"number"==typeof s&&isFinite(s)&&C.node.setAttribute("data:dlVal",String(s)));let x="";void 0!==s&&(x=m(s,l(n({},g),{seriesIndex:a,dataPointIndex:i,w:g}))),!s&&g.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(x="");const f=g.seriesData.series[a][i]<0,I=g.config.plotOptions.bar.dataLabels.position;if("vertical"===g.config.plotOptions.bar.dataLabels.orientation&&("top"===I&&(d.textAnchor=f?"end":"start"),"center"===I&&(d.textAnchor="middle"),"bottom"===I&&(d.textAnchor=f?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels){h<v.getTextRects(x,parseFloat(d.style.fontSize).toString()).width&&(x="")}g.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&!P&&(this.barCtx.isHorizontal?r.width/1.6>Math.abs(h)&&(x=""):r.height/1.6>Math.abs(o)&&(x=""));const S=n({},d);this.barCtx.isHorizontal&&s<0&&("start"===d.textAnchor?S.textAnchor="end":"end"===d.textAnchor&&(S.textAnchor="start")),y.plotDataLabelsText({x:t,y:e,text:x,i:a,j:i,parent:C,dataLabelsConfig:S,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return C}drawTotalDataLabels({x:t,y:e,val:s,rawVal:a,realIndex:i,j:r,textAnchor:o,barTotalDataLabelsConfig:n}){var l,h;const d=new x(this.barCtx.w);let b;if(n.enabled&&void 0!==t&&void 0!==e&&this.drawsStackedTotal(i)){b=d.drawText({x:t,y:e,foreColor:n.style.color,text:s,textAnchor:o,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight}),b.attr({class:"apexcharts-datalabel-total",cx:t,cy:e});const c=this.w.config.dataLabels;if((null==(l=c.animate)?void 0:l.enabled)||(null==(h=c.countUp)?void 0:h.enabled)){const{groupIndex:t}=this.barCtx.barHelpers.getGroupIndex(i);b.node.setAttribute("data:dlTotalKey",`${t}::${w(this.w,i,r)}`),b.node.setAttribute("data:dlTotalSeries",String(i)),"number"==typeof a&&isFinite(a)&&b.node.setAttribute("data:dlTotalVal",String(a))}}return b}}const L=d.__apex_Series,D=d.__apex_Fill;function R(t){var e,s,a,i,r,o,n;return"histogram"===(null==(s=null==(e=null==t?void 0:t.config)?void 0:e.chart)?void 0:s.requestedType)&&(!1!==(null==(i=null==(a=t.config.plotOptions)?void 0:a.histogram)?void 0:i.overlap)&&(null!=(n=null==(o=null==(r=t.seriesData)?void 0:r.series)?void 0:o.length)?n:0)>1)}class k{constructor(t){this.w=t.w,this.barCtx=t}initVariables(t){const e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(let s=0;s<t.length;s++)if(t[s].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[s].length),e.axisFlags.isXNumeric)for(let a=0;a<t[s].length;a++)e.seriesData.seriesX[s][a]>e.globals.minX&&e.seriesData.seriesX[s][a]<e.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=e.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(e.seriesData.series),b.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map(t=>t.map(t=>"none"))),0===this.barCtx.seriesLen&&(this.barCtx.seriesLen=1)}barSlotXSpan(){const t=this.w;if(void 0!==this._slotXSpan)return this._slotXSpan;let e=0;if(t.globals.dataPoints<=1){const s=t.globals.maxX-t.globals.minX;e=s>0?s/4:0}else if(e=this._unionMinXGap(),!(e>0&&isFinite(e))){const s=t.globals.minXDiff;e=s>0&&isFinite(s)&&.5!==s?s:0}return this._slotXSpan=e,e}_unionMinXGap(){const t=this.w.seriesData.seriesX||[],e=[];for(let s=0;s<t.length;s++){const a=t[s];Array.isArray(a)&&a.length>0&&e.push(a)}if(!e.length)return 0;const s=new Array(e.length).fill(0);let a=NaN,i=1/0;for(;;){let t=1/0,r=-1;for(let a=0;a<e.length;a++){const i=e[a];for(;s[a]<i.length&&"number"!=typeof i[s[a]];)s[a]++;if(s[a]>=i.length)continue;const o=i[s[a]];o==o?o<t&&(t=o,r=a):(s[a]++,a--)}if(-1===r)break;if(s[r]++,a==a){const e=t-a;e>0&&e<i&&(i=e)}a=t}return isFinite(i)?i:0}initialPositions(t){const e=this.w;let s,a,i,r,o,n,l,h,d=e.globals.dataPoints;this.barCtx.isRangeBar&&(d=e.labelData.labels.length);let c=this.barCtx.seriesLen;if((e.config.plotOptions.bar.rangeBarGroupRows||R(e))&&(c=1),this.barCtx.isHorizontal)i=e.layout.gridHeight/d,o=i/c,e.axisFlags.isXNumeric&&(i=e.layout.gridHeight/this.barCtx.totalItems,o=i/this.barCtx.seriesLen),o=o*parseInt(this.barCtx.barOptions.barHeight,10)/100,-1===String(this.barCtx.barOptions.barHeight).indexOf("%")&&(o=parseInt(this.barCtx.barOptions.barHeight,10)),h=this.barCtx.baseLineInvertedY+e.globals.padHorizontal+(this.barCtx.isReversed?e.layout.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),this.barCtx.isFunnel&&(h=e.layout.gridWidth/2),a=(i-o*this.barCtx.seriesLen)/2;else{if(r=e.layout.gridWidth/this.barCtx.visibleItems,e.config.xaxis.convertedCatToNumeric&&(r=e.layout.gridWidth/e.globals.dataPoints),n=r/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100,e.axisFlags.isXNumeric){const t=this.barCtx.xRatio,e=this.barSlotXSpan();e>0&&e/t>0&&(r=e/t),n=r/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100,n<1&&(n=1)}if(-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(n=parseInt(this.barCtx.barOptions.columnWidth,10)),l=e.layout.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?e.layout.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),e.axisFlags.isXNumeric){s=this.barCtx.getBarXForNumericXAxis({x:s,j:0,realIndex:t,barWidth:n}).x}else s=e.globals.padHorizontal+b.noExponents(r-n*this.barCtx.seriesLen)/2}return e.globals.barHeight=o,e.globals.barWidth=n,{x:s,y:a,yDivision:i,xDivision:r,barHeight:o,barWidth:n,zeroH:l,zeroW:h}}initializeStackedPrevVars(t){t.w.labelData.seriesGroups.forEach(e=>{t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]})}initializeStackedXYVars(t){t.w.labelData.seriesGroups.forEach(e=>{t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]})}getPathFillColor(t,e,s,a){var i;const r=this.w,o=new D(this.barCtx.w);let n=null;const l=this.barCtx.barOptions.distributed?s:e;let h=!1;if(this.barCtx.barOptions.colors.ranges.length>0){this.barCtx.barOptions.colors.ranges.map(a=>{t[e][s]>=a.from&&t[e][s]<=a.to&&(n=a.color,h=!0)})}const d=this.getDumbbellConnectorFill(e,s)||(null==(i=r.config.series[e].data[s])?void 0:i.fill),b=this.barCtx.barOptions.isDumbbell?r.config.plotOptions.bar.dumbbell.connector:null;let c;b&&b.color&&(n=b.color,c=b.opacity);return{color:o.fillPath({seriesNumber:this.barCtx.barOptions.distributed?l:a,dataPointIndex:s,color:n,opacity:c,value:t[e][s],fillConfig:d,fillType:(null==d?void 0:d.type)?d.type:Array.isArray(r.config.fill.type)?r.config.fill.type[a]:r.config.fill.type}),useRangeColor:h}}getDumbbellConnectorFill(t,e){const s=this.w;if(!this.barCtx.barOptions.isDumbbell)return null;const a=s.dumbbellData;if(!a||"series"!==a.form)return null;const i=s.config.plotOptions.bar.dumbbell.connector;if(i.color)return null;const r=a.order[e];if(!r)return null;const o=s.globals.colors[r[0]],n=s.globals.colors[r[1]];return o&&n?{type:"gradient",gradient:{type:this.barCtx.isHorizontal?"horizontal":"vertical",gradientFrom:o,gradientTo:n,opacityFrom:i.opacity,opacityTo:i.opacity,stops:[0,100],inverseColors:!this.barCtx.isHorizontal}}:null}getStrokeWidth(t,e,s){let a=0;const i=this.w;return void 0===this.barCtx.series[t][e]||null===this.barCtx.series[t][e]||"bar"===i.config.chart.type&&!this.barCtx.series[t][e]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,i.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[s]:this.barCtx.strokeWidth)),a}getStackedSeriesIndices(t){const e=this.w,s=e.labelData.seriesGroups,a=e.globals.columnSeries?new Set(e.globals.columnSeries.i):null,i=t=>!a||a.has(t);if(!s||s.length<2){const e=Array.from({length:t},(t,e)=>e).filter(i);return e.length?[e]:[]}const r=Array.from({length:s.length},()=>[]),o=[];for(let e=0;e<t;e++){if(!i(e))continue;const t=this.getSeriesGroupIndex(e);t>-1?r[t].push(e):o.push(e)}return o.length&&r.push(o),r.filter(t=>t.length>0)}createBorderRadiusArr(t){var e;const s=this.w,a=!this.w.config.chart.stacked||s.config.plotOptions.bar.borderRadius<=0,i=t.length,r=0|(null==(e=t[0])?void 0:e.length),o=Array.from({length:i},()=>Array(r).fill(a?"top":"none"));if(a)return o;const n="bar"===this.w.config.chart.type&&1===r,l=n?"top":"both",h=n?"top":"bottom";for(const e of this.getStackedSeriesIndices(i))for(let s=0;s<r;s++){const a=[],i=[];for(const r of e){const e=t[r][s];e>0?a.push(r):e<0&&i.push(r)}if(a.length>0&&0===i.length)if(1===a.length)o[a[0]][s]=l;else{const t=a[0],e=a[a.length-1];for(const i of a)o[i][s]=i===t?h:i===e?"top":"none"}else if(i.length>0&&0===a.length)if(1===i.length)o[i[0]][s]="both";else{const t=Math.max(...i),e=Math.min(...i);for(const a of i)o[a][s]=a===t?"bottom":a===e?"top":"none"}else if(a.length>0&&i.length>0){const t=a[a.length-1];for(const e of a)o[e][s]=e===t?"top":"none";const e=Math.max(...i);for(const t of i)o[t][s]=t===e?"bottom":"none"}}return o}barBackground({j:t,i:e,x1:s,x2:a,y1:i,y2:r,elSeries:o}){const n=this.w,l=new x(this.barCtx.w),h=new L(this.barCtx.w).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&h===e){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);const e=this.barCtx.barOptions.colors.backgroundBarColors[t],h=l.drawRect(void 0!==s?s:0,void 0!==i?i:0,void 0!==a?a:n.layout.gridWidth,void 0!==r?r:n.layout.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,e,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(h),h.node.classList.add("apexcharts-backgroundBar")}}getColumnPaths({barWidth:t,barXPosition:e,y1:s,y2:a,strokeWidth:i,isReversed:r,series:o,seriesGroup:n,realIndex:l,i:h,j:d,w:b}){var c,u,g;const p=new x(this.barCtx.w);(i=Array.isArray(i)?i[l]:i)||(i=0);let f=t,y=e;(null==(c=b.config.series[l].data[d])?void 0:c.columnWidthOffset)&&(y=e-b.config.series[l].data[d].columnWidthOffset/2,f=t+b.config.series[l].data[d].columnWidthOffset);const v=i/2,m=y+v,C=y+f-v,w=(o[h][d]>=0?1:-1)*(r?-1:1);s+=.001-v*w,a+=.001+v*w;const I=p.line(C,s),P="around"===b.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][d]?" Z":" z",S=p.move(m,s)+p.line(m,a)+p.line(C,a)+I+P;let H=S;"none"!==this.arrBorderRadius[l][d]&&(H=p.roundPathCorners(H,b.config.plotOptions.bar.borderRadius));let L=null;const D=null==(g=null==(u=this.barCtx.ctx)?void 0:u.morphTypeChange)?void 0:g.getInitialPathFor(l,d);if(D?L=D:b.globals.previousPaths.length>0&&(L=this.barCtx.getPreviousPath(l,d,H,S)),null==L&&(L=p.move(m,s)+p.line(m,s)+I+I+I+I+I+p.line(m,s)+P),b.config.chart.stacked){let t=this.barCtx;t=this.barCtx[n],t.yArrj.push(a-v*w),t.yArrjF.push(Math.abs(s-a+i*w)),t.yArrjVal.push(this.barCtx.series[h][d])}return{pathTo:H,pathFrom:L,drawnBox:{x1:m,x2:C,y1:s,y2:a}}}getFunnelTrapezoidPaths({barYPosition:t,barHeight:e,series:s,i:a,j:i,realIndex:r,strokeWidth:o,w:n}){var l,h;const d=new x(this.barCtx.w),b=n.layout.gridWidth/2,c=t=>Math.abs(t/this.barCtx.invertedYRatio)/2,u=c(s[a][i]),g=i===s[a].length-1,p="taper"===n.config.plotOptions.funnel.lastShape?"taper":"flat";let f;f=g?"taper"===p?0:u:c(s[a][i+1]);const y=o/2,v=t+y,m=t+e-y,C=b-u,w=b+u,I=b-f,P=b+f,S=d.move(C,v)+d.line(w,v)+d.line(P,m)+d.line(I,m)+" Z";let H=null;const L=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(r,i);return L?H=L:n.globals.previousPaths.length>0&&(H=this.barCtx.getPreviousPath(r,i,S)),null==H&&(H=d.move(b,v)+d.line(b,v)+d.line(b,m)+d.line(b,m)+" Z"),{pathTo:S,pathFrom:H,x:w,x1:C,barXPosition:b}}computePyramidLayout(t){const e=this.w,s=e.layout.gridHeight,a=e.layout.gridWidth,i=t.map(t=>Math.abs(Number(t)||0)),r=i.reduce((t,e)=>t+e,0);if(0===r||s<=0)return i.map(()=>({y:0,height:0,topHalf:0,bottomHalf:0}));const o=a/2;let n=0;const l=[];for(let t=0;t<i.length;t++){const e=n/r;n+=i[t];const a=n/r,h=e*s,d=a*s;l.push({y:h,height:d-h,topHalf:e*o,bottomHalf:a*o})}return l}getPyramidPaths({barYPosition:t,barHeight:e,topHalf:s,bottomHalf:a,realIndex:i,j:r,strokeWidth:o,w:n}){var l,h;const d=new x(this.barCtx.w),b=n.layout.gridWidth/2,c=o/2,u=t+c,g=t+e-c,p=b-s,f=b+s,y=b-a,v=b+a,m=d.move(p,u)+d.line(f,u)+d.line(v,g)+d.line(y,g)+" Z";let C=null;const w=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(i,r);return w?C=w:n.globals.previousPaths.length>0&&(C=this.barCtx.getPreviousPath(i,r,m)),null==C&&(C=d.move(b,u)+d.line(b,u)+d.line(b,g)+d.line(b,g)+" Z"),{pathTo:m,pathFrom:C,x:f,x1:p,barXPosition:b}}getBarpaths({barYPosition:t,barHeight:e,x1:s,x2:a,strokeWidth:i,isReversed:r,series:o,seriesGroup:n,realIndex:l,i:h,j:d,w:b}){var c,u,g;const p=new x(this.barCtx.w);(i=Array.isArray(i)?i[l]:i)||(i=0);let f=t,y=e;(null==(c=b.config.series[l].data[d])?void 0:c.barHeightOffset)&&(f=t-b.config.series[l].data[d].barHeightOffset/2,y=e+b.config.series[l].data[d].barHeightOffset);const v=i/2,m=f+v,C=f+y-v,w=(o[h][d]>=0?1:-1)*(r?-1:1);s+=.001+v*w,a+=.001-v*w;const I=this.barCtx.isFunnel,P=I?(s+a)/2:s,S=p.line(s,C),H="around"===b.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][d]?" Z":" z",L=p.move(s,m)+p.line(a,m)+p.line(a,C)+S+H;let D=L;"none"!==this.arrBorderRadius[l][d]&&(D=p.roundPathCorners(D,b.config.plotOptions.bar.borderRadius));let R=null;const k=null==(g=null==(u=this.barCtx.ctx)?void 0:u.morphTypeChange)?void 0:g.getInitialPathFor(l,d);if(k?R=k:b.globals.previousPaths.length>0&&(R=this.barCtx.getPreviousPath(l,d,D,L)),null==R){const t=I?p.line(P,C):S;R=p.move(P,m)+p.line(P,m)+t+t+t+t+t+p.line(P,m)+H}if(b.config.chart.stacked){let t=this.barCtx;t=this.barCtx[n],t.xArrj.push(a+v*w),t.xArrjF.push(Math.abs(s-a-i*w)),t.xArrjVal.push(this.barCtx.series[h][d])}return{pathTo:D,pathFrom:R,drawnBox:{x1:s,x2:a,y1:m,y2:C}}}getXForValue(t,e,s=!0){let a=s?e:null;return null!=t&&(a=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),a}getYForValue(t,e,s,a=!0){let i=a?e:null;return null!=t&&(i=e-t/this.barCtx.yRatio[s]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[s]:0)),i}getGoalValues(t,e,s,a,i,r){const o=this.w,h=[],d=(a,i)=>{h.push({[t]:"x"===t?this.getXForValue(a,e,!1):this.getYForValue(a,s,r,!1),attrs:i})};if(o.seriesData.seriesGoals[a]&&o.seriesData.seriesGoals[a][i]&&Array.isArray(o.seriesData.seriesGoals[a][i])&&o.seriesData.seriesGoals[a][i].forEach(t=>{d(t.value,t)}),this.barCtx.barOptions.isDumbbell){const e=this.getDumbbellEnds(a,i);if(e.length){const s={strokeHeight:"x"===t?0:o.globals.markers.size[a],strokeWidth:"x"===t?o.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round"};let r=0,h=0;for(let t=1;t<e.length;t++)e[t].value<e[r].value&&(r=t),e[t].value>e[h].value&&(h=t);const b=o.config.plotOptions.bar.dumbbell.dataLabels;e.forEach((t,e)=>{const o=l(n({},s),{strokeColor:t.color});!b.enabled||e!==r&&e!==h||(o.label={text:this.getDumbbellLabelText(t.value,a,i,t.index),color:b.colorFromMarker?t.color:Array.isArray(b.style.colors)?b.style.colors[t.index]||b.style.colors[0]:b.style.colors,outward:e===r&&r!==h?-1:1}),d(t.value,o)})}}return h}getDumbbellEnds(t,e){const s=this.w,a=[],i=s.dumbbellData;if(i&&"series"===i.form){const t=i.values[e]||[];for(let e=0;e<t.length;e++){const r=t[e];null!==r&&-1===i.hidden.indexOf(e)&&a.push({value:r,color:s.globals.colors[e],index:e})}return a}if(!s.rangeData.seriesRange.length)return a;const r=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:s.globals.colors,o=e=>Array.isArray(r[t])?r[t][e]:r[t];return[{value:s.rangeData.seriesRangeStart[t][e],color:o(0),index:0},{value:s.rangeData.seriesRangeEnd[t][e],color:o(1),index:1}]}getDumbbellLabelText(t,e,s,a){const i=this.w,r=i.config.plotOptions.bar.dumbbell.dataLabels;if("function"==typeof r.formatter)return r.formatter(t,{seriesIndex:e,dataPointIndex:s,endpointIndex:a,w:i});const o=this.barCtx.isHorizontal?i.formatters.xLabelFormatter:i.formatters.yLabelFormatters[0];return"function"==typeof o?o(t,s,i):String(t)}drawGoalLine({barXPosition:t,barYPosition:e,goalX:s,goalY:a,barWidth:i,barHeight:r}){if(!(Array.isArray(s)&&s.length>0||Array.isArray(a)&&a.length>0))return null;const o=new x(this.barCtx.w),n=o.group({class:"apexcharts-bar-goals-groups"});n.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:n.node}),n.attr("clip-path",`url(#gridRectMarkerMask${this.barCtx.w.globals.cuid})`);let l=null;return this.barCtx.isHorizontal?Array.isArray(s)&&s.forEach(t=>{if(t.x>=-1&&t.x<=o.w.layout.gridWidth+1){const s=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:r/2,a=e+s+r/2;l=o.drawLine(t.x,a-2*s,t.x,a,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),n.add(l),t.attrs.label&&n.add(this.drawDumbbellLabel(t.attrs,{x:t.x,y:a-s,horizontal:!0,markerSize:t.attrs.strokeWidth||0}))}}):Array.isArray(a)&&a.forEach(e=>{if(e.y>=-1&&e.y<=o.w.layout.gridHeight+1){const s=void 0!==e.attrs.strokeWidth?e.attrs.strokeWidth:i/2,a=t+s+i/2;l=o.drawLine(a-2*s,e.y,a,e.y,e.attrs.strokeColor?e.attrs.strokeColor:void 0,e.attrs.strokeDashArray,e.attrs.strokeHeight?e.attrs.strokeHeight:2,e.attrs.strokeLineCap),n.add(l),e.attrs.label&&n.add(this.drawDumbbellLabel(e.attrs,{x:a-s,y:e.y,horizontal:!1,markerSize:e.attrs.strokeHeight||0}))}}),n}drawDumbbellLabel(t,e){const s=this.w,a=new x(s),i=s.config.plotOptions.bar.dumbbell.dataLabels,r=e.markerSize/2+i.offset,o=t.label.outward;return a.drawText({x:e.x+(e.horizontal?r*o:0),y:e.y-(e.horizontal?0:r*o),text:t.label.text,textAnchor:e.horizontal?o<0?"end":"start":"middle",dominantBaseline:e.horizontal?"central":o<0?"hanging":"auto",foreColor:t.label.color,fontSize:i.style.fontSize,fontFamily:i.style.fontFamily,fontWeight:i.style.fontWeight,cssClass:"apexcharts-dumbbell-label"})}drawBarShadow({prevPaths:t,currPaths:e,color:s,realIndex:a,j:i}){const r=this.w,{x:o,x1:n,barYPosition:l}=t,{x:h,x1:d,barYPosition:c}=e,u=l+e.barHeight,g=new x(this.barCtx.w),p=new b,f=g.move(n,u)+g.line(o,u)+g.line(h,c)+g.line(d,c)+g.line(n,u)+("around"===r.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[a][i]?" Z":" z");return g.drawPath({d:f,fill:p.shadeColor(.5,b.rgb2hex(s)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}getZeroValueEncounters({i:t,j:e}){var s;const a=this.w;let i=0,r=0;return(a.config.plotOptions.bar.horizontal?a.seriesData.series.map((t,e)=>e):(null==(s=a.globals.columnSeries)?void 0:s.i.map(t=>t))||[]).forEach(s=>{const o=a.globals.seriesPercent[s][e];o&&i++,s<t&&0===o&&r++}),{nonZeroColumns:i,zeroEncounters:r}}getSeriesGroupIndex(t){const e=this.w;return e.labelData.seriesGroups.findIndex(s=>s.indexOf(e.seriesData.seriesNames[t])>-1)}getGroupIndex(t){const e=this.w,s=e.labelData.seriesGroups.findIndex(s=>s.indexOf(e.seriesData.seriesNames[t])>-1),a=this.barCtx.columnGroupIndices;let i=a.indexOf(s);return i<0&&(a.push(s),i=a.length-1),{groupIndex:s,columnGroupIndex:i}}}const X=d.__apex_CoreUtils,A=d.__apex_Filters,W=d.__apex_Animations_computeStagger;class F{static xRatio(t){const e=t.layout.gridWidth||1;return(t.globals.maxX-t.globals.minX)/e}static dataXToPx(t,e){return(e-t.globals.minX)/F.xRatio(t)}static pxToDataX(t,e){return t.globals.minX+e*F.xRatio(t)}static screenXToPlotPx(t,e){const s=t.dom.baseEl,a=s&&s.querySelector(".apexcharts-svg");if(!a)return e-t.layout.translateX;const i=a.getBoundingClientRect(),r=t.globals.svgWidth?i.width/t.globals.svgWidth:1;return(e-i.left)/(r||1)-t.layout.translateX}}class O{constructor(t,e,s){this.ctx=e,this.w=t,this.barOptions=t.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=t.config.stroke.width,this.isNullValue=!1,this.isRangeBar=t.rangeData.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&t.rangeData.seriesRange.length&&t.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.isPyramid=this.barOptions.isPyramid,this.pyramidLayout=null,this.xyRatios=s,this.xRatio=0,this.yRatio=[],this.invertedXRatio=0,this.invertedYRatio=0,this.baseLineY=[],this.baseLineInvertedY=0,null!==this.xyRatios&&(this.xRatio=s.xRatio,this.yRatio=s.yRatio,this.invertedXRatio=s.invertedXRatio,this.invertedYRatio=s.invertedYRatio,this.baseLineY=s.baseLineY,this.baseLineInvertedY=s.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[],this._prevKeyed=null,this._ltCache=null,this._layoutShiftCache=null,this._pathToInterp=null,this.series=[],this.elSeries=null,this.visibleI=0,this.isReversed=!1;const a=new L(this.w);this.lastActiveBarSerieIndex=a.getActiveConfigSeriesIndex("desc",["bar","column"]),this.lastActiveBarSerieIndexByGroup=a.getActiveConfigSeriesIndexByGroup(["bar","column"]),this.columnGroupIndices=[];const i=a.getBarSeriesIndices(),r=new X(this.w);this.stackedSeriesTotals=r.getStackedSeriesTotals(this.w.config.series.map((t,e)=>-1===i.indexOf(e)?e:-1).filter(t=>-1!==t)),this.barHelpers=new k(this)}draw(t,e){var s,a,i;const r=this.w,o=new x(this.w),h=new X(this.w);t=h.getLogSeries(t),this.series=t,this.yRatio=h.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const d=o.group({class:"apexcharts-bar-series apexcharts-plot-series"});r.config.dataLabels.enabled&&(this.totalItems,this.barOptions.dataLabels.maxItems);for(let h=0,c=0;h<t.length;h++,c++){let u,g;const p=[],x=[],f=r.globals.comboCharts?e[h]:h,{columnGroupIndex:y}=this.barHelpers.getGroupIndex(f),v=o.group({class:"apexcharts-series",rel:h+1,seriesName:b.escapeString(r.seriesData.seriesNames[f]),"data:realIndex":f});L.addCollapsedClassToSeries(this.w,v,f),t[h].length>0&&(this.visibleI=this.visibleI+1),this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[f],this.translationsIndex=f);const m=this.translationsIndex;this.isReversed=r.config.yaxis[this.yaxisIndex]&&r.config.yaxis[this.yaxisIndex].reversed,this.isPyramid&&(this.pyramidLayout=this.barHelpers.computePyramidLayout(t[h]));const C=this.barHelpers.initialPositions(f),{y:I,yDivision:P,zeroW:H,x:D,xDivision:R,zeroH:k}=C;let X=C.barHeight,W=C.barWidth;g=I,u=D,this.isHorizontal||x.push(u+(null!=W?W:0)/2);const F=o.group({class:"apexcharts-datalabels","data:realIndex":f});r.globals.delayedElements.push({el:F.node,holdUntilComplete:!(null==(s=r.config.dataLabels.animate)?void 0:s.enabled)&&this.isLengthTransition(f)}),F.node.classList.add("apexcharts-element-hidden");const O=o.group({class:"apexcharts-bar-goals-markers"}),Y=o.group({class:"apexcharts-bar-shadows"});r.globals.delayedElements.push({el:Y.node}),Y.node.classList.add("apexcharts-element-hidden");for(let e=0;e<t[h].length;e++){const s=this.barHelpers.getStrokeWidth(h,e,f);let o=null;const d={indexes:{i:h,j:e,realIndex:f,translationsIndex:m,bc:c},x:u,y:g,strokeWidth:s,elSeries:v};this.isHorizontal?(o=this.drawBarPaths(l(n({},d),{barHeight:X,zeroW:H,yDivision:P})),W=this.series[h][e]/this.invertedYRatio):(o=this.drawColumnPaths(l(n({},d),{xDivision:R,barWidth:W,zeroH:k})),X=this.series[h][e]/this.yRatio[m]);const C=this.barHelpers.getPathFillColor(t,h,e,f);if(this.isFunnel&&!this.isPyramid&&this.barOptions.isFunnel3d&&"trapezoid"!==(null==(a=r.config.plotOptions.funnel)?void 0:a.shape)&&this.pathArr.length&&e>0){const t=this.barHelpers.drawBarShadow({color:"string"==typeof C.color&&-1===(null==(i=C.color)?void 0:i.indexOf("url"))?C.color:b.hexToRgba(r.globals.colors[h]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:o,realIndex:f,j:e});if(Y.add(t),r.config.chart.dropShadow.enabled){new A(this.w).dropShadow(t,r.config.chart.dropShadow,f)}}this.pathArr.push(o);const w=this.barHelpers.drawGoalLine({barXPosition:o.barXPosition,barYPosition:o.barYPosition,goalX:o.goalX,goalY:o.goalY,barHeight:X,barWidth:W});w&&O.add(w),g=o.y,u=o.x,e>0&&x.push(u+(null!=W?W:0)/2),p.push(g),this.renderSeries(l(n({realIndex:f,pathFill:C.color},C.useRangeColor?{lineFill:C.color}:{}),{j:e,i:h,columnGroupIndex:y,pathFrom:o.pathFrom,pathTo:o.pathTo,strokeWidth:s,elSeries:v,x:u,y:g,series:t,barHeight:Math.abs(o.barHeight?o.barHeight:X),barWidth:Math.abs(o.barWidth?o.barWidth:W),elDataLabelsWrap:F,elGoalsMarkers:O,elBarShadows:Y,visibleSeries:this.visibleI,type:"bar"}))}if(r.globals.seriesXvalues[f]=x,r.globals.seriesYvalues[f]=p,r.globals.previousPaths.length>0){const e=[];for(let s=0;s<t[h].length;s++)e.push(w(r,f,s));S({w:r,elSeries:v,record:this._prevRecord(f),newKeys:e,isHorizontal:this.isHorizontal,speed:r.config.chart.animations.dynamicAnimation.speed})}d.add(v)}return d}renderSeries({realIndex:t,pathFill:e,lineFill:s,j:a,i:i,columnGroupIndex:r,pathFrom:o,pathTo:n,strokeWidth:l,elSeries:h,x:d,y:b,y1:c,y2:u,series:g,barHeight:p,barWidth:f,barXPosition:y,barYPosition:v,elDataLabelsWrap:m,elGoalsMarkers:C,elBarShadows:I,visibleSeries:P,type:S,classes:L}){var D,R,k,X,F,O,Y;const B=this.w,T=new x(this.w,this.ctx),j=function(t,e){const s=t&&t.renderer;return s&&s.kind&&"svg"!==s.kind?s:e}(this.ctx,T);let z=!1;const G=this._pathToInterp;if(this._pathToInterp=null,h._bindingsDelegated||(h._bindingsDelegated=!0,T.setupEventDelegation(h,`.apexcharts-${S}-area`)),!s){let e=function(t){const e=B.config.stroke.colors;let s;return Array.isArray(e)&&e.length>0&&(s=e[t],s||(s=""),"function"==typeof s)?s({value:B.seriesData.series[t][a],dataPointIndex:a,w:B}):s};const i="function"==typeof B.globals.stroke.colors[t]?e(t):B.globals.stroke.colors[t];s=this.barOptions.distributed?B.globals.stroke.colors[a]:i}const _=B.config.chart.animations,M=_.animateGradually;let N=0,V=0;if(M&&!1!==M.enabled&&!(B.globals.dataChanged&&this.isLayoutShift(t))){const t=B.globals.dataPoints||1,e=M.delay||0,s=Math.min(e,.5*_.speed/Math.max(1,t));V=W({style:"sequential",index:a,baseDelay:s}),B.config.chart.stacked&&!B.globals.dataChanged&&(V+=i*s*.5);N=V/(e||1)}const E=new H(this).handleBarDataLabels({x:d,y:b,y1:c,y2:u,i:i,j:a,series:g,realIndex:t,columnGroupIndex:r,barHeight:p,barWidth:f,barXPosition:y,barYPosition:v,visibleSeries:P});if(V>0){const t=B.config.dataLabels;if((null==(D=t.animate)?void 0:D.enabled)||(null==(R=t.countUp)?void 0:R.enabled)){const t=String(Math.round(V));null==(X=null==(k=E.dataLabels)?void 0:k.node)||X.setAttribute("data:dlDelay",t),null==(O=null==(F=E.totalDataLabels)?void 0:F.node)||O.setAttribute("data:dlDelay",t)}}if(B.globals.isBarHorizontal||(E.dataLabelsPos.dataLabelsX+Math.max(f,B.globals.barPadForNumericAxis)<0||E.dataLabelsPos.dataLabelsX-Math.max(f,B.globals.barPadForNumericAxis)>B.layout.gridWidth)&&(z=!0),B.config.series[i].data[a]&&B.config.series[i].data[a].strokeColor&&(s=B.config.series[i].data[a].strokeColor),this.isNullValue&&-1===B.globals.collapsingSeriesIndices.indexOf(t)&&(e="none"),!z){const r=!0===(null==(Y=this.ctx.morphTypeChange)?void 0:Y.isActive()),d=r?this.ctx.morphTypeChange.getSpeed():B.config.chart.animations.dynamicAnimation.speed,b=r&&this.ctx.morphTypeChange.claimsTargetMark(t,a);b&&(o=n,N=0);const g=j.renderPaths({i:i,j:a,realIndex:t,pathFrom:o,pathTo:n,stroke:s,strokeWidth:l,strokeLineCap:B.config.stroke.lineCap,fill:e,pathToInterp:G,animationDelay:N,initialSpeed:B.config.chart.animations.speed,dataChangeSpeed:d,className:`apexcharts-${S}-area${L?` ${L}`:""}`,chartType:S,bindEventsOnPaths:!1});g.attr("clip-path",`url(#gridRectBarMask${B.globals.cuid})`),b&&(g.node.setAttribute("opacity","0"),g.node.setAttribute("data-piece-hidden","1"));const x=B.config.forecastDataPoints;x.count>0&&a>=B.globals.dataPoints-x.count&&(g.node.setAttribute("stroke-dasharray",x.dashArray),g.node.setAttribute("stroke-width",x.strokeWidth),g.node.setAttribute("fill-opacity",x.fillOpacity)),void 0!==c&&void 0!==u&&(g.attr("data-range-y1",c),g.attr("data-range-y2",u));new A(this.w).setSelectionFilter(g,t,a),h.add(g),g.attr({cy:E.dataLabelsPos.bcy,cx:E.dataLabelsPos.bcx,j:a,val:B.seriesData.series[i][a],barHeight:p,barWidth:f,"data:pathKey":w(B,t,a)}),"canvas"===j.kind&&(B.globals.barCanvasCoords||(B.globals.barCanvasCoords={}),B.globals.barCanvasCoords[t]||(B.globals.barCanvasCoords[t]={}),B.globals.barCanvasCoords[t][a]={cx:E.dataLabelsPos.bcx,cy:E.dataLabelsPos.bcy,barWidth:f}),null!==E.dataLabels&&m.add(E.dataLabels),E.totalDataLabels&&m.add(E.totalDataLabels),h.add(m),C&&h.add(C),I&&h.add(I)}return h}drawBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:a,x:i,y:r,yDivision:o,elSeries:n}){const l=this.w,h=t.i,d=t.j;let b;if(l.axisFlags.isXNumeric)b=(r=(l.seriesData.seriesX[h][d]-l.globals.minX)/this.invertedXRatio-e)+e*this.visibleI;else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:t,zeroEncounters:s}=this.barHelpers.getZeroValueEncounters({i:h,j:d});t>0&&(e=this.seriesLen*e/t),b=r+e*this.visibleI,b-=e*s}else b=r+e*this.visibleI;const c=this.isFunnel&&"trapezoid"===l.config.plotOptions.funnel.shape,u=this.isPyramid&&this.pyramidLayout?this.pyramidLayout[d]:null,g=!!u;if(u)b=u.y,e=u.height;else if(this.isFunnel&&!c){const t=null!=a?a:0;a=t-(this.barHelpers.getXForValue(this.series[h][d],t)-t)/2}let p;return i=this.barHelpers.getXForValue(this.series[h][d],null!=a?a:0),p=u?this.barHelpers.getPyramidPaths({barYPosition:b,barHeight:e,topHalf:u.topHalf,bottomHalf:u.bottomHalf,realIndex:t.realIndex,j:d,strokeWidth:s,w:l}):c?this.barHelpers.getFunnelTrapezoidPaths({barYPosition:b,barHeight:e,series:this.series,i:h,j:d,realIndex:t.realIndex,strokeWidth:s,w:l}):this.barHelpers.getBarpaths({barYPosition:b,barHeight:e,x1:a,x2:i,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,i:h,j:d,w:l}),(c||g)&&(a=p.x1,i=p.x),l.axisFlags.isXNumeric||g||(r+=o),g&&(r=b),this.barHelpers.barBackground({j:d,i:h,y1:b-e*this.visibleI,y2:e*this.seriesLen,elSeries:n}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x1:a,x:i,y:r,goalX:this.barHelpers.getGoalValues("x",a,null,t.realIndex,d,0),barYPosition:b,barHeight:e}}drawColumnPaths({indexes:t,x:e,y:s,xDivision:a,barWidth:i,zeroH:r,strokeWidth:o,elSeries:n}){const l=this.w,h=t.realIndex,d=t.translationsIndex,b=t.i,c=t.j,u=t.bc;let g;if(l.axisFlags.isXNumeric){const t=this.getBarXForNumericXAxis({x:e,j:c,realIndex:h,barWidth:i});e=t.x,g=t.barXPosition}else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:t,zeroEncounters:s}=this.barHelpers.getZeroValueEncounters({i:b,j:c});t>0&&(i=this.seriesLen*i/t),g=e+i*this.visibleI,g-=i*s}else g=e+i*this.visibleI;s=this.barHelpers.getYForValue(this.series[b][c],r,d);const p=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:i,y1:r,y2:s,strokeWidth:o,isReversed:this.isReversed,series:this.series,realIndex:h,i:b,j:c,w:l});return l.axisFlags.isXNumeric||(e+=a),this.barHelpers.barBackground({bc:u,j:c,i:b,x1:g-o/2-i*this.visibleI,x2:i*this.seriesLen+o/2,elSeries:n}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x:e,y:s,goalY:this.barHelpers.getGoalValues("y",null,r,h,c,d),barXPosition:g,barWidth:i}}getBarXForNumericXAxis({x:t,barWidth:e,realIndex:s,j:a}){const i=this.w;let r=s;return i.seriesData.seriesX[s].length||(r=i.globals.maxValsInArrayIndex),b.isNumber(i.seriesData.seriesX[r][a])&&(t=F.dataXToPx(i,i.seriesData.seriesX[r][a])-e*this.seriesLen/2),{barXPosition:t+(R(i)?0:e*this.visibleI),x:t}}_prevRecord(t){const e=this.w;let s=null;for(let a=0;a<e.globals.previousPaths.length;a++){const i=e.globals.previousPaths[a];i.paths&&i.paths.length>0&&parseInt(i.realIndex,10)===parseInt(String(t),10)&&(s=i)}return s}_prevKeyedPaths(t){if(this._prevKeyed||(this._prevKeyed={}),void 0!==this._prevKeyed[t])return this._prevKeyed[t];const e=this._prevRecord(t);let s=null;if(e&&e.paths.every(t=>null!=t.key)){const t=new Map;e.paths.forEach(e=>{t.set(e.key,e)}),s=t}return this._prevKeyed[t]=s,s}isLengthTransition(t){var e,s;if(this._ltCache||(this._ltCache={}),void 0!==this._ltCache[t])return this._ltCache[t];const a=this.w;let i=!1;if(C(a)&&a.globals.previousPaths.length>0){const r=this._prevRecord(t),o=null!=(s=null==(e=a.seriesData.series[t])?void 0:e.length)?s:0;if(r)if(r.paths.length!==o)i=!0;else{const e=this._prevKeyedPaths(t);if(e)for(let s=0;s<o;s++)if(!e.has(w(a,t,s))){i=!0;break}}else i=o>0}return this._ltCache[t]=i,i}isLayoutShift(t){if(this.isLengthTransition(t))return!0;if(this._layoutShiftCache||(this._layoutShiftCache={}),void 0!==this._layoutShiftCache[t])return this._layoutShiftCache[t];const e=P(this.w,t,!0,!0),s=!(!e||!e.join.changed);return this._layoutShiftCache[t]=s,s}getPreviousPath(t,e,s,a){const i=this.w;this._pathToInterp=null;const r=this._prevRecord(t);if(!r)return C(i)?null:s;let o=null,n=!1;const l=this._prevKeyedPaths(t);if(l){const s=l.get(w(i,t,e));s?o=s.d:n=!0}else void 0!==r.paths[e]?o=r.paths[e].d:n=!0;if(o){const t=O.pathCommandCount(o),e=O.pathCommandCount(s);if(t===e)return o;const r=new x(i),n=t=>{const e=O.pathBox(t);return e?Math.min(e.maxX-e.minX,e.maxY-e.minY):0},l=t<e?n(o)>1:n(s)>1;if(t<e){const t=r.roundPathCorners(o,0);if(O.pathCommandCount(t)===e){if(l&&a){const t=r.roundPathCorners(a,0);O.pathCommandCount(t)===e&&(this._pathToInterp=t)}return t}}else{const e=r.roundPathCorners(s,0);if(O.pathCommandCount(e)===t){if(this._pathToInterp=e,l){const e=O.squareLike(o),s=e?r.roundPathCorners(e,0):null;if(s&&O.pathCommandCount(s)===t)return s}return o}}}return n&&C(i)?null:s}static pathBox(t){if(!t)return null;const e=[],s=/([MLC])([^MLCZz]*)/g;let a;for(;null!==(a=s.exec(t));){const t=a[2].trim().split(/[\s,]+/).map(Number);t.length<2||t.some(isNaN)||e.push([t[t.length-2],t[t.length-1]])}if(e.length<3)return null;const i=e.map(t=>t[0]),r=e.map(t=>t[1]);return{minX:Math.min(...i),maxX:Math.max(...i),minY:Math.min(...r),maxY:Math.max(...r),start:e[0],vertical:Math.abs(e[1][0]-e[0][0])<Math.abs(e[1][1]-e[0][1])}}static squareLike(t){const e=O.pathBox(t);if(!e)return null;const{minX:s,maxX:a,minY:i,maxY:r,start:o,vertical:n}=e,l=(t,e,s)=>Math.abs(t-e)<=Math.abs(t-s)?[e,s]:[s,e];let h,d,b,c;n?(h=Math.abs(o[0]-s)<=Math.abs(o[0]-a)?s:a,d=h===s?a:s,[b,c]=l(o[1],i,r)):(b=Math.abs(o[1]-i)<=Math.abs(o[1]-r)?i:r,c=b===i?r:i,[h,d]=l(o[0],s,a));const u=t.trim().endsWith("Z")?" Z":" z";return n?`M ${h} ${b} L ${h} ${c} L ${d} ${c} L ${d} ${b}${u}`:`M ${h} ${b} L ${d} ${b} L ${d} ${c} L ${h} ${c}${u}`}getPreviousFlip(t,e){const s=this.w,a=this._prevRecord(t);if(!a)return null;const i=this._prevKeyedPaths(t),r=i?i.get(w(s,t,e)):a.paths[e];return r?!!r.flip:null}static pathCommandCount(t){if(!t)return 0;const e=t.match(/[A-Za-z]/g);return e?e.length:0}}d.default.use({bar:O,column:O,barStacked:class extends O{draw(t,e){const s=this.w;this.graphics=new x(this.w),this.bar=new O(this.w,this.ctx,this.xyRatios);const a=new X(this.w);t=a.getLogSeries(t),this.yRatio=a.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===s.config.chart.stackType&&(t=s.globals.comboCharts?e.map(t=>s.globals.seriesPercent[t]):s.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);const i=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"});let r=0,o=0;const h=s.config.chart.animations,d=h.enabled&&h.dynamicAnimation.enabled&&s.globals.previousPaths.length>0;let c=!1;for(let a=0,h=0;a<t.length;a++,h++){const u=s.globals.comboCharts?e[a]:a,{groupIndex:g,columnGroupIndex:p}=this.barHelpers.getGroupIndex(u);this.groupCtx=this[s.labelData.seriesGroups[g]];const x=[],f=[];let y=0;this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[u][0],y=u),this.isReversed=s.config.yaxis[this.yaxisIndex]&&s.config.yaxis[this.yaxisIndex].reversed;let v=this.graphics.group({class:"apexcharts-series",seriesName:b.escapeString(s.seriesData.seriesNames[u]),rel:a+1,"data:realIndex":u});L.addCollapsedClassToSeries(this.w,v,u);const m=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":u});L.addCollapsedClassToSeries(this.w,m,u),(s.globals.collapsingSeriesIndices||[]).indexOf(u)>-1&&m.node.style.setProperty("--apexcharts-dl-exit",`${s.config.chart.animations.dynamicAnimation.speed}ms`);const C=this.graphics.group({class:"apexcharts-bar-goals-markers"}),w=this.initialPositions(r,o,void 0,void 0,void 0,void 0,y),{xDivision:I,yDivision:P,zeroH:S,zeroW:H}=w;let D=w.barHeight,R=w.barWidth;o=w.y,r=w.x,s.globals.barHeight=D,s.globals.barWidth=R,this.barHelpers.initializeStackedXYVars(this),1===this.groupCtx.prevY.length&&this.groupCtx.prevY[0].every(t=>isNaN(t))&&(this.groupCtx.prevY[0]=this.groupCtx.prevY[0].map(()=>S),this.groupCtx.prevYF[0]=this.groupCtx.prevYF[0].map(()=>0));for(let e=0;e<s.globals.dataPoints;e++){const i=this.barHelpers.getStrokeWidth(a,e,u),b={indexes:{i:a,j:e,realIndex:u,translationsIndex:y,bc:h},strokeWidth:i,x:r,y:o,elSeries:v,columnGroupIndex:p,seriesGroup:s.labelData.seriesGroups[g]};let w=null;this.isHorizontal?(w=this.drawStackedBarPaths(l(n({},b),{zeroW:H,barHeight:D,yDivision:P})),R=this.series[a][e]/this.invertedYRatio):(w=this.drawStackedColumnPaths(l(n({},b),{xDivision:I,barWidth:R,zeroH:S})),D=this.series[a][e]/this.yRatio[y]);const L=this.barHelpers.drawGoalLine({barXPosition:w.barXPosition,barYPosition:w.barYPosition,goalX:w.goalX,goalY:w.goalY,barHeight:D,barWidth:R});L&&C.add(L),o=w.y,r=w.x,x.push(r),f.push(o);const k=this.barHelpers.getPathFillColor(t,a,e,u);let X="";const A=s.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y",W="bottom"===this.barHelpers.arrBorderRadius[u][e]&&s.seriesData.series[u][e]>0||"top"===this.barHelpers.arrBorderRadius[u][e]&&s.seriesData.series[u][e]<0,F=d&&!W&&this.getPreviousFlip(u,e);(W||F)&&(X=A),F&&(X+=" apexcharts-flip-held",c=!0),v=this.renderSeries(l(n({realIndex:u,pathFill:k.color},k.useRangeColor?{lineFill:k.color}:{}),{j:e,i:a,columnGroupIndex:p,pathFrom:w.pathFrom,pathTo:w.pathTo,strokeWidth:i,elSeries:v,x:r,y:o,series:t,barHeight:D,barWidth:R,elDataLabelsWrap:m,elGoalsMarkers:C,type:"bar",visibleSeries:p,classes:X}))}s.globals.seriesXvalues[u]=x,s.globals.seriesYvalues[u]=f,this.groupCtx.prevY.push(this.groupCtx.yArrj),this.groupCtx.prevYF.push(this.groupCtx.yArrjF),this.groupCtx.prevYVal.push(this.groupCtx.yArrjVal),this.groupCtx.prevX.push(this.groupCtx.xArrj),this.groupCtx.prevXF.push(this.groupCtx.xArrjF),this.groupCtx.prevXVal.push(this.groupCtx.xArrjVal),i.add(v)}return c&&this.settleHeldMirrors(),i}settleHeldMirrors(){const t=this.w;if(!m.isBrowser())return;const e=t.config.chart.animations,s=(e.dynamicAnimation.speed||0)+(e.speed||0)+100;setTimeout(()=>{!t.globals.isDestroyed&&b.elementExists(t.dom.baseEl)&&t.dom.baseEl.querySelectorAll(".apexcharts-flip-held").forEach(t=>{t.classList.remove("apexcharts-flip-held","apexcharts-flip-y","apexcharts-flip-x")})},s)}initialPositions(t,e,s,a,i,r,o){const n=this.w;let l,h;if(this.isHorizontal){a=n.layout.gridHeight/n.globals.dataPoints;const t=n.config.plotOptions.bar.barHeight;l=-1===String(t).indexOf("%")?parseInt(t,10):a*parseInt(t,10)/100,r=n.globals.padHorizontal+(this.isReversed?n.layout.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),e=(a-l)/2}else{h=s=n.layout.gridWidth/n.globals.dataPoints;const e=n.config.plotOptions.bar.columnWidth,a=n.axisFlags.isXNumeric?this.barHelpers.barSlotXSpan():0;a>0?h=(s=a/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:h*=parseInt(e,10)/100,-1===String(e).indexOf("%")&&(h=parseInt(e,10)),i=this.isReversed?this.baseLineY[o]:n.layout.gridHeight-this.baseLineY[o],t=n.globals.padHorizontal+(s-h)/2}const d=n.globals.barGroups.length||1;return{x:t,y:e,yDivision:a,xDivision:s,barHeight:(null!=l?l:0)/d,barWidth:(null!=h?h:0)/d,zeroH:i,zeroW:r}}drawStackedBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:a,x:i,y:r,columnGroupIndex:o,seriesGroup:n,yDivision:l,elSeries:h}){var d,b,c,u,g;const p=this.w,x=r+o*e;let f;const y=t.i,v=t.j,m=t.realIndex,C=t.translationsIndex;let w=0;for(let t=0;t<this.groupCtx.prevXF.length;t++)w+=this.groupCtx.prevXF[t][v];const I=this.groupCtx.prevX.length;if(I>0){let t=a;this.groupCtx.prevXVal[I-1][v]<0?t=(null==(d=this.series[y])?void 0:d[v])>=0?this.groupCtx.prevX[I-1][v]+w-2*(this.isReversed?w:0):this.groupCtx.prevX[I-1][v]:this.groupCtx.prevXVal[I-1][v]>=0&&(t=(null==(b=this.series[y])?void 0:b[v])>=0?this.groupCtx.prevX[I-1][v]:this.groupCtx.prevX[I-1][v]-w+2*(this.isReversed?w:0)),f=t}else f=a;i=null===(null==(c=this.series[y])?void 0:c[v])?f:f+(null==(u=this.series[y])?void 0:u[v])/this.invertedYRatio-2*(this.isReversed?(null==(g=this.series[y])?void 0:g[v])/this.invertedYRatio:0);const P=this.barHelpers.getBarpaths({barYPosition:x,barHeight:e,x1:f,x2:i,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,seriesGroup:n,i:y,j:v,w:p});return this.barHelpers.barBackground({j:v,i:y,y1:x,y2:e,elSeries:h}),r+=l,{pathTo:P.pathTo,pathFrom:P.pathFrom,goalX:this.barHelpers.getGoalValues("x",a,null,m,v,C),barXPosition:f,barYPosition:x,x:i,y:r}}drawStackedColumnPaths({indexes:t,x:e,y:s,xDivision:a,barWidth:i,zeroH:r,columnGroupIndex:o,seriesGroup:n,elSeries:l}){var h,d,b,c,u,g,p,x,f;const y=this.w,v=t.i,m=t.j,C=t.bc,w=t.realIndex,I=t.translationsIndex;if(y.axisFlags.isXNumeric){let t=y.seriesData.seriesX[w][m];t||(t=0),e=(t-y.globals.minX)/this.xRatio-i/2*y.globals.barGroups.length}const P=e+o*i;let S,H=0;for(let t=0;t<this.groupCtx.prevYF.length;t++)H+=isNaN(this.groupCtx.prevYF[t][m])?0:this.groupCtx.prevYF[t][m];const L=this.groupCtx.prevY.length;if(L>0&&!y.axisFlags.isXNumeric||L>0&&y.axisFlags.isXNumeric&&y.seriesData.seriesX[w-1][m]===y.seriesData.seriesX[w][m]){let t,e;const s=Math.min(this.yRatio.length+1,w+1);if(void 0!==this.groupCtx.prevY[L-1]&&this.groupCtx.prevY[L-1].length)for(let t=1;t<s;t++)if(!isNaN(null==(h=this.groupCtx.prevY[L-t])?void 0:h[m])){e=this.groupCtx.prevY[L-t][m];break}for(let a=1;a<s;a++){if((null==(d=this.groupCtx.prevYVal[L-a])?void 0:d[m])<0){t=(null==(b=this.series[v])?void 0:b[m])>=0?e-H+2*(this.isReversed?H:0):e;break}if((null==(c=this.groupCtx.prevYVal[L-a])?void 0:c[m])>=0){t=(null==(u=this.series[v])?void 0:u[m])>=0?e:e+H-2*(this.isReversed?H:0);break}}void 0===t&&(t=y.layout.gridHeight),S=(null==(g=this.groupCtx.prevYF[0])?void 0:g.every(t=>0===t))&&this.groupCtx.prevYF.slice(1,L).every(t=>t.every(t=>isNaN(t)))?r:t}else S=r;s=(null==(p=this.series[v])?void 0:p[m])?S-(null==(x=this.series[v])?void 0:x[m])/this.yRatio[I]+2*(this.isReversed?(null==(f=this.series[v])?void 0:f[m])/this.yRatio[I]:0):S;const D=this.barHelpers.getColumnPaths({barXPosition:P,barWidth:i,y1:S,y2:s,yRatio:this.yRatio[I],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:n,realIndex:t.realIndex,i:v,j:m,w:y});return this.barHelpers.barBackground({bc:C,j:m,i:v,x1:P,x2:i,elSeries:l}),{pathTo:D.pathTo,pathFrom:D.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,r,w,m,0),barXPosition:P,x:y.axisFlags.isXNumeric?e:e+a,y:s}}},rangeBar:class extends O{draw(t,e){var s,a,i,r,o,l,h,d,c;const u=this.w,g=new x(this.w);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=u.rangeData.seriesRangeStart,this.seriesRangeEnd=u.rangeData.seriesRangeEnd,this.barHelpers.initVariables(t);const p=g.group({class:"apexcharts-rangebar-series apexcharts-plot-series"});for(let x=0;x<t.length;x++){let f,y;const v=u.globals.comboCharts?e[x]:x,{columnGroupIndex:m}=this.barHelpers.getGroupIndex(v),C=g.group({class:"apexcharts-series",seriesName:b.escapeString(u.seriesData.seriesNames[v]),rel:x+1,"data:realIndex":v});L.addCollapsedClassToSeries(this.w,C,v),t[x].length>0&&(this.visibleI=this.visibleI+1);let w=0;this.yRatio.length>1&&(this.yaxisIndex=u.globals.seriesYAxisReverseMap[v][0],w=v);const I=this.barHelpers.initialPositions(v),{y:P,zeroW:S,x:H,zeroH:D}=I;let R=null!=(s=I.barWidth)?s:0,k=null!=(a=I.barHeight)?a:0;const X=null!=(i=I.yDivision)?i:0,A=null!=(r=I.xDivision)?r:0;y=P,f=H;const W=g.group({class:"apexcharts-datalabels","data:realIndex":v}),F=g.group({class:"apexcharts-rangebar-goals-markers"});for(let e=0;e<u.globals.dataPoints;e++){const s=this.barHelpers.getStrokeWidth(x,e,v),a=this.seriesRangeStart[x][e],i=this.seriesRangeEnd[x][e];let r=null,b=null,g=null;const p={x:f,y:y,strokeWidth:s,elSeries:C};let P=this.seriesLen;if(u.config.plotOptions.bar.rangeBarGroupRows&&(P=1),void 0===(null==(o=u.config.series[x].data)?void 0:o[e]))break;if(this.isHorizontal){g=y+k*this.visibleI;const t=(X-k*P)/2;if(null==(h=null==(l=u.config.series[x].data)?void 0:l[e])?void 0:h.x){const s=this.detectOverlappingBars({i:x,j:e,barYPosition:g,srty:t,barHeight:k,yDivision:X,initPositions:I});k=s.barHeight,g=s.barYPosition}r=this.drawRangeBarPaths(n({indexes:{i:x,j:e,realIndex:v},barHeight:k,barYPosition:g,zeroW:S,yDivision:X,y1:a,y2:i},p)),R=r.barWidth}else{u.axisFlags.isXNumeric&&(f=(u.seriesData.seriesX[x][e]-u.globals.minX)/this.xRatio-R/2),b=f+R*this.visibleI;const t=(A-R*P)/2;if(null==(c=null==(d=u.config.series[x].data)?void 0:d[e])?void 0:c.x){const s=this.detectOverlappingBars({i:x,j:e,barXPosition:b,srtx:t,barWidth:R,xDivision:A,initPositions:I});R=s.barWidth,b=s.barXPosition}r=this.drawRangeColumnPaths(n({indexes:{i:x,j:e,realIndex:v,translationsIndex:w},barWidth:R,barXPosition:b,zeroH:D,xDivision:A},p)),k=r.barHeight}const H=this.barHelpers.drawGoalLine({barXPosition:r.barXPosition,barYPosition:g,goalX:r.goalX,goalY:r.goalY,barHeight:k,barWidth:R});H&&F.add(H),y=r.y,f=r.x;const L=this.barHelpers.getPathFillColor(t,x,e,v);this.renderSeries({realIndex:v,pathFill:L.color,lineFill:L.useRangeColor?L.color:u.globals.stroke.colors[v],j:e,i:x,x:f,y:y,y1:a,y2:i,pathFrom:r.pathFrom,pathTo:r.pathTo,strokeWidth:s,elSeries:C,series:t,barHeight:k,barWidth:R,barXPosition:b,barYPosition:g,columnGroupIndex:m,elDataLabelsWrap:W,elGoalsMarkers:F,visibleSeries:this.visibleI,type:"rangebar"})}p.add(C)}return p}detectOverlappingBars({i:t,j:e,barYPosition:s,barXPosition:a,srty:i,srtx:r,barHeight:o,barWidth:n,yDivision:l,xDivision:h,initPositions:d}){var b,c,u,g;const p=this.w;let x=[];const f=null==(c=null==(b=p.globals.seriesRangeName)?void 0:b[t])?void 0:c[e],y=null==(g=null==(u=p.config.series[t].data)?void 0:u[e])?void 0:g.x,v=Array.isArray(y)?y.join(" "):y,m=p.labelData.labels.map(t=>Array.isArray(t)?t.join(" "):t).indexOf(v),C=p.rangeData.seriesRange[t].findIndex(t=>{var e;return t.x===v&&(null==(e=t.overlaps)?void 0:e.size)>0});return this.isHorizontal?(s=p.config.plotOptions.bar.rangeBarGroupRows?i+l*m:i+o*this.visibleI+l*m,C>-1&&!p.config.plotOptions.bar.rangeBarOverlap&&(x=Array.from(p.rangeData.seriesRange[t][C].overlaps),x.indexOf(f)>-1&&(s=(o=d.barHeight/x.length)*this.visibleI+l*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+x.indexOf(f))+l*m))):(m>-1&&!p.labelData.timescaleLabels.length&&(a=p.config.plotOptions.bar.rangeBarGroupRows?r+h*m:r+n*this.visibleI+h*m),C>-1&&!p.config.plotOptions.bar.rangeBarOverlap&&(x=Array.from(p.rangeData.seriesRange[t][C].overlaps),x.indexOf(f)>-1&&(a=(n=d.barWidth/x.length)*this.visibleI+h*(100-parseInt(this.barOptions.barWidth,10))/100/2+n*(this.visibleI+x.indexOf(f))+h*m))),{barYPosition:s,barXPosition:a,barHeight:o,barWidth:n}}drawRangeColumnPaths({indexes:t,x:e,xDivision:s,barWidth:a,barXPosition:i,zeroH:r}){var o,n;const l=this.w,{i:h,j:d,realIndex:b,translationsIndex:c}=t,u=this.yRatio[c],g=this.getRangeValue(b,d);let p=Math.min(g.start,g.end),x=Math.max(g.start,g.end);const f=!(void 0===(null==(o=this.series[h])?void 0:o[d])||null===(null==(n=this.series[h])?void 0:n[d]));f?(p=r-p/u,x=r-x/u):p=r;const y=Math.abs(x-p),v=this.barHelpers.getColumnPaths({barXPosition:i,barWidth:a,y1:p,y2:x,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:b,i:b,j:d,w:l});if(f){const t=v.drawnBox,e=g.end>=g.start;this.recordColumnGeometry(b,d,{slotStart:t.x1,slotEnd:t.x2,levelStart:e?t.y1:t.y2,levelEnd:e?t.y2:t.y1,horizontal:!1})}if(l.axisFlags.isXNumeric){const t=this.getBarXForNumericXAxis({x:e,j:d,realIndex:b,barWidth:a});e=t.x,i=t.barXPosition}else e+=s;return{pathTo:v.pathTo,pathFrom:v.pathFrom,barHeight:y,x:e,y:g.start<0&&g.end<0?p:x,goalY:this.barHelpers.getGoalValues("y",null,r,b,d,c),barXPosition:i}}preventBarOverflow(t){const e=this.w;return t<0&&(t=0),t>e.layout.gridWidth&&(t=e.layout.gridWidth),t}drawRangeBarPaths({indexes:t,y:e,y1:s,y2:a,yDivision:i,barHeight:r,barYPosition:o,zeroW:n}){const l=this.w,{realIndex:h,j:d}=t,b=this.preventBarOverflow(n+s/this.invertedYRatio),c=this.preventBarOverflow(n+a/this.invertedYRatio),u=this.getRangeValue(h,d),g=Math.abs(c-b),p=this.barHelpers.getBarpaths({barYPosition:o,barHeight:r,x1:b,x2:c,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:h,realIndex:h,j:d,w:l});if(null!=u.start&&null!=u.end){const t=p.drawnBox;this.recordColumnGeometry(h,d,{slotStart:t.y1,slotEnd:t.y2,levelStart:t.x1,levelEnd:t.x2,horizontal:!0})}return l.axisFlags.isXNumeric||(e+=i),{pathTo:p.pathTo,pathFrom:p.pathFrom,barWidth:g,x:u.start<0&&u.end<0?b:c,goalX:this.barHelpers.getGoalValues("x",n,null,h,d,0),y:e}}recordColumnGeometry(t,e,s){const a=this.w.waterfallData&&this.w.waterfallData.geometry;a&&isFinite(s.slotStart)&&isFinite(s.levelEnd)&&(a[t]||(a[t]=[]),a[t][e]=s)}getRangeValue(t,e){const s=this.w;return{start:s.rangeData.seriesRangeStart[t][e],end:s.rangeData.seriesRangeEnd[t][e]}}}}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>d.default});
|
|
5
|
+
"use strict";var t=Object.defineProperty,e=Object.defineProperties,s=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,o=(e,s,a)=>s in e?t(e,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[s]=a,n=(t,e)=>{for(var s in e||(e={}))i.call(e,s)&&o(t,s,e[s]);if(a)for(var s of a(e))r.call(e,s)&&o(t,s,e[s]);return t},l=(t,a)=>e(t,s(a));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});function h(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t)for(const s in t)if("default"!==s){const a=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(e,s,a.get?a:{enumerable:!0,get:()=>t[s]})}return e.default=t,Object.freeze(e)}const d=h(require("apexcharts/core")),b=d.__apex_Utils;function c(t,e,s){const a=s&&void 0!==s[e]?s[e]:e+1;return null==t?{x:a,y:null,rest:{}}:Array.isArray(t)?{x:void 0!==t[0]?t[0]:a,y:t[1],rest:{}}:"object"==typeof t?{x:void 0!==t.x?t.x:a,y:t.y,rest:t}:{x:a,y:t,rest:{}}}const u="__apexcharts_series_transforms__";var g,p;globalThis[u]||(globalThis[u]={}),g="dumbbell","function"==typeof(p=function(t,e){var s;const a=e.config,i=e.globals;if(!Array.isArray(t))return t;i.dumbbellRawSeries||(i.dumbbellRawSeries=t.map(t=>l(n({},t),{data:Array.isArray(null==t?void 0:t.data)?t.data.slice():null==t?void 0:t.data})));const r=i.dumbbellRawSeries;if(r.some(t=>function(t){for(let e=0;e<t.length;e++){const s=t[e],a=Array.isArray(s)?s[1]:s&&"object"==typeof s?s.y:s;if(Array.isArray(a)&&2===a.length)return!0}return!1}(Array.isArray(null==t?void 0:t.data)?t.data:[])))return e.dumbbellData={form:"pairs",names:[],values:[],order:[],carrier:0,hidden:[]},t;const o=null==(s=a.xaxis)?void 0:s.categories,h=i.collapsedSeriesIndices||[],{xs:d,rows:u,byX:g}=function(t,e){var s;const a=[],i=[],r=new Map,o=[];for(let l=0;l<t.length;l++){const h=Array.isArray(null==(s=t[l])?void 0:s.data)?t[l].data:[],d=new Map;for(let t=0;t<h.length;t++){const{x:s,y:o,rest:l}=c(h[t],t,e),u=s instanceof Date?s.getTime():s;r.has(u)||(r.set(u,a.length),a.push(s),i.push(n({},l)));const g=r.get(u);d.set(g,b.parseNumber(o))}o.push(d)}return{xs:a,rows:i,byX:o}}(r,o),p=[],x=[],f=[];for(let t=0;t<r.length;t++)-1===h.indexOf(t)&&f.push(t);const y=[];for(let t=0;t<d.length;t++){const e=[];for(let s=0;s<r.length;s++){const a=g[s].has(t)?g[s].get(t):null;e.push(null!=a&&isFinite(a)?a:null)}p.push(e);let s=null,a=null,i=-1,o=-1;for(let t=0;t<f.length;t++){const r=f[t],n=e[r];null!==n&&((null===s||n<s)&&(s=n,i=r),(null===a||n>a)&&(a=n,o=r))}null!==s&&null!==a?(x.push([i,o]),y.push(l(n({},u[t]),{x:d[t],y:[s,a]}))):(x.push(null),y.push(l(n({},u[t]),{x:d[t],y:null})))}e.dumbbellData={form:"series",names:r.map((t,e)=>{var s;return null!=(s=null==t?void 0:t.name)?s:`Series ${e+1}`}),values:p,order:x,carrier:f.length?f[0]:0,hidden:r.map((t,e)=>e).filter(t=>-1!==h.indexOf(t))};const v=e.dumbbellData.carrier;return r.map((t,e)=>l(n({},t),{data:e===v&&f.length?y:[]}))})&&(globalThis[u][g]=p);const x=d.__apex_Graphics,f=d.__apex_DataLabels,y=(t,e,s,a)=>{if("function"!=typeof t)return t;const i=t({series:e.seriesData.series,seriesIndex:s,dataPointIndex:a,w:e});return Number.isFinite(i)?i:0},v=d.__apex_BrowserAPIs_BrowserAPIs,m=d.__apex_Environment_Environment;function C(t){var e;const s=t.config.chart.animations;if(!s||!1===s.enabled)return!1;if(!s.dynamicAnimation||!1===s.dynamicAnimation.enabled)return!1;const a=null!=(e=s.largeDatasetThreshold)?e:0;return!(a>0&&t.globals.dataPoints>a)&&!!(m.isBrowser()&&t.globals.dataChanged&&t.globals.shouldAnimate)}function w(t,e,s){var a,i,r,o;if(null==(a=t.axisFlags)?void 0:a.isXNumeric){const a=null==(r=null==(i=t.seriesData)?void 0:i.seriesX)?void 0:r[e];if(a&&a.length&&null!=a[s])return"x:"+a[s]}const n=null==(o=t.globals.labels)?void 0:o[s];return null!=n&&""!==String(n)?"c:"+(Array.isArray(n)?n.join(" "):String(n)):"j:"+s}function I(t){const e=new Map;return t.map(t=>{const s=e.get(t)||0;return e.set(t,s+1),0===s?t:`${t}#${s}`})}function P(t,e,s=!1,a=!1){var i,r;if(!C(t))return null;const o=t.globals.prevStreamFrame;if(!o)return null;const n=null==(i=o.seriesY)?void 0:i[e],l=null==(r=t.seriesData.series)?void 0:r[e];if(!Array.isArray(n)||!Array.isArray(l))return null;if(!n.length||!l.length)return null;const h=I(n.map((t,s)=>function(t,e,s){var a,i;if(t.isXNumeric){const i=null==(a=t.seriesX)?void 0:a[e];if(i&&i.length&&null!=i[s])return"x:"+i[s]}const r=null==(i=t.labels)?void 0:i[s];return null!=r&&""!==String(r)?"c:"+(Array.isArray(r)?r.join(" "):String(r)):"j:"+s}(o,e,s))),d=I(l.map((s,a)=>w(t,e,a))),b=function(t,e){const s=new Map;t.forEach((t,e)=>{s.has(t)||s.set(t,e)});const a=new Array(e.length),i=new Set;let r=-1,o=!0,n=t.length===e.length;e.forEach((t,e)=>{const l=s.has(t)&&!i.has(s.get(t))?s.get(t):-1;a[e]=l,-1!==l&&(i.add(l),l<r&&(o=!1),r=l),l!==e&&(n=!1)});const l=[];for(let e=0;e<t.length;e++)i.has(e)||l.push(e);return{toOld:a,exits:l,ordered:o,changed:!n}}(h,d);return(b.ordered||a)&&(b.changed||s)?{join:b,oldKeys:h,newKeys:d}:null}function S({w:t,elSeries:e,record:s,newKeys:a,isHorizontal:i,speed:r}){var o;if(!C(t))return;if(!s||!Array.isArray(s.paths)||!(null==e?void 0:e.node))return;const n=new Set(a),l=s.paths.filter(t=>t&&t.d&&null!=t.key&&!n.has(t.key));if(!l.length)return;const h=new x(t),d=null==(o=t.globals.colors)?void 0:o[parseInt(String(s.realIndex),10)];l.forEach(s=>{let a=s.fill||d||"#c8c8c8";0===String(a).indexOf("url(")&&(a=d||"#c8c8c8");const o=h.drawPath({d:s.d,stroke:"none",strokeWidth:0,fill:a,fillOpacity:1,classes:"apexcharts-bar-ghost"}),n=o.node;n.setAttribute("pointer-events","none"),o.attr("clip-path",`url(#gridRectBarMask${t.globals.cuid})`),e.node.insertBefore(n,e.node.firstChild);const l=function(t){const e=/^M\s*([+-]?[\d.eE]+)[\s,]+([+-]?[\d.eE]+)/.exec(t||"");if(!e)return null;const s=parseFloat(e[1]),a=parseFloat(e[2]);return isFinite(s)&&isFinite(a)?{x:s,y:a}:null}(s.d);let b=i?"left center":"center bottom";try{const t=n.getBBox();l&&t&&(b=i?Math.abs(l.x-t.x)<=Math.abs(l.x-(t.x+t.width))?"left center":"right center":Math.abs(l.y-(t.y+t.height))<=Math.abs(l.y-t.y)?"center bottom":"center top")}catch(t){}const c=n.style;c.transformBox="fill-box",c.transformOrigin=b;const u=Math.max(1,r||1),g=performance.now(),p=e=>{if(t.globals.isDestroyed||!n.parentNode)return;const s=Math.max(0,Math.min(1,(e-g)/u)),a=1-Math.pow(1-s,3),r=1-a;c.transform=i?`scaleX(${r})`:`scaleY(${r})`,c.opacity=String(1-a),s<1?v.requestAnimationFrame(p):n.parentNode.removeChild(n)};v.requestAnimationFrame(p)})}class H{constructor(t){this.w=t.w,this.barCtx=t,this.totalFormatter=this.w.config.plotOptions.bar.dataLabels.total.formatter,this.totalFormatter||(this.totalFormatter=this.w.config.dataLabels.formatter)}handleBarDataLabels(t){var e,s;const{x:a,y:i,y1:r,y2:o,i:h,j:d,realIndex:b,columnGroupIndex:c,barHeight:u,barWidth:g,barXPosition:p,barYPosition:f,visibleSeries:v}=t,m=this.w,C=new x(this.barCtx.w),w=m.waterfallData&&m.waterfallData.values,I=w&&w[b]&&null!=w[b][d]?w[b][d]:null,P=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[b]:this.barCtx.strokeWidth;let S,H;m.axisFlags.isXNumeric&&!m.globals.isBarHorizontal?(S=a+g*(v+1),H=i+u*(v+1)-P):(S=a+g*v,H=i+u*v);let L=null,D=null,R=a,k=i,X={};const A=m.config.dataLabels,W=this.barCtx.barOptions.dataLabels,F=this.barCtx.barOptions.dataLabels.total;void 0!==f&&(this.barCtx.isRangeBar||this.barCtx.isPyramid)&&(H=f,k=f),void 0!==p&&this.barCtx.isVerticalGroupedRangeBar&&(S=p,R=p);const O=y(A.offsetX,m,b,d),Y=y(A.offsetY,m,b,d);let B={width:0,height:0};if(m.config.dataLabels.enabled){const t=null!==I?I:m.seriesData.series[b][d];B=C.getTextRects(m.config.dataLabels.formatter?m.config.dataLabels.formatter(t,l(n({},m),{seriesIndex:b,dataPointIndex:d,w:m})):m.formatters.yLabelFormatters[0](t),parseFloat(A.style.fontSize).toString(),A.style.fontFamily,void 0,!0,A.style.fontWeight)}const T={x:a,y:i,i:h,j:d,realIndex:b,columnGroupIndex:c,bcx:S,bcy:H,barHeight:u,barWidth:g,textRects:B,strokeWidth:P,dataLabelsX:R,dataLabelsY:k,dataLabelsConfig:A,barDataLabelsConfig:W,barTotalDataLabelsConfig:F,offX:O,offY:Y};if(X=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(T):this.calculateColumnsDataLabelsPosition(T),null!==I&&this.barCtx.isHorizontal&&"center"===W.position){const t=null==(s=null==(e=m.waterfallData.geometry)?void 0:e[b])?void 0:s[d];t&&t.horizontal&&(X.dataLabelsX=(t.levelStart+t.levelEnd)/2+O)}return L=this.drawCalculatedDataLabels({x:X.dataLabelsX,y:X.dataLabelsY,val:null!==I?I:this.barCtx.isRangeBar?[r,o]:"100%"===m.config.chart.stackType?m.globals.seriesPercent[b][d]:m.seriesData.series[b][d],i:b,j:d,barWidth:g,barHeight:u,textRects:B,dataLabelsConfig:A}),m.config.chart.stacked&&F.enabled&&(D=this.drawTotalDataLabels({x:X.totalDataLabelsX,y:X.totalDataLabelsY,barWidth:g,barHeight:u,realIndex:b,j:d,textAnchor:X.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:b,j:d}),rawVal:this.getStackedTotalValue({realIndex:b,j:d}),dataLabelsConfig:A,barTotalDataLabelsConfig:F})),{dataLabelsPos:X,dataLabels:L,totalDataLabels:D}}hasMultipleSeriesGroups(){return this.w.labelData.seriesGroups.length>1}getTotalGroupContext(t){if(!this.hasMultipleSeriesGroups())return null;const e=this.barCtx.barHelpers.getSeriesGroupIndex(t);return e<0?null:{groupIndex:e,group:this.w.labelData.seriesGroups[e]}}drawsStackedTotal(t){const e=this.barCtx.lastActiveBarSerieIndexByGroup,s=this.getTotalGroupContext(t);return s&&e&&e.length>s.groupIndex?e[s.groupIndex]===t:this.barCtx.lastActiveBarSerieIndex===t}getStackedTotalValue({realIndex:t,j:e}){const s=this.w,a=this.getTotalGroupContext(t),i=s.seriesData.stackedSeriesTotalsByGroups;return a&&i&&i[a.groupIndex]?i[a.groupIndex][e]:this.barCtx.stackedSeriesTotals[e]}getStackedTotalDataLabel({realIndex:t,j:e}){const s=this.w;let a=this.getStackedTotalValue({realIndex:t,j:e});return this.totalFormatter&&(a=this.totalFormatter(a,l(n({},s),{seriesIndex:t,dataPointIndex:e,w:s}))),a}calculateColumnsDataLabelsPosition(t){const e=this.w;let s,a,{i:i,j:r,realIndex:o,y:n,bcx:l,barWidth:h,barHeight:d,textRects:b,dataLabelsX:c,dataLabelsY:u,dataLabelsConfig:g,barDataLabelsConfig:p,barTotalDataLabelsConfig:f,strokeWidth:y,offX:v,offY:m}=t;const C=l;d=Math.abs(d);const w="vertical"===e.config.plotOptions.bar.dataLabels.orientation,{zeroEncounters:I}=this.barCtx.barHelpers.getZeroValueEncounters({i:i,j:r});l-=y/2;const P=e.layout.gridWidth/e.globals.dataPoints;if(this.barCtx.isVerticalGroupedRangeBar?c+=h/2:(c=e.axisFlags.isXNumeric?l-h/2+v:l-P+h/2+v,!e.config.chart.stacked&&I>0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(c-=h*I)),w){const t=2;c=c+b.height/2-y/2-t}const S=e.seriesData.series[i][r]<0;let H=n;switch(this.barCtx.isReversed&&(H=n+(S?d:-d)),p.position){case"center":u=w?S?H-d/2+m:H+d/2-m:S?H-d/2+b.height/2+m:H+d/2+b.height/2-m;break;case"bottom":u=w?S?H-d+m:H+d-m:S?H-d+b.height+y+m:H+d-b.height/2+y-m;break;case"top":u=w?S?H+m:H-m:S?H-b.height/2-m:H+b.height+m}let L=H;const D=this.getTotalGroupContext(o);if((D?[D.group]:e.labelData.seriesGroups).forEach(t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevY.forEach(t=>{L=S?Math.max(t[r],L):Math.min(t[r],L)})}),this.drawsStackedTotal(o)&&f.enabled){const t=18,i=new x(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:r}),g.fontSize);s=S?L-i.height/2-m-f.offsetY+t:L+i.height+m+f.offsetY-t;const n=P;a=C+(e.axisFlags.isXNumeric?-h/2:h/2-n)+f.offsetX}return e.config.chart.stacked||(u<0?u=0+y:u+b.height/3>e.layout.gridHeight&&(u=e.layout.gridHeight-y)),{bcx:l,bcy:n,dataLabelsX:c,dataLabelsY:u,totalDataLabelsX:a,totalDataLabelsY:s,totalDataLabelsAnchor:"middle"}}calculateBarsDataLabelsPosition(t){var e;const s=this.w;let{x:a,i:i,j:r,realIndex:o,bcy:n,barHeight:l,barWidth:h,textRects:d,dataLabelsX:b,strokeWidth:c,dataLabelsConfig:u,barDataLabelsConfig:g,barTotalDataLabelsConfig:p,offX:f,offY:y}=t;const v=s.layout.gridHeight/s.globals.dataPoints,{zeroEncounters:m}=this.barCtx.barHelpers.getZeroValueEncounters({i:i,j:r});let C,w,I;if(h=Math.abs(h),this.barCtx.isPyramid){C=n+l/2+y-(null!=(e=d.centerOffset)?e:0)}else C=n-(this.barCtx.isRangeBar?0:v)+l/2+d.height/2+y-3;!s.config.chart.stacked&&m>0&&s.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(C-=l*m);let P="start";const S=s.seriesData.series[i][r]<0;let H=a;if(this.barCtx.isReversed&&(H=a+(S?-h:h),P=S?"start":"end"),this.barCtx.isPyramid)b=s.layout.gridWidth/2+f;else switch(g.position){case"center":b=S?H+h/2-f:Math.max(d.width/2,H-h/2)+f;break;case"bottom":b=S?H+h-c-f:H-h+c+f;break;case"top":b=S?H-c-f:H-c+f}let L=H;const D=this.getTotalGroupContext(o);if((D?[D.group]:s.labelData.seriesGroups).forEach(t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevX.forEach(t=>{L=S?Math.min(t[r],L):Math.max(t[r],L)})}),this.drawsStackedTotal(o)&&p.enabled){const t=new x(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:r}),u.fontSize);S?(w=L-c-f-p.offsetX,P="end"):w=L+f+p.offsetX+(this.barCtx.isReversed?-(h+c):c),I=C-d.height/2+t.height/2+p.offsetY+c,s.globals.barGroups.length>1&&!D&&(I-=s.globals.barGroups.length/2*(l/2))}if(!s.config.chart.stacked){const t=S&&"middle"!==u.textAnchor?"start"===u.textAnchor?"end":"start":u.textAnchor;let e;e="vertical"===g.orientation?d.height/2:"end"===t?d.width:"middle"===t?d.width/2:0;const a=("vertical"===g.orientation?d.height:d.width)-e;b+a>s.layout.gridWidth-c&&(b=s.layout.gridWidth-a-c),b-e<c&&(b=e+c)}return{bcx:a,bcy:n,dataLabelsX:b,dataLabelsY:C,totalDataLabelsX:w,totalDataLabelsY:I,totalDataLabelsAnchor:P}}drawCalculatedDataLabels({x:t,y:e,val:s,i:a,j:i,textRects:r,barHeight:o,barWidth:h,dataLabelsConfig:d}){var b,c,u;const g=this.w;let p="rotate(0)";"vertical"===g.config.plotOptions.bar.dataLabels.orientation&&(p=`rotate(-90, ${t}, ${e})`);const y=new f(this.barCtx.w,this.barCtx.ctx),v=new x(this.barCtx.w),m=d.formatter;let C=null;const I=g.globals.collapsedSeriesIndices.indexOf(a)>-1,P=(g.globals.collapsingSeriesIndices||[]).indexOf(a)>-1;if(P){const t=null==(b=g.globals.prevDataLabels)?void 0:b.get(`${a}::${w(g,a,i)}`);t&&isFinite(t.val)&&(s=t.val)}if(d.enabled&&(!I||P)){C=v.group({class:"apexcharts-data-labels",transform:p});const b=g.config.dataLabels;((null==(c=b.animate)?void 0:c.enabled)||(null==(u=b.countUp)?void 0:u.enabled))&&(C.node.setAttribute("data:dlKey",`${a}::${w(g,a,i)}`),C.node.setAttribute("data:dlJ",String(i)),"number"==typeof s&&isFinite(s)&&C.node.setAttribute("data:dlVal",String(s)));let x="";void 0!==s&&(x=m(s,l(n({},g),{seriesIndex:a,dataPointIndex:i,w:g}))),!s&&g.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(x="");const f=g.seriesData.series[a][i]<0,I=g.config.plotOptions.bar.dataLabels.position;if("vertical"===g.config.plotOptions.bar.dataLabels.orientation&&("top"===I&&(d.textAnchor=f?"end":"start"),"center"===I&&(d.textAnchor="middle"),"bottom"===I&&(d.textAnchor=f?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels){h<v.getTextRects(x,parseFloat(d.style.fontSize).toString()).width&&(x="")}g.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&!P&&(this.barCtx.isHorizontal?r.width/1.6>Math.abs(h)&&(x=""):r.height/1.6>Math.abs(o)&&(x=""));const S=n({},d);this.barCtx.isHorizontal&&s<0&&("start"===d.textAnchor?S.textAnchor="end":"end"===d.textAnchor&&(S.textAnchor="start")),y.plotDataLabelsText({x:t,y:e,text:x,i:a,j:i,parent:C,dataLabelsConfig:S,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return C}drawTotalDataLabels({x:t,y:e,val:s,rawVal:a,realIndex:i,j:r,textAnchor:o,barTotalDataLabelsConfig:n}){var l,h;const d=new x(this.barCtx.w);let b;if(n.enabled&&void 0!==t&&void 0!==e&&this.drawsStackedTotal(i)){b=d.drawText({x:t,y:e,foreColor:n.style.color,text:s,textAnchor:o,fontFamily:n.style.fontFamily,fontSize:n.style.fontSize,fontWeight:n.style.fontWeight}),b.attr({class:"apexcharts-datalabel-total",cx:t,cy:e});const c=this.w.config.dataLabels;if((null==(l=c.animate)?void 0:l.enabled)||(null==(h=c.countUp)?void 0:h.enabled)){const{groupIndex:t}=this.barCtx.barHelpers.getGroupIndex(i);b.node.setAttribute("data:dlTotalKey",`${t}::${w(this.w,i,r)}`),b.node.setAttribute("data:dlTotalSeries",String(i)),"number"==typeof a&&isFinite(a)&&b.node.setAttribute("data:dlTotalVal",String(a))}}return b}}const L=d.__apex_Series,D=d.__apex_Fill;function R(t){var e,s,a,i,r,o,n;return"histogram"===(null==(s=null==(e=null==t?void 0:t.config)?void 0:e.chart)?void 0:s.requestedType)&&(!1!==(null==(i=null==(a=t.config.plotOptions)?void 0:a.histogram)?void 0:i.overlap)&&(null!=(n=null==(o=null==(r=t.seriesData)?void 0:r.series)?void 0:o.length)?n:0)>1)}class k{constructor(t){this.w=t.w,this.barCtx=t}initVariables(t){const e=this.w;this.barCtx.series=t,this.barCtx.totalItems=0,this.barCtx.seriesLen=0,this.barCtx.visibleI=-1,this.barCtx.visibleItems=1;for(let s=0;s<t.length;s++)if(t[s].length>0&&(this.barCtx.seriesLen=this.barCtx.seriesLen+1,this.barCtx.totalItems+=t[s].length),e.axisFlags.isXNumeric)for(let a=0;a<t[s].length;a++)e.seriesData.seriesX[s][a]>e.globals.minX&&e.seriesData.seriesX[s][a]<e.globals.maxX&&this.barCtx.visibleItems++;else this.barCtx.visibleItems=e.globals.dataPoints;this.arrBorderRadius=this.createBorderRadiusArr(e.seriesData.series),b.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map(t=>t.map(t=>"none"))),0===this.barCtx.seriesLen&&(this.barCtx.seriesLen=1)}barSlotXSpan(){const t=this.w;if(void 0!==this._slotXSpan)return this._slotXSpan;let e=0;if(t.globals.dataPoints<=1){const s=t.globals.maxX-t.globals.minX;e=s>0?s/4:0}else if(e=this._unionMinXGap(),!(e>0&&isFinite(e))){const s=t.globals.minXDiff;e=s>0&&isFinite(s)&&.5!==s?s:0}return this._slotXSpan=e,e}_unionMinXGap(){const t=this.w.seriesData.seriesX||[],e=[];for(let s=0;s<t.length;s++){const a=t[s];Array.isArray(a)&&a.length>0&&e.push(a)}if(!e.length)return 0;const s=new Array(e.length).fill(0);let a=NaN,i=1/0;for(;;){let t=1/0,r=-1;for(let a=0;a<e.length;a++){const i=e[a];for(;s[a]<i.length&&"number"!=typeof i[s[a]];)s[a]++;if(s[a]>=i.length)continue;const o=i[s[a]];o==o?o<t&&(t=o,r=a):(s[a]++,a--)}if(-1===r)break;if(s[r]++,a==a){const e=t-a;e>0&&e<i&&(i=e)}a=t}return isFinite(i)?i:0}initialPositions(t){const e=this.w;let s,a,i,r,o,n,l,h,d=e.globals.dataPoints;this.barCtx.isRangeBar&&(d=e.labelData.labels.length);let c=this.barCtx.seriesLen;if((e.config.plotOptions.bar.rangeBarGroupRows||R(e))&&(c=1),this.barCtx.isHorizontal)i=e.layout.gridHeight/d,o=i/c,e.axisFlags.isXNumeric&&(i=e.layout.gridHeight/this.barCtx.totalItems,o=i/this.barCtx.seriesLen),o=o*parseInt(this.barCtx.barOptions.barHeight,10)/100,-1===String(this.barCtx.barOptions.barHeight).indexOf("%")&&(o=parseInt(this.barCtx.barOptions.barHeight,10)),h=this.barCtx.baseLineInvertedY+e.globals.padHorizontal+(this.barCtx.isReversed?e.layout.gridWidth:0)-(this.barCtx.isReversed?2*this.barCtx.baseLineInvertedY:0),this.barCtx.isFunnel&&(h=e.layout.gridWidth/2),a=(i-o*this.barCtx.seriesLen)/2;else{if(r=e.layout.gridWidth/this.barCtx.visibleItems,e.config.xaxis.convertedCatToNumeric&&(r=e.layout.gridWidth/e.globals.dataPoints),n=r/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100,e.axisFlags.isXNumeric){const t=this.barCtx.xRatio,e=this.barSlotXSpan();e>0&&e/t>0&&(r=e/t),n=r/c*parseInt(this.barCtx.barOptions.columnWidth,10)/100,n<1&&(n=1)}if(-1===String(this.barCtx.barOptions.columnWidth).indexOf("%")&&(n=parseInt(this.barCtx.barOptions.columnWidth,10)),l=e.layout.gridHeight-this.barCtx.baseLineY[this.barCtx.translationsIndex]-(this.barCtx.isReversed?e.layout.gridHeight:0)+(this.barCtx.isReversed?2*this.barCtx.baseLineY[this.barCtx.translationsIndex]:0),e.axisFlags.isXNumeric){s=this.barCtx.getBarXForNumericXAxis({x:s,j:0,realIndex:t,barWidth:n}).x}else s=e.globals.padHorizontal+b.noExponents(r-n*this.barCtx.seriesLen)/2}return e.globals.barHeight=o,e.globals.barWidth=n,{x:s,y:a,yDivision:i,xDivision:r,barHeight:o,barWidth:n,zeroH:l,zeroW:h}}initializeStackedPrevVars(t){t.w.labelData.seriesGroups.forEach(e=>{t[e]||(t[e]={}),t[e].prevY=[],t[e].prevX=[],t[e].prevYF=[],t[e].prevXF=[],t[e].prevYVal=[],t[e].prevXVal=[]})}initializeStackedXYVars(t){t.w.labelData.seriesGroups.forEach(e=>{t[e]||(t[e]={}),t[e].xArrj=[],t[e].xArrjF=[],t[e].xArrjVal=[],t[e].yArrj=[],t[e].yArrjF=[],t[e].yArrjVal=[]})}getPathFillColor(t,e,s,a){var i;const r=this.w,o=new D(this.barCtx.w);let n=null;const l=this.barCtx.barOptions.distributed?s:e;let h=!1;if(this.barCtx.barOptions.colors.ranges.length>0){this.barCtx.barOptions.colors.ranges.map(a=>{t[e][s]>=a.from&&t[e][s]<=a.to&&(n=a.color,h=!0)})}const d=this.getDumbbellConnectorFill(e,s)||(null==(i=r.config.series[e].data[s])?void 0:i.fill),b=this.barCtx.barOptions.isDumbbell?r.config.plotOptions.bar.dumbbell.connector:null;let c;b&&b.color&&(n=b.color,c=b.opacity);return{color:o.fillPath({seriesNumber:this.barCtx.barOptions.distributed?l:a,dataPointIndex:s,color:n,opacity:c,value:t[e][s],fillConfig:d,fillType:(null==d?void 0:d.type)?d.type:Array.isArray(r.config.fill.type)?r.config.fill.type[a]:r.config.fill.type}),useRangeColor:h}}getDumbbellConnectorFill(t,e){const s=this.w;if(!this.barCtx.barOptions.isDumbbell)return null;const a=s.dumbbellData;if(!a||"series"!==a.form)return null;const i=s.config.plotOptions.bar.dumbbell.connector;if(i.color)return null;const r=a.order[e];if(!r)return null;const o=s.globals.colors[r[0]],n=s.globals.colors[r[1]];return o&&n?{type:"gradient",gradient:{type:this.barCtx.isHorizontal?"horizontal":"vertical",gradientFrom:o,gradientTo:n,opacityFrom:i.opacity,opacityTo:i.opacity,stops:[0,100],inverseColors:!this.barCtx.isHorizontal}}:null}getStrokeWidth(t,e,s){let a=0;const i=this.w;return void 0===this.barCtx.series[t][e]||null===this.barCtx.series[t][e]||"bar"===i.config.chart.type&&!this.barCtx.series[t][e]?this.barCtx.isNullValue=!0:this.barCtx.isNullValue=!1,i.config.stroke.show&&(this.barCtx.isNullValue||(a=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[s]:this.barCtx.strokeWidth)),a}getStackedSeriesIndices(t){const e=this.w,s=e.labelData.seriesGroups,a=e.globals.columnSeries?new Set(e.globals.columnSeries.i):null,i=t=>!a||a.has(t);if(!s||s.length<2){const e=Array.from({length:t},(t,e)=>e).filter(i);return e.length?[e]:[]}const r=Array.from({length:s.length},()=>[]),o=[];for(let e=0;e<t;e++){if(!i(e))continue;const t=this.getSeriesGroupIndex(e);t>-1?r[t].push(e):o.push(e)}return o.length&&r.push(o),r.filter(t=>t.length>0)}createBorderRadiusArr(t){var e;const s=this.w,a=!this.w.config.chart.stacked||s.config.plotOptions.bar.borderRadius<=0,i=t.length,r=0|(null==(e=t[0])?void 0:e.length),o=Array.from({length:i},()=>Array(r).fill(a?"top":"none"));if(a)return o;const n="last"===s.config.plotOptions.bar.borderRadiusWhenStacked,l=n?"top":"both",h=n?"bottom":"both",d=n?"none":"bottom",b=n?"none":"top";for(const e of this.getStackedSeriesIndices(i))for(let s=0;s<r;s++){const a=[],i=[];for(const r of e){const e=t[r][s];e>0?a.push(r):e<0&&i.push(r)}if(a.length>0&&0===i.length)if(1===a.length)o[a[0]][s]=l;else{const t=a[0],e=a[a.length-1];for(const i of a)o[i][s]=i===t?d:i===e?"top":"none"}else if(i.length>0&&0===a.length)if(1===i.length)o[i[0]][s]=h;else{const t=Math.min(...i),e=Math.max(...i);for(const a of i)o[a][s]=a===t?b:a===e?"bottom":"none"}else if(a.length>0&&i.length>0){const t=a[a.length-1];for(const e of a)o[e][s]=e===t?"top":"none";const e=Math.max(...i);for(const t of i)o[t][s]=t===e?"bottom":"none"}}return o}barBackground({j:t,i:e,x1:s,x2:a,y1:i,y2:r,elSeries:o}){const n=this.w,l=new x(this.barCtx.w),h=new L(this.barCtx.w).getActiveConfigSeriesIndex();if(this.barCtx.barOptions.colors.backgroundBarColors.length>0&&h===e){t>=this.barCtx.barOptions.colors.backgroundBarColors.length&&(t%=this.barCtx.barOptions.colors.backgroundBarColors.length);const e=this.barCtx.barOptions.colors.backgroundBarColors[t],h=l.drawRect(void 0!==s?s:0,void 0!==i?i:0,void 0!==a?a:n.layout.gridWidth,void 0!==r?r:n.layout.gridHeight,this.barCtx.barOptions.colors.backgroundBarRadius,e,this.barCtx.barOptions.colors.backgroundBarOpacity);o.add(h),h.node.classList.add("apexcharts-backgroundBar")}}getColumnPaths({barWidth:t,barXPosition:e,y1:s,y2:a,strokeWidth:i,isReversed:r,series:o,seriesGroup:n,realIndex:l,i:h,j:d,w:b}){var c,u,g;const p=new x(this.barCtx.w);(i=Array.isArray(i)?i[l]:i)||(i=0);let f=t,y=e;(null==(c=b.config.series[l].data[d])?void 0:c.columnWidthOffset)&&(y=e-b.config.series[l].data[d].columnWidthOffset/2,f=t+b.config.series[l].data[d].columnWidthOffset);const v=i/2,m=y+v,C=y+f-v,w=(o[h][d]>=0?1:-1)*(r?-1:1);s+=.001-v*w,a+=.001+v*w;const I=p.line(C,s),P="around"===b.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][d]?" Z":" z",S=p.move(m,s)+p.line(m,a)+p.line(C,a)+I+P;let H=S;"none"!==this.arrBorderRadius[l][d]&&(H=p.roundPathCorners(H,b.config.plotOptions.bar.borderRadius));let L=null;const D=null==(g=null==(u=this.barCtx.ctx)?void 0:u.morphTypeChange)?void 0:g.getInitialPathFor(l,d);if(D?L=D:b.globals.previousPaths.length>0&&(L=this.barCtx.getPreviousPath(l,d,H,S)),null==L&&(L=p.move(m,s)+p.line(m,s)+I+I+I+I+I+p.line(m,s)+P),b.config.chart.stacked){let t=this.barCtx;t=this.barCtx[n],t.yArrj.push(a-v*w),t.yArrjF.push(Math.abs(s-a+i*w)),t.yArrjVal.push(this.barCtx.series[h][d])}return{pathTo:H,pathFrom:L,drawnBox:{x1:m,x2:C,y1:s,y2:a}}}getFunnelTrapezoidPaths({barYPosition:t,barHeight:e,series:s,i:a,j:i,realIndex:r,strokeWidth:o,w:n}){var l,h;const d=new x(this.barCtx.w),b=n.layout.gridWidth/2,c=t=>Math.abs(t/this.barCtx.invertedYRatio)/2,u=c(s[a][i]),g=i===s[a].length-1,p="taper"===n.config.plotOptions.funnel.lastShape?"taper":"flat";let f;f=g?"taper"===p?0:u:c(s[a][i+1]);const y=o/2,v=t+y,m=t+e-y,C=b-u,w=b+u,I=b-f,P=b+f,S=d.move(C,v)+d.line(w,v)+d.line(P,m)+d.line(I,m)+" Z";let H=null;const L=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(r,i);return L?H=L:n.globals.previousPaths.length>0&&(H=this.barCtx.getPreviousPath(r,i,S)),null==H&&(H=d.move(b,v)+d.line(b,v)+d.line(b,m)+d.line(b,m)+" Z"),{pathTo:S,pathFrom:H,x:w,x1:C,barXPosition:b}}computePyramidLayout(t){const e=this.w,s=e.layout.gridHeight,a=e.layout.gridWidth,i=t.map(t=>Math.abs(Number(t)||0)),r=i.reduce((t,e)=>t+e,0);if(0===r||s<=0)return i.map(()=>({y:0,height:0,topHalf:0,bottomHalf:0}));const o=a/2;let n=0;const l=[];for(let t=0;t<i.length;t++){const e=n/r;n+=i[t];const a=n/r,h=e*s,d=a*s;l.push({y:h,height:d-h,topHalf:e*o,bottomHalf:a*o})}return l}getPyramidPaths({barYPosition:t,barHeight:e,topHalf:s,bottomHalf:a,realIndex:i,j:r,strokeWidth:o,w:n}){var l,h;const d=new x(this.barCtx.w),b=n.layout.gridWidth/2,c=o/2,u=t+c,g=t+e-c,p=b-s,f=b+s,y=b-a,v=b+a,m=d.move(p,u)+d.line(f,u)+d.line(v,g)+d.line(y,g)+" Z";let C=null;const w=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(i,r);return w?C=w:n.globals.previousPaths.length>0&&(C=this.barCtx.getPreviousPath(i,r,m)),null==C&&(C=d.move(b,u)+d.line(b,u)+d.line(b,g)+d.line(b,g)+" Z"),{pathTo:m,pathFrom:C,x:f,x1:p,barXPosition:b}}getBarpaths({barYPosition:t,barHeight:e,x1:s,x2:a,strokeWidth:i,isReversed:r,series:o,seriesGroup:n,realIndex:l,i:h,j:d,w:b}){var c,u,g;const p=new x(this.barCtx.w);(i=Array.isArray(i)?i[l]:i)||(i=0);let f=t,y=e;(null==(c=b.config.series[l].data[d])?void 0:c.barHeightOffset)&&(f=t-b.config.series[l].data[d].barHeightOffset/2,y=e+b.config.series[l].data[d].barHeightOffset);const v=i/2,m=f+v,C=f+y-v,w=(o[h][d]>=0?1:-1)*(r?-1:1);s+=.001+v*w,a+=.001-v*w;const I=this.barCtx.isFunnel,P=I?(s+a)/2:s,S=p.line(s,C),H="around"===b.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][d]?" Z":" z",L=p.move(s,m)+p.line(a,m)+p.line(a,C)+S+H;let D=L;"none"!==this.arrBorderRadius[l][d]&&(D=p.roundPathCorners(D,b.config.plotOptions.bar.borderRadius));let R=null;const k=null==(g=null==(u=this.barCtx.ctx)?void 0:u.morphTypeChange)?void 0:g.getInitialPathFor(l,d);if(k?R=k:b.globals.previousPaths.length>0&&(R=this.barCtx.getPreviousPath(l,d,D,L)),null==R){const t=I?p.line(P,C):S;R=p.move(P,m)+p.line(P,m)+t+t+t+t+t+p.line(P,m)+H}if(b.config.chart.stacked){let t=this.barCtx;t=this.barCtx[n],t.xArrj.push(a+v*w),t.xArrjF.push(Math.abs(s-a-i*w)),t.xArrjVal.push(this.barCtx.series[h][d])}return{pathTo:D,pathFrom:R,drawnBox:{x1:s,x2:a,y1:m,y2:C}}}getXForValue(t,e,s=!0){let a=s?e:null;return null!=t&&(a=e+t/this.barCtx.invertedYRatio-2*(this.barCtx.isReversed?t/this.barCtx.invertedYRatio:0)),a}getYForValue(t,e,s,a=!0){let i=a?e:null;return null!=t&&(i=e-t/this.barCtx.yRatio[s]+2*(this.barCtx.isReversed?t/this.barCtx.yRatio[s]:0)),i}getGoalValues(t,e,s,a,i,r){const o=this.w,h=[],d=(a,i)=>{h.push({[t]:"x"===t?this.getXForValue(a,e,!1):this.getYForValue(a,s,r,!1),attrs:i})};if(o.seriesData.seriesGoals[a]&&o.seriesData.seriesGoals[a][i]&&Array.isArray(o.seriesData.seriesGoals[a][i])&&o.seriesData.seriesGoals[a][i].forEach(t=>{d(t.value,t)}),this.barCtx.barOptions.isDumbbell){const e=this.getDumbbellEnds(a,i);if(e.length){const s={strokeHeight:"x"===t?0:o.globals.markers.size[a],strokeWidth:"x"===t?o.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round"};let r=0,h=0;for(let t=1;t<e.length;t++)e[t].value<e[r].value&&(r=t),e[t].value>e[h].value&&(h=t);const b=o.config.plotOptions.bar.dumbbell.dataLabels;e.forEach((t,e)=>{const o=l(n({},s),{strokeColor:t.color});!b.enabled||e!==r&&e!==h||(o.label={text:this.getDumbbellLabelText(t.value,a,i,t.index),color:b.colorFromMarker?t.color:Array.isArray(b.style.colors)?b.style.colors[t.index]||b.style.colors[0]:b.style.colors,outward:e===r&&r!==h?-1:1}),d(t.value,o)})}}return h}getDumbbellEnds(t,e){const s=this.w,a=[],i=s.dumbbellData;if(i&&"series"===i.form){const t=i.values[e]||[];for(let e=0;e<t.length;e++){const r=t[e];null!==r&&-1===i.hidden.indexOf(e)&&a.push({value:r,color:s.globals.colors[e],index:e})}return a}if(!s.rangeData.seriesRange.length)return a;const r=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:s.globals.colors,o=e=>Array.isArray(r[t])?r[t][e]:r[t];return[{value:s.rangeData.seriesRangeStart[t][e],color:o(0),index:0},{value:s.rangeData.seriesRangeEnd[t][e],color:o(1),index:1}]}getDumbbellLabelText(t,e,s,a){const i=this.w,r=i.config.plotOptions.bar.dumbbell.dataLabels;if("function"==typeof r.formatter)return r.formatter(t,{seriesIndex:e,dataPointIndex:s,endpointIndex:a,w:i});const o=this.barCtx.isHorizontal?i.formatters.xLabelFormatter:i.formatters.yLabelFormatters[0];return"function"==typeof o?o(t,s,i):String(t)}drawGoalLine({barXPosition:t,barYPosition:e,goalX:s,goalY:a,barWidth:i,barHeight:r}){if(!(Array.isArray(s)&&s.length>0||Array.isArray(a)&&a.length>0))return null;const o=new x(this.barCtx.w),n=o.group({class:"apexcharts-bar-goals-groups"});n.node.classList.add("apexcharts-element-hidden"),this.barCtx.w.globals.delayedElements.push({el:n.node}),n.attr("clip-path",`url(#gridRectMarkerMask${this.barCtx.w.globals.cuid})`);let l=null;return this.barCtx.isHorizontal?Array.isArray(s)&&s.forEach(t=>{if(t.x>=-1&&t.x<=o.w.layout.gridWidth+1){const s=void 0!==t.attrs.strokeHeight?t.attrs.strokeHeight:r/2,a=e+s+r/2;l=o.drawLine(t.x,a-2*s,t.x,a,t.attrs.strokeColor?t.attrs.strokeColor:void 0,t.attrs.strokeDashArray,t.attrs.strokeWidth?t.attrs.strokeWidth:2,t.attrs.strokeLineCap),n.add(l),t.attrs.label&&n.add(this.drawDumbbellLabel(t.attrs,{x:t.x,y:a-s,horizontal:!0,markerSize:t.attrs.strokeWidth||0}))}}):Array.isArray(a)&&a.forEach(e=>{if(e.y>=-1&&e.y<=o.w.layout.gridHeight+1){const s=void 0!==e.attrs.strokeWidth?e.attrs.strokeWidth:i/2,a=t+s+i/2;l=o.drawLine(a-2*s,e.y,a,e.y,e.attrs.strokeColor?e.attrs.strokeColor:void 0,e.attrs.strokeDashArray,e.attrs.strokeHeight?e.attrs.strokeHeight:2,e.attrs.strokeLineCap),n.add(l),e.attrs.label&&n.add(this.drawDumbbellLabel(e.attrs,{x:a-s,y:e.y,horizontal:!1,markerSize:e.attrs.strokeHeight||0}))}}),n}drawDumbbellLabel(t,e){const s=this.w,a=new x(s),i=s.config.plotOptions.bar.dumbbell.dataLabels,r=e.markerSize/2+i.offset,o=t.label.outward;return a.drawText({x:e.x+(e.horizontal?r*o:0),y:e.y-(e.horizontal?0:r*o),text:t.label.text,textAnchor:e.horizontal?o<0?"end":"start":"middle",dominantBaseline:e.horizontal?"central":o<0?"hanging":"auto",foreColor:t.label.color,fontSize:i.style.fontSize,fontFamily:i.style.fontFamily,fontWeight:i.style.fontWeight,cssClass:"apexcharts-dumbbell-label"})}drawBarShadow({prevPaths:t,currPaths:e,color:s,realIndex:a,j:i}){const r=this.w,{x:o,x1:n,barYPosition:l}=t,{x:h,x1:d,barYPosition:c}=e,u=l+e.barHeight,g=new x(this.barCtx.w),p=new b,f=g.move(n,u)+g.line(o,u)+g.line(h,c)+g.line(d,c)+g.line(n,u)+("around"===r.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[a][i]?" Z":" z");return g.drawPath({d:f,fill:p.shadeColor(.5,b.rgb2hex(s)),stroke:"none",strokeWidth:0,fillOpacity:1,classes:"apexcharts-bar-shadow apexcharts-decoration-element"})}getZeroValueEncounters({i:t,j:e}){var s;const a=this.w;let i=0,r=0;return(a.config.plotOptions.bar.horizontal?a.seriesData.series.map((t,e)=>e):(null==(s=a.globals.columnSeries)?void 0:s.i.map(t=>t))||[]).forEach(s=>{const o=a.globals.seriesPercent[s][e];o&&i++,s<t&&0===o&&r++}),{nonZeroColumns:i,zeroEncounters:r}}getSeriesGroupIndex(t){const e=this.w;return e.labelData.seriesGroups.findIndex(s=>s.indexOf(e.seriesData.seriesNames[t])>-1)}getGroupIndex(t){const e=this.w,s=e.labelData.seriesGroups.findIndex(s=>s.indexOf(e.seriesData.seriesNames[t])>-1),a=this.barCtx.columnGroupIndices;let i=a.indexOf(s);return i<0&&(a.push(s),i=a.length-1),{groupIndex:s,columnGroupIndex:i}}}const X=d.__apex_CoreUtils,A=d.__apex_Filters,W=d.__apex_Animations_computeStagger;class F{static xRatio(t){const e=t.layout.gridWidth||1;return(t.globals.maxX-t.globals.minX)/e}static dataXToPx(t,e){return(e-t.globals.minX)/F.xRatio(t)}static pxToDataX(t,e){return t.globals.minX+e*F.xRatio(t)}static screenXToPlotPx(t,e){const s=t.dom.baseEl,a=s&&s.querySelector(".apexcharts-svg");if(!a)return e-t.layout.translateX;const i=a.getBoundingClientRect(),r=t.globals.svgWidth?i.width/t.globals.svgWidth:1;return(e-i.left)/(r||1)-t.layout.translateX}}class O{constructor(t,e,s){this.ctx=e,this.w=t,this.barOptions=t.config.plotOptions.bar,this.isHorizontal=this.barOptions.horizontal,this.strokeWidth=t.config.stroke.width,this.isNullValue=!1,this.isRangeBar=t.rangeData.seriesRange.length&&this.isHorizontal,this.isVerticalGroupedRangeBar=!t.globals.isBarHorizontal&&t.rangeData.seriesRange.length&&t.config.plotOptions.bar.rangeBarGroupRows,this.isFunnel=this.barOptions.isFunnel,this.isPyramid=this.barOptions.isPyramid,this.pyramidLayout=null,this.xyRatios=s,this.xRatio=0,this.yRatio=[],this.invertedXRatio=0,this.invertedYRatio=0,this.baseLineY=[],this.baseLineInvertedY=0,null!==this.xyRatios&&(this.xRatio=s.xRatio,this.yRatio=s.yRatio,this.invertedXRatio=s.invertedXRatio,this.invertedYRatio=s.invertedYRatio,this.baseLineY=s.baseLineY,this.baseLineInvertedY=s.baseLineInvertedY),this.yaxisIndex=0,this.translationsIndex=0,this.seriesLen=0,this.pathArr=[],this._prevKeyed=null,this._ltCache=null,this._layoutShiftCache=null,this._pathToInterp=null,this.series=[],this.elSeries=null,this.visibleI=0,this.isReversed=!1;const a=new L(this.w);this.lastActiveBarSerieIndex=a.getActiveConfigSeriesIndex("desc",["bar","column"]),this.lastActiveBarSerieIndexByGroup=a.getActiveConfigSeriesIndexByGroup(["bar","column"]),this.columnGroupIndices=[];const i=a.getBarSeriesIndices(),r=new X(this.w);this.stackedSeriesTotals=r.getStackedSeriesTotals(this.w.config.series.map((t,e)=>-1===i.indexOf(e)?e:-1).filter(t=>-1!==t)),this.barHelpers=new k(this)}draw(t,e){var s,a,i;const r=this.w,o=new x(this.w),h=new X(this.w);t=h.getLogSeries(t),this.series=t,this.yRatio=h.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const d=o.group({class:"apexcharts-bar-series apexcharts-plot-series"});r.config.dataLabels.enabled&&(this.totalItems,this.barOptions.dataLabels.maxItems);for(let h=0,c=0;h<t.length;h++,c++){let u,g;const p=[],x=[],f=r.globals.comboCharts?e[h]:h,{columnGroupIndex:y}=this.barHelpers.getGroupIndex(f),v=o.group({class:"apexcharts-series",rel:h+1,seriesName:b.escapeString(r.seriesData.seriesNames[f]),"data:realIndex":f});L.addCollapsedClassToSeries(this.w,v,f),t[h].length>0&&(this.visibleI=this.visibleI+1),this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[f],this.translationsIndex=f);const m=this.translationsIndex;this.isReversed=r.config.yaxis[this.yaxisIndex]&&r.config.yaxis[this.yaxisIndex].reversed,this.isPyramid&&(this.pyramidLayout=this.barHelpers.computePyramidLayout(t[h]));const C=this.barHelpers.initialPositions(f),{y:I,yDivision:P,zeroW:H,x:D,xDivision:R,zeroH:k}=C;let X=C.barHeight,W=C.barWidth;g=I,u=D,this.isHorizontal||x.push(u+(null!=W?W:0)/2);const F=o.group({class:"apexcharts-datalabels","data:realIndex":f});r.globals.delayedElements.push({el:F.node,holdUntilComplete:!(null==(s=r.config.dataLabels.animate)?void 0:s.enabled)&&this.isLengthTransition(f)}),F.node.classList.add("apexcharts-element-hidden");const O=o.group({class:"apexcharts-bar-goals-markers"}),Y=o.group({class:"apexcharts-bar-shadows"});r.globals.delayedElements.push({el:Y.node}),Y.node.classList.add("apexcharts-element-hidden");for(let e=0;e<t[h].length;e++){const s=this.barHelpers.getStrokeWidth(h,e,f);let o=null;const d={indexes:{i:h,j:e,realIndex:f,translationsIndex:m,bc:c},x:u,y:g,strokeWidth:s,elSeries:v};this.isHorizontal?(o=this.drawBarPaths(l(n({},d),{barHeight:X,zeroW:H,yDivision:P})),W=this.series[h][e]/this.invertedYRatio):(o=this.drawColumnPaths(l(n({},d),{xDivision:R,barWidth:W,zeroH:k})),X=this.series[h][e]/this.yRatio[m]);const C=this.barHelpers.getPathFillColor(t,h,e,f);if(this.isFunnel&&!this.isPyramid&&this.barOptions.isFunnel3d&&"trapezoid"!==(null==(a=r.config.plotOptions.funnel)?void 0:a.shape)&&this.pathArr.length&&e>0){const t=this.barHelpers.drawBarShadow({color:"string"==typeof C.color&&-1===(null==(i=C.color)?void 0:i.indexOf("url"))?C.color:b.hexToRgba(r.globals.colors[h]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:o,realIndex:f,j:e});if(Y.add(t),r.config.chart.dropShadow.enabled){new A(this.w).dropShadow(t,r.config.chart.dropShadow,f)}}this.pathArr.push(o);const w=this.barHelpers.drawGoalLine({barXPosition:o.barXPosition,barYPosition:o.barYPosition,goalX:o.goalX,goalY:o.goalY,barHeight:X,barWidth:W});w&&O.add(w),g=o.y,u=o.x,e>0&&x.push(u+(null!=W?W:0)/2),p.push(g),this.renderSeries(l(n({realIndex:f,pathFill:C.color},C.useRangeColor?{lineFill:C.color}:{}),{j:e,i:h,columnGroupIndex:y,pathFrom:o.pathFrom,pathTo:o.pathTo,strokeWidth:s,elSeries:v,x:u,y:g,series:t,barHeight:Math.abs(o.barHeight?o.barHeight:X),barWidth:Math.abs(o.barWidth?o.barWidth:W),elDataLabelsWrap:F,elGoalsMarkers:O,elBarShadows:Y,visibleSeries:this.visibleI,type:"bar"}))}if(r.globals.seriesXvalues[f]=x,r.globals.seriesYvalues[f]=p,r.globals.previousPaths.length>0){const e=[];for(let s=0;s<t[h].length;s++)e.push(w(r,f,s));S({w:r,elSeries:v,record:this._prevRecord(f),newKeys:e,isHorizontal:this.isHorizontal,speed:r.config.chart.animations.dynamicAnimation.speed})}d.add(v)}return d}renderSeries({realIndex:t,pathFill:e,lineFill:s,j:a,i:i,columnGroupIndex:r,pathFrom:o,pathTo:n,strokeWidth:l,elSeries:h,x:d,y:b,y1:c,y2:u,series:g,barHeight:p,barWidth:f,barXPosition:y,barYPosition:v,elDataLabelsWrap:m,elGoalsMarkers:C,elBarShadows:I,visibleSeries:P,type:S,classes:L}){var D,R,k,X,F,O,Y;const B=this.w,T=new x(this.w,this.ctx),j=function(t,e){const s=t&&t.renderer;return s&&s.kind&&"svg"!==s.kind?s:e}(this.ctx,T);let z=!1;const G=this._pathToInterp;if(this._pathToInterp=null,h._bindingsDelegated||(h._bindingsDelegated=!0,T.setupEventDelegation(h,`.apexcharts-${S}-area`)),!s){let e=function(t){const e=B.config.stroke.colors;let s;return Array.isArray(e)&&e.length>0&&(s=e[t],s||(s=""),"function"==typeof s)?s({value:B.seriesData.series[t][a],dataPointIndex:a,w:B}):s};const i="function"==typeof B.globals.stroke.colors[t]?e(t):B.globals.stroke.colors[t];s=this.barOptions.distributed?B.globals.stroke.colors[a]:i}const _=B.config.chart.animations,M=_.animateGradually;let N=0,V=0;if(M&&!1!==M.enabled&&!(B.globals.dataChanged&&this.isLayoutShift(t))){const t=B.globals.dataPoints||1,e=M.delay||0,s=Math.min(e,.5*_.speed/Math.max(1,t));V=W({style:"sequential",index:a,baseDelay:s}),B.config.chart.stacked&&!B.globals.dataChanged&&(V+=i*s*.5);N=V/(e||1)}const E=new H(this).handleBarDataLabels({x:d,y:b,y1:c,y2:u,i:i,j:a,series:g,realIndex:t,columnGroupIndex:r,barHeight:p,barWidth:f,barXPosition:y,barYPosition:v,visibleSeries:P});if(V>0){const t=B.config.dataLabels;if((null==(D=t.animate)?void 0:D.enabled)||(null==(R=t.countUp)?void 0:R.enabled)){const t=String(Math.round(V));null==(X=null==(k=E.dataLabels)?void 0:k.node)||X.setAttribute("data:dlDelay",t),null==(O=null==(F=E.totalDataLabels)?void 0:F.node)||O.setAttribute("data:dlDelay",t)}}if(B.globals.isBarHorizontal||(E.dataLabelsPos.dataLabelsX+Math.max(f,B.globals.barPadForNumericAxis)<0||E.dataLabelsPos.dataLabelsX-Math.max(f,B.globals.barPadForNumericAxis)>B.layout.gridWidth)&&(z=!0),B.config.series[i].data[a]&&B.config.series[i].data[a].strokeColor&&(s=B.config.series[i].data[a].strokeColor),this.isNullValue&&-1===B.globals.collapsingSeriesIndices.indexOf(t)&&(e="none"),!z){const r=!0===(null==(Y=this.ctx.morphTypeChange)?void 0:Y.isActive()),d=r?this.ctx.morphTypeChange.getSpeed():B.config.chart.animations.dynamicAnimation.speed,b=r&&this.ctx.morphTypeChange.claimsTargetMark(t,a);b&&(o=n,N=0);const g=j.renderPaths({i:i,j:a,realIndex:t,pathFrom:o,pathTo:n,stroke:s,strokeWidth:l,strokeLineCap:B.config.stroke.lineCap,fill:e,pathToInterp:G,animationDelay:N,initialSpeed:B.config.chart.animations.speed,dataChangeSpeed:d,className:`apexcharts-${S}-area${L?` ${L}`:""}`,chartType:S,bindEventsOnPaths:!1});g.attr("clip-path",`url(#gridRectBarMask${B.globals.cuid})`),b&&(g.node.setAttribute("opacity","0"),g.node.setAttribute("data-piece-hidden","1"));const x=B.config.forecastDataPoints;x.count>0&&a>=B.globals.dataPoints-x.count&&(g.node.setAttribute("stroke-dasharray",x.dashArray),g.node.setAttribute("stroke-width",x.strokeWidth),g.node.setAttribute("fill-opacity",x.fillOpacity)),void 0!==c&&void 0!==u&&(g.attr("data-range-y1",c),g.attr("data-range-y2",u));new A(this.w).setSelectionFilter(g,t,a),h.add(g),g.attr({cy:E.dataLabelsPos.bcy,cx:E.dataLabelsPos.bcx,j:a,val:B.seriesData.series[i][a],barHeight:p,barWidth:f,"data:pathKey":w(B,t,a)}),"canvas"===j.kind&&(B.globals.barCanvasCoords||(B.globals.barCanvasCoords={}),B.globals.barCanvasCoords[t]||(B.globals.barCanvasCoords[t]={}),B.globals.barCanvasCoords[t][a]={cx:E.dataLabelsPos.bcx,cy:E.dataLabelsPos.bcy,barWidth:f}),null!==E.dataLabels&&m.add(E.dataLabels),E.totalDataLabels&&m.add(E.totalDataLabels),h.add(m),C&&h.add(C),I&&h.add(I)}return h}drawBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:a,x:i,y:r,yDivision:o,elSeries:n}){const l=this.w,h=t.i,d=t.j;let b;if(l.axisFlags.isXNumeric)b=(r=(l.seriesData.seriesX[h][d]-l.globals.minX)/this.invertedXRatio-e)+e*this.visibleI;else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:t,zeroEncounters:s}=this.barHelpers.getZeroValueEncounters({i:h,j:d});t>0&&(e=this.seriesLen*e/t),b=r+e*this.visibleI,b-=e*s}else b=r+e*this.visibleI;const c=this.isFunnel&&"trapezoid"===l.config.plotOptions.funnel.shape,u=this.isPyramid&&this.pyramidLayout?this.pyramidLayout[d]:null,g=!!u;if(u)b=u.y,e=u.height;else if(this.isFunnel&&!c){const t=null!=a?a:0;a=t-(this.barHelpers.getXForValue(this.series[h][d],t)-t)/2}let p;return i=this.barHelpers.getXForValue(this.series[h][d],null!=a?a:0),p=u?this.barHelpers.getPyramidPaths({barYPosition:b,barHeight:e,topHalf:u.topHalf,bottomHalf:u.bottomHalf,realIndex:t.realIndex,j:d,strokeWidth:s,w:l}):c?this.barHelpers.getFunnelTrapezoidPaths({barYPosition:b,barHeight:e,series:this.series,i:h,j:d,realIndex:t.realIndex,strokeWidth:s,w:l}):this.barHelpers.getBarpaths({barYPosition:b,barHeight:e,x1:a,x2:i,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,i:h,j:d,w:l}),(c||g)&&(a=p.x1,i=p.x),l.axisFlags.isXNumeric||g||(r+=o),g&&(r=b),this.barHelpers.barBackground({j:d,i:h,y1:b-e*this.visibleI,y2:e*this.seriesLen,elSeries:n}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x1:a,x:i,y:r,goalX:this.barHelpers.getGoalValues("x",a,null,t.realIndex,d,0),barYPosition:b,barHeight:e}}drawColumnPaths({indexes:t,x:e,y:s,xDivision:a,barWidth:i,zeroH:r,strokeWidth:o,elSeries:n}){const l=this.w,h=t.realIndex,d=t.translationsIndex,b=t.i,c=t.j,u=t.bc;let g;if(l.axisFlags.isXNumeric){const t=this.getBarXForNumericXAxis({x:e,j:c,realIndex:h,barWidth:i});e=t.x,g=t.barXPosition}else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:t,zeroEncounters:s}=this.barHelpers.getZeroValueEncounters({i:b,j:c});t>0&&(i=this.seriesLen*i/t),g=e+i*this.visibleI,g-=i*s}else g=e+i*this.visibleI;s=this.barHelpers.getYForValue(this.series[b][c],r,d);const p=this.barHelpers.getColumnPaths({barXPosition:g,barWidth:i,y1:r,y2:s,strokeWidth:o,isReversed:this.isReversed,series:this.series,realIndex:h,i:b,j:c,w:l});return l.axisFlags.isXNumeric||(e+=a),this.barHelpers.barBackground({bc:u,j:c,i:b,x1:g-o/2-i*this.visibleI,x2:i*this.seriesLen+o/2,elSeries:n}),{pathTo:p.pathTo,pathFrom:p.pathFrom,x:e,y:s,goalY:this.barHelpers.getGoalValues("y",null,r,h,c,d),barXPosition:g,barWidth:i}}getBarXForNumericXAxis({x:t,barWidth:e,realIndex:s,j:a}){const i=this.w;let r=s;return i.seriesData.seriesX[s].length||(r=i.globals.maxValsInArrayIndex),b.isNumber(i.seriesData.seriesX[r][a])&&(t=F.dataXToPx(i,i.seriesData.seriesX[r][a])-e*this.seriesLen/2),{barXPosition:t+(R(i)?0:e*this.visibleI),x:t}}_prevRecord(t){const e=this.w;let s=null;for(let a=0;a<e.globals.previousPaths.length;a++){const i=e.globals.previousPaths[a];i.paths&&i.paths.length>0&&parseInt(i.realIndex,10)===parseInt(String(t),10)&&(s=i)}return s}_prevKeyedPaths(t){if(this._prevKeyed||(this._prevKeyed={}),void 0!==this._prevKeyed[t])return this._prevKeyed[t];const e=this._prevRecord(t);let s=null;if(e&&e.paths.every(t=>null!=t.key)){const t=new Map;e.paths.forEach(e=>{t.set(e.key,e)}),s=t}return this._prevKeyed[t]=s,s}isLengthTransition(t){var e,s;if(this._ltCache||(this._ltCache={}),void 0!==this._ltCache[t])return this._ltCache[t];const a=this.w;let i=!1;if(C(a)&&a.globals.previousPaths.length>0){const r=this._prevRecord(t),o=null!=(s=null==(e=a.seriesData.series[t])?void 0:e.length)?s:0;if(r)if(r.paths.length!==o)i=!0;else{const e=this._prevKeyedPaths(t);if(e)for(let s=0;s<o;s++)if(!e.has(w(a,t,s))){i=!0;break}}else i=o>0}return this._ltCache[t]=i,i}isLayoutShift(t){if(this.isLengthTransition(t))return!0;if(this._layoutShiftCache||(this._layoutShiftCache={}),void 0!==this._layoutShiftCache[t])return this._layoutShiftCache[t];const e=P(this.w,t,!0,!0),s=!(!e||!e.join.changed);return this._layoutShiftCache[t]=s,s}getPreviousPath(t,e,s,a){const i=this.w;this._pathToInterp=null;const r=this._prevRecord(t);if(!r)return C(i)?null:s;let o=null,n=!1;const l=this._prevKeyedPaths(t);if(l){const s=l.get(w(i,t,e));s?o=s.d:n=!0}else void 0!==r.paths[e]?o=r.paths[e].d:n=!0;if(o){const t=O.pathCommandCount(o),e=O.pathCommandCount(s);if(t===e)return o;const r=new x(i),n=t=>{const e=O.pathBox(t);return e?Math.min(e.maxX-e.minX,e.maxY-e.minY):0},l=t<e?n(o)>1:n(s)>1;if(t<e){const t=r.roundPathCorners(o,0);if(O.pathCommandCount(t)===e){if(l&&a){const t=r.roundPathCorners(a,0);O.pathCommandCount(t)===e&&(this._pathToInterp=t)}return t}}else{const e=r.roundPathCorners(s,0);if(O.pathCommandCount(e)===t){if(this._pathToInterp=e,l){const e=O.squareLike(o),s=e?r.roundPathCorners(e,0):null;if(s&&O.pathCommandCount(s)===t)return s}return o}}}return n&&C(i)?null:s}static pathBox(t){if(!t)return null;const e=[],s=/([MLC])([^MLCZz]*)/g;let a;for(;null!==(a=s.exec(t));){const t=a[2].trim().split(/[\s,]+/).map(Number);t.length<2||t.some(isNaN)||e.push([t[t.length-2],t[t.length-1]])}if(e.length<3)return null;const i=e.map(t=>t[0]),r=e.map(t=>t[1]);return{minX:Math.min(...i),maxX:Math.max(...i),minY:Math.min(...r),maxY:Math.max(...r),start:e[0],vertical:Math.abs(e[1][0]-e[0][0])<Math.abs(e[1][1]-e[0][1])}}static squareLike(t){const e=O.pathBox(t);if(!e)return null;const{minX:s,maxX:a,minY:i,maxY:r,start:o,vertical:n}=e,l=(t,e,s)=>Math.abs(t-e)<=Math.abs(t-s)?[e,s]:[s,e];let h,d,b,c;n?(h=Math.abs(o[0]-s)<=Math.abs(o[0]-a)?s:a,d=h===s?a:s,[b,c]=l(o[1],i,r)):(b=Math.abs(o[1]-i)<=Math.abs(o[1]-r)?i:r,c=b===i?r:i,[h,d]=l(o[0],s,a));const u=t.trim().endsWith("Z")?" Z":" z";return n?`M ${h} ${b} L ${h} ${c} L ${d} ${c} L ${d} ${b}${u}`:`M ${h} ${b} L ${d} ${b} L ${d} ${c} L ${h} ${c}${u}`}getPreviousFlip(t,e){const s=this.w,a=this._prevRecord(t);if(!a)return null;const i=this._prevKeyedPaths(t),r=i?i.get(w(s,t,e)):a.paths[e];return r?!!r.flip:null}static pathCommandCount(t){if(!t)return 0;const e=t.match(/[A-Za-z]/g);return e?e.length:0}}d.default.use({bar:O,column:O,barStacked:class extends O{draw(t,e){const s=this.w;this.graphics=new x(this.w),this.bar=new O(this.w,this.ctx,this.xyRatios);const a=new X(this.w);t=a.getLogSeries(t),this.yRatio=a.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t),"100%"===s.config.chart.stackType&&(t=s.globals.comboCharts?e.map(t=>s.globals.seriesPercent[t]):s.globals.seriesPercent.slice()),this.series=t,this.barHelpers.initializeStackedPrevVars(this);const i=this.graphics.group({class:"apexcharts-bar-series apexcharts-plot-series"});let r=0,o=0;const h=s.config.chart.animations,d=h.enabled&&h.dynamicAnimation.enabled&&s.globals.previousPaths.length>0;let c=!1;for(let a=0,h=0;a<t.length;a++,h++){const u=s.globals.comboCharts?e[a]:a,{groupIndex:g,columnGroupIndex:p}=this.barHelpers.getGroupIndex(u);this.groupCtx=this[s.labelData.seriesGroups[g]];const x=[],f=[];let y=0;this.yRatio.length>1&&(this.yaxisIndex=s.globals.seriesYAxisReverseMap[u][0],y=u),this.isReversed=s.config.yaxis[this.yaxisIndex]&&s.config.yaxis[this.yaxisIndex].reversed;let v=this.graphics.group({class:"apexcharts-series",seriesName:b.escapeString(s.seriesData.seriesNames[u]),rel:a+1,"data:realIndex":u});L.addCollapsedClassToSeries(this.w,v,u);const m=this.graphics.group({class:"apexcharts-datalabels","data:realIndex":u});L.addCollapsedClassToSeries(this.w,m,u),(s.globals.collapsingSeriesIndices||[]).indexOf(u)>-1&&m.node.style.setProperty("--apexcharts-dl-exit",`${s.config.chart.animations.dynamicAnimation.speed}ms`);const C=this.graphics.group({class:"apexcharts-bar-goals-markers"}),w=this.initialPositions(r,o,void 0,void 0,void 0,void 0,y),{xDivision:I,yDivision:P,zeroH:S,zeroW:H}=w;let D=w.barHeight,R=w.barWidth;o=w.y,r=w.x,s.globals.barHeight=D,s.globals.barWidth=R,this.barHelpers.initializeStackedXYVars(this),1===this.groupCtx.prevY.length&&this.groupCtx.prevY[0].every(t=>isNaN(t))&&(this.groupCtx.prevY[0]=this.groupCtx.prevY[0].map(()=>S),this.groupCtx.prevYF[0]=this.groupCtx.prevYF[0].map(()=>0));for(let e=0;e<s.globals.dataPoints;e++){const i=this.barHelpers.getStrokeWidth(a,e,u),b={indexes:{i:a,j:e,realIndex:u,translationsIndex:y,bc:h},strokeWidth:i,x:r,y:o,elSeries:v,columnGroupIndex:p,seriesGroup:s.labelData.seriesGroups[g]};let w=null;this.isHorizontal?(w=this.drawStackedBarPaths(l(n({},b),{zeroW:H,barHeight:D,yDivision:P})),R=this.series[a][e]/this.invertedYRatio):(w=this.drawStackedColumnPaths(l(n({},b),{xDivision:I,barWidth:R,zeroH:S})),D=this.series[a][e]/this.yRatio[y]);const L=this.barHelpers.drawGoalLine({barXPosition:w.barXPosition,barYPosition:w.barYPosition,goalX:w.goalX,goalY:w.goalY,barHeight:D,barWidth:R});L&&C.add(L),o=w.y,r=w.x,x.push(r),f.push(o);const k=this.barHelpers.getPathFillColor(t,a,e,u);let X="";const A=s.globals.isBarHorizontal?"apexcharts-flip-x":"apexcharts-flip-y",W="bottom"===this.barHelpers.arrBorderRadius[u][e]&&s.seriesData.series[u][e]>0||"top"===this.barHelpers.arrBorderRadius[u][e]&&s.seriesData.series[u][e]<0,F=d&&!W&&this.getPreviousFlip(u,e);(W||F)&&(X=A),F&&(X+=" apexcharts-flip-held",c=!0),v=this.renderSeries(l(n({realIndex:u,pathFill:k.color},k.useRangeColor?{lineFill:k.color}:{}),{j:e,i:a,columnGroupIndex:p,pathFrom:w.pathFrom,pathTo:w.pathTo,strokeWidth:i,elSeries:v,x:r,y:o,series:t,barHeight:D,barWidth:R,elDataLabelsWrap:m,elGoalsMarkers:C,type:"bar",visibleSeries:p,classes:X}))}s.globals.seriesXvalues[u]=x,s.globals.seriesYvalues[u]=f,this.groupCtx.prevY.push(this.groupCtx.yArrj),this.groupCtx.prevYF.push(this.groupCtx.yArrjF),this.groupCtx.prevYVal.push(this.groupCtx.yArrjVal),this.groupCtx.prevX.push(this.groupCtx.xArrj),this.groupCtx.prevXF.push(this.groupCtx.xArrjF),this.groupCtx.prevXVal.push(this.groupCtx.xArrjVal),i.add(v)}return c&&this.settleHeldMirrors(),i}settleHeldMirrors(){const t=this.w;if(!m.isBrowser())return;const e=t.config.chart.animations,s=(e.dynamicAnimation.speed||0)+(e.speed||0)+100;setTimeout(()=>{!t.globals.isDestroyed&&b.elementExists(t.dom.baseEl)&&t.dom.baseEl.querySelectorAll(".apexcharts-flip-held").forEach(t=>{t.classList.remove("apexcharts-flip-held","apexcharts-flip-y","apexcharts-flip-x")})},s)}initialPositions(t,e,s,a,i,r,o){const n=this.w;let l,h;if(this.isHorizontal){a=n.layout.gridHeight/n.globals.dataPoints;const t=n.config.plotOptions.bar.barHeight;l=-1===String(t).indexOf("%")?parseInt(t,10):a*parseInt(t,10)/100,r=n.globals.padHorizontal+(this.isReversed?n.layout.gridWidth-this.baseLineInvertedY:this.baseLineInvertedY),e=(a-l)/2}else{h=s=n.layout.gridWidth/n.globals.dataPoints;const e=n.config.plotOptions.bar.columnWidth,a=n.axisFlags.isXNumeric?this.barHelpers.barSlotXSpan():0;a>0?h=(s=a/this.xRatio)*parseInt(this.barOptions.columnWidth,10)/100:h*=parseInt(e,10)/100,-1===String(e).indexOf("%")&&(h=parseInt(e,10)),i=this.isReversed?this.baseLineY[o]:n.layout.gridHeight-this.baseLineY[o],t=n.globals.padHorizontal+(s-h)/2}const d=n.globals.barGroups.length||1;return{x:t,y:e,yDivision:a,xDivision:s,barHeight:(null!=l?l:0)/d,barWidth:(null!=h?h:0)/d,zeroH:i,zeroW:r}}drawStackedBarPaths({indexes:t,barHeight:e,strokeWidth:s,zeroW:a,x:i,y:r,columnGroupIndex:o,seriesGroup:n,yDivision:l,elSeries:h}){var d,b,c,u,g;const p=this.w,x=r+o*e;let f;const y=t.i,v=t.j,m=t.realIndex,C=t.translationsIndex;let w=0;for(let t=0;t<this.groupCtx.prevXF.length;t++)w+=this.groupCtx.prevXF[t][v];const I=this.groupCtx.prevX.length;if(I>0){let t=a;this.groupCtx.prevXVal[I-1][v]<0?t=(null==(d=this.series[y])?void 0:d[v])>=0?this.groupCtx.prevX[I-1][v]+w-2*(this.isReversed?w:0):this.groupCtx.prevX[I-1][v]:this.groupCtx.prevXVal[I-1][v]>=0&&(t=(null==(b=this.series[y])?void 0:b[v])>=0?this.groupCtx.prevX[I-1][v]:this.groupCtx.prevX[I-1][v]-w+2*(this.isReversed?w:0)),f=t}else f=a;i=null===(null==(c=this.series[y])?void 0:c[v])?f:f+(null==(u=this.series[y])?void 0:u[v])/this.invertedYRatio-2*(this.isReversed?(null==(g=this.series[y])?void 0:g[v])/this.invertedYRatio:0);const P=this.barHelpers.getBarpaths({barYPosition:x,barHeight:e,x1:f,x2:i,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,seriesGroup:n,i:y,j:v,w:p});return this.barHelpers.barBackground({j:v,i:y,y1:x,y2:e,elSeries:h}),r+=l,{pathTo:P.pathTo,pathFrom:P.pathFrom,goalX:this.barHelpers.getGoalValues("x",a,null,m,v,C),barXPosition:f,barYPosition:x,x:i,y:r}}drawStackedColumnPaths({indexes:t,x:e,y:s,xDivision:a,barWidth:i,zeroH:r,columnGroupIndex:o,seriesGroup:n,elSeries:l}){var h,d,b,c,u,g,p,x,f;const y=this.w,v=t.i,m=t.j,C=t.bc,w=t.realIndex,I=t.translationsIndex;if(y.axisFlags.isXNumeric){let t=y.seriesData.seriesX[w][m];t||(t=0),e=(t-y.globals.minX)/this.xRatio-i/2*y.globals.barGroups.length}const P=e+o*i;let S,H=0;for(let t=0;t<this.groupCtx.prevYF.length;t++)H+=isNaN(this.groupCtx.prevYF[t][m])?0:this.groupCtx.prevYF[t][m];const L=this.groupCtx.prevY.length;if(L>0&&!y.axisFlags.isXNumeric||L>0&&y.axisFlags.isXNumeric&&y.seriesData.seriesX[w-1][m]===y.seriesData.seriesX[w][m]){let t,e;const s=Math.min(this.yRatio.length+1,w+1);if(void 0!==this.groupCtx.prevY[L-1]&&this.groupCtx.prevY[L-1].length)for(let t=1;t<s;t++)if(!isNaN(null==(h=this.groupCtx.prevY[L-t])?void 0:h[m])){e=this.groupCtx.prevY[L-t][m];break}for(let a=1;a<s;a++){if((null==(d=this.groupCtx.prevYVal[L-a])?void 0:d[m])<0){t=(null==(b=this.series[v])?void 0:b[m])>=0?e-H+2*(this.isReversed?H:0):e;break}if((null==(c=this.groupCtx.prevYVal[L-a])?void 0:c[m])>=0){t=(null==(u=this.series[v])?void 0:u[m])>=0?e:e+H-2*(this.isReversed?H:0);break}}void 0===t&&(t=y.layout.gridHeight),S=(null==(g=this.groupCtx.prevYF[0])?void 0:g.every(t=>0===t))&&this.groupCtx.prevYF.slice(1,L).every(t=>t.every(t=>isNaN(t)))?r:t}else S=r;s=(null==(p=this.series[v])?void 0:p[m])?S-(null==(x=this.series[v])?void 0:x[m])/this.yRatio[I]+2*(this.isReversed?(null==(f=this.series[v])?void 0:f[m])/this.yRatio[I]:0):S;const D=this.barHelpers.getColumnPaths({barXPosition:P,barWidth:i,y1:S,y2:s,yRatio:this.yRatio[I],strokeWidth:this.strokeWidth,isReversed:this.isReversed,series:this.series,seriesGroup:n,realIndex:t.realIndex,i:v,j:m,w:y});return this.barHelpers.barBackground({bc:C,j:m,i:v,x1:P,x2:i,elSeries:l}),{pathTo:D.pathTo,pathFrom:D.pathFrom,goalY:this.barHelpers.getGoalValues("y",null,r,w,m,0),barXPosition:P,x:y.axisFlags.isXNumeric?e:e+a,y:s}}},rangeBar:class extends O{draw(t,e){var s,a,i,r,o,l,h,d,c;const u=this.w,g=new x(this.w);this.rangeBarOptions=this.w.config.plotOptions.rangeBar,this.series=t,this.seriesRangeStart=u.rangeData.seriesRangeStart,this.seriesRangeEnd=u.rangeData.seriesRangeEnd,this.barHelpers.initVariables(t);const p=g.group({class:"apexcharts-rangebar-series apexcharts-plot-series"});for(let x=0;x<t.length;x++){let f,y;const v=u.globals.comboCharts?e[x]:x,{columnGroupIndex:m}=this.barHelpers.getGroupIndex(v),C=g.group({class:"apexcharts-series",seriesName:b.escapeString(u.seriesData.seriesNames[v]),rel:x+1,"data:realIndex":v});L.addCollapsedClassToSeries(this.w,C,v),t[x].length>0&&(this.visibleI=this.visibleI+1);let w=0;this.yRatio.length>1&&(this.yaxisIndex=u.globals.seriesYAxisReverseMap[v][0],w=v);const I=this.barHelpers.initialPositions(v),{y:P,zeroW:S,x:H,zeroH:D}=I;let R=null!=(s=I.barWidth)?s:0,k=null!=(a=I.barHeight)?a:0;const X=null!=(i=I.yDivision)?i:0,A=null!=(r=I.xDivision)?r:0;y=P,f=H;const W=g.group({class:"apexcharts-datalabels","data:realIndex":v}),F=g.group({class:"apexcharts-rangebar-goals-markers"});for(let e=0;e<u.globals.dataPoints;e++){const s=this.barHelpers.getStrokeWidth(x,e,v),a=this.seriesRangeStart[x][e],i=this.seriesRangeEnd[x][e];let r=null,b=null,g=null;const p={x:f,y:y,strokeWidth:s,elSeries:C};let P=this.seriesLen;if(u.config.plotOptions.bar.rangeBarGroupRows&&(P=1),void 0===(null==(o=u.config.series[x].data)?void 0:o[e]))break;if(this.isHorizontal){g=y+k*this.visibleI;const t=(X-k*P)/2;if(null==(h=null==(l=u.config.series[x].data)?void 0:l[e])?void 0:h.x){const s=this.detectOverlappingBars({i:x,j:e,barYPosition:g,srty:t,barHeight:k,yDivision:X,initPositions:I});k=s.barHeight,g=s.barYPosition}r=this.drawRangeBarPaths(n({indexes:{i:x,j:e,realIndex:v},barHeight:k,barYPosition:g,zeroW:S,yDivision:X,y1:a,y2:i},p)),R=r.barWidth}else{u.axisFlags.isXNumeric&&(f=(u.seriesData.seriesX[x][e]-u.globals.minX)/this.xRatio-R/2),b=f+R*this.visibleI;const t=(A-R*P)/2;if(null==(c=null==(d=u.config.series[x].data)?void 0:d[e])?void 0:c.x){const s=this.detectOverlappingBars({i:x,j:e,barXPosition:b,srtx:t,barWidth:R,xDivision:A,initPositions:I});R=s.barWidth,b=s.barXPosition}r=this.drawRangeColumnPaths(n({indexes:{i:x,j:e,realIndex:v,translationsIndex:w},barWidth:R,barXPosition:b,zeroH:D,xDivision:A},p)),k=r.barHeight}const H=this.barHelpers.drawGoalLine({barXPosition:r.barXPosition,barYPosition:g,goalX:r.goalX,goalY:r.goalY,barHeight:k,barWidth:R});H&&F.add(H),y=r.y,f=r.x;const L=this.barHelpers.getPathFillColor(t,x,e,v);this.renderSeries({realIndex:v,pathFill:L.color,lineFill:L.useRangeColor?L.color:u.globals.stroke.colors[v],j:e,i:x,x:f,y:y,y1:a,y2:i,pathFrom:r.pathFrom,pathTo:r.pathTo,strokeWidth:s,elSeries:C,series:t,barHeight:k,barWidth:R,barXPosition:b,barYPosition:g,columnGroupIndex:m,elDataLabelsWrap:W,elGoalsMarkers:F,visibleSeries:this.visibleI,type:"rangebar"})}p.add(C)}return p}detectOverlappingBars({i:t,j:e,barYPosition:s,barXPosition:a,srty:i,srtx:r,barHeight:o,barWidth:n,yDivision:l,xDivision:h,initPositions:d}){var b,c,u,g;const p=this.w;let x=[];const f=null==(c=null==(b=p.globals.seriesRangeName)?void 0:b[t])?void 0:c[e],y=null==(g=null==(u=p.config.series[t].data)?void 0:u[e])?void 0:g.x,v=Array.isArray(y)?y.join(" "):y,m=p.labelData.labels.map(t=>Array.isArray(t)?t.join(" "):t).indexOf(v),C=p.rangeData.seriesRange[t].findIndex(t=>{var e;return t.x===v&&(null==(e=t.overlaps)?void 0:e.size)>0});return this.isHorizontal?(s=p.config.plotOptions.bar.rangeBarGroupRows?i+l*m:i+o*this.visibleI+l*m,C>-1&&!p.config.plotOptions.bar.rangeBarOverlap&&(x=Array.from(p.rangeData.seriesRange[t][C].overlaps),x.indexOf(f)>-1&&(s=(o=d.barHeight/x.length)*this.visibleI+l*(100-parseInt(this.barOptions.barHeight,10))/100/2+o*(this.visibleI+x.indexOf(f))+l*m))):(m>-1&&!p.labelData.timescaleLabels.length&&(a=p.config.plotOptions.bar.rangeBarGroupRows?r+h*m:r+n*this.visibleI+h*m),C>-1&&!p.config.plotOptions.bar.rangeBarOverlap&&(x=Array.from(p.rangeData.seriesRange[t][C].overlaps),x.indexOf(f)>-1&&(a=(n=d.barWidth/x.length)*this.visibleI+h*(100-parseInt(this.barOptions.barWidth,10))/100/2+n*(this.visibleI+x.indexOf(f))+h*m))),{barYPosition:s,barXPosition:a,barHeight:o,barWidth:n}}drawRangeColumnPaths({indexes:t,x:e,xDivision:s,barWidth:a,barXPosition:i,zeroH:r}){var o,n;const l=this.w,{i:h,j:d,realIndex:b,translationsIndex:c}=t,u=this.yRatio[c],g=this.getRangeValue(b,d);let p=Math.min(g.start,g.end),x=Math.max(g.start,g.end);const f=!(void 0===(null==(o=this.series[h])?void 0:o[d])||null===(null==(n=this.series[h])?void 0:n[d]));f?(p=r-p/u,x=r-x/u):p=r;const y=Math.abs(x-p),v=this.barHelpers.getColumnPaths({barXPosition:i,barWidth:a,y1:p,y2:x,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,realIndex:b,i:b,j:d,w:l});if(f){const t=v.drawnBox,e=g.end>=g.start;this.recordColumnGeometry(b,d,{slotStart:t.x1,slotEnd:t.x2,levelStart:e?t.y1:t.y2,levelEnd:e?t.y2:t.y1,horizontal:!1})}if(l.axisFlags.isXNumeric){const t=this.getBarXForNumericXAxis({x:e,j:d,realIndex:b,barWidth:a});e=t.x,i=t.barXPosition}else e+=s;return{pathTo:v.pathTo,pathFrom:v.pathFrom,barHeight:y,x:e,y:g.start<0&&g.end<0?p:x,goalY:this.barHelpers.getGoalValues("y",null,r,b,d,c),barXPosition:i}}preventBarOverflow(t){const e=this.w;return t<0&&(t=0),t>e.layout.gridWidth&&(t=e.layout.gridWidth),t}drawRangeBarPaths({indexes:t,y:e,y1:s,y2:a,yDivision:i,barHeight:r,barYPosition:o,zeroW:n}){const l=this.w,{realIndex:h,j:d}=t,b=this.preventBarOverflow(n+s/this.invertedYRatio),c=this.preventBarOverflow(n+a/this.invertedYRatio),u=this.getRangeValue(h,d),g=Math.abs(c-b),p=this.barHelpers.getBarpaths({barYPosition:o,barHeight:r,x1:b,x2:c,strokeWidth:this.strokeWidth,series:this.seriesRangeEnd,i:h,realIndex:h,j:d,w:l});if(null!=u.start&&null!=u.end){const t=p.drawnBox;this.recordColumnGeometry(h,d,{slotStart:t.y1,slotEnd:t.y2,levelStart:t.x1,levelEnd:t.x2,horizontal:!0})}return l.axisFlags.isXNumeric||(e+=i),{pathTo:p.pathTo,pathFrom:p.pathFrom,barWidth:g,x:u.start<0&&u.end<0?b:c,goalX:this.barHelpers.getGoalValues("x",n,null,h,d,0),y:e}}recordColumnGeometry(t,e,s){const a=this.w.waterfallData&&this.w.waterfallData.geometry;a&&isFinite(s.slotStart)&&isFinite(s.levelEnd)&&(a[t]||(a[t]=[]),a[t][e]=s)}getRangeValue(t,e){const s=this.w;return{start:s.rangeData.seriesRangeStart[t][e],end:s.rangeData.seriesRangeEnd[t][e]}}}}),Object.defineProperty(exports,"default",{enumerable:!0,get:()=>d.default});
|
package/dist/dumbbell.esm.js
CHANGED
|
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
|
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
20
|
/*!
|
|
21
|
-
* ApexCharts v7.
|
|
21
|
+
* ApexCharts v7.4.0
|
|
22
22
|
* (c) 2018-2026 ApexCharts
|
|
23
23
|
*/
|
|
24
24
|
import * as _core from "apexcharts/core";
|
|
@@ -1468,6 +1468,14 @@ class Helpers {
|
|
|
1468
1468
|
* second at the top, and nothing else touched. Stacked totals already resolve
|
|
1469
1469
|
* per group (see drawsStackedTotal, #4173); corners never got the same fix.
|
|
1470
1470
|
*
|
|
1471
|
+
* plotOptions.bar.borderRadiusWhenStacked picks which ends round: 'all'
|
|
1472
|
+
* caps both the baseline and the far end, 'last' only the far end (#4845).
|
|
1473
|
+
*
|
|
1474
|
+
* A single-data-point chart used to hand its baseline segment 'top' (and a
|
|
1475
|
+
* solo segment 'top' instead of 'both'), which on a horizontal stack rounded
|
|
1476
|
+
* the first segment on its INNER edge and left a pill in the middle of the
|
|
1477
|
+
* bar (#4845). One data point is resolved like any other now.
|
|
1478
|
+
*
|
|
1471
1479
|
* @param {any[]} series
|
|
1472
1480
|
* @returns {string[][]}
|
|
1473
1481
|
*/
|
|
@@ -1482,9 +1490,11 @@ class Helpers {
|
|
|
1482
1490
|
() => Array(numColumns).fill(alwaysApplyRadius ? "top" : "none")
|
|
1483
1491
|
);
|
|
1484
1492
|
if (alwaysApplyRadius) return output;
|
|
1485
|
-
const
|
|
1486
|
-
const
|
|
1487
|
-
const
|
|
1493
|
+
const lastOnly = w.config.plotOptions.bar.borderRadiusWhenStacked === "last";
|
|
1494
|
+
const soloPositive = lastOnly ? "top" : "both";
|
|
1495
|
+
const soloNegative = lastOnly ? "bottom" : "both";
|
|
1496
|
+
const positiveBase = lastOnly ? "none" : "bottom";
|
|
1497
|
+
const negativeBase = lastOnly ? "none" : "top";
|
|
1488
1498
|
for (const stack of this.getStackedSeriesIndices(numSeries)) {
|
|
1489
1499
|
for (let j = 0; j < numColumns; j++) {
|
|
1490
1500
|
const positiveIndices = [];
|
|
@@ -1496,22 +1506,22 @@ class Helpers {
|
|
|
1496
1506
|
}
|
|
1497
1507
|
if (positiveIndices.length > 0 && negativeIndices.length === 0) {
|
|
1498
1508
|
if (positiveIndices.length === 1) {
|
|
1499
|
-
output[positiveIndices[0]][j] =
|
|
1509
|
+
output[positiveIndices[0]][j] = soloPositive;
|
|
1500
1510
|
} else {
|
|
1501
1511
|
const first = positiveIndices[0];
|
|
1502
1512
|
const last = positiveIndices[positiveIndices.length - 1];
|
|
1503
1513
|
for (const i of positiveIndices) {
|
|
1504
|
-
output[i][j] = i === first ?
|
|
1514
|
+
output[i][j] = i === first ? positiveBase : i === last ? "top" : "none";
|
|
1505
1515
|
}
|
|
1506
1516
|
}
|
|
1507
1517
|
} else if (negativeIndices.length > 0 && positiveIndices.length === 0) {
|
|
1508
1518
|
if (negativeIndices.length === 1) {
|
|
1509
|
-
output[negativeIndices[0]][j] =
|
|
1519
|
+
output[negativeIndices[0]][j] = soloNegative;
|
|
1510
1520
|
} else {
|
|
1511
|
-
const
|
|
1512
|
-
const
|
|
1521
|
+
const nearest = Math.min(...negativeIndices);
|
|
1522
|
+
const farthest = Math.max(...negativeIndices);
|
|
1513
1523
|
for (const i of negativeIndices) {
|
|
1514
|
-
output[i][j] = i ===
|
|
1524
|
+
output[i][j] = i === nearest ? negativeBase : i === farthest ? "bottom" : "none";
|
|
1515
1525
|
}
|
|
1516
1526
|
}
|
|
1517
1527
|
} else if (positiveIndices.length > 0 && negativeIndices.length > 0) {
|