vue-data-ui 3.28.9 → 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 (349) 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-D6_O7PmZ.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-D-31a1zL.js +1 -0
  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-BbY81Ao2.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-0vvvimYP.js → useObjectBindings-D789Dz63.js} +1 -1
  95. package/dist/{userOptionsSlots-DYuo-E5m.js → userOptionsSlots-CWtXN5Q6.js} +1 -1
  96. package/dist/utils.js +1 -1
  97. package/dist/vue-data-ui-0NKIVNqt.js +1 -0
  98. package/dist/vue-data-ui.js +1 -1
  99. package/dist/vue-ui-3d-bar-Cs-_W1Av.js +19 -0
  100. package/dist/{vue-ui-accordion-DFxSW8ET.js → vue-ui-accordion-DxGxf-Rm.js} +1 -1
  101. package/dist/vue-ui-age-pyramid-cWWVFoCj.js +1 -0
  102. package/dist/vue-ui-annotator-D31LD4-s.js +331 -0
  103. package/dist/vue-ui-bullet-CMQzoLKs.js +34 -0
  104. package/dist/vue-ui-bump-SSu5eVbF.js +8 -0
  105. package/dist/vue-ui-candlestick-Cm9jS3n7.js +22 -0
  106. package/dist/vue-ui-carousel-table-D-F54W90.js +1 -0
  107. package/dist/vue-ui-chestnut-DNe1s8TT.js +1 -0
  108. package/dist/vue-ui-chord-DGzpBpuI.js +21 -0
  109. package/dist/vue-ui-circle-pack--iJQtXys.js +13 -0
  110. package/dist/vue-ui-cursor-B7DJRSGD.js +1 -0
  111. package/dist/vue-ui-dag-tsM65e_V.js +9 -0
  112. package/dist/vue-ui-dashboard-CC7IhQZu.js +1 -0
  113. package/dist/{vue-ui-digits-p2met3a2.js → vue-ui-digits-hv2QeC-H.js} +2 -2
  114. package/dist/vue-ui-donut-B9WXaiPn.js +47 -0
  115. package/dist/vue-ui-donut-evolution-Wz_-FYab.js +2 -0
  116. package/dist/vue-ui-donut-iyVVIGoJ.js +22 -0
  117. package/dist/vue-ui-dumbbell-p3Q2LkBV.js +9 -0
  118. package/dist/vue-ui-flow-BCH8YU8H.js +3 -0
  119. package/dist/vue-ui-funnel-DdrBD9oX.js +1 -0
  120. package/dist/vue-ui-galaxy-DYKEOEL-.js +1 -0
  121. package/dist/vue-ui-gauge-CPgvR_YB.js +1 -0
  122. package/dist/vue-ui-geo-DhJ3Wr_5.js +1 -0
  123. package/dist/vue-ui-gizmo-BTy4Vr1e.js +1 -0
  124. package/dist/{vue-ui-graph-BqnyGn9p.js → vue-ui-graph-C4kfE4G8.js} +3 -3
  125. package/dist/vue-ui-heatmap-lti43RhW.js +1 -0
  126. package/dist/vue-ui-hill-3GVfKQmi.js +1 -0
  127. package/dist/vue-ui-history-plot-DMTPygZA.js +2 -0
  128. package/dist/vue-ui-horizontal-bar-DwWo0CvX.js +4 -0
  129. package/dist/{vue-ui-kpi-D1Ps7D_O.js → vue-ui-kpi-BTMK37Ix.js} +1 -1
  130. package/dist/{vue-ui-label-W0oz08pp.js → vue-ui-label-CBrMoFDG.js} +2 -2
  131. package/dist/{vue-ui-mini-loader-OLYDdN3T.js → vue-ui-mini-loader-PsWZLMLF.js} +1 -1
  132. package/dist/vue-ui-molecule-rbDnRA7c.js +1 -0
  133. package/dist/vue-ui-mood-radar-8s1jnO3P.js +1 -0
  134. package/dist/vue-ui-nested-donuts-8bY4HvC-.js +19 -0
  135. package/dist/vue-ui-onion-CgLNDFrZ.js +5 -0
  136. package/dist/vue-ui-parallel-coordinate-plot-ms14eLus.js +9 -0
  137. package/dist/vue-ui-quadrant-6GgQZ8fW.js +2 -0
  138. package/dist/vue-ui-quick-chart-CzRbFXIS.js +16 -0
  139. package/dist/vue-ui-radar-BxsD2JBj.js +1 -0
  140. package/dist/vue-ui-rating-D0QvpD3V.js +1 -0
  141. package/dist/vue-ui-relation-circle-BFPAlaWQ.js +1 -0
  142. package/dist/vue-ui-ridgeline-G2m7eFWe.js +2 -0
  143. package/dist/vue-ui-rings-l_BLWL48.js +1 -0
  144. package/dist/vue-ui-scatter-C4hXe3DM.js +9 -0
  145. package/dist/{vue-ui-skeleton-98OnGJ2N.js → vue-ui-skeleton-BLyh-ESb.js} +3 -3
  146. package/dist/{vue-ui-smiley-Cht1imV-.js → vue-ui-smiley-C00q-teB.js} +1 -1
  147. package/dist/{vue-ui-spark-trend-C4uYyXEy.js → vue-ui-spark-trend-D0hz9kNt.js} +1 -1
  148. package/dist/vue-ui-sparkbar-Dweyr8h-.js +1 -0
  149. package/dist/{vue-ui-sparkgauge-dBZzMqn5.js → vue-ui-sparkgauge-DQfCXKFj.js} +1 -1
  150. package/dist/vue-ui-sparkhistogram-DOfAu86W.js +1 -0
  151. package/dist/vue-ui-sparkline-DuX09S8A.js +1 -0
  152. package/dist/vue-ui-sparkstackbar-vXOpiyrI.js +1 -0
  153. package/dist/vue-ui-stackbar-DsrwNY0p.js +29 -0
  154. package/dist/vue-ui-stackline-e7EYZet7.js +39 -0
  155. package/dist/vue-ui-strip-plot-2DxzeUXU.js +2 -0
  156. package/dist/vue-ui-table-B344jLaG.js +14 -0
  157. package/dist/vue-ui-table-heatmap-BwoRcqFD.js +1 -0
  158. package/dist/vue-ui-table-sparkline-itq8yRCe.js +1 -0
  159. package/dist/vue-ui-thermometer-BSRjS7l3.js +1 -0
  160. package/dist/vue-ui-timer-DM-urc2D.js +64 -0
  161. package/dist/vue-ui-tiremarks-CbIOAO3F.js +1 -0
  162. package/dist/vue-ui-treemap-Cgal4H5O.js +1 -0
  163. package/dist/vue-ui-waffle-BZFI7JLd.js +1 -0
  164. package/dist/vue-ui-wheel-DdKm_Vd8.js +1 -0
  165. package/dist/vue-ui-word-cloud-D40vUb5e.js +4 -0
  166. package/dist/vue-ui-world-BseI3A0C.js +19 -0
  167. package/dist/vue-ui-xy-Bl-DUFcf.js +27 -0
  168. package/dist/vue-ui-xy-DNVd3FPA.js +31 -0
  169. package/dist/vue-ui-xy-canvas-CRSisgSA.js +9 -0
  170. package/dist/vue_ui_3d_bar-Dm8zmL8w.js +1 -0
  171. package/dist/vue_ui_age_pyramid-DXJeenVU.js +1 -0
  172. package/dist/vue_ui_bullet-Biewiy1l.js +1 -0
  173. package/dist/vue_ui_bump-DZoGcET0.js +1 -0
  174. package/dist/vue_ui_candlestick-DpPpEElM.js +1 -0
  175. package/dist/vue_ui_chestnut-BKcntsvv.js +1 -0
  176. package/dist/vue_ui_chord-Crjq1pgV.js +1 -0
  177. package/dist/vue_ui_circle_pack-DarCZyF2.js +1 -0
  178. package/dist/vue_ui_dag-B-4OxeQQ.js +1 -0
  179. package/dist/vue_ui_donut-B2W2nyAS.js +1 -0
  180. package/dist/vue_ui_donut_evolution-BvIyBtun.js +1 -0
  181. package/dist/vue_ui_dumbbell-DyyFLbhQ.js +1 -0
  182. package/dist/vue_ui_flow-aeVlnSsc.js +1 -0
  183. package/dist/vue_ui_funnel-CWrEr790.js +1 -0
  184. package/dist/vue_ui_galaxy-DvaSrGxT.js +1 -0
  185. package/dist/vue_ui_gauge-Brc1-auP.js +1 -0
  186. package/dist/vue_ui_geo-COGanKF8.js +1 -0
  187. package/dist/vue_ui_graph-31AYnh4c.js +1 -0
  188. package/dist/vue_ui_heatmap-Q8YMKNq2.js +1 -0
  189. package/dist/vue_ui_hill-Dbv_VVlr.js +1 -0
  190. package/dist/vue_ui_history_plot-C0kFJh-f.js +1 -0
  191. package/dist/vue_ui_horizontal_bar-uuJ0_9O6.js +1 -0
  192. package/dist/vue_ui_label-D3BzxTFQ.js +1 -0
  193. package/dist/vue_ui_molecule-VokyVu8q.js +1 -0
  194. package/dist/vue_ui_mood_radar-i6r1Gp6v.js +1 -0
  195. package/dist/vue_ui_nested_donuts-BAb9o0Ro.js +1 -0
  196. package/dist/vue_ui_onion-BMjwCChN.js +1 -0
  197. package/dist/vue_ui_parallel_coordinate_plot-Wb2Xmpjs.js +1 -0
  198. package/dist/vue_ui_quadrant-DbLNBD92.js +1 -0
  199. package/dist/vue_ui_quick_chart-KljadV9E.js +1 -0
  200. package/dist/vue_ui_radar-Pd3xOzjc.js +1 -0
  201. package/dist/vue_ui_relation_circle-BLo4XQFQ.js +1 -0
  202. package/dist/vue_ui_ridgeline-BIaWjw_v.js +1 -0
  203. package/dist/vue_ui_rings-C0puwNW1.js +1 -0
  204. package/dist/vue_ui_scatter-4as114Wa.js +1 -0
  205. package/dist/vue_ui_spark_trend-BgPQfeCz.js +1 -0
  206. package/dist/vue_ui_sparkbar-CvcZ5nwT.js +1 -0
  207. package/dist/vue_ui_sparkgauge-D3xirz2w.js +1 -0
  208. package/dist/vue_ui_sparkhistogram-E6G1761_.js +1 -0
  209. package/dist/vue_ui_sparkline-DKZdnbap.js +1 -0
  210. package/dist/vue_ui_sparkstackbar-DZX34uPS.js +1 -0
  211. package/dist/vue_ui_stackbar-BrAzeA3Y.js +1 -0
  212. package/dist/vue_ui_stackline-B6ylXHBJ.js +1 -0
  213. package/dist/vue_ui_strip_plot-uxKGttVC.js +1 -0
  214. package/dist/vue_ui_table_heatmap-DVMDsaVJ.js +1 -0
  215. package/dist/vue_ui_table_sparkline-BQO5A9u8.js +1 -0
  216. package/dist/vue_ui_thermometer-BAFdvXZW.js +1 -0
  217. package/dist/vue_ui_tiremarks-LwElhY5p.js +1 -0
  218. package/dist/vue_ui_treemap-JB0DfAmd.js +1 -0
  219. package/dist/vue_ui_waffle-BVf3Wcda.js +1 -0
  220. package/dist/vue_ui_wheel-bdYAONK7.js +1 -0
  221. package/dist/vue_ui_word_cloud-Dn2Ffjxb.js +1 -0
  222. package/dist/vue_ui_xy-BfaXjpvS.js +1 -0
  223. package/dist/vue_ui_xy_canvas-cQVme5sy.js +1 -0
  224. package/package.json +9 -9
  225. package/dist/BaseDraggableDialog-BK7dj9O6.js +0 -1
  226. package/dist/BaseZoomControls-JSk9zW3D.js +0 -1
  227. package/dist/ColorPicker-CwYfNvwH.js +0 -1
  228. package/dist/PenAndPaper-DoNTA-SV.js +0 -1
  229. package/dist/SlicerPreview-ChKbdZSU.js +0 -1
  230. package/dist/XyAnalysisOptions-djGOJdKc.js +0 -1
  231. package/dist/package-BEq7yyhf.js +0 -1
  232. package/dist/resolveChartConfig-CIhClE5R.js +0 -1
  233. package/dist/useConfig-By3Vb5kz.js +0 -1
  234. package/dist/vue-data-ui-BwiGr37w.js +0 -1
  235. package/dist/vue-ui-3d-bar-C2igj6OX.js +0 -19
  236. package/dist/vue-ui-age-pyramid-DOG_ZOgO.js +0 -1
  237. package/dist/vue-ui-annotator-BnR2XnsL.js +0 -331
  238. package/dist/vue-ui-bullet-HUKP90GR.js +0 -34
  239. package/dist/vue-ui-bump-BuHuxEzm.js +0 -8
  240. package/dist/vue-ui-candlestick-CZkyowA5.js +0 -22
  241. package/dist/vue-ui-carousel-table-B73USTMi.js +0 -1
  242. package/dist/vue-ui-chestnut-VdMHjsWk.js +0 -1
  243. package/dist/vue-ui-chord-DfWjMAuo.js +0 -21
  244. package/dist/vue-ui-circle-pack-ByV3SOkF.js +0 -13
  245. package/dist/vue-ui-cursor-D3E3f7Lc.js +0 -1
  246. package/dist/vue-ui-dag-DlllVyCV.js +0 -9
  247. package/dist/vue-ui-dashboard-C9aGsEAi.js +0 -1
  248. package/dist/vue-ui-donut-BlQXnf7O.js +0 -47
  249. package/dist/vue-ui-donut-CZbBq7bs.js +0 -22
  250. package/dist/vue-ui-donut-evolution-Csq1sqhK.js +0 -2
  251. package/dist/vue-ui-dumbbell-ChLfyyGq.js +0 -9
  252. package/dist/vue-ui-flow-DfEHi_Cq.js +0 -3
  253. package/dist/vue-ui-funnel-QCG-rmsx.js +0 -1
  254. package/dist/vue-ui-galaxy-DFTeXUse.js +0 -1
  255. package/dist/vue-ui-gauge-XTx--A-H.js +0 -1
  256. package/dist/vue-ui-geo-BXB5xFcV.js +0 -1
  257. package/dist/vue-ui-gizmo-COJHVo7O.js +0 -1
  258. package/dist/vue-ui-heatmap-CPq3bcnS.js +0 -1
  259. package/dist/vue-ui-hill-DKm3PjHT.js +0 -1
  260. package/dist/vue-ui-history-plot-B5OPsHZ1.js +0 -2
  261. package/dist/vue-ui-horizontal-bar-C8SymyhN.js +0 -4
  262. package/dist/vue-ui-molecule-f-GNAQ0p.js +0 -1
  263. package/dist/vue-ui-mood-radar-kp-jOb4S.js +0 -1
  264. package/dist/vue-ui-nested-donuts-DCCSKIGa.js +0 -19
  265. package/dist/vue-ui-onion-KqzGj1z_.js +0 -5
  266. package/dist/vue-ui-parallel-coordinate-plot-dn_41Wv5.js +0 -9
  267. package/dist/vue-ui-quadrant-CP8n4v5B.js +0 -2
  268. package/dist/vue-ui-quick-chart-D8PbGpSw.js +0 -17
  269. package/dist/vue-ui-radar-ybR3N44-.js +0 -1
  270. package/dist/vue-ui-rating-B9HeTCLa.js +0 -1
  271. package/dist/vue-ui-relation-circle-B0PwfFpT.js +0 -1
  272. package/dist/vue-ui-ridgeline-BnslUzA-.js +0 -2
  273. package/dist/vue-ui-rings-B-cOW0Dw.js +0 -1
  274. package/dist/vue-ui-scatter-BX5cTC01.js +0 -9
  275. package/dist/vue-ui-sparkbar-BcZyqPB9.js +0 -1
  276. package/dist/vue-ui-sparkhistogram-DcbAY6vr.js +0 -1
  277. package/dist/vue-ui-sparkline-BizzsAR5.js +0 -1
  278. package/dist/vue-ui-sparkstackbar-xlg048YB.js +0 -1
  279. package/dist/vue-ui-stackbar-2AX-m3Pb.js +0 -29
  280. package/dist/vue-ui-stackline-GKaZJh8y.js +0 -39
  281. package/dist/vue-ui-strip-plot-BhxIrd67.js +0 -2
  282. package/dist/vue-ui-table-D9FJBxrk.js +0 -14
  283. package/dist/vue-ui-table-heatmap-SGJGI5Wq.js +0 -1
  284. package/dist/vue-ui-table-sparkline-B6ynMUGE.js +0 -1
  285. package/dist/vue-ui-thermometer-SE_c51TO.js +0 -1
  286. package/dist/vue-ui-timer-B1JNZk6j.js +0 -64
  287. package/dist/vue-ui-tiremarks-Cr8EG4T5.js +0 -1
  288. package/dist/vue-ui-treemap-DKJVe7v7.js +0 -1
  289. package/dist/vue-ui-waffle-DSq3l2sE.js +0 -1
  290. package/dist/vue-ui-wheel-CcYOzS05.js +0 -1
  291. package/dist/vue-ui-word-cloud-gogYiwIU.js +0 -4
  292. package/dist/vue-ui-world-C2zGhq_U.js +0 -19
  293. package/dist/vue-ui-xy-B2lrTGG4.js +0 -31
  294. package/dist/vue-ui-xy-CpS-ASnd.js +0 -27
  295. package/dist/vue-ui-xy-canvas-CXBsRU35.js +0 -9
  296. package/dist/vue_ui_3d_bar-DmAve5Ri.js +0 -1
  297. package/dist/vue_ui_age_pyramid-CL0Ef8Ov.js +0 -1
  298. package/dist/vue_ui_bullet-CwVYkpjd.js +0 -1
  299. package/dist/vue_ui_bump-KJL9GYr4.js +0 -1
  300. package/dist/vue_ui_candlestick-DKvha_Ab.js +0 -1
  301. package/dist/vue_ui_chestnut-BxxivKN7.js +0 -1
  302. package/dist/vue_ui_chord-Fq6VBRT1.js +0 -1
  303. package/dist/vue_ui_circle_pack-CfXkXi7v.js +0 -1
  304. package/dist/vue_ui_dag-1b_dLSym.js +0 -1
  305. package/dist/vue_ui_donut-T5PeOqvf.js +0 -1
  306. package/dist/vue_ui_donut_evolution-CVoh3twl.js +0 -1
  307. package/dist/vue_ui_dumbbell-BMcxK0N3.js +0 -1
  308. package/dist/vue_ui_flow-kvV56Es9.js +0 -1
  309. package/dist/vue_ui_funnel-CaEV5hG7.js +0 -1
  310. package/dist/vue_ui_galaxy-B94QInxc.js +0 -1
  311. package/dist/vue_ui_gauge-BJhb6yqE.js +0 -1
  312. package/dist/vue_ui_geo-DL1SMQHp.js +0 -1
  313. package/dist/vue_ui_graph-B1ACwQj7.js +0 -1
  314. package/dist/vue_ui_heatmap-kh5NMmwf.js +0 -1
  315. package/dist/vue_ui_hill-DQi4pQCG.js +0 -1
  316. package/dist/vue_ui_history_plot-soyqUW4Y.js +0 -1
  317. package/dist/vue_ui_horizontal_bar-C4ulIxeT.js +0 -1
  318. package/dist/vue_ui_label-dtPqyFsj.js +0 -1
  319. package/dist/vue_ui_molecule-Bw1UW1Na.js +0 -1
  320. package/dist/vue_ui_mood_radar-CXaBdJnv.js +0 -1
  321. package/dist/vue_ui_nested_donuts-CRtGsJcz.js +0 -1
  322. package/dist/vue_ui_onion-C9BedU_-.js +0 -1
  323. package/dist/vue_ui_parallel_coordinate_plot-Cs_xXAG5.js +0 -1
  324. package/dist/vue_ui_quadrant-BUv-SqzP.js +0 -1
  325. package/dist/vue_ui_quick_chart-BRfcRW6Z.js +0 -1
  326. package/dist/vue_ui_radar-68iK9Fam.js +0 -1
  327. package/dist/vue_ui_relation_circle-Dkv-cSB6.js +0 -1
  328. package/dist/vue_ui_ridgeline-Di26JtQu.js +0 -1
  329. package/dist/vue_ui_rings-BcDDXHpQ.js +0 -1
  330. package/dist/vue_ui_scatter-C50uFYQL.js +0 -1
  331. package/dist/vue_ui_spark_trend-BOM3zo64.js +0 -1
  332. package/dist/vue_ui_sparkbar-Bpx7QrFq.js +0 -1
  333. package/dist/vue_ui_sparkgauge-D2Hk6bvS.js +0 -1
  334. package/dist/vue_ui_sparkhistogram-ChwOkoMb.js +0 -1
  335. package/dist/vue_ui_sparkline-CvL_e9L8.js +0 -1
  336. package/dist/vue_ui_sparkstackbar-Chtog7hC.js +0 -1
  337. package/dist/vue_ui_stackbar-BkBIi_bL.js +0 -1
  338. package/dist/vue_ui_stackline-D7b63K84.js +0 -1
  339. package/dist/vue_ui_strip_plot-CwMowrhT.js +0 -1
  340. package/dist/vue_ui_table_heatmap-vfeY6r97.js +0 -1
  341. package/dist/vue_ui_table_sparkline-Dlfbza49.js +0 -1
  342. package/dist/vue_ui_thermometer-CRijq6H6.js +0 -1
  343. package/dist/vue_ui_tiremarks-8HFfABNF.js +0 -1
  344. package/dist/vue_ui_treemap-Bv4Rdl5_.js +0 -1
  345. package/dist/vue_ui_waffle-BbBLSluB.js +0 -1
  346. package/dist/vue_ui_wheel-C-479bvJ.js +0 -1
  347. package/dist/vue_ui_word_cloud-DBiJtSyL.js +0 -1
  348. package/dist/vue_ui_xy-CJBM9F6W.js +0 -1
  349. package/dist/vue_ui_xy_canvas-CT-FN9rU.js +0 -1
