vue-data-ui 3.22.14 → 3.23.1

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