vue-data-ui 3.25.5 → 3.25.7

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