apexcharts 6.3.0 → 6.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.
Files changed (106) hide show
  1. package/dist/apexcharts.common.js +2 -2
  2. package/dist/apexcharts.esm.js +769 -117
  3. package/dist/apexcharts.js +769 -117
  4. package/dist/apexcharts.min.js +2 -2
  5. package/dist/apexcharts.ssr.common.js +2 -2
  6. package/dist/apexcharts.ssr.esm.js +769 -117
  7. package/dist/area.common.js +2 -2
  8. package/dist/area.esm.js +3 -3
  9. package/dist/bar.common.js +2 -2
  10. package/dist/bar.esm.js +208 -109
  11. package/dist/boxPlot.common.js +2 -2
  12. package/dist/boxPlot.esm.js +208 -109
  13. package/dist/bubble.common.js +2 -2
  14. package/dist/bubble.esm.js +3 -3
  15. package/dist/candlestick.common.js +2 -2
  16. package/dist/candlestick.esm.js +208 -109
  17. package/dist/column.common.js +2 -2
  18. package/dist/column.esm.js +208 -109
  19. package/dist/core.common.js +2 -2
  20. package/dist/core.esm.js +372 -62
  21. package/dist/donut.common.js +1 -1
  22. package/dist/donut.esm.js +1 -1
  23. package/dist/features/all.common.js +2 -2
  24. package/dist/features/all.esm.js +282 -9
  25. package/dist/features/annotations.common.js +1 -1
  26. package/dist/features/annotations.esm.js +1 -1
  27. package/dist/features/context-menu.common.js +1 -1
  28. package/dist/features/context-menu.esm.js +1 -1
  29. package/dist/features/drilldown.common.js +1 -1
  30. package/dist/features/drilldown.esm.js +1 -1
  31. package/dist/features/exports.common.js +1 -1
  32. package/dist/features/exports.esm.js +1 -1
  33. package/dist/features/facet.common.js +1 -1
  34. package/dist/features/facet.esm.js +1 -1
  35. package/dist/features/history.common.js +1 -1
  36. package/dist/features/history.esm.js +1 -1
  37. package/dist/features/ink.common.js +1 -1
  38. package/dist/features/ink.esm.js +1 -1
  39. package/dist/features/keyboard.common.js +1 -1
  40. package/dist/features/keyboard.esm.js +1 -1
  41. package/dist/features/legend.common.js +1 -1
  42. package/dist/features/legend.esm.js +1 -1
  43. package/dist/features/link.common.js +1 -1
  44. package/dist/features/link.esm.js +1 -1
  45. package/dist/features/marks.common.js +1 -1
  46. package/dist/features/marks.esm.js +1 -1
  47. package/dist/features/measure.common.js +1 -1
  48. package/dist/features/measure.esm.js +1 -1
  49. package/dist/features/morph.common.js +1 -1
  50. package/dist/features/morph.esm.js +1 -1
  51. package/dist/features/perspectives.common.js +1 -1
  52. package/dist/features/perspectives.esm.js +1 -1
  53. package/dist/features/renderer-canvas.common.js +2 -2
  54. package/dist/features/renderer-canvas.esm.js +280 -7
  55. package/dist/features/storyboard.common.js +1 -1
  56. package/dist/features/storyboard.esm.js +1 -1
  57. package/dist/features/toolbar.common.js +1 -1
  58. package/dist/features/toolbar.esm.js +1 -1
  59. package/dist/features/weave.common.js +1 -1
  60. package/dist/features/weave.esm.js +1 -1
  61. package/dist/heatmap.common.js +2 -2
  62. package/dist/heatmap.esm.js +79 -41
  63. package/dist/line.common.js +2 -2
  64. package/dist/line.esm.js +3 -3
  65. package/dist/pie.common.js +1 -1
  66. package/dist/pie.esm.js +1 -1
  67. package/dist/polarArea.common.js +1 -1
  68. package/dist/polarArea.esm.js +1 -1
  69. package/dist/radar.common.js +1 -1
  70. package/dist/radar.esm.js +1 -1
  71. package/dist/radialBar.common.js +1 -1
  72. package/dist/radialBar.esm.js +1 -1
  73. package/dist/rangeArea.common.js +2 -2
  74. package/dist/rangeArea.esm.js +3 -3
  75. package/dist/rangeBar.common.js +2 -2
  76. package/dist/rangeBar.esm.js +208 -109
  77. package/dist/scatter.common.js +2 -2
  78. package/dist/scatter.esm.js +3 -3
  79. package/dist/treemap.common.js +1 -1
  80. package/dist/treemap.esm.js +1 -1
  81. package/dist/violin.common.js +2 -2
  82. package/dist/violin.esm.js +208 -109
  83. package/package.json +1 -1
  84. package/src/apexcharts.js +7 -0
  85. package/src/charts/Bar.js +38 -6
  86. package/src/charts/HeatMap.js +126 -55
  87. package/src/charts/common/bar/DataLabels.js +16 -0
  88. package/src/modules/Data.js +14 -2
  89. package/src/modules/Filters.js +34 -6
  90. package/src/modules/Graphics.js +4 -4
  91. package/src/modules/Series.js +6 -0
  92. package/src/modules/animations/AxisTransition.js +57 -15
  93. package/src/modules/animations/DataLabelTransition.js +235 -0
  94. package/src/modules/animations/LengthTransition.js +15 -2
  95. package/src/modules/axes/YAxis.js +21 -1
  96. package/src/modules/settings/Defaults.js +12 -1
  97. package/src/modules/settings/Options.js +16 -0
  98. package/src/modules/tooltip/Intersect.js +145 -32
  99. package/src/modules/tooltip/Labels.js +9 -0
  100. package/src/modules/tooltip/Tooltip.js +28 -7
  101. package/src/renderers/Renderer.js +8 -2
  102. package/src/renderers/canvas/CanvasCompositor.js +100 -1
  103. package/src/renderers/canvas/CanvasGraphics.js +184 -0
  104. package/src/renderers/canvas/CanvasRenderer.js +46 -6
  105. package/src/types/internal.d.ts +8 -0
  106. package/types/apexcharts.d.ts +30 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * ApexCharts v6.3.0
