vue-data-ui 3.27.1-beta.0 → 3.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (265) hide show
  1. package/README.md +49 -41
  2. package/dist/{Arrow-CJeSufxg.js → Arrow-D6OAn5rm.js} +1 -1
  3. package/dist/{BaseDraggableDialog-T1gEsQid.js → BaseDraggableDialog-Bw_azO0n.js} +1 -1
  4. package/dist/BaseIcon-DDctLkeT.js +1 -0
  5. package/dist/{BaseLegendToggle-Dn_tNvn4.js → BaseLegendToggle-BOcw1ke8.js} +1 -1
  6. package/dist/BaseZoomControls-Cq5AOHQ0.js +1 -0
  7. package/dist/{ColorPicker-CUjEw53A.js → ColorPicker-DHQvvLT9.js} +1 -1
  8. package/dist/DataTable-BcVZLSs8.js +1 -0
  9. package/dist/{HillActions-DdvXld3a.js → HillActions-Bq3UJ1Ut.js} +1 -1
  10. package/dist/{Legend-DokTll4u.js → Legend-D8NunRPr.js} +1 -1
  11. package/dist/{NonSvgPenAndPaper-BLzQuIm6.js → NonSvgPenAndPaper-CxQZ0YED.js} +1 -1
  12. package/dist/{PackageVersion-D6pKL176.js → PackageVersion-ATrKWi8V.js} +1 -1
  13. package/dist/{PenAndPaper-DvJJaeU2.js → PenAndPaper-BsBFp16i.js} +1 -1
  14. package/dist/{Shape-tkp65OcG.js → Shape-gDVRWM6n.js} +1 -1
  15. package/dist/SlicerPreview-Dpu4nMz6.js +1 -0
  16. package/dist/{SparkTooltip-BlJLvizH.js → SparkTooltip-cWKhrsKX.js} +1 -1
  17. package/dist/{Title-BRAjxtjG.js → Title-BLA0tM3g.js} +1 -1
  18. package/dist/{Tooltip-BUXB0i6z.js → Tooltip-Iyb_S6oQ.js} +1 -1
  19. package/dist/UserOptions-BSJ_S_us.js +1 -0
  20. package/dist/{chartImage-NwZO-elv.js → chartImage-r-G4CkRK.js} +1 -1
  21. package/dist/components/arrow.js +1 -1
  22. package/dist/components/vue-ui-3d-bar.js +1 -1
  23. package/dist/components/vue-ui-accordion.js +1 -1
  24. package/dist/components/vue-ui-age-pyramid.js +1 -1
  25. package/dist/components/vue-ui-annotator.js +1 -1
  26. package/dist/components/vue-ui-bullet.js +1 -1
  27. package/dist/components/vue-ui-bump.js +1 -1
  28. package/dist/components/vue-ui-candlestick.js +1 -1
  29. package/dist/components/vue-ui-carousel-table.js +1 -1
  30. package/dist/components/vue-ui-chestnut.js +1 -1
  31. package/dist/components/vue-ui-chord.js +1 -1
  32. package/dist/components/vue-ui-circle-pack.js +1 -1
  33. package/dist/components/vue-ui-cursor.js +1 -1
  34. package/dist/components/vue-ui-dag.js +1 -1
  35. package/dist/components/vue-ui-dashboard.js +1 -1
  36. package/dist/components/vue-ui-digits.js +1 -1
  37. package/dist/components/vue-ui-donut-evolution.js +1 -1
  38. package/dist/components/vue-ui-donut.js +1 -1
  39. package/dist/components/vue-ui-dumbbell.js +1 -1
  40. package/dist/components/vue-ui-flow.js +1 -1
  41. package/dist/components/vue-ui-funnel.js +1 -1
  42. package/dist/components/vue-ui-galaxy.js +1 -1
  43. package/dist/components/vue-ui-gauge.js +1 -1
  44. package/dist/components/vue-ui-geo.js +1 -1
  45. package/dist/components/vue-ui-gizmo.js +1 -1
  46. package/dist/components/vue-ui-graph.js +1 -0
  47. package/dist/components/vue-ui-heatmap.js +1 -1
  48. package/dist/components/vue-ui-hill.js +1 -1
  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-label.js +1 -1
  54. package/dist/components/vue-ui-mini-loader.js +1 -1
  55. package/dist/components/vue-ui-molecule.js +1 -1
  56. package/dist/components/vue-ui-mood-radar.js +1 -1
  57. package/dist/components/vue-ui-nested-donuts.js +1 -1
  58. package/dist/components/vue-ui-onion.js +1 -1
  59. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  60. package/dist/components/vue-ui-quadrant.js +1 -1
  61. package/dist/components/vue-ui-quick-chart.js +1 -1
  62. package/dist/components/vue-ui-radar.js +1 -1
  63. package/dist/components/vue-ui-rating.js +1 -1
  64. package/dist/components/vue-ui-relation-circle.js +1 -1
  65. package/dist/components/vue-ui-ridgeline.js +1 -1
  66. package/dist/components/vue-ui-rings.js +1 -1
  67. package/dist/components/vue-ui-scatter.js +1 -1
  68. package/dist/components/vue-ui-skeleton.js +1 -1
  69. package/dist/components/vue-ui-smiley.js +1 -1
  70. package/dist/components/vue-ui-spark-trend.js +1 -1
  71. package/dist/components/vue-ui-sparkbar.js +1 -1
  72. package/dist/components/vue-ui-sparkgauge.js +1 -1
  73. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  74. package/dist/components/vue-ui-sparkline.js +1 -1
  75. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  76. package/dist/components/vue-ui-stackbar.js +1 -1
  77. package/dist/components/vue-ui-stackline.js +1 -1
  78. package/dist/components/vue-ui-strip-plot.js +1 -1
  79. package/dist/components/vue-ui-table-heatmap.js +1 -1
  80. package/dist/components/vue-ui-table-sparkline.js +1 -1
  81. package/dist/components/vue-ui-table.js +1 -1
  82. package/dist/components/vue-ui-thermometer.js +1 -1
  83. package/dist/components/vue-ui-timer.js +1 -1
  84. package/dist/components/vue-ui-tiremarks.js +1 -1
  85. package/dist/components/vue-ui-treemap.js +1 -1
  86. package/dist/components/vue-ui-vertical-bar.js +1 -1
  87. package/dist/components/vue-ui-waffle.js +1 -1
  88. package/dist/components/vue-ui-wheel.js +1 -1
  89. package/dist/components/vue-ui-word-cloud.js +1 -1
  90. package/dist/components/vue-ui-world.js +1 -1
  91. package/dist/components/vue-ui-xy-canvas.js +1 -1
  92. package/dist/components/vue-ui-xy.js +1 -1
  93. package/dist/{dom-to-png-Cp3WLHmJ.js → dom-to-png-Cp6rAdnI.js} +1 -1
  94. package/dist/{exposedLib-CMTeSmyW.js → exposedLib-BDGMSW1B.js} +1 -1
  95. package/dist/{img-8sM3sVWU.js → img-DiP2_5_r.js} +1 -1
  96. package/dist/{labelUtils-Djp5nJtN.js → labelUtils-DXiFpsZl.js} +1 -1
  97. package/dist/{lib-zDxoqrgo.js → lib-DqD8nbyX.js} +4 -4
  98. package/dist/package-UBaXe2y9.js +1 -0
  99. package/dist/{pdf-Dlv_ks7R.js → pdf-y3S8SBFk.js} +1 -1
  100. package/dist/{render-common-DOYi0f4Z.js → render-common-tsNLeNaX.js} +1 -1
  101. package/dist/{resolveChartConfig-BSo1Oe9n.js → resolveChartConfig-ChGWTt5l.js} +1 -1
  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 +1 -1
  105. package/dist/style.css +1 -1
  106. package/dist/types/vue-data-ui.d.ts +323 -0
  107. package/dist/types/vue-ui-graph.d.ts +21 -0
  108. package/dist/useConfig-DM9fSqjh.js +1 -0
  109. package/dist/{useNestedProp-CT9phgWx.js → useNestedProp-DrLnzyHO.js} +1 -1
  110. package/dist/useObjectBindings-Cn4Vz0RY.js +1 -0
  111. package/dist/{usePrinter-CnyKPIFM.js → usePrinter-Cj4eIYC_.js} +1 -1
  112. package/dist/utils.js +1 -1
  113. package/dist/vue-data-ui-yeD7UyUU.js +1 -0
  114. package/dist/vue-data-ui.js +1 -1
  115. package/dist/vue-ui-3d-bar-COrzyTkO.js +19 -0
  116. package/dist/vue-ui-accordion-3lBpCjGm.js +1 -0
  117. package/dist/vue-ui-age-pyramid-CAoVjkOA.js +1 -0
  118. package/dist/vue-ui-annotator-CpTZHnPw.js +331 -0
  119. package/dist/vue-ui-bullet-yvY_gdw2.js +34 -0
  120. package/dist/vue-ui-bump-ChsFkIq9.js +10 -0
  121. package/dist/vue-ui-candlestick-D9UXZQoN.js +22 -0
  122. package/dist/vue-ui-carousel-table-CKyE4hME.js +1 -0
  123. package/dist/vue-ui-chestnut-BuLjW5nb.js +1 -0
  124. package/dist/vue-ui-chord-Bjwt2_BK.js +21 -0
  125. package/dist/vue-ui-circle-pack-BpAuZruK.js +13 -0
  126. package/dist/vue-ui-cursor-Dn-IBaP8.js +1 -0
  127. package/dist/vue-ui-dag-CyY3cSa6.js +9 -0
  128. package/dist/vue-ui-dashboard-DmyStkQM.js +1 -0
  129. package/dist/{vue-ui-digits-CL9SuIEI.js → vue-ui-digits-BBiRMr01.js} +2 -2
  130. package/dist/{vue-ui-donut-BaEodt-3.js → vue-ui-donut-CGyBWxzh.js} +2 -2
  131. package/dist/vue-ui-donut-DMF74OY0.js +47 -0
  132. package/dist/vue-ui-donut-evolution-Du4zLc8D.js +2 -0
  133. package/dist/vue-ui-dumbbell-CxL_AY5e.js +9 -0
  134. package/dist/vue-ui-flow-h6kTMamJ.js +3 -0
  135. package/dist/vue-ui-funnel-BG5Addzr.js +1 -0
  136. package/dist/vue-ui-galaxy-CgnshY8i.js +1 -0
  137. package/dist/vue-ui-gauge-a13ojQPr.js +1 -0
  138. package/dist/vue-ui-geo-CflzhtuD.js +1 -0
  139. package/dist/vue-ui-gizmo-K1lfslsA.js +1 -0
  140. package/dist/vue-ui-graph-C2Se8bnB.js +7 -0
  141. package/dist/vue-ui-heatmap-5NsQkMwS.js +1 -0
  142. package/dist/vue-ui-hill-COnjVS2L.js +1 -0
  143. package/dist/vue-ui-history-plot-BRJdXsNo.js +2 -0
  144. package/dist/vue-ui-horizontal-bar-G0wEKTRu.js +4 -0
  145. package/dist/vue-ui-kpi-BZjfQxmY.js +1 -0
  146. package/dist/{vue-ui-label-D1Aog-zO.js → vue-ui-label-BD_hTtgZ.js} +2 -2
  147. package/dist/vue-ui-mini-loader-ltQXdeeW.js +1 -0
  148. package/dist/vue-ui-molecule-DI-CS5w8.js +1 -0
  149. package/dist/vue-ui-mood-radar-B5ar9WAZ.js +1 -0
  150. package/dist/vue-ui-nested-donuts-BP2YzVma.js +19 -0
  151. package/dist/vue-ui-onion-CCiZ6jmF.js +5 -0
  152. package/dist/vue-ui-parallel-coordinate-plot-3E0CysDx.js +9 -0
  153. package/dist/vue-ui-quadrant-BwgwvKy8.js +2 -0
  154. package/dist/vue-ui-quick-chart-BXNg0LNe.js +17 -0
  155. package/dist/vue-ui-radar-B9Ntj_Gj.js +1 -0
  156. package/dist/vue-ui-rating-B33u3iIn.js +1 -0
  157. package/dist/vue-ui-relation-circle-B60IUw50.js +1 -0
  158. package/dist/vue-ui-ridgeline-BPbYng2A.js +2 -0
  159. package/dist/vue-ui-rings-BXo9p3Ab.js +1 -0
  160. package/dist/vue-ui-scatter-BwrYPDzh.js +9 -0
  161. package/dist/{vue-ui-skeleton-B-Acw3CC.js → vue-ui-skeleton-DTn7uIui.js} +3 -3
  162. package/dist/{vue-ui-smiley-Ciwqt6ek.js → vue-ui-smiley-qCRUFmpq.js} +1 -1
  163. package/dist/vue-ui-spark-trend-wKFu-O7B.js +1 -0
  164. package/dist/vue-ui-sparkbar-DPFzdX-D.js +1 -0
  165. package/dist/vue-ui-sparkgauge-DlEPsxc0.js +1 -0
  166. package/dist/vue-ui-sparkhistogram-DLZxE6oz.js +1 -0
  167. package/dist/vue-ui-sparkline-BflZPl7s.js +1 -0
  168. package/dist/vue-ui-sparkstackbar-DvSQfGeA.js +1 -0
  169. package/dist/vue-ui-stackbar-JKC9qE6M.js +29 -0
  170. package/dist/vue-ui-stackline-G7-oqfzp.js +39 -0
  171. package/dist/vue-ui-strip-plot-54u7AUip.js +2 -0
  172. package/dist/vue-ui-table-3F8i2ZjT.js +14 -0
  173. package/dist/vue-ui-table-heatmap-CtYPYMIJ.js +1 -0
  174. package/dist/vue-ui-table-sparkline-CTfYTzhA.js +1 -0
  175. package/dist/vue-ui-thermometer-BpFbPqxK.js +1 -0
  176. package/dist/vue-ui-timer-DsWRNtRa.js +64 -0
  177. package/dist/vue-ui-tiremarks-C4wVcSVP.js +1 -0
  178. package/dist/vue-ui-treemap-mYRv6gga.js +1 -0
  179. package/dist/vue-ui-waffle-DNBIZqZz.js +1 -0
  180. package/dist/vue-ui-wheel-DPHDp0t1.js +1 -0
  181. package/dist/vue-ui-word-cloud-BY4YsW7-.js +4 -0
  182. package/dist/vue-ui-world-DQWjoFDx.js +19 -0
  183. package/dist/vue-ui-xy-DfvcqUwW.js +31 -0
  184. package/dist/vue-ui-xy-M9aD-G5a.js +24 -0
  185. package/dist/vue-ui-xy-canvas-BpwG1Ipj.js +9 -0
  186. package/dist/vue_ui_donut_evolution-CVoh3twl.js +1 -0
  187. package/dist/vue_ui_graph-B1ACwQj7.js +1 -0
  188. package/dist/vue_ui_quick_chart-BRfcRW6Z.js +1 -0
  189. package/package.json +1 -1
  190. package/dist/BaseIcon-Cz30ODFA.js +0 -1
  191. package/dist/BaseZoomControls-xq3tWD3j.js +0 -1
  192. package/dist/DataTable-DSUA5M9p.js +0 -1
  193. package/dist/SlicerPreview-GFRs2EWB.js +0 -1
  194. package/dist/UserOptions-D65t74CM.js +0 -1
  195. package/dist/package-DIR2F6AE.js +0 -1
  196. package/dist/useConfig-CKdzPrcf.js +0 -1
  197. package/dist/useObjectBindings-DM3xDKV3.js +0 -1
  198. package/dist/vue-data-ui-BG41UScx.js +0 -1
  199. package/dist/vue-ui-3d-bar-DiaiNy-k.js +0 -19
  200. package/dist/vue-ui-accordion-Dy5OVFKr.js +0 -1
  201. package/dist/vue-ui-age-pyramid-OeUr1yxi.js +0 -1
  202. package/dist/vue-ui-annotator-DA_xAFql.js +0 -331
  203. package/dist/vue-ui-bullet-B9lcCTVb.js +0 -34
  204. package/dist/vue-ui-bump-DYajIrva.js +0 -10
  205. package/dist/vue-ui-candlestick-CdAZuNxo.js +0 -22
  206. package/dist/vue-ui-carousel-table-ihGH0LDH.js +0 -1
  207. package/dist/vue-ui-chestnut-B2aNXFNO.js +0 -1
  208. package/dist/vue-ui-chord-fAckHfOW.js +0 -21
  209. package/dist/vue-ui-circle-pack-BWHVImkS.js +0 -13
  210. package/dist/vue-ui-cursor-DdXKXmhr.js +0 -1
  211. package/dist/vue-ui-dag-a0fNoIcJ.js +0 -9
  212. package/dist/vue-ui-dashboard-DkdYMB7n.js +0 -1
  213. package/dist/vue-ui-donut-DaYxdQmP.js +0 -47
  214. package/dist/vue-ui-donut-evolution-T8cRXKRQ.js +0 -2
  215. package/dist/vue-ui-dumbbell-B6HJxEZp.js +0 -9
  216. package/dist/vue-ui-flow-BlTCVFr3.js +0 -3
  217. package/dist/vue-ui-funnel-WgLFJadZ.js +0 -1
  218. package/dist/vue-ui-galaxy-B3nuI6E8.js +0 -1
  219. package/dist/vue-ui-gauge-BwTP65O4.js +0 -1
  220. package/dist/vue-ui-geo-CX3yH18H.js +0 -1
  221. package/dist/vue-ui-gizmo-CNHcBsku.js +0 -1
  222. package/dist/vue-ui-heatmap-CTdeoar7.js +0 -1
  223. package/dist/vue-ui-hill-DR5k8GWZ.js +0 -1
  224. package/dist/vue-ui-history-plot-C-9uH-Uj.js +0 -2
  225. package/dist/vue-ui-horizontal-bar-qqF7pL7U.js +0 -4
  226. package/dist/vue-ui-kpi-DVcLXGqG.js +0 -1
  227. package/dist/vue-ui-mini-loader-CX0Dx9tT.js +0 -1
  228. package/dist/vue-ui-molecule-B13qVX71.js +0 -1
  229. package/dist/vue-ui-mood-radar-C1BtB8lg.js +0 -1
  230. package/dist/vue-ui-nested-donuts-B90yrlJG.js +0 -19
  231. package/dist/vue-ui-onion-UMVO2DE_.js +0 -5
  232. package/dist/vue-ui-parallel-coordinate-plot-C0ofFivm.js +0 -9
  233. package/dist/vue-ui-quadrant-CPG6yAiu.js +0 -2
  234. package/dist/vue-ui-quick-chart-BTPb-Iz8.js +0 -17
  235. package/dist/vue-ui-radar-Hd-pE9ih.js +0 -1
  236. package/dist/vue-ui-rating-C_YxQYa_.js +0 -1
  237. package/dist/vue-ui-relation-circle-CHYG7ZJl.js +0 -1
  238. package/dist/vue-ui-ridgeline-DS1Gvljt.js +0 -2
  239. package/dist/vue-ui-rings-B-Hb13Uu.js +0 -1
  240. package/dist/vue-ui-scatter-BTgvOmuo.js +0 -9
  241. package/dist/vue-ui-spark-trend-CYqy6c0S.js +0 -1
  242. package/dist/vue-ui-sparkbar-CTXIgjmP.js +0 -1
  243. package/dist/vue-ui-sparkgauge-CObOL6s2.js +0 -1
  244. package/dist/vue-ui-sparkhistogram-ClFyDez-.js +0 -1
  245. package/dist/vue-ui-sparkline-DP_nYlW8.js +0 -1
  246. package/dist/vue-ui-sparkstackbar-B2f0ePMg.js +0 -1
  247. package/dist/vue-ui-stackbar-nMWHZ-f0.js +0 -29
  248. package/dist/vue-ui-stackline-B95y6Zc5.js +0 -39
  249. package/dist/vue-ui-strip-plot-gFNC4r-X.js +0 -2
  250. package/dist/vue-ui-table-Br2JgD_L.js +0 -14
  251. package/dist/vue-ui-table-heatmap-Btu2ejF4.js +0 -1
  252. package/dist/vue-ui-table-sparkline-B9mYHAxp.js +0 -1
  253. package/dist/vue-ui-thermometer-C6u1eLfo.js +0 -1
  254. package/dist/vue-ui-timer-DLgsfB1U.js +0 -64
  255. package/dist/vue-ui-tiremarks-8B9uE1Bx.js +0 -1
  256. package/dist/vue-ui-treemap-C4Mot-Os.js +0 -1
  257. package/dist/vue-ui-waffle-BwcwNpf7.js +0 -1
  258. package/dist/vue-ui-wheel-B3OGCXg7.js +0 -1
  259. package/dist/vue-ui-word-cloud-BPIyMBXq.js +0 -4
  260. package/dist/vue-ui-world-Cp0DeauH.js +0 -19
  261. package/dist/vue-ui-xy-BOE1jvUS.js +0 -31
  262. package/dist/vue-ui-xy-DSyKSn4L.js +0 -24
  263. package/dist/vue-ui-xy-canvas-CaxxiKSa.js +0 -9
  264. package/dist/vue_ui_donut_evolution-nzVwNQYv.js +0 -1
  265. package/dist/vue_ui_quick_chart-Da1GwklM.js +0 -1
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./annotationSlots-BRR85CqJ.js";import{n as r,t as i}from"./userOptionsSlots-DYuo-E5m.js";import{$ as a,D as o,Ht as s,X as c,a as l,i as u,nn as d,nt as f,r as p,x as m}from"./lib-zDxoqrgo.js";import{n as ee,t as h}from"./useHints-BH9r_0Vd.js";import{t as te}from"./useConfig-CKdzPrcf.js";import{t as ne}from"./usePrinter-CnyKPIFM.js";import{t as re}from"./useNestedProp-CT9phgWx.js";import{t as ie}from"./useThemeCheck-BKNRbGeC.js";import{t as ae}from"./useChartExport-DtPNpc9M.js";import{t as oe}from"./useTransitions-DfSHzsdz.js";import{n as se}from"./Title-BRAjxtjG.js";import{t as ce}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as le}from"./useUserOptionState-CXlFnwPv.js";import{t as ue}from"./chartImage-NwZO-elv.js";import{t as de}from"./vue_ui_hill-DQi4pQCG.js";import{Fragment as g,computed as _,createBlock as fe,createCommentVNode as v,createElementBlock as y,createElementVNode as b,createSlots as pe,createVNode as me,defineAsyncComponent as he,guardReactiveProps as ge,nextTick as _e,normalizeClass as x,normalizeProps as ve,normalizeStyle as S,onBeforeUnmount as ye,onMounted as be,openBlock as C,ref as w,renderList as T,renderSlot as E,shallowRef as xe,toDisplayString as D,unref as O,useTemplateRef as Se,watch as Ce,withCtx as we,withKeys as Te,withModifiers as k}from"vue";var Ee=/* @__PURE__ */ e({default:()=>bt}),De=[`id`,`data-editing`],Oe={key:0,ref:`chartTitle`,style:`width:100%;background:transparent;padding-bottom:24px`},ke={key:3,class:`vue-ui-hill__toolbar`,"data-dom-to-png-ignore":``},Ae=[`viewBox`],je=[`width`,`height`],Me=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Ne=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Pe=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],Fe={key:0,"pointer-events":`none`},Ie=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],Le=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Re=[`transform`,`font-size`,`fill`,`stroke`],ze=[`transform`,`data-datapoint-index`,`data-datapoint-id`,`tabindex`,`aria-valuenow`,`aria-valuetext`,`aria-label`,`onFocus`,`onBlur`,`onKeydown`,`onPointerenter`,`onPointerleave`,`onClick`],Be=[`r`,`onPointerdown`],Ve=[`r`,`fill`,`stroke`,`stroke-width`],He=[`stroke`,`stroke-width`],Ue=[`d`],We=[`x`,`y`,`text-anchor`,`fill`,`font-size`,`font-weight`,`stroke`,`stroke-width`],Ge=[`transform`,`tabindex`,`aria-label`,`aria-expanded`,`onClick`,`onFocus`,`onKeydown`],Ke={key:0,class:`vue-ui-hill__stack-overflow-collapse-ghosts`,"pointer-events":`none`,"aria-hidden":`true`},qe=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Je=[`from`,`dur`],Ye=[`from`,`dur`],Xe=[`from`,`to`,`dur`],Ze=[`dur`],Qe=[`r`],$e=[`x`,`y`,`width`,`height`,`fill`,`stroke`,`stroke-width`],et=[`stroke`,`stroke-width`],tt=[`d`],nt=[`y`,`fill`,`font-size`,`font-weight`,`stroke`],rt=[`x`,`y`,`fill`,`font-size`,`font-weight`,`letter-spacing`],it=[`x`,`y`,`fill`,`font-size`,`font-weight`,`letter-spacing`],at=[`x`,`y`,`rx`,`width`,`height`,`fill`],ot=[`id`],st=[`x`,`y`,`width`,`height`,`rx`,`ry`],ct=[`clip-path`],lt=[`width`,`x`,`y`,`fill`,`height`,`onPointerenter`,`onPointerleave`],ut=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],dt=[`x`,`y`,`width`,`height`,`rx`,`ry`,`stroke`,`stroke-width`],ft=[`x`,`y`,`fill`,`font-size`],pt=[`aria-label`,`onKeydown`],mt={key:0,class:`vue-ui-hill__stack-overflow-menu-title`},ht=[`disabled`,`aria-label`,`onClick`],gt={class:`vue-ui-hill__stack-overflow-menu-label`},_t={class:`vue-ui-hill__stack-overflow-menu-value`},vt={key:6,class:`vue-data-ui-watermark`},yt={key:7,class:`vue-ui-hill__loading`,"data-dom-to-png-ignore":``},bt=/*#__PURE__*/ ce({__name:`vue-ui-hill`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`edit`,`save`,`cancel`,`copyAlt`,`change`,`dragStart`,`dragEnd`,`datapointEnter`,`datapointLeave`,`selectDatapoint`],setup(e,{expose:ce,emit:Ee}){let bt=he(()=>import(`./HillActions-DdvXld3a.js`)),xt=he(()=>import(`./UserOptions-D65t74CM.js`).then(e=>e.n)),St=he(()=>import(`./PackageVersion-D6pKL176.js`).then(e=>e.t)),Ct=he(()=>import(`./PenAndPaper-DvJJaeU2.js`).then(e=>e.t)),wt=he(()=>import(`./BaseIcon-Cz30ODFA.js`).then(e=>e.n)),{vue_ui_hill:Tt}=te(),{isThemeValid:Et,warnInvalidTheme:Dt}=ie(),Ot=e,kt=w(c()),At=xe(null),jt=Se(`hillChartRef`),A=Se(`svgRef`),Mt=Se(`overflowMenuRef`),Nt=Se(`userOptionsRef`),Pt=w(0),Ft=Ee;function It(){let e=re({userConfig:Ot.config,defaultConfig:Tt}),t={},n=e.theme;if(!n)t=e;else if(!Et.value(e))Dt(e),t=e;else{let r=re({userConfig:de[n]||Ot.config,defaultConfig:e});t={...re({userConfig:Ot.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:d[n]||$t}}return t}let j=w(It()),M=_(()=>j.value.style.chart.layout.plots),N=_(()=>j.value.style.chart);ee({config:()=>j.value,dataset:()=>Ot.dataset,component:`VueUiHill`,rules:[h.emptyArray,h.noHint]});let{transitionEnabled:P}=oe({config:()=>j.value.transitions,dataset:()=>Ot.dataset}),{userOptionsVisible:Lt,setUserOptionsVisibility:Rt,keepUserOptionState:zt}=le({config:j.value});function Bt(){Rt(!0)}function Vt(){Rt(!1),Zn.value=null,$.value=null,Xn.value=null}let{isPrinting:Ht,isImaging:Ut,generatePdf:Wt,generateImage:Gt}=ne({elementId:`hill_${kt.value}`,fileName:N.value.title.text||`vue-ui-hill`,options:j.value.userOptions.print}),Kt=_(()=>j.value.userOptions.useCursorPointer),qt=w(0),Jt=w(!1);function Yt(e){Jt.value=e,qt.value+=1}let Xt=w(!1);function Zt(){Xt.value=!Xt.value}let Qt=_(()=>j.value.userOptions.position===`left`?`right`:`left`);Ce(()=>Ot.config,()=>{At.value=null,j.value=It(),qt.value+=1,F.value!==j.value.editing&&(F.value=j.value.editing&&!j.value.readonly)},{deep:!0});let $t=_(()=>{let e=j.value.customPalette;return Array.isArray(e)&&e.length?e:s});function en(e){let t=Number(e);return Number.isFinite(t)?Math.min(1,Math.max(0,t)):0}function tn(e){if(e<=0)return`todo`;if(e>=1)return`done`;let t=.5,n=Math.min(t,Math.max(0,Number(j.value.interaction.peakTolerance)||0)),r=t-n,i=t+n;return e>=r&&e<=i?`top`:e<t?`left`:`right`}function nn(e,t){let n=e&&typeof e==`object`?e:{},r=`Item ${t+1}`,i=String(n.name??n.label??r),a=en(n.position??n.value??0);return{...n,id:String(n.id??`${i}-${t}`),name:i,label:String(n.label??i),position:a,color:n.color||$t.value[t%$t.value.length],muted:!!n.muted,disabled:!!n.disabled,status:tn(e.position),labelSide:[`left`,`right`,`auto`].includes(n.labelSide)?n.labelSide:`auto`,__index:t}}let rn=_(()=>Array.isArray(Ot.dataset)?Ot.dataset.map(nn):[]);function an(e){return e.map(e=>({...e}))}function on(e){let{__index:t,...n}=e;return Object.prototype.hasOwnProperty.call(n,`value`)&&(n.value=n.position),n}function sn(e=I.value){return e.map(on)}let cn=_(()=>j.value.editing&&!j.value.readonly),F=w(cn.value),I=w(an(rn.value)),L=w(null);Ce(rn,e=>{F.value||(At.value=null,I.value=an(e))},{deep:!0});let ln=_(()=>!j.value.readonly);Ce(ln,e=>{e||(L.value=null,At.value=null,F.value=!1,I.value=an(rn.value))});function R(e,t){Ft(e,t);let n=j.value.events?.[e];typeof n==`function`&&n(t)}let z=_(()=>N.value),un=_(()=>z.value.layout),B=_(()=>un.value.hill),V=_(()=>un.value.plots),H=_(()=>un.value.labels.item),U=_(()=>un.value.labels.phases),W=_(()=>z.value.toolbar),G=_(()=>un.value.stackbar),K=_(()=>{let e=V.value.stacking?.overflow||{},t=Math.max(0,Number(V.value.radius)||0);return{show:e.show!==!1,marker:{radius:Math.max(4,Number(e.marker?.radius)||t),fill:e.marker.fill,stroke:e.marker?.stroke||V.value.stroke,strokeWidth:e.marker.strokeWidth,color:e.marker.labelColor,fontSize:e.marker.fontSize,bold:e.marker?.bold!==!1,offsetY:e.marker.labelOffsetY},hysteresis:t*1.5,transitionDuration:P.value?e.transitionDuration:0,menu:{width:Math.max(160,Number(e.menu?.width)||220),maxHeight:Math.max(96,Number(e.menu?.maxHeight)||220),backgroundColor:e.menu?.backgroundColor||z.value.backgroundColor,color:e.menu?.color||z.value.color,borderColor:e.menu?.borderColor||V.value.stroke,borderRadius:Math.max(0,Number(e.menu?.borderRadius)||6)}}});function dn(e,t,n=1){let r=Number(e);return Number.isFinite(r)?Math.min(n,Math.max(0,r)):t}let q=_(()=>{let e=B.value.geometry||{},t=Math.max(0,Number(z.value.width)||0),n=Math.max(0,Number(z.value.height)||0),r=dn(e.horizontalPaddingRatio,.02,.49),i=dn(e.topPaddingRatio,.12,.49),a=dn(e.bottomPaddingRatio,.2,.49),o=dn(e.curvature,.65),s=t*r,c=t/2,l=t*(1-r),u=n*i,d=n*(1-a),f=c-s,p=l-c,m=s+f*o,ee=c+p*(1-o);return{startX:s,centerX:c,endX:l,baseY:d,peakY:u,width:f+p,left:[{x:s,y:d},{x:m,y:d},{x:m,y:u},{x:c,y:u}],right:[{x:c,y:u},{x:ee,y:u},{x:ee,y:d},{x:l,y:d}]}}),fn=_(()=>{let{left:e,right:t}=q.value;return[`M${e[0].x} ${e[0].y}`,`C${e[1].x} ${e[1].y} ${e[2].x} ${e[2].y} ${e[3].x} ${e[3].y}`,`C${t[1].x} ${t[1].y} ${t[2].x} ${t[2].y} ${t[3].x} ${t[3].y}`].join(` `)});function pn(e,t,n,r,i){let a=1-i;return a**3*e+3*a**2*i*t+3*a*i**2*n+i**3*r}function mn(e,t,n,r,i){let a=1-i;return 3*a**2*(t-e)+6*a*i*(n-t)+3*i**2*(r-n)}function hn(e){let t=en(e),{startX:n,centerX:r,endX:i,left:a,right:o}=q.value,s=n+(t-0)/1*(i-n),c=s<=r?a:o,l=0,u=1;for(let e=0;e<28;e+=1){let e=(l+u)/2;pn(c[0].x,c[1].x,c[2].x,c[3].x,e)<s?l=e:u=e}let d=(l+u)/2,f=pn(c[0].y,c[1].y,c[2].y,c[3].y,d),p=mn(c[0].x,c[1].x,c[2].x,c[3].x,d),m=mn(c[0].y,c[1].y,c[2].y,c[3].y,d),ee=Math.hypot(p,m)||1;return{x:s,y:f,normalX:m/ee,normalY:-p/ee}}function gn(e){let t=Number(V.value.stacking.overlapThresholdRatio);return e*(2-(Number.isFinite(t)?Math.min(2,Math.max(0,t)):.5))}function _n(e,t){let n=/* @__PURE__ */ new Map,r=V.value.stacking;if(e.forEach(e=>{n.set(e.id,{position:e.position,index:0,size:1,stackId:`stack:${e.id}`})}),!r.show||e.length<2||t<=0)return n;let i=gn(t),a=e.map((e,t)=>({datapoint:e,index:t,point:hn(e.position)})).sort((e,t)=>e.point.x-t.point.x||e.datapoint.position-t.datapoint.position||e.index-t.index),o=0;for(;o<a.length;){let e=[a[o]],t=o+1;for(;t<a.length;){let n=e[e.length-1],r=a[t];if(Math.hypot(r.point.x-n.point.x,r.point.y-n.point.y)>=i)break;e.push(r),t+=1}if(e.length>1){let t=e[0].datapoint.position,r=`stack:${e.map(({datapoint:e})=>e.id).sort().join(`|`)}`;e.forEach(({datapoint:i},a)=>{n.set(i.id,{position:t,index:a,size:e.length,stackId:r})})}o=t}return n}function vn(e){let t=e+Math.max(0,Number(V.value.strokeWidth)||0)/2,n=V.value.stacking.gap??e/2;return t*2+n}let yn=w(null),J=w(null),Y=w(null),bn=w(null),xn=w(null),Sn=/* @__PURE__ */ new Set,Cn=null,X=null,Z=null;function wn(e){let t=Math.max(0,Number(V.value.strokeWidth)||0),n=V.value.shadow.show?Math.max(0,Number(V.value.shadow.blur)||0)+Math.max(0,-(Number(V.value.shadow.offsetY)||0)):0;return e+t/2+n}function Tn(e,t,n){if(t<=1)return e-wn(n);let r=vn(n);return e-(t-1)*r-wn(n)}function En(e,t,n,r){if(n<=1)return Sn.delete(e),!1;let i=Tn(t,n,r),a=Sn.has(e),o=K.value.hysteresis,s=a?i<o:i<0;return s?Sn.add(e):Sn.delete(e),s}let Dn=_(()=>{let e=Math.max(0,Number(V.value.radius)||0),t=vn(e),n=_n(I.value,e),r=/* @__PURE__ */ new Map,i=/* @__PURE__ */ new Map,a=[],o=/* @__PURE__ */ new Set,s=L.value?.id??null;K.value.show||Sn.clear(),I.value.forEach(e=>{let t=n.get(e.id)||{position:e.position,index:0,size:1,stackId:`stack:${e.id}`};r.has(t.stackId)||r.set(t.stackId,[]),r.get(t.stackId).push({datapoint:e,stack:t})});let c=new Set(r.keys());return Sn.forEach(e=>{c.has(e)||Sn.delete(e)}),r.forEach((n,r)=>{let c=[...n].sort((e,t)=>e.stack.index-t.stack.index||e.datapoint.__index-t.datapoint.__index),l=c.reduce((e,t)=>e+(Number(t.datapoint.position)||0),0)/c.length,u=hn(l);if(!(K.value.show&&En(r,u.y,c.length,e))){c.forEach(e=>{i.set(e.datapoint.id,{hidden:!1,displayIndex:e.stack.index,stackId:r,stackSize:c.length,promotedFromOverflow:!1,renderPosition:e.stack.position})});return}c.forEach(({datapoint:e})=>{o.add(e.id)});let d=s?c.find(({datapoint:e})=>e.id===s):null,f=c.find(({datapoint:e})=>e.id===yn.value),p=d||f||null,m=p?c.filter(({datapoint:e})=>e.id!==p.datapoint.id):c,ee=J.value,h=!(!f||ee?.datapointId!==f.datapoint.id||ee.moved),te=m.length?h?l:m.reduce((e,t)=>e+(Number(t.datapoint.position)||0),0)/m.length:l,ne=hn(te);c.forEach(e=>{let t=p?.datapoint.id===e.datapoint.id,n=t&&f?.datapoint.id===e.datapoint.id;i.set(e.datapoint.id,{hidden:!t,displayIndex:+!!t,stackId:r,stackSize:c.length,promotedFromOverflow:n,renderPosition:te})}),m.length&&a.push({stackId:r,anchorPosition:te,x:ne.x,y:ne.y,hiddenCount:m.length,hiddenDatapoints:m.map(({datapoint:e})=>e),memberIds:c.map(({datapoint:e})=>e.id),collapseDatapoints:m.map(({datapoint:e,stack:n})=>{let r=hn(n.position);return{id:e.id,color:e.color,relativeX:r.x-ne.x,relativeY:r.y-n.index*t-ne.y}})})}),{layoutMap:n,displayMap:i,markers:a,overflowMemberIds:o}});function On(e){let t=Q.value.filter(e=>!e.isStackOverflowHidden),n=t.find(t=>t.id===e),r=new Map(t.filter(t=>t.id!==e).map(e=>[e.id,{x:e.x,y:e.y}]));if(!n||!V.value.stacking.show)return r;let i=t.filter(e=>Math.abs(e.x-n.x)<.001).sort((e,t)=>t.y-e.y||e.datasetIndex-t.datasetIndex);if(i.length<2)return r;let a=vn(Math.max(0,Number(V.value.radius)||0)),o=Math.max(...i.map(e=>e.y));return i.filter(t=>t.id!==e).forEach((e,t)=>{r.set(e.id,{x:n.x,y:o-t*a})}),r}function kn(){return new Map(Q.value.filter(e=>!e.isStackOverflowHidden).map(e=>[e.id,{x:e.x,y:e.y}]))}let Q=_(()=>{let e=Math.max(0,Number(V.value.radius)||0),{layoutMap:t,displayMap:n,markers:r}=Dn.value,i=vn(e),a=L.value,o=a?.stationaryLayout,s=o instanceof Map?o:At.value instanceof Map?At.value:null,c=null;if(a&&o instanceof Map&&V.value.stacking.show&&e>0){let t=I.value.find(e=>e.id===a.id);if(t){let n=r.find(e=>e.memberIds.includes(t.id));if(n)c={x:n.x,y:n.y-i};else{let n=hn(t.position),r=gn(e),s=I.value.filter(e=>e.id!==a.id&&o.has(e.id)).map(e=>{let t=hn(e.position);return{datapoint:e,distance:Math.hypot(t.x-n.x,t.y-n.y)}}).filter(({distance:e})=>e<r).sort((e,t)=>e.distance-t.distance)[0];if(s){let e=o.get(s.datapoint.id),t=[...o.values()].filter(t=>Math.abs(t.x-e.x)<.001),n=Math.min(e.y,...t.map(e=>e.y));c={x:e.x,y:n-i}}else c=n}}}return I.value.map((e,r)=>{let o=t.get(e.id)||{position:e.position,index:0,size:1,stackId:`stack:${e.id}`},l=n.get(e.id)||{hidden:!1,displayIndex:o.index,stackId:o.stackId,stackSize:o.size,renderPosition:o.position},u=hn(l.renderPosition??o.position),d=e.id!==a?.id&&!l.promotedFromOverflow&&s instanceof Map?s.get(e.id):null,f=e.id===a?.id&&c?c:d||{x:u.x,y:u.y-l.displayIndex*i},p=e.labelSide===`auto`?null:e.labelSide,ee=m(H.value.autoSideThreshold,.5,1),h=p||(e.position>ee?`left`:`right`),te=Math.abs(Number(H.value.offsetX)||0)+V.value.radius+H.value.fontSize/2;return{...e,datasetIndex:r,x:f.x,y:f.y,stackId:l.stackId,stackSize:l.stackSize,stackDisplayIndex:l.displayIndex,isStackOverflowHidden:l.hidden,isPromotedFromStackOverflow:l.promotedFromOverflow,labelSide:h,labelX:h===`left`?-te:te,textAnchor:h===`left`?`end`:`start`}})});function An(e){return I.value.find(t=>t.id===e)}function jn(e,t){let n=en(t),r;I.value=I.value.map(t=>t.id===e?(r={...t,position:n},r):t),r&&(_r(r.id,r.position),R(`change`,{datapoint:on(r),dataset:sn()}))}function Mn(e){let t=A.value;if(!t)return null;let n=t.getScreenCTM();if(!n)return null;let r=t.createSVGPoint();r.x=e,r.y=0;let i=r.matrixTransform(n.inverse()),{startX:a,endX:o}=q.value;return en(0+(i.x-a)/(o-a)*1)}function Nn(){ln.value&&(Y.value=null,yn.value=null,J.value=null,xn.value=null,ur(),At.value=null,I.value=an(rn.value),F.value=!0,R(`edit`,sn()))}function Pn(){let e=sn();Y.value=null,yn.value=null,J.value=null,xn.value=null,ur(),L.value=null,F.value=!1,R(`save`,e)}function Fn(){Y.value=null,yn.value=null,J.value=null,xn.value=null,ur(),L.value=null,At.value=null,I.value=an(rn.value),F.value=!1,R(`cancel`,sn())}function In(e,t){if(!ln.value||!F.value||t.disabled)return;Y.value=null;let n=e.currentTarget.closest(`.vue-ui-hill__datapoint`);n&&typeof n.focus==`function`&&(n.focus(),$.value=t.id),e.preventDefault();let r=On(t.id),i=J.value?.datapointId===t.id&&!J.value?.moved;if(L.value={id:t.id,pointerId:e.pointerId,stationaryLayout:r,startClientX:e.clientX,hasMoved:!1,deferPositionUpdate:i},A.value?.setPointerCapture(e.pointerId),!i){let n=Mn(e.clientX);n!==null&&jn(t.id,n)}let a=An(t.id);a&&R(`dragStart`,on(a))}function Ln(e){if(!L.value||L.value.pointerId!==e.pointerId)return;e.preventDefault();let t=Math.abs(e.clientX-L.value.startClientX);if(L.value.deferPositionUpdate&&!L.value.hasMoved&&t<3)return;L.value.hasMoved||(L.value={...L.value,hasMoved:!0});let n=Mn(e.clientX);n!==null&&jn(L.value.id,n)}function Rn(e){let t=L.value;if(!t||t.pointerId!==e.pointerId)return;A.value?.hasPointerCapture(e.pointerId)&&A.value.releasePointerCapture(e.pointerId);let n=e.type===`pointerup`&&!t.hasMoved,r=An(t.id);At.value=kn(),L.value=null,r&&(n&&R(`selectDatapoint`,Vn(r)),R(`dragEnd`,on(r)))}function zn(e,t){if(!ln.value||!F.value||t.disabled)return;let n=Math.max(0,Number(j.value.interaction.keyboardStep)||0),r=null;switch(e.key){case`ArrowLeft`:case`ArrowDown`:r=t.position-n;break;case`ArrowRight`:case`ArrowUp`:r=t.position+n;break;case`Home`:r=0;break;case`End`:r=1;break;default:return}e.preventDefault();let i=e.currentTarget;$.value=t.id,L.value={id:t.id,pointerId:null,stationaryLayout:On(t.id)},jn(t.id,r),At.value=kn(),L.value=null,_e(()=>{i?.isConnected&&i.focus({preventScroll:!0})})}function Bn(e){let t=.5,n=Math.max(0,Number(j.value.interaction.peakTolerance)||0);return Math.abs(e-t)<=n?j.value.a11y.translations.topOfHill:e<t?U.value.left.text:U.value.right.text}function Vn(e){return{datapoint:on(e),index:e.__index}}function Hn(e){$.value=null,Zn.value=e.id,![0,1].includes(e.position)&&$.value!==e.id&&er(e),R(`datapointEnter`,Vn(e))}function Un(e){Zn.value===e.id&&(Zn.value=null),Xn.value===e.id&&$.value!==e.id&&L.value?.id!==e.id&&(Xn.value=null),R(`datapointLeave`,Vn(e))}function Wn(e){F.value&&ln.value||R(`selectDatapoint`,Vn(e))}let Gn=_(()=>{let e=z.value;return{width:`100%`,maxWidth:`100%`,color:e.color,backgroundColor:e.backgroundColor,fontFamily:j.value.style.fontFamily,"--vue-ui-hill-button-hover-border":W.value.buttons.hoverBorderColor,"--vue-ui-hill-button-active-offset":`${W.value.buttons.activeTranslateY}px`}}),Kn=_(()=>({color:W.value.status.color,fontSize:`${W.value.status.fontSize}px`,fontWeight:W.value.status.bold?`bold`:`normal`,lineHeight:W.value.status.lineHeight}));_(()=>({color:z.value.title.color,fontSize:`${z.value.title.fontSize}px`,fontWeight:z.value.title.bold?`bold`:`normal`,textAlign:z.value.title.textAlign})),_(()=>({color:z.value.title.subtitle.color,fontSize:`${z.value.title.subtitle.fontSize}px`,fontWeight:z.value.title.subtitle.bold?`bold`:`normal`}));let qn=_(()=>{let e=Math.max(0,Number(z.value.height)||0);return Math.min(e,q.value.baseY+e)+U.value.offsetY});function Jn(e){return U.value[e].text}function Yn(e){return e.position===0||e.position===1}let Xn=w(null),Zn=w(null),$=w(null);function Qn(e){$.value=e.id}function $n(e){$.value===e.id&&($.value=null),Xn.value===e.id&&Zn.value!==e.id&&L.value?.id!==e.id&&(Xn.value=null)}function er(e){e?.id&&(Xn.value=e.id)}let tr=_(()=>{let e=[],t=[],n=null;return Q.value.forEach(r=>{if(!r.isStackOverflowHidden){if(r.id===Xn.value){n=r;return}Yn(r)?e.push(r):t.push(r)}}),[...e,...t,...n?[n]:[]]}),nr=_(()=>Dn.value.markers),rr=_(()=>nr.value.find(e=>e.stackId===Y.value)||null),ir=_(()=>{let e=Math.max(160,Number(K.value.menu.width)||220),t=Math.max(80,Number(K.value.menu.maxHeight)||220);return{visibility:bn.value?`visible`:`hidden`,width:`max-content`,minWidth:`${e}px`,maxWidth:`calc(100% - 16px)`,maxHeight:`${t}px`,backgroundColor:K.value.menu.backgroundColor,color:K.value.menu.color,borderColor:K.value.menu.borderColor,borderRadius:`${K.value.menu.borderRadius}px`}});function ar(e,t){let n=A.value,r=jt.value;if(!n||!r)return null;let i=n.getScreenCTM();if(!i)return null;let a=n.createSVGPoint();a.x=e,a.y=t;let o=a.matrixTransform(i),s=r.getBoundingClientRect();return{x:o.x-s.left,y:o.y-s.top}}function or(){let e=rr.value,t=Mt.value,n=jt.value;if(!e||!t||!n){bn.value=null;return}let r=ar(e.x,e.y),i=ar(e.x,e.y+K.value.marker.radius);if(!r||!i){bn.value=null;return}let a=n.getBoundingClientRect(),o=t.offsetWidth,s=t.offsetHeight,c=Math.abs(i.y-r.y),l=Math.max(0,a.width-16),u=Math.min(o,l),d=r.x;if(u>=l)d=a.width/2;else{let e=u/2;d=Math.min(a.width-8-e,Math.max(8+e,r.x))}let f=r.y+c+8,p=r.y-c-8-s,m=f+s<=a.height-8,ee=p>=8,h=f;!m&&ee?h=p:m||(h=Math.min(Math.max(8,f),Math.max(8,a.height-s-8))),bn.value={left:`${d}px`,top:`${h}px`,transform:`translateX(-50%)`,visibility:`visible`}}function sr(){typeof window<`u`&&(Z!==null&&window.cancelAnimationFrame(Z),Z=window.requestAnimationFrame(()=>{Z=null,or()}))}Ce(nr,e=>{Y.value&&!e.some(e=>e.stackId===Y.value)&&lr()}),Ce(()=>{let e=rr.value;return e?[e.stackId,e.x,e.y,e.hiddenDatapoints.length,e.hiddenDatapoints.map(e=>`${e.id}:${e.label}:${e.position}`).join(`|`),K.value.marker.radius,K.value.menu.width,K.value.menu.maxHeight,K.value.menu.backgroundColor,K.value.menu.color,K.value.menu.borderColor,K.value.menu.borderRadius,Jt.value]:null},e=>{if(!e){bn.value=null;return}_e(sr)},{flush:`post`}),Ce(Mt,(e,t)=>{t&&X&&X.unobserve(t),e&&X&&(X.observe(e),_e(sr))},{flush:`post`}),Ce(()=>{let e=yn.value;return!e||Dn.value.overflowMemberIds.has(e)},e=>{e||(yn.value=null,J.value=null)});function cr(e){if(e){if(Y.value===e.stackId){sr();return}bn.value=null,Y.value=e.stackId,_e(sr)}}function lr(){Y.value=null,bn.value=null,typeof window<`u`&&Z!==null&&(window.cancelAnimationFrame(Z),Z=null)}function ur(){Cn!==null&&(clearTimeout(Cn),Cn=null)}function dr(){let e=J.value;e&&!e.moved&&(ur(),xn.value=e.stackId,yn.value=null,J.value=null,lr(),Cn=setTimeout(()=>{xn.value=null,Cn=null},K.value.transitionDuration+80))}function fr(e){if(!(e instanceof Element))return{isMenu:!1,isMarker:!1,isSelectedDatapoint:!1};let t=J.value,n=e.closest(`[data-datapoint-id]`);return{isMenu:!!e.closest(`[data-stack-overflow-menu]`),isMarker:!!e.closest(`[data-stack-overflow-marker]`),isSelectedDatapoint:!!(t&&n?.getAttribute(`data-datapoint-id`)===t.datapointId)}}function pr(e){let t=fr(e.target);Y.value&&!t.isMenu&&!t.isMarker&&lr(),J.value&&!J.value.moved&&!t.isMenu&&!t.isMarker&&!t.isSelectedDatapoint&&dr()}function mr(e){let t=Q.value.find(t=>t.id===e);if(!t||t.isStackOverflowHidden)return;let n=A.value?.querySelector(`[data-datapoint-index="${t.__index}"]`);n&&typeof n.focus==`function`&&n.focus({preventScroll:!0})}function hr(e){if(!e||e.disabled||j.value.readonly)return;let t=rr.value?.stackId;t&&(ur(),xn.value=null,yn.value=e.id,J.value={datapointId:e.id,stackId:t,initialPosition:e.position,moved:!1},lr(),_e(()=>{mr(e.id);let t=Q.value.find(t=>t.id===e.id);t&&R(`selectDatapoint`,Vn(t))}))}function gr(){let e=Math.max(1,Number(q.value.width)||1);return Math.max(1e-6,1/e*2)}function _r(e,t){let n=J.value;n&&n.datapointId===e&&!n.moved&&Math.abs(t-n.initialPosition)>=gr()&&(J.value={...n,moved:!0})}be(()=>{document.addEventListener(`pointerdown`,pr),window.addEventListener(`resize`,sr,{passive:!0}),typeof ResizeObserver<`u`&&(X=new ResizeObserver(()=>{rr.value&&sr()}),jt.value&&X.observe(jt.value),A.value&&X.observe(A.value))}),ye(()=>{document.removeEventListener(`pointerdown`,pr),window.removeEventListener(`resize`,sr),X?.disconnect(),X=null,Z!==null&&(window.cancelAnimationFrame(Z),Z=null),ur()});function vr(e){return L.value?L.value.id===e.id:Zn.value===e.id||$.value===e.id}function yr(e){return u(M.value.dragMarker.positionIndicator.value.formatter,e.position,a({p:``,v:e.position*100,s:`%`,r:M.value.dragMarker.positionIndicator.value.rounding}))}let br=_(()=>N.value.backgroundColor),xr=_(()=>N.value.legend),Sr=_(()=>N.value.title),{isCallbackImaging:Cr,isCallbackSvg:wr,generateSvg:Tr,onGenerateImage:Er}=ae({svg:A,title:Sr,legend:xr,legendItems:null,backgroundColor:br,getSvgCallback:()=>j.value.userOptions.callbacks.svg,generateImage:Gt});function Dr(e=null){_e(()=>{let t=sn().map(e=>[[e.name],[e.position],[yr(e)],[Bn(e.position)]]),n=[[N.value.title.text],[N.value.title.subtitle.text],[[`Name`],[`Position`],[`Percentage`],[`Phase`]]].concat(t),r=o(n);e?e(r):f({csvContent:r,title:N.value.title.text||`vue-ui-hill`})})}let Or=_(()=>N.value.layout.stackbar.show),kr=_(()=>{let e=Q.value.length;Q.value.reduce((e,t)=>e+(t?.position??0),0);let t=0,n=Q.value.every(e=>e.position===1);return Q.value.toSorted((e,t)=>{if(n)return e.__index-t.__index;let r=(e?.position??0)-(t?.position??0);return r===0?e.__index-t.__index:r}).map(n=>{let r=n?.position??0,i=e>0?r/e:0,a={...n,proportion:i,proportionStart:t};return t+=i,a})}),Ar=_(()=>Math.min(1,Math.max(0,kr.value.reduce((e,t)=>e+t.proportion,0)))),jr=_(()=>Ar.value*100),Mr=_(()=>q.value.left[0].x+q.value.width*Ar.value),Nr=_(()=>z.value.height+32+G.value.paddingTop);function Pr(){return u(G.value.label.formatter,jr.value,a({p:``,v:jr.value,s:`%`,r:0}))}let Fr=_(()=>`${kt.value}-stackbar-clip`);async function Ir(){let e=sn();if(Ft(`copyAlt`,{config:j.value,dataset:e}),!j.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(j.value.userOptions.callbacks.altCopy({config:j.value,dataset:e}))}let Lr=ue(jt,()=>N.value.title.text);function Rr(){return sn()}return ce({isEditing:F,beginEditing:Nn,save:Pn,cancel:Fn,getData:Rr,copyAlt:Ir,toggleFullscreen:Yt,toggleAnnotator:Zt,generateImage:Gt,generateSvg:Tr,generatePdf:Wt,generateCsv:Dr,getImage:Lr}),(e,a)=>(C(),y(`div`,{ref_key:`hillChartRef`,ref:jt,class:x(`vue-data-ui-component vue-ui-hill`),style:S(Gn.value),id:`hill_${kt.value}`,onMouseenter:Bt,onMouseleave:Vt,"data-editing":F.value},[N.value.title.text?(C(),y(`div`,Oe,[(C(),fe(se,{key:`title_${Pt.value}`,config:{title:{cy:`hill-div-title`,...N.value.title},subtitle:{cy:`hill-div-subtitle`,...N.value.title.subtitle}}},null,8,[`config`]))],512)):v(``,!0),j.value.userOptions.buttons.annotator&&A.value?(C(),fe(O(Ct),{key:1,color:N.value.color,backgroundColor:N.value.backgroundColor,active:Xt.value,svgRef:A.value,isCursorPointer:Kt.value,palette:j.value.userOptions.annotatorPalette,onClose:Zt},pe({_:2},[T(O(n),n=>({name:n,fn:we(r=>[E(e.$slots,n,ve(ge(O(t)(n,r))),void 0,!0)])}))]),1032,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`,`palette`])):v(``,!0),W.value.show?(C(),fe(O(bt),{key:2,"is-editing":F.value,"is-editable":ln.value,"is-fullscreen":Jt.value,position:Qt.value,color:N.value.color,"background-color":N.value.backgroundColor,translations:W.value.buttons.translations,"is-cursor-pointer":Kt.value,onUpdate:Nn,onCancel:Fn,onSave:Pn},{"hill-edit":we(()=>[E(e.$slots,`hill-edit`,{},void 0,!0)]),"hill-cancel":we(()=>[E(e.$slots,`hill-cancel`,{},void 0,!0)]),"hill-save":we(()=>[E(e.$slots,`hill-save`,{},void 0,!0)]),_:3},8,[`is-editing`,`is-editable`,`is-fullscreen`,`position`,`color`,`background-color`,`translations`,`is-cursor-pointer`])):v(``,!0),W.value.show?(C(),y(`div`,ke,[b(`p`,{class:`vue-ui-hill__status`,style:S(Kn.value),"aria-live":`polite`},D(F.value?W.value.status.editInstruction:W.value.status.lastUpdated),5)])):v(``,!0),j.value.userOptions.show&&(O(zt)||O(Lt))?(C(),fe(O(xt),{ref_key:`userOptionsRef`,ref:Nt,key:`uo_${qt.value}`,backgroundColor:N.value.backgroundColor,color:N.value.color,isPrinting:O(Ht),isImaging:O(Ut),uid:kt.value,hasTooltip:!1,hasPdf:j.value.userOptions.buttons.pdf,hasImg:j.value.userOptions.buttons.img,hasSvg:j.value.userOptions.buttons.svg,hasXls:j.value.userOptions.buttons.csv,hasTable:j.value.userOptions.buttons.table,hasLabel:j.value.userOptions.buttons.labels,hasFullscreen:j.value.userOptions.buttons.fullscreen,hasAltCopy:j.value.userOptions.buttons.altCopy,chartElement:jt.value,position:j.value.userOptions.position,callbacks:j.value.userOptions.callbacks,titles:{...j.value.userOptions.buttonTitles},hasAnnotator:j.value.userOptions.buttons.annotator,isAnnotation:Xt.value,printScale:j.value.userOptions.print.scale,isCursorPointer:Kt.value,onToggleFullscreen:Yt,onGeneratePdf:O(Wt),onGenerateCsv:Dr,onGenerateImage:O(Er),onGenerateSvg:O(Tr),onToggleAnnotator:Zt,onCopyAlt:Ir,style:S({visibility:O(zt)?O(Lt)?`visible`:`hidden`:`visible`})},pe({_:2},[T(O(r)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:we(n=>[E(e.$slots,t,ve(ge(O(i)(t,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasPdf`,`hasImg`,`hasSvg`,`hasXls`,`hasTable`,`hasLabel`,`hasFullscreen`,`hasAltCopy`,`chartElement`,`position`,`callbacks`,`titles`,`hasAnnotator`,`isAnnotation`,`printScale`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):v(``,!0),(C(),y(`svg`,{ref_key:`svgRef`,ref:A,style:S({background:`transparent`,color:N.value.color,fontFamily:j.value.style.fontFamily}),class:x({"vue-data-ui-no-transition":!O(P)}),viewBox:`0 0 ${z.value.width} ${z.value.height+(Or.value?32+G.value.paddingTop+G.value.paddingBottom+G.value.height:0)}`,role:`group`,"aria-live":`polite`,preserveAspectRatio:`xMidYMid meet`,onPointermove:Ln,onPointerup:Rn,onPointercancel:Rn},[me(O(St)),e.$slots[`chart-background`]?(C(),y(`foreignObject`,{key:0,x:0,y:0,width:Math.max(.1,z.value.width),height:Math.max(.1,z.value.height+(Or.value?32+G.value.paddingTop+G.value.paddingBottom+G.value.height:0)),style:{pointerEvents:`none`}},[E(e.$slots,`chart-background`,{},void 0,!0)],8,je)):v(``,!0),B.value.baseline.show?(C(),y(`line`,{key:1,x1:q.value.startX,x2:q.value.endX,y1:q.value.baseY,y2:q.value.baseY,stroke:B.value.baseline.stroke,"stroke-width":B.value.baseline.strokeWidth,"stroke-dasharray":B.value.baseline.strokeDasharray,"vector-effect":`non-scaling-stroke`},null,8,Me)):v(``,!0),B.value.midline.show?(C(),y(`line`,{key:2,x1:q.value.centerX,x2:q.value.centerX,y1:q.value.peakY,y2:q.value.baseY,stroke:B.value.midline.stroke,"stroke-width":B.value.midline.strokeWidth,"stroke-dasharray":B.value.midline.strokeDasharray,"vector-effect":`non-scaling-stroke`},null,8,Ne)):v(``,!0),b(`path`,{d:fn.value,fill:`none`,stroke:B.value.curve.stroke,"stroke-width":B.value.curve.strokeWidth,"stroke-dasharray":B.value.curve.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,"vector-effect":`non-scaling-stroke`},null,8,Pe),M.value.dragMarker.positionIndicator.show?(C(!0),y(g,{key:3},T(tr.value,e=>(C(),y(`g`,{key:`position-indicator-${e.id}`},[vr(e)&&V.value.dragMarker.show?(C(),y(`g`,Fe,[b(`path`,{d:`M${e.x},${e.y} ${e.x},${q.value.baseY}`,stroke:M.value.dragMarker.positionIndicator.useSerieColor?e.color:M.value.dragMarker.positionIndicator.color,"stroke-width":M.value.dragMarker.positionIndicator.strokeWidth,"stroke-dasharray":M.value.dragMarker.positionIndicator.strokeDasharray,"stroke-linecap":`round`,"vector-effect":`non-scaling-stroke`,class:x({"vue-data-ui-transition":O(P)&&L.value?.id!==e.id})},null,10,Ie),M.value.dragMarker.positionIndicator.circle.show?(C(),y(`circle`,{key:0,cx:e.x,cy:q.value.baseY,r:M.value.dragMarker.positionIndicator.circle.radius,fill:M.value.dragMarker.positionIndicator.useSerieColor?e.color:M.value.dragMarker.positionIndicator.color,stroke:M.value.dragMarker.positionIndicator.circle.stroke,"stroke-width":M.value.dragMarker.positionIndicator.circle.strokeWidth,"vector-effect":`non-scaling-stroke`,"paint-order":`stroke fill`,class:x({"vue-data-ui-transition":O(P)&&L.value?.id!==e.id})},null,10,Le)):v(``,!0),M.value.dragMarker.positionIndicator.value.show?(C(),y(`text`,{key:1,"paint-order":`stroke fill`,"vector-effect":`non-scaling-stroke`,"text-anchor":`middle`,transform:`translate(${e.x}, ${q.value.baseY+M.value.radius+M.value.dragMarker.positionIndicator.value.offsetY+M.value.dragMarker.positionIndicator.value.fontSize})`,"font-size":M.value.dragMarker.positionIndicator.value.fontSize,fill:M.value.dragMarker.positionIndicator.value.useSerieColor?e.color:M.value.dragMarker.positionIndicator.value.color,stroke:N.value.backgroundColor,"stroke-width":`1`,class:x({"vue-data-ui-transition":O(P)&&L.value?.id!==e.id})},D(yr(e)),11,Re)):v(``,!0)])):v(``,!0)]))),128)):v(``,!0),(C(!0),y(g,null,T(tr.value,e=>(C(),y(`g`,{key:e.id,"data-cy-datapoint":``,class:x({"vue-ui-hill__datapoint":!0,"vue-data-ui-transition":O(P)&&L.value?.id!==e.id,"vue-ui-hill__datapoint--promoted":O(P)&&e.isPromotedFromStackOverflow}),style:S({opacity:[0,1].includes(e.position)||e?.muted?V.value.mutedOpacity:e?.disabled?V.value.disabledOpacity:1}),transform:`translate(${e.x} ${e.y})`,"data-datapoint-index":e.__index,"data-datapoint-id":e.id,role:`slider`,tabindex:F.value&&ln.value&&!e.disabled?0:-1,"aria-orientation":`horizontal`,"aria-valuemin":`0`,"aria-valuemax":`100`,"aria-valuenow":yr(e),"aria-valuetext":`${e.label}: ${Bn(e.position)}, ${yr(e)}`,"aria-label":e.label,onFocus:t=>Qn(e),onBlur:t=>$n(e),onKeydown:t=>zn(t,e),onPointerenter:t=>Hn(e),onPointerleave:t=>Un(e),onClick:t=>Wn(e)},[b(`circle`,{r:V.value.hitRadius,fill:`transparent`,class:x({"vue-ui-hill__hit-area--active":F.value&&ln.value&&!e.disabled,"vue-ui-hill__hit-area--dragging":L.value?.id===e.id}),onPointerdown:t=>In(t,e)},null,42,Be),b(`circle`,{class:`vue-ui-hill-circle`,r:V.value.radius,fill:e.color,stroke:V.value.stroke,"stroke-width":V.value.strokeWidth,style:S({filter:V.value.shadow.show?`drop-shadow(${V.value.shadow.offsetX}px ${V.value.shadow.offsetY}px ${V.value.shadow.blur}px ${V.value.shadow.color})`:`none`}),"vector-effect":`non-scaling-stroke`,"pointer-events":`none`},null,12,Ve),F.value&&(L.value?.id===e.id&&V.value.dragMarker.show||vr(e))&&!e?.disabled?(C(),y(`g`,{key:0,fill:`none`,stroke:O(p)(e.color),"stroke-width":V.value.dragMarker.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,"pointer-events":`none`,"vector-effect":`non-scaling-stroke`,"aria-hidden":`true`},[b(`path`,{d:V.value.dragMarker.crossPath},null,8,Ue)],8,He)):v(``,!0),H.value.show?(C(),y(`text`,{key:1,x:e.labelX,y:H.value.offsetY,"text-anchor":e.textAnchor,fill:H.value.useSerieColor?e.color:H.value.color,"font-size":H.value.fontSize,"font-weight":H.value.bold?`bold`:`normal`,"paint-order":`stroke fill`,stroke:H.value.stroke,"stroke-width":H.value.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,"pointer-events":`none`,style:{"user-select":`none`},"dominant-baseline":`central`},D(O(l)(e.label,H.value.ellipsisThresholdChars)),9,We)):v(``,!0)],46,ze))),128)),(C(!0),y(g,null,T(nr.value,e=>(C(),y(`g`,{key:`stack-overflow-${e.stackId}`,class:x([`vue-ui-hill__stack-overflow-marker`,{"vue-ui-hill__stack-overflow-marker--animated":O(P),"vue-ui-hill__stack-overflow-marker--restored":xn.value===e.stackId}]),style:S({"--vue-ui-hill-overflow-marker-duration":`${K.value.transitionDuration*.7}ms`,"--vue-ui-hill-overflow-marker-delay":`${K.value.transitionDuration*.3}ms`,"--vue-ui-hill-overflow-label-duration":`${K.value.transitionDuration*.55}ms`,"--vue-ui-hill-overflow-label-delay":`${K.value.transitionDuration*.45}ms`,cursor:Kt.value&&!j.value.readonly?`pointer`:`default`}),transform:`translate(${e.x} ${e.y})`,"data-stack-overflow-marker":``,role:`button`,tabindex:F.value&&ln.value?0:-1,"aria-label":`${e.hiddenCount} stacked datapoints. Activate to choose one.`,"aria-expanded":Y.value===e.stackId,onPointerdown:a[0]||=k(()=>{},[`stop`]),onClick:k(t=>cr(e),[`stop`]),onFocus:t=>cr(e),onKeydown:[Te(k(t=>cr(e),[`prevent`,`stop`]),[`enter`]),Te(k(t=>cr(e),[`prevent`,`stop`]),[`space`]),Te(k(lr,[`prevent`,`stop`]),[`esc`])]},[O(P)&&xn.value!==e.stackId?(C(),y(`g`,Ke,[(C(!0),y(g,null,T(e.collapseDatapoints,t=>(C(),y(`circle`,{key:`overflow-ghost-${e.stackId}-${t.id}`,cx:t.relativeX,cy:t.relativeY,r:V.value.radius,fill:t.color,stroke:V.value.stroke,"stroke-width":V.value.strokeWidth,opacity:`0.8`,"vector-effect":`non-scaling-stroke`},[b(`animate`,{attributeName:`cx`,from:t.relativeX,to:`0`,dur:`${K.value.transitionDuration}ms`,fill:`freeze`,calcMode:`spline`,keyTimes:`0;1`,keySplines:`0.22 1 0.36 1`},null,8,Je),b(`animate`,{attributeName:`cy`,from:t.relativeY,to:`0`,dur:`${K.value.transitionDuration}ms`,fill:`freeze`,calcMode:`spline`,keyTimes:`0;1`,keySplines:`0.22 1 0.36 1`},null,8,Ye),b(`animate`,{attributeName:`r`,from:V.value.radius,to:K.value.marker.radius*.7,dur:`${K.value.transitionDuration}ms`,fill:`freeze`},null,8,Xe),b(`animate`,{attributeName:`opacity`,from:`0.8`,to:`0`,dur:`${K.value.transitionDuration*.85}ms`,fill:`freeze`},null,8,Ze)],8,qe))),128))])):v(``,!0),b(`circle`,{r:Math.max(V.value.hitRadius,K.value.marker.radius),fill:`transparent`,"pointer-events":`all`},null,8,Qe),b(`rect`,{class:`vue-ui-hill__stack-overflow-marker-rect`,x:-K.value.marker.radius,y:-K.value.marker.radius,width:K.value.marker.radius*2,height:K.value.marker.radius*2,fill:K.value.marker.fill,stroke:K.value.marker.stroke,"stroke-width":K.value.marker.strokeWidth,"vector-effect":`non-scaling-stroke`,"pointer-events":`none`},null,8,$e),b(`g`,{class:`vue-ui-hill__stack-overflow-focus-cross`,fill:`none`,stroke:O(p)(B.value.curve.stroke),"stroke-width":V.value.dragMarker.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,"pointer-events":`none`,"vector-effect":`non-scaling-stroke`,"aria-hidden":`true`},[b(`path`,{d:V.value.dragMarker.crossPath},null,8,tt)],8,et),rr.value?v(``,!0):(C(),y(`text`,{key:1,class:`vue-ui-hill__stack-overflow-marker-label`,"text-anchor":`middle`,y:K.value.marker.radius+K.value.marker.offsetY+K.value.marker.fontSize,fill:K.value.marker.color,"font-size":K.value.marker.fontSize,"font-weight":K.value.marker.bold?`bold`:`normal`,"pointer-events":`none`,style:{"user-select":`none`},"paint-order":`stroke fill`,"vector-effect":`non-scaling-stroke`,stroke:N.value.backgroundColor,"stroke-width":`3`},` +`+D(e.hiddenCount),9,nt))],46,Ge))),128)),U.value.show?(C(),y(g,{key:4},[b(`text`,{x:(q.value.startX+q.value.centerX)/2,y:qn.value,"text-anchor":`middle`,fill:U.value.color,"font-size":U.value.fontSize,"font-weight":U.value.bold?`bold`:`normal`,"letter-spacing":U.value.letterSpacing},D(Jn(`left`)),9,rt),b(`text`,{x:(q.value.centerX+q.value.endX)/2,y:qn.value,"text-anchor":`middle`,fill:U.value.color,"font-size":U.value.fontSize,"font-weight":U.value.bold?`bold`:`normal`,"letter-spacing":U.value.letterSpacing},D(Jn(`right`)),9,it)],64)):v(``,!0),Or.value?(C(),y(g,{key:5},[b(`rect`,{x:q.value.left[0].x,y:Nr.value,rx:G.value.height/2,width:q.value.width,height:G.value.height,fill:G.value.gutterColor},null,8,at),b(`defs`,null,[b(`clipPath`,{id:Fr.value},[b(`rect`,{x:q.value.left[0].x,y:Nr.value,width:q.value.width*Ar.value,height:G.value.height,rx:Math.min(G.value.height/2,q.value.width*Ar.value/2),ry:Math.min(G.value.height/2,q.value.width*Ar.value/2)},null,8,st)],8,ot)]),b(`g`,{"clip-path":`url(#${Fr.value})`},[(C(!0),y(g,null,T(kr.value,e=>(C(),y(`rect`,{key:`bar_fill_${e.id}`,width:q.value.width*e.proportion,x:q.value.left[0].x+q.value.width*e.proportionStart,y:z.value.height+32+G.value.paddingTop,fill:e.color,height:G.value.height,onPointerenter:t=>Hn(e),onPointerleave:t=>Un(e)},null,40,lt))),128))],8,ct),(C(!0),y(g,null,T(kr.value.slice(1),e=>(C(),y(`line`,{key:`bar_separator_${e.id}`,x1:q.value.left[0].x+q.value.width*e.proportionStart,x2:q.value.left[0].x+q.value.width*e.proportionStart,y1:z.value.height+32+G.value.paddingTop,y2:z.value.height+32+G.value.paddingTop+G.value.height,stroke:G.value.stroke,"stroke-width":G.value.strokeWidth,"vector-effect":`non-scaling-stroke`},null,8,ut))),128)),b(`rect`,{x:q.value.left[0].x,y:z.value.height+32+G.value.paddingTop,width:q.value.width*Ar.value,height:G.value.height,rx:Math.min(G.value.height/2,q.value.width*Ar.value/2),ry:Math.min(G.value.height/2,q.value.width*Ar.value/2),fill:`none`,stroke:G.value.stroke,"stroke-width":G.value.strokeWidth,"vector-effect":`non-scaling-stroke`},null,8,dt),G.value.label.show&&Ar.value>0?(C(),y(`text`,{key:0,x:Mr.value,y:Nr.value-6,fill:G.value.label.color,"font-size":G.value.label.fontSize,"text-anchor":`end`,"dominant-baseline":`auto`,"pointer-events":`none`,style:{"user-select":`none`}},D(Pr()),9,ft)):v(``,!0)],64)):v(``,!0),E(e.$slots,`svg`,{svg:{drawingArea:q.value,isEditing:F.value,datapoints:tr.value,isPrintingImg:O(Ht)||O(Ut)||O(Cr),isPrintingSvg:O(wr)}},void 0,!0)],46,Ae)),rr.value?(C(),y(`div`,{ref_key:`overflowMenuRef`,ref:Mt,key:`stack-overflow-menu-${rr.value.stackId}`,class:`vue-ui-hill__stack-overflow-menu`,"data-stack-overflow-menu":``,"data-dom-to-png-ignore":``,style:S([ir.value,bn.value]),role:`listbox`,"aria-label":`Choose one of ${rr.value.hiddenCount} stacked datapoints`,onPointerdown:a[1]||=k(()=>{},[`stop`]),onClick:a[2]||=k(()=>{},[`stop`]),onKeydown:Te(k(lr,[`prevent`,`stop`]),[`esc`])},[M.value.stacking.overflow.menu.title?(C(),y(`div`,mt,D(M.value.stacking.overflow.menu.title),1)):v(``,!0),(C(!0),y(g,null,T(rr.value.hiddenDatapoints,e=>(C(),y(`button`,{key:`hidden-${e.id}`,type:`button`,class:x([`vue-ui-hill__stack-overflow-menu-item`,{readonly:j.value.readonly}]),role:`option`,disabled:e.disabled,"aria-label":`${e.label}, ${yr(e)}`,onClick:k(t=>hr(e),[`stop`]),style:S({cursor:Kt.value&&!j.value.readonly?`pointer`:`default`})},[b(`span`,{class:`vue-ui-hill__stack-overflow-menu-swatch`,style:S({backgroundColor:e.color}),"aria-hidden":`true`},null,4),b(`span`,gt,D(O(l)(e.label,H.value.ellipsisThresholdChars)),1),b(`span`,_t,D(yr(e)),1)],14,ht))),128))],44,pt)):v(``,!0),E(e.$slots,`analysis`,{data:{...kr.value}},void 0,!0),e.$slots.watermark?(C(),y(`div`,vt,[E(e.$slots,`watermark`,ve(ge({isPrinting:O(Ht)||O(Ut)||O(Cr)||O(wr)})),void 0,!0)])):v(``,!0),j.value.loading?(C(),y(`div`,yt,[j.value.loading?E(e.$slots,`loading`,{},()=>[me(O(wt),{name:`spinner2`,stroke:N.value.color,"is-spin":!0},null,8,[`stroke`])],!0,0):v(``,!0)])):v(``,!0)],44,De))}},[[`__scopeId`,`data-v-01d798ea`]]);export{Ee as n,bt as t};
@@ -1,2 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./tableIntegration-CNoJ1CIY.js";import{n as r,t as i}from"./annotationSlots-BRR85CqJ.js";import{n as a,t as o}from"./userOptionsSlots-DYuo-E5m.js";import{$ as s,D as ee,Dt as te,Et as ne,Ft as re,Ht as ie,J as ae,Q as oe,S as se,T as ce,X as le,Zt as ue,_ as de,at as fe,i as c,in as pe,nn as me,nt as he,qt as ge,r as _e,rn as l,t as ve,tn as ye,w as be,yt as xe,zt as Se}from"./lib-zDxoqrgo.js";import{n as Ce,t as we}from"./useHints-BH9r_0Vd.js";import{t as Te}from"./useConfig-CKdzPrcf.js";import{t as Ee}from"./usePrinter-CnyKPIFM.js";import{n as De,t as Oe}from"./BaseScanner-8NdoBs7B.js";import{t as ke}from"./useNestedProp-CT9phgWx.js";import{t as Ae}from"./useThemeCheck-BKNRbGeC.js";import{t as je}from"./useChartExport-DtPNpc9M.js";import{t as Me}from"./useTransitions-DfSHzsdz.js";import{t as Ne}from"./useTimeLabelCollider-XQf_S7-z.js";import{n as Pe}from"./Title-BRAjxtjG.js";import{t as Fe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{l as Ie,t as Le}from"./useResponsive-D2CPcpda.js";import{t as Re}from"./DefGrad-DKMq1REY.js";import{t as ze}from"./BaseLegendToggle-Dn_tNvn4.js";import{t as Be}from"./A11yDataTable-DWNlWXzs.js";import{t as Ve}from"./useUserOptionState-CXlFnwPv.js";import{t as He}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ue}from"./chartImage-NwZO-elv.js";import{t as We}from"./Legend-DokTll4u.js";import{t as Ge}from"./vue_ui_history_plot-soyqUW4Y.js";import{Fragment as u,Teleport as Ke,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as qe,createTextVNode as Je,createVNode as Ye,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as Xe,nextTick as Ze,normalizeClass as v,normalizeProps as y,normalizeStyle as b,onBeforeUnmount as Qe,onMounted as $e,openBlock as x,ref as S,renderList as C,renderSlot as w,resolveDynamicComponent as et,shallowRef as tt,toDisplayString as T,toRefs as nt,unref as E,watch as rt,watchEffect as it,withCtx as D}from"vue";var at=/* @__PURE__ */ e({default:()=>Wt}),ot=[`id`],st=[`id`],ct=[`id`],lt={style:{position:`relative`}},ut=[`xmlns`,`viewBox`,`aria-describedby`],dt=[`x`,`y`,`width`,`height`],ft={key:1},pt=[`id`,`x1`,`y1`,`x2`,`y2`],mt=[`stop-color`,`offset`],ht={key:2},gt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],_t={key:3},vt=[`stroke`,`stroke-width`,`x1`,`x2`,`y1`,`y2`],yt=[`x`,`y`,`fill`,`font-size`],bt=[`transform`,`font-size`,`fill`,`font-weight`],xt={key:6},St=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Ct={key:7},wt=[`stroke`,`stroke-width`,`x1`,`x2`,`y1`,`y2`],Tt=[`transform`,`fill`,`font-size`,`text-anchor`],Et=[`x`,`y`,`font-size`,`fill`,`font-weight`],Dt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Ot=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],kt=[`d`,`stroke`,`stroke-width`],At=[`d`,`stroke`,`stroke-width`],jt=[`cx`,`cy`,`fill`,`r`],Mt=[`cx`,`cy`,`fill`,`r`,`stroke`,`stroke-width`],Nt={key:1},Pt=[`transform`,`font-size`,`fill`,`font-weight`],Ft=[`transform`,`font-size`,`fill`,`font-weight`,`innerHTML`],It={key:2},Lt=[`transform`,`font-size`,`font-weight`,`fill`],Rt=[`cx`,`cy`,`r`,`onMouseenter`,`onMouseleave`,`onClick`],zt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Bt={key:5,class:`vue-data-ui-watermark`},Vt=[`id`],Ht=[`onClick`],Ut={style:{display:`flex`,"align-items":`center`}},Wt=/*#__PURE__*/ Fe({__name:`vue-ui-history-plot`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:Fe,emit:at}){let Wt=g(()=>import(`./Tooltip-BUXB0i6z.js`)),Gt=g(()=>import(`./BaseIcon-Cz30ODFA.js`).then(e=>e.n)),Kt=g(()=>import(`./vue-ui-accordion-Dy5OVFKr.js`).then(e=>e.n)),qt=g(()=>import(`./DataTable-DSUA5M9p.js`)),Jt=g(()=>import(`./PenAndPaper-DvJJaeU2.js`).then(e=>e.t)),Yt=g(()=>import(`./UserOptions-D65t74CM.js`).then(e=>e.n)),Xt=g(()=>import(`./PackageVersion-D6pKL176.js`).then(e=>e.t)),Zt=g(()=>import(`./BaseDraggableDialog-T1gEsQid.js`).then(e=>e.n)),{vue_ui_history_plot:Qt}=Te(),{isThemeValid:$t,warnInvalidTheme:en}=Ae(),O=e,k=S(null),tn=S(null),nn=S(0),rn=S(null),an=S(0),on=S(0),sn=S(0),A=tt(null),j=tt(null),cn=S(null),M=S(le()),ln=S(!1),un=S(``),N=S([]),dn=S(!1),P=S(null),fn=S(!1),pn=S(null),mn=S(!1),hn=S(null),gn=S(null),_n=S(null),vn=S(null),yn=S(null),bn=S(null),F=S(null),I=S(null),xn=S({x:0,y:0}),Sn=S(`pointer`),Cn=S(!1),wn=d({get:()=>!!O.dataset&&O.dataset.length,set:e=>e}),Tn=at;$e(()=>{mn.value=!0,Dn()});let En=d(()=>L.value.debug);function Dn(){if(Se(O.dataset)?(fe({componentName:`VueUiHistoryPlot`,type:`dataset`,debug:En.value}),Mn.value=!0):O.dataset.forEach((e,t)=>{xe({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{wn.value=!1,fe({componentName:`VueUiHistoryPlot`,type:`datasetSerieAttribute`,property:e,index:t,debug:En.value})})}),Se(O.dataset)||(Mn.value=L.value.loading),L.value.responsive){let e=Ie(()=>{let{width:e,height:t}=Le({chart:k.value,title:V.value.title.text?tn.value:null,noTitle:cn.value,legend:V.value.legend.show?rn.value:null,source:pn.value});requestAnimationFrame(()=>{K.value.width=e,K.value.height=t,L.value.responsiveProportionalSizing?(J.value.plots=l({relator:Math.min(e,t),adjuster:600,source:R.value.radius,threshold:3,fallback:3}),J.value.indexLabels=l({relator:Math.min(e,t),adjuster:600,source:R.value.indexLabels.fontSize,threshold:6,fallback:6}),J.value.labels=l({relator:Math.min(e,t),adjuster:600,source:R.value.labels.fontSize,threshold:6,fallback:6}),J.value.xAxisLabels=l({relator:Math.min(e,t),adjuster:600,source:B.value.x.labels.fontSize,threshold:6,fallback:6}),J.value.xAxisName=l({relator:Math.min(e,t),adjuster:600,source:B.value.x.name.fontSize,threshold:6,fallback:6}),J.value.yAxisLabels=l({relator:Math.min(e,t),adjuster:600,source:B.value.y.labels.fontSize,threshold:6,fallback:6}),J.value.yAxisName=l({relator:Math.min(e,t),adjuster:600,source:B.value.y.name.fontSize,threshold:6,fallback:6})):(J.value.plots=R.value.radius,J.value.indexLabels=R.value.indexLabels.fontSize,J.value.labels=R.value.labels.fontSize,J.value.xAxisLabels=B.value.x.labels.fontSize,J.value.xAxisName=B.value.x.name.fontSize,J.value.yAxisLabels=B.value.y.labels.fontSize,J.value.yAxisName=B.value.y.name.fontSize)})});A.value&&(j.value&&A.value.unobserve(j.value),A.value.disconnect()),A.value=new ResizeObserver(e),j.value=k.value.parentNode,A.value.observe(j.value)}}Qe(()=>{A.value&&(j.value&&A.value.unobserve(j.value),A.value.disconnect())});function On(){let e=ke({userConfig:O.config,defaultConfig:Qt}),t={},n=e.theme;if(n){if(!$t.value(e))en(e),t=e;else{let r=ke({userConfig:Ge[n]||O.config,defaultConfig:e});t={...ke({userConfig:O.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:me[n]||ie}}}else t=e;return t}let L=S(On()),R=d(()=>L.value.style.chart.plots),z=d(()=>L.value.style.chart.grid),B=d(()=>L.value.style.chart.axes),V=d(()=>L.value.style.chart);Ce({config:()=>L.value,dataset:()=>O.dataset,component:`VueUiHistoryPlot`,rules:[we.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series is > 6. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display.`]}]});let{transitionEnabled:H}=Me({config:()=>L.value.transitions,dataset:()=>O.dataset}),U=d(()=>L.value.userOptions.useCursorPointer),kn=d(()=>pe({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,axes:{x:{scaleMin:0,scaleMax:10,labels:{show:!1},name:{text:``}},y:{scaleMin:0,scaleMax:10,labels:{show:!1},name:{text:``}}},grid:{xAxis:{stroke:`#6A6A6A`},horizontalLines:{stroke:`#6A6A6A50`},yAxis:{stroke:`#6A6A6A`},verticalLines:{stroke:`#6A6A6A50`}},legend:{backgroundColor:`transparent`},paths:{useSerieColor:!1,stroke:`#6A6A6A`},plots:{stroke:`#6A6A6A`,indexLabels:{show:!1},labels:{show:!1}}}}},userConfig:L.value.skeletonConfig??{}})),{loading:An,FINAL_DATASET:jn,manualLoading:Mn}=De({...nt(O),FINAL_CONFIG:L,prepareConfig:On,skeletonDataset:O.config?.skeletonDataset??[{name:``,color:`#CACACA`,values:[{label:``,x:1,y:9},{label:``,x:4,y:1},{label:``,x:7,y:9},{label:``,x:9,y:4}]}],skeletonConfig:pe({defaultConfig:L.value,userConfig:kn.value})}),{userOptionsVisible:Nn,setUserOptionsVisibility:Pn,keepUserOptionState:Fn}=Ve({config:L.value}),{svgRef:W}=He({config:V.value.title}),In=ue(O.config);rt(()=>O.config,(e,t)=>{let n=ue(e),r=n!==In;In=n;let i=On();if(!r){L.value.style.chart.tooltip=i.style.chart.tooltip,G.value.showTooltip=L.value.style.chart.tooltip.show;return}An.value||(L.value=i),Nn.value=!L.value.userOptions.showOnChartHover,Dn(),nn.value+=1,on.value+=1,an.value+=1,K.value.height=V.value.height,K.value.width=V.value.width,J.value.plots=R.value.radius,J.value.indexLabels=R.value.indexLabels.fontSize,J.value.labels=R.value.labels.fontSize,J.value.xAxisLabels=B.value.x.labels.fontSize,J.value.xAxisName=B.value.x.name.fontSize,J.value.yAxisLabels=B.value.y.labels.fontSize,J.value.yAxisName=B.value.y.name.fontSize,G.value.showTable=L.value.table.show,G.value.showTooltip=V.value.tooltip.show},{deep:!0}),rt(()=>O.dataset,e=>{Array.isArray(e)&&e.length>0&&(Mn.value=!1)},{deep:!0});let{isPrinting:Ln,isImaging:Rn,generatePdf:zn,generateImage:Bn}=Ee({elementId:`history_plot_${M.value}`,fileName:V.value.title.text||`vue-ui-history-plot`,options:L.value.userOptions.print}),Vn=d(()=>L.value.userOptions.show&&!V.value.title.text),Hn=d(()=>be(L.value.customPalette)),G=S({showTable:L.value.table.show,showTooltip:V.value.tooltip.show});rt(L,()=>{G.value={showTable:L.value.table.show,showTooltip:V.value.tooltip.show}},{immediate:!0});let K=S({height:V.value.height,width:V.value.width}),Un=d(()=>K.value.width),Wn=d(()=>K.value.height);function Gn(){let e=0;bn.value&&(e=Array.from(bn.value.querySelectorAll(`text`)).reduce((e,t)=>{let n=t.getComputedTextLength();return n>e?n:e},0));let t=vn.value?vn.value.getBoundingClientRect().width:0;return e+t+(t?24:0)}let Kn=S(0),qn=Ie(e=>{Kn.value=e});it(e=>{let t=yn.value;if(!t)return;let n=new ResizeObserver(e=>{qn(e[0].contentRect.height)});n.observe(t),e(()=>n.disconnect())});let Jn=d(()=>{let e=0;_n.value&&(e=_n.value.getBBox().height+J.value.xAxisName/2);let t=0;return yn.value&&(t=Kn.value),e+t}),q=d(()=>{let e=V.value.padding.left,t=V.value.padding.top,n=Gn(),r=R.value.radius;return{left:e+n+B.value.y.name.offsetX,top:t+r,right:K.value.width-V.value.padding.right-r-B.value.y.name.offsetX,bottom:K.value.height-V.value.padding.bottom-Jn.value-r-B.value.x.name.offsetY,width:K.value.width-e-V.value.padding.right-n-r-B.value.y.name.offsetX,height:K.value.height-t-V.value.padding.bottom-Jn.value-r*2-B.value.x.name.offsetY}}),J=S({plots:R.value.radius,indexLabels:R.value.indexLabels.fontSize,labels:R.value.labels.fontSize,xAxisLabels:B.value.x.labels.fontSize,xAxisName:B.value.x.name.fontSize,yAxisLabels:B.value.y.labels.fontSize,yAxisName:B.value.y.name.fontSize}),Y=d(()=>jn.value.map((e,t)=>{let n=Array.isArray(e.temperatureColors)&&e.temperatureColors.length?e.temperatureColors.map(e=>se(e)):void 0;return{...e,color:e.color?se(e.color):Hn.value[t]||ie[t]||ie[t%ie.length],temperatureColors:n,temperatureAngle:Yn(e.temperatureAngle),temperatureIndependant:e.temperatureIndependant===!0,usePlotTemperatureColors:e.usePlotTemperatureColors!==!1,seriesIndex:t}}));function Yn(e=0){let t=Number(e);return Number.isFinite(t)?(t%360+360)%360:0}let Xn=d(()=>Math.max(...Y.value.filter(e=>!N.value.includes(e.seriesIndex)).flatMap(e=>e.values.map(e=>e.x)))),Zn=d(()=>{let e=Math.min(...Y.value.filter(e=>!N.value.includes(e.seriesIndex)).flatMap(e=>e.values.map(e=>e.x)));return e<0?e:0}),Qn=d(()=>Math.max(...Y.value.filter(e=>!N.value.includes(e.seriesIndex)).flatMap(e=>e.values.map(e=>e.y)))),$n=d(()=>{let e=Math.min(...Y.value.filter(e=>!N.value.includes(e.seriesIndex)).flatMap(e=>e.values.map(e=>e.y)));return e<0?e:0}),X=d(()=>{let e=de(B.value.x.scaleMin??Zn.value,B.value.x.scaleMax??Xn.value,B.value.x.ticks),t=de(B.value.y.scaleMin??$n.value,B.value.y.scaleMax??Qn.value,B.value.y.ticks);return{x:e,y:t,tickX:e.ticks.map(t=>({x:q.value.left+(t-e.min)/(e.max-e.min)*q.value.width,y1:q.value.top,y2:q.value.bottom,value:t})),tickY:t.ticks.map(e=>({y:q.value.bottom-(e-t.min)/(t.max-t.min)*q.value.height,x1:q.value.left,x2:q.value.right,value:e}))}});function er(e){let t=X.value.x.min<0?Math.abs(X.value.x.min):X.value.x.min>0?-X.value.x.min:0;return q.value.left+((e||0)+t)/(X.value.x.max+t)*q.value.width}function tr(e){let t=X.value.y.min<0?Math.abs(X.value.y.min):X.value.y.min>0?-X.value.y.min:0;return q.value.bottom-((e||0)+t)/(X.value.y.max+t)*q.value.height}let Z=d(()=>Y.value.filter(e=>!N.value.includes(e.seriesIndex)).map((e,t)=>{let n=e.values.map((t,n)=>({valueX:t.x,valueY:t.y,label:t.label,x:er(t.x),y:tr(t.y),color:e.color,seriesName:e.name,id:le()})),r=e.smooth?ce(n):n.map(e=>`${e.x},${e.y} `).join(``).trim();return{...e,gradientIndex:t,plots:n,path:`M${r}`}})),nr=d(()=>{if(P.value===null||F.value===null)return Z.value;let e=Z.value.findIndex(e=>e.seriesIndex===F.value);if(e===-1)return Z.value;let t=Z.value[e];return[...Z.value.slice(0,e),...Z.value.slice(e+1),t]}),rr=d(()=>Z.value.some(e=>ir(e)));function ir(e){return Array.isArray(e?.temperatureColors)&&e.temperatureColors.length}function ar(e){return ir(e)&&e.usePlotTemperatureColors}function or(e){let t=Array.isArray(e?.plots)?e.plots:[];if(!t.length)return{minX:0,maxX:0,minY:0,maxY:0,width:0,height:0};let n=t.map(e=>e.x),r=t.map(e=>e.y),i=Math.min(...n),a=Math.max(...n),o=Math.min(...r),s=Math.max(...r);return{minX:i,maxX:a,minY:o,maxY:s,width:a-i,height:s-o}}function sr(){let e=q.value;return{minX:e.left,maxX:e.right,minY:e.top,maxY:e.bottom,width:e.width,height:e.height}}function cr(e){return e?.temperatureIndependant?or(e):sr()}function lr(e){let t=Yn(e?.temperatureAngle)*Math.PI/180,n=Math.sin(t),r=Math.cos(t),i=cr(e),a=i.minX+i.width/2,o=i.minY+i.height/2,s=(Math.abs(n)*i.width+Math.abs(r)*i.height)/2||1;return{x1:a-n*s,y1:o-r*s,x2:a+n*s,y2:o+r*s}}function ur(e,t){let{x1:n,y1:r,x2:i,y2:a}=lr(e),o=i-n,s=a-r,ee=o*o+s*s;if(!ee)return 0;let te=((t.x-n)*o+(t.y-r)*s)/ee;return Math.min(1,Math.max(0,te))}function Q(e,t){return ne({colors:e.temperatureColors,ratio:ur(e,t)})}function dr(e,t){return`temperature_plot_grad_history_${e.seriesIndex}_${t.id}_${M.value}`}function fr(e,t,n){return ar(e)?R.value.gradient.show?`url(#${dr(e,t)})`:Q(e,t):R.value.gradient.show?`url(#gradient_${n}_${M.value})`:t.color}function pr(e,t){return ar(e)?Q(e,t):e.color}function mr(e,t){return R.value.indexLabels.adaptColorToBackground?_e(pr(e,t)):R.value.indexLabels.color}function hr(e,t){let n=Z.value.find(t=>t.seriesIndex===e);return n&&ar(n)?Q(n,t):t.color}function gr(e){return ir(e)?`url(#temperature_grad_history_${e.seriesIndex}_${M.value})`:V.value.paths.useSerieColor?e.color:V.value.paths.stroke}function _r(e){return P.value===null||F.value===e?1:Math.min(1,R.value.unselectedOpacity)}d(()=>P.value!==null&&F.value!==null);let vr=S(!1);function yr(){N.value.length?N.value=[]:wr.value.forEach(e=>{N.value.push(e.seriesIndex)}),Tn(`selectLegend`,Z.value)}function br(e){N.value.includes(e)?N.value=N.value.filter(t=>t!==e):N.value.push(e),Tn(`selectLegend`,Z.value)}function xr(e){return Y.value.length?Y.value.find(t=>t.name===e)||(En.value&&console.warn(`VueUiHistoryPlot - Series name not found "${e}"`),null):(En.value&&console.warn(`VueUiHistoryPlot - There are no series to show.`),null)}function Sr(e){let t=xr(e);t!==null&&N.value.includes(t.seriesIndex)&&br(t.seriesIndex)}function Cr(e){let t=xr(e);t!==null&&(N.value.includes(t.seriesIndex)||br(t.seriesIndex))}let wr=d(()=>Y.value.map(e=>{let t=ir(e)?e.temperatureColors:null;return{...e,gradientColors:t,opacity:N.value.includes(e.seriesIndex)?.5:1,segregate:()=>br(e.seriesIndex),isSegregated:N.value.includes(e.seriesIndex),shape:t?`gradient`:`circle`}})),Tr=d(()=>({cy:`history-plot-div-legend`,backgroundColor:V.value.legend.backgroundColor,color:V.value.legend.color,fontSize:V.value.legend.fontSize,paddingBottom:12,fontWeight:V.value.legend.bold?`bold`:``}));function Er({datapoint:e,plotIndex:t,seriesIndex:n}){L.value.events.datapointClick&&L.value.events.datapointClick({datapoint:{...e,plotIndex:t,seriesIndex:n},seriesIndex:n}),Tn(`selectDatapoint`,e)}function Dr(e){dn.value=e,sn.value+=1}let Or=S(null);function kr({datapoint:e,plotIndex:t,seriesIndex:n}){L.value.events.datapointLeave&&L.value.events.datapointLeave({datapoint:{...e,plotIndex:t,seriesIndex:n},seriesIndex:n}),(Sn.value!==`keyboard`||F.value!==n||I.value!==t)&&(ln.value=!1,P.value=null)}function Ar(e,t){if(!W.value)return;let n=Z.value.find(t=>t.seriesIndex===e);if(!n)return;let r=n.plots[t];if(!r)return;let i=ye(r.x,r.y,W.value);i&&(xn.value=i)}function jr({datapoint:e,plotIndex:t,seriesIndex:n,triggerMode:r=`pointer`}){L.value.events.datapointEnter&&L.value.events.datapointEnter({datapoint:{...e,plotIndex:t,seriesIndex:n},seriesIndex:n}),F.value=n,I.value=t,Sn.value=r,vr.value=!0;let i=hr(n,e),a={...e,color:i};Or.value={datapoint:a,color:i,seriesIndex:n,plotIndex:t,config:L.value,series:Y.value},P.value=e;let o=V.value.tooltip.customFormat;if(fn.value=!1,te(o))try{let e=o({seriesIndex:n,datapoint:a,color:i,plotIndex:t,series:Y.value,config:L.value});typeof e==`string`&&(un.value=e,fn.value=!0)}catch{console.warn(`Custom format cannot be applied.`),fn.value=!1}if(!fn.value){let t=``;t+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;border-bottom:1px solid ${V.value.tooltip.borderColor};margin-bottom:3px;padding-bottom:6px;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${i}"/></svg><span>${e.seriesName}</span></div>`,t+=`<div>${e.label}</div>`,t+=`<div>${B.value.x.name.text||`x`}: ${c(B.value.x.labels.formatter,e.valueX,s({p:B.value.x.labels.prefix,v:e.valueX,s:B.value.x.labels.suffix,r:B.value.x.labels.rounding}))}</div>`,t+=`<div>${B.value.y.name.text||`y`}: ${c(B.value.y.labels.formatter,e.valueY,s({p:B.value.y.labels.prefix,v:e.valueY,s:B.value.y.labels.suffix,r:B.value.y.labels.rounding}))}</div>`,un.value=`<div>${t}</div>`}ln.value=!0,r===`keyboard`&&Ze(()=>{Ar(n,t)})}d(()=>({head:Z.value.map(e=>({name:e.name,color:e.color}))}));let $=d(()=>{let e=[L.value.table.columnNames.series,L.value.table.columnNames.datapoint,L.value.table.columnNames.x,L.value.table.columnNames.y];return{head:e,body:Z.value.flatMap(e=>e.plots.map(e=>[{color:e.color,name:e.seriesName},e.label,c(B.value.x.labels.formatter,e.valueX,s({p:B.value.x.labels.prefix,v:e.valueX,s:B.value.x.labels.suffix,r:B.value.x.labels.rounding})),c(B.value.y.labels.formatter,e.valueY,s({p:B.value.y.labels.prefix,v:e.valueY,s:B.value.y.labels.suffix,r:B.value.y.labels.rounding}))])),config:{th:{backgroundColor:L.value.table.th.backgroundColor,color:L.value.table.th.color,outline:L.value.table.th.outline},td:{backgroundColor:L.value.table.td.backgroundColor,color:L.value.table.td.color,outline:L.value.table.td.outline},breakpoint:L.value.table.responsiveBreakpoint},colNames:e}});function Mr(e=null){Ze(()=>{let t=[[L.value.table.columnNames.series],[L.value.table.columnNames.datapoint],[L.value.table.columnNames.x],[L.value.table.columnNames.y]],n=Z.value.flatMap(e=>e.plots.map(e=>[[e.seriesName],[e.label],[e.valueX],[e.valueY]])),r=[[V.value.title.text],[V.value.title.subtitle.text],t].concat(n),i=ee(r);e?e(i):he({csvContent:i,title:V.value.title.text||`vue-ui-history-plot`})})}let Nr=S(!1);function Pr(){Nr.value=!Nr.value}function Fr(){G.value.showTable=!G.value.showTable}function Ir(){G.value.showTooltip=!G.value.showTooltip}function Lr(){return Z.value}let Rr=Ue(k,()=>V.value.title.text),zr=d(()=>X.value.tickX),Br=d(()=>({start:0,end:X.value.tickX.length}));Ne({timeLabelsEls:yn,timeLabels:zr,slicer:Br,configRef:L,rotationPath:[`style`,`chart`,`axes`,`x`,`labels`,`rotation`],autoRotatePath:[`style`,`chart`,`axes`,`x`,`labels`,`autoRotate`,`enable`],isAutoSize:!1,width:Un,height:Wn,targetClass:`.vue-ui-history-plot-x-axis-scale`,rotation:B.value.x.labels.autoRotate.angle});let Vr=d(()=>n({config:L,style:V,mutableConfig:G,dialog:Zt,accordion:Kt,isFullscreen:dn,parent:k,maxWidth:800}));rt(()=>G.value.showTable,e=>t(e,L,hn));function Hr(){G.value.showTable=!1,gn.value&&gn.value.setTableIconState(!1)}let Ur=d(()=>V.value.backgroundColor),Wr=d(()=>V.value.legend),Gr=d(()=>V.value.title),{isCallbackImaging:Kr,isCallbackSvg:qr,generateSvg:Jr,onGenerateImage:Yr}=je({svg:W,title:Gr,legend:Wr,legendItems:wr,backgroundColor:Ur,getSvgCallback:()=>L.value.userOptions.callbacks.svg,generateImage:Bn});async function Xr(){if(Tn(`copyAlt`,{config:L.value,dataset:Z.value}),!L.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(L.value.userOptions.callbacks.altCopy({config:L.value,dataset:Z.value}))}let Zr=d(()=>({head:$.value.head,body:$.value.body.map(e=>[e[0]?.name||``,e[1],e[2],e[3]]),caption:L.value.a11y.translations.tableCaption,notice:L.value.a11y.translations.tableAvailable}));function Qr(e){return Z.value.findIndex(t=>t.seriesIndex===e)}function $r(){if(F.value!==null&&I.value!==null){let e=Z.value.find(e=>e.seriesIndex===F.value)?.plots?.[I.value];e&&kr({datapoint:e,plotIndex:I.value,seriesIndex:F.value})}F.value=null,I.value=null,Sn.value=`pointer`,ln.value=!1,P.value=null}function ei(){F.value=null,I.value=null,Cn.value=!0}function ti(){$r(),Cn.value=!1}function ni(e,t){if(!e?.plots?.length)return null;let n=e.plots.length;return(t%n+n)%n}function ri({seriesIndex:e,plotIndex:t,direction:n}){if(!Z.value.length)return null;let r=Qr(e);if(r===-1)return null;if(n===`up`||n===`down`){let e=Z.value[r];if(!e?.plots?.length)return null;let i=ni(e,t+(n===`up`?-1:1));return{seriesIndex:e.seriesIndex,plotIndex:i}}if(n===`left`||n===`right`){let e=((r+(n===`left`?-1:1))%Z.value.length+Z.value.length)%Z.value.length,i=Z.value[e];if(!i?.plots?.length)return null;let a=Math.min(t,i.plots.length-1);return{seriesIndex:i.seriesIndex,plotIndex:a}}return null}function ii(e){if(!W.value||Nr.value||document.activeElement!==W.value||!Z.value.length)return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`ArrowUp`,i=e.key===`ArrowDown`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;if(!t&&!n&&!r&&!i&&!a&&!o)return;if(e.preventDefault(),e.stopPropagation(),o){$r();return}if(a){if(F.value===null||I.value===null)return;let e=Z.value.find(e=>e.seriesIndex===F.value)?.plots?.[I.value];if(!e)return;Er({datapoint:e,plotIndex:I.value,seriesIndex:F.value});return}let s=null;if(F.value===null||I.value===null){let e=Z.value[0];if(!e?.plots?.length)return;s={seriesIndex:e.seriesIndex,plotIndex:0}}else r?s=ri({seriesIndex:F.value,plotIndex:I.value,direction:`up`}):i?s=ri({seriesIndex:F.value,plotIndex:I.value,direction:`down`}):t?s=ri({seriesIndex:F.value,plotIndex:I.value,direction:`left`}):n&&(s=ri({seriesIndex:F.value,plotIndex:I.value,direction:`right`}));if(!s)return;let ee=Z.value.find(e=>e.seriesIndex===s.seriesIndex)?.plots?.[s.plotIndex];ee&&jr({datapoint:ee,plotIndex:s.plotIndex,seriesIndex:s.seriesIndex,triggerMode:`keyboard`})}return Fe({getData:Lr,getImage:Rr,generatePdf:zn,generateCsv:Mr,generateImage:Bn,generateSvg:Jr,hideSeries:Cr,showSeries:Sr,toggleTable:Fr,toggleTooltip:Ir,toggleAnnotator:Pr,toggleFullscreen:Dr,copyAlt:Xr}),(e,t)=>(x(),m(`div`,{id:`history_plot_${M.value}`,ref_key:`historyPlotChart`,ref:k,class:v({"vue-data-ui-component":!0,"vue-ui-history-plot":!0,"vue-data-ui-wrapper-fullscreen":dn.value}),style:b(`background:${V.value.backgroundColor};color:${V.value.color};font-family:${L.value.style.fontFamily}; position: relative; ${L.value.responsive?`height: 100%`:``}`),onMouseenter:t[2]||=()=>E(Pn)(!0),onMouseleave:t[3]||=()=>E(Pn)(!1)},[h(`div`,{id:`chart-instructions-${M.value}`,class:`sr-only`},[h(`p`,null,T(L.value.a11y.translations.keyboardNavigation),1)],8,st),Zr.value.body.length?(x(),f(Be,{key:0,uid:M.value,head:Zr.value.head,body:Zr.value.body,caption:Zr.value.caption,notice:Zr.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):p(``,!0),w(e.$slots,`userConfig`,{},void 0,!0),L.value.userOptions.buttons.annotator?(x(),f(E(Jt),{key:1,svgRef:E(W),backgroundColor:V.value.backgroundColor,color:V.value.color,active:Nr.value,isCursorPointer:U.value,palette:L.value.userOptions.annotatorPalette,onClose:Pr},qe({_:2},[C(E(i),t=>({name:t,fn:D(n=>[w(e.$slots,t,y(_(E(r)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),Vn.value?(x(),m(`div`,{key:2,ref_key:`noTitle`,ref:cn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),V.value.title.text?(x(),m(`div`,{key:3,ref_key:`chartTitle`,ref:tn,class:`vue-ui-xy-title`,style:b(`font-family:${L.value.style.fontFamily}`)},[(x(),f(Pe,{key:`title_${nn.value}`,config:{title:{cy:`history-plot-div-title`,...V.value.title},subtitle:{cy:`history-plot-div-subtitle`,...V.value.title.subtitle}}},null,8,[`config`]))],4)):p(``,!0),h(`div`,{id:`legend-top-${M.value}`},null,8,ct),L.value.userOptions.show&&wn.value&&(E(Fn)||E(Nn))?(x(),f(E(Yt),{ref_key:`userOptionsRef`,ref:gn,key:`user_option_${sn.value}`,backgroundColor:V.value.backgroundColor,color:V.value.color,isPrinting:E(Ln),isImaging:E(Rn),uid:M.value,hasTooltip:V.value.tooltip.show&&L.value.userOptions.buttons.tooltip,hasPdf:L.value.userOptions.buttons.pdf,hasImg:L.value.userOptions.buttons.img,hasSvg:L.value.userOptions.buttons.svg,hasXls:L.value.userOptions.buttons.csv,hasTable:L.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:L.value.userOptions.buttons.fullscreen,hasAltCopy:L.value.userOptions.buttons.altCopy,isFullscreen:dn.value,chartElement:k.value,position:L.value.userOptions.position,isTooltip:G.value.showTooltip,titles:{...L.value.userOptions.buttonTitles},hasAnnotator:L.value.userOptions.buttons.annotator,isAnnotation:Nr.value,callbacks:L.value.userOptions.callbacks,printScale:L.value.userOptions.print.scale,tableDialog:L.value.table.useDialog,isCursorPointer:U.value,onToggleFullscreen:Dr,onGeneratePdf:E(zn),onGenerateCsv:Mr,onGenerateImage:E(Yr),onGenerateSvg:E(Jr),onToggleTable:Fr,onToggleTooltip:Ir,onToggleAnnotator:Pr,onCopyAlt:Xr,style:b({visibility:E(Fn)?E(Nn)?`visible`:`hidden`:`visible`})},qe({_:2},[C(E(a)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:D(n=>[w(e.$slots,t,y(_(E(o)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.isTooltip.titles.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):p(``,!0),h(`div`,lt,[(x(),m(`svg`,{ref_key:`svgRef`,ref:W,xmlns:E(ve),viewBox:`0 0 ${K.value.width<0?.1:K.value.width} ${K.value.height<0?.1:K.value.height}`,style:b(`max-width:100%;overflow:visible;background:transparent;color:${V.value.color}`),"aria-describedby":`chart-instructions-${M.value}`,tabindex:`0`,onFocus:ei,onBlur:ti,onKeydown:ii},[Ye(E(Xt)),e.$slots[`chart-background`]?(x(),m(`foreignObject`,{key:0,x:q.value.left,y:q.value.top,width:q.value.width<=0?10:q.value.width,height:q.value.height<=0?10:q.value.height,style:{pointerEvents:`none`}},[w(e.$slots,`chart-background`,{},void 0,!0)],8,dt)):p(``,!0),R.value.gradient.show||rr.value?(x(),m(`defs`,ft,[R.value.gradient.show?(x(!0),m(u,{key:0},C(Z.value,(e,t)=>(x(),f(Re,{t:`radial`,key:`gradient_${t}_${M.value}`,id:`gradient_${t}_${M.value}`,fy:`30%`,stops:[[`10%`,E(re)(e.color,R.value.gradient.intensity/100),1],[`90%`,E(oe)(e.color,.1),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128)):p(``,!0),(x(!0),m(u,null,C(Z.value,e=>(x(),m(u,{key:`temperature_grad_history_template_${e.seriesIndex}_${M.value}`},[R.value.gradient.show&&ar(e)?(x(!0),m(u,{key:0},C(e.plots,t=>(x(),f(Re,{t:`radial`,key:`temperature_plot_grad_history_${e.seriesIndex}_${t.id}_${M.value}`,id:dr(e,t),fy:`30%`,stops:[[`10%`,E(re)(Q(e,t),R.value.gradient.intensity/100),1],[`90%`,E(oe)(Q(e,t),.1),1],[`100%`,Q(e,t),1]]},null,8,[`id`,`stops`]))),128)):p(``,!0),ir(e)?(x(),m(`linearGradient`,{key:1,id:`temperature_grad_history_${e.seriesIndex}_${M.value}`,gradientUnits:`userSpaceOnUse`,x1:lr(e).x1,y1:lr(e).y1,x2:lr(e).x2,y2:lr(e).y2},[(x(!0),m(u,null,C(e.temperatureColors,(t,n)=>(x(),m(`stop`,{key:`temperature_grad_history_stop_${e.seriesIndex}_${n}_${M.value}`,"stop-color":t,offset:e.temperatureColors.length===1?`0%`:E(ge)(n,e.temperatureColors.length)},null,8,mt))),128))],8,pt)):p(``,!0)],64))),128))])):p(``,!0),z.value.verticalLines.show?(x(),m(`g`,ht,[(x(!0),m(u,null,C(X.value.tickX,e=>(x(),m(`line`,{x1:e.x,x2:e.x,y1:e.y1,y2:e.y2,stroke:z.value.verticalLines.stroke,"stroke-width":z.value.verticalLines.strokeWidth,"stroke-linecap":`round`},null,8,gt))),256))])):p(``,!0),B.value.y.labels.show?(x(),m(`g`,_t,[(x(!0),m(u,null,C(X.value.tickY,e=>(x(),m(`line`,{stroke:z.value.verticalLines.stroke,"stroke-width":z.value.verticalLines.strokeWidth,"stroke-linecap":`round`,x1:q.value.left-5,x2:q.value.left,y1:e.y,y2:e.y},null,8,vt))),256))])):p(``,!0),B.value.y.labels.show?(x(),m(`g`,{key:4,ref_key:`yAxisScales`,ref:bn},[(x(!0),m(u,null,C(X.value.tickY,e=>(x(),m(`text`,{x:q.value.left+B.value.y.labels.offsetX-4-R.value.radius,y:e.y+J.value.yAxisLabels/3,fill:B.value.y.labels.color,"font-size":J.value.yAxisLabels,"text-anchor":`end`},T(E(c)(B.value.y.labels.formatter,e.value,E(s)({p:B.value.y.labels.prefix,v:e.value,s:B.value.y.labels.suffix,r:B.value.y.labels.rounding}))),9,yt))),256))],512)):p(``,!0),B.value.y.name.text?(x(),m(`text`,{key:5,ref_key:`yAxisLabel`,ref:vn,transform:`translate(${J.value.yAxisName}, ${K.value.height/2+B.value.y.name.offsetY}), rotate(-90)`,"font-size":J.value.yAxisName,fill:B.value.y.name.color,"font-weight":B.value.y.name.bold?`bold`:`normal`,"text-anchor":`middle`},T(B.value.y.name.text),9,bt)):p(``,!0),z.value.horizontalLines.show?(x(),m(`g`,xt,[(x(!0),m(u,null,C(X.value.tickY,e=>(x(),m(`line`,{x1:e.x1,x2:e.x2,y1:e.y,y2:e.y,stroke:z.value.horizontalLines.stroke,"stroke-width":z.value.horizontalLines.strokeWidth,"stroke-linecap":`round`},null,8,St))),256))])):p(``,!0),B.value.x.labels.show?(x(),m(`g`,Ct,[(x(!0),m(u,null,C(X.value.tickX,e=>(x(),m(`line`,{stroke:z.value.verticalLines.stroke,"stroke-width":z.value.verticalLines.strokeWidth,"stroke-linecap":`round`,x1:e.x,x2:e.x,y1:q.value.bottom,y2:q.value.bottom+5},null,8,wt))),256))])):p(``,!0),B.value.x.labels.show?(x(),m(`g`,{key:8,ref_key:`xAxisScales`,ref:yn},[(x(!0),m(u,null,C(X.value.tickX,e=>(x(),m(`text`,{class:`vue-ui-history-plot-x-axis-scale`,transform:`translate(${e.x}, ${q.value.bottom+B.value.x.labels.offsetY+J.value.xAxisLabels+R.value.radius}), rotate(${B.value.x.labels.rotation})`,fill:B.value.x.labels.color,"font-size":J.value.xAxisLabels,"text-anchor":B.value.x.labels.rotation>0?`start`:B.value.x.labels.rotation<0?`end`:`middle`},T(E(c)(B.value.x.labels.formatter,e.value,E(s)({p:B.value.x.labels.prefix,v:e.value,s:B.value.x.labels.suffix,r:B.value.x.labels.rounding}))),9,Tt))),256))],512)):p(``,!0),B.value.x.name.text?(x(),m(`text`,{key:9,ref_key:`xAxisLabel`,ref:_n,x:K.value.width/2+B.value.x.name.offsetX,y:K.value.height,"font-size":J.value.xAxisName,fill:B.value.x.name.color,"font-weight":B.value.x.name.bold?`bold`:`normal`,"text-anchor":`middle`},T(B.value.x.name.text),9,Et)):p(``,!0),z.value.xAxis.show?(x(),m(`line`,{key:10,x1:q.value.left,x2:q.value.left+q.value.width,y1:q.value.bottom,y2:q.value.bottom,stroke:z.value.xAxis.stroke,"stroke-width":z.value.xAxis.strokeWidth,"stroke-linecap":`round`},null,8,Dt)):p(``,!0),z.value.yAxis.show?(x(),m(`line`,{key:11,x1:q.value.left,x2:q.value.left,y1:q.value.top,y2:q.value.bottom,stroke:z.value.yAxis.stroke,"stroke-width":z.value.yAxis.strokeWidth,"stroke-linecap":`round`},null,8,Ot)):p(``,!0),(x(!0),m(u,null,C(nr.value,e=>(x(),m(`g`,{key:`history_plot_serie_${e.seriesIndex}_${M.value}`},[V.value.paths.show?(x(),m(`g`,{key:0,style:b({opacity:_r(e.seriesIndex)})},[h(`path`,{class:v({"vue-data-ui-transition":E(H)}),d:e.path,stroke:V.value.backgroundColor,"stroke-width":V.value.paths.strokeWidth+4,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,10,kt),h(`path`,{class:v({"vue-data-ui-transition":E(H)}),d:e.path,stroke:gr(e),"stroke-width":V.value.paths.strokeWidth,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,10,At)],4)):p(``,!0),(x(!0),m(u,null,C(e.plots,e=>(x(),m(`circle`,{cx:e.x,cy:e.y,fill:V.value.backgroundColor,r:J.value.plots,stroke:`none`,class:v({"vue-data-ui-transition":E(H)})},null,10,jt))),256)),(x(!0),m(u,null,C(e.plots,t=>(x(),m(`circle`,{cx:t.x,cy:t.y,fill:fr(e,t,e.gradientIndex),r:J.value.plots,stroke:R.value.stroke,"stroke-width":R.value.strokeWidth,class:v({"vue-data-ui-transition":E(H)}),style:b({opacity:_r(e.seriesIndex)})},null,14,Mt))),256)),R.value.labels.show?(x(),m(`g`,Nt,[(x(!0),m(u,null,C(e.plots,(t,n)=>(x(),m(`g`,{key:`plab_${n}`},[String(t.label).includes(`
2
- `)?(x(),m(`text`,{key:1,class:v({"vue-data-ui-transition":E(H)}),transform:`translate(${t.x+R.value.labels.offsetX}, ${t.y+R.value.labels.offsetY+J.value.plots+J.value.labels})`,"font-size":J.value.labels,fill:R.value.labels.color,"font-weight":R.value.labels.bold?`bold`:`normal`,"text-anchor":`middle`,style:b({opacity:_r(e.seriesIndex)}),innerHTML:E(ae)({content:String(t.label),fontSize:J.value.labels,fill:R.value.labels.color,x:0,y:0})},null,14,Ft)):(x(),m(`text`,{key:0,class:v({"vue-data-ui-transition":E(H)}),transform:`translate(${t.x+R.value.labels.offsetX}, ${t.y+R.value.labels.offsetY+J.value.plots+J.value.labels})`,"font-size":J.value.labels,fill:R.value.labels.color,"font-weight":R.value.labels.bold?`bold`:`normal`,"text-anchor":`middle`,style:b({opacity:_r(e.seriesIndex)})},T(t.label),15,Pt))]))),128))])):p(``,!0),R.value.indexLabels.show?(x(),m(`g`,It,[(x(!0),m(u,null,C(e.plots,(t,n)=>(x(),m(`text`,{key:`lab_${n}`,class:v({"vue-data-ui-transition":E(H)}),transform:`translate(${t.x+R.value.indexLabels.offsetX}, ${t.y+R.value.indexLabels.offsetY+J.value.indexLabels/3})`,"font-size":J.value.indexLabels,"font-weight":R.value.indexLabels.bold?`bold`:`normal`,fill:mr(e,t),"text-anchor":`middle`,style:b({opacity:_r(e.seriesIndex)})},T(R.value.indexLabels.startAtZero?n:n+1),15,Lt))),128))])):p(``,!0)]))),128)),(x(!0),m(u,null,C(nr.value,e=>(x(),m(`g`,{key:`history_plot_trap_serie_${e.seriesIndex}_${M.value}`},[(x(!0),m(u,null,C(e.plots,(t,n)=>(x(),m(`circle`,{cx:t.x,cy:t.y,fill:`transparent`,r:J.value.plots,stroke:`none`,onMouseenter:r=>jr({datapoint:t,plotIndex:n,seriesIndex:e.seriesIndex,triggerMode:`pointer`}),onMouseleave:r=>kr({datapoint:t,plotIndex:n,seriesIndex:e.seriesIndex}),onClick:r=>Er({datapoint:t,plotIndex:n,seriesIndex:e.seriesIndex})},null,40,Rt))),256))]))),128)),w(e.$slots,`svg`,{svg:{...K.value,drawingArea:q.value,isPrintingImg:E(Ln)||E(Rn)||E(Kr),isPrintingSvg:E(qr)}},void 0,!0)],44,ut)),e.$slots.hint?(x(),m(`div`,zt,[w(e.$slots,`hint`,y(_({hint:L.value.a11y.translations.keyboardNavigation,isVisible:Cn.value})),void 0,!0)])):p(``,!0)]),e.$slots.watermark?(x(),m(`div`,Bt,[w(e.$slots,`watermark`,y(_({isPrinting:E(Ln)||E(Rn)||E(Kr)||E(qr)})),void 0,!0)])):p(``,!0),h(`div`,{id:`legend-bottom-${M.value}`},null,8,Vt),mn.value&&(V.value.legend.show||e.$slots.legend)?(x(),f(Ke,{key:6,to:V.value.legend.position===`top`?`#legend-top-${M.value}`:`#legend-bottom-${M.value}`},[h(`div`,{ref_key:`chartLegend`,ref:rn},[w(e.$slots,`legend`,{legend:wr.value},()=>[V.value.legend.show&&wn.value?(x(),f(We,{key:`legend_${an.value}`,legendSet:wr.value,config:Tr.value,isCursorPointer:U.value,onClickMarker:t[0]||=({legend:e})=>{br(e.seriesIndex)}},{item:D(({legend:e,index:t})=>[h(`div`,{onClick:t=>e.segregate(),style:b(`opacity:${N.value.includes(e.seriesIndex)?.5:1}`)},T(e.name),13,Ht)]),legendToggle:D(()=>[wr.value.length>2&&V.value.legend.selectAllToggle.show&&!E(An)?(x(),f(ze,{key:0,backgroundColor:V.value.legend.selectAllToggle.backgroundColor,color:V.value.legend.selectAllToggle.color,fontSize:V.value.legend.fontSize,checked:N.value.length>0,isCursorPointer:U.value,onToggle:yr},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):p(``,!0)]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):p(``,!0)],!0)],512)],8,[`to`])):p(``,!0),e.$slots.source?(x(),m(`div`,{key:7,ref_key:`source`,ref:pn,dir:`auto`},[w(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),Ye(E(Wt),{teleportTo:V.value.tooltip.teleportTo,show:G.value.showTooltip&&ln.value,backgroundColor:V.value.tooltip.backgroundColor,color:V.value.tooltip.color,fontSize:V.value.tooltip.fontSize,borderRadius:V.value.tooltip.borderRadius,borderColor:V.value.tooltip.borderColor,borderWidth:V.value.tooltip.borderWidth,backgroundOpacity:V.value.tooltip.backgroundOpacity,position:V.value.tooltip.position,offsetX:V.value.tooltip.offsetX,offsetY:V.value.tooltip.offsetY,parent:k.value,content:un.value,isCustom:fn.value,isFullscreen:dn.value,smooth:V.value.tooltip.smooth,backdropFilter:V.value.tooltip.backdropFilter,smoothForce:V.value.tooltip.smoothForce,smoothSnapThreshold:V.value.tooltip.smoothSnapThreshold,isA11yMode:Sn.value===`keyboard`,a11yPosition:xn.value},{"tooltip-before":D(()=>[w(e.$slots,`tooltip-before`,y(_({...Or.value})),void 0,!0)]),tooltip:D(()=>[w(e.$slots,`tooltip`,y(_({...Or.value})),void 0,!0)]),"tooltip-after":D(()=>[w(e.$slots,`tooltip-after`,y(_({...Or.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`fontSize`,`borderRadius`,`borderColor`,`borderWidth`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isCustom`,`isFullscreen`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),wn.value&&L.value.userOptions.buttons.table?(x(),f(et(Vr.value.component),Xe({key:8},Vr.value.props,{ref_key:`tableUnit`,ref:hn,onClose:Hr}),qe({content:D(()=>[(x(),f(E(qt),{key:`table_${on.value}`,colNames:$.value.colNames,head:$.value.head,body:$.value.body,config:$.value.config,title:L.value.table.useDialog?``:Vr.value.title,withCloseButton:!L.value.table.useDialog,isCursorPointer:U.value,onClose:Hr},{th:D(({th:e})=>[h(`div`,Ut,T(e),1)]),td:D(({td:e})=>[Je(T(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[L.value.table.useDialog?{name:`title`,fn:D(()=>[Je(T(Vr.value.title),1)]),key:`0`}:void 0,L.value.table.useDialog?{name:`actions`,fn:D(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[1]||=e=>Mr(L.value.userOptions.callbacks.csv),style:b({cursor:U.value?`pointer`:`default`})},[Ye(E(Gt),{name:`fileCsv`,stroke:Vr.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):p(``,!0),w(e.$slots,`skeleton`,{},()=>[E(An)?(x(),f(Oe,{key:0})):p(``,!0)],!0)],46,ot))}},[[`__scopeId`,`data-v-967423bb`]]);export{at as n,Wt as t};
@@ -1,4 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./tableIntegration-CNoJ1CIY.js";import{n as r,t as i}from"./annotationSlots-BRR85CqJ.js";import{n as a,t as o}from"./userOptionsSlots-DYuo-E5m.js";import{$ as s,D as c,Dt as ee,Ht as l,J as te,Jt as ne,S as re,X as ie,Yt as ae,Zt as oe,at as se,b as u,i as ce,in as le,nn as ue,nt as de,pt as fe,t as pe,tn as me,vt as he,w as ge,wt as _e,zt as ve}from"./lib-zDxoqrgo.js";import{n as ye,t as be}from"./useHints-BH9r_0Vd.js";import{t as xe}from"./useConfig-CKdzPrcf.js";import{t as Se}from"./usePrinter-CnyKPIFM.js";import{n as Ce,t as we}from"./BaseScanner-8NdoBs7B.js";import{t as Te}from"./useNestedProp-CT9phgWx.js";import{t as Ee}from"./useThemeCheck-BKNRbGeC.js";import{t as De}from"./useChartExport-DtPNpc9M.js";import{t as Oe}from"./useTransitions-DfSHzsdz.js";import{n as ke}from"./Title-BRAjxtjG.js";import{t as Ae}from"./Shape-tkp65OcG.js";import{t as je}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{l as Me,t as Ne}from"./useResponsive-D2CPcpda.js";import{t as Pe}from"./DefGrad-DKMq1REY.js";import{t as Fe}from"./vue-ui-accordion-Dy5OVFKr.js";import{t as Ie}from"./BaseLegendToggle-Dn_tNvn4.js";import{t as Le}from"./A11yDataTable-DWNlWXzs.js";import{t as Re}from"./useUserOptionState-CXlFnwPv.js";import{t as ze}from"./useChartAccessibility-DOMuYJfm.js";import{t as Be}from"./useTableResponsive-uSz_qZOB.js";import{t as Ve}from"./chartImage-NwZO-elv.js";import{t as He}from"./Legend-DokTll4u.js";import{t as Ue}from"./vue_ui_horizontal_bar-C4ulIxeT.js";import{Fragment as d,computed as f,createBlock as p,createCommentVNode as m,createElementBlock as h,createElementVNode as g,createSlots as We,createTextVNode as Ge,createVNode as Ke,defineAsyncComponent as qe,guardReactiveProps as Je,mergeProps as Ye,nextTick as Xe,normalizeClass as _,normalizeProps as Ze,normalizeStyle as v,onBeforeUnmount as Qe,onMounted as $e,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as et,toDisplayString as C,toRefs as tt,unref as w,useCssVars as nt,useSlots as rt,watch as it,withCtx as T,withKeys as at}from"vue";var ot=/* @__PURE__ */ e({default:()=>Jt}),st=[`id`],ct=[`id`],lt=[`onClick`],ut={style:{position:`relative`}},dt=[`xmlns`,`viewBox`,`aria-describedby`],ft=[`width`,`height`],pt={key:1},mt=[`y`,`width`,`height`,`fill`,`rx`],ht=[`x`,`y`,`width`,`height`,`fill`,`rx`],gt=[`x`,`y`,`width`,`height`,`fill`,`rx`,`stroke`,`stroke-width`],_t=[`x`,`y`,`width`,`height`,`fill`,`rx`,`stroke`,`stroke-width`],vt=[`stroke`,`stroke-width`,`d`],yt=[`stroke`,`stroke-width`,`d`],bt=[`y`,`height`,`width`,`fill`],xt=[`transform`,`font-size`,`fill`,`font-weight`,`innerHTML`],St=[`transform`,`font-size`,`fill`,`font-weight`],Ct=[`transform`,`font-size`,`font-weight`,`innerHTML`],wt=[`transform`,`font-size`,`fill`,`font-weight`,`innerHTML`],Tt=[`transform`,`text-anchor`,`font-size`,`fill`,`font-weight`],Et=[`y`,`width`,`height`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],Dt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Ot={key:7,class:`vue-data-ui-watermark`},kt=[`onClick`],At={style:`width:100%;padding-top: 36px;position:relative`},jt={class:`vue-ui-data-table`},Mt={key:0},Nt={style:{width:`100%`}},Pt=[`data-cell`],Ft={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},It=[`data-cell`],Lt={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Rt=[`data-cell`],zt={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Bt=[`data-cell`],Vt={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Ht=[`data-cell`],Ut={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Wt=[`data-cell`],Gt={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Kt=[`data-cell`],qt={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Jt=/*#__PURE__*/ je({__name:`vue-ui-horizontal-bar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`copyAlt`,`selectDatapoint`],setup(e,{expose:je,emit:ot}){nt(e=>({v53d06ad8:e.tdo}));let Jt=qe(()=>import(`./Tooltip-BUXB0i6z.js`)),Yt=qe(()=>import(`./BaseIcon-Cz30ODFA.js`).then(e=>e.n)),Xt=qe(()=>import(`./PenAndPaper-DvJJaeU2.js`).then(e=>e.t)),Zt=qe(()=>import(`./UserOptions-D65t74CM.js`).then(e=>e.n)),Qt=qe(()=>import(`./PackageVersion-D6pKL176.js`).then(e=>e.t)),$t=qe(()=>import(`./BaseDraggableDialog-T1gEsQid.js`).then(e=>e.n)),{vue_ui_vertical_bar:en}=xe(),{isThemeValid:tn,warnInvalidTheme:nn}=Ee(),rn=rt(),E=e,an=f({get(){return!!E.dataset&&E.dataset.length},set(e){return e}}),D=b(ie()),on=b(!1),sn=b(``),cn=b(null),ln=b(0),O=b(null),un=b(null),dn=b(null),fn=b(null),pn=b(null),mn=b(0),hn=b(0),gn=b(null),_n=b(null),vn=b(null),yn=b(null),bn=b(null),k=b([]),xn=b({none:0,asc:1,desc:2}),Sn=b(0),Cn=b(0),wn=null,Tn=null,A=b(null),En=b({x:0,y:0}),Dn=b(`pointer`),On=ot,j=b(zn()),M=f(()=>j.value.style.chart.layout.bars),N=f(()=>j.value.style.chart.layout),P=f(()=>j.value.style.chart.tooltip),F=f(()=>j.value.style.chart);ye({config:()=>j.value,dataset:()=>E.dataset,component:`VueUiHorizontalBar`,rules:[be.emptyArray,{test:e=>e.length>50||e.some(e=>e.children&&e.children.length>50),message:[`👀 There are > 50 series / bars, which will probably force users to scroll. Consider:`,``,`▶️ Grouping small values into an "Other" category.`,``,`▶️ Using filters, or several instances of the component with subsets of related series.`]}]});let{transitionEnabled:I}=Oe({config:()=>j.value.transitions,dataset:()=>E.dataset}),kn=f(()=>j.value.userOptions.useCursorPointer),An=f(()=>E.config?.skeletonDataset??[{name:``,value:6,color:`#d9d9d9`},{name:``,value:5,color:`#d9d9d9`},{name:``,value:4,color:`#d9d9d9`},{name:``,value:3,color:`#d9d9d9`},{name:``,value:2,color:`#d9d9d9`},{name:``,value:1,color:`#d9d9d9`}]),jn=f(()=>le({defaultConfig:{useCssAnimation:!1,userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{bars:{offsetX:110,dataLabels:{color:`transparent`,value:{prefix:``,suffix:``,formatter:null}},nameLabels:{color:`transparent`}},separators:{color:`#7A7A7A`}},legend:{show:!0,backgroundColor:`transparent`,color:`transparent`,prefix:``,suffix:``,formatter:null},title:{color:`#1A1A1A`,subtitle:{color:`#5A5A5A`}}}}},userConfig:j.value.skeletonConfig??{}})),{loading:Mn,FINAL_DATASET:Nn,manualLoading:Pn}=Ce({...tt(E),FINAL_CONFIG:j,prepareConfig:zn,callback:()=>{Promise.resolve().then(async()=>{V.value.showTable=j.value.table.show,Qn()})},skeletonDataset:An.value,skeletonConfig:le({defaultConfig:j.value,userConfig:jn.value})}),{userOptionsVisible:Fn,setUserOptionsVisibility:In,keepUserOptionState:Ln}=Re({config:j.value}),{svgRef:Rn}=ze({config:F.value.title});function zn(){let e=Te({userConfig:E.config,defaultConfig:en}),t={},n=e.theme;if(n){if(!tn.value(e))nn(e),t=e;else{let r=Te({userConfig:Ue[n]||E.config,defaultConfig:e});t={...Te({userConfig:E.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:ue[n]||l}}}else t=e;return E.config&&_e(E.config,`events.datapointEnter`)?t.events.datapointEnter=E.config.events.datapointEnter:t.events.datapointEnter=null,E.config&&_e(E.config,`events.datapointLeave`)?t.events.datapointLeave=E.config.events.datapointLeave:t.events.datapointLeave=null,E.config&&_e(E.config,`events.datapointClick`)?t.events.datapointClick=E.config.events.datapointClick:t.events.datapointClick=null,t}let L=b(F.value.width),R=b(F.value.height),z=b(M.value.gap),Bn=oe(E.config);it(()=>E.config,(e,t)=>{let n=oe(e),r=n!==Bn;Bn=n;let i=zn();if(!r){j.value.style.chart.tooltip=i.style.chart.tooltip,V.value.showTooltip=j.value.style.chart.tooltip.show;return}Mn.value||(j.value=i),Fn.value=!j.value.userOptions.showOnChartHover,mn.value+=1,hn.value+=1,V.value.showTable=j.value.table.show,Sn.value=xn.value[M.value.sort]??0,V.value.showTooltip=P.value.show,L.value=F.value.width,R.value=F.value.height,z.value=M.value.gap},{deep:!0}),it(()=>E.dataset,e=>{Array.isArray(e)&&e.length>0&&(Pn.value=!1)},{deep:!0});let{isPrinting:Vn,isImaging:Hn,generatePdf:Un,generateImage:Wn}=Se({elementId:`vue-ui-vertical-bar_${D.value}`,fileName:F.value.title.text||`vue-ui-vertical-bar`,options:j.value.userOptions.print}),Gn=f(()=>j.value.userOptions.show&&!F.value.title.text),Kn=f(()=>ge(j.value.customPalette)),qn=b(null),Jn=f(()=>j.value.table.responsiveBreakpoint),Yn=f(()=>j.value.debug),Xn=b(0),B=b(null),Zn=b(null);function Qn(){if(O.value&&(ve(E.dataset)&&(se({componentName:`VueUiVerticalBar`,type:`dataset`,debug:Yn.value}),an.value=!1,Pn.value=!0),ve(E.dataset)||(Pn.value=j.value.loading),j.value.responsive)){let e=Me(()=>{let{width:e,height:t}=Ne({chart:O.value,title:F.value.title.text?un.value:null,legend:F.value.legend.show?dn.value:null,source:fn.value,noTitle:pn.value});Xn.value=t/3,requestAnimationFrame(async()=>{R.value=t,L.value=e})});B.value&&(Zn.value&&B.value.unobserve(Zn.value),B.value.disconnect()),B.value=new ResizeObserver(e),Xe(()=>{Zn.value=O.value?.parentNode,Zn.value&&B.value.observe(Zn.value)})}}Qe(()=>{B.value&&(Zn.value&&B.value.unobserve(Zn.value),B.value.disconnect())});let V=b({showTable:j.value.table.show,showTooltip:P.value.show}),$n=f(()=>Sn.value===0),er=f(()=>Sn.value===2),H=f(()=>(Nn.value.forEach((e,t)=>{!e.value&&!e.children&&se({componentName:`VueUiVerticalBar`,type:`datasetAttributeEmpty`,property:`value (index ${t})`,debug:Yn.value}),e.children&&(ve(e.children)?se({componentName:`VueUiVerticalBar`,type:`datasetAttributeEmpty`,property:`children (index ${t})`,debug:Yn.value}):e.children.forEach((e,t)=>{[null,void 0].includes(e.name)&&se({componentName:`VueUiVerticalBar`,type:`datasetSerieAttribute`,property:`name`,key:`children`,index:t,debug:Yn.value})}))}),Nn.value.map((e,t)=>{let n=`vertical_parent_${t}_${D.value}`,r=e.children&&e.children.length>0,i=u(e.value?e.value:r?e.children.map(e=>e.value||0).reduce((e,t)=>e+t,0):0),a=i>=0?1:-1;return{...e,id:n,absoluteIndex:t,shape:`square`,opacity:k.value.includes(n)?.5:1,value:Math.abs(i),sign:a,hasChildren:r,isChild:!1,segregate:()=>X(n),isSegregated:k.value.includes(n),color:re(e.color)||Kn.value[t]||l[t]||l[t%l.length],children:!e.children||!e.children.length?[]:e.children.toSorted($n.value?()=>0:(e,t)=>er.value?t.value-e.value:e.value-t.value).map((r,o)=>({...r,value:u(Math.abs(r.value)),absoluteIndex:t,sign:r.value>=0?1:-1,isChild:!0,parentId:n,parentName:e.name,parentValue:i,parentSign:a,id:`vertical_child_${t}_${o}_${D.value}`,childIndex:o,color:re(r.color)||re(e.color)||Kn.value[t]||l[t]||l[t%l.length]})).map((t,n)=>({...t,isFirstChild:n===0,isLastChild:n===e.children.length-1}))}}).toSorted($n.value?()=>0:(e,t)=>er.value?t.value-e.value:e.value-t.value))),U=f(()=>H.value.filter(e=>!k.value.includes(e.id))),W=f(()=>U.value.flatMap(e=>e.hasChildren?e.children:e)),tr=f(()=>H.value.flatMap(e=>e.hasChildren?e.children:e)),nr=f(()=>U.value.flatMap(e=>e.children&&e.children.length>0?e.children.length:1).reduce((e,t)=>e+t,0)),rr=f(()=>({cy:`vertical-bar-div-legend`,backgroundColor:F.value.legend.backgroundColor,color:F.value.legend.color,fontSize:F.value.legend.fontSize,paddingBottom:12,fontWeight:F.value.legend.bold?`bold`:``})),G=f(()=>M.value.parentLabels.show?M.value.parentLabels.fontSize*3+M.value.parentLabels.paddingBottom:0),K=f(()=>{let e=[],t=0;return W.value.forEach((n,r)=>{n.isChild&&n.childIndex===0&&M.value.parentLabels.show&&(t+=1),e[r]=t}),e}),q=f(()=>{let e=Math.max(0,...K.value)*G.value;return(R.value-24-(nr.value-1)*z.value-e)/nr.value}),J=f(()=>({width:L.value,height:R.value,padding:{top:12,left:128+M.value.offsetX,right:64+M.value.paddingRight,bottom:12}})),ir=b(0);function ar(){Xe(()=>{if(!bn.value){ir.value=0;return}let e=Array.from(bn.value.querySelectorAll(`text`)).reduce((e,t)=>{let n=t.getBBox?.().width??t.getComputedTextLength();return n>e?n:e},0);ir.value=e+12})}it(()=>[W.value,L.value,R.value,M.value.nameLabels,M.value.offsetX],()=>ar(),{deep:!0}),$e(()=>{ar()});function or(){return typeof document>`u`?null:(wn||(wn=document.createElement(`canvas`),Tn=wn.getContext(`2d`)),Tn)}function sr(e){let t=String(e??``),n=M.value,r=n.dataLabels.fontSize,i=n.dataLabels.bold?700:400,a=j.value.style.fontFamily,o=or();return o?(o.font=`${i} ${r}px ${a}`,o.measureText(t).width):t.length*r*.6}function cr(){let e=U.value.flatMap(e=>e.children&&e.children.length?e.children.map(e=>Math.abs(e.value)):Math.abs(e.value));return e.length?Math.max(...e):0}let lr=f(()=>{Cn.value;let e=M.value,t=ir.value+Math.abs(e.nameLabels.offsetX)+e.offsetX,n=J.value.width-J.value.padding.right,r=Math.max(0,n-t-e.offsetX),i=J.value.width-40,a=cr(),o=W.value.map((e,t)=>({serie:e,textWidth:sr(jr(e.value,e,t,e.sign))}));if(!o.length||r<=0)return{left:0,right:0};if(!o.some(({serie:e})=>e.sign===-1)){let n=o.reduce((n,{serie:o,textWidth:s})=>{let c=a?Math.abs(o.value)/a:0;if(c<=0||s<=0)return n;let ee=(t+r*c+3+e.dataLabels.offsetX+s-i)/c;return Math.max(n,ee)},0);return{left:0,right:Math.ceil(Math.min(r,Math.max(0,n)))}}let s=t+r/2,c=-1/0,ee=1/0;o.forEach(({serie:t,textWidth:n})=>{if(t.sign===-1){let t=s+12+e.dataLabels.offsetX+n;ee=Math.min(ee,i-t);return}let r=s-12-e.dataLabels.offsetX-n;c=Math.max(c,40-r)});let l=0;l=c>ee?(c+ee)/2:Math.min(ee,Math.max(c,0));let te=l*2;return te>=0?{left:Math.ceil(Math.min(r,te)),right:0}:{left:0,right:Math.ceil(Math.min(r,-te))}}),ur=f(()=>lr.value.right),dr=f(()=>lr.value.left);function fr(){Cn.value+=1}$e(()=>{typeof document<`u`&&document.fonts&&(document.fonts.ready.then(fr),document.fonts.addEventListener?.(`loadingdone`,fr))}),Qe(()=>{typeof document<`u`&&document.fonts&&document.fonts.removeEventListener?.(`loadingdone`,fr),wn=null,Tn=null});let Y=f(()=>{let e=ir.value+Math.abs(M.value.nameLabels.offsetX)+dr.value+M.value.offsetX,t=J.value.width-J.value.padding.right,n=Math.max(0,t-e-ur.value-M.value.offsetX);return{top:J.value.padding.top,bottom:J.value.padding.top+J.value.height,left:e,right:t,width:n,fullHeight:J.value.padding.top+J.value.padding.bottom+J.value.height}});function pr(){k.value.length?k.value=[]:H.value.forEach(e=>{k.value.push(e.id)}),On(`selectLegend`,U.value)}async function X(e){if(k.value.includes(e))k.value=k.value.filter(t=>t!==e);else{if(k.value.length===H.value.length-1)return;k.value.push(e)}On(`selectLegend`,U.value)}function mr(e){return H.value.length?H.value.find(t=>t.name===e)||(Yn.value&&console.warn(`VueUiHorizontalBar - Series name not found "${e}"`),null):(Yn.value&&console.warn(`VueUiHorizontalBar - There are no series to show.`),null)}function hr(e){let t=mr(e);t!==null&&k.value.includes(t.id)&&X(t.id)}function gr(e){let t=mr(e);t!==null&&(k.value.includes(t.id)||X(t.id))}let Z=f(()=>U.value.map(e=>Math.abs(e.value)).reduce((e,t)=>e+t,0));function _r(e,t=!1,n=0){return t?s({v:u(Math.abs(e)/Z.value*100),s:`%`,r:n}):Math.abs(e)/Z.value}let vr=f(()=>W.value.map(e=>e.sign).includes(-1)),yr=f(()=>Math.max(...U.value.flatMap(e=>e.children&&e.children.length?Math.max(...e.children.map(e=>e.value)):e.value)));function Q(e){let t=e/yr.value;return u(Y.value.width/(vr.value?2:1)*t)}function br(e){return Q(e)+Y.value.left}function xr(e,t){let n=U.value.find(t=>t.id===e.parentId);return{y:Y.value.top+(z.value+q.value)*t+K.value[t]*G.value-G.value+M.value.parentLabels.fontSize,name:n.name,value:[void 0,NaN,null].includes(n.value)?``:n.sign===1?n.value:-n.value,percentageToTotal:isNaN(n.value/Z.value)?``:_r(n.value,!0,M.value.dataLabels.percentage.roundingPercentage),sign:n.sign}}function Sr(){return U.value}function Cr(e,t){return xr(e,t).name}function wr(e,t){let n=xr(e,t);return jr(n.value,n,t,e.parentSign||e.sign)}let Tr=b(null),Er=b(null);function Dr({datapoint:e,seriesIndex:t}){On(`selectDatapoint`,e),j.value.events.datapointClick&&j.value.events.datapointClick({datapoint:e,seriesIndex:t})}function Or({datapoint:e,seriesIndex:t}){j.value.events.datapointLeave&&j.value.events.datapointLeave({datapoint:e,seriesIndex:t}),cn.value=null,on.value=!1,Tr.value=null,A.value===t&&(A.value=null)}function kr(e,t,n=`pointer`){Dn.value=n,j.value.events.datapointEnter&&j.value.events.datapointEnter({datpoint:e,seriesIndex:t}),A.value=t,cn.value=e,Er.value={datapoint:e,seriesIndex:t,series:H.value,config:j.value},on.value=!0,Tr.value=e.id;let r=``,i=e.isChild?e.parentName:e.name,a=e.isChild?e.name:``,o=P.value.customFormat;ee(o)&&fe(()=>o({datapoint:e,series:H.value,config:j.value,seriesIndex:t}))?sn.value=o({datapoint:e,series:H.value,config:j.value,seriesIndex:t}):(r+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${P.value.borderColor};padding-bottom:6px;margin-bottom:3px;text-align:left;">
2
- <div style="display:flex;align-items:center;gap:4px;"><svg viewBox="0 0 60 60" height="14" width="14"><rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="${e.color}"/>${rn.pattern?`<rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="url(#pattern_${D.value}_${e.absoluteIndex})"/>`:``}</svg> ${i}</div>
3
- ${a?`<div>${a}</div>`:``}
4
- </div>`,P.value.showValue&&(r+=`<div>${j.value.translations.value}: <b>${ce(M.value.dataLabels.value.formatter,e.sign===1?e.value:-e.value,s({p:P.value.prefix,v:e.sign===1?e.value:-e.value,s:P.value.suffix,r:P.value.roundingValue}),{datapoint:e,seriesIndex:t})}</b></div>`),P.value.showPercentage&&(r+=`<div>${j.value.translations.percentageToTotal} : <b>${s({v:Math.abs(e.value)/Z.value*100,s:`%`,r:P.value.roundingPercentage})}</b></div>`,e.isChild&&(r+=`<div>${j.value.translations.percentageToSerie}: <b>${s({v:Math.abs(e.value)/Math.abs(e.parentValue)*100,s:`%`,r:P.value.roundingPercentage})}</b></div>`)),sn.value=`<div style="text-align:left">${r}</div>`)}function Ar({legend:e,index:t}){let n=F.value.legend;return n.showValue?`${e.name}: ${ce(M.value.dataLabels.value.formatter,e.value,s({p:n.prefix,v:e.value,s:n.suffix,r:n.roundingValue}),{datapoint:e,seriesIndex:t})}`:e.name}function jr(e,t,n,r){if(!M.value.dataLabels.value.show)return``;let i=ce(M.value.dataLabels.value.formatter,u(r===-1&&e>=0?-e:e),s({p:M.value.dataLabels.value.prefix,v:u(r===-1&&e>=0?-e:e),s:M.value.dataLabels.value.suffix,r:M.value.dataLabels.value.roundingValue}),{datapoint:t,seriesIndex:n}),a=`(${_r(e,!0,M.value.dataLabels.percentage.roundingPercentage)})`;return`${i}${M.value.dataLabels.percentage.show?` ${a}`:``}`}let $=f(()=>({head:[j.value.translations.parentName,j.value.translations.value,j.value.translations.percentageToTotal,j.value.translations.childName,j.value.translations.value,j.value.translations.percentageToSerie,j.value.translations.percentageToTotal],body:W.value.map(e=>e.isChild?e.isFirstChild?{color:e.color,parentName:e.parentName,parentValue:e.parentValue,percentageToTotal:e.parentValue/Z.value,childName:e.name,childValue:e.sign===1?e.value:-e.value,childPercentageToParent:Math.abs(e.value)/Math.abs(e.parentValue),childPercentageToTotal:Math.abs(e.value)/Z.value}:{color:``,parentName:``,parentValue:``,percentageToTotal:``,childName:e.name,childValue:e.sign===1?e.value:-e.value,childPercentageToParent:Math.abs(e.value)/Math.abs(e.parentValue),childPercentageToTotal:Math.abs(e.value)/Z.value}:{color:e.color,parentName:e.name,parentValue:e.sign===1?e.value:-e.value,percentageToTotal:Math.abs(e.value)/Z.value,childName:``,childValue:``,childPercentageToParent:``,childPercentageToTotal:``})}));function Mr(e=null){let t=[[F.value.title.text],[F.value.title.subtitle.text],[``]],n=$.value.head,r=$.value.body.map(e=>[e.parentName,e.parentValue,e.percentageToTotal,e.childName,e.childValue,e.childPercentageToParent,e.childPercentageToTotal]),i=t.concat([n]).concat(r),a=c(i);e?e(a):de({csvContent:a,title:F.value.title.text||`vue-ui-vertical-bar`})}let Nr=b(!1);function Pr(e){Nr.value=e,ln.value+=1}function Fr(){V.value.showTable=!V.value.showTable}$e(()=>{[`none`,`asc`,`desc`].includes(M.value.sort)||se({componentName:`VueUiVerticalBar`,type:`attributeWrongValue`,property:`style.chart.layout.bars.sort`,key:M.value.sort}),Sn.value=xn.value[M.value.sort]??0});function Ir(){Sn.value+=1,Sn.value>2&&(Sn.value=0)}function Lr(){Ir()}function Rr(){V.value.showTooltip=!V.value.showTooltip}let zr=b(!1);function Br(){zr.value=!zr.value}let Vr=Ve(O,()=>F.value.title.text),Hr=f(()=>n({config:j,style:F,mutableConfig:V,dialog:$t,accordion:Fe,isFullscreen:Nr,parent:O,maxWidth:800,isCursorPointer:kn}));it(()=>V.value.showTable,e=>t(e,j,_n));let{isResponsive:Ur}=Be(qn,Jn);function Wr(){V.value.showTable=!1,vn.value&&vn.value.setTableIconState(!1)}let Gr=f(()=>H.value.map((e,t)=>({...e,shape:`square`,display:`${e.name}: ${ce(M.value.dataLabels.value.formatter,e.value,s({p:F.value.legend.prefix,v:e.value,s:F.value.legend.suffix,r:F.value.legend.roundingValue}),{datapoint:e,seriesIndex:t})}`}))),Kr=f(()=>F.value.backgroundColor),qr=f(()=>F.value.legend),Jr=f(()=>F.value.title),Yr=f(()=>Gr.value.map(e=>({...e,name:e.display}))),{isCallbackImaging:Xr,isCallbackSvg:Zr,generateSvg:Qr,onGenerateImage:$r}=De({svg:Rn,title:Jr,legend:qr,legendItems:Yr,backgroundColor:Kr,getSvgCallback:()=>j.value.userOptions.callbacks.svg,generateImage:Wn});function ei(){console.warn(`[autoSize]: this legacy method can be safely removed as it has no impact.`)}async function ti(){if(On(`copyAlt`,{config:j.value,dataset:U.value}),!j.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(j.value.userOptions.callbacks.altCopy({config:j.value,dataset:U.value}))}let ni=b(!1);function ri(){A.value=null,ni.value=!0}function ii(){A.value=null,on.value=!1,ni.value=!1}function ai(){if(A.value===null)return;let e=W.value[A.value];e&&Or({datapoint:e,seriesIndex:A.value}),A.value=null,Dn.value=`pointer`}function oi(e){if(!Rn.value||zr.value||document.activeElement!==Rn.value)return;let t=e.key===`ArrowRight`||e.key===`ArrowDown`,n=e.key===`ArrowLeft`||e.key===`ArrowUp`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;let a=W.value.length;if(!a)return;if(e.preventDefault(),e.stopPropagation(),i){ai();return}if(r){if(A.value===null)return;let e=W.value[A.value];if(!e)return;Dr({datapoint:e,seriesIndex:A.value});return}let o=A.value,s=cn.value?W.value.findIndex(e=>e.id===cn.value.id):null;o!==null&&o>=0&&o<a?t?(o+=1,o>=a&&(o=0)):n&&(--o,o<0&&(o=a-1)):s!==null&&s>=0&&s<a?(o=t?s+1:s-1,o>=a&&(o=0),o<0&&(o=a-1)):o=t?0:a-1;let c=W.value[o];c&&(A.value=o,si(c),kr(c,o,`keyboard`))}function si(e){if(!e)return;let t=Y.value.right,n=Y.value.top+(z.value+q.value)*e.absoluteIndex+K.value[e.absoluteIndex]*G.value;if(!Number.isFinite(t)||!Number.isFinite(n))return;let r=me(t,n,Rn.value);r&&(En.value=r)}let ci=f(()=>({head:$.value.head,body:$.value.body.map(e=>[e.parentName,e.parentValue===``?``:s({v:e.parentValue,r:M.value.dataLabels.value.roundingValue,p:M.value.dataLabels.prefix,s:M.value.dataLabels.suffix}),e.percentageToTotal===``?``:s({v:e.percentageToTotal*100,r:M.value.dataLabels.percentage.roundingPercentage,s:`%`}),e.childName,e.childValue===``?``:s({v:e.childValue,r:M.value.dataLabels.value.roundingValue,p:M.value.dataLabels.prefix,s:M.value.dataLabels.suffix}),e.childPercentageToParent===``?``:s({v:e.childPercentageToParent*100,r:M.value.dataLabels.percentage.roundingPercentage,s:`%`}),e.childPercentageToTotal===``?``:s({v:e.childPercentageToTotal*100,r:M.value.dataLabels.percentage.roundingPercentage,s:`%`})]),caption:j.value.a11y.translations.tableCaption,notice:j.value.a11y.translations.tableAvailable}));return je({autoSize:ei,getData:Sr,getImage:Vr,generatePdf:Un,generateCsv:Mr,generateImage:Wn,generateSvg:Qr,hideSeries:gr,showSeries:hr,toggleTable:Fr,toggleSort:Lr,toggleTooltip:Rr,toggleAnnotator:Br,toggleFullscreen:Pr,copyAlt:ti}),(e,t)=>(y(),h(`div`,{class:_(`vue-data-ui-component vue-ui-vertical-bar ${Nr.value?`vue-data-ui-wrapper-fullscreen`:``} ${j.value.useCssAnimation?``:`vue-ui-dna`} ${j.value.responsive?`vue-ui-vertical-bar-autosize`:``}`),ref_key:`verticalBarChart`,ref:O,id:`vue-ui-vertical-bar_${D.value}`,style:v(`font-family:${j.value.style.fontFamily};width:100%; text-align:center;background:${F.value.backgroundColor};height:100%`),onMouseenter:t[3]||=()=>w(In)(!0),onMouseleave:t[4]||=()=>w(In)(!1)},[g(`p`,{id:`chart-instructions-${D.value}`,class:`sr-only`},C(j.value.a11y.translations.keyboardNavigation),9,ct),ci.value.body.length?(y(),p(Le,{key:0,uid:D.value,head:ci.value.head,body:ci.value.body,caption:ci.value.caption,notice:ci.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):m(``,!0),j.value.userOptions.buttons.annotator?(y(),p(w(Xt),{key:1,svgRef:w(Rn),backgroundColor:F.value.backgroundColor,color:F.value.color,active:zr.value,isCursorPointer:kn.value,palette:j.value.userOptions.annotatorPalette,onClose:Br},We({_:2},[x(w(i),t=>({name:t,fn:T(n=>[S(e.$slots,t,Ze(Je(w(r)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):m(``,!0),Gn.value?(y(),h(`div`,{key:2,ref_key:`noTitle`,ref:pn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):m(``,!0),F.value.title.text?(y(),h(`div`,{key:3,ref_key:`chartTitle`,ref:un,style:`width:100%;background:transparent;padding-bottom:12px`},[(y(),p(ke,{key:`title_${mn.value}`,config:{title:{cy:`vertical-bar-div-title`,...F.value.title},subtitle:{cy:`vertical-bar-div-subtitle`,...F.value.title.subtitle}}},null,8,[`config`]))],512)):m(``,!0),j.value.userOptions.show&&an.value&&(w(Ln)||w(Fn))?(y(),p(w(Zt),{ref_key:`userOptionsRef`,ref:vn,backgroundColor:F.value.backgroundColor,color:F.value.color,key:`user_options_${ln.value}`,isImaging:w(Hn),isPrinting:w(Vn),uid:D.value,hasTooltip:j.value.userOptions.buttons.tooltip&&P.value.show,hasPdf:j.value.userOptions.buttons.pdf,hasImg:j.value.userOptions.buttons.img,hasSvg:j.value.userOptions.buttons.svg,hasXls:j.value.userOptions.buttons.csv,hasTable:j.value.userOptions.buttons.table,hasSort:j.value.userOptions.buttons.sort,hasFullscreen:j.value.userOptions.buttons.fullscreen,hasAltCopy:j.value.userOptions.buttons.altCopy,isFullscreen:Nr.value,isTooltip:V.value.showTooltip,titles:{...j.value.userOptions.buttonTitles},chartElement:O.value,position:j.value.userOptions.position,hasAnnotator:j.value.userOptions.buttons.annotator,isAnnotation:zr.value,callbacks:j.value.userOptions.callbacks,printScale:j.value.userOptions.print.scale,tableDialog:j.value.table.useDialog,isCursorPointer:kn.value,onToggleFullscreen:Pr,onGeneratePdf:w(Un),onGenerateCsv:Mr,onGenerateImage:w($r),onGenerateSvg:w(Qr),onToggleTable:Fr,onToggleSort:Lr,onToggleTooltip:Rr,onToggleAnnotator:Br,onCopyAlt:ti,style:v({visibility:w(Ln)?w(Fn)?`visible`:`hidden`:`visible`})},We({_:2},[x(w(a)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionSort optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:T(n=>[S(e.$slots,t,Ze(Je(w(o)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasSort.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):m(``,!0),e.$slots.legend&&F.value.legend.show&&F.value.legend.position===`top`?S(e.$slots,`legend`,{legend:H.value},void 0,!0,5):m(``,!0),!e.$slots.legend&&F.value.legend.show&&F.value.legend.position===`top`?(y(),h(`div`,{key:6,ref_key:`chartLegend`,ref:dn},[(y(),p(He,{key:`legend_top_${hn.value}`,legendSet:H.value,config:rr.value,onClickMarker:t[0]||=({legend:e})=>X(e.id)},We({item:T(({legend:e,index:t})=>[g(`div`,{onClick:t=>X(e.id),style:v(`opacity:${k.value.includes(e.id)?.5:1}`)},C(Ar({legend:e,index:t})),13,lt)]),legendToggle:T(()=>[H.value.length>2&&F.value.legend.selectAllToggle.show&&!w(Mn)?(y(),p(Ie,{key:0,backgroundColor:F.value.legend.selectAllToggle.backgroundColor,color:F.value.legend.selectAllToggle.color,fontSize:F.value.legend.fontSize,checked:k.value.length>0,onToggle:pr},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`])):m(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:T(({legend:e,index:t})=>[Ke(Ae,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${D.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`]))],512)):m(``,!0),g(`div`,ut,[(y(),h(`svg`,{ref_key:`svgRef`,ref:Rn,xmlns:w(pe),class:_({"vue-data-ui-fullscreen--on":Nr.value,"vue-data-ui-fulscreen--off":!Nr.value,"vue-data-ui-no-transition":!w(I)}),viewBox:`0 0 ${L.value} ${R.value}`,style:v(`max-width:100%;overflow:visible;background:transparent;color:${F.value.color}`),tabindex:`0`,"aria-describedby":`chart-instructions-${D.value}`,onFocus:ri,onBlur:ii,onKeydown:oi},[g(`g`,{ref_key:`G`,ref:gn,class:`vue-data-ui-g`},[Ke(w(Qt)),e.$slots[`chart-background`]?(y(),h(`foreignObject`,{key:0,x:0,y:0,width:L.value,height:R.value,style:{pointerEvents:`none`}},[S(e.$slots,`chart-background`,{},void 0,!0)],8,ft)):m(``,!0),g(`defs`,null,[(y(!0),h(d,null,x(W.value,(e,t)=>(y(),p(Pe,{t:`linear`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,id:`vertical_bar_gradient_${D.value}_${t}`,key:`vertical_bar_gradient_${D.value}_${t}`,stops:[[`0%`,e.color,1],[`100%`,w(ne)(w(ae)(e.color,.03),100-M.value.gradientIntensity),1]]},null,8,[`id`,`stops`]))),128))]),e.$slots.pattern?(y(),h(`g`,pt,[(y(!0),h(d,null,x(W.value,t=>(y(),h(`defs`,null,[S(e.$slots,`pattern`,Ye({ref_for:!0},{seriesIndex:t.absoluteIndex,patternId:`pattern_${D.value}_${t.absoluteIndex}`}),void 0,!0)]))),256))])):m(``,!0),M.value.rowColor?(y(!0),h(d,{key:2},x(W.value,(e,t)=>(y(),h(`g`,{key:`row_${e.id}`},[g(`rect`,{x:0,y:Y.value.top+(z.value+q.value)*t+K.value[t]*G.value,width:L.value,height:q.value<=0?1e-4:q.value,fill:M.value.rowColor,rx:M.value.rowRadius,style:{pointerEvents:`none`},class:_({"vue-data-ui-transition":w(I)})},null,10,mt)]))),128)):m(``,!0),(y(!0),h(d,null,x(W.value,(e,t)=>(y(),h(`g`,{key:`underlayer_${e.id}`},[g(`rect`,{x:w(u)(vr.value?Y.value.left+Y.value.width/2-(e.sign===1?0:Q(e.value)<=0?1e-4:Q(e.value)):Y.value.left),y:Y.value.top+(z.value+q.value)*t+K.value[t]*G.value,width:w(u)(Q(e.value)<=0?1e-4:Q(e.value)),height:q.value<=0?1e-4:q.value,fill:M.value.underlayerColor,rx:M.value.borderRadius,class:_({"vue-data-ui-transition":w(I)})},null,10,ht)]))),128)),(y(!0),h(d,null,x(W.value,(t,n)=>(y(),h(`g`,{key:`barloop_${t.id}`},[g(`rect`,{x:w(u)(vr.value?Y.value.left+Y.value.width/2-(t.sign===1?0:Q(t.value)<=0?1e-4:Q(t.value)):Y.value.left),y:Y.value.top+(z.value+q.value)*n+K.value[n]*G.value,width:w(u)(Q(t.value)<=0?1e-4:Q(t.value)),height:q.value<=0?1e-4:q.value,fill:M.value.useGradient?`url(#vertical_bar_gradient_${D.value}_${n})`:w(ne)(t.color,M.value.fillOpacity),rx:M.value.borderRadius,stroke:M.value.useStroke?t.color:`none`,"stroke-width":M.value.useStroke?M.value.strokeWidth:0,class:_({"vue-data-ui-transition":w(I)})},null,10,gt),e.$slots.pattern?(y(),h(`rect`,{key:0,x:w(u)(vr.value?Y.value.left+Y.value.width/2-(t.sign===1?0:Q(t.value)<=0?1e-4:Q(t.value)):Y.value.left),y:Y.value.top+(z.value+q.value)*n+K.value[n]*G.value,width:w(u)(Q(t.value)<=0?1e-4:Q(t.value)),height:q.value<=0?1e-4:q.value,fill:`url(#pattern_${D.value}_${t.absoluteIndex})`,rx:M.value.borderRadius,stroke:M.value.useStroke?t.color:`none`,"stroke-width":M.value.useStroke?M.value.strokeWidth:0,class:_({"vue-data-ui-transition":w(I)})},null,10,_t)):m(``,!0),(!t.isChild||t.isLastChild)&&N.value.separators.show&&n!==W.value.length-1?(y(),h(`path`,{key:1,stroke:N.value.separators.color,"stroke-width":N.value.separators.strokeWidth,"stroke-linecap":`round`,class:_({"vue-data-ui-transition":w(I)}),d:`M${L.value}, ${q.value+z.value/2+Y.value.top+(z.value+q.value)*n+K.value[n]*G.value} ${N.value.separators.fullWidth?0:Y.value.left}, ${q.value+z.value/2+Y.value.top+(z.value+q.value)*n+K.value[n]*G.value}`},null,10,vt)):m(``,!0),vr.value&&N.value.separators.show?(y(),h(`path`,{key:2,stroke:N.value.separators.color,"stroke-width":N.value.separators.strokeWidth,"stroke-linecap":`round`,class:_({"vue-data-ui-transition":w(I)}),d:`M${Y.value.left+Y.value.width/2}, ${Y.value.top} ${Y.value.left+Y.value.width/2}, ${Y.value.bottom}`},null,10,yt)):m(``,!0)]))),128)),g(`g`,{ref_key:`parentLabels`,ref:yn},[(y(!0),h(d,null,x(W.value,(e,t)=>(y(),h(`g`,{key:`pn_${e.id}`,class:`vue-ui-horizontal-bar-parent-label`},[e.isChild&&e.childIndex===0&&M.value.parentLabels.show?(y(),h(`rect`,{key:0,class:_([`vue-ui-horizontal-bar-parent-marker`,{"vue-data-ui-transition":w(I)}]),x:2,y:xr(e,t).y-M.value.parentLabels.fontSize/1.5,height:M.value.parentLabels.fontSize/1.5,width:M.value.parentLabels.fontSize/1.5,rx:1,fill:e.color},null,10,bt)):m(``,!0),e.isChild&&e.childIndex===0&&M.value.parentLabels.show?(y(),h(`text`,{key:1,class:_({"vue-data-ui-transition":w(I)}),transform:`translate(${M.value.parentLabels.offsetX+M.value.parentLabels.fontSize}, ${xr(e,t).y})`,"font-size":M.value.parentLabels.fontSize,fill:M.value.parentLabels.color,"font-weight":M.value.parentLabels.bold?`bold`:`normal`,"text-anchor":`start`,innerHTML:w(te)({content:`${Cr(e,t)}`,fontSize:M.value.parentLabels.fontSize,fill:N.value.bars.parentLabels.color,x:0,y:0,translateY:!1})},null,10,xt)):m(``,!0),e.isChild&&e.childIndex===0&&M.value.parentLabels.show?(y(),h(`text`,{key:2,class:_({"vue-data-ui-transition":w(I)}),transform:`translate(${M.value.parentLabels.offsetX+M.value.parentLabels.fontSize}, ${xr(e,t).y+w(he)(Cr(e,t))*M.value.parentLabels.fontSize*1.1})`,"font-size":M.value.parentLabels.fontSize,fill:M.value.parentLabels.color,"font-weight":M.value.dataLabels.bold?`bold`:`normal`,"text-anchor":`start`},C(wr(e,t)),11,St)):m(``,!0)]))),128))],512),g(`g`,{ref_key:`childLabels`,ref:bn},[(y(!0),h(d,null,x(tr.value,(e,t)=>(y(),h(`g`,{key:`cl_${e.id}`,class:`vue-ui-horizontal-bar-child-label`},[(e.isChild||!e.hasChildren)&&M.value.nameLabels.show?(y(),h(`text`,{key:0,"text-anchor":`start`,class:_({"vue-data-ui-transition":w(I)}),transform:`translate(${Math.abs(M.value.nameLabels.offsetX)}, ${w(u)(Y.value.top+(z.value+q.value)*t+q.value/2+M.value.nameLabels.fontSize/2+K.value[t]*G.value)})`,"font-size":M.value.nameLabels.fontSize,fill:`transparent`,"font-weight":M.value.nameLabels.bold?`bold`:`normal`,style:{"user-select":`none`},innerHTML:w(te)({content:e.name,fontSize:M.value.nameLabels.fontSize,fill:`transparent`,x:0,y:0,translateY:!0})},null,10,Ct)):m(``,!0)]))),128))],512),g(`g`,null,[(y(!0),h(d,null,x(W.value,(e,t)=>(y(),h(`g`,{key:`vislab_${e.id}`,class:`vue-ui-horizontal-bar-child-label`},[(e.isChild||!e.hasChildren)&&M.value.nameLabels.show?(y(),h(`text`,{key:0,class:_({"vue-data-ui-transition":w(I)}),"text-anchor":`end`,transform:`translate(${Y.value.left+M.value.nameLabels.offsetX-6}, ${Y.value.top+(z.value+q.value)*t+q.value/2+M.value.nameLabels.fontSize/3+K.value[t]*G.value})`,"font-size":M.value.nameLabels.fontSize,fill:M.value.nameLabels.color,"font-weight":M.value.nameLabels.bold?`bold`:`normal`,innerHTML:w(te)({content:e.name,fontSize:M.value.nameLabels.fontSize,fill:N.value.bars.nameLabels.color,x:0,y:0,translateY:!0})},null,10,wt)):m(``,!0)]))),128))]),g(`g`,null,[(y(!0),h(d,null,x(W.value,(e,t)=>(y(),h(`g`,{key:`sdl_${e.id}`,class:`vue-ui-horizontal-bar-child-label`},[g(`text`,{class:_({"vue-data-ui-transition":w(I)}),transform:`translate(${vr.value?Y.value.left+Y.value.width/2+(e.sign===1?-12:12)+(e.sign===1?-N.value.bars.dataLabels.offsetX:N.value.bars.dataLabels.offsetX):Math.min(br(e.value)+3+F.value.layout.bars.dataLabels.offsetX,Y.value.right-2)},${Y.value.top+(z.value+q.value)*t+q.value/2+K.value[t]*G.value+M.value.dataLabels.fontSize/3})`,"text-anchor":!vr.value||e.sign===-1?`start`:`end`,"font-size":M.value.dataLabels.fontSize,fill:M.value.dataLabels.color,"font-weight":M.value.dataLabels.bold?`bold`:`normal`},C(jr(e.value,e,t,e.sign)),11,Tt)]))),128))]),(y(!0),h(d,null,x(W.value,(e,t)=>(y(),h(`g`,null,[g(`rect`,{x:0,y:Y.value.top+(z.value+q.value)*t-z.value/2+K.value[t]*G.value,width:L.value,height:q.value+z.value<=0?1e-4:q.value+z.value,fill:Tr.value===e.id?w(ne)(N.value.highlighter.color,N.value.highlighter.opacity):`transparent`,onMouseenter:n=>kr(e,t,`pointer`),onMouseleave:n=>Or({datapoint:e,seriesIndex:t}),onClick:n=>Dr({datapoint:e,seriesIndex:t})},null,40,Et)]))),256)),S(e.$slots,`svg`,{svg:{...J.value,drawingArea:Y.value,isPrintingImg:w(Vn)||w(Hn)||w(Xr),isPrintingSvg:w(Zr)}},void 0,!0)],512)],46,dt)),e.$slots.hint?(y(),h(`div`,Dt,[S(e.$slots,`hint`,Ze(Je({hint:j.value.a11y.translations.keyboardNavigation,isVisible:ni.value})),void 0,!0)])):m(``,!0)]),e.$slots.watermark?(y(),h(`div`,Ot,[S(e.$slots,`watermark`,Ze(Je({isPrinting:w(Vn)||w(Hn)||w(Xr)||w(Zr)})),void 0,!0)])):m(``,!0),e.$slots.legend&&F.value.legend.show&&F.value.legend.position===`bottom`?S(e.$slots,`legend`,{legend:H.value},void 0,!0,8):m(``,!0),!e.$slots.legend&&F.value.legend.show&&F.value.legend.position===`bottom`?(y(),h(`div`,{key:9,ref_key:`chartLegend`,ref:dn},[(y(),p(He,{key:`legend_bottom_${hn.value}`,legendSet:H.value,config:rr.value,isCursorPointer:kn.value,onClickMarker:t[1]||=({legend:e})=>X(e.id)},We({item:T(({legend:e,index:t})=>[g(`div`,{onClick:t=>X(e.id),style:v(`opacity:${k.value.includes(e.id)?.5:1}`)},C(Ar({legend:e,index:t})),13,kt)]),legendToggle:T(()=>[H.value.length>2&&F.value.legend.selectAllToggle.show&&!w(Mn)?(y(),p(Ie,{key:0,backgroundColor:F.value.legend.selectAllToggle.backgroundColor,color:F.value.legend.selectAllToggle.color,fontSize:F.value.legend.fontSize,checked:k.value.length>0,isCursorPointer:kn.value,onToggle:pr},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):m(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:T(({legend:e,index:t})=>[Ke(Ae,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${D.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`]))],512)):m(``,!0),e.$slots.source?(y(),h(`div`,{key:10,ref_key:`source`,ref:fn,dir:`auto`},[S(e.$slots,`source`,{},void 0,!0)],512)):m(``,!0),Ke(w(Jt),{teleportTo:P.value.teleportTo,show:V.value.showTooltip&&on.value&&k.value.length<E.dataset.length,backgroundColor:P.value.backgroundColor,color:P.value.color,borderRadius:P.value.borderRadius,borderColor:P.value.borderColor,borderWidth:P.value.borderWidth,fontSize:P.value.fontSize,backgroundOpacity:P.value.backgroundOpacity,position:P.value.position,offsetX:P.value.offsetX,offsetY:P.value.offsetY,parent:O.value,content:sn.value,isFullscreen:Nr.value,isCustom:P.value.customFormat&&typeof P.value.customFormat==`function`,smooth:P.value.smooth,backdropFilter:P.value.backdropFilter,smoothForce:P.value.smoothForce,smoothSnapThreshold:P.value.smoothSnapThreshold,isA11yMode:Dn.value===`keyboard`,a11yPosition:En.value},{"tooltip-before":T(()=>[S(e.$slots,`tooltip-before`,Ze(Je({...Er.value})),void 0,!0)]),tooltip:T(()=>[S(e.$slots,`tooltip`,Ze(Je({...Er.value})),void 0,!0)]),"tooltip-after":T(()=>[S(e.$slots,`tooltip-after`,Ze(Je({...Er.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),an.value&&j.value.userOptions.buttons.table?(y(),p(et(Hr.value.component),Ye({key:11},Hr.value.props,{ref_key:`tableUnit`,ref:_n,onClose:Wr}),We({content:T(()=>[g(`div`,{ref_key:`tableContainer`,ref:qn,class:`vue-ui-vertical-bar-table atom-data-table`,style:v(`${j.value.table.useDialog?``:`max-height: 300px; margin-top: 24px`}`)},[g(`div`,At,[j.value.table.useDialog?m(``,!0):(y(),h(`div`,{key:0,role:`button`,tabindex:`0`,style:v(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:${kn.value?`pointer`:`default`}; background:${j.value.table.th.backgroundColor};`),onClick:Wr,onKeypress:at(Wr,[`enter`])},[Ke(w(Yt),{name:`close`,stroke:j.value.table.th.color,"stroke-width":2},null,8,[`stroke`])],36)),g(`div`,{style:{width:`100%`,"container-type":`inline-size`},class:_({"vue-ui-responsive":w(Ur)})},[g(`table`,jt,[j.value.table.useDialog?m(``,!0):(y(),h(`caption`,{key:0,style:v({backgroundColor:j.value.table.th.backgroundColor,color:j.value.table.th.color,outline:j.value.table.th.outline}),class:`vue-ui-data-table__caption`},[Ge(C(F.value.title.text)+` `,1),F.value.title.subtitle.text?(y(),h(`span`,Mt,C(F.value.title.subtitle.text),1)):m(``,!0)],4)),g(`thead`,null,[g(`tr`,{role:`row`,style:v(`background:${j.value.table.th.backgroundColor};color:${j.value.table.th.color}`)},[(y(!0),h(d,null,x($.value.head,e=>(y(),h(`th`,{style:v(`outline:${j.value.table.th.outline}`)},[g(`div`,Nt,C(e),1)],4))),256))],4),g(`tr`,null,[g(`th`,{style:v(`background:${j.value.table.th.backgroundColor};color:${j.value.table.th.color};outline:${j.value.table.th.outline}`)},null,4),g(`th`,{style:v(`background:${j.value.table.th.backgroundColor};color:${j.value.table.th.color};outline:${j.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},` ∑ `+C(j.value.table.td.prefix)+C(isNaN(Z.value)?``:Z.value.toFixed(j.value.table.td.roundingValue))+C(j.value.table.td.suffix),5),g(`th`,{style:v(`background:${j.value.table.th.backgroundColor};color:${j.value.table.th.color};outline:${j.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},` 100% `,4),g(`th`,{style:v(`background:${j.value.table.th.backgroundColor};color:${j.value.table.th.color};outline:${j.value.table.th.outline}`)},null,4),g(`th`,{style:v(`background:${j.value.table.th.backgroundColor};color:${j.value.table.th.color};outline:${j.value.table.th.outline}`)},null,4),g(`th`,{style:v(`background:${j.value.table.th.backgroundColor};color:${j.value.table.th.color};outline:${j.value.table.th.outline}`)},null,4),g(`th`,{style:v(`background:${j.value.table.th.backgroundColor};color:${j.value.table.th.color};outline:${j.value.table.th.outline}`)},null,4)])]),g(`tbody`,null,[(y(!0),h(d,null,x($.value.body,(e,t)=>(y(),h(`tr`,{class:_({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":t%2==0,"vue-ui-data-table__tbody__row-odd":t%2!=0}),style:v(`background:${j.value.table.td.backgroundColor};color:${j.value.table.td.color}`)},[g(`td`,{class:`vue-ui-data-table__tbody__td`,style:v(`outline:${j.value.table.td.outline};font-variant-numeric: tabular-nums;`),"data-cell":$.value.head[0]??``},[g(`div`,Ft,[e.color?(y(),h(`span`,{key:0,style:v(`color:${e.color};margin-right:3px`)},`⬤`,4)):m(``,!0),g(`span`,null,C(e.parentName),1)])],12,Pt),g(`td`,{class:`vue-ui-data-table__tbody__td`,style:v(`outline:${j.value.table.td.outline}`),"data-cell":$.value.head[1]??``},[g(`div`,Lt,C(j.value.table.td.prefix)+C([``,NaN,void 0].includes(e.parentValue)?``:e.parentValue.toFixed(j.value.table.td.roundingValue))+C(j.value.table.td.suffix),1)],12,It),g(`td`,{class:`vue-ui-data-table__tbody__td`,style:v(`outline:${j.value.table.td.outline}`),"data-cell":$.value.head[2]??``},[g(`div`,zt,C([``,NaN,void 0].includes(e.percentageToTotal)?``:`${(e.percentageToTotal*100).toFixed(j.value.table.td.roundingPercentage)}%`),1)],12,Rt),g(`td`,{class:`vue-ui-data-table__tbody__td`,style:v(`outline:${j.value.table.td.outline}`),"data-cell":$.value.head[3]??``},[g(`div`,Vt,C(e.childName),1)],12,Bt),g(`td`,{class:`vue-ui-data-table__tbody__td`,style:v(`outline:${j.value.table.td.outline}`),"data-cell":$.value.head[4]??``},[g(`div`,Ut,C(j.value.table.td.prefix)+C([``,NaN,void 0].includes(e.childValue)?``:e.childValue.toFixed(j.value.table.td.roundingValue))+C(j.value.table.td.suffix),1)],12,Ht),g(`td`,{class:`vue-ui-data-table__tbody__td`,style:v(`outline:${j.value.table.td.outline}`),"data-cell":$.value.head[5]??``},[g(`div`,Gt,C([``,NaN,void 0].includes(e.childPercentageToParent)?``:`${(e.childPercentageToParent*100).toFixed(j.value.table.td.roundingPercentage)}%`),1)],12,Wt),g(`td`,{class:`vue-ui-data-table__tbody__td`,style:v(`outline:${j.value.table.td.outline}`),"data-cell":$.value.head[6]??``},[g(`div`,qt,C([``,NaN,void 0].includes(e.childPercentageToTotal)?``:`${(e.childPercentageToTotal*100).toFixed(j.value.table.td.roundingPercentage)}%`),1)],12,Kt)],6))),256))])])],2)])],4)]),_:2},[j.value.table.useDialog?{name:`title`,fn:T(()=>[Ge(C(Hr.value.title),1)]),key:`0`}:void 0,j.value.table.useDialog?{name:`actions`,fn:T(()=>[g(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[2]||=e=>Mr(j.value.userOptions.callbacks.csv),style:v({cursor:kn.value?`pointer`:`default`})},[Ke(w(Yt),{name:`fileCsv`,stroke:Hr.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):m(``,!0),S(e.$slots,`skeleton`,{},()=>[w(Mn)?(y(),p(we,{key:0})):m(``,!0)],!0)],46,st))}},[[`__scopeId`,`data-v-24853c02`]]);export{ot as n,Jt as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{$ as t,X as n,i as r}from"./lib-zDxoqrgo.js";import{n as i,t as a}from"./useHints-BH9r_0Vd.js";import{t as o}from"./useConfig-CKdzPrcf.js";import{t as s}from"./useNestedProp-CT9phgWx.js";import{t as c}from"./usePrefersMotion-XLHwega2.js";import{Fragment as l,computed as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createTextVNode as m,createVNode as h,defineAsyncComponent as g,normalizeClass as _,normalizeStyle as v,onMounted as y,openBlock as b,ref as x,renderSlot as S,toDisplayString as C,unref as w,useSlots as T,watch as E}from"vue";var D=/* @__PURE__ */ e({default:()=>j}),O=[`aria-labelledby`],k=[`id`],A=[`aria-label`],j={__name:`vue-ui-kpi`,props:{config:{type:Object,default(){return{}}},dataset:{type:Number,default:0}},setup(e){let D=g(()=>import(`./vue-ui-digits-CL9SuIEI.js`).then(e=>e.n)),{vue_ui_kpi:j}=o(),M=c(),N=e,P=u({get:()=>R(),set:e=>e});i({config:()=>P.value,dataset:()=>N.dataset,component:`VueUiKpi`,rules:[a.noHint]});let F=T(),I=u(()=>P.value.debug),L=x(n());y(()=>{F[`chart-background`]&&I.value&&console.warn(`VueUiKpi does not support the #chart-background slot.`)});function R(){return s({userConfig:N.config,defaultConfig:j})}E(()=>N.config,e=>{P.value=R(),H()},{deep:!0});let z=x((N.dataset,N.dataset)),B=x(P.value.useAnimation?P.value.animationValueStart:z.value),V=e=>{let t=P.value.animationFrames,n=Math.abs(e-B.value)/t;function r(){B.value<e?B.value=Math.min(B.value+n,e):B.value>e&&(B.value=Math.max(B.value-n,e)),B.value!==e&&requestAnimationFrame(r)}r()};y(()=>{H()});function H(){P.value.useAnimation&&!M.value?(B.value=P.value.animationValueStart,V(N.dataset)):B.value=N.dataset}return E(()=>N.dataset,e=>{P.value.useAnimation&&!M.value?V(e):B.value=e}),(n,i)=>(b(),f(`div`,{class:_(`vue-data-ui-component vue-ui-kpi ${P.value.layoutClass}`),style:v(`background:${P.value.backgroundColor}; ${P.value.layoutCss}`),"aria-labelledby":`kpi-title-${L.value}`},[P.value.title||n.$slots.title?(b(),f(`div`,{key:0,class:_(`vue-ui-kpi-title ${P.value.titleClass}`),style:v(`font-family: ${P.value.fontFamily}; font-size:${P.value.titleFontSize}px; color:${P.value.titleColor}; font-weight:${P.value.titleBold?`bold`:`normal`}; ${P.value.titleCss}`),id:`kpi-title-${L.value}`},[S(n.$slots,`title`,{comment:e.dataset}),m(` `+C(P.value.title),1)],14,k)):d(``,!0),S(n.$slots,`comment-before`,{comment:e.dataset}),p(`div`,{class:_(`vue-ui-kpi-value ${P.value.valueClass}`),style:v(`font-family: ${P.value.fontFamily}; font-size:${P.value.valueFontSize}px; color:${P.value.valueColor}; font-weight:${P.value.valueBold?`bold`:`normal`}; ${P.value.valueCss}`),role:`status`,"aria-live":`polite`,"aria-atomic":`true`,"aria-label":B.value.toFixed(P.value.valueRounding)},[S(n.$slots,`value`,{comment:e.dataset}),P.value.analogDigits.show?(b(),f(`div`,{key:0,style:v({height:P.value.analogDigits.height+`px`})},[h(w(D),{dataset:Number(B.value.toFixed(P.value.valueRounding)),config:{backgroundColor:P.value.backgroundColor,digits:{color:P.value.analogDigits.color,skeletonColor:P.value.analogDigits.skeletonColor}}},null,8,[`dataset`,`config`])],4)):(b(),f(l,{key:1},[m(C(w(r)(P.value.formatter,B.value,w(t)({p:P.value.prefix,v:B.value,s:P.value.suffix,r:P.value.valueRounding}))),1)],64))],14,A),S(n.$slots,`comment-after`,{comment:e.dataset})],14,O))}};export{D as n,j as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./lib-zDxoqrgo.js";import{n,t as r}from"./useHints-BH9r_0Vd.js";import{t as i}from"./useConfig-CKdzPrcf.js";import{t as a}from"./useNestedProp-CT9phgWx.js";import{t as o}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{computed as s,createCommentVNode as c,createElementBlock as l,createElementVNode as u,normalizeStyle as d,openBlock as f,ref as p,unref as m,useCssVars as h}from"vue";var g=/* @__PURE__ */ e({default:()=>E}),_=[`xmlns`,`viewBox`],v={key:0},y=[`stroke`],b=[`stroke`],x=[`stroke`],S={key:1},C=[`stroke`],w={key:2},T=[`stroke`],E=/*#__PURE__*/ o({__name:`vue-ui-mini-loader`,props:{config:{type:Object,default(){return{}}}},setup(e){h(e=>({v5fadbcf2:j.value,v488061db:M.value,v2e2d4bba:N.value}));let{vue_ui_mini_loader:o}=i(),g=e,E=s(()=>a({userConfig:g.config,defaultConfig:o}));n({config:()=>E.value,dataset:()=>[],component:`VueUiMiniLoader`,rules:[r.noHint]});let D=p({onion:`-10 -10 84 84`,line:`-10 -10 112 84`,bar:`-10 -10 106 84`}),O=s(()=>({gutter:`stroke:${E.value.line.gutterColor};opacity:${E.value.line.gutterOpacity};`,gutterBlur:`filter:blur(${E.value.line.gutterBlur}px);`})),k=s(()=>({gutter:`stroke:${E.value.bar.gutterColor};opacity:${E.value.bar.gutterOpacity};`,gutterBlur:`filter:blur(${E.value.bar.gutterBlur}px);`})),A=s(()=>({gutter:`stroke:${E.value.onion.gutterColor};opacity:${E.value.onion.gutterOpacity};`,gutterBlur:`filter:blur(${E.value.onion.gutterBlur}px);`})),j=s(()=>`blur(${E.value.onion.trackBlur}px) hue-rotate(${E.value.onion.trackHueRotate}deg)`),M=s(()=>`blur(${E.value.line.trackBlur}px) hue-rotate(${E.value.line.trackHueRotate}deg)`),N=s(()=>`blur(${E.value.bar.trackBlur}px) hue-rotate(${E.value.bar.trackHueRotate}deg)`);return(e,n)=>(f(),l(`svg`,{class:`vue-data-ui-component vue-ui-mini-loader`,xmlns:m(t),viewBox:D.value[E.value.type],style:{background:`transparent`},width:`100%`},[E.value.type===`onion`?(f(),l(`g`,v,[u(`path`,{d:`M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3`,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,style:d(A.value.gutter+A.value.gutterBlur)},null,4),u(`path`,{d:`M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13`,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,style:d(A.value.gutter+A.value.gutterBlur)},null,4),u(`path`,{d:`M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25`,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,style:d(A.value.gutter+A.value.gutterBlur)},null,4),u(`path`,{d:`M 3 32 C 3 45 12 62 32 62 A 1 1 0 0 0 32 3`,stroke:E.value.onion.trackColor,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,class:`onion-animated`},null,8,y),u(`path`,{d:`M 13 32 C 13 39 19 52 32 52 A 1 1 0 0 0 32 13`,stroke:E.value.onion.trackColor,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,class:`onion-animated`},null,8,b),u(`path`,{d:`M 23 32 C 23 37 26.5 41 32 41 A 1 1 0 0 0 32 25`,stroke:E.value.onion.trackColor,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,class:`onion-animated`},null,8,x)])):c(``,!0),E.value.type===`line`?(f(),l(`g`,S,[u(`path`,{d:`M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5`,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,style:d(O.value.gutter+O.value.gutterBlur)},null,4),u(`path`,{d:`M 3 62 C 6 57 6 48 11 45 C 16 44 17 53 22 52 C 27 49 25 32 30 31 C 34 29 37 47 42 47 C 46 47 45 38 49 36 C 53 34 56 45 61 45 C 66 45 65 24 69 24 C 73 22 75 35 79 34 C 84 34 83 11 91 5`,stroke:E.value.line.trackColor,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,class:`line-animated`},null,8,C)])):c(``,!0),E.value.type===`bar`?(f(),l(`g`,w,[u(`path`,{d:`M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5`,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,style:d(k.value.gutter+k.value.gutterBlur)},null,4),u(`path`,{d:`M 3 62 L 3 44 M 12 62 L 12 49 M 21 62 L 21 37 M 30 62 L 30 29 M 39 62 L 39 43 M 48 62 L 48 16 M 57 62 L 57 24 M 66 62 L 66 35 M 75 62 L 75 20 M 84 62 L 84 5`,stroke:E.value.bar.trackColor,"stroke-width":`4`,fill:`none`,"stroke-linecap":`round`,class:`bar-animated`},null,8,T)])):c(``,!0)],8,_))}},[[`__scopeId`,`data-v-5266752a`]]);export{g as n,E as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./tableIntegration-CNoJ1CIY.js";import{n as r,t as i}from"./annotationSlots-BRR85CqJ.js";import{n as a,t as o}from"./userOptionsSlots-DYuo-E5m.js";import{D as s,Dt as ee,Ft as c,Ht as te,M as ne,S as re,X as ie,Zt as l,at as ae,et as oe,in as se,nt as ce,pt as le,t as ue,w as de,zt as fe}from"./lib-zDxoqrgo.js";import{n as pe,t as me}from"./useHints-BH9r_0Vd.js";import{t as he}from"./useConfig-CKdzPrcf.js";import{t as ge}from"./usePrinter-CnyKPIFM.js";import{n as _e,t as ve}from"./BaseScanner-8NdoBs7B.js";import{t as ye}from"./useChartExport-DtPNpc9M.js";import{t as be}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as xe}from"./DefGrad-DKMq1REY.js";import{n as Se}from"./resolveChartConfig-BSo1Oe9n.js";import{t as Ce}from"./useUserOptionState-CXlFnwPv.js";import{t as we}from"./useChartAccessibility-DOMuYJfm.js";import{t as Te}from"./chartImage-NwZO-elv.js";import{t as Ee}from"./vue_ui_molecule-Bw1UW1Na.js";import{t as De}from"./usePanZoom-BdjP5Suc.js";import{Fragment as Oe,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as ke,createTextVNode as Ae,createVNode as h,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as je,nextTick as v,normalizeClass as Me,normalizeProps as y,normalizeStyle as b,onMounted as Ne,openBlock as x,ref as S,renderList as Pe,renderSlot as C,resolveDynamicComponent as Fe,toDisplayString as Ie,toRefs as Le,unref as w,useCssVars as Re,watch as T,withCtx as E}from"vue";var ze=/* @__PURE__ */ e({default:()=>Je}),Be=[`id`],Ve={key:1,ref:`noTitle`,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},He={key:2,style:`width:100%;background:transparent;`},Ue=[`xmlns`,`viewBox`],We=[`width`,`height`],Ge={key:4,class:`vue-data-ui-watermark`},Ke={key:5,"data-dom-to-png-ignore":``,class:`reset-wrapper`},qe={key:6,ref:`source`,dir:`auto`},Je=/*#__PURE__*/ be({__name:`vue-ui-molecule`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectNode`,`copyAlt`],setup(e,{expose:be,emit:ze}){Re(e=>({v4bfe7676:on.value}));let Je=g(()=>import(`./Title-BRAjxtjG.js`).then(e=>e.t)),Ye=g(()=>import(`./Tooltip-BUXB0i6z.js`)),Xe=g(()=>import(`./BaseIcon-Cz30ODFA.js`).then(e=>e.n)),Ze=g(()=>import(`./vue-ui-accordion-Dy5OVFKr.js`).then(e=>e.n)),Qe=g(()=>import(`./DataTable-DSUA5M9p.js`)),$e=g(()=>import(`./PenAndPaper-DvJJaeU2.js`).then(e=>e.t)),et=g(()=>import(`./UserOptions-D65t74CM.js`).then(e=>e.n)),tt=g(()=>import(`./PackageVersion-D6pKL176.js`).then(e=>e.t)),nt=g(()=>import(`./RecursiveLinks-CZtG6uWg.js`)),rt=g(()=>import(`./RecursiveLabels-B0d04xSj.js`)),it=g(()=>import(`./RecursiveCircles-BftI1kwF.js`)),at=g(()=>import(`./BaseDraggableDialog-T1gEsQid.js`).then(e=>e.n)),{vue_ui_molecule:ot}=he(),D=e,st=ze,ct=u(()=>!!D.dataset&&D.dataset.length);Ne(()=>{ut()});let lt=u(()=>M.value.debug);function ut(){fe(D.dataset)&&ae({componentName:`VueUiMolecule`,type:`dataset`,debug:lt.value})}let O=S(ie()),k=S(!1),A=S(``),j=S(null),dt=S(0),ft=S(0),pt=S(0),mt=S(null),ht=S(null),M=S(V()),N=u(()=>M.value.style.chart.tooltip),P=u(()=>M.value.style.chart),F=u(()=>M.value.userOptions);pe({config:()=>M.value,dataset:()=>D.dataset,component:`VueUiMolecule`,rules:[me.emptyArray,{test:e=>e[0]&&e[0].nodes&&e[0].nodes.length===0,message:[`👀 There are no children nodes attached to the root node. Consider:`,``,`▶️ Adding children nodes to the root node.`]},{test:e=>e[0]&&e[0].nodes&&e[0].nodes.length>8,message:[`👀 The number of children nodes > 8, some nodes might overlap. Consider:`,``,`▶️ Grouping data into broader categories.`]}]});let I=u(()=>M.value.userOptions.useCursorPointer),gt=u(()=>se({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,nodes:{stroke:`#6A6A6A`},links:{stroke:`#6A6A6A80`}}}},userConfig:M.value.skeletonConfig??{}})),{loading:L,FINAL_DATASET:R}=_e({...Le(D),FINAL_CONFIG:M,prepareConfig:V,skeletonDataset:D.config?.skeletonDataset??[{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`}]},{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`}]},{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`}]},{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`}]},{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`}]},{name:`_`,color:`#CACACA`,nodes:[{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`},{name:`_`,color:`#CACACA`}]}]}],skeletonConfig:se({defaultConfig:M.value,userConfig:gt.value})}),{userOptionsVisible:z,setUserOptionsVisibility:_t,keepUserOptionState:vt}=Ce({config:M.value}),{svgRef:B}=we({config:P.value.title});function V(){return Se(D.config,ot,Ee)}let yt=l(D.config);T((e,t)=>D.config,e=>{let t=l(newConfig),n=t!==yt;yt=t;let r=V();if(!n){M.value.style.chart.tooltip=r.style.chart.tooltip,U.value.showTooltip=M.value.style.chart.tooltip.show;return}M.value=r,z.value=!M.value.userOptions.showOnChartHover,ut(),ft.value+=1,pt.value+=1,U.value.showTable=M.value.table.show,U.value.showTooltip=N.value.show,U.value.showZoom=P.value.zoom.show},{deep:!0});let bt=S(0),xt=()=>{bt.value+=1};T([()=>L.value,()=>R.value],async([e])=>{e||(await v(),W.value=Ot(),await v(),xt(),await v(),Jt({x:0,y:0,width:400,height:400}),Kt(!1))},{flush:`post`,deep:!1});let{isPrinting:H,isImaging:St,generatePdf:Ct,generateImage:wt}=ge({elementId:`cluster_${O.value}`,fileName:P.value.title.text||`vue-ui-molecule`,options:M.value.userOptions.print}),Tt=u(()=>M.value.userOptions.show&&!P.value.title.text),Et=u(()=>de(M.value.customPalette)),U=S({showTable:M.value.table.show,showDataLabels:!0,showTooltip:N.value.show,showZoom:P.value.zoom.show});T(M,()=>{U.value={showTable:M.value.table.show,showDataLabels:!0,showTooltip:N.value.show,showZoom:P.value.zoom.show}},{immediate:!0});function Dt(e,t=0){return Array.isArray(e)&&e.length>0&&e[0].nodes?Dt(e[0].nodes,t+1):t}function Ot(){let e=Dt(R.value),t=100,n=t;for(let r=0;r<e;r+=1)t/=1,n+=t;return{height:n,width:n}}let W=S(Ot());function kt(e,t={x:-W.value.width/2.43,y:W.value.height/2},n=W.value.width/1.1,r=24,i=0,a=0,o=`#BBBBBB`,s=0){if(!Array.isArray(e)||e.length===0)return e;let ee=ne({plot:t,radius:n,sides:e.length,rotation:i});return e.forEach((e,t)=>{let c=ee.coordinates[t],ne=e.color?(()=>{let t=re(e.color);return t.startsWith(`#`)?t:`#${t}`})():null,l;ne?l=ne:s===0?l=o:s===1?(l=Et.value[a]||te[a]||o,a+=1):l=o,e.polygonPath={coordinates:[c]},e.circleRadius=r,e.color=l,e.strokeWidth=Math.min(P.value.links.strokeWidth/(s+1),r/2),e.uid=ie(),Array.isArray(e.nodes)&&e.nodes.length&&(e.nodes=kt(e.nodes,c,n/2.9,r/2.2,i+Math.PI*t/e.nodes.length,a,l,s+1))}),e}function At(e){let t=/* @__PURE__ */ new Set;function n(e){e.forEach(e=>{if(!e.color)return;let r=e.color;/^#?[0-9A-F]{6}$/i.test(r)||(r=re(r)),r.startsWith(`#`)||(r=`#${r}`),t.add(r),Array.isArray(e.nodes)&&e.nodes.length&&n(e.nodes)})}n(e);let r={};return Array.from(t).forEach(e=>{let t=e.slice(1);r[e]=`gradient_${t}`}),r}let jt=u(()=>At(G.value)),G=u(()=>kt(oe(R.value))),K=S(null);function Mt(e){K.value={datapoint:e,seriesIndex:-1,series:G.value,config:M.value};let t=N.value.customFormat;if(ee(t)&&le(()=>t({seriesIndex:-1,datapoint:e,series:G.value,config:M.value})))A.value=t({seriesIndex:-1,datapoint:e,series:G.value,config:M.value});else{let t=``;t+=`<div style="display:flex;align-items:center;gap:3px"><div style="color:${e.color}">⬤</div><div>${e.name}</div></div>`,e.details&&(t+=`<div style="width:100%;border-top:1px solid ${N.value.borderColor};margin-top: 2px">${e.details}</div>`),A.value=`<div style="font-family:inherit">${t}</div>`}}let q=S(null),J=S(null),Nt=S(null);function Pt(e){Nt.value=q.value,q.value=e,e?M.value.events.datapointEnter&&M.value.events.datapointEnter({datapoint:e,seriesIndex:-1}):M.value.events.datapointLeave&&M.value.events.datapointLeave({datapoint:Nt.value||q.value,seriesIndex:-1}),e?(k.value=!0,Mt(e),J.value=e.uid):(k.value=!1,A.value=``,J.value=null)}function Ft(e){let t=[];function n(e){e.forEach(e=>{let r={name:e.name,details:e.details||`-`,ancestor:e.ancestor&&e.ancestor.name||`-`,color:e.color||``};t.push(r),e.nodes&&e.nodes.length>0&&n(e.nodes,e.name)})}return n(e),t}let It=u(()=>Ft(G.value)),Y=u(()=>({head:[M.value.table.translations.nodeName,M.value.table.translations.details,M.value.table.translations.ancestor],body:It.value.map((e,t)=>[{color:e.color,name:e.name},e.details,e.ancestor||``]),config:{th:{backgroundColor:M.value.table.th.backgroundColor,color:M.value.table.th.color,outline:M.value.table.th.outline},td:{backgroundColor:M.value.table.td.backgroundColor,color:M.value.table.td.color,outline:M.value.table.td.outline},breakpoint:M.value.table.responsiveBreakpoint},colNames:[M.value.table.translations.nodeName,M.value.table.translations.details,M.value.table.translations.ancestor]}));function Lt(e=null){v(()=>{let t=Y.value.body.map((e,t)=>[[e[0].name],[e[1]],[e[2]]]),n=[[P.value.title.text],[P.value.title.subtitle.text],[[...Y.value.head]]].concat(t),r=s(n);e?e(r):ce({csvContent:r,title:P.value.title.text||`vue-ui-molecule`})})}function Rt(){return G.value}let X=S(!1);function zt(e){X.value=e,dt.value+=1}function Bt(){U.value.showTable=!U.value.showTable}function Vt(){U.value.showDataLabels=!U.value.showDataLabels}function Ht(){U.value.showTooltip=!U.value.showTooltip}function Ut(){U.value.showZoom=!U.value.showZoom}let Z=S(!1);function Wt(){Z.value=!Z.value}let Gt=u(()=>!Z.value&&U.value.showZoom),{viewBox:Q,resetZoom:Kt,isZoom:qt,setInitialViewBox:Jt}=De(B,{x:0,y:0,width:Math.max(10,W.value.width),height:Math.max(10,W.value.height)},P.value.zoom.speed,Gt);function Yt(e){M.value.events.datapointClick&&M.value.events.datapointClick({datapoint:e,seriesIndex:-1}),st(`selectNode`,e)}let Xt=Te(j,()=>P.value.title.text),$=u(()=>n({config:M,style:P,mutableConfig:U,dialog:at,accordion:Ze,isFullscreen:X,parent:j,maxWidth:800,isCursorPointer:I}));T(()=>U.value.showTable,e=>t(e,M,mt));function Zt(){U.value.showTable=!1,ht.value&&ht.value.setTableIconState(!1)}let Qt=u(()=>P.value.backgroundColor),$t=u(()=>P.value.title),{isCallbackImaging:en,isCallbackSvg:tn,generateSvg:nn,onGenerateImage:rn}=ye({svg:B,title:$t,legend:null,legendItems:null,backgroundColor:Qt,getSvgCallback:()=>M.value.userOptions.callbacks.svg,generateImage:wt});async function an(){if(st(`copyAlt`,{config:M.value,dataset:G.value}),!M.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(M.value.userOptions.callbacks.altCopy({config:M.value,dataset:G.value}))}let on=u(()=>P.value.color);return be({getData:Rt,getImage:Xt,generatePdf:Ct,generateCsv:Lt,generateImage:wt,generateSvg:nn,toggleTable:Bt,toggleLabels:Vt,toggleTooltip:Ht,toggleAnnotator:Wt,toggleFullscreen:zt,toggleZoom:Ut,copyAlt:an}),(e,t)=>(x(),p(`div`,{ref_key:`moleculeChart`,ref:j,class:Me(`vue-data-ui-component vue-ui-molecule ${X.value?`vue-data-ui-wrapper-fullscreen`:``}`),style:b(`font-family:${M.value.style.fontFamily};width:100%; text-align:center;background:${P.value.backgroundColor}`),id:`cluster_${O.value}`,onMouseleave:t[2]||=e=>{q.value=null,J.value=null,w(_t)(!1)},onMouseenter:t[3]||=()=>w(_t)(!0)},[F.value.buttons.annotator&&w(B)?(x(),d(w($e),{key:0,svgRef:w(B),backgroundColor:P.value.backgroundColor,color:P.value.color,active:Z.value,isCursorPointer:I.value,onClose:Wt},ke({_:2},[Pe(w(i),t=>({name:t,fn:E(n=>[C(e.$slots,t,y(_(w(r)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`])):f(``,!0),Tt.value?(x(),p(`div`,Ve,null,512)):f(``,!0),P.value.title.text?(x(),p(`div`,He,[(x(),d(w(Je),{key:`title_${ft.value}`,config:{title:{cy:`molecule-div-title`,...P.value.title},subtitle:{cy:`molecule-div-subtitle`,...P.value.title.subtitle}}},null,8,[`config`]))])):f(``,!0),F.value.show&&ct.value&&(w(vt)||w(z))?(x(),d(w(et),{ref_key:`userOptionsRef`,ref:ht,key:`user_options_${dt.value}`,backgroundColor:P.value.backgroundColor,color:P.value.color,isPrinting:w(H),isImaging:w(St),uid:O.value,hasTooltip:F.value.buttons.tooltip&&N.value.show,hasPdf:F.value.buttons.pdf,hasXls:F.value.buttons.csv,hasImg:F.value.buttons.img,hasSvg:F.value.buttons.svg,hasTable:F.value.buttons.table,hasLabel:F.value.buttons.labels,hasFullscreen:F.value.buttons.fullscreen,hasAltCopy:F.value.buttons.altCopy,isTooltip:U.value.showTooltip,titles:{...F.value.buttonTitles},chartElement:j.value,position:F.value.position,hasAnnotator:F.value.buttons.annotator,isAnnotation:Z.value,callbacks:F.value.callbacks,printScale:F.value.print.scale,tableDialog:M.value.table.useDialog,hasZoom:F.value.buttons.zoom,isZoom:U.value.showZoom,isCursorPointer:I.value,onToggleFullscreen:zt,onGeneratePdf:w(Ct),onGenerateCsv:Lt,onGenerateImage:w(rn),onGenerateSvg:w(nn),onToggleTable:Bt,onToggleLabels:Vt,onToggleTooltip:Ht,onToggleAnnotator:Wt,onToggleZoom:Ut,onCopyAlt:an,style:b({visibility:w(vt)?w(z)?`visible`:`hidden`:`visible`})},ke({_:2},[Pe(w(a)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionZoom optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:E(n=>[C(e.$slots,t,y(_(w(o)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasLabel.hasFullscreen.hasAltCopy.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.hasZoom.isZoom.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):f(``,!0),(x(),p(`svg`,{ref_key:`svgRef`,ref:B,key:`svg_${bt.value}`,xmlns:w(ue),viewBox:`${w(Q).x} ${w(Q).y} ${w(Q).width} ${w(Q).height}`,class:Me({"vue-data-ui-fullscreen--on":X.value,"vue-data-ui-fulscreen--off":!X.value}),style:b(`overflow: hidden; background:transparent;color:${P.value.color}`)},[h(w(tt)),e.$slots[`chart-background`]?(x(),p(`foreignObject`,{key:0,x:0,y:0,width:W.value.width<=0?10:W.value.width,height:W.value.height<=0?10:W.value.height,style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,We)):f(``,!0),m(`defs`,null,[(x(!0),p(Oe,null,Pe(Object.keys(jt.value),(e,t)=>(x(),d(xe,{t:`radial`,id:`gradient_${e}`,key:`gradient_${e}_${t}`,cx:`50%`,cy:`30%`,r:`50%`,fx:`50%`,fy:`50%`,stops:[[`0%`,w(c)(e,.5),1],[`100%`,e,1]]},null,8,[`id`,`stops`]))),128))]),h(w(nt),{dataset:G.value,color:P.value.links.stroke,backgroundColor:P.value.backgroundColor,useChildColor:P.value.links.useChildColor},null,8,[`dataset`,`color`,`backgroundColor`,`useChildColor`]),h(w(it),{dataset:G.value,hoveredUid:J.value,stroke:P.value.nodes.stroke,strokeHovered:P.value.nodes.strokeHovered,onClick:Yt,onHover:Pt},{node:E(({node:t})=>[C(e.$slots,`node`,y(_({node:t})),void 0,!0)]),"node-svg":E(({nodeSvg:t})=>[C(e.$slots,`node-svg`,y(_({nodeSvg:t})),void 0,!0)]),_:3},8,[`dataset`,`hoveredUid`,`stroke`,`strokeHovered`]),U.value.showDataLabels&&!w(L)?(x(),d(w(rt),{key:1,dataset:G.value,color:P.value.color,hoveredUid:J.value},null,8,[`dataset`,`color`,`hoveredUid`])):f(``,!0),C(e.$slots,`svg`,{svg:{...W.value,drawingArea:{...w(Q)},isPrintingImg:w(H)||w(St)||w(en),isPrintingSvg:w(tn)}},void 0,!0)],14,Ue)),e.$slots.watermark?(x(),p(`div`,Ge,[C(e.$slots,`watermark`,y(_({isPrinting:w(H)||w(St)||w(en)||w(tn)})),void 0,!0)])):f(``,!0),w(qt)?(x(),p(`div`,Ke,[C(e.$slots,`reset-action`,{reset:w(Kt)},()=>[m(`button`,{"data-cy-reset":``,tabindex:`0`,role:`button`,class:`vue-data-ui-refresh-button`,style:b({background:P.value.backgroundColor,cursor:I.value?`pointer`:`default`}),onClick:t[0]||=e=>w(Kt)(!0)},[h(w(Xe),{name:`refresh`,stroke:P.value.color},null,8,[`stroke`])],4)],!0)])):f(``,!0),e.$slots.source?(x(),p(`div`,qe,[C(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),h(w(Ye),{teleportTo:N.value.teleportTo,show:U.value.showTooltip&&k.value,backgroundColor:N.value.backgroundColor,color:N.value.color,borderRadius:N.value.borderRadius,borderColor:N.value.borderColor,borderWidth:N.value.borderWidth,fontSize:N.value.fontSize,backgroundOpacity:N.value.backgroundOpacity,position:N.value.position,offsetX:N.value.offsetX,offsetY:N.value.offsetY,parent:j.value,content:A.value,isFullscreen:X.value,isCustom:N.value.customFormat&&typeof N.value.customFormat==`function`,smooth:N.value.smooth,backdropFilter:N.value.backdropFilter,smoothForce:N.value.smoothForce,smoothSnapThreshold:N.value.smoothSnapThreshold},{"tooltip-before":E(()=>[C(e.$slots,`tooltip-before`,y(_({...K.value})),void 0,!0)]),tooltip:E(()=>[C(e.$slots,`tooltip`,y(_({...K.value})),void 0,!0)]),"tooltip-after":E(()=>[C(e.$slots,`tooltip-after`,y(_({...K.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`]),ct.value&&F.value.buttons.table?(x(),d(Fe($.value.component),je({key:7},$.value.props,{ref_key:`tableUnit`,ref:mt,onClose:Zt}),ke({content:E(()=>[(x(),d(w(Qe),{key:`table_${pt.value}`,colNames:Y.value.colNames,head:Y.value.head,body:Y.value.body,config:Y.value.config,title:M.value.table.useDialog?``:$.value.title,withCloseButton:!M.value.table.useDialog,isCursorPointer:I.value,onClose:Zt},{th:E(({th:e})=>[m(`div`,null,Ie(e),1)]),td:E(({td:e})=>[Ae(Ie(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[M.value.table.useDialog?{name:`title`,fn:E(()=>[Ae(Ie($.value.title),1)]),key:`0`}:void 0,M.value.table.useDialog?{name:`actions`,fn:E(()=>[m(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[1]||=e=>Lt(F.value.callbacks.csv),style:b({cursor:I.value?`pointer`:`default`})},[h(w(Xe),{name:`fileCsv`,stroke:$.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):f(``,!0),C(e.$slots,`skeleton`,{},()=>[w(L)?(x(),d(ve,{key:0})):f(``,!0)],!0)],46,Be))}},[[`__scopeId`,`data-v-ca23df82`]]);export{ze as n,Je as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./tableIntegration-CNoJ1CIY.js";import{n as r,t as i}from"./annotationSlots-BRR85CqJ.js";import{n as a,t as ee}from"./userOptionsSlots-DYuo-E5m.js";import{$ as o,D as te,Jt as s,Lt as ne,M as re,X as ie,Yt as ae,at as oe,i as se,in as ce,nt as le,t as ue,zt as de}from"./lib-zDxoqrgo.js";import{n as fe,t as pe}from"./useHints-BH9r_0Vd.js";import{t as me}from"./useConfig-CKdzPrcf.js";import{t as he}from"./usePrinter-CnyKPIFM.js";import{n as ge,t as _e}from"./BaseScanner-8NdoBs7B.js";import{t as ve}from"./useChartExport-DtPNpc9M.js";import{n as ye}from"./Title-BRAjxtjG.js";import{t as be}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{l as xe,t as Se}from"./useResponsive-D2CPcpda.js";import{t as Ce}from"./DefGrad-DKMq1REY.js";import{t as we}from"./A11yDataTable-DWNlWXzs.js";import{t as Te}from"./resolveChartConfig-BSo1Oe9n.js";import{t as Ee}from"./useUserOptionState-CXlFnwPv.js";import{t as De}from"./useChartAccessibility-DOMuYJfm.js";import{t as Oe}from"./chartImage-NwZO-elv.js";import{t as ke}from"./Legend-DokTll4u.js";import{t as Ae}from"./vue_ui_mood_radar-CXaBdJnv.js";import{Fragment as je,Teleport as Me,computed as c,createBlock as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createSlots as Ne,createTextVNode as Pe,createVNode as p,defineAsyncComponent as m,guardReactiveProps as h,mergeProps as Fe,nextTick as Ie,normalizeClass as Le,normalizeProps as Re,normalizeStyle as g,onMounted as ze,openBlock as _,ref as v,renderList as Be,renderSlot as y,resolveDynamicComponent as Ve,toDisplayString as b,toRefs as He,unref as x,watch as Ue,withCtx as S}from"vue";var We=/* @__PURE__ */ e({default:()=>C}),Ge=[`id`],Ke=[`id`],qe=[`id`],Je={style:{position:`relative`}},Ye=[`xmlns`,`aria-describedby`,`viewBox`],Xe=[`width`,`height`],Ze=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],Qe=[`d`,`stroke`,`stroke-width`],$e=[`transform`],et=[`stroke`],tt=[`aria-label`,`fill`],nt=[`transform`],rt=[`stroke`],it=[`aria-label`,`fill`],at=[`transform`],ot=[`stroke`],st=[`aria-label`,`fill`],ct=[`transform`],lt=[`stroke`],ut=[`aria-label`,`fill`],dt=[`transform`],ft=[`stroke`],pt=[`aria-label`,`fill`],mt=[`d`,`stroke`,`stroke-width`,`fill`],ht=[`x1`,`y1`,`x2`,`y2`,`stroke`],gt=[`cx`,`cy`,`fill`,`stroke`],_t=[`cx`,`cy`,`fill`,`stroke`],vt=[`x`,`y`,`fill`,`font-weight`],yt=[`x`,`y`,`fill`],bt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},xt={key:5,class:`vue-data-ui-watermark`},St=[`id`],Ct=[`onClick`,`onKeydown`],wt={key:0},Tt={key:1},C=/*#__PURE__*/ be({__name:`vue-ui-mood-radar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:be,emit:We}){let C=m(()=>import(`./BaseIcon-Cz30ODFA.js`).then(e=>e.n)),Et=m(()=>import(`./vue-ui-accordion-Dy5OVFKr.js`).then(e=>e.n)),Dt=m(()=>import(`./DataTable-DSUA5M9p.js`)),Ot=m(()=>import(`./PenAndPaper-DvJJaeU2.js`).then(e=>e.t)),kt=m(()=>import(`./UserOptions-D65t74CM.js`).then(e=>e.n)),At=m(()=>import(`./PackageVersion-D6pKL176.js`).then(e=>e.t)),jt=m(()=>import(`./BaseDraggableDialog-T1gEsQid.js`).then(e=>e.n)),{vue_ui_mood_radar:Mt}=me(),w=e,Nt=We,T=v(ie()),E=v(null),D=v(null),Pt=v(null),Ft=v(0),It=v(0),Lt=v(0),Rt=v(null),zt=v(null),O=v(null),Bt=v(null),Vt=v(null),Ht=v(!1),Ut=v(null),Wt=v(null),k=v(null),Gt=v(!1),Kt=c(()=>!!w.dataset&&Object.keys(w.dataset).length),A=v(en()),j=c(()=>A.value.userOptions),M=c(()=>A.value.style.chart.layout.smileys),N=c(()=>A.value.style.chart.layout),P=c(()=>A.value.style.chart);fe({config:()=>A.value,dataset:()=>w.dataset,component:`VueUiMoodRadar`,rules:[pe.noHint]});let F=c(()=>A.value.userOptions.useCursorPointer),qt=c(()=>ce({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{grid:{stroke:`#6A6A6A`},outerPolygon:{stroke:`#6A6A6A`},dataPolygon:{color:`#6A6A6A`,opacity:30,stroke:`#6A6A6A`},smileys:{colors:{1:`#DBDBDB`,2:`#C4C4C4`,3:`#ADADAD`,4:`#969696`,5:`#808080`}},dataLabel:{color:`transparent`}},legend:{backgroundColor:`transparent`}}}},userConfig:A.value.skeletonConfig??{}})),{loading:Jt,FINAL_DATASET:I}=ge({...He(w),FINAL_CONFIG:A,prepareConfig:en,callback:()=>{Promise.resolve().then(async()=>{await Ie(),R.value.showTable=A.value.table.show})},skeletonDataset:w.config?.skeletonDataset??{1:1,2:1,3:1,4:1,5:1},skeletonConfig:ce({defaultConfig:A.value,userConfig:qt.value})});ze(()=>{Ht.value=!0,Xt()});let Yt=c(()=>A.value.debug);function Xt(){if(de(w.dataset)&&oe({componentName:`VueUiMoodRadar`,type:`dataset`,debug:Yt.value}),A.value.responsive){let e=xe(()=>{let{width:e,height:t}=Se({chart:E.value,title:P.value.title.text?Rt.value:null,legend:P.value.legend.show?zt.value:null,noTitle:Pt.value,source:Vt.value});requestAnimationFrame(()=>{z.value.width=e,z.value.height=t-12})});O.value&&(Bt.value&&O.value.unobserve(Bt.value),O.value.disconnect()),O.value=new ResizeObserver(e),Bt.value=E.value.parentNode,O.value.observe(Bt.value)}}let{userOptionsVisible:Zt,setUserOptionsVisibility:Qt,keepUserOptionState:$t}=Ee({config:A.value}),{svgRef:L}=De({config:P.value.title});function en(){return Te(w.config,Mt,Ae)}Ue(()=>w.config,e=>{A.value=en(),Zt.value=!A.value.userOptions.showOnChartHover,Xt(),Ft.value+=1,It.value+=1,Lt.value+=1,R.value.showTable=A.value.table.show},{deep:!0});let{isPrinting:tn,isImaging:nn,generatePdf:rn,generateImage:an}=he({elementId:T.value,fileName:P.value.title.text||`vue-ui-mood-radar`,options:A.value.userOptions.print}),on=c(()=>A.value.userOptions.show&&!P.value.title.text),R=v({showTable:A.value.table.show}),z=v({height:256,width:256}),sn={5:{x:128,y:35},4:{x:218,y:98.5},3:{x:185,y:204},2:{x:70,y:204},1:{x:38.5,y:98.5}},cn=c(()=>{let e={};return pn.value.forEach(t=>{e[t.key]={x:t.x,y:t.y}}),e});function B(e){let t=sn[e],n=cn.value[e]||t;return`translate(${n.x-t.x}, ${n.y-t.y})`}let ln=c(()=>re({plot:{x:z.value.width/2,y:z.value.height/2},radius:Math.min(z.value.height,z.value.width)*.35,sides:5,rotation:11}));function un({centerX:e,centerY:t,apexX:n,apexY:r,proportion:i,key:a,value:ee}){return{x:e+(n-e)*i,y:t+(r-t)*i,key:a,value:ee}}let dn=c(()=>Math.max(...Object.values(I.value).map(e=>isNaN(e)?0:e))),V=c(()=>Object.values(I.value).reduce((e,t)=>(isNaN(e)?0:e)+(isNaN(t)?0:t),0)),H=c(()=>Object.keys(I.value).map((e,t)=>{let n=typeof I.value[e]!=`number`||isNaN(I.value[e])?0:I.value[e];return{index:t,key:e,value:n,proportion:n/V.value,color:M.value.colors[e]}}).map(e=>({...e,onSelect:()=>U(e.key)})).sort((e,t)=>t.key-e.key)),fn=c(()=>H.value.map((e,t)=>({...e,display:`${se(N.value.dataLabel.formatter,e.value,o({p:N.value.dataLabel.prefix,v:e.value,s:N.value.dataLabel.suffix,r:N.value.dataLabel.roundingValue}))}${Jt.value?``:` (${o({v:e.proportion*100,s:`%`,r:P.value.legend.roundingPercentage})})`}`}))),pn=c(()=>([`1`,`2`,`3`,`4`,`5`].forEach(e=>{[null,void 0].includes(I.value[e])&&oe({componentName:`VueUiMoodRadar`,type:`datasetAttribute`,property:e,debug:Yt.value})}),ln.value.coordinates.map((e,t)=>{let n=un({centerX:z.value.width/2,centerY:z.value.height/2,apexX:e.x,apexY:e.y,proportion:H.value[t].value/dn.value,key:H.value[t].key,value:H.value[t].value});return{...e,plots:n,key:H.value[t].key}}))),mn=c(()=>({cy:`mood-radar-legend`,backgroundColor:P.value.legend.backgroundColor,color:P.value.legend.color,fontSize:P.value.legend.fontSize,paddingBottom:12,fontWeight:P.value.legend.bold?`bold`:``}));function U(e){e===D.value?D.value=null:(D.value=e,K(e))}function W(e){D.value=e;let t=H.value.find(t=>t.key===e);A.value.events.datapointEnter&&A.value.events.datapointEnter({datapoint:t,seriesIndex:t.index})}function G(e){D.value=null;let t=H.value.find(t=>t.key===e);A.value.events.datapointLeave&&A.value.events.datapointLeave({datapoint:t,seriesIndex:t.index})}function K(e){let t=H.value.find(t=>t.key===e);A.value.events.datapointClick&&A.value.events.datapointClick({datapoint:t,seriesIndex:t.index})}let q=c(()=>({head:H.value.map(e=>({name:e.key,color:e.color})),body:H.value.map(e=>isNaN(e.value)?0:e.value)}));function hn(e=null){Ie(()=>{let t=q.value.head.map((e,t)=>[[e.name],[q.value.body[t]],[isNaN(q.value.body[t]/V.value)?`-`:q.value.body[t]/V.value*100]]),n=[[P.value.title.text],[P.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(t),r=te(n);e?e(r):le({csvContent:r,title:P.value.title.text||`vue-ui-mood-radar`})})}let J=c(()=>({head:[`__SUM__`,Number(V.value.toFixed(A.value.table.td.roundingValue)).toLocaleString(),`100%`],body:q.value.head.map((e,t)=>[{color:e.color,name:e.name},q.value.body[t].toFixed(A.value.table.td.roundingValue),isNaN(q.value.body[t]/V.value)?`-`:(q.value.body[t]/V.value*100).toFixed(A.value.table.td.roundingPercentage)+`%`]),config:{th:{backgroundColor:A.value.table.th.backgroundColor,color:A.value.table.th.color,outline:A.value.table.th.outline},td:{backgroundColor:A.value.table.td.backgroundColor,color:A.value.table.td.color,outline:A.value.table.td.outline},breakpoint:A.value.table.responsiveBreakpoint},colNames:[A.value.table.columnNames.series,A.value.table.columnNames.value,A.value.table.columnNames.percentage]}));function gn(){return H.value}function _n(){R.value.showTable=!R.value.showTable}let Y=v(!1);function vn(e){Y.value=e}let X=v(!1);function yn(){X.value=!X.value}let bn=Oe(E,()=>P.value.title.text),Z=c(()=>n({config:A,style:P,mutableConfig:R,dialog:jt,accordion:Et,isFullscreen:Y,parent:E,maxWidth:800,isCursorPointer:F}));Ue(()=>R.value.showTable,e=>t(e,A,Ut));function xn(){R.value.showTable=!1,Wt.value&&Wt.value.setTableIconState(!1)}let Sn=c(()=>fn.value.map(e=>({...e,name:e.display,shape:`circle`}))),Cn=c(()=>P.value.backgroundColor),wn=c(()=>P.value.legend),Tn=c(()=>P.value.title),{isCallbackImaging:En,isCallbackSvg:Dn,generateSvg:On,onGenerateImage:kn}=ve({svg:L,title:Tn,legend:wn,legendItems:Sn,backgroundColor:Cn,getSvgCallback:()=>A.value.userOptions.callbacks.svg,generateImage:an});async function An(){if(Nt(`copyAlt`,{config:A.value,dataset:H.value}),!A.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:H.value}))}let Q=c(()=>H.value.map(e=>String(e.key)));function jn(){Qt(!0)}function Mn(){Qt(!1)}function Nn(e){return H.value.find(t=>String(t.key)===String(e))}function Pn(e,t,n){return se(N.value.dataLabel.formatter,e,o({p:N.value.dataLabel.prefix,v:e,s:N.value.dataLabel.suffix,r:N.value.dataLabel.roundingValue}),{datapoint:n,seriesIndex:t})}function Fn(e){return o({v:V.value?e/V.value*100:0,s:`%`,r:N.value.dataLabel.roundingPercentage})}function $(e){let t=Nn(e);return t?`${e}, ${Pn(t.value,t.index,t)}, ${Fn(t.value)}`:`${e}`}function In(e){let t=Q.value[e];t&&(k.value=e,D.value=t)}function Ln(){Gt.value=!0}function Rn(){k.value=null,D.value=null,Gt.value=!1}function zn(e){if(!L.value||!Q.value.length||X.value||document.activeElement!==L.value)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){k.value=null,D.value=null;return}if(r){if(k.value===null)return;let e=Q.value[k.value];if(!e)return;U(e);return}let a=k.value;a===null||a<0||a>=Q.value.length?a=n?0:Q.value.length-1:n?(a+=1,a>=Q.value.length&&(a=0)):t&&(--a,a<0&&(a=Q.value.length-1)),In(a)}function Bn(e,t){let n=e.key===`Enter`||e.key===` `,r=e.key===`Escape`;if(n||r){if(e.preventDefault(),e.stopPropagation(),r){k.value=null,D.value=null;return}U(String(t))}}let Vn=c(()=>({headers:J.value?.colNames??[],rows:H.value.map(e=>[String(e.key),Pn(e.value,e.index,e),Fn(e.value)])}));return be({getData:gn,getImage:bn,generatePdf:rn,generateCsv:hn,generateImage:an,generateSvg:On,toggleTable:_n,toggleAnnotator:yn,toggleFullscreen:vn,copyAlt:An}),(e,t)=>(_(),d(`div`,{class:Le(`vue-data-ui-component vue-ui-mood-radar ${Y.value?`vue-data-ui-wrapper-fullscreen`:``} ${A.value.useCssAnimation?``:`vue-ui-dna`}`),ref_key:`moodRadarChart`,ref:E,id:`${T.value}`,style:g(`font-family:${A.value.style.fontFamily};width:100%; text-align:center;background:${P.value.backgroundColor}`),onMouseenter:jn,onMouseleave:Mn},[f(`div`,{id:`chart-instructions-${T.value}`,class:`sr-only`},[f(`p`,null,b(A.value.a11y.translations.keyboardNavigation),1)],8,Ke),Vn.value?.rows?.length?(_(),l(we,{key:0,uid:T.value,head:Vn.value.headers,body:Vn.value.rows,notice:A.value.a11y.translations.tableAvailable,caption:A.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):u(``,!0),j.value.buttons.annotator?(_(),l(x(Ot),{key:1,svgRef:x(L),backgroundColor:P.value.backgroundColor,color:P.value.color,active:X.value,isCursorPointer:F.value,palette:j.value.annotatorPalette,onClose:yn},Ne({_:2},[Be(x(i),t=>({name:t,fn:S(n=>[y(e.$slots,t,Re(h(x(r)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):u(``,!0),on.value?(_(),d(`div`,{key:2,ref_key:`noTitle`,ref:Pt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):u(``,!0),P.value.title.text?(_(),d(`div`,{key:3,ref_key:`chartTitle`,ref:Rt,style:`width:100%;background:transparent`},[p(ye,{config:{title:{cy:`mood-radar-title`,...P.value.title},subtitle:{cy:`mood-radar-subtitle`,...P.value.title.subtitle}}},null,8,[`config`])],512)):u(``,!0),f(`div`,{id:`legend-top-${T.value}`},null,8,qe),j.value.show&&Kt.value&&(x($t)||x(Zt))?(_(),l(x(kt),{key:4,ref_key:`userOptionsRef`,ref:Wt,backgroundColor:P.value.backgroundColor,color:P.value.color,isPrinting:x(tn),isImaging:x(nn),uid:T.value,hasPdf:j.value.buttons.pdf,hasXls:j.value.buttons.csv,hasImg:j.value.buttons.img,hasSvg:j.value.buttons.svg,hasTable:j.value.buttons.table,hasFullscreen:j.value.buttons.fullscreen,hasAltCopy:j.value.buttons.altCopy,isFullscreen:Y.value,titles:{...j.value.buttonTitles},chartElement:E.value,position:j.value.position,hasAnnotator:j.value.buttons.annotator,isAnnotation:X.value,callbacks:j.value.callbacks,printScale:j.value.print.scale,tableDialog:A.value.table.useDialog,isCursorPointer:F.value,onToggleFullscreen:vn,onGeneratePdf:x(rn),onGenerateCsv:hn,onGenerateImage:x(kn),onGenerateSvg:x(On),onToggleTable:_n,onToggleAnnotator:yn,onCopyAlt:An,style:g({visibility:x($t)?x(Zt)?`visible`:`hidden`:`visible`})},Ne({_:2},[Be(x(a)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:S(n=>[y(e.$slots,t,Re(h(x(ee)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):u(``,!0),f(`div`,Je,[(_(),d(`svg`,{ref_key:`svgRef`,ref:L,xmlns:x(ue),"aria-describedby":`chart-instructions-${T.value}`,viewBox:`0 0 ${z.value.width} ${z.value.height}`,class:Le({"vue-data-ui-fullscreen--on":Y.value,"vue-data-ui-fulscreen--off":!Y.value}),style:g(`overflow:visible;background:transparent;color:${P.value.color}`),tabindex:`0`,onFocus:Ln,onBlur:Rn,onKeydown:zn},[p(x(At)),e.$slots[`chart-background`]?(_(),d(`foreignObject`,{key:0,x:0,y:0,width:z.value.width,height:z.value.height,style:{pointerEvents:`none`}},[y(e.$slots,`chart-background`,{},void 0,!0)],8,Xe)):u(``,!0),f(`defs`,null,[p(Ce,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`mood_radar_gradient_${T.value}`,stops:[[`0%`,x(s)(N.value.dataPolygon.color,N.value.dataPolygon.opacity),1],[`100%`,x(s)(x(ae)(N.value.dataPolygon.color,N.value.dataPolygon.gradient.intensity/100),N.value.dataPolygon.opacity),1]]},null,8,[`id`,`stops`])]),(_(!0),d(je,null,Be(ln.value.coordinates,e=>(_(),d(`line`,{x1:z.value.width/2,y1:z.value.height/2,x2:e.x,y2:e.y,stroke:N.value.grid.stroke,"stroke-width":N.value.grid.strokeWidth},null,8,Ze))),256)),f(`path`,{d:ln.value.path,fill:`none`,stroke:N.value.outerPolygon.stroke,"stroke-width":N.value.outerPolygon.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`},null,8,Qe),f(`g`,{transform:B(`5`)},[f(`path`,{fill:`none`,stroke:M.value.colors[5],"stroke-width":`1`,"stroke-linecap":`round`,d:`M119 25A1 1 0 00137 25 1 1 0 00119 25M123 26C124 33 132 33 133 26L123 26M123 22A1 1 0 00126 22 1 1 0 00123 22M130 22A1 1 0 00133 22 1 1 0 00130 22`},null,8,et),f(`circle`,{role:`button`,class:`vue-ui-mood-radar-trap`,cx:`128`,cy:`25`,r:`20`,"aria-label":$(`5`),fill:D.value===`5`?x(s)(M.value.colors[5],20):`transparent`,onMouseenter:t[0]||=e=>W(`5`),onMouseleave:t[1]||=e=>G(`5`),onClick:t[2]||=e=>K(`5`)},null,40,tt)],8,$e),f(`g`,{transform:B(`4`)},[f(`path`,{fill:`none`,stroke:M.value.colors[4],"stroke-width":`1`,"stroke-linecap":`round`,d:`M218 95A1 1 0 00236 95 1 1 0 00218 95M222 97C225 99 229 99 232 97M222 92A1 1 0 00225 92 1 1 0 00222 92M229 92A1 1 0 00232 92 1 1 0 00229 92`},null,8,rt),f(`circle`,{class:`vue-ui-mood-radar-trap`,cx:`227`,cy:`95.5`,r:`20`,"aria-label":$(`4`),fill:D.value===`4`?x(s)(M.value.colors[4],20):`transparent`,onMouseenter:t[3]||=e=>W(`4`),onMouseleave:t[4]||=e=>G(`4`),onClick:t[5]||=e=>K(`4`)},null,40,it)],8,nt),f(`g`,{transform:B(`3`)},[f(`path`,{fill:`none`,stroke:M.value.colors[3],"stroke-width":`1`,"stroke-linecap":`round`,d:`M181 213A1 1 0 00199 213 1 1 0 00181 213M185 210A1 1 0 00188 210 1 1 0 00185 210M192 210A1 1 0 00195 210 1 1 0 00192 210M185 215 195 215`},null,8,ot),f(`circle`,{class:`vue-ui-mood-radar-trap`,cx:`190`,cy:`213.5`,r:`20`,"aria-label":$(`3`),fill:D.value===`3`?x(s)(M.value.colors[3],20):`transparent`,onMouseenter:t[6]||=e=>W(`3`),onMouseleave:t[7]||=e=>G(`3`),onClick:t[8]||=e=>K(`3`)},null,40,st)],8,at),f(`g`,{transform:B(`2`)},[f(`path`,{fill:`none`,stroke:M.value.colors[2],"stroke-width":`1`,"stroke-linecap":`round`,d:`M56 213A1 1 0 0074 213 1 1 0 0056 213M60 216C63 214 67 214 70 216M60 210A1 1 0 0063 210 1 1 0 0060 210M67 210A1 1 0 0070 210 1 1 0 0067 210`},null,8,lt),f(`circle`,{class:`vue-ui-mood-radar-trap`,cx:`65`,cy:`213.5`,r:`20`,"aria-label":$(`2`),fill:D.value===`2`?x(s)(M.value.colors[2],20):`transparent`,onMouseenter:t[9]||=e=>W(`2`),onMouseleave:t[10]||=e=>G(`2`),onClick:t[11]||=e=>K(`2`)},null,40,ut)],8,ct),f(`g`,{transform:B(`1`)},[f(`path`,{fill:`none`,stroke:M.value.colors[1],"stroke-width":`1`,"stroke-linecap":`round`,d:`M20 96A1 1 0 0038 96 1 1 0 0020 96M24 100C25 95 33 95 34 100L24 100M24 93A1 1 0 0027 93 1 1 0 0024 93M31 93A1 1 0 0034 93 1 1 0 0031 93`},null,8,ft),f(`circle`,{class:`vue-ui-mood-radar-trap`,cx:`29`,cy:`95.5`,r:`20`,"aria-label":$(`1`),fill:D.value===`1`?x(s)(M.value.colors[1],20):`transparent`,onMouseenter:t[12]||=e=>W(`1`),onMouseleave:t[13]||=e=>G(`1`),onClick:t[14]||=e=>K(`1`)},null,40,pt)],8,dt),f(`path`,{d:x(ne)(pn.value.map(e=>e.plots)),stroke:N.value.dataPolygon.stroke,"stroke-width":N.value.dataPolygon.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:N.value.dataPolygon.gradient.show?`url(#mood_radar_gradient_${T.value})`:x(s)(N.value.dataPolygon.color,N.value.dataPolygon.opacity)},null,8,mt),(_(!0),d(je,null,Be(pn.value.map(e=>e.plots),(e,t)=>(_(),d(`g`,{class:`vue-ui-mood-radar-trap`,style:g(`opacity:${D.value==e.key?`1`:`0`}`)},[f(`line`,{x1:e.x,y1:e.y,x2:z.value.width/2,y2:z.value.height/2,stroke:M.value.colors[e.key]},null,8,ht),f(`circle`,{cx:e.x,cy:e.y,fill:M.value.colors[e.key],r:`3`,stroke:P.value.backgroundColor,"stroke-width":.5},null,8,gt),f(`circle`,{cx:z.value.width/2,cy:z.value.height/2,fill:M.value.colors[e.key],r:`3`,stroke:P.value.backgroundColor,"stroke-width":.5},null,8,_t),f(`text`,{x:z.value.width/2,y:[`5`,5].includes(e.key)?z.value.height/2*1.13:z.value.height/2*.9375,fill:N.value.dataLabel.color,"font-size":`12`,"text-anchor":`middle`,"font-weight":N.value.dataLabel.bold?`bold`:`normal`},b(x(se)(N.value.dataLabel.formatter,e.value,x(o)({p:N.value.dataLabel.prefix,v:e.value,s:N.value.dataLabel.suffix,r:N.value.dataLabel.roundingValue}),{datapoint:e,seriesIndex:t})),9,vt),f(`text`,{x:z.value.width/2,y:[`5`,5].includes(e.key)?z.value.height/2*1.273:z.value.height/2*.7968,fill:N.value.dataLabel.color,"font-size":`12`,"text-anchor":`middle`},` (`+b(x(o)({v:e.value/V.value*100,s:`%`,r:N.value.dataLabel.roundingPercentage}))+`) `,9,yt)],4))),256)),y(e.$slots,`svg`,{svg:{...z.value,isPrintingImg:x(tn)||x(nn)||x(En),isPrintingSvg:x(Dn)}},void 0,!0)],46,Ye)),e.$slots.hint?(_(),d(`div`,bt,[y(e.$slots,`hint`,Re(h({hint:A.value.a11y.translations.keyboardNavigation,isVisible:Gt.value})),void 0,!0)])):u(``,!0)]),e.$slots.watermark?(_(),d(`div`,xt,[y(e.$slots,`watermark`,Re(h({isPrinting:x(tn)||x(nn)||x(En)||x(Dn)})),void 0,!0)])):u(``,!0),f(`div`,{id:`legend-bottom-${T.value}`},null,8,St),Ht.value&&(P.value.legend.show||e.$slots.legend)?(_(),l(Me,{key:6,to:P.value.legend.position===`top`?`#legend-top-${T.value}`:`#legend-bottom-${T.value}`},[f(`div`,{ref_key:`chartLegend`,ref:zt},[y(e.$slots,`legend`,{legend:H.value},()=>[P.value.legend.show?(_(),l(ke,{legendSet:fn.value,config:mn.value,key:`legend_${Lt.value}`,isCursorPointer:F.value,style:{display:`flex`,"row-gap":`6px`},onFocusMarker:t[15]||=({legend:e})=>U(e.key)},{item:S(({legend:e,index:t})=>[f(`div`,{role:`button`,onClick:()=>U(e.key),style:{display:`flex`,"flex-direction":`row`,gap:`3px`,"align-items":`center`,margin:`3px 0`},onKeydown:t=>Bn(t,String(e.key))},[e.key==1?(_(),l(x(C),{key:0,strokeWidth:1,name:`moodSad`,stroke:M.value.colors[e.key]},null,8,[`stroke`])):u(``,!0),e.key==2?(_(),l(x(C),{key:1,strokeWidth:1,name:`moodFlat`,stroke:M.value.colors[e.key]},null,8,[`stroke`])):u(``,!0),e.key==3?(_(),l(x(C),{key:2,strokeWidth:1,name:`moodNeutral`,stroke:M.value.colors[e.key]},null,8,[`stroke`])):u(``,!0),e.key==4?(_(),l(x(C),{key:3,strokeWidth:1,name:`smiley`,stroke:M.value.colors[e.key]},null,8,[`stroke`])):u(``,!0),e.key==5?(_(),l(x(C),{key:4,strokeWidth:1,name:`moodHappy`,stroke:M.value.colors[e.key]},null,8,[`stroke`])):u(``,!0),x(Jt)?u(``,!0):(_(),d(`span`,{key:5,style:g({fontWeight:P.value.legend.bold?`bold`:`normal`})},b(e.display),5))],40,Ct)]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):u(``,!0)],!0)],512)],8,[`to`])):u(``,!0),e.$slots.source?(_(),d(`div`,{key:7,ref_key:`source`,ref:Vt,dir:`auto`},[y(e.$slots,`source`,{},void 0,!0)],512)):u(``,!0),Kt.value&&j.value.buttons.table?(_(),l(Ve(Z.value.component),Fe({key:8},Z.value.props,{ref_key:`tableUnit`,ref:Ut,onClose:xn}),Ne({content:S(()=>[p(x(Dt),{colNames:J.value.colNames,head:J.value.head,body:J.value.body,config:J.value.config,title:A.value.table.useDialog?``:Z.value.title,withCloseButton:!A.value.table.useDialog,isCursorPointer:F.value,onClose:xn},{th:S(({th:e})=>[e===`__SUM__`?(_(),d(`div`,wt,[p(x(C),{name:`sigma`,stroke:J.value.config.th.color,size:16},null,8,[`stroke`])])):(_(),d(`div`,Tt,b(e),1))]),td:S(({td:e})=>[Pe(b(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`])]),_:2},[A.value.table.useDialog?{name:`title`,fn:S(()=>[Pe(b(Z.value.title),1)]),key:`0`}:void 0,A.value.table.useDialog?{name:`actions`,fn:S(()=>[f(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[16]||=e=>hn(j.value.callbacks.csv),style:g({cursor:F.value?`pointer`:`default`})},[p(x(C),{name:`fileCsv`,stroke:Z.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):u(``,!0),y(e.$slots,`skeleton`,{},()=>[x(Jt)?(_(),l(_e,{key:0})):u(``,!0)],!0)],46,Ge))}},[[`__scopeId`,`data-v-5d5591fd`]]);export{We as n,C as t};
@@ -1,19 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,t as n}from"./tableIntegration-CNoJ1CIY.js";import{n as r,t as i}from"./annotationSlots-BRR85CqJ.js";import{n as a,t as o}from"./userOptionsSlots-DYuo-E5m.js";import{$ as s,D as ee,Dt as c,Ht as te,It as ne,Jt as re,Kt as l,S as ie,Ut as ae,X as oe,Zt as se,at as ce,b as le,f as ue,i as de,in as fe,it as pe,n as me,nn as he,nt as ge,p as _e,pt as ve,t as ye,w as be,zt as xe}from"./lib-zDxoqrgo.js";import{n as Se,t as Ce}from"./useHints-BH9r_0Vd.js";import{t as we}from"./useConfig-CKdzPrcf.js";import{t as Te}from"./usePrinter-CnyKPIFM.js";import{n as Ee,t as De}from"./BaseScanner-8NdoBs7B.js";import{t as Oe}from"./useNestedProp-CT9phgWx.js";import{t as ke}from"./useThemeCheck-BKNRbGeC.js";import{t as Ae}from"./useChartExport-DtPNpc9M.js";import{n as je}from"./Title-BRAjxtjG.js";import{t as Me}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{l as Ne,t as Pe}from"./useResponsive-D2CPcpda.js";import{t as Fe}from"./DefGrad-DKMq1REY.js";import{t as Ie}from"./BaseLegendToggle-Dn_tNvn4.js";import{t as Le}from"./A11yDataTable-DWNlWXzs.js";import{t as Re}from"./useUserOptionState-CXlFnwPv.js";import{t as ze}from"./useChartAccessibility-DOMuYJfm.js";import{t as Be}from"./chartImage-NwZO-elv.js";import{t as Ve}from"./labelUtils-Djp5nJtN.js";import{t as He}from"./Legend-DokTll4u.js";import{t as Ue}from"./vue_ui_nested_donuts-CRtGsJcz.js";import{Fragment as u,Teleport as We,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Ge,createTextVNode as Ke,createVNode as qe,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as Je,nextTick as Ye,normalizeClass as Xe,normalizeProps as v,normalizeStyle as Ze,onBeforeUnmount as Qe,onMounted as $e,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as et,shallowRef as tt,toDisplayString as C,toRefs as nt,unref as w,vShow as rt,watch as it,withCtx as T,withDirectives as at}from"vue";var ot=/* @__PURE__ */ e({default:()=>Lt}),st=[`id`],ct=[`id`],lt=[`id`],ut={style:{position:`relative`}},dt=[`xmlns`,`aria-describedby`,`viewBox`],ft=[`width`,`height`],pt=[`id`],mt=[`id`],ht=[`id`],gt=[`flood-color`],_t=[`id`,`d`],vt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],yt=[`d`,`fill`,`stroke`,`stroke-width`],bt={key:1},xt=[`d`,`fill`],St={key:2},Ct=[`font-size`,`font-weight`,`fill`,`dy`],wt=[`href`],Tt=[`x`,`y`,`font-size`,`font-weight`,`fill`],Et={key:3},Dt=[`filter`],Ot=[`opacity`,`text-anchor`,`x`,`y`,`fill`,`font-size`,`font-weight`],kt=[`opacity`,`text-anchor`,`x`,`y`,`fill`,`font-size`,`font-weight`],At=[`d`,`fill`,`onMouseenter`,`onClick`,`onMouseleave`],jt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Mt={key:5,class:`vue-data-ui-watermark`},Nt=[`id`],Pt={key:0,class:`vue-ui-nested-donuts-legend-title`},Ft=[`onClick`],It={style:{display:`flex`,"align-items":`center`}},Lt=/*#__PURE__*/ Me({__name:`vue-ui-nested-donuts`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:Me,emit:ot}){let Lt=g(()=>import(`./Tooltip-BUXB0i6z.js`)),Rt=g(()=>import(`./BaseIcon-Cz30ODFA.js`).then(e=>e.n)),zt=g(()=>import(`./vue-ui-accordion-Dy5OVFKr.js`).then(e=>e.n)),Bt=g(()=>import(`./DataTable-DSUA5M9p.js`)),Vt=g(()=>import(`./UserOptions-D65t74CM.js`).then(e=>e.n)),Ht=g(()=>import(`./PenAndPaper-DvJJaeU2.js`).then(e=>e.t)),Ut=g(()=>import(`./PackageVersion-D6pKL176.js`).then(e=>e.t)),Wt=g(()=>import(`./BaseDraggableDialog-T1gEsQid.js`).then(e=>e.n)),{vue_ui_nested_donuts:Gt}=we(),{isThemeValid:Kt,warnInvalidTheme:qt}=ke(),E=e,Jt=d({get(){return!!E.dataset&&E.dataset.length},set(e){return e}}),D=b(oe()),Yt=b(!1),Xt=b(``),Zt=b(null),Qt=b(0),O=b(null),$t=b(null),en=b(null),tn=b(null),nn=b(null),rn=b(0),an=b(0),on=b(0),k=b(!0),A=b([]),sn=b([]),cn=b(!1),ln=b(null),un=b(null),j=b(null),dn=b({x:0,y:0}),fn=b(`pointer`),pn=b(!1),M=b(!1);function mn(e){M.value=e,Qt.value+=1}let N=b(Sn()),P=d(()=>N.value.style.chart.layout.labels),F=d(()=>N.value.style.chart.tooltip),I=d(()=>N.value.userOptions),L=d(()=>N.value.style.chart.layout),R=d(()=>N.value.style.chart);Se({config:()=>N.value,dataset:()=>E.dataset,component:`VueUiNestedDonuts`,rules:[Ce.emptyArray,{test:e=>e.some(e=>e.series.length>6),message:[`👀 Some series have > 6 data points. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" data point.`,``,`▶️ Using filters to let users choose a maximum number of data points to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]},{test:e=>e.length===1,message:[`👀 There is only one series in your dataset. Consider:`,``,`▶️ Using VueUiDonut instead.`]},{test:e=>e.length>6,message:[`👀 The number of series in your dataset > 6. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]}]});let z=d(()=>N.value.userOptions.useCursorPointer),hn={name:``,series:[{name:``,values:[3],color:`#BABABA`},{name:``,values:[2],color:`#AAAAAA`},{name:``,values:[1],color:`#CACACA`}]},gn=d(()=>fe({defaultConfig:{useCssAnimation:!1,table:{show:!1},startAnimation:{show:!1},userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{labels:{dataLabels:{show:!1}}},legend:{backgroundColor:`transparent`,showValue:!1,showPercentage:!1},title:{color:`#1A1A1A`,subtitle:{color:`#5A5A5A`}}}}},userConfig:N.value.skeletonConfig??{}})),{loading:_n,FINAL_DATASET:B,manualLoading:vn}=Ee({...nt(E),FINAL_CONFIG:N,prepareConfig:Sn,callback:()=>{Promise.resolve().then(async()=>{await En()})},skeletonDataset:E.config?.skeletonDataset??[hn,hn],skeletonConfig:fe({defaultConfig:N.value,userConfig:gn.value})}),{userOptionsVisible:yn,setUserOptionsVisibility:bn,keepUserOptionState:xn}=Re({config:N.value}),{svgRef:V}=ze({config:R.value.title});function Sn(){let e=Oe({userConfig:E.config,defaultConfig:Gt}),t={},n=e.theme;if(n){if(!Kt.value(e))qt(e),t=e;else{let r=Oe({userConfig:Ue[n]||E.config,defaultConfig:e});t={...Oe({userConfig:E.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:he[n]||te}}}else t=e;return t}let Cn=se(E.config);it(()=>E.config,(e,t)=>{let n=se(e),r=n!==Cn;Cn=n;let i=Sn();if(!r){N.value.style.chart.tooltip=i.style.chart.tooltip,W.value.showTooltip=N.value.style.chart.tooltip.show;return}_n.value||(N.value=i),yn.value=!N.value.userOptions.showOnChartHover,On(),rn.value+=1,an.value+=1,on.value+=1,W.value.dataLabels.show=P.value.dataLabels.show,W.value.showTable=N.value.table.show,W.value.showTooltip=F.value.show,G.value.width=R.value.width,G.value.height=R.value.height},{deep:!0});let wn=d(()=>{let{top:e,right:t,bottom:n,left:r}=R.value.padding;return{css:`padding:${e}px ${t}px ${n}px ${r}px`,top:e,right:t,bottom:n,left:r}});function Tn(e,t=1e3,n=50){return new Promise(r=>{let i=e.length;A.value=Array(i).fill(0),sn.value=[];let a=0;e.forEach((e,o)=>{setTimeout(()=>{let n=performance.now();function s(ee){let c=Math.min((ee-n)/t,1),te=e*pe(c);A.value[o]=te,A.value=[...A.value];let ne=[],re=0;E.dataset.forEach((e,t)=>{let n=le(e.series.reduce((e,t)=>e+le(l(t.values).reduce((e,t)=>e+t,0)),0))-le(A.value.slice(re,re+e.series.length).reduce((e,t)=>e+t,0));n>Number.MIN_VALUE&&ne.push({name:`__ghost__`,arcOf:e.name,arcOfId:`${D.value}_${t}`,id:`ghost_${D.value}_${t}`,seriesIndex:-1,datasetIndex:t,color:`transparent`,value:n,fullValue:n,absoluteValues:[],ghost:!0}),re+=e.series.length}),sn.value=ne,c<1?requestAnimationFrame(s):(a+=1,a===i&&r())}requestAnimationFrame(s)},o*n)})})}async function En(){if(N.value.startAnimation?.show){let e=B.value.flatMap(e=>e.series).map(e=>l(e.values).reduce((e,t)=>e+t,0));A.value=e.map(()=>0),k.value=!0,sn.value=B.value.map((e,t)=>{let n=e.series.reduce((e,t)=>e+l(t.values).reduce((e,t)=>e+t,0),0);return{name:`__ghost__`,arcOf:e.name,arcOfId:`${D.value}_${t}`,id:`ghost_${D.value}_${t}`,seriesIndex:-1,datasetIndex:t,color:`transparent`,value:n,fullValue:n,absoluteValues:[],ghost:!0}}),await Ye(),Tn(e,N.value.startAnimation.durationMs,N.value.startAnimation.staggerMs).then(()=>{k.value=!1,sn.value=[]})}else k.value=!1}$e(async()=>{cn.value=!0,On(),await En()});let H=tt(null),Dn=tt(null),U=d(()=>N.value.debug);function On(){if(xe(E.dataset)?(ce({componentName:`VueUiNestedDonuts`,type:`dataset`,debug:U.value}),Jt.value=!1,vn.value=!0):vn.value=N.value.loading,N.value.responsive){let e=Ne(()=>{let{width:e,height:t}=Pe({chart:O.value,title:R.value.title.text?$t.value:null,legend:R.value.legend.show?en.value:null,source:tn.value,noTitle:nn.value,padding:wn.value});requestAnimationFrame(()=>{G.value.width=e,G.value.height=t})});H.value&&(Dn.value&&H.value.unobserve(Dn.value),H.value.disconnect()),H.value=new ResizeObserver(e),Dn.value=O.value.parentNode,H.value.observe(Dn.value)}}Qe(()=>{H.value&&(Dn.value&&H.value.unobserve(Dn.value),H.value.disconnect())});let{isPrinting:kn,isImaging:An,generatePdf:jn,generateImage:Mn}=Te({elementId:`nested_donuts_${D.value}`,fileName:R.value.title.text||`vue-ui-nested-donuts`,options:N.value.userOptions.print}),Nn=d(()=>N.value.userOptions.show&&!R.value.title.text),Pn=d(()=>be(N.value.customPalette)),W=b({dataLabels:{show:P.value.dataLabels.show},showTable:N.value.table.show,showTooltip:F.value.show});it(N,()=>{W.value={dataLabels:{show:P.value.dataLabels.show},showTable:N.value.table.show,showTooltip:F.value.show}},{immediate:!0});let G=b({width:R.value.width,height:R.value.height}),K=ot;function Fn({datapoint:e,index:t,seriesIndex:n}){N.value.events.datapointClick&&N.value.events.datapointClick({datapoint:e,seriesIndex:n}),K(`selectDatapoint`,{datapoint:e,index:t})}function In({from:e,to:t,duration:n,onUpdate:r,onDone:i,easing:a=pe}){let o=performance.now();function s(ee){let c=Math.min((ee-o)/n,1),te=a(c);r(e+(t-e)*te,c),c<1?requestAnimationFrame(s):(r(t,1),i&&i())}requestAnimationFrame(s)}let q=b([]),J=d(()=>{_n.value,B.value.forEach((e,t)=>{[null,void 0].includes(e.name)&&ce({componentName:`VueUiNestedDonuts`,type:`datasetSerieAttribute`,property:`name`,index:t,debug:U.value}),[null,void 0].includes(e.series)?ce({componentName:`VueUiNestedDonuts`,type:`datasetSerieAttribute`,property:`series`,index:t,debug:U.value}):e.series.length===0?ce({componentName:`VueUiNestedDonuts`,type:`datasetAttributeEmpty`,property:`series at index ${t}`,debug:U.value}):e.series.forEach((e,t)=>{[null,void 0].includes(e.name)&&ce({componentName:`VueUiNestedDonuts`,type:`datasetSerieAttribute`,property:`name`,index:t,key:`serie`,debug:U.value}),[null,void 0].includes(e.values)&&ce({componentName:`VueUiNestedDonuts`,type:`datasetSerieAttribute`,property:`values`,index:t,key:`serie`,debug:U.value})})});let e=0;return B.value.map((t,n)=>({...t,total:t.series.filter(e=>!q.value.includes(e.id)).map(e=>l(e.values).reduce((e,t)=>e+t,0)).reduce((e,t)=>e+t,0),datasetIndex:n,id:`${D.value}_${n}`,series:t.series.map((r,i)=>{let a=l(r.values).reduce((e,t)=>e+t,0);return{name:r.name,arcOf:t.name,arcOfId:`${D.value}_${n}`,id:`${D.value}_${n}_${i}`,seriesIndex:i,datasetIndex:n,color:ie(r.color)||Pn.value[i]||te[i%te.length],value:k.value?A.value[e++]??0:a,absoluteValues:r.values||[]}})}))});it(()=>E.dataset,e=>{Array.isArray(e)&&e.length>0&&(vn.value=!1)},{immediate:!0});let Y=d(()=>Math.min(G.value.height,G.value.width)*(L.value.donut.strokeWidth/512)),X=d(()=>[...J.value].map((e,t)=>{let n=e.series.filter(e=>!q.value.includes(e.id)).map(e=>e.value).reduce((e,t)=>e+t,0);return{...e,total:n,series:e.series.filter(e=>!q.value.includes(e.id)).map(e=>({...e,proportion:e.value/n}))}}));function Ln(e,t,n){let r=0;for(let t=0;t<e.length;t+=1)n.includes(e[t])&&(r+=1);return r<t}let Z=b(X.value);it(()=>X.value,e=>Z.value=e);function Rn(e){let t=e.map(e=>e.id);if(e.some(e=>q.value.includes(e.id))){let e=new Set(t);q.value=q.value.filter(t=>!e.has(t))}else q.value.push(...t);K(`selectLegend`,X.value)}function zn(e){let t=E.dataset.flatMap((e,t)=>e.series.map((e,n)=>({value:l(e.values).reduce((e,t)=>e+t,0),id:`${D.value}_${t}_${n}`,arcOfId:`${D.value}_${t}`}))).find(t=>t.id===e.id);if(!t)return;let n=J.value.flatMap(e=>e.series).find(t=>t.id===e.id)?.value??0,r=Z.value.flatMap(e=>e.series).find(t=>t.id===e.id),i=r?r.value:0,a=J.value.find(e=>e.id===t.arcOfId);if(!a)return;let o=a.series.map(e=>e.id),s=Ln(o,o.length-1,q.value);q.value.includes(e.id)?(q.value=q.value.filter(t=>t!==e.id),N.value.serieToggleAnimation.show?In({from:i,to:n,duration:N.value.serieToggleAnimation.durationMs,onUpdate:t=>{Z.value=Z.value.map(n=>({...n,series:n.series.map(n=>n.id===e.id?{...n,value:t}:n)}))},onDone:()=>{K(`selectLegend`,X.value)}}):(Z.value=Z.value.map(t=>({...t,series:t.series.map(t=>t.id===e.id?{...t,value:n}:t)})),K(`selectLegend`,X.value))):s&&(N.value.serieToggleAnimation.show?In({from:i,to:0,duration:N.value.serieToggleAnimation.durationMs,onUpdate:t=>{Z.value=Z.value.map(n=>({...n,series:n.series.map(n=>n.id===e.id?{...n,value:t}:n)}))},onDone:()=>{q.value.push(e.id),K(`selectLegend`,X.value)}}):(Z.value=Z.value.map(t=>({...t,series:t.series.map(t=>t.id===e.id?{...t,value:0}:t)})),q.value.push(e.id),K(`selectLegend`,X.value)))}function Bn(e){return J.value.length?J.value.flatMap(e=>e.series).filter(t=>t.name===e)||(U.value&&console.warn(`VueUiNestedDonuts - Series name not found "${e}"`),null):(U.value&&console.warn(`VueUiNestedDonuts - There are no series to show.`),null)}function Vn(e){let t=Bn(e);t!==null&&(Array.isArray(t)?t.forEach(e=>{q.value.includes(e.id)&&zn({id:e.id})}):q.value.includes(t.id)&&zn({id:t.id}))}function Hn(e){let t=Bn(e);t!==null&&(Array.isArray(t)?t.forEach(e=>{q.value.includes(e.id)||zn({id:e.id})}):q.value.includes(t.id)||zn({id:t.id}))}let Un=d(()=>Y.value/J.value.length*L.value.donut.spacingRatio),Wn=d(()=>Z.value.map((e,t)=>Y.value-t*Y.value/J.value.length)),Gn=d(()=>Z.value.map((e,t)=>{let n=Math.abs(e.series.map(e=>e.value).reduce((e,t)=>e+t,0))>0,r=Y.value-t*Y.value/Z.value.length,i=k.value?sn.value.find(e=>e.datasetIndex===t):null,a=[...e.series,...i?[i]:[]].map(e=>({...e,value:e.value<1e-11?Number.MIN_VALUE:e.value})),o=ne({series:[{name:`_`,color:L.value.donut.emptyFill,value:1}]},G.value.width/2,G.value.height/2,r,r,1.99999,2,1,360,105.25,Un.value),s=`M ${G.value.width/2},${G.value.height/2+r}
2
- a ${r},${r} 0 1,1 0,${-2*r}
3
- a ${r},${r} 0 1,1 0,${2*r}`;return{...e,hasData:n,radius:r,skeleton:o,fullCirclePath:s,donut:ne({series:a},G.value.width/2,G.value.height/2,r,r,1.99999,2,1,360,105.25,Un.value)}})),Kn=d(()=>[...J.value].map((e,t)=>{let n=t*Y.value/J.value.length;return{sizeRatio:n,donut:ne({series:[{value:1}]},G.value.width/2,G.value.height/2,Y.value-n,Y.value-n,1.99999,2,1,360,105.25,Y.value/J.value.length*L.value.donut.spacingRatio)[0]}})),qn=b(null),Jn=b(null),Yn=b(null),Xn=b(null);function Zn({datapoint:e,seriesIndex:t}){N.value.events.datapointLeave&&N.value.events.datapointLeave({datapoint:e,seriesIndex:t}),Yt.value=!1,qn.value=null,Zt.value=null,Jn.value=null,Yn.value=null,j.value=null,fn.value=`pointer`}function Qn({val:e,percentage:t,showVal:n,showPercentage:r,config:i}){return Ve({config:i,val:e,percentage:t,showVal:n,showPercentage:r})}function $n({datapoint:e,_relativeIndex:t,seriesIndex:n,triggerMode:r=`pointer`}){N.value.events.datapointEnter&&N.value.events.datapointEnter({datapoint:e,seriesIndex:n}),fn.value=r,j.value=n,qn.value=e.arcOfId,Jn.value=e.id,Yn.value=n,Zt.value=e.id,Xn.value={datapoint:e,seriesIndex:n,series:Z.value,config:N.value};let i=F.value.customFormat;if(c(i)&&ve(()=>i({seriesIndex:n,datapoint:e,series:Z.value,config:N.value})))Xt.value=i({seriesIndex:n,datapoint:e,series:Z.value,config:N.value});else{let t=``;if(F.value.showAllItemsAtIndex&&q.value.length===0){let r=Z.value.map(e=>e.series.find(e=>e.seriesIndex===n));r.forEach((i,a)=>{if(!i)return``;t+=`
4
- <div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${a<r.length-1?`border-bottom:1px solid ${F.value.borderColor}`:``}">
5
- <div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
6
- <svg viewBox="0 0 20 20" height="${F.value.fontSize}" width="${F.value.fontSize}">
7
- <circle cx="10" cy="10" r="10" fill="${i.color}"/>
8
- </svg>
9
- <span>
10
- ${i.arcOf??``} - ${i.name}
11
- </span>
12
- </div>
13
- <span>
14
- <b>
15
- ${Qn({config:R.value.tooltip,showVal:F.value.showValue,showPercentage:F.value.showPercentage,val:de(L.value.labels.dataLabels.formatter,e.value,s({p:R.value.layout.labels.dataLabels.prefix,v:e.value,s:R.value.layout.labels.dataLabels.suffix,r:R.value.tooltip.roundingValue}),{datapoint:e,seriesIndex:n}),percentage:s({v:i.proportion*100,s:`%`,r:R.value.tooltip.roundingPercentage})})}
16
- </b>
17
- </span>
18
- </div>
19
- `})}else t+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${F.value.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.arcOf??``} - ${e.name}</div>`,t+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${e.color}"/></svg>`,F.value.showValue&&(t+=`<b>${de(P.value.dataLabels.formatter,e.value,s({p:P.value.dataLabels.prefix,v:e.value,s:P.value.dataLabels.suffix,r:F.value.roundingValue}),{datapoint:e,seriesIndex:n})}</b>`),F.value.showPercentage&&(F.value.showValue?t+=`<span>(${s({v:e.proportion*100,s:`%`,r:F.value.roundingPercentage})})</span></div>`:t+=`<b>${s({v:e.proportion*100,s:`%`,r:F.value.roundingPercentage})}</b></div>`);Xt.value=`<div style="font-size:${F.value.fontSize}px">${t}</div>`}Yt.value=!0}function er(e){return e.proportion*100>P.value.dataLabels.hideUnderValue}function tr(e,t){if(!N.value.useBlurOnHover)return``;if(F.value.showAllItemsAtIndex&&q.value.length===0)return[null,void 0].includes(Yn.value)||Yn.value===t?``:`url(#blur_${D.value})`;if(!F.value.showAllItemsAtIndex||q.value.length)return[null,void 0].includes(Jn.value)||Jn.value===e.id?``:`url(#blur_${D.value})`}let nr=d(()=>J.value.map((e,t)=>{let n=e.series.filter(e=>!q.value.includes(e.id)),r=k.value?n.map(e=>{let n=B.value[t].series.findIndex(t=>t.name===e.name);return l(B.value[t].series[n].values).reduce((e,t)=>e+t,0)}).reduce((e,t)=>e+t,0):n.map(e=>e.value).reduce((e,t)=>e+t,0);return e.series.map((e,n)=>{let i=l(B.value[t].series[n].values).reduce((e,t)=>e+t,0),a=k.value?i:e.value,o=Qn({val:de(P.value.dataLabels.formatter,a,s({p:P.value.dataLabels.prefix,v:a,s:P.value.dataLabels.suffix,r:R.value.legend.roundingValue}),{datapoint:e,seriesIndex:n}),percentage:isNaN(a/r)||q.value.includes(e.id)?`-`:s({v:a/r*100,s:`%`,r:R.value.legend.roundingPercentage}),showVal:R.value.legend.showValue,showPercentage:R.value.legend.showPercentage,config:R.value.legend}),ee=`${e.name}${R.value.legend.showPercentage||R.value.legend.showValue?`: `:``}${o}`;return{name:e.name,color:e.color,value:a,display:ee,svgDisplay:`${e.arcOf?`${e.arcOf} - `:``}${ee}`,shape:`circle`,arcOf:e.arcOf,id:e.id,seriesIndex:n,datasetIndex:t,total:r,opacity:q.value.includes(e.id)?.5:1,segregate:()=>zn(e),isSegregated:q.value.includes(e.id)}})})),rr=d(()=>({cy:`nested-donuts-legend`,backgroundColor:R.value.legend.backgroundColor,color:R.value.legend.color,fontSize:R.value.legend.fontSize,paddingBottom:12,fontWeight:R.value.legend.bold?`bold`:``})),Q=d(()=>({head:Z.value.flatMap(e=>e.series.map(t=>({name:`${e.name} - ${t.name}`,color:t.color,total:e.total}))),body:Z.value.flatMap(e=>e.series.map(e=>e.value))}));function ir(e=null){Ye(()=>{let t=Q.value.head.map((e,t)=>[[e.name],[Q.value.body[t]],[isNaN(Q.value.body[t]/e.total)?`-`:Q.value.body[t]/e.total*100]]),n=[[R.value.title.text],[R.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(t),r=ee(n);e?e(r):ge({csvContent:r,title:R.value.title.text||`vue-ui-nested-donuts`})})}let ar=d(()=>{let e=[N.value.table.columnNames.series,N.value.table.columnNames.value,N.value.table.columnNames.percentage],t=Q.value.head.map((e,t)=>{let n=s({p:P.value.dataLabels.prefix,v:Q.value.body[t],s:P.value.dataLabels.suffix,r:N.value.table.td.roundingValue});return[{color:e.color,name:e.name},n,isNaN(Q.value.body[t]/e.total)?`-`:s({v:Q.value.body[t]/e.total*100,s:`%`,r:N.value.table.td.roundingPercentage})]}),n=t.map(e=>e.map((e,t)=>t===0?e.name:e)),r={th:{backgroundColor:N.value.table.th.backgroundColor,color:N.value.table.th.color,outline:N.value.table.th.outline},td:{backgroundColor:N.value.table.td.backgroundColor,color:N.value.table.td.color,outline:N.value.table.td.outline},breakpoint:N.value.table.responsiveBreakpoint};return{colNames:[N.value.table.columnNames.series,N.value.table.columnNames.value,N.value.table.columnNames.percentage],head:e,body:t,a11yBody:n,config:r}});function or(){return J.value}function sr(){W.value.showTable=!W.value.showTable}function cr(){W.value.dataLabels.show=!W.value.dataLabels.show}function lr(){W.value.showTooltip=!W.value.showTooltip}let ur=b(!1);function dr(){ur.value=!ur.value}let fr=Be(O,()=>R.value.title.text),pr=b(null);function mr(){if(!pr.value)return;let{x:e,y:t,width:n,height:r}=pr.value.getBBox();V.value&&V.value.setAttribute(`viewBox`,`${e} ${t} ${n+Math.min(0,e)} ${r+Math.min(0,t)}`)}let hr=d(()=>n({config:N,style:R,mutableConfig:W,dialog:Wt,accordion:zt,isFullscreen:M,parent:O,maxWidth:800,isCursorPointer:z}));it(()=>W.value.showTable,e=>t(e,N,ln));function gr(){W.value.showTable=!1,un.value&&un.value.setTableIconState(!1)}let _r=d(()=>R.value.backgroundColor),vr=d(()=>R.value.legend),yr=d(()=>R.value.title),br=d(()=>nr.value.flat().map(e=>({...e,name:e.svgDisplay}))),{isCallbackImaging:xr,isCallbackSvg:Sr,generateSvg:Cr,onGenerateImage:wr}=Ae({svg:V,title:yr,legend:vr,legendItems:br,backgroundColor:_r,getSvgCallback:()=>N.value.userOptions.callbacks.svg,generateImage:Mn});async function Tr(){if(K(`copyAlt`,{config:N.value,dataset:Z.value}),!N.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(N.value.userOptions.callbacks.altCopy({config:N.value,dataset:Z.value}))}let $=d(()=>Gn.value.flatMap(e=>e.donut.filter(e=>!e.ghost)));function Er(){j.value=null,pn.value=!0}function Dr(){j.value=null,fn.value=`pointer`,Yt.value=!1,qn.value=null,Zt.value=null,Jn.value=null,Yn.value=null,pn.value=!1}function Or(e){if(!V.value||ur.value||document.activeElement!==V.value||!$.value.length)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){j.value=null,fn.value=`pointer`,Yt.value=!1,qn.value=null,Zt.value=null,Jn.value=null,Yn.value=null;return}if(r){if(j.value===null)return;let e=$.value[j.value];if(!e)return;Fn({datapoint:e,index:j.value,seriesIndex:e.seriesIndex});return}let a=j.value,o=Yn.value,s=a!==null&&a>=0&&a<$.value.length,ee=o!==null&&o>=0&&o<$.value.length;s?n?(a+=1,a>=$.value.length&&(a=0)):t&&(--a,a<0&&(a=$.value.length-1)):ee?(a=n?o+1:o-1,a>=$.value.length&&(a=0),a<0&&(a=$.value.length-1)):a=n?0:$.value.length-1;let c=$.value[a];c&&(j.value=a,kr(),$n({datapoint:c,relativeIndex:a,seriesIndex:c.seriesIndex,show:!0,triggerMode:`keyboard`}))}function kr(){if(!V.value)return;let e=V.value.getBoundingClientRect();dn.value={x:e.left+e.width/2,y:e.top+e.height/2}}let Ar=d(()=>({headers:ar.value?.colNames??[],rows:ar.value?.a11yBody??[]}));return Me({autoSize:mr,getData:or,getImage:fr,generatePdf:jn,generateCsv:ir,generateImage:Mn,generateSvg:Cr,hideSeries:Hn,showSeries:Vn,toggleTable:sr,toggleLabels:cr,toggleTooltip:lr,toggleAnnotator:dr,toggleFullscreen:mn,copyAlt:Tr}),(e,t)=>(y(),m(`div`,{ref_key:`nestedDonutsChart`,ref:O,class:Xe(`vue-data-ui-component vue-ui-nested-donuts ${M.value?`vue-data-ui-wrapper-fullscreen`:``} ${N.value.useCssAnimation?``:`vue-ui-dna`}`),style:Ze(`font-family:${N.value.style.fontFamily};width:100%; text-align:center;background:${R.value.backgroundColor}`),id:`nested_donuts_${D.value}`,onMouseenter:t[2]||=()=>w(bn)(!0),onMouseleave:t[3]||=()=>w(bn)(!1)},[h(`div`,{id:`chart-instructions-${D.value}`,class:`sr-only`},[h(`p`,null,C(N.value.a11y.translations.keyboardNavigation),1)],8,ct),Ar.value?.rows?.length?(y(),f(Le,{key:0,uid:D.value,head:Ar.value.headers,body:Ar.value.rows,notice:N.value.a11y.translations.tableAvailable,caption:N.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):p(``,!0),I.value.buttons.annotator?(y(),f(w(Ht),{key:1,svgRef:w(V),backgroundColor:R.value.backgroundColor,color:R.value.color,active:ur.value,isCursorPointer:z.value,palette:I.value.annotatorPalette,onClose:dr},Ge({_:2},[x(w(i),t=>({name:t,fn:T(n=>[S(e.$slots,t,v(_(w(r)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),Nn.value?(y(),m(`div`,{key:2,ref_key:`noTitle`,ref:nn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),R.value.title.text?(y(),m(`div`,{key:3,ref_key:`chartTitle`,ref:$t},[(y(),f(je,{key:`title_${rn.value}`,config:{title:{cy:`donut-div-title`,...R.value.title},subtitle:{cy:`donut-div-subtitle`,...R.value.title.subtitle}}},null,8,[`config`]))],512)):p(``,!0),h(`div`,{id:`legend-top-${D.value}`},null,8,lt),I.value.show&&Jt.value&&(w(xn)||w(yn))?(y(),f(w(Vt),{ref_key:`userOptionsRef`,ref:un,key:`user_option_${Qt.value}`,backgroundColor:R.value.backgroundColor,color:R.value.color,isPrinting:w(kn),isImaging:w(An),uid:D.value,hasTooltip:I.value.buttons.tooltip&&F.value.show,hasPdf:I.value.buttons.pdf,hasXls:I.value.buttons.csv,hasImg:I.value.buttons.img,hasSvg:I.value.buttons.svg,hasTable:I.value.buttons.table,hasLabel:I.value.buttons.labels,hasFullscreen:I.value.buttons.fullscreen,hasAltCopy:I.value.buttons.altCopy,isFullscreen:M.value,isTooltip:W.value.showTooltip,titles:{...I.value.buttonTitles},chartElement:O.value,position:I.value.position,hasAnnotator:I.value.buttons.annotator,isAnnotation:ur.value,callbacks:I.value.callbacks,printScale:I.value.print.scale,tableDialog:N.value.table.useDialog,isCursorPointer:z.value,onToggleFullscreen:mn,onGeneratePdf:w(jn),onGenerateCsv:ir,onGenerateImage:w(wr),onGenerateSvg:w(Cr),onToggleTable:sr,onToggleLabels:cr,onToggleTooltip:lr,onToggleAnnotator:dr,onCopyAlt:Tr,style:Ze({visibility:w(xn)?w(yn)?`visible`:`hidden`:`visible`})},Ge({_:2},[x(w(a)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:T(n=>[S(e.$slots,t,v(_(w(o)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):p(``,!0),h(`div`,ut,[(y(),m(`svg`,{ref_key:`svgRef`,ref:V,xmlns:w(ye),"aria-describedby":`chart-instructions-${D.value}`,class:Xe({"vue-data-ui-fullscreen--on":M.value,"vue-data-ui-fulscreen--off":!M.value,"vue-data-ui-svg":!0}),viewBox:`0 0 ${G.value.width<=0?.001:G.value.width} ${G.value.height<0?.001:G.value.height}`,style:Ze(`max-width:100%; overflow: visible; background:transparent;color:${R.value.color};${wn.value.css}`),tabindex:`0`,onFocus:Er,onBlur:Dr,onKeydown:Or},[h(`g`,{ref_key:`G`,ref:pr,class:`vue-data-ui-g`},[qe(w(Ut)),e.$slots[`chart-background`]?(y(),m(`foreignObject`,{key:0,x:0,y:0,width:G.value.width<=0?.001:G.value.width,height:G.value.height<0?.001:G.value.height,style:{pointerEvents:`none`}},[S(e.$slots,`chart-background`,{},void 0,!0)],8,ft)):p(``,!0),h(`defs`,null,[(y(!0),m(u,null,x(Kn.value,(e,t)=>(y(),f(Fe,{t:`radial`,id:`radial_${D.value}_${t}`,key:`radial_${D.value}_${t}`,stops:[[`0%`,`#FFFFFF`,0],[`${(1-Un.value/Wn.value[t])*100}%`,w(re)(`#FFFFFF`,0),0],[`${(1-Un.value/Wn.value[t]/2)*100}%`,`#FFFFFF`,R.value.gradientIntensity/100],[`100%`,`#FFFFFF`,0]]},null,8,[`id`,`stops`]))),128))]),h(`defs`,null,[h(`filter`,{id:`blur_${D.value}`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[h(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:2,id:`blur_std_${D.value}`},null,8,mt),t[4]||=h(`feColorMatrix`,{type:`saturate`,values:`0`},null,-1)],8,pt),h(`filter`,{id:`shadow_${D.value}`,"color-interpolation-filters":`sRGB`},[h(`feDropShadow`,{dx:`0`,dy:`0`,stdDeviation:`10`,"flood-opacity":`0.5`,"flood-color":L.value.donut.shadowColor},null,8,gt)],8,ht)]),h(`defs`,null,[(y(!0),m(u,null,x(Gn.value,(e,t)=>(y(),m(`path`,{key:`path-full-${t}`,id:`path-full-${t}-${D.value}`,d:e.fullCirclePath,fill:`none`},null,8,_t))),128))]),(y(!0),m(u,null,x(Gn.value,(e,t)=>(y(),m(`g`,null,[e.hasData?(y(!0),m(u,{key:0},x(e.donut.filter(e=>!e.ghost),(e,t)=>(y(),m(`g`,null,[h(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:e.color,stroke:L.value.donut.borderColorAuto?R.value.backgroundColor:L.value.donut.borderColor,"stroke-width":L.value.donut.borderWidth,filter:tr(e,t)},null,8,vt)]))),256)):(y(!0),m(u,{key:1},x(e.skeleton,(e,t)=>(y(),m(`g`,null,[h(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:e.color,stroke:L.value.donut.borderColorAuto?R.value.backgroundColor:L.value.donut.borderColor,"stroke-width":L.value.donut.borderWidth},null,8,yt)]))),256))]))),256)),R.value.useGradient?(y(),m(`g`,bt,[(y(!0),m(u,null,x(Kn.value,(e,t)=>(y(),m(`g`,null,[h(`path`,{d:e.donut.arcSlice,fill:`url(#radial_${D.value}_${t})`,stroke:`transparent`,"stroke-width":`0`},null,8,xt)]))),256))])):p(``,!0),P.value.dataLabels.showDonutName?(y(),m(`g`,St,[P.value.dataLabels.curvedDonutName?(y(!0),m(u,{key:0},x(Gn.value,(e,t)=>(y(),m(`g`,null,[(y(!0),m(u,null,x(e.donut,(n,r)=>(y(),m(`g`,null,[r===0&&G.value.width&&G.value.height?(y(),m(`text`,{key:0,"text-anchor":`middle`,"font-size":L.value.labels.dataLabels.fontSize,"font-weight":L.value.labels.dataLabels.boldDonutName?`bold`:`normal`,fill:L.value.labels.dataLabels.color,dy:L.value.labels.dataLabels.donutNameOffsetY},[h(`textPath`,{href:`#path-full-${t}-${D.value}`,startOffset:`50%`,"text-anchor":`middle`,method:`align`,spacing:`auto`},C(L.value.labels.dataLabels.donutNameAbbreviation?w(me)({source:e.name,length:N.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize}):e.name),9,wt)],8,Ct)):p(``,!0)]))),256))]))),256)):(y(!0),m(u,{key:1},x(Gn.value,(e,t)=>(y(),m(`g`,null,[(y(!0),m(u,null,x(e.donut,(t,n)=>(y(),m(`g`,null,[n===0&&G.value.width&&G.value.height?(y(),m(`text`,{key:0,x:G.value.width/2,y:t.startY-L.value.labels.dataLabels.fontSize+L.value.labels.dataLabels.donutNameOffsetY,"text-anchor":`middle`,"font-size":L.value.labels.dataLabels.fontSize,"font-weight":L.value.labels.dataLabels.boldDonutName?`bold`:`normal`,fill:L.value.labels.dataLabels.color},C(L.value.labels.dataLabels.donutNameAbbreviation?w(me)({source:e.name,length:N.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize}):e.name),9,Tt)):p(``,!0)]))),256))]))),256))])):p(``,!0),P.value.dataLabels.show?(y(),m(`g`,Et,[(y(!0),m(u,null,x(Gn.value,(e,t)=>(y(),m(`g`,null,[(y(!0),m(u,null,x(e.donut.filter(e=>!e.ghost),(e,n)=>(y(),m(`g`,{filter:tr(e,n)},[at(h(`text`,{opacity:+!!er(e),"text-anchor":w(ue)(e,!0).anchor,x:w(ue)(e,!1,L.value.labels.dataLabels.offsetX).x||0,y:w(_e)(e,L.value.labels.dataLabels.offsetY,L.value.labels.dataLabels.offsetY)+(P.value.dataLabels.showValueFirst&&P.value.dataLabels.showValue?L.value.labels.dataLabels.fontSize:0),fill:P.value.dataLabels.useSerieColor?e.color:L.value.labels.dataLabels.color,"font-size":P.value.dataLabels.fontSize,"font-weight":P.value.dataLabels.boldPercentage?`bold`:`normal`},C(w(ae)(w(s)({v:e.proportion*100,s:`%`,r:R.value.layout.labels.dataLabels.roundingPercentage}),L.value.labels.dataLabels.usePercentageParens?`(`:``,L.value.labels.dataLabels.usePercentageParens?`)`:``)),9,Ot),[[rt,W.value.dataLabels.show&&P.value.dataLabels.showPercentage]]),at(h(`text`,{opacity:+!!er(e),"text-anchor":w(ue)(e,!0).anchor,x:w(ue)(e,!1,L.value.labels.dataLabels.offsetX).x||0,y:w(_e)(e,L.value.labels.dataLabels.offsetY,L.value.labels.dataLabels.offsetY)+(P.value.dataLabels.showValueFirst||!P.value.dataLabels.showPercentage?0:L.value.labels.dataLabels.fontSize),fill:P.value.dataLabels.useSerieColor?e.color:L.value.labels.dataLabels.color,"font-size":P.value.dataLabels.fontSize,"font-weight":P.value.dataLabels.boldValue?`bold`:`normal`},C(w(ae)(w(de)(L.value.labels.dataLabels.formatter,e.value,w(s)({p:R.value.layout.labels.dataLabels.prefix,v:e.value,s:R.value.layout.labels.dataLabels.suffix,r:R.value.layout.labels.dataLabels.roundingValue}),{datapoint:e,seriesIndex:t,datapointIndex:n}),L.value.labels.dataLabels.useValueParens?`(`:``,L.value.labels.dataLabels.useValueParens?`)`:``)),9,kt),[[rt,W.value.dataLabels.show&&P.value.dataLabels.showValue]])],8,Dt))),256))]))),256))])):p(``,!0),(y(!0),m(u,null,x(Gn.value,(e,t)=>(y(),m(`g`,null,[(y(!0),m(u,null,x(e.donut,(e,t)=>(y(),m(`g`,null,[h(`path`,{d:e.arcSlice,fill:Zt.value===e.id?L.value.donut.selectedColor:`transparent`,onMouseenter:t=>$n({datapoint:e,relativeIndex:$.value.findIndex(t=>t.id===e.id),seriesIndex:e.seriesIndex}),onClick:n=>Fn({datapoint:e,index:t,seriesIndex:e.seriesIndex}),onMouseleave:t=>Zn({datapoint:e,seriesIndex:e.seriesIndex})},null,40,At)]))),256))]))),256)),S(e.$slots,`svg`,{svg:{...G.value,isPrintingImg:w(kn)||w(An)||w(xr),isPrintingSvg:w(Sr)}},void 0,!0)],512)],46,dt)),e.$slots.hint?(y(),m(`div`,jt,[S(e.$slots,`hint`,v(_({hint:N.value.a11y.translations.keyboardNavigation,isVisible:pn.value})),void 0,!0)])):p(``,!0)]),e.$slots.watermark?(y(),m(`div`,Mt,[S(e.$slots,`watermark`,v(_({isPrinting:w(kn)||w(An)||w(xr)||w(Sr)})),void 0,!0)])):p(``,!0),qe(w(Lt),{teleportTo:F.value.teleportTo,show:W.value.showTooltip&&Yt.value,backgroundColor:F.value.backgroundColor,color:F.value.color,borderRadius:F.value.borderRadius,borderColor:F.value.borderColor,borderWidth:F.value.borderWidth,fontSize:F.value.fontSize,backgroundOpacity:F.value.backgroundOpacity,position:F.value.position,offsetX:F.value.offsetX,offsetY:F.value.offsetY,parent:O.value,content:Xt.value,isFullscreen:M.value,isCustom:w(c)(F.value.customFormat),smooth:F.value.smooth,backdropFilter:F.value.backdropFilter,smoothForce:F.value.smoothForce,smoothSnapThreshold:F.value.smoothSnapThreshold,isA11yMode:fn.value===`keyboard`,a11yPosition:dn.value},{"tooltip-before":T(()=>[S(e.$slots,`tooltip-before`,v(_({...Xn.value})),void 0,!0)]),tooltip:T(()=>[S(e.$slots,`tooltip`,v(_({...Xn.value})),void 0,!0)]),"tooltip-after":T(()=>[S(e.$slots,`tooltip-after`,v(_({...Xn.value})),void 0,!0)]),_:3},8,[`teleportTo`,`show`,`backgroundColor`,`color`,`borderRadius`,`borderColor`,`borderWidth`,`fontSize`,`backgroundOpacity`,`position`,`offsetX`,`offsetY`,`parent`,`content`,`isFullscreen`,`isCustom`,`smooth`,`backdropFilter`,`smoothForce`,`smoothSnapThreshold`,`isA11yMode`,`a11yPosition`]),h(`div`,{id:`legend-bottom-${D.value}`},null,8,Nt),cn.value&&(R.value.legend.show||e.$slots.legend)?(y(),f(We,{key:6,to:R.value.legend.position===`top`?`#legend-top-${D.value}`:`#legend-bottom-${D.value}`},[R.value.legend.show?(y(),m(`div`,{key:0,ref_key:`chartLegend`,ref:en,class:Xe({"vue-ui-nested-donuts-legend":nr.value.length>1})},[S(e.$slots,`legend`,{legend:nr.value},()=>[(y(!0),m(u,null,x(nr.value,(e,n)=>(y(),f(He,{key:`legend_${n}_${on.value}`,legendSet:e,config:rr.value,isCursorPointer:z.value,onClickMarker:t[0]||=({legend:e})=>zn(e)},{legendTitle:T(({titleSet:e})=>[e[0]&&e[0].arcOf?(y(),m(`div`,Pt,C(e[0].arcOf),1)):p(``,!0)]),item:T(({legend:e,index:t})=>[h(`div`,{onClick:t=>zn(e),style:Ze(`opacity:${q.value.includes(e.id)?.5:1}`)},C(e.display),13,Ft)]),legendToggle:T(()=>[e.length>2&&R.value.legend.selectAllToggle.show&&!w(_n)?(y(),f(Ie,{key:`toggle-${n}`,backgroundColor:R.value.legend.selectAllToggle.backgroundColor,color:R.value.legend.selectAllToggle.color,fontSize:R.value.legend.fontSize,checked:e.some(e=>q.value.includes(e.id)),isCursorPointer:z.value,onToggle:t=>Rn(e)},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`,`onToggle`])):p(``,!0)]),_:2},1032,[`legendSet`,`config`,`isCursorPointer`]))),128))],!0)],2)):p(``,!0)],8,[`to`])):p(``,!0),e.$slots.source?(y(),m(`div`,{key:7,ref_key:`source`,ref:tn,dir:`auto`},[S(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),Jt.value&&I.value.buttons.table?(y(),f(et(hr.value.component),Je({key:8},hr.value.props,{ref_key:`tableUnit`,ref:ln,onClose:gr}),Ge({content:T(()=>[(y(),f(w(Bt),{key:`table_${an.value}`,colNames:ar.value.colNames,head:ar.value.head,body:ar.value.body,config:ar.value.config,title:N.value.table.useDialog?``:hr.value.title,withCloseButton:!N.value.table.useDialog,isCursorPointer:z.value,onClose:gr},{th:T(({th:e})=>[h(`div`,It,C(e),1)]),td:T(({td:e})=>[Ke(C(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[N.value.table.useDialog?{name:`title`,fn:T(()=>[Ke(C(hr.value.title),1)]),key:`0`}:void 0,N.value.table.useDialog?{name:`actions`,fn:T(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:t[1]||=e=>ir(I.value.callbacks.csv),style:Ze({cursor:z.value?`pointer`:`default`})},[qe(w(Rt),{name:`fileCsv`,stroke:hr.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):p(``,!0),S(e.$slots,`skeleton`,{},()=>[w(_n)?(y(),f(De,{key:0})):p(``,!0)],!0)],46,st))}},[[`__scopeId`,`data-v-3ceb74a6`]]);export{ot as n,Lt as t};