@@ -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-By3Vb5kz.js";import{$ as a,$t as o,At as s,D as c,Ht as ee,It as te,J as ne,Jt as re,Kt as ie,S as ae,X as oe,_ as se,at as ce,f as le,h as ue,i as de,in as fe,nn as pe,nt as me,p as he,t as ge,tt as _e,w as ve,y as ye,yt as be,zt as xe}from"./lib-rPeBMZrn.js";import{n as Se,t as Ce}from"./BaseScanner-8NdoBs7B.js";import{n as we,t as Te}from"./useHints-C-TwxM0Y.js";import{t as Ee}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as De}from"./useNestedProp-DnGoh-XS.js";import{t as Oe}from"./useThemeCheck-BKNRbGeC.js";import{t as ke}from"./chartImage-DPGnEuYM.js";import{n as Ae}from"./Title-BliHuXfT.js";import{t as je}from"./useChartExport-BZts4KFb.js";import{n as Me,t as Ne}from"./tableIntegration-CNoJ1CIY.js";import{n as Pe,t as Fe}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ie}from"./useTimeLabels-Das5O74F.js";import{t as Le}from"./usePrinter-DVf3YcG5.js";import{t as Re}from"./useTransitions-ChGGrtrv.js";import{t as ze}from"./useStableElementSize-CegFbRlF.js";import{t as Be}from"./useSvgLabelLayout-42Kats14.js";import{t as Ve}from"./useTimeLabelCollider-BTybMUFi.js";import{t as He}from"./useResponsive-CENUxfEL.js";import{t as Ue}from"./DefGrad-DKMq1REY.js";import{t as We}from"./SlicerPreview-ChKbdZSU.js";import{t as Ge}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Ke}from"./A11yDataTable-DWNlWXzs.js";import{t as qe}from"./useUserOptionState-CXlFnwPv.js";import{t as Je}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ye}from"./annotationViewport-X8fvs7pz.js";import{t as Xe}from"./Legend-DM0ClX3D.js";import{t as Ze}from"./vue_ui_donut_evolution-CVoh3twl.js";import{Fragment as l,Teleport as Qe,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as $e,createTextVNode as et,createVNode as tt,defineAsyncComponent as h,guardReactiveProps as nt,mergeProps as rt,nextTick as it,normalizeClass as g,normalizeProps as at,normalizeStyle as ot,onBeforeUnmount as st,onMounted as ct,openBlock as _,ref as v,renderList as y,renderSlot as b,resolveDynamicComponent as lt,shallowRef as ut,toDisplayString as x,toRefs as dt,unref as S,watch as ft,watchEffect as pt,withCtx as C}from"vue";var mt=/* @__PURE__ */ e({default:()=>rn}),ht=[`id`],gt=[`id`],_t=[`id`],vt={style:{position:`relative`}},yt=[`xmlns`,`aria-describedby`,`viewBox`],bt=[`x`,`y`,`width`,`height`],xt={key:1},St=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Ct=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],wt={key:0},Tt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],Et=[`font-size`,`fill`,`transform`],Dt=[`x`,`y`,`font-size`,`fill`],Ot=[`d`,`stroke`,`stroke-width`],kt=[`transform`,`font-size`,`text-anchor`,`fill`,`font-weight`],At={key:0},jt=[`text-anchor`,`font-size`,`fill`,`transform`],Mt=[`text-anchor`,`font-size`,`fill`,`transform`,`innerHTML`],Nt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],Pt={key:1},Ft=[`cx`,`cy`,`r`,`fill`],It={key:0},Lt={key:0},Rt=[`d`,`stroke`],zt=[`text-anchor`,`x`,`y`,`fill`],Bt=[`cx`,`cy`,`r`,`fill`],Vt={key:0},Ht=[`cx`,`cy`,`fill`],Ut={key:1},Wt=[`d`,`fill`,`stroke`],Gt={key:2},Kt=[`d`,`fill`,`stroke`],qt=[`x`,`y`,`font-size`,`fill`],Jt=[`x`,`y`,`width`,`height`,`fill`],Yt=[`x`,`y`,`width`,`height`,`onMouseenter`,`onMouseleave`,`onClick`],Xt=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`,`stroke`,`stroke-opacity`,`stroke-width`,`stroke-dasharray`],Zt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Qt={key:5,class:`vue-data-ui-watermark`},$t=[`id`],en=[`onClick`],tn={key:0},nn={key:1},rn=/*#__PURE__*/ Ee({__name:`vue-ui-donut-evolution`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},zoomState:{type:Object,default:null}},emits:[`selectLegend`,`zoomStart`,`zoomEnd`,`zoomReset`,`update:zoomState`,`copyAlt`],setup(e,{expose:Ee,emit:mt}){let rn=h(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),an=h(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),on=h(()=>import(`./DataTable-Dof6yhO7.js`)),sn=h(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),cn=h(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),ln=h(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),un=h(()=>import(`./vue-ui-donut-BlQXnf7O.js`).then(e=>e.n)),dn=h(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_donut_evolution:fn}=i(),{isThemeValid:pn,warnInvalidTheme:mn}=Oe(),w=e,T=v(oe()),E=v([]),D=v(null),O=v(null),hn=v(!1),k=v(null),A=v(null),gn=v(null),_n=v(0),vn=v(0),yn=v(0),bn=v(0),xn=v(0),Sn=v(null),Cn=v(null),wn=v(null),Tn=v(null),En=v(!1),Dn=v(null),On=v(null),kn=ut(null),An=v(0),jn=v(0),Mn=v(!1);function Nn(){kn.value=A.value?.parentNode??null}function Pn(){return new Promise(e=>{requestAnimationFrame(()=>{requestAnimationFrame(e)})})}async function Fn(){let e=++jn.value;await it(),await Pn(),await Pn(),e===jn.value&&(An.value+=1)}function In(){Mn.value||(Mn.value=!0,it(()=>{Mn.value=!1,Nn(),Fn()}))}let Ln=ze({elementRef:kn,minimumWidth:2,minimumHeight:2,stableFramesRequired:2,once:!1,onSizeAccepted:()=>{Fn()}}),Rn=v(null),zn=v(null),Bn=v(null),Vn=v(null),Hn=v(null),Un=v(!1),j=ut(null),Wn=ut(null),Gn=v(null),M=v(null),Kn=v(!1),N=mt,qn=u(()=>!!w.dataset&&w.dataset.length),Jn=v(!1),Yn=0;ct(()=>{En.value=!0,Nn(),Ln.start(),Zn(),Fn()});let Xn=u(()=>P.value.debug);function Zn(){xe(w.dataset)?(ce({componentName:`VueUiDonutEvolution`,type:`dataset`,debug:Xn.value}),rr.value=!0):w.dataset.length&&w.dataset.forEach((e,t)=>{be({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{ce({componentName:`VueUiDonutEvolution`,type:`datasetSerieAttribute`,property:e,index:t,debug:Xn.value}),rr.value=!0})}),xe(w.dataset)||(rr.value=P.value.loading),setTimeout(()=>{Un.value=!0},10),Sr(),P.value.responsive&&(j.value&&(Wn.value&&j.value.unobserve(Wn.value),j.value.disconnect()),j.value=new ResizeObserver(()=>{Un.value=!1;let{width:e,height:t}=He({chart:A.value,title:P.value.style.chart.title.text?Rn.value:null,legend:P.value.style.chart.legend.show?zn.value:null,slicer:P.value.style.chart.zoom.show&&ir.value>1?Hn.value:null,source:Bn.value});cancelAnimationFrame(Yn),Yn=requestAnimationFrame(()=>{z.value.width=e,z.value.height=t-12,Jn.value=!0,In(),clearTimeout(Gn.value),Gn.value=setTimeout(()=>{Un.value=!0},10)})}),Wn.value=A.value.parentNode,j.value.observe(Wn.value)),In()}let P=v(Ar()),F=u(()=>I.value.grid),I=u(()=>P.value.style.chart.layout),Qn=u(()=>P.value.style.chart.dialog),L=u(()=>P.value.style.chart);we({config:()=>P.value,dataset:()=>w.dataset,component:`VueUiDonutEvolution`,rules:[Te.emptyArray,{test:e=>e.length===1,message:[`👀 There is only a single series in your dataset. Consider:`,``,`▶️ Using VueUiXy instead, for a regular line chart.`]},{test:e=>e.length>6,message:[`👀 The number of series is > 6, which makes donuts hard to read. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]},{test:e=>e.some(e=>e.values.length>24),message:[`👀 Some series have a number of data points > 24, which can make the chart and donuts hard to read. Consider:`,``,`▶️ Using larger time scales, or aggregated values.`,``,`▶️ Filtering the time range by adding date intputs in your UI.`,``,`▶️ Using VueUiXy to show longer series in a more comfortable display.`]}]});let{transitionEnabled:$n}=Re({config:()=>P.value.transitions,dataset:()=>w.dataset}),R=u(()=>P.value.userOptions.useCursorPointer),er=u(()=>fe({defaultConfig:{useCssAnimation:!1,table:{show:!1},userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{dataLabels:{show:!1},grid:{stroke:`#6A6A6A`,axis:{yLabel:``,xLabel:``},yAxis:{scaleMin:null,scaleMax:null,autoScale:!1,dataLabels:{show:!1}},xAxis:{dataLabels:{show:!1}}},line:{stroke:`#CACACA60`}},legend:{backgroundColor:`transparent`,showValue:!1,showPercentage:!1},zoom:{show:!1,startIndex:null,endIndex:null}}}},userConfig:P.value.skeletonConfig??{}})),{loading:tr,FINAL_DATASET:nr,manualLoading:rr}=Se({...dt(w),FINAL_CONFIG:P,prepareConfig:Ar,callback:()=>{Promise.resolve().then(async()=>{await Sr()})},skeletonDataset:w.config?.skeletonDataset??[{name:``,values:[1,2,3,5,8,13],color:`#AAAAAA`},{name:``,values:[1,2,3,5,8,13],color:`#BABABA`},{name:``,values:[1,2,3,5,8,13],color:`#CACACA`}],skeletonConfig:fe({defaultConfig:P.value,userConfig:er.value})}),z=v({width:I.value.width,height:I.value.height}),ir=u(()=>Math.max(...nr.value.map(e=>e.values.length))),B=v({start:0,end:ir.value}),V=v(!1),ar=v(!1),or=v(null),H=v(null),U=v(null),sr=v(!1),cr=v({time:0,x:0,y:0,pointerType:null}),lr=u(()=>P.value.style.chart.zoom?.dragToZoom),W=u(()=>lr.value.show&&qn.value&&dr.value&&Y.value>1&&!tr.value),ur=v(!1),dr=v(!1),fr=v(!1),pr=null,mr={};function hr(e,t=B.value){if(!e||typeof e!=`object`)return null;let n=e.start!==void 0&&e.start!==null,r=e.end!==void 0&&e.end!==null;if(!n&&!r)return null;let i=Number(n?e.start:t.start),a=Number(r?e.end:t.end);return!Number.isFinite(i)||!Number.isFinite(a)?null:{start:i,end:a}}function gr(e){let t=hr(e);t&&N(`update:zoomState`,t)}function _r(){pr&&=(cancelAnimationFrame(pr),null),mr={}}function vr(e,t=B.value.start){let n=Y.value,r=Number(t);return e>n?n:e<0||e<=r?Math.min(r+1,n):e}function yr(){let e=Y.value;if(!Number.isFinite(e)||e<=0){B.value={start:0,end:0};return}let t=Math.max(0,Math.min(Number(B.value.start)||0,e-1)),n=Math.max(t+1,Math.min(Number(B.value.end)||e,e));(!Number.isFinite(t)||!Number.isFinite(n)||n<=t)&&(t=0,n=e),B.value={start:t,end:n},Vn.value&&Vn.value.setRangeValues(t,n)}function br(e){let t=hr(e);if(!t)return null;let{start:n,end:r}=t;return(n!==Number(B.value.start)||r!==Number(B.value.end))&&(_r(),B.value={start:n,end:r},yr(),In()),{start:Number(B.value.start),end:Number(B.value.end)}}function xr(e){let t=br(e);return t?(gr(t),t):null}async function Sr(e=!0){if(!ur.value){ur.value=!0;try{await it(),await it();let{startIndex:t,endIndex:n}=L.value.zoom,r=Y.value;if(!Number.isFinite(r)||r<=0){B.value={start:0,end:0},dr.value=!0;return}let i=t==null?0:Number(t),a=n==null?r:vr(Number(n)+1,i);fr.value=!0,B.value={start:i,end:a},yr(),dr.value=!0,e&&w.zoomState&&br(w.zoomState)}finally{queueMicrotask(()=>{fr.value=!1}),ur.value=!1,In()}}}async function Cr({force:e=!1,publish:t=!1}={}){await Sr(!e),t&&(gr({start:Number(B.value.start),end:Number(B.value.end)}),N(`zoomReset`))}ft([()=>w.zoomState,dr],([e,t])=>{t&&e&&br(e)},{deep:!0,immediate:!0});function wr(e){mr={...mr,...e},pr&&cancelAnimationFrame(pr),pr=requestAnimationFrame(()=>{let e={...B.value,...mr};mr={},pr=null,B.value=e,yr(),In(),gr({start:Number(B.value.start),end:Number(B.value.end)})})}function Tr(e){if(ur.value||fr.value)return;let t=Number(e);Number.isFinite(t)&&(N(`zoomStart`,{index:t,isZoom:t!==0}),t!==B.value.start&&wr({start:t}))}function Er(e){if(ur.value||fr.value)return;let t=mr.start===void 0?B.value.start:mr.start,n=vr(Number(e),t);Number.isFinite(n)&&(N(`zoomEnd`,{index:n,isZoom:n!==Y.value}),(n!==B.value.end||mr.start!==void 0)&&wr({end:n}))}let{userOptionsVisible:Dr,setUserOptionsVisibility:Or,keepUserOptionState:kr}=qe({config:P.value}),{svgRef:G}=Je({config:L.value.title});function Ar(){let e=De({userConfig:w.config,defaultConfig:fn}),t={},n=e.theme;if(n){if(!pn.value(e))mn(e),t=e;else{let r=De({userConfig:Ze[n]||w.config,defaultConfig:e});t={...De({userConfig:w.config,defaultConfig:r}),customPalette:e.customPalette?e.customPalette:pe[n]||ee}}}else t=e;return t}ft(()=>w.config,e=>{tr.value||(P.value=Ar()),Dr.value=!P.value.userOptions.showOnChartHover,Zn(),yn.value+=1,bn.value+=1,xn.value+=1,Lr.value.showTable=P.value.table.show},{deep:!0}),ft(()=>w.dataset,e=>{Array.isArray(e)&&e.length>0&&(rr.value=!1),Cr()},{deep:!0});let{isPrinting:jr,isImaging:Mr,generatePdf:Nr,generateImage:Pr}=Le({elementId:T.value,fileName:L.value.title.text||`vue-ui-donut-evolution`,options:P.value.userOptions.print}),Fr=u(()=>P.value.userOptions.show&&!L.value.title.text),Ir=u(()=>ve(P.value.customPalette)),Lr=v({showTable:P.value.table.show});ft(P,()=>{Lr.value={showTable:P.value.table.show}},{immediate:!0});let Rr=u(()=>({top:I.value.padding.top,right:I.value.padding.right,bottom:I.value.padding.bottom,left:I.value.padding.left})),K=u(()=>F.value.yAxis.position===`right`),{metrics:zr,ready:Br,settling:Vr,update:Hr}=Be({svgRef:G,canMeasure:()=>(!P.value.responsive||Jn.value)&&(!F.value.xAxis.dataLabels.show||Kr.value),initialMetrics:{scaleLabelsWidth:0,yAxisLabelWidth:0,xAxisLabelHeight:0,timeLabelsHeight:0},measure:e=>({scaleLabelsWidth:e(Sn.value).textWidth,yAxisLabelWidth:e(Tn.value).rotatedWidth,xAxisLabelHeight:e(wn.value).height,timeLabelsHeight:e(Cn.value).height})});function Ur(){let e=zr.value.scaleLabelsWidth,t=Tn.value?zr.value.yAxisLabelWidth+F.value.axis.yLabelOffsetX+F.value.axis.fontSize:0,n=e+t+5;return{left:K.value?0:n,right:K.value?n:0,scaleLabelsWidth:e,yAxisLabelWidth:t,crosshair:5}}st(()=>{cancelAnimationFrame(Yn),Ln.stop(),clearTimeout(Gn.value),_r(),yi(),ai(),j.value&&(Wn.value&&j.value.unobserve(Wn.value),j.value.disconnect(),j.value=null,Wn.value=null)});let Wr=u(()=>zr.value.xAxisLabelHeight+zr.value.timeLabelsHeight+F.value.axis.fontSize+F.value.xAxis.dataLabels.offsetY),q=u(()=>{let e=Ur(),t=I.value.dataLabels.fontSize*3,n=z.value.width,r=z.value.height,i=Rr.value.left+e.left,a=n-Rr.value.right-e.right,o=n-i-Rr.value.right-e.right,s=r-Rr.value.top-Rr.value.bottom-t-Wr.value,c=Rr.value.top+t;return{top:c,left:i,right:a,bottom:r-Rr.value.bottom-Wr.value,absoluteHeight:r,absoluteWidth:n,centerX:i+Math.max(10,o)/2,centerY:c+Math.max(10,s)/2,width:Math.max(10,o),height:Math.max(10,s),scaleLabelsWidth:e.scaleLabelsWidth,yAxisLabelWidth:e.yAxisLabelWidth,crosshair:e.crosshair}}),J=u(()=>(Xn.value&&nr.value.forEach((e,t)=>{[null,void 0].includes(e.name)&&ce({componentName:`VueUiDonutEvolution`,type:`datasetSerieAttribute`,property:`name`,index:t}),[null,void 0].includes(e.values)&&ce({componentName:`VueUiDonutEvolution`,type:`datasetSerieAttribute`,property:`values`,index:t})}),nr.value.map((e,t)=>({...e,values:ie(e.values),color:ae(e.color)||Ir.value[t]||ee[t]||ee[t%ee.length],length:(e.values||[]).length,uid:oe()})))),Gr=u(()=>J.value.filter(e=>!E.value.includes(e.uid)).map(e=>({...e,values:e.values.filter((e,t)=>t>=B.value.start&&t<=B.value.end)}))),Y=u(()=>Math.max(...J.value.map(e=>e.length))),X=v([]),Kr=v(!1),qr=0;pt(()=>{let e=++qr;(async()=>{let t=await Ie({values:F.value.xAxis.dataLabels.values,maxDatapoints:Y.value,formatter:F.value.xAxis.dataLabels.datetimeFormatter,start:B.value.start,end:B.value.end});e===qr&&(X.value=t,Kr.value=!0)})()});let Z=u(()=>q.value.width/(B.value.end-B.value.start)),Jr=u(()=>{let e=[];for(let t=0;t<B.value.end-B.value.start;t+=1){let n=Gr.value.map(e=>e.values[t]??null),r=n.filter(e=>[void 0,null].includes(e)).length===n.length,i=n.reduce((e,t)=>e+t,0),a=n.map(e=>e/i),o=q.value.left+Z.value*t+Z.value/2;e.push({index:t,percentages:a,subtotal:r||i<0?null:i,values:n,x:o})}return e}),Yr=u(()=>{let e=Math.max(...Jr.value.map(e=>e.subtotal).filter(e=>s(e)))??1,t=Math.min(...Jr.value.map(e=>e.subtotal).filter(e=>s(e)))??0,n=Math.max(F.value.yAxis.scaleMax??0,e),r;return r=F.value.yAxis.scaleMin==null?0:Math.min(t,F.value.yAxis.scaleMin),F.value.yAxis.autoScale&&(r=t,n=e),r===n&&(r=n/2,n*=1.5),{max:n,min:r}}),Q=u(()=>{let e=Jr.value.length===1?Yr.value.max*2:Yr.value.max;return se(Yr.value.min,e,F.value.yAxis.dataLabels.steps)});ft(()=>Q.value.ticks.join(`|`),()=>{In()},{flush:`post`});function Xr(e){return(e-Q.value.min)/(Q.value.max-Q.value.min)}let Zr=u(()=>Q.value.ticks.map(e=>({y:q.value.bottom-q.value.height*Xr(e),value:e}))),$=u(()=>{let e=Jr.value,t=Math.max(...e.map(e=>e.subtotal));return e.length===1&&t*2,e.map((t,n)=>{let r=Math.min(q.value.width/24,Z.value/2*.7),i=r>q.value.width/16?q.value.width/16:r,a=D.value===t.index?q.value.width/16:i,o=e.length>4?r*2:r*2>Z.value/2*.7?Z.value/2*.7:r*2,s=q.value.bottom-q.value.height*Xr(t.subtotal),c=Gr.value.map(e=>({color:e.color,name:e.name,value:e.values[n]??0})).toSorted((e,t)=>t.value-e.value);return{...t,y:s,radius:i,activeRadius:a,hoverRadius:o,donut:te({series:c},t.x,s,i,i,1.99999,2,1,360,105.25,i/2),donutHover:te({series:c},t.x,s,o,o,1.99999,2,1,360,105.25,o/2),donutFocus:te({series:c},q.value.centerX,q.value.centerY,q.value.height/3.6,q.value.height/3.6,1.99999,2,1,360,105.25,q.value.height/6)}})});function Qr(e,t,n){return de(I.value.dataLabels.formatter,e,a({p:I.value.dataLabels.prefix,v:e,s:I.value.dataLabels.suffix,r:I.value.dataLabels.rounding}),{datapoint:t,index:n})}function $r(e,t){return isNaN(e.value/o(t,`value`))?0:(e.value/o(t,`value`)*100).toFixed(0)+`%`}function ei(e){let t=G.value;if(!t)return null;if(t.createSVGPoint&&t.getScreenCTM){let n=t.createSVGPoint();n.x=e.clientX,n.y=e.clientY;let r=t.getScreenCTM();if(r){let e=n.matrixTransform(r.inverse());return{x:e.x,y:e.y}}}let n=t.getBoundingClientRect(),r=t.viewBox?.baseVal||{x:0,y:0,width:n.width,height:n.height},i=Math.min(n.width/r.width,n.height/r.height);if(!Number.isFinite(i)||i<=0)return null;let a=r.width*i,o=r.height*i,s=(n.width-a)/2,c=(n.height-o)/2;return{x:(e.clientX-n.left-s)/i+r.x,y:(e.clientY-n.top-c)/i+r.y}}let ti=u(()=>!V.value||or.value==null||H.value==null?null:{x:Math.min(or.value,H.value),y:q.value.top,width:Math.abs(H.value-or.value),height:q.value.height}),ni=u(()=>dr.value?Number(B.value.start)!==0||Number(B.value.end)!==Number(Y.value):!1);function ri(e){return Math.min(Math.max(e,q.value.left),q.value.right)}function ii(){D.value=null,O.value=null,M.value=null}function ai(e){let t=e?.pointerId==null?U.value:e.pointerId;t!=null&&G.value?.hasPointerCapture?.(t)&&G.value.releasePointerCapture(t),V.value=!1,or.value=null,H.value=null,U.value=null}function oi(){sr.value=!0,setTimeout(()=>{sr.value=!1},0)}function si(e){sr.value&&(sr.value=!1,e.preventDefault(),e.stopPropagation())}function ci(e){if(!W.value||!ni.value||!e)return!1;let t=Date.now(),n=e.pointerType||`mouse`,r=cr.value,i=n===`touch`?450:350,a=n===`touch`?28:10,o=Math.hypot(e.clientX-r.x,e.clientY-r.y);return r.time>0&&r.pointerType===n&&t-r.time<=i&&o<=a?(cr.value={time:0,x:0,y:0,pointerType:null},oi(),yi(),ai(e),Hi(),Cr({force:!0,publish:!0}),!0):(cr.value={time:t,x:e.clientX,y:e.clientY,pointerType:n},!1)}function li(e){let t=Number(B.value.end)-Number(B.value.start);if(t<=0||!Number.isFinite(Z.value)||Z.value<=0)return null;let n=Math.floor((ri(e)-q.value.left)/Z.value);return Math.max(0,Math.min(t-1,n))}function ui(e,t){let n=li(e),r=li(t);if(n==null||r==null)return null;let i=Math.min(n,r),a=Math.max(n,r);return a<=i?null:{start:Number(B.value.start)+i,end:Number(B.value.start)+a+1}}function di(e){let t=xr(e);return t?(N(`zoomStart`,{index:t.start,isZoom:t.start!==0}),N(`zoomEnd`,{index:t.end,isZoom:t.end!==Y.value}),t):null}function fi(e){if(!W.value||Ii.value||e.button!==void 0&&e.button!==0||U.value!=null&&e.pointerId!==U.value)return;let t=ei(e);if(!t||t.x<q.value.left||t.x>q.value.right||t.y<q.value.top||t.y>q.value.bottom||Number(B.value.end)-Number(B.value.start)<=1)return;ar.value=!0,G.value?.focus?.({preventScroll:!0}),yi(),ii();let n=ri(t.x);U.value=e.pointerId,V.value=!0,or.value=n,H.value=n}function pi(e){if(!W.value||!V.value||U.value!=null&&e.pointerId!==U.value)return;let t=ei(e);t&&(H.value=ri(t.x),ii(),or.value!=null&&Math.abs(H.value-or.value)>=2&&!G.value?.hasPointerCapture?.(e.pointerId)&&G.value?.setPointerCapture?.(e.pointerId))}function mi(e){if(!W.value||!V.value||U.value!=null&&e.pointerId!==U.value)return;let t=ei(e);t&&(H.value=ri(t.x));let n=or.value,r=H.value;if((n==null||r==null?0:Math.abs(r-n))<Math.max(4,q.value.width*.01)){if(ci(e))return;ai(e);return}let i=ui(Math.min(n,r),Math.max(n,r));i?(ai(e),di(i)&&(cr.value={time:0,x:0,y:0,pointerType:null},ii(),oi())):ai(e)}function hi(e){V.value||(D.value=null,O.value=null,M.value=null,P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:e,seriesIndex:e.seriesIndex+B.value.start}))}function gi(e){V.value||(P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:e,seriesIndex:e.index+B.value.start}),D.value=e.index,O.value=e,M.value=e.index)}let _i=v(null),vi=null;function yi(){vi&&=(clearTimeout(vi),null)}function bi(e,t){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:e,seriesIndex:e.index+B.value.start}),e.subtotal&&Qn.value.show&&(O.value=null,D.value=null,hn.value=!0,k.value=e,Ui(e),[null,void 0].includes(t)||(_i.value=t))}function xi(e,t){if(yi(),!W.value||!ni.value){bi(e,t);return}let n=cr.value.pointerType===`touch`?480:380;vi=setTimeout(()=>{vi=null,bi(e,t)},n)}let Si=u(()=>J.value.map((e,t)=>({name:e.name,value:e.values.slice(B.value.start,B.value.end).reduce((e,t)=>e+t,0),shape:`circle`,uid:e.uid,color:e.color})).sort((e,t)=>t.value-e.value).map((e,t)=>({...e,opacity:E.value.includes(e.uid)?.5:1,segregate:()=>Ei(e.uid),isSegregated:E.value.includes(e.uid),display:`${e.name}${L.value.legend.showPercentage||L.value.legend.showValue?`: `:``}${L.value.legend.showValue?de(I.value.dataLabels.formatter,e.value,a({p:I.value.dataLabels.prefix,v:e.value,s:I.value.dataLabels.suffix,r:L.value.legend.roundingValue}),{datapoint:e,seriesIndex:t}):``}${L.value.legend.showPercentage?E.value.includes(e.uid)?`${L.value.legend.showValue?` (`:``}- %${L.value.legend.showValue?`)`:``}`:`${L.value.legend.showValue?` (`:``}${isNaN(e.value/Ci.value)?`-`:a({v:e.value/Ci.value*100,s:`%`,r:L.value.legend.roundingPercentage})}${L.value.legend.showValue?`)`:``}`:``}`}))),Ci=u(()=>$.value.map(e=>e.subtotal).reduce((e,t)=>e+t,0)),wi=u(()=>({cy:`donut-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`:``}));function Ti(){E.value.length?E.value=[]:Si.value.forEach(e=>{E.value.push(e.uid)}),N(`selectLegend`,Gr.value)}function Ei(e){if(E.value.includes(e))E.value=E.value.filter(t=>t!==e),N(`selectLegend`,Gr.value);else{if(E.value.length===J.value.length-1)return;E.value.push(e),N(`selectLegend`,Gr.value)}k.value&&bi($.value.find((e,t)=>t===_i.value))}function Di(e){return J.value.length?J.value.find(t=>t.name===e)||(Xn.value&&console.warn(`VueUiDonutEvolution - Series name not found "${e}"`),null):(Xn.value&&console.warn(`VueUiDonutEvolution - There are no series to show.`),null)}function Oi(e){let t=Di(e);t!==null&&E.value.includes(t.uid)&&Ei(t.uid)}function ki(e){let t=Di(e);t!==null&&(E.value.includes(t.uid)||Ei(t.uid))}let Ai=u(()=>{let e=[``].concat(J.value.filter(e=>!E.value.includes(e.uid)).map(e=>({name:e.name,color:e.color})),[`Σ`]),t=[];for(let e=0;e<Y.value;e+=1){let n=J.value.filter(e=>!E.value.includes(e.uid)).map(t=>t.values[e]??0).reduce((e,t)=>e+t,0);t.push([X.value[e]?X.value[e].text:`-`].concat(J.value.filter(e=>!E.value.includes(e.uid)).map(t=>({value:t.values[e]??0,percentage:t.values[e]?t.values[e]/n*100:0})),[`${I.value.dataLabels.prefix}${Number(n.toFixed(P.value.table.td.roundingValue))}${I.value.dataLabels.suffix}`]))}return{head:e,body:t,bodyA11y:t.map(e=>e.map((t,n)=>n===0||n===e.length-1?t:`${Qr(t.value??0,null,n)} (${t.percentage.toFixed(1)}%)`)),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.columnNames.period].concat(J.value.filter(e=>!E.value.includes(e.uid)).map(e=>e.name),P.value.table.columnNames.total)}});function ji(){return J.value}function Mi(e=null){it(()=>{let t=[[L.value.title.text],[L.value.title.subtitle.text],[``]],n=[...Ai.value.head.map(e=>e.name??e)],r=[...Ai.value.body.map(e=>e.map(e=>e.value??e))],i=t.concat([n]).concat(r),a=c(i);e?e(a):me({csvContent:a,title:L.value.title.text||`vue-ui-donut-evolution`})})}let Ni=v(!1);function Pi(e){Ni.value=e,_n.value+=1}function Fi(){Lr.value.showTable=!Lr.value.showTable}let Ii=v(!1);function Li(){Ii.value=!Ii.value}function Ri(e){return e.proportion*100>L.value.donuts.hover.hideLabelsUnderValue}let zi=v([]),Bi=v({}),Vi=v(null);function Hi(){Vi.value?.close?.(),k.value=null,_i.value=null,hn.value=!1,O.value=null,D.value=null,M.value=null}function Ui(e){zi.value=e.donut.map(e=>({name:e.name,values:[e.value],color:e.color})),Bi.value=_e({...Qn.value.donutChart,responsive:!0,theme:P.value.theme}),Vi.value&&Vi.value.open()}let Wi=ke(A,()=>L.value.title.text),Gi=u(()=>z.value.width),Ki=u(()=>z.value.height);Ve({timeLabelsEls:Cn,timeLabels:X,slicer:B,configRef:P,rotationPath:[`style`,`chart`,`layout`,`grid`,`xAxis`,`dataLabels`,`rotation`],autoRotatePath:[`style`,`chart`,`layout`,`grid`,`xAxis`,`dataLabels`,`autoRotate`,`enable`],isAutoSize:!1,width:Gi,height:Ki,rotation:F.value.xAxis.dataLabels.autoRotate.angle});let qi=u(()=>Ne({config:P,style:L,mutableConfig:Lr,dialog:dn,accordion:rn,isFullscreen:Ni,parent:A,maxWidth:800,isCursorPointer:R}));ft(()=>Lr.value.showTable,e=>Me(e,P,Dn));function Ji(){Lr.value.showTable=!1,On.value&&On.value.setTableIconState(!1)}let Yi=u(()=>Si.value.map(e=>({...e,name:e.display}))),Xi=u(()=>L.value.backgroundColor),Zi=u(()=>L.value.legend),Qi=u(()=>L.value.title),{isCallbackImaging:$i,isCallbackSvg:ea,generateSvg:ta,onGenerateImage:na}=je({svg:G,title:Qi,legend:Zi,legendItems:Yi,backgroundColor:Xi,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:Pr});async function ra(){N(`copyAlt`,{config:P.value,dataset:$.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:$.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function ia(){M.value=null,Kn.value=!0}function aa(){ar.value=!1,M.value=null,D.value=null,O.value=null,Kn.value=!1}function oa(e){if(!G.value||Ii.value||document.activeElement!==G.value||(ar.value=!1,!$.value.length))return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){if(W.value&&(ni.value||V.value)){yi(),ai(),Hi(),Cr({force:!0,publish:!0});return}M.value=null,D.value=null,O.value=null;return}if(r){if(M.value===null)return;let e=$.value[M.value];if(!e)return;bi(e,M.value);return}let a=M.value,o=D.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 ee=$.value[a];ee&&gi(ee)}let sa=u(()=>({headers:Ai.value?.colNames??[],rows:Ai.value?.bodyA11y??[]}));Ee({getData:ji,getImage:Wi,generatePdf:Nr,generateCsv:Mi,generateImage:Pr,generateSvg:ta,hideSeries:ki,showSeries:Oi,toggleTable:Fi,toggleAnnotator:Li,toggleFullscreen:Pi,copyAlt:ra,resetZoom:()=>Cr({force:!0,publish:!0}),setZoomState:xr}),ft(()=>[z.value.width,z.value.height,An.value,X.value,Kr.value,B.value.start,B.value.end,F.value,I.value,P.value.style.fontFamily,w.dataset,Jn.value,Sn.value,Cn.value,wn.value,Tn.value],Hr,{flush:`post`,deep:!0});let ca=u(()=>Ye({enabled:P.value.userOptions?.annotator?.followZoom,area:q.value,range:B.value,ticks:Zr.value}));return(e,i)=>(_(),p(`div`,{ref_key:`donutEvolutionChart`,ref:A,class:g(`vue-data-ui-component vue-ui-donut-evolution ${Ni.value?`vue-data-ui-wrapper-fullscreen`:``} ${P.value.useCssAnimation?``:`vue-ui-dna`}`),style:ot(`font-family:${P.value.style.fontFamily};width:100%; text-align:center;background:${L.value.backgroundColor}`),id:T.value,onMouseenter:i[4]||=()=>S(Or)(!0),onMouseleave:i[5]||=()=>S(Or)(!1)},[m(`div`,{id:`chart-instructions-${T.value}`,class:`sr-only`},[m(`p`,null,x(P.value.a11y.translations.keyboardNavigation),1)],8,gt),sa.value?.rows?.length?(_(),d(Ke,{key:0,uid:T.value,head:sa.value.headers,body:sa.value.rows,notice:P.value.a11y.translations.tableAvailable,caption:P.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),P.value.userOptions.buttons.annotator?(_(),d(S(cn),rt({key:1},S(n)(P.value.userOptions.annotator),{svgRef:S(G),followZoom:P.value.userOptions?.annotator?.followZoom,annotationViewport:ca.value,backgroundColor:L.value.backgroundColor,color:L.value.color,active:Ii.value,isCursorPointer:R.value,palette:P.value.userOptions.annotatorPalette,onClose:Li}),$e({_:2},[y(S(r),n=>({name:n,fn:C(r=>[b(e.$slots,n,at(nt(S(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`followZoom`,`annotationViewport`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),Fr.value?(_(),p(`div`,{key:2,ref_key:`noTitle`,ref:gn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),L.value.title.text?(_(),p(`div`,{key:3,ref_key:`chartTitle`,ref:Rn,style:`width:100%;background:transparent;padding-bottom:24px`,onMouseleave:hi},[(_(),d(Ae,{key:`title_${yn.value}`,config:{title:{cy:`donut-evolution-div-title`,...L.value.title},subtitle:{cy:`donut-evolution-div-subtitle`,...L.value.title.subtitle}}},null,8,[`config`]))],544)):f(``,!0),m(`div`,{id:`legend-top-${T.value}`},null,8,_t),P.value.userOptions.show&&qn.value&&(S(kr)||S(Dr))?(_(),d(S(ln),{ref_key:`userOptionsRef`,ref:On,key:`user_options_${_n.value}`,backgroundColor:L.value.backgroundColor,color:L.value.color,isPrinting:S(jr),isImaging:S(Mr),uid:T.value,hasPdf:P.value.userOptions.buttons.pdf,hasImg:P.value.userOptions.buttons.img,hasSvg:P.value.userOptions.buttons.svg,hasXls:P.value.userOptions.buttons.csv,hasTable:P.value.userOptions.buttons.table,hasFullscreen:P.value.userOptions.buttons.fullscreen,hasAltCopy:P.value.userOptions.buttons.altCopy,isFullscreen:Ni.value,titles:{...P.value.userOptions.buttonTitles},chartElement:A.value,position:P.value.userOptions.position,hasAnnotator:P.value.userOptions.buttons.annotator,isAnnotation:Ii.value,callbacks:P.value.userOptions.callbacks,printScale:P.value.userOptions.print.scale,tableDialog:P.value.table.useDialog,isCursorPointer:R.value,onToggleFullscreen:Pi,onGeneratePdf:S(Nr),onGenerateCsv:Mi,onGenerateImage:S(na),onGenerateSvg:S(ta),onToggleTable:Fi,onToggleAnnotator:Li,onCopyAlt:ra,style:ot({visibility:S(kr)?S(Dr)?`visible`:`hidden`:`visible`})},$e({_:2},[y(S(Pe)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:C(n=>[b(e.$slots,t,at(nt(S(Fe)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):f(``,!0),m(`div`,vt,[(_(),p(`svg`,{ref_key:`svgRef`,ref:G,xmlns:S(ge),"aria-describedby":`chart-instructions-${T.value}`,class:g({"vue-data-ui-fullscreen--on":Ni.value,"vue-data-ui-fulscreen--off":!Ni.value,"vue-data-ui-no-transition":!S($n)||S(Vr),"vue-ui-donut-evolution-chart-zoom-pointer-focus":W.value&&ar.value}),viewBox:`0 0 ${q.value.absoluteWidth} ${q.value.absoluteHeight}`,style:ot({maxWidth:`100%`,visibility:S(Br)?`visible`:`hidden`,overflow:`visible`,background:`transparent`,color:L.value.color,cursor:W.value?V.value?`col-resize`:`crosshair`:void 0,touchAction:W.value?`pan-y`:void 0,userSelect:W.value?`none`:void 0}),tabindex:`0`,onFocus:ia,onBlur:aa,onKeydown:oa,onPointerdown:fi,onPointermove:pi,onPointerup:mi,onPointercancel:ai,onClickCapture:si},[tt(S(sn)),b(e.$slots,`svg-underlayer`,{svg:{...q.value,isPrintingImg:S(jr)||S(Mr)||S($i),isPrintingSvg:S(ea)}},void 0,!0),e.$slots[`chart-background`]?(_(),p(`foreignObject`,{key:0,x:q.value.left,y:q.value.top,width:q.value.width,height:q.value.height,style:{pointerEvents:`none`}},[b(e.$slots,`chart-background`,{},void 0,!0)],8,bt)):f(``,!0),m(`defs`,null,[tt(Ue,{t:`linear`,id:`hover_${T.value}`,x1:`0%`,y1:`0%`,x2:`0%`,y2:`100%`,stops:[[`0%`,S(re)(L.value.backgroundColor,I.value.highlighter.opacity),1],[`100%`,S(re)(I.value.highlighter.color,I.value.highlighter.opacity),1]]},null,8,[`id`,`stops`]),tt(Ue,{t:`radial`,id:`focus_${T.value}`,stops:[[`0%`,S(re)(S(ae)(L.value.backgroundColor),0),1],[`77%`,S(re)(`#FFFFFF`,30),1],[`100%`,S(re)(S(ae)(L.value.backgroundColor),0),1]]},null,8,[`id`,`stops`])]),F.value.show?(_(),p(`g`,xt,[m(`line`,{x1:K.value?q.value.right:q.value.left,x2:K.value?q.value.right:q.value.left,y1:q.value.top,y2:q.value.top+q.value.height,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-linecap":`round`},null,8,St),m(`line`,{x1:q.value.left,x2:q.value.right,y1:q.value.bottom,y2:q.value.bottom,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-linecap":`round`},null,8,Ct),F.value.showVerticalLines?(_(),p(`g`,wt,[(_(!0),p(l,null,y(B.value.end-B.value.start,(e,t)=>(_(),p(`line`,{x1:q.value.left+(t+1)*Z.value,x2:q.value.left+(t+1)*Z.value,y1:q.value.top,y2:q.value.bottom,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-linecap":`round`},null,8,Tt))),256))])):f(``,!0)])):f(``,!0),m(`g`,null,[F.value.axis.yLabel?(_(),p(`text`,{key:0,ref_key:`yAxisLabel`,ref:Tn,"font-size":F.value.axis.fontSize,fill:F.value.axis.color,transform:`translate(${K.value?q.value.absoluteWidth-F.value.axis.fontSize/2-F.value.axis.yLabelOffsetX:F.value.axis.fontSize}, ${q.value.top+q.value.height/2}) rotate(-90)`,"text-anchor":`middle`,style:{transition:`none`}},x(F.value.axis.yLabel),9,Et)):f(``,!0),F.value.axis.xLabel?(_(),p(`text`,{key:1,ref_key:`xAxisLabel`,ref:wn,"text-anchor":`middle`,x:q.value.absoluteWidth/2,y:q.value.absoluteHeight-3,"font-size":F.value.axis.fontSize,fill:F.value.axis.color},x(F.value.axis.xLabel),9,Dt)):f(``,!0)]),F.value.yAxis.dataLabels.show?(_(),p(`g`,{key:2,ref_key:`scaleLabels`,ref:Sn,class:g({"donut-opacity":!0,"donut-behind":D.value!==null})},[(_(!0),p(l,null,y(Zr.value,(e,t)=>(_(),p(`g`,{key:`sl_${t}`},[e.value>=Q.value.min&&e.value<=Q.value.max?(_(),p(`path`,{key:0,class:g({"vue-data-ui-transition":S($n)&&!S(Vr)}),d:`M${K.value?q.value.right:q.value.left},${e.y} ${K.value?q.value.right+5:q.value.left-5},${e.y}`,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-linecap":`round`},null,10,Ot)):f(``,!0),e.value>=Q.value.min&&e.value<=Q.value.max?(_(),p(`text`,{key:1,class:g({"vue-data-ui-transition":S($n)&&!S(Vr)}),transform:`translate(${K.value?q.value.right-F.value.yAxis.dataLabels.offsetX+7:q.value.left+F.value.yAxis.dataLabels.offsetX-7}, ${e.y+F.value.yAxis.dataLabels.fontSize/3})`,"font-size":F.value.yAxis.dataLabels.fontSize,"text-anchor":K.value?`start`:`end`,fill:F.value.yAxis.dataLabels.color,"font-weight":F.value.yAxis.dataLabels.bold?`bold`:`normal`},x(S(ye)(e.value)?S(de)(I.value.dataLabels.formatter,e.value,S(a)({p:I.value.dataLabels.prefix,v:e.value,s:I.value.dataLabels.suffix,r:I.value.grid.yAxis.dataLabels.roundingValue}),{datapoint:e,seriesIndex:t}):``),11,kt)):f(``,!0)]))),128))],2)):f(``,!0),F.value.xAxis.dataLabels.show?(_(),p(`g`,{key:3,ref_key:`timeLabelsEls`,ref:Cn,class:g({"donut-opacity":!0})},[(_(!0),p(l,null,y(B.value.end-B.value.start,(e,t)=>(_(),p(`g`,null,[(F.value.xAxis.dataLabels.showOnlyFirstAndLast&&(t===0||t===Y.value-1)||!F.value.xAxis.dataLabels.showOnlyFirstAndLast)&&X.value[t]&&X.value[t].text?(_(),p(`g`,At,[String(X.value[t].text).includes(`
2
- `)?(_(),p(`text`,{key:1,class:`vue-data-ui-time-label`,"text-anchor":F.value.xAxis.dataLabels.rotation>0?`start`:F.value.xAxis.dataLabels.rotation<0?`end`:`middle`,"font-size":F.value.xAxis.dataLabels.fontSize,fill:F.value.xAxis.dataLabels.color,transform:`translate(${q.value.left+Z.value*t+Z.value/2}, ${q.value.bottom+F.value.xAxis.dataLabels.fontSize+F.value.xAxis.dataLabels.offsetY}), rotate(${F.value.xAxis.dataLabels.rotation})`,innerHTML:S(ne)({content:String(X.value[t].text),fontSize:F.value.xAxis.dataLabels.fontSize,fill:I.value.grid.xAxis.dataLabels.color,x:0,y:0})},null,8,Mt)):(_(),p(`text`,{key:0,class:`vue-data-ui-time-label`,"text-anchor":F.value.xAxis.dataLabels.rotation>0?`start`:F.value.xAxis.dataLabels.rotation<0?`end`:`middle`,"font-size":F.value.xAxis.dataLabels.fontSize,fill:F.value.xAxis.dataLabels.color,transform:`translate(${q.value.left+Z.value*t+Z.value/2}, ${q.value.bottom+F.value.xAxis.dataLabels.fontSize+F.value.xAxis.dataLabels.offsetY}), rotate(${F.value.xAxis.dataLabels.rotation})`},x(X.value[t].text||``),9,jt))])):f(``,!0)]))),256))],512)):f(``,!0),(_(!0),p(l,null,y($.value,(e,t)=>(_(),p(`g`,null,[I.value.line.show&&t<$.value.length-1&&![e.subtotal,$.value[t+1].subtotal].includes(null)?(_(),p(`line`,{key:0,class:g({"donut-opacity":!0,"donut-behind":D.value!==null}),x1:e.x,y1:e.y,x2:$.value[t+1].x,y2:$.value[t+1].y,stroke:I.value.line.stroke,"stroke-width":I.value.line.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`},null,10,Nt)):f(``,!0),e.subtotal===null?f(``,!0):(_(),p(`g`,Pt,[e.subtotal?(_(),p(`circle`,{key:0,cx:e.x,cy:e.y,r:e.activeRadius,fill:L.value.backgroundColor},null,8,Ft)):f(``,!0)]))]))),256)),(_(!0),p(l,null,y($.value,(e,t)=>(_(),p(`g`,{class:g({"donut-opacity":!0,"donut-behind":t!==D.value&&D.value!==null})},[e.subtotal?(_(),p(`g`,It,[D.value!==null&&D.value===t?(_(),p(`g`,Lt,[(_(!0),p(l,null,y(e.donutHover,t=>(_(),p(`g`,null,[Ri(t)?(_(),p(`path`,{key:0,d:S(ue)(t,{x:t.center.endX,y:t.center.endY},12,12,{x:e.x,y:e.y},!1,20),stroke:t.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`},null,8,Rt)):f(``,!0)]))),256)),(_(!0),p(l,null,y(e.donutHover,(t,n)=>(_(),p(`g`,null,[Ri(t)?(_(),p(`text`,{key:0,"data-cy-hover-label":``,"text-anchor":S(le)(t,!0,0).anchor,x:S(le)(t,!0,9).x,y:S(he)(t,14,10),fill:F.value.yAxis.dataLabels.color,"font-size":8,"font-weight":`bold`},x(t.name)+`: `+x($r(t,e.donut))+` (`+x(t.value===null?`-`:Qr(t.value,t,n))+`) `,9,zt)):f(``,!0)]))),256)),m(`g`,null,[m(`circle`,{cx:e.x,cy:e.y,r:e.hoverRadius,fill:L.value.backgroundColor},null,8,Bt)])])):f(``,!0)])):f(``,!0)],2))),256)),(_(!0),p(l,null,y($.value,(e,t)=>(_(),p(`g`,{class:g({"donut-opacity":!0,"donut-behind":t!==D.value&&D.value!==null})},[e.subtotal===null?f(``,!0):(_(),p(`g`,Vt,[e.subtotal===0?(_(),p(`circle`,{key:0,cx:e.x,cy:e.y,r:3,fill:L.value.color},null,8,Ht)):D.value!==null&&D.value===t?(_(),p(`g`,Ut,[(_(!0),p(l,null,y(e.donutHover,(e,t)=>(_(),p(`path`,{d:e.arcSlice,fill:`${e.color}`,"stroke-width":1,stroke:L.value.backgroundColor},null,8,Wt))),256))])):(_(),p(`g`,Gt,[(_(!0),p(l,null,y(e.donut,(e,t)=>(_(),p(`path`,{d:e.arcSlice,fill:`${e.color}`,"stroke-width":.5,stroke:L.value.backgroundColor},null,8,Kt))),256))]))]))],2))),256)),(_(!0),p(l,null,y($.value,(e,t)=>(_(),p(`g`,{class:g({"donut-opacity":!0,"donut-behind":t!==D.value&&D.value!==null||hn.value&&t!==k.value.index})},[e.subtotal!==null&&I.value.dataLabels.show?(_(),p(`text`,{key:0,"text-anchor":`middle`,x:e.x,y:D.value===e.index&&e.subtotal?e.y+I.value.dataLabels.fontSize/3:e.y-e.radius-I.value.dataLabels.fontSize+I.value.dataLabels.offsetY,"font-size":I.value.dataLabels.fontSize,"font-weight":`bold`,fill:I.value.dataLabels.color},x(Qr(e.subtotal,e,t)),9,qt)):f(``,!0)],2))),256)),(_(!0),p(l,null,y($.value,(e,t)=>(_(),p(`rect`,{x:q.value.left+t*Z.value,y:q.value.top,width:Z.value,height:q.value.height,fill:[D.value,_i.value].includes(e.index)?`url(#hover_${T.value})`:`transparent`,class:g({"donut-hover":R.value&&e.subtotal&&[D.value,_i.value].includes(e.index)}),style:{pointerEvents:`none`}},null,10,Jt))),256)),(_(!0),p(l,null,y($.value,(e,t)=>(_(),p(`rect`,{"data-cy-trap":``,x:q.value.left+t*Z.value,y:q.value.top,width:Z.value,height:q.value.height,fill:`transparent`,onMouseenter:t=>gi(e),onMouseleave:t=>hi(e),onClick:n=>xi(e,t),style:ot({cursor:W.value?V.value?`col-resize`:`crosshair`:void 0}),class:g({"donut-hover":R.value&&D.value===e.index&&e.subtotal})},null,46,Yt))),256)),ti.value?(_(),p(`rect`,{key:4,x:ti.value.x,y:ti.value.y,width:ti.value.width,height:ti.value.height,fill:lr.value.selection.fill,"fill-opacity":lr.value.selection.fillOpacity,stroke:lr.value.selection.stroke,"stroke-opacity":lr.value.selection.strokeOpacity,"stroke-width":lr.value.selection.strokeWidth,"stroke-dasharray":lr.value.selection.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,"pointer-events":`none`},null,8,Xt)):f(``,!0),b(e.$slots,`svg`,{svg:{...q.value,isPrintingImg:S(jr)||S(Mr)||S($i),isPrintingSvg:S(ea)}},void 0,!0)],46,yt)),e.$slots.hint?(_(),p(`div`,Zt,[b(e.$slots,`hint`,at(nt({hint:P.value.a11y.translations.keyboardNavigation,isVisible:Kn.value})),void 0,!0)])):f(``,!0)]),e.$slots.watermark?(_(),p(`div`,Qt,[b(e.$slots,`watermark`,at(nt({isPrinting:S(jr)||S(Mr)||S($i)||S(ea)})),void 0,!0)])):f(``,!0),m(`div`,{ref_key:`chartSlicer`,ref:Hn,style:ot(`width:100%;background:${L.value.backgroundColor}`),"data-dom-to-png-ignore":``},[Y.value>1&&L.value.zoom.show?(_(),d(We,{ref_key:`slicerComponent`,ref:Vn,key:`slicer_${vn.value}`,background:L.value.zoom.color,borderColor:L.value.backgroundColor,fontSize:L.value.zoom.fontSize,useResetSlot:L.value.zoom.useResetSlot,timeLabels:X.value,textColor:L.value.color,inputColor:L.value.zoom.color,selectColor:L.value.zoom.highlightColor,max:Y.value,min:0,valueStart:B.value.start,valueEnd:B.value.end,refreshStartPoint:L.value.zoom.startIndex===null?0:L.value.zoom.startIndex,refreshEndPoint:L.value.zoom.endIndex===null?Y.value:L.value.zoom.endIndex+1,enableRangeHandles:L.value.zoom.enableRangeHandles,enableSelectionDrag:L.value.zoom.enableSelectionDrag,focusOnDrag:L.value.zoom.focusOnDrag,focusRangeRatio:L.value.zoom.focusRangeRatio,isCursorPointer:R.value,maxWidth:L.value.zoom.maxWidth,minimapLeftInsetRatio:q.value.absoluteWidth>0&&L.value.zoom.autoFit?q.value.left/q.value.absoluteWidth:null,minimapRightInsetRatio:q.value.absoluteWidth>0&&L.value.zoom.autoFit?(q.value.absoluteWidth-q.value.right)/q.value.absoluteWidth:null,"onUpdate:start":Tr,"onUpdate:end":Er,onReset:i[0]||=()=>Cr({force:!0,publish:!0})},{"reset-action":C(({reset:t})=>[b(e.$slots,`reset-action`,at(nt({reset:t})),void 0,!0)]),_:3},8,[`background`,`borderColor`,`fontSize`,`useResetSlot`,`timeLabels`,`textColor`,`inputColor`,`selectColor`,`max`,`valueStart`,`valueEnd`,`refreshStartPoint`,`refreshEndPoint`,`enableRangeHandles`,`enableSelectionDrag`,`focusOnDrag`,`focusRangeRatio`,`isCursorPointer`,`maxWidth`,`minimapLeftInsetRatio`,`minimapRightInsetRatio`])):f(``,!0)],4),m(`div`,{id:`legend-bottom-${T.value}`},null,8,$t),En.value&&(L.value.legend.show||e.$slots.legend)?(_(),d(Qe,{key:6,to:L.value.legend.position===`top`?`#legend-top-${T.value}`:`#legend-bottom-${T.value}`},[m(`div`,{ref_key:`chartLegend`,ref:zn},[b(e.$slots,`legend`,{legend:Si.value},()=>[L.value.legend.show?(_(),d(Xe,{key:`legend_${xn.value}`,legendSet:Si.value,config:wi.value,onClickMarker:i[1]||=({legend:e})=>Ei(e.uid)},{item:C(({legend:e,index:t})=>[m(`div`,{onClick:t=>Ei(e.uid),style:ot(`opacity:${E.value.includes(e.uid)?.5:1}`)},x(e.display),13,en)]),legendToggle:C(()=>[Si.value.length>2&&L.value.legend.selectAllToggle.show&&!S(tr)?(_(),d(Ge,{key:0,backgroundColor:L.value.legend.selectAllToggle.backgroundColor,color:L.value.legend.selectAllToggle.color,fontSize:L.value.legend.fontSize,checked:E.value.length>0,onToggle:Ti},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`])):f(``,!0)]),_:1},8,[`legendSet`,`config`])):f(``,!0)],!0)],512)],8,[`to`])):f(``,!0),e.$slots.source?(_(),p(`div`,{key:7,ref_key:`source`,ref:Bn,dir:`auto`},[b(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),qn.value&&P.value.userOptions.buttons.table?(_(),d(lt(qi.value.component),rt({key:8},qi.value.props,{ref_key:`tableUnit`,ref:Dn,onClose:Ji}),$e({content:C(()=>[(_(),d(S(on),{key:`table_${bn.value}`,colNames:Ai.value.colNames,head:Ai.value.head,body:Ai.value.body,config:Ai.value.config,title:P.value.table.useDialog?``:qi.value.title,withCloseButton:!P.value.table.useDialog,isCursorPointer:R.value,onClose:Ji},{th:C(({th:e})=>[et(x(e.name??e),1)]),td:C(({td:e})=>[e.value===null?(_(),p(`span`,tn,`-`)):(_(),p(`b`,nn,x(isNaN(e.value)?``:I.value.dataLabels.prefix)+x(!isNaN(e.value)&&e.value!==null?Number(e.value.toFixed(P.value.table.td.roundingValue)).toLocaleString():e)+x(isNaN(e.value)?``:I.value.dataLabels.suffix),1)),m(`span`,null,x(e.percentage&&!isNaN(e.percentage)?`(${Number(e.percentage.toFixed(P.value.table.td.roundingPercentage)).toLocaleString()}%)`:``),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[P.value.table.useDialog?{name:`title`,fn:C(()=>[et(x(qi.value.title),1)]),key:`0`}:void 0,P.value.table.useDialog?{name:`actions`,fn:C(()=>[m(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[2]||=e=>Mi(P.value.userOptions.callbacks.csv),style:ot({cursor:R.value?`cursor`:`default`})},[tt(S(an),{name:`fileCsv`,stroke:qi.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):f(``,!0),Qn.value.show?(_(),d(S(dn),{key:9,ref_key:`dialog`,ref:Vi,onClose:i[3]||=e=>{k.value=null,hn.value=!1,O.value=null,D.value=null,_i.value=null},backgroundColor:Qn.value.backgroundColor,color:Qn.value.color,headerBg:Qn.value.header.backgroundColor,headerColor:Qn.value.header.color,isFullscreen:Ni.value,fullscreenParent:A.value},{title:C(()=>[et(x(X.value[Number(k.value.index)]?X.value[Number(k.value.index)].text:``),1)]),content:C(()=>[k.value?(_(),d(S(un),{key:0,config:Bi.value,dataset:zi.value},null,8,[`config`,`dataset`])):f(``,!0)]),_:1},8,[`backgroundColor`,`color`,`headerBg`,`headerColor`,`isFullscreen`,`fullscreenParent`])):f(``,!0),S(tr)?(_(),d(Ce,{key:10})):f(``,!0)],46,ht))}},[[`__scopeId`,`data-v-124ecc8a`]]);export{mt as n,rn as t};
@@ -1,9 +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-By3Vb5kz.js";import{$ as a,D as o,Ft as s,Jt as ee,Q as c,X as te,_ as ne,at as re,b as ie,i as l,in as ae,nt as oe,t as se,yt 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{t as he}from"./resolveChartConfig-CIhClE5R.js";import{t as ge}from"./chartImage-DPGnEuYM.js";import{n as _e}from"./Title-BliHuXfT.js";import{t as ve}from"./useChartExport-BZts4KFb.js";import{n as ye,t as be}from"./tableIntegration-CNoJ1CIY.js";import{n as xe,t as Se}from"./userOptionsSlots-DYuo-E5m.js";import{t as Ce}from"./usePrinter-DVf3YcG5.js";import{t as we}from"./useSvgLabelLayout-42Kats14.js";import{t as Te}from"./useTimeLabelCollider-BTybMUFi.js";import{c as Ee}from"./canvas-lib-22VpOI4_.js";import{t as De}from"./useResponsive-CENUxfEL.js";import{t as u}from"./DefGrad-DKMq1REY.js";import{t as Oe}from"./A11yDataTable-DWNlWXzs.js";import{t as ke}from"./useUserOptionState-CXlFnwPv.js";import{t as Ae}from"./useChartAccessibility-DOMuYJfm.js";import{t as je}from"./Legend-DM0ClX3D.js";import{t as Me}from"./usePrefersMotion-XLHwega2.js";import{t as Ne}from"./vue_ui_dumbbell-BMcxK0N3.js";import{Fragment as d,Teleport as Pe,computed as f,createBlock as p,createCommentVNode as m,createElementBlock as h,createElementVNode as g,createSlots as Fe,createTextVNode as Ie,createVNode as _,defineAsyncComponent as v,guardReactiveProps as Le,mergeProps as Re,nextTick as ze,normalizeClass as Be,normalizeProps as Ve,normalizeStyle as y,onBeforeUnmount as He,onMounted as Ue,openBlock as b,ref as x,renderList as S,renderSlot as C,resolveDynamicComponent as We,shallowRef as Ge,toDisplayString as w,toRefs as Ke,unref as T,vShow as qe,watch as Je,withCtx as E,withDirectives as Ye}from"vue";var Xe=/* @__PURE__ */ e({default:()=>Ft}),Ze=[`id`],Qe=[`id`],$e=[`id`],et={style:{position:`relative`}},tt=[`xmlns`,`viewBox`,`aria-describedby`],nt=[`x`,`y`,`width`,`height`],rt={key:1},it=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],at={key:2},ot=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],st=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],ct=[`transform`,`font-size`,`fill`],lt=[`x`,`y`,`font-size`,`fill`,`font-weight`,`onMouseenter`,`onMouseleave`,`onClick`],ut=[`x`,`y`,`font-size`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],dt=[`x`,`y`,`font-size`,`fill`],ft=[`transform`,`font-size`,`fill`,`font-weight`,`text-anchor`],pt=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],mt=[`d`,`stroke`,`stroke-width`,`stroke-dasharray`],ht=[`x`,`y`,`height`,`width`,`fill`],gt=[`transform`,`fill`,`font-size`],_t={key:0},vt={key:0},yt=[`d`,`fill`],bt={key:1},xt=[`x`,`y`,`height`,`width`,`fill`],St=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Ct=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],wt={key:7},Tt=[`x`,`y`,`fill`,`font-size`],Et={key:8},Dt=[`x`,`y`,`fill`,`font-size`],Ot=[`x`,`y`,`width`,`height`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],kt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},At={key:5,class:`vue-data-ui-watermark`},jt=[`id`],Mt=[`xmlns`,`height`,`width`],Nt=[`fill`],Pt={style:{display:`flex`,"align-items":`center`}},Ft=/*#__PURE__*/ me({__name:`vue-ui-dumbbell`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectDatapoint`,`copyAlt`],setup(e,{expose:me,emit:Xe}){let Ft=v(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),It=v(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Lt=v(()=>import(`./DataTable-Dof6yhO7.js`)),Rt=v(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),zt=v(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Bt=v(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),Vt=v(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_dumbbell:Ht}=i(),Ut=Me(),D=e,Wt=Xe,Gt=f({get(){return!!D.dataset&&D.dataset.length},set(e){return e}}),O=x(te()),Kt=x(0),k=x(null),qt=x(null),Jt=x(null),Yt=x(null),Xt=x(null),Zt=x(0),Qt=x(0),$t=x(0),en=x(!1),tn=x(null),nn=x(null),rn=x(null),an=x(null),on=x(null),sn=x(null),A=x(null),j=x(null),M=x(null),cn=x(!1),N=x(!1),P=x(vn()),F=f(()=>P.value.style.chart.grid.horizontalGrid),ln=f(()=>P.value.style.chart.grid.verticalGrid),I=f(()=>P.value.style.chart.labels);f(()=>P.value.style.chart.grid);let L=f(()=>P.value.style.chart.plots),R=f(()=>P.value.style.chart.comparisonLines),z=f(()=>P.value.style.chart);fe({config:()=>P.value,dataset:()=>D.dataset,component:`VueUiDumbbell`,rules:[pe.emptyArray,{test:e=>e.length>31,message:[`👀 The number of series is > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using multiple instances of the component to display related series.`]}]});let un=f(()=>P.value.userOptions.useCursorPointer),dn=f(()=>ae({defaultConfig:{userOptions:{show:!1},table:{show:!1},useAnimation:!1,style:{chart:{backgroundColor:`#99999930`,padding:{top:12,right:12,bottom:12,left:12},grid:{horizontalGrid:{stroke:`#6A6A6A`},verticalGrid:{stroke:`#6A6A6A`}},labels:{axis:{yLabel:``,xLabel:``},xAxisLabels:{show:!1},yAxisLabels:{show:!1},endLabels:{show:!1},startLabels:{show:!1}},legend:{backgroundColor:`transparent`},plots:{endColor:`#969696`,startColor:`#DBDBDB`,stroke:`#6A6A6A`,evaluationColors:{enable:!1}}}}},userConfig:P.value.skeletonConfig??{}})),{loading:fn,FINAL_DATASET:pn,manualLoading:mn}=ue({...Ke(D),FINAL_CONFIG:P,prepareConfig:vn,skeletonDataset:D.config?.skeletonDataset??[{name:`_`,start:21,end:34},{name:`_`,start:13,end:21},{name:`_`,start:8,end:13},{name:`_`,start:5,end:8},{name:`_`,start:3,end:5}],skeletonConfig:ae({defaultConfig:P.value,userConfig:dn.value})}),{userOptionsVisible:hn,setUserOptionsVisibility:gn,keepUserOptionState:_n}=ke({config:P.value}),{svgRef:B}=Ae({config:z.value.title});function vn(){return he(D.config,Ht,Ne)}Je(()=>D.config,e=>{fn.value||(P.value=vn()),hn.value=!P.value.userOptions.showOnChartHover,Sn(),Zt.value+=1,Qt.value+=1,$t.value+=1,P.value.responsive||(K.value=z.value.rowHeight,q.value=z.value.width),U.value.showTable=P.value.table.show},{deep:!0}),Je(()=>pn.value,e=>{Array.isArray(e)&&e.length>0&&(mn.value=!1),Rn(),zn()},{deep:!0});let V=Ge(null),H=Ge(null),yn=x(!1),bn=0;Ue(()=>{en.value=!0,Sn()});let xn=f(()=>P.value.debug);function Sn(){le(D.dataset)?re({componentName:`VueUiDumbbell`,type:`dataset`,debug:xn.value}):D.dataset.forEach((e,t)=>{ce({datasetObject:e,requiredAttributes:[`name`,`start`,`end`]}).forEach(e=>{Gt.value=!1,re({componentName:`VueUiDumbbell`,type:`datasetSerieAttribute`,property:e,index:t,debug:xn.value})})}),P.value.responsive&&(V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect()),V.value=new ResizeObserver(()=>{let{width:e,height:t}=De({chart:k.value,title:z.value.title.text?qt.value:null,legend:z.value.legend.show?Jt.value:null,source:Yt.value,noTitle:Xt.value}),n=z.value.title.text?24:0,r=z.value.legend.show?24:0;cancelAnimationFrame(bn),bn=requestAnimationFrame(async()=>{q.value=Math.max(.1,e),K.value=Math.max(.1,(Math.max(.1,t)-(n+r))/pn.value.length),er(),yn.value=!0})}),H.value=k.value.parentNode,V.value.observe(H.value)),er()}He(()=>{cancelAnimationFrame(bn),Z.value!=null&&(cancelAnimationFrame(Z.value),Z.value=null),V.value&&(H.value&&V.value.unobserve(H.value),V.value.disconnect())});let{isPrinting:Cn,isImaging:wn,generatePdf:Tn,generateImage:En}=Ce({elementId:`dumbbell_${O.value}`,fileName:z.value.title.text||`vue-ui-dumbbell`,options:P.value.userOptions.print}),Dn=f(()=>P.value.userOptions.show&&!z.value.title.text),U=x({showTable:P.value.table.show});Je(P,()=>{U.value={showTable:P.value.table.show}},{immediate:!0});let W=f(()=>pn.value.map((e,t)=>({...e,start:ie(e.start),end:ie(e.end),id:e.id??`${String(e.name)}__${String(e.start)}__${String(e.end)}__${te()}`}))),On=f(()=>{let e=z.value.grid,t=W.value.flatMap(e=>[e.start,e.end]).map(e=>Number(e)).filter(e=>Number.isFinite(e)),n=t.length?Math.min(...t):0,r=t.length?Math.max(...t):0;return{min:e.scaleMin??Math.min(n,0),max:e.scaleMax??r}}),G=f(()=>ne(On.value.min,On.value.max,z.value.grid.scaleSteps)),K=x(z.value.rowHeight),q=x(z.value.width),{metrics:kn,ready:An,settling:jn,update:Mn}=we({svgRef:B,canMeasure:()=>!P.value.responsive||yn.value,initialMetrics:{scaleLabelsWidth:0,yAxisLabelWidth:0,xAxisLabelHeight:0,timeLabelsHeight:0},measure:e=>({scaleLabelsWidth:e(an.value).textWidth,yAxisLabelWidth:e(rn.value).rotatedWidth,xAxisLabelHeight:e(sn.value).height,timeLabelsHeight:e(on.value).height})});function Nn(){let e=kn.value.scaleLabelsWidth,t=kn.value.yAxisLabelWidth;return e+t+(t?24+I.value.axis.yLabelOffsetX:0)}let Pn=f(()=>kn.value.xAxisLabelHeight+kn.value.timeLabelsHeight),Fn=f(()=>W.value.length);function In(e,t,n){let r=Number(e),i=Number(t.min),a=Number(t.max),o=Number(n.width);if(!Number.isFinite(r)||!Number.isFinite(i)||!Number.isFinite(a)||!Number.isFinite(o))return n.left;let s=a-i;return s<=0?n.left:n.left+(r-i)/s*o}let J=f(()=>{N.value;let e=Nn(),t=z.value.padding,n=I.value.axis.xLabel?I.value.axis.xLabelOffsetY:0,r=K.value*Fn.value-Pn.value-t.top-t.bottom-n,i=r/Fn.value,a=K.value*Fn.value,o=q.value-e-t.left-t.right,s=G.value.ticks.length*(o/G.value.ticks.length);return{left:z.value.padding.left+e,right:q.value-z.value.padding.right,top:z.value.padding.top,bottom:a-z.value.padding.bottom-Pn.value-n,width:o,height:r,rowHeight:i,absoluteHeight:a,widthPlotReference:s}}),Y=f(()=>Math.min(K.value/2*.7,L.value.radius)),Ln=x([]),X=f({get(){let e=J.value,t=G.value;return Ln.value.map((n,r)=>{let i=In(n.start,t,e),a=In(n.endVal,t,e),o=i+(a-i)/2,s=![null,void 0].includes(n.start)&&![null,void 0].includes(n.end)&&n.end>n.start,ee=![null,void 0].includes(n.start)&&![null,void 0].includes(n.end)&&n.end<n.start,c=![null,void 0].includes(n.start)&&![null,void 0].includes(n.end)&&n.end===n.start||[null,void 0].includes(n.start)||[null,void 0].includes(n.end),te=s?L.value.evaluationColors.positive:ee?L.value.evaluationColors.negative:L.value.evaluationColors.neutral;return{...n,isPositive:s,isNegative:ee,isNeutral:c,evaluationColor:te,evaluationGrad:`url(#${s?`positive`:ee?`negative`:`neutral`}_grad_${O.value})`,startX:i,endX:a,centerX:o,y:e.top+r*e.rowHeight+e.rowHeight/2}})},set(e){Ln.value=e}});function Rn(){Ln.value=W.value.map(e=>{let t=Number(e.start);return{...e,endVal:Number.isFinite(t)?t:0}})}let Z=x(null);Ue(()=>{zn()});function zn(){if(Z.value!=null&&(cancelAnimationFrame(Z.value),Z.value=null),Rn(),!P.value.useAnimation||Ut.value){X.value=Ln.value.map(e=>{let t=Number(e.end);return{...e,endVal:Number.isFinite(t)?t:e.endVal}});return}let e=Math.max(1,Math.min(100,P.value.animationSpeed||100))/100,t=W.value.map(e=>{let t=Number(e.start),n=Number(e.end),r=Number.isFinite(t)?t:0;return(Number.isFinite(n)?n:r)-r}),n=()=>{let r=!0;X.value=Ln.value.map((n,i)=>{let a=Number.isFinite(Number(n.end))?Number(n.end):n.endVal,o=n.endVal+t[i]*e,s=t[i]>=0?Math.min(o,a):Math.max(o,a);return s!==a&&(r=!1),{...n,endVal:s}}),r?Z.value=null:Z.value=requestAnimationFrame(n)};Z.value=requestAnimationFrame(n)}let Bn=f(()=>L.value.evaluationColors.enable?[{name:z.value.legend.labelNegative,color:L.value.gradient.show?`url(#negative_grad_${O.value})`:L.value.evaluationColors.negative},{name:z.value.legend.labelNeutral,color:L.value.gradient.show?`url(#neutral_grad_${O.value})`:L.value.evaluationColors.neutral},{name:z.value.legend.labelPositive,color:L.value.gradient.show?`url(#positive_grad_${O.value})`:L.value.evaluationColors.positive}]:[{name:z.value.legend.labelStart,color:L.value.gradient.show?`url(#start_grad_${O.value})`:L.value.startColor},{name:z.value.legend.labelEnd,color:L.value.gradient.show?`url(#end_grad_${O.value})`:L.value.endColor}]),Vn=f(()=>({cy:`donut-div-legend`,backgroundColor:z.value.legend.backgroundColor,color:z.value.legend.color,fontSize:z.value.legend.fontSize,paddingBottom:12,paddingTop:12,fontWeight:z.value.legend.bold?`bold`:``})),Q=f(()=>({head:X.value.map(e=>({name:e.name})),body:X.value.map(e=>({start:e.start,end:e.end}))})),$=f(()=>{let e=[P.value.table.columnNames.series,P.value.table.columnNames.start,P.value.table.columnNames.end,P.value.table.columnNames.progression],t=Q.value.head.map((e,t)=>{let n=a({p:I.value.prefix,v:Q.value.body[t].start,s:I.value.suffix,r:P.value.table.td.roundingValue}),r=a({p:I.value.prefix,v:Q.value.body[t].end,s:I.value.suffix,r:P.value.table.td.roundingValue}),i=a({v:100*(Q.value.body[t].end/Q.value.body[t].start-1),s:`%`,r:P.value.table.td.roundingPercentage});return[{name:e.name},n,r,i]}),n={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};return{colNames:[P.value.table.columnNames.series,P.value.table.columnNames.start,P.value.table.columnNames.end,P.value.table.columnNames.progression],head:e,body:t,config:n}});function Hn(e=null){ze(()=>{let t=Q.value.head.map((e,t)=>[[e.name],[Q.value.body[t].start],[Q.value.body[t].end]]),n=[[z.value.title.text],[z.value.title.subtitle.text],[[P.value.table.columnNames.series],[P.value.table.columnNames.start],[P.value.table.columnNames.end]]].concat(t),r=o(n);e?e(r):oe({csvContent:r,title:z.value.title.text||`vue-ui-dumbbell`})})}let Un=x(!1);function Wn(e){Un.value=e,Kt.value+=1}function Gn(){return W.value}function Kn(){U.value.showTable=!U.value.showTable}let qn=x(!1);function Jn(){qn.value=!qn.value}let Yn=ge(k,()=>z.value.title.text),Xn=f(()=>G.value.ticks),Zn=f(()=>({start:0,end:Xn.value.length}));Te({timeLabelsEls:on,timeLabels:Xn,slicer:Zn,configRef:P,rotationPath:[`style`,`chart`,`labels`,`xAxisLabels`,`rotation`],autoRotatePath:[`style`,`chart`,`labels`,`xAxisLabels`,`autoRotate`,`enable`],isAutoSize:!1,width:q,height:K,targetClass:`.vue-ui-dumbbell-scale-label`,rotation:I.value.xAxisLabels.autoRotate.angle});function Qn({rowHeight:e,fontSize:t,showProgression:n}){if(!n)return!1;let r=e/3,i=e/1.3;return Math.abs(i-r)<t*1.2}let $n=(()=>{let e=null,t=0;return n=>{n===N.value?(e=null,t=0):e===null||e!==n?(e=n,t=1):(t+=1,t>=1&&(N.value=n,e=null,t=0))}})(),er=Ee(()=>{requestAnimationFrame(()=>{requestAnimationFrame(()=>{let e=Qn({rowHeight:J.value.rowHeight,fontSize:I.value.yAxisLabels.fontSize,showProgression:I.value.yAxisLabels.showProgression});$n(e)})})},100);function tr({datapoint:e,seriesIndex:t}){A.value=t,j.value=e,P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:e,seriesIndex:t})}function nr({datapoint:e,seriesIndex:t}){A.value=null,j.value=null,P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function rr({datapoint:e,seriesIndex:t}){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:e,seriesIndex:t}),Wt(`selectDatapoint`,{...e,seriesIndex:t})}let ir=f(()=>{if(j.value===null)return 0;let e=![null,void 0].includes(j.value.start),t=![null,void 0].includes(j.value.end);return e&&t?Math.min(j.value.startX,j.value.endX)+Math.abs(j.value.startX-j.value.endX)/2:e&&!t?j.value.startX:t&&!e?j.value.endX:null}),ar=f(()=>{if(j.value===null)return``;let e=![null,void 0].includes(j.value.start),t=![null,void 0].includes(j.value.end),n=``,r=``;return e&&(n=l(I.value.formatter,j.value.start,a({p:I.value.prefix,v:j.value.start,s:I.value.suffix,r:I.value.startLabels.rounding}),{datapoint:j.value,seriesIndex:A.value})),t&&(r=l(I.value.formatter,j.value.end,a({p:I.value.prefix,v:j.value.end,s:I.value.suffix,r:I.value.startLabels.rounding}),{datapoint:j.value,seriesIndex:A.value})),e&&t?`${n} → ${r}`:e&&!t?n:t&&!e?r:``}),or=f(()=>be({config:P,style:z,mutableConfig:U,dialog:Vt,accordion:It,isFullscreen:Un,parent:k,maxWidth:800,isCursorPointer:un}));Je(()=>U.value.showTable,e=>ye(e,P,tn));function sr(){U.value.showTable=!1,nn.value&&nn.value.setTableIconState(!1)}let cr=f(()=>Bn.value.map(e=>({...e,shape:`circle`}))),lr=f(()=>z.value.backgroundColor),ur=f(()=>z.value.legend),dr=f(()=>z.value.title),{isCallbackImaging:fr,isCallbackSvg:pr,generateSvg:mr,onGenerateImage:hr}=ve({svg:B,title:dr,legend:ur,legendItems:cr,backgroundColor:lr,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:En});async function gr(){Wt(`copyAlt`,{config:P.value,dataset:X.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:X.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function _r(e){let t=X.value.length;return t?(e%t+t)%t:null}function vr(){if(M.value!==null){let e=X.value[M.value];e&&nr({datapoint:e,seriesIndex:M.value})}M.value=null,A.value=null,j.value=null}function yr(){M.value=null,cn.value=!0}function br(){vr(),cn.value=!1}function xr(e){if(!B.value||qn.value||document.activeElement!==B.value||!X.value.length)return;let t=[`ArrowUp`,`ArrowLeft`].includes(e.key),n=[`ArrowDown`,`ArrowRight`].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){vr();return}if(r){if(M.value===null)return;let e=X.value[M.value];if(!e)return;rr({datapoint:e,seriesIndex:M.value});return}let a=M.value;a=a===null?n?0:X.value.length-1:_r(a+(n?1:-1));let o=X.value[a];o&&(M.value=a,tr({datapoint:o,seriesIndex:a}))}let Sr=f(()=>({head:$.value.head,body:$.value.body.map(e=>[e[0]?.name??``,e[1],e[2],e[3]]),caption:P.value.a11y.translations.tableCaption,notice:P.value.a11y.translations.tableAvailable}));return me({getData:Gn,getImage:Yn,generatePdf:Tn,generateCsv:Hn,generateImage:En,generateSvg:mr,toggleTable:Kn,toggleAnnotator:Jn,toggleFullscreen:Wn,copyAlt:gr}),Je(()=>[q.value,K.value,N.value,I.value,z.value,P.value.style.fontFamily,D.dataset,yn.value,an.value,on.value,sn.value,rn.value],Mn,{flush:`post`,deep:!0}),(e,i)=>(b(),h(`div`,{ref_key:`dumbbellChart`,ref:k,class:Be(`vue-data-ui-component vue-ui-dumbbell ${Un.value?`vue-data-ui-wrapper-fullscreen`:``}`),style:y(`font-family:${P.value.style.fontFamily};width:100%; text-align:center;background:${z.value.backgroundColor};${P.value.responsive?`height:100%`:``}`),id:`dumbbell_${O.value}`,onMouseenter:i[1]||=()=>T(gn)(!0),onMouseleave:i[2]||=()=>T(gn)(!1)},[g(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[g(`p`,null,w(P.value.a11y.translations.keyboardNavigation),1)],8,Qe),Sr.value.body.length?(b(),p(Oe,{key:0,uid:O.value,head:Sr.value.head,body:Sr.value.body,caption:Sr.value.caption,notice:Sr.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):m(``,!0),P.value.userOptions.buttons.annotator?(b(),p(T(Rt),Re({key:1},T(n)(P.value.userOptions.annotator),{svgRef:T(B),backgroundColor:z.value.backgroundColor,color:z.value.color,active:qn.value,isCursorPointer:un.value,palette:P.value.userOptions.annotatorPalette,onClose:Jn}),Fe({_:2},[S(T(r),n=>({name:n,fn:E(r=>[C(e.$slots,n,Ve(Le(T(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):m(``,!0),Dn.value?(b(),h(`div`,{key:2,ref_key:`noTitle`,ref:Xt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):m(``,!0),z.value.title.text?(b(),h(`div`,{key:3,ref_key:`chartTitle`,ref:qt,style:`width:100%;background:transparent;padding-bottom:24px`},[(b(),p(_e,{key:`title_${Zt.value}`,config:{title:{cy:`donut-div-title`,...z.value.title},subtitle:{cy:`donut-div-subtitle`,...z.value.title.subtitle}}},null,8,[`config`]))],512)):m(``,!0),g(`div`,{id:`legend-top-${O.value}`},null,8,$e),P.value.userOptions.show&&Gt.value&&(T(_n)||T(hn))?(b(),p(T(zt),{ref_key:`userOptionsRef`,ref:nn,key:`user_option_${Kt.value}`,backgroundColor:z.value.backgroundColor,color:z.value.color,isPrinting:T(Cn),isImaging:T(wn),uid:O.value,hasPdf:P.value.userOptions.buttons.pdf,hasXls:P.value.userOptions.buttons.csv,hasImg:P.value.userOptions.buttons.img,hasSvg:P.value.userOptions.buttons.svg,hasTable:P.value.userOptions.buttons.table,hasFullscreen:P.value.userOptions.buttons.fullscreen,hasAltCopy:P.value.userOptions.buttons.altCopy,isFullscreen:Un.value,titles:{...P.value.userOptions.buttonTitles},chartElement:k.value,position:P.value.userOptions.position,hasAnnotator:P.value.userOptions.buttons.annotator,isAnnotation:qn.value,callbacks:P.value.userOptions.callbacks,printScale:P.value.userOptions.print.scale,tableDialog:P.value.table.useDialog,isCursorPointer:un.value,onToggleFullscreen:Wn,onGeneratePdf:T(Tn),onGenerateCsv:Hn,onGenerateImage:T(hr),onGenerateSvg:T(mr),onToggleTable:Kn,onToggleAnnotator:Jn,onCopyAlt:gr,style:y({visibility:T(_n)?T(hn)?`visible`:`hidden`:`visible`})},Fe({_:2},[S(T(xe)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:E(n=>[C(e.$slots,t,Ve(Le(T(Se)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):m(``,!0),g(`div`,et,[(b(),h(`svg`,{ref_key:`svgRef`,ref:B,xmlns:T(se),class:Be({"vue-data-ui-fullscreen--on":Un.value,"vue-data-ui-fulscreen--off":!Un.value}),viewBox:`0 0 ${q.value} ${J.value.absoluteHeight<=0?10:J.value.absoluteHeight}`,style:y(`max-width:100%; overflow: visible; background:transparent;color:${z.value.color};visibility:${T(An)?`visible`:`hidden`}`),"aria-describedby":`chart-instructions-${O.value}`,tabindex:`0`,onFocus:yr,onBlur:br,onKeydown:xr},[_(T(Bt)),C(e.$slots,`svg-underlayer`,{svg:{...J.value,isPrintingImg:T(Cn)||T(wn)||T(fr),isPrintingSvg:T(pr)}},void 0,!0),e.$slots[`chart-background`]?(b(),h(`foreignObject`,{key:0,x:J.value.left,y:J.value.top,width:Math.max(.1,J.value.width),height:Math.max(.1,J.value.height),style:{pointerEvents:`none`}},[C(e.$slots,`chart-background`,{},void 0,!0)],8,nt)):m(``,!0),ln.value.show?(b(),h(`g`,rt,[(b(!0),h(d,null,S(G.value.ticks,(e,t)=>(b(),h(`line`,{x1:J.value.left+t*J.value.width/(G.value.ticks.length-1),x2:J.value.left+t*J.value.width/(G.value.ticks.length-1),y1:J.value.top,y2:J.value.bottom,stroke:ln.value.stroke,"stroke-width":ln.value.strokeWidth,"stroke-dasharray":ln.value.strokeDasharray},null,8,it))),256))])):m(``,!0),F.value.show?(b(),h(`g`,at,[(b(!0),h(d,null,S(W.value,(e,t)=>(b(),h(`line`,{x1:J.value.left,x2:J.value.right,y1:J.value.top+t*J.value.rowHeight,y2:J.value.top+t*J.value.rowHeight,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-dasharray":F.value.strokeDasharray},null,8,ot))),256)),g(`line`,{x1:J.value.left,x2:J.value.right,y1:J.value.bottom,y2:J.value.bottom,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"stroke-dasharray":F.value.strokeDasharray},null,8,st)])):m(``,!0),I.value.axis.yLabel?(b(),h(`text`,{key:3,ref_key:`yAxisLabel`,ref:rn,transform:`translate(${I.value.axis.fontSize}, ${J.value.absoluteHeight/2}), rotate(-90)`,"font-size":I.value.axis.fontSize,fill:I.value.axis.color,"text-anchor":`middle`},w(I.value.axis.yLabel),9,ct)):m(``,!0),I.value.yAxisLabels.show?(b(),h(`g`,{key:4,ref_key:`serieLabels`,ref:an},[(b(!0),h(d,null,S(X.value,(e,t)=>(b(),h(`text`,{class:`vue-ui-dumbbell-serie-name`,key:`serieLabel_${e.id}_${t}`,x:J.value.left-6+I.value.yAxisLabels.offsetX,y:J.value.top+t*J.value.rowHeight+(!I.value.yAxisLabels.showProgression||N.value?J.value.rowHeight/2:J.value.rowHeight/3)+I.value.yAxisLabels.fontSize/3,"font-size":I.value.yAxisLabels.fontSize,fill:I.value.yAxisLabels.color,"font-weight":I.value.yAxisLabels.bold?`bold`:`normal`,"text-anchor":`end`,onMouseenter:n=>tr({datapoint:e,seriesIndex:t}),onMouseleave:n=>nr({datapoint:e,seriesIndex:t}),onClick:n=>rr({datapoint:e,seriesIndex:t})},w(e.name)+` `+w(N.value&&I.value.yAxisLabels.showProgression?[null,void 0].includes(e.start)||[null,void 0].includes(e.end)?``:`(${T(l)(I.value.yAxisLabels.formatter,100*(e.end/e.start-1),T(a)({v:100*(e.end/e.start-1),s:`%`,r:I.value.yAxisLabels.rounding}),{datapoint:e})})`:``),41,lt))),128)),I.value.yAxisLabels.showProgression&&!N.value?(b(!0),h(d,{key:0},S(X.value,(e,t)=>(b(),h(`text`,{class:`vue-ui-dumbbell-serie-value`,x:J.value.left-6+I.value.yAxisLabels.offsetX,y:J.value.top+t*J.value.rowHeight+J.value.rowHeight/1.3+I.value.yAxisLabels.fontSize/3,"font-size":I.value.yAxisLabels.fontSize,fill:I.value.yAxisLabels.color,"text-anchor":`end`,onMouseenter:n=>tr({datapoint:e,seriesIndex:t}),onMouseleave:n=>nr({datapoint:e,seriesIndex:t}),onClick:n=>rr({datapoint:e,seriesIndex:t})},w([null,void 0].includes(e.start)||[null,void 0].includes(e.end)?``:T(l)(I.value.yAxisLabels.formatter,100*(e.end/e.start-1),T(a)({v:100*(e.end/e.start-1),s:`%`,r:I.value.yAxisLabels.rounding}),{datapoint:e})),41,ut))),256)):m(``,!0)],512)):m(``,!0),I.value.axis.xLabel?(b(),h(`text`,{key:5,ref_key:`xAxisLabel`,ref:sn,x:J.value.left+J.value.width/2,y:J.value.absoluteHeight-I.value.axis.fontSize/3,"font-size":I.value.axis.fontSize,fill:I.value.axis.color,"text-anchor":`middle`},w(I.value.axis.xLabel),9,dt)):m(``,!0),I.value.xAxisLabels.show?(b(),h(`g`,{key:6,ref_key:`scaleLabels`,ref:on},[(b(!0),h(d,null,S(G.value.ticks,(e,t)=>(b(),h(`text`,{class:`vue-ui-dumbbell-scale-label`,key:`tick_${t}`,transform:`translate(${J.value.left+t*(J.value.width/(G.value.ticks.length-1))}, ${J.value.bottom+I.value.xAxisLabels.fontSize+I.value.xAxisLabels.offsetY}), rotate(${I.value.xAxisLabels.rotation})`,"font-size":I.value.xAxisLabels.fontSize,fill:I.value.xAxisLabels.color,"font-weight":I.value.xAxisLabels.bold?`bold`:`normal`,"text-anchor":I.value.xAxisLabels.rotation>0?`start`:I.value.xAxisLabels.rotation<0?`end`:`middle`},w(T(l)(I.value.formatter,e,T(a)({p:I.value.prefix,v:e,s:I.value.suffix,r:I.value.xAxisLabels.rounding}),{datapoint:e,seriesIndex:t})),9,ft))),128))],512)):m(``,!0),Ye(g(`g`,null,[Ye(g(`path`,{d:`M ${j.value?j.value.startX:J.value.left},${J.value.top} ${j.value?j.value.startX:J.value.left},${J.value.bottom}`,stroke:j.value?L.value.evaluationColors.enable?j.value.evaluationColor:L.value.startColor:`transparent`,"stroke-width":R.value.strokeWidth,"stroke-dasharray":R.value.strokeDasharray,style:y({transition:T(jn)?`none`:`all 0.3s ease-in-out`})},null,12,pt),[[qe,j.value!==null&&![null,void 0].includes(j.value.start)]]),Ye(g(`path`,{d:`M ${j.value?j.value.endX:J.value.left},${J.value.top} ${j.value?j.value.endX:J.value.left},${J.value.bottom}`,stroke:j.value?L.value.evaluationColors.enable?j.value.evaluationColor:L.value.endColor:`transparent`,"stroke-width":R.value.strokeWidth,"stroke-dasharray":R.value.strokeDasharray,style:y({transition:T(jn)?`none`:`all 0.3s ease-in-out`})},null,12,mt),[[qe,j.value!==null&&![null,void 0].includes(j.value.end)]]),Ye(g(`rect`,{x:j.value?Math.min(j.value.startX,j.value.endX):J.value.left,y:J.value.top,height:Math.max(.1,J.value.height),width:j.value?Math.max(.1,Math.abs(j.value.endX-j.value.startX)):0,fill:j.value?T(ee)(R.value.rectColor,R.value.rectOpacity):`transparent`,style:y({transition:T(jn)?`none`:`all 0.3s ease-in-out`})},null,12,ht),[[qe,R.value.showRect&&j.value!==null&&![null,void 0].includes(j.value.start)&&![null,void 0].includes(j.value.end)]]),Ye(g(`text`,{transform:`translate(${ir.value==null?0:ir.value}, ${J.value.top-6})`,fill:R.value.labelColor,"font-size":R.value.labelFontSize,"text-anchor":`middle`,style:y({transition:T(jn)?`none`:`all 0.3s ease-in-out`})},w(ar.value),13,gt),[[qe,j.value!==null&&ir.value!==null&&R.value.showLabel]])],512),[[qe,R.value.show&&A.value!==null]]),g(`defs`,null,[_(u,{t:`radial`,id:`start_grad_${O.value}`,fy:`30%`,stops:[[`10%`,T(s)(L.value.startColor,L.value.gradient.intensity/100),1],[`90%`,T(c)(L.value.startColor,.1),1],[`100%`,L.value.startColor,1]]},null,8,[`id`,`stops`]),_(u,{t:`radial`,id:`end_grad_${O.value}`,fy:`30%`,stops:[[`10%`,T(s)(L.value.endColor,L.value.gradient.intensity/100),1],[`90%`,T(c)(L.value.endColor,.1),1],[`100%`,L.value.endColor,1]]},null,8,[`id`,`stops`]),_(u,{t:`radial`,id:`positive_grad_${O.value}`,fy:`30%`,stops:[[`10%`,T(s)(L.value.evaluationColors.positive,L.value.gradient.intensity/100),1],[`90%`,T(c)(L.value.evaluationColors.positive,.1),1],[`100%`,L.value.evaluationColors.positive,1]]},null,8,[`id`,`stops`]),_(u,{t:`radial`,id:`negative_grad_${O.value}`,fy:`30%`,stops:[[`10%`,T(s)(L.value.evaluationColors.negative,L.value.gradient.intensity/100),1],[`90%`,T(c)(L.value.evaluationColors.negative,.1),1],[`100%`,L.value.evaluationColors.negative,1]]},null,8,[`id`,`stops`]),_(u,{t:`radial`,id:`neutral_grad_${O.value}`,fy:`30%`,stops:[[`10%`,T(s)(L.value.evaluationColors.neutral,L.value.gradient.intensity/100),1],[`90%`,T(c)(L.value.evaluationColors.neutral,.1),1],[`100%`,L.value.evaluationColors.neutral,1]]},null,8,[`id`,`stops`])]),(b(!0),h(d,null,S(X.value,(e,t)=>(b(),h(`g`,{key:`plot_${t}_${e.id}`},[g(`defs`,null,[_(u,{t:`linear`,id:`grad_pos_${O.value}`,x1:`0%`,x2:`100%`,y1:`0%`,y2:`0%`,stops:[[`0%`,L.value.startColor,1],[`100%`,L.value.endColor,1]]},null,8,[`id`,`stops`]),_(u,{t:`linear`,id:`grad_neg_${O.value}`,x1:`0%`,x2:`100%`,y1:`0%`,y2:`0%`,stops:[[`0%`,L.value.endColor,1],[`100%`,L.value.startColor,1]]},null,8,[`id`,`stops`])]),![void 0,null].includes(e.end)&&![void 0,null].includes(e.start)?(b(),h(`g`,_t,[L.value.link.type===`curved`?(b(),h(`g`,vt,[g(`path`,{d:`M
2
- ${e.startX},${e.y+Y.value/2}
3
- C ${e.centerX},${e.y} ${e.centerX},${e.y}
4
- ${e.endX},${e.y+Y.value/2}
5
- L ${e.endX},${e.y-Y.value/2}
6
- C ${e.centerX},${e.y} ${e.centerX},${e.y}
7
- ${e.startX},${e.y-Y.value/2}
8
- Z
9
- `,fill:L.value.evaluationColors.enable?e.evaluationColor:e.endX>e.startX?`url(#grad_pos_${O.value})`:`url(#grad_neg_${O.value})`},null,8,yt)])):(b(),h(`g`,bt,[g(`rect`,{x:e.endX>e.startX?e.startX:e.endX,y:e.y-L.value.link.strokeWidth/2,height:Math.max(.01,L.value.link.strokeWidth),width:Math.max(.01,Math.abs(e.endX-e.startX)),fill:L.value.evaluationColors.enable?e.evaluationColor:e.endX>e.startX?`url(#grad_pos_${O.value})`:`url(#grad_neg_${O.value})`},null,8,xt)]))])):m(``,!0),[null,void 0].includes(e.start)?m(``,!0):(b(),h(`circle`,{key:1,cx:e.startX,cy:e.y,r:Y.value,fill:L.value.gradient.show?L.value.evaluationColors.enable?e.evaluationGrad:`url(#start_grad_${O.value})`:L.value.evaluationColors.enable?e.evaluationColor:L.value.startColor,stroke:L.value.stroke,"stroke-width":L.value.strokeWidth},null,8,St)),[null,void 0].includes(e.end)?m(``,!0):(b(),h(`circle`,{key:2,cx:e.endX,cy:e.y,r:Y.value,fill:L.value.gradient.show?L.value.evaluationColors.enable?e.evaluationGrad:`url(#end_grad_${O.value})`:L.value.evaluationColors.enable?e.evaluationColor:L.value.endColor,stroke:L.value.stroke,"stroke-width":L.value.strokeWidth},null,8,Ct))]))),128)),I.value.startLabels.show?(b(),h(`g`,wt,[(b(!0),h(d,null,S(X.value,(e,t)=>(b(),h(`g`,{key:`start_label_${t}_${e.id}`},[[null,void 0].includes(e.start)?m(``,!0):(b(),h(`text`,{key:0,x:e.startX,y:e.y+Y.value*2+I.value.startLabels.fontSize/2,fill:L.value.evaluationColors.enable&&I.value.startLabels.useEvaluationColor?e.evaluationColor:I.value.startLabels.useStartColor?L.value.startColor:I.value.startLabels.color,"font-size":I.value.startLabels.fontSize,"text-anchor":`middle`},w(T(l)(I.value.formatter,e.start,T(a)({p:I.value.prefix,v:e.start,s:I.value.suffix,r:I.value.startLabels.rounding}),{datapoint:e,seriesIndex:t})),9,Tt))]))),128))])):m(``,!0),I.value.endLabels.show?(b(),h(`g`,Et,[(b(!0),h(d,null,S(X.value,(e,t)=>(b(),h(`g`,{key:`end_label_${t}_${e.id}`},[[null,void 0].includes(e.end)?m(``,!0):(b(),h(`text`,{key:0,x:e.endX,y:e.y-(Y.value*2-I.value.startLabels.fontSize/3),fill:L.value.evaluationColors.enable&&I.value.endLabels.useEvaluationColor?e.evaluationColor:I.value.endLabels.useEndColor?L.value.endColor:I.value.endLabels.color,"font-size":I.value.endLabels.fontSize,"text-anchor":`middle`},w(T(l)(I.value.formatter,e.end,T(a)({p:I.value.prefix,v:e.end,s:I.value.suffix,r:I.value.endLabels.rounding}),{datapoint:e,seriesIndex:t})),9,Dt))]))),128))])):m(``,!0),g(`g`,null,[(b(!0),h(d,null,S(X.value,(e,t)=>(b(),h(`rect`,{x:J.value.left,y:J.value.top+t*Math.max(.1,J.value.rowHeight),width:Math.max(.1,J.value.width),height:Math.max(.1,J.value.rowHeight),fill:A.value===null?`transparent`:A.value===t?T(ee)(z.value.highlighter.color,z.value.highlighter.opacity):`transparent`,onMouseenter:n=>tr({datapoint:e,seriesIndex:t}),onMouseleave:n=>nr({datapoint:e,seriesIndex:t}),onClick:n=>rr({datapoint:e,seriesIndex:t})},null,40,Ot))),256))]),C(e.$slots,`svg`,{svg:{...J.value,isPrintingImg:T(Cn)||T(wn)||T(fr),isPrintingSvg:T(pr)}},void 0,!0)],46,tt)),e.$slots.hint?(b(),h(`div`,kt,[C(e.$slots,`hint`,Ve(Le({hint:P.value.a11y.translations.keyboardNavigation,isVisible:cn.value})),void 0,!0)])):m(``,!0)]),e.$slots.watermark?(b(),h(`div`,At,[C(e.$slots,`watermark`,Ve(Le({isPrinting:T(Cn)||T(wn)||T(fr)||T(pr)})),void 0,!0)])):m(``,!0),g(`div`,{id:`legend-bottom-${O.value}`},null,8,jt),en.value&&(z.value.legend.show||e.$slots.legend)?(b(),p(Pe,{key:6,to:z.value.legend.position===`top`?`#legend-top-${O.value}`:`#legend-bottom-${O.value}`},[g(`div`,{ref_key:`chartLegend`,ref:Jt},[C(e.$slots,`legend`,{legend:Bn.value},()=>[z.value.legend.show&&Gt.value?(b(),p(je,{key:`legend_${$t.value}`,legendSet:Bn.value,config:Vn.value,clickable:!1},{item:E(({legend:e})=>[g(`div`,{style:y(`display:flex;align-items:center;gap:4px;font-size:${z.value.legend.fontSize}px`)},[(b(),h(`svg`,{xmlns:T(se),viewBox:`0 0 20 20`,height:z.value.legend.fontSize,width:z.value.legend.fontSize},[g(`circle`,{cx:10,cy:10,r:9,fill:e.color},null,8,Nt)],8,Mt)),T(fn)?m(``,!0):(b(),h(d,{key:0},[Ie(w(e.name),1)],64))],4)]),_:1},8,[`legendSet`,`config`])):m(``,!0)],!0)],512)],8,[`to`])):m(``,!0),e.$slots.source?(b(),h(`div`,{key:7,ref_key:`source`,ref:Yt,dir:`auto`},[C(e.$slots,`source`,{},void 0,!0)],512)):m(``,!0),Gt.value&&P.value.userOptions.buttons.table?(b(),p(We(or.value.component),Re({key:8},or.value.props,{ref_key:`tableUnit`,ref:tn,onClose:sr}),Fe({content:E(()=>[(b(),p(T(Lt),{key:`table_${Qt.value}`,colNames:$.value.colNames,head:$.value.head,body:$.value.body,config:$.value.config,title:P.value.table.useDialog?``:or.value.title,withCloseButton:!P.value.table.useDialog,isCursorPointer:un.value,onClose:sr},{th:E(({th:e})=>[g(`div`,Pt,w(e),1)]),td:E(({td:e})=>[Ie(w(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[P.value.table.useDialog?{name:`title`,fn:E(()=>[Ie(w(or.value.title),1)]),key:`0`}:void 0,P.value.table.useDialog?{name:`actions`,fn:E(()=>[g(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[0]||=e=>Hn(P.value.userOptions.callbacks.csv),style:y({cursor:un.value?`pointer`:`default`})},[_(T(Ft),{name:`fileCsv`,stroke:or.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):m(``,!0),C(e.$slots,`skeleton`,{},()=>[T(fn)?(b(),p(de,{key:0})):m(``,!0)],!0)],46,Ze))}},[[`__scopeId`,`data-v-24ac57e2`]]);export{Xe as n,Ft as t};
@@ -1,3 +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-By3Vb5kz.js";import{$ as a,D as o,Dt as s,Ht as c,S as l,X as u,Zt as d,at as f,b as p,i as m,in as h,n as g,nn as _,nt as ee,r as v,t as y,w as te,zt as b}from"./lib-rPeBMZrn.js";import{n as x,t as ne}from"./BaseScanner-8NdoBs7B.js";import{n as re,t as S}from"./useHints-C-TwxM0Y.js";import{t as ie}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as ae}from"./useNestedProp-DnGoh-XS.js";import{t as oe}from"./useThemeCheck-BKNRbGeC.js";import{t as se}from"./chartImage-DPGnEuYM.js";import{n as ce}from"./Title-BliHuXfT.js";import{t as le}from"./useChartExport-BZts4KFb.js";import{n as ue,t as de}from"./tableIntegration-CNoJ1CIY.js";import{n as fe,t as pe}from"./userOptionsSlots-DYuo-E5m.js";import{t as me}from"./usePrinter-DVf3YcG5.js";import{c as he}from"./canvas-lib-22VpOI4_.js";import{t as ge}from"./useResponsive-CENUxfEL.js";import{t as _e}from"./A11yDataTable-DWNlWXzs.js";import{t as ve}from"./useUserOptionState-CXlFnwPv.js";import{t as ye}from"./useChartAccessibility-DOMuYJfm.js";import{t as be}from"./Legend-DM0ClX3D.js";import{t as xe}from"./vue_ui_flow-kvV56Es9.js";import{Fragment as Se,Teleport as Ce,computed as C,createBlock as w,createCommentVNode as T,createElementBlock as E,createElementVNode as D,createSlots as we,createTextVNode as Te,createVNode as Ee,defineAsyncComponent as O,guardReactiveProps as k,mergeProps as De,nextTick as Oe,normalizeClass as ke,normalizeProps as A,normalizeStyle as j,onMounted as Ae,openBlock as M,ref as N,renderList as P,renderSlot as F,resolveDynamicComponent as je,toDisplayString as I,toRefs as Me,unref as L,watch as Ne,withCtx as R}from"vue";var Pe=/* @__PURE__ */ e({default:()=>tt}),Fe=[`id`],Ie=[`id`],Le={key:2,ref:`noTitle`,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},Re=[`id`],ze={style:{position:`relative`}},Be=[`xmlns`,`aria-describedby`,`viewBox`],Ve=[`width`,`height`],He=[`id`],Ue=[`stop-color`],We=[`stop-color`],Ge=[`d`,`fill`,`stroke`,`stroke-width`],Ke=[`data-a11y-node-id`,`x`,`y`,`height`,`width`,`fill`,`stroke`,`stroke-width`,`rx`,`aria-label`,`onMouseenter`,`onMouseleave`,`onClick`],qe={key:1},Je=[`x`,`y`,`font-size`,`fill`],Ye=[`x`,`y`,`font-size`,`fill`],Xe={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Ze={key:5,class:`vue-data-ui-watermark`},Qe=[`id`],$e=[`onClick`],et={style:{display:`flex`,"align-items":`center`}},tt=/*#__PURE__*/ ie({__name:`vue-ui-flow`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`],setup(e,{expose:ie,emit:Pe}){let tt=O(()=>import(`./Tooltip-C1q0Qoh7.js`)),nt=O(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),rt=O(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),it=O(()=>import(`./DataTable-Dof6yhO7.js`)),at=O(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),ot=O(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),st=O(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),ct=O(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_flow:lt}=i(),{isThemeValid:ut,warnInvalidTheme:dt}=oe(),z=e,ft=Pe,B=N(u()),V=N(null),pt=N(0),mt=N(0),ht=N(!1),gt=N(``),_t=N(null),vt=N(null),yt=N(null),bt=N(null),xt=N(null),St=N(!1),Ct=N(null),wt=N(null),Tt=N(null),Et=N(null),Dt=N(null),Ot=N({x:0,y:0}),kt=N(`pointer`),At=N(!1),jt=C(()=>!!z.dataset&&z.dataset.length);Ae(()=>{St.value=!0,Bt()});let H=N(!1);function Mt(e){H.value=e,pt.value+=1}let U=N(Wt()),W=C(()=>U.value.style.chart.nodes.labels),G=C(()=>U.value.style.chart.nodes),Nt=C(()=>U.value.style.chart.links),K=C(()=>U.value.style.chart);re({config:()=>U.value,dataset:()=>z.dataset,component:`VueUiFlow`,rules:[S.emptyArray,S.noHint]});let Pt=C(()=>U.value.userOptions.useCursorPointer),Ft=C(()=>h({defaultConfig:{userOptions:{show:!1},nodeCategories:{B:`A`,C:`B`},nodeCategoryColors:{A:`#CACACA`,B:`#AAAAAA`},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,legend:{backgroundColor:`transparent`},nodes:{labels:{show:!1},stroke:`#666666`},links:{stroke:`#666666`}}}},userConfig:U.value.skeletonConfig??{}})),{loading:It,FINAL_DATASET:Lt,manualLoading:Rt}=x({...Me(z),FINAL_CONFIG:U,prepareConfig:Wt,skeletonDataset:z.config?.skeletonDataset??[[`A`,`B`,2,`#CACACA`],[`B`,`C`,1,`#CACACA`],[`C`,`D`,.5,`#CACACA`],[`E`,`F`,1,`#AAAAAA`],[`F`,`G`,.5,`#AAAAAA`],[`G`,`H`,.25,`#AAAAAA`]],skeletonConfig:h({defaultConfig:U.value,userConfig:Ft.value})}),zt=C(()=>U.value.debug);function Bt(){if(b(z.dataset)&&(f({componentName:`VueUiFlow`,type:`dataset`,debug:zt.value}),Rt.value=!0),b(z.dataset)||(Rt.value=U.value.loading),U.value.responsive){let e=he(()=>{let{width:e,height:t}=ge({chart:V.value,title:K.value.title.text?vt.value:null,legend:K.value.legend.show?_t.value:null,source:yt.value});requestAnimationFrame(()=>{Gt.value=e,Kt.value=t})});bt.value&&(xt.value&&bt.value.unobserve(xt.value),bt.value.disconnect()),bt.value=new ResizeObserver(e),xt.value=V.value.parentNode,bt.value.observe(xt.value)}}let{userOptionsVisible:Vt,setUserOptionsVisibility:Ht,keepUserOptionState:Ut}=ve({config:U.value}),{svgRef:q}=ye({config:K.value.title});function Wt(){let e=ae({userConfig:z.config,defaultConfig:lt}),t=e,n=e.theme;if(n){if(!ut.value(e))dt(e),t=e;else{let r=ae({userConfig:xe[n]||z.config,defaultConfig:e});t={...ae({userConfig:z.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:_[n]||c}}}else t=e;return t.nodeCategories=z.config.nodeCategories||{},t.nodeCategoryColors=z.config.nodeCategoryColors||{},t}let Gt=N(K.value.width),Kt=N(K.value.height),qt=d(z.config);Ne(()=>z.config,(e,t)=>{let n=d(e),r=n!==qt;qt=n;let i=Wt();r?(It.value||(U.value=i),Vt.value=!U.value.userOptions.showOnChartHover,Bt(),mt.value+=1,J.value.showTable=U.value.table.show):(U.value.style.chart.tooltip=i.style.chart.tooltip,J.value.showTooltip=U.value.style.chart.tooltip.show)},{deep:!0}),Ne(()=>z.dataset,e=>{Array.isArray(e)&&e.length>0&&(Rt.value=!1)},{deep:!0});let{isPrinting:Jt,isImaging:Yt,generatePdf:Xt,generateImage:Zt}=me({elementId:`flow_${B.value}`,fileName:K.value.title.text||`vue-ui-flow`,options:U.value.userOptions.print}),Qt=C(()=>U.value.userOptions.show&&!K.value.title.text),$t=C(()=>te(U.value.customPalette)),en=C(()=>G.value.width),J=N({showTable:U.value.table.show,showTooltip:K.value.tooltip.show});Ne(U,()=>{J.value={showTable:U.value.table.show,showTooltip:K.value.tooltip.show}},{immediate:!0});let tn=C(()=>!Lt.value||!Lt.value.length?[]:Lt.value.map((e,t)=>[e[0],e[1],p(e[2]),e[3]?l(e[3]):$t.value[t]||$t.value[t%$t.value.length]||c[t]||c[t%c.length]]));function nn(e){let t={},n={};function r(e,r){t[e]||(t[e]={level:null,inflow:0,outflow:0,children:[],color:null,uid:u()}),t[e].level===null&&(t[e].level=r),n[r]||(n[r]=[]),n[r].includes(e)||n[r].push(e)}e.forEach(([e,n,i])=>{let a=t[e]?.level??0,o=a+1;r(e,a),r(n,o),t[e].children.push({target:n,value:i}),t[e].outflow+=i,t[n].inflow+=i});let i=new Set(e.map(([e])=>e)),a=new Set(e.map(([,e])=>e)),o=Array.from(i).filter(e=>!a.has(e)),s={};o.forEach((e,t)=>{s[e]=$t.value[t]||c[t%c.length]});let l={};e.forEach(([e,t,n,r])=>{r&&(l[e]=r,l[t]=r)}),Object.keys(t).forEach((e,n)=>{let r=U.value.nodeCategories?.[e],i=r?U.value.nodeCategoryColors?.[r]:null;t[e].color=l[e]||i||(o.includes(e)?s[e]:null)||c[n%c.length]}),Object.keys(t).forEach(e=>{t[e].value=Math.max(t[e].inflow,t[e].outflow)});let d=on.value,f=sn.value.width,m=sn.value.height,h=Object.keys(n).map(Number).sort((e,t)=>e-t),g=h.length||1,_=g>1?f/(g-1):0,ee=Number(en.value),v=Number(G.value.gapPx??G.value.gap??8),y=Number(G.value.minHeight||0);function te(e){let r=n[e],i=r.length;if(!i)return 1/0;let a=Math.max(0,(i-1)*v),o=Math.max(0,m-a),s=Math.min(y,i?o/i:0),c=0,l=r.map(e=>t[e].value||0),u=l.reduce((e,t)=>e+t,0);for(let e=0;e<12;e+=1){let e=u>0?(o-c)/u:0,t=[];for(let n=0;n<l.length;n+=1){let r=l[n];r<0||r*e<s&&t.push(n)}if(!t.length)return Math.max(0,e);for(let e of t)c+=s,u-=l[e],l[e]=-1;if(u<=0)return 0}return u>0?Math.max(0,(o-c)/u):0}let b=h.map(te),x=b.length?Math.min(...b):0,ne={};h.forEach(e=>{let r=n[e],i=r.length,a=Math.max(0,(i-1)*v),o=Math.max(0,m-a),s=Math.min(y,i?o/i:0),c=r.map(e=>Math.max(s,(t[e].value||0)*x)),l=c.reduce((e,t)=>e+t,0)+a,f=Math.max(0,(m-l)/2);r.forEach((n,r)=>{let a=c[r],o=d.left+e*_,s=f;ne[n]={x:o,y:s,absoluteY:s,height:a,i:r,color:t[n].color,value:t[n].value,id:u()},f+=a,r<i-1&&(f+=v)})});let re=[],S=d.top,ie={},ae={};Object.keys(t).forEach(e=>{ie[e]=ne[e]?.y??0,ae[e]=0});let oe=!!Nt.value.smooth,se=.5;return h.forEach(e=>{n[e].forEach(e=>{let n=t[e],r=ne[e];if(!n.children||!n.children.length)return;let i=r.y;n.children.forEach(({target:a,value:o})=>{let s=ne[a],c=t[a],l=n.outflow>0?o/n.outflow:0,d=c.inflow>0?o/c.inflow:0,f=p(i+S),m=p(i+l*r.height+S),h=ie[a],g=h+d*s.height;ae[a]+=o;let _=c.inflow>0&&ae[a]>=c.inflow-1e-6,v=s.y+s.height;(_||g>v-.25)&&(g=v);let y=p(h+S),te=p(g+S),b=p(r.x+ee),x=p(s.x),ce;if(!oe||x<=b)ce=`M ${b} ${f} L ${b} ${m} L ${x} ${te} L ${x} ${y} Z`;else{let e=x-b,t=p(b+e*se),n=p(x-e*se),r=f,i=y,a=m,o=te;ce=`M ${b} ${r} C ${t} ${r}, ${n} ${i}, ${x} ${i} L ${x} ${o} C ${n} ${o}, ${t} ${a}, ${b} ${a} Z`}re.push({id:u(),source:e,target:a,path:ce,value:o,sourceColor:n.color,targetColor:t[a].color}),i=m-S,ie[a]=g})})}),{nodeCoordinates:ne,links:re}}let Y=C(()=>{let e=nn(Lt.value);return{nodes:Object.keys(e.nodeCoordinates).map((t,n)=>({...e.nodeCoordinates[t],name:t})),links:e.links}}),rn=C(()=>Gt.value),an=C(()=>Kt.value),on=C(()=>K.value.padding),sn=C(()=>({width:Math.max(0,rn.value-40-on.value.right-on.value.left),height:Math.max(0,an.value-on.value.top-on.value.bottom)})),cn=C(()=>({width:rn.value,height:an.value}));function ln(e){let t={},n={},r=/* @__PURE__ */ new Set;return tn.value.forEach(([e,r,i])=>{t[e]||(t[e]=[]),n[r]||(n[r]=[]),t[e].push(r),n[r].push(e)}),t[e]&&t[e].forEach(e=>r.add(e)),n[e]&&n[e].forEach(e=>r.add(e)),Array.from(r).concat(e)}let X=N(null),Z=N(null),un=N(null),dn=N(!1),fn=N(null);function pn(){fn.value=null,X.value=null,Z.value=null,ht.value=!1,Et.value=null,Dt.value=null}function mn(e){if(!q.value||!e)return;let t=q.value.querySelector(`[data-a11y-node-id="${e}"]`);if(!t)return;let n=t.getBoundingClientRect();Ot.value={x:n.left+n.width/2,y:n.top+n.height/2}}function hn(e,t,n=`pointer`,r=null){$.value=[],X.value=ln(e.name),Z.value=e.name,fn.value=e.id,kt.value=n,Et.value=r,Dt.value=e.id;let i=e.name,o=tn.value,c=0,l=0,u=[],d=[],f=new Set(o.map(([e])=>e)),p=new Set(o.map(([,e])=>e)),h=Array.from(f).filter(e=>!p.has(e)),g=o.filter(([e])=>h.includes(e)).reduce((e,[t,n,r])=>e+r,0),_={};Y.value.nodes.forEach(e=>{_[e.name]=e.color}),o.forEach(([e,t,n])=>{t===i&&(c+=n,u.push({source:e,value:n,color:_[e]})),e===i&&(l+=n,d.push({target:t,value:n,color:_[t]}))});let ee=g>0?Math.max(c,l)/g*100:0,v={name:i,inflow:c,outflow:l,from:u,to:d,percentOfTotal:ee,color:_[i]||`#000000`};U.value.events.datapointEnter&&U.value.events.datapointEnter({datapoint:v,seriesIndex:t}),un.value={datapoint:v,config:U.value,seriesIndex:t,series:Y.value},ht.value=!0;let y=``,te=K.value.tooltip.customFormat;if(dn.value=!1,s(te))try{let e=te({datapoint:v,series:Y.value,config:U.value});typeof e==`string`&&(gt.value=e,dn.value=!0)}catch{console.warn(`Custom format cannot be applied.`)}if(!dn.value){let e=K.value.tooltip.showPercentage?`<div>${a({p:K.value.tooltip.translations.percentOfTotal,v:v.percentOfTotal,s:`%`,r:K.value.tooltip.roundingPercentage})}</div>`:``;y+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${K.value.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;"><span style="margin-right:4px; color:${v.color}">⏹</span>${v.name}${e}</div>`,v.from.length&&(y+=`<div>${K.value.tooltip.translations.from}</div>`,v.from.forEach(e=>{y+=`<div><span style="color:${e.color}">⏹←</span> ${e.source}: ${m(W.value.formatter,e.value,a({p:W.value.prefix,v:e.value,s:W.value.suffix,r:W.value.rounding}))}</div>`})),v.to.length&&(y+=`<div style="margin-top:6px;">${K.value.tooltip.translations.to}</div>`,v.to.forEach(e=>{y+=`<div><span style="color:${e.color}">⏹→</span> ${e.target}: ${m(W.value.formatter,e.value,a({p:W.value.prefix,v:e.value,s:W.value.suffix,r:W.value.rounding}))}</div>`})),gt.value=y}n===`keyboard`&&Oe(()=>{mn(e.id)})}function gn(e){let t=un.value;U.value.events.datapointLeave&&U.value.events.datapointLeave({datapoint:t,seriesIndex:e}),!(kt.value===`keyboard`&&Dt.value)&&(fn.value=null,X.value=null,Z.value=null,ht.value=!1)}function _n(e){let t=un.value;U.value.events.datapointClick&&U.value.events.datapointClick({datapoint:t,seriesIndex:e})}let vn=C(()=>Y.value.links.map(({source:e,target:t,sourceColor:n,targetColor:r,value:i})=>({source:e,target:t,sourceColor:n,targetColor:r,value:i})));function yn(e=null){Oe(()=>{let t=vn.value.map((e,t)=>[[e.source],[e.target],[e.value]]),n=[[K.value.title.text],[K.value.title.subtitle.text],[[U.value.table.columnNames.source],[U.value.table.columnNames.target],[U.value.table.columnNames.value]]].concat(t),r=o(n);e?e(r):ee({csvContent:r,title:K.value.title.text||`vue-ui-flow`})})}let bn=C(()=>{let e=[U.value.table.columnNames.source,U.value.table.columnNames.target,U.value.table.columnNames.value],t=vn.value.map((e,t)=>[{color:e.sourceColor,name:e.source,shape:`square`},{color:e.targetColor,name:e.target,shape:`square`},a({p:W.value.prefix,v:e.value,s:W.value.suffix,r:W.value.rounding})]),n={th:{backgroundColor:U.value.table.th.backgroundColor,color:U.value.table.th.color,outline:U.value.table.th.outline},td:{backgroundColor:U.value.table.td.backgroundColor,color:U.value.table.td.color,outline:U.value.table.td.outline},breakpoint:U.value.table.responsiveBreakpoint};return{colNames:[U.value.table.columnNames.source,U.value.table.columnNames.target,U.value.table.columnNames.value],head:e,body:t,config:n}}),xn=C(()=>({headers:bn.value?.colNames??[],rows:bn.value?.body??[]})),Sn=C(()=>[...Y.value.nodes].map((e,t)=>({...e,index:t,centerX:e.x+en.value/2,centerY:p(e.absoluteY)+K.value.padding.top+e.height/2})).sort((e,t)=>e.x===t.x?e.absoluteY-t.absoluteY:e.x-t.x)),Q=C(()=>{let e=[];return Sn.value.forEach(t=>{let n=e.find(e=>Math.abs(e.x-t.x)<=1);n?n.nodes.push(t):e.push({x:t.x,nodes:[t]})}),e.forEach(e=>{e.nodes.sort((e,t)=>e.absoluteY-t.absoluteY)}),e.sort((e,t)=>e.x-t.x)}),Cn=C(()=>{let e=/* @__PURE__ */ new Map;return Sn.value.forEach((t,n)=>{e.set(t.id,n)}),e});function wn(){return Y.value}function Tn(){J.value.showTable=!J.value.showTable}let En=N(!1);function Dn(){En.value=!En.value}function On(){J.value.showTooltip=!J.value.showTooltip}let kn=C(()=>{let e=new Set(Y.value.nodes.map(e=>U.value.nodeCategories[e.name]||`__uncategorized__`));return Array.from(e).map(e=>({name:e,color:U.value.nodeCategoryColors[e]||c[0],shape:`square`,count:Y.value.nodes.filter(t=>(U.value.nodeCategories[t.name]||`__uncategorized__`)===e).length})).map((e,t)=>{let n=$.value.includes(t);return{...e,segregate:()=>jn({legend:e,i:t}),isSegregated:n,opacity:$.value.length?n?1:.5:1,display:`${e.name} (${e.count})`}})}),An=C(()=>kn.value.filter(e=>e.name!==`__uncategorized__`)),$=N([]);function jn({legend:e,i:t}){let n=e.name;X.value?.every(e=>U.value.nodeCategories[e]===n)?(X.value=null,Z.value=null,$.value=[]):($.value=[t],X.value=Y.value.nodes.filter(e=>U.value.nodeCategories[e.name]===n).map(e=>e.name),Z.value=null)}let Mn=C(()=>({cy:`flow-legend`,backgroundColor:K.value.legend.backgroundColor,color:K.value.legend.color,fontSize:K.value.legend.fontSize,paddingBottom:K.value.legend.paddingBottom,fontWeight:K.value.legend.bold?`bold`:`normal`})),Nn=se(V,()=>K.value.title.text),Pn=C(()=>de({config:U,style:K,mutableConfig:J,dialog:ct,accordion:rt,isFullscreen:H,parent:V,maxWidth:800,isCursorPointer:Pt}));Ne(()=>J.value.showTable,e=>ue(e,U,Ct));function Fn(){J.value.showTable=!1,wt.value&&wt.value.setTableIconState(!1)}let In=C(()=>An.value.map(e=>({...e,name:e.display}))),Ln=C(()=>K.value.backgroundColor),Rn=C(()=>K.value.legend),zn=C(()=>K.value.title),{isCallbackImaging:Bn,isCallbackSvg:Vn,generateSvg:Hn,onGenerateImage:Un}=le({svg:q,title:zn,legend:Rn,legendItems:In,backgroundColor:Ln,getSvgCallback:()=>U.value.userOptions.callbacks.svg,generateImage:Zt});async function Wn(){ft(`copyAlt`,{config:U.value,dataset:Y.value}),U.value.userOptions.callbacks.altCopy?await Promise.resolve(U.value.userOptions.callbacks.altCopy({config:U.value,dataset:Y.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Gn(e){return Q.value.findIndex(t=>t.nodes.some(t=>t.id===e))}function Kn(e,t){let n=Q.value[e];return n?n.nodes.findIndex(e=>e.id===t):-1}function qn(e,t){let n=Q.value[e];if(!n||!n.nodes.length)return null;let r=n.nodes[0],i=Math.abs(r.centerY-t);for(let e=1;e<n.nodes.length;e+=1){let a=n.nodes[e],o=Math.abs(a.centerY-t);o<i&&(r=a,i=o)}return r}function Jn(){Et.value=null,Dt.value=null,At.value=!0}function Yn(){pn(),At.value=!1}function Xn(e){if(!q.value||En.value||document.activeElement!==q.value||!Sn.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){pn();return}if(a){if(Et.value===null)return;_n(Et.value);return}if(Dt.value===null){let e=Q.value[0]?.nodes?.[0];if(!e)return;let t=Cn.value.get(e.id)??0;hn(e,t,`keyboard`,t);return}let s=Cn.value.get(Dt.value);if(s===void 0)return;let c=Sn.value[s];if(!c)return;let l=Gn(c.id);if(l<0)return;let u=null;if(r||i){let e=Kn(l,c.id);if(e<0)return;let t=Q.value[l];if(!t?.nodes?.length)return;let n=e+(i?1:-1);n<0&&(n=t.nodes.length-1),n>=t.nodes.length&&(n=0),u=t.nodes[n]}if(t||n){let e=l+(n?1:-1);e<0&&(e=Q.value.length-1),e>=Q.value.length&&(e=0),u=qn(e,c.centerY)}if(!u)return;let d=Cn.value.get(u.id);d!==void 0&&hn(u,d,`keyboard`,d)}return ie({getData:wn,getImage:Nn,generateCsv:yn,generateImage:Zt,generateSvg:Hn,generatePdf:Xt,toggleTable:Tn,toggleAnnotator:Dn,toggleTooltip:On,drillCategory:jn,unselectNode:gn,toggleFullscreen:Mt,copyAlt:Wn}),(e,i)=>(M(),E(`div`,{ref_key:`flowChart`,ref:V,class:ke(`vue-data-ui-component vue-ui-flow ${H.value?`vue-data-ui-wrapper-fullscreen`:``}`),style:j(`font-family:${U.value.style.fontFamily};width:100%; text-align:center;background:${K.value.backgroundColor}`),id:`flow_${B.value}`,onMouseenter:i[2]||=()=>L(Ht)(!0),onMouseleave:i[3]||=()=>{L(Ht)(!1),At.value||pn()}},[D(`div`,{id:`chart-instructions-${B.value}`,class:`sr-only`},[D(`p`,null,I(U.value.a11y.translations.keyboardNavigation),1)],8,Ie),xn.value?.rows?.length?(M(),w(_e,{key:0,uid:B.value,head:xn.value.headers,body:xn.value.rows,notice:U.value.a11y.translations.tableAvailable,caption:U.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):T(``,!0),U.value.userOptions.buttons.annotator?(M(),w(L(at),De({key:1},L(n)(U.value.userOptions.annotator),{svgRef:L(q),backgroundColor:K.value.backgroundColor,color:K.value.color,active:En.value,palette:U.value.userOptions.annotatorPalette,isCursorPointer:Pt.value,onClose:Dn}),we({_:2},[P(L(r),n=>({name:n,fn:R(r=>[F(e.$slots,n,A(k(L(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`palette`,`isCursorPointer`])):T(``,!0),Qt.value?(M(),E(`div`,Le,null,512)):T(``,!0),K.value.title.text?(M(),E(`div`,{key:3,ref_key:`chartTitle`,ref:vt,style:`width:100%;background:transparent;padding-bottom:24px`},[(M(),w(ce,{key:`title_${mt.value}`,config:{title:{cy:`flow-title`,...K.value.title},subtitle:{cy:`flow-subtitle`,...K.value.title.subtitle}}},null,8,[`config`]))],512)):T(``,!0),D(`div`,{id:`legend-top-${B.value}`},null,8,Re),U.value.userOptions.show&&jt.value&&(L(Ut)||L(Vt))?(M(),w(L(ot),{ref_key:`userOptionsRef`,ref:wt,key:`user_option_${pt.value}`,backgroundColor:K.value.backgroundColor,color:K.value.color,isPrinting:L(Jt),isImaging:L(Yt),uid:B.value,hasPdf:U.value.userOptions.buttons.pdf,hasXls:U.value.userOptions.buttons.csv,hasImg:U.value.userOptions.buttons.img,hasSvg:U.value.userOptions.buttons.svg,hasTable:U.value.userOptions.buttons.table,callbacks:U.value.userOptions.callbacks,hasFullscreen:U.value.userOptions.buttons.fullscreen,hasAltCopy:U.value.userOptions.buttons.altCopy,isFullscreen:H.value,titles:{...U.value.userOptions.buttonTitles},chartElement:V.value,position:U.value.userOptions.position,hasAnnotator:U.value.userOptions.buttons.annotator,printScale:U.value.userOptions.print.scale,isAnnotation:En.value,hasTooltip:K.value.tooltip.show&&U.value.userOptions.buttons.tooltip,isTooltip:J.value.showTooltip,tableDialog:U.value.table.useDialog,isCursorPointer:Pt.value,onToggleTooltip:On,onToggleFullscreen:Mt,onGeneratePdf:L(Xt),onGenerateCsv:yn,onGenerateImage:L(Un),onGenerateSvg:L(Hn),onToggleTable:Tn,onToggleAnnotator:Dn,onCopyAlt:Wn,style:j({visibility:L(Ut)?L(Vt)?`visible`:`hidden`:`visible`})},we({_:2},[P(L(fe)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:R(n=>[F(e.$slots,t,A(k(L(pe)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasXls.hasImg.hasSvg.hasTable.callbacks.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasAnnotator.printScale.isAnnotation.hasTooltip.isTooltip.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):T(``,!0),D(`div`,ze,[(M(),E(`svg`,{ref_key:`svgRef`,ref:q,xmlns:L(y),"aria-describedby":`chart-instructions-${B.value}`,viewBox:`0 0 ${cn.value.width} ${cn.value.height}`,class:ke({"vue-data-ui-fullscreen--on":H.value,"vue-data-ui-fulscreen--off":!H.value}),style:j({maxWidth:`100%`,overflow:`visible`,background:`transparent`,color:K.value.color}),tabindex:`0`,onFocus:Jn,onBlur:Yn,onKeydown:Xn},[Ee(L(st)),F(e.$slots,`svg-underlayer`,{svg:{...cn.value,isPrintingImg:L(Jt)||L(Yt)||L(Bn),isPrintingSvg:L(Vn)}},void 0,!0),e.$slots[`chart-background`]?(M(),E(`foreignObject`,{key:0,x:0,y:0,width:cn.value.width,height:cn.value.height,style:{pointerEvents:`none`}},[F(e.$slots,`chart-background`,{},void 0,!0)],8,Ve)):T(``,!0),D(`defs`,null,[(M(!0),E(Se,null,P(Y.value.links,(e,t)=>(M(),E(`linearGradient`,{id:e.id,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`},[D(`stop`,{offset:`0%`,"stop-color":e.sourceColor},null,8,Ue),D(`stop`,{offset:`100%`,"stop-color":e.targetColor},null,8,We)],8,He))),256))]),(M(!0),E(Se,null,P(Y.value.links,e=>(M(),E(`path`,{class:`vue-ui-flow-link`,d:e.path,"stroke-linejoin":`round`,"stroke-miterlimit":`1`,fill:`url(#${e.id})`,stroke:Nt.value.stroke,"stroke-width":Nt.value.strokeWidth,style:j(`
2
- opacity:${X.value?X.value.includes(e.source)&&X.value.includes(e.target)?1:.3:Z.value?[e.target,e.source].includes(Z.value)?1:.3:Nt.value.opacity}
3
- `)},null,12,Ge))),256)),(M(!0),E(Se,null,P(Y.value.nodes,(e,t)=>(M(),E(`rect`,{"data-a11y-node-id":e.id,class:`vue-ui-flow-node`,x:e.x,y:L(p)(e.absoluteY)+K.value.padding.top,height:L(p)(e.height),width:en.value,fill:e.color,stroke:G.value.stroke,"stroke-width":G.value.strokeWidth,rx:G.value.borderRadius,style:j({opacity:X.value?X.value.includes(e.name)?1:.3:1,outline:fn.value!==null&&fn.value===e.id?`2px solid currentColor`:void 0}),"aria-label":`${e.name}: ${L(m)(W.value.formatter,e.value,L(a)({p:W.value.prefix,v:e.value,s:W.value.suffix,r:W.value.rounding}))}`,onMouseenter:n=>hn(e,t,`pointer`,Cn.value.get(e.id)),onMouseleave:e=>gn(t),onClick:e=>_n(t)},null,44,Ke))),256)),W.value.show?(M(),E(`g`,qe,[(M(!0),E(Se,null,P(Y.value.nodes,(e,t)=>(M(),E(`text`,{x:e.x+en.value/2,y:(W.value.showValue?L(p)(e.absoluteY+e.height/2-W.value.fontSize/4):e.absoluteY+e.height/2+W.value.fontSize/3)+K.value.padding.top,"font-size":W.value.fontSize,fill:L(v)(e.color),"text-anchor":`middle`,style:j(`pointer-events: none; opacity:${X.value?+!!X.value.includes(e.name):1}`)},I(W.value.abbreviation.use?L(g)({source:e.name,length:G.value.labels.abbreviation.length}):e.name),13,Je))),256)),W.value.showValue?(M(!0),E(Se,{key:0},P(Y.value.nodes,(e,t)=>(M(),E(`text`,{x:e.x+en.value/2,y:L(p)(e.absoluteY+e.height/2+W.value.fontSize/1.3)+K.value.padding.top,"font-size":W.value.fontSize,fill:L(v)(e.color),"text-anchor":`middle`,style:j(`pointer-events: none; opacity:${X.value?+!!X.value.includes(e.name):1}`)},I(L(m)(W.value.formatter,e.value,L(a)({p:W.value.prefix,v:e.value,s:W.value.suffix,r:W.value.rounding}),{datapoint:e,seriesIndex:t})),13,Ye))),256)):T(``,!0)])):T(``,!0),F(e.$slots,`svg`,{svg:{...cn.value,isPrintingImg:L(Jt)||L(Yt)||L(Bn),isPrintingSvg:L(Vn)}},void 0,!0)],46,Be)),e.$slots.hint?(M(),E(`div`,Xe,[F(e.$slots,`hint`,A(k({hint:U.value.a11y.translations.keyboardNavigation,isVisible:At.value})),void 0,!0)])):T(``,!0)]),e.$slots.watermark?(M(),E(`div`,Ze,[F(e.$slots,`watermark`,A(k({isPrinting:L(Jt)||L(Yt)||L(Bn)||L(Vn)})),void 0,!0)])):T(``,!0),D(`div`,{id:`legend-bottom-${B.value}`},null,8,Qe),St.value&&(K.value.legend.show||e.$slots.legend)?(M(),w(Ce,{key:6,to:K.value.legend.position===`top`?`#legend-top-${B.value}`:`#legend-bottom-${B.value}`},[D(`div`,{ref_key:`chartLegend`,ref:_t},[F(e.$slots,`legend`,{legend:kn.value},()=>[K.value.legend.show&&An.value.length?(M(),w(be,{key:0,legendSet:An.value,config:Mn.value,isCursorPointer:Pt.value,onClickMarker:i[0]||=e=>jn(e)},{item:R(({legend:e,index:t})=>[L(It)?T(``,!0):(M(),E(`div`,{key:0,onClick:t=>e.segregate(),style:j(`opacity:${$.value.length?$.value.includes(t)?1:.5:1}`)},I(e.display),13,$e))]),_:1},8,[`legendSet`,`config`,`isCursorPointer`])):T(``,!0)],!0)],512)],8,[`to`])):T(``,!0),e.$slots.source?(M(),E(`div`,{key:7,ref_key:`source`,ref:yt,dir:`auto`},[F(e.$slots,`source`,{},void 0,!0)],512)):T(``,!0),Ee(L(tt),{ref_key:`tooltip`,ref:Tt,teleportTo:K.value.tooltip.teleportTo,show:J.value.showTooltip&&ht.value,backgroundColor:K.value.tooltip.backgroundColor,color:K.value.tooltip.color,fontSize:K.value.tooltip.fontSize,borderRadius:K.value.tooltip.borderRadius,borderColor:K.value.tooltip.borderColor,borderWidth:K.value.tooltip.borderWidth,backgroundOpacity:K.value.tooltip.backgroundOpacity,position:K.value.tooltip.position,offsetX:K.value.tooltip.offsetX,offsetY:K.value.tooltip.offsetY,parent:V.value,content:gt.value,isCustom:dn.value,isFullscreen:H.value,smooth:K.value.tooltip.smooth,backdropFilter:K.value.tooltip.backdropFilter,smoothForce:K.value.tooltip.smoothForce,smoothSnapThreshold:K.value.tooltip.smoothSnapThreshold,isA11yMode:kt.value===`keyboard`,a11yPosition:Ot.value},{"tooltip-before":R(()=>[F(e.$slots,`tooltip-before`,A(k({...un.value})),void 0,!0)]),tooltip:R(()=>[F(e.$slots,`tooltip`,A(k({...un.value})),void 0,!0)]),"tooltip-after":R(()=>[F(e.$slots,`tooltip-after`,A(k({...un.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`]),jt.value&&U.value.userOptions.buttons.table?(M(),w(je(Pn.value.component),De({key:8},Pn.value.props,{ref_key:`tableUnit`,ref:Ct,onClose:Fn}),we({content:R(()=>[Ee(L(it),{colNames:bn.value.colNames,head:bn.value.head,body:bn.value.body,config:bn.value.config,title:U.value.table.useDialog?``:Pn.value.title,withCloseButton:!U.value.table.useDialog,isCursorPointer:Pt.value,onClose:Fn},{th:R(({th:e})=>[D(`div`,et,I(e),1)]),td:R(({td:e})=>[Te(I(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`])]),_:2},[U.value.table.useDialog?{name:`title`,fn:R(()=>[Te(I(Pn.value.title),1)]),key:`0`}:void 0,U.value.table.useDialog?{name:`actions`,fn:R(()=>[D(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[1]||=e=>yn(U.value.userOptions.callbacks.csv),style:j({cursor:Pt.value?`pointer`:`default`})},[Ee(L(nt),{name:`fileCsv`,stroke:Pn.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):T(``,!0),F(e.$slots,`skeleton`,{},()=>[L(It)?(M(),w(ne,{key:0})):T(``,!0)],!0)],46,Fe))}},[[`__scopeId`,`data-v-89d99db5`]]);export{Pe as n,tt 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-By3Vb5kz.js";import{$ as a,D as ee,Ft as te,S as ne,X as re,at as ie,i as o,nt as ae,r as oe,rn as se,t as ce,yt as le,zt as ue}from"./lib-rPeBMZrn.js";import{n as de,t as fe}from"./useHints-C-TwxM0Y.js";import{t as pe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as me}from"./resolveChartConfig-CIhClE5R.js";import{t as he}from"./chartImage-DPGnEuYM.js";import{n as ge}from"./Title-BliHuXfT.js";import{t as _e}from"./useChartExport-BZts4KFb.js";import{n as ve,t as ye}from"./tableIntegration-CNoJ1CIY.js";import{n as be,t as xe}from"./userOptionsSlots-DYuo-E5m.js";import{t as Se}from"./usePrinter-DVf3YcG5.js";import{c as Ce}from"./canvas-lib-22VpOI4_.js";import{t as we}from"./useResponsive-CENUxfEL.js";import{t as Te}from"./DefGrad-DKMq1REY.js";import{t as Ee}from"./useUserOptionState-CXlFnwPv.js";import{t as De}from"./useChartAccessibility-DOMuYJfm.js";import{t as Oe}from"./usePrefersMotion-XLHwega2.js";import{t as ke}from"./vue_ui_funnel-CaEV5hG7.js";import{Fragment as s,computed as c,createBlock as l,createCommentVNode as u,createElementBlock as d,createElementVNode as f,createSlots as Ae,createTextVNode as je,createVNode as Me,defineAsyncComponent as p,guardReactiveProps as Ne,mergeProps as m,nextTick as Pe,normalizeClass as h,normalizeProps as g,normalizeStyle as _,onBeforeUnmount as Fe,onMounted as Ie,openBlock as v,ref as y,renderList as b,renderSlot as x,resolveDynamicComponent as Le,shallowRef as Re,toDisplayString as S,unref as C,useCssVars as ze,watch as Be,withCtx as w}from"vue";var Ve=/* @__PURE__ */ e({default:()=>et}),He=[`id`],Ue=[`xmlns`,`viewBox`],We=[`width`,`height`],Ge=[`stroke`,`stroke-width`],Ke=[`stroke`,`stroke-width`],qe=[`x`,`y`,`font-size`,`fill`,`font-weight`],Je=[`points`,`fill`],Ye=[`stroke`,`stroke-width`,`rx`],Xe=[`x`,`y`,`font-size`,`fill`,`font-weight`],Ze=[`x`,`y`,`font-size`,`fill`,`font-weight`],Qe={key:5,class:`vue-data-ui-watermark`},$e={style:{display:`flex`,"align-items":`center`}},et=/*#__PURE__*/ pe({__name:`vue-ui-funnel`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`],setup(e,{expose:pe,emit:Ve}){ze(e=>({v1ffebd55:Pt.value}));let et=p(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),tt=p(()=>import(`./vue-ui-skeleton-98OnGJ2N.js`).then(e=>e.n)),nt=p(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),rt=p(()=>import(`./DataTable-Dof6yhO7.js`)),it=p(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),at=p(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),ot=p(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),st=p(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_funnel:ct}=i(),T=Oe(),E=e,lt=Ve,D=y(null),O=y(re()),ut=y(0),dt=y(0),ft=y(0),pt=y(null),mt=y(null),ht=y(null),k=Re(null),A=Re(null),j=y(!1),gt=y(null),_t=y(null),M=c(()=>!!E.dataset&&E.dataset.length);Ie(bt),Fe(()=>{k.value&&(A.value&&k.value.unobserve(A.value),k.value.disconnect())});function vt(){return me(E.config,ct,ke)}let N=c({get:()=>vt(),set:e=>e}),yt=c(()=>N.value.debug),P=c(()=>N.value.style.chart.bars),F=c(()=>N.value.style.chart.circles),I=c(()=>N.value.style.chart);function bt(){if(ue(E.dataset)?ie({componentName:`VueUiFunnel`,type:`dataset`,debug:yt.value}):E.dataset.forEach((e,t)=>{le({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{M.value=!1,ie({componentName:`VueUiFunnel`,type:`datasetSerieAttribute`,property:e,index:t,debug:yt.value})})}),N.value.responsive){let e=Ce(()=>{let{width:e,height:t}=we({chart:D.value,title:I.value.title.text?ht.value:null,source:mt.value,noTitle:pt.value});requestAnimationFrame(()=>{V.value.height=t,V.value.width=e,U.value=kt(),N.value.responsiveProportionalSizing?(B.value.circles=se({relator:Math.min(e,t),adjuster:600,source:F.value.dataLabels.fontSize,threshold:10,fallback:10}),B.value.names=se({relator:Math.min(e,t),adjuster:600,source:P.value.dataLabels.name.fontSize,threshold:10,fallback:10}),B.value.values=se({relator:Math.min(e,t),adjuster:600,source:P.value.dataLabels.value.fontSize,threshold:10,fallback:10})):(B.value.circles=F.value.dataLabels.fontSize,B.value.names=P.value.dataLabels.name.fontSize,B.value.values=P.value.dataLabels.value.fontSize)})});k.value&&(A.value&&k.value.unobserve(A.value),k.value.disconnect()),k.value=new ResizeObserver(e),A.value=D.value.parentNode,k.value.observe(A.value)}}de({config:()=>N.value,dataset:()=>E.dataset,component:`VueUiFunnel`,rules:[fe.emptyArray,{test:e=>e.length>10,message:[`👀 The dataset has a length > 10. Consider:`,``,`▶️ Aggregating some datapoints into broader categories`]}]});let xt=c(()=>N.value.userOptions.useCursorPointer),{userOptionsVisible:St,setUserOptionsVisibility:Ct,keepUserOptionState:wt}=Ee({config:N.value}),{svgRef:Tt}=De({config:I.value.title});Be(()=>E.config,e=>{N.value=vt(),St.value=!N.value.userOptions.showOnChartHover,bt(),dt.value+=1,ft.value+=1,B.value.circles=F.value.dataLabels.fontSize,B.value.names=P.value.dataLabels.name.fontSize,B.value.values=P.value.dataLabels.value.fontSize,z.value.showTable=N.value.table.show},{deep:!0});let{isPrinting:L,isImaging:R,generatePdf:Et,generateImage:Dt}=Se({elementId:`funnel_${O.value}`,fileName:I.value.title.text||`vue-ui-funnel`,options:N.value.userOptions.print}),Ot=c(()=>N.value.userOptions.show&&!I.value.title.text),z=y({showTable:N.value.table.show}),B=y({circles:F.value.dataLabels.fontSize,names:P.value.dataLabels.name.fontSize,values:P.value.dataLabels.value.fontSize}),V=c({get:()=>({height:I.value.height,width:I.value.width}),set:e=>e}),H=c(()=>M.value?E.dataset.map((e,t)=>({...e,color:e.color?ne(e.color):te(P.value.defaultColor,t/E.dataset.length)})):[]);setTimeout(()=>{j.value=!0},H.value.length*150);function kt(){let e=I.value.padding.left,t=I.value.padding.top;return{left:e,top:t,right:V.value.width-I.value.padding.right,bottom:V.value.height-I.value.padding.bottom,width:V.value.width-e-I.value.padding.right,height:V.value.height-t-I.value.padding.bottom}}let U=y(kt()),W=c(()=>U.value.height/E.dataset.length),G=c(()=>W.value*P.value.gapRatio),At=c(()=>U.value.width*I.value.barCircleSpacingRatio),K=c(()=>H.value.map((e,t)=>{let n=W.value-G.value,r=U.value.top+G.value/2*t+(W.value-G.value/2)*t+G.value/2,i=e.value/H.value[0].value,a=(U.value.width-n-At.value)*(e.value/H.value[0].value);return{...e,cx:U.value.left+n/2,cy:r+n/2,datapointIndex:t,fill:e.color,height:Math.max(n,0),proportion:i,r:Math.max(n/2,0),width:Math.max(a,0),x:U.value.left+n+At.value,y:r}})),jt=c(()=>{let e=K.value.map(e=>`${e.x+e.width},${e.y+(W.value-G.value)/2}`);return`${K.value[0].x},${K.value[0].y+(W.value-G.value)/2} ${e.toString()} ${K.value.at(-1).x},${K.value.at(-1).y+(W.value-G.value)/2}`}),Mt=c(()=>({x1:K.value[0].cx,y1:K.value[0].cy,x2:K.value.at(-1).cx,y2:K.value.at(-1).cy})),q=y(!1);function Nt(e){q.value=e,ut.value+=1}let Pt=c(()=>`${H.value.length*150}ms`),J=y(!1);function Ft(){J.value=!J.value}function It(){z.value.showTable=!z.value.showTable}let Y=c(()=>({head:H.value.map(e=>({name:e.name,color:e.color})),body:H.value.map(e=>e.value)})),X=c(()=>{let e=[N.value.table.columnNames.series,N.value.table.columnNames.value,N.value.table.columnNames.percentage],t=Y.value.head.map((e,t)=>{let n=o(P.value.dataLabels.value.formatter,Y.value.body[t],a({p:P.value.dataLabels.value.prefix,v:Y.value.body[t],s:P.value.dataLabels.value.suffix,r:N.value.table.td.roundingValue}),{datapoint:K.value[t]}),r=o(F.value.dataLabels.formatter,K.value[t].proportion*100,a({v:K.value[t].proportion*100,s:`%`,r:N.value.table.td.roundingPercentage}),{datapoint:K.value[t]});return[{color:e.color,name:e.name},n,r]}),n={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,config:n}});function Z(e=null){Pe(()=>{let t=Y.value.head.map((e,t)=>[[e.name],[Y.value.body[t]],[K.value[t].proportion*100]]),n=[[I.value.title.text],[I.value.title.subtitle.text],[[N.value.table.columnNames.series],[N.value.table.columnNames.value],[`%`]]].concat(t),r=ee(n);e?e(r):ae({csvContent:r,title:I.value.title.text||`vue-ui-funnel`})})}function Lt(){return H.value}let Rt=he(D,()=>I.value.title.text),Q=c(()=>ye({config:N,style:I,mutableConfig:z,dialog:st,accordion:nt,isFullscreen:q,parent:D,maxWidth:800}));Be(()=>z.value.showTable,e=>ve(e,N,gt));function zt(){z.value.showTable=!1,_t.value&&_t.value.setTableIconState(!1)}let Bt=c(()=>I.value.backgroundColor),Vt=c(()=>I.value.title),{isCallbackImaging:Ht,isCallbackSvg:$,generateSvg:Ut,onGenerateImage:Wt}=_e({svg:Tt,title:Vt,legend:null,legendItems:null,backgroundColor:Bt,getSvgCallback:()=>N.value.userOptions.callbacks.svg,generateImage:Dt});async function Gt(){lt(`copyAlt`,{config:N.value,dataset:H.value}),N.value.userOptions.callbacks.altCopy?await Promise.resolve(N.value.userOptions.callbacks.altCopy({config:N.value,dataset:H.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}return pe({getData:Lt,getImage:Rt,generatePdf:Et,generateCsv:Z,generateImage:Dt,generateSvg:Ut,toggleTable:It,toggleAnnotator:Ft,toggleFullscreen:Nt,copyAlt:Gt}),(e,i)=>(v(),d(`div`,{ref_key:`funnelChart`,ref:D,class:h(`vue-data-ui-component vue-ui-funnel ${q.value?`vue-data-ui-wrapper-fullscreen`:``} ${N.value.useCssAnimation?``:`vue-ui-dna`}`),style:_(`font-family:${N.value.style.fontFamily};width:100%; ${N.value.responsive?`height:100%;`:``} text-align:center;background:${I.value.backgroundColor}`),id:`funnel_${O.value}`,onMouseenter:i[1]||=()=>C(Ct)(!0),onMouseleave:i[2]||=()=>C(Ct)(!1)},[N.value.userOptions.buttons.annotator?(v(),l(C(at),m({key:0},C(n)(N.value.userOptions.annotator),{svgRef:C(Tt),backgroundColor:I.value.backgroundColor,color:I.value.color,active:J.value,isCursorPointer:xt.value,palette:N.value.userOptions.annotatorPalette,onClose:Ft}),Ae({_:2},[b(C(r),n=>({name:n,fn:w(r=>[x(e.$slots,n,g(Ne(C(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):u(``,!0),Ot.value?(v(),d(`div`,{key:1,ref_key:`noTitle`,ref:pt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):u(``,!0),I.value.title.text?(v(),d(`div`,{key:2,ref_key:`chartTitle`,ref:ht,style:`width:100%;background:transparent;padding-bottom:24px`},[(v(),l(ge,{key:`title_${dt.value}`,config:{title:{cy:`funnel-div-title`,...I.value.title},subtitle:{cy:`funnel-div-subtitle`,...I.value.title.subtitle}}},null,8,[`config`]))],512)):u(``,!0),N.value.userOptions.show&&M.value&&(C(wt)||C(St))?(v(),l(C(it),{ref_key:`userOptionsRef`,ref:_t,key:`user_option_${ut.value}`,backgroundColor:I.value.backgroundColor,color:I.value.color,isPrinting:C(L),isImaging:C(R),uid:O.value,hasTooltip:!1,hasPdf:N.value.userOptions.buttons.pdf,hasImg:N.value.userOptions.buttons.img,hasSvg:N.value.userOptions.buttons.svg,hasXls:N.value.userOptions.buttons.csv,hasTable:N.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:N.value.userOptions.buttons.fullscreen,hasAltCopy:N.value.userOptions.buttons.altCopy,isFullscreen:q.value,chartElement:D.value,position:N.value.userOptions.position,titles:{...N.value.userOptions.buttonTitles},hasAnnotator:N.value.userOptions.buttons.annotator,isAnnotation:J.value,callbacks:N.value.userOptions.callbacks,printScale:N.value.userOptions.print.scale,tableDialog:N.value.table.useDialog,isCursorPointer:xt.value,onToggleAnnotator:Ft,onToggleFullscreen:Nt,onGeneratePdf:C(Et),onGenerateImage:C(Wt),onGenerateSvg:C(Ut),onToggleTable:It,onGenerateCsv:Z,onCopyAlt:Gt,style:_({visibility:C(wt)?C(St)?`visible`:`hidden`:`visible`})},Ae({_:2},[b(C(be)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:w(n=>[x(e.$slots,t,g(Ne(C(xe)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.titles.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):u(``,!0),M.value?(v(),d(`svg`,{key:4,ref_key:`svgRef`,ref:Tt,xmlns:C(ce),class:h({"vue-data-ui-fullscreen--on":q.value,"vue-data-ui-fulscreen--off":!q.value}),viewBox:`0 0 ${V.value.width<=0?10:V.value.width} ${V.value.height<=0?10:V.value.height}`,style:_(`max-width:100%; overflow: visible; background:transparent;color:${I.value.color}`)},[Me(C(ot)),x(e.$slots,`svg-underlayer`,{svg:{...V.value,isPrintingImg:C(L)||C(R)||C(Ht),isPrintingSvg:C($)}},void 0,!0),e.$slots[`chart-background`]?(v(),d(`foreignObject`,{key:0,x:0,y:0,width:V.value.width<=0?10:V.value.width,height:V.value.height<=0?10:V.value.height,style:{pointerEvents:`none`}},[x(e.$slots,`chart-background`,{},void 0,!0)],8,We)):u(``,!0),f(`defs`,null,[Me(Te,{t:`linear`,id:`funnel_area_${O.value}`,x1:`0%`,x2:`100%`,y1:`0%`,y2:`0%`,stops:[[`0%`,I.value.backgroundColor,0],[`20%`,I.value.area.color,1],[`100%`,I.value.area.color,1]]},null,8,[`id`,`stops`])]),I.value.circleLinks.show?(v(),d(`line`,m({key:1},Mt.value,{stroke:I.value.circleLinks.color,"stroke-width":12*I.value.circleLinks.widthRatio,"stroke-linecap":`round`,class:{animated:N.value.useCssAnimation&&!C(T)},style:{strokeDasharray:N.value.useCssAnimation&&!C(T)?U.value.height:0,strokeDashoffset:N.value.useCssAnimation&&!C(T)?U.value.height:0}}),null,16,Ge)):u(``,!0),(v(!0),d(s,null,b(K.value,({cx:e,cy:t,r:n,fill:r},i)=>(v(),d(`circle`,m({ref_for:!0},{cx:e,cy:t,r:n,fill:r},{stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,class:{animated:N.value.useCssAnimation&&!j.value&&!C(T)},style:{animationDelay:`${150*i}ms`}}),null,16,Ke))),256)),(v(!0),d(s,null,b(K.value,(e,t)=>(v(),d(`text`,{x:e.cx,y:e.cy+B.value.circles/3+F.value.dataLabels.offsetY,"text-anchor":`middle`,"font-size":B.value.circles,fill:F.value.dataLabels.adaptColorToBackground?C(oe)(e.color):F.value.dataLabels.color,"font-weight":F.value.dataLabels.bold?`bold`:`normal`,class:h({animated:N.value.useCssAnimation&&!j.value&&!C(T)}),style:_({animationDelay:`${150*t}ms`})},S(C(o)(F.value.dataLabels.formatter,e.proportion*100,C(a)({v:e.proportion*100,s:`%`,r:F.value.dataLabels.rounding}),{datapoint:e})),15,qe))),256)),I.value.area.show?(v(),d(`polygon`,{key:2,points:jt.value,fill:`url(#funnel_area_${O.value})`,class:h({animated:N.value.useCssAnimation&&!j.value&&!C(T)}),style:_({transition:N.value.useCssAnimation?`all ${150*H.value.length}ms ease-in`:`none`})},null,14,Je)):u(``,!0),(v(!0),d(s,null,b(K.value,({x:e,y:t,height:n,width:r,fill:i},a)=>(v(),d(`rect`,m({ref_for:!0},{x:e,y:t,height:n,width:r,fill:i},{stroke:P.value.stroke,"stroke-width":P.value.strokeWidth,rx:P.value.borderRadius,class:{animated:N.value.useCssAnimation&&!j.value&&!C(T)},style:{animationDelay:`${150*a}ms`}}),null,16,Ye))),256)),(v(!0),d(s,null,b(K.value,(e,t)=>(v(),d(`g`,null,[f(`text`,{x:e.x+e.width+P.value.dataLabels.name.offsetX+12,y:e.cy-B.value.names/2+P.value.dataLabels.name.offsetY,"text-anchor":`start`,"font-size":B.value.names,fill:P.value.dataLabels.name.color,"font-weight":P.value.dataLabels.name.bold?`bold`:`normal`,class:h({animated:N.value.useCssAnimation&&!j.value&&!C(T)}),style:_({animationDelay:`${150*t}ms`})},S(e.name),15,Xe),f(`text`,{x:e.x+e.width+P.value.dataLabels.value.offsetX+12,y:e.cy+B.value.values+P.value.dataLabels.value.offsetY,"text-anchor":`start`,"font-size":B.value.values,fill:P.value.dataLabels.value.color,"font-weight":P.value.dataLabels.value.bold?`bold`:`normal`,class:h({animated:N.value.useCssAnimation&&!j.value&&!C(T)}),style:_({animationDelay:`${150*t}ms`})},S(C(o)(P.value.dataLabels.value.formatter,e.value,C(a)({p:P.value.dataLabels.value.prefix,v:e.value,s:P.value.dataLabels.value.suffix,r:P.value.dataLabels.value.rounding}),{datapoint:e})),15,Ze)]))),256)),x(e.$slots,`svg`,{svg:{...V.value,isPrintingImg:C(L)||C(R)||C(Ht),isPrintingSvg:C($)}},void 0,!0)],14,Ue)):u(``,!0),e.$slots.watermark?(v(),d(`div`,Qe,[x(e.$slots,`watermark`,g(Ne({isPrinting:C(L)||C(R)||C(Ht)||C($)})),void 0,!0)])):u(``,!0),M.value?u(``,!0):(v(),l(C(tt),{key:6,config:{type:`verticalBar`,style:{backgroundColor:I.value.backgroundColor,verticalBar:{axis:{color:`#CCCCCC`},color:`#CCCCCC`}}}},null,8,[`config`])),e.$slots.source?(v(),d(`div`,{key:7,ref_key:`source`,ref:mt,dir:`auto`},[x(e.$slots,`source`,{},void 0,!0)],512)):u(``,!0),M.value&&N.value.userOptions.buttons.table?(v(),l(Le(Q.value.component),m({key:8},Q.value.props,{ref_key:`tableUnit`,ref:gt,onClose:zt}),Ae({content:w(()=>[(v(),l(C(rt),{key:`table_${ft.value}`,colNames:X.value.colNames,head:X.value.head,body:X.value.body,config:X.value.config,title:N.value.table.useDialog?``:Q.value.title,withCloseButton:!N.value.table.useDialog,onClose:zt},{th:w(({th:e})=>[f(`div`,$e,S(e),1)]),td:w(({td:e})=>[je(S(e.name?e.name:e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`]))]),_:2},[N.value.table.useDialog?{name:`title`,fn:w(()=>[je(S(Q.value.title),1)]),key:`0`}:void 0,N.value.table.useDialog?{name:`actions`,fn:w(()=>[f(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[0]||=e=>Z(N.value.userOptions.callbacks.csv)},[Me(C(et),{name:`fileCsv`,stroke:Q.value.props.color},null,8,[`stroke`])])]),key:`1`}:void 0]),1040)):u(``,!0)],46,He))}},[[`__scopeId`,`data-v-e381642e`]]);export{Ve as n,et 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-By3Vb5kz.js";import{$ as a,D as o,Dt as ee,Ht as s,Kt as c,S as te,X as ne,Zt as re,at as ie,i as ae,in as oe,nt as se,pt as ce,t as le,w as ue,yt as de,z as fe,zt as pe}from"./lib-rPeBMZrn.js";import{n as me,t as he}from"./BaseScanner-8NdoBs7B.js";import{n as ge,t as _e}from"./useHints-C-TwxM0Y.js";import{t as ve}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as ye}from"./resolveChartConfig-CIhClE5R.js";import{t as be}from"./chartImage-DPGnEuYM.js";import{n as xe}from"./Title-BliHuXfT.js";import{t as Se}from"./useChartExport-BZts4KFb.js";import{n as Ce,t as we}from"./tableIntegration-CNoJ1CIY.js";import{n as Te,t as Ee}from"./userOptionsSlots-DYuo-E5m.js";import{t as De}from"./usePrinter-DVf3YcG5.js";import{t as Oe}from"./useTransitions-ChGGrtrv.js";import{c as ke}from"./canvas-lib-22VpOI4_.js";import{t as Ae}from"./useResponsive-CENUxfEL.js";import{t as je}from"./BaseLegendToggle-BIzyyI1h.js";import{t as Me}from"./A11yDataTable-DWNlWXzs.js";import{t as Ne}from"./useUserOptionState-CXlFnwPv.js";import{t as Pe}from"./useChartAccessibility-DOMuYJfm.js";import{t as Fe}from"./labelUtils-CdtU-yB_.js";import{t as Ie}from"./Legend-DM0ClX3D.js";import{t as Le}from"./vue_ui_galaxy-B94QInxc.js";import{Fragment as Re,Teleport as ze,computed as l,createBlock as u,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createSlots as Be,createTextVNode as Ve,createVNode as m,defineAsyncComponent as h,guardReactiveProps as g,mergeProps as He,nextTick as Ue,normalizeClass as _,normalizeProps as v,normalizeStyle as y,onMounted as We,openBlock as b,ref as x,renderList as Ge,renderSlot as S,resolveDynamicComponent as Ke,toDisplayString as C,toRefs as qe,unref as w,watch as Je,withCtx as T}from"vue";var Ye=/* @__PURE__ */ e({default:()=>ht}),Xe=[`id`],Ze=[`id`],Qe=[`id`],$e={style:{position:`relative`}},et=[`xmlns`,`aria-describedby`,`viewBox`],tt=[`width`,`height`],nt=[`id`],rt=[`stdDeviation`],it=[`d`,`stroke`,`stroke-width`],at=[`d`,`stroke`,`stroke-width`],ot=[`filter`],st=[`d`,`stroke`,`stroke-width`],ct=[`data-a11y-serie-id`,`d`,`stroke-width`,`aria-label`,`onMouseenter`,`onMouseleave`,`onClick`],lt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},ut={key:5,class:`vue-data-ui-watermark`},dt=[`id`],ft=[`onClick`],pt={key:0},mt={key:1},ht=/*#__PURE__*/ ve({__name:`vue-ui-galaxy`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:ve,emit:Ye}){let ht=h(()=>import(`./Tooltip-C1q0Qoh7.js`)),gt=h(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),_t=h(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),vt=h(()=>import(`./DataTable-Dof6yhO7.js`)),yt=h(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),bt=h(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),xt=h(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),St=h(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_galaxy:Ct}=i(),E=e,D=x(ne()),O=x(null),wt=x(!1),Tt=x(``),k=x(null),Et=x(0),Dt=x(0),Ot=x(0),kt=x(0),At=x(null),jt=x(null),Mt=x(null),Nt=x(null),A=x(null),Pt=x(null),Ft=x(!1),It=x(null),Lt=x(null),j=x(null),Rt=x(null),zt=x({x:0,y:0}),Bt=x(`pointer`),M=x(!1),Vt=l(()=>!!E.dataset&&E.dataset.length),N=x(Zt()),P=l(()=>N.value.style.chart.layout.arcs),F=l(()=>N.value.style.chart.layout),I=l(()=>N.value.style.chart);ge({config:()=>N.value,dataset:()=>E.dataset,component:`VueUiGalaxy`,rules:[_e.singleSeries,_e.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series is > 6. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ 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{transitionEnabled:Ht}=Oe({config:()=>N.value.transitions,dataset:()=>E.dataset}),L=l(()=>N.value.userOptions.useCursorPointer),Ut=l(()=>oe({defaultConfig:{userOptions:{show:!1},table:{show:!1},useCssAnimation:!1,style:{chart:{backgroundColor:`#99999930`,legend:{backgroundColor:`transparent`}}}},userConfig:N.value.skeletonConfig??{}})),{loading:Wt,FINAL_DATASET:Gt}=me({...qe(E),FINAL_CONFIG:N,prepareConfig:Zt,callback:()=>{Promise.resolve().then(async()=>{await Ue(),B.value.showTable=N.value.table.show})},skeletonDataset:E.config?.skeletonDataset??[{name:`_`,values:[21],color:`#DBDBDB`},{name:`_`,values:[13],color:`#C4C4C4`},{name:`_`,values:[8],color:`#ADADAD`}],skeletonConfig:oe({defaultConfig:N.value,userConfig:Ut.value})});We(()=>{Ft.value=!0,qt()});let Kt=l(()=>N.value.debug);function qt(){if(pe(E.dataset)?ie({componentName:`VueUiGalaxy`,type:`dataset`,debug:Kt.value}):Kt.value&&E.dataset.forEach((e,t)=>{de({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{ie({componentName:`VueUiGalaxy`,type:`datasetSerieAttribute`,property:e,index:t})})}),N.value.responsive){let e=ke(()=>{let{width:e,height:t}=Ae({chart:O.value,title:I.value.title.text?At.value:null,legend:I.value.legend.show?jt.value:null,noTitle:Nt.value,source:Mt.value});requestAnimationFrame(()=>{an.value=Math.max(.1,e),on.value=Math.max(.1,t-12)})});A.value&&(Pt.value&&A.value.unobserve(Pt.value),A.value.disconnect()),A.value=new ResizeObserver(e),Pt.value=O.value.parentNode,A.value.observe(Pt.value)}}let{userOptionsVisible:Jt,setUserOptionsVisibility:Yt,keepUserOptionState:Xt}=Ne({config:N.value}),{svgRef:R}=Pe({config:I.value.title});function Zt(){return ye(E.config,Ct,Le)}let Qt=re(E.config);Je(()=>E.config,(e,t)=>{let n=re(e),r=n!==Qt;Qt=n;let i=Zt();r?(N.value=i,Jt.value=!N.value.userOptions.showOnChartHover,qt(),Dt.value+=1,Ot.value+=1,kt.value+=1,B.value.dataLabels.show=F.value.labels.dataLabels.show,B.value.showTable=N.value.table.show,B.value.showTooltip=I.value.tooltip.show):(N.value.style.chart.tooltip=i.style.chart.tooltip,B.value.showTooltip=N.value.style.chart.tooltip.show)},{deep:!0});let{isPrinting:z,isImaging:$t,generatePdf:en,generateImage:tn}=De({elementId:`galaxy_${D.value}`,fileName:I.value.title.text||`vue-ui-galaxy`,options:N.value.userOptions.print}),nn=l(()=>N.value.userOptions.show&&!I.value.title.text),rn=l(()=>ue(N.value.customPalette)),B=x({dataLabels:{show:F.value.labels.dataLabels.show},showTable:N.value.table.show,showTooltip:I.value.tooltip.show}),an=x(250),on=x(180),sn=x(0),cn=x(0),V=l(()=>({width:an.value,height:on.value,viewBox:`${sn.value} ${cn.value} ${an.value} ${on.value}`})),ln=Ye,H=x([]);function un(){ln(`selectLegend`,K.value.map(e=>({name:e.name,color:e.color,value:e.value})))}function dn(){H.value.length?H.value=[]:J.value.forEach(e=>{H.value.push(e.id)}),un()}function U(e){H.value.includes(e.id)?H.value=H.value.filter(t=>t!==e.id):H.value.push(e.id),un()}function fn(e){return W.value.length?W.value.find(t=>t.name===e)||(Kt.value&&console.warn(`VueUiGalaxy - Series name not found "${e}"`),null):(Kt.value&&console.warn(`VueUiGalaxy - There are no series to show.`),null)}function pn(e){let t=fn(e);t!==null&&H.value.includes(t.id)&&U({id:t.id})}function mn(e){let t=fn(e);t!==null&&(H.value.includes(t.id)||U({id:t.id}))}let W=l(()=>Gt.value.map((e,t)=>({name:e.name,color:te(e.color)||rn.value[t]||s[t]||s[t%s.length],value:e.values?c(e.values).reduce((e,t)=>e+t,0):0,absoluteValues:c(e.values),id:ne()})).sort((e,t)=>t.value-e.value).map((e,t)=>({...e,absoluteIndex:t})));function hn(){return W.value.map(e=>({name:e.name,color:e.color,value:e.value}))}let G=l(()=>W.value.filter(e=>!H.value.includes(e.id)).map(e=>e.value).reduce((e,t)=>e+t,0)),gn=x(190),_n=l(()=>W.value.filter(e=>!H.value.includes(e.id))),vn=l(()=>(P.value.strokeWidth+P.value.borderWidth)/2+(F.value.padding??12)),yn=l(()=>fe({maxPoints:gn.value,a:P.value.a??6,b:P.value.b??6,angleStep:P.value.angleStep??.07,startX:V.value.width/2+P.value.offsetX,startY:V.value.height/2+P.value.offsetY,boxWidth:V.value.width,boxHeight:V.value.height,padding:vn.value})),K=l(()=>{let e=[];for(let t=0;t<_n.value.length;t+=1){let n=_n.value[t],r=n.value/G.value*gn.value+(t>0&&e.length?e[t-1].points:0);e.push({points:r,...n,seriesIndex:t,proportion:n.value/G.value,path:yn.value(r)})}return e.filter(e=>!H.value.includes(e.id)).toSorted((e,t)=>t.points-e.points)});function bn(e){let t=Math.min(an.value,on.value),n=k.value===e.id&&P.value.hoverEffect.show?P.value.hoverEffect.multiplicator:1,r=(P.value.strokeWidth+P.value.borderWidth)*n,i=P.value.strokeWidth*n,a=P.value.strokeWidth/2*n;return{border:r/180*t,path:i/180*t,blur:a/180*t}}let q=x(!1);function xn(e){q.value=e,Et.value+=1}let Sn=x(null);function Cn(){wt.value=!1,k.value=null,j.value=null,Rt.value=null}function wn(e){if(!R.value||!e)return;let t=R.value.querySelector(`[data-a11y-serie-id="${e}"]`);if(!t)return;let n=t.getBoundingClientRect();zt.value={x:n.left+n.width/2,y:n.top+n.height/2}}function Tn(e){N.value.events.datapointLeave&&N.value.events.datapointLeave({datapoint:e,seriesIndex:e.absoluteIndex}),(Rt.value!==e.id||Bt.value!==`keyboard`)&&(wt.value=!1,k.value=null)}function En(e){ln(`selectDatapoint`,e),N.value.events.datapointClick&&N.value.events.datapointClick({datapoint:e,seriesIndex:e.absoluteIndex})}function Dn({val:e,percentage:t,showVal:n,showPercentage:r}){let i=F.value.labels.dataLabels;return Fe({config:i,val:e,percentage:t,showVal:n,showPercentage:r})}function On({datapoint:e,_relativeIndex:t,seriesIndex:n,show:r=!1,triggerMode:i=`pointer`,flatIndex:o=null}){if(N.value.events.datapointEnter&&N.value.events.datapointEnter({datapoint:e,seriesIndex:e.absoluteIndex}),!B.value.showTooltip)return;Bt.value=i,j.value=o,Rt.value=e.id,Sn.value={datapoint:e,seriesIndex:n,series:W.value,config:N.value},wt.value=r,k.value=e.id;let s=``,c=I.value.tooltip.customFormat;ee(c)&&ce(()=>c({seriesIndex:n,datapoint:e,series:W.value,config:N.value}))?Tt.value=c({seriesIndex:n,datapoint:e,series:W.value,config:N.value}):(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${I.value.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`,s+=`<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>`,s+=`<b>${Dn({showVal:I.value.tooltip.showValue,showPercentage:I.value.tooltip.showPercentage,val:ae(F.value.labels.dataLabels.formatter,e.value,a({p:F.value.labels.dataLabels.prefix,v:e.value,s:F.value.labels.dataLabels.suffix,r:I.value.tooltip.roundingValue}),{datapoint:e,seriesIndex:n}),percentage:a({v:e.proportion*100,s:`%`,r:I.value.tooltip.roundingPercentage})})}</b></div>`,Tt.value=`<div>${s}</div>`),i===`keyboard`&&Ue(()=>{wn(e.id)})}let J=l(()=>W.value.map((e,t)=>{let n=ae(F.value.labels.dataLabels.formatter,e.value,a({p:F.value.labels.dataLabels.prefix,v:e.value,s:F.value.labels.dataLabels.suffix,r:I.value.legend.roundingValue}),{datapoint:e,index:t}),r=isNaN(e.value/G.value)||H.value.includes(e.id)?`-`:a({v:e.value/G.value*100,s:`%`,r:I.value.legend.roundingPercentage}),i=Dn({showVal:I.value.legend.showValue,showPercentage:I.value.legend.showPercentage,val:n,percentage:r});return{...e,proportion:(e.value||0)/Gt.value.map(e=>(e.values||[]).reduce((e,t)=>e+t,0)).reduce((e,t)=>e+t,0),opacity:H.value.includes(e.id)?.5:1,shape:e.shape||`circle`,segregate:()=>U(e),isSegregated:H.value.includes(e.id),display:`${e.name}${I.value.legend.showPercentage||I.value.legend.showValue?`: `:``}${i}`}})),kn=l(()=>({cy:`galaxy-div-legend`,backgroundColor:I.value.legend.backgroundColor,color:I.value.legend.color,fontSize:I.value.legend.fontSize,paddingBottom:12,fontWeight:I.value.legend.bold?`bold`:``})),Y=l(()=>({head:K.value.map(e=>({name:e.name,color:e.color})),body:K.value.map(e=>e.value)}));function An(e=null){Ue(()=>{let t=Y.value.head.map((e,t)=>[[e.name],[Y.value.body[t]],[isNaN(Y.value.body[t]/G.value)?`-`:Y.value.body[t]/G.value*100]]),n=[[I.value.title.text],[I.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(t),r=o(n);e?e(r):se({csvContent:r,title:I.value.title.text||`vue-ui-galaxy`})})}let X=l(()=>{let e=[`__SUM__`,a({p:F.value.labels.dataLabels.prefix,v:G.value,s:F.value.labels.dataLabels.suffix,r:N.value.table.td.roundingValue}),`100%`],t=Y.value.head.map((e,t)=>{let n=a({p:F.value.labels.dataLabels.prefix,v:Y.value.body[t],s:F.value.labels.dataLabels.suffix,r:N.value.table.td.roundingValue});return[{color:e.color,name:e.name},n,isNaN(Y.value.body[t]/G.value)?`-`:a({v:Y.value.body[t]/G.value*100,s:`%`,r:N.value.table.td.roundingPercentage})]}),n={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,config:n}});function jn(){B.value.showTable=!B.value.showTable}function Mn(){B.value.showTooltip=!B.value.showTooltip}let Z=x(!1);function Nn(){Z.value=!Z.value}let Pn=be(O,()=>I.value.title.text),Q=l(()=>we({config:N,style:I,mutableConfig:B,dialog:St,accordion:_t,isFullscreen:q,parent:O,maxWidth:500,isCursorPointer:L}));Je(()=>B.value.showTable,e=>Ce(e,N,It));function Fn(){B.value.showTable=!1,Lt.value&&Lt.value.setTableIconState(!1)}let In=l(()=>J.value.map(e=>({...e,name:e.display}))),Ln=l(()=>I.value.backgroundColor),Rn=l(()=>I.value.legend),zn=l(()=>I.value.title),{isCallbackImaging:Bn,isCallbackSvg:Vn,generateSvg:Hn,onGenerateImage:Un}=Se({svg:R,title:zn,legend:Rn,legendItems:In,backgroundColor:Ln,getSvgCallback:()=>N.value.userOptions.callbacks.svg,generateImage:tn});async function Wn(){ln(`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.")}function Gn(){j.value=null,Rt.value=null,M.value=!0}function Kn(){Cn(),M.value=!1}function qn(e){if(!R.value||Z.value||document.activeElement!==R.value||!$.value.length)return;let t=e.key===`ArrowLeft`||e.key===`ArrowUp`,n=e.key===`ArrowRight`||e.key===`ArrowDown`,r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){Cn();return}if(r){if(j.value===null)return;let e=$.value[j.value];if(!e)return;En(e.datapoint);return}let a=j.value;a===null||a<0||a>=$.value.length?a=n?0:$.value.length-1:(a+=n?1:-1,a<0&&(a=$.value.length-1),a>=$.value.length&&(a=0));let o=$.value[a];o&&On({datapoint:o.datapoint,seriesIndex:o.datapoint.seriesIndex,show:!0,triggerMode:`keyboard`,flatIndex:a})}let Jn=l(()=>({headers:X.value?.colNames??[],rows:X.value?.body??[]})),$=l(()=>K.value.map((e,t)=>({datapoint:e,index:t})));return ve({getData:hn,getImage:Pn,generatePdf:en,generateCsv:An,generateImage:tn,generateSvg:Hn,hideSeries:mn,showSeries:pn,toggleTable:jn,toggleTooltip:Mn,toggleAnnotator:Nn,toggleFullscreen:xn,copyAlt:Wn}),(e,i)=>(b(),f(`div`,{ref_key:`galaxyChart`,ref:O,class:_(`vue-data-ui-component vue-ui-galaxy ${q.value?`vue-data-ui-wrapper-fullscreen`:``} ${N.value.useCssAnimation?``:`vue-ui-dna`} ${w(Wt)?`loading`:``}`),style:y(`font-family:${N.value.style.fontFamily};width:100%; text-align:center;${I.value.title.text?``:`padding-top:36px`};background:${I.value.backgroundColor}`),id:`galaxy_${D.value}`,onMouseenter:i[2]||=()=>w(Yt)(!0),onMouseleave:i[3]||=()=>{w(Yt)(!1),M.value||Cn()}},[p(`div`,{id:`chart-instructions-${D.value}`,class:`sr-only`},[p(`p`,null,C(N.value.a11y.translations.keyboardNavigation),1)],8,Ze),Jn.value?.rows?.length?(b(),u(Me,{key:0,uid:D.value,head:Jn.value.headers,body:Jn.value.rows,notice:N.value.a11y.translations.tableAvailable,caption:N.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):d(``,!0),N.value.userOptions.buttons.annotator?(b(),u(w(yt),He({key:1},w(n)(N.value.userOptions.annotator),{svgRef:w(R),backgroundColor:I.value.backgroundColor,color:I.value.color,active:Z.value,isCursorPointer:L.value,palette:N.value.userOptions.annotatorPalette,onClose:Nn}),Be({_:2},[Ge(w(r),n=>({name:n,fn:T(r=>[S(e.$slots,n,v(g(w(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):d(``,!0),nn.value?(b(),f(`div`,{key:2,ref_key:`noTitle`,ref:Nt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):d(``,!0),I.value.title.text?(b(),f(`div`,{key:3,ref_key:`chartTitle`,ref:At,style:`width:100%;background:transparent;padding-bottom:24px`},[(b(),u(xe,{key:`title_${Dt.value}`,config:{title:{cy:`galaxy-div-title`,...I.value.title},subtitle:{cy:`galaxy-div-subtitle`,...I.value.title.subtitle}}},null,8,[`config`]))],512)):d(``,!0),p(`div`,{id:`legend-top-${D.value}`},null,8,Qe),N.value.userOptions.show&&Vt.value&&(w(Xt)||w(Jt))?(b(),u(w(bt),{ref_key:`userOptionsRef`,ref:Lt,key:`user_option_${Et.value}`,backgroundColor:I.value.backgroundColor,color:I.value.color,isPrinting:w(z),isImaging:w($t),uid:D.value,hasTooltip:N.value.userOptions.buttons.tooltip&&I.value.tooltip.show,hasPdf:N.value.userOptions.buttons.pdf,hasXls:N.value.userOptions.buttons.csv,hasImg:N.value.userOptions.buttons.img,hasSvg:N.value.userOptions.buttons.svg,hasTable:N.value.userOptions.buttons.table,hasFullscreen:N.value.userOptions.buttons.fullscreen,hasAltCopy:N.value.userOptions.buttons.altCopy,isTooltip:B.value.showTooltip,isFullscreen:q.value,titles:{...N.value.userOptions.buttonTitles},chartElement:O.value,position:N.value.userOptions.position,hasAnnotator:N.value.userOptions.buttons.annotator,isAnnotation:Z.value,callbacks:N.value.userOptions.callbacks,printScale:N.value.userOptions.print.scale,tableDialog:N.value.table.useDialog,isCursorPointer:L.value,onToggleFullscreen:xn,onGeneratePdf:w(en),onGenerateCsv:An,onGenerateImage:w(Un),onGenerateSvg:w(Hn),onToggleTable:jn,onToggleTooltip:Mn,onToggleAnnotator:Nn,onCopyAlt:Wn,style:y({visibility:w(Xt)?w(Jt)?`visible`:`hidden`:`visible`})},Be({_:2},[Ge(w(Te)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:T(n=>[S(e.$slots,t,v(g(w(Ee)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasXls.hasImg.hasSvg.hasTable.hasFullscreen.hasAltCopy.isTooltip.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):d(``,!0),p(`div`,$e,[(b(),f(`svg`,{ref_key:`svgRef`,ref:R,xmlns:w(le),"aria-describedby":`chart-instructions-${D.value}`,class:_({"vue-data-ui-fullscreen--on":q.value,"vue-data-ui-fulscreen--off":!q.value}),viewBox:V.value.viewBox,style:y(`max-width:100%; overflow: visible; background:transparent;color:${I.value.color}`),tabindex:`0`,onFocus:Gn,onBlur:Kn,onKeydown:qn},[m(w(xt)),S(e.$slots,`svg-underlayer`,{svg:{...V.value,isPrintingImg:w(z)||w($t)||w(Bn),isPrintingSvg:w(Vn)}},void 0,!0),e.$slots[`chart-background`]?(b(),f(`foreignObject`,{key:0,x:0,y:0,width:V.value.width,height:V.value.height,style:{pointerEvents:`none`}},[S(e.$slots,`chart-background`,{},void 0,!0)],8,tt)):d(``,!0),p(`defs`,null,[p(`filter`,{id:`blur_${D.value}`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[p(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:100/P.value.gradient.intensity},null,8,rt)],8,nt)]),(b(!0),f(Re,null,Ge(K.value,e=>(b(),f(`g`,{key:`dp_${e.id}`},[e.value?(b(),f(`path`,{key:0,d:e.path,fill:`none`,stroke:I.value.backgroundColor,"stroke-width":bn(e).border,class:_({"vue-data-ui-transition":w(Ht)}),"stroke-linecap":`round`},null,10,it)):d(``,!0),e.value?(b(),f(`path`,{key:1,d:e.path,fill:`none`,stroke:e.color,"stroke-width":bn(e).path,"stroke-linecap":`round`,class:_({"vue-data-ui-transition":w(Ht),"vue-ui-galaxy-blur":k.value&&k.value!==e.id&&N.value.useBlurOnHover})},null,10,at)):d(``,!0),e.value&&P.value.gradient.show?(b(),f(`g`,{key:2,filter:`url(#blur_${D.value})`},[p(`path`,{d:e.path,fill:`none`,stroke:P.value.gradient.color,"stroke-width":bn(e).blur,"stroke-linecap":`round`,class:_({"vue-ui-galaxy-gradient":!0,"vue-data-ui-transition":w(Ht),"vue-ui-galaxy-blur":k.value&&k.value!==e.id&&N.value.useBlurOnHover})},null,10,st)],8,ot)):d(``,!0)]))),128)),(b(!0),f(Re,null,Ge(K.value,(e,t)=>(b(),f(`g`,null,[e.value?(b(),f(`path`,{key:0,"data-a11y-serie-id":e.id,d:e.path,fill:`none`,stroke:`transparent`,"stroke-width":P.value.strokeWidth+P.value.borderWidth,"stroke-linecap":`round`,"aria-label":`${e.name}: ${w(a)({p:F.value.labels.dataLabels.prefix,v:e.value,s:F.value.labels.dataLabels.suffix,r:I.value.tooltip.roundingValue})}`,onMouseenter:n=>On({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0,triggerMode:`pointer`,flatIndex:t}),onMouseleave:t=>Tn(e),onClick:t=>En(e)},null,40,ct)):d(``,!0)]))),256)),S(e.$slots,`svg`,{svg:{...V.value,isPrintingImg:w(z)||w($t)||w(Bn),isPrintingSvg:w(Vn)}},void 0,!0)],46,et)),e.$slots.hint?(b(),f(`div`,lt,[S(e.$slots,`hint`,v(g({hint:N.value.a11y.translations.keyboardNavigation,isVisible:M.value})),void 0,!0)])):d(``,!0)]),e.$slots.watermark?(b(),f(`div`,ut,[S(e.$slots,`watermark`,v(g({isPrinting:w(z)||w($t)||w(Bn)||w(Vn)})),void 0,!0)])):d(``,!0),p(`div`,{id:`legend-bottom-${D.value}`},null,8,dt),Ft.value&&(I.value.legend.show||e.$slots.legend)?(b(),u(ze,{key:6,to:I.value.legend.position===`top`?`#legend-top-${D.value}`:`#legend-bottom-${D.value}`},[p(`div`,{ref_key:`chartLegend`,ref:jt},[S(e.$slots,`legend`,{legend:J.value},()=>[I.value.legend.show?(b(),u(Ie,{key:`legend_${kt.value}`,legendSet:J.value,config:kn.value,onClickMarker:i[0]||=({legend:e})=>U(e)},{item:T(({legend:e,index:t})=>[w(Wt)?d(``,!0):(b(),f(`div`,{key:0,onClick:t=>U(e),style:y(`opacity:${H.value.includes(e.id)?.5:1}`)},C(e.display),13,ft))]),legendToggle:T(()=>[J.value.length>2&&I.value.legend.selectAllToggle.show&&!w(Wt)?(b(),u(je,{key:0,backgroundColor:I.value.legend.selectAllToggle.backgroundColor,color:I.value.legend.selectAllToggle.color,fontSize:I.value.legend.fontSize,checked:H.value.length>0,onToggle:dn},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`])):d(``,!0)]),_:1},8,[`legendSet`,`config`])):d(``,!0)],!0)],512)],8,[`to`])):d(``,!0),e.$slots.source?(b(),f(`div`,{key:7,ref_key:`source`,ref:Mt,dir:`auto`},[S(e.$slots,`source`,{},void 0,!0)],512)):d(``,!0),m(w(ht),{teleportTo:I.value.tooltip.teleportTo,show:B.value.showTooltip&&wt.value,backgroundColor:I.value.tooltip.backgroundColor,color:I.value.tooltip.color,borderRadius:I.value.tooltip.borderRadius,borderColor:I.value.tooltip.borderColor,borderWidth:I.value.tooltip.borderWidth,fontSize:I.value.tooltip.fontSize,backgroundOpacity:I.value.tooltip.backgroundOpacity,position:I.value.tooltip.position,offsetX:I.value.tooltip.offsetX,offsetY:I.value.tooltip.offsetY,parent:O.value,content:Tt.value,isFullscreen:q.value,isCustom:w(ee)(I.value.tooltip.customFormat),smooth:I.value.tooltip.smooth,backdropFilter:I.value.tooltip.backdropFilter,smoothForce:I.value.tooltip.smoothForce,smoothSnapThreshold:I.value.tooltip.smoothSnapThreshold,isA11yMode:Bt.value===`keyboard`,a11yPosition:zt.value},{"tooltip-before":T(()=>[S(e.$slots,`tooltip-before`,v(g({...Sn.value})),void 0,!0)]),tooltip:T(()=>[S(e.$slots,`tooltip`,v(g({...Sn.value})),void 0,!0)]),"tooltip-after":T(()=>[S(e.$slots,`tooltip-after`,v(g({...Sn.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`]),Vt.value&&N.value.userOptions.buttons.table?(b(),u(Ke(Q.value.component),He({key:8},Q.value.props,{ref_key:`tableUnit`,ref:It,onClose:Fn}),Be({content:T(()=>[(b(),u(w(vt),{key:`table_${Ot.value}`,colNames:X.value.colNames,head:X.value.head,body:X.value.body,config:X.value.config,title:N.value.table.useDialog?``:Q.value.title,withCloseButton:!N.value.table.useDialog,isCursorPointer:L.value,onClose:Fn},{th:T(({th:e})=>[e===`__SUM__`?(b(),f(`div`,pt,[m(w(gt),{name:`sigma`,stroke:X.value.config.th.color,size:16},null,8,[`stroke`])])):(b(),f(`div`,mt,C(e),1))]),td:T(({td:e})=>[Ve(C(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[N.value.table.useDialog?{name:`title`,fn:T(()=>[Ve(C(Q.value.title),1)]),key:`0`}:void 0,N.value.table.useDialog?{name:`actions`,fn:T(()=>[p(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[1]||=e=>An(N.value.userOptions.callbacks.csv),style:y({cursor:L.value?`pointer`:`default`})},[m(w(gt),{name:`fileCsv`,stroke:Q.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):d(``,!0),S(e.$slots,`skeleton`,{},()=>[w(Wt)?(b(),u(he,{key:0})):d(``,!0)],!0)],46,Xe))}},[[`__scopeId`,`data-v-478ec427`]]);export{Ye as n,ht 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-By3Vb5kz.js";import{$ as a,Bt as o,Ht as ee,It as s,J as te,Jt as ne,O as re,S as ie,X as ae,at as c,b as oe,f as se,i as ce,in as le,rn as ue,t as de,w as fe,yt as pe,zt as me}from"./lib-rPeBMZrn.js";import{n as he,t as ge}from"./BaseScanner-8NdoBs7B.js";import{n as _e}from"./useHints-C-TwxM0Y.js";import{t as ve}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as ye}from"./resolveChartConfig-CIhClE5R.js";import{t as be}from"./chartImage-DPGnEuYM.js";import{n as xe}from"./Title-BliHuXfT.js";import{t as Se}from"./useChartExport-BZts4KFb.js";import{n as Ce,t as we}from"./userOptionsSlots-DYuo-E5m.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"./useUserOptionState-CXlFnwPv.js";import{t as Ae}from"./useChartAccessibility-DOMuYJfm.js";import{t as je}from"./usePrefersMotion-XLHwega2.js";import{t as Me}from"./useAutoSizeLabelsInsideViewbox-AIRF0PlD.js";import{t as Ne}from"./vue_ui_gauge-BJhb6yqE.js";import{Fragment as l,computed as u,createBlock as Pe,createCommentVNode as d,createElementBlock as f,createElementVNode as p,createSlots as Fe,createVNode as Ie,defineAsyncComponent as Le,guardReactiveProps as Re,mergeProps as m,nextTick as ze,normalizeClass as Be,normalizeProps as Ve,normalizeStyle as He,onBeforeUnmount as Ue,onMounted as We,openBlock as h,ref as g,renderList as _,renderSlot as v,shallowRef as Ge,toDisplayString as y,toRefs as Ke,unref as b,watch as x,withCtx as qe}from"vue";var Je=/* @__PURE__ */ e({default:()=>Et}),Ye=[`id`],Xe={key:0},Ze=[`xmlns`,`viewBox`],Qe=[`width`,`height`],$e=[`id`],et=[`stdDeviation`],tt={key:1},nt=[`d`,`fill`,`stroke`],rt=[`d`,`fill`,`stroke`],it=[`d`,`fill`],at=[`id`,`d`],ot=[`fill`,`font-size`,`font-weight`],st=[`href`,`startOffset`],ct=[`text-anchor`,`fill`,`font-size`,`font-weight`,`innerHTML`],lt=[`d`,`filter`],ut=[`stroke`,`stroke-width`],dt=[`stroke`,`stroke-width`],ft=[`stroke`,`stroke-width`],pt=[`stroke`,`stroke-width`],mt={key:8},ht=[`x`,`y`,`text-anchor`,`font-size`,`font-weight`,`fill`],gt=[`x`,`y`,`font-size`,`font-weight`,`fill`],_t={key:0},vt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],yt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],bt=[`x1`,`y1`,`x2`,`y2`,`stroke-width`,`filter`],xt={key:1},St=[`d`,`fill`,`stroke`,`stroke-width`],Ct=[`cx`,`cy`,`fill`,`r`,`stroke-width`,`stroke`],wt=[`x`,`y`,`font-size`,`fill`],Tt={key:4,class:`vue-data-ui-watermark`},Et=/*#__PURE__*/ ve({__name:`vue-ui-gauge`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:ve,emit:Je}){let Et=Le(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Dt=Le(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Ot=Le(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),{vue_ui_gauge:kt}=i(),At=je(),S=e,jt=Je,Mt=u(()=>!!S.dataset&&Object.keys(S.dataset).length>0&&S.dataset.series&&S.dataset.series.length),C=g(ae()),Nt=g(null),Pt=g(0),w=g(null),Ft=g(null),It=g(null),Lt=g(null),Rt=g(null),zt=g(0),T=g(Kt()),E=u(()=>T.value.style.chart.layout.segmentSeparators),D=u(()=>T.value.style.chart.layout.segmentNames),O=u(()=>T.value.style.chart.layout.markers),k=u(()=>T.value.style.chart.layout.pointer),A=u(()=>T.value.style.chart.layout),j=u(()=>T.value.style.chart);_e({config:()=>T.value,dataset:()=>S.dataset,component:`VueUiGauge`,rules:[{test:e=>e?.series&&e.series?.length>6,message:[`👀 The number of steps is > 6, which can make the chart hard to read and labels overlap. Consider:`,``,`▶️ Using broader steps.`]}]});let Bt=u(()=>T.value.userOptions.useCursorPointer),Vt=u(()=>le({defaultConfig:{userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,animation:{use:!1},layout:{markers:{show:!1},segmentSeparators:{stroke:`#6A6A6A`},segmentNames:{show:!1},indicatorArc:{fill:`#6A6A6A50`},pointer:{stroke:`#6A6A6A`,useRatingColor:!0,circle:{stroke:`#6A6A6A`,color:`#6A6A6A`}}},legend:{show:!1}}}},userConfig:T.value.skeletonConfig??{}})),{loading:Ht,FINAL_DATASET:M,manualLoading:N}=he({...Ke(S),FINAL_CONFIG:T,prepareConfig:Kt,callback:()=>{Promise.resolve().then(async()=>{await ze()})},skeletonDataset:S.config?.skeletonDataset??{value:0,series:[{from:-1,to:0,name:`_`,color:`#A1A1A1`},{from:0,to:1,name:`__`,color:`#CACACA`}]},skeletonConfig:le({defaultConfig:T.value,userConfig:Vt.value})}),{userOptionsVisible:Ut,setUserOptionsVisibility:Wt,keepUserOptionState:Gt}=ke({config:T.value}),{svgRef:P}=Ae({config:j.value.title});x(()=>S.config,e=>{Ht.value||(T.value=Kt()),Ut.value=!T.value.userOptions.showOnChartHover,tn(),zt.value+=1},{deep:!0}),x(()=>S.dataset,e=>{tn(),e&&Object.keys(e).length>0&&(N.value=T.value?.loading??!1)},{deep:!0,immediate:!1});function Kt(){return ye(S.config,kt,Ne)}let{isPrinting:F,isImaging:I,generatePdf:qt,generateImage:Jt}=Te({elementId:`vue-ui-gauge_${C.value}`,fileName:j.value.title.text||`vue-ui-gauge`,options:T.value.userOptions.print}),Yt=u(()=>T.value.userOptions.show&&!j.value.title.text),Xt=u(()=>fe(T.value.customPalette)),L=u(()=>{if(me(M.value.series||{}))return{value:0,series:[{from:0,to:0}]};let e=[];(M.value.series||[]).forEach(t=>{e.push(t.from||1e-7),e.push(t.to||1e-7)});let t=Math.max(...e);return{...M.value,series:(M.value.series||[]).map((e,n)=>({...e,color:ie(e.color)||Xt.value[n]||ee[n],value:((e.to||0)-(e.from||0))/t*100}))}}),R=g(512),z=g({height:358.4,width:R.value,top:0,bottom:358.4,centerX:179.2,centerY:R.value/2,labelFontSize:18,legendFontSize:j.value.legend.fontSize,pointerRadius:k.value.circle.radius,trackSize:A.value.track.size,pointerSize:k.value.size,pointerStrokeWidth:k.value.strokeWidth,markerOffset:O.value.offsetY+3,segmentFontSize:D.value.fontSize}),B=g(0),V=g(0),H=u(()=>j.value.animation.use&&!At.value),U=g(H.value?Math.min(...M.value.series.map(e=>e.from)):M.value.value),W=null;function Zt(){W!==null&&(cancelAnimationFrame(W),W=null)}x(H,e=>{e||(Zt(),U.value=M.value.value)}),x(()=>M.value.value,()=>{nn(M.value.value)});let G=u(()=>{let e=z.value.width/2,t=X.value.base,n=Math.PI*((U.value+0-V.value)/(B.value-V.value))+Math.PI;return{x1:e,y1:t,x2:e+X.value.pointerSize*z.value.pointerSize*.9*Math.cos(n),y2:t+X.value.pointerSize*z.value.pointerSize*.9*Math.sin(n)}}),Qt=u(()=>{let e=z.value.width/2,t=X.value.base,n=Math.PI*((U.value+0-V.value)/(B.value-V.value))+Math.PI,r=e+X.value.pointerSize*z.value.pointerSize*.9*Math.cos(n),i=t+X.value.pointerSize*z.value.pointerSize*.9*Math.sin(n),a=z.value.pointerRadius,o=e+a*Math.cos(n+Math.PI/2),ee=t+a*Math.sin(n+Math.PI/2),s=e+a*Math.cos(n-Math.PI/2),te=t+a*Math.sin(n-Math.PI/2);return isNaN(r)?null:`M ${r},${i} ${o},${ee} ${s},${te} Z`}),$t=u(()=>{for(let e=0;e<L.value.series.length;e+=1){let{color:t,from:n,to:r}=L.value.series[e];if(U.value>=n&&U.value<=r)return t}return`#2D353C`}),K=Ge(null),q=Ge(null),J=u({get:()=>z.value.segmentFontSize,set:e=>e}),{autoSizeLabels:en}=Me({svgRef:P,fontSize:z.value.segmentFontSize,minFontSize:D.value.minFontSize,sizeRef:J,labelClass:`.vue-ui-gauge-label-flat`}),Y=u(()=>T.value.debug);function tn(){let e=!1;if(me(S.dataset)?(c({componentName:`VueUiGauge`,type:`dataset`,debug:Y.value}),N.value=!0,e=!0):(pe({datasetObject:S.dataset,requiredAttributes:[`value`,`series`]}).forEach(t=>{c({componentName:`VueUiGauge`,type:`datasetAttribute`,property:t,debug:Y.value}),N.value=!0,e=!0}),Object.hasOwn(S.dataset,`series`)&&(S.dataset.series.length?S.dataset.series.forEach((t,n)=>{pe({datasetObject:t,requiredAttributes:[`from`,`to`]}).forEach(t=>{c({componentName:`VueUiGauge`,type:`datasetSerieAttribute`,property:t,index:n,debug:Y.value}),N.value=!0,e=!0})}):(c({componentName:`VueUiGauge`,type:`datasetAttributeEmpty`,property:`series`,debug:Y.value}),N.value=!0,e=!0))),N.value=e,nn(M.value.value||0),T.value.responsive){let e=Ee(()=>{let{width:e,height:t}=De({chart:w.value,title:j.value.title.text?Ft.value:null,legend:It.value,source:Lt.value,noTitle:Rt.value});t-=12,requestAnimationFrame(()=>{z.value.width=e,z.value.height=t,z.value.centerX=e/2,z.value.centerY=R.value/2/358.4*t,z.value.bottom=t,z.value.labelFontSize=18/R.value*Math.min(t,e)<10?10:18/R.value*Math.min(t,e),z.value.legendFontSize=j.value.legend.fontSize/R.value*Math.min(t,e)<14?14:j.value.legend.fontSize/R.value*Math.min(t,e),z.value.pointerRadius=k.value.circle.radius/R.value*Math.min(t,e),z.value.trackSize=A.value.track.size/R.value*Math.min(t,e),z.value.pointerStrokeWidth=ue({relator:Math.min(e,t),adjuster:R.value,source:k.value.strokeWidth,threshold:2,fallback:2}),z.value.markerOffset=ue({relator:Math.max(e,t),adjuster:R.value,source:O.value.offsetY+3,threshold:2,fallback:2}),z.value.segmentFontSize=ue({relator:Math.min(e,t),adjuster:R.value,source:D.value.fontSize,threshold:8,fallback:8})}),en()});K.value&&(q.value&&K.value.unobserve(q.value),K.value.disconnect()),K.value=new ResizeObserver(e),q.value=w.value.parentNode,K.value.observe(q.value)}en()}We(()=>{tn()}),Ue(()=>{Zt(),K.value&&(q.value&&K.value.unobserve(q.value),K.value.disconnect())});function nn(e){let t=[];if((L.value.series||[]).forEach(e=>{t.push(e.from||0),t.push(e.to||0)}),B.value=Math.max(...t),V.value=Math.min(...t),Zt(),!H.value){U.value=e;return}let n=j.value.animation.speed,r=Math.abs(e-U.value)/(n*60);function i(){H.value?(U.value<e?U.value=Math.min(U.value+r,e):U.value>e&&(U.value=Math.max(U.value-r,e)),W=U.value===e?null:requestAnimationFrame(i)):(U.value=e,W=null)}i()}let X=u(()=>{let e=T.value.responsive?Math.min(z.value.width,z.value.height):z.value.width,t=2.5/A.value.radiusRatio;return{arcs:e/t,gradients:e/(t*1.1),base:T.value.responsive?z.value.height/1.618:z.value.height*.7,ratingBase:T.value.responsive?z.value.height/2+z.value.height/4:z.value.height*.9,pointerSize:T.value.responsive?Math.min(z.value.width,z.value.height)/3:z.value.width/3.2}}),Z=u(()=>s({series:L.value.series},z.value.width/2,X.value.base,X.value.arcs,X.value.arcs,1,1,1,180,109.9495,40*z.value.trackSize)),rn=u(()=>s({series:L.value.series},z.value.width/2,X.value.base,X.value.arcs*D.value.offsetRatio,X.value.arcs*D.value.offsetRatio,1,1,1,180,109.9495,40*z.value.trackSize)),Q=u(()=>Z.value.map(e=>X.value.arcs*D.value.offsetRatio*(e.nameOffsetRatio||1))),an=u(()=>{let{x:e,y:t}=o({initX:Z.value[0].firstSeparator.x,initY:Z.value[0].firstSeparator.y,centerX:G.value.x1,centerY:G.value.y1,offset:-E.value.offsetIn}),{x:n,y:r}=o({initX:Z.value[0].startX,initY:Z.value[0].startY,centerX:G.value.x1,centerY:G.value.y1,offset:E.value.offsetOut});return{x1:e,y1:t,x2:n,y2:r}}),on=u(()=>Z.value.map(e=>{let{x:t,y:n}=o({initX:e.separator.x,initY:e.separator.y,centerX:G.value.x1,centerY:G.value.y1,offset:-E.value.offsetIn}),{x:r,y:i}=o({initX:e.endX,initY:e.endY,centerX:G.value.x1,centerY:G.value.y1,offset:E.value.offsetOut});return{x1:t,y1:n,x2:r,y2:i}}));function sn(e){if(e.reduce((e,t)=>e+t,0)>100)throw Error(`Total % must not exceed 100`);let t=0;return e.map(e=>(t+=e,`${t/100*50-e/4}%`))}let cn=u(()=>sn(Z.value.map(e=>e.proportion*100))),ln=u(()=>s({series:L.value.series},z.value.width/2,X.value.base,X.value.gradients,X.value.gradients,.95,1,1,180,110.02,2*z.value.trackSize)),un=u(()=>{let e=V.value>=0?-V.value:Math.abs(V.value);return re({radius:A.value.indicatorArc.radius*z.value.trackSize,centerX:z.value.width/2,centerY:X.value.base,percentage:oe((U.value+e)/(B.value+e))})}),$=g(!1);function dn(e){$.value=e,Pt.value+=1}let fn=g(!1);function pn(){fn.value=!fn.value}let mn=be(w,()=>j.value.title.text),hn=u(()=>j.value.backgroundColor),gn=u(()=>j.value.title),{isCallbackImaging:_n,isCallbackSvg:vn,generateSvg:yn,onGenerateImage:bn}=Se({svg:P,title:gn,legend:null,legendItems:null,backgroundColor:hn,getSvgCallback:()=>T.value.userOptions.callbacks.svg,generateImage:Jt});async function xn(){jt(`copyAlt`,{config:T.value,dataset:L.value}),T.value.userOptions.callbacks.altCopy?await Promise.resolve(T.value.userOptions.callbacks.altCopy({config:T.value,dataset:L.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}return ve({getImage:mn,generatePdf:qt,generateImage:Jt,generateSvg:yn,toggleAnnotator:pn,toggleFullscreen:dn,copyAlt:xn}),(e,i)=>(h(),f(`div`,{class:Be(`vue-data-ui-component vue-ui-gauge ${$.value?`vue-data-ui-wrapper-fullscreen`:``}`),ref_key:`gaugeChart`,ref:w,id:`vue-ui-gauge_${C.value}`,style:He(`font-family:${T.value.style.fontFamily};width:100%; text-align:center;background:${j.value.backgroundColor};${T.value.responsive?`height: 100%`:``}`),onMouseenter:i[0]||=()=>b(Wt)(!0),onMouseleave:i[1]||=()=>b(Wt)(!1)},[T.value.userOptions.buttons.annotator?(h(),Pe(b(Et),m({key:0},b(n)(T.value.userOptions.annotator),{svgRef:b(P),backgroundColor:j.value.backgroundColor,color:j.value.color,active:fn.value,isCursorPointer:Bt.value,palette:T.value.userOptions.annotatorPalette,onClose:pn}),Fe({_:2},[_(b(r),n=>({name:n,fn:qe(r=>[v(e.$slots,n,Ve(Re(b(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):d(``,!0),Yt.value?(h(),f(`div`,{key:1,ref_key:`noTitle`,ref:Rt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):d(``,!0),j.value.title.text?(h(),f(`div`,{key:2,ref_key:`chartTitle`,ref:Ft,style:`width:100%;background:transparent;padding-bottom:12px`},[(h(),Pe(xe,{key:`title_${zt.value}`,config:{title:{cy:`gauge-div-title`,...j.value.title},subtitle:{cy:`gauge-div-subtitle`,...j.value.title.subtitle}}},{default:qe(()=>[T.value.translations.base&&b(M).base?(h(),f(`span`,Xe,y(T.value.translations.base)+`: `+y(b(M).base),1)):d(``,!0)]),_:1},8,[`config`]))],512)):d(``,!0),T.value.userOptions.show&&Mt.value&&(b(Gt)||b(Ut))?(h(),Pe(b(Dt),{ref_key:`details`,ref:Nt,key:`user_options_${Pt.value}`,backgroundColor:j.value.backgroundColor,color:j.value.color,isImaging:b(I),isPrinting:b(F),uid:C.value,hasXls:!1,hasPdf:T.value.userOptions.buttons.pdf,hasImg:T.value.userOptions.buttons.img,hasSvg:T.value.userOptions.buttons.svg,hasFullscreen:T.value.userOptions.buttons.fullscreen,hasAltCopy:T.value.userOptions.buttons.altCopy,isFullscreen:$.value,titles:{...T.value.userOptions.buttonTitles},chartElement:w.value,callbacks:T.value.userOptions.callbacks,printScale:T.value.userOptions.print.scale,position:T.value.userOptions.position,hasAnnotator:T.value.userOptions.buttons.annotator,isAnnotation:fn.value,isCursorPointer:Bt.value,onToggleFullscreen:dn,onGeneratePdf:b(qt),onGenerateImage:b(bn),onGenerateSvg:b(yn),onToggleAnnotator:pn,onCopyAlt:xn,style:He({visibility:b(Gt)?b(Ut)?`visible`:`hidden`:`visible`})},Fe({_:2},[_(b(Ce)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:qe(n=>[v(e.$slots,t,Ve(Re(b(we)(t,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isImaging`,`isPrinting`,`uid`,`hasPdf`,`hasImg`,`hasSvg`,`hasFullscreen`,`hasAltCopy`,`isFullscreen`,`titles`,`chartElement`,`callbacks`,`printScale`,`position`,`hasAnnotator`,`isAnnotation`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):d(``,!0),(h(),f(`svg`,{ref_key:`svgRef`,ref:P,xmlns:b(de),class:Be({"vue-data-ui-fullscreen--on":$.value,"vue-data-ui-fulscreen--off":!$.value}),viewBox:`0 0 ${z.value.width<=0?10:z.value.width} ${z.value.height<=0?10:z.value.height}`,style:He(`max-width:100%;overflow:hidden !important;background:transparent;color:${j.value.color}`)},[Ie(b(Ot)),v(e.$slots,`svg-underlayer`,{svg:{...z.value,isPrintingImg:b(F)||b(I)||b(_n),isPrintingSvg:b(vn)}},void 0,!0),e.$slots[`chart-background`]?(h(),f(`foreignObject`,{key:0,x:0,y:0,width:z.value.width<=0?10:z.value.width,height:z.value.height<=0?10:z.value.height,style:{pointerEvents:`none`}},[v(e.$slots,`chart-background`,{},void 0,!0)],8,Qe)):d(``,!0),p(`defs`,null,[Ie(Oe,{t:`radial`,id:`gradient_${C.value}`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,stops:[[`0%`,b(ne)(`#FFFFFF`,1),1],[`80%`,b(ne)(`#FFFFFF`,A.value.track.gradientIntensity),1],[`100%`,b(ne)(`#FFFFFF`,1),1]]},null,8,[`id`,`stops`])]),p(`defs`,null,[p(`filter`,{id:`blur_${C.value}`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[p(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:100/A.value.track.gradientIntensity},null,8,et)],8,$e)]),e.$slots.pattern?(h(),f(`g`,tt,[(h(!0),f(l,null,_(Z.value,(t,n)=>(h(),f(`defs`,null,[v(e.$slots,`pattern`,m({ref_for:!0},{seriesIndex:n,patternId:`pattern_${C.value}_${n}`}),void 0,!0)]))),256))])):d(``,!0),(h(!0),f(l,null,_(Z.value,(e,t)=>(h(),f(`path`,{key:`arc_${t}`,d:e.arcSlice,fill:e.color,stroke:j.value.backgroundColor,"stroke-linecap":`round`},null,8,nt))),128)),e.$slots.pattern?(h(!0),f(l,{key:2},_(Z.value,(e,t)=>(h(),f(`path`,{key:`arc_${t}`,d:e.arcSlice,fill:`url(#pattern_${C.value}_${t})`,stroke:j.value.backgroundColor,"stroke-linecap":`round`},null,8,rt))),128)):d(``,!0),A.value.indicatorArc.show?(h(),f(`path`,{key:3,d:un.value,fill:A.value.indicatorArc.fill},null,8,it)):d(``,!0),D.value.show&&D.value.curved?(h(),f(l,{key:4},[(h(!0),f(l,null,_(Z.value,(e,t)=>(h(),f(`path`,{id:`curve_${C.value}_${t}`,d:`M ${G.value.x1},${G.value.y1} m -${Q.value[t]},0 a ${Q.value[t]},${Q.value[t]} 0 1,1 ${2*Q.value[t]},0 a ${Q.value[t]},${Q.value[t]} 0 1,1 -${2*Q.value[t]},0`,fill:`transparent`},null,8,at))),256)),(h(!0),f(l,null,_(Z.value,(e,t)=>(h(),f(`text`,{fill:D.value.useSerieColor?e.color:D.value.color,"font-size":J.value,"font-weight":D.value.bold?`bold`:`normal`,"text-anchor":`middle`},[p(`textPath`,{href:`#curve_${C.value}_${t}`,startOffset:cn.value[t]},y(e.name||``),9,st)],8,ot))),256))],64)):d(``,!0),D.value.show&&!D.value.curved?(h(!0),f(l,{key:5},_(rn.value,(e,t)=>(h(),f(`text`,{class:`vue-ui-gauge-label-flat`,"text-anchor":b(se)(e,!1,12).anchor,fill:D.value.useSerieColor?e.color:D.value.color,"font-size":J.value,"font-weight":D.value.bold?`bold`:`normal`,innerHTML:b(te)({content:String(e.name??``),fontSize:J.value,fill:D.value.useSerieColor?e.color:D.value.color,x:e.center.endX,y:e.center.endY})},null,8,ct))),256)):d(``,!0),A.value.track.useGradient?(h(!0),f(l,{key:6},_(ln.value,(e,t)=>(h(),f(`path`,{key:`arc_${t}`,d:e.arcSlice,fill:`#FFFFFF`,stroke:`none`,"stroke-linecap":`round`,filter:`url(#blur_${C.value})`},null,8,lt))),128)):d(``,!0),E.value.show?(h(),f(l,{key:7},[p(`line`,m(an.value,{stroke:j.value.backgroundColor,"stroke-width":E.value.strokeWidth+2,"stroke-linecap":`round`}),null,16,ut),p(`line`,m(an.value,{stroke:E.value.stroke,"stroke-width":E.value.strokeWidth,"stroke-linecap":`round`}),null,16,dt),(h(!0),f(l,null,_(on.value,e=>(h(),f(`line`,m({ref_for:!0},e,{stroke:j.value.backgroundColor,"stroke-width":E.value.strokeWidth+2,"stroke-linecap":`round`}),null,16,ft))),256)),(h(!0),f(l,null,_(on.value,e=>(h(),f(`line`,m({ref_for:!0},e,{stroke:E.value.stroke,"stroke-width":E.value.strokeWidth,"stroke-linecap":`round`}),null,16,pt))),256))],64)):d(``,!0),O.value.show?(h(),f(`g`,mt,[(h(!0),f(l,null,_(Z.value,(e,t)=>(h(),f(`text`,{x:b(o)({centerX:G.value.x1,centerY:X.value.base,initX:e.center.startX,initY:e.center.startY,offset:z.value.markerOffset}).x,y:b(o)({centerX:G.value.x1,centerY:X.value.base,initX:e.center.startX,initY:e.center.startY,offset:z.value.markerOffset}).y,"text-anchor":e.center.startX<G.value.x1-5?`end`:e.center.startX>G.value.x1+5?`start`:`middle`,"font-size":z.value.labelFontSize*O.value.fontSizeRatio,"font-weight":`${O.value.bold?`bold`:`normal`}`,fill:O.value.color},y(b(ce)(O.value.formatter,e.from,b(a)({p:O.value.prefix,v:e.from,s:O.value.suffix,r:O.value.roundingValue}))),9,ht))),256))])):d(``,!0),O.value.show?(h(),f(`text`,{key:9,x:b(o)({centerX:z.value.width/2,centerY:X.value.base,initX:Z.value.at(-1).endX,initY:Z.value.at(-1).endY,offset:z.value.markerOffset}).x,y:b(o)({centerX:z.value.width/2,centerY:X.value.base,initX:Z.value.at(-1).endX,initY:Z.value.at(-1).endY,offset:z.value.markerOffset}).y,"text-anchor":`start`,"font-size":z.value.labelFontSize*O.value.fontSizeRatio,"font-weight":`${O.value.bold?`bold`:`normal`}`,fill:O.value.color},y(b(ce)(O.value.formatter,B.value,b(a)({p:O.value.prefix,v:B.value,s:O.value.suffix,r:O.value.roundingValue}))),9,gt)):d(``,!0),k.value.show?(h(),f(l,{key:10},[k.value.type===`rounded`?(h(),f(`g`,_t,[isNaN(G.value.x2)?d(``,!0):(h(),f(`line`,{key:0,x1:G.value.x1,y1:G.value.y1,x2:G.value.x2,y2:G.value.y2,stroke:k.value.stroke,"stroke-width":z.value.pointerStrokeWidth,"stroke-linecap":`round`},null,8,vt)),isNaN(G.value.x2)?d(``,!0):(h(),f(`line`,{key:1,x1:G.value.x1,y1:G.value.y1,x2:G.value.x2,y2:G.value.y2,stroke:k.value.useRatingColor?$t.value:k.value.color,"stroke-linecap":`round`,"stroke-width":z.value.pointerStrokeWidth*.7},null,8,yt)),!isNaN(G.value.x2)&&A.value.track.useGradient?(h(),f(`line`,{key:2,x1:G.value.x1,y1:G.value.y1,x2:G.value.x2,y2:G.value.y2,stroke:`white`,"stroke-linecap":`round`,"stroke-width":z.value.pointerStrokeWidth*.3,filter:`url(#blur_${C.value})`},null,8,bt)):d(``,!0)])):(h(),f(`g`,xt,[Qt.value?(h(),f(`path`,{key:0,d:Qt.value,fill:k.value.useRatingColor?$t.value:k.value.color,stroke:k.value.stroke,"stroke-width":k.value.circle.strokeWidth,"stroke-linejoin":`round`},null,8,St)):d(``,!0)])),p(`circle`,{cx:z.value.width/2,cy:X.value.base,fill:k.value.circle.color,r:z.value.pointerRadius<=0?1e-4:z.value.pointerRadius,"stroke-width":k.value.circle.strokeWidth,stroke:k.value.circle.stroke},null,8,Ct)],64)):d(``,!0),j.value.legend.show?(h(),f(`text`,{key:11,x:z.value.width/2,y:X.value.ratingBase,"text-anchor":`middle`,"font-size":z.value.legendFontSize,"font-weight":`bold`,fill:j.value.legend.useRatingColor?$t.value:j.value.legend.color},y(b(ce)(j.value.legend.formatter,U.value,b(a)({p:j.value.legend.prefix+(j.value.legend.showPlusSymbol&&U.value>0?`+`:``),v:U.value,s:j.value.legend.suffix,r:j.value.legend.roundingValue}))),9,wt)):d(``,!0),v(e.$slots,`svg`,{svg:{...z.value,isPrintingImg:b(F)||b(I)||b(_n),isPrintingSvg:b(vn)}},void 0,!0)],14,Ze)),e.$slots.watermark?(h(),f(`div`,Tt,[v(e.$slots,`watermark`,Ve(Re({isPrinting:b(F)||b(I)||b(_n)||b(vn)})),void 0,!0)])):d(``,!0),p(`div`,{ref_key:`chartLegend`,ref:It},[v(e.$slots,`legend`,{legend:L.value},void 0,!0)],512),e.$slots.source?(h(),f(`div`,{key:5,ref_key:`source`,ref:Lt,dir:`auto`},[v(e.$slots,`source`,{},void 0,!0)],512)):d(``,!0),v(e.$slots,`skeleton`,{},()=>[b(Ht)?(h(),Pe(ge,{key:0})):d(``,!0)],!0)],46,Ye))}},[[`__scopeId`,`data-v-235a6cef`]]);export{Je as n,Et 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-By3Vb5kz.js";import{Dt as a,S as o,X as s,Zt as c,in as l,t as u,tn as d}from"./lib-rPeBMZrn.js";import{n as f,t as p}from"./BaseScanner-8NdoBs7B.js";import{n as ee}from"./useHints-C-TwxM0Y.js";import{t as te}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as ne}from"./resolveChartConfig-CIhClE5R.js";import{t as re}from"./chartImage-DPGnEuYM.js";import{t as ie}from"./BaseZoomControls-JSk9zW3D.js";import{n as ae}from"./Title-BliHuXfT.js";import{t as oe}from"./useChartExport-BZts4KFb.js";import{n as se,t as ce}from"./userOptionsSlots-DYuo-E5m.js";import{t as le}from"./usePrinter-DVf3YcG5.js";import{c as ue}from"./canvas-lib-22VpOI4_.js";import{t as de}from"./useResponsive-CENUxfEL.js";import{t as fe}from"./A11yDataTable-DWNlWXzs.js";import{t as pe}from"./useUserOptionState-CXlFnwPv.js";import{t as me}from"./useChartAccessibility-DOMuYJfm.js";import{n as he}from"./annotationViewport-X8fvs7pz.js";import{t as ge}from"./usePanZoom-CE6Ofyy8.js";import{t as _e}from"./geoProjections-CX3Pvo1N.js";import{t as ve}from"./vue_ui_geo-DL1SMQHp.js";import{Fragment as ye,computed as m,createBlock as h,createCommentVNode as g,createElementBlock as _,createElementVNode as v,createSlots as be,createVNode as xe,defineAsyncComponent as Se,guardReactiveProps as y,mergeProps as Ce,nextTick as we,normalizeClass as Te,normalizeProps as b,normalizeStyle as Ee,onBeforeUnmount as De,onMounted as Oe,openBlock as x,ref as S,renderList as ke,renderSlot as C,toDisplayString as Ae,toRefs as je,unref as w,watch as Me,withCtx as Ne}from"vue";var Pe=/* @__PURE__ */ e({default:()=>Je}),Fe=[`id`],Ie=[`id`],Le={style:{position:`relative`}},Re=[`xmlns`,`viewBox`,`aria-describedby`,`id`],ze=[`transform`],Be=[`d`,`fill`,`stroke`,`stroke-width`,`onMouseenter`,`onMouseleave`,`onClick`],Ve=[`d`,`stroke`,`stroke-width`,`onMouseenter`,`onMouseleave`,`onClick`],He=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`,`onMouseenter`],Ue=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`,`onMouseenter`,`onMouseleave`,`onClick`],We=[`x`,`y`,`fill`,`font-size`],Ge={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Ke={key:6,class:`vue-data-ui-watermark`},qe=1.5,Je=/*#__PURE__*/ te({__name:`vue-ui-geo`,props:{config:{type:Object,default(){return{}}},dataset:{type:[Array,Object],default(){return[]}}},emits:[`copyAlt`],setup(e,{expose:te,emit:Pe}){let Je=Se(()=>import(`./Tooltip-C1q0Qoh7.js`)),Ye=Se(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Xe=Se(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Ze=Se(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),T=e,Qe=Pe,{vue_ui_geo:$e}=i(),E=S(s()),et=S(0),tt=S(0),D=S(null),O=S(!1),nt=S(null),rt=S(null),it=S(null),at=S(null),k=S(null),A=S(null),ot=S(null),st=S(null),j=S(null),ct=S({x:0,y:0}),M=S(`pointer`),lt=S(!1),N=S(!1);function ut(e){N.value=e,et.value+=1}function dt(){return ne(T.config,$e,ve)}let P=S(dt()),ft=m(()=>P.value.style.chart.points.labels),F=m(()=>P.value.style.chart.points),I=m(()=>P.value.style.chart);ee({config:()=>P.value,dataset:()=>T.dataset,component:`VueUiGeo`,rules:[{test:e=>e.length>100,message:[`👀 The number of data points > 100, which can make the chart hard to read. Consider:`,``,`▶️ Using filters to reduce the number of data points displayed at the same time, and offer users some level of control.`]}]});let pt=m(()=>P.value.userOptions.useCursorPointer),{userOptionsVisible:mt,keepUserOptionState:ht}=pe({config:P.value}),{svgRef:L}=me({config:I.value.title}),gt=m(()=>l({defaultConfig:{map:{geoJson:{type:`FeatureCollection`,features:[{type:`Feature`,properties:{name:`Island A`},geometry:{type:`Polygon`,coordinates:[[[-6,2],[-4,2],[-4,4],[-6,4],[-6,2]]]}},{type:`Feature`,properties:{name:`Island B`},geometry:{type:`Polygon`,coordinates:[[[-2,-1],[1,-1],[1,2],[-2,2],[-2,-1]]]}},{type:`Feature`,properties:{name:`Island C`},geometry:{type:`Polygon`,coordinates:[[[3,-3],[5,-3],[5,-1],[3,-1],[3,-3]]]}},{type:`Feature`,properties:{name:`Island D`},geometry:{type:`Polygon`,coordinates:[[[4,3],[7,3],[7,5],[4,5],[4,3]]]}}]}},userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,territory:{fill:`#99999950`,stroke:`#8A8A8A`,strokeWidth:.5}}}},userConfig:P.value.skeletonConfig??{}})),{loading:_t,FINAL_DATASET:vt}=f({...je(T),FINAL_CONFIG:P,prepareConfig:dt,allowEmptyDataset:!0,skeletonDataset:T.config?.skeletonDataset??[],skeletonConfig:l({defaultConfig:P.value,userConfig:gt.value})}),{isPrinting:yt,isImaging:bt,generatePdf:xt,generateImage:St}=le({elementId:`vue-ui-geo_${E.value}`,fileName:I.value.title.text||`vue-ui-geo`,options:P.value.userOptions.print}),Ct=m(()=>I.value.controls.show?I.value.controls.position===`top`?ot.value?.$el??null:I.value.controls.position===`bottom`?st.value?.$el??null:null:null);function wt(){k.value&&(A.value&&k.value.unobserve(A.value),k.value.disconnect(),k.value=null,A.value=null)}let R=m(()=>!!P.value.responsive&&!N.value);Me(()=>N.value,async e=>{e?(wt(),V.value=Number(I.value.dimensions.width)||V.value,H.value=Number(I.value.dimensions.height)||H.value,await we(),O.value=!1,requestAnimationFrame(()=>{O.value||sn()})):P.value.responsive&&(await we(),Tt())});function Tt(){if(wt(),!R.value)return;let e=ue(()=>{if(!D.value)return;let{width:e,height:t}=de({chart:D.value,noTitle:Et.value?it.value:null,title:I.value.title.text?rt.value:null,legend:Ct.value,source:at.value});requestAnimationFrame(()=>{V.value=Math.max(.1,Number(e)||.1),H.value=Math.max(.1,Number(t)||.1)-24})});k.value=new ResizeObserver(e),A.value=D.value?D.value.parentNode:null,A.value&&k.value.observe(A.value),e()}let Et=m(()=>P.value.userOptions.show&&!I.value.title.text),z=S({showTooltip:I.value.tooltip.show}),B=S(I.value.zoom.active),Dt=c(T.config);Me(()=>T.config,(e,t)=>{let n=c(e),r=n!==Dt;Dt=n;let i=dt();r?(P.value=i,z.value.showTooltip=I.value.tooltip.show,B.value=I.value.zoom.active,V.value=I.value.dimensions.width,H.value=I.value.dimensions.height,Tt(),tt.value+=1,et.value+=1):(P.value.style.chart.tooltip=i.style.chart.tooltip,z.value.showTooltip=P.value.style.chart.tooltip.show)},{deep:!0});let{projections:Ot}=_e,kt=m(()=>P.value?.projection||`equirectangular`),At=m(()=>{let e=Ot?.[kt.value];return typeof e==`function`?e:Ot.equirectangular}),jt=m(()=>P.value.map.geoJson??null),Mt={aitoff:{width:1e3,height:500},azimuthalEquidistant:{width:1e3,height:1e3},bonne:{width:1e3,height:1e3},equirectangular:{width:1e3,height:700},gallPeters:{width:1e3,height:800},globe:{width:1e3,height:1e3},hammer:{width:1e3,height:500},mercator:{width:1e3,height:750},mollweide:{width:1e3,height:600},robinson:{width:1e3,height:600},sinusoidal:{width:1e3,height:500},vanDerGrinten:{width:1e3,height:1e3},winkelTripel:{width:1e3,height:1e3}},V=S(I.value.dimensions.width),H=S(I.value.dimensions.height),Nt=m(()=>{let e=Mt[kt.value]||Mt.equirectangular;return{width:e.width,height:e.height}}),U=m(()=>{let e=Nt.value,t=V.value,n=H.value,r=Number.isFinite(t)&&t>0,i=Number.isFinite(n)&&n>0;return r&&i?{width:t,height:n}:r&&!i?{width:t,height:t*(e.height/e.width)}:!r&&i?{width:n*(e.width/e.height),height:n}:{width:e.width,height:e.height}}),Pt=m(()=>{let e=P.value?.map?.center,t=[0,0];if(!Array.isArray(e)||e.length!==2)return t;let n=Number(e[0]),r=Number(e[1]);return!Number.isFinite(n)||!Number.isFinite(r)?t:[n,r]});function W([e,t]){return At.value([e,t],Nt.value.width,Nt.value.height,Pt.value)}function Ft(e,t={}){let{defaultName:n=``,namePropertyCandidates:r=[`name`,`nom`,`admin`,`NAME`,`label`,`title`,`description`,`DESCRIPTION`,`NAME_1`,`NAME_2`,`NAME_3`,`NAME_EN`,`name:en`,`name_en`,`localname`,`local_name`],includeNullGeometries:i=!1}=t,a={type:`FeatureCollection`,features:[]};function o(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function s(e){return!o(e)||typeof e.type!=`string`?!1:e.type===`GeometryCollection`?Array.isArray(e.geometries):Object.hasOwn(e,`coordinates`)}function c(e){if(!o(e))return``;for(let t of r){let n=e[t];if(typeof n==`string`&&n.trim())return n.trim()}return``}function l({geometry:e,properties:t,fallbackName:r,featureIndex:i}){let a=o(t)?{...t}:{},s=c(a),l=n?`${n} ${i+1}`:``,u=s||(typeof r==`string`?r.trim():``)||l;return!a.name&&u&&(a.name=u),{type:`Feature`,geometry:e,properties:a}}function u(e,t,n,r,a){let c=Array.isArray(e?.geometries)?e.geometries:[],d=r;for(let e=0;e<c.length;e+=1){let r=c[e];r&&(o(r)&&r.type===`GeometryCollection`?d=u(r,t,n,d,a):s(r)&&(r.coordinates==null&&r.type!==`GeometryCollection`?i&&(a.push(l({geometry:null,properties:t,fallbackName:n,featureIndex:d})),d+=1):(a.push(l({geometry:r,properties:t,fallbackName:n,featureIndex:d})),d+=1)))}return d}function d(e,t,n=0){let r=n;if(e==null)return r;if(Array.isArray(e)){for(let n of e)r=d(n,t,r);return r}if(!o(e)||typeof e.type!=`string`)return r;if(e.type===`FeatureCollection`){let n=Array.isArray(e.features)?e.features:[];for(let e of n)r=d(e,t,r);return r}if(e.type===`Feature`){let n=o(e.properties)?e.properties:{},a=c(n),d=e.geometry??null;return d==null?(i&&(t.push(l({geometry:null,properties:n,fallbackName:a,featureIndex:r})),r+=1),r):o(d)&&d.type===`GeometryCollection`?u(d,n,a,r,t):(s(d)&&(t.push(l({geometry:d,properties:n,fallbackName:a,featureIndex:r})),r+=1),r)}return e.type===`GeometryCollection`?u(e,{},``,r,t):(s(e)&&(t.push(l({geometry:e,properties:{},fallbackName:``,featureIndex:r})),r+=1),r)}let f=[];return d(e,f,0),{...a,features:f}}function It(e){let t=Array.isArray(e?.features)?e.features:[];function n(e){if(!e||typeof e!=`object`)return``;let t=[e.name,e.nom,e.admin,e.NAME,e.label,e.title,e.description,e.DESCRIPTION,e.NAME_1,e.NAME_2,e.NAME_3,e.NAME_EN,e[`name:en`],e.name_en,e.localname,e.local_name];for(let e of t)if(typeof e==`string`&&e.trim())return e.trim();for(let t of Object.values(e))if(typeof t==`string`&&t.trim())return t.trim();return``}return t.filter(e=>e&&e.type===`Feature`&&e.geometry).map((e,t)=>{let r=e.properties||{},i=n(r);return{feature:e,geometry:e.geometry,properties:r,name:i,uid:`map-feature-${E.value}-${t}`,index:t}})}let Lt=m(()=>Ft(jt.value,{defaultName:``,includeNullGeometries:!1})),Rt=m(()=>It(Lt.value));function zt(e){if(!e||typeof e.type!=`string`)return``;if(e.type===`GeometryCollection`)return(Array.isArray(e.geometries)?e.geometries:[]).map(e=>zt(e)).filter(Boolean).join(` `);let t=e=>{if(!Array.isArray(e)||e.length<2)return null;let t=Number(e[0]),n=Number(e[1]);if(!Number.isFinite(t)||!Number.isFinite(n))return null;let r=W([t,n]);if(!Array.isArray(r)||r.length<2)return null;let i=Number(r[0]),a=Number(r[1]);return!Number.isFinite(i)||!Number.isFinite(a)?null:[i,a]},n=e=>{let n=(e||[]).map(t).filter(Boolean);return n.length<2?``:`M`+n.map(([e,t])=>`${e},${t}`).join(`L`)},r=e=>(e||[]).map(e=>{let t=n(e);return t?t+`Z`:``}).filter(Boolean).join(` `);return e.type===`Polygon`?r(e.coordinates):e.type===`MultiPolygon`?(e.coordinates||[]).map(r).filter(Boolean).join(` `):e.type===`LineString`?n(e.coordinates):e.type===`MultiLineString`?(e.coordinates||[]).map(n).filter(Boolean).join(` `):``}function Bt(e){return e?e.type===`GeometryCollection`?(Array.isArray(e.geometries)?e.geometries:[]).flatMap(e=>Bt(e)):e.type===`Point`?Array.isArray(e.coordinates)?[e.coordinates]:[]:e.type===`MultiPoint`&&Array.isArray(e.coordinates)?e.coordinates:[]:[]}function Vt(e){return!e||typeof e.type!=`string`?!1:e.type===`GeometryCollection`?(Array.isArray(e.geometries)?e.geometries:[]).some(e=>Vt(e)):e.type===`Point`||e.type===`MultiPoint`}let Ht=m(()=>Rt.value.filter(e=>{let t=e.geometry;return t?t.type===`GeometryCollection`?(Array.isArray(t.geometries)?t.geometries:[]).some(e=>e?.type===`Polygon`||e?.type===`MultiPolygon`):t.type===`Polygon`||t.type===`MultiPolygon`:!1})),Ut=m(()=>Rt.value.filter(e=>{let t=e.geometry;return t?t.type===`GeometryCollection`?(Array.isArray(t.geometries)?t.geometries:[]).some(e=>e?.type===`LineString`||e?.type===`MultiLineString`):t.type===`LineString`||t.type===`MultiLineString`:!1})),Wt=m(()=>Rt.value.filter(e=>{let t=e.geometry;return t?Vt(t):!1})),Gt=m(()=>Ht.value.map(e=>{let t=zt(e.geometry);return t?{...e,path:t}:null}).filter(Boolean)),Kt=m(()=>Ut.value.map(e=>{let t=zt(e.geometry);return t?{...e,path:t}:null}).filter(Boolean)),qt=m(()=>{let e=[];function t(e={}){let t=e?.style&&typeof e.style==`object`?e.style:{},n=e.radius??e.r??t.radius??t.r,r=e.color??e.fill??t.color??t.fill,i=e.stroke??t.stroke,a=e.strokeWidth??e.stroke_width??t.strokeWidth??t.stroke_width;return{radius:Number.isFinite(Number(n))?Number(n):Number(F.value.radius),fill:r!=null&&String(r).trim()?o(String(r).trim()):F.value.fill,stroke:i!=null&&String(i).trim()?o(String(i).trim()):F.value.stroke,strokeWidth:Number.isFinite(Number(a))?Number(a):Number(F.value.strokeWidth)}}for(let n of Wt.value){let r=Bt(n.geometry);for(let i=0;i<r.length;i+=1){let a=r[i];if(!Array.isArray(a)||a.length<2)continue;let o=Number(a[0]),s=Number(a[1]);if(!Number.isFinite(o)||!Number.isFinite(s))continue;let c=W([o,s]),l=c?.[0],u=c?.[1];if(!Number.isFinite(l)||!Number.isFinite(u))continue;let d=t(n?.feature?.properties&&typeof n.feature.properties==`object`?n.feature.properties:{});e.push({uid:`${n.uid}-geojson-point-${i}`,name:n.name||``,x:l,y:u,...d,originalFeature:n.feature,featureIndex:n.index,pointIndex:i})}}return e});function Jt(e){if(!e||typeof e.type!=`string`)return[];let t=[],n=e=>{if(!Array.isArray(e)||e.length<2)return;let n=Number(e[0]),r=Number(e[1]);if(!Number.isFinite(n)||!Number.isFinite(r))return;let i=W([n,r]),a=i?.[0],o=i?.[1];Number.isFinite(a)&&Number.isFinite(o)&&t.push([a,o])},r=e=>{if(Array.isArray(e)){if(e.length>=2&&typeof e[0]==`number`&&typeof e[1]==`number`)n(e);else for(let t of e)r(t)}};if(e.type===`GeometryCollection`&&Array.isArray(e.geometries)){for(let n of e.geometries)t.push(...Jt(n));return t}return e.type===`Point`?(n(e.coordinates),t):e.type===`MultiPoint`?((e.coordinates||[]).forEach(n),t):(r(e.coordinates),t)}function Yt(e){let t=[];for(let n of e)t.push(...Jt(n.geometry));if(!t.length)return null;let n=1/0,r=1/0,i=-1/0,a=-1/0;for(let[e,o]of t)e<n&&(n=e),o<r&&(r=o),e>i&&(i=e),o>a&&(a=o);let o=i-n,s=a-r;return!(o>0)||!(s>0)?null:{minX:n,minY:r,maxX:i,maxY:a,width:o,height:s}}let G=m(()=>Yt(Rt.value));function Xt({bounds:e,targetWidth:t,targetHeight:n,padding:r}){if(!e||!(e.width>0)||!(e.height>0))return{scale:1,translateX:0,translateY:0,transform:``};let i=Number.isFinite(Number(r))?Number(r):0,a=Math.max(1,t-i*2),o=Math.max(1,n-i*2),s=a/e.width,c=o/e.height,l=Math.min(s,c),u=e.width*l,d=e.height*l,f=i+(a-u)/2,p=i+(o-d)/2,ee=f-e.minX*l,te=p-e.minY*l;return{scale:l,translateX:ee,translateY:te,transform:`translate(${ee} ${te}) scale(${l})`}}let Zt=m(()=>{let e=G.value;if(!e)return{scale:1,translateX:0,translateY:0,transform:``};let t=P.value?.map?.fitPadding,n=Number.isFinite(Number(t))?Number(t):0;return Xt({bounds:e,targetWidth:U.value.width,targetHeight:U.value.height,padding:n})}),Qt=m(()=>`0 0 ${U.value.width} ${U.value.height}`),{viewBox:K,resetZoom:$t,setInitialViewBox:en,scale:tn,zoomByFactor:nn}=ge(L,{x:0,y:0,width:U.value.width,height:U.value.height},1,B);function rn(){B.value=!B.value}function an(e){let t=Zt.value,n=Number(t?.scale)||1,r=Number(t?.translateX)||0,i=Number(t?.translateY)||0;return{x:e.x*n+r,y:e.y*n+i}}function on(){let e=P.value?.map?.center,t=Number(e?.[0]),n=Number(e?.[1]),r=Array.isArray(e)&&e.length===2&&Number.isFinite(t)&&Number.isFinite(n)&&(t!==0||n!==0),i=U.value.width,a=U.value.height;if(!r)return{x:0,y:0,width:i,height:a};let o=W([t,n]),s=o?.[0],c=o?.[1];if(!Number.isFinite(s)||!Number.isFinite(c))return{x:0,y:0,width:i,height:a};let l=an({x:s,y:c});return{x:l.x-i/2,y:l.y-a/2,width:i,height:a}}function sn(){let e=on();en(e,{overwriteCurrentIfNotZoomed:!0}),O.value=!0}let cn=m(()=>{let e=K.value;return e?`${e.x} ${e.y} ${e.width} ${e.height}`:Qt.value});function ln(){nn(qe,!0)}function un(){nn(1/qe,!0)}async function dn(){let e=on();en(e,{overwriteCurrentIfNotZoomed:!0}),$t(!0)}Me(()=>[P.value.projection,P.value.map.center?.[0],P.value.map.center?.[1],P.value.map.fitPadding,jt.value],async()=>{O.value=!1,await we(),requestAnimationFrame(()=>{O.value||sn()})},{deep:!1}),Me(()=>[V.value,H.value,R.value],async()=>{R.value&&(await we(),en({x:0,y:0,width:U.value.width,height:U.value.height},{overwriteCurrentIfNotZoomed:!0}),O.value=!1,requestAnimationFrame(()=>{O.value||sn()}))},{flush:`post`});function fn(e){return e?e.type===`FeatureCollection`&&Array.isArray(e.features)?e.features.filter(e=>e?.type===`Feature`&&e.geometry?.type===`Point`).map((e,t)=>{let n=e.properties||{},r=n.name||n.label||n.title||`Point ${t+1}`,i=e.geometry.coordinates;return{uid:`map-point-${E.value}-${t}`,name:r,coordinates:i,color:n.color??null,radius:n.radius??null,hoverRadiusRatio:F.value.hoverRadiusRatio,description:n.description??null,original:e,index:t}}):Array.isArray(e)?e.map((e,t)=>{let n=null,r=`Point ${t+1}`,i=null,a=null,o=null;Array.isArray(e)&&e.length>=2?n=[Number(e[0]),Number(e[1])]:e&&typeof e==`object`&&(Array.isArray(e.coordinates)&&e.coordinates.length>=2?n=[Number(e.coordinates[0]),Number(e.coordinates[1])]:Number.isFinite(Number(e.lon))&&Number.isFinite(Number(e.lat))&&(n=[Number(e.lon),Number(e.lat)]),typeof e.name==`string`&&e.name.trim()&&(r=e.name),e.description!=null&&(i=e.description),e.color!=null&&(a=e.color),e.radius!=null&&(o=e.radius));let s=n?n[0]:NaN,c=n?n[1]:NaN;return!Number.isFinite(s)||!Number.isFinite(c)?null:{uid:`map-point-${E.value}-${t}`,name:r,coordinates:[s,c],color:a,radius:o,hoverRadiusRatio:F.value.hoverRadiusRatio,description:i,original:e,index:t}}).filter(Boolean):typeof e==`object`?Object.entries(e).map(([e,t],n)=>{if(!t||typeof t!=`object`)return null;let r=Array.isArray(t.coordinates)?t.coordinates:null;if(!r||r.length<2)return null;let i=Number(r[0]),a=Number(r[1]);return!Number.isFinite(i)||!Number.isFinite(a)?null:{uid:`map-point-${E.value}-${n}-${e}`,name:t.name||e,coordinates:[i,a],color:t.color??null,radius:t.radius??null,hoverRadiusRatio:F.value.hoverRadiusRatio,description:t.description??null,original:t,index:n}}).filter(Boolean):[]:[]}let pn=m(()=>fn(vt.value)),mn=m(()=>pn.value.map(e=>{let t=W(e.coordinates),n=t?.[0],r=t?.[1];return!Number.isFinite(n)||!Number.isFinite(r)?null:{...e,x:n,y:r,fill:e.color?o(e.color):F.value.fill,radius:Number.isFinite(Number(e.radius))?Number(e.radius):F.value.radius}}).filter(Boolean)),q=m(()=>mn.value.map((e,t)=>({...e,keyboardIndex:t})));function hn(e){let t=an(e),n=d(t.x,t.y,L.value);n&&(ct.value={x:n.x,y:n.y})}let gn=S(!1),_n=S(``),J=S(!1),Y=S(null),X=S(null);function vn(e){_n.value=e,gn.value=!0}function Z(){gn.value=!1,_n.value=``}function yn(e){return String(e??``).replaceAll(`&`,`&amp;`).replaceAll(`<`,`&lt;`).replaceAll(`>`,`&gt;`).replaceAll(`"`,`&quot;`).replaceAll(`'`,`&#039;`)}function bn(e){nt.value={datapoint:e,seriesIndex:e.index,series:pn.value,config:P.value},J.value=!1;let t=I.value.tooltip.customFormat;if(a(t))try{let e=t(nt.value);if(typeof e==`string`)return J.value=!0,e}catch{console.warn(`Custom format cannot be applied.`),J.value=!1}return`<div><div style="font-weight:600">${yn(e.name)}</div>${e.description==null?``:`<div style="margin-top:6px">${yn(e.description)}</div>`}</div>`}function xn(e){J.value=!1;let t=I.value.tooltip.customFormat;if(a(t))try{let n=t({datapoint:e,config:P.value});if(typeof n==`string`)return J.value=!0,n}catch{console.warn(`Custom format cannot be applied.`),J.value=!1}let n=typeof e?.name==`string`?e.name.trim():``;return n?`<div><div style="font-weight:600">${yn(n)}</div></div>`:(J.value=!1,``)}function Sn(e){P.value.events.territoryEnter&&P.value.events.territoryEnter({datapoint:e,seriesIndex:e.index}),!(typeof e?.name==`string`&&e.name.trim())&&!I.value.territory.hover.enabledWhenEmpty?(X.value=null,Z()):(X.value=e.uid,vn(xn(e)))}function Cn(e){X.value=null,Z(),P.value.events.territoryLeave&&P.value.events.territoryLeave({datapoint:e,seriesIndex:e.index})}function wn(e){P.value.events.territoryClick&&P.value.events.territoryClick({datapoint:e,seriesIndex:e.index})}function Tn(e,t=null,n=`pointer`){M.value=n,Y.value=e.uid,Number.isInteger(t)&&(j.value=t),n===`keyboard`&&hn(e),vn(bn(e)),P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:e,seriesIndex:e.index})}function En(e,t=`pointer`){(t!==`pointer`||M.value!==`keyboard`)&&(Y.value=null,Z(),t!==`pointer`&&(j.value=null,M.value=`pointer`),P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:e,seriesIndex:e.index}))}let Dn=m(()=>!!P.value.events.datapointClick&&typeof P.value.events.datapointClick==`function`);function On(e){Dn.value&&P.value.events.datapointClick({datapoint:e,seriesIndex:e.index})}let Q=m(()=>I.value.territory);function kn(e){let t=typeof e?.name==`string`?e.name.trim():``;if(!t){X.value=null,Z();return}let n={name:t,uid:e.uid,index:e.featureIndex,properties:{}};X.value=e.uid,vn(xn(n))}function An(){X.value=null,Z()}let jn=S(!1);function Mn(){jn.value=!jn.value}Me(()=>jn.value,e=>{B.value=!e});function Nn(){z.value.showTooltip=!z.value.showTooltip}let Pn=m(()=>I.value.backgroundColor),Fn=m(()=>I.value.title),{isCallbackImaging:In,isCallbackSvg:Ln,generateSvg:Rn,onGenerateImage:zn}=oe({svg:L,title:Fn,legend:null,legendItems:null,backgroundColor:Pn,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:St}),Bn=re(D,()=>I.value.title.text),$=S(!1),Vn=null;function Hn(){B.value&&($.value=!0)}function Un(){$.value=!1}function Wn(){B.value&&($.value=!0,Vn&&clearTimeout(Vn),Vn=setTimeout(()=>{$.value=!1,Vn=null},140))}De(()=>{Vn&&clearTimeout(Vn)});async function Gn([e,t],{animated:n=!0}={}){let r=Number(e),i=Number(t);if(!Number.isFinite(r)||!Number.isFinite(i))return;let a=W([r,i]),o=a?.[0],s=a?.[1];if(!Number.isFinite(o)||!Number.isFinite(s))return;let c=an({x:o,y:s}),l=K.value?{...K.value}:{x:0,y:0,width:U.value.width,height:U.value.height},u={x:c.x-l.width/2,y:c.y-l.height/2,width:l.width,height:l.height};if(!n){K.value=u;return}let d={...l},f={...u},p=null,ee=e=>{p??=e;let t=Math.min((e-p)/250,1);K.value={x:d.x+(f.x-d.x)*t,y:d.y+(f.y-d.y)*t,width:d.width+(f.width-d.width)*t,height:d.height+(f.height-d.height)*t},t<1&&requestAnimationFrame(ee)};requestAnimationFrame(ee)}Oe(async()=>{Tt(),await we(),requestAnimationFrame(()=>{O.value||(sn(),(P.value.map.center?.[0]||P.value.map.center?.[1])&&Gn(P.value.map.center,{animated:!1}))})}),De(()=>{wt()});async function Kn(){Qe(`copyAlt`,{config:P.value,dataset:vt.value}),P.value.userOptions.callbacks.altCopy?await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:vt.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function qn(e,t){let n=q.value;if(!n.length)return null;let r=n[e];if(!r)return null;let i=null,a=1/0;for(let o=0;o<n.length;o+=1){if(o===e)continue;let s=n[o],c=s.x-r.x,l=s.y-r.y,u=!1,d=0,f=0;if(t===`right`&&c>0&&(u=!0,d=c,f=Math.abs(l)),t===`left`&&c<0&&(u=!0,d=Math.abs(c),f=Math.abs(l)),t===`down`&&l>0&&(u=!0,d=l,f=Math.abs(c)),t===`up`&&l<0&&(u=!0,d=Math.abs(l),f=Math.abs(c)),!u)continue;let p=d*d+f*f*4;p<a&&(a=p,i=o)}return i}function Jn(e){let t=q.value;return t.length?e===`right`?t.reduce((e,t,n,r)=>t.x<r[e].x?n:e,0):e===`left`?t.reduce((e,t,n,r)=>t.x>r[e].x?n:e,0):e===`down`?t.reduce((e,t,n,r)=>t.y<r[e].y?n:e,0):e===`up`?t.reduce((e,t,n,r)=>t.y>r[e].y?n:e,0):0:null}function Yn(){lt.value=!0}function Xn(){let e=j.value==null?null:q.value[j.value];e?En(e,`keyboard`):(j.value=null,M.value=`pointer`,Z(),Y.value=null),lt.value=!1}function Zn(e){if(!L.value||jn.value||document.activeElement!==L.value||!q.value.length)return;let t=e.key===`ArrowRight`,n=e.key===`ArrowLeft`,r=e.key===`ArrowDown`,i=e.key===`ArrowUp`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;if(!t&&!n&&!r&&!i&&!a&&!o)return;if(e.preventDefault(),e.stopPropagation(),o){let e=j.value==null?null:q.value[j.value];e?En(e,`keyboard`):(j.value=null,M.value=`pointer`,Z(),Y.value=null);return}if(a){let e=j.value==null?null:q.value[j.value];if(!e)return;On(e);return}let s=t?`right`:n?`left`:r?`down`:`up`,c=null;if(j.value==null?c=Jn(s):(c=qn(j.value,s),c??=Jn(s)),c==null)return;let l=q.value[c];l&&Tn(l,c,`keyboard`)}let Qn=m(()=>({headers:[`Name`,`Latitude`,`Longitude`,`Description`],rows:pn.value.map(e=>{let t=Array.isArray(e.coordinates)?e.coordinates[1]:null,n=Array.isArray(e.coordinates)?e.coordinates[0]:null;return[e.name??``,Number.isFinite(t)?String(t):``,Number.isFinite(n)?String(n):``,e.description??``]})}));te({getImage:Bn,generatePdf:xt,generateImage:St,generateSvg:Rn,toggleTooltip:Nn,toggleAnnotator:Mn,toggleFullscreen:ut,zoomIn:ln,zoomOut:un,resetZoom:$t,focusLocation:Gn,copyAlt:Kn});let $n=m(()=>he(P.value.userOptions?.annotator?.followZoom,K.value));return(e,i)=>(x(),_(`div`,{class:Te(`vue-data-ui-component vue-ui-geo ${N.value?`vue-data-ui-wrapper-fullscreen`:``} ${R.value?`vue-ui-geo-responsive`:``} ${$.value?`vue-ui-geo-interacting`:``}`),ref_key:`geoChart`,ref:D,id:`map_${E.value}`,dir:`auto`,style:Ee({fontFamily:P.value.style.fontFamily,width:`100%`,backgroundColor:I.value.backgroundColor,height:R.value?`${H.value}px`:void 0})},[v(`div`,{id:`chart-instructions-${E.value}`,class:`sr-only`},[v(`p`,null,Ae(P.value.a11y.translations.keyboardNavigation),1)],8,Ie),Qn.value?.rows?.length?(x(),h(fe,{key:0,uid:E.value,head:Qn.value.headers,body:Qn.value.rows,notice:P.value.a11y.translations.tableAvailable,caption:P.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):g(``,!0),Et.value?(x(),_(`div`,{key:1,ref_key:`noTitle`,ref:it,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):g(``,!0),I.value.title.text?(x(),_(`div`,{key:2,ref_key:`chartTitle`,ref:rt,style:`width:100%;background:transparent;padding-bottom:12px`},[(x(),h(ae,{key:`title_${tt.value}`,config:{title:{cy:`geo-title`,...I.value.title},subtitle:{cy:`geo-subtitle`,...I.value.title.subtitle}}},null,8,[`config`]))],512)):g(``,!0),P.value.userOptions.buttons.annotator?(x(),h(w(Xe),Ce({key:3},w(n)(P.value.userOptions.annotator),{svgRef:w(L),followZoom:P.value.userOptions?.annotator?.followZoom,annotationViewport:$n.value,backgroundColor:I.value.backgroundColor,color:I.value.color,active:jn.value,isCursorPointer:pt.value,palette:P.value.userOptions.annotatorPalette,onClose:Mn}),be({_:2},[ke(w(r),n=>({name:n,fn:Ne(r=>[C(e.$slots,n,b(y(w(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`followZoom`,`annotationViewport`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):g(``,!0),P.value.userOptions.show&&(w(ht)||w(mt))?(x(),h(w(Ye),{ref:`userOptionsRef`,key:`user_options_${et.value}`,backgroundColor:I.value.backgroundColor,color:I.value.color,isPrinting:w(yt),isImaging:w(bt),uid:E.value,hasXls:!1,hasTable:!1,hasTooltip:P.value.userOptions.buttons.tooltip&&I.value.tooltip.show,hasPdf:P.value.userOptions.buttons.pdf,hasImg:P.value.userOptions.buttons.img,hasSvg:P.value.userOptions.buttons.svg,hasFullscreen:P.value.userOptions.buttons.fullscreen,hasAltCopy:P.value.userOptions.buttons.altCopy,hasAnnotator:P.value.userOptions.buttons.annotator,hasZoom:P.value.userOptions.buttons.zoom,isZoom:B.value,isFullscreen:N.value,isTooltip:z.value.showTooltip,titles:{...P.value.userOptions.buttonTitles},chartElement:D.value,position:P.value.userOptions.position,isAnnotation:jn.value,callbacks:P.value.userOptions.callbacks,printScale:P.value.userOptions.print.scale,isCursorPointer:pt.value,onToggleFullscreen:ut,onGeneratePdf:w(xt),onGenerateImage:w(zn),onGenerateSvg:w(Rn),onToggleTooltip:Nn,onToggleAnnotator:Mn,onToggleZoom:rn,onCopyAlt:Kn,style:Ee({visibility:w(ht)?w(mt)?`visible`:`hidden`:`visible`})},be({_:2},[ke(w(se)(e.$slots,`menuIcon optionTooltip optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionZoom optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Ne(n=>[C(e.$slots,t,b(y(w(ce)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasFullscreen.hasAltCopy.hasAnnotator.hasZoom.isZoom.isFullscreen.isTooltip.titles.chartElement.position.isAnnotation.callbacks.printScale.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):g(``,!0),I.value.controls.position===`top`&&I.value.controls.show&&!w(_t)?(x(),h(ie,{key:5,ref_key:`zoomControlsTop`,ref:ot,config:P.value,scale:w(tn),isFullscreen:N.value,isCursorPointer:pt.value,onZoomIn:ln,onZoomOut:un,onResetZoom:dn},null,8,[`config`,`scale`,`isFullscreen`,`isCursorPointer`])):g(``,!0),v(`div`,Le,[(x(),_(`svg`,{ref_key:`svgRef`,ref:L,xmlns:w(u),viewBox:cn.value,preserveAspectRatio:`xMidYMid meet`,"aria-describedby":`map-keyboard-instructions-${E.value}`,tabindex:`0`,style:Ee({display:`block`,width:`100%`,height:R.value?`${H.value}px`:`auto`,background:I.value.backgroundColor,touchAction:B.value?`none`:`auto`,cursor:B.value?$.value?`grabbing`:`grab`:`default`}),id:`vue-ui-geo_${E.value}`,onPointerdown:Hn,onPointerup:Un,onPointercancel:Un,onPointerleave:Un,onWheel:Wn,onFocus:Yn,onBlur:Xn,onKeydown:Zn},[xe(w(Ze)),v(`g`,{transform:Zt.value.transform,style:Ee({pointerEvents:$.value?`none`:`auto`})},[C(e.$slots,`svg-underlayer`,{svg:{drawingArea:cn.value,x:G.value?.minX??0,y:G.value?.minY??0,width:G.value?.width??0,height:G.value?.height??0,isPrintingImg:w(yt)||w(bt)||w(In),isPrintingSvg:w(Ln),data:{areaPaths:Gt.value,linePaths:Kt.value,geoJsonPoints:qt.value,projectedPoints:mn.value}}},void 0,!0),v(`g`,null,[(x(!0),_(ye,null,ke(Gt.value,e=>(x(),_(`path`,{class:`vue-ui-geo-territory`,key:e.uid,d:e.path,fill:X.value===e.uid?Q.value.hover.fill:Q.value.fill,stroke:X.value===e.uid?Q.value.hover.stroke:Q.value.stroke,"stroke-width":X.value===e.uid?Q.value.hover.strokeWidth:Q.value.strokeWidth,"vector-effect":`non-scaling-stroke`,onMouseenter:t=>Sn(e),onMouseleave:t=>Cn(e),onClick:t=>wn(e)},null,40,Be))),128))]),v(`g`,null,[(x(!0),_(ye,null,ke(Kt.value,e=>(x(),_(`path`,{class:`vue-ui-geo-territory`,key:e.uid,d:e.path,fill:`none`,stroke:X.value===e.uid?Q.value.hover.stroke:Q.value.stroke,"stroke-width":X.value===e.uid?Q.value.hover.strokeWidth:Q.value.strokeWidth,"vector-effect":`non-scaling-stroke`,onMouseenter:t=>Sn(e),onMouseleave:t=>Cn(e),onClick:t=>wn(e)},null,40,Ve))),128))]),v(`g`,null,[(x(!0),_(ye,null,ke(qt.value,e=>(x(),_(`circle`,{key:e.uid,cx:e.x,cy:e.y,r:e.radius,fill:e.fill,stroke:e.stroke,"stroke-width":e.strokeWidth,"vector-effect":`non-scaling-stroke`,onMouseenter:t=>kn(e),onMouseleave:An},null,40,He))),128))]),(x(!0),_(ye,null,ke(mn.value,(t,n)=>(x(),_(`g`,{key:t.uid},[C(e.$slots,`datapoint`,Ce({ref_for:!0},{point:t,onPointEnter:Tn,onPointLeave:En,onPointClick:On,highlighted:Y.value===t.uid}),()=>[v(`circle`,{class:Te({"vue-ui-geo-point":!0,"vue-ui-geo-point-with-event":Dn.value&&pt.value}),cx:t.x,cy:t.y,r:Y.value===t.uid?t.radius*t.hoverRadiusRatio:t.radius,fill:t.fill,stroke:F.value.stroke,"stroke-width":F.value.strokeWidth,"vector-effect":`non-scaling-stroke`,onMouseenter:e=>Tn(t,n),onMouseleave:e=>En(t),onClick:e=>On(t)},null,42,Ue)],!0),ft.value.show?(x(),_(`text`,{key:0,class:`vue-ui-geo-point-label`,x:t.x,y:t.y+(Y.value===t.uid?t.radius*t.hoverRadiusRatio:t.radius)+ft.value.offsetY+1*ft.value.fontSizeRatio,"text-anchor":`middle`,fill:ft.value.color,"font-size":1*ft.value.fontSizeRatio},Ae(t.name),9,We)):g(``,!0)]))),128)),C(e.$slots,`svg`,{svg:{drawingArea:cn.value,x:G.value?.minX??0,y:G.value?.minY??0,width:G.value?.width??0,height:G.value?.height??0,isPrintingImg:w(yt)||w(bt)||w(In),isPrintingSvg:w(Ln),data:{areaPaths:Gt.value,linePaths:Kt.value,geoJsonPoints:qt.value,projectedPoints:mn.value}}},void 0,!0)],12,ze)],44,Re)),e.$slots.hint?(x(),_(`div`,Ge,[C(e.$slots,`hint`,b(y({hint:P.value.a11y.translations.keyboardNavigation,isVisible:lt.value})),void 0,!0)])):g(``,!0)]),e.$slots.watermark?(x(),_(`div`,Ke,[C(e.$slots,`watermark`,b(y({isPrinting:w(yt)||w(bt)||w(In)||w(Ln)})),void 0,!0)])):g(``,!0),I.value.controls.position===`bottom`&&I.value.controls.show&&!w(_t)?(x(),h(ie,{key:7,ref_key:`zoomControlsBottom`,ref:st,config:P.value,scale:w(tn),isFullscreen:N.value,isCursorPointer:pt.value,onZoomIn:ln,onZoomOut:un,onResetZoom:dn},null,8,[`config`,`scale`,`isFullscreen`,`isCursorPointer`])):g(``,!0),xe(w(Je),{teleportTo:I.value.tooltip.teleportTo,show:z.value.showTooltip&&gn.value,backgroundColor:I.value.tooltip.backgroundColor,color:I.value.tooltip.color,fontSize:I.value.tooltip.fontSize,borderRadius:I.value.tooltip.borderRadius,borderColor:I.value.tooltip.borderColor,borderWidth:I.value.tooltip.borderWidth,backgroundOpacity:I.value.tooltip.backgroundOpacity,position:I.value.tooltip.position,offsetX:I.value.tooltip.offsetX,offsetY:I.value.tooltip.offsetY,parent:D.value,content:_n.value,isCustom:J.value,isFullscreen:N.value,smooth:I.value.tooltip.smooth,backdropFilter:I.value.tooltip.backdropFilter,smoothForce:I.value.tooltip.smoothForce,smoothSnapThreshold:I.value.tooltip.smoothSnapThreshold,isA11yMode:M.value===`keyboard`,a11yPosition:ct.value},{"tooltip-before":Ne(()=>[C(e.$slots,`tooltip-before`,b(y({...nt.value})),void 0,!0)]),tooltip:Ne(()=>[C(e.$slots,`tooltip`,b(y({...nt.value})),void 0,!0)]),"tooltip-after":Ne(()=>[C(e.$slots,`tooltip-after`,b(y({...nt.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`]),e.$slots.source?(x(),_(`div`,{key:8,ref_key:`source`,ref:at,dir:`auto`},[C(e.$slots,`source`,{},void 0,!0)],512)):g(``,!0),C(e.$slots,`skeleton`,{},()=>[w(_t)?(x(),h(p,{key:0})):g(``,!0)],!0)],14,Fe))}},[[`__scopeId`,`data-v-7cb2ce6a`]]);export{Pe as n,Je as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-By3Vb5kz.js";import{$ as n,X as r,at as ee,i,in as a}from"./lib-rPeBMZrn.js";import{n as te,t as o}from"./BaseScanner-8NdoBs7B.js";import{n as s,t as c}from"./useHints-C-TwxM0Y.js";import{t as l}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as u}from"./useNestedProp-DnGoh-XS.js";import{t as ne}from"./DefGrad-DKMq1REY.js";import{Fragment as d,computed as f,createBlock as re,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createVNode as g,defineAsyncComponent as _,normalizeStyle as v,onMounted as y,openBlock as b,ref as x,renderSlot as ie,toDisplayString as S,toRefs as ae,unref as C,useSlots as oe,watch as w}from"vue";var T=/* @__PURE__ */ e({default:()=>B}),E=[`aria-label`,`aria-valuenow`,`aria-valuetext`,`aria-busy`],D=[`viewBox`,`width`],O={key:0},k=[`stroke`],A=[`stroke`],j=[`width`,`fill`],M=[`fill`],N={key:0},P=[`id`],F=[`stroke`],I=[`stroke`,`stroke-dasharray`,`stroke-dashoffset`],L=[`filter`],R=[`stroke`,`stroke-dasharray`,`stroke-dashoffset`],z=[`fill`],B=/*#__PURE__*/ l({__name:`vue-ui-gizmo`,props:{config:{type:Object,default(){return{}}},dataset:{type:Number}},setup(e){let l=_(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),{vue_ui_gizmo:T}=t(),B=e,V=x(r()),H=oe();y(()=>{W()}),y(()=>{H[`chart-background`]&&U.value&&console.warn(`VueUiGizmo does not support the #chart-background slot.`)});let U=f(()=>G.value.debug);function W(){!B.dataset&&B.dataset!==0&&ee({componentName:`VueUiGizmo`,type:`dataset`,debug:U.value}),B.dataset<0&&U.value&&console.warn(`VueUiGizmo: dataset cannot be negative.`),B.dataset>100&&U.value&&console.warn(`VueUiGizmo: gauge is maxed out, as dataset exceeds 100% (props.dataset = ${B.dataset})`)}let G=x(Y());s({config:()=>G.value,dataset:()=>B.dataset,component:`VueUiGizmo`,rules:[c.noHint]});let K=f(()=>a({defaultConfig:{stroke:`#6A6A6A80`,color:`#6A6A6A`,gradientColor:`#CACACA`,textColor:`transparent`},userConfig:G.value.skeletonConfig??{}})),{loading:q,FINAL_DATASET:J,manualLoading:se}=te({...ae(B),FINAL_CONFIG:G,prepareConfig:Y,dsIsNumber:!0,skeletonDataset:B.config?.skeletonDataset??50,skeletonConfig:a({defaultConfig:G.value,userConfig:K.value})});function Y(){return u({userConfig:B.config,defaultConfig:T})}w(()=>B.config,e=>{G.value=Y(),W()},{deep:!0});let X=f(()=>({battery:{width:G.value.showPercentage?150:80,height:50},gauge:{width:80,height:80}})[G.value.type]),Z=f(()=>Math.min(Math.max(0,J.value),100)),Q=f(()=>Math.max(0,J.value)),$=f(()=>{let e=2*Math.PI*35,t=e-Z.value/100*e;return{dasharray:`${e} ${e}`,dashoffset:t}});return(e,t)=>(b(),m(`div`,{class:`vue-data-ui-component vue-ui-gizmo-wrapper`,role:`progressbar`,"aria-label":G.value.a11y.translations.label,"aria-valuemin":`0`,"aria-valuemax":`100`,"aria-valuenow":C(q)?void 0:Z.value,"aria-valuetext":Z.value+`%`,"aria-busy":C(q)?`true`:`false`},[(b(),m(`svg`,{class:`vue-ui-gizmo`,viewBox:`0 0 ${X.value.width} ${X.value.height}`,width:G.value.size,style:v({background:`transparent`,fontFamily:G.value.fontFamily})},[g(C(l)),G.value.useGradient?(b(),m(`defs`,O,[g(ne,{t:`linear`,id:`gizmo_gradient_${V.value}`,x1:`0%`,x2:`100%`,y1:`0%`,y2:`0%`,stops:[[`0%`,G.value.gradientColor,1],[`100%`,G.value.color,1]]},null,8,[`id`,`stops`])])):p(``,!0),G.value.type===`battery`?(b(),m(d,{key:1},[h(`path`,{d:`M 5 10 L 5 40 C 5 43 7 45 9 45 L 65 45 C 68 45 70 43 70 40 L 70 38 C 73 38 75 38 75 33 L 75 17 C 75 12 73 12 70 12 L 70 10 C 70 7 68 5 65 5 L 10 5 C 7 5 5 7 5 10`,stroke:G.value.stroke,"stroke-width":2,fill:`none`},null,8,k),h(`path`,{d:`M 70 16 L 70 34`,stroke:G.value.stroke,"stroke-width":2,fill:`none`,style:{opacity:`0.5`}},null,8,A),h(`rect`,{x:10,y:10,height:30,width:55*(Z.value/100),fill:G.value.useGradient?`url(#gizmo_gradient_${V.value})`:G.value.color,rx:2},null,8,j),G.value.showPercentage?(b(),m(`text`,{key:0,x:85,y:32,"text-anchor":`start`,"font-size":`20`,fill:G.value.textColor},S(C(i)(G.value.formatter,Q.value,C(n)({v:Q.value,s:`%`}))),9,M)):p(``,!0)],64)):p(``,!0),G.value.type===`gauge`?(b(),m(d,{key:2},[G.value.useGradient?(b(),m(`defs`,N,[h(`filter`,{id:`blur_${V.value}`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[...t[0]||=[h(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:1},null,-1)]],8,P)])):p(``,!0),h(`circle`,{cx:40,cy:40,r:35,stroke:G.value.stroke,"stroke-width":8,fill:`none`},null,8,F),h(`circle`,{cx:40,cy:40,r:35,stroke:G.value.color,"stroke-width":8,"stroke-dasharray":$.value.dasharray,"stroke-dashoffset":$.value.dashoffset,"stroke-linecap":`round`,fill:`none`,style:{transform:`rotate(-90deg)`,"transform-origin":`50% 50%`}},null,8,I),G.value.useGradient?(b(),m(`g`,{key:1,filter:`url(#blur_${V.value})`},[h(`circle`,{cx:40,cy:40,r:35,stroke:G.value.gradientColor,"stroke-width":1,fill:`none`,"stroke-dasharray":$.value.dasharray,"stroke-dashoffset":$.value.dashoffset,style:{transform:`rotate(-90deg)`,"transform-origin":`50% 50%`}},null,8,R)],8,L)):p(``,!0),G.value.showPercentage?(b(),m(`text`,{key:2,x:40,y:47,"text-anchor":`middle`,"font-size":`20`,fill:G.value.textColor},S(C(i)(G.value.formatter,Q.value,C(n)({v:Q.value,s:`%`}))),9,z)):p(``,!0)],64)):p(``,!0)],12,D)),ie(e.$slots,`skeleton`,{},()=>[C(q)?(b(),re(o,{key:0})):p(``,!0)],!0)],8,E))}},[[`__scopeId`,`data-v-f296c0f3`]]);export{T as n,B as t};