vue-data-ui 3.22.2 → 3.22.3

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 (176) hide show
  1. package/dist/{Arrow-BGhJI-qh.js → Arrow-Ct8T_Lyp.js} +1 -1
  2. package/dist/{BaseDraggableDialog-a9xCKjW-.js → BaseDraggableDialog-DLuXvUbs.js} +2 -2
  3. package/dist/{BaseIcon-DEtwcvEH.js → BaseIcon-CX_ChMz-.js} +1 -1
  4. package/dist/{BaseLegendToggle-B-lM0iV1.js → BaseLegendToggle-qL0O9ooF.js} +1 -1
  5. package/dist/{BaseZoomControls-BjjT6vtB.js → BaseZoomControls-BI5sLb6d.js} +2 -2
  6. package/dist/{ColorPicker-DMLahA2S.js → ColorPicker-CwyWzPx_.js} +2 -2
  7. package/dist/{DataTable-DJZgdnIn.js → DataTable-KEMekOVu.js} +2 -2
  8. package/dist/{Legend-BVDhEEsC.js → Legend--t7Mbp9Z.js} +2 -2
  9. package/dist/{NonSvgPenAndPaper-Dwq_M6Bz.js → NonSvgPenAndPaper-CeNJtWON.js} +3 -3
  10. package/dist/{PackageVersion-Dx81ZIAL.js → PackageVersion-D-_GVhxY.js} +1 -1
  11. package/dist/{PenAndPaper-DJIIG6dv.js → PenAndPaper-DkZYRnrW.js} +3 -3
  12. package/dist/{Shape-C5OvuwII.js → Shape-S-7v8SAE.js} +1 -1
  13. package/dist/{Slicer-ClR833cP.js → Slicer-CpBaahpI.js} +2 -2
  14. package/dist/{SlicerPreview-CAhqG_ZQ.js → SlicerPreview-Co-V9YBf.js} +2 -2
  15. package/dist/{SparkTooltip-DTzo8Sah.js → SparkTooltip-D2BBjZKc.js} +1 -1
  16. package/dist/{Title-CVYf1f8m.js → Title-Cxgd_JyY.js} +1 -1
  17. package/dist/{Tooltip-BmGCBJuU.js → Tooltip-BqdN_ZBE.js} +1 -1
  18. package/dist/{UserOptions-xqbNpHi2.js → UserOptions-WIxTs7Xf.js} +2 -2
  19. package/dist/components/arrow.js +1 -1
  20. package/dist/components/vue-ui-3d-bar.js +1 -1
  21. package/dist/components/vue-ui-accordion.js +1 -1
  22. package/dist/components/vue-ui-age-pyramid.js +1 -1
  23. package/dist/components/vue-ui-annotator.js +1 -1
  24. package/dist/components/vue-ui-bullet.js +1 -1
  25. package/dist/components/vue-ui-bump.js +1 -1
  26. package/dist/components/vue-ui-candlestick.js +1 -1
  27. package/dist/components/vue-ui-carousel-table.js +1 -1
  28. package/dist/components/vue-ui-chestnut.js +1 -1
  29. package/dist/components/vue-ui-chord.js +1 -1
  30. package/dist/components/vue-ui-circle-pack.js +1 -1
  31. package/dist/components/vue-ui-cursor.js +1 -1
  32. package/dist/components/vue-ui-dag.js +1 -1
  33. package/dist/components/vue-ui-dashboard.js +1 -1
  34. package/dist/components/vue-ui-digits.js +1 -1
  35. package/dist/components/vue-ui-donut-evolution.js +1 -1
  36. package/dist/components/vue-ui-donut.js +1 -1
  37. package/dist/components/vue-ui-dumbbell.js +1 -1
  38. package/dist/components/vue-ui-flow.js +1 -1
  39. package/dist/components/vue-ui-funnel.js +1 -1
  40. package/dist/components/vue-ui-galaxy.js +1 -1
  41. package/dist/components/vue-ui-gauge.js +1 -1
  42. package/dist/components/vue-ui-geo.js +1 -1
  43. package/dist/components/vue-ui-gizmo.js +1 -1
  44. package/dist/components/vue-ui-heatmap.js +1 -1
  45. package/dist/components/vue-ui-history-plot.js +1 -1
  46. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  47. package/dist/components/vue-ui-icon.js +1 -1
  48. package/dist/components/vue-ui-kpi.js +1 -1
  49. package/dist/components/vue-ui-mini-loader.js +1 -1
  50. package/dist/components/vue-ui-molecule.js +1 -1
  51. package/dist/components/vue-ui-mood-radar.js +1 -1
  52. package/dist/components/vue-ui-nested-donuts.js +1 -1
  53. package/dist/components/vue-ui-onion.js +1 -1
  54. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  55. package/dist/components/vue-ui-quadrant.js +1 -1
  56. package/dist/components/vue-ui-quick-chart.js +1 -1
  57. package/dist/components/vue-ui-radar.js +1 -1
  58. package/dist/components/vue-ui-rating.js +1 -1
  59. package/dist/components/vue-ui-relation-circle.js +1 -1
  60. package/dist/components/vue-ui-ridgeline.js +1 -1
  61. package/dist/components/vue-ui-rings.js +1 -1
  62. package/dist/components/vue-ui-scatter.js +1 -1
  63. package/dist/components/vue-ui-skeleton.js +1 -1
  64. package/dist/components/vue-ui-smiley.js +1 -1
  65. package/dist/components/vue-ui-spark-trend.js +1 -1
  66. package/dist/components/vue-ui-sparkbar.js +1 -1
  67. package/dist/components/vue-ui-sparkgauge.js +1 -1
  68. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  69. package/dist/components/vue-ui-sparkline.js +1 -1
  70. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  71. package/dist/components/vue-ui-stackbar.js +1 -1
  72. package/dist/components/vue-ui-stackline.js +1 -1
  73. package/dist/components/vue-ui-strip-plot.js +1 -1
  74. package/dist/components/vue-ui-table-heatmap.js +1 -1
  75. package/dist/components/vue-ui-table-sparkline.js +1 -1
  76. package/dist/components/vue-ui-table.js +1 -1
  77. package/dist/components/vue-ui-thermometer.js +1 -1
  78. package/dist/components/vue-ui-timer.js +1 -1
  79. package/dist/components/vue-ui-tiremarks.js +1 -1
  80. package/dist/components/vue-ui-treemap.js +1 -1
  81. package/dist/components/vue-ui-vertical-bar.js +1 -1
  82. package/dist/components/vue-ui-waffle.js +1 -1
  83. package/dist/components/vue-ui-wheel.js +1 -1
  84. package/dist/components/vue-ui-word-cloud.js +1 -1
  85. package/dist/components/vue-ui-world.js +1 -1
  86. package/dist/components/vue-ui-xy-canvas.js +1 -1
  87. package/dist/components/vue-ui-xy.js +1 -1
  88. package/dist/{dom-to-png-rjAIVHxa.js → dom-to-png-DsEPQbU1.js} +1 -1
  89. package/dist/{exposedLib-CffbQxjN.js → exposedLib-BkRxoSB9.js} +1 -1
  90. package/dist/{img-BCAOkqfM.js → img-CyjhDDaM.js} +1 -1
  91. package/dist/{labelUtils-C0D1tjig.js → labelUtils-WDjGa7EP.js} +1 -1
  92. package/dist/{lib-CXicicWN.js → lib-NmjQazSn.js} +1 -1
  93. package/dist/{package-CILLITOI.js → package-KQdsc0if.js} +1 -1
  94. package/dist/{pdf-ChYv2jb6.js → pdf-BVocBz-Y.js} +1 -1
  95. package/dist/{render-common-bMAFQ_qf.js → render-common-BUbY65H0.js} +2 -2
  96. package/dist/ssr/vue-ui-donut.js +1 -1
  97. package/dist/ssr/vue-ui-xy.js +1 -1
  98. package/dist/ssr.js +2 -2
  99. package/dist/style.css +1 -1
  100. package/dist/types/vue-data-ui.d.ts +10 -0
  101. package/dist/{useAutoSizeLabelsInsideViewbox-B4-0yo3K.js → useAutoSizeLabelsInsideViewbox-DBv7sw1h.js} +1 -1
  102. package/dist/{useNestedProp-APyFoLCQ.js → useNestedProp-C9viY7oU.js} +1 -1
  103. package/dist/{usePrinter-Dng0UK-G.js → usePrinter-DRYgV-XS.js} +2 -2
  104. package/dist/utils.js +2 -2
  105. package/dist/{vue-data-ui-DD-txoS1.js → vue-data-ui-CDgunUso.js} +68 -68
  106. package/dist/vue-data-ui.js +71 -71
  107. package/dist/{vue-ui-3d-bar-DxfNdF2e.js → vue-ui-3d-bar-BrSoUZQ_.js} +6 -6
  108. package/dist/{vue-ui-accordion-Di_givzQ.js → vue-ui-accordion-vYLqcJJd.js} +3 -3
  109. package/dist/{vue-ui-age-pyramid-CTwMfsqS.js → vue-ui-age-pyramid-CCAcpoA2.js} +6 -6
  110. package/dist/{vue-ui-annotator-tRkLFMQ9.js → vue-ui-annotator-CmjcPCRy.js} +6 -6
  111. package/dist/{vue-ui-bullet-9gtGJaGb.js → vue-ui-bullet-BYrQAbvp.js} +7 -7
  112. package/dist/{vue-ui-bump-BJ5O8Mps.js → vue-ui-bump-UWs3Fols.js} +6 -6
  113. package/dist/{vue-ui-candlestick-CJ_VVYbJ.js → vue-ui-candlestick-CJw3R21J.js} +7 -7
  114. package/dist/{vue-ui-carousel-table-8s8BSy-K.js → vue-ui-carousel-table-DiPXX1eV.js} +4 -4
  115. package/dist/{vue-ui-chestnut-D3-ck2h2.js → vue-ui-chestnut-DJkyr3uK.js} +5 -5
  116. package/dist/{vue-ui-chord-1BitQtEw.js → vue-ui-chord-MB6BktFk.js} +8 -8
  117. package/dist/{vue-ui-circle-pack-DVMhDFKU.js → vue-ui-circle-pack-D4n5rKtA.js} +6 -6
  118. package/dist/{vue-ui-cursor-D7yh10hX.js → vue-ui-cursor-Cu_HGeoy.js} +3 -3
  119. package/dist/{vue-ui-dag--LFEAAf_.js → vue-ui-dag-DQlbTBPB.js} +7 -7
  120. package/dist/{vue-ui-dashboard-COeO878g.js → vue-ui-dashboard-BD-M8q8G.js} +69 -69
  121. package/dist/{vue-ui-digits-C50FVr7C.js → vue-ui-digits-C21SWRDQ.js} +3 -3
  122. package/dist/{vue-ui-donut-NHjQzFO5.js → vue-ui-donut-BPOS4Aoe.js} +10 -10
  123. package/dist/{vue-ui-donut-BzKXqQA2.js → vue-ui-donut-Djiw7Rz1.js} +2 -2
  124. package/dist/{vue-ui-donut-evolution-lPkwit2C.js → vue-ui-donut-evolution-BkI06V1N.js} +9 -9
  125. package/dist/{vue-ui-dumbbell-hlEfvbbf.js → vue-ui-dumbbell-Yn79Apx7.js} +7 -7
  126. package/dist/{vue-ui-flow-Bg_OSszc.js → vue-ui-flow-DfWx60DS.js} +7 -7
  127. package/dist/{vue-ui-funnel-B_bK0jJB.js → vue-ui-funnel-hsmCJgE5.js} +6 -6
  128. package/dist/{vue-ui-galaxy-WVCUzcYc.js → vue-ui-galaxy-BC-D8ZZ6.js} +9 -9
  129. package/dist/{vue-ui-gauge-Cqeko0wA.js → vue-ui-gauge-CnDTR46T.js} +7 -7
  130. package/dist/{vue-ui-geo-DtzXRvmx.js → vue-ui-geo-DdB-gJBh.js} +7 -7
  131. package/dist/{vue-ui-gizmo-hIFd7qck.js → vue-ui-gizmo-AMWvrL1N.js} +3 -3
  132. package/dist/{vue-ui-heatmap-yPlwc3l_.js → vue-ui-heatmap-8cmpKIN5.js} +7 -7
  133. package/dist/{vue-ui-history-plot-BGmcDg2w.js → vue-ui-history-plot-ZcraxoDy.js} +8 -8
  134. package/dist/{vue-ui-horizontal-bar-CJciNHpT.js → vue-ui-horizontal-bar-D32lWjQJ.js} +10 -10
  135. package/dist/{vue-ui-kpi-DmSe1QGb.js → vue-ui-kpi-B3FdCV-T.js} +3 -3
  136. package/dist/{vue-ui-mini-loader-CqxI6DwN.js → vue-ui-mini-loader-Bk-5TDbT.js} +2 -2
  137. package/dist/{vue-ui-molecule-w-94Uktn.js → vue-ui-molecule-B4fNC1Bk.js} +5 -5
  138. package/dist/{vue-ui-mood-radar-B3OGWGHR.js → vue-ui-mood-radar-_mw9D1wg.js} +7 -7
  139. package/dist/{vue-ui-nested-donuts-Dv_yE5EV.js → vue-ui-nested-donuts-DPhDz07R.js} +9 -9
  140. package/dist/{vue-ui-onion-BQbI0Vxd.js → vue-ui-onion-Cob0y2FO.js} +10 -10
  141. package/dist/{vue-ui-parallel-coordinate-plot-ColST3Jj.js → vue-ui-parallel-coordinate-plot-BPyfEQEf.js} +9 -9
  142. package/dist/{vue-ui-quadrant-BB7qdXK0.js → vue-ui-quadrant-D6wv44Hs.js} +9 -9
  143. package/dist/{vue-ui-quick-chart-CGDeo3Fx.js → vue-ui-quick-chart-EeT-lzAq.js} +7 -7
  144. package/dist/{vue-ui-radar-DqDn14DL.js → vue-ui-radar-DNid-gVu.js} +9 -9
  145. package/dist/{vue-ui-rating-ChDwpol2.js → vue-ui-rating-DlMTyra_.js} +2 -2
  146. package/dist/{vue-ui-relation-circle-BvfZqcK0.js → vue-ui-relation-circle-DALWYwuI.js} +7 -7
  147. package/dist/{vue-ui-ridgeline-Cq8z57xB.js → vue-ui-ridgeline-VO2-zPGd.js} +9 -9
  148. package/dist/{vue-ui-rings-Ds-sgNPK.js → vue-ui-rings-CGU8bnut.js} +10 -10
  149. package/dist/{vue-ui-scatter-BgOVUzQ3.js → vue-ui-scatter-CDy2LLD_.js} +9 -9
  150. package/dist/{vue-ui-skeleton-DJ5KAbfV.js → vue-ui-skeleton-ImkpUdwJ.js} +3 -3
  151. package/dist/{vue-ui-smiley-fFrNX-Gl.js → vue-ui-smiley-Ct3ijoOw.js} +2 -2
  152. package/dist/{vue-ui-spark-trend-D6OBWxmg.js → vue-ui-spark-trend-_b2gVafQ.js} +3 -3
  153. package/dist/{vue-ui-sparkbar-CtCP8O44.js → vue-ui-sparkbar-CRH8b1fM.js} +3 -3
  154. package/dist/{vue-ui-sparkgauge-CZDkyViI.js → vue-ui-sparkgauge-Z_lgEp7i.js} +3 -3
  155. package/dist/{vue-ui-sparkhistogram-DgruLf33.js → vue-ui-sparkhistogram-DzukoeRA.js} +4 -4
  156. package/dist/{vue-ui-sparkline-CJKE7Xcl.js → vue-ui-sparkline-B-QS62r4.js} +3 -3
  157. package/dist/{vue-ui-sparkstackbar-BSV0M-2u.js → vue-ui-sparkstackbar-DICmDZrB.js} +4 -4
  158. package/dist/vue-ui-stackbar-BRqqDp3a.js +2329 -0
  159. package/dist/{vue-ui-stackline-DS_MPmc1.js → vue-ui-stackline-DVY_4Fmh.js} +406 -388
  160. package/dist/{vue-ui-strip-plot-DSKOrJZX.js → vue-ui-strip-plot-DUv9SsML.js} +7 -7
  161. package/dist/{vue-ui-table-c1FPEwLM.js → vue-ui-table-ByFPF5fJ.js} +5 -5
  162. package/dist/{vue-ui-table-heatmap-CMQJXnP8.js → vue-ui-table-heatmap-DfLfYJiR.js} +5 -5
  163. package/dist/{vue-ui-table-sparkline-CAS9Pk60.js → vue-ui-table-sparkline-Gi1MQO-E.js} +4 -4
  164. package/dist/{vue-ui-thermometer-w3eeJv9s.js → vue-ui-thermometer-MfzmVt9N.js} +7 -7
  165. package/dist/{vue-ui-timer-CSP48eS-.js → vue-ui-timer-CrIq3NmZ.js} +5 -5
  166. package/dist/{vue-ui-tiremarks-DJvXj1P3.js → vue-ui-tiremarks-BB3VV4tK.js} +6 -6
  167. package/dist/{vue-ui-treemap-BaOMXTR1.js → vue-ui-treemap-CeE1TT6j.js} +9 -9
  168. package/dist/{vue-ui-waffle-Bo22Ph8n.js → vue-ui-waffle-KDOR3fMN.js} +10 -10
  169. package/dist/{vue-ui-wheel-CbL52G-w.js → vue-ui-wheel-DZq3C6wh.js} +6 -6
  170. package/dist/{vue-ui-word-cloud-BqOCyp7c.js → vue-ui-word-cloud-BNK1nfDn.js} +7 -7
  171. package/dist/{vue-ui-world-BkjzCcVh.js → vue-ui-world-D3F772fb.js} +7 -7
  172. package/dist/{vue-ui-xy-DuwLRfr4.js → vue-ui-xy-DOnq4Na2.js} +10 -10
  173. package/dist/{vue-ui-xy-canvas-CXqGVMeQ.js → vue-ui-xy-canvas-OajdJbzS.js} +11 -11
  174. package/dist/{vue-ui-xy-CVDNhnDY.js → vue-ui-xy-f56XjeNS.js} +2 -2
  175. package/package.json +1 -1
  176. package/dist/vue-ui-stackbar-pnlYCnTj.js +0 -2270