2
+ * ApexCharts v6.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"}});const h=require("apexcharts/core");function d(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 c=d(h),b=c.__apex_CoreUtils,g=c.__apex_Graphics,u=c.__apex_DataLabels;class p{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){const{x:e,y:s,y1:a,y2:i,i:r,j:o,realIndex:h,columnGroupIndex:d,series:c,barHeight:b,barWidth:u,barXPosition:p,barYPosition:x,visibleSeries:f}=t,m=this.w,y=new g(this.barCtx.w),v=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[h]:this.barCtx.strokeWidth;let C,w;m.axisFlags.isXNumeric&&!m.globals.isBarHorizontal?(C=e+u*(f+1),w=s+b*(f+1)-v):(C=e+u*f,w=s+b*f);let P=null,I=null,L=e,W=s,k={};const H=m.config.dataLabels,D=this.barCtx.barOptions.dataLabels,A=this.barCtx.barOptions.dataLabels.total;void 0!==x&&(this.barCtx.isRangeBar||this.barCtx.isPyramid)&&(w=x,W=x),void 0!==p&&this.barCtx.isVerticalGroupedRangeBar&&(C=p,L=p);const R=H.offsetX,S=H.offsetY;let F={width:0,height:0};if(m.config.dataLabels.enabled){const t=m.seriesData.series[r][o];F=y.getTextRects(m.config.dataLabels.formatter?m.config.dataLabels.formatter(t,l(n({},m),{seriesIndex:r,dataPointIndex:o,w:m})):m.formatters.yLabelFormatters[0](t),parseFloat(H.style.fontSize).toString())}const O={x:e,y:s,i:r,j:o,realIndex:h,columnGroupIndex:d,bcx:C,bcy:w,barHeight:b,barWidth:u,textRects:F,strokeWidth:v,dataLabelsX:L,dataLabelsY:W,dataLabelsConfig:H,barDataLabelsConfig:D,barTotalDataLabelsConfig:A,offX:R,offY:S};return k=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(O):this.calculateColumnsDataLabelsPosition(O),P=this.drawCalculatedDataLabels({x:k.dataLabelsX,y:k.dataLabelsY,val:this.barCtx.isRangeBar?[a,i]:"100%"===m.config.chart.stackType?c[h][o]:m.seriesData.series[h][o],i:h,j:o,barWidth:u,barHeight:b,textRects:F,dataLabelsConfig:H}),m.config.chart.stacked&&A.enabled&&(I=this.drawTotalDataLabels({x:k.totalDataLabelsX,y:k.totalDataLabelsY,barWidth:u,barHeight:b,realIndex:h,textAnchor:k.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:h,j:o}),dataLabelsConfig:H,barTotalDataLabelsConfig:A})),{dataLabelsPos:k,dataLabels:P,totalDataLabels:I}}getStackedTotalDataLabel({realIndex:t,j:e}){const s=this.w;let a=this.barCtx.stackedSeriesTotals[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:c,dataLabelsX:b,dataLabelsY:u,dataLabelsConfig:p,barDataLabelsConfig:x,barTotalDataLabelsConfig:f,strokeWidth:m,offX:y,offY:v}=t;const C=l;d=Math.abs(d);const w="vertical"===e.config.plotOptions.bar.dataLabels.orientation,{zeroEncounters:P}=this.barCtx.barHelpers.getZeroValueEncounters({i:i,j:r});l-=m/2;const I=e.layout.gridWidth/e.globals.dataPoints;if(this.barCtx.isVerticalGroupedRangeBar?b+=h/2:(b=e.axisFlags.isXNumeric?l-h/2+y:l-I+h/2+y,!e.config.chart.stacked&&P>0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(b-=h*P)),w){const t=2;b=b+c.height/2-m/2-t}const L=e.seriesData.series[i][r]<0;let W=n;switch(this.barCtx.isReversed&&(W=n+(L?d:-d)),x.position){case"center":u=w?L?W-d/2+v:W+d/2-v:L?W-d/2+c.height/2+v:W+d/2+c.height/2-v;break;case"bottom":u=w?L?W-d+v:W+d-v:L?W-d+c.height+m+v:W+d-c.height/2+m-v;break;case"top":u=w?L?W+v:W-v:L?W-c.height/2-v:W+c.height+v}let k=W;if(e.labelData.seriesGroups.forEach(t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevY.forEach(t=>{k=L?Math.max(t[r],k):Math.min(t[r],k)})}),this.barCtx.lastActiveBarSerieIndex===o&&f.enabled){const t=18,i=new g(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:r}),p.fontSize);s=L?k-i.height/2-v-f.offsetY+t:k+i.height+v+f.offsetY-t;const n=I;a=C+(e.axisFlags.isXNumeric?-h*e.globals.barGroups.length/2:e.globals.barGroups.length*h/2-(e.globals.barGroups.length-1)*h-n)+f.offsetX}return e.config.chart.stacked||(u<0?u=0+m:u+c.height/3>e.layout.gridHeight&&(u=e.layout.gridHeight-m)),{bcx:l,bcy:n,dataLabelsX:b,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:c,strokeWidth:b,dataLabelsConfig:u,barDataLabelsConfig:p,barTotalDataLabelsConfig:x,offX:f,offY:m}=t;const y=s.layout.gridHeight/s.globals.dataPoints,{zeroEncounters:v}=this.barCtx.barHelpers.getZeroValueEncounters({i:i,j:r});let C,w,P;if(h=Math.abs(h),this.barCtx.isPyramid){C=n+l/2+m-(null!=(e=d.centerOffset)?e:0)}else C=n-(this.barCtx.isRangeBar?0:y)+l/2+d.height/2+m-3;!s.config.chart.stacked&&v>0&&s.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(C-=l*v);let I="start";const L=s.seriesData.series[i][r]<0;let W=a;if(this.barCtx.isReversed&&(W=a+(L?-h:h),I=L?"start":"end"),this.barCtx.isPyramid)c=s.layout.gridWidth/2+f;else switch(p.position){case"center":c=L?W+h/2-f:Math.max(d.width/2,W-h/2)+f;break;case"bottom":c=L?W+h-b-f:W-h+b+f;break;case"top":c=L?W-b-f:W-b+f}let k=W;if(s.labelData.seriesGroups.forEach(t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevX.forEach(t=>{k=L?Math.min(t[r],k):Math.max(t[r],k)})}),this.barCtx.lastActiveBarSerieIndex===o&&x.enabled){const t=new g(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:r}),u.fontSize);L?(w=k-b-f-x.offsetX,I="end"):w=k+f+x.offsetX+(this.barCtx.isReversed?-(h+b):b),P=C-d.height/2+t.height/2+x.offsetY+b,s.globals.barGroups.length>1&&(P-=s.globals.barGroups.length/2*(l/2))}return s.config.chart.stacked||("start"===u.textAnchor?c-d.width<0?c=L?d.width+b:b:c+d.width>s.layout.gridWidth&&(c=L?s.layout.gridWidth-b:s.layout.gridWidth-d.width-b):"middle"===u.textAnchor?c-d.width/2<0?c=d.width/2+b:c+d.width/2>s.layout.gridWidth&&(c=s.layout.gridWidth-d.width/2-b):"end"===u.textAnchor&&(c<1?c=d.width+b:c+1>s.layout.gridWidth&&(c=s.layout.gridWidth-d.width-b))),{bcx:a,bcy:n,dataLabelsX:c,dataLabelsY:C,totalDataLabelsX:w,totalDataLabelsY:P,totalDataLabelsAnchor:I}}drawCalculatedDataLabels({x:t,y:e,val:s,i:a,j:i,textRects:r,barHeight:o,barWidth:h,dataLabelsConfig:d}){const c=this.w;let b="rotate(0)";"vertical"===c.config.plotOptions.bar.dataLabels.orientation&&(b=`rotate(-90, ${t}, ${e})`);const p=new u(this.barCtx.w,this.barCtx.ctx),x=new g(this.barCtx.w),f=d.formatter;let m=null;const y=c.globals.collapsedSeriesIndices.indexOf(a)>-1;if(d.enabled&&!y){m=x.group({class:"apexcharts-data-labels",transform:b});let g="";void 0!==s&&(g=f(s,l(n({},c),{seriesIndex:a,dataPointIndex:i,w:c}))),!s&&c.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(g="");const u=c.seriesData.series[a][i]<0,y=c.config.plotOptions.bar.dataLabels.position;if("vertical"===c.config.plotOptions.bar.dataLabels.orientation&&("top"===y&&(d.textAnchor=u?"end":"start"),"center"===y&&(d.textAnchor="middle"),"bottom"===y&&(d.textAnchor=u?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels){h<x.getTextRects(g,parseFloat(d.style.fontSize).toString()).width&&(g="")}c.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?r.width/1.6>Math.abs(h)&&(g=""):r.height/1.6>Math.abs(o)&&(g=""));const v=n({},d);this.barCtx.isHorizontal&&s<0&&("start"===d.textAnchor?v.textAnchor="end":"end"===d.textAnchor&&(v.textAnchor="start")),p.plotDataLabelsText({x:t,y:e,text:g,i:a,j:i,parent:m,dataLabelsConfig:v,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return m}drawTotalDataLabels({x:t,y:e,val:s,realIndex:a,textAnchor:i,barTotalDataLabelsConfig:r}){const o=new g(this.barCtx.w);let n;return r.enabled&&void 0!==t&&void 0!==e&&this.barCtx.lastActiveBarSerieIndex===a&&(n=o.drawText({x:t,y:e,foreColor:r.style.color,text:s,textAnchor:i,fontFamily:r.style.fontFamily,fontSize:r.style.fontSize,fontWeight:r.style.fontWeight})),n}}const x=c.__apex_Series,f=c.__apex_Fill,m=c.__apex_Utils;class y{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),m.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map(t=>t.map(t=>"none"))),0===this.barCtx.seriesLen&&(this.barCtx.seriesLen=1),this.barCtx.zeroSerieses=[],e.globals.comboCharts||this.checkZeroSeries({series:t})}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&&(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.globals.minXDiff&&.5!==e.globals.minXDiff&&e.globals.minXDiff/t>0&&(r=e.globals.minXDiff/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+m.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,r,o,n;const l=this.w,h=new f(this.barCtx.w);let d=null;const c=this.barCtx.barOptions.distributed?s:e;let b=!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&&(d=a.color,b=!0)})}return{color:h.fillPath({seriesNumber:this.barCtx.barOptions.distributed?c:a,dataPointIndex:s,color:d,value:t[e][s],fillConfig:null==(i=l.config.series[e].data[s])?void 0:i.fill,fillType:(null==(o=null==(r=l.config.series[e].data[s])?void 0:r.fill)?void 0:o.type)?null==(n=l.config.series[e].data[s])?void 0:n.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[a]:l.config.fill.type}),useRangeColor:b}}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}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=this.w.config.chart.type;for(let e=0;e<r;e++){const s=[],a=[];let l=0;for(let r=0;r<i;r++){const i=t[r][e];i>0?(s.push(r),l++):i<0&&(a.push(r),l++)}if(s.length>0&&0===a.length)if(1===s.length)o[s[0]][e]="bar"===n&&1===r?"top":"both";else{const t=s[0],a=s[s.length-1];for(const i of s)o[i][e]=i===t?"bar"===n&&1===r?"top":"bottom":i===a?"top":"none"}else if(a.length>0&&0===s.length)if(1===a.length)o[a[0]][e]="both";else{const t=Math.max(...a),s=Math.min(...a);for(const i of a)o[i][e]=i===t?"bottom":i===s?"top":"none"}else if(s.length>0&&a.length>0){const t=s[s.length-1];for(const a of s)o[a][e]=a===t?"top":"none";const i=Math.max(...a);for(const t of a)o[t][e]=t===i?"bottom":"none"}else if(1===l){o[s[0]||a[0]][e]="both"}}return o}barBackground({j:t,i:e,x1:s,x2:a,y1:i,y2:r,elSeries:o}){const n=this.w,l=new g(this.barCtx.w),h=new x(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:c}){var b,u,p;const x=new g(this.barCtx.w);(i=Array.isArray(i)?i[l]:i)||(i=0);let f=t,m=e;(null==(b=c.config.series[l].data[d])?void 0:b.columnWidthOffset)&&(m=e-c.config.series[l].data[d].columnWidthOffset/2,f=t+c.config.series[l].data[d].columnWidthOffset);const y=i/2,v=m+y,C=m+f-y,w=(o[h][d]>=0?1:-1)*(r?-1:1);s+=.001-y*w,a+=.001+y*w;const P=x.line(C,s),I="around"===c.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][d]?" Z":" z";let L=x.move(v,s)+x.line(v,a)+x.line(C,a)+P+I;"none"!==this.arrBorderRadius[l][d]&&(L=x.roundPathCorners(L,c.config.plotOptions.bar.borderRadius));let W=null;const k=null==(p=null==(u=this.barCtx.ctx)?void 0:u.morphTypeChange)?void 0:p.getInitialPathFor(l,d);if(k?W=k:c.globals.previousPaths.length>0&&(W=this.barCtx.getPreviousPath(l,d,L)),null==W&&(W=x.move(v,s)+x.line(v,s)+P+P+P+P+P+x.line(v,s)+I),c.config.chart.stacked){let t=this.barCtx;t=this.barCtx[n],t.yArrj.push(a-y*w),t.yArrjF.push(Math.abs(s-a+i*w)),t.yArrjVal.push(this.barCtx.series[h][d])}return{pathTo:L,pathFrom:W}}getFunnelTrapezoidPaths({barYPosition:t,barHeight:e,series:s,i:a,j:i,realIndex:r,strokeWidth:o,w:n}){var l,h;const d=new g(this.barCtx.w),c=n.layout.gridWidth/2,b=t=>Math.abs(t/this.barCtx.invertedYRatio)/2,u=b(s[a][i]),p=i===s[a].length-1,x="taper"===n.config.plotOptions.funnel.lastShape?"taper":"flat";let f;f=p?"taper"===x?0:u:b(s[a][i+1]);const m=o/2,y=t+m,v=t+e-m,C=c-u,w=c+u,P=c-f,I=c+f,L=d.move(C,y)+d.line(w,y)+d.line(I,v)+d.line(P,v)+" Z";let W=null;const k=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(r,i);return k?W=k:n.globals.previousPaths.length>0&&(W=this.barCtx.getPreviousPath(r,i,L)),null==W&&(W=d.move(c,y)+d.line(c,y)+d.line(c,v)+d.line(c,v)+" Z"),{pathTo:L,pathFrom:W,x:w,x1:C,barXPosition:c}}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 g(this.barCtx.w),c=n.layout.gridWidth/2,b=o/2,u=t+b,p=t+e-b,x=c-s,f=c+s,m=c-a,y=c+a,v=d.move(x,u)+d.line(f,u)+d.line(y,p)+d.line(m,p)+" 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,v)),null==C&&(C=d.move(c,u)+d.line(c,u)+d.line(c,p)+d.line(c,p)+" Z"),{pathTo:v,pathFrom:C,x:f,x1:x,barXPosition:c}}getBarpaths({barYPosition:t,barHeight:e,x1:s,x2:a,strokeWidth:i,isReversed:r,series:o,seriesGroup:n,realIndex:l,i:h,j:d,w:c}){var b,u,p;const x=new g(this.barCtx.w);(i=Array.isArray(i)?i[l]:i)||(i=0);let f=t,m=e;(null==(b=c.config.series[l].data[d])?void 0:b.barHeightOffset)&&(f=t-c.config.series[l].data[d].barHeightOffset/2,m=e+c.config.series[l].data[d].barHeightOffset);const y=i/2,v=f+y,C=f+m-y,w=(o[h][d]>=0?1:-1)*(r?-1:1);s+=.001+y*w,a+=.001-y*w;const P=this.barCtx.isFunnel,I=P?(s+a)/2:s,L=x.line(s,C),W="around"===c.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][d]?" Z":" z";let k=x.move(s,v)+x.line(a,v)+x.line(a,C)+L+W;"none"!==this.arrBorderRadius[l][d]&&(k=x.roundPathCorners(k,c.config.plotOptions.bar.borderRadius));let H=null;const D=null==(p=null==(u=this.barCtx.ctx)?void 0:u.morphTypeChange)?void 0:p.getInitialPathFor(l,d);if(D?H=D:c.globals.previousPaths.length>0&&(H=this.barCtx.getPreviousPath(l,d,k)),null==H){const t=P?x.line(I,C):L;H=x.move(I,v)+x.line(I,v)+t+t+t+t+t+x.line(I,v)+W}if(c.config.chart.stacked){let t=this.barCtx;t=this.barCtx[n],t.xArrj.push(a+y*w),t.xArrjF.push(Math.abs(s-a-i*w)),t.xArrjVal.push(this.barCtx.series[h][d])}return{pathTo:k,pathFrom:H}}checkZeroSeries({series:t}){const e=this.w;for(let s=0;s<t.length;s++){let a=0;for(let i=0;i<t[e.globals.maxValsInArrayIndex].length;i++)a+=t[s][i];0===a&&this.barCtx.zeroSerieses.push(s)}}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&&o.rangeData.seriesRange.length){const e=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:o.globals.colors,s={strokeHeight:"x"===t?0:o.globals.markers.size[a],strokeWidth:"x"===t?o.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(e[a])?e[a][0]:e[a]};d(o.rangeData.seriesRangeStart[a][i],s),d(o.rangeData.seriesRangeEnd[a][i],l(n({},s),{strokeColor:Array.isArray(e[a])?e[a][1]:e[a]}))}return h}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 g(this.barCtx.w),n=o.group({className:"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)}}):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)}}),n}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,b=l+e.barHeight,u=new g(this.barCtx.w),p=new m,x=u.move(n,b)+u.line(o,b)+u.line(h,c)+u.line(d,c)+u.line(n,b)+("around"===r.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[a][i]?" Z":" z");return u.drawPath({d:x,fill:p.shadeColor(.5,m.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}}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 v=c.__apex_Filters,C=c.__apex_Animations_computeStagger,w=c.__apex_BrowserAPIs_BrowserAPIs,P=c.__apex_Environment_Environment;function I(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)&&!!(P.isBrowser()&&t.globals.dataChanged&&t.globals.shouldAnimate)}function L(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 W({w:t,elSeries:e,record:s,newKeys:a,isHorizontal:i,speed:r}){var o;if(!I(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 g(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 c=i?"left center":"center bottom";try{const t=n.getBBox();l&&t&&(c=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 b=n.style;b.transformBox="fill-box",b.transformOrigin=c;const g=Math.max(1,r||1),u=performance.now(),p=e=>{if(t.globals.isDestroyed||!n.parentNode)return;const s=Math.max(0,Math.min(1,(e-u)/g)),a=1-Math.pow(1-s,3),r=1-a;b.transform=i?`scaleX(${r})`:`scaleY(${r})`,b.opacity=String(1-a),s<1?w.requestAnimationFrame(p):n.parentNode.removeChild(n)};w.requestAnimationFrame(p)})}class k{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.series=[],this.elSeries=null,this.visibleI=0,this.isReversed=!1;const a=new x(this.w);this.lastActiveBarSerieIndex=a.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];const i=a.getBarSeriesIndices(),r=new b(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 y(this)}draw(t,e){var s,a;const i=this.w,r=new g(this.w),o=new b(this.w);t=o.getLogSeries(t),this.series=t,this.yRatio=o.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const h=r.group({class:"apexcharts-bar-series apexcharts-plot-series"});i.config.dataLabels.enabled&&(this.totalItems,this.barOptions.dataLabels.maxItems);for(let o=0,d=0;o<t.length;o++,d++){let c,b;const g=[],u=[],p=i.globals.comboCharts?e[o]:o,{columnGroupIndex:f}=this.barHelpers.getGroupIndex(p),y=r.group({class:"apexcharts-series",rel:o+1,seriesName:m.escapeString(i.seriesData.seriesNames[p]),"data:realIndex":p});x.addCollapsedClassToSeries(this.w,y,p),t[o].length>0&&(this.visibleI=this.visibleI+1),this.yRatio.length>1&&(this.yaxisIndex=i.globals.seriesYAxisReverseMap[p],this.translationsIndex=p);const C=this.translationsIndex;this.isReversed=i.config.yaxis[this.yaxisIndex]&&i.config.yaxis[this.yaxisIndex].reversed,this.isPyramid&&(this.pyramidLayout=this.barHelpers.computePyramidLayout(t[o]));const w=this.barHelpers.initialPositions(p),{y:P,yDivision:I,zeroW:k,x:H,xDivision:D,zeroH:A}=w;let R=w.barHeight,S=w.barWidth;b=P,c=H,this.isHorizontal||u.push(c+(null!=S?S:0)/2);const F=r.group({class:"apexcharts-datalabels","data:realIndex":p});i.globals.delayedElements.push({el:F.node,holdUntilComplete:this.isLengthTransition(p)}),F.node.classList.add("apexcharts-element-hidden");const O=r.group({class:"apexcharts-bar-goals-markers"}),X=r.group({class:"apexcharts-bar-shadows"});i.globals.delayedElements.push({el:X.node}),X.node.classList.add("apexcharts-element-hidden");for(let e=0;e<t[o].length;e++){const r=this.barHelpers.getStrokeWidth(o,e,p);let h=null;const x={indexes:{i:o,j:e,realIndex:p,translationsIndex:C,bc:d},x:c,y:b,strokeWidth:r,elSeries:y};this.isHorizontal?(h=this.drawBarPaths(l(n({},x),{barHeight:R,zeroW:k,yDivision:I})),S=this.series[o][e]/this.invertedYRatio):(h=this.drawColumnPaths(l(n({},x),{xDivision:D,barWidth:S,zeroH:A})),R=this.series[o][e]/this.yRatio[C]);const w=this.barHelpers.getPathFillColor(t,o,e,p);if(this.isFunnel&&!this.isPyramid&&this.barOptions.isFunnel3d&&"trapezoid"!==(null==(s=i.config.plotOptions.funnel)?void 0:s.shape)&&this.pathArr.length&&e>0){const t=this.barHelpers.drawBarShadow({color:"string"==typeof w.color&&-1===(null==(a=w.color)?void 0:a.indexOf("url"))?w.color:m.hexToRgba(i.globals.colors[o]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:h,realIndex:p,j:e});if(X.add(t),i.config.chart.dropShadow.enabled){new v(this.w).dropShadow(t,i.config.chart.dropShadow,p)}}this.pathArr.push(h);const P=this.barHelpers.drawGoalLine({barXPosition:h.barXPosition,barYPosition:h.barYPosition,goalX:h.goalX,goalY:h.goalY,barHeight:R,barWidth:S});P&&O.add(P),b=h.y,c=h.x,e>0&&u.push(c+(null!=S?S:0)/2),g.push(b),this.renderSeries(l(n({realIndex:p,pathFill:w.color},w.useRangeColor?{lineFill:w.color}:{}),{j:e,i:o,columnGroupIndex:f,pathFrom:h.pathFrom,pathTo:h.pathTo,strokeWidth:r,elSeries:y,x:c,y:b,series:t,barHeight:Math.abs(h.barHeight?h.barHeight:R),barWidth:Math.abs(h.barWidth?h.barWidth:S),elDataLabelsWrap:F,elGoalsMarkers:O,elBarShadows:X,visibleSeries:this.visibleI,type:"bar"}))}if(i.globals.seriesXvalues[p]=u,i.globals.seriesYvalues[p]=g,i.globals.previousPaths.length>0){const e=[];for(let s=0;s<t[o].length;s++)e.push(L(i,p,s));W({w:i,elSeries:y,record:this._prevRecord(p),newKeys:e,isHorizontal:this.isHorizontal,speed:i.config.chart.animations.dynamicAnimation.speed})}h.add(y)}return h}renderSeries({realIndex:t,pathFill:e,lineFill:s,j:a,i:i,columnGroupIndex:r,pathFrom:o,pathTo:n,strokeWidth:l,elSeries:h,x:d,y:c,y1:b,y2:u,series:x,barHeight:f,barWidth:m,barXPosition:y,barYPosition:w,elDataLabelsWrap:P,elGoalsMarkers:I,elBarShadows:W,visibleSeries:k,type:H,classes:D}){var A;const R=this.w,S=new g(this.w,this.ctx),F=function(t,e){const s=t&&t.renderer;return s&&s.kind&&"svg"!==s.kind?s:e}(this.ctx,S);let O=!1;if(h._bindingsDelegated||(h._bindingsDelegated=!0,S.setupEventDelegation(h,`.apexcharts-${H}-area`)),!s){let e=function(t){const e=R.config.stroke.colors;let s;return Array.isArray(e)&&e.length>0&&(s=e[t],s||(s=""),"function"==typeof s)?s({value:R.seriesData.series[t][a],dataPointIndex:a,w:R}):s};const i="function"==typeof R.globals.stroke.colors[t]?e(t):R.globals.stroke.colors[t];s=this.barOptions.distributed?R.globals.stroke.colors[a]:i}const X=new p(this).handleBarDataLabels({x:d,y:c,y1:b,y2:u,i:i,j:a,series:x,realIndex:t,columnGroupIndex:r,barHeight:f,barWidth:m,barXPosition:y,barYPosition:w,visibleSeries:k});R.globals.isBarHorizontal||(X.dataLabelsPos.dataLabelsX+Math.max(m,R.globals.barPadForNumericAxis)<0||X.dataLabelsPos.dataLabelsX-Math.max(m,R.globals.barPadForNumericAxis)>R.layout.gridWidth)&&(O=!0),R.config.series[i].data[a]&&R.config.series[i].data[a].strokeColor&&(s=R.config.series[i].data[a].strokeColor),this.isNullValue&&(e="none");const j=R.config.chart.animations,B=j.animateGradually;let z=0;if(B&&!1!==B.enabled&&!(R.globals.dataChanged&&this.isLengthTransition(t))){const t=R.globals.dataPoints||1,e=B.delay||0,s=Math.min(e,.5*j.speed/Math.max(1,t));let r=C({style:"sequential",index:a,baseDelay:s});R.config.chart.stacked&&(r+=i*s*.5);z=r/(e||1)}if(!O){const r=!0===(null==(A=this.ctx.morphTypeChange)?void 0:A.isActive())?this.ctx.morphTypeChange.getSpeed():R.config.chart.animations.dynamicAnimation.speed,d=F.renderPaths({i:i,j:a,realIndex:t,pathFrom:o,pathTo:n,stroke:s,strokeWidth:l,strokeLineCap:R.config.stroke.lineCap,fill:e,animationDelay:z,initialSpeed:R.config.chart.animations.speed,dataChangeSpeed:r,className:`apexcharts-${H}-area ${D}`,chartType:H,bindEventsOnPaths:!1});d.attr("clip-path",`url(#gridRectBarMask${R.globals.cuid})`);const c=R.config.forecastDataPoints;c.count>0&&a>=R.globals.dataPoints-c.count&&(d.node.setAttribute("stroke-dasharray",c.dashArray),d.node.setAttribute("stroke-width",c.strokeWidth),d.node.setAttribute("fill-opacity",c.fillOpacity)),void 0!==b&&void 0!==u&&(d.attr("data-range-y1",b),d.attr("data-range-y2",u));new v(this.w).setSelectionFilter(d,t,a),h.add(d),d.attr({cy:X.dataLabelsPos.bcy,cx:X.dataLabelsPos.bcx,j:a,val:R.seriesData.series[i][a],barHeight:f,barWidth:m,"data:pathKey":L(R,t,a)}),"canvas"===F.kind&&(R.globals.barCanvasCoords||(R.globals.barCanvasCoords={}),R.globals.barCanvasCoords[t]||(R.globals.barCanvasCoords[t]={}),R.globals.barCanvasCoords[t][a]={cx:X.dataLabelsPos.bcx,cy:X.dataLabelsPos.bcy,barWidth:m}),null!==X.dataLabels&&P.add(X.dataLabels),X.totalDataLabels&&P.add(X.totalDataLabels),h.add(P),I&&h.add(I),W&&h.add(W)}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 c;if(l.axisFlags.isXNumeric)c=(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),c=r+e*this.visibleI,c-=e*s}else c=r+e*this.visibleI;const b=this.isFunnel&&"trapezoid"===l.config.plotOptions.funnel.shape,g=this.isPyramid&&this.pyramidLayout?this.pyramidLayout[d]:null,u=!!g;if(g)c=g.y,e=g.height;else if(this.isFunnel&&!b){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=g?this.barHelpers.getPyramidPaths({barYPosition:c,barHeight:e,topHalf:g.topHalf,bottomHalf:g.bottomHalf,realIndex:t.realIndex,j:d,strokeWidth:s,w:l}):b?this.barHelpers.getFunnelTrapezoidPaths({barYPosition:c,barHeight:e,series:this.series,i:h,j:d,realIndex:t.realIndex,strokeWidth:s,w:l}):this.barHelpers.getBarpaths({barYPosition:c,barHeight:e,x1:a,x2:i,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,i:h,j:d,w:l}),(b||u)&&(a=p.x1,i=p.x),l.axisFlags.isXNumeric||u||(r+=o),u&&(r=c),this.barHelpers.barBackground({j:d,i:h,y1:c-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,h,d,0),barYPosition:c,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,c=t.i,b=t.j,g=t.bc;let u;if(l.axisFlags.isXNumeric){const t=this.getBarXForNumericXAxis({x:e,j:b,realIndex:h,barWidth:i});e=t.x,u=t.barXPosition}else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:t,zeroEncounters:s}=this.barHelpers.getZeroValueEncounters({i:c,j:b});t>0&&(i=this.seriesLen*i/t),u=e+i*this.visibleI,u-=i*s}else u=e+i*this.visibleI;s=this.barHelpers.getYForValue(this.series[c][b],r,d);const p=this.barHelpers.getColumnPaths({barXPosition:u,barWidth:i,y1:r,y2:s,strokeWidth:o,isReversed:this.isReversed,series:this.series,realIndex:h,i:c,j:b,w:l});return l.axisFlags.isXNumeric||(e+=a),this.barHelpers.barBackground({bc:g,j:b,i:c,x1:u-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,c,b,d),barXPosition:u,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),m.isNumber(i.seriesData.seriesX[r][a])&&(t=(i.seriesData.seriesX[r][a]-i.globals.minX)/this.xRatio-e*this.seriesLen/2),{barXPosition:t+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(I(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(L(a,t,s))){i=!0;break}}else i=o>0}return this._ltCache[t]=i,i}getPreviousPath(t,e,s){const a=this.w,i=this._prevRecord(t);if(!i)return I(a)?null:s;let r=null,o=!1;const n=this._prevKeyedPaths(t);if(n){const s=n.get(L(a,t,e));s?r=s.d:o=!0}else void 0!==i.paths[e]?r=i.paths[e].d:o=!0;return r&&k.pathCommandCount(r)===k.pathCommandCount(s)?r:o&&I(a)?null:s}static pathCommandCount(t){if(!t)return 0;const e=t.match(/[A-Za-z]/g);return e?e.length:0}}const H=t=>{const e=function(t){const e=[];let s=t[0],a=t[1],i=e[0]=A(s,a),r=1;for(let o=t.length-1;r<o;r++)s=a,a=t[r+1],e[r]=.5*(i+(i=A(s,a)));return e[r]=i,e}(t),s=t.length-1,a=[];let i,r,o,n;for(let a=0;a<s;a++)o=A(t[a],t[a+1]),Math.abs(o)<1e-6?e[a]=e[a+1]=0:(i=e[a]/o,r=e[a+1]/o,n=i*i+r*r,n>9&&(n=3*o/Math.sqrt(n),e[a]=n*i,e[a+1]=n*r));for(let i=0;i<=s;i++)n=(t[Math.min(s,i+1)][0]-t[Math.max(0,i-1)][0])/(6*(1+e[i]*e[i])),a.push([n||0,e[i]*n||0]);return a},D={points(t){const e=H(t),s=t[1],a=t[0],i=[],r=e[1],o=e[0];i.push(a,[a[0]+o[0],a[1]+o[1],s[0]-r[0],s[1]-r[1],s[0],s[1]]);for(let s=2,a=e.length;s<a;s++){const a=t[s],r=e[s];i.push([a[0]-r[0],a[1]-r[1],a[0],a[1]])}return i},slice(t,e,s){const a=t.slice(e,s);if(e){if(s-e>1&&a[1].length<6){const t=a[0].length;a[1]=[2*a[0][t-2]-a[0][t-4],2*a[0][t-1]-a[0][t-3]].concat(a[1])}a[0]=a[0].slice(-2)}return a}};function A(t,e){return(e[1]-t[1])/(e[0]-t[0])}function R({graphics:t,w:e,elSeries:s,pointsByCat:a,options:i,distributed:r,realIndex:o,wrapClass:n,pointClass:l}){if(!i||!1===i.show||!a.length)return;const h=null!=i.opacity?i.opacity:.9,d=null!=i.strokeColor?i.strokeColor:"#fff",c=null!=i.strokeWidth?i.strokeWidth:1,b=e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged,g=t.group({class:b?`${n} apexcharts-element-hidden`:n});b&&e.globals.delayedElements.push({el:g.node}),a.forEach(({groups:s,j:a})=>{const n=r?e.globals.colors[a]:e.globals.colors[o],b=i.fillColor,u="series"===b?n:"series-dark"===b?S(n,.45):b||S(n,.45);s.forEach(s=>{const i=t.drawPath({d:s.d,fill:null!=s.fill?s.fill:u,stroke:c>0?d:"none",strokeWidth:c,fillOpacity:h,classes:l});i.attr("data:realIndex",o),i.attr("j",a),i.attr("clip-path",`url(#gridRectBarMask${e.globals.cuid})`),i.node.style.pointerEvents="none",g.add(i)})}),s.add(g)}function S(t,e){const s=m.parseHex(t);if(!s)return t;const a=Math.max(0,1-e);return`rgb(${Math.round(s[0]*a)},${Math.round(s[1]*a)},${Math.round(s[2]*a)})`}function F(t,e){if(!t.length)return"#000";if(1===t.length)return t[0];const s=Math.max(0,Math.min(1,e))*(t.length-1),a=Math.floor(s),i=s-a,r=m.parseHex(t[a])||[0,0,0],o=m.parseHex(t[Math.min(a+1,t.length-1)])||r,n=(t,e)=>Math.round(t+(e-t)*i);return`rgb(${n(r[0],o[0])},${n(r[1],o[1])},${n(r[2],o[2])})`}function O(t){let e=(2654435769^t)>>>0;return e=Math.imul(e^e>>>16,73244475),e=Math.imul(e^e>>>16,73244475),((e^e>>>16)>>>0)/4294967296}function X(t,e,s){return`M ${t-s} ${e} a ${s} ${s} 0 1 0 ${2*s} 0 a ${s} ${s} 0 1 0 ${-2*s} 0 `}function j(t,e,s){return`M ${t-s} ${e-s} h ${2*s} v ${2*s} h ${-2*s} z `}function B(t){const e=[];for(let s=0;s<t.length;s+=2)e.push(t[s+1],t[s]);return e}h.use({violin:class extends k{draw(t,e,s){const a=this.w,i=new g(this.w),r=new f(this.w);this.violinOptions=a.config.plotOptions.violin,this.pointsOptions=this.violinOptions.points,this.bandwidthScale=this.violinOptions.bandwidthScale||1,this.normalize=this.violinOptions.normalize||"individual",this.distributed=a.config.plotOptions.bar.distributed,this.isHorizontal=a.config.plotOptions.bar.horizontal,this.coreUtils=new b(this.w),t=this.coreUtils.getLogSeries(t),this.series=t,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const o=i.group({class:"apexcharts-violin-series apexcharts-plot-series"});for(let e=0;e<t.length;e++){let n,l;const h=[],d=[],c=a.globals.comboCharts?s[e]:e,{columnGroupIndex:b}=this.barHelpers.getGroupIndex(c),g=i.group({class:"apexcharts-series",seriesName:m.escapeString(a.seriesData.seriesNames[c]),rel:e+1,"data:realIndex":c});x.addCollapsedClassToSeries(this.w,g,c),t[e].length>0&&(this.visibleI=this.visibleI+1);let u=0;this.yRatio.length>1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[c][0],u=c);const p=this.barHelpers.initialPositions(c),{y:f,barHeight:y,yDivision:v,zeroW:C,x:w,barWidth:P,xDivision:I,zeroH:L}=p;l=f,n=w,d.push(n+(null!=P?P:0)/2);const W=i.group({class:"apexcharts-datalabels","data:realIndex":c});if(this.seriesMaxWeight=0,"group"===this.normalize){(a.violinData.seriesViolinDensity[c]||[]).forEach(t=>{t&&t.maxWeight>this.seriesMaxWeight&&(this.seriesMaxWeight=t.maxWeight)})}const k=[];for(let s=0;s<a.globals.dataPoints;s++){const i=this.barHelpers.getStrokeWidth(e,s,c),o=this.isHorizontal?this.drawHorizontalViolin({indexes:{i:e,j:s,realIndex:c,translationsIndex:u},y:l,yDivision:v,barHeight:y,zeroW:C}):this.drawVerticalViolin({indexes:{i:e,j:s,realIndex:c,translationsIndex:u},x:n,xDivision:I,barWidth:P,zeroH:L});n=o.x,l=o.y,s>0&&d.push(o.center),h.push(o.alongRepresentative);const p=this.buildPointsSubPath({realIndex:c,j:s,center:o.center,halfExtent:o.halfExtent,alongFn:o.alongFn,density:o.density,maxWeight:o.maxWeight});p.length&&k.push({groups:p,j:s});const x=r.fillPath({seriesNumber:this.distributed?s:c,dataPointIndex:s,color:this.distributed?a.globals.colors[s]:void 0,value:t[e][s]});this.renderSeries({realIndex:c,pathFill:x,lineFill:a.globals.stroke.colors[c],j:s,i:e,pathFrom:o.pathFrom,pathTo:o.pathTo,strokeWidth:i,elSeries:g,x:n,y:l,series:t,columnGroupIndex:b,barHeight:y,barWidth:P,elDataLabelsWrap:W,visibleSeries:this.visibleI,type:"violin"});const f=g.node.querySelector(`path.apexcharts-violin-area[j='${s}']`);f&&isFinite(o.alongRepresentative)&&f.setAttribute(this.isHorizontal?"cx":"cy",`${o.alongRepresentative}`)}R({graphics:i,w:a,elSeries:g,pointsByCat:k,options:this.pointsOptions,distributed:this.distributed,realIndex:c,wrapClass:"apexcharts-violin-points-wrap",pointClass:"apexcharts-violin-points"}),a.globals.seriesXvalues[c]=d,a.globals.seriesYvalues[c]=h,o.add(g)}return o}drawVerticalViolin({indexes:t,x:e,xDivision:s,barWidth:a,zeroH:i}){var r;const o=this.w,{realIndex:n,j:l,translationsIndex:h}=t,d=this.yRatio[h];o.axisFlags.isXNumeric&&(e=(o.seriesData.seriesX[n][l]-o.globals.minX)/this.xRatio-a/2);const c=e+a*this.visibleI+a/2,b=a/2,g=this.getDensity(n,l),u=this.effectiveMaxWeight(g),p=t=>i-this.logVal(t,n)/d,x=this.buildBodyPath({nodes:g.nodes,center:c,halfExtent:b,maxWeight:u,vertical:!0,alongFn:p,collapsed:!1});let f=null;return o.globals.previousPaths.length>0&&(f=this.getPreviousPath(n,l,x)),null==f&&(f=this.buildBodyPath({nodes:g.nodes,center:c,halfExtent:b,maxWeight:u,vertical:!0,alongFn:p,collapsed:!0})),o.axisFlags.isXNumeric||(e+=s),{pathTo:x,pathFrom:f,x:e,y:i,center:c,halfExtent:b,alongFn:p,density:g,maxWeight:u,alongRepresentative:p(null!=(r=this.series[t.i][l])?r:0)}}drawHorizontalViolin({indexes:t,y:e,yDivision:s,barHeight:a,zeroW:i}){var r;const o=this.w,{realIndex:n,j:l}=t,h=this.invertedYRatio;o.axisFlags.isXNumeric&&(e=(o.seriesData.seriesX[n][l]-o.globals.minX)/this.invertedXRatio-a/2);const d=e+a*this.visibleI+a/2,c=a/2,b=this.getDensity(n,l),g=this.effectiveMaxWeight(b),u=t=>i+this.logVal(t,n)/h,p=this.buildBodyPath({nodes:b.nodes,center:d,halfExtent:c,maxWeight:g,vertical:!1,alongFn:u,collapsed:!1});let x=null;return o.globals.previousPaths.length>0&&(x=this.getPreviousPath(n,l,p)),null==x&&(x=this.buildBodyPath({nodes:b.nodes,center:d,halfExtent:c,maxWeight:g,vertical:!1,alongFn:u,collapsed:!0})),o.axisFlags.isXNumeric||(e+=s),{pathTo:p,pathFrom:x,x:i,y:e,center:d,halfExtent:c,alongFn:u,maxWeight:g,density:b,alongRepresentative:u(null!=(r=this.series[t.i][l])?r:0)}}getDensity(t,e){var s;const a=null==(s=this.w.violinData.seriesViolinDensity[t])?void 0:s[e];if(!a||!a.values.length)return{nodes:[],maxWeight:0};const i=a.values.map((t,e)=>e);i.sort((t,e)=>a.values[t]-a.values[e]);const r=[];let o=null;for(const t of i){const e=a.values[t];null!==o&&e===o||(r.push({v:e,w:a.weights[t]}),o=e)}return{nodes:r,maxWeight:a.maxWeight}}effectiveMaxWeight(t){return"group"===this.normalize&&this.seriesMaxWeight>0?this.seriesMaxWeight:t.maxWeight}buildBodyPath({nodes:t,center:e,halfExtent:s,maxWeight:a,vertical:i,alongFn:r,collapsed:o}){const n=new g(this.w);if(0===t.length){const t=r(0);return i?n.move(e,t)+n.line(e,t):n.move(t,e)+n.line(t,e)}const l=t=>{if(o||a<=0)return 0;const e=t/a*s*this.bandwidthScale;return Math.min(s,Math.max(0,e))},h=[],d=[];for(let s=0;s<t.length;s++){const a=r(t[s].v),o=l(t[s].w);i?(h.push([e+o,a]),d.push([e-o,a])):(h.push([a,e+o]),d.push([a,e-o]))}return d.reverse(),this.smoothSegment(h,i,!1)+this.smoothSegment(d,i,!0)+"z"}smoothSegment(t,e,s){const a=new g(this.w),i=t[0];let r=s?a.line(i[0],i[1]):a.move(i[0],i[1]);if(t.length<3||!this.strictlyMonotonic(t,e)){for(let e=1;e<t.length;e++)r+=a.line(t[e][0],t[e][1]);return r}const o=t.map(([t,s])=>e?[s,t]:[t,s]),n=D.points(o);return r+=(t=>{let e="";for(let s=0;s<t.length;s++){const a=t[s],i=a.length;i>4?(e+=`C${a[0]}, ${a[1]}`,e+=`, ${a[2]}, ${a[3]}`,e+=`, ${a[4]}, ${a[5]}`):i>2&&(e+=`S${a[0]}, ${a[1]}`,e+=`, ${a[2]}, ${a[3]}`)}return e})(e?n.map(B):n),r}strictlyMonotonic(t,e){const s=e?1:0;for(let e=1;e<t.length;e++)if(t[e][s]===t[e-1][s])return!1;return!0}buildPointsSubPath({realIndex:t,j:e,center:s,halfExtent:a,alongFn:i,density:r,maxWeight:o}){var n;return function({w:t,points:e,seedA:s,seedB:a,center:i,halfExtent:r,alongFn:o,isHorizontal:n,options:l,clampAt:h}){const d=l;if(!d||!1===d.show)return[];if(!e||!e.length)return[];const c=d.maxPoints||3e3,b=e.length>c?Math.ceil(e.length/c):1,g=null!=d.size?d.size:2.5,u=r*(null!=d.jitter?d.jitter:.5),p=!1!==d.constrainToViolin&&"function"==typeof h,x="square"===d.shape,f=d.colorScale,m=f&&Array.isArray(f.colors)&&f.colors.length>0,y=m?Math.max(2,f.steps||24):1,v=m&&null!=f.min?f.min:t.globals.minY,C=(m&&null!=f.max?f.max:t.globals.maxY)-v||1,w=m?new Array(y).fill(""):[""];for(let t=0;t<e.length;t+=b){const r=e[t],l=o(r);let d=2*(O(7919*s+100003*a+t)-.5)*u;if(p){const t=h(r);d>t&&(d=t),d<-t&&(d=-t)}const c=n?l:i+d,b=n?i+d:l,f=x?j(c,b,g):X(c,b,g);if(m){let t=(r-v)/C;t<0&&(t=0),t>1&&(t=1),w[Math.round(t*(y-1))]+=f}else w[0]+=f}if(!m)return w[0]?[{fill:null,d:w[0]}]:[];const P=[];for(let t=0;t<y;t++)w[t]&&P.push({fill:F(f.colors,t/(y-1)),d:w[t]});return P}({w:this.w,points:null==(n=this.w.violinData.seriesViolinPoints[t])?void 0:n[e],seedA:t,seedB:e,center:s,halfExtent:a,alongFn:i,isHorizontal:this.isHorizontal,options:this.pointsOptions,clampAt:t=>this.halfWidthAtValue(t,r,a,o)})}halfWidthAtValue(t,e,s,a){const{nodes:i}=e,r=null!=a?a:e.maxWeight;if(!i.length||r<=0)return 0;const o=t=>Math.min(s,t/r*s*this.bandwidthScale);if(t<=i[0].v)return o(i[0].w);if(t>=i[i.length-1].v)return o(i[i.length-1].w);for(let e=1;e<i.length;e++)if(t<=i[e].v){const s=i[e-1],a=i[e],r=a.v===s.v?0:(t-s.v)/(a.v-s.v);return o(s.w+(a.w-s.w)*r)}return 0}logVal(t,e){return this.coreUtils.getLogValAtSeriesIndex(t,e)}}}),exports.default=h;
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"}});const h=require("apexcharts/core");function d(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 c=d(h),b=c.__apex_CoreUtils,g=c.__apex_Graphics,u=c.__apex_DataLabels,p=c.__apex_BrowserAPIs_BrowserAPIs,x=c.__apex_Environment_Environment;function f(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)&&!!(x.isBrowser()&&t.globals.dataChanged&&t.globals.shouldAnimate)}function y(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 m(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 v(t,e,s=!1,a=!1){var i,r;if(!f(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=m(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=m(l.map((s,a)=>y(t,e,a))),c=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(c.ordered||a)&&(c.changed||s)?{join:c,oldKeys:h,newKeys:d}:null}function C({w:t,elSeries:e,record:s,newKeys:a,isHorizontal:i,speed:r}){var o;if(!f(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 g(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 c=i?"left center":"center bottom";try{const t=n.getBBox();l&&t&&(c=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 b=n.style;b.transformBox="fill-box",b.transformOrigin=c;const g=Math.max(1,r||1),u=performance.now(),x=e=>{if(t.globals.isDestroyed||!n.parentNode)return;const s=Math.max(0,Math.min(1,(e-u)/g)),a=1-Math.pow(1-s,3),r=1-a;b.transform=i?`scaleX(${r})`:`scaleY(${r})`,b.opacity=String(1-a),s<1?p.requestAnimationFrame(x):n.parentNode.removeChild(n)};p.requestAnimationFrame(x)})}class w{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){const{x:e,y:s,y1:a,y2:i,i:r,j:o,realIndex:h,columnGroupIndex:d,series:c,barHeight:b,barWidth:u,barXPosition:p,barYPosition:x,visibleSeries:f}=t,y=this.w,m=new g(this.barCtx.w),v=Array.isArray(this.barCtx.strokeWidth)?this.barCtx.strokeWidth[h]:this.barCtx.strokeWidth;let C,w;y.axisFlags.isXNumeric&&!y.globals.isBarHorizontal?(C=e+u*(f+1),w=s+b*(f+1)-v):(C=e+u*f,w=s+b*f);let P=null,I=null,L=e,W=s,k={};const A=y.config.dataLabels,H=this.barCtx.barOptions.dataLabels,D=this.barCtx.barOptions.dataLabels.total;void 0!==x&&(this.barCtx.isRangeBar||this.barCtx.isPyramid)&&(w=x,W=x),void 0!==p&&this.barCtx.isVerticalGroupedRangeBar&&(C=p,L=p);const S=A.offsetX,R=A.offsetY;let F={width:0,height:0};if(y.config.dataLabels.enabled){const t=y.seriesData.series[r][o];F=m.getTextRects(y.config.dataLabels.formatter?y.config.dataLabels.formatter(t,l(n({},y),{seriesIndex:r,dataPointIndex:o,w:y})):y.formatters.yLabelFormatters[0](t),parseFloat(A.style.fontSize).toString())}const O={x:e,y:s,i:r,j:o,realIndex:h,columnGroupIndex:d,bcx:C,bcy:w,barHeight:b,barWidth:u,textRects:F,strokeWidth:v,dataLabelsX:L,dataLabelsY:W,dataLabelsConfig:A,barDataLabelsConfig:H,barTotalDataLabelsConfig:D,offX:S,offY:R};return k=this.barCtx.isHorizontal?this.calculateBarsDataLabelsPosition(O):this.calculateColumnsDataLabelsPosition(O),P=this.drawCalculatedDataLabels({x:k.dataLabelsX,y:k.dataLabelsY,val:this.barCtx.isRangeBar?[a,i]:"100%"===y.config.chart.stackType?c[h][o]:y.seriesData.series[h][o],i:h,j:o,barWidth:u,barHeight:b,textRects:F,dataLabelsConfig:A}),y.config.chart.stacked&&D.enabled&&(I=this.drawTotalDataLabels({x:k.totalDataLabelsX,y:k.totalDataLabelsY,barWidth:u,barHeight:b,realIndex:h,textAnchor:k.totalDataLabelsAnchor,val:this.getStackedTotalDataLabel({realIndex:h,j:o}),dataLabelsConfig:A,barTotalDataLabelsConfig:D})),{dataLabelsPos:k,dataLabels:P,totalDataLabels:I}}getStackedTotalDataLabel({realIndex:t,j:e}){const s=this.w;let a=this.barCtx.stackedSeriesTotals[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:c,dataLabelsX:b,dataLabelsY:u,dataLabelsConfig:p,barDataLabelsConfig:x,barTotalDataLabelsConfig:f,strokeWidth:y,offX:m,offY:v}=t;const C=l;d=Math.abs(d);const w="vertical"===e.config.plotOptions.bar.dataLabels.orientation,{zeroEncounters:P}=this.barCtx.barHelpers.getZeroValueEncounters({i:i,j:r});l-=y/2;const I=e.layout.gridWidth/e.globals.dataPoints;if(this.barCtx.isVerticalGroupedRangeBar?b+=h/2:(b=e.axisFlags.isXNumeric?l-h/2+m:l-I+h/2+m,!e.config.chart.stacked&&P>0&&e.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(b-=h*P)),w){const t=2;b=b+c.height/2-y/2-t}const L=e.seriesData.series[i][r]<0;let W=n;switch(this.barCtx.isReversed&&(W=n+(L?d:-d)),x.position){case"center":u=w?L?W-d/2+v:W+d/2-v:L?W-d/2+c.height/2+v:W+d/2+c.height/2-v;break;case"bottom":u=w?L?W-d+v:W+d-v:L?W-d+c.height+y+v:W+d-c.height/2+y-v;break;case"top":u=w?L?W+v:W-v:L?W-c.height/2-v:W+c.height+v}let k=W;if(e.labelData.seriesGroups.forEach(t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevY.forEach(t=>{k=L?Math.max(t[r],k):Math.min(t[r],k)})}),this.barCtx.lastActiveBarSerieIndex===o&&f.enabled){const t=18,i=new g(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:r}),p.fontSize);s=L?k-i.height/2-v-f.offsetY+t:k+i.height+v+f.offsetY-t;const n=I;a=C+(e.axisFlags.isXNumeric?-h*e.globals.barGroups.length/2:e.globals.barGroups.length*h/2-(e.globals.barGroups.length-1)*h-n)+f.offsetX}return e.config.chart.stacked||(u<0?u=0+y:u+c.height/3>e.layout.gridHeight&&(u=e.layout.gridHeight-y)),{bcx:l,bcy:n,dataLabelsX:b,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:c,strokeWidth:b,dataLabelsConfig:u,barDataLabelsConfig:p,barTotalDataLabelsConfig:x,offX:f,offY:y}=t;const m=s.layout.gridHeight/s.globals.dataPoints,{zeroEncounters:v}=this.barCtx.barHelpers.getZeroValueEncounters({i:i,j:r});let C,w,P;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:m)+l/2+d.height/2+y-3;!s.config.chart.stacked&&v>0&&s.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(C-=l*v);let I="start";const L=s.seriesData.series[i][r]<0;let W=a;if(this.barCtx.isReversed&&(W=a+(L?-h:h),I=L?"start":"end"),this.barCtx.isPyramid)c=s.layout.gridWidth/2+f;else switch(p.position){case"center":c=L?W+h/2-f:Math.max(d.width/2,W-h/2)+f;break;case"bottom":c=L?W+h-b-f:W-h+b+f;break;case"top":c=L?W-b-f:W-b+f}let k=W;if(s.labelData.seriesGroups.forEach(t=>{var e;null==(e=this.barCtx[t.join(",")])||e.prevX.forEach(t=>{k=L?Math.min(t[r],k):Math.max(t[r],k)})}),this.barCtx.lastActiveBarSerieIndex===o&&x.enabled){const t=new g(this.barCtx.w).getTextRects(this.getStackedTotalDataLabel({realIndex:o,j:r}),u.fontSize);L?(w=k-b-f-x.offsetX,I="end"):w=k+f+x.offsetX+(this.barCtx.isReversed?-(h+b):b),P=C-d.height/2+t.height/2+x.offsetY+b,s.globals.barGroups.length>1&&(P-=s.globals.barGroups.length/2*(l/2))}return s.config.chart.stacked||("start"===u.textAnchor?c-d.width<0?c=L?d.width+b:b:c+d.width>s.layout.gridWidth&&(c=L?s.layout.gridWidth-b:s.layout.gridWidth-d.width-b):"middle"===u.textAnchor?c-d.width/2<0?c=d.width/2+b:c+d.width/2>s.layout.gridWidth&&(c=s.layout.gridWidth-d.width/2-b):"end"===u.textAnchor&&(c<1?c=d.width+b:c+1>s.layout.gridWidth&&(c=s.layout.gridWidth-d.width-b))),{bcx:a,bcy:n,dataLabelsX:c,dataLabelsY:C,totalDataLabelsX:w,totalDataLabelsY:P,totalDataLabelsAnchor:I}}drawCalculatedDataLabels({x:t,y:e,val:s,i:a,j:i,textRects:r,barHeight:o,barWidth:h,dataLabelsConfig:d}){var c,b;const p=this.w;let x="rotate(0)";"vertical"===p.config.plotOptions.bar.dataLabels.orientation&&(x=`rotate(-90, ${t}, ${e})`);const f=new u(this.barCtx.w,this.barCtx.ctx),m=new g(this.barCtx.w),v=d.formatter;let C=null;const w=p.globals.collapsedSeriesIndices.indexOf(a)>-1;if(d.enabled&&!w){C=m.group({class:"apexcharts-data-labels",transform:x});const g=p.config.dataLabels;((null==(c=g.animate)?void 0:c.enabled)||(null==(b=g.countUp)?void 0:b.enabled))&&(C.node.setAttribute("data:dlKey",`${a}::${y(p,a,i)}`),C.node.setAttribute("data:dlJ",String(i)),"number"==typeof s&&isFinite(s)&&C.node.setAttribute("data:dlVal",String(s)));let u="";void 0!==s&&(u=v(s,l(n({},p),{seriesIndex:a,dataPointIndex:i,w:p}))),!s&&p.config.plotOptions.bar.hideZeroBarsWhenGrouped&&(u="");const w=p.seriesData.series[a][i]<0,P=p.config.plotOptions.bar.dataLabels.position;if("vertical"===p.config.plotOptions.bar.dataLabels.orientation&&("top"===P&&(d.textAnchor=w?"end":"start"),"center"===P&&(d.textAnchor="middle"),"bottom"===P&&(d.textAnchor=w?"end":"start")),this.barCtx.isRangeBar&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels){h<m.getTextRects(u,parseFloat(d.style.fontSize).toString()).width&&(u="")}p.config.chart.stacked&&this.barCtx.barOptions.dataLabels.hideOverflowingLabels&&(this.barCtx.isHorizontal?r.width/1.6>Math.abs(h)&&(u=""):r.height/1.6>Math.abs(o)&&(u=""));const I=n({},d);this.barCtx.isHorizontal&&s<0&&("start"===d.textAnchor?I.textAnchor="end":"end"===d.textAnchor&&(I.textAnchor="start")),f.plotDataLabelsText({x:t,y:e,text:u,i:a,j:i,parent:C,dataLabelsConfig:I,alwaysDrawDataLabel:!0,offsetCorrection:!0})}return C}drawTotalDataLabels({x:t,y:e,val:s,realIndex:a,textAnchor:i,barTotalDataLabelsConfig:r}){const o=new g(this.barCtx.w);let n;return r.enabled&&void 0!==t&&void 0!==e&&this.barCtx.lastActiveBarSerieIndex===a&&(n=o.drawText({x:t,y:e,foreColor:r.style.color,text:s,textAnchor:i,fontFamily:r.style.fontFamily,fontSize:r.style.fontSize,fontWeight:r.style.fontWeight})),n}}const P=c.__apex_Series,I=c.__apex_Fill,L=c.__apex_Utils;class W{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),L.isSafari()&&(this.arrBorderRadius=this.arrBorderRadius.map(t=>t.map(t=>"none"))),0===this.barCtx.seriesLen&&(this.barCtx.seriesLen=1),this.barCtx.zeroSerieses=[],e.globals.comboCharts||this.checkZeroSeries({series:t})}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&&(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.globals.minXDiff&&.5!==e.globals.minXDiff&&e.globals.minXDiff/t>0&&(r=e.globals.minXDiff/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+L.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,r,o,n;const l=this.w,h=new I(this.barCtx.w);let d=null;const c=this.barCtx.barOptions.distributed?s:e;let b=!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&&(d=a.color,b=!0)})}return{color:h.fillPath({seriesNumber:this.barCtx.barOptions.distributed?c:a,dataPointIndex:s,color:d,value:t[e][s],fillConfig:null==(i=l.config.series[e].data[s])?void 0:i.fill,fillType:(null==(o=null==(r=l.config.series[e].data[s])?void 0:r.fill)?void 0:o.type)?null==(n=l.config.series[e].data[s])?void 0:n.fill.type:Array.isArray(l.config.fill.type)?l.config.fill.type[a]:l.config.fill.type}),useRangeColor:b}}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}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=this.w.config.chart.type;for(let e=0;e<r;e++){const s=[],a=[];let l=0;for(let r=0;r<i;r++){const i=t[r][e];i>0?(s.push(r),l++):i<0&&(a.push(r),l++)}if(s.length>0&&0===a.length)if(1===s.length)o[s[0]][e]="bar"===n&&1===r?"top":"both";else{const t=s[0],a=s[s.length-1];for(const i of s)o[i][e]=i===t?"bar"===n&&1===r?"top":"bottom":i===a?"top":"none"}else if(a.length>0&&0===s.length)if(1===a.length)o[a[0]][e]="both";else{const t=Math.max(...a),s=Math.min(...a);for(const i of a)o[i][e]=i===t?"bottom":i===s?"top":"none"}else if(s.length>0&&a.length>0){const t=s[s.length-1];for(const a of s)o[a][e]=a===t?"top":"none";const i=Math.max(...a);for(const t of a)o[t][e]=t===i?"bottom":"none"}else if(1===l){o[s[0]||a[0]][e]="both"}}return o}barBackground({j:t,i:e,x1:s,x2:a,y1:i,y2:r,elSeries:o}){const n=this.w,l=new g(this.barCtx.w),h=new P(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:c}){var b,u,p;const x=new g(this.barCtx.w);(i=Array.isArray(i)?i[l]:i)||(i=0);let f=t,y=e;(null==(b=c.config.series[l].data[d])?void 0:b.columnWidthOffset)&&(y=e-c.config.series[l].data[d].columnWidthOffset/2,f=t+c.config.series[l].data[d].columnWidthOffset);const m=i/2,v=y+m,C=y+f-m,w=(o[h][d]>=0?1:-1)*(r?-1:1);s+=.001-m*w,a+=.001+m*w;const P=x.line(C,s),I="around"===c.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][d]?" Z":" z";let L=x.move(v,s)+x.line(v,a)+x.line(C,a)+P+I;"none"!==this.arrBorderRadius[l][d]&&(L=x.roundPathCorners(L,c.config.plotOptions.bar.borderRadius));let W=null;const k=null==(p=null==(u=this.barCtx.ctx)?void 0:u.morphTypeChange)?void 0:p.getInitialPathFor(l,d);if(k?W=k:c.globals.previousPaths.length>0&&(W=this.barCtx.getPreviousPath(l,d,L)),null==W&&(W=x.move(v,s)+x.line(v,s)+P+P+P+P+P+x.line(v,s)+I),c.config.chart.stacked){let t=this.barCtx;t=this.barCtx[n],t.yArrj.push(a-m*w),t.yArrjF.push(Math.abs(s-a+i*w)),t.yArrjVal.push(this.barCtx.series[h][d])}return{pathTo:L,pathFrom:W}}getFunnelTrapezoidPaths({barYPosition:t,barHeight:e,series:s,i:a,j:i,realIndex:r,strokeWidth:o,w:n}){var l,h;const d=new g(this.barCtx.w),c=n.layout.gridWidth/2,b=t=>Math.abs(t/this.barCtx.invertedYRatio)/2,u=b(s[a][i]),p=i===s[a].length-1,x="taper"===n.config.plotOptions.funnel.lastShape?"taper":"flat";let f;f=p?"taper"===x?0:u:b(s[a][i+1]);const y=o/2,m=t+y,v=t+e-y,C=c-u,w=c+u,P=c-f,I=c+f,L=d.move(C,m)+d.line(w,m)+d.line(I,v)+d.line(P,v)+" Z";let W=null;const k=null==(h=null==(l=this.barCtx.ctx)?void 0:l.morphTypeChange)?void 0:h.getInitialPathFor(r,i);return k?W=k:n.globals.previousPaths.length>0&&(W=this.barCtx.getPreviousPath(r,i,L)),null==W&&(W=d.move(c,m)+d.line(c,m)+d.line(c,v)+d.line(c,v)+" Z"),{pathTo:L,pathFrom:W,x:w,x1:C,barXPosition:c}}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 g(this.barCtx.w),c=n.layout.gridWidth/2,b=o/2,u=t+b,p=t+e-b,x=c-s,f=c+s,y=c-a,m=c+a,v=d.move(x,u)+d.line(f,u)+d.line(m,p)+d.line(y,p)+" 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,v)),null==C&&(C=d.move(c,u)+d.line(c,u)+d.line(c,p)+d.line(c,p)+" Z"),{pathTo:v,pathFrom:C,x:f,x1:x,barXPosition:c}}getBarpaths({barYPosition:t,barHeight:e,x1:s,x2:a,strokeWidth:i,isReversed:r,series:o,seriesGroup:n,realIndex:l,i:h,j:d,w:c}){var b,u,p;const x=new g(this.barCtx.w);(i=Array.isArray(i)?i[l]:i)||(i=0);let f=t,y=e;(null==(b=c.config.series[l].data[d])?void 0:b.barHeightOffset)&&(f=t-c.config.series[l].data[d].barHeightOffset/2,y=e+c.config.series[l].data[d].barHeightOffset);const m=i/2,v=f+m,C=f+y-m,w=(o[h][d]>=0?1:-1)*(r?-1:1);s+=.001+m*w,a+=.001-m*w;const P=this.barCtx.isFunnel,I=P?(s+a)/2:s,L=x.line(s,C),W="around"===c.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[l][d]?" Z":" z";let k=x.move(s,v)+x.line(a,v)+x.line(a,C)+L+W;"none"!==this.arrBorderRadius[l][d]&&(k=x.roundPathCorners(k,c.config.plotOptions.bar.borderRadius));let A=null;const H=null==(p=null==(u=this.barCtx.ctx)?void 0:u.morphTypeChange)?void 0:p.getInitialPathFor(l,d);if(H?A=H:c.globals.previousPaths.length>0&&(A=this.barCtx.getPreviousPath(l,d,k)),null==A){const t=P?x.line(I,C):L;A=x.move(I,v)+x.line(I,v)+t+t+t+t+t+x.line(I,v)+W}if(c.config.chart.stacked){let t=this.barCtx;t=this.barCtx[n],t.xArrj.push(a+m*w),t.xArrjF.push(Math.abs(s-a-i*w)),t.xArrjVal.push(this.barCtx.series[h][d])}return{pathTo:k,pathFrom:A}}checkZeroSeries({series:t}){const e=this.w;for(let s=0;s<t.length;s++){let a=0;for(let i=0;i<t[e.globals.maxValsInArrayIndex].length;i++)a+=t[s][i];0===a&&this.barCtx.zeroSerieses.push(s)}}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&&o.rangeData.seriesRange.length){const e=this.barCtx.barOptions.dumbbellColors?this.barCtx.barOptions.dumbbellColors:o.globals.colors,s={strokeHeight:"x"===t?0:o.globals.markers.size[a],strokeWidth:"x"===t?o.globals.markers.size[a]:0,strokeDashArray:0,strokeLineCap:"round",strokeColor:Array.isArray(e[a])?e[a][0]:e[a]};d(o.rangeData.seriesRangeStart[a][i],s),d(o.rangeData.seriesRangeEnd[a][i],l(n({},s),{strokeColor:Array.isArray(e[a])?e[a][1]:e[a]}))}return h}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 g(this.barCtx.w),n=o.group({className:"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)}}):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)}}),n}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,b=l+e.barHeight,u=new g(this.barCtx.w),p=new L,x=u.move(n,b)+u.line(o,b)+u.line(h,c)+u.line(d,c)+u.line(n,b)+("around"===r.config.plotOptions.bar.borderRadiusApplication||"both"===this.arrBorderRadius[a][i]?" Z":" z");return u.drawPath({d:x,fill:p.shadeColor(.5,L.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}}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 k=c.__apex_Filters,A=c.__apex_Animations_computeStagger;class H{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.series=[],this.elSeries=null,this.visibleI=0,this.isReversed=!1;const a=new P(this.w);this.lastActiveBarSerieIndex=a.getActiveConfigSeriesIndex("desc",["bar","column"]),this.columnGroupIndices=[];const i=a.getBarSeriesIndices(),r=new b(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 W(this)}draw(t,e){var s,a,i;const r=this.w,o=new g(this.w),h=new b(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 b,g;const u=[],p=[],x=r.globals.comboCharts?e[h]:h,{columnGroupIndex:f}=this.barHelpers.getGroupIndex(x),m=o.group({class:"apexcharts-series",rel:h+1,seriesName:L.escapeString(r.seriesData.seriesNames[x]),"data:realIndex":x});P.addCollapsedClassToSeries(this.w,m,x),t[h].length>0&&(this.visibleI=this.visibleI+1),this.yRatio.length>1&&(this.yaxisIndex=r.globals.seriesYAxisReverseMap[x],this.translationsIndex=x);const v=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 w=this.barHelpers.initialPositions(x),{y:I,yDivision:W,zeroW:A,x:H,xDivision:D,zeroH:S}=w;let R=w.barHeight,F=w.barWidth;g=I,b=H,this.isHorizontal||p.push(b+(null!=F?F:0)/2);const O=o.group({class:"apexcharts-datalabels","data:realIndex":x});r.globals.delayedElements.push({el:O.node,holdUntilComplete:!(null==(s=r.config.dataLabels.animate)?void 0:s.enabled)&&this.isLengthTransition(x)}),O.node.classList.add("apexcharts-element-hidden");const X=o.group({class:"apexcharts-bar-goals-markers"}),j=o.group({class:"apexcharts-bar-shadows"});r.globals.delayedElements.push({el:j.node}),j.node.classList.add("apexcharts-element-hidden");for(let e=0;e<t[h].length;e++){const s=this.barHelpers.getStrokeWidth(h,e,x);let o=null;const d={indexes:{i:h,j:e,realIndex:x,translationsIndex:v,bc:c},x:b,y:g,strokeWidth:s,elSeries:m};this.isHorizontal?(o=this.drawBarPaths(l(n({},d),{barHeight:R,zeroW:A,yDivision:W})),F=this.series[h][e]/this.invertedYRatio):(o=this.drawColumnPaths(l(n({},d),{xDivision:D,barWidth:F,zeroH:S})),R=this.series[h][e]/this.yRatio[v]);const y=this.barHelpers.getPathFillColor(t,h,e,x);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 y.color&&-1===(null==(i=y.color)?void 0:i.indexOf("url"))?y.color:L.hexToRgba(r.globals.colors[h]),prevPaths:this.pathArr[this.pathArr.length-1],currPaths:o,realIndex:x,j:e});if(j.add(t),r.config.chart.dropShadow.enabled){new k(this.w).dropShadow(t,r.config.chart.dropShadow,x)}}this.pathArr.push(o);const C=this.barHelpers.drawGoalLine({barXPosition:o.barXPosition,barYPosition:o.barYPosition,goalX:o.goalX,goalY:o.goalY,barHeight:R,barWidth:F});C&&X.add(C),g=o.y,b=o.x,e>0&&p.push(b+(null!=F?F:0)/2),u.push(g),this.renderSeries(l(n({realIndex:x,pathFill:y.color},y.useRangeColor?{lineFill:y.color}:{}),{j:e,i:h,columnGroupIndex:f,pathFrom:o.pathFrom,pathTo:o.pathTo,strokeWidth:s,elSeries:m,x:b,y:g,series:t,barHeight:Math.abs(o.barHeight?o.barHeight:R),barWidth:Math.abs(o.barWidth?o.barWidth:F),elDataLabelsWrap:O,elGoalsMarkers:X,elBarShadows:j,visibleSeries:this.visibleI,type:"bar"}))}if(r.globals.seriesXvalues[x]=p,r.globals.seriesYvalues[x]=u,r.globals.previousPaths.length>0){const e=[];for(let s=0;s<t[h].length;s++)e.push(y(r,x,s));C({w:r,elSeries:m,record:this._prevRecord(x),newKeys:e,isHorizontal:this.isHorizontal,speed:r.config.chart.animations.dynamicAnimation.speed})}d.add(m)}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:c,y1:b,y2:u,series:p,barHeight:x,barWidth:f,barXPosition:m,barYPosition:v,elDataLabelsWrap:C,elGoalsMarkers:P,elBarShadows:I,visibleSeries:L,type:W,classes:H}){var D;const S=this.w,R=new g(this.w,this.ctx),F=function(t,e){const s=t&&t.renderer;return s&&s.kind&&"svg"!==s.kind?s:e}(this.ctx,R);let O=!1;if(h._bindingsDelegated||(h._bindingsDelegated=!0,R.setupEventDelegation(h,`.apexcharts-${W}-area`)),!s){let e=function(t){const e=S.config.stroke.colors;let s;return Array.isArray(e)&&e.length>0&&(s=e[t],s||(s=""),"function"==typeof s)?s({value:S.seriesData.series[t][a],dataPointIndex:a,w:S}):s};const i="function"==typeof S.globals.stroke.colors[t]?e(t):S.globals.stroke.colors[t];s=this.barOptions.distributed?S.globals.stroke.colors[a]:i}const X=new w(this).handleBarDataLabels({x:d,y:c,y1:b,y2:u,i:i,j:a,series:p,realIndex:t,columnGroupIndex:r,barHeight:x,barWidth:f,barXPosition:m,barYPosition:v,visibleSeries:L});S.globals.isBarHorizontal||(X.dataLabelsPos.dataLabelsX+Math.max(f,S.globals.barPadForNumericAxis)<0||X.dataLabelsPos.dataLabelsX-Math.max(f,S.globals.barPadForNumericAxis)>S.layout.gridWidth)&&(O=!0),S.config.series[i].data[a]&&S.config.series[i].data[a].strokeColor&&(s=S.config.series[i].data[a].strokeColor),this.isNullValue&&(e="none");const j=S.config.chart.animations,M=j.animateGradually;let B=0;if(M&&!1!==M.enabled&&!(S.globals.dataChanged&&this.isLayoutShift(t))){const t=S.globals.dataPoints||1,e=M.delay||0,s=Math.min(e,.5*j.speed/Math.max(1,t));let r=A({style:"sequential",index:a,baseDelay:s});S.config.chart.stacked&&(r+=i*s*.5);B=r/(e||1)}if(!O){const r=!0===(null==(D=this.ctx.morphTypeChange)?void 0:D.isActive())?this.ctx.morphTypeChange.getSpeed():S.config.chart.animations.dynamicAnimation.speed,d=F.renderPaths({i:i,j:a,realIndex:t,pathFrom:o,pathTo:n,stroke:s,strokeWidth:l,strokeLineCap:S.config.stroke.lineCap,fill:e,animationDelay:B,initialSpeed:S.config.chart.animations.speed,dataChangeSpeed:r,className:`apexcharts-${W}-area ${H}`,chartType:W,bindEventsOnPaths:!1});d.attr("clip-path",`url(#gridRectBarMask${S.globals.cuid})`);const c=S.config.forecastDataPoints;c.count>0&&a>=S.globals.dataPoints-c.count&&(d.node.setAttribute("stroke-dasharray",c.dashArray),d.node.setAttribute("stroke-width",c.strokeWidth),d.node.setAttribute("fill-opacity",c.fillOpacity)),void 0!==b&&void 0!==u&&(d.attr("data-range-y1",b),d.attr("data-range-y2",u));new k(this.w).setSelectionFilter(d,t,a),h.add(d),d.attr({cy:X.dataLabelsPos.bcy,cx:X.dataLabelsPos.bcx,j:a,val:S.seriesData.series[i][a],barHeight:x,barWidth:f,"data:pathKey":y(S,t,a)}),"canvas"===F.kind&&(S.globals.barCanvasCoords||(S.globals.barCanvasCoords={}),S.globals.barCanvasCoords[t]||(S.globals.barCanvasCoords[t]={}),S.globals.barCanvasCoords[t][a]={cx:X.dataLabelsPos.bcx,cy:X.dataLabelsPos.bcy,barWidth:f}),null!==X.dataLabels&&C.add(X.dataLabels),X.totalDataLabels&&C.add(X.totalDataLabels),h.add(C),P&&h.add(P),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 c;if(l.axisFlags.isXNumeric)c=(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),c=r+e*this.visibleI,c-=e*s}else c=r+e*this.visibleI;const b=this.isFunnel&&"trapezoid"===l.config.plotOptions.funnel.shape,g=this.isPyramid&&this.pyramidLayout?this.pyramidLayout[d]:null,u=!!g;if(g)c=g.y,e=g.height;else if(this.isFunnel&&!b){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=g?this.barHelpers.getPyramidPaths({barYPosition:c,barHeight:e,topHalf:g.topHalf,bottomHalf:g.bottomHalf,realIndex:t.realIndex,j:d,strokeWidth:s,w:l}):b?this.barHelpers.getFunnelTrapezoidPaths({barYPosition:c,barHeight:e,series:this.series,i:h,j:d,realIndex:t.realIndex,strokeWidth:s,w:l}):this.barHelpers.getBarpaths({barYPosition:c,barHeight:e,x1:a,x2:i,strokeWidth:s,isReversed:this.isReversed,series:this.series,realIndex:t.realIndex,i:h,j:d,w:l}),(b||u)&&(a=p.x1,i=p.x),l.axisFlags.isXNumeric||u||(r+=o),u&&(r=c),this.barHelpers.barBackground({j:d,i:h,y1:c-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,h,d,0),barYPosition:c,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,c=t.i,b=t.j,g=t.bc;let u;if(l.axisFlags.isXNumeric){const t=this.getBarXForNumericXAxis({x:e,j:b,realIndex:h,barWidth:i});e=t.x,u=t.barXPosition}else if(l.config.plotOptions.bar.hideZeroBarsWhenGrouped){const{nonZeroColumns:t,zeroEncounters:s}=this.barHelpers.getZeroValueEncounters({i:c,j:b});t>0&&(i=this.seriesLen*i/t),u=e+i*this.visibleI,u-=i*s}else u=e+i*this.visibleI;s=this.barHelpers.getYForValue(this.series[c][b],r,d);const p=this.barHelpers.getColumnPaths({barXPosition:u,barWidth:i,y1:r,y2:s,strokeWidth:o,isReversed:this.isReversed,series:this.series,realIndex:h,i:c,j:b,w:l});return l.axisFlags.isXNumeric||(e+=a),this.barHelpers.barBackground({bc:g,j:b,i:c,x1:u-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,c,b,d),barXPosition:u,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),L.isNumber(i.seriesData.seriesX[r][a])&&(t=(i.seriesData.seriesX[r][a]-i.globals.minX)/this.xRatio-e*this.seriesLen/2),{barXPosition:t+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(f(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(y(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=v(this.w,t,!0,!0),s=!(!e||!e.join.changed);return this._layoutShiftCache[t]=s,s}getPreviousPath(t,e,s){const a=this.w,i=this._prevRecord(t);if(!i)return f(a)?null:s;let r=null,o=!1;const n=this._prevKeyedPaths(t);if(n){const s=n.get(y(a,t,e));s?r=s.d:o=!0}else void 0!==i.paths[e]?r=i.paths[e].d:o=!0;return r&&H.pathCommandCount(r)===H.pathCommandCount(s)?r:o&&f(a)?null:s}static pathCommandCount(t){if(!t)return 0;const e=t.match(/[A-Za-z]/g);return e?e.length:0}}const D=t=>{const e=function(t){const e=[];let s=t[0],a=t[1],i=e[0]=R(s,a),r=1;for(let o=t.length-1;r<o;r++)s=a,a=t[r+1],e[r]=.5*(i+(i=R(s,a)));return e[r]=i,e}(t),s=t.length-1,a=[];let i,r,o,n;for(let a=0;a<s;a++)o=R(t[a],t[a+1]),Math.abs(o)<1e-6?e[a]=e[a+1]=0:(i=e[a]/o,r=e[a+1]/o,n=i*i+r*r,n>9&&(n=3*o/Math.sqrt(n),e[a]=n*i,e[a+1]=n*r));for(let i=0;i<=s;i++)n=(t[Math.min(s,i+1)][0]-t[Math.max(0,i-1)][0])/(6*(1+e[i]*e[i])),a.push([n||0,e[i]*n||0]);return a},S={points(t){const e=D(t),s=t[1],a=t[0],i=[],r=e[1],o=e[0];i.push(a,[a[0]+o[0],a[1]+o[1],s[0]-r[0],s[1]-r[1],s[0],s[1]]);for(let s=2,a=e.length;s<a;s++){const a=t[s],r=e[s];i.push([a[0]-r[0],a[1]-r[1],a[0],a[1]])}return i},slice(t,e,s){const a=t.slice(e,s);if(e){if(s-e>1&&a[1].length<6){const t=a[0].length;a[1]=[2*a[0][t-2]-a[0][t-4],2*a[0][t-1]-a[0][t-3]].concat(a[1])}a[0]=a[0].slice(-2)}return a}};function R(t,e){return(e[1]-t[1])/(e[0]-t[0])}function F({graphics:t,w:e,elSeries:s,pointsByCat:a,options:i,distributed:r,realIndex:o,wrapClass:n,pointClass:l}){if(!i||!1===i.show||!a.length)return;const h=null!=i.opacity?i.opacity:.9,d=null!=i.strokeColor?i.strokeColor:"#fff",c=null!=i.strokeWidth?i.strokeWidth:1,b=e.config.chart.animations.enabled&&!e.globals.resized&&!e.globals.dataChanged,g=t.group({class:b?`${n} apexcharts-element-hidden`:n});b&&e.globals.delayedElements.push({el:g.node}),a.forEach(({groups:s,j:a})=>{const n=r?e.globals.colors[a]:e.globals.colors[o],b=i.fillColor,u="series"===b?n:"series-dark"===b?O(n,.45):b||O(n,.45);s.forEach(s=>{const i=t.drawPath({d:s.d,fill:null!=s.fill?s.fill:u,stroke:c>0?d:"none",strokeWidth:c,fillOpacity:h,classes:l});i.attr("data:realIndex",o),i.attr("j",a),i.attr("clip-path",`url(#gridRectBarMask${e.globals.cuid})`),i.node.style.pointerEvents="none",g.add(i)})}),s.add(g)}function O(t,e){const s=L.parseHex(t);if(!s)return t;const a=Math.max(0,1-e);return`rgb(${Math.round(s[0]*a)},${Math.round(s[1]*a)},${Math.round(s[2]*a)})`}function X(t,e){if(!t.length)return"#000";if(1===t.length)return t[0];const s=Math.max(0,Math.min(1,e))*(t.length-1),a=Math.floor(s),i=s-a,r=L.parseHex(t[a])||[0,0,0],o=L.parseHex(t[Math.min(a+1,t.length-1)])||r,n=(t,e)=>Math.round(t+(e-t)*i);return`rgb(${n(r[0],o[0])},${n(r[1],o[1])},${n(r[2],o[2])})`}function j(t){let e=(2654435769^t)>>>0;return e=Math.imul(e^e>>>16,73244475),e=Math.imul(e^e>>>16,73244475),((e^e>>>16)>>>0)/4294967296}function M(t,e,s){return`M ${t-s} ${e} a ${s} ${s} 0 1 0 ${2*s} 0 a ${s} ${s} 0 1 0 ${-2*s} 0 `}function B(t,e,s){return`M ${t-s} ${e-s} h ${2*s} v ${2*s} h ${-2*s} z `}function z(t){const e=[];for(let s=0;s<t.length;s+=2)e.push(t[s+1],t[s]);return e}h.use({violin:class extends H{draw(t,e,s){const a=this.w,i=new g(this.w),r=new I(this.w);this.violinOptions=a.config.plotOptions.violin,this.pointsOptions=this.violinOptions.points,this.bandwidthScale=this.violinOptions.bandwidthScale||1,this.normalize=this.violinOptions.normalize||"individual",this.distributed=a.config.plotOptions.bar.distributed,this.isHorizontal=a.config.plotOptions.bar.horizontal,this.coreUtils=new b(this.w),t=this.coreUtils.getLogSeries(t),this.series=t,this.yRatio=this.coreUtils.getLogYRatios(this.yRatio),this.barHelpers.initVariables(t);const o=i.group({class:"apexcharts-violin-series apexcharts-plot-series"});for(let e=0;e<t.length;e++){let n,l;const h=[],d=[],c=a.globals.comboCharts?s[e]:e,{columnGroupIndex:b}=this.barHelpers.getGroupIndex(c),g=i.group({class:"apexcharts-series",seriesName:L.escapeString(a.seriesData.seriesNames[c]),rel:e+1,"data:realIndex":c});P.addCollapsedClassToSeries(this.w,g,c),t[e].length>0&&(this.visibleI=this.visibleI+1);let u=0;this.yRatio.length>1&&(this.yaxisIndex=a.globals.seriesYAxisReverseMap[c][0],u=c);const p=this.barHelpers.initialPositions(c),{y:x,barHeight:f,yDivision:y,zeroW:m,x:v,barWidth:C,xDivision:w,zeroH:I}=p;l=x,n=v,d.push(n+(null!=C?C:0)/2);const W=i.group({class:"apexcharts-datalabels","data:realIndex":c});if(this.seriesMaxWeight=0,"group"===this.normalize){(a.violinData.seriesViolinDensity[c]||[]).forEach(t=>{t&&t.maxWeight>this.seriesMaxWeight&&(this.seriesMaxWeight=t.maxWeight)})}const k=[];for(let s=0;s<a.globals.dataPoints;s++){const i=this.barHelpers.getStrokeWidth(e,s,c),o=this.isHorizontal?this.drawHorizontalViolin({indexes:{i:e,j:s,realIndex:c,translationsIndex:u},y:l,yDivision:y,barHeight:f,zeroW:m}):this.drawVerticalViolin({indexes:{i:e,j:s,realIndex:c,translationsIndex:u},x:n,xDivision:w,barWidth:C,zeroH:I});n=o.x,l=o.y,s>0&&d.push(o.center),h.push(o.alongRepresentative);const p=this.buildPointsSubPath({realIndex:c,j:s,center:o.center,halfExtent:o.halfExtent,alongFn:o.alongFn,density:o.density,maxWeight:o.maxWeight});p.length&&k.push({groups:p,j:s});const x=r.fillPath({seriesNumber:this.distributed?s:c,dataPointIndex:s,color:this.distributed?a.globals.colors[s]:void 0,value:t[e][s]});this.renderSeries({realIndex:c,pathFill:x,lineFill:a.globals.stroke.colors[c],j:s,i:e,pathFrom:o.pathFrom,pathTo:o.pathTo,strokeWidth:i,elSeries:g,x:n,y:l,series:t,columnGroupIndex:b,barHeight:f,barWidth:C,elDataLabelsWrap:W,visibleSeries:this.visibleI,type:"violin"});const v=g.node.querySelector(`path.apexcharts-violin-area[j='${s}']`);v&&isFinite(o.alongRepresentative)&&v.setAttribute(this.isHorizontal?"cx":"cy",`${o.alongRepresentative}`)}F({graphics:i,w:a,elSeries:g,pointsByCat:k,options:this.pointsOptions,distributed:this.distributed,realIndex:c,wrapClass:"apexcharts-violin-points-wrap",pointClass:"apexcharts-violin-points"}),a.globals.seriesXvalues[c]=d,a.globals.seriesYvalues[c]=h,o.add(g)}return o}drawVerticalViolin({indexes:t,x:e,xDivision:s,barWidth:a,zeroH:i}){var r;const o=this.w,{realIndex:n,j:l,translationsIndex:h}=t,d=this.yRatio[h];o.axisFlags.isXNumeric&&(e=(o.seriesData.seriesX[n][l]-o.globals.minX)/this.xRatio-a/2);const c=e+a*this.visibleI+a/2,b=a/2,g=this.getDensity(n,l),u=this.effectiveMaxWeight(g),p=t=>i-this.logVal(t,n)/d,x=this.buildBodyPath({nodes:g.nodes,center:c,halfExtent:b,maxWeight:u,vertical:!0,alongFn:p,collapsed:!1});let f=null;return o.globals.previousPaths.length>0&&(f=this.getPreviousPath(n,l,x)),null==f&&(f=this.buildBodyPath({nodes:g.nodes,center:c,halfExtent:b,maxWeight:u,vertical:!0,alongFn:p,collapsed:!0})),o.axisFlags.isXNumeric||(e+=s),{pathTo:x,pathFrom:f,x:e,y:i,center:c,halfExtent:b,alongFn:p,density:g,maxWeight:u,alongRepresentative:p(null!=(r=this.series[t.i][l])?r:0)}}drawHorizontalViolin({indexes:t,y:e,yDivision:s,barHeight:a,zeroW:i}){var r;const o=this.w,{realIndex:n,j:l}=t,h=this.invertedYRatio;o.axisFlags.isXNumeric&&(e=(o.seriesData.seriesX[n][l]-o.globals.minX)/this.invertedXRatio-a/2);const d=e+a*this.visibleI+a/2,c=a/2,b=this.getDensity(n,l),g=this.effectiveMaxWeight(b),u=t=>i+this.logVal(t,n)/h,p=this.buildBodyPath({nodes:b.nodes,center:d,halfExtent:c,maxWeight:g,vertical:!1,alongFn:u,collapsed:!1});let x=null;return o.globals.previousPaths.length>0&&(x=this.getPreviousPath(n,l,p)),null==x&&(x=this.buildBodyPath({nodes:b.nodes,center:d,halfExtent:c,maxWeight:g,vertical:!1,alongFn:u,collapsed:!0})),o.axisFlags.isXNumeric||(e+=s),{pathTo:p,pathFrom:x,x:i,y:e,center:d,halfExtent:c,alongFn:u,maxWeight:g,density:b,alongRepresentative:u(null!=(r=this.series[t.i][l])?r:0)}}getDensity(t,e){var s;const a=null==(s=this.w.violinData.seriesViolinDensity[t])?void 0:s[e];if(!a||!a.values.length)return{nodes:[],maxWeight:0};const i=a.values.map((t,e)=>e);i.sort((t,e)=>a.values[t]-a.values[e]);const r=[];let o=null;for(const t of i){const e=a.values[t];null!==o&&e===o||(r.push({v:e,w:a.weights[t]}),o=e)}return{nodes:r,maxWeight:a.maxWeight}}effectiveMaxWeight(t){return"group"===this.normalize&&this.seriesMaxWeight>0?this.seriesMaxWeight:t.maxWeight}buildBodyPath({nodes:t,center:e,halfExtent:s,maxWeight:a,vertical:i,alongFn:r,collapsed:o}){const n=new g(this.w);if(0===t.length){const t=r(0);return i?n.move(e,t)+n.line(e,t):n.move(t,e)+n.line(t,e)}const l=t=>{if(o||a<=0)return 0;const e=t/a*s*this.bandwidthScale;return Math.min(s,Math.max(0,e))},h=[],d=[];for(let s=0;s<t.length;s++){const a=r(t[s].v),o=l(t[s].w);i?(h.push([e+o,a]),d.push([e-o,a])):(h.push([a,e+o]),d.push([a,e-o]))}return d.reverse(),this.smoothSegment(h,i,!1)+this.smoothSegment(d,i,!0)+"z"}smoothSegment(t,e,s){const a=new g(this.w),i=t[0];let r=s?a.line(i[0],i[1]):a.move(i[0],i[1]);if(t.length<3||!this.strictlyMonotonic(t,e)){for(let e=1;e<t.length;e++)r+=a.line(t[e][0],t[e][1]);return r}const o=t.map(([t,s])=>e?[s,t]:[t,s]),n=S.points(o);return r+=(t=>{let e="";for(let s=0;s<t.length;s++){const a=t[s],i=a.length;i>4?(e+=`C${a[0]}, ${a[1]}`,e+=`, ${a[2]}, ${a[3]}`,e+=`, ${a[4]}, ${a[5]}`):i>2&&(e+=`S${a[0]}, ${a[1]}`,e+=`, ${a[2]}, ${a[3]}`)}return e})(e?n.map(z):n),r}strictlyMonotonic(t,e){const s=e?1:0;for(let e=1;e<t.length;e++)if(t[e][s]===t[e-1][s])return!1;return!0}buildPointsSubPath({realIndex:t,j:e,center:s,halfExtent:a,alongFn:i,density:r,maxWeight:o}){var n;return function({w:t,points:e,seedA:s,seedB:a,center:i,halfExtent:r,alongFn:o,isHorizontal:n,options:l,clampAt:h}){const d=l;if(!d||!1===d.show)return[];if(!e||!e.length)return[];const c=d.maxPoints||3e3,b=e.length>c?Math.ceil(e.length/c):1,g=null!=d.size?d.size:2.5,u=r*(null!=d.jitter?d.jitter:.5),p=!1!==d.constrainToViolin&&"function"==typeof h,x="square"===d.shape,f=d.colorScale,y=f&&Array.isArray(f.colors)&&f.colors.length>0,m=y?Math.max(2,f.steps||24):1,v=y&&null!=f.min?f.min:t.globals.minY,C=(y&&null!=f.max?f.max:t.globals.maxY)-v||1,w=y?new Array(m).fill(""):[""];for(let t=0;t<e.length;t+=b){const r=e[t],l=o(r);let d=2*(j(7919*s+100003*a+t)-.5)*u;if(p){const t=h(r);d>t&&(d=t),d<-t&&(d=-t)}const c=n?l:i+d,b=n?i+d:l,f=x?B(c,b,g):M(c,b,g);if(y){let t=(r-v)/C;t<0&&(t=0),t>1&&(t=1),w[Math.round(t*(m-1))]+=f}else w[0]+=f}if(!y)return w[0]?[{fill:null,d:w[0]}]:[];const P=[];for(let t=0;t<m;t++)w[t]&&P.push({fill:X(f.colors,t/(m-1)),d:w[t]});return P}({w:this.w,points:null==(n=this.w.violinData.seriesViolinPoints[t])?void 0:n[e],seedA:t,seedB:e,center:s,halfExtent:a,alongFn:i,isHorizontal:this.isHorizontal,options:this.pointsOptions,clampAt:t=>this.halfWidthAtValue(t,r,a,o)})}halfWidthAtValue(t,e,s,a){const{nodes:i}=e,r=null!=a?a:e.maxWeight;if(!i.length||r<=0)return 0;const o=t=>Math.min(s,t/r*s*this.bandwidthScale);if(t<=i[0].v)return o(i[0].w);if(t>=i[i.length-1].v)return o(i[i.length-1].w);for(let e=1;e<i.length;e++)if(t<=i[e].v){const s=i[e-1],a=i[e],r=a.v===s.v?0:(t-s.v)/(a.v-s.v);return o(s.w+(a.w-s.w)*r)}return 0}logVal(t,e){return this.coreUtils.getLogValAtSeriesIndex(t,e)}}}),exports.default=h;
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * ApexCharts v6.3.0
21
+ * ApexCharts v6.4.0
22
22
  * (c) 2018-2026 ApexCharts
23
23
  */
24
24
  import * as _core from "apexcharts/core";
@@ -27,6 +27,172 @@ import { default as default2 } from "apexcharts/core";
27
27
  const CoreUtils = _core.__apex_CoreUtils;
28
28
  const Graphics = _core.__apex_Graphics;
29
29
  const DataLabels = _core.__apex_DataLabels;
30
+ const BrowserAPIs = _core.__apex_BrowserAPIs_BrowserAPIs;
31
+ const Environment = _core.__apex_Environment_Environment;
32
+ function lengthTransitionEnabled(w) {
33
+ var _a;
34
+ const anim = w.config.chart.animations;
35
+ if (!anim || anim.enabled === false) return false;
36
+ if (!anim.dynamicAnimation || anim.dynamicAnimation.enabled === false) {
37
+ return false;
38
+ }
39
+ const largeThreshold = (_a = anim.largeDatasetThreshold) != null ? _a : 0;
40
+ if (largeThreshold > 0 && w.globals.dataPoints > largeThreshold) return false;
41
+ return !!(Environment.isBrowser() && w.globals.dataChanged && w.globals.shouldAnimate);
42
+ }
43
+ function datumKey(w, realIndex, j) {
44
+ var _a, _b, _c, _d;
45
+ if ((_a = w.axisFlags) == null ? void 0 : _a.isXNumeric) {
46
+ const sx = (_c = (_b = w.seriesData) == null ? void 0 : _b.seriesX) == null ? void 0 : _c[realIndex];
47
+ if (sx && sx.length && sx[j] != null) return "x:" + sx[j];
48
+ }
49
+ const lbl = (_d = w.globals.labels) == null ? void 0 : _d[j];
50
+ if (lbl != null && String(lbl) !== "") {
51
+ return "c:" + (Array.isArray(lbl) ? lbl.join(" ") : String(lbl));
52
+ }
53
+ return "j:" + j;
54
+ }
55
+ function frameDatumKey(frame, realIndex, j) {
56
+ var _a, _b;
57
+ if (frame.isXNumeric) {
58
+ const sx = (_a = frame.seriesX) == null ? void 0 : _a[realIndex];
59
+ if (sx && sx.length && sx[j] != null) return "x:" + sx[j];
60
+ }
61
+ const lbl = (_b = frame.labels) == null ? void 0 : _b[j];
62
+ if (lbl != null && String(lbl) !== "") {
63
+ return "c:" + (Array.isArray(lbl) ? lbl.join(" ") : String(lbl));
64
+ }
65
+ return "j:" + j;
66
+ }
67
+ function joinKeys(oldKeys, newKeys) {
68
+ const oldIndex = /* @__PURE__ */ new Map();
69
+ oldKeys.forEach((k, i) => {
70
+ if (!oldIndex.has(k)) oldIndex.set(k, i);
71
+ });
72
+ const toOld = new Array(newKeys.length);
73
+ const usedOld = /* @__PURE__ */ new Set();
74
+ let prev = -1;
75
+ let ordered = true;
76
+ let identity = oldKeys.length === newKeys.length;
77
+ newKeys.forEach((k, i) => {
78
+ const oi = oldIndex.has(k) && !usedOld.has(oldIndex.get(k)) ? oldIndex.get(k) : -1;
79
+ toOld[i] = oi;
80
+ if (oi !== -1) {
81
+ usedOld.add(oi);
82
+ if (oi < prev) ordered = false;
83
+ prev = oi;
84
+ }
85
+ if (oi !== i) identity = false;
86
+ });
87
+ const exits = [];
88
+ for (let i = 0; i < oldKeys.length; i++) {
89
+ if (!usedOld.has(i)) exits.push(i);
90
+ }
91
+ return { toOld, exits, ordered, changed: !identity };
92
+ }
93
+ function uniquifyKeys(keys) {
94
+ const seen = /* @__PURE__ */ new Map();
95
+ return keys.map((k) => {
96
+ const count = seen.get(k) || 0;
97
+ seen.set(k, count + 1);
98
+ return count === 0 ? k : `${k}#${count}`;
99
+ });
100
+ }
101
+ function seriesJoin(w, realIndex, includeIdentity = false, allowReorder = false) {
102
+ var _a, _b;
103
+ if (!lengthTransitionEnabled(w)) return null;
104
+ const frame = w.globals.prevStreamFrame;
105
+ if (!frame) return null;
106
+ const oldY = (_a = frame.seriesY) == null ? void 0 : _a[realIndex];
107
+ const newY = (_b = w.seriesData.series) == null ? void 0 : _b[realIndex];
108
+ if (!Array.isArray(oldY) || !Array.isArray(newY)) return null;
109
+ if (!oldY.length || !newY.length) return null;
110
+ const oldKeys = uniquifyKeys(
111
+ oldY.map((_, j) => frameDatumKey(frame, realIndex, j))
112
+ );
113
+ const newKeys = uniquifyKeys(newY.map((_, j) => datumKey(w, realIndex, j)));
114
+ const join = joinKeys(oldKeys, newKeys);
115
+ if (!join.ordered && !allowReorder) return null;
116
+ if (!join.changed && !includeIdentity) return null;
117
+ return { join, oldKeys, newKeys };
118
+ }
119
+ function firstMove(d) {
120
+ const m = /^M\s*([+-]?[\d.eE]+)[\s,]+([+-]?[\d.eE]+)/.exec(d || "");
121
+ if (!m) return null;
122
+ const x = parseFloat(m[1]);
123
+ const y = parseFloat(m[2]);
124
+ return isFinite(x) && isFinite(y) ? { x, y } : null;
125
+ }
126
+ function renderBarExitGhosts({
127
+ w,
128
+ elSeries,
129
+ record,
130
+ newKeys,
131
+ isHorizontal,
132
+ speed
133
+ }) {
134
+ var _a;
135
+ if (!lengthTransitionEnabled(w)) return;
136
+ if (!record || !Array.isArray(record.paths) || !(elSeries == null ? void 0 : elSeries.node)) return;
137
+ const newKeySet = new Set(newKeys);
138
+ const exits = record.paths.filter(
139
+ (p) => p && p.d && p.key != null && !newKeySet.has(p.key)
140
+ );
141
+ if (!exits.length) return;
142
+ const graphics = new Graphics(w);
143
+ const fallbackFill = (_a = w.globals.colors) == null ? void 0 : _a[parseInt(String(record.realIndex), 10)];
144
+ exits.forEach((p) => {
145
+ let fill = p.fill || fallbackFill || "#c8c8c8";
146
+ if (String(fill).indexOf("url(") === 0) fill = fallbackFill || "#c8c8c8";
147
+ const ghost = graphics.drawPath({
148
+ d: p.d,
149
+ stroke: "none",
150
+ strokeWidth: 0,
151
+ fill,
152
+ fillOpacity: 1,
153
+ classes: "apexcharts-bar-ghost"
154
+ });
155
+ const node = ghost.node;
156
+ node.setAttribute("pointer-events", "none");
157
+ ghost.attr(
158
+ "clip-path",
159
+ `url(#gridRectBarMask${w.globals.cuid})`
160
+ );
161
+ elSeries.node.insertBefore(node, elSeries.node.firstChild);
162
+ const start = firstMove(p.d);
163
+ let origin = isHorizontal ? "left center" : "center bottom";
164
+ try {
165
+ const bb = node.getBBox();
166
+ if (start && bb) {
167
+ if (isHorizontal) {
168
+ origin = Math.abs(start.x - bb.x) <= Math.abs(start.x - (bb.x + bb.width)) ? "left center" : "right center";
169
+ } else {
170
+ origin = Math.abs(start.y - (bb.y + bb.height)) <= Math.abs(start.y - bb.y) ? "center bottom" : "center top";
171
+ }
172
+ }
173
+ } catch (_) {
174
+ }
175
+ const style = node.style;
176
+ style.transformBox = "fill-box";
177
+ style.transformOrigin = origin;
178
+ const duration = Math.max(1, speed || 1);
179
+ const startAt = performance.now();
180
+ const step = (now) => {
181
+ if (w.globals.isDestroyed || !node.parentNode) return;
182
+ const t = Math.max(0, Math.min(1, (now - startAt) / duration));
183
+ const eased = 1 - Math.pow(1 - t, 3);
184
+ const scale = 1 - eased;
185
+ style.transform = isHorizontal ? `scaleX(${scale})` : `scaleY(${scale})`;
186
+ style.opacity = String(1 - eased);
187
+ if (t < 1) {
188
+ BrowserAPIs.requestAnimationFrame(step);
189
+ } else {
190
+ node.parentNode.removeChild(node);
191
+ }
192
+ };
193
+ BrowserAPIs.requestAnimationFrame(step);
194
+ });
195
+ }
30
196
  class BarDataLabels {
31
197
  /**
32
198
  * @param {import('../../../charts/Bar').default} barCtx
@@ -477,6 +643,7 @@ class BarDataLabels {
477
643
  barWidth,
478
644
  dataLabelsConfig
479
645
  }) {
646
+ var _a, _b;
480
647
  const w = this.w;
481
648
  let rotate = "rotate(0)";
482
649
  if (w.config.plotOptions.bar.dataLabels.orientation === "vertical")
@@ -491,6 +658,17 @@ class BarDataLabels {
491
658
  class: "apexcharts-data-labels",
492
659
  transform: rotate
493
660
  });
661
+ const dlCfg = w.config.dataLabels;
662
+ if (((_a = dlCfg.animate) == null ? void 0 : _a.enabled) || ((_b = dlCfg.countUp) == null ? void 0 : _b.enabled)) {
663
+ elDataLabelsWrap.node.setAttribute(
664
+ "data:dlKey",
665
+ `${i}::${datumKey(w, i, j)}`
666
+ );
667
+ elDataLabelsWrap.node.setAttribute("data:dlJ", String(j));
668
+ if (typeof val === "number" && isFinite(val)) {
669
+ elDataLabelsWrap.node.setAttribute("data:dlVal", String(val));
670
+ }
671
+ }
494
672
  let text = "";
495
673
  if (typeof val !== "undefined") {
496
674
  text = formatter(val, __spreadProps(__spreadValues({}, w), {
@@ -1414,108 +1592,6 @@ class Helpers {
1414
1592
  }
1415
1593
  const Filters = _core.__apex_Filters;
1416
1594
  const computeStagger = _core.__apex_Animations_computeStagger;
1417
- const BrowserAPIs = _core.__apex_BrowserAPIs_BrowserAPIs;
1418
- const Environment = _core.__apex_Environment_Environment;
1419
- function lengthTransitionEnabled(w) {
1420
- var _a;
1421
- const anim = w.config.chart.animations;
1422
- if (!anim || anim.enabled === false) return false;
1423
- if (!anim.dynamicAnimation || anim.dynamicAnimation.enabled === false) {
1424
- return false;
1425
- }
1426
- const largeThreshold = (_a = anim.largeDatasetThreshold) != null ? _a : 0;
1427
- if (largeThreshold > 0 && w.globals.dataPoints > largeThreshold) return false;
1428
- return !!(Environment.isBrowser() && w.globals.dataChanged && w.globals.shouldAnimate);
1429
- }
1430
- function datumKey(w, realIndex, j) {
1431
- var _a, _b, _c, _d;
1432
- if ((_a = w.axisFlags) == null ? void 0 : _a.isXNumeric) {
1433
- const sx = (_c = (_b = w.seriesData) == null ? void 0 : _b.seriesX) == null ? void 0 : _c[realIndex];
1434
- if (sx && sx.length && sx[j] != null) return "x:" + sx[j];
1435
- }
1436
- const lbl = (_d = w.globals.labels) == null ? void 0 : _d[j];
1437
- if (lbl != null && String(lbl) !== "") {
1438
- return "c:" + (Array.isArray(lbl) ? lbl.join(" ") : String(lbl));
1439
- }
1440
- return "j:" + j;
1441
- }
1442
- function firstMove(d) {
1443
- const m = /^M\s*([+-]?[\d.eE]+)[\s,]+([+-]?[\d.eE]+)/.exec(d || "");
1444
- if (!m) return null;
1445
- const x = parseFloat(m[1]);
1446
- const y = parseFloat(m[2]);
1447
- return isFinite(x) && isFinite(y) ? { x, y } : null;
1448
- }
1449
- function renderBarExitGhosts({
1450
- w,
1451
- elSeries,
1452
- record,
1453
- newKeys,
1454
- isHorizontal,
1455
- speed
1456
- }) {
1457
- var _a;
1458
- if (!lengthTransitionEnabled(w)) return;
1459
- if (!record || !Array.isArray(record.paths) || !(elSeries == null ? void 0 : elSeries.node)) return;
1460
- const newKeySet = new Set(newKeys);
1461
- const exits = record.paths.filter(
1462
- (p) => p && p.d && p.key != null && !newKeySet.has(p.key)
1463
- );
1464
- if (!exits.length) return;
1465
- const graphics = new Graphics(w);
1466
- const fallbackFill = (_a = w.globals.colors) == null ? void 0 : _a[parseInt(String(record.realIndex), 10)];
1467
- exits.forEach((p) => {
1468
- let fill = p.fill || fallbackFill || "#c8c8c8";
1469
- if (String(fill).indexOf("url(") === 0) fill = fallbackFill || "#c8c8c8";
1470
- const ghost = graphics.drawPath({
1471
- d: p.d,
1472
- stroke: "none",
1473
- strokeWidth: 0,
1474
- fill,
1475
- fillOpacity: 1,
1476
- classes: "apexcharts-bar-ghost"
1477
- });
1478
- const node = ghost.node;
1479
- node.setAttribute("pointer-events", "none");
1480
- ghost.attr(
1481
- "clip-path",
1482
- `url(#gridRectBarMask${w.globals.cuid})`
1483
- );
1484
- elSeries.node.insertBefore(node, elSeries.node.firstChild);
1485
- const start = firstMove(p.d);
1486
- let origin = isHorizontal ? "left center" : "center bottom";
1487
- try {
1488
- const bb = node.getBBox();
1489
- if (start && bb) {
1490
- if (isHorizontal) {
1491
- origin = Math.abs(start.x - bb.x) <= Math.abs(start.x - (bb.x + bb.width)) ? "left center" : "right center";
1492
- } else {
1493
- origin = Math.abs(start.y - (bb.y + bb.height)) <= Math.abs(start.y - bb.y) ? "center bottom" : "center top";
1494
- }
1495
- }
1496
- } catch (_) {
1497
- }
1498
- const style = node.style;
1499
- style.transformBox = "fill-box";
1500
- style.transformOrigin = origin;
1501
- const duration = Math.max(1, speed || 1);
1502
- const startAt = performance.now();
1503
- const step = (now) => {
1504
- if (w.globals.isDestroyed || !node.parentNode) return;
1505
- const t = Math.max(0, Math.min(1, (now - startAt) / duration));
1506
- const eased = 1 - Math.pow(1 - t, 3);
1507
- const scale = 1 - eased;
1508
- style.transform = isHorizontal ? `scaleX(${scale})` : `scaleY(${scale})`;
1509
- style.opacity = String(1 - eased);
1510
- if (t < 1) {
1511
- BrowserAPIs.requestAnimationFrame(step);
1512
- } else {
1513
- node.parentNode.removeChild(node);
1514
- }
1515
- };
1516
- BrowserAPIs.requestAnimationFrame(step);
1517
- });
1518
- }
1519
1595
  function seriesEmitter(ctx, graphics) {
1520
1596
  const r = ctx && ctx.renderer;
1521
1597
  return r && r.kind && r.kind !== "svg" ? r : graphics;
@@ -1559,6 +1635,7 @@ class Bar {
1559
1635
  this.pathArr = [];
1560
1636
  this._prevKeyed = null;
1561
1637
  this._ltCache = null;
1638
+ this._layoutShiftCache = null;
1562
1639
  this.series = [];
1563
1640
  this.elSeries = null;
1564
1641
  this.visibleI = 0;
@@ -1587,7 +1664,7 @@ class Bar {
1587
1664
  * @return {Element} element which is supplied to parent chart draw method for appending
1588
1665
  **/
1589
1666
  draw(series, seriesIndex) {
1590
- var _a, _b;
1667
+ var _a, _b, _c;
1591
1668
  const w = this.w;
1592
1669
  const graphics = new Graphics(this.w);
1593
1670
  const coreUtils = new CoreUtils(this.w);
@@ -1661,8 +1738,10 @@ class Bar {
1661
1738
  el: elDataLabelsWrap.node,
1662
1739
  // On a layout-changing update the labels must stay hidden through the
1663
1740
  // reflow morph (the updateOptions flow otherwise reveals them at
1664
- // frame 0, where they float over sliding bars).
1665
- holdUntilComplete: this.isLengthTransition(realIndex)
1741
+ // frame 0, where they float over sliding bars). When dataLabels.animate
1742
+ // is on the labels instead RIDE the morph (see DataLabelTransition), so
1743
+ // keep them visible: holding would hide the very motion we want to show.
1744
+ holdUntilComplete: !((_a = w.config.dataLabels.animate) == null ? void 0 : _a.enabled) && this.isLengthTransition(realIndex)
1666
1745
  });
1667
1746
  elDataLabelsWrap.node.classList.add("apexcharts-element-hidden");
1668
1747
  const elGoalsMarkers = graphics.group({
@@ -1715,9 +1794,9 @@ class Bar {
1715
1794
  j,
1716
1795
  realIndex
1717
1796
  );
1718
- if (this.isFunnel && !this.isPyramid && this.barOptions.isFunnel3d && ((_a = w.config.plotOptions.funnel) == null ? void 0 : _a.shape) !== "trapezoid" && this.pathArr.length && j > 0) {
1797
+ if (this.isFunnel && !this.isPyramid && this.barOptions.isFunnel3d && ((_b = w.config.plotOptions.funnel) == null ? void 0 : _b.shape) !== "trapezoid" && this.pathArr.length && j > 0) {
1719
1798
  const barShadow = this.barHelpers.drawBarShadow({
1720
- color: typeof pathFill.color === "string" && ((_b = pathFill.color) == null ? void 0 : _b.indexOf("url")) === -1 ? pathFill.color : Utils.hexToRgba(w.globals.colors[i]),
1799
+ color: typeof pathFill.color === "string" && ((_c = pathFill.color) == null ? void 0 : _c.indexOf("url")) === -1 ? pathFill.color : Utils.hexToRgba(w.globals.colors[i]),
1721
1800
  prevPaths: this.pathArr[this.pathArr.length - 1],
1722
1801
  currPaths: paths,
1723
1802
  realIndex,
@@ -1889,7 +1968,7 @@ class Bar {
1889
1968
  }
1890
1969
  const animCfg = w.config.chart.animations;
1891
1970
  const gradCfg = animCfg.animateGradually;
1892
- const staggerEnabled = gradCfg && gradCfg.enabled !== false && !(w.globals.dataChanged && this.isLengthTransition(realIndex));
1971
+ const staggerEnabled = gradCfg && gradCfg.enabled !== false && !(w.globals.dataChanged && this.isLayoutShift(realIndex));
1893
1972
  let delay = 0;
1894
1973
  if (staggerEnabled) {
1895
1974
  const totalBars = w.globals.dataPoints || 1;
@@ -2303,6 +2382,26 @@ class Bar {
2303
2382
  this._ltCache[realIndex] = result;
2304
2383
  return result;
2305
2384
  }
2385
+ /**
2386
+ * Whether this update moves survivors to new slots: a length change
2387
+ * (enter/exit, via isLengthTransition) OR a pure reorder (a "bar chart race"
2388
+ * swap, same datum set in a new order). Used to drop the per-bar stagger so
2389
+ * all bars slide on one shared clock, staying locked to the axis/data labels.
2390
+ * Broader than isLengthTransition, which is deliberately enter/exit-only
2391
+ * (exit ghosts / baseline enters must not fire on a plain reorder).
2392
+ * @param {number} realIndex
2393
+ */
2394
+ isLayoutShift(realIndex) {
2395
+ if (this.isLengthTransition(realIndex)) return true;
2396
+ if (!this._layoutShiftCache) this._layoutShiftCache = {};
2397
+ if (this._layoutShiftCache[realIndex] !== void 0) {
2398
+ return this._layoutShiftCache[realIndex];
2399
+ }
2400
+ const sj = seriesJoin(this.w, realIndex, true, true);
2401
+ const result = !!(sj && sj.join.changed);
2402
+ this._layoutShiftCache[realIndex] = result;
2403
+ return result;
2404
+ }
2306
2405
  /**
2307
2406
  * Resolve `pathFrom` for a bar on data update, joining old and new datums
2308
2407
  * by KEY (category label / x value) so survivors keep their identity across
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apexcharts",
3
- "version": "6.3.0",
3
+ "version": "6.4.0",
4
4
  "description": "A JavaScript Chart Library",
5
5
  "repository": {
6
6
  "type": "git",