vue-data-ui 3.28.10 → 3.28.11

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 (348) hide show
  1. package/dist/BaseDraggableDialog-DVstuNhT.js +1 -0
  2. package/dist/{BaseLegendToggle-BIzyyI1h.js → BaseLegendToggle-VzX69MCo.js} +1 -1
  3. package/dist/BaseZoomControls-D4i_j6vc.js +1 -0
  4. package/dist/ColorPicker-DmVnJGVv.js +1 -0
  5. package/dist/{DataTable-Dof6yhO7.js → DataTable-KeuZB1JM.js} +1 -1
  6. package/dist/{HillActions-BMH9pSmQ.js → HillActions-D--h5brJ.js} +1 -1
  7. package/dist/{Legend-DM0ClX3D.js → Legend-W9YVYVX-.js} +1 -1
  8. package/dist/{NonSvgPenAndPaper-DXdAh1Sz.js → NonSvgPenAndPaper-B2kuh5Yb.js} +1 -1
  9. package/dist/{PackageVersion-DKSNC-YP.js → PackageVersion-ksOit8fp.js} +1 -1
  10. package/dist/PenAndPaper-BV5ODysA.js +1 -0
  11. package/dist/SlicerPreview-0m9E7Zh_.js +1 -0
  12. package/dist/{StackChartTable-CZteRybF.js → StackChartTable-D-31a1zL.js} +1 -1
  13. package/dist/{UserOptions-B9EyfU9n.js → UserOptions-K1N7zQRx.js} +1 -1
  14. package/dist/XyAnalysisOptions-CUtj1x2f.js +1 -0
  15. package/dist/components/vue-ui-3d-bar.js +1 -1
  16. package/dist/components/vue-ui-accordion.js +1 -1
  17. package/dist/components/vue-ui-age-pyramid.js +1 -1
  18. package/dist/components/vue-ui-annotator.js +1 -1
  19. package/dist/components/vue-ui-bullet.js +1 -1
  20. package/dist/components/vue-ui-bump.js +1 -1
  21. package/dist/components/vue-ui-candlestick.js +1 -1
  22. package/dist/components/vue-ui-carousel-table.js +1 -1
  23. package/dist/components/vue-ui-chestnut.js +1 -1
  24. package/dist/components/vue-ui-chord.js +1 -1
  25. package/dist/components/vue-ui-circle-pack.js +1 -1
  26. package/dist/components/vue-ui-cursor.js +1 -1
  27. package/dist/components/vue-ui-dag.js +1 -1
  28. package/dist/components/vue-ui-dashboard.js +1 -1
  29. package/dist/components/vue-ui-digits.js +1 -1
  30. package/dist/components/vue-ui-donut-evolution.js +1 -1
  31. package/dist/components/vue-ui-donut.js +1 -1
  32. package/dist/components/vue-ui-dumbbell.js +1 -1
  33. package/dist/components/vue-ui-flow.js +1 -1
  34. package/dist/components/vue-ui-funnel.js +1 -1
  35. package/dist/components/vue-ui-galaxy.js +1 -1
  36. package/dist/components/vue-ui-gauge.js +1 -1
  37. package/dist/components/vue-ui-geo.js +1 -1
  38. package/dist/components/vue-ui-gizmo.js +1 -1
  39. package/dist/components/vue-ui-graph.js +1 -1
  40. package/dist/components/vue-ui-heatmap.js +1 -1
  41. package/dist/components/vue-ui-hill.js +1 -1
  42. package/dist/components/vue-ui-history-plot.js +1 -1
  43. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  44. package/dist/components/vue-ui-kpi.js +1 -1
  45. package/dist/components/vue-ui-label.js +1 -1
  46. package/dist/components/vue-ui-mini-loader.js +1 -1
  47. package/dist/components/vue-ui-molecule.js +1 -1
  48. package/dist/components/vue-ui-mood-radar.js +1 -1
  49. package/dist/components/vue-ui-nested-donuts.js +1 -1
  50. package/dist/components/vue-ui-onion.js +1 -1
  51. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  52. package/dist/components/vue-ui-quadrant.js +1 -1
  53. package/dist/components/vue-ui-quick-chart.js +1 -1
  54. package/dist/components/vue-ui-radar.js +1 -1
  55. package/dist/components/vue-ui-rating.js +1 -1
  56. package/dist/components/vue-ui-relation-circle.js +1 -1
  57. package/dist/components/vue-ui-ridgeline.js +1 -1
  58. package/dist/components/vue-ui-rings.js +1 -1
  59. package/dist/components/vue-ui-scatter.js +1 -1
  60. package/dist/components/vue-ui-skeleton.js +1 -1
  61. package/dist/components/vue-ui-smiley.js +1 -1
  62. package/dist/components/vue-ui-spark-trend.js +1 -1
  63. package/dist/components/vue-ui-sparkbar.js +1 -1
  64. package/dist/components/vue-ui-sparkgauge.js +1 -1
  65. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  66. package/dist/components/vue-ui-sparkline.js +1 -1
  67. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  68. package/dist/components/vue-ui-stackbar.js +1 -1
  69. package/dist/components/vue-ui-stackline.js +1 -1
  70. package/dist/components/vue-ui-strip-plot.js +1 -1
  71. package/dist/components/vue-ui-table-heatmap.js +1 -1
  72. package/dist/components/vue-ui-table-sparkline.js +1 -1
  73. package/dist/components/vue-ui-table.js +1 -1
  74. package/dist/components/vue-ui-thermometer.js +1 -1
  75. package/dist/components/vue-ui-timer.js +1 -1
  76. package/dist/components/vue-ui-tiremarks.js +1 -1
  77. package/dist/components/vue-ui-treemap.js +1 -1
  78. package/dist/components/vue-ui-vertical-bar.js +1 -1
  79. package/dist/components/vue-ui-waffle.js +1 -1
  80. package/dist/components/vue-ui-wheel.js +1 -1
  81. package/dist/components/vue-ui-word-cloud.js +1 -1
  82. package/dist/components/vue-ui-world.js +1 -1
  83. package/dist/components/vue-ui-xy-canvas.js +1 -1
  84. package/dist/components/vue-ui-xy.js +1 -1
  85. package/dist/package-vXTjpYqq.js +1 -0
  86. package/dist/{render-common-Cy1X2PzP.js → render-common-CPA2hfDW.js} +1 -1
  87. package/dist/resolveChartConfig-0IvbmIE_.js +1 -0
  88. package/dist/ssr/vue-ui-donut.js +1 -1
  89. package/dist/ssr/vue-ui-xy.js +1 -1
  90. package/dist/ssr.js +1 -1
  91. package/dist/style.css +1 -1
  92. package/dist/types/vue-data-ui.d.ts +1 -0
  93. package/dist/useConfig-_JwRfIqE.js +1 -0
  94. package/dist/{useObjectBindings-C_70Czuj.js → useObjectBindings-D789Dz63.js} +1 -1
  95. package/dist/utils.js +1 -1
  96. package/dist/vue-data-ui-0NKIVNqt.js +1 -0
  97. package/dist/vue-data-ui.js +1 -1
  98. package/dist/vue-ui-3d-bar-Cs-_W1Av.js +19 -0
  99. package/dist/{vue-ui-accordion-E8TJfFeK.js → vue-ui-accordion-DxGxf-Rm.js} +1 -1
  100. package/dist/vue-ui-age-pyramid-cWWVFoCj.js +1 -0
  101. package/dist/vue-ui-annotator-D31LD4-s.js +331 -0
  102. package/dist/vue-ui-bullet-CMQzoLKs.js +34 -0
  103. package/dist/vue-ui-bump-SSu5eVbF.js +8 -0
  104. package/dist/vue-ui-candlestick-Cm9jS3n7.js +22 -0
  105. package/dist/vue-ui-carousel-table-D-F54W90.js +1 -0
  106. package/dist/vue-ui-chestnut-DNe1s8TT.js +1 -0
  107. package/dist/vue-ui-chord-DGzpBpuI.js +21 -0
  108. package/dist/vue-ui-circle-pack--iJQtXys.js +13 -0
  109. package/dist/vue-ui-cursor-B7DJRSGD.js +1 -0
  110. package/dist/vue-ui-dag-tsM65e_V.js +9 -0
  111. package/dist/vue-ui-dashboard-CC7IhQZu.js +1 -0
  112. package/dist/{vue-ui-digits-DbxT72mM.js → vue-ui-digits-hv2QeC-H.js} +2 -2
  113. package/dist/vue-ui-donut-B9WXaiPn.js +47 -0
  114. package/dist/vue-ui-donut-evolution-Wz_-FYab.js +2 -0
  115. package/dist/vue-ui-donut-iyVVIGoJ.js +22 -0
  116. package/dist/vue-ui-dumbbell-p3Q2LkBV.js +9 -0
  117. package/dist/vue-ui-flow-BCH8YU8H.js +3 -0
  118. package/dist/vue-ui-funnel-DdrBD9oX.js +1 -0
  119. package/dist/vue-ui-galaxy-DYKEOEL-.js +1 -0
  120. package/dist/vue-ui-gauge-CPgvR_YB.js +1 -0
  121. package/dist/vue-ui-geo-DhJ3Wr_5.js +1 -0
  122. package/dist/vue-ui-gizmo-BTy4Vr1e.js +1 -0
  123. package/dist/{vue-ui-graph-9YSKwYhC.js → vue-ui-graph-C4kfE4G8.js} +3 -3
  124. package/dist/vue-ui-heatmap-lti43RhW.js +1 -0
  125. package/dist/vue-ui-hill-3GVfKQmi.js +1 -0
  126. package/dist/vue-ui-history-plot-DMTPygZA.js +2 -0
  127. package/dist/vue-ui-horizontal-bar-DwWo0CvX.js +4 -0
  128. package/dist/{vue-ui-kpi-BxW6DctE.js → vue-ui-kpi-BTMK37Ix.js} +1 -1
  129. package/dist/{vue-ui-label-rxuzmeyD.js → vue-ui-label-CBrMoFDG.js} +2 -2
  130. package/dist/{vue-ui-mini-loader-DpAYrTYb.js → vue-ui-mini-loader-PsWZLMLF.js} +1 -1
  131. package/dist/vue-ui-molecule-rbDnRA7c.js +1 -0
  132. package/dist/vue-ui-mood-radar-8s1jnO3P.js +1 -0
  133. package/dist/vue-ui-nested-donuts-8bY4HvC-.js +19 -0
  134. package/dist/vue-ui-onion-CgLNDFrZ.js +5 -0
  135. package/dist/vue-ui-parallel-coordinate-plot-ms14eLus.js +9 -0
  136. package/dist/vue-ui-quadrant-6GgQZ8fW.js +2 -0
  137. package/dist/vue-ui-quick-chart-CzRbFXIS.js +16 -0
  138. package/dist/vue-ui-radar-BxsD2JBj.js +1 -0
  139. package/dist/vue-ui-rating-D0QvpD3V.js +1 -0
  140. package/dist/vue-ui-relation-circle-BFPAlaWQ.js +1 -0
  141. package/dist/vue-ui-ridgeline-G2m7eFWe.js +2 -0
  142. package/dist/vue-ui-rings-l_BLWL48.js +1 -0
  143. package/dist/vue-ui-scatter-C4hXe3DM.js +9 -0
  144. package/dist/{vue-ui-skeleton-SlYTmirP.js → vue-ui-skeleton-BLyh-ESb.js} +3 -3
  145. package/dist/{vue-ui-smiley-DZVFOGfv.js → vue-ui-smiley-C00q-teB.js} +1 -1
  146. package/dist/{vue-ui-spark-trend-D155vscB.js → vue-ui-spark-trend-D0hz9kNt.js} +1 -1
  147. package/dist/vue-ui-sparkbar-Dweyr8h-.js +1 -0
  148. package/dist/{vue-ui-sparkgauge-CFj0wLj5.js → vue-ui-sparkgauge-DQfCXKFj.js} +1 -1
  149. package/dist/vue-ui-sparkhistogram-DOfAu86W.js +1 -0
  150. package/dist/vue-ui-sparkline-DuX09S8A.js +1 -0
  151. package/dist/vue-ui-sparkstackbar-vXOpiyrI.js +1 -0
  152. package/dist/vue-ui-stackbar-DsrwNY0p.js +29 -0
  153. package/dist/vue-ui-stackline-e7EYZet7.js +39 -0
  154. package/dist/vue-ui-strip-plot-2DxzeUXU.js +2 -0
  155. package/dist/vue-ui-table-B344jLaG.js +14 -0
  156. package/dist/vue-ui-table-heatmap-BwoRcqFD.js +1 -0
  157. package/dist/vue-ui-table-sparkline-itq8yRCe.js +1 -0
  158. package/dist/vue-ui-thermometer-BSRjS7l3.js +1 -0
  159. package/dist/vue-ui-timer-DM-urc2D.js +64 -0
  160. package/dist/vue-ui-tiremarks-CbIOAO3F.js +1 -0
  161. package/dist/vue-ui-treemap-Cgal4H5O.js +1 -0
  162. package/dist/vue-ui-waffle-BZFI7JLd.js +1 -0
  163. package/dist/vue-ui-wheel-DdKm_Vd8.js +1 -0
  164. package/dist/vue-ui-word-cloud-D40vUb5e.js +4 -0
  165. package/dist/vue-ui-world-BseI3A0C.js +19 -0
  166. package/dist/vue-ui-xy-Bl-DUFcf.js +27 -0
  167. package/dist/vue-ui-xy-DNVd3FPA.js +31 -0
  168. package/dist/vue-ui-xy-canvas-CRSisgSA.js +9 -0
  169. package/dist/vue_ui_3d_bar-Dm8zmL8w.js +1 -0
  170. package/dist/vue_ui_age_pyramid-DXJeenVU.js +1 -0
  171. package/dist/vue_ui_bullet-Biewiy1l.js +1 -0
  172. package/dist/vue_ui_bump-DZoGcET0.js +1 -0
  173. package/dist/vue_ui_candlestick-DpPpEElM.js +1 -0
  174. package/dist/vue_ui_chestnut-BKcntsvv.js +1 -0
  175. package/dist/vue_ui_chord-Crjq1pgV.js +1 -0
  176. package/dist/vue_ui_circle_pack-DarCZyF2.js +1 -0
  177. package/dist/vue_ui_dag-B-4OxeQQ.js +1 -0
  178. package/dist/vue_ui_donut-B2W2nyAS.js +1 -0
  179. package/dist/vue_ui_donut_evolution-BvIyBtun.js +1 -0
  180. package/dist/vue_ui_dumbbell-DyyFLbhQ.js +1 -0
  181. package/dist/vue_ui_flow-aeVlnSsc.js +1 -0
  182. package/dist/vue_ui_funnel-CWrEr790.js +1 -0
  183. package/dist/vue_ui_galaxy-DvaSrGxT.js +1 -0
  184. package/dist/vue_ui_gauge-Brc1-auP.js +1 -0
  185. package/dist/vue_ui_geo-COGanKF8.js +1 -0
  186. package/dist/vue_ui_graph-31AYnh4c.js +1 -0
  187. package/dist/vue_ui_heatmap-Q8YMKNq2.js +1 -0
  188. package/dist/vue_ui_hill-Dbv_VVlr.js +1 -0
  189. package/dist/vue_ui_history_plot-C0kFJh-f.js +1 -0
  190. package/dist/vue_ui_horizontal_bar-uuJ0_9O6.js +1 -0
  191. package/dist/vue_ui_label-D3BzxTFQ.js +1 -0
  192. package/dist/vue_ui_molecule-VokyVu8q.js +1 -0
  193. package/dist/vue_ui_mood_radar-i6r1Gp6v.js +1 -0
  194. package/dist/vue_ui_nested_donuts-BAb9o0Ro.js +1 -0
  195. package/dist/vue_ui_onion-BMjwCChN.js +1 -0
  196. package/dist/vue_ui_parallel_coordinate_plot-Wb2Xmpjs.js +1 -0
  197. package/dist/vue_ui_quadrant-DbLNBD92.js +1 -0
  198. package/dist/vue_ui_quick_chart-KljadV9E.js +1 -0
  199. package/dist/vue_ui_radar-Pd3xOzjc.js +1 -0
  200. package/dist/vue_ui_relation_circle-BLo4XQFQ.js +1 -0
  201. package/dist/vue_ui_ridgeline-BIaWjw_v.js +1 -0
  202. package/dist/vue_ui_rings-C0puwNW1.js +1 -0
  203. package/dist/vue_ui_scatter-4as114Wa.js +1 -0
  204. package/dist/vue_ui_spark_trend-BgPQfeCz.js +1 -0
  205. package/dist/vue_ui_sparkbar-CvcZ5nwT.js +1 -0
  206. package/dist/vue_ui_sparkgauge-D3xirz2w.js +1 -0
  207. package/dist/vue_ui_sparkhistogram-E6G1761_.js +1 -0
  208. package/dist/vue_ui_sparkline-DKZdnbap.js +1 -0
  209. package/dist/vue_ui_sparkstackbar-DZX34uPS.js +1 -0
  210. package/dist/vue_ui_stackbar-BrAzeA3Y.js +1 -0
  211. package/dist/vue_ui_stackline-B6ylXHBJ.js +1 -0
  212. package/dist/vue_ui_strip_plot-uxKGttVC.js +1 -0
  213. package/dist/vue_ui_table_heatmap-DVMDsaVJ.js +1 -0
  214. package/dist/vue_ui_table_sparkline-BQO5A9u8.js +1 -0
  215. package/dist/vue_ui_thermometer-BAFdvXZW.js +1 -0
  216. package/dist/vue_ui_tiremarks-LwElhY5p.js +1 -0
  217. package/dist/vue_ui_treemap-JB0DfAmd.js +1 -0
  218. package/dist/vue_ui_waffle-BVf3Wcda.js +1 -0
  219. package/dist/vue_ui_wheel-bdYAONK7.js +1 -0
  220. package/dist/vue_ui_word_cloud-Dn2Ffjxb.js +1 -0
  221. package/dist/vue_ui_xy-BfaXjpvS.js +1 -0
  222. package/dist/vue_ui_xy_canvas-cQVme5sy.js +1 -0
  223. package/package.json +9 -9
  224. package/dist/BaseDraggableDialog-BK7dj9O6.js +0 -1
  225. package/dist/BaseZoomControls-JSk9zW3D.js +0 -1
  226. package/dist/ColorPicker-CwYfNvwH.js +0 -1
  227. package/dist/PenAndPaper-DoNTA-SV.js +0 -1
  228. package/dist/SlicerPreview-ChKbdZSU.js +0 -1
  229. package/dist/XyAnalysisOptions-CV22ga_a.js +0 -1
  230. package/dist/package-CXaebsLV.js +0 -1
  231. package/dist/resolveChartConfig-CIhClE5R.js +0 -1
  232. package/dist/useConfig-C3FbHv4N.js +0 -1
  233. package/dist/vue-data-ui-O-w339Ac.js +0 -1
  234. package/dist/vue-ui-3d-bar-CcFFARyq.js +0 -19
  235. package/dist/vue-ui-age-pyramid-Di6fKV6f.js +0 -1
  236. package/dist/vue-ui-annotator-sBGtsgcb.js +0 -331
  237. package/dist/vue-ui-bullet-BZLa1xj7.js +0 -34
  238. package/dist/vue-ui-bump-BSdpAH0l.js +0 -8
  239. package/dist/vue-ui-candlestick-BKZASgq9.js +0 -22
  240. package/dist/vue-ui-carousel-table-B20E2K8A.js +0 -1
  241. package/dist/vue-ui-chestnut-DavvzmiQ.js +0 -1
  242. package/dist/vue-ui-chord-D2Hn54i7.js +0 -21
  243. package/dist/vue-ui-circle-pack-BKaS-zWo.js +0 -13
  244. package/dist/vue-ui-cursor-BUOHKNmb.js +0 -1
  245. package/dist/vue-ui-dag-SLYPxbGo.js +0 -9
  246. package/dist/vue-ui-dashboard-Bgt7VLv0.js +0 -1
  247. package/dist/vue-ui-donut-8ZWyXEVs.js +0 -22
  248. package/dist/vue-ui-donut-DBcB8Ym1.js +0 -47
  249. package/dist/vue-ui-donut-evolution-D3lo74Ce.js +0 -2
  250. package/dist/vue-ui-dumbbell-CdarkL8Z.js +0 -9
  251. package/dist/vue-ui-flow-B0dYxGWT.js +0 -3
  252. package/dist/vue-ui-funnel-C0Cl9jMd.js +0 -1
  253. package/dist/vue-ui-galaxy-C_UWOQn4.js +0 -1
  254. package/dist/vue-ui-gauge-B94ToHlW.js +0 -1
  255. package/dist/vue-ui-geo-V-JmJgKS.js +0 -1
  256. package/dist/vue-ui-gizmo-BvVDEnNu.js +0 -1
  257. package/dist/vue-ui-heatmap-DWtbocz5.js +0 -1
  258. package/dist/vue-ui-hill-BH_lYm5G.js +0 -1
  259. package/dist/vue-ui-history-plot-DkWvta0h.js +0 -2
  260. package/dist/vue-ui-horizontal-bar-DbJ1DFjG.js +0 -4
  261. package/dist/vue-ui-molecule-BrG8K2Tm.js +0 -1
  262. package/dist/vue-ui-mood-radar-DEpFpfiW.js +0 -1
  263. package/dist/vue-ui-nested-donuts-CZetOzaq.js +0 -19
  264. package/dist/vue-ui-onion-DvyAxUSj.js +0 -5
  265. package/dist/vue-ui-parallel-coordinate-plot-Bdakcv3w.js +0 -9
  266. package/dist/vue-ui-quadrant-CWZeQjHE.js +0 -2
  267. package/dist/vue-ui-quick-chart-BULxPrPs.js +0 -16
  268. package/dist/vue-ui-radar-CJ_5G0QP.js +0 -1
  269. package/dist/vue-ui-rating-QcJoab0i.js +0 -1
  270. package/dist/vue-ui-relation-circle-Vetly6f0.js +0 -1
  271. package/dist/vue-ui-ridgeline-5a87TiQf.js +0 -2
  272. package/dist/vue-ui-rings-CKuFf5vA.js +0 -1
  273. package/dist/vue-ui-scatter-C2hNg3ED.js +0 -9
  274. package/dist/vue-ui-sparkbar-DFShNanl.js +0 -1
  275. package/dist/vue-ui-sparkhistogram-DwDcqqEj.js +0 -1
  276. package/dist/vue-ui-sparkline-kxl5wQGY.js +0 -1
  277. package/dist/vue-ui-sparkstackbar-CHjaAWVJ.js +0 -1
  278. package/dist/vue-ui-stackbar-BrtUg-Mb.js +0 -29
  279. package/dist/vue-ui-stackline-CU2UkEJU.js +0 -39
  280. package/dist/vue-ui-strip-plot-BmEpoIoU.js +0 -2
  281. package/dist/vue-ui-table-Ddg209i0.js +0 -14
  282. package/dist/vue-ui-table-heatmap-B8AdX6Nq.js +0 -1
  283. package/dist/vue-ui-table-sparkline-B62l_ODH.js +0 -1
  284. package/dist/vue-ui-thermometer-CvxyfTWE.js +0 -1
  285. package/dist/vue-ui-timer-BkNtid9A.js +0 -64
  286. package/dist/vue-ui-tiremarks-BE0nbuHp.js +0 -1
  287. package/dist/vue-ui-treemap-B9wAoh5g.js +0 -1
  288. package/dist/vue-ui-waffle-DqeBiuY3.js +0 -1
  289. package/dist/vue-ui-wheel---NZaS40.js +0 -1
  290. package/dist/vue-ui-word-cloud-DRFGFVmf.js +0 -4
  291. package/dist/vue-ui-world-D5gKzypf.js +0 -19
  292. package/dist/vue-ui-xy-Caj8jz6D.js +0 -31
  293. package/dist/vue-ui-xy-CcVIXfL_.js +0 -27
  294. package/dist/vue-ui-xy-canvas-BceSG3AO.js +0 -9
  295. package/dist/vue_ui_3d_bar-DmAve5Ri.js +0 -1
  296. package/dist/vue_ui_age_pyramid-CL0Ef8Ov.js +0 -1
  297. package/dist/vue_ui_bullet-CwVYkpjd.js +0 -1
  298. package/dist/vue_ui_bump-KJL9GYr4.js +0 -1
  299. package/dist/vue_ui_candlestick-DKvha_Ab.js +0 -1
  300. package/dist/vue_ui_chestnut-BxxivKN7.js +0 -1
  301. package/dist/vue_ui_chord-Fq6VBRT1.js +0 -1
  302. package/dist/vue_ui_circle_pack-CfXkXi7v.js +0 -1
  303. package/dist/vue_ui_dag-1b_dLSym.js +0 -1
  304. package/dist/vue_ui_donut-T5PeOqvf.js +0 -1
  305. package/dist/vue_ui_donut_evolution-CVoh3twl.js +0 -1
  306. package/dist/vue_ui_dumbbell-BMcxK0N3.js +0 -1
  307. package/dist/vue_ui_flow-kvV56Es9.js +0 -1
  308. package/dist/vue_ui_funnel-CaEV5hG7.js +0 -1
  309. package/dist/vue_ui_galaxy-B94QInxc.js +0 -1
  310. package/dist/vue_ui_gauge-BJhb6yqE.js +0 -1
  311. package/dist/vue_ui_geo-DL1SMQHp.js +0 -1
  312. package/dist/vue_ui_graph-B1ACwQj7.js +0 -1
  313. package/dist/vue_ui_heatmap-kh5NMmwf.js +0 -1
  314. package/dist/vue_ui_hill-DQi4pQCG.js +0 -1
  315. package/dist/vue_ui_history_plot-soyqUW4Y.js +0 -1
  316. package/dist/vue_ui_horizontal_bar-C4ulIxeT.js +0 -1
  317. package/dist/vue_ui_label-dtPqyFsj.js +0 -1
  318. package/dist/vue_ui_molecule-Bw1UW1Na.js +0 -1
  319. package/dist/vue_ui_mood_radar-CXaBdJnv.js +0 -1
  320. package/dist/vue_ui_nested_donuts-CRtGsJcz.js +0 -1
  321. package/dist/vue_ui_onion-C9BedU_-.js +0 -1
  322. package/dist/vue_ui_parallel_coordinate_plot-Cs_xXAG5.js +0 -1
  323. package/dist/vue_ui_quadrant-BUv-SqzP.js +0 -1
  324. package/dist/vue_ui_quick_chart-BRfcRW6Z.js +0 -1
  325. package/dist/vue_ui_radar-68iK9Fam.js +0 -1
  326. package/dist/vue_ui_relation_circle-Dkv-cSB6.js +0 -1
  327. package/dist/vue_ui_ridgeline-Di26JtQu.js +0 -1
  328. package/dist/vue_ui_rings-BcDDXHpQ.js +0 -1
  329. package/dist/vue_ui_scatter-C50uFYQL.js +0 -1
  330. package/dist/vue_ui_spark_trend-BOM3zo64.js +0 -1
  331. package/dist/vue_ui_sparkbar-Bpx7QrFq.js +0 -1
  332. package/dist/vue_ui_sparkgauge-D2Hk6bvS.js +0 -1
  333. package/dist/vue_ui_sparkhistogram-ChwOkoMb.js +0 -1
  334. package/dist/vue_ui_sparkline-CvL_e9L8.js +0 -1
  335. package/dist/vue_ui_sparkstackbar-Chtog7hC.js +0 -1
  336. package/dist/vue_ui_stackbar-BkBIi_bL.js +0 -1
  337. package/dist/vue_ui_stackline-D7b63K84.js +0 -1
  338. package/dist/vue_ui_strip_plot-CwMowrhT.js +0 -1
  339. package/dist/vue_ui_table_heatmap-vfeY6r97.js +0 -1
  340. package/dist/vue_ui_table_sparkline-Dlfbza49.js +0 -1
  341. package/dist/vue_ui_thermometer-CRijq6H6.js +0 -1
  342. package/dist/vue_ui_tiremarks-8HFfABNF.js +0 -1
  343. package/dist/vue_ui_treemap-Bv4Rdl5_.js +0 -1
  344. package/dist/vue_ui_waffle-BbBLSluB.js +0 -1
  345. package/dist/vue_ui_wheel-C-479bvJ.js +0 -1
  346. package/dist/vue_ui_word_cloud-DBiJtSyL.js +0 -1
  347. package/dist/vue_ui_xy-CJBM9F6W.js +0 -1
  348. package/dist/vue_ui_xy_canvas-CT-FN9rU.js +0 -1
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-C3FbHv4N.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-rPeBMZrn.js";import{n as h,t as g}from"./useHints-C-TwxM0Y.js";import{t as ee}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as te}from"./useNestedProp-DnGoh-XS.js";import{t as ne}from"./useThemeCheck-BKNRbGeC.js";import{t as re}from"./chartImage-DPGnEuYM.js";import{n as ie}from"./Title-BliHuXfT.js";import{t as ae}from"./useChartExport-BZts4KFb.js";import{n as oe,r as se,t as ce}from"./userOptionsSlots-CWtXN5Q6.js";import{t as le}from"./usePrinter-DVf3YcG5.js";import{t as ue}from"./useTransitions-ChGGrtrv.js";import{t as de}from"./useUserOptionState-CXlFnwPv.js";import{t as fe}from"./vue_ui_hill-DQi4pQCG.js";import{Fragment as _,computed as v,createBlock as pe,createCommentVNode as y,createElementBlock as b,createElementVNode as x,createSlots as me,createVNode as he,defineAsyncComponent as ge,guardReactiveProps as _e,mergeProps as ve,nextTick as ye,normalizeClass as S,normalizeProps as be,normalizeStyle as xe,onBeforeUnmount as Se,onMounted as Ce,openBlock as C,ref as w,renderList as we,renderSlot as T,shallowRef as Te,toDisplayString as E,unref as D,useTemplateRef as Ee,watch as De,withCtx as Oe,withKeys as ke,withModifiers as O}from"vue";var Ae=/* @__PURE__ */ e({default:()=>wt}),je=[`id`,`data-editing`],Me={key:0,ref:`chartTitle`,style:`width:100%;background:transparent;padding-bottom:24px`},Ne={key:3,class:`vue-ui-hill__toolbar`,"data-dom-to-png-ignore":``},Pe=[`viewBox`],Fe=[`width`,`height`],Ie=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Le=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],Re=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],ze={key:0,"pointer-events":`none`},Be=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],Ve=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],He=[`transform`,`font-size`,`fill`,`stroke`],Ue=[`transform`,`data-datapoint-index`,`data-datapoint-id`,`tabindex`,`aria-valuenow`,`aria-valuetext`,`aria-label`,`onFocus`,`onBlur`,`onKeydown`,`onPointerenter`,`onPointerleave`,`onClick`],We=[`r`,`onPointerdown`],Ge=[`r`,`fill`,`stroke`,`stroke-width`],Ke=[`stroke`,`stroke-width`],qe=[`d`],Je=[`x`,`y`,`text-anchor`,`fill`,`font-size`,`font-weight`,`stroke`,`stroke-width`],Ye=[`transform`,`tabindex`,`aria-label`,`aria-expanded`,`onClick`,`onFocus`,`onKeydown`],Xe={key:0,class:`vue-ui-hill__stack-overflow-collapse-ghosts`,"pointer-events":`none`,"aria-hidden":`true`},Ze=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Qe=[`from`,`dur`],$e=[`from`,`dur`],et=[`from`,`to`,`dur`],tt=[`dur`],nt=[`r`],rt=[`x`,`y`,`width`,`height`,`fill`,`stroke`,`stroke-width`],it=[`stroke`,`stroke-width`],at=[`d`],ot=[`y`,`fill`,`font-size`,`font-weight`,`stroke`],st=[`x`,`y`,`fill`,`font-size`,`font-weight`,`letter-spacing`],ct=[`x`,`y`,`fill`,`font-size`,`font-weight`,`letter-spacing`],lt=[`x`,`y`,`rx`,`width`,`height`,`fill`],ut=[`id`],dt=[`x`,`y`,`width`,`height`,`rx`,`ry`],ft=[`clip-path`],pt=[`width`,`x`,`y`,`fill`,`height`,`onPointerenter`,`onPointerleave`],mt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],ht=[`x`,`y`,`width`,`height`,`rx`,`ry`,`stroke`,`stroke-width`],gt=[`x`,`y`,`fill`,`font-size`],_t=[`aria-label`,`onKeydown`],vt={key:0,class:`vue-ui-hill__stack-overflow-menu-title`},yt=[`disabled`,`aria-label`,`onClick`],bt={class:`vue-ui-hill__stack-overflow-menu-label`},xt={class:`vue-ui-hill__stack-overflow-menu-value`},St={key:6,class:`vue-data-ui-watermark`},Ct={key:7,class:`vue-ui-hill__loading`,"data-dom-to-png-ignore":``},wt=/*#__PURE__*/ ee({__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:ee,emit:Ae}){let wt=ge(()=>import(`./HillActions-BMH9pSmQ.js`)),Tt=ge(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Et=ge(()=>import(`./PackageVersion-DKSNC-YP.js`).then(e=>e.t)),Dt=ge(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Ot=ge(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),{vue_ui_hill:kt}=i(),{isThemeValid:At,warnInvalidTheme:jt}=ne(),Mt=e,Nt=w(c()),k=Te(null),Pt=Ee(`hillChartRef`),A=Ee(`svgRef`),Ft=Ee(`overflowMenuRef`),It=Ee(`userOptionsRef`),Lt=w(0),Rt=Ae;function zt(){let e=te({userConfig:Mt.config,defaultConfig:kt}),t={},n=e.theme;if(!n)t=e;else if(!At.value(e))jt(e),t=e;else{let r=te({userConfig:fe[n]||Mt.config,defaultConfig:e});t={...te({userConfig:Mt.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:d[n]||nn}}return t}let j=w(zt()),M=v(()=>j.value.style.chart.layout.plots),N=v(()=>j.value.style.chart);h({config:()=>j.value,dataset:()=>Mt.dataset,component:`VueUiHill`,rules:[g.emptyArray,g.noHint]});let{transitionEnabled:P}=ue({config:()=>j.value.transitions,dataset:()=>Mt.dataset}),{userOptionsVisible:Bt,setUserOptionsVisibility:Vt,keepUserOptionState:Ht}=de({config:j.value});function Ut(){Vt(!0)}function Wt(){Vt(!1),tr.value=null,Q.value=null,er.value=null}let{isPrinting:Gt,isImaging:Kt,generatePdf:qt,generateImage:Jt}=le({elementId:`hill_${Nt.value}`,fileName:N.value.title.text||`vue-ui-hill`,options:j.value.userOptions.print}),Yt=v(()=>j.value.userOptions.useCursorPointer),Xt=w(0),Zt=w(!1);function Qt(e){Zt.value=e,Xt.value+=1}let $t=w(!1);function en(){$t.value=!$t.value}let tn=v(()=>j.value.userOptions.position===`left`?`right`:`left`);De(()=>Mt.config,()=>{k.value=null,j.value=zt(),Xt.value+=1,F.value!==j.value.editing&&(F.value=j.value.editing&&!j.value.readonly)},{deep:!0});let nn=v(()=>{let e=j.value.customPalette;return Array.isArray(e)&&e.length?e:s});function rn(e){let t=Number(e);return Number.isFinite(t)?Math.min(1,Math.max(0,t)):0}function an(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 on(e,t){let n=e&&typeof e==`object`?e:{},r=`Item ${t+1}`,i=String(n.name??n.label??r),a=rn(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||nn.value[t%nn.value.length],muted:!!n.muted,disabled:!!n.disabled,status:an(e.position),labelSide:[`left`,`right`,`auto`].includes(n.labelSide)?n.labelSide:`auto`,__index:t}}let sn=v(()=>Array.isArray(Mt.dataset)?Mt.dataset.map(on):[]);function cn(e){return e.map(e=>({...e}))}function ln(e){let{__index:t,...n}=e;return Object.prototype.hasOwnProperty.call(n,`value`)&&(n.value=n.position),n}function un(e=I.value){return e.map(ln)}let dn=v(()=>j.value.editing&&!j.value.readonly),F=w(dn.value),I=w(cn(sn.value)),L=w(null);De(sn,e=>{F.value||(k.value=null,I.value=cn(e))},{deep:!0});let R=v(()=>!j.value.readonly);De(R,e=>{e||(L.value=null,k.value=null,F.value=!1,I.value=cn(sn.value))});function z(e,t){Rt(e,t);let n=j.value.events?.[e];typeof n==`function`&&n(t)}let B=v(()=>N.value),fn=v(()=>B.value.layout),V=v(()=>fn.value.hill),H=v(()=>fn.value.plots),U=v(()=>fn.value.labels.item),W=v(()=>fn.value.labels.phases),G=v(()=>B.value.toolbar),K=v(()=>fn.value.stackbar),q=v(()=>{let e=H.value.stacking?.overflow||{},t=Math.max(0,Number(H.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||H.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||B.value.backgroundColor,color:e.menu?.color||B.value.color,borderColor:e.menu?.borderColor||H.value.stroke,borderRadius:Math.max(0,Number(e.menu?.borderRadius)||6)}}});function pn(e,t,n=1){let r=Number(e);return Number.isFinite(r)?Math.min(n,Math.max(0,r)):t}let J=v(()=>{let e=V.value.geometry||{},t=Math.max(0,Number(B.value.width)||0),n=Math.max(0,Number(B.value.height)||0),r=pn(e.horizontalPaddingRatio,.02,.49),i=pn(e.topPaddingRatio,.12,.49),a=pn(e.bottomPaddingRatio,.2,.49),o=pn(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,h=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:h,y:u},{x:h,y:d},{x:l,y:d}]}}),mn=v(()=>{let{left:e,right:t}=J.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 hn(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 gn(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 _n(e){let t=rn(e),{startX:n,centerX:r,endX:i,left:a,right:o}=J.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;hn(c[0].x,c[1].x,c[2].x,c[3].x,e)<s?l=e:u=e}let d=(l+u)/2,f=hn(c[0].y,c[1].y,c[2].y,c[3].y,d),p=gn(c[0].x,c[1].x,c[2].x,c[3].x,d),m=gn(c[0].y,c[1].y,c[2].y,c[3].y,d),h=Math.hypot(p,m)||1;return{x:s,y:f,normalX:m/h,normalY:-p/h}}function vn(e){let t=Number(H.value.stacking.overlapThresholdRatio);return e*(2-(Number.isFinite(t)?Math.min(2,Math.max(0,t)):.5))}function yn(e,t){let n=/* @__PURE__ */ new Map,r=H.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=vn(t),a=e.map((e,t)=>({datapoint:e,index:t,point:_n(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 bn(e){let t=e+Math.max(0,Number(H.value.strokeWidth)||0)/2,n=H.value.stacking.gap??e/2;return t*2+n}let xn=w(null),Y=w(null),X=w(null),Sn=w(null),Cn=w(null),wn=/* @__PURE__ */ new Set,Tn=null,En=null,Z=null;function Dn(e){let t=Math.max(0,Number(H.value.strokeWidth)||0),n=H.value.shadow.show?Math.max(0,Number(H.value.shadow.blur)||0)+Math.max(0,-(Number(H.value.shadow.offsetY)||0)):0;return e+t/2+n}function On(e,t,n){if(t<=1)return e-Dn(n);let r=bn(n);return e-(t-1)*r-Dn(n)}function kn(e,t,n,r){if(n<=1)return wn.delete(e),!1;let i=On(t,n,r),a=wn.has(e),o=q.value.hysteresis,s=a?i<o:i<0;return s?wn.add(e):wn.delete(e),s}let An=v(()=>{let e=Math.max(0,Number(H.value.radius)||0),t=bn(e),n=yn(I.value,e),r=/* @__PURE__ */ new Map,i=/* @__PURE__ */ new Map,a=[],o=/* @__PURE__ */ new Set,s=L.value?.id??null;q.value.show||wn.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 wn.forEach(e=>{c.has(e)||wn.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=_n(l);if(!(q.value.show&&kn(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===xn.value),p=d||f||null,m=p?c.filter(({datapoint:e})=>e.id!==p.datapoint.id):c,h=Y.value,g=!(!f||h?.datapointId!==f.datapoint.id||h.moved),ee=m.length?g?l:m.reduce((e,t)=>e+(Number(t.datapoint.position)||0),0)/m.length:l,te=_n(ee);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:ee})}),m.length&&a.push({stackId:r,anchorPosition:ee,x:te.x,y:te.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=_n(n.position);return{id:e.id,color:e.color,relativeX:r.x-te.x,relativeY:r.y-n.index*t-te.y}})})}),{layoutMap:n,displayMap:i,markers:a,overflowMemberIds:o}});function jn(e){let t=Nn.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||!H.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=bn(Math.max(0,Number(H.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 Mn(){return new Map(Nn.value.filter(e=>!e.isStackOverflowHidden).map(e=>[e.id,{x:e.x,y:e.y}]))}let Nn=v(()=>{let e=Math.max(0,Number(H.value.radius)||0),{layoutMap:t,displayMap:n,markers:r}=An.value,i=bn(e),a=L.value,o=a?.stationaryLayout,s=o instanceof Map?o:k.value instanceof Map?k.value:null,c=null;if(a&&o instanceof Map&&H.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=_n(t.position),r=vn(e),s=I.value.filter(e=>e.id!==a.id&&o.has(e.id)).map(e=>{let t=_n(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=_n(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,h=m(U.value.autoSideThreshold,.5,1),g=p||(e.position>h?`left`:`right`),ee=Math.abs(Number(U.value.offsetX)||0)+H.value.radius+U.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:g,labelX:g===`left`?-ee:ee,textAnchor:g===`left`?`end`:`start`}})});function Pn(e){return I.value.find(t=>t.id===e)}function Fn(e,t){let n=rn(t),r;I.value=I.value.map(t=>t.id===e?(r={...t,position:n},r):t),r&&(xr(r.id,r.position),z(`change`,{datapoint:ln(r),dataset:un()}))}function In(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}=J.value;return rn(0+(i.x-a)/(o-a)*1)}function Ln(){R.value&&(X.value=null,xn.value=null,Y.value=null,Cn.value=null,mr(),k.value=null,I.value=cn(sn.value),F.value=!0,z(`edit`,un()))}function Rn(){let e=un();X.value=null,xn.value=null,Y.value=null,Cn.value=null,mr(),L.value=null,F.value=!1,z(`save`,e)}function zn(){X.value=null,xn.value=null,Y.value=null,Cn.value=null,mr(),L.value=null,k.value=null,I.value=cn(sn.value),F.value=!1,z(`cancel`,un())}function Bn(e,t){if(!R.value||!F.value||t.disabled)return;X.value=null;let n=e.currentTarget.closest(`.vue-ui-hill__datapoint`);n&&typeof n.focus==`function`&&(n.focus(),Q.value=t.id),e.preventDefault();let r=jn(t.id),i=Y.value?.datapointId===t.id&&!Y.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=In(e.clientX);n!==null&&Fn(t.id,n)}let a=Pn(t.id);a&&z(`dragStart`,ln(a))}function Vn(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=In(e.clientX);n!==null&&Fn(L.value.id,n)}function Hn(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=Pn(t.id);k.value=Mn(),L.value=null,r&&(n&&z(`selectDatapoint`,Gn(r)),z(`dragEnd`,ln(r)))}function Un(e,t){if(!R.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;Q.value=t.id,L.value={id:t.id,pointerId:null,stationaryLayout:jn(t.id)},Fn(t.id,r),k.value=Mn(),L.value=null,ye(()=>{i?.isConnected&&i.focus({preventScroll:!0})})}function Wn(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?W.value.left.text:W.value.right.text}function Gn(e){return{datapoint:ln(e),index:e.__index}}function Kn(e){Q.value=null,tr.value=e.id,![0,1].includes(e.position)&&Q.value!==e.id&&ir(e),z(`datapointEnter`,Gn(e))}function qn(e){tr.value===e.id&&(tr.value=null),er.value===e.id&&Q.value!==e.id&&L.value?.id!==e.id&&(er.value=null),z(`datapointLeave`,Gn(e))}function Jn(e){F.value&&R.value||z(`selectDatapoint`,Gn(e))}let Yn=v(()=>{let e=B.value;return{width:`100%`,maxWidth:`100%`,color:e.color,backgroundColor:e.backgroundColor,fontFamily:j.value.style.fontFamily,"--vue-ui-hill-button-hover-border":G.value.buttons.hoverBorderColor,"--vue-ui-hill-button-active-offset":`${G.value.buttons.activeTranslateY}px`}}),Xn=v(()=>({color:G.value.status.color,fontSize:`${G.value.status.fontSize}px`,fontWeight:G.value.status.bold?`bold`:`normal`,lineHeight:G.value.status.lineHeight}));v(()=>({color:B.value.title.color,fontSize:`${B.value.title.fontSize}px`,fontWeight:B.value.title.bold?`bold`:`normal`,textAlign:B.value.title.textAlign})),v(()=>({color:B.value.title.subtitle.color,fontSize:`${B.value.title.subtitle.fontSize}px`,fontWeight:B.value.title.subtitle.bold?`bold`:`normal`}));let Zn=v(()=>{let e=Math.max(0,Number(B.value.height)||0);return Math.min(e,J.value.baseY+e)+W.value.offsetY});function Qn(e){return W.value[e].text}function $n(e){return e.position===0||e.position===1}let er=w(null),tr=w(null),Q=w(null);function nr(e){Q.value=e.id}function rr(e){Q.value===e.id&&(Q.value=null),er.value===e.id&&tr.value!==e.id&&L.value?.id!==e.id&&(er.value=null)}function ir(e){e?.id&&(er.value=e.id)}let ar=v(()=>{let e=[],t=[],n=null;return Nn.value.forEach(r=>{r.isStackOverflowHidden||(r.id===er.value?n=r:$n(r)?e.push(r):t.push(r))}),[...e,...t,...n?[n]:[]]}),or=v(()=>An.value.markers),sr=v(()=>or.value.find(e=>e.stackId===X.value)||null),cr=v(()=>{let e=Math.max(160,Number(q.value.menu.width)||220),t=Math.max(80,Number(q.value.menu.maxHeight)||220);return{visibility:Sn.value?`visible`:`hidden`,width:`max-content`,minWidth:`${e}px`,maxWidth:`calc(100% - 16px)`,maxHeight:`${t}px`,backgroundColor:q.value.menu.backgroundColor,color:q.value.menu.color,borderColor:q.value.menu.borderColor,borderRadius:`${q.value.menu.borderRadius}px`}});function lr(e,t){let n=A.value,r=Pt.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 ur(){let e=sr.value,t=Ft.value,n=Pt.value;if(!e||!t||!n){Sn.value=null;return}let r=lr(e.x,e.y),i=lr(e.x,e.y+q.value.marker.radius);if(!r||!i){Sn.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,h=p>=8,g=f;!m&&h?g=p:m||(g=Math.min(Math.max(8,f),Math.max(8,a.height-s-8))),Sn.value={left:`${d}px`,top:`${g}px`,transform:`translateX(-50%)`,visibility:`visible`}}function dr(){typeof window<`u`&&(Z!==null&&window.cancelAnimationFrame(Z),Z=window.requestAnimationFrame(()=>{Z=null,ur()}))}De(or,e=>{X.value&&!e.some(e=>e.stackId===X.value)&&pr()}),De(()=>{let e=sr.value;return e?[e.stackId,e.x,e.y,e.hiddenDatapoints.length,e.hiddenDatapoints.map(e=>`${e.id}:${e.label}:${e.position}`).join(`|`),q.value.marker.radius,q.value.menu.width,q.value.menu.maxHeight,q.value.menu.backgroundColor,q.value.menu.color,q.value.menu.borderColor,q.value.menu.borderRadius,Zt.value]:null},e=>{e?ye(dr):Sn.value=null},{flush:`post`}),De(Ft,(e,t)=>{t&&En&&En.unobserve(t),e&&En&&(En.observe(e),ye(dr))},{flush:`post`}),De(()=>{let e=xn.value;return!e||An.value.overflowMemberIds.has(e)},e=>{e||(xn.value=null,Y.value=null)});function fr(e){e&&(X.value===e.stackId?dr():(Sn.value=null,X.value=e.stackId,ye(dr)))}function pr(){X.value=null,Sn.value=null,typeof window<`u`&&Z!==null&&(window.cancelAnimationFrame(Z),Z=null)}function mr(){Tn!==null&&(clearTimeout(Tn),Tn=null)}function hr(){let e=Y.value;e&&!e.moved&&(mr(),Cn.value=e.stackId,xn.value=null,Y.value=null,pr(),Tn=setTimeout(()=>{Cn.value=null,Tn=null},q.value.transitionDuration+80))}function gr(e){if(!(e instanceof Element))return{isMenu:!1,isMarker:!1,isSelectedDatapoint:!1};let t=Y.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 _r(e){let t=gr(e.target);X.value&&!t.isMenu&&!t.isMarker&&pr(),!Y.value||Y.value.moved||t.isMenu||t.isMarker||t.isSelectedDatapoint||hr()}function vr(e){let t=Nn.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 yr(e){if(!e||e.disabled||j.value.readonly)return;let t=sr.value?.stackId;t&&(mr(),Cn.value=null,xn.value=e.id,Y.value={datapointId:e.id,stackId:t,initialPosition:e.position,moved:!1},pr(),ye(()=>{vr(e.id);let t=Nn.value.find(t=>t.id===e.id);t&&z(`selectDatapoint`,Gn(t))}))}function br(){let e=Math.max(1,Number(J.value.width)||1);return Math.max(1e-6,1/e*2)}function xr(e,t){let n=Y.value;n&&n.datapointId===e&&!n.moved&&Math.abs(t-n.initialPosition)>=br()&&(Y.value={...n,moved:!0})}Ce(()=>{document.addEventListener(`pointerdown`,_r),window.addEventListener(`resize`,dr,{passive:!0}),typeof ResizeObserver<`u`&&(En=new ResizeObserver(()=>{sr.value&&dr()}),Pt.value&&En.observe(Pt.value),A.value&&En.observe(A.value))}),Se(()=>{document.removeEventListener(`pointerdown`,_r),window.removeEventListener(`resize`,dr),En?.disconnect(),En=null,Z!==null&&(window.cancelAnimationFrame(Z),Z=null),mr()});function Sr(e){return L.value?L.value.id===e.id:tr.value===e.id||Q.value===e.id}function Cr(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 wr=v(()=>N.value.backgroundColor),Tr=v(()=>N.value.legend),Er=v(()=>N.value.title),{isCallbackImaging:Dr,isCallbackSvg:Or,generateSvg:kr,onGenerateImage:Ar}=ae({svg:A,title:Er,legend:Tr,legendItems:null,backgroundColor:wr,getSvgCallback:()=>j.value.userOptions.callbacks.svg,generateImage:Jt});function jr(e=null){ye(()=>{let t=un().map(e=>[[e.name],[e.position],[Cr(e)],[Wn(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 Mr=v(()=>N.value.layout.stackbar.show),Nr=v(()=>{let e=Nn.value.length;Nn.value.reduce((e,t)=>e+(t?.position??0),0);let t=0,n=Nn.value.every(e=>e.position===1);return Nn.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})}),$=v(()=>Math.min(1,Math.max(0,Nr.value.reduce((e,t)=>e+t.proportion,0)))),Pr=v(()=>$.value*100),Fr=v(()=>J.value.left[0].x+J.value.width*$.value),Ir=v(()=>B.value.height+32+K.value.paddingTop);function Lr(){return u(K.value.label.formatter,Pr.value,a({p:``,v:Pr.value,s:`%`,r:0}))}let Rr=v(()=>`${Nt.value}-stackbar-clip`);async function zr(){let e=un();Rt(`copyAlt`,{config:j.value,dataset:e}),j.value.userOptions.callbacks.altCopy?await Promise.resolve(j.value.userOptions.callbacks.altCopy({config:j.value,dataset:e})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let Br=re(Pt,()=>N.value.title.text);function Vr(){return un()}return ee({isEditing:F,beginEditing:Ln,save:Rn,cancel:zn,getData:Vr,copyAlt:zr,toggleFullscreen:Qt,toggleAnnotator:en,generateImage:Jt,generateSvg:kr,generatePdf:qt,generateCsv:jr,getImage:Br}),(e,i)=>(C(),b(`div`,{ref_key:`hillChartRef`,ref:Pt,class:S(`vue-data-ui-component vue-ui-hill`),style:xe(Yn.value),id:`hill_${Nt.value}`,onMouseenter:Ut,onMouseleave:Wt,"data-editing":F.value},[N.value.title.text?(C(),b(`div`,Me,[(C(),pe(ie,{key:`title_${Lt.value}`,config:{title:{cy:`hill-div-title`,...N.value.title},subtitle:{cy:`hill-div-subtitle`,...N.value.title.subtitle}}},null,8,[`config`]))],512)):y(``,!0),j.value.userOptions.buttons.annotator&&A.value?(C(),pe(D(Dt),ve({key:1},D(n)(j.value.userOptions.annotator),{color:N.value.color,backgroundColor:N.value.backgroundColor,active:$t.value,svgRef:A.value,isCursorPointer:Yt.value,palette:j.value.userOptions.annotatorPalette,onClose:en}),me({_:2},[we(D(r),n=>({name:n,fn:Oe(r=>[T(e.$slots,n,be(_e(D(t)(n,r))),void 0,!0)])}))]),1040,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`,`palette`])):y(``,!0),G.value.show?(C(),pe(D(wt),{key:2,"is-editing":F.value,"is-editable":R.value,"is-fullscreen":Zt.value,position:tn.value,color:N.value.color,"background-color":N.value.backgroundColor,translations:G.value.buttons.translations,"is-cursor-pointer":Yt.value,onUpdate:Ln,onCancel:zn,onSave:Rn},{"hill-edit":Oe(()=>[T(e.$slots,`hill-edit`,{},void 0,!0)]),"hill-cancel":Oe(()=>[T(e.$slots,`hill-cancel`,{},void 0,!0)]),"hill-save":Oe(()=>[T(e.$slots,`hill-save`,{},void 0,!0)]),_:3},8,[`is-editing`,`is-editable`,`is-fullscreen`,`position`,`color`,`background-color`,`translations`,`is-cursor-pointer`])):y(``,!0),G.value.show?(C(),b(`div`,Ne,[x(`p`,{class:`vue-ui-hill__status`,style:xe(Xn.value),"aria-live":`polite`},E(F.value?G.value.status.editInstruction:G.value.status.lastUpdated),5)])):y(``,!0),j.value.userOptions.show&&(D(Ht)||D(Bt))?(C(),pe(D(Tt),ve({ref_key:`userOptionsRef`,ref:It,key:`uo_${Xt.value}`,backgroundColor:N.value.backgroundColor,color:N.value.color,isPrinting:D(Gt),isImaging:D(Kt),uid:Nt.value,hasTooltip:!1,isFullscreen:Zt.value,chartElement:Pt.value},D(se)(j.value.userOptions,`pdf csv img svg labels table fullscreen altCopy annotator`),{isAnnotation:$t.value,isCursorPointer:Yt.value,onToggleFullscreen:Qt,onGeneratePdf:D(qt),onGenerateCsv:jr,onGenerateImage:D(Ar),onGenerateSvg:D(kr),onToggleAnnotator:en,onCopyAlt:zr,style:{visibility:D(Ht)?D(Bt)?`visible`:`hidden`:`visible`}}),me({_:2},[we(D(oe)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Oe(n=>[T(e.$slots,t,be(_e(D(ce)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):y(``,!0),(C(),b(`svg`,{ref_key:`svgRef`,ref:A,style:xe({background:`transparent`,color:N.value.color,fontFamily:j.value.style.fontFamily}),class:S({"vue-data-ui-no-transition":!D(P)}),viewBox:`0 0 ${B.value.width} ${B.value.height+(Mr.value?32+K.value.paddingTop+K.value.paddingBottom+K.value.height:0)}`,role:`group`,"aria-live":`polite`,preserveAspectRatio:`xMidYMid meet`,onPointermove:Vn,onPointerup:Hn,onPointercancel:Hn},[he(D(Et)),T(e.$slots,`svg-underlayer`,{svg:{drawingArea:J.value,isEditing:F.value,datapoints:ar.value,isPrintingImg:D(Gt)||D(Kt)||D(Dr),isPrintingSvg:D(Or)}},void 0,!0),e.$slots[`chart-background`]?(C(),b(`foreignObject`,{key:0,x:0,y:0,width:Math.max(.1,B.value.width),height:Math.max(.1,B.value.height+(Mr.value?32+K.value.paddingTop+K.value.paddingBottom+K.value.height:0)),style:{pointerEvents:`none`}},[T(e.$slots,`chart-background`,{},void 0,!0)],8,Fe)):y(``,!0),V.value.baseline.show?(C(),b(`line`,{key:1,x1:J.value.startX,x2:J.value.endX,y1:J.value.baseY,y2:J.value.baseY,stroke:V.value.baseline.stroke,"stroke-width":V.value.baseline.strokeWidth,"stroke-dasharray":V.value.baseline.strokeDasharray,"vector-effect":`non-scaling-stroke`},null,8,Ie)):y(``,!0),V.value.midline.show?(C(),b(`line`,{key:2,x1:J.value.centerX,x2:J.value.centerX,y1:J.value.peakY,y2:J.value.baseY,stroke:V.value.midline.stroke,"stroke-width":V.value.midline.strokeWidth,"stroke-dasharray":V.value.midline.strokeDasharray,"vector-effect":`non-scaling-stroke`},null,8,Le)):y(``,!0),x(`path`,{d:mn.value,fill:`none`,stroke:V.value.curve.stroke,"stroke-width":V.value.curve.strokeWidth,"stroke-dasharray":V.value.curve.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,"vector-effect":`non-scaling-stroke`},null,8,Re),M.value.dragMarker.positionIndicator.show?(C(!0),b(_,{key:3},we(ar.value,e=>(C(),b(`g`,{key:`position-indicator-${e.id}`},[Sr(e)&&H.value.dragMarker.show?(C(),b(`g`,ze,[x(`path`,{d:`M${e.x},${e.y} ${e.x},${J.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:S({"vue-data-ui-transition":D(P)&&L.value?.id!==e.id})},null,10,Be),M.value.dragMarker.positionIndicator.circle.show?(C(),b(`circle`,{key:0,cx:e.x,cy:J.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:S({"vue-data-ui-transition":D(P)&&L.value?.id!==e.id})},null,10,Ve)):y(``,!0),M.value.dragMarker.positionIndicator.value.show?(C(),b(`text`,{key:1,"paint-order":`stroke fill`,"vector-effect":`non-scaling-stroke`,"text-anchor":`middle`,transform:`translate(${e.x}, ${J.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:S({"vue-data-ui-transition":D(P)&&L.value?.id!==e.id})},E(Cr(e)),11,He)):y(``,!0)])):y(``,!0)]))),128)):y(``,!0),(C(!0),b(_,null,we(ar.value,e=>(C(),b(`g`,{key:e.id,"data-cy-datapoint":``,class:S({"vue-ui-hill__datapoint":!0,"vue-data-ui-transition":D(P)&&L.value?.id!==e.id,"vue-ui-hill__datapoint--promoted":D(P)&&e.isPromotedFromStackOverflow}),style:xe({opacity:[0,1].includes(e.position)||e?.muted?H.value.mutedOpacity:e?.disabled?H.value.disabledOpacity:1}),transform:`translate(${e.x} ${e.y})`,"data-datapoint-index":e.__index,"data-datapoint-id":e.id,role:`slider`,tabindex:F.value&&R.value&&!e.disabled?0:-1,"aria-orientation":`horizontal`,"aria-valuemin":`0`,"aria-valuemax":`100`,"aria-valuenow":Cr(e),"aria-valuetext":`${e.label}: ${Wn(e.position)}, ${Cr(e)}`,"aria-label":e.label,onFocus:t=>nr(e),onBlur:t=>rr(e),onKeydown:t=>Un(t,e),onPointerenter:t=>Kn(e),onPointerleave:t=>qn(e),onClick:t=>Jn(e)},[x(`circle`,{r:H.value.hitRadius,fill:`transparent`,class:S({"vue-ui-hill__hit-area--active":F.value&&R.value&&!e.disabled,"vue-ui-hill__hit-area--dragging":L.value?.id===e.id}),onPointerdown:t=>Bn(t,e)},null,42,We),x(`circle`,{class:`vue-ui-hill-circle`,r:H.value.radius,fill:e.color,stroke:H.value.stroke,"stroke-width":H.value.strokeWidth,style:xe({filter:H.value.shadow.show?`drop-shadow(${H.value.shadow.offsetX}px ${H.value.shadow.offsetY}px ${H.value.shadow.blur}px ${H.value.shadow.color})`:`none`}),"vector-effect":`non-scaling-stroke`,"pointer-events":`none`},null,12,Ge),F.value&&(L.value?.id===e.id&&H.value.dragMarker.show||Sr(e))&&!e?.disabled?(C(),b(`g`,{key:0,fill:`none`,stroke:D(p)(e.color),"stroke-width":H.value.dragMarker.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,"pointer-events":`none`,"vector-effect":`non-scaling-stroke`,"aria-hidden":`true`},[x(`path`,{d:H.value.dragMarker.crossPath},null,8,qe)],8,Ke)):y(``,!0),U.value.show?(C(),b(`text`,{key:1,x:e.labelX,y:U.value.offsetY,"text-anchor":e.textAnchor,fill:U.value.useSerieColor?e.color:U.value.color,"font-size":U.value.fontSize,"font-weight":U.value.bold?`bold`:`normal`,"paint-order":`stroke fill`,stroke:U.value.stroke,"stroke-width":U.value.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`,"pointer-events":`none`,style:{"user-select":`none`},"dominant-baseline":`central`},E(D(l)(e.label,U.value.ellipsisThresholdChars)),9,Je)):y(``,!0)],46,Ue))),128)),(C(!0),b(_,null,we(or.value,e=>(C(),b(`g`,{key:`stack-overflow-${e.stackId}`,class:S([`vue-ui-hill__stack-overflow-marker`,{"vue-ui-hill__stack-overflow-marker--animated":D(P),"vue-ui-hill__stack-overflow-marker--restored":Cn.value===e.stackId}]),style:xe({"--vue-ui-hill-overflow-marker-duration":`${q.value.transitionDuration*.7}ms`,"--vue-ui-hill-overflow-marker-delay":`${q.value.transitionDuration*.3}ms`,"--vue-ui-hill-overflow-label-duration":`${q.value.transitionDuration*.55}ms`,"--vue-ui-hill-overflow-label-delay":`${q.value.transitionDuration*.45}ms`,cursor:Yt.value&&!j.value.readonly?`pointer`:`default`}),transform:`translate(${e.x} ${e.y})`,"data-stack-overflow-marker":``,role:`button`,tabindex:F.value&&R.value?0:-1,"aria-label":`${e.hiddenCount} stacked datapoints. Activate to choose one.`,"aria-expanded":X.value===e.stackId,onPointerdown:i[0]||=O(()=>{},[`stop`]),onClick:O(t=>fr(e),[`stop`]),onFocus:t=>fr(e),onKeydown:[ke(O(t=>fr(e),[`prevent`,`stop`]),[`enter`]),ke(O(t=>fr(e),[`prevent`,`stop`]),[`space`]),ke(O(pr,[`prevent`,`stop`]),[`esc`])]},[D(P)&&Cn.value!==e.stackId?(C(),b(`g`,Xe,[(C(!0),b(_,null,we(e.collapseDatapoints,t=>(C(),b(`circle`,{key:`overflow-ghost-${e.stackId}-${t.id}`,cx:t.relativeX,cy:t.relativeY,r:H.value.radius,fill:t.color,stroke:H.value.stroke,"stroke-width":H.value.strokeWidth,opacity:`0.8`,"vector-effect":`non-scaling-stroke`},[x(`animate`,{attributeName:`cx`,from:t.relativeX,to:`0`,dur:`${q.value.transitionDuration}ms`,fill:`freeze`,calcMode:`spline`,keyTimes:`0;1`,keySplines:`0.22 1 0.36 1`},null,8,Qe),x(`animate`,{attributeName:`cy`,from:t.relativeY,to:`0`,dur:`${q.value.transitionDuration}ms`,fill:`freeze`,calcMode:`spline`,keyTimes:`0;1`,keySplines:`0.22 1 0.36 1`},null,8,$e),x(`animate`,{attributeName:`r`,from:H.value.radius,to:q.value.marker.radius*.7,dur:`${q.value.transitionDuration}ms`,fill:`freeze`},null,8,et),x(`animate`,{attributeName:`opacity`,from:`0.8`,to:`0`,dur:`${q.value.transitionDuration*.85}ms`,fill:`freeze`},null,8,tt)],8,Ze))),128))])):y(``,!0),x(`circle`,{r:Math.max(H.value.hitRadius,q.value.marker.radius),fill:`transparent`,"pointer-events":`all`},null,8,nt),x(`rect`,{class:`vue-ui-hill__stack-overflow-marker-rect`,x:-q.value.marker.radius,y:-q.value.marker.radius,width:q.value.marker.radius*2,height:q.value.marker.radius*2,fill:q.value.marker.fill,stroke:q.value.marker.stroke,"stroke-width":q.value.marker.strokeWidth,"vector-effect":`non-scaling-stroke`,"pointer-events":`none`},null,8,rt),x(`g`,{class:`vue-ui-hill__stack-overflow-focus-cross`,fill:`none`,stroke:D(p)(V.value.curve.stroke),"stroke-width":H.value.dragMarker.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,"pointer-events":`none`,"vector-effect":`non-scaling-stroke`,"aria-hidden":`true`},[x(`path`,{d:H.value.dragMarker.crossPath},null,8,at)],8,it),sr.value?y(``,!0):(C(),b(`text`,{key:1,class:`vue-ui-hill__stack-overflow-marker-label`,"text-anchor":`middle`,y:q.value.marker.radius+q.value.marker.offsetY+q.value.marker.fontSize,fill:q.value.marker.color,"font-size":q.value.marker.fontSize,"font-weight":q.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`},` +`+E(e.hiddenCount),9,ot))],46,Ye))),128)),W.value.show?(C(),b(_,{key:4},[x(`text`,{x:(J.value.startX+J.value.centerX)/2,y:Zn.value,"text-anchor":`middle`,fill:W.value.color,"font-size":W.value.fontSize,"font-weight":W.value.bold?`bold`:`normal`,"letter-spacing":W.value.letterSpacing},E(Qn(`left`)),9,st),x(`text`,{x:(J.value.centerX+J.value.endX)/2,y:Zn.value,"text-anchor":`middle`,fill:W.value.color,"font-size":W.value.fontSize,"font-weight":W.value.bold?`bold`:`normal`,"letter-spacing":W.value.letterSpacing},E(Qn(`right`)),9,ct)],64)):y(``,!0),Mr.value?(C(),b(_,{key:5},[x(`rect`,{x:J.value.left[0].x,y:Ir.value,rx:K.value.height/2,width:J.value.width,height:K.value.height,fill:K.value.gutterColor},null,8,lt),x(`defs`,null,[x(`clipPath`,{id:Rr.value},[x(`rect`,{x:J.value.left[0].x,y:Ir.value,width:J.value.width*$.value,height:K.value.height,rx:Math.min(K.value.height/2,J.value.width*$.value/2),ry:Math.min(K.value.height/2,J.value.width*$.value/2)},null,8,dt)],8,ut)]),x(`g`,{"clip-path":`url(#${Rr.value})`},[(C(!0),b(_,null,we(Nr.value,e=>(C(),b(`rect`,{key:`bar_fill_${e.id}`,width:J.value.width*e.proportion,x:J.value.left[0].x+J.value.width*e.proportionStart,y:B.value.height+32+K.value.paddingTop,fill:e.color,height:K.value.height,onPointerenter:t=>Kn(e),onPointerleave:t=>qn(e)},null,40,pt))),128))],8,ft),(C(!0),b(_,null,we(Nr.value.slice(1),e=>(C(),b(`line`,{key:`bar_separator_${e.id}`,x1:J.value.left[0].x+J.value.width*e.proportionStart,x2:J.value.left[0].x+J.value.width*e.proportionStart,y1:B.value.height+32+K.value.paddingTop,y2:B.value.height+32+K.value.paddingTop+K.value.height,stroke:K.value.stroke,"stroke-width":K.value.strokeWidth,"vector-effect":`non-scaling-stroke`},null,8,mt))),128)),x(`rect`,{x:J.value.left[0].x,y:B.value.height+32+K.value.paddingTop,width:J.value.width*$.value,height:K.value.height,rx:Math.min(K.value.height/2,J.value.width*$.value/2),ry:Math.min(K.value.height/2,J.value.width*$.value/2),fill:`none`,stroke:K.value.stroke,"stroke-width":K.value.strokeWidth,"vector-effect":`non-scaling-stroke`},null,8,ht),K.value.label.show&&$.value>0?(C(),b(`text`,{key:0,x:Fr.value,y:Ir.value-6,fill:K.value.label.color,"font-size":K.value.label.fontSize,"text-anchor":`end`,"dominant-baseline":`auto`,"pointer-events":`none`,style:{"user-select":`none`}},E(Lr()),9,gt)):y(``,!0)],64)):y(``,!0),T(e.$slots,`svg`,{svg:{drawingArea:J.value,isEditing:F.value,datapoints:ar.value,isPrintingImg:D(Gt)||D(Kt)||D(Dr),isPrintingSvg:D(Or)}},void 0,!0)],46,Pe)),sr.value?(C(),b(`div`,{ref_key:`overflowMenuRef`,ref:Ft,key:`stack-overflow-menu-${sr.value.stackId}`,class:`vue-ui-hill__stack-overflow-menu`,"data-stack-overflow-menu":``,"data-dom-to-png-ignore":``,style:xe([cr.value,Sn.value]),role:`listbox`,"aria-label":`Choose one of ${sr.value.hiddenCount} stacked datapoints`,onPointerdown:i[1]||=O(()=>{},[`stop`]),onClick:i[2]||=O(()=>{},[`stop`]),onKeydown:ke(O(pr,[`prevent`,`stop`]),[`esc`])},[M.value.stacking.overflow.menu.title?(C(),b(`div`,vt,E(M.value.stacking.overflow.menu.title),1)):y(``,!0),(C(!0),b(_,null,we(sr.value.hiddenDatapoints,e=>(C(),b(`button`,{key:`hidden-${e.id}`,type:`button`,class:S([`vue-ui-hill__stack-overflow-menu-item`,{readonly:j.value.readonly}]),role:`option`,disabled:e.disabled,"aria-label":`${e.label}, ${Cr(e)}`,onClick:O(t=>yr(e),[`stop`]),style:xe({cursor:Yt.value&&!j.value.readonly?`pointer`:`default`})},[x(`span`,{class:`vue-ui-hill__stack-overflow-menu-swatch`,style:xe({backgroundColor:e.color}),"aria-hidden":`true`},null,4),x(`span`,bt,E(D(l)(e.label,U.value.ellipsisThresholdChars)),1),x(`span`,xt,E(Cr(e)),1)],14,yt))),128))],44,_t)):y(``,!0),T(e.$slots,`analysis`,{data:{...Nr.value}},void 0,!0),e.$slots.watermark?(C(),b(`div`,St,[T(e.$slots,`watermark`,be(_e({isPrinting:D(Gt)||D(Kt)||D(Dr)||D(Or)})),void 0,!0)])):y(``,!0),j.value.loading?(C(),b(`div`,Ct,[j.value.loading?T(e.$slots,`loading`,{},()=>[he(D(Ot),{name:`spinner2`,stroke:N.value.color,"is-spin":!0},null,8,[`stroke`])],!0,0):y(``,!0)])):y(``,!0)],44,je))}},[[`__scopeId`,`data-v-7c4727e2`]]);export{Ae as n,wt as t};
@@ -1,2 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-C3FbHv4N.js";import{$ as a,D as o,Dt as s,Et as c,Ft as ee,Ht as te,J as ne,Q as re,S as ie,T as ae,X as oe,Zt as se,_ as ce,at as le,i as ue,in as de,nn as fe,nt as pe,qt as me,r as he,rn as l,t as ge,tn as _e,w as ve,yt as ye,zt as be}from"./lib-rPeBMZrn.js";import{n as xe,t as Se}from"./BaseScanner-8NdoBs7B.js";import{n as Ce,t as we}from"./useHints-C-TwxM0Y.js";import{t as Te}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as Ee}from"./useNestedProp-DnGoh-XS.js";import{t as De}from"./useThemeCheck-BKNRbGeC.js";import{t as Oe}from"./chartImage-DPGnEuYM.js";import{n as ke}from"./Title-BliHuXfT.js";import{t as Ae}from"./useChartExport-BZts4KFb.js";import{n as je,t as Me}from"./tableIntegration-CNoJ1CIY.js";import{n as Ne,r as Pe,t as Fe}from"./userOptionsSlots-CWtXN5Q6.js";import{t as Ie}from"./usePrinter-DVf3YcG5.js";import{t as Le}from"./useTransitions-ChGGrtrv.js";import{t as Re}from"./useSvgLabelLayout-42Kats14.js";import{t as ze}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Be}from"./useResponsive-CENUxfEL.js";import{t as Ve}from"./DefGrad-DKMq1REY.js";import{t as He}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Ue}from"./A11yDataTable-DWNlWXzs.js";import{t as We}from"./useUserOptionState-CXlFnwPv.js";import{t as Ge}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ke}from"./Legend-DM0ClX3D.js";import{t as qe}from"./vue_ui_history_plot-soyqUW4Y.js";import{Fragment as u,Teleport as Je,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Ye,createTextVNode as Xe,createVNode as Ze,defineAsyncComponent as g,guardReactiveProps as _,mergeProps as Qe,nextTick as $e,normalizeClass as v,normalizeProps as y,normalizeStyle as b,onBeforeUnmount as et,onMounted as tt,openBlock as x,ref as S,renderList as C,renderSlot as w,resolveDynamicComponent as nt,shallowRef as rt,toDisplayString as T,toRefs as it,unref as E,watch as at,withCtx as D}from"vue";var ot=/* @__PURE__ */ e({default:()=>Gt}),st=[`id`],ct=[`id`],lt=[`id`],ut={style:{position:`relative`}},dt=[`xmlns`,`viewBox`,`aria-describedby`],ft=[`x`,`y`,`width`,`height`],pt={key:1},mt=[`id`,`x1`,`y1`,`x2`,`y2`],ht=[`stop-color`,`offset`],gt={key:2},_t=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],vt={key:3},yt=[`stroke`,`stroke-width`,`x1`,`x2`,`y1`,`y2`],bt=[`x`,`y`,`fill`,`font-size`],xt=[`transform`,`font-size`,`fill`,`font-weight`],St={key:6},Ct=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],wt={key:7},Tt=[`stroke`,`stroke-width`,`x1`,`x2`,`y1`,`y2`],Et=[`transform`,`fill`,`font-size`,`text-anchor`],Dt=[`x`,`y`,`font-size`,`fill`,`font-weight`],Ot=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],kt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],At=[`d`,`stroke`,`stroke-width`],jt=[`d`,`stroke`,`stroke-width`],Mt=[`cx`,`cy`,`fill`,`r`],Nt=[`cx`,`cy`,`fill`,`r`,`stroke`,`stroke-width`],Pt={key:1},Ft=[`transform`,`font-size`,`fill`,`font-weight`],It=[`transform`,`font-size`,`fill`,`font-weight`,`innerHTML`],Lt={key:2},Rt=[`transform`,`font-size`,`font-weight`,`fill`],zt=[`cx`,`cy`,`r`,`onMouseenter`,`onMouseleave`,`onClick`],Bt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Vt={key:5,class:`vue-data-ui-watermark`},Ht=[`id`],Ut=[`onClick`],Wt={style:{display:`flex`,"align-items":`center`}},Gt=/*#__PURE__*/ Te({__name:`vue-ui-history-plot`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:Te,emit:ot}){let Gt=g(()=>import(`./Tooltip-C1q0Qoh7.js`)),Kt=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),qt=g(()=>import(`./vue-ui-accordion-E8TJfFeK.js`).then(e=>e.n)),Jt=g(()=>import(`./DataTable-Dof6yhO7.js`)),Yt=g(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Xt=g(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Zt=g(()=>import(`./PackageVersion-DKSNC-YP.js`).then(e=>e.t)),Qt=g(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_history_plot:$t}=i(),{isThemeValid:en,warnInvalidTheme:tn}=De(),O=e,k=S(null),nn=S(null),rn=S(0),an=S(null),on=S(0),sn=S(0),cn=S(0),A=rt(null),j=rt(null),ln=S(null),M=S(oe()),un=S(!1),dn=S(``),N=S([]),fn=S(!1),P=S(null),pn=S(!1),mn=S(null),hn=S(!1),gn=S(null),_n=S(null),vn=S(null),yn=S(null),bn=S(null),xn=S(null),F=S(null),I=S(null),Sn=S({x:0,y:0}),Cn=S(`pointer`),wn=S(!1),Tn=d({get:()=>!!O.dataset&&O.dataset.length,set:e=>e}),En=ot,Dn=S(!1),On=0;tt(()=>{hn.value=!0,An()});let kn=d(()=>L.value.debug);function An(){be(O.dataset)?(le({componentName:`VueUiHistoryPlot`,type:`dataset`,debug:kn.value}),Fn.value=!0):O.dataset.forEach((e,t)=>{ye({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{Tn.value=!1,le({componentName:`VueUiHistoryPlot`,type:`datasetSerieAttribute`,property:e,index:t,debug:kn.value})})}),be(O.dataset)||(Fn.value=L.value.loading),L.value.responsive&&(A.value&&(j.value&&A.value.unobserve(j.value),A.value.disconnect()),A.value=new ResizeObserver(()=>{let{width:e,height:t}=Be({chart:k.value,title:V.value.title.text?nn.value:null,noTitle:ln.value,legend:V.value.legend.show?an.value:null,source:mn.value});cancelAnimationFrame(On),On=requestAnimationFrame(()=>{K.value.width=e,K.value.height=t,Dn.value=!0,L.value.responsiveProportionalSizing?(Y.value.plots=l({relator:Math.min(e,t),adjuster:600,source:R.value.radius,threshold:3,fallback:3}),Y.value.indexLabels=l({relator:Math.min(e,t),adjuster:600,source:R.value.indexLabels.fontSize,threshold:6,fallback:6}),Y.value.labels=l({relator:Math.min(e,t),adjuster:600,source:R.value.labels.fontSize,threshold:6,fallback:6}),Y.value.xAxisLabels=l({relator:Math.min(e,t),adjuster:600,source:B.value.x.labels.fontSize,threshold:6,fallback:6}),Y.value.xAxisName=l({relator:Math.min(e,t),adjuster:600,source:B.value.x.name.fontSize,threshold:6,fallback:6}),Y.value.yAxisLabels=l({relator:Math.min(e,t),adjuster:600,source:B.value.y.labels.fontSize,threshold:6,fallback:6}),Y.value.yAxisName=l({relator:Math.min(e,t),adjuster:600,source:B.value.y.name.fontSize,threshold:6,fallback:6})):(Y.value.plots=R.value.radius,Y.value.indexLabels=R.value.indexLabels.fontSize,Y.value.labels=R.value.labels.fontSize,Y.value.xAxisLabels=B.value.x.labels.fontSize,Y.value.xAxisName=B.value.x.name.fontSize,Y.value.yAxisLabels=B.value.y.labels.fontSize,Y.value.yAxisName=B.value.y.name.fontSize)})}),j.value=k.value.parentNode,A.value.observe(j.value))}et(()=>{cancelAnimationFrame(On),A.value&&(j.value&&A.value.unobserve(j.value),A.value.disconnect())});function jn(){let e=Ee({userConfig:O.config,defaultConfig:$t}),t={},n=e.theme;if(n){if(!en.value(e))tn(e),t=e;else{let r=Ee({userConfig:qe[n]||O.config,defaultConfig:e});t={...Ee({userConfig:O.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:fe[n]||te}}}else t=e;return t}let L=S(jn()),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}=Le({config:()=>L.value.transitions,dataset:()=>O.dataset}),U=d(()=>L.value.userOptions.useCursorPointer),Mn=d(()=>de({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:Nn,FINAL_DATASET:Pn,manualLoading:Fn}=xe({...it(O),FINAL_CONFIG:L,prepareConfig:jn,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:de({defaultConfig:L.value,userConfig:Mn.value})}),{userOptionsVisible:In,setUserOptionsVisibility:Ln,keepUserOptionState:Rn}=We({config:L.value}),{svgRef:W}=Ge({config:V.value.title}),zn=se(O.config);at(()=>O.config,(e,t)=>{let n=se(e),r=n!==zn;zn=n;let i=jn();r?(Nn.value||(L.value=i),In.value=!L.value.userOptions.showOnChartHover,An(),rn.value+=1,sn.value+=1,on.value+=1,K.value.height=V.value.height,K.value.width=V.value.width,Y.value.plots=R.value.radius,Y.value.indexLabels=R.value.indexLabels.fontSize,Y.value.labels=R.value.labels.fontSize,Y.value.xAxisLabels=B.value.x.labels.fontSize,Y.value.xAxisName=B.value.x.name.fontSize,Y.value.yAxisLabels=B.value.y.labels.fontSize,Y.value.yAxisName=B.value.y.name.fontSize,G.value.showTable=L.value.table.show,G.value.showTooltip=V.value.tooltip.show):(L.value.style.chart.tooltip=i.style.chart.tooltip,G.value.showTooltip=L.value.style.chart.tooltip.show)},{deep:!0}),at(()=>O.dataset,e=>{Array.isArray(e)&&e.length>0&&(Fn.value=!1)},{deep:!0});let{isPrinting:Bn,isImaging:Vn,generatePdf:Hn,generateImage:Un}=Ie({elementId:`history_plot_${M.value}`,fileName:V.value.title.text||`vue-ui-history-plot`,options:L.value.userOptions.print}),Wn=d(()=>L.value.userOptions.show&&!V.value.title.text),Gn=d(()=>ve(L.value.customPalette)),G=S({showTable:L.value.table.show,showTooltip:V.value.tooltip.show});at(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}),Kn=d(()=>K.value.width),qn=d(()=>K.value.height),{metrics:Jn,ready:Yn,settling:q,update:Xn}=Re({svgRef:W,canMeasure:()=>!L.value.responsive||Dn.value,initialMetrics:{scaleLabelsWidth:0,yAxisLabelWidth:0,xAxisLabelHeight:0,timeLabelsHeight:0},measure:e=>({scaleLabelsWidth:e(xn.value).textWidth,yAxisLabelWidth:e(yn.value).rotatedWidth,xAxisLabelHeight:e(vn.value).height,timeLabelsHeight:e(bn.value).height})});function Zn(){let e=Jn.value.scaleLabelsWidth,t=Jn.value.yAxisLabelWidth;return e+t+(t?24:0)}let Qn=d(()=>Jn.value.xAxisLabelHeight+Jn.value.timeLabelsHeight+(vn.value?Y.value.xAxisName/2:0)),J=d(()=>{let e=V.value.padding.left,t=V.value.padding.top,n=Zn(),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-Qn.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-Qn.value-r*2-B.value.x.name.offsetY}}),Y=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}),X=d(()=>Pn.value.map((e,t)=>{let n=Array.isArray(e.temperatureColors)&&e.temperatureColors.length?e.temperatureColors.map(e=>ie(e)):void 0;return{...e,color:e.color?ie(e.color):Gn.value[t]||te[t]||te[t%te.length],temperatureColors:n,temperatureAngle:$n(e.temperatureAngle),temperatureIndependant:e.temperatureIndependant===!0,usePlotTemperatureColors:e.usePlotTemperatureColors!==!1,seriesIndex:t}}));function $n(e=0){let t=Number(e);return Number.isFinite(t)?(t%360+360)%360:0}let er=d(()=>Math.max(...X.value.filter(e=>!N.value.includes(e.seriesIndex)).flatMap(e=>e.values.map(e=>e.x)))),tr=d(()=>{let e=Math.min(...X.value.filter(e=>!N.value.includes(e.seriesIndex)).flatMap(e=>e.values.map(e=>e.x)));return e<0?e:0}),nr=d(()=>Math.max(...X.value.filter(e=>!N.value.includes(e.seriesIndex)).flatMap(e=>e.values.map(e=>e.y)))),rr=d(()=>{let e=Math.min(...X.value.filter(e=>!N.value.includes(e.seriesIndex)).flatMap(e=>e.values.map(e=>e.y)));return e<0?e:0}),Z=d(()=>{let e=ce(B.value.x.scaleMin??tr.value,B.value.x.scaleMax??er.value,B.value.x.ticks),t=ce(B.value.y.scaleMin??rr.value,B.value.y.scaleMax??nr.value,B.value.y.ticks);return{x:e,y:t,tickX:e.ticks.map(t=>({x:J.value.left+(t-e.min)/(e.max-e.min)*J.value.width,y1:J.value.top,y2:J.value.bottom,value:t})),tickY:t.ticks.map(e=>({y:J.value.bottom-(e-t.min)/(t.max-t.min)*J.value.height,x1:J.value.left,x2:J.value.right,value:e}))}});function ir(e){let t=Z.value.x.min<0?Math.abs(Z.value.x.min):Z.value.x.min>0?-Z.value.x.min:0;return J.value.left+((e||0)+t)/(Z.value.x.max+t)*J.value.width}function ar(e){let t=Z.value.y.min<0?Math.abs(Z.value.y.min):Z.value.y.min>0?-Z.value.y.min:0;return J.value.bottom-((e||0)+t)/(Z.value.y.max+t)*J.value.height}let Q=d(()=>X.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:ir(t.x),y:ar(t.y),color:e.color,seriesName:e.name,id:oe()})),r=e.smooth?ae(n):n.map(e=>`${e.x},${e.y} `).join(``).trim();return{...e,gradientIndex:t,plots:n,path:`M${r}`}})),or=d(()=>{if(P.value===null||F.value===null)return Q.value;let e=Q.value.findIndex(e=>e.seriesIndex===F.value);if(e===-1)return Q.value;let t=Q.value[e];return[...Q.value.slice(0,e),...Q.value.slice(e+1),t]}),sr=d(()=>Q.value.some(e=>cr(e)));function cr(e){return Array.isArray(e?.temperatureColors)&&e.temperatureColors.length}function lr(e){return cr(e)&&e.usePlotTemperatureColors}function ur(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 dr(){let e=J.value;return{minX:e.left,maxX:e.right,minY:e.top,maxY:e.bottom,width:e.width,height:e.height}}function fr(e){return e?.temperatureIndependant?ur(e):dr()}function pr(e){let t=$n(e?.temperatureAngle)*Math.PI/180,n=Math.sin(t),r=Math.cos(t),i=fr(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 mr(e,t){let{x1:n,y1:r,x2:i,y2:a}=pr(e),o=i-n,s=a-r,c=o*o+s*s;if(!c)return 0;let ee=((t.x-n)*o+(t.y-r)*s)/c;return Math.min(1,Math.max(0,ee))}function $(e,t){return c({colors:e.temperatureColors,ratio:mr(e,t)})}function hr(e,t){return`temperature_plot_grad_history_${e.seriesIndex}_${t.id}_${M.value}`}function gr(e,t,n){return lr(e)?R.value.gradient.show?`url(#${hr(e,t)})`:$(e,t):R.value.gradient.show?`url(#gradient_${n}_${M.value})`:t.color}function _r(e,t){return lr(e)?$(e,t):e.color}function vr(e,t){return R.value.indexLabels.adaptColorToBackground?he(_r(e,t)):R.value.indexLabels.color}function yr(e,t){let n=Q.value.find(t=>t.seriesIndex===e);return n&&lr(n)?$(n,t):t.color}function br(e){return cr(e)?`url(#temperature_grad_history_${e.seriesIndex}_${M.value})`:V.value.paths.useSerieColor?e.color:V.value.paths.stroke}function xr(e){return P.value===null||F.value===e?1:Math.min(1,R.value.unselectedOpacity)}d(()=>P.value!==null&&F.value!==null);let Sr=S(!1);function Cr(){N.value.length?N.value=[]:Or.value.forEach(e=>{N.value.push(e.seriesIndex)}),En(`selectLegend`,Q.value)}function wr(e){N.value.includes(e)?N.value=N.value.filter(t=>t!==e):N.value.push(e),En(`selectLegend`,Q.value)}function Tr(e){return X.value.length?X.value.find(t=>t.name===e)||(kn.value&&console.warn(`VueUiHistoryPlot - Series name not found "${e}"`),null):(kn.value&&console.warn(`VueUiHistoryPlot - There are no series to show.`),null)}function Er(e){let t=Tr(e);t!==null&&N.value.includes(t.seriesIndex)&&wr(t.seriesIndex)}function Dr(e){let t=Tr(e);t!==null&&(N.value.includes(t.seriesIndex)||wr(t.seriesIndex))}let Or=d(()=>X.value.map(e=>{let t=cr(e)?e.temperatureColors:null;return{...e,gradientColors:t,opacity:N.value.includes(e.seriesIndex)?.5:1,segregate:()=>wr(e.seriesIndex),isSegregated:N.value.includes(e.seriesIndex),shape:t?`gradient`:`circle`}})),kr=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 Ar({datapoint:e,plotIndex:t,seriesIndex:n}){L.value.events.datapointClick&&L.value.events.datapointClick({datapoint:{...e,plotIndex:t,seriesIndex:n},seriesIndex:n}),En(`selectDatapoint`,e)}function jr(e){fn.value=e,cn.value+=1}let Mr=S(null);function Nr({datapoint:e,plotIndex:t,seriesIndex:n}){L.value.events.datapointLeave&&L.value.events.datapointLeave({datapoint:{...e,plotIndex:t,seriesIndex:n},seriesIndex:n}),(Cn.value!==`keyboard`||F.value!==n||I.value!==t)&&(un.value=!1,P.value=null)}function Pr(e,t){if(!W.value)return;let n=Q.value.find(t=>t.seriesIndex===e);if(!n)return;let r=n.plots[t];if(!r)return;let i=_e(r.x,r.y,W.value);i&&(Sn.value=i)}function Fr({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,Cn.value=r,Sr.value=!0;let i=yr(n,e),o={...e,color:i};Mr.value={datapoint:o,color:i,seriesIndex:n,plotIndex:t,config:L.value,series:X.value},P.value=e;let c=V.value.tooltip.customFormat;if(pn.value=!1,s(c))try{let e=c({seriesIndex:n,datapoint:o,color:i,plotIndex:t,series:X.value,config:L.value});typeof e==`string`&&(dn.value=e,pn.value=!0)}catch{console.warn(`Custom format cannot be applied.`),pn.value=!1}if(!pn.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`}: ${ue(B.value.x.labels.formatter,e.valueX,a({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`}: ${ue(B.value.y.labels.formatter,e.valueY,a({p:B.value.y.labels.prefix,v:e.valueY,s:B.value.y.labels.suffix,r:B.value.y.labels.rounding}))}</div>`,dn.value=`<div>${t}</div>`}un.value=!0,r===`keyboard`&&$e(()=>{Pr(n,t)})}d(()=>({head:Q.value.map(e=>({name:e.name,color:e.color}))}));let Ir=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:Q.value.flatMap(e=>e.plots.map(e=>[{color:e.color,name:e.seriesName},e.label,ue(B.value.x.labels.formatter,e.valueX,a({p:B.value.x.labels.prefix,v:e.valueX,s:B.value.x.labels.suffix,r:B.value.x.labels.rounding})),ue(B.value.y.labels.formatter,e.valueY,a({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 Lr(e=null){$e(()=>{let t=[[L.value.table.columnNames.series],[L.value.table.columnNames.datapoint],[L.value.table.columnNames.x],[L.value.table.columnNames.y]],n=Q.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=o(r);e?e(i):pe({csvContent:i,title:V.value.title.text||`vue-ui-history-plot`})})}let Rr=S(!1);function zr(){Rr.value=!Rr.value}function Br(){G.value.showTable=!G.value.showTable}function Vr(){G.value.showTooltip=!G.value.showTooltip}function Hr(){return Q.value}let Ur=Oe(k,()=>V.value.title.text),Wr=d(()=>Z.value.tickX),Gr=d(()=>({start:0,end:Z.value.tickX.length}));ze({timeLabelsEls:bn,timeLabels:Wr,slicer:Gr,configRef:L,rotationPath:[`style`,`chart`,`axes`,`x`,`labels`,`rotation`],autoRotatePath:[`style`,`chart`,`axes`,`x`,`labels`,`autoRotate`,`enable`],isAutoSize:!1,width:Kn,height:qn,targetClass:`.vue-ui-history-plot-x-axis-scale`,rotation:B.value.x.labels.autoRotate.angle});let Kr=d(()=>Me({config:L,style:V,mutableConfig:G,dialog:Qt,accordion:qt,isFullscreen:fn,parent:k,maxWidth:800}));at(()=>G.value.showTable,e=>je(e,L,gn));function qr(){G.value.showTable=!1,_n.value&&_n.value.setTableIconState(!1)}let Jr=d(()=>V.value.backgroundColor),Yr=d(()=>V.value.legend),Xr=d(()=>V.value.title),{isCallbackImaging:Zr,isCallbackSvg:Qr,generateSvg:$r,onGenerateImage:ei}=Ae({svg:W,title:Xr,legend:Yr,legendItems:Or,backgroundColor:Jr,getSvgCallback:()=>L.value.userOptions.callbacks.svg,generateImage:Un});async function ti(){En(`copyAlt`,{config:L.value,dataset:Q.value}),L.value.userOptions.callbacks.altCopy?await Promise.resolve(L.value.userOptions.callbacks.altCopy({config:L.value,dataset:Q.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let ni=d(()=>({head:Ir.value.head,body:Ir.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 ri(e){return Q.value.findIndex(t=>t.seriesIndex===e)}function ii(){if(F.value!==null&&I.value!==null){let e=Q.value.find(e=>e.seriesIndex===F.value)?.plots?.[I.value];e&&Nr({datapoint:e,plotIndex:I.value,seriesIndex:F.value})}F.value=null,I.value=null,Cn.value=`pointer`,un.value=!1,P.value=null}function ai(){F.value=null,I.value=null,wn.value=!0}function oi(){ii(),wn.value=!1}function si(e,t){if(!e?.plots?.length)return null;let n=e.plots.length;return(t%n+n)%n}function ci({seriesIndex:e,plotIndex:t,direction:n}){if(!Q.value.length)return null;let r=ri(e);if(r===-1)return null;if(n===`up`||n===`down`){let e=Q.value[r];if(!e?.plots?.length)return null;let i=si(e,t+(n===`up`?-1:1));return{seriesIndex:e.seriesIndex,plotIndex:i}}if(n===`left`||n===`right`){let e=((r+(n===`left`?-1:1))%Q.value.length+Q.value.length)%Q.value.length,i=Q.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 li(e){if(!W.value||Rr.value||document.activeElement!==W.value||!Q.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){ii();return}if(a){if(F.value===null||I.value===null)return;let e=Q.value.find(e=>e.seriesIndex===F.value)?.plots?.[I.value];if(!e)return;Ar({datapoint:e,plotIndex:I.value,seriesIndex:F.value});return}let s=null;if(F.value===null||I.value===null){let e=Q.value[0];if(!e?.plots?.length)return;s={seriesIndex:e.seriesIndex,plotIndex:0}}else r?s=ci({seriesIndex:F.value,plotIndex:I.value,direction:`up`}):i?s=ci({seriesIndex:F.value,plotIndex:I.value,direction:`down`}):t?s=ci({seriesIndex:F.value,plotIndex:I.value,direction:`left`}):n&&(s=ci({seriesIndex:F.value,plotIndex:I.value,direction:`right`}));if(!s)return;let c=Q.value.find(e=>e.seriesIndex===s.seriesIndex)?.plots?.[s.plotIndex];c&&Fr({datapoint:c,plotIndex:s.plotIndex,seriesIndex:s.seriesIndex,triggerMode:`keyboard`})}return Te({getData:Hr,getImage:Ur,generatePdf:Hn,generateCsv:Lr,generateImage:Un,generateSvg:$r,hideSeries:Dr,showSeries:Er,toggleTable:Br,toggleTooltip:Vr,toggleAnnotator:zr,toggleFullscreen:jr,copyAlt:ti}),at(()=>[K.value,Y.value,B.value,V.value,L.value.style.fontFamily,O.dataset,Dn.value,xn.value,bn.value,vn.value,yn.value],Xn,{flush:`post`,deep:!0}),(e,i)=>(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":fn.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:i[2]||=()=>E(Ln)(!0),onMouseleave:i[3]||=()=>E(Ln)(!1)},[h(`div`,{id:`chart-instructions-${M.value}`,class:`sr-only`},[h(`p`,null,T(L.value.a11y.translations.keyboardNavigation),1)],8,ct),ni.value.body.length?(x(),f(Ue,{key:0,uid:M.value,head:ni.value.head,body:ni.value.body,caption:ni.value.caption,notice:ni.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(Yt),Qe({key:1},E(n)(L.value.userOptions.annotator),{svgRef:E(W),backgroundColor:V.value.backgroundColor,color:V.value.color,active:Rr.value,isCursorPointer:U.value,palette:L.value.userOptions.annotatorPalette,onClose:zr}),Ye({_:2},[C(E(r),n=>({name:n,fn:D(r=>[w(e.$slots,n,y(_(E(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),Wn.value?(x(),m(`div`,{key:2,ref_key:`noTitle`,ref:ln,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:nn,class:`vue-ui-xy-title`,style:b(`font-family:${L.value.style.fontFamily}`)},[(x(),f(ke,{key:`title_${rn.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,lt),L.value.userOptions.show&&Tn.value&&(E(Rn)||E(In))?(x(),f(E(Xt),Qe({ref_key:`userOptionsRef`,ref:_n,key:`user_option_${cn.value}`,backgroundColor:V.value.backgroundColor,color:V.value.color,isPrinting:E(Bn),isImaging:E(Vn),uid:M.value,hasTooltip:V.value.tooltip.show&&L.value.userOptions.buttons.tooltip,hasLabel:!1,isFullscreen:fn.value,chartElement:k.value},E(Pe)(L.value.userOptions,`pdf csv img svg table fullscreen altCopy annotator`),{isTooltip:G.value.showTooltip,isAnnotation:Rr.value,tableDialog:L.value.table.useDialog,isCursorPointer:U.value,onToggleFullscreen:jr,onGeneratePdf:E(Hn),onGenerateCsv:Lr,onGenerateImage:E(ei),onGenerateSvg:E($r),onToggleTable:Br,onToggleTooltip:Vr,onToggleAnnotator:zr,onCopyAlt:ti,style:{visibility:E(Rn)?E(In)?`visible`:`hidden`:`visible`}}),Ye({_:2},[C(E(Ne)(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(Fe)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasTooltip`,`isFullscreen`,`chartElement`,`isTooltip`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):p(``,!0),h(`div`,ut,[(x(),m(`svg`,{ref_key:`svgRef`,ref:W,xmlns:E(ge),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};visibility:${E(Yn)?`visible`:`hidden`}`),"aria-describedby":`chart-instructions-${M.value}`,tabindex:`0`,onFocus:ai,onBlur:oi,onKeydown:li},[Ze(E(Zt)),w(e.$slots,`svg-underlayer`,{svg:{...K.value,drawingArea:J.value,isPrintingImg:E(Bn)||E(Vn)||E(Zr),isPrintingSvg:E(Qr)}},void 0,!0),e.$slots[`chart-background`]?(x(),m(`foreignObject`,{key:0,x:J.value.left,y:J.value.top,width:J.value.width<=0?10:J.value.width,height:J.value.height<=0?10:J.value.height,style:{pointerEvents:`none`}},[w(e.$slots,`chart-background`,{},void 0,!0)],8,ft)):p(``,!0),R.value.gradient.show||sr.value?(x(),m(`defs`,pt,[R.value.gradient.show?(x(!0),m(u,{key:0},C(Q.value,(e,t)=>(x(),f(Ve,{t:`radial`,key:`gradient_${t}_${M.value}`,id:`gradient_${t}_${M.value}`,fy:`30%`,stops:[[`10%`,E(ee)(e.color,R.value.gradient.intensity/100),1],[`90%`,E(re)(e.color,.1),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128)):p(``,!0),(x(!0),m(u,null,C(Q.value,e=>(x(),m(u,{key:`temperature_grad_history_template_${e.seriesIndex}_${M.value}`},[R.value.gradient.show&&lr(e)?(x(!0),m(u,{key:0},C(e.plots,t=>(x(),f(Ve,{t:`radial`,key:`temperature_plot_grad_history_${e.seriesIndex}_${t.id}_${M.value}`,id:hr(e,t),fy:`30%`,stops:[[`10%`,E(ee)($(e,t),R.value.gradient.intensity/100),1],[`90%`,E(re)($(e,t),.1),1],[`100%`,$(e,t),1]]},null,8,[`id`,`stops`]))),128)):p(``,!0),cr(e)?(x(),m(`linearGradient`,{key:1,id:`temperature_grad_history_${e.seriesIndex}_${M.value}`,gradientUnits:`userSpaceOnUse`,x1:pr(e).x1,y1:pr(e).y1,x2:pr(e).x2,y2:pr(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(me)(n,e.temperatureColors.length)},null,8,ht))),128))],8,mt)):p(``,!0)],64))),128))])):p(``,!0),z.value.verticalLines.show?(x(),m(`g`,gt,[(x(!0),m(u,null,C(Z.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,_t))),256))])):p(``,!0),B.value.y.labels.show?(x(),m(`g`,vt,[(x(!0),m(u,null,C(Z.value.tickY,e=>(x(),m(`line`,{stroke:z.value.verticalLines.stroke,"stroke-width":z.value.verticalLines.strokeWidth,"stroke-linecap":`round`,x1:J.value.left-5,x2:J.value.left,y1:e.y,y2:e.y},null,8,yt))),256))])):p(``,!0),B.value.y.labels.show?(x(),m(`g`,{key:4,ref_key:`yAxisScales`,ref:xn},[(x(!0),m(u,null,C(Z.value.tickY,e=>(x(),m(`text`,{x:J.value.left+B.value.y.labels.offsetX-4-R.value.radius,y:e.y+Y.value.yAxisLabels/3,fill:B.value.y.labels.color,"font-size":Y.value.yAxisLabels,"text-anchor":`end`},T(E(ue)(B.value.y.labels.formatter,e.value,E(a)({p:B.value.y.labels.prefix,v:e.value,s:B.value.y.labels.suffix,r:B.value.y.labels.rounding}))),9,bt))),256))],512)):p(``,!0),B.value.y.name.text?(x(),m(`text`,{key:5,ref_key:`yAxisLabel`,ref:yn,transform:`translate(${Y.value.yAxisName}, ${K.value.height/2+B.value.y.name.offsetY}), rotate(-90)`,"font-size":Y.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,xt)):p(``,!0),z.value.horizontalLines.show?(x(),m(`g`,St,[(x(!0),m(u,null,C(Z.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,Ct))),256))])):p(``,!0),B.value.x.labels.show?(x(),m(`g`,wt,[(x(!0),m(u,null,C(Z.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:J.value.bottom,y2:J.value.bottom+5},null,8,Tt))),256))])):p(``,!0),B.value.x.labels.show?(x(),m(`g`,{key:8,ref_key:`xAxisScales`,ref:bn},[(x(!0),m(u,null,C(Z.value.tickX,e=>(x(),m(`text`,{class:`vue-ui-history-plot-x-axis-scale`,transform:`translate(${e.x}, ${J.value.bottom+B.value.x.labels.offsetY+Y.value.xAxisLabels+R.value.radius}), rotate(${B.value.x.labels.rotation})`,fill:B.value.x.labels.color,"font-size":Y.value.xAxisLabels,"text-anchor":B.value.x.labels.rotation>0?`start`:B.value.x.labels.rotation<0?`end`:`middle`},T(E(ue)(B.value.x.labels.formatter,e.value,E(a)({p:B.value.x.labels.prefix,v:e.value,s:B.value.x.labels.suffix,r:B.value.x.labels.rounding}))),9,Et))),256))],512)):p(``,!0),B.value.x.name.text?(x(),m(`text`,{key:9,ref_key:`xAxisLabel`,ref:vn,x:K.value.width/2+B.value.x.name.offsetX,y:K.value.height,"font-size":Y.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,Dt)):p(``,!0),z.value.xAxis.show?(x(),m(`line`,{key:10,x1:J.value.left,x2:J.value.left+J.value.width,y1:J.value.bottom,y2:J.value.bottom,stroke:z.value.xAxis.stroke,"stroke-width":z.value.xAxis.strokeWidth,"stroke-linecap":`round`},null,8,Ot)):p(``,!0),z.value.yAxis.show?(x(),m(`line`,{key:11,x1:J.value.left,x2:J.value.left,y1:J.value.top,y2:J.value.bottom,stroke:z.value.yAxis.stroke,"stroke-width":z.value.yAxis.strokeWidth,"stroke-linecap":`round`},null,8,kt)):p(``,!0),(x(!0),m(u,null,C(or.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:xr(e.seriesIndex)})},[h(`path`,{class:v({"vue-data-ui-transition":E(H)&&!E(q)}),d:e.path,stroke:V.value.backgroundColor,"stroke-width":V.value.paths.strokeWidth+4,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,10,At),h(`path`,{class:v({"vue-data-ui-transition":E(H)&&!E(q)}),d:e.path,stroke:br(e),"stroke-width":V.value.paths.strokeWidth,fill:`none`,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,10,jt)],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:Y.value.plots,stroke:`none`,class:v({"vue-data-ui-transition":E(H)&&!E(q)})},null,10,Mt))),256)),(x(!0),m(u,null,C(e.plots,t=>(x(),m(`circle`,{cx:t.x,cy:t.y,fill:gr(e,t,e.gradientIndex),r:Y.value.plots,stroke:R.value.stroke,"stroke-width":R.value.strokeWidth,class:v({"vue-data-ui-transition":E(H)&&!E(q)}),style:b({opacity:xr(e.seriesIndex)})},null,14,Nt))),256)),R.value.labels.show?(x(),m(`g`,Pt,[(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)&&!E(q)}),transform:`translate(${t.x+R.value.labels.offsetX}, ${t.y+R.value.labels.offsetY+Y.value.plots+Y.value.labels})`,"font-size":Y.value.labels,fill:R.value.labels.color,"font-weight":R.value.labels.bold?`bold`:`normal`,"text-anchor":`middle`,style:b({opacity:xr(e.seriesIndex)}),innerHTML:E(ne)({content:String(t.label),fontSize:Y.value.labels,fill:R.value.labels.color,x:0,y:0})},null,14,It)):(x(),m(`text`,{key:0,class:v({"vue-data-ui-transition":E(H)&&!E(q)}),transform:`translate(${t.x+R.value.labels.offsetX}, ${t.y+R.value.labels.offsetY+Y.value.plots+Y.value.labels})`,"font-size":Y.value.labels,fill:R.value.labels.color,"font-weight":R.value.labels.bold?`bold`:`normal`,"text-anchor":`middle`,style:b({opacity:xr(e.seriesIndex)})},T(t.label),15,Ft))]))),128))])):p(``,!0),R.value.indexLabels.show?(x(),m(`g`,Lt,[(x(!0),m(u,null,C(e.plots,(t,n)=>(x(),m(`text`,{key:`lab_${n}`,class:v({"vue-data-ui-transition":E(H)&&!E(q)}),transform:`translate(${t.x+R.value.indexLabels.offsetX}, ${t.y+R.value.indexLabels.offsetY+Y.value.indexLabels/3})`,"font-size":Y.value.indexLabels,"font-weight":R.value.indexLabels.bold?`bold`:`normal`,fill:vr(e,t),"text-anchor":`middle`,style:b({opacity:xr(e.seriesIndex)})},T(R.value.indexLabels.startAtZero?n:n+1),15,Rt))),128))])):p(``,!0)]))),128)),(x(!0),m(u,null,C(or.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:Y.value.plots,stroke:`none`,onMouseenter:r=>Fr({datapoint:t,plotIndex:n,seriesIndex:e.seriesIndex,triggerMode:`pointer`}),onMouseleave:r=>Nr({datapoint:t,plotIndex:n,seriesIndex:e.seriesIndex}),onClick:r=>Ar({datapoint:t,plotIndex:n,seriesIndex:e.seriesIndex})},null,40,zt))),256))]))),128)),w(e.$slots,`svg`,{svg:{...K.value,drawingArea:J.value,isPrintingImg:E(Bn)||E(Vn)||E(Zr),isPrintingSvg:E(Qr)}},void 0,!0)],44,dt)),e.$slots.hint?(x(),m(`div`,Bt,[w(e.$slots,`hint`,y(_({hint:L.value.a11y.translations.keyboardNavigation,isVisible:wn.value})),void 0,!0)])):p(``,!0)]),e.$slots.watermark?(x(),m(`div`,Vt,[w(e.$slots,`watermark`,y(_({isPrinting:E(Bn)||E(Vn)||E(Zr)||E(Qr)})),void 0,!0)])):p(``,!0),h(`div`,{id:`legend-bottom-${M.value}`},null,8,Ht),hn.value&&(V.value.legend.show||e.$slots.legend)?(x(),f(Je,{key:6,to:V.value.legend.position===`top`?`#legend-top-${M.value}`:`#legend-bottom-${M.value}`},[h(`div`,{ref_key:`chartLegend`,ref:an},[w(e.$slots,`legend`,{legend:Or.value},()=>[V.value.legend.show&&Tn.value?(x(),f(Ke,{key:`legend_${on.value}`,legendSet:Or.value,config:kr.value,isCursorPointer:U.value,onClickMarker:i[0]||=({legend:e})=>{wr(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,Ut)]),legendToggle:D(()=>[Or.value.length>2&&V.value.legend.selectAllToggle.show&&!E(Nn)?(x(),f(He,{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:Cr},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:mn,dir:`auto`},[w(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),Ze(E(Gt),{teleportTo:V.value.tooltip.teleportTo,show:G.value.showTooltip&&un.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:dn.value,isCustom:pn.value,isFullscreen:fn.value,smooth:V.value.tooltip.smooth,backdropFilter:V.value.tooltip.backdropFilter,smoothForce:V.value.tooltip.smoothForce,smoothSnapThreshold:V.value.tooltip.smoothSnapThreshold,isA11yMode:Cn.value===`keyboard`,a11yPosition:Sn.value},{"tooltip-before":D(()=>[w(e.$slots,`tooltip-before`,y(_({...Mr.value})),void 0,!0)]),tooltip:D(()=>[w(e.$slots,`tooltip`,y(_({...Mr.value})),void 0,!0)]),"tooltip-after":D(()=>[w(e.$slots,`tooltip-after`,y(_({...Mr.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`]),Tn.value&&L.value.userOptions.buttons.table?(x(),f(nt(Kr.value.component),Qe({key:8},Kr.value.props,{ref_key:`tableUnit`,ref:gn,onClose:qr}),Ye({content:D(()=>[(x(),f(E(Jt),{key:`table_${sn.value}`,colNames:Ir.value.colNames,head:Ir.value.head,body:Ir.value.body,config:Ir.value.config,title:L.value.table.useDialog?``:Kr.value.title,withCloseButton:!L.value.table.useDialog,isCursorPointer:U.value,onClose:qr},{th:D(({th:e})=>[h(`div`,Wt,T(e),1)]),td:D(({td:e})=>[Xe(T(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[L.value.table.useDialog?{name:`title`,fn:D(()=>[Xe(T(Kr.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:i[1]||=e=>Lr(L.value.userOptions.callbacks.csv),style:b({cursor:U.value?`pointer`:`default`})},[Ze(E(Kt),{name:`fileCsv`,stroke:Kr.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):p(``,!0),w(e.$slots,`skeleton`,{},()=>[E(Nn)?(x(),f(Se,{key:0})):p(``,!0)],!0)],46,st))}},[[`__scopeId`,`data-v-4f8ecec6`]]);export{ot as n,Gt as t};
@@ -1,4 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-C3FbHv4N.js";import{$ as a,D as o,Dt as s,Ht as c,J as l,Jt as ee,S as te,X as ne,Yt as re,Zt as ie,at as ae,b as u,i as oe,in as se,nn as ce,nt as le,pt as ue,t as de,tn as fe,vt as pe,w as me,wt as he,zt as ge}from"./lib-rPeBMZrn.js";import{n as _e,t as ve}from"./BaseScanner-8NdoBs7B.js";import{n as ye,t as be}from"./useHints-C-TwxM0Y.js";import{t as xe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as Se}from"./useNestedProp-DnGoh-XS.js";import{t as Ce}from"./useThemeCheck-BKNRbGeC.js";import{t as we}from"./chartImage-DPGnEuYM.js";import{n as Te}from"./Title-BliHuXfT.js";import{t as Ee}from"./useChartExport-BZts4KFb.js";import{n as De,t as Oe}from"./tableIntegration-CNoJ1CIY.js";import{n as ke,r as Ae,t as je}from"./userOptionsSlots-CWtXN5Q6.js";import{t as Me}from"./usePrinter-DVf3YcG5.js";import{t as Ne}from"./useTransitions-ChGGrtrv.js";import{t as Pe}from"./Shape-CRe8woTu.js";import{c as Fe}from"./canvas-lib-22VpOI4_.js";import{t as Ie}from"./useResponsive-CENUxfEL.js";import{t as Le}from"./DefGrad-DKMq1REY.js";import{t as Re}from"./vue-ui-accordion-E8TJfFeK.js";import{t as ze}from"./BaseLegendToggle-BIzyyI1h.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"./useTableResponsive-uSz_qZOB.js";import{t as We}from"./Legend-DM0ClX3D.js";import{t as Ge}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 Ke,createTextVNode as qe,createVNode as Je,defineAsyncComponent as Ye,guardReactiveProps as _,mergeProps as Xe,nextTick as Ze,normalizeClass as v,normalizeProps as Qe,normalizeStyle as y,onBeforeUnmount as $e,onMounted as et,openBlock as b,ref as x,renderList as S,renderSlot as C,resolveDynamicComponent as tt,toDisplayString as w,toRefs as nt,unref as T,useCssVars as rt,useSlots as it,watch as at,withCtx as E,withKeys as ot}from"vue";var st=/* @__PURE__ */ e({default:()=>Lt}),ct=[`id`],lt=[`id`],ut=[`onClick`],dt={style:{position:`relative`}},ft=[`xmlns`,`viewBox`,`aria-describedby`],pt=[`width`,`height`],mt={key:1},ht=[`y`,`width`,`height`,`fill`,`rx`],gt=[`x`,`y`,`width`,`height`,`fill`,`rx`],_t=[`x`,`y`,`width`,`height`,`fill`,`rx`,`stroke`,`stroke-width`],vt=[`x`,`y`,`width`,`height`,`fill`,`rx`,`stroke`,`stroke-width`],yt=[`stroke`,`stroke-width`,`d`],bt=[`stroke`,`stroke-width`,`d`],xt=[`y`,`height`,`width`,`fill`],St=[`transform`,`font-size`,`fill`,`font-weight`,`innerHTML`],Ct=[`transform`,`font-size`,`fill`,`font-weight`],wt=[`transform`,`font-size`,`font-weight`,`innerHTML`],Tt=[`transform`,`font-size`,`fill`,`font-weight`,`innerHTML`],Et=[`transform`,`text-anchor`,`font-size`,`fill`,`font-weight`],Dt=[`y`,`width`,`height`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],Ot={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},kt={key:7,class:`vue-data-ui-watermark`},At=[`onClick`],jt={style:`width:100%;padding-top: 36px;position:relative`},Mt={class:`vue-ui-data-table`},Nt={key:0},Pt={style:{width:`100%`}},Ft=[`data-cell`],It={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Lt=/*#__PURE__*/ xe({__name:`vue-ui-horizontal-bar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`copyAlt`,`selectDatapoint`],setup(e,{expose:xe,emit:st}){rt(e=>({v417199f3:e.tdo}));let Lt=Ye(()=>import(`./Tooltip-C1q0Qoh7.js`)),Rt=Ye(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),zt=Ye(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Bt=Ye(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Vt=Ye(()=>import(`./PackageVersion-DKSNC-YP.js`).then(e=>e.t)),Ht=Ye(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_vertical_bar:Ut}=i(),{isThemeValid:Wt,warnInvalidTheme:Gt}=Ce(),Kt=it(),D=e,qt=f({get(){return!!D.dataset&&D.dataset.length},set(e){return e}}),O=x(ne()),Jt=x(!1),Yt=x(``),Xt=x(null),Zt=x(0),k=x(null),Qt=x(null),$t=x(null),en=x(null),tn=x(null),nn=x(0),rn=x(0),an=x(null),on=x(null),sn=x(null),cn=x(null),ln=x(null),A=x([]),un=x({none:0,asc:1,desc:2}),j=x(0),dn=x(0),fn=null,pn=null,M=x(null),mn=x({x:0,y:0}),hn=x(`pointer`),gn=st,N=x(Dn()),P=f(()=>N.value.style.chart.layout.bars),F=f(()=>N.value.style.chart.layout),I=f(()=>N.value.style.chart.tooltip),L=f(()=>N.value.style.chart);ye({config:()=>N.value,dataset:()=>D.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:R}=Ne({config:()=>N.value.transitions,dataset:()=>D.dataset}),_n=f(()=>N.value.userOptions.useCursorPointer),vn=f(()=>D.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`}]),yn=f(()=>se({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:N.value.skeletonConfig??{}})),{loading:bn,FINAL_DATASET:xn,manualLoading:Sn}=_e({...nt(D),FINAL_CONFIG:N,prepareConfig:Dn,callback:()=>{Promise.resolve().then(async()=>{H.value.showTable=N.value.table.show,Vn()})},skeletonDataset:vn.value,skeletonConfig:se({defaultConfig:N.value,userConfig:yn.value})}),{userOptionsVisible:Cn,setUserOptionsVisibility:wn,keepUserOptionState:Tn}=Ve({config:N.value}),{svgRef:En}=He({config:L.value.title});function Dn(){let e=Se({userConfig:D.config,defaultConfig:Ut}),t={},n=e.theme;if(n){if(!Wt.value(e))Gt(e),t=e;else{let r=Se({userConfig:Ge[n]||D.config,defaultConfig:e});t={...Se({userConfig:D.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:ce[n]||c}}}else t=e;return D.config&&he(D.config,`events.datapointEnter`)?t.events.datapointEnter=D.config.events.datapointEnter:t.events.datapointEnter=null,D.config&&he(D.config,`events.datapointLeave`)?t.events.datapointLeave=D.config.events.datapointLeave:t.events.datapointLeave=null,D.config&&he(D.config,`events.datapointClick`)?t.events.datapointClick=D.config.events.datapointClick:t.events.datapointClick=null,t}let z=x(L.value.width),On=x(L.value.height),B=x(P.value.gap),kn=ie(D.config);at(()=>D.config,(e,t)=>{let n=ie(e),r=n!==kn;kn=n;let i=Dn();r?(bn.value||(N.value=i),Cn.value=!N.value.userOptions.showOnChartHover,nn.value+=1,rn.value+=1,H.value.showTable=N.value.table.show,j.value=un.value[P.value.sort]??0,H.value.showTooltip=I.value.show,z.value=L.value.width,On.value=L.value.height,B.value=P.value.gap):(N.value.style.chart.tooltip=i.style.chart.tooltip,H.value.showTooltip=N.value.style.chart.tooltip.show)},{deep:!0}),at(()=>D.dataset,e=>{Array.isArray(e)&&e.length>0&&(Sn.value=!1)},{deep:!0});let{isPrinting:An,isImaging:jn,generatePdf:Mn,generateImage:Nn}=Me({elementId:`vue-ui-vertical-bar_${O.value}`,fileName:L.value.title.text||`vue-ui-vertical-bar`,options:N.value.userOptions.print}),Pn=f(()=>N.value.userOptions.show&&!L.value.title.text),Fn=f(()=>me(N.value.customPalette)),In=x(null),Ln=f(()=>N.value.table.responsiveBreakpoint),Rn=f(()=>N.value.debug),zn=x(0),V=x(null),Bn=x(null);function Vn(){if(k.value&&(ge(D.dataset)&&(ae({componentName:`VueUiVerticalBar`,type:`dataset`,debug:Rn.value}),qt.value=!1,Sn.value=!0),ge(D.dataset)||(Sn.value=N.value.loading),N.value.responsive)){let e=Fe(()=>{let{width:e,height:t}=Ie({chart:k.value,title:L.value.title.text?Qt.value:null,legend:L.value.legend.show?$t.value:null,source:en.value,noTitle:tn.value});zn.value=t/3,requestAnimationFrame(async()=>{On.value=t,z.value=e})});V.value&&(Bn.value&&V.value.unobserve(Bn.value),V.value.disconnect()),V.value=new ResizeObserver(e),Ze(()=>{Bn.value=k.value?.parentNode,Bn.value&&V.value.observe(Bn.value)})}}$e(()=>{V.value&&(Bn.value&&V.value.unobserve(Bn.value),V.value.disconnect())});let H=x({showTable:N.value.table.show,showTooltip:I.value.show}),Hn=f(()=>j.value===0),Un=f(()=>j.value===2),U=f(()=>(xn.value.forEach((e,t)=>{!e.value&&!e.children&&ae({componentName:`VueUiVerticalBar`,type:`datasetAttributeEmpty`,property:`value (index ${t})`,debug:Rn.value}),e.children&&(ge(e.children)?ae({componentName:`VueUiVerticalBar`,type:`datasetAttributeEmpty`,property:`children (index ${t})`,debug:Rn.value}):e.children.forEach((e,t)=>{[null,void 0].includes(e.name)&&ae({componentName:`VueUiVerticalBar`,type:`datasetSerieAttribute`,property:`name`,key:`children`,index:t,debug:Rn.value})}))}),xn.value.map((e,t)=>{let n=`vertical_parent_${t}_${O.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:A.value.includes(n)?.5:1,value:Math.abs(i),sign:a,hasChildren:r,isChild:!1,segregate:()=>rr(n),isSegregated:A.value.includes(n),color:te(e.color)||Fn.value[t]||c[t]||c[t%c.length],children:!e.children||!e.children.length?[]:e.children.toSorted(Hn.value?()=>0:(e,t)=>Un.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}_${O.value}`,childIndex:o,color:te(r.color)||te(e.color)||Fn.value[t]||c[t]||c[t%c.length]})).map((t,n)=>({...t,isFirstChild:n===0,isLastChild:n===e.children.length-1}))}}).toSorted(Hn.value?()=>0:(e,t)=>Un.value?t.value-e.value:e.value-t.value))),W=f(()=>U.value.filter(e=>!A.value.includes(e.id))),G=f(()=>W.value.flatMap(e=>e.hasChildren?e.children:e)),Wn=f(()=>U.value.flatMap(e=>e.hasChildren?e.children:e)),Gn=f(()=>W.value.flatMap(e=>e.children&&e.children.length>0?e.children.length:1).reduce((e,t)=>e+t,0)),Kn=f(()=>({cy:`vertical-bar-div-legend`,backgroundColor:L.value.legend.backgroundColor,color:L.value.legend.color,fontSize:L.value.legend.fontSize,paddingBottom:12,fontWeight:L.value.legend.bold?`bold`:``})),K=f(()=>P.value.parentLabels.show?P.value.parentLabels.fontSize*3+P.value.parentLabels.paddingBottom:0),q=f(()=>{let e=[],t=0;return G.value.forEach((n,r)=>{n.isChild&&n.childIndex===0&&P.value.parentLabels.show&&(t+=1),e[r]=t}),e}),J=f(()=>{let e=Math.max(0,...q.value)*K.value;return(On.value-24-(Gn.value-1)*B.value-e)/Gn.value}),Y=f(()=>({width:z.value,height:On.value,padding:{top:12,left:128+P.value.offsetX,right:64+P.value.paddingRight,bottom:12}})),qn=x(0);function Jn(){Ze(()=>{if(!ln.value){qn.value=0;return}let e=Array.from(ln.value.querySelectorAll(`text`)).reduce((e,t)=>{let n=t.getBBox?.().width??t.getComputedTextLength();return n>e?n:e},0);qn.value=e+12})}at(()=>[G.value,z.value,On.value,P.value.nameLabels,P.value.offsetX],()=>Jn(),{deep:!0}),et(()=>{Jn()});function Yn(){return typeof document>`u`?null:(fn||(fn=document.createElement(`canvas`),pn=fn.getContext(`2d`)),pn)}function Xn(e){let t=String(e??``),n=P.value,r=n.dataLabels.fontSize,i=n.dataLabels.bold?700:400,a=N.value.style.fontFamily,o=Yn();return o?(o.font=`${i} ${r}px ${a}`,o.measureText(t).width):t.length*r*.6}function Zn(){let e=W.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 Qn=f(()=>{dn.value;let e=P.value,t=qn.value+Math.abs(e.nameLabels.offsetX)+e.offsetX,n=Y.value.width-Y.value.padding.right,r=Math.max(0,n-t-e.offsetX),i=Y.value.width-40,a=Zn(),o=G.value.map((e,t)=>({serie:e,textWidth:Xn(xr(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 l=(t+r*c+3+e.dataLabels.offsetX+s-i)/c;return Math.max(n,l)},0);return{left:0,right:Math.ceil(Math.min(r,Math.max(0,n)))}}let s=t+r/2,c=-1/0,l=1/0;o.forEach(({serie:t,textWidth:n})=>{if(t.sign===-1){let t=s+12+e.dataLabels.offsetX+n;l=Math.min(l,i-t);return}let r=s-12-e.dataLabels.offsetX-n;c=Math.max(c,40-r)});let ee=0;ee=c>l?(c+l)/2:Math.min(l,Math.max(c,0));let te=ee*2;return te>=0?{left:Math.ceil(Math.min(r,te)),right:0}:{left:0,right:Math.ceil(Math.min(r,-te))}}),$n=f(()=>Qn.value.right),er=f(()=>Qn.value.left);function tr(){dn.value+=1}et(()=>{typeof document<`u`&&document.fonts&&(document.fonts.ready.then(tr),document.fonts.addEventListener?.(`loadingdone`,tr))}),$e(()=>{typeof document<`u`&&document.fonts&&document.fonts.removeEventListener?.(`loadingdone`,tr),fn=null,pn=null});let X=f(()=>{let e=qn.value+Math.abs(P.value.nameLabels.offsetX)+er.value+P.value.offsetX,t=Y.value.width-Y.value.padding.right,n=Math.max(0,t-e-$n.value-P.value.offsetX);return{top:Y.value.padding.top,bottom:Y.value.padding.top+Y.value.height,left:e,right:t,width:n,fullHeight:Y.value.padding.top+Y.value.padding.bottom+Y.value.height}});function nr(){A.value.length?A.value=[]:U.value.forEach(e=>{A.value.push(e.id)}),gn(`selectLegend`,W.value)}async function rr(e){if(A.value.includes(e))A.value=A.value.filter(t=>t!==e);else{if(A.value.length===U.value.length-1)return;A.value.push(e)}gn(`selectLegend`,W.value)}function ir(e){return U.value.length?U.value.find(t=>t.name===e)||(Rn.value&&console.warn(`VueUiHorizontalBar - Series name not found "${e}"`),null):(Rn.value&&console.warn(`VueUiHorizontalBar - There are no series to show.`),null)}function ar(e){let t=ir(e);t!==null&&A.value.includes(t.id)&&rr(t.id)}function or(e){let t=ir(e);t!==null&&(A.value.includes(t.id)||rr(t.id))}let Z=f(()=>W.value.map(e=>Math.abs(e.value)).reduce((e,t)=>e+t,0));function sr(e,t=!1,n=0){return t?a({v:u(Math.abs(e)/Z.value*100),s:`%`,r:n}):Math.abs(e)/Z.value}let cr=f(()=>G.value.map(e=>e.sign).includes(-1)),lr=f(()=>Math.max(...W.value.flatMap(e=>e.children&&e.children.length?Math.max(...e.children.map(e=>e.value)):e.value)));function Q(e){let t=e/lr.value;return u(X.value.width/(cr.value?2:1)*t)}function ur(e){return Q(e)+X.value.left}function dr(e,t){let n=W.value.find(t=>t.id===e.parentId);return{y:X.value.top+(B.value+J.value)*t+q.value[t]*K.value-K.value+P.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)?``:sr(n.value,!0,P.value.dataLabels.percentage.roundingPercentage),sign:n.sign}}function fr(){return W.value}function pr(e,t){return dr(e,t).name}function mr(e,t){let n=dr(e,t);return xr(n.value,n,t,e.parentSign||e.sign)}let hr=x(null),gr=x(null);function _r({datapoint:e,seriesIndex:t}){gn(`selectDatapoint`,e),N.value.events.datapointClick&&N.value.events.datapointClick({datapoint:e,seriesIndex:t})}function vr({datapoint:e,seriesIndex:t}){N.value.events.datapointLeave&&N.value.events.datapointLeave({datapoint:e,seriesIndex:t}),Xt.value=null,Jt.value=!1,hr.value=null,M.value===t&&(M.value=null)}function yr(e,t,n=`pointer`){hn.value=n,N.value.events.datapointEnter&&N.value.events.datapointEnter({datpoint:e,seriesIndex:t}),M.value=t,Xt.value=e,gr.value={datapoint:e,seriesIndex:t,series:U.value,config:N.value},Jt.value=!0,hr.value=e.id;let r=``,i=e.isChild?e.parentName:e.name,o=e.isChild?e.name:``,c=I.value.customFormat;s(c)&&ue(()=>c({datapoint:e,series:U.value,config:N.value,seriesIndex:t}))?Yt.value=c({datapoint:e,series:U.value,config:N.value,seriesIndex:t}):(r+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${I.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}"/>${Kt.pattern?`<rect x="0" y="0" height="60" width="60" rx="5" stroke="none" fill="url(#pattern_${O.value}_${e.absoluteIndex})"/>`:``}</svg> ${i}</div>
3
- ${o?`<div>${o}</div>`:``}
4
- </div>`,I.value.showValue&&(r+=`<div>${N.value.translations.value}: <b>${oe(P.value.dataLabels.value.formatter,e.sign===1?e.value:-e.value,a({p:I.value.prefix,v:e.sign===1?e.value:-e.value,s:I.value.suffix,r:I.value.roundingValue}),{datapoint:e,seriesIndex:t})}</b></div>`),I.value.showPercentage&&(r+=`<div>${N.value.translations.percentageToTotal} : <b>${a({v:Math.abs(e.value)/Z.value*100,s:`%`,r:I.value.roundingPercentage})}</b></div>`,e.isChild&&(r+=`<div>${N.value.translations.percentageToSerie}: <b>${a({v:Math.abs(e.value)/Math.abs(e.parentValue)*100,s:`%`,r:I.value.roundingPercentage})}</b></div>`)),Yt.value=`<div style="text-align:left">${r}</div>`)}function br({legend:e,index:t}){let n=L.value.legend;return n.showValue?`${e.name}: ${oe(P.value.dataLabels.value.formatter,e.value,a({p:n.prefix,v:e.value,s:n.suffix,r:n.roundingValue}),{datapoint:e,seriesIndex:t})}`:e.name}function xr(e,t,n,r){if(!P.value.dataLabels.value.show)return``;let i=oe(P.value.dataLabels.value.formatter,u(r===-1&&e>=0?-e:e),a({p:P.value.dataLabels.value.prefix,v:u(r===-1&&e>=0?-e:e),s:P.value.dataLabels.value.suffix,r:P.value.dataLabels.value.roundingValue}),{datapoint:t,seriesIndex:n}),o=`(${sr(e,!0,P.value.dataLabels.percentage.roundingPercentage)})`;return`${i}${P.value.dataLabels.percentage.show?` ${o}`:``}`}let Sr=f(()=>({head:[N.value.translations.parentName,N.value.translations.value,N.value.translations.percentageToTotal,N.value.translations.childName,N.value.translations.value,N.value.translations.percentageToSerie,N.value.translations.percentageToTotal],body:G.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:``})})),Cr=[{key:`parentName`,type:`name`},{key:`parentValue`,type:`value`},{key:`percentageToTotal`,type:`percentage`},{key:`childName`,type:`name`},{key:`childValue`,type:`value`},{key:`childPercentageToParent`,type:`percentage`},{key:`childPercentageToTotal`,type:`percentage`}];function wr(e,t){let n=e[t.key],r=N.value.table.td,i=[``,NaN,void 0].includes(n);return t.type===`value`?`${w(r.prefix)}${i?``:n.toFixed(r.roundingValue)}${w(r.suffix)}`:t.type===`percentage`?i?``:`${(n*100).toFixed(r.roundingPercentage)}%`:n}function Tr(e=null){let t=[[L.value.title.text],[L.value.title.subtitle.text],[``]],n=Sr.value.head,r=Sr.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=o(i);e?e(a):le({csvContent:a,title:L.value.title.text||`vue-ui-vertical-bar`})}let $=x(!1);function Er(e){$.value=e,Zt.value+=1}function Dr(){H.value.showTable=!H.value.showTable}et(()=>{[`none`,`asc`,`desc`].includes(P.value.sort)||ae({componentName:`VueUiVerticalBar`,type:`attributeWrongValue`,property:`style.chart.layout.bars.sort`,key:P.value.sort}),j.value=un.value[P.value.sort]??0});function Or(){j.value+=1,j.value>2&&(j.value=0)}function kr(){Or()}function Ar(){H.value.showTooltip=!H.value.showTooltip}let jr=x(!1);function Mr(){jr.value=!jr.value}let Nr=we(k,()=>L.value.title.text),Pr=f(()=>Oe({config:N,style:L,mutableConfig:H,dialog:Ht,accordion:Re,isFullscreen:$,parent:k,maxWidth:800,isCursorPointer:_n}));at(()=>H.value.showTable,e=>De(e,N,on));let{isResponsive:Fr}=Ue(In,Ln);function Ir(){H.value.showTable=!1,sn.value&&sn.value.setTableIconState(!1)}let Lr=f(()=>U.value.map((e,t)=>({...e,shape:`square`,display:`${e.name}: ${oe(P.value.dataLabels.value.formatter,e.value,a({p:L.value.legend.prefix,v:e.value,s:L.value.legend.suffix,r:L.value.legend.roundingValue}),{datapoint:e,seriesIndex:t})}`}))),Rr=f(()=>L.value.backgroundColor),zr=f(()=>L.value.legend),Br=f(()=>L.value.title),Vr=f(()=>Lr.value.map(e=>({...e,name:e.display}))),{isCallbackImaging:Hr,isCallbackSvg:Ur,generateSvg:Wr,onGenerateImage:Gr}=Ee({svg:En,title:Br,legend:zr,legendItems:Vr,backgroundColor:Rr,getSvgCallback:()=>N.value.userOptions.callbacks.svg,generateImage:Nn});function Kr(){console.warn(`[autoSize]: this legacy method can be safely removed as it has no impact.`)}async function qr(){gn(`copyAlt`,{config:N.value,dataset:W.value}),N.value.userOptions.callbacks.altCopy?await Promise.resolve(N.value.userOptions.callbacks.altCopy({config:N.value,dataset:W.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let Jr=x(!1);function Yr(){M.value=null,Jr.value=!0}function Xr(){M.value=null,Jt.value=!1,Jr.value=!1}function Zr(){if(M.value===null)return;let e=G.value[M.value];e&&vr({datapoint:e,seriesIndex:M.value}),M.value=null,hn.value=`pointer`}function Qr(e){if(!En.value||jr.value||document.activeElement!==En.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=G.value.length;if(!a)return;if(e.preventDefault(),e.stopPropagation(),i){Zr();return}if(r){if(M.value===null)return;let e=G.value[M.value];if(!e)return;_r({datapoint:e,seriesIndex:M.value});return}let o=M.value,s=Xt.value?G.value.findIndex(e=>e.id===Xt.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=G.value[o];c&&(M.value=o,$r(c),yr(c,o,`keyboard`))}function $r(e){if(!e)return;let t=X.value.right,n=X.value.top+(B.value+J.value)*e.absoluteIndex+q.value[e.absoluteIndex]*K.value;if(!Number.isFinite(t)||!Number.isFinite(n))return;let r=fe(t,n,En.value);r&&(mn.value=r)}let ei=f(()=>({head:Sr.value.head,body:Sr.value.body.map(e=>[e.parentName,e.parentValue===``?``:a({v:e.parentValue,r:P.value.dataLabels.value.roundingValue,p:P.value.dataLabels.prefix,s:P.value.dataLabels.suffix}),e.percentageToTotal===``?``:a({v:e.percentageToTotal*100,r:P.value.dataLabels.percentage.roundingPercentage,s:`%`}),e.childName,e.childValue===``?``:a({v:e.childValue,r:P.value.dataLabels.value.roundingValue,p:P.value.dataLabels.prefix,s:P.value.dataLabels.suffix}),e.childPercentageToParent===``?``:a({v:e.childPercentageToParent*100,r:P.value.dataLabels.percentage.roundingPercentage,s:`%`}),e.childPercentageToTotal===``?``:a({v:e.childPercentageToTotal*100,r:P.value.dataLabels.percentage.roundingPercentage,s:`%`})]),caption:N.value.a11y.translations.tableCaption,notice:N.value.a11y.translations.tableAvailable}));return xe({autoSize:Kr,getData:fr,getImage:Nr,generatePdf:Mn,generateCsv:Tr,generateImage:Nn,generateSvg:Wr,hideSeries:or,showSeries:ar,toggleTable:Dr,toggleSort:kr,toggleTooltip:Ar,toggleAnnotator:Mr,toggleFullscreen:Er,copyAlt:qr}),(e,i)=>(b(),h(`div`,{class:v(`vue-data-ui-component vue-ui-vertical-bar ${$.value?`vue-data-ui-wrapper-fullscreen`:``} ${N.value.useCssAnimation?``:`vue-ui-dna`} ${N.value.responsive?`vue-ui-vertical-bar-autosize`:``}`),ref_key:`verticalBarChart`,ref:k,id:`vue-ui-vertical-bar_${O.value}`,style:y(`font-family:${N.value.style.fontFamily};width:100%; text-align:center;background:${L.value.backgroundColor};height:100%`),onMouseenter:i[3]||=()=>T(wn)(!0),onMouseleave:i[4]||=()=>T(wn)(!1)},[g(`p`,{id:`chart-instructions-${O.value}`,class:`sr-only`},w(N.value.a11y.translations.keyboardNavigation),9,lt),ei.value.body.length?(b(),p(Be,{key:0,uid:O.value,head:ei.value.head,body:ei.value.body,caption:ei.value.caption,notice:ei.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):m(``,!0),N.value.userOptions.buttons.annotator?(b(),p(T(zt),Xe({key:1},T(n)(N.value.userOptions.annotator),{svgRef:T(En),backgroundColor:L.value.backgroundColor,color:L.value.color,active:jr.value,isCursorPointer:_n.value,palette:N.value.userOptions.annotatorPalette,onClose:Mr}),Ke({_:2},[S(T(r),n=>({name:n,fn:E(r=>[C(e.$slots,n,Qe(_(T(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):m(``,!0),Pn.value?(b(),h(`div`,{key:2,ref_key:`noTitle`,ref:tn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):m(``,!0),L.value.title.text?(b(),h(`div`,{key:3,ref_key:`chartTitle`,ref:Qt,style:`width:100%;background:transparent;padding-bottom:12px`},[(b(),p(Te,{key:`title_${nn.value}`,config:{title:{cy:`vertical-bar-div-title`,...L.value.title},subtitle:{cy:`vertical-bar-div-subtitle`,...L.value.title.subtitle}}},null,8,[`config`]))],512)):m(``,!0),N.value.userOptions.show&&qt.value&&(T(Tn)||T(Cn))?(b(),p(T(Bt),Xe({ref_key:`userOptionsRef`,ref:sn,backgroundColor:L.value.backgroundColor,color:L.value.color,key:`user_options_${Zt.value}`,isImaging:T(jn),isPrinting:T(An),uid:O.value,hasTooltip:N.value.userOptions.buttons.tooltip&&I.value.show,isFullscreen:$.value,isTooltip:H.value.showTooltip,chartElement:k.value},T(Ae)(N.value.userOptions,`pdf csv img svg table fullscreen altCopy annotator sort`),{isAnnotation:jr.value,tableDialog:N.value.table.useDialog,isCursorPointer:_n.value,onToggleFullscreen:Er,onGeneratePdf:T(Mn),onGenerateCsv:Tr,onGenerateImage:T(Gr),onGenerateSvg:T(Wr),onToggleTable:Dr,onToggleSort:kr,onToggleTooltip:Ar,onToggleAnnotator:Mr,onCopyAlt:qr,style:{visibility:T(Tn)?T(Cn)?`visible`:`hidden`:`visible`}}),Ke({_:2},[S(T(ke)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionSort optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:E(n=>[C(e.$slots,t,Qe(_(T(je)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isImaging`,`isPrinting`,`uid`,`hasTooltip`,`isFullscreen`,`isTooltip`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):m(``,!0),e.$slots.legend&&L.value.legend.show&&L.value.legend.position===`top`?C(e.$slots,`legend`,{legend:U.value},void 0,!0,5):m(``,!0),!e.$slots.legend&&L.value.legend.show&&L.value.legend.position===`top`?(b(),h(`div`,{key:6,ref_key:`chartLegend`,ref:$t},[(b(),p(We,{key:`legend_top_${rn.value}`,legendSet:U.value,config:Kn.value,onClickMarker:i[0]||=({legend:e})=>rr(e.id)},Ke({item:E(({legend:e,index:t})=>[g(`div`,{onClick:t=>rr(e.id),style:y(`opacity:${A.value.includes(e.id)?.5:1}`)},w(br({legend:e,index:t})),13,ut)]),legendToggle:E(()=>[U.value.length>2&&L.value.legend.selectAllToggle.show&&!T(bn)?(b(),p(ze,{key:0,backgroundColor:L.value.legend.selectAllToggle.backgroundColor,color:L.value.legend.selectAllToggle.color,fontSize:L.value.legend.fontSize,checked:A.value.length>0,onToggle:nr},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`])):m(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:E(({legend:e,index:t})=>[Je(Pe,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${O.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`]))],512)):m(``,!0),g(`div`,dt,[(b(),h(`svg`,{ref_key:`svgRef`,ref:En,xmlns:T(de),class:v({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value,"vue-data-ui-no-transition":!T(R)}),viewBox:`0 0 ${z.value} ${On.value}`,style:y(`max-width:100%;overflow:visible;background:transparent;color:${L.value.color}`),tabindex:`0`,"aria-describedby":`chart-instructions-${O.value}`,onFocus:Yr,onBlur:Xr,onKeydown:Qr},[g(`g`,{ref_key:`G`,ref:an,class:`vue-data-ui-g`},[Je(T(Vt)),C(e.$slots,`svg-underlayer`,{svg:{...Y.value,drawingArea:X.value,isPrintingImg:T(An)||T(jn)||T(Hr),isPrintingSvg:T(Ur)}},void 0,!0),e.$slots[`chart-background`]?(b(),h(`foreignObject`,{key:0,x:0,y:0,width:z.value,height:On.value,style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,pt)):m(``,!0),g(`defs`,null,[(b(!0),h(d,null,S(G.value,(e,t)=>(b(),p(Le,{t:`linear`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,id:`vertical_bar_gradient_${O.value}_${t}`,key:`vertical_bar_gradient_${O.value}_${t}`,stops:[[`0%`,e.color,1],[`100%`,T(ee)(T(re)(e.color,.03),100-P.value.gradientIntensity),1]]},null,8,[`id`,`stops`]))),128))]),e.$slots.pattern?(b(),h(`g`,mt,[(b(!0),h(d,null,S(G.value,t=>(b(),h(`defs`,null,[C(e.$slots,`pattern`,Xe({ref_for:!0},{seriesIndex:t.absoluteIndex,patternId:`pattern_${O.value}_${t.absoluteIndex}`}),void 0,!0)]))),256))])):m(``,!0),P.value.rowColor?(b(!0),h(d,{key:2},S(G.value,(e,t)=>(b(),h(`g`,{key:`row_${e.id}`},[g(`rect`,{x:0,y:X.value.top+(B.value+J.value)*t+q.value[t]*K.value,width:z.value,height:J.value<=0?1e-4:J.value,fill:P.value.rowColor,rx:P.value.rowRadius,style:{pointerEvents:`none`},class:v({"vue-data-ui-transition":T(R)})},null,10,ht)]))),128)):m(``,!0),(b(!0),h(d,null,S(G.value,(e,t)=>(b(),h(`g`,{key:`underlayer_${e.id}`},[g(`rect`,{x:T(u)(cr.value?X.value.left+X.value.width/2-(e.sign===1?0:Q(e.value)<=0?1e-4:Q(e.value)):X.value.left),y:X.value.top+(B.value+J.value)*t+q.value[t]*K.value,width:T(u)(Q(e.value)<=0?1e-4:Q(e.value)),height:J.value<=0?1e-4:J.value,fill:P.value.underlayerColor,rx:P.value.borderRadius,class:v({"vue-data-ui-transition":T(R)})},null,10,gt)]))),128)),(b(!0),h(d,null,S(G.value,(t,n)=>(b(),h(`g`,{key:`barloop_${t.id}`},[g(`rect`,{x:T(u)(cr.value?X.value.left+X.value.width/2-(t.sign===1?0:Q(t.value)<=0?1e-4:Q(t.value)):X.value.left),y:X.value.top+(B.value+J.value)*n+q.value[n]*K.value,width:T(u)(Q(t.value)<=0?1e-4:Q(t.value)),height:J.value<=0?1e-4:J.value,fill:P.value.useGradient?`url(#vertical_bar_gradient_${O.value}_${n})`:T(ee)(t.color,P.value.fillOpacity),rx:P.value.borderRadius,stroke:P.value.useStroke?t.color:`none`,"stroke-width":P.value.useStroke?P.value.strokeWidth:0,class:v({"vue-data-ui-transition":T(R)})},null,10,_t),e.$slots.pattern?(b(),h(`rect`,{key:0,x:T(u)(cr.value?X.value.left+X.value.width/2-(t.sign===1?0:Q(t.value)<=0?1e-4:Q(t.value)):X.value.left),y:X.value.top+(B.value+J.value)*n+q.value[n]*K.value,width:T(u)(Q(t.value)<=0?1e-4:Q(t.value)),height:J.value<=0?1e-4:J.value,fill:`url(#pattern_${O.value}_${t.absoluteIndex})`,rx:P.value.borderRadius,stroke:P.value.useStroke?t.color:`none`,"stroke-width":P.value.useStroke?P.value.strokeWidth:0,class:v({"vue-data-ui-transition":T(R)})},null,10,vt)):m(``,!0),(!t.isChild||t.isLastChild)&&F.value.separators.show&&n!==G.value.length-1?(b(),h(`path`,{key:1,stroke:F.value.separators.color,"stroke-width":F.value.separators.strokeWidth,"stroke-linecap":`round`,class:v({"vue-data-ui-transition":T(R)}),d:`M${z.value}, ${J.value+B.value/2+X.value.top+(B.value+J.value)*n+q.value[n]*K.value} ${F.value.separators.fullWidth?0:X.value.left}, ${J.value+B.value/2+X.value.top+(B.value+J.value)*n+q.value[n]*K.value}`},null,10,yt)):m(``,!0),cr.value&&F.value.separators.show?(b(),h(`path`,{key:2,stroke:F.value.separators.color,"stroke-width":F.value.separators.strokeWidth,"stroke-linecap":`round`,class:v({"vue-data-ui-transition":T(R)}),d:`M${X.value.left+X.value.width/2}, ${X.value.top} ${X.value.left+X.value.width/2}, ${X.value.bottom}`},null,10,bt)):m(``,!0)]))),128)),g(`g`,{ref_key:`parentLabels`,ref:cn},[(b(!0),h(d,null,S(G.value,(e,t)=>(b(),h(`g`,{key:`pn_${e.id}`,class:`vue-ui-horizontal-bar-parent-label`},[e.isChild&&e.childIndex===0&&P.value.parentLabels.show?(b(),h(`rect`,{key:0,class:v([`vue-ui-horizontal-bar-parent-marker`,{"vue-data-ui-transition":T(R)}]),x:2,y:dr(e,t).y-P.value.parentLabels.fontSize/1.5,height:P.value.parentLabels.fontSize/1.5,width:P.value.parentLabels.fontSize/1.5,rx:1,fill:e.color},null,10,xt)):m(``,!0),e.isChild&&e.childIndex===0&&P.value.parentLabels.show?(b(),h(`text`,{key:1,class:v({"vue-data-ui-transition":T(R)}),transform:`translate(${P.value.parentLabels.offsetX+P.value.parentLabels.fontSize}, ${dr(e,t).y})`,"font-size":P.value.parentLabels.fontSize,fill:P.value.parentLabels.color,"font-weight":P.value.parentLabels.bold?`bold`:`normal`,"text-anchor":`start`,innerHTML:T(l)({content:`${pr(e,t)}`,fontSize:P.value.parentLabels.fontSize,fill:F.value.bars.parentLabels.color,x:0,y:0,translateY:!1})},null,10,St)):m(``,!0),e.isChild&&e.childIndex===0&&P.value.parentLabels.show?(b(),h(`text`,{key:2,class:v({"vue-data-ui-transition":T(R)}),transform:`translate(${P.value.parentLabels.offsetX+P.value.parentLabels.fontSize}, ${dr(e,t).y+T(pe)(pr(e,t))*P.value.parentLabels.fontSize*1.1})`,"font-size":P.value.parentLabels.fontSize,fill:P.value.parentLabels.color,"font-weight":P.value.dataLabels.bold?`bold`:`normal`,"text-anchor":`start`},w(mr(e,t)),11,Ct)):m(``,!0)]))),128))],512),g(`g`,{ref_key:`childLabels`,ref:ln},[(b(!0),h(d,null,S(Wn.value,(e,t)=>(b(),h(`g`,{key:`cl_${e.id}`,class:`vue-ui-horizontal-bar-child-label`},[(e.isChild||!e.hasChildren)&&P.value.nameLabels.show?(b(),h(`text`,{key:0,"text-anchor":`start`,class:v({"vue-data-ui-transition":T(R)}),transform:`translate(${Math.abs(P.value.nameLabels.offsetX)}, ${T(u)(X.value.top+(B.value+J.value)*t+J.value/2+P.value.nameLabels.fontSize/2+q.value[t]*K.value)})`,"font-size":P.value.nameLabels.fontSize,fill:`transparent`,"font-weight":P.value.nameLabels.bold?`bold`:`normal`,style:{"user-select":`none`},innerHTML:T(l)({content:e.name,fontSize:P.value.nameLabels.fontSize,fill:`transparent`,x:0,y:0,translateY:!0})},null,10,wt)):m(``,!0)]))),128))],512),g(`g`,null,[(b(!0),h(d,null,S(G.value,(e,t)=>(b(),h(`g`,{key:`vislab_${e.id}`,class:`vue-ui-horizontal-bar-child-label`},[(e.isChild||!e.hasChildren)&&P.value.nameLabels.show?(b(),h(`text`,{key:0,class:v({"vue-data-ui-transition":T(R)}),"text-anchor":`end`,transform:`translate(${X.value.left+P.value.nameLabels.offsetX-6}, ${X.value.top+(B.value+J.value)*t+J.value/2+P.value.nameLabels.fontSize/3+q.value[t]*K.value})`,"font-size":P.value.nameLabels.fontSize,fill:P.value.nameLabels.color,"font-weight":P.value.nameLabels.bold?`bold`:`normal`,innerHTML:T(l)({content:e.name,fontSize:P.value.nameLabels.fontSize,fill:F.value.bars.nameLabels.color,x:0,y:0,translateY:!0})},null,10,Tt)):m(``,!0)]))),128))]),g(`g`,null,[(b(!0),h(d,null,S(G.value,(e,t)=>(b(),h(`g`,{key:`sdl_${e.id}`,class:`vue-ui-horizontal-bar-child-label`},[g(`text`,{class:v({"vue-data-ui-transition":T(R)}),transform:`translate(${cr.value?X.value.left+X.value.width/2+(e.sign===1?-12:12)+(e.sign===1?-F.value.bars.dataLabels.offsetX:F.value.bars.dataLabels.offsetX):Math.min(ur(e.value)+3+L.value.layout.bars.dataLabels.offsetX,X.value.right-2)},${X.value.top+(B.value+J.value)*t+J.value/2+q.value[t]*K.value+P.value.dataLabels.fontSize/3})`,"text-anchor":!cr.value||e.sign===-1?`start`:`end`,"font-size":P.value.dataLabels.fontSize,fill:P.value.dataLabels.color,"font-weight":P.value.dataLabels.bold?`bold`:`normal`},w(xr(e.value,e,t,e.sign)),11,Et)]))),128))]),(b(!0),h(d,null,S(G.value,(e,t)=>(b(),h(`g`,null,[g(`rect`,{x:0,y:X.value.top+(B.value+J.value)*t-B.value/2+q.value[t]*K.value,width:z.value,height:J.value+B.value<=0?1e-4:J.value+B.value,fill:hr.value===e.id?T(ee)(F.value.highlighter.color,F.value.highlighter.opacity):`transparent`,onMouseenter:n=>yr(e,t,`pointer`),onMouseleave:n=>vr({datapoint:e,seriesIndex:t}),onClick:n=>_r({datapoint:e,seriesIndex:t})},null,40,Dt)]))),256)),C(e.$slots,`svg`,{svg:{...Y.value,drawingArea:X.value,isPrintingImg:T(An)||T(jn)||T(Hr),isPrintingSvg:T(Ur)}},void 0,!0)],512)],46,ft)),e.$slots.hint?(b(),h(`div`,Ot,[C(e.$slots,`hint`,Qe(_({hint:N.value.a11y.translations.keyboardNavigation,isVisible:Jr.value})),void 0,!0)])):m(``,!0)]),e.$slots.watermark?(b(),h(`div`,kt,[C(e.$slots,`watermark`,Qe(_({isPrinting:T(An)||T(jn)||T(Hr)||T(Ur)})),void 0,!0)])):m(``,!0),e.$slots.legend&&L.value.legend.show&&L.value.legend.position===`bottom`?C(e.$slots,`legend`,{legend:U.value},void 0,!0,8):m(``,!0),!e.$slots.legend&&L.value.legend.show&&L.value.legend.position===`bottom`?(b(),h(`div`,{key:9,ref_key:`chartLegend`,ref:$t},[(b(),p(We,{key:`legend_bottom_${rn.value}`,legendSet:U.value,config:Kn.value,isCursorPointer:_n.value,onClickMarker:i[1]||=({legend:e})=>rr(e.id)},Ke({item:E(({legend:e,index:t})=>[g(`div`,{onClick:t=>rr(e.id),style:y(`opacity:${A.value.includes(e.id)?.5:1}`)},w(br({legend:e,index:t})),13,At)]),legendToggle:E(()=>[U.value.length>2&&L.value.legend.selectAllToggle.show&&!T(bn)?(b(),p(ze,{key:0,backgroundColor:L.value.legend.selectAllToggle.backgroundColor,color:L.value.legend.selectAllToggle.color,fontSize:L.value.legend.fontSize,checked:A.value.length>0,isCursorPointer:_n.value,onToggle:nr},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):m(``,!0)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:E(({legend:e,index:t})=>[Je(Pe,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${O.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`]))],512)):m(``,!0),e.$slots.source?(b(),h(`div`,{key:10,ref_key:`source`,ref:en,dir:`auto`},[C(e.$slots,`source`,{},void 0,!0)],512)):m(``,!0),Je(T(Lt),{teleportTo:I.value.teleportTo,show:H.value.showTooltip&&Jt.value&&A.value.length<D.dataset.length,backgroundColor:I.value.backgroundColor,color:I.value.color,borderRadius:I.value.borderRadius,borderColor:I.value.borderColor,borderWidth:I.value.borderWidth,fontSize:I.value.fontSize,backgroundOpacity:I.value.backgroundOpacity,position:I.value.position,offsetX:I.value.offsetX,offsetY:I.value.offsetY,parent:k.value,content:Yt.value,isFullscreen:$.value,isCustom:I.value.customFormat&&typeof I.value.customFormat==`function`,smooth:I.value.smooth,backdropFilter:I.value.backdropFilter,smoothForce:I.value.smoothForce,smoothSnapThreshold:I.value.smoothSnapThreshold,isA11yMode:hn.value===`keyboard`,a11yPosition:mn.value},{"tooltip-before":E(()=>[C(e.$slots,`tooltip-before`,Qe(_({...gr.value})),void 0,!0)]),tooltip:E(()=>[C(e.$slots,`tooltip`,Qe(_({...gr.value})),void 0,!0)]),"tooltip-after":E(()=>[C(e.$slots,`tooltip-after`,Qe(_({...gr.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`]),qt.value&&N.value.userOptions.buttons.table?(b(),p(tt(Pr.value.component),Xe({key:11},Pr.value.props,{ref_key:`tableUnit`,ref:on,onClose:Ir}),Ke({content:E(()=>[g(`div`,{ref_key:`tableContainer`,ref:In,class:`vue-ui-vertical-bar-table atom-data-table`,style:y(`${N.value.table.useDialog?``:`max-height: 300px; margin-top: 24px`}`)},[g(`div`,jt,[N.value.table.useDialog?m(``,!0):(b(),h(`div`,{key:0,role:`button`,tabindex:`0`,style:y(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:${_n.value?`pointer`:`default`}; background:${N.value.table.th.backgroundColor};`),onClick:Ir,onKeypress:ot(Ir,[`enter`])},[Je(T(Rt),{name:`close`,stroke:N.value.table.th.color,"stroke-width":2},null,8,[`stroke`])],36)),g(`div`,{style:{width:`100%`,"container-type":`inline-size`},class:v({"vue-ui-responsive":T(Fr)})},[g(`table`,Mt,[N.value.table.useDialog?m(``,!0):(b(),h(`caption`,{key:0,style:y({backgroundColor:N.value.table.th.backgroundColor,color:N.value.table.th.color,outline:N.value.table.th.outline}),class:`vue-ui-data-table__caption`},[qe(w(L.value.title.text)+` `,1),L.value.title.subtitle.text?(b(),h(`span`,Nt,w(L.value.title.subtitle.text),1)):m(``,!0)],4)),g(`thead`,null,[g(`tr`,{role:`row`,style:y(`background:${N.value.table.th.backgroundColor};color:${N.value.table.th.color}`)},[(b(!0),h(d,null,S(Sr.value.head,e=>(b(),h(`th`,{style:y(`outline:${N.value.table.th.outline}`)},[g(`div`,Pt,w(e),1)],4))),256))],4),g(`tr`,null,[g(`th`,{style:y(`background:${N.value.table.th.backgroundColor};color:${N.value.table.th.color};outline:${N.value.table.th.outline}`)},null,4),g(`th`,{style:y(`background:${N.value.table.th.backgroundColor};color:${N.value.table.th.color};outline:${N.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},` ∑ `+w(N.value.table.td.prefix)+w(isNaN(Z.value)?``:Z.value.toFixed(N.value.table.td.roundingValue))+w(N.value.table.td.suffix),5),g(`th`,{style:y(`background:${N.value.table.th.backgroundColor};color:${N.value.table.th.color};outline:${N.value.table.th.outline};text-align:right;padding-right:5px;font-weight:bold`)},` 100% `,4),g(`th`,{style:y(`background:${N.value.table.th.backgroundColor};color:${N.value.table.th.color};outline:${N.value.table.th.outline}`)},null,4),g(`th`,{style:y(`background:${N.value.table.th.backgroundColor};color:${N.value.table.th.color};outline:${N.value.table.th.outline}`)},null,4),g(`th`,{style:y(`background:${N.value.table.th.backgroundColor};color:${N.value.table.th.color};outline:${N.value.table.th.outline}`)},null,4),g(`th`,{style:y(`background:${N.value.table.th.backgroundColor};color:${N.value.table.th.color};outline:${N.value.table.th.outline}`)},null,4)])]),g(`tbody`,null,[(b(!0),h(d,null,S(Sr.value.body,(e,t)=>(b(),h(`tr`,{class:v({"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:y(`background:${N.value.table.td.backgroundColor};color:${N.value.table.td.color}`)},[(b(),h(d,null,S(Cr,(t,n)=>g(`td`,{key:t.key,class:`vue-ui-data-table__tbody__td`,style:y(n===0?`outline:${N.value.table.td.outline};font-variant-numeric: tabular-nums;`:`outline:${N.value.table.td.outline}`),"data-cell":Sr.value.head[n]??``},[g(`div`,It,[n===0?(b(),h(d,{key:0},[e.color?(b(),h(`span`,{key:0,style:y(`color:${e.color};margin-right:3px`)},`⬤`,4)):m(``,!0),g(`span`,null,w(e.parentName),1)],64)):(b(),h(d,{key:1},[qe(w(wr(e,t)),1)],64))])],12,Ft)),64))],6))),256))])])],2)])],4)]),_:2},[N.value.table.useDialog?{name:`title`,fn:E(()=>[qe(w(Pr.value.title),1)]),key:`0`}:void 0,N.value.table.useDialog?{name:`actions`,fn:E(()=>[g(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[2]||=e=>Tr(N.value.userOptions.callbacks.csv),style:y({cursor:_n.value?`pointer`:`default`})},[Je(T(Rt),{name:`fileCsv`,stroke:Pr.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):m(``,!0),C(e.$slots,`skeleton`,{},()=>[T(bn)?(b(),p(ve,{key:0})):m(``,!0)],!0)],46,ct))}},[[`__scopeId`,`data-v-d99b9aa1`]]);export{st as n,Lt as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-C3FbHv4N.js";import{D as a,Dt as o,Ft as s,Ht as ee,M as c,S as te,X as ne,Zt as re,at as l,et as u,in as ie,nt as ae,pt as oe,t as se,w as ce,zt as le}from"./lib-rPeBMZrn.js";import{n as ue,t as de}from"./BaseScanner-8NdoBs7B.js";import{n as fe,t as pe}from"./useHints-C-TwxM0Y.js";import{t as me}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as he}from"./resolveChartConfig-CIhClE5R.js";import{t as ge}from"./chartImage-DPGnEuYM.js";import{t as _e}from"./useChartExport-BZts4KFb.js";import{n as ve,t as ye}from"./tableIntegration-CNoJ1CIY.js";import{n as be,r as xe,t as Se}from"./userOptionsSlots-CWtXN5Q6.js";import{t as Ce}from"./usePrinter-DVf3YcG5.js";import{t as we}from"./DefGrad-DKMq1REY.js";import{t as Te}from"./useUserOptionState-CXlFnwPv.js";import{t as Ee}from"./useChartAccessibility-DOMuYJfm.js";import{n as De}from"./annotationViewport-X8fvs7pz.js";import{t as Oe}from"./vue_ui_molecule-Bw1UW1Na.js";import{t as ke}from"./usePanZoom-CE6Ofyy8.js";import{Fragment as Ae,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as je,createTextVNode as Me,createVNode as g,defineAsyncComponent as _,guardReactiveProps as v,mergeProps as Ne,nextTick as y,normalizeClass as Pe,normalizeProps as b,normalizeStyle as x,onMounted as Fe,openBlock as S,ref as C,renderList as Ie,renderSlot as w,resolveDynamicComponent as Le,toDisplayString as Re,toRefs as ze,unref as T,useCssVars as Be,watch as E,withCtx as D}from"vue";var Ve=/* @__PURE__ */ e({default:()=>Xe}),He=[`id`],Ue={key:1,ref:`noTitle`,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},We={key:2,style:`width:100%;background:transparent;`},Ge=[`xmlns`,`viewBox`],Ke=[`width`,`height`],qe={key:4,class:`vue-data-ui-watermark`},Je={key:5,"data-dom-to-png-ignore":``,class:`reset-wrapper`},Ye={key:6,ref:`source`,dir:`auto`},Xe=/*#__PURE__*/ me({__name:`vue-ui-molecule`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectNode`,`copyAlt`],setup(e,{expose:me,emit:Ve}){Be(e=>({v452ef5ad:ln.value}));let Xe=_(()=>import(`./Title-BliHuXfT.js`).then(e=>e.t)),Ze=_(()=>import(`./Tooltip-C1q0Qoh7.js`)),Qe=_(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),$e=_(()=>import(`./vue-ui-accordion-E8TJfFeK.js`).then(e=>e.n)),et=_(()=>import(`./DataTable-Dof6yhO7.js`)),tt=_(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),nt=_(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),rt=_(()=>import(`./PackageVersion-DKSNC-YP.js`).then(e=>e.t)),it=_(()=>import(`./RecursiveLinks-CZtG6uWg.js`)),at=_(()=>import(`./RecursiveLabels-B0d04xSj.js`)),ot=_(()=>import(`./RecursiveCircles-BftI1kwF.js`)),st=_(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_molecule:ct}=i(),O=e,lt=Ve,ut=d(()=>!!O.dataset&&O.dataset.length);Fe(()=>{ft()});let dt=d(()=>P.value.debug);function ft(){le(O.dataset)&&l({componentName:`VueUiMolecule`,type:`dataset`,debug:dt.value})}let k=C(ne()),A=C(!1),j=C(``),M=C(null),pt=C(0),mt=C(0),ht=C(0),gt=C(null),N=C(null),P=C(St()),F=d(()=>P.value.style.chart.tooltip),I=d(()=>P.value.style.chart),L=d(()=>P.value.userOptions);fe({config:()=>P.value,dataset:()=>O.dataset,component:`VueUiMolecule`,rules:[pe.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 R=d(()=>P.value.userOptions.useCursorPointer),_t=d(()=>ie({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,nodes:{stroke:`#6A6A6A`},links:{stroke:`#6A6A6A80`}}}},userConfig:P.value.skeletonConfig??{}})),{loading:z,FINAL_DATASET:vt}=ue({...ze(O),FINAL_CONFIG:P,prepareConfig:St,skeletonDataset:O.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:ie({defaultConfig:P.value,userConfig:_t.value})}),{userOptionsVisible:yt,setUserOptionsVisibility:bt,keepUserOptionState:xt}=Te({config:P.value}),{svgRef:B}=Ee({config:I.value.title});function St(){return he(O.config,ct,Oe)}let Ct=re(O.config);E(()=>O.config,e=>{let t=re(e),n=t!==Ct;Ct=t;let r=St();n?(P.value=r,yt.value=!P.value.userOptions.showOnChartHover,ft(),mt.value+=1,ht.value+=1,U.value.showTable=P.value.table.show,U.value.showTooltip=F.value.show,U.value.showZoom=I.value.zoom.show):(P.value.style.chart.tooltip=r.style.chart.tooltip,U.value.showTooltip=P.value.style.chart.tooltip.show)},{deep:!0});let wt=C(0),Tt=()=>{wt.value+=1};E([()=>z.value,()=>vt.value],async([e])=>{e||(await y(),W.value=jt(),await y(),Tt(),await y(),Zt({x:0,y:0,width:400,height:400}),Yt(!1))},{flush:`post`,deep:!1});let{isPrinting:V,isImaging:H,generatePdf:Et,generateImage:Dt}=Ce({elementId:`cluster_${k.value}`,fileName:I.value.title.text||`vue-ui-molecule`,options:P.value.userOptions.print}),Ot=d(()=>P.value.userOptions.show&&!I.value.title.text),kt=d(()=>ce(P.value.customPalette)),U=C({showTable:P.value.table.show,showDataLabels:!0,showTooltip:F.value.show,showZoom:I.value.zoom.show});E(P,()=>{U.value={showTable:P.value.table.show,showDataLabels:!0,showTooltip:F.value.show,showZoom:I.value.zoom.show}},{immediate:!0});function At(e,t=0){return Array.isArray(e)&&e.length>0&&e[0].nodes?At(e[0].nodes,t+1):t}function jt(){let e=At(vt.value),t=100,n=t;for(let r=0;r<e;r+=1)t/=1,n+=t;return{height:n,width:n}}let W=C(jt());function Mt(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 re=c({plot:t,radius:n,sides:e.length,rotation:i});return e.forEach((e,t)=>{let c=re.coordinates[t],l=e.color?(()=>{let t=te(e.color);return t.startsWith(`#`)?t:`#${t}`})():null,u;l?u=l:s===0?u=o:s===1?(u=kt.value[a]||ee[a]||o,a+=1):u=o,e.polygonPath={coordinates:[c]},e.circleRadius=r,e.color=u,e.strokeWidth=Math.min(I.value.links.strokeWidth/(s+1),r/2),e.uid=ne(),Array.isArray(e.nodes)&&e.nodes.length&&(e.nodes=Mt(e.nodes,c,n/2.9,r/2.2,i+Math.PI*t/e.nodes.length,a,u,s+1))}),e}function Nt(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=te(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 Pt=d(()=>Nt(G.value)),G=d(()=>Mt(u(vt.value))),K=C(null);function Ft(e){K.value={datapoint:e,seriesIndex:-1,series:G.value,config:P.value};let t=F.value.customFormat;if(o(t)&&oe(()=>t({seriesIndex:-1,datapoint:e,series:G.value,config:P.value})))j.value=t({seriesIndex:-1,datapoint:e,series:G.value,config:P.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 ${F.value.borderColor};margin-top: 2px">${e.details}</div>`),j.value=`<div style="font-family:inherit">${t}</div>`}}let q=C(null),J=C(null),It=C(null);function Lt(e){It.value=q.value,q.value=e,e?P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:e,seriesIndex:-1}):P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:It.value||q.value,seriesIndex:-1}),e?(A.value=!0,Ft(e),J.value=e.uid):(A.value=!1,j.value=``,J.value=null)}function Rt(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 zt=d(()=>Rt(G.value)),Y=d(()=>({head:[P.value.table.translations.nodeName,P.value.table.translations.details,P.value.table.translations.ancestor],body:zt.value.map((e,t)=>[{color:e.color,name:e.name},e.details,e.ancestor||``]),config:{th:{backgroundColor:P.value.table.th.backgroundColor,color:P.value.table.th.color,outline:P.value.table.th.outline},td:{backgroundColor:P.value.table.td.backgroundColor,color:P.value.table.td.color,outline:P.value.table.td.outline},breakpoint:P.value.table.responsiveBreakpoint},colNames:[P.value.table.translations.nodeName,P.value.table.translations.details,P.value.table.translations.ancestor]}));function Bt(e=null){y(()=>{let t=Y.value.body.map((e,t)=>[[e[0].name],[e[1]],[e[2]]]),n=[[I.value.title.text],[I.value.title.subtitle.text],[[...Y.value.head]]].concat(t),r=a(n);e?e(r):ae({csvContent:r,title:I.value.title.text||`vue-ui-molecule`})})}function Vt(){return G.value}let X=C(!1);function Ht(e){X.value=e,pt.value+=1}function Ut(){U.value.showTable=!U.value.showTable}function Wt(){U.value.showDataLabels=!U.value.showDataLabels}function Gt(){U.value.showTooltip=!U.value.showTooltip}function Kt(){U.value.showZoom=!U.value.showZoom}let Z=C(!1);function qt(){Z.value=!Z.value}let Jt=d(()=>!Z.value&&U.value.showZoom),{viewBox:Q,resetZoom:Yt,isZoom:Xt,setInitialViewBox:Zt}=ke(B,{x:0,y:0,width:Math.max(10,W.value.width),height:Math.max(10,W.value.height)},I.value.zoom.speed,Jt);function Qt(e){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:e,seriesIndex:-1}),lt(`selectNode`,e)}let $t=ge(M,()=>I.value.title.text),$=d(()=>ye({config:P,style:I,mutableConfig:U,dialog:st,accordion:$e,isFullscreen:X,parent:M,maxWidth:800,isCursorPointer:R}));E(()=>U.value.showTable,e=>ve(e,P,gt));function en(){U.value.showTable=!1,N.value&&N.value.setTableIconState(!1)}let tn=d(()=>I.value.backgroundColor),nn=d(()=>I.value.title),{isCallbackImaging:rn,isCallbackSvg:an,generateSvg:on,onGenerateImage:sn}=_e({svg:B,title:nn,legend:null,legendItems:null,backgroundColor:tn,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:Dt});async function cn(){lt(`copyAlt`,{config:P.value,dataset:G.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:G.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let ln=d(()=>I.value.color);me({getData:Vt,getImage:$t,generatePdf:Et,generateCsv:Bt,generateImage:Dt,generateSvg:on,toggleTable:Ut,toggleLabels:Wt,toggleTooltip:Gt,toggleAnnotator:qt,toggleFullscreen:Ht,toggleZoom:Kt,copyAlt:cn});let un=d(()=>De(P.value.userOptions?.annotator?.followZoom,Q.value));return(e,i)=>(S(),m(`div`,{ref_key:`moleculeChart`,ref:M,class:Pe(`vue-data-ui-component vue-ui-molecule ${X.value?`vue-data-ui-wrapper-fullscreen`:``}`),style:x(`font-family:${P.value.style.fontFamily};width:100%; text-align:center;background:${I.value.backgroundColor}`),id:`cluster_${k.value}`,onMouseleave:i[2]||=e=>{q.value=null,J.value=null,T(bt)(!1)},onMouseenter:i[3]||=()=>T(bt)(!0)},[L.value.buttons.annotator&&T(B)?(S(),f(T(tt),Ne({key:0},T(n)(L.value.annotator),{svgRef:T(B),followZoom:P.value.userOptions?.annotator?.followZoom,annotationViewport:un.value,backgroundColor:I.value.backgroundColor,color:I.value.color,active:Z.value,isCursorPointer:R.value,onClose:qt}),je({_:2},[Ie(T(r),n=>({name:n,fn:D(r=>[w(e.$slots,n,b(v(T(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`followZoom`,`annotationViewport`,`backgroundColor`,`color`,`active`,`isCursorPointer`])):p(``,!0),Ot.value?(S(),m(`div`,Ue,null,512)):p(``,!0),I.value.title.text?(S(),m(`div`,We,[(S(),f(T(Xe),{key:`title_${mt.value}`,config:{title:{cy:`molecule-div-title`,...I.value.title},subtitle:{cy:`molecule-div-subtitle`,...I.value.title.subtitle}}},null,8,[`config`]))])):p(``,!0),L.value.show&&ut.value&&(T(xt)||T(yt))?(S(),f(T(nt),Ne({ref_key:`userOptionsRef`,ref:N,key:`user_options_${pt.value}`,backgroundColor:I.value.backgroundColor,color:I.value.color,isPrinting:T(V),isImaging:T(H),uid:k.value,hasTooltip:L.value.buttons.tooltip&&F.value.show,isTooltip:U.value.showTooltip,isFullscreen:X.value,chartElement:M.value},T(xe)(L.value,`pdf csv img svg labels table fullscreen altCopy annotator zoom`),{isAnnotation:Z.value,tableDialog:P.value.table.useDialog,isZoom:U.value.showZoom,isCursorPointer:R.value,onToggleFullscreen:Ht,onGeneratePdf:T(Et),onGenerateCsv:Bt,onGenerateImage:T(sn),onGenerateSvg:T(on),onToggleTable:Ut,onToggleLabels:Wt,onToggleTooltip:Gt,onToggleAnnotator:qt,onToggleZoom:Kt,onCopyAlt:cn,style:{visibility:T(xt)?T(yt)?`visible`:`hidden`:`visible`}}),je({_:2},[Ie(T(be)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionZoom optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:D(n=>[w(e.$slots,t,b(v(T(Se)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasTooltip`,`isTooltip`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`isZoom`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):p(``,!0),(S(),m(`svg`,{ref_key:`svgRef`,ref:B,key:`svg_${wt.value}`,xmlns:T(se),viewBox:`${T(Q).x} ${T(Q).y} ${T(Q).width} ${T(Q).height}`,class:Pe({"vue-data-ui-fullscreen--on":X.value,"vue-data-ui-fulscreen--off":!X.value}),style:x(`overflow: hidden; background:transparent;color:${I.value.color}`)},[g(T(rt)),w(e.$slots,`svg-underlayer`,{svg:{...W.value,drawingArea:{...T(Q)},isPrintingImg:T(V)||T(H)||T(rn),isPrintingSvg:T(an)}},void 0,!0),e.$slots[`chart-background`]?(S(),m(`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`}},[w(e.$slots,`chart-background`,{},void 0,!0)],8,Ke)):p(``,!0),h(`defs`,null,[(S(!0),m(Ae,null,Ie(Object.keys(Pt.value),(e,t)=>(S(),f(we,{t:`radial`,id:`gradient_${e}`,key:`gradient_${e}_${t}`,cx:`50%`,cy:`30%`,r:`50%`,fx:`50%`,fy:`50%`,stops:[[`0%`,T(s)(e,.5),1],[`100%`,e,1]]},null,8,[`id`,`stops`]))),128))]),g(T(it),{dataset:G.value,color:I.value.links.stroke,backgroundColor:I.value.backgroundColor,useChildColor:I.value.links.useChildColor},null,8,[`dataset`,`color`,`backgroundColor`,`useChildColor`]),g(T(ot),{dataset:G.value,hoveredUid:J.value,stroke:I.value.nodes.stroke,strokeHovered:I.value.nodes.strokeHovered,onClick:Qt,onHover:Lt},{node:D(({node:t})=>[w(e.$slots,`node`,b(v({node:t})),void 0,!0)]),"node-svg":D(({nodeSvg:t})=>[w(e.$slots,`node-svg`,b(v({nodeSvg:t})),void 0,!0)]),_:3},8,[`dataset`,`hoveredUid`,`stroke`,`strokeHovered`]),U.value.showDataLabels&&!T(z)?(S(),f(T(at),{key:1,dataset:G.value,color:I.value.color,hoveredUid:J.value},null,8,[`dataset`,`color`,`hoveredUid`])):p(``,!0),w(e.$slots,`svg`,{svg:{...W.value,drawingArea:{...T(Q)},isPrintingImg:T(V)||T(H)||T(rn),isPrintingSvg:T(an)}},void 0,!0)],14,Ge)),e.$slots.watermark?(S(),m(`div`,qe,[w(e.$slots,`watermark`,b(v({isPrinting:T(V)||T(H)||T(rn)||T(an)})),void 0,!0)])):p(``,!0),T(Xt)?(S(),m(`div`,Je,[w(e.$slots,`reset-action`,{reset:T(Yt)},()=>[h(`button`,{"data-cy-reset":``,tabindex:`0`,role:`button`,class:`vue-data-ui-refresh-button`,style:x({background:I.value.backgroundColor,cursor:R.value?`pointer`:`default`}),onClick:i[0]||=e=>T(Yt)(!0)},[g(T(Qe),{name:`refresh`,stroke:I.value.color},null,8,[`stroke`])],4)],!0)])):p(``,!0),e.$slots.source?(S(),m(`div`,Ye,[w(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),g(T(Ze),{teleportTo:F.value.teleportTo,show:U.value.showTooltip&&A.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:M.value,content:j.value,isFullscreen:X.value,isCustom:F.value.customFormat&&typeof F.value.customFormat==`function`,smooth:F.value.smooth,backdropFilter:F.value.backdropFilter,smoothForce:F.value.smoothForce,smoothSnapThreshold:F.value.smoothSnapThreshold},{"tooltip-before":D(()=>[w(e.$slots,`tooltip-before`,b(v({...K.value})),void 0,!0)]),tooltip:D(()=>[w(e.$slots,`tooltip`,b(v({...K.value})),void 0,!0)]),"tooltip-after":D(()=>[w(e.$slots,`tooltip-after`,b(v({...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`]),ut.value&&L.value.buttons.table?(S(),f(Le($.value.component),Ne({key:7},$.value.props,{ref_key:`tableUnit`,ref:gt,onClose:en}),je({content:D(()=>[(S(),f(T(et),{key:`table_${ht.value}`,colNames:Y.value.colNames,head:Y.value.head,body:Y.value.body,config:Y.value.config,title:P.value.table.useDialog?``:$.value.title,withCloseButton:!P.value.table.useDialog,isCursorPointer:R.value,onClose:en},{th:D(({th:e})=>[h(`div`,null,Re(e),1)]),td:D(({td:e})=>[Me(Re(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[P.value.table.useDialog?{name:`title`,fn:D(()=>[Me(Re($.value.title),1)]),key:`0`}:void 0,P.value.table.useDialog?{name:`actions`,fn:D(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[1]||=e=>Bt(L.value.callbacks.csv),style:x({cursor:R.value?`pointer`:`default`})},[g(T(Qe),{name:`fileCsv`,stroke:$.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):p(``,!0),w(e.$slots,`skeleton`,{},()=>[T(z)?(S(),f(de,{key:0})):p(``,!0)],!0)],46,He))}},[[`__scopeId`,`data-v-cf33e049`]]);export{Ve as n,Xe as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-C3FbHv4N.js";import{$ as a,D as ee,Jt as o,Lt as te,M as ne,X as re,Yt as ie,at as ae,i as oe,in as se,nt as ce,t as le,zt as ue}from"./lib-rPeBMZrn.js";import{n as de,t as fe}from"./BaseScanner-8NdoBs7B.js";import{n as pe,t as me}from"./useHints-C-TwxM0Y.js";import{t as he}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as ge}from"./resolveChartConfig-CIhClE5R.js";import{t as _e}from"./chartImage-DPGnEuYM.js";import{n as ve}from"./Title-BliHuXfT.js";import{t as ye}from"./useChartExport-BZts4KFb.js";import{n as be,t as xe}from"./tableIntegration-CNoJ1CIY.js";import{n as Se,r as Ce,t as we}from"./userOptionsSlots-CWtXN5Q6.js";import{t as Te}from"./usePrinter-DVf3YcG5.js";import{c as Ee}from"./canvas-lib-22VpOI4_.js";import{t as De}from"./useResponsive-CENUxfEL.js";import{t as Oe}from"./DefGrad-DKMq1REY.js";import{t as ke}from"./A11yDataTable-DWNlWXzs.js";import{t as Ae}from"./useUserOptionState-CXlFnwPv.js";import{t as je}from"./useChartAccessibility-DOMuYJfm.js";import{t as Me}from"./Legend-DM0ClX3D.js";import{t as Ne}from"./vue_ui_mood_radar-CXaBdJnv.js";import{Fragment as Pe,Teleport as Fe,computed as s,createBlock as c,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as Ie,createTextVNode as Le,createVNode as f,defineAsyncComponent as p,guardReactiveProps as m,mergeProps as Re,nextTick as ze,normalizeClass as Be,normalizeProps as Ve,normalizeStyle as h,onMounted as He,openBlock as g,ref as _,renderList as Ue,renderSlot as v,resolveDynamicComponent as We,toDisplayString as y,toRefs as Ge,unref as b,watch as Ke,withCtx as x}from"vue";var qe=/* @__PURE__ */ e({default:()=>S}),Je=[`id`],Ye=[`id`],Xe=[`id`],Ze={style:{position:`relative`}},Qe=[`xmlns`,`aria-describedby`,`viewBox`],$e=[`width`,`height`],et=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],tt=[`d`,`stroke`,`stroke-width`],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=[`transform`],ht=[`stroke`],gt=[`aria-label`,`fill`],_t=[`d`,`stroke`,`stroke-width`,`fill`],vt=[`x1`,`y1`,`x2`,`y2`,`stroke`],yt=[`cx`,`cy`,`fill`,`stroke`],bt=[`cx`,`cy`,`fill`,`stroke`],xt=[`x`,`y`,`fill`,`font-weight`],St=[`x`,`y`,`fill`],Ct={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},wt={key:5,class:`vue-data-ui-watermark`},Tt=[`id`],Et=[`onClick`,`onKeydown`],Dt={key:0},Ot={key:1},S=/*#__PURE__*/ he({__name:`vue-ui-mood-radar`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:he,emit:qe}){let S=p(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),kt=p(()=>import(`./vue-ui-accordion-E8TJfFeK.js`).then(e=>e.n)),At=p(()=>import(`./DataTable-Dof6yhO7.js`)),jt=p(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Mt=p(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Nt=p(()=>import(`./PackageVersion-DKSNC-YP.js`).then(e=>e.t)),Pt=p(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_mood_radar:Ft}=i(),C=e,It=qe,w=_(re()),T=_(null),E=_(null),Lt=_(null),Rt=_(0),zt=_(0),Bt=_(0),Vt=_(null),Ht=_(null),D=_(null),O=_(null),Ut=_(null),Wt=_(!1),Gt=_(null),Kt=_(null),k=_(null),qt=_(!1),Jt=s(()=>!!C.dataset&&Object.keys(C.dataset).length),A=_(nn()),j=s(()=>A.value.userOptions),M=s(()=>A.value.style.chart.layout.smileys),N=s(()=>A.value.style.chart.layout),P=s(()=>A.value.style.chart);pe({config:()=>A.value,dataset:()=>C.dataset,component:`VueUiMoodRadar`,rules:[me.noHint]});let F=s(()=>A.value.userOptions.useCursorPointer),Yt=s(()=>se({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:Xt,FINAL_DATASET:I}=de({...Ge(C),FINAL_CONFIG:A,prepareConfig:nn,callback:()=>{Promise.resolve().then(async()=>{await ze(),R.value.showTable=A.value.table.show})},skeletonDataset:C.config?.skeletonDataset??{1:1,2:1,3:1,4:1,5:1},skeletonConfig:se({defaultConfig:A.value,userConfig:Yt.value})});He(()=>{Wt.value=!0,Qt()});let Zt=s(()=>A.value.debug);function Qt(){if(ue(C.dataset)&&ae({componentName:`VueUiMoodRadar`,type:`dataset`,debug:Zt.value}),A.value.responsive){let e=Ee(()=>{let{width:e,height:t}=De({chart:T.value,title:P.value.title.text?Vt.value:null,legend:P.value.legend.show?Ht.value:null,noTitle:Lt.value,source:Ut.value});requestAnimationFrame(()=>{z.value.width=e,z.value.height=t-12})});D.value&&(O.value&&D.value.unobserve(O.value),D.value.disconnect()),D.value=new ResizeObserver(e),O.value=T.value.parentNode,D.value.observe(O.value)}}let{userOptionsVisible:$t,setUserOptionsVisibility:en,keepUserOptionState:tn}=Ae({config:A.value}),{svgRef:L}=je({config:P.value.title});function nn(){return ge(C.config,Ft,Ne)}Ke(()=>C.config,e=>{A.value=nn(),$t.value=!A.value.userOptions.showOnChartHover,Qt(),Rt.value+=1,zt.value+=1,Bt.value+=1,R.value.showTable=A.value.table.show},{deep:!0});let{isPrinting:rn,isImaging:an,generatePdf:on,generateImage:sn}=Te({elementId:w.value,fileName:P.value.title.text||`vue-ui-mood-radar`,options:A.value.userOptions.print}),cn=s(()=>A.value.userOptions.show&&!P.value.title.text),R=_({showTable:A.value.table.show}),z=_({height:256,width:256}),ln={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}},un=s(()=>{let e={};return hn.value.forEach(t=>{e[t.key]={x:t.x,y:t.y}}),e});function B(e){let t=ln[e],n=un.value[e]||t;return`translate(${n.x-t.x}, ${n.y-t.y})`}let dn=s(()=>ne({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 fn({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 pn=s(()=>Math.max(...Object.values(I.value).map(e=>isNaN(e)?0:e))),V=s(()=>Object.values(I.value).reduce((e,t)=>(isNaN(e)?0:e)+(isNaN(t)?0:t),0)),H=s(()=>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)),mn=s(()=>H.value.map((e,t)=>({...e,display:`${oe(N.value.dataLabel.formatter,e.value,a({p:N.value.dataLabel.prefix,v:e.value,s:N.value.dataLabel.suffix,r:N.value.dataLabel.roundingValue}))}${Xt.value?``:` (${a({v:e.proportion*100,s:`%`,r:P.value.legend.roundingPercentage})})`}`}))),hn=s(()=>([`1`,`2`,`3`,`4`,`5`].forEach(e=>{[null,void 0].includes(I.value[e])&&ae({componentName:`VueUiMoodRadar`,type:`datasetAttribute`,property:e,debug:Zt.value})}),dn.value.coordinates.map((e,t)=>{let n=fn({centerX:z.value.width/2,centerY:z.value.height/2,apexX:e.x,apexY:e.y,proportion:H.value[t].value/pn.value,key:H.value[t].key,value:H.value[t].value});return{...e,plots:n,key:H.value[t].key}}))),gn=s(()=>({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===E.value?E.value=null:(E.value=e,K(e))}function W(e){E.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){E.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=s(()=>({head:H.value.map(e=>({name:e.key,color:e.color})),body:H.value.map(e=>isNaN(e.value)?0:e.value)}));function _n(e=null){ze(()=>{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=ee(n);e?e(r):ce({csvContent:r,title:P.value.title.text||`vue-ui-mood-radar`})})}let J=s(()=>({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 vn(){return H.value}function yn(){R.value.showTable=!R.value.showTable}let Y=_(!1);function bn(e){Y.value=e}let X=_(!1);function xn(){X.value=!X.value}let Sn=_e(T,()=>P.value.title.text),Z=s(()=>xe({config:A,style:P,mutableConfig:R,dialog:Pt,accordion:kt,isFullscreen:Y,parent:T,maxWidth:800,isCursorPointer:F}));Ke(()=>R.value.showTable,e=>be(e,A,Gt));function Cn(){R.value.showTable=!1,Kt.value&&Kt.value.setTableIconState(!1)}let wn=s(()=>mn.value.map(e=>({...e,name:e.display,shape:`circle`}))),Tn=s(()=>P.value.backgroundColor),En=s(()=>P.value.legend),Dn=s(()=>P.value.title),{isCallbackImaging:On,isCallbackSvg:kn,generateSvg:An,onGenerateImage:jn}=ye({svg:L,title:Dn,legend:En,legendItems:wn,backgroundColor:Tn,getSvgCallback:()=>A.value.userOptions.callbacks.svg,generateImage:sn});async function Mn(){It(`copyAlt`,{config:A.value,dataset:H.value}),A.value.userOptions.callbacks.altCopy?await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:H.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let Q=s(()=>H.value.map(e=>String(e.key)));function Nn(){en(!0)}function Pn(){en(!1)}function Fn(e){return H.value.find(t=>String(t.key)===String(e))}function In(e,t,n){return oe(N.value.dataLabel.formatter,e,a({p:N.value.dataLabel.prefix,v:e,s:N.value.dataLabel.suffix,r:N.value.dataLabel.roundingValue}),{datapoint:n,seriesIndex:t})}function Ln(e){return a({v:V.value?e/V.value*100:0,s:`%`,r:N.value.dataLabel.roundingPercentage})}function $(e){let t=Fn(e);return t?`${e}, ${In(t.value,t.index,t)}, ${Ln(t.value)}`:`${e}`}function Rn(e){let t=Q.value[e];t&&(k.value=e,E.value=t)}function zn(){qt.value=!0}function Bn(){k.value=null,E.value=null,qt.value=!1}function Vn(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,E.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)),Rn(a)}function Hn(e,t){let n=e.key===`Enter`||e.key===` `,r=e.key===`Escape`;(n||r)&&(e.preventDefault(),e.stopPropagation(),r?(k.value=null,E.value=null):U(String(t)))}let Un=s(()=>({headers:J.value?.colNames??[],rows:H.value.map(e=>[String(e.key),In(e.value,e.index,e),Ln(e.value)])}));return he({getData:vn,getImage:Sn,generatePdf:on,generateCsv:_n,generateImage:sn,generateSvg:An,toggleTable:yn,toggleAnnotator:xn,toggleFullscreen:bn,copyAlt:Mn}),(e,i)=>(g(),u(`div`,{class:Be(`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:T,id:`${w.value}`,style:h(`font-family:${A.value.style.fontFamily};width:100%; text-align:center;background:${P.value.backgroundColor}`),onMouseenter:Nn,onMouseleave:Pn},[d(`div`,{id:`chart-instructions-${w.value}`,class:`sr-only`},[d(`p`,null,y(A.value.a11y.translations.keyboardNavigation),1)],8,Ye),Un.value?.rows?.length?(g(),c(ke,{key:0,uid:w.value,head:Un.value.headers,body:Un.value.rows,notice:A.value.a11y.translations.tableAvailable,caption:A.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):l(``,!0),j.value.buttons.annotator?(g(),c(b(jt),Re({key:1},b(n)(j.value.annotator),{svgRef:b(L),backgroundColor:P.value.backgroundColor,color:P.value.color,active:X.value,isCursorPointer:F.value,palette:j.value.annotatorPalette,onClose:xn}),Ie({_:2},[Ue(b(r),n=>({name:n,fn:x(r=>[v(e.$slots,n,Ve(m(b(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):l(``,!0),cn.value?(g(),u(`div`,{key:2,ref_key:`noTitle`,ref:Lt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):l(``,!0),P.value.title.text?(g(),u(`div`,{key:3,ref_key:`chartTitle`,ref:Vt,style:`width:100%;background:transparent`},[f(ve,{config:{title:{cy:`mood-radar-title`,...P.value.title},subtitle:{cy:`mood-radar-subtitle`,...P.value.title.subtitle}}},null,8,[`config`])],512)):l(``,!0),d(`div`,{id:`legend-top-${w.value}`},null,8,Xe),j.value.show&&Jt.value&&(b(tn)||b($t))?(g(),c(b(Mt),Re({key:4,ref_key:`userOptionsRef`,ref:Kt,backgroundColor:P.value.backgroundColor,color:P.value.color,isPrinting:b(rn),isImaging:b(an),uid:w.value,isFullscreen:Y.value,chartElement:T.value},b(Ce)(j.value,`pdf csv img svg table fullscreen altCopy annotator`),{isAnnotation:X.value,tableDialog:A.value.table.useDialog,isCursorPointer:F.value,onToggleFullscreen:bn,onGeneratePdf:b(on),onGenerateCsv:_n,onGenerateImage:b(jn),onGenerateSvg:b(An),onToggleTable:yn,onToggleAnnotator:xn,onCopyAlt:Mn,style:{visibility:b(tn)?b($t)?`visible`:`hidden`:`visible`}}),Ie({_:2},[Ue(b(Se)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:x(n=>[v(e.$slots,t,Ve(m(b(we)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`isFullscreen`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):l(``,!0),d(`div`,Ze,[(g(),u(`svg`,{ref_key:`svgRef`,ref:L,xmlns:b(le),"aria-describedby":`chart-instructions-${w.value}`,viewBox:`0 0 ${z.value.width} ${z.value.height}`,class:Be({"vue-data-ui-fullscreen--on":Y.value,"vue-data-ui-fulscreen--off":!Y.value}),style:h(`overflow:visible;background:transparent;color:${P.value.color}`),tabindex:`0`,onFocus:zn,onBlur:Bn,onKeydown:Vn},[f(b(Nt)),v(e.$slots,`svg-underlayer`,{svg:{...z.value,isPrintingImg:b(rn)||b(an)||b(On),isPrintingSvg:b(kn)}},void 0,!0),e.$slots[`chart-background`]?(g(),u(`foreignObject`,{key:0,x:0,y:0,width:z.value.width,height:z.value.height,style:{pointerEvents:`none`}},[v(e.$slots,`chart-background`,{},void 0,!0)],8,$e)):l(``,!0),d(`defs`,null,[f(Oe,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`mood_radar_gradient_${w.value}`,stops:[[`0%`,b(o)(N.value.dataPolygon.color,N.value.dataPolygon.opacity),1],[`100%`,b(o)(b(ie)(N.value.dataPolygon.color,N.value.dataPolygon.gradient.intensity/100),N.value.dataPolygon.opacity),1]]},null,8,[`id`,`stops`])]),(g(!0),u(Pe,null,Ue(dn.value.coordinates,e=>(g(),u(`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,et))),256)),d(`path`,{d:dn.value.path,fill:`none`,stroke:N.value.outerPolygon.stroke,"stroke-width":N.value.outerPolygon.strokeWidth,"stroke-linejoin":`round`,"stroke-linecap":`round`},null,8,tt),d(`g`,{transform:B(`5`)},[d(`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,rt),d(`circle`,{role:`button`,class:`vue-ui-mood-radar-trap`,cx:`128`,cy:`25`,r:`20`,"aria-label":$(`5`),fill:E.value===`5`?b(o)(M.value.colors[5],20):`transparent`,onMouseenter:i[0]||=e=>W(`5`),onMouseleave:i[1]||=e=>G(`5`),onClick:i[2]||=e=>K(`5`)},null,40,it)],8,nt),d(`g`,{transform:B(`4`)},[d(`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,ot),d(`circle`,{class:`vue-ui-mood-radar-trap`,cx:`227`,cy:`95.5`,r:`20`,"aria-label":$(`4`),fill:E.value===`4`?b(o)(M.value.colors[4],20):`transparent`,onMouseenter:i[3]||=e=>W(`4`),onMouseleave:i[4]||=e=>G(`4`),onClick:i[5]||=e=>K(`4`)},null,40,st)],8,at),d(`g`,{transform:B(`3`)},[d(`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,lt),d(`circle`,{class:`vue-ui-mood-radar-trap`,cx:`190`,cy:`213.5`,r:`20`,"aria-label":$(`3`),fill:E.value===`3`?b(o)(M.value.colors[3],20):`transparent`,onMouseenter:i[6]||=e=>W(`3`),onMouseleave:i[7]||=e=>G(`3`),onClick:i[8]||=e=>K(`3`)},null,40,ut)],8,ct),d(`g`,{transform:B(`2`)},[d(`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,ft),d(`circle`,{class:`vue-ui-mood-radar-trap`,cx:`65`,cy:`213.5`,r:`20`,"aria-label":$(`2`),fill:E.value===`2`?b(o)(M.value.colors[2],20):`transparent`,onMouseenter:i[9]||=e=>W(`2`),onMouseleave:i[10]||=e=>G(`2`),onClick:i[11]||=e=>K(`2`)},null,40,pt)],8,dt),d(`g`,{transform:B(`1`)},[d(`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,ht),d(`circle`,{class:`vue-ui-mood-radar-trap`,cx:`29`,cy:`95.5`,r:`20`,"aria-label":$(`1`),fill:E.value===`1`?b(o)(M.value.colors[1],20):`transparent`,onMouseenter:i[12]||=e=>W(`1`),onMouseleave:i[13]||=e=>G(`1`),onClick:i[14]||=e=>K(`1`)},null,40,gt)],8,mt),d(`path`,{d:b(te)(hn.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_${w.value})`:b(o)(N.value.dataPolygon.color,N.value.dataPolygon.opacity)},null,8,_t),(g(!0),u(Pe,null,Ue(hn.value.map(e=>e.plots),(e,t)=>(g(),u(`g`,{class:`vue-ui-mood-radar-trap`,style:h(`opacity:${E.value==e.key?`1`:`0`}`)},[d(`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,vt),d(`circle`,{cx:e.x,cy:e.y,fill:M.value.colors[e.key],r:`3`,stroke:P.value.backgroundColor,"stroke-width":.5},null,8,yt),d(`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,bt),d(`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`},y(b(oe)(N.value.dataLabel.formatter,e.value,b(a)({p:N.value.dataLabel.prefix,v:e.value,s:N.value.dataLabel.suffix,r:N.value.dataLabel.roundingValue}),{datapoint:e,seriesIndex:t})),9,xt),d(`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`},` (`+y(b(a)({v:e.value/V.value*100,s:`%`,r:N.value.dataLabel.roundingPercentage}))+`) `,9,St)],4))),256)),v(e.$slots,`svg`,{svg:{...z.value,isPrintingImg:b(rn)||b(an)||b(On),isPrintingSvg:b(kn)}},void 0,!0)],46,Qe)),e.$slots.hint?(g(),u(`div`,Ct,[v(e.$slots,`hint`,Ve(m({hint:A.value.a11y.translations.keyboardNavigation,isVisible:qt.value})),void 0,!0)])):l(``,!0)]),e.$slots.watermark?(g(),u(`div`,wt,[v(e.$slots,`watermark`,Ve(m({isPrinting:b(rn)||b(an)||b(On)||b(kn)})),void 0,!0)])):l(``,!0),d(`div`,{id:`legend-bottom-${w.value}`},null,8,Tt),Wt.value&&(P.value.legend.show||e.$slots.legend)?(g(),c(Fe,{key:6,to:P.value.legend.position===`top`?`#legend-top-${w.value}`:`#legend-bottom-${w.value}`},[d(`div`,{ref_key:`chartLegend`,ref:Ht},[v(e.$slots,`legend`,{legend:H.value},()=>[P.value.legend.show?(g(),c(Me,{legendSet:mn.value,config:gn.value,key:`legend_${Bt.value}`,isCursorPointer:F.value,style:{display:`flex`,"row-gap":`6px`},onFocusMarker:i[15]||=({legend:e})=>U(e.key)},{item:x(({legend:e,index:t})=>[d(`div`,{role:`button`,onClick:()=>U(e.key),style:{display:`flex`,"flex-direction":`row`,gap:`3px`,"align-items":`center`,margin:`3px 0`},onKeydown:t=>Hn(t,String(e.key))},[e.key==1?(g(),c(b(S),{key:0,strokeWidth:1,name:`moodSad`,stroke:M.value.colors[e.key]},null,8,[`stroke`])):l(``,!0),e.key==2?(g(),c(b(S),{key:1,strokeWidth:1,name:`moodFlat`,stroke:M.value.colors[e.key]},null,8,[`stroke`])):l(``,!0),e.key==3?(g(),c(b(S),{key:2,strokeWidth:1,name:`moodNeutral`,stroke:M.value.colors[e.key]},null,8,[`stroke`])):l(``,!0),e.key==4?(g(),c(b(S),{key:3,strokeWidth:1,name:`smiley`,stroke:M.value.colors[e.key]},null,8,[`stroke`])):l(``,!0),e.key==5?(g(),c(b(S),{key:4,strokeWidth:1,name:`moodHappy`,stroke:M.value.colors[e.key]},null,8,[`stroke`])):l(``,!0),b(Xt)?l(``,!0):(g(),u(`span`,{key:5,style:h({fontWeight:P.value.legend.bold?`bold`:`normal`})},y(e.display),5))],40,Et)]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):l(``,!0)],!0)],512)],8,[`to`])):l(``,!0),e.$slots.source?(g(),u(`div`,{key:7,ref_key:`source`,ref:Ut,dir:`auto`},[v(e.$slots,`source`,{},void 0,!0)],512)):l(``,!0),Jt.value&&j.value.buttons.table?(g(),c(We(Z.value.component),Re({key:8},Z.value.props,{ref_key:`tableUnit`,ref:Gt,onClose:Cn}),Ie({content:x(()=>[f(b(At),{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:Cn},{th:x(({th:e})=>[e===`__SUM__`?(g(),u(`div`,Dt,[f(b(S),{name:`sigma`,stroke:J.value.config.th.color,size:16},null,8,[`stroke`])])):(g(),u(`div`,Ot,y(e),1))]),td:x(({td:e})=>[Le(y(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`])]),_:2},[A.value.table.useDialog?{name:`title`,fn:x(()=>[Le(y(Z.value.title),1)]),key:`0`}:void 0,A.value.table.useDialog?{name:`actions`,fn:x(()=>[d(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[16]||=e=>_n(j.value.callbacks.csv),style:h({cursor:F.value?`pointer`:`default`})},[f(b(S),{name:`fileCsv`,stroke:Z.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):l(``,!0),v(e.$slots,`skeleton`,{},()=>[b(Xt)?(g(),c(fe,{key:0})):l(``,!0)],!0)],46,Je))}},[[`__scopeId`,`data-v-5db73e56`]]);export{qe as n,S as t};
@@ -1,19 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{n as t,r as n,t as r}from"./annotationSlots-OLiW25XN.js";import{t as i}from"./useConfig-C3FbHv4N.js";import{$ as a,D as o,Dt as s,Ht as c,It as l,Jt as ee,Kt as u,S as te,Ut as ne,X as re,Zt as ie,at as ae,b as oe,f as se,i as ce,in as le,it as ue,n as de,nn as fe,nt as pe,p as me,pt as he,t as ge,w as _e,zt as ve}from"./lib-rPeBMZrn.js";import{n as ye,t as be}from"./BaseScanner-8NdoBs7B.js";import{n as xe,t as Se}from"./useHints-C-TwxM0Y.js";import{t as Ce}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as we}from"./useNestedProp-DnGoh-XS.js";import{t as Te}from"./useThemeCheck-BKNRbGeC.js";import{t as Ee}from"./chartImage-DPGnEuYM.js";import{n as De}from"./Title-BliHuXfT.js";import{t as Oe}from"./useChartExport-BZts4KFb.js";import{n as ke,t as Ae}from"./tableIntegration-CNoJ1CIY.js";import{n as je,r as Me,t as Ne}from"./userOptionsSlots-CWtXN5Q6.js";import{t as Pe}from"./usePrinter-DVf3YcG5.js";import{c as Fe}from"./canvas-lib-22VpOI4_.js";import{t as Ie}from"./useResponsive-CENUxfEL.js";import{t as Le}from"./DefGrad-DKMq1REY.js";import{t as Re}from"./BaseLegendToggle-BIzyyI1h.js";import{t as ze}from"./A11yDataTable-DWNlWXzs.js";import{t as Be}from"./useUserOptionState-CXlFnwPv.js";import{t as Ve}from"./useChartAccessibility-DOMuYJfm.js";import{t as He}from"./labelUtils-CdtU-yB_.js";import{t as Ue}from"./Legend-DM0ClX3D.js";import{t as We}from"./vue_ui_nested_donuts-CRtGsJcz.js";import{Fragment as d,Teleport as Ge,computed as f,createBlock as p,createCommentVNode as m,createElementBlock as h,createElementVNode as g,createSlots as Ke,createTextVNode as qe,createVNode as Je,defineAsyncComponent as _,guardReactiveProps as v,mergeProps as Ye,nextTick as Xe,normalizeClass as Ze,normalizeProps as y,normalizeStyle as Qe,onBeforeUnmount as $e,onMounted as et,openBlock as b,ref as x,renderList as S,renderSlot as C,resolveDynamicComponent as tt,shallowRef as nt,toDisplayString as w,toRefs as rt,unref as T,vShow as it,watch as at,withCtx as E,withDirectives as ot}from"vue";var st=/* @__PURE__ */ e({default:()=>Rt}),ct=[`id`],lt=[`id`],ut=[`id`],dt={style:{position:`relative`}},ft=[`xmlns`,`aria-describedby`,`viewBox`],pt=[`width`,`height`],mt=[`id`],ht=[`id`],gt=[`id`],_t=[`flood-color`],vt=[`id`,`d`],yt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],bt=[`d`,`fill`,`stroke`,`stroke-width`],xt={key:1},St=[`d`,`fill`],Ct={key:2},wt=[`font-size`,`font-weight`,`fill`,`dy`],Tt=[`href`],Et=[`x`,`y`,`font-size`,`font-weight`,`fill`],Dt={key:3},Ot=[`filter`],kt=[`opacity`,`text-anchor`,`x`,`y`,`fill`,`font-size`,`font-weight`],At=[`opacity`,`text-anchor`,`x`,`y`,`fill`,`font-size`,`font-weight`],jt=[`d`,`fill`,`onMouseenter`,`onClick`,`onMouseleave`],Mt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Nt={key:5,class:`vue-data-ui-watermark`},Pt=[`id`],Ft={key:0,class:`vue-ui-nested-donuts-legend-title`},It=[`onClick`],Lt={style:{display:`flex`,"align-items":`center`}},Rt=/*#__PURE__*/ Ce({__name:`vue-ui-nested-donuts`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:Ce,emit:st}){let Rt=_(()=>import(`./Tooltip-C1q0Qoh7.js`)),zt=_(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Bt=_(()=>import(`./vue-ui-accordion-E8TJfFeK.js`).then(e=>e.n)),Vt=_(()=>import(`./DataTable-Dof6yhO7.js`)),Ht=_(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Ut=_(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Wt=_(()=>import(`./PackageVersion-DKSNC-YP.js`).then(e=>e.t)),Gt=_(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_nested_donuts:Kt}=i(),{isThemeValid:qt,warnInvalidTheme:Jt}=Te(),D=e,Yt=f({get(){return!!D.dataset&&D.dataset.length},set(e){return e}}),O=x(re()),Xt=x(!1),Zt=x(``),Qt=x(null),$t=x(0),k=x(null),en=x(null),tn=x(null),nn=x(null),rn=x(null),an=x(0),on=x(0),sn=x(0),cn=x(!0),A=x([]),ln=x([]),un=x(!1),dn=x(null),fn=x(null),j=x(null),pn=x({x:0,y:0}),mn=x(`pointer`),hn=x(!1),M=x(!1);function gn(e){M.value=e,$t.value+=1}let N=x(wn()),P=f(()=>N.value.style.chart.layout.labels),F=f(()=>N.value.style.chart.tooltip),I=f(()=>N.value.userOptions),L=f(()=>N.value.style.chart.layout),R=f(()=>N.value.style.chart);xe({config:()=>N.value,dataset:()=>D.dataset,component:`VueUiNestedDonuts`,rules:[Se.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=f(()=>N.value.userOptions.useCursorPointer),_n={name:``,series:[{name:``,values:[3],color:`#BABABA`},{name:``,values:[2],color:`#AAAAAA`},{name:``,values:[1],color:`#CACACA`}]},vn=f(()=>le({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:yn,FINAL_DATASET:B,manualLoading:bn}=ye({...rt(D),FINAL_CONFIG:N,prepareConfig:wn,callback:()=>{Promise.resolve().then(async()=>{await On()})},skeletonDataset:D.config?.skeletonDataset??[_n,_n],skeletonConfig:le({defaultConfig:N.value,userConfig:vn.value})}),{userOptionsVisible:xn,setUserOptionsVisibility:Sn,keepUserOptionState:Cn}=Be({config:N.value}),{svgRef:V}=Ve({config:R.value.title});function wn(){let e=we({userConfig:D.config,defaultConfig:Kt}),t={},n=e.theme;if(n){if(!qt.value(e))Jt(e),t=e;else{let r=we({userConfig:We[n]||D.config,defaultConfig:e});t={...we({userConfig:D.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:fe[n]||c}}}else t=e;return t}let Tn=ie(D.config);at(()=>D.config,(e,t)=>{let n=ie(e),r=n!==Tn;Tn=n;let i=wn();r?(yn.value||(N.value=i),xn.value=!N.value.userOptions.showOnChartHover,An(),an.value+=1,on.value+=1,sn.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):(N.value.style.chart.tooltip=i.style.chart.tooltip,W.value.showTooltip=N.value.style.chart.tooltip.show)},{deep:!0});let En=f(()=>{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 Dn(e,t=1e3,n=50){return new Promise(r=>{let i=e.length;A.value=Array(i).fill(0),ln.value=[];let a=0;e.forEach((e,o)=>{setTimeout(()=>{let n=performance.now();function s(c){let l=Math.min((c-n)/t,1),ee=e*ue(l);A.value[o]=ee,A.value=[...A.value];let te=[],ne=0;D.dataset.forEach((e,t)=>{let n=oe(e.series.reduce((e,t)=>e+oe(u(t.values).reduce((e,t)=>e+t,0)),0))-oe(A.value.slice(ne,ne+e.series.length).reduce((e,t)=>e+t,0));n>Number.MIN_VALUE&&te.push({name:`__ghost__`,arcOf:e.name,arcOfId:`${O.value}_${t}`,id:`ghost_${O.value}_${t}`,seriesIndex:-1,datasetIndex:t,color:`transparent`,value:n,fullValue:n,absoluteValues:[],ghost:!0}),ne+=e.series.length}),ln.value=te,l<1?requestAnimationFrame(s):(a+=1,a===i&&r())}requestAnimationFrame(s)},o*n)})})}async function On(){if(N.value.startAnimation?.show){let e=B.value.flatMap(e=>e.series).map(e=>u(e.values).reduce((e,t)=>e+t,0));A.value=e.map(()=>0),cn.value=!0,ln.value=B.value.map((e,t)=>{let n=e.series.reduce((e,t)=>e+u(t.values).reduce((e,t)=>e+t,0),0);return{name:`__ghost__`,arcOf:e.name,arcOfId:`${O.value}_${t}`,id:`ghost_${O.value}_${t}`,seriesIndex:-1,datasetIndex:t,color:`transparent`,value:n,fullValue:n,absoluteValues:[],ghost:!0}}),await Xe(),Dn(e,N.value.startAnimation.durationMs,N.value.startAnimation.staggerMs).then(()=>{cn.value=!1,ln.value=[]})}else cn.value=!1}et(async()=>{un.value=!0,An(),await On()});let H=nt(null),kn=nt(null),U=f(()=>N.value.debug);function An(){if(ve(D.dataset)?(ae({componentName:`VueUiNestedDonuts`,type:`dataset`,debug:U.value}),Yt.value=!1,bn.value=!0):bn.value=N.value.loading,N.value.responsive){let e=Fe(()=>{let{width:e,height:t}=Ie({chart:k.value,title:R.value.title.text?en.value:null,legend:R.value.legend.show?tn.value:null,source:nn.value,noTitle:rn.value,padding:En.value});requestAnimationFrame(()=>{G.value.width=e,G.value.height=t})});H.value&&(kn.value&&H.value.unobserve(kn.value),H.value.disconnect()),H.value=new ResizeObserver(e),kn.value=k.value.parentNode,H.value.observe(kn.value)}}$e(()=>{H.value&&(kn.value&&H.value.unobserve(kn.value),H.value.disconnect())});let{isPrinting:jn,isImaging:Mn,generatePdf:Nn,generateImage:Pn}=Pe({elementId:`nested_donuts_${O.value}`,fileName:R.value.title.text||`vue-ui-nested-donuts`,options:N.value.userOptions.print}),Fn=f(()=>N.value.userOptions.show&&!R.value.title.text),In=f(()=>_e(N.value.customPalette)),W=x({dataLabels:{show:P.value.dataLabels.show},showTable:N.value.table.show,showTooltip:F.value.show});at(N,()=>{W.value={dataLabels:{show:P.value.dataLabels.show},showTable:N.value.table.show,showTooltip:F.value.show}},{immediate:!0});let G=x({width:R.value.width,height:R.value.height}),K=st;function Ln({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 Rn({from:e,to:t,duration:n,onUpdate:r,onDone:i,easing:a=ue}){let o=performance.now();function s(c){let l=Math.min((c-o)/n,1),ee=a(l);r(e+(t-e)*ee,l),l<1?requestAnimationFrame(s):(r(t,1),i&&i())}requestAnimationFrame(s)}let q=x([]),J=f(()=>{yn.value,B.value.forEach((e,t)=>{[null,void 0].includes(e.name)&&ae({componentName:`VueUiNestedDonuts`,type:`datasetSerieAttribute`,property:`name`,index:t,debug:U.value}),[null,void 0].includes(e.series)?ae({componentName:`VueUiNestedDonuts`,type:`datasetSerieAttribute`,property:`series`,index:t,debug:U.value}):e.series.length===0?ae({componentName:`VueUiNestedDonuts`,type:`datasetAttributeEmpty`,property:`series at index ${t}`,debug:U.value}):e.series.forEach((e,t)=>{[null,void 0].includes(e.name)&&ae({componentName:`VueUiNestedDonuts`,type:`datasetSerieAttribute`,property:`name`,index:t,key:`serie`,debug:U.value}),[null,void 0].includes(e.values)&&ae({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=>u(e.values).reduce((e,t)=>e+t,0)).reduce((e,t)=>e+t,0),datasetIndex:n,id:`${O.value}_${n}`,series:t.series.map((r,i)=>{let a=u(r.values).reduce((e,t)=>e+t,0);return{name:r.name,arcOf:t.name,arcOfId:`${O.value}_${n}`,id:`${O.value}_${n}_${i}`,seriesIndex:i,datasetIndex:n,color:te(r.color)||In.value[i]||c[i%c.length],value:cn.value?A.value[e++]??0:a,absoluteValues:r.values||[]}})}))});at(()=>D.dataset,e=>{Array.isArray(e)&&e.length>0&&(bn.value=!1)},{immediate:!0});let Y=f(()=>Math.min(G.value.height,G.value.width)*(L.value.donut.strokeWidth/512)),X=f(()=>[...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 zn(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=x(X.value);at(()=>X.value,e=>Z.value=e);function Bn(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 Vn(e){let t=D.dataset.flatMap((e,t)=>e.series.map((e,n)=>({value:u(e.values).reduce((e,t)=>e+t,0),id:`${O.value}_${t}_${n}`,arcOfId:`${O.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=zn(o,o.length-1,q.value);q.value.includes(e.id)?(q.value=q.value.filter(t=>t!==e.id),N.value.serieToggleAnimation.show?Rn({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?Rn({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 Hn(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 Un(e){let t=Hn(e);t!==null&&(Array.isArray(t)?t.forEach(e=>{q.value.includes(e.id)&&Vn({id:e.id})}):q.value.includes(t.id)&&Vn({id:t.id}))}function Wn(e){let t=Hn(e);t!==null&&(Array.isArray(t)?t.forEach(e=>{q.value.includes(e.id)||Vn({id:e.id})}):q.value.includes(t.id)||Vn({id:t.id}))}let Gn=f(()=>Y.value/J.value.length*L.value.donut.spacingRatio),Kn=f(()=>Z.value.map((e,t)=>Y.value-t*Y.value/J.value.length)),qn=f(()=>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=cn.value?ln.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=l({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,Gn.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:l({series:a},G.value.width/2,G.value.height/2,r,r,1.99999,2,1,360,105.25,Gn.value)}})),Jn=f(()=>[...J.value].map((e,t)=>{let n=t*Y.value/J.value.length;return{sizeRatio:n,donut:l({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]}})),Yn=x(null),Xn=x(null),Zn=x(null),Qn=x(null);function $n({datapoint:e,seriesIndex:t}){N.value.events.datapointLeave&&N.value.events.datapointLeave({datapoint:e,seriesIndex:t}),Xt.value=!1,Yn.value=null,Qt.value=null,Xn.value=null,Zn.value=null,j.value=null,mn.value=`pointer`}function er({val:e,percentage:t,showVal:n,showPercentage:r,config:i}){return He({config:i,val:e,percentage:t,showVal:n,showPercentage:r})}function tr({datapoint:e,_relativeIndex:t,seriesIndex:n,triggerMode:r=`pointer`}){N.value.events.datapointEnter&&N.value.events.datapointEnter({datapoint:e,seriesIndex:n}),mn.value=r,j.value=n,Yn.value=e.arcOfId,Xn.value=e.id,Zn.value=n,Qt.value=e.id,Qn.value={datapoint:e,seriesIndex:n,series:Z.value,config:N.value};let i=F.value.customFormat;if(s(i)&&he(()=>i({seriesIndex:n,datapoint:e,series:Z.value,config:N.value})))Zt.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,o)=>{if(!i)return``;t+=`
4
- <div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${o<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
- ${er({config:R.value.tooltip,showVal:F.value.showValue,showPercentage:F.value.showPercentage,val:ce(L.value.labels.dataLabels.formatter,e.value,a({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:a({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>${ce(P.value.dataLabels.formatter,e.value,a({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>(${a({v:e.proportion*100,s:`%`,r:F.value.roundingPercentage})})</span></div>`:t+=`<b>${a({v:e.proportion*100,s:`%`,r:F.value.roundingPercentage})}</b></div>`);Zt.value=`<div style="font-size:${F.value.fontSize}px">${t}</div>`}Xt.value=!0}function nr(e){return e.proportion*100>P.value.dataLabels.hideUnderValue}function rr(e,t){if(!N.value.useBlurOnHover)return``;if(F.value.showAllItemsAtIndex&&q.value.length===0)return[null,void 0].includes(Zn.value)||Zn.value===t?``:`url(#blur_${O.value})`;if(!F.value.showAllItemsAtIndex||q.value.length)return[null,void 0].includes(Xn.value)||Xn.value===e.id?``:`url(#blur_${O.value})`}let ir=f(()=>J.value.map((e,t)=>{let n=e.series.filter(e=>!q.value.includes(e.id)),r=cn.value?n.map(e=>{let n=B.value[t].series.findIndex(t=>t.name===e.name);return u(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=u(B.value[t].series[n].values).reduce((e,t)=>e+t,0),o=cn.value?i:e.value,s=er({val:ce(P.value.dataLabels.formatter,o,a({p:P.value.dataLabels.prefix,v:o,s:P.value.dataLabels.suffix,r:R.value.legend.roundingValue}),{datapoint:e,seriesIndex:n}),percentage:isNaN(o/r)||q.value.includes(e.id)?`-`:a({v:o/r*100,s:`%`,r:R.value.legend.roundingPercentage}),showVal:R.value.legend.showValue,showPercentage:R.value.legend.showPercentage,config:R.value.legend}),c=`${e.name}${R.value.legend.showPercentage||R.value.legend.showValue?`: `:``}${s}`;return{name:e.name,color:e.color,value:o,display:c,svgDisplay:`${e.arcOf?`${e.arcOf} - `:``}${c}`,shape:`circle`,arcOf:e.arcOf,id:e.id,seriesIndex:n,datasetIndex:t,total:r,opacity:q.value.includes(e.id)?.5:1,segregate:()=>Vn(e),isSegregated:q.value.includes(e.id)}})})),ar=f(()=>({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=f(()=>({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 or(e=null){Xe(()=>{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=o(n);e?e(r):pe({csvContent:r,title:R.value.title.text||`vue-ui-nested-donuts`})})}let sr=f(()=>{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=a({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)?`-`:a({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 cr(){return J.value}function lr(){W.value.showTable=!W.value.showTable}function ur(){W.value.dataLabels.show=!W.value.dataLabels.show}function dr(){W.value.showTooltip=!W.value.showTooltip}let fr=x(!1);function pr(){fr.value=!fr.value}let mr=Ee(k,()=>R.value.title.text),hr=x(null);function gr(){if(!hr.value)return;let{x:e,y:t,width:n,height:r}=hr.value.getBBox();V.value&&V.value.setAttribute(`viewBox`,`${e} ${t} ${n+Math.min(0,e)} ${r+Math.min(0,t)}`)}let _r=f(()=>Ae({config:N,style:R,mutableConfig:W,dialog:Gt,accordion:Bt,isFullscreen:M,parent:k,maxWidth:800,isCursorPointer:z}));at(()=>W.value.showTable,e=>ke(e,N,dn));function vr(){W.value.showTable=!1,fn.value&&fn.value.setTableIconState(!1)}let yr=f(()=>R.value.backgroundColor),br=f(()=>R.value.legend),xr=f(()=>R.value.title),Sr=f(()=>ir.value.flat().map(e=>({...e,name:e.svgDisplay}))),{isCallbackImaging:Cr,isCallbackSvg:wr,generateSvg:Tr,onGenerateImage:Er}=Oe({svg:V,title:xr,legend:br,legendItems:Sr,backgroundColor:yr,getSvgCallback:()=>N.value.userOptions.callbacks.svg,generateImage:Pn});async function Dr(){K(`copyAlt`,{config:N.value,dataset:Z.value}),N.value.userOptions.callbacks.altCopy?await Promise.resolve(N.value.userOptions.callbacks.altCopy({config:N.value,dataset:Z.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let $=f(()=>qn.value.flatMap(e=>e.donut.filter(e=>!e.ghost)));function Or(){j.value=null,hn.value=!0}function kr(){j.value=null,mn.value=`pointer`,Xt.value=!1,Yn.value=null,Qt.value=null,Xn.value=null,Zn.value=null,hn.value=!1}function Ar(e){if(!V.value||fr.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,mn.value=`pointer`,Xt.value=!1,Yn.value=null,Qt.value=null,Xn.value=null,Zn.value=null;return}if(r){if(j.value===null)return;let e=$.value[j.value];if(!e)return;Ln({datapoint:e,index:j.value,seriesIndex:e.seriesIndex});return}let a=j.value,o=Zn.value,s=a!==null&&a>=0&&a<$.value.length,c=o!==null&&o>=0&&o<$.value.length;s?n?(a+=1,a>=$.value.length&&(a=0)):t&&(--a,a<0&&(a=$.value.length-1)):c?(a=n?o+1:o-1,a>=$.value.length&&(a=0),a<0&&(a=$.value.length-1)):a=n?0:$.value.length-1;let l=$.value[a];l&&(j.value=a,jr(),tr({datapoint:l,relativeIndex:a,seriesIndex:l.seriesIndex,show:!0,triggerMode:`keyboard`}))}function jr(){if(!V.value)return;let e=V.value.getBoundingClientRect();pn.value={x:e.left+e.width/2,y:e.top+e.height/2}}let Mr=f(()=>({headers:sr.value?.colNames??[],rows:sr.value?.a11yBody??[]}));return Ce({autoSize:gr,getData:cr,getImage:mr,generatePdf:Nn,generateCsv:or,generateImage:Pn,generateSvg:Tr,hideSeries:Wn,showSeries:Un,toggleTable:lr,toggleLabels:ur,toggleTooltip:dr,toggleAnnotator:pr,toggleFullscreen:gn,copyAlt:Dr}),(e,i)=>(b(),h(`div`,{ref_key:`nestedDonutsChart`,ref:k,class:Ze(`vue-data-ui-component vue-ui-nested-donuts ${M.value?`vue-data-ui-wrapper-fullscreen`:``} ${N.value.useCssAnimation?``:`vue-ui-dna`}`),style:Qe(`font-family:${N.value.style.fontFamily};width:100%; text-align:center;background:${R.value.backgroundColor}`),id:`nested_donuts_${O.value}`,onMouseenter:i[2]||=()=>T(Sn)(!0),onMouseleave:i[3]||=()=>T(Sn)(!1)},[g(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[g(`p`,null,w(N.value.a11y.translations.keyboardNavigation),1)],8,lt),Mr.value?.rows?.length?(b(),p(ze,{key:0,uid:O.value,head:Mr.value.headers,body:Mr.value.rows,notice:N.value.a11y.translations.tableAvailable,caption:N.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):m(``,!0),I.value.buttons.annotator?(b(),p(T(Ut),Ye({key:1},T(n)(I.value.annotator),{svgRef:T(V),backgroundColor:R.value.backgroundColor,color:R.value.color,active:fr.value,isCursorPointer:z.value,palette:I.value.annotatorPalette,onClose:pr}),Ke({_:2},[S(T(r),n=>({name:n,fn:E(r=>[C(e.$slots,n,y(v(T(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):m(``,!0),Fn.value?(b(),h(`div`,{key:2,ref_key:`noTitle`,ref:rn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):m(``,!0),R.value.title.text?(b(),h(`div`,{key:3,ref_key:`chartTitle`,ref:en},[(b(),p(De,{key:`title_${an.value}`,config:{title:{cy:`donut-div-title`,...R.value.title},subtitle:{cy:`donut-div-subtitle`,...R.value.title.subtitle}}},null,8,[`config`]))],512)):m(``,!0),g(`div`,{id:`legend-top-${O.value}`},null,8,ut),I.value.show&&Yt.value&&(T(Cn)||T(xn))?(b(),p(T(Ht),Ye({ref_key:`userOptionsRef`,ref:fn,key:`user_option_${$t.value}`,backgroundColor:R.value.backgroundColor,color:R.value.color,isPrinting:T(jn),isImaging:T(Mn),uid:O.value,hasTooltip:I.value.buttons.tooltip&&F.value.show,isFullscreen:M.value,isTooltip:W.value.showTooltip,chartElement:k.value},T(Me)(I.value,`pdf csv img svg labels table fullscreen altCopy annotator`),{isAnnotation:fr.value,tableDialog:N.value.table.useDialog,isCursorPointer:z.value,onToggleFullscreen:gn,onGeneratePdf:T(Nn),onGenerateCsv:or,onGenerateImage:T(Er),onGenerateSvg:T(Tr),onToggleTable:lr,onToggleLabels:ur,onToggleTooltip:dr,onToggleAnnotator:pr,onCopyAlt:Dr,style:{visibility:T(Cn)?T(xn)?`visible`:`hidden`:`visible`}}),Ke({_:2},[S(T(je)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:E(n=>[C(e.$slots,t,y(v(T(Ne)(t,n))),void 0,!0)])}))]),1040,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasTooltip`,`isFullscreen`,`isTooltip`,`chartElement`,`isAnnotation`,`tableDialog`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):m(``,!0),g(`div`,dt,[(b(),h(`svg`,{ref_key:`svgRef`,ref:V,xmlns:T(ge),"aria-describedby":`chart-instructions-${O.value}`,class:Ze({"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:Qe(`max-width:100%; overflow: visible; background:transparent;color:${R.value.color};${En.value.css}`),tabindex:`0`,onFocus:Or,onBlur:kr,onKeydown:Ar},[g(`g`,{ref_key:`G`,ref:hr,class:`vue-data-ui-g`},[Je(T(Wt)),C(e.$slots,`svg-underlayer`,{svg:{...G.value,isPrintingImg:T(jn)||T(Mn)||T(Cr),isPrintingSvg:T(wr)}},void 0,!0),e.$slots[`chart-background`]?(b(),h(`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`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,pt)):m(``,!0),g(`defs`,null,[(b(!0),h(d,null,S(Jn.value,(e,t)=>(b(),p(Le,{t:`radial`,id:`radial_${O.value}_${t}`,key:`radial_${O.value}_${t}`,stops:[[`0%`,`#FFFFFF`,0],[`${(1-Gn.value/Kn.value[t])*100}%`,T(ee)(`#FFFFFF`,0),0],[`${(1-Gn.value/Kn.value[t]/2)*100}%`,`#FFFFFF`,R.value.gradientIntensity/100],[`100%`,`#FFFFFF`,0]]},null,8,[`id`,`stops`]))),128))]),g(`defs`,null,[g(`filter`,{id:`blur_${O.value}`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[g(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:2,id:`blur_std_${O.value}`},null,8,ht),i[4]||=g(`feColorMatrix`,{type:`saturate`,values:`0`},null,-1)],8,mt),g(`filter`,{id:`shadow_${O.value}`,"color-interpolation-filters":`sRGB`},[g(`feDropShadow`,{dx:`0`,dy:`0`,stdDeviation:`10`,"flood-opacity":`0.5`,"flood-color":L.value.donut.shadowColor},null,8,_t)],8,gt)]),g(`defs`,null,[(b(!0),h(d,null,S(qn.value,(e,t)=>(b(),h(`path`,{key:`path-full-${t}`,id:`path-full-${t}-${O.value}`,d:e.fullCirclePath,fill:`none`},null,8,vt))),128))]),(b(!0),h(d,null,S(qn.value,(e,t)=>(b(),h(`g`,null,[e.hasData?(b(!0),h(d,{key:0},S(e.donut.filter(e=>!e.ghost),(e,t)=>(b(),h(`g`,null,[g(`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:rr(e,t)},null,8,yt)]))),256)):(b(!0),h(d,{key:1},S(e.skeleton,(e,t)=>(b(),h(`g`,null,[g(`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,bt)]))),256))]))),256)),R.value.useGradient?(b(),h(`g`,xt,[(b(!0),h(d,null,S(Jn.value,(e,t)=>(b(),h(`g`,null,[g(`path`,{d:e.donut.arcSlice,fill:`url(#radial_${O.value}_${t})`,stroke:`transparent`,"stroke-width":`0`},null,8,St)]))),256))])):m(``,!0),P.value.dataLabels.showDonutName?(b(),h(`g`,Ct,[P.value.dataLabels.curvedDonutName?(b(!0),h(d,{key:0},S(qn.value,(e,t)=>(b(),h(`g`,null,[(b(!0),h(d,null,S(e.donut,(n,r)=>(b(),h(`g`,null,[r===0&&G.value.width&&G.value.height?(b(),h(`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},[g(`textPath`,{href:`#path-full-${t}-${O.value}`,startOffset:`50%`,"text-anchor":`middle`,method:`align`,spacing:`auto`},w(L.value.labels.dataLabels.donutNameAbbreviation?T(de)({source:e.name,length:N.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize}):e.name),9,Tt)],8,wt)):m(``,!0)]))),256))]))),256)):(b(!0),h(d,{key:1},S(qn.value,(e,t)=>(b(),h(`g`,null,[(b(!0),h(d,null,S(e.donut,(t,n)=>(b(),h(`g`,null,[n===0&&G.value.width&&G.value.height?(b(),h(`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},w(L.value.labels.dataLabels.donutNameAbbreviation?T(de)({source:e.name,length:N.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize}):e.name),9,Et)):m(``,!0)]))),256))]))),256))])):m(``,!0),P.value.dataLabels.show?(b(),h(`g`,Dt,[(b(!0),h(d,null,S(qn.value,(e,t)=>(b(),h(`g`,null,[(b(!0),h(d,null,S(e.donut.filter(e=>!e.ghost),(e,n)=>(b(),h(`g`,{filter:rr(e,n)},[ot(g(`text`,{opacity:+!!nr(e),"text-anchor":T(se)(e,!0).anchor,x:T(se)(e,!1,L.value.labels.dataLabels.offsetX).x||0,y:T(me)(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`},w(T(ne)(T(a)({v:e.proportion*100,s:`%`,r:R.value.layout.labels.dataLabels.roundingPercentage}),L.value.labels.dataLabels.usePercentageParens?`(`:``,L.value.labels.dataLabels.usePercentageParens?`)`:``)),9,kt),[[it,W.value.dataLabels.show&&P.value.dataLabels.showPercentage]]),ot(g(`text`,{opacity:+!!nr(e),"text-anchor":T(se)(e,!0).anchor,x:T(se)(e,!1,L.value.labels.dataLabels.offsetX).x||0,y:T(me)(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`},w(T(ne)(T(ce)(L.value.labels.dataLabels.formatter,e.value,T(a)({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,At),[[it,W.value.dataLabels.show&&P.value.dataLabels.showValue]])],8,Ot))),256))]))),256))])):m(``,!0),(b(!0),h(d,null,S(qn.value,(e,t)=>(b(),h(`g`,null,[(b(!0),h(d,null,S(e.donut,(e,t)=>(b(),h(`g`,null,[g(`path`,{d:e.arcSlice,fill:Qt.value===e.id?L.value.donut.selectedColor:`transparent`,onMouseenter:t=>tr({datapoint:e,relativeIndex:$.value.findIndex(t=>t.id===e.id),seriesIndex:e.seriesIndex}),onClick:n=>Ln({datapoint:e,index:t,seriesIndex:e.seriesIndex}),onMouseleave:t=>$n({datapoint:e,seriesIndex:e.seriesIndex})},null,40,jt)]))),256))]))),256)),C(e.$slots,`svg`,{svg:{...G.value,isPrintingImg:T(jn)||T(Mn)||T(Cr),isPrintingSvg:T(wr)}},void 0,!0)],512)],46,ft)),e.$slots.hint?(b(),h(`div`,Mt,[C(e.$slots,`hint`,y(v({hint:N.value.a11y.translations.keyboardNavigation,isVisible:hn.value})),void 0,!0)])):m(``,!0)]),e.$slots.watermark?(b(),h(`div`,Nt,[C(e.$slots,`watermark`,y(v({isPrinting:T(jn)||T(Mn)||T(Cr)||T(wr)})),void 0,!0)])):m(``,!0),Je(T(Rt),{teleportTo:F.value.teleportTo,show:W.value.showTooltip&&Xt.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:k.value,content:Zt.value,isFullscreen:M.value,isCustom:T(s)(F.value.customFormat),smooth:F.value.smooth,backdropFilter:F.value.backdropFilter,smoothForce:F.value.smoothForce,smoothSnapThreshold:F.value.smoothSnapThreshold,isA11yMode:mn.value===`keyboard`,a11yPosition:pn.value},{"tooltip-before":E(()=>[C(e.$slots,`tooltip-before`,y(v({...Qn.value})),void 0,!0)]),tooltip:E(()=>[C(e.$slots,`tooltip`,y(v({...Qn.value})),void 0,!0)]),"tooltip-after":E(()=>[C(e.$slots,`tooltip-after`,y(v({...Qn.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`]),g(`div`,{id:`legend-bottom-${O.value}`},null,8,Pt),un.value&&(R.value.legend.show||e.$slots.legend)?(b(),p(Ge,{key:6,to:R.value.legend.position===`top`?`#legend-top-${O.value}`:`#legend-bottom-${O.value}`},[R.value.legend.show?(b(),h(`div`,{key:0,ref_key:`chartLegend`,ref:tn,class:Ze({"vue-ui-nested-donuts-legend":ir.value.length>1})},[C(e.$slots,`legend`,{legend:ir.value},()=>[(b(!0),h(d,null,S(ir.value,(e,t)=>(b(),p(Ue,{key:`legend_${t}_${sn.value}`,legendSet:e,config:ar.value,isCursorPointer:z.value,onClickMarker:i[0]||=({legend:e})=>Vn(e)},{legendTitle:E(({titleSet:e})=>[e[0]&&e[0].arcOf?(b(),h(`div`,Ft,w(e[0].arcOf),1)):m(``,!0)]),item:E(({legend:e,index:t})=>[g(`div`,{onClick:t=>Vn(e),style:Qe(`opacity:${q.value.includes(e.id)?.5:1}`)},w(e.display),13,It)]),legendToggle:E(()=>[e.length>2&&R.value.legend.selectAllToggle.show&&!T(yn)?(b(),p(Re,{key:`toggle-${t}`,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=>Bn(e)},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`,`onToggle`])):m(``,!0)]),_:2},1032,[`legendSet`,`config`,`isCursorPointer`]))),128))],!0)],2)):m(``,!0)],8,[`to`])):m(``,!0),e.$slots.source?(b(),h(`div`,{key:7,ref_key:`source`,ref:nn,dir:`auto`},[C(e.$slots,`source`,{},void 0,!0)],512)):m(``,!0),Yt.value&&I.value.buttons.table?(b(),p(tt(_r.value.component),Ye({key:8},_r.value.props,{ref_key:`tableUnit`,ref:dn,onClose:vr}),Ke({content:E(()=>[(b(),p(T(Vt),{key:`table_${on.value}`,colNames:sr.value.colNames,head:sr.value.head,body:sr.value.body,config:sr.value.config,title:N.value.table.useDialog?``:_r.value.title,withCloseButton:!N.value.table.useDialog,isCursorPointer:z.value,onClose:vr},{th:E(({th:e})=>[g(`div`,Lt,w(e),1)]),td:E(({td:e})=>[qe(w(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[N.value.table.useDialog?{name:`title`,fn:E(()=>[qe(w(_r.value.title),1)]),key:`0`}:void 0,N.value.table.useDialog?{name:`actions`,fn:E(()=>[g(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[1]||=e=>or(I.value.callbacks.csv),style:Qe({cursor:z.value?`pointer`:`default`})},[Je(T(zt),{name:`fileCsv`,stroke:_r.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):m(``,!0),C(e.$slots,`skeleton`,{},()=>[T(yn)?(b(),p(be,{key:0})):m(``,!0)],!0)],46,ct))}},[[`__scopeId`,`data-v-901fe770`]]);export{st as n,Rt as t};