@@ -0,0 +1,2329 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { B as t, Bt as n, Ct as r, Et as a, G as o, H as s, J as c, S as l, Ut as u, V as d, Vt as f, X as p, ct as ee, g as te, gt as ne, h as re, i as m, it as ie, kt as ae, nt as h, r as oe, s as se, t as ce, x as le, y as ue, zt as de } from "./lib-NmjQazSn.js";
3
+ import { n as fe, r as pe, t as me } from "./useTimeLabels-BmBRv27Y.js";
4
+ import { t as he } from "./useConfig-Bf_EBbe3.js";
5
+ import { t as ge } from "./usePrinter-DRYgV-XS.js";
6
+ import { n as _e, t as ve } from "./BaseScanner-DZvpgOjM.js";
7
+ import { t as ye } from "./useSvgExport-SVIsDot8.js";
8
+ import { t as be } from "./useNestedProp-C9viY7oU.js";
9
+ import { t as xe } from "./useThemeCheck-C43Tcqmk.js";
10
+ import { t as Se } from "./useStableElementSize-C7KADDKj.js";
11
+ import { t as Ce } from "./useTimeLabelCollider-AEcY4Ioe.js";
12
+ import { t as we } from "./img-CyjhDDaM.js";
13
+ import { n as Te } from "./Title-Cxgd_JyY.js";
14
+ import { t as Ee } from "./Shape-S-7v8SAE.js";
15
+ import { t as De } from "./_plugin-vue_export-helper-B3ysoDQm.js";
16
+ import { c as Oe } from "./canvas-lib-BOP_HS11.js";
17
+ import { t as ke } from "./useResponsive-BfnK0KxU.js";
18
+ import { t as Ae } from "./SlicerPreview-Co-V9YBf.js";
19
+ import { t as je } from "./BaseLegendToggle-qL0O9ooF.js";
20
+ import { t as Me } from "./A11yDataTable-DdRsVULz.js";
21
+ import { t as Ne } from "./useUserOptionState-DK-_1ddE.js";
22
+ import { t as Pe } from "./useChartAccessibility-DYqac8yF.js";
23
+ import { t as Fe } from "./Legend--t7Mbp9Z.js";
24
+ import { t as Ie } from "./vue_ui_stackbar-COOrQQdK.js";
25
+ import { Fragment as g, Teleport as Le, computed as _, createBlock as v, createCommentVNode as y, createElementBlock as b, createElementVNode as x, createSlots as Re, createTextVNode as ze, createVNode as Be, defineAsyncComponent as S, guardReactiveProps as C, mergeProps as Ve, nextTick as He, normalizeClass as Ue, normalizeProps as w, normalizeStyle as T, onBeforeUnmount as We, onMounted as Ge, openBlock as E, ref as D, renderList as O, renderSlot as k, resolveDynamicComponent as Ke, shallowRef as qe, toDisplayString as A, toRefs as Je, unref as j, useSlots as Ye, watch as Xe, watchEffect as Ze, withCtx as M } from "vue";
26
+ //#region src/components/vue-ui-stackbar.vue
27
+ var Qe = /* @__PURE__ */ e({ default: () => Zt }), $e = ["id"], et = ["id"], tt = ["id"], nt = { style: { position: "relative" } }, rt = [
28
+ "xmlns",
29
+ "aria-describedby",
30
+ "viewBox"
31
+ ], it = [
32
+ "x",
33
+ "y",
34
+ "width",
35
+ "height"
36
+ ], at = { key: 1 }, ot = ["id"], st = ["stop-color"], ct = ["stop-color"], lt = ["stop-color"], ut = [
37
+ "x",
38
+ "y",
39
+ "width",
40
+ "height",
41
+ "stroke",
42
+ "stroke-width",
43
+ "stroke-linecap",
44
+ "stroke-linejoin",
45
+ "stroke-dasharray"
46
+ ], dt = [
47
+ "x1",
48
+ "x2",
49
+ "y1",
50
+ "y2",
51
+ "stroke",
52
+ "stroke-width",
53
+ "stroke-dasharray"
54
+ ], ft = [
55
+ "x1",
56
+ "x2",
57
+ "y1",
58
+ "y2",
59
+ "stroke",
60
+ "stroke-width",
61
+ "stroke-dasharray"
62
+ ], pt = [
63
+ "x1",
64
+ "x2",
65
+ "y1",
66
+ "y2",
67
+ "stroke",
68
+ "stroke-width",
69
+ "stroke-dasharray"
70
+ ], mt = [
71
+ "x1",
72
+ "x2",
73
+ "y1",
74
+ "y2",
75
+ "stroke",
76
+ "stroke-width",
77
+ "stroke-dasharray"
78
+ ], ht = { key: 0 }, gt = [
79
+ "x",
80
+ "y",
81
+ "height",
82
+ "rx",
83
+ "width",
84
+ "fill",
85
+ "stroke",
86
+ "stroke-width"
87
+ ], _t = { key: 0 }, vt = [
88
+ "x",
89
+ "y",
90
+ "height",
91
+ "rx",
92
+ "width",
93
+ "fill",
94
+ "stroke",
95
+ "stroke-width"
96
+ ], yt = [
97
+ "x",
98
+ "y",
99
+ "width",
100
+ "rx",
101
+ "height",
102
+ "fill",
103
+ "stroke",
104
+ "stroke-width"
105
+ ], bt = { key: 0 }, xt = [
106
+ "x",
107
+ "y",
108
+ "width",
109
+ "rx",
110
+ "height",
111
+ "fill",
112
+ "stroke",
113
+ "stroke-width"
114
+ ], St = [
115
+ "x1",
116
+ "x2",
117
+ "y1",
118
+ "y2",
119
+ "stroke",
120
+ "stroke-width"
121
+ ], Ct = [
122
+ "x1",
123
+ "x2",
124
+ "y1",
125
+ "y2",
126
+ "stroke",
127
+ "stroke-width"
128
+ ], wt = [
129
+ "x",
130
+ "y",
131
+ "font-size",
132
+ "fill",
133
+ "font-weight"
134
+ ], Tt = [
135
+ "transform",
136
+ "font-size",
137
+ "fill",
138
+ "font-weight"
139
+ ], Et = [
140
+ "x",
141
+ "y",
142
+ "font-size",
143
+ "fill",
144
+ "font-weight"
145
+ ], Dt = [
146
+ "x",
147
+ "y",
148
+ "font-size",
149
+ "font-weight",
150
+ "fill"
151
+ ], Ot = [
152
+ "x",
153
+ "y",
154
+ "font-size",
155
+ "fill",
156
+ "font-weight"
157
+ ], kt = [
158
+ "x",
159
+ "y",
160
+ "font-size",
161
+ "font-weight",
162
+ "fill"
163
+ ], At = [
164
+ "x1",
165
+ "x2",
166
+ "y1",
167
+ "y2",
168
+ "stroke"
169
+ ], jt = [
170
+ "x",
171
+ "y",
172
+ "font-size",
173
+ "font-weight",
174
+ "fill",
175
+ "text-anchor"
176
+ ], Mt = [
177
+ "x1",
178
+ "x2",
179
+ "y1",
180
+ "y2",
181
+ "stroke"
182
+ ], Nt = [
183
+ "font-size",
184
+ "font-weight",
185
+ "fill",
186
+ "text-anchor",
187
+ "transform"
188
+ ], Pt = { key: 0 }, Ft = { key: 1 }, It = [
189
+ "text-anchor",
190
+ "font-size",
191
+ "font-weight",
192
+ "fill",
193
+ "transform",
194
+ "onClick"
195
+ ], Lt = [
196
+ "text-anchor",
197
+ "font-size",
198
+ "fill",
199
+ "transform",
200
+ "innerHTML",
201
+ "onClick"
202
+ ], Rt = { key: 0 }, zt = { key: 1 }, Bt = [
203
+ "font-size",
204
+ "font-weight",
205
+ "fill",
206
+ "x",
207
+ "y",
208
+ "onClick"
209
+ ], Vt = [
210
+ "font-size",
211
+ "font-weight",
212
+ "fill",
213
+ "x",
214
+ "y",
215
+ "onClick",
216
+ "innerHTML"
217
+ ], Ht = [
218
+ "x",
219
+ "y",
220
+ "width",
221
+ "height",
222
+ "onClick",
223
+ "onMouseenter",
224
+ "onMouseleave",
225
+ "fill"
226
+ ], Ut = [
227
+ "x",
228
+ "y",
229
+ "width",
230
+ "height",
231
+ "onClick",
232
+ "onMouseenter",
233
+ "onMouseleave",
234
+ "fill"
235
+ ], Wt = ["data-start", "data-end"], Gt = {
236
+ key: 0,
237
+ style: {
238
+ position: "absolute",
239
+ top: "100%",
240
+ left: "0",
241
+ width: "100%"
242
+ },
243
+ "data-dom-to-png-ignore": "",
244
+ "aria-hidden": "true"
245
+ }, Kt = {
246
+ key: 4,
247
+ class: "vue-data-ui-watermark"
248
+ }, qt = [
249
+ "x",
250
+ "y",
251
+ "height",
252
+ "width",
253
+ "fill",
254
+ "stroke"
255
+ ], Jt = ["id"], Yt = ["onClick"], Xt = ["innerHTML"], Zt = /*#__PURE__*/ De({
256
+ __name: "vue-ui-stackbar",
257
+ props: {
258
+ config: {
259
+ type: Object,
260
+ default() {
261
+ return {};
262
+ }
263
+ },
264
+ dataset: {
265
+ type: Array,
266
+ default() {
267
+ return [];
268
+ }
269
+ },
270
+ selectedXIndex: {
271
+ type: Number,
272
+ default: void 0
273
+ }
274
+ },
275
+ emits: [
276
+ "selectDatapoint",
277
+ "selectLegend",
278
+ "selectTimeLabel",
279
+ "selectX",
280
+ "copyAlt"
281
+ ],
282
+ setup(e, { expose: De, emit: Qe }) {
283
+ let Zt = S(() => import("./Tooltip-BqdN_ZBE.js")), Qt = S(() => import("./BaseIcon-CX_ChMz-.js").then((e) => e.n)), $t = S(() => import("./vue-ui-accordion-vYLqcJJd.js").then((e) => e.n)), en = S(() => import("./DataTable-KEMekOVu.js")), tn = S(() => import("./PenAndPaper-DkZYRnrW.js").then((e) => e.t)), nn = S(() => import("./UserOptions-WIxTs7Xf.js").then((e) => e.n)), rn = S(() => import("./PackageVersion-D-_GVhxY.js").then((e) => e.t)), an = S(() => import("./BaseDraggableDialog-DLuXvUbs.js").then((e) => e.n)), { vue_ui_stackbar: on } = he(), { isThemeValid: sn, warnInvalidTheme: cn } = xe(), ln = Ye(), N = e, P = Qe, un = _({
284
+ get() {
285
+ return !!N.dataset && N.dataset.length;
286
+ },
287
+ set(e) {
288
+ return e;
289
+ }
290
+ }), F = D(null), I = D(s()), dn = D(!1), fn = D(null), pn = D(""), L = D([]), mn = D(0), hn = D(null), gn = D(null), _n = D(null), vn = D(null), yn = D(!1), R = D(null), bn = D(!1), xn = D(0), Sn = D(0), Cn = D(0), wn = D(!1), Tn = D(null), En = D(null), Dn = D(!1), On = D(!1), kn = D(null), An = D(null), jn = D(null), Mn = D(null), Nn = D(null), Pn = D(null), Fn = qe(null), In = D(!1), Ln = D(0), Rn = D(0), z = D(null), zn = D({
291
+ x: 0,
292
+ y: 0
293
+ }), Bn = D("pointer"), Vn = Se({
294
+ elementRef: Fn,
295
+ minimumWidth: 2,
296
+ minimumHeight: 2,
297
+ stableFramesRequired: 2,
298
+ once: !1,
299
+ onSizeAccepted: () => {
300
+ Wn();
301
+ }
302
+ });
303
+ function Hn() {
304
+ Fn.value = F.value?.parentNode ?? null;
305
+ }
306
+ function Un() {
307
+ return new Promise((e) => {
308
+ requestAnimationFrame(() => {
309
+ requestAnimationFrame(e);
310
+ });
311
+ });
312
+ }
313
+ async function Wn() {
314
+ let e = ++Rn.value;
315
+ In.value = !1, await He(), await Un(), await Un(), e === Rn.value && (Ln.value += 1, In.value = !0);
316
+ }
317
+ let Gn = D(null);
318
+ Ge(() => {
319
+ wn.value = !0, Hn(), Vn.start(), mr();
320
+ });
321
+ let B = D(nr()), V = _(() => B.value.userOptions.useCursorPointer), Kn = _(() => u({
322
+ defaultConfig: {
323
+ userOptions: { show: !1 },
324
+ useCssAnimation: !1,
325
+ table: { show: !1 },
326
+ tooltip: { show: !1 },
327
+ style: { chart: {
328
+ backgroundColor: "#99999930",
329
+ bars: {
330
+ totalValues: { show: !1 },
331
+ dataLabels: { show: !1 }
332
+ },
333
+ grid: {
334
+ frame: { stroke: "#6A6A6A" },
335
+ scale: {
336
+ scaleMin: 0,
337
+ scaleMax: 40
338
+ },
339
+ x: {
340
+ axisColor: "#6A6A6A",
341
+ linesColor: "#6A6A6A",
342
+ axisName: { show: !1 },
343
+ timeLabels: { show: !1 }
344
+ },
345
+ y: {
346
+ axisColor: "#6A6A6A",
347
+ linesColor: "#6A6A6A",
348
+ axisName: { show: !1 },
349
+ axisLabels: { show: !1 }
350
+ }
351
+ },
352
+ legend: { backgroundColor: "transparent" },
353
+ padding: {
354
+ left: 24,
355
+ right: 24,
356
+ bottom: 12
357
+ },
358
+ zoom: {
359
+ show: !1,
360
+ startIndex: null,
361
+ endIndex: null
362
+ }
363
+ } }
364
+ },
365
+ userConfig: B.value.skeletonConfig ?? {}
366
+ })), { loading: qn, FINAL_DATASET: Jn, manualLoading: Yn } = _e({
367
+ ...Je(N),
368
+ FINAL_CONFIG: B,
369
+ prepareConfig: nr,
370
+ callback: () => {
371
+ Promise.resolve().then(async () => {
372
+ (!B.value.style.chart.zoom.keepState || !Wi.value || J.value.start === 0 && J.value.end === 0) && await Gi();
373
+ });
374
+ },
375
+ skeletonDataset: N.config?.skeletonDataset ?? [{
376
+ name: "",
377
+ series: [
378
+ 2,
379
+ 3,
380
+ 5,
381
+ 8,
382
+ 13,
383
+ 21
384
+ ],
385
+ color: "#BABABA"
386
+ }, {
387
+ name: "",
388
+ series: [
389
+ 1,
390
+ 2,
391
+ 3,
392
+ 5,
393
+ 8,
394
+ 13
395
+ ],
396
+ color: "#CACACA"
397
+ }],
398
+ skeletonConfig: u({
399
+ defaultConfig: B.value,
400
+ userConfig: Kn.value
401
+ })
402
+ }), { userOptionsVisible: Xn, setUserOptionsVisibility: Zn, keepUserOptionState: Qn } = Ne({ config: B.value }), { svgRef: $n } = Pe({ config: B.value.style.chart.title });
403
+ function er() {
404
+ Zn(!0);
405
+ }
406
+ function tr() {
407
+ Zn(!1), P("selectX", {
408
+ index: null,
409
+ indexLabel: null,
410
+ dataset: null
411
+ }), R.value = null, z.value = null, dn.value = !1;
412
+ }
413
+ function nr() {
414
+ let e = be({
415
+ userConfig: N.config,
416
+ defaultConfig: on
417
+ }), t = {}, n = e.theme;
418
+ if (n) if (!sn.value(e)) cn(e), t = e;
419
+ else {
420
+ let r = be({
421
+ userConfig: Ie[n] || N.config,
422
+ defaultConfig: e
423
+ });
424
+ t = {
425
+ ...be({
426
+ userConfig: N.config,
427
+ defaultConfig: r
428
+ }),
429
+ customPalette: e.customPalette.length ? e.customPalette : f[n] || ae
430
+ };
431
+ }
432
+ else t = e;
433
+ return t;
434
+ }
435
+ let rr = _(() => B.value.style.chart.bars.dataLabels.hideUnderValue != null), ir = _(() => B.value.style.chart.bars.dataLabels.hideUnderPercentage != null);
436
+ Xe(() => N.config, (e) => {
437
+ qn.value || (B.value = nr()), Xn.value = !B.value.userOptions.showOnChartHover, mr({ resetSlicer: !B.value.style.chart.zoom.keepState }), xn.value += 1, Sn.value += 1, Cn.value += 1, H.value.dataLabels.show = B.value.style.chart.bars.dataLabels.show, H.value.showTable = B.value.table.show, H.value.showTooltip = B.value.style.chart.tooltip.show, Hn(), !B.value.style.chart.zoom.keepState || !Wi.value || J.value.start === 0 && J.value.end === 0 ? Gi() : Ar();
438
+ }, { deep: !0 }), Xe(() => N.dataset, (e) => {
439
+ Array.isArray(e) && e.length > 0 && (Yn.value = !1), Hn(), B.value.style.chart.zoom.keepState ? Ar() : Nr();
440
+ }, { deep: !0 });
441
+ let H = D({
442
+ dataLabels: { show: B.value.style.chart.bars.dataLabels.show },
443
+ showTable: B.value.table.show,
444
+ showTooltip: B.value.style.chart.tooltip.show
445
+ });
446
+ Xe(B, () => {
447
+ H.value = {
448
+ dataLabels: { show: B.value.style.chart.bars.dataLabels.show },
449
+ showTable: B.value.table.show,
450
+ showTooltip: B.value.style.chart.tooltip.show
451
+ };
452
+ }, { immediate: !0 });
453
+ let { isPrinting: ar, isImaging: or, generatePdf: sr, generateImage: cr } = ge({
454
+ elementId: `stackbar_${I.value}`,
455
+ fileName: B.value.style.chart.title.text || "vue-ui-stackbar",
456
+ options: B.value.userOptions.print
457
+ }), U = D({
458
+ width: B.value.style.chart.width,
459
+ height: B.value.style.chart.height,
460
+ paddingRatio: {
461
+ top: B.value.style.chart.padding.top / B.value.style.chart.height,
462
+ right: B.value.style.chart.padding.right / B.value.style.chart.width,
463
+ bottom: B.value.style.chart.padding.bottom / B.value.style.chart.height,
464
+ left: B.value.style.chart.padding.left / B.value.style.chart.width
465
+ }
466
+ }), lr = _(() => le(B.value.customPalette)), ur = qe(null), dr = qe(null), fr = D(null), pr = _(() => !!B.value.debug);
467
+ function mr({ resetSlicer: e = !0 } = {}) {
468
+ if (a(N.dataset) ? (p({
469
+ componentName: "VueUiStackbar",
470
+ type: "dataset",
471
+ debug: pr.value
472
+ }), Yn.value = !0) : N.dataset.forEach((e, t) => {
473
+ ee({
474
+ datasetObject: e,
475
+ requiredAttributes: ["name", "series"]
476
+ }).forEach((e) => {
477
+ un.value = !1, p({
478
+ componentName: "VueUiStackbar",
479
+ type: "datasetSerieAttribute",
480
+ property: e,
481
+ index: t,
482
+ debug: pr.value
483
+ }), Yn.value = !0;
484
+ });
485
+ }), a(N.dataset) || (Yn.value = B.value.loading), setTimeout(() => {
486
+ bn.value = !0;
487
+ }, 10), B.value.responsive) {
488
+ let e = Oe(() => {
489
+ bn.value = !1;
490
+ let { width: e, height: t } = ke({
491
+ chart: F.value,
492
+ title: B.value.style.chart.title.text ? hn.value : null,
493
+ legend: B.value.style.chart.legend.show ? gn.value : null,
494
+ slicer: B.value.style.chart.zoom.show && q.value > 6 ? _n.value.$el : null,
495
+ source: vn.value
496
+ });
497
+ requestAnimationFrame(() => {
498
+ U.value.width = e, U.value.height = t - 12, clearTimeout(fr.value), fr.value = setTimeout(() => {
499
+ bn.value = !0;
500
+ }, 10);
501
+ });
502
+ });
503
+ ur.value && (dr.value && ur.value.unobserve(dr.value), ur.value.disconnect()), ur.value = new ResizeObserver(e), dr.value = F.value.parentNode, ur.value.observe(dr.value);
504
+ }
505
+ Wn(), e && Gi();
506
+ }
507
+ We(() => {
508
+ Vn.stop(), ur.value && (dr.value && ur.value.unobserve(dr.value), ur.value.disconnect());
509
+ });
510
+ let W = _(() => B.value.style.chart.grid.y.position === "right");
511
+ function hr() {
512
+ let e = 0;
513
+ B.value.orientation === "vertical" && jn.value && (e = Array.from(jn.value.querySelectorAll("text")).reduce((e, t) => {
514
+ let n = t.getComputedTextLength();
515
+ return n > e ? n : e;
516
+ }, 0)), B.value.orientation === "horizontal" && Mn.value && (e = Array.from(Mn.value.querySelectorAll("text")).reduce((e, t) => {
517
+ let n = t.getComputedTextLength();
518
+ return n > e ? n : e;
519
+ }, 0));
520
+ let t = An.value ? An.value.getBoundingClientRect().width + B.value.style.chart.grid.y.axisName.fontSize + B.value.style.chart.grid.y.axisName.offsetX : 0;
521
+ return {
522
+ left: W.value ? 0 : e + t,
523
+ right: W.value ? e + t : 0,
524
+ scaleLabelsWidth: e,
525
+ yAxisLabelWidth: t
526
+ };
527
+ }
528
+ let gr = D(0), _r = D(0), vr = Oe((e) => {
529
+ _r.value = e + B.value.style.chart.bars.totalValues.fontSize;
530
+ }, 100);
531
+ function yr() {
532
+ if (B.value.orientation !== "horizontal") return 0;
533
+ let e = Pn.value;
534
+ if (!e) return 0;
535
+ let t = Array.from(e.querySelectorAll("text"));
536
+ if (!t.length) return 0;
537
+ let n = -Infinity;
538
+ for (let e of t) try {
539
+ let t = e.getBBox(), r = t.x + t.width;
540
+ r > n && (n = r);
541
+ } catch {}
542
+ return Math.max(0, n - (G.value?.right ?? 0));
543
+ }
544
+ Ze((e) => {
545
+ if (B.value.orientation !== "horizontal") return;
546
+ let t = Pn.value;
547
+ if (!t) return;
548
+ let n = () => {
549
+ vr(yr());
550
+ };
551
+ n();
552
+ let r = new ResizeObserver(n);
553
+ r.observe(t);
554
+ let a = new MutationObserver(n);
555
+ a.observe(t, {
556
+ childList: !0,
557
+ subtree: !0,
558
+ characterData: !0
559
+ }), e(() => {
560
+ r.disconnect(), a.disconnect();
561
+ });
562
+ }), We(() => {
563
+ gr.value = 0, _r.value = 0;
564
+ });
565
+ let br = D(0), xr = D(0);
566
+ function Sr(e) {
567
+ let t = Number.isFinite(e) ? e : 0;
568
+ br.value !== t && (br.value = t);
569
+ }
570
+ function Cr() {
571
+ let e = B.value.orientation === "vertical" ? Mn.value : jn.value;
572
+ if (!e) {
573
+ Sr(0);
574
+ return;
575
+ }
576
+ try {
577
+ Sr(e.getBBox()?.height);
578
+ } catch {
579
+ Sr(0);
580
+ }
581
+ }
582
+ function wr() {
583
+ xr.value && cancelAnimationFrame(xr.value), xr.value = requestAnimationFrame(() => {
584
+ requestAnimationFrame(() => {
585
+ Cr();
586
+ });
587
+ });
588
+ }
589
+ We(() => {
590
+ xr.value && cancelAnimationFrame(xr.value);
591
+ });
592
+ let Tr = _(() => {
593
+ let e = 0;
594
+ if (kn.value) try {
595
+ e = kn.value.getBBox().height;
596
+ } catch {
597
+ e = 0;
598
+ }
599
+ let t = B.value.style.chart.grid.x.timeLabels.show ? br.value : 0;
600
+ return e + t;
601
+ }), G = _(() => {
602
+ Ln.value;
603
+ let { height: e, width: t } = U.value, { right: n } = U.value.paddingRatio, r = B.value.style.chart.bars.totalValues.show && N.dataset && N.dataset.length > 1 ? B.value.style.chart.bars.totalValues.fontSize * 1.3 : 0, a = 0, o = 0, s = 0, c = 0;
604
+ if (B.value.style.chart.grid.y.axisLabels.show) {
605
+ let e = hr();
606
+ a = e.left, o = e.right, s = e.scaleLabelsWidth, c = e.yAxisLabelWidth;
607
+ }
608
+ let l = B.value.style.chart.padding.top + r, u = t - t * n - _r.value - o, d = e - B.value.style.chart.padding.bottom - Tr.value - r, f = B.value.style.chart.padding.left + a, p = t - f - t * n - _r.value - o, ee = e - l - B.value.style.chart.padding.bottom - Tr.value - r;
609
+ return {
610
+ chartHeight: e,
611
+ chartWidth: t,
612
+ top: l,
613
+ right: u,
614
+ bottom: d,
615
+ left: f,
616
+ width: Math.max(0, p),
617
+ height: Math.max(0, ee),
618
+ offsetLeft: a,
619
+ offsetRightAxis: o,
620
+ scaleLabelsWidth: s,
621
+ yAxisLabelWidth: c
622
+ };
623
+ }), Er = _(() => {
624
+ let { left: e, top: t, width: n, height: r } = G.value, a = J.value.start, o = J.value.end, s = Math.max(1, o - a), c = Math.max(0, Math.min(s, (Y.value.start ?? a) - a)), l = Math.max(0, Math.min(s, (Y.value.end ?? o) - a)), u = Math.max(0, l - c), d = {
625
+ fill: B.value.style.chart.zoom.preview.fill,
626
+ stroke: B.value.style.chart.zoom.preview.stroke,
627
+ "stroke-width": B.value.style.chart.zoom.preview.strokeWidth,
628
+ "stroke-dasharray": B.value.style.chart.zoom.preview.strokeDasharray,
629
+ "stroke-linecap": "round",
630
+ "stroke-linejoin": "round",
631
+ style: {
632
+ pointerEvents: "none",
633
+ transition: "none !important",
634
+ animation: "none !important"
635
+ }
636
+ };
637
+ if (B.value.orientation === "horizontal") {
638
+ let a = r / s;
639
+ return {
640
+ x: e,
641
+ y: t + c * a,
642
+ width: n,
643
+ height: u * a,
644
+ ...d
645
+ };
646
+ } else {
647
+ let a = n / s;
648
+ return {
649
+ x: e + c * a,
650
+ y: t,
651
+ width: u * a,
652
+ height: r,
653
+ ...d
654
+ };
655
+ }
656
+ }), K = _(() => Jn.value.map((e, t) => {
657
+ let n = `stackbar_serie_${t}`, r = String(e.key ?? e.id ?? e.name ?? n), a = ue(e.color) || lr.value[t] || ae[t] || ae[t % ae.length];
658
+ return {
659
+ ...e,
660
+ datasetKey: r,
661
+ series: JSON.parse(JSON.stringify(e.series)).map((e) => B.value.style.chart.bars.distributed ? Math.abs(e) : e),
662
+ signedSeries: e.series.map((e) => e >= 0 ? 1 : -1),
663
+ absoluteIndex: t,
664
+ id: n,
665
+ color: a
666
+ };
667
+ })), q = _(() => {
668
+ let e = Math.max(...K.value.filter((e) => !L.value.includes(e.id)).map((e) => e.series.length));
669
+ return isFinite(e) ? e : Math.max(...K.value.map((e) => e.series.length));
670
+ });
671
+ function Dr(e) {
672
+ Gn.value = e;
673
+ }
674
+ let J = D({
675
+ start: 0,
676
+ end: Math.max(...Jn.value.map((e) => e.series.length))
677
+ }), Y = D({
678
+ start: 0,
679
+ end: Math.max(...Jn.value.map((e) => e.series.length))
680
+ }), Or = _(() => B.value.style.chart.zoom.preview.enable && (Y.value.start !== J.value.start || Y.value.end !== J.value.end));
681
+ function kr(e, t) {
682
+ Y.value[e] = t;
683
+ }
684
+ function Ar() {
685
+ let e = q.value, t = Math.max(0, Math.min(J.value.start ?? 0, e - 1)), n = Math.max(t + 1, Math.min(J.value.end ?? e, e));
686
+ (!Number.isFinite(t) || !Number.isFinite(n) || n <= t) && (t = 0, n = e), J.value.start = t, J.value.end = n, Y.value.start = t, Y.value.end = n, _n.value && (_n.value.setStartValue(t), _n.value.setEndValue(n));
687
+ }
688
+ let jr = D(null);
689
+ function Mr() {
690
+ return new Promise((e) => requestAnimationFrame(() => requestAnimationFrame(() => e())));
691
+ }
692
+ We(() => {
693
+ jr.value && cancelAnimationFrame(jr.value);
694
+ });
695
+ async function Nr({ force: e = !1 } = {}) {
696
+ if (B.value.style.chart.zoom.keepState && !e && Wi.value && !(J.value.start === 0 && J.value.end === 0)) {
697
+ Ar();
698
+ return;
699
+ }
700
+ Gi(), await He(), jr.value && cancelAnimationFrame(jr.value), jr.value = requestAnimationFrame(async () => {
701
+ await Mr(), Gi();
702
+ });
703
+ }
704
+ let X = _(() => {
705
+ let e;
706
+ return e = B.value.orientation === "vertical" ? G.value.width / (J.value.end - J.value.start) : G.value.height / (J.value.end - J.value.start), e <= 0 ? 0 : e;
707
+ }), Pr = _(() => de(K.value.filter((e) => !L.value.includes(e.id))).slice(J.value.start, J.value.end)), Fr = _(() => L.value.length === K.value.length), Ir = _(() => B.value.style.chart.zoom.minimap.show ? de(K.value.map((e) => ({
708
+ ...e,
709
+ series: e.series.map((e) => e ?? 0)
710
+ })).filter((e) => Fr.value ? !0 : !L.value.includes(e.id))) : []), Lr = _(() => B.value.style.chart.zoom.minimap.show ? [{
711
+ name: "",
712
+ series: Ir.value,
713
+ color: "#000000",
714
+ isVisible: !0
715
+ }] : []), Rr = _(() => de(K.value.filter((e) => !L.value.includes(e.id)).map((e) => ({
716
+ ...e,
717
+ series: e.series.map((t, n) => e.signedSeries[n] === -1 && t >= 0 ? -t : t)
718
+ }))).slice(J.value.start, J.value.end)), zr = _(() => {
719
+ let e = K.value.filter((e) => !L.value.includes(e.id));
720
+ return {
721
+ positive: de(e.map((e) => ({
722
+ ...e,
723
+ series: e.series.slice(J.value.start, J.value.end).map((e) => e >= 0 ? e : 0)
724
+ }))),
725
+ negative: de(e.map((e) => ({
726
+ ...e,
727
+ series: e.series.slice(J.value.start, J.value.end).map((e) => e < 0 ? e : 0)
728
+ })))
729
+ };
730
+ }), Br = _(() => {
731
+ let e = B.value.style.chart.grid.scale.scaleMax !== null && !B.value.style.chart.bars.distributed ? B.value.style.chart.grid.scale.scaleMax : Math.max(...zr.value.positive), t = Math.min(...zr.value.negative), n = B.value.style.chart.grid.scale.scaleMin !== null && !B.value.style.chart.bars.distributed ? B.value.style.chart.grid.scale.scaleMin : [
732
+ -Infinity,
733
+ Infinity,
734
+ NaN,
735
+ void 0,
736
+ null
737
+ ].includes(t) ? 0 : t;
738
+ return !B.value.style.chart.bars.distributed && (B.value.style.chart.grid.scale.scaleMax !== null || B.value.style.chart.grid.scale.scaleMin !== null) ? te(n > 0 ? 0 : n, e < 0 ? 0 : e, B.value.style.chart.grid.scale.ticks) : re(n > 0 ? 0 : n, e < 0 ? 0 : e, B.value.style.chart.grid.scale.ticks);
739
+ }), Vr = _(() => Br.value.ticks), Z = _(() => {
740
+ let e = Br.value, t = e.max + Math.abs(e.min);
741
+ return Vr.value.map((n) => ({
742
+ zero: G.value.bottom - G.value.height * (Math.abs(e.min) / t),
743
+ y: G.value.bottom - G.value.height * ((n + Math.abs(e.min)) / t),
744
+ x: W.value ? G.value.right + 8 : G.value.left - 8,
745
+ horizontal_zero: G.value.left + G.value.width * (Math.abs(e.min) / t),
746
+ horizontal_x: G.value.left + G.value.width * ((n + Math.abs(e.min)) / t),
747
+ horizontal_y: G.value.bottom - 8,
748
+ value: n
749
+ }));
750
+ }), Hr = _(() => {
751
+ let e = B.value.style.chart.grid.y.axisLabels, { prefix: t, suffix: n } = B.value.style.chart.bars.dataLabels;
752
+ return Vr.value.map((r) => String(m(e.formatter, r, o({
753
+ p: t,
754
+ v: r,
755
+ s: n,
756
+ r: e.rounding
757
+ }), { datapoint: { value: r } }) ?? "")).join("|");
758
+ });
759
+ Xe(() => [
760
+ Hr.value,
761
+ B.value.orientation,
762
+ B.value.style.chart.grid.y.axisLabels.show,
763
+ B.value.style.chart.grid.y.axisLabels.fontSize,
764
+ B.value.style.chart.grid.y.axisLabels.bold,
765
+ B.value.style.chart.grid.y.position
766
+ ], () => {
767
+ B.value.style.chart.grid.y.axisLabels.show && Wn();
768
+ }, { flush: "post" });
769
+ let Q = D([]), Ur = D([]), Wr = 0;
770
+ Ze(() => {
771
+ let e = ++Wr;
772
+ (async () => {
773
+ let t = await me({
774
+ values: B.value.style.chart.grid.x.timeLabels.values,
775
+ maxDatapoints: q.value,
776
+ formatter: B.value.style.chart.grid.x.timeLabels.datetimeFormatter,
777
+ start: J.value.start,
778
+ end: J.value.end
779
+ });
780
+ e === Wr && (Q.value = t);
781
+ })();
782
+ });
783
+ let Gr = 0;
784
+ Ze(() => {
785
+ let e = ++Gr;
786
+ (async () => {
787
+ let t = await me({
788
+ values: B.value.style.chart.grid.x.timeLabels.values,
789
+ maxDatapoints: q.value,
790
+ formatter: B.value.style.chart.grid.x.timeLabels.datetimeFormatter,
791
+ start: 0,
792
+ end: q.value
793
+ });
794
+ e === Gr && (Ur.value = t);
795
+ })();
796
+ });
797
+ let Kr = _(() => {
798
+ let e = B.value.style.chart.grid.x.timeLabels.modulo;
799
+ return Q.value.length ? Math.min(e, [...new Set(Q.value.map((e) => e.text))].length) : e;
800
+ }), qr = _(() => {
801
+ let e = B.value.style.chart.grid.x.timeLabels, t = Q.value || [], n = Ur.value || [], r = J.value.start ?? 0, a = R.value, o = q.value, s = t.map((e) => e?.text ?? ""), c = n.map((e) => e?.text ?? "");
802
+ return se(!!e.showOnlyFirstAndLast, !!e.showOnlyAtModulo, Math.max(1, Kr.value || 1), s, c, r, a, o);
803
+ });
804
+ Ze(() => {
805
+ B.value.orientation, B.value.style.chart.grid.x.timeLabels.show, B.value.style.chart.grid.x.timeLabels.fontSize, B.value.style.chart.grid.x.timeLabels.rotation, B.value.style.chart.grid.x.timeLabels.offsetY, qr.value?.map((e) => e?.text ?? "").join("|"), Hr.value, U.value.width, U.value.height, Mn.value, jn.value, kn.value, wr();
806
+ }, { flush: "post" });
807
+ let Jr = D({
808
+ months: [],
809
+ shortMonths: [],
810
+ days: [],
811
+ shortDays: []
812
+ }), Yr = 0;
813
+ Ze(() => {
814
+ let e = ++Yr, t = B.value.style.chart.grid.x.timeLabels.datetimeFormatter;
815
+ (async () => {
816
+ let n = await pe(t.locale).catch(() => pe("en"));
817
+ e === Yr && (Jr.value = n.data);
818
+ })();
819
+ });
820
+ let Xr = _(() => {
821
+ let e = B.value.style.chart.grid.x.timeLabels.datetimeFormatter, t = fe({
822
+ useUTC: e.useUTC,
823
+ locale: Jr.value,
824
+ januaryAsYear: e.januaryAsYear
825
+ });
826
+ return (e, n) => {
827
+ let r = B.value.style.chart.grid.x.timeLabels.values?.[e];
828
+ return r == null ? "" : t.formatDate(new Date(r), n);
829
+ };
830
+ }), Zr = _(() => (B.value.style.chart.grid.x.timeLabels.values || []).map((e, t) => ({
831
+ text: Xr.value(t, B.value.style.chart.zoom.timeFormat),
832
+ absoluteIndex: t
833
+ }))), Qr = _(() => (B.value.style.chart.grid.x.timeLabels.values || []).map((e, t) => ({
834
+ text: Xr.value(t, B.value.style.chart.tooltip.timeFormat),
835
+ absoluteIndex: t
836
+ }))), $r = _(() => {
837
+ let e = /* @__PURE__ */ new Map();
838
+ return (B.value.style.chart.grid.x.timeLabels.values || []).forEach((t) => {
839
+ if ([
840
+ null,
841
+ void 0,
842
+ ""
843
+ ].includes(t)) return;
844
+ let n = String(t);
845
+ e.set(n, (e.get(n) || 0) + 1);
846
+ }), e;
847
+ });
848
+ function ei(e) {
849
+ let t = (B.value.style.chart.grid.x.timeLabels.values || [])[e];
850
+ if ([
851
+ null,
852
+ void 0,
853
+ ""
854
+ ].includes(t)) return `fallback-${e}`;
855
+ let n = String(t);
856
+ return ($r.value.get(n) || 0) > 1 ? `${n}-${e}` : n;
857
+ }
858
+ function ti(e, t) {
859
+ return `${e.datasetKey}:${ei(t)}`;
860
+ }
861
+ let $ = _(() => {
862
+ if (!un.value && !qn.value) return [];
863
+ let e = Array(q.value).fill(0), t = Array(q.value).fill(0), n = Array(q.value).fill(0), r = Array(q.value).fill(0), a = Math.max(...zr.value.positive) || 0, o = Math.min(...zr.value.negative), s = [
864
+ -Infinity,
865
+ Infinity,
866
+ NaN,
867
+ void 0,
868
+ null
869
+ ].includes(o) ? 0 : o, { min: c, max: l } = !B.value.style.chart.bars.distributed && (B.value.style.chart.grid.scale.scaleMax !== null || B.value.style.chart.grid.scale.scaleMin !== null) ? te(B.value.style.chart.grid.scale.scaleMin === null ? s > 0 ? 0 : s : B.value.style.chart.grid.scale.scaleMin, B.value.style.chart.grid.scale.scaleMax === null ? a < 0 ? 0 : a : B.value.style.chart.grid.scale.scaleMax, B.value.style.chart.grid.scale.ticks) : re(B.value.style.chart.grid.scale.scaleMin === null ? s > 0 ? 0 : s : B.value.style.chart.grid.scale.scaleMin, B.value.style.chart.grid.scale.scaleMax === null ? a < 0 ? 0 : a : B.value.style.chart.grid.scale.scaleMax, B.value.style.chart.grid.scale.ticks), u = l + (c >= 0 ? 0 : Math.abs(c)) || 1, d = G.value.height, f = G.value.width, p = Z.value[0] ? Z.value[0].zero : G.value.bottom, ee = Z.value[0] ? Z.value[0].horizontal_zero : G.value.left, ne = Array(Ir.value.length).fill(0), m = Array(Ir.value.length).fill(0);
870
+ return K.value.filter((e) => !L.value.includes(e.id)).map((a) => {
871
+ let o = a.series.slice(), s = o.map((e, t) => ne[t]), c = o.map((e, t) => m[t]);
872
+ o.forEach((e, t) => {
873
+ (Number(e) || 0) >= 0 ? ne[t] += Number(e) || 0 : m[t] += Math.abs(Number(e) || 0);
874
+ });
875
+ let l = a.series.slice(J.value.start, J.value.end), te = a.signedSeries.slice(J.value.start, J.value.end), re = l.map((e, t) => ti(a, J.value.start + t)), ie = o.map((e, t) => ti(a, t)), ae = l.map((e, t) => G.value.left + X.value * t + X.value * B.value.style.chart.bars.gapRatio / 4), h = (Ir.value || []).filter(Number.isFinite), oe = h.length ? Math.max(...h) : 0, se = h.length ? Math.min(...h) : 0;
876
+ function ce({ minimapH: e }) {
877
+ let t = 1e-9, n = oe > 0;
878
+ if (n && se < 0) {
879
+ let n = Math.max(oe, Math.abs(se)) || t;
880
+ return {
881
+ pxPerUnit: e / 2 / n,
882
+ zero: e / 2
883
+ };
884
+ }
885
+ return n ? {
886
+ pxPerUnit: e / Math.max(t, oe),
887
+ zero: e
888
+ } : {
889
+ pxPerUnit: e / Math.max(t, Math.abs(se)),
890
+ zero: 0
891
+ };
892
+ }
893
+ let le = ({ left: e, unitW: t }) => {
894
+ let n = t * (B.value.style.chart.bars.gapRatio / 4);
895
+ return o.map((r, a) => e + t * a + n);
896
+ }, ue = l.map((e, t) => G.value.top + X.value * t + X.value * B.value.style.chart.bars.gapRatio / 4), de = l.map((t, r) => {
897
+ let a = B.value.style.chart.bars.distributed ? (t || 0) / Pr.value[r] : (t || 0) / u, o, s;
898
+ return t > 0 ? (s = d * a, o = p - s - e[r], e[r] += s) : (s = d * a, o = p + n[r], n[r] += Math.abs(s)), o;
899
+ }), fe = ({ minimapH: e }) => {
900
+ if (B.value.style.chart.bars.distributed) return o.map((t, n) => {
901
+ let r = Math.abs(Number(t) || 0), a = Math.abs(Ir.value?.[n] || 0) || 1e-9;
902
+ return e - (s[n] + r) / a * e;
903
+ });
904
+ let { pxPerUnit: t, zero: n } = ce({ minimapH: e });
905
+ return o.map((e, r) => {
906
+ let a = Number(e) || 0;
907
+ return a >= 0 ? n - (s[r] + a) * t : n + c[r] * t;
908
+ });
909
+ }, pe = l.map((e, n) => {
910
+ let a = B.value.style.chart.bars.distributed ? (e || 0) / Pr.value[n] : (e || 0) / u, o, s;
911
+ return e > 0 ? (s = f * a, o = ee + t[n], t[n] += s) : (s = f * a, o = ee - Math.abs(s) - r[n], r[n] += Math.abs(s)), o;
912
+ }), me = l.map((e, t) => {
913
+ let n = B.value.style.chart.bars.distributed ? (e || 0) / Pr.value[t] : (e || 0) / u;
914
+ return e > 0 ? d * n : d * Math.abs(n);
915
+ }), he = ({ minimapH: e }) => {
916
+ if (B.value.style.chart.bars.distributed) return o.map((t, n) => Math.abs(Number(t) || 0) / (Math.abs(Ir.value?.[n] || 0) || 1e-9) * e);
917
+ let { pxPerUnit: t } = ce({ minimapH: e });
918
+ return o.map((e) => Math.abs(Number(e) || 0) * t);
919
+ }, ge = l.map((e, t) => {
920
+ let n = B.value.style.chart.bars.distributed ? (e || 0) / Pr.value[t] : (e || 0) / u;
921
+ return e > 0 ? f * n : f * Math.abs(n);
922
+ }), _e = l.map((e) => Math.abs(e)).reduce((e, t) => e + t, 0);
923
+ return {
924
+ ...a,
925
+ proportions: l.map((e, t) => B.value.style.chart.bars.distributed ? (e || 0) / Pr.value[t] : (e || 0) / _e),
926
+ series: l,
927
+ signedSeries: te,
928
+ rectKeys: re,
929
+ minimapRectKeys: ie,
930
+ x: ae,
931
+ y: de,
932
+ height: me,
933
+ horizontal_width: ge,
934
+ horizontal_y: ue,
935
+ horizontal_x: pe,
936
+ xMinimap: le,
937
+ yMinimap: fe,
938
+ heightMinimap: he
939
+ };
940
+ });
941
+ }), ni = _(() => Rr.value.map((e, t) => ({
942
+ value: e,
943
+ sign: e >= 0 ? 1 : -1
944
+ })));
945
+ function ri(e, t, n, r, a) {
946
+ let s = a === -1 && e >= 0 ? -e : e;
947
+ return m(B.value.style.chart.bars.dataLabels.formatter, s, o({
948
+ p: B.value.style.chart.bars.dataLabels.prefix,
949
+ v: s,
950
+ s: B.value.style.chart.bars.dataLabels.suffix,
951
+ r: B.value.style.chart.bars.dataLabels.rounding
952
+ }), {
953
+ datapoint: t,
954
+ seriesIndex: n,
955
+ datapointIndex: r
956
+ });
957
+ }
958
+ function ii(e, t, n, r) {
959
+ return m(B.value.style.chart.bars.dataLabels.formatter, e, o({
960
+ v: isNaN(e) ? 0 : e,
961
+ s: "%",
962
+ r: B.value.style.chart.bars.dataLabels.rounding
963
+ }), {
964
+ datapoint: t,
965
+ seriesIndex: n,
966
+ datapointIndex: r
967
+ });
968
+ }
969
+ function ai(e) {
970
+ let t = JSON.parse(JSON.stringify($.value)).map((t) => ({
971
+ name: t.name,
972
+ value: t.series[e] === 0 ? 0 : t.series[e] || null,
973
+ proportion: t.proportions[e] || null,
974
+ color: t.color,
975
+ id: t.id
976
+ }));
977
+ B.value.events.datapointClick && B.value.events.datapointClick({
978
+ datapoint: t,
979
+ seriesIndex: e + J.value.start
980
+ }), P("selectDatapoint", {
981
+ datapoint: t,
982
+ period: Q.value[e]
983
+ });
984
+ }
985
+ function oi(e) {
986
+ return JSON.parse(JSON.stringify($.value)).map((t) => ({
987
+ name: t.name,
988
+ absoluteIndex: t.absoluteIndex,
989
+ value: t.series[e] === 0 ? 0 : (t.signedSeries[e] === -1 && t.series[e] >= 0 ? -t.series[e] : t.series[e]) || null,
990
+ proportion: t.proportions[e] || null,
991
+ color: t.color,
992
+ id: t.id,
993
+ timeLabel: Ur.value[e]
994
+ }));
995
+ }
996
+ function si(e) {
997
+ if (B.value.events.datapointLeave) {
998
+ let t = oi(e);
999
+ B.value.events.datapointLeave({
1000
+ datapoint: t,
1001
+ seriesIndex: e + J.value.start
1002
+ });
1003
+ }
1004
+ dn.value = !1, R.value = null, z.value === e && (z.value = null);
1005
+ }
1006
+ let ci = _(() => Array(q.value).fill(0).map((e, t) => oi(t)));
1007
+ Xe(() => N.selectedXIndex, (e) => {
1008
+ if ([null, void 0].includes(N.selectedXIndex)) {
1009
+ R.value = null;
1010
+ return;
1011
+ }
1012
+ let t = e - J.value.start;
1013
+ t < 0 || e >= J.value.end ? R.value = null : R.value = t ?? null;
1014
+ }, { immediate: !0 });
1015
+ function li(e) {
1016
+ if (!B.value.style.chart.tooltip.showTimeLabel) return null;
1017
+ let t = Q.value?.[e]?.text || null, n = Qr.value?.[e]?.text || null, r = Ur.value?.[e]?.text || null;
1018
+ return B.value.style.chart.tooltip.useDefaultTimeFormat ? t : n || r;
1019
+ }
1020
+ function ui(e, t = "pointer") {
1021
+ if (Fr.value) return;
1022
+ Bn.value = t, z.value = e, R.value = e, dn.value = !0;
1023
+ let n = B.value.style.chart.tooltip.customFormat, r = oi(e);
1024
+ Yi({
1025
+ seriesIndex: e,
1026
+ datapoint: r
1027
+ }), B.value.events.datapointEnter && B.value.events.datapointEnter({
1028
+ datapoint: r,
1029
+ seriesIndex: e + J.value.start
1030
+ }), fn.value = {
1031
+ timeLabel: li(e),
1032
+ datapoint: r,
1033
+ seriesIndex: e,
1034
+ config: B.value,
1035
+ series: $.value
1036
+ };
1037
+ let a = r.map((e) => Math.abs(e.value)).reduce((e, t) => e + t, 0), s = r.map((e) => h(e.value)).reduce((e, t) => e + t, 0);
1038
+ if (ne(n) && ie(() => n({
1039
+ seriesIndex: e,
1040
+ datapoint: r,
1041
+ series: $.value,
1042
+ config: B.value
1043
+ }))) pn.value = n({
1044
+ seriesIndex: e,
1045
+ datapoint: r,
1046
+ series: $.value,
1047
+ config: B.value
1048
+ });
1049
+ else {
1050
+ let { showValue: t, showTotal: n, totalTranslation: c, showPercentage: l, borderColor: u, roundingValue: d, roundingPercentage: f } = B.value.style.chart.tooltip, p = "", ee = li(e);
1051
+ ee && (p += `<div style="width:100%;text-align:center;border-bottom:1px solid ${u};padding-bottom:6px;margin-bottom:3px;">${ee}</div>`), n && (p += `<div class="vue-data-ui-tooltip-total" style="display:flex;flex-direction:row;align-items:center;gap:4px">
1052
+ <span>${c}:</span>
1053
+ <span>
1054
+ ${m(B.value.style.chart.bars.dataLabels.formatter, s, o({
1055
+ p: B.value.style.chart.bars.dataLabels.prefix,
1056
+ v: s,
1057
+ s: B.value.style.chart.bars.dataLabels.suffix,
1058
+ r: d
1059
+ }), { datapoint: {
1060
+ name: c,
1061
+ value: s
1062
+ } })}
1063
+ </span>
1064
+ </div>`);
1065
+ let te = [t && l ? "(" : "", t && l ? ")" : ""];
1066
+ r.reverse().forEach((e) => {
1067
+ p += `
1068
+ <div style="display:flex;flex-direction:row;align-items:center;gap:4px">
1069
+ <svg viewBox="0 0 60 60" height="14" width="14"><rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="${B.value.style.chart.bars.gradient.show ? `url(#gradient_${e.id})` : e.color}"/>${ln.pattern ? `<rect rx="5" x="0" y="0" height="60" width="60" stroke="none" fill="url(#pattern_${I.value}_${e.absoluteIndex})"/>` : ""}</svg>
1070
+ ${e.name}${t || l ? ":" : ""} ${t ? m(B.value.style.chart.bars.dataLabels.formatter, e.value, o({
1071
+ p: B.value.style.chart.bars.dataLabels.prefix,
1072
+ v: e.value,
1073
+ s: B.value.style.chart.bars.dataLabels.suffix,
1074
+ r: d
1075
+ }, { datapoint: e })) : ""} ${te[0]}${l ? o({
1076
+ v: isNaN(e.value / a) ? 0 : Math.abs(e.value) / a * 100,
1077
+ s: "%",
1078
+ r: f
1079
+ }) : ""}${te[1]}
1080
+ </div>
1081
+ `;
1082
+ }), pn.value = `<div>${p}</div>`;
1083
+ }
1084
+ }
1085
+ let di = _(() => U.value.width), fi = _(() => U.value.height);
1086
+ Ce({
1087
+ timeLabelsEls: B.value.orientation === "vertical" ? Mn : jn,
1088
+ timeLabels: Q,
1089
+ slicer: J,
1090
+ configRef: B,
1091
+ rotationPath: [
1092
+ "style",
1093
+ "chart",
1094
+ "grid",
1095
+ "x",
1096
+ "timeLabels",
1097
+ "rotation"
1098
+ ],
1099
+ autoRotatePath: [
1100
+ "style",
1101
+ "chart",
1102
+ "grid",
1103
+ "x",
1104
+ "timeLabels",
1105
+ "autoRotate",
1106
+ "enable"
1107
+ ],
1108
+ isAutoSize: !1,
1109
+ width: di,
1110
+ height: fi,
1111
+ rotation: B.value.style.chart.grid.x.timeLabels.autoRotate.angle
1112
+ });
1113
+ function pi(e) {
1114
+ yn.value = e, mn.value += 1;
1115
+ }
1116
+ function mi() {
1117
+ H.value.showTable = !H.value.showTable;
1118
+ }
1119
+ function hi() {
1120
+ H.value.dataLabels.show = !H.value.dataLabels.show;
1121
+ }
1122
+ function gi() {
1123
+ H.value.showTooltip = !H.value.showTooltip;
1124
+ }
1125
+ function _i() {
1126
+ return $.value;
1127
+ }
1128
+ let vi = _(() => {
1129
+ if ($.value.length === 0) return {
1130
+ head: [],
1131
+ body: [],
1132
+ config: {},
1133
+ columnNames: []
1134
+ };
1135
+ let e = $.value.map(({ name: e, color: t }) => ({
1136
+ label: e,
1137
+ color: t
1138
+ })), t = [];
1139
+ return Q.value.forEach((e) => {
1140
+ let n = [B.value.style.chart.grid.x.timeLabels.values[e.absoluteIndex] ? e.text : i + 1];
1141
+ K.value.forEach((t) => {
1142
+ n.push(Number((t.series[e.absoluteIndex] || 0).toFixed(B.value.table.td.roundingValue)));
1143
+ }), t.push(n);
1144
+ }), {
1145
+ head: e,
1146
+ body: t
1147
+ };
1148
+ });
1149
+ function yi(e = null) {
1150
+ let t = [
1151
+ [B.value.style.chart.title.text],
1152
+ [B.value.style.chart.title.subtitle.text],
1153
+ [""]
1154
+ ], n = ["", ...vi.value.head.map((e) => e.label)], r = vi.value.body, a = l(t.concat([n]).concat(r));
1155
+ e ? e(a) : c({
1156
+ csvContent: a,
1157
+ title: B.value.style.chart.title.text || "vue-ui-stackbar"
1158
+ });
1159
+ }
1160
+ let bi = _(() => {
1161
+ let e = [""].concat($.value.map((e) => e.name), " <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\" fill=\"none\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path stroke=\"none\" d=\"M0 0h24v24H0z\" fill=\"none\"/><path d=\"M18 16v2a1 1 0 0 1 -1 1h-11l6 -7l-6 -7h11a1 1 0 0 1 1 1v2\" /></svg>"), t = [], n = J.value.end - J.value.start;
1162
+ for (let e = 0; e < n; e += 1) {
1163
+ let n = J.value.start + e, r = $.value.map((t) => t.series[e] ?? 0).reduce((e, t) => e + t, 0);
1164
+ t.push([B.value.style.chart.grid.x.timeLabels.values[n] && Q.value[e]?.text || n + 1].concat($.value.map((t) => (t.series[e] ?? 0).toFixed(B.value.table.td.roundingValue)), (r ?? 0).toFixed(B.value.table.td.roundingValue)));
1165
+ }
1166
+ let r = {
1167
+ th: {
1168
+ backgroundColor: B.value.table.th.backgroundColor,
1169
+ color: B.value.table.th.color,
1170
+ outline: B.value.table.th.outline
1171
+ },
1172
+ td: {
1173
+ backgroundColor: B.value.table.td.backgroundColor,
1174
+ color: B.value.table.td.color,
1175
+ outline: B.value.table.td.outline
1176
+ },
1177
+ breakpoint: B.value.table.responsiveBreakpoint
1178
+ }, a = [B.value.table.columnNames.period].concat($.value.map((e) => e.name), B.value.table.columnNames.total);
1179
+ return {
1180
+ head: e,
1181
+ body: t.slice(0, J.value.end - J.value.start),
1182
+ config: r,
1183
+ colNames: a
1184
+ };
1185
+ });
1186
+ function xi() {
1187
+ L.value.length ? L.value = [] : Ei.value.forEach((e) => {
1188
+ L.value.push(e.id);
1189
+ }), P("selectLegend", $.value);
1190
+ }
1191
+ function Si(e) {
1192
+ if (L.value.includes(e.id)) L.value = L.value.filter((t) => t !== e.id);
1193
+ else {
1194
+ if (L.value.length === K.value.length - 1) return;
1195
+ L.value.push(e.id);
1196
+ }
1197
+ P("selectLegend", $.value);
1198
+ }
1199
+ function Ci(e) {
1200
+ return K.value.length ? K.value.find((t) => t.name === e) || (B.value.debug && console.warn(`VueUiStackbar - Series name not found "${e}"`), null) : (B.value.debug && console.warn("VueUiStackbar - There are no series to show."), null);
1201
+ }
1202
+ function wi(e) {
1203
+ let t = Ci(e);
1204
+ t !== null && L.value.includes(t.id) && Si({ id: t.id });
1205
+ }
1206
+ function Ti(e) {
1207
+ let t = Ci(e);
1208
+ t !== null && (L.value.includes(t.id) || Si({ id: t.id }));
1209
+ }
1210
+ let Ei = _(() => K.value.map((e, t) => ({
1211
+ ...e,
1212
+ shape: "square"
1213
+ })).map((e) => ({
1214
+ ...e,
1215
+ opacity: L.value.includes(e.id) ? .5 : 1,
1216
+ segregate: () => Si(e),
1217
+ isSegregated: L.value.includes(e.id)
1218
+ }))), Di = _(() => ({
1219
+ cy: "stackbar-legend",
1220
+ backgroundColor: B.value.style.chart.legend.backgroundColor,
1221
+ color: B.value.style.chart.legend.color,
1222
+ fontSize: B.value.style.chart.legend.fontSize,
1223
+ paddingBottom: 12,
1224
+ fontWeight: B.value.style.chart.legend.bold ? "bold" : ""
1225
+ })), Oi = D(!1);
1226
+ function ki() {
1227
+ Oi.value = !Oi.value;
1228
+ }
1229
+ function Ai(e, t) {
1230
+ P("selectTimeLabel", {
1231
+ datapoint: JSON.parse(JSON.stringify($.value)).map((e) => ({
1232
+ name: e.name,
1233
+ value: e.series[t] === 0 ? 0 : (e.signedSeries[t] === -1 && e.series[t] >= 0 ? -e.series[t] : e.series[t]) || null,
1234
+ proportion: e.proportions[t] || null,
1235
+ color: e.color,
1236
+ id: e.id
1237
+ })),
1238
+ absoluteIndex: e.absoluteIndex,
1239
+ label: e.text
1240
+ });
1241
+ }
1242
+ let ji = _(() => Math.max(...$.value.flatMap((e) => e.series)));
1243
+ function Mi(e, t) {
1244
+ return B.value.style.chart.bars.showDistributedPercentage && B.value.style.chart.bars.distributed ? ir.value ? t * 100 >= B.value.style.chart.bars.dataLabels.hideUnderPercentage : B.value.style.chart.bars.dataLabels.hideEmptyPercentages ? t > 0 : !0 : ir.value ? (rr.value && pr.value && console.warn("Vue Data UI - VueUiStackbar - You cannot set both dataLabels.hideUnderPercentage and dataLabels.hideUnderValue. Note that dataLabels.hideUnderPercentage takes precedence in this case."), e > ji.value * B.value.style.chart.bars.dataLabels.hideUnderPercentage / 100) : rr.value ? Math.abs(e) >= B.value.style.chart.bars.dataLabels.hideUnderValue : B.value.style.chart.bars.dataLabels.hideEmptyValues ? e !== 0 : !0;
1245
+ }
1246
+ async function Ni({ scale: e = 2 } = {}) {
1247
+ if (!F.value) return;
1248
+ let { width: t, height: n } = F.value.getBoundingClientRect(), r = t / n, { imageUri: a, base64: o } = await we({
1249
+ domElement: F.value,
1250
+ base64: !0,
1251
+ img: !0,
1252
+ scale: e
1253
+ });
1254
+ return {
1255
+ imageUri: a,
1256
+ base64: o,
1257
+ title: B.value.style.chart.title.text,
1258
+ width: t,
1259
+ height: n,
1260
+ aspectRatio: r
1261
+ };
1262
+ }
1263
+ let Pi = _(() => {
1264
+ let e = B.value.table.useDialog && !B.value.table.show, t = H.value.showTable;
1265
+ return {
1266
+ component: e ? an : $t,
1267
+ title: `${B.value.style.chart.title.text}${B.value.style.chart.title.subtitle.text ? `: ${B.value.style.chart.title.subtitle.text}` : ""}`,
1268
+ props: e ? {
1269
+ backgroundColor: B.value.table.th.backgroundColor,
1270
+ color: B.value.table.th.color,
1271
+ headerColor: B.value.table.th.color,
1272
+ headerBg: B.value.table.th.backgroundColor,
1273
+ isFullscreen: yn.value,
1274
+ fullscreenParent: F.value,
1275
+ forcedWidth: Math.min(800, window.innerWidth * .8),
1276
+ isCursorPointer: V.value
1277
+ } : {
1278
+ hideDetails: !0,
1279
+ config: {
1280
+ open: t,
1281
+ maxHeight: 1e4,
1282
+ body: {
1283
+ backgroundColor: B.value.style.chart.backgroundColor,
1284
+ color: B.value.style.chart.color
1285
+ },
1286
+ head: {
1287
+ backgroundColor: B.value.style.chart.backgroundColor,
1288
+ color: B.value.style.chart.color
1289
+ }
1290
+ }
1291
+ }
1292
+ };
1293
+ });
1294
+ Xe(() => H.value.showTable, (e) => {
1295
+ B.value.table.show || (e && B.value.table.useDialog && Tn.value ? Tn.value.open() : "close" in Tn.value && Tn.value.close());
1296
+ });
1297
+ function Fi() {
1298
+ H.value.showTable = !1, En.value && En.value.setTableIconState(!1);
1299
+ }
1300
+ let Ii = _(() => B.value.style.chart.backgroundColor), Li = _(() => B.value.style.chart.legend), { exportSvg: Ri, getSvg: zi } = ye({
1301
+ svg: $n,
1302
+ title: _(() => B.value.style.chart.title),
1303
+ legend: Li,
1304
+ legendItems: Ei,
1305
+ backgroundColor: Ii
1306
+ });
1307
+ async function Bi({ isCb: e }) {
1308
+ On.value = !0, await He();
1309
+ try {
1310
+ if (e) {
1311
+ let { blob: e, url: t, text: n, dataUrl: r } = await zi();
1312
+ await Promise.resolve(B.value.userOptions.callbacks.svg({
1313
+ blob: e,
1314
+ url: t,
1315
+ text: n,
1316
+ dataUrl: r
1317
+ }));
1318
+ } else await Promise.resolve(Ri());
1319
+ } finally {
1320
+ On.value = !1;
1321
+ }
1322
+ }
1323
+ function Vi(e) {
1324
+ if (e?.stage === "start") {
1325
+ Dn.value = !0;
1326
+ return;
1327
+ }
1328
+ if (e?.stage === "end") {
1329
+ Dn.value = !1;
1330
+ return;
1331
+ }
1332
+ cr();
1333
+ }
1334
+ function Hi(e) {
1335
+ let t = q.value;
1336
+ return e > t ? t : e < 0 || e < J.value.start ? B.value.style.chart.zoom.startIndex === null ? 1 : J.value.start + 1 : e;
1337
+ }
1338
+ let Ui = D(!1), Wi = D(!1);
1339
+ function Gi() {
1340
+ if (!Ui.value) {
1341
+ Ui.value = !0;
1342
+ try {
1343
+ let { startIndex: e, endIndex: t, keepState: n } = B.value.style.chart.zoom, r = n ? Math.max(0, q.value) : q.value;
1344
+ if (n && r <= 0) return;
1345
+ let a = e ?? 0, o = t == null ? r : Math.min(Hi(t + 1), r);
1346
+ Ki.value = !0, J.value.start = a, J.value.end = o, Y.value.start = a, Y.value.end = o, Ar(), Wi.value = !0;
1347
+ } finally {
1348
+ queueMicrotask(() => {
1349
+ Ki.value = !1;
1350
+ }), Ui.value = !1;
1351
+ }
1352
+ }
1353
+ }
1354
+ let Ki = D(!1);
1355
+ function qi(e) {
1356
+ Ui.value || Ki.value || e !== J.value.start && (J.value.start = e, Y.value.start = e, Ar());
1357
+ }
1358
+ function Ji(e) {
1359
+ if (Ui.value || Ki.value) return;
1360
+ let t = Hi(e);
1361
+ t !== J.value.end && (J.value.end = t, Y.value.end = t, Ar());
1362
+ }
1363
+ function Yi({ seriesIndex: e, datapoint: t }) {
1364
+ let n = J.value.start + e;
1365
+ P("selectX", {
1366
+ dataset: t,
1367
+ index: n,
1368
+ indexLabel: B.value.style.chart.grid.x.timeLabels.values[n]
1369
+ });
1370
+ }
1371
+ function Xi() {
1372
+ return { y0: Z.value?.[0]?.zero ?? G.value.bottom };
1373
+ }
1374
+ function Zi(e) {
1375
+ let { y0: t } = Xi(), n = B.value.style.chart.bars.totalValues, r = Math.max(2, n.fontSize * .3 + n.offsetY), a = Infinity, o = !1;
1376
+ for (let t of $.value || []) {
1377
+ let n = t?.series?.[e] ?? 0, r = t?.height?.[e] ?? 0, s = t?.y?.[e];
1378
+ n > 0 && r > 0 && Number.isFinite(s) && (o = !0, s < a && (a = s));
1379
+ }
1380
+ let s = (o && Number.isFinite(a) ? a : t) - r;
1381
+ return Math.min(Math.max(s, 0), G.value.bottom);
1382
+ }
1383
+ function Qi(e) {
1384
+ let { x0: t } = Xi(), n = Math.max(2, B.value.style.chart.bars.totalValues.fontSize * .3 + B.value.style.chart.bars.totalValues.offsetX), r = -Infinity, a = !1;
1385
+ for (let t of $.value || []) {
1386
+ let n = t?.series?.[e] ?? 0, o = t?.horizontal_x?.[e], s = t?.horizontal_width?.[e], c = Number.isFinite(s) ? Math.max(0, s) : 0;
1387
+ Number.isFinite(o) && n > 0 && c > 0 && (a = !0, r = Math.max(r, o + c));
1388
+ }
1389
+ return (a && Number.isFinite(r) ? r : t) + n;
1390
+ }
1391
+ async function $i() {
1392
+ if (P("copyAlt", {
1393
+ config: B.value,
1394
+ dataset: $.value
1395
+ }), !B.value.userOptions.callbacks.altCopy) {
1396
+ console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1397
+ return;
1398
+ }
1399
+ await Promise.resolve(B.value.userOptions.callbacks.altCopy({
1400
+ config: B.value,
1401
+ dataset: $.value
1402
+ }));
1403
+ }
1404
+ let ea = D(!1);
1405
+ function ta() {
1406
+ z.value = null, ea.value = !0;
1407
+ }
1408
+ function na() {
1409
+ z.value = null, dn.value = !1, R.value = null, P("selectX", {
1410
+ index: null,
1411
+ indexLabel: null,
1412
+ dataset: null
1413
+ }), ea.value = !1;
1414
+ }
1415
+ function ra(e) {
1416
+ if (!$n.value || Oi.value || document.activeElement !== $n.value || Fr.value || !J.value.end && J.value.end !== 0) return;
1417
+ let t = B.value.orientation === "vertical", n = B.value.orientation === "horizontal", r = t && e.key === "ArrowLeft" || n && e.key === "ArrowUp", a = t && e.key === "ArrowRight" || n && e.key === "ArrowDown", o = e.key === "Enter" || e.key === " ", s = e.key === "Escape";
1418
+ if (!r && !a && !o && !s) return;
1419
+ let c = J.value.end - J.value.start;
1420
+ if (c <= 0) return;
1421
+ if (e.preventDefault(), e.stopPropagation(), s) {
1422
+ z.value = null, dn.value = !1, R.value = null, P("selectX", {
1423
+ index: null,
1424
+ indexLabel: null,
1425
+ dataset: null
1426
+ });
1427
+ return;
1428
+ }
1429
+ if (o) {
1430
+ if (z.value === null) return;
1431
+ ai(z.value);
1432
+ return;
1433
+ }
1434
+ let l = z.value, u = R.value;
1435
+ l !== null && l >= 0 && l < c ? a ? (l += 1, l >= c && (l = 0)) : r && (--l, l < 0 && (l = c - 1)) : u !== null && u >= 0 && u < c ? (l = a ? u + 1 : u - 1, l >= c && (l = 0), l < 0 && (l = c - 1)) : l = a ? 0 : c - 1, z.value = l, ia(l), ui(l, "keyboard");
1436
+ }
1437
+ function ia(e) {
1438
+ if (!Number.isFinite(e)) return;
1439
+ let t, r;
1440
+ B.value.orientation === "vertical" ? (t = G.value.left + e * X.value + X.value / 2, r = G.value.top + G.value.height / 2) : (t = G.value.left + G.value.width / 2, r = G.value.top + e * X.value + X.value / 2);
1441
+ let a = n(t, r, $n.value);
1442
+ a && (zn.value = a);
1443
+ }
1444
+ let aa = _(() => ({
1445
+ headers: bi.value?.colNames ?? [],
1446
+ rows: bi.value?.body ?? []
1447
+ }));
1448
+ return De({
1449
+ getData: _i,
1450
+ getImage: Ni,
1451
+ generatePdf: sr,
1452
+ generateCsv: yi,
1453
+ generateImage: cr,
1454
+ generateSvg: Bi,
1455
+ hideSeries: Ti,
1456
+ showSeries: wi,
1457
+ toggleTable: mi,
1458
+ toggleLabels: hi,
1459
+ toggleTooltip: gi,
1460
+ toggleAnnotator: ki,
1461
+ toggleFullscreen: pi,
1462
+ copyAlt: $i
1463
+ }), (n, a) => (E(), b("div", {
1464
+ id: `stackbar_${I.value}`,
1465
+ ref_key: "stackbarChart",
1466
+ ref: F,
1467
+ class: Ue({
1468
+ "vue-data-ui-component": !0,
1469
+ "vue-ui-stackbar": !0,
1470
+ "vue-data-ui-wrapper-fullscreen": yn.value
1471
+ }),
1472
+ style: T(`background:${B.value.style.chart.backgroundColor};color:${B.value.style.chart.color};font-family:${B.value.style.fontFamily}; position: relative; ${B.value.responsive ? "height: 100%" : ""}`),
1473
+ onMouseenter: er,
1474
+ onMouseleave: tr
1475
+ }, [
1476
+ x("div", {
1477
+ id: `chart-instructions-${I.value}`,
1478
+ class: "sr-only"
1479
+ }, [x("p", null, A(B.value.a11y.translations.keyboardNavigation), 1)], 8, et),
1480
+ aa.value?.rows?.length ? (E(), v(Me, {
1481
+ key: 0,
1482
+ uid: I.value,
1483
+ head: aa.value.headers,
1484
+ body: aa.value.rows,
1485
+ notice: B.value.a11y.translations.tableAvailable,
1486
+ caption: B.value.a11y.translations.tableCaption
1487
+ }, null, 8, [
1488
+ "uid",
1489
+ "head",
1490
+ "body",
1491
+ "notice",
1492
+ "caption"
1493
+ ])) : y("", !0),
1494
+ B.value.userOptions.buttons.annotator ? (E(), v(j(tn), {
1495
+ key: 1,
1496
+ svgRef: j($n),
1497
+ backgroundColor: B.value.style.chart.backgroundColor,
1498
+ color: B.value.style.chart.color,
1499
+ active: Oi.value,
1500
+ isCursorPointer: V.value,
1501
+ onClose: ki
1502
+ }, {
1503
+ "annotator-action-close": M(() => [k(n.$slots, "annotator-action-close", {}, void 0, !0)]),
1504
+ "annotator-action-color": M(({ color: e }) => [k(n.$slots, "annotator-action-color", w(C({ color: e })), void 0, !0)]),
1505
+ "annotator-action-draw": M(({ mode: e }) => [k(n.$slots, "annotator-action-draw", w(C({ mode: e })), void 0, !0)]),
1506
+ "annotator-action-undo": M(({ disabled: e }) => [k(n.$slots, "annotator-action-undo", w(C({ disabled: e })), void 0, !0)]),
1507
+ "annotator-action-redo": M(({ disabled: e }) => [k(n.$slots, "annotator-action-redo", w(C({ disabled: e })), void 0, !0)]),
1508
+ "annotator-action-delete": M(({ disabled: e }) => [k(n.$slots, "annotator-action-delete", w(C({ disabled: e })), void 0, !0)]),
1509
+ _: 3
1510
+ }, 8, [
1511
+ "svgRef",
1512
+ "backgroundColor",
1513
+ "color",
1514
+ "active",
1515
+ "isCursorPointer"
1516
+ ])) : y("", !0),
1517
+ k(n.$slots, "userConfig", {}, void 0, !0),
1518
+ B.value.style.chart.title.text ? (E(), b("div", {
1519
+ key: 2,
1520
+ ref_key: "chartTitle",
1521
+ ref: hn,
1522
+ style: "width:100%;background:transparent;padding-bottom:24px"
1523
+ }, [(E(), v(Te, {
1524
+ key: `title_${xn.value}`,
1525
+ config: {
1526
+ title: {
1527
+ cy: "stackbar-title",
1528
+ ...B.value.style.chart.title
1529
+ },
1530
+ subtitle: {
1531
+ cy: "stackbar-subtitle",
1532
+ ...B.value.style.chart.title.subtitle
1533
+ }
1534
+ }
1535
+ }, null, 8, ["config"]))], 512)) : y("", !0),
1536
+ x("div", { id: `legend-top-${I.value}` }, null, 8, tt),
1537
+ B.value.userOptions.show && un.value && (j(Qn) || j(Xn)) ? (E(), v(j(nn), {
1538
+ ref_key: "userOptionsRef",
1539
+ ref: En,
1540
+ key: `user_option_${mn.value}`,
1541
+ backgroundColor: B.value.style.chart.backgroundColor,
1542
+ color: B.value.style.chart.color,
1543
+ isPrinting: j(ar),
1544
+ isImaging: j(or),
1545
+ uid: I.value,
1546
+ hasTooltip: B.value.style.chart.tooltip.show && B.value.userOptions.buttons.tooltip,
1547
+ hasPdf: B.value.userOptions.buttons.pdf,
1548
+ hasImg: B.value.userOptions.buttons.img,
1549
+ hasSvg: B.value.userOptions.buttons.svg,
1550
+ hasXls: B.value.userOptions.buttons.csv,
1551
+ hasTable: B.value.userOptions.buttons.table,
1552
+ hasLabel: B.value.userOptions.buttons.labels,
1553
+ hasFullscreen: B.value.userOptions.buttons.fullscreen,
1554
+ hasAltCopy: B.value.userOptions.buttons.altCopy,
1555
+ isFullscreen: yn.value,
1556
+ chartElement: F.value,
1557
+ position: B.value.userOptions.position,
1558
+ isTooltip: H.value.showTooltip,
1559
+ titles: { ...B.value.userOptions.buttonTitles },
1560
+ hasAnnotator: B.value.userOptions.buttons.annotator,
1561
+ isAnnotation: Oi.value,
1562
+ callbacks: B.value.userOptions.callbacks,
1563
+ printScale: B.value.userOptions.print.scale,
1564
+ tableDialog: B.value.table.useDialog,
1565
+ isCursorPointer: V.value,
1566
+ onToggleFullscreen: pi,
1567
+ onGeneratePdf: j(sr),
1568
+ onGenerateCsv: yi,
1569
+ onGenerateImage: Vi,
1570
+ onGenerateSvg: Bi,
1571
+ onToggleTable: mi,
1572
+ onToggleLabels: hi,
1573
+ onToggleTooltip: gi,
1574
+ onToggleAnnotator: ki,
1575
+ onCopyAlt: $i,
1576
+ style: T({ visibility: j(Qn) ? j(Xn) ? "visible" : "hidden" : "visible" })
1577
+ }, Re({ _: 2 }, [
1578
+ n.$slots.menuIcon ? {
1579
+ name: "menuIcon",
1580
+ fn: M(({ isOpen: e, color: t }) => [k(n.$slots, "menuIcon", w(C({
1581
+ isOpen: e,
1582
+ color: t
1583
+ })), void 0, !0)]),
1584
+ key: "0"
1585
+ } : void 0,
1586
+ n.$slots.optionTooltip ? {
1587
+ name: "optionTooltip",
1588
+ fn: M(() => [k(n.$slots, "optionTooltip", {}, void 0, !0)]),
1589
+ key: "1"
1590
+ } : void 0,
1591
+ n.$slots.optionPdf ? {
1592
+ name: "optionPdf",
1593
+ fn: M(() => [k(n.$slots, "optionPdf", {}, void 0, !0)]),
1594
+ key: "2"
1595
+ } : void 0,
1596
+ n.$slots.optionCsv ? {
1597
+ name: "optionCsv",
1598
+ fn: M(() => [k(n.$slots, "optionCsv", {}, void 0, !0)]),
1599
+ key: "3"
1600
+ } : void 0,
1601
+ n.$slots.optionImg ? {
1602
+ name: "optionImg",
1603
+ fn: M(() => [k(n.$slots, "optionImg", {}, void 0, !0)]),
1604
+ key: "4"
1605
+ } : void 0,
1606
+ n.$slots.optionSvg ? {
1607
+ name: "optionSvg",
1608
+ fn: M(() => [k(n.$slots, "optionSvg", {}, void 0, !0)]),
1609
+ key: "5"
1610
+ } : void 0,
1611
+ n.$slots.optionTable ? {
1612
+ name: "optionTable",
1613
+ fn: M(() => [k(n.$slots, "optionTable", {}, void 0, !0)]),
1614
+ key: "6"
1615
+ } : void 0,
1616
+ n.$slots.optionLabels ? {
1617
+ name: "optionLabels",
1618
+ fn: M(() => [k(n.$slots, "optionLabels", {}, void 0, !0)]),
1619
+ key: "7"
1620
+ } : void 0,
1621
+ n.$slots.optionFullscreen ? {
1622
+ name: "optionFullscreen",
1623
+ fn: M(({ toggleFullscreen: e, isFullscreen: t }) => [k(n.$slots, "optionFullscreen", w(C({
1624
+ toggleFullscreen: e,
1625
+ isFullscreen: t
1626
+ })), void 0, !0)]),
1627
+ key: "8"
1628
+ } : void 0,
1629
+ n.$slots.optionAnnotator ? {
1630
+ name: "optionAnnotator",
1631
+ fn: M(({ toggleAnnotator: e, isAnnotator: t }) => [k(n.$slots, "optionAnnotator", w(C({
1632
+ toggleAnnotator: e,
1633
+ isAnnotator: t
1634
+ })), void 0, !0)]),
1635
+ key: "9"
1636
+ } : void 0,
1637
+ n.$slots.optionAltCopy ? {
1638
+ name: "optionAltCopy",
1639
+ fn: M(({ altCopy: e }) => [k(n.$slots, "optionAltCopy", w(C({ altCopy: e })), void 0, !0)]),
1640
+ key: "10"
1641
+ } : void 0,
1642
+ n.$slots["custom-menu-before"] ? {
1643
+ name: "custom-menu-before",
1644
+ fn: M(() => [k(n.$slots, "custom-menu-before", {}, void 0, !0)]),
1645
+ key: "11"
1646
+ } : void 0,
1647
+ n.$slots["custom-menu-after"] ? {
1648
+ name: "custom-menu-after",
1649
+ fn: M(() => [k(n.$slots, "custom-menu-after", {}, void 0, !0)]),
1650
+ key: "12"
1651
+ } : void 0
1652
+ ]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.isTooltip.titles.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.style".split("."))) : y("", !0),
1653
+ x("div", nt, [(E(), b("svg", {
1654
+ ref_key: "svgRef",
1655
+ ref: $n,
1656
+ xmlns: j(ce),
1657
+ "aria-describedby": `chart-instructions-${I.value}`,
1658
+ viewBox: `0 0 ${G.value.chartWidth <= 0 ? 10 : G.value.chartWidth} ${G.value.chartHeight <= 0 ? 10 : G.value.chartHeight}`,
1659
+ class: Ue({ "vue-data-ui-loading": j(qn) }),
1660
+ style: T(`max-width:100%;overflow:visible;background:transparent;color:${B.value.style.chart.color}`),
1661
+ tabindex: "0",
1662
+ onFocus: ta,
1663
+ onBlur: na,
1664
+ onKeydown: ra
1665
+ }, [
1666
+ Be(j(rn)),
1667
+ n.$slots["chart-background"] ? (E(), b("foreignObject", {
1668
+ key: 0,
1669
+ x: G.value.left,
1670
+ y: G.value.top,
1671
+ width: G.value.width <= 0 ? 10 : G.value.width,
1672
+ height: G.value.height <= 0 ? 10 : G.value.height,
1673
+ style: { pointerEvents: "none" }
1674
+ }, [k(n.$slots, "chart-background", {}, void 0, !0)], 8, it)) : y("", !0),
1675
+ B.value.style.chart.bars.gradient.show ? (E(), b("defs", at, [(E(!0), b(g, null, O($.value, (e, t) => (E(), b("linearGradient", {
1676
+ id: `gradient_${e.id}`,
1677
+ x1: "0%",
1678
+ y1: "0%",
1679
+ x2: "0%",
1680
+ y2: "100%"
1681
+ }, [
1682
+ x("stop", {
1683
+ offset: "0%",
1684
+ "stop-color": e.color
1685
+ }, null, 8, st),
1686
+ x("stop", {
1687
+ offset: "61.8%",
1688
+ "stop-color": j(r)(e.color, B.value.style.chart.bars.gradient.intensity / 100)
1689
+ }, null, 8, ct),
1690
+ x("stop", {
1691
+ offset: "100%",
1692
+ "stop-color": e.color
1693
+ }, null, 8, lt)
1694
+ ], 8, ot))), 256))])) : y("", !0),
1695
+ B.value.style.chart.grid.frame.show ? (E(), b("rect", {
1696
+ key: 2,
1697
+ style: {
1698
+ pointerEvents: "none",
1699
+ transition: "none",
1700
+ animation: "none !important"
1701
+ },
1702
+ x: Math.max(0, G.value.left),
1703
+ y: Math.max(0, G.value.top),
1704
+ width: Math.max(0, G.value.width),
1705
+ height: Math.max(0, G.value.height),
1706
+ fill: "transparent",
1707
+ stroke: B.value.style.chart.grid.frame.stroke,
1708
+ "stroke-width": B.value.style.chart.grid.frame.strokeWidth,
1709
+ "stroke-linecap": B.value.style.chart.grid.frame.strokeLinecap,
1710
+ "stroke-linejoin": B.value.style.chart.grid.frame.strokeLinejoin,
1711
+ "stroke-dasharray": B.value.style.chart.grid.frame.strokeDasharray
1712
+ }, null, 8, ut)) : y("", !0),
1713
+ B.value.style.chart.grid.x.showHorizontalLines && B.value.orientation === "vertical" ? (E(!0), b(g, { key: 3 }, O(Z.value, (e, t) => (E(), b("line", {
1714
+ x1: G.value.left,
1715
+ x2: G.value.right,
1716
+ y1: e.y,
1717
+ y2: e.y,
1718
+ stroke: B.value.style.chart.grid.x.linesColor,
1719
+ "stroke-width": B.value.style.chart.grid.x.linesThickness,
1720
+ "stroke-dasharray": B.value.style.chart.grid.x.linesStrokeDasharray,
1721
+ "stroke-linecap": "round"
1722
+ }, null, 8, dt))), 256)) : y("", !0),
1723
+ B.value.style.chart.grid.x.showHorizontalLines && B.value.orientation === "horizontal" ? (E(!0), b(g, { key: 4 }, O(J.value.end - J.value.start + 1, (e, t) => (E(), b("line", {
1724
+ x1: G.value.left,
1725
+ x2: G.value.right,
1726
+ y1: G.value.top + X.value * t,
1727
+ y2: G.value.top + X.value * t,
1728
+ stroke: B.value.style.chart.grid.x.linesColor,
1729
+ "stroke-width": B.value.style.chart.grid.x.linesThickness,
1730
+ "stroke-dasharray": B.value.style.chart.grid.x.linesStrokeDasharray,
1731
+ "stroke-linecap": "round"
1732
+ }, null, 8, ft))), 256)) : y("", !0),
1733
+ B.value.style.chart.grid.y.showVerticalLines && B.value.orientation === "vertical" ? (E(!0), b(g, { key: 5 }, O(J.value.end - J.value.start + 1, (e, t) => (E(), b("line", {
1734
+ x1: G.value.left + X.value * t,
1735
+ x2: G.value.left + X.value * t,
1736
+ y1: G.value.top,
1737
+ y2: G.value.bottom,
1738
+ stroke: B.value.style.chart.grid.y.linesColor,
1739
+ "stroke-width": B.value.style.chart.grid.y.linesThickness,
1740
+ "stroke-dasharray": B.value.style.chart.grid.y.linesStrokeDasharray,
1741
+ "stroke-linecap": "round"
1742
+ }, null, 8, pt))), 256)) : y("", !0),
1743
+ B.value.style.chart.grid.y.showVerticalLines && B.value.orientation === "horizontal" ? (E(!0), b(g, { key: 6 }, O(Z.value, (e, t) => (E(), b("line", {
1744
+ x1: e.horizontal_x,
1745
+ x2: e.horizontal_x,
1746
+ y1: G.value.top,
1747
+ y2: G.value.bottom,
1748
+ stroke: B.value.style.chart.grid.y.linesColor,
1749
+ "stroke-width": B.value.style.chart.grid.y.linesThickness,
1750
+ "stroke-dasharray": B.value.style.chart.grid.y.linesStrokeDasharray,
1751
+ "stroke-linecap": "round"
1752
+ }, null, 8, mt))), 256)) : y("", !0),
1753
+ (E(!0), b(g, null, O($.value, (e, t) => (E(), b("g", { key: `stackbar-group-${e.datasetKey}` }, [n.$slots.pattern ? (E(), b("defs", ht, [k(n.$slots, "pattern", Ve({ ref_for: !0 }, {
1754
+ seriesIndex: e.absoluteIndex,
1755
+ patternId: `pattern_${I.value}_${e.absoluteIndex}`
1756
+ }), void 0, !0)])) : y("", !0), B.value.orientation === "vertical" ? (E(), b(g, { key: 1 }, [(E(!0), b(g, null, O(e.x, (t, n) => (E(), b("rect", {
1757
+ key: `stackbar-rect-${e.rectKeys[n]}`,
1758
+ x: t,
1759
+ y: j(h)(e.y[n]),
1760
+ height: e.height[n] < 0 ? 1e-4 : e.height[n] || 0,
1761
+ rx: B.value.style.chart.bars.borderRadius > e.height[n] / 2 ? (e.height[n] < 0 ? 0 : e.height[n]) / 2 : B.value.style.chart.bars.borderRadius,
1762
+ width: X.value * (1 - B.value.style.chart.bars.gapRatio / 2),
1763
+ fill: B.value.style.chart.bars.gradient.show ? `url(#gradient_${e.id})` : e.color,
1764
+ stroke: B.value.style.chart.backgroundColor,
1765
+ "stroke-width": B.value.style.chart.bars.strokeWidth,
1766
+ "stroke-linecap": "round",
1767
+ "stroke-linejoin": "round",
1768
+ class: Ue({
1769
+ "vue-data-ui-bar-animated": B.value.useCssAnimation,
1770
+ "vue-data-ui-bar-transition": bn.value
1771
+ })
1772
+ }, null, 10, gt))), 128)), n.$slots.pattern ? (E(), b("g", _t, [(E(!0), b(g, null, O(e.x, (t, n) => (E(), b("rect", {
1773
+ key: `stackbar-pattern-rect-${e.rectKeys[n]}`,
1774
+ x: t,
1775
+ y: j(h)(e.y[n]),
1776
+ height: e.height[n] < 0 ? 1e-4 : e.height[n] || 0,
1777
+ rx: B.value.style.chart.bars.borderRadius > e.height[n] / 2 ? (e.height[n] < 0 ? 0 : e.height[n]) / 2 : B.value.style.chart.bars.borderRadius,
1778
+ width: X.value * (1 - B.value.style.chart.bars.gapRatio / 2),
1779
+ fill: `url(#pattern_${I.value}_${e.absoluteIndex})`,
1780
+ stroke: B.value.style.chart.backgroundColor,
1781
+ "stroke-width": B.value.style.chart.bars.strokeWidth,
1782
+ "stroke-linecap": "round",
1783
+ "stroke-linejoin": "round",
1784
+ class: Ue({
1785
+ "vue-data-ui-bar-animated": B.value.useCssAnimation,
1786
+ "vue-data-ui-bar-transition": bn.value
1787
+ })
1788
+ }, null, 10, vt))), 128))])) : y("", !0)], 64)) : (E(), b(g, { key: 2 }, [(E(!0), b(g, null, O(e.horizontal_x, (t, n) => (E(), b("rect", {
1789
+ key: `stackbar-rect-${e.rectKeys[n]}`,
1790
+ x: j(h)(t, G.value.left),
1791
+ y: e.horizontal_y[n] < 0 ? 0 : e.horizontal_y[n],
1792
+ width: j(h)(e.horizontal_width[n] < 0 ? 1e-4 : e.horizontal_width[n]),
1793
+ rx: B.value.style.chart.bars.borderRadius > e.height[n] / 2 ? (e.height[n] < 0 ? 0 : e.height[n]) / 2 : B.value.style.chart.bars.borderRadius,
1794
+ height: X.value * (1 - B.value.style.chart.bars.gapRatio / 2),
1795
+ fill: B.value.style.chart.bars.gradient.show ? `url(#gradient_${e.id})` : e.color,
1796
+ stroke: B.value.style.chart.backgroundColor,
1797
+ "stroke-width": B.value.style.chart.bars.strokeWidth,
1798
+ "stroke-linecap": "round",
1799
+ "stroke-linejoin": "round",
1800
+ class: Ue({
1801
+ "vue-data-ui-bar-animated": B.value.useCssAnimation,
1802
+ "vue-data-ui-bar-transition": bn.value
1803
+ })
1804
+ }, null, 10, yt))), 128)), n.$slots.pattern ? (E(), b("g", bt, [(E(!0), b(g, null, O(e.horizontal_x, (t, n) => (E(), b("rect", {
1805
+ key: `stackbar-pattern-rect-${e.rectKeys[n]}`,
1806
+ x: j(h)(t, G.value.left),
1807
+ y: e.horizontal_y[n] < 0 ? 0 : e.horizontal_y[n],
1808
+ width: j(h)(e.horizontal_width[n] < 0 ? 1e-4 : e.horizontal_width[n]),
1809
+ rx: B.value.style.chart.bars.borderRadius > e.height[n] / 2 ? (e.height[n] < 0 ? 0 : e.height[n]) / 2 : B.value.style.chart.bars.borderRadius,
1810
+ height: X.value * (1 - B.value.style.chart.bars.gapRatio / 2),
1811
+ fill: `url(#pattern_${I.value}_${e.absoluteIndex})`,
1812
+ stroke: B.value.style.chart.backgroundColor,
1813
+ "stroke-width": B.value.style.chart.bars.strokeWidth,
1814
+ "stroke-linecap": "round",
1815
+ "stroke-linejoin": "round",
1816
+ class: Ue({
1817
+ "vue-data-ui-bar-animated": B.value.useCssAnimation,
1818
+ "vue-data-ui-bar-transition": bn.value
1819
+ })
1820
+ }, null, 10, xt))), 128))])) : y("", !0)], 64))]))), 128)),
1821
+ B.value.style.chart.grid.x.showAxis ? (E(), b("line", {
1822
+ key: 7,
1823
+ x1: G.value.left,
1824
+ x2: G.value.right,
1825
+ y1: G.value.bottom,
1826
+ y2: G.value.bottom,
1827
+ stroke: B.value.style.chart.grid.x.axisColor,
1828
+ "stroke-width": B.value.style.chart.grid.x.axisThickness,
1829
+ "stroke-linecap": "round",
1830
+ "stroke-linejoin": "round"
1831
+ }, null, 8, St)) : y("", !0),
1832
+ B.value.style.chart.grid.y.showAxis && !B.value.style.chart.bars.distributed ? (E(), b("line", {
1833
+ key: 8,
1834
+ x1: W.value ? G.value.right : G.value.left,
1835
+ x2: W.value ? G.value.right : G.value.left,
1836
+ y1: G.value.top,
1837
+ y2: G.value.bottom,
1838
+ stroke: B.value.style.chart.grid.y.axisColor,
1839
+ "stroke-width": B.value.style.chart.grid.y.axisThickness,
1840
+ "stroke-linecap": "round",
1841
+ "stroke-linejoin": "round"
1842
+ }, null, 8, Ct)) : y("", !0),
1843
+ B.value.style.chart.grid.x.axisName.show && B.value.style.chart.grid.x.axisName.text ? (E(), b("text", {
1844
+ key: 9,
1845
+ ref_key: "xAxisLabel",
1846
+ ref: kn,
1847
+ x: G.value.left + G.value.width / 2,
1848
+ y: G.value.chartHeight - 3,
1849
+ "font-size": B.value.style.chart.grid.x.axisName.fontSize,
1850
+ fill: B.value.style.chart.grid.x.axisName.color,
1851
+ "font-weight": B.value.style.chart.grid.x.axisName.bold ? "bold" : "normal",
1852
+ "text-anchor": "middle"
1853
+ }, A(B.value.style.chart.grid.x.axisName.text), 9, wt)) : y("", !0),
1854
+ B.value.style.chart.grid.y.axisName.show && B.value.style.chart.grid.y.axisName.text ? (E(), b("text", {
1855
+ key: 10,
1856
+ ref_key: "yAxisLabel",
1857
+ ref: An,
1858
+ transform: `translate(${W.value ? U.value.width - B.value.style.chart.grid.y.axisName.fontSize / 2 - B.value.style.chart.grid.y.axisName.offsetX : B.value.style.chart.grid.y.axisName.fontSize + B.value.style.chart.grid.y.axisName.offsetX}, ${G.value.top + G.value.height / 2}) rotate(-90)`,
1859
+ "font-size": B.value.style.chart.grid.y.axisName.fontSize,
1860
+ fill: B.value.style.chart.grid.y.axisName.color,
1861
+ "font-weight": B.value.style.chart.grid.y.axisName.bold ? "bold" : "normal",
1862
+ "text-anchor": "middle"
1863
+ }, A(B.value.style.chart.grid.y.axisName.text), 9, Tt)) : y("", !0),
1864
+ H.value.dataLabels.show && B.value.orientation === "vertical" ? (E(), b(g, { key: 11 }, [(E(!0), b(g, null, O($.value, (e, t) => (E(), b("g", null, [(E(!0), b(g, null, O(e.x, (n, r) => (E(), b(g, null, [Mi(e.series[r], e.proportions[r]) ? (E(), b("text", {
1865
+ key: 0,
1866
+ x: n + X.value * (1 - B.value.style.chart.bars.gapRatio / 2) / 2,
1867
+ y: e.y[r] + e.height[r] / 2 + B.value.style.chart.bars.dataLabels.fontSize / 3,
1868
+ "font-size": B.value.style.chart.bars.dataLabels.fontSize,
1869
+ fill: B.value.style.chart.bars.dataLabels.adaptColorToBackground ? j(oe)(e.color) : B.value.style.chart.bars.dataLabels.color,
1870
+ "font-weight": B.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
1871
+ "text-anchor": "middle"
1872
+ }, A(B.value.style.chart.bars.showDistributedPercentage && B.value.style.chart.bars.distributed ? ii(e.proportions[r] * 100, e, t, r) : ri(e.series[r], e, t, r, e.signedSeries[r])), 9, Et)) : y("", !0)], 64))), 256))]))), 256)), B.value.style.chart.bars.totalValues.show && $.value.length > 1 ? (E(), b("g", {
1873
+ key: 0,
1874
+ ref_key: "sumTop",
1875
+ ref: Nn
1876
+ }, [(E(!0), b(g, null, O(ni.value, (e, t) => (E(), b(g, null, [!B.value.style.chart.bars.dataLabels.hideEmptyValues || e.value !== 0 ? (E(), b("text", {
1877
+ key: 0,
1878
+ x: G.value.left + X.value * t + X.value / 2,
1879
+ y: Zi(t),
1880
+ "text-anchor": "middle",
1881
+ "font-size": B.value.style.chart.bars.totalValues.fontSize,
1882
+ "font-weight": B.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
1883
+ fill: B.value.style.chart.bars.totalValues.color
1884
+ }, A(ri(e.value, e, t, e.sign)), 9, Dt)) : y("", !0)], 64))), 256))], 512)) : y("", !0)], 64)) : y("", !0),
1885
+ H.value.dataLabels.show && B.value.orientation === "horizontal" ? (E(), b(g, { key: 12 }, [(E(!0), b(g, null, O($.value, (e, t) => (E(), b("g", null, [(E(!0), b(g, null, O(e.horizontal_x, (n, r) => (E(), b(g, null, [Mi(e.series[r], e.proportions[r]) ? (E(), b("text", {
1886
+ key: 0,
1887
+ x: n + (e.horizontal_width[r] < 0 ? 1e-4 : e.horizontal_width[r]) / 2,
1888
+ y: e.horizontal_y[r] + X.value * (1 - B.value.style.chart.bars.gapRatio / 2) / 2 + B.value.style.chart.bars.dataLabels.fontSize / 3,
1889
+ "font-size": B.value.style.chart.bars.dataLabels.fontSize,
1890
+ fill: B.value.style.chart.bars.dataLabels.adaptColorToBackground ? j(oe)(e.color) : B.value.style.chart.bars.dataLabels.color,
1891
+ "font-weight": B.value.style.chart.bars.dataLabels.bold ? "bold" : "normal",
1892
+ "text-anchor": "middle"
1893
+ }, A(B.value.style.chart.bars.showDistributedPercentage && B.value.style.chart.bars.distributed ? ii(e.proportions[r] * 100, e, t, r) : ri(e.series[r], e, t, r, e.signedSeries[r])), 9, Ot)) : y("", !0)], 64))), 256))]))), 256)), B.value.style.chart.bars.totalValues.show && $.value.length > 1 ? (E(), b("g", {
1894
+ key: 0,
1895
+ ref_key: "sumRight",
1896
+ ref: Pn
1897
+ }, [(E(!0), b(g, null, O(ni.value, (e, t) => (E(), b(g, null, [!B.value.style.chart.bars.dataLabels.hideEmptyValues || e.value !== 0 ? (E(), b("text", {
1898
+ key: 0,
1899
+ x: Qi(t),
1900
+ y: G.value.top + X.value * t + X.value / 2 + B.value.style.chart.bars.totalValues.fontSize / 3,
1901
+ "text-anchor": "start",
1902
+ "font-size": B.value.style.chart.bars.totalValues.fontSize,
1903
+ "font-weight": B.value.style.chart.bars.totalValues.bold ? "bold" : "normal",
1904
+ fill: B.value.style.chart.bars.totalValues.color
1905
+ }, A(ri(e.value, e, t, e.sign)), 9, kt)) : y("", !0)], 64))), 256))], 512)) : y("", !0)], 64)) : y("", !0),
1906
+ B.value.style.chart.grid.y.axisLabels.show && !B.value.style.chart.bars.distributed && B.value.orientation === "vertical" ? (E(), b("g", {
1907
+ key: 13,
1908
+ ref_key: "scaleLabels",
1909
+ ref: jn
1910
+ }, [(E(!0), b(g, null, O(Z.value, (e, t) => (E(), b("line", {
1911
+ x1: W.value ? G.value.right : G.value.left,
1912
+ x2: W.value ? G.value.right + 6 : G.value.left - 6,
1913
+ y1: e.y,
1914
+ y2: e.y,
1915
+ stroke: B.value.style.chart.grid.x.axisColor,
1916
+ "stroke-width": 1
1917
+ }, null, 8, At))), 256)), (E(!0), b(g, null, O(Z.value, (e, t) => (E(), b("text", {
1918
+ x: e.x,
1919
+ y: e.y + B.value.style.chart.grid.y.axisLabels.fontSize / 3,
1920
+ "font-size": B.value.style.chart.grid.y.axisLabels.fontSize,
1921
+ "font-weight": B.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1922
+ fill: B.value.style.chart.grid.y.axisLabels.color,
1923
+ "text-anchor": W.value ? "start" : "end"
1924
+ }, A(j(m)(B.value.style.chart.grid.y.axisLabels.formatter, e.value, j(o)({
1925
+ p: B.value.style.chart.bars.dataLabels.prefix,
1926
+ v: e.value,
1927
+ s: B.value.style.chart.bars.dataLabels.suffix,
1928
+ r: B.value.style.chart.grid.y.axisLabels.rounding
1929
+ }), { datapoint: e })), 9, jt))), 256))], 512)) : y("", !0),
1930
+ B.value.style.chart.grid.y.axisLabels.show && !B.value.style.chart.bars.distributed && B.value.orientation === "horizontal" ? (E(), b("g", {
1931
+ key: 14,
1932
+ ref_key: "scaleLabels",
1933
+ ref: jn
1934
+ }, [(E(!0), b(g, null, O(Z.value, (e, t) => (E(), b("line", {
1935
+ x1: e.horizontal_x,
1936
+ x2: e.horizontal_x,
1937
+ y1: G.value.bottom,
1938
+ y2: G.value.bottom + 6,
1939
+ stroke: B.value.style.chart.grid.x.axisColor,
1940
+ "stroke-width": 1,
1941
+ "stroke-linecap": "round"
1942
+ }, null, 8, Mt))), 256)), (E(!0), b(g, null, O(Z.value, (e, t) => (E(), b("text", {
1943
+ class: "vue-data-ui-time-label",
1944
+ "font-size": B.value.style.chart.grid.x.timeLabels.fontSize,
1945
+ "font-weight": B.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
1946
+ fill: B.value.style.chart.grid.y.axisLabels.color,
1947
+ "text-anchor": B.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : B.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1948
+ transform: `translate(${e.horizontal_x}, ${G.value.bottom + B.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + B.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${B.value.style.chart.grid.x.timeLabels.rotation})`
1949
+ }, A(j(m)(B.value.style.chart.grid.y.axisLabels.formatter, e.value, j(o)({
1950
+ p: B.value.style.chart.bars.dataLabels.prefix,
1951
+ v: e.value,
1952
+ s: B.value.style.chart.bars.dataLabels.suffix,
1953
+ r: B.value.style.chart.grid.y.axisLabels.rounding
1954
+ }), { datapoint: e })), 9, Nt))), 256))], 512)) : y("", !0),
1955
+ B.value.style.chart.grid.x.timeLabels.show && B.value.orientation === "vertical" ? (E(), b("g", {
1956
+ key: 15,
1957
+ ref_key: "timeLabelsEls",
1958
+ ref: Mn
1959
+ }, [n.$slots["time-label"] ? (E(), b("g", Pt, [(E(!0), b(g, null, O(qr.value, (e, t) => (E(), b("g", null, [k(n.$slots, "time-label", Ve({ ref_for: !0 }, {
1960
+ x: G.value.left + X.value * t + X.value / 2,
1961
+ y: G.value.bottom + B.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + B.value.style.chart.grid.x.timeLabels.offsetY,
1962
+ fontSize: B.value.style.chart.grid.x.timeLabels.fontSize,
1963
+ fill: B.value.style.chart.grid.x.timeLabels.color,
1964
+ transform: `translate(${G.value.left + X.value * t + X.value / 2}, ${G.value.bottom + B.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + B.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${B.value.style.chart.grid.x.timeLabels.rotation})`,
1965
+ absoluteIndex: e.absoluteIndex,
1966
+ content: e.text,
1967
+ textAnchor: B.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : B.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1968
+ show: !0
1969
+ }), void 0, !0)]))), 256))])) : (E(), b("g", Ft, [(E(!0), b(g, null, O(qr.value, (e, n) => (E(), b("g", null, [String(e.text).includes("\n") ? (E(), b("text", {
1970
+ key: n + "-multi",
1971
+ "text-anchor": B.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : B.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1972
+ "font-size": B.value.style.chart.grid.x.timeLabels.fontSize,
1973
+ fill: B.value.style.chart.grid.x.timeLabels.color,
1974
+ transform: `
1975
+ translate(
1976
+ ${G.value.left + X.value * n + X.value / 2},
1977
+ ${G.value.bottom + B.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + B.value.style.chart.grid.x.timeLabels.offsetY}
1978
+ ),
1979
+ rotate(${B.value.style.chart.grid.x.timeLabels.rotation})
1980
+ `,
1981
+ style: T({ cursor: V.value ? "pointer" : "default" }),
1982
+ innerHTML: j(t)({
1983
+ content: String(e.text),
1984
+ fontSize: B.value.style.chart.grid.x.timeLabels.fontSize,
1985
+ fill: B.value.style.chart.grid.x.timeLabels.color,
1986
+ x: 0,
1987
+ y: 0
1988
+ }),
1989
+ onClick: () => Ai(e, n)
1990
+ }, null, 12, Lt)) : (E(), b("text", {
1991
+ class: "vue-data-ui-time-label",
1992
+ key: n,
1993
+ "text-anchor": B.value.style.chart.grid.x.timeLabels.rotation > 0 ? "start" : B.value.style.chart.grid.x.timeLabels.rotation < 0 ? "end" : "middle",
1994
+ "font-size": B.value.style.chart.grid.x.timeLabels.fontSize,
1995
+ "font-weight": B.value.style.chart.grid.x.timeLabels.bold ? "bold" : "normal",
1996
+ fill: B.value.style.chart.grid.x.timeLabels.color,
1997
+ transform: `translate(${G.value.left + X.value * n + X.value / 2}, ${G.value.bottom + B.value.style.chart.grid.x.timeLabels.fontSize * 1.3 + B.value.style.chart.grid.x.timeLabels.offsetY}), rotate(${B.value.style.chart.grid.x.timeLabels.rotation})`,
1998
+ style: T({ cursor: V.value ? "pointer" : "default" }),
1999
+ onClick: () => Ai(e, n)
2000
+ }, A(e.text), 13, It))]))), 256))]))], 512)) : y("", !0),
2001
+ B.value.style.chart.grid.x.timeLabels.show && B.value.orientation === "horizontal" ? (E(), b("g", {
2002
+ key: 16,
2003
+ ref_key: "timeLabelsEls",
2004
+ ref: Mn
2005
+ }, [n.$slots["time-label"] ? (E(), b("g", Rt, [(E(!0), b(g, null, O(Q.value, (e, t) => (E(), b("g", null, [k(n.$slots, "time-label", Ve({ ref_for: !0 }, {
2006
+ x: G.value.left - 8,
2007
+ y: G.value.top + X.value * t + X.value / 2 + B.value.style.chart.grid.y.axisLabels.fontSize / 3,
2008
+ fontSize: B.value.style.chart.grid.x.timeLabels.fontSize,
2009
+ fill: B.value.style.chart.grid.x.timeLabels.color,
2010
+ transform: null,
2011
+ absoluteIndex: e.absoluteIndex,
2012
+ content: e.text,
2013
+ textAnchor: "end",
2014
+ show: !0
2015
+ }), void 0, !0)]))), 256))])) : (E(), b("g", zt, [(E(!0), b(g, null, O(Q.value, (e, t) => (E(), b("g", null, [String(e.text).includes("\n") ? (E(), b("text", {
2016
+ key: 1,
2017
+ "text-anchor": "end",
2018
+ "font-size": B.value.style.chart.grid.y.axisLabels.fontSize,
2019
+ "font-weight": B.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
2020
+ fill: B.value.style.chart.grid.y.axisLabels.color,
2021
+ x: G.value.left - 8,
2022
+ y: G.value.top + X.value * t + X.value / 2 + B.value.style.chart.grid.y.axisLabels.fontSize / 3,
2023
+ style: T({ cursor: V.value ? "pointer" : "default" }),
2024
+ onClick: () => Ai(e, t),
2025
+ innerHTML: j(d)({
2026
+ content: String(e.text),
2027
+ fontSize: B.value.style.chart.grid.y.axisLabels.fontSize,
2028
+ fill: B.value.style.chart.grid.y.axisLabels.color,
2029
+ x: G.value.left - 8,
2030
+ y: 0
2031
+ })
2032
+ }, null, 12, Vt)) : (E(), b("text", {
2033
+ key: 0,
2034
+ "text-anchor": "end",
2035
+ "font-size": B.value.style.chart.grid.y.axisLabels.fontSize,
2036
+ "font-weight": B.value.style.chart.grid.y.axisLabels.bold ? "bold" : "normal",
2037
+ fill: B.value.style.chart.grid.y.axisLabels.color,
2038
+ x: G.value.left - 8,
2039
+ y: G.value.top + X.value * t + X.value / 2 + B.value.style.chart.grid.y.axisLabels.fontSize / 3,
2040
+ style: T({ cursor: V.value ? "pointer" : "default" }),
2041
+ onClick: () => Ai(e, t)
2042
+ }, A(e.text), 13, Bt))]))), 256))]))], 512)) : y("", !0),
2043
+ H.value.showTooltip && B.value.orientation === "vertical" ? (E(!0), b(g, { key: 17 }, O(J.value.end - J.value.start, (e, t) => (E(), b("rect", {
2044
+ x: G.value.left + t * X.value,
2045
+ y: G.value.top,
2046
+ width: X.value,
2047
+ height: G.value.height < 0 ? 0 : G.value.height,
2048
+ onClick: () => ai(t),
2049
+ onMouseenter: () => ui(t, "pointer"),
2050
+ onMouseleave: () => si(t),
2051
+ fill: t === R.value || t === Gn.value ? B.value.style.chart.highlighter.color : "transparent",
2052
+ style: T({ opacity: B.value.style.chart.highlighter.opacity / 100 })
2053
+ }, null, 44, Ht))), 256)) : y("", !0),
2054
+ H.value.showTooltip && B.value.orientation === "horizontal" ? (E(!0), b(g, { key: 18 }, O(J.value.end - J.value.start, (e, t) => (E(), b("rect", {
2055
+ x: G.value.left,
2056
+ y: G.value.top + t * X.value,
2057
+ width: G.value.width < 0 ? 0 : G.value.width,
2058
+ height: X.value,
2059
+ onClick: () => ai(t),
2060
+ onMouseenter: () => ui(t, "pointer"),
2061
+ onMouseleave: () => si(t),
2062
+ fill: t === R.value || t === Gn.value ? B.value.style.chart.highlighter.color : "transparent",
2063
+ style: T({ opacity: B.value.style.chart.highlighter.opacity / 100 })
2064
+ }, null, 44, Ut))), 256)) : y("", !0),
2065
+ Or.value ? (E(), b("rect", Ve({ key: 19 }, Er.value, {
2066
+ "data-start": J.value.start,
2067
+ "data-end": J.value.end
2068
+ }), null, 16, Wt)) : y("", !0),
2069
+ k(n.$slots, "svg", { svg: {
2070
+ drawingArea: G.value,
2071
+ slicer: J.value,
2072
+ data: $.value,
2073
+ isPrintingImg: j(ar) || j(or) || Dn.value,
2074
+ isPrintingSvg: On.value,
2075
+ barWidth: X.value
2076
+ } }, void 0, !0)
2077
+ ], 46, rt)), n.$slots.hint ? (E(), b("div", Gt, [k(n.$slots, "hint", w(C({
2078
+ hint: B.value.a11y.translations.keyboardNavigation,
2079
+ isVisible: ea.value
2080
+ })), void 0, !0)])) : y("", !0)]),
2081
+ n.$slots.watermark ? (E(), b("div", Kt, [k(n.$slots, "watermark", w(C({ isPrinting: j(ar) || j(or) || Dn.value || On.value })), void 0, !0)])) : y("", !0),
2082
+ B.value.style.chart.zoom.show && un.value && Wi.value && q.value > 6 ? (E(), v(Ae, {
2083
+ key: 5,
2084
+ ref_key: "chartSlicer",
2085
+ ref: _n,
2086
+ allMinimaps: Lr.value,
2087
+ background: B.value.style.chart.zoom.color,
2088
+ borderColor: B.value.style.chart.backgroundColor,
2089
+ customFormat: B.value.style.chart.zoom.customFormat,
2090
+ cutNullValues: !1,
2091
+ forceZeroCenter: !0,
2092
+ enableRangeHandles: B.value.style.chart.zoom.enableRangeHandles,
2093
+ enableSelectionDrag: B.value.style.chart.zoom.enableSelectionDrag,
2094
+ end: J.value.end,
2095
+ focusOnDrag: B.value.style.chart.zoom.focusOnDrag,
2096
+ focusRangeRatio: B.value.style.chart.zoom.focusRangeRatio,
2097
+ fontSize: B.value.style.chart.zoom.fontSize,
2098
+ immediate: !B.value.style.chart.zoom.preview.enable,
2099
+ inputColor: B.value.style.chart.zoom.color,
2100
+ isPreview: Or.value,
2101
+ labelLeft: B.value.style.chart.grid.x.timeLabels.values[J.value.start] ? Q.value?.[0]?.text ?? "" : "",
2102
+ labelRight: B.value.style.chart.grid.x.timeLabels.values[J.value.end - 1] ? Q.value?.at(-1)?.text ?? "" : "",
2103
+ max: Math.max(...e.dataset.map((e) => e.series.length)),
2104
+ min: 0,
2105
+ minimap: Ir.value,
2106
+ minimapCompact: B.value.style.chart.zoom.minimap.compact,
2107
+ minimapFrameColor: B.value.style.chart.zoom.minimap.frameColor,
2108
+ minimapIndicatorColor: B.value.style.chart.zoom.minimap.indicatorColor,
2109
+ minimapMerged: !1,
2110
+ minimapSelectedColor: B.value.style.chart.zoom.minimap.selectedColor,
2111
+ minimapSelectedColorOpacity: B.value.style.chart.zoom.minimap.selectedColorOpacity,
2112
+ minimapSelectedIndex: R.value,
2113
+ minimapSelectionRadius: 1,
2114
+ preciseLabels: Zr.value.length ? Zr.value : Ur.value,
2115
+ refreshEndPoint: B.value.style.chart.zoom.endIndex === null ? Math.max(...e.dataset.map((e) => e.series.length)) : B.value.style.chart.zoom.endIndex + 1,
2116
+ refreshStartPoint: B.value.style.chart.zoom.startIndex === null ? 0 : B.value.style.chart.zoom.startIndex,
2117
+ selectColor: B.value.style.chart.zoom.highlightColor,
2118
+ selectedSeries: ci.value,
2119
+ smoothMinimap: !1,
2120
+ start: J.value.start,
2121
+ textColor: B.value.style.chart.color,
2122
+ timeLabels: Ur.value,
2123
+ usePreciseLabels: B.value.style.chart.grid.x.timeLabels.datetimeFormatter.enable && !B.value.style.chart.zoom.useDefaultFormat,
2124
+ valueEnd: J.value.end,
2125
+ valueStart: J.value.start,
2126
+ verticalHandles: B.value.style.chart.zoom.minimap.verticalHandles,
2127
+ maxWidth: B.value.style.chart.zoom.maxWidth,
2128
+ isCursorPointer: V.value,
2129
+ additionalMinimapHeight: B.value.style.chart.zoom.minimap.additionalHeight,
2130
+ handleType: B.value.style.chart.zoom.minimap.handleType,
2131
+ handleIconColor: B.value.style.chart.zoom.minimap.handleIconColor,
2132
+ handleBorderWidth: B.value.style.chart.zoom.minimap.handleBorderWidth,
2133
+ handleBorderColor: B.value.style.chart.zoom.minimap.handleBorderColor,
2134
+ handleFill: B.value.style.chart.zoom.minimap.handleFill,
2135
+ handleWidth: B.value.style.chart.zoom.minimap.handleWidth,
2136
+ "onUpdate:end": Ji,
2137
+ "onUpdate:start": qi,
2138
+ onTrapMouse: Dr,
2139
+ onReset: a[0] ||= () => Nr({ force: !0 }),
2140
+ onFutureEnd: a[1] ||= (e) => kr("end", e),
2141
+ onFutureStart: a[2] ||= (e) => kr("start", e)
2142
+ }, {
2143
+ "reset-action": M(({ reset: e }) => [k(n.$slots, "reset-action", w(C({ reset: e })), void 0, !0)]),
2144
+ slotMap: M(({ width: e, height: t, unitW: n }) => [(E(!0), b(g, null, O($.value, (e) => (E(), b("g", { key: e.id }, [(E(!0), b(g, null, O(e.xMinimap({
2145
+ left: 0,
2146
+ unitW: n
2147
+ }), (r, a) => (E(), b("rect", {
2148
+ key: `minimap-rect-${e.minimapRectKeys[a]}`,
2149
+ x: a === 0 ? r - n * (B.value.style.chart.bars.gapRatio / 4) : r - n / 2,
2150
+ y: Math.max(0, Math.min(t, e.yMinimap({ minimapH: t })[a])),
2151
+ height: e.heightMinimap({ minimapH: t })[a],
2152
+ width: [0, q.value - 1].includes(a) ? n * (1 - B.value.style.chart.bars.gapRatio / 2) / 2 : n * (1 - B.value.style.chart.bars.gapRatio / 2),
2153
+ fill: B.value.style.chart.bars.gradient.show ? `url(#gradient_${e.id})` : e.color,
2154
+ stroke: B.value.style.chart.backgroundColor,
2155
+ "stroke-width": .5,
2156
+ rx: "0",
2157
+ "stroke-linecap": "round",
2158
+ "stroke-linejoin": "round",
2159
+ style: T({ opacity: a >= Y.value.start && a <= Y.value.end ? 1 : .62 })
2160
+ }, null, 12, qt))), 128))]))), 128))]),
2161
+ _: 3
2162
+ }, 8, /* @__PURE__ */ "allMinimaps.background.borderColor.customFormat.enableRangeHandles.enableSelectionDrag.end.focusOnDrag.focusRangeRatio.fontSize.immediate.inputColor.isPreview.labelLeft.labelRight.max.minimap.minimapCompact.minimapFrameColor.minimapIndicatorColor.minimapSelectedColor.minimapSelectedColorOpacity.minimapSelectedIndex.preciseLabels.refreshEndPoint.refreshStartPoint.selectColor.selectedSeries.start.textColor.timeLabels.usePreciseLabels.valueEnd.valueStart.verticalHandles.maxWidth.isCursorPointer.additionalMinimapHeight.handleType.handleIconColor.handleBorderWidth.handleBorderColor.handleFill.handleWidth".split("."))) : y("", !0),
2163
+ Be(j(Zt), {
2164
+ teleportTo: B.value.style.chart.tooltip.teleportTo,
2165
+ show: H.value.showTooltip && dn.value,
2166
+ backgroundColor: B.value.style.chart.tooltip.backgroundColor,
2167
+ color: B.value.style.chart.tooltip.color,
2168
+ fontSize: B.value.style.chart.tooltip.fontSize,
2169
+ borderRadius: B.value.style.chart.tooltip.borderRadius,
2170
+ borderColor: B.value.style.chart.tooltip.borderColor,
2171
+ borderWidth: B.value.style.chart.tooltip.borderWidth,
2172
+ backgroundOpacity: B.value.style.chart.tooltip.backgroundOpacity,
2173
+ position: B.value.style.chart.tooltip.position,
2174
+ offsetX: B.value.style.chart.tooltip.offsetX,
2175
+ offsetY: B.value.style.chart.tooltip.offsetY,
2176
+ parent: F.value,
2177
+ content: pn.value,
2178
+ isFullscreen: yn.value,
2179
+ isCustom: j(ne)(B.value.style.chart.tooltip.customFormat),
2180
+ smooth: B.value.style.chart.tooltip.smooth,
2181
+ backdropFilter: B.value.style.chart.tooltip.backdropFilter,
2182
+ smoothForce: B.value.style.chart.tooltip.smoothForce,
2183
+ smoothSnapThreshold: B.value.style.chart.tooltip.smoothSnapThreshold,
2184
+ isA11yMode: Bn.value === "keyboard",
2185
+ a11yPosition: zn.value
2186
+ }, {
2187
+ "tooltip-before": M(() => [k(n.$slots, "tooltip-before", w(C({ ...fn.value })), void 0, !0)]),
2188
+ tooltip: M(() => [k(n.$slots, "tooltip", w(C({ ...fn.value })), void 0, !0)]),
2189
+ "tooltip-after": M(() => [k(n.$slots, "tooltip-after", w(C({ ...fn.value })), void 0, !0)]),
2190
+ _: 3
2191
+ }, 8, [
2192
+ "teleportTo",
2193
+ "show",
2194
+ "backgroundColor",
2195
+ "color",
2196
+ "fontSize",
2197
+ "borderRadius",
2198
+ "borderColor",
2199
+ "borderWidth",
2200
+ "backgroundOpacity",
2201
+ "position",
2202
+ "offsetX",
2203
+ "offsetY",
2204
+ "parent",
2205
+ "content",
2206
+ "isFullscreen",
2207
+ "isCustom",
2208
+ "smooth",
2209
+ "backdropFilter",
2210
+ "smoothForce",
2211
+ "smoothSnapThreshold",
2212
+ "isA11yMode",
2213
+ "a11yPosition"
2214
+ ]),
2215
+ x("div", { id: `legend-bottom-${I.value}` }, null, 8, Jt),
2216
+ wn.value && (B.value.style.chart.legend.show || n.$slots.legend) ? (E(), v(Le, {
2217
+ key: 6,
2218
+ to: B.value.style.chart.legend.position === "top" ? `#legend-top-${I.value}` : `#legend-bottom-${I.value}`
2219
+ }, [x("div", {
2220
+ ref_key: "chartLegend",
2221
+ ref: gn
2222
+ }, [k(n.$slots, "legend", { legend: Ei.value }, () => [B.value.style.chart.legend.show ? (E(), v(Fe, {
2223
+ key: 0,
2224
+ legendSet: Ei.value,
2225
+ config: Di.value,
2226
+ isCursorPointer: V.value,
2227
+ onClickMarker: a[3] ||= ({ legend: e }) => e.segregate()
2228
+ }, Re({
2229
+ item: M(({ legend: e }) => [j(qn) ? y("", !0) : (E(), b("div", {
2230
+ key: 0,
2231
+ onClick: (t) => e.segregate(),
2232
+ style: T(`opacity:${L.value.includes(e.id) ? .5 : 1}`)
2233
+ }, A(e.name), 13, Yt))]),
2234
+ legendToggle: M(() => [Ei.value.length > 2 && B.value.style.chart.legend.selectAllToggle.show && !j(qn) ? (E(), v(je, {
2235
+ key: 0,
2236
+ backgroundColor: B.value.style.chart.legend.selectAllToggle.backgroundColor,
2237
+ color: B.value.style.chart.legend.selectAllToggle.color,
2238
+ fontSize: B.value.style.chart.legend.fontSize,
2239
+ checked: L.value.length > 0,
2240
+ isCursorPointer: V.value,
2241
+ onToggle: xi
2242
+ }, null, 8, [
2243
+ "backgroundColor",
2244
+ "color",
2245
+ "fontSize",
2246
+ "checked",
2247
+ "isCursorPointer"
2248
+ ])) : y("", !0)]),
2249
+ _: 2
2250
+ }, [n.$slots.pattern ? {
2251
+ name: "legend-pattern",
2252
+ fn: M(({ legend: e, index: t }) => [Be(Ee, {
2253
+ shape: e.shape,
2254
+ radius: 30,
2255
+ stroke: "none",
2256
+ plot: {
2257
+ x: 30,
2258
+ y: 30
2259
+ },
2260
+ fill: `url(#pattern_${I.value}_${t})`
2261
+ }, null, 8, ["shape", "fill"])]),
2262
+ key: "0"
2263
+ } : void 0]), 1032, [
2264
+ "legendSet",
2265
+ "config",
2266
+ "isCursorPointer"
2267
+ ])) : y("", !0)], !0)], 512)], 8, ["to"])) : y("", !0),
2268
+ n.$slots.source ? (E(), b("div", {
2269
+ key: 7,
2270
+ ref_key: "source",
2271
+ ref: vn,
2272
+ dir: "auto"
2273
+ }, [k(n.$slots, "source", {}, void 0, !0)], 512)) : y("", !0),
2274
+ un.value && B.value.userOptions.buttons.table ? (E(), v(Ke(Pi.value.component), Ve({ key: 8 }, Pi.value.props, {
2275
+ ref_key: "tableUnit",
2276
+ ref: Tn,
2277
+ onClose: Fi
2278
+ }), Re({
2279
+ content: M(() => [Be(j(en), {
2280
+ colNames: bi.value.colNames,
2281
+ head: bi.value.head,
2282
+ body: bi.value.body,
2283
+ config: bi.value.config,
2284
+ title: B.value.table.useDialog ? "" : Pi.value.title,
2285
+ withCloseButton: !B.value.table.useDialog,
2286
+ isCursorPointer: V.value,
2287
+ onClose: Fi
2288
+ }, {
2289
+ th: M(({ th: e }) => [x("div", { innerHTML: e }, null, 8, Xt)]),
2290
+ td: M(({ td: e }) => [ze(A(isNaN(Number(e)) ? e : j(o)({
2291
+ p: B.value.style.chart.bars.dataLabels.prefix,
2292
+ v: e,
2293
+ s: B.value.style.chart.bars.dataLabels.suffix,
2294
+ r: B.value.table.td.roundingValue
2295
+ })), 1)]),
2296
+ _: 1
2297
+ }, 8, [
2298
+ "colNames",
2299
+ "head",
2300
+ "body",
2301
+ "config",
2302
+ "title",
2303
+ "withCloseButton",
2304
+ "isCursorPointer"
2305
+ ])]),
2306
+ _: 2
2307
+ }, [B.value.table.useDialog ? {
2308
+ name: "title",
2309
+ fn: M(() => [ze(A(Pi.value.title), 1)]),
2310
+ key: "0"
2311
+ } : void 0, B.value.table.useDialog ? {
2312
+ name: "actions",
2313
+ fn: M(() => [x("button", {
2314
+ tabindex: "0",
2315
+ class: "vue-ui-user-options-button",
2316
+ onClick: a[4] ||= (e) => yi(B.value.userOptions.callbacks.csv),
2317
+ style: T({ cursor: V.value ? "pointer" : "default" })
2318
+ }, [Be(j(Qt), {
2319
+ name: "fileCsv",
2320
+ stroke: Pi.value.props.color
2321
+ }, null, 8, ["stroke"])], 4)]),
2322
+ key: "1"
2323
+ } : void 0]), 1040)) : y("", !0),
2324
+ k(n.$slots, "skeleton", {}, () => [j(qn) ? (E(), v(ve, { key: 0 })) : y("", !0)], !0)
2325
+ ], 46, $e));
2326
+ }
2327
+ }, [["__scopeId", "data-v-23fc8c86"]]);
2328
+ //#endregion
2329
+ export { Qe as n, Zt as t };