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,8 +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,At as o,D as ee,Ht as s,J as c,P as l,S as te,U as ne,X as re,at as ie,c as ae,i as oe,in as se,nn as ce,nt as le,r 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,t as ve}from"./useHints-C-TwxM0Y.js";import{t as ye}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as be}from"./useNestedProp-DnGoh-XS.js";import{t as xe}from"./useThemeCheck-BKNRbGeC.js";import{t as Se}from"./chartImage-DPGnEuYM.js";import{n as Ce}from"./Title-BliHuXfT.js";import{t as we}from"./useChartExport-BZts4KFb.js";import{n as Te,t as Ee}from"./tableIntegration-CNoJ1CIY.js";import{n as De,t as Oe}from"./userOptionsSlots-DYuo-E5m.js";import{t as ke}from"./useTimeLabels-Das5O74F.js";import{t as Ae}from"./usePrinter-DVf3YcG5.js";import{t as je}from"./useSvgLabelLayout-42Kats14.js";import{t as Me}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Ne}from"./useResponsive-CENUxfEL.js";import{t as Pe}from"./A11yDataTable-DWNlWXzs.js";import{t as Fe}from"./useUserOptionState-CXlFnwPv.js";import{t as Ie}from"./useChartAccessibility-DOMuYJfm.js";import{t as Le}from"./vue_ui_bump-KJL9GYr4.js";import{t as Re}from"./BaseDraggableDialog-BK7dj9O6.js";import{Fragment as u,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as ze,createTextVNode as Be,createVNode as Ve,defineAsyncComponent as g,guardReactiveProps as He,mergeProps as Ue,normalizeClass as We,normalizeProps as Ge,normalizeStyle as _,onBeforeUnmount as Ke,onMounted as qe,openBlock as v,ref as y,renderList as b,renderSlot as x,resolveDynamicComponent as Je,shallowRef as Ye,toDisplayString as S,toRefs as Xe,unref as C,watch as w,watchEffect as Ze,withCtx as T}from"vue";var Qe=/* @__PURE__ */ e({default:()=>vt}),$e=[`id`],et=[`id`],tt={style:{position:`relative`}},nt=[`xmlns`,`aria-describedby`,`viewBox`],rt=[`x`,`y`,`width`,`height`],it=[`d`,`stroke`,`stroke-width`,`onMouseenter`],at=[`d`,`stroke`,`stroke-width`,`onMouseenter`,`onMouseleave`,`onClick`],ot=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`,`onMouseenter`,`onMouseleave`,`onClick`],st=[`x`,`y`,`fill`,`font-size`],ct=[`onMouseenter`,`onMouseleave`,`onClick`],lt=[`x`,`y`,`fill`,`font-size`],ut=[`x`,`y`,`fill`,`font-size`,`font--weight`,`innerHTML`,`onMouseenter`,`onMouseleave`,`onClick`],dt=[`x`,`y`,`fill`,`font-size`,`font--weight`,`innerHTML`,`onMouseenter`,`onMouseleave`,`onClick`],ft={key:0},pt={key:1},mt=[`text-anchor`,`font-size`,`font-weight`,`fill`,`stroke`,`transform`],ht=[`text-anchor`,`font-size`,`fill`,`transform`,`innerHTML`],gt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},_t={key:5,class:`vue-data-ui-watermark`},vt=/*#__PURE__*/ ye({__name:`vue-ui-bump`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`copyAlt`],setup(e,{expose:ye,emit:Qe}){let vt=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),yt=g(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),bt=g(()=>import(`./DataTable-Dof6yhO7.js`)),xt=g(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),St=g(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Ct=g(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),{vue_ui_bump:wt}=i(),{isThemeValid:Tt,warnInvalidTheme:Et}=xe(),E=e,Dt=Qe,Ot=d({get(){return!!E.dataset&&E.dataset.length},set(e){return e}}),D=y(null),O=y(re()),kt=y(0),At=y(null),jt=y(null),Mt=y(null),Nt=y(!1),Pt=y(!1),Ft=y(0),It=y(0),Lt=y(null),Rt=y(null),zt=y(!1),k=y(null),Bt=y(null),Vt=y(null),Ht=y(null),A=y(null),Ut=y(!1),j=y(Xt()),M=d(()=>j.value.style.chart.layout.plots),N=d(()=>j.value.style.chart.layout),P=d(()=>j.value.style.chart),F=d(()=>j.value.userOptions);_e({config:()=>j.value,dataset:()=>E.dataset,component:`VueUiBump`,rules:[ve.emptyArray,{test:e=>e.length>31,message:[`👀 The number of series > 31. Consider:`,``,`▶️ Using filters to let users choose a maximum number of series to display`,``,`▶️ Use several instances of the component to show related series`]},{test:e=>e.length===1,message:[`👀 There is only 1 series in your dataset. Consider:`,``,`▶️ Using a line chart, with VueUiXy.`]},{test:e=>e.some(e=>e.values.length>31),message:[`👀 Some series contain > 31 data points, which can make the chart hard to read. Consider:`,``,`▶️ Use filters to show less data points at a time.`,``,`▶️ Use larger time scales, or aggregated values.`]}]});let I=d(()=>j.value.userOptions.useCursorPointer),Wt=d(()=>se({defaultConfig:{userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{timeLabels:{show:!1},lines:{coatingColor:`#4A4A4A`},plots:{stroke:`#4A4A4A`,labels:{show:!1,displayedValue:`rank`}},nameLabels:{useSerieColor:!0}}}}},userConfig:j.value.skeletonConfig??{}})),{loading:Gt,FINAL_DATASET:Kt,manualLoading:qt}=he({...Xe(E),FINAL_CONFIG:j,prepareConfig:Xt,skeletonDataset:E.config?.skeletonDataset??[{name:`————`,values:[1,1,1,2,2,2,3,3,2,2],color:`#4A4A4A`},{name:`————`,values:[2,2,2,1,3,3,2,2,3,3],color:`#6A6A6A`},{name:`————`,values:[3,3,3,3,1,1,1,1,1,1],color:`#8A8A8A`}],skeletonConfig:se({defaultConfig:j.value,userConfig:Wt.value})}),Jt=y(!1),Yt=0;qe(dn);function Xt(){let e=be({userConfig:E.config,defaultConfig:wt}),t={},n=e.theme;if(n){if(!Tt.value(e))Et(e),t=e;else{let r=be({userConfig:Le[n]||E.config,defaultConfig:e});t={...be({userConfig:E.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:ce[n]||s}}}else t=e;return t}let{userOptionsVisible:Zt,setUserOptionsVisibility:Qt,keepUserOptionState:$t}=Fe({config:j.value}),{svgRef:L}=Ie({config:P.value.title});function en(){zt.value=!0,Qt(!0)}function tn(){Qt(!1),zt.value=!1}let R=y({showTable:j.value.table.show});w(j,()=>{R.value={showTable:j.value.table.show}},{immediate:!0}),w(()=>E.config,e=>{Gt.value||(j.value=Xt()),Zt.value=!j.value.userOptions.showOnChartHover,dn(),Ft.value+=1,It.value+=1,R.value.showTable=j.value.table.show,j.value.responsive||(z.value.width=P.value.width,z.value.height=P.value.height),z.value.paddingRatio={top:P.value.padding.top/P.value.height,right:P.value.padding.right/P.value.width,bottom:P.value.padding.bottom/P.value.height,left:P.value.padding.left/P.value.width}}),w(()=>E.dataset,e=>{Array.isArray(e)&&e.length>0&&(qt.value=!1)},{deep:!0});let{isPrinting:nn,isImaging:rn,generatePdf:an,generateImage:on}=Ae({elementId:`bump_${O.value}`,fileName:P.value.title.text||`vue-ui-bump`,options:j.value.userOptions.print}),sn=d(()=>j.value.userOptions.show&&!P.value.title.text),z=y({width:P.value.width,height:P.value.height,paddingRatio:{top:P.value.padding.top/P.value.height,right:P.value.padding.right/P.value.width,bottom:P.value.padding.bottom/P.value.height,left:P.value.padding.left/P.value.width}}),cn=d(()=>fe(j.value.customPalette)),B=Ye(null),V=Ye(null),ln=y(null),un=d(()=>j.value.debug);function dn(){me(E.dataset)?(ie({componentName:`VueUiBump`,type:`dataset`,debug:un.value}),qt.value=!0):E.dataset.forEach((e,t)=>{pe({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{Ot.value=!1,ie({componentName:`VueUiBump`,type:`datasetSerieAttribute`,property:e,index:t,debug:un.value}),qt.value=!0})}),me(E.dataset)||(qt.value=j.value.loading),setTimeout(()=>{Pt.value=!0},10),j.value.responsive&&(B.value&&(V.value&&B.value.unobserve(V.value),B.value.disconnect()),B.value=new ResizeObserver(()=>{Pt.value=!1;let{width:e,height:t}=Ne({chart:D.value,noTitle:jt.value,title:P.value.title.text?At.value:null,legend:null,slicer:null,source:Mt.value});cancelAnimationFrame(Yt),Yt=requestAnimationFrame(()=>{z.value.width=e,z.value.height=t-12,Jt.value=!0,clearTimeout(ln.value),ln.value=setTimeout(()=>{Pt.value=!0},10)})}),V.value=D.value.parentNode,B.value.observe(V.value))}Ke(()=>{cancelAnimationFrame(Yt),B.value&&(V.value&&B.value.unobserve(V.value),B.value.disconnect())});let fn=d(()=>Kt.value.map((e,t)=>{let n=te(e.color)||cn.value[t]||s[t]||s[t%s.length];return{...e,absoluteIndex:t,id:re(),color:n}})),H=d(()=>Math.max(...fn.value.map(e=>e.values.length)));function pn(e){let t=e.map(()=>Array(H.value).fill(null));for(let n=0;n<H.value;n+=1){let r=e.map((e,r)=>({seriesIndex:r,value:e.values?.[n],previousPosition:n>0?t[r][n-1]:r})).filter(e=>Number.isFinite(e.value));r.sort((e,t)=>t.value===e.value?e.previousPosition-t.previousPosition:t.value-e.value);for(let e=0;e<r.length;e+=1){let i=r[e];t[i.seriesIndex][n]=e}}return t}let{metrics:mn,ready:hn,settling:gn,update:_n}=je({svgRef:L,canMeasure:()=>(!j.value.responsive||Jt.value)&&(!N.value.timeLabels.show||wn.value),initialMetrics:{left:0,right:0,bottom:0},measure:e=>N.value.timeLabels.autoRotate.enable&&Pn()?null:{left:e(Bt.value).width,right:e(Vt.value).width,bottom:e(Ht.value).height}});function vn(){return mn.value.left}function yn(){return mn.value.right}let bn=d(()=>N.value.timeLabels.show&&K.value.length?mn.value.bottom+Math.abs(N.value.timeLabels.offsetY)+N.value.timeLabels.fontSize*.3:0),U=d(()=>{let{height:e,width:t}=z.value,{right:n,left:r}=z.value.paddingRatio,i=vn(),a=yn(),o=P.value.padding.top,ee=t-t*n-a,s=t*r+i,c=t-t*n-t*r-i-a,l=e-o-P.value.padding.bottom-bn.value,te=o+l,ne=o+l,re=Math.max(0,e);return{chartHeight:ne,chartWidth:Math.max(0,t),top:o,right:Math.max(0,ee),bottom:Math.max(0,te),left:Math.max(0,s),width:Math.max(0,c),height:Math.max(0,l),unitH:Math.max(0,l)/fn.value.length,unitW:Math.max(0,c)/H.value,svgHeight:re}}),W=d(()=>{if(!Ot.value&&!Gt.value)return[];let e=pn(fn.value);return fn.value.map((t,n)=>({...t,positions:e[n]})).map(e=>{let t=e.positions.map((t,n)=>{let r=oe(M.value.labels.formatter,e.values[n],a({p:M.value.labels.prefix,v:e.values[n],s:M.value.labels.suffix,r:M.value.labels.rounding}));return{name:e.name,id:e.id,x:U.value.left+n*U.value.unitW+U.value.unitW/2,y:U.value.top+t*U.value.unitH+U.value.unitH/2,value:e.values[n],displayValue:r,rank:e.positions[n]+1,color:e.color,labelColor:M.value.labels.color===`auto`?ue(e.color):te(M.value.labels.color)??ue(e.color)}}),n=t.filter(e=>o(e.value)),r=N.value.lines.smooth?l(n):ne(n);return{...e,coordinates:t,path:r}})});d(()=>W.value.flatMap((e,t)=>e.coordinates.map((n,r)=>({...n,pointIndex:r,seriesIndex:t,seriesId:e.id,seriesName:e.name,pointId:`${e.id}_${r}`})).filter(e=>o(e.value))));function xn(e,t,n,r){let i=e.toSorted((e,t)=>e.y-t.y);for(let e=1;e<i.length;e+=1){let n=i[e-1],r=i[e];r.y<n.y+t&&(r.y=n.y+t)}let a=i.length-1;if(a>=0&&i[a].y>r){i[a].y=r;for(let e=a-1;e>=0;--e){let n=i[e+1],r=i[e];r.y>n.y-t&&(r.y=n.y-t)}}if(i.length&&i[0].y<n){let e=n-i[0].y;for(let t=0;t<i.length;t+=1)i[t].y+=e}return i}let Sn=d(()=>{let e=[],t=[];W.value.forEach(n=>{let r=n.coordinates.filter(e=>Number.isFinite(e.rank));if(!r.length)return;e.push({...r[0]});let i=r[r.length-1];t.push({...i})});let n=N.value.nameLabels.fontSize,r=n*1.4,i=U.value.top+n,a=U.value.bottom-n,o=xn(t,r,i,a);return{left:xn(e,r,i,a),right:o}});function Cn(e){let t=M.value.labels.fontSize*.4,n=e.displayValue,r=n.length*(M.value.labels.fontSize*(n.length===1?1:.6)),i=M.value.labels.fontSize,a=r+t*2,o=i+t*2,ee=e.x-a/2,s=e.y-o/2,c=M.value.strokeWidth;return{x:ee-c/2,y:s-c/2,width:a+c,height:o+c,fill:e.color,stroke:M.value.stroke,"stroke-width":c,rx:o/2}}let G=y([]),wn=y(!1),Tn=0;Ze(()=>{let e=++Tn,t=N.value.timeLabels,n=t.values,r=t.datetimeFormatter,i=H.value;!i||!Array.isArray(n)||n.length===0?(G.value=[],wn.value=!0):(async()=>{let t=await ke({values:n,maxDatapoints:i,formatter:r,start:0,end:i});e===Tn&&(G.value=t,wn.value=!0)})()});let K=d(()=>{let e=N.value.timeLabels,t=G.value||[],n=G.value||[],r=H.value,i=t.map(e=>e?.text??``),a=n.map(e=>e?.text??``);return ae(!!e.showOnlyFirstAndLast,!!e.showOnlyAtModulo,Math.max(1,Number(e.modulo)||1),i,a,0,null,r)}),En=d(()=>z.value.width),Dn=d(()=>z.value.height),On=d(()=>({start:0,end:H.value})),q=d(()=>[...W.value].map(e=>{let t=[...e.coordinates].filter(e=>o(e.value)).at(-1);return{...e,navigationRank:t?.rank??1/0}}).sort((e,t)=>e.navigationRank-t.navigationRank));function kn(){A.value=null,Ut.value=!0}function An(){Mn(),Ut.value=!1}function jn(e,t){let n=q.value.length;return n?e===null||e<0||e>=n?0:t===`previous`?(e-1+n)%n:(e+1)%n:null}function Mn(){if(A.value!==null){let e=q.value[A.value];e&&$(e,e)}A.value=null,k.value=null}function Nn(e){if(!L.value||Y.value||document.activeElement!==L.value||!q.value.length)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){Mn();return}if(r){if(A.value===null)return;let e=q.value[A.value];if(!e)return;Jn(e,e);return}let a=A.value;a===null?a=0:t?a=jn(a,`previous`):n&&(a=jn(a,`next`));let o=q.value[a];o&&(A.value=a,Q(o,o))}let J=d(()=>({head:Z.value.head,body:W.value.map(e=>[e.name,...e.coordinates.map(e=>o(e.value)?`${e.displayValue} (${e.rank})`:`-`)]),caption:j.value.a11y.translations.tableCaption,notice:j.value.a11y.translations.tableAvailable})),{detectTimeLabelCollisionNow:Pn}=Me({timeLabelsEls:Ht,timeLabels:G,slicer:On,configRef:j,rotationPath:[`style`,`chart`,`layout`,`timeLabels`,`rotation`],autoRotatePath:[`style`,`chart`,`layout`,`timeLabels`,`autoRotate`,`enable`],isAutoSize:!1,width:En,height:Dn,rotation:N.value.timeLabels.autoRotate.angle,resizeDebounceMs:0}),Y=y(!1);function Fn(){Y.value=!Y.value}function In(e){Nt.value=e,kt.value+=1}function Ln(){R.value.showTable=!R.value.showTable}w(()=>R.value.showTable,e=>Te(e,j,Lt));function Rn(){R.value.showTable=!1,Rt.value&&Rt.value.setTableIconState(!1)}function zn(){return W.value}function Bn(e=null){let t=[[P.value.title.text],[P.value.title.subtitle.text],[``]],n=[``,...K.value.map(e=>e?.text??``)],r=W.value.map(e=>[e.name,...e.coordinates.map(e=>`${e.displayValue}`)]),i=W.value.map(e=>[e.name,...e.coordinates.map(e=>`${e.rank}`)]),a=t.concat([[j.value.table.columnNames.values]]).concat([n]).concat(r).concat([[``],[j.value.table.columnNames.ranking],[n]]).concat(i),o=ee(a);e?e(o):le({csvContent:o,title:P.value.title.text||`vue-ui-bump`})}let X=d(()=>Ee({config:j,style:P,mutableConfig:R,dialog:Re,accordion:yt,isFullscreen:Nt,parent:D,maxWidth:800,isCursorPointer:I})),Z=d(()=>({head:[``].concat(K.value.map(e=>e.text)),body:W.value.map((e,t)=>[e.name,...e.coordinates.map(e=>`${e.displayValue} (${e.rank})`)]),config:{th:{backgroundColor:j.value.table.th.backgroundColor,color:j.value.table.th.color,outline:j.value.table.th.outline},td:{backgroundColor:j.value.table.td.backgroundColor,color:j.value.table.td.color,outline:j.value.table.td.outline},breakpoint:j.value.table.responsiveBreakpoint},colNames:[j.value.table.columnNames.series]})),Vn=d(()=>P.value.backgroundColor),Hn=d(()=>P.value.title),{isCallbackImaging:Un,isCallbackSvg:Wn,generateSvg:Gn,onGenerateImage:Kn}=we({svg:L,title:Hn,legend:null,legendItems:null,backgroundColor:Vn,getSvgCallback:()=>j.value.userOptions.callbacks.svg,generateImage:on}),qn=Se(D,()=>P.value.title.text);function Q(e,t){k.value=t.id,j.value.events.datapointEnter&&j.value.events.datapointEnter({datapoint:e,seriesIndex:e?.pointIndex??null})}function $(e,t){k.value=null,j.value.events.datapointLeave&&j.value.events.datapointLeave({datapoint:e,seriesIndex:e?.pointIndex??null})}function Jn(e,t){j.value.events.datapointClick&&j.value.events.datapointClick({datapoint:e,seriesIndex:e?.pointIndex??null})}async function Yn(){Dt(`copyAlt`,{config:j.value,dataset:W.value}),j.value.userOptions.callbacks.altCopy?await Promise.resolve(j.value.userOptions.callbacks.altCopy({config:j.value,dataset:W.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}return ye({getData:zn,getImage:qn,generatePdf:an,generateCsv:Bn,generateImage:on,generateSvg:Gn,toggleTable:Ln,toggleAnnotator:Fn,toggleFullscreen:In,copyAlt:Yn}),w(()=>[z.value.width,z.value.height,N.value,G.value,wn.value,Bt.value,Vt.value,Ht.value,E.dataset,Jt.value,j.value.style.fontFamily],_n,{flush:`post`,deep:!0}),(e,i)=>(v(),m(`div`,{id:`bump_${O.value}`,ref_key:`bumpChart`,ref:D,class:We({"vue-data-ui-component":!0,"vue-ui-bump":!0,"vue-data-ui-wrapper-fullscreen":Nt.value}),style:_(`background:${P.value.backgroundColor};color:${P.value.color};font-family:${j.value.style.fontFamily}; position: relative; ${j.value.responsive?`height: 100%`:``}`),onMouseenter:en,onMouseleave:tn},[h(`p`,{id:`chart-instructions-${O.value}`,class:`sr-only`},S(j.value.a11y.translations.keyboardNavigation),9,et),J.value.body.length?(v(),f(Pe,{key:0,uid:O.value,head:J.value.head,body:J.value.body,caption:J.value.caption,notice:J.value.notice},null,8,[`uid`,`head`,`body`,`caption`,`notice`])):p(``,!0),F.value.buttons.annotator?(v(),f(C(xt),Ue({key:1},C(n)(F.value.annotator),{svgRef:C(L),backgroundColor:P.value.backgroundColor,color:P.value.color,active:Y.value,isCursorPointer:I.value,palette:F.value.annotatorPalette,onClose:Fn}),ze({_:2},[b(C(r),n=>({name:n,fn:T(r=>[x(e.$slots,n,Ge(He(C(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),x(e.$slots,`userConfig`,{},void 0,!0),sn.value?(v(),m(`div`,{key:2,ref_key:`noTitle`,ref:jt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),P.value.title.text?(v(),m(`div`,{key:3,ref_key:`chartTitle`,ref:At,style:`width:100%;background:transparent;`},[(v(),f(Ce,{key:`title_${Ft.value}`,config:{title:{cy:`bump-title`,...P.value.title},subtitle:{cy:`bump-subtitle`,...P.value.title.subtitle}}},null,8,[`config`]))],512)):p(``,!0),F.value.show&&Ot.value&&(C($t)||C(Zt))?(v(),f(C(St),{ref_key:`userOptionsRef`,ref:Rt,key:`user_option_${kt.value}`,backgroundColor:P.value.backgroundColor,color:P.value.color,isPrinting:C(nn),isImaging:C(rn),uid:O.value,hasTooltip:!1,hasPdf:F.value.buttons.pdf,hasImg:F.value.buttons.img,hasSvg:F.value.buttons.svg,hasXls:F.value.buttons.csv,hasTable:F.value.buttons.table,hasLabel:!1,hasAltCopy:F.value.buttons.altCopy,hasFullscreen:F.value.buttons.fullscreen,isFullscreen:Nt.value,chartElement:D.value,position:F.value.position,titles:{...F.value.buttonTitles},hasAnnotator:F.value.buttons.annotator,isAnnotation:Y.value,callbacks:F.value.callbacks,printScale:F.value.print.scale,tableDialog:j.value.table.useDialog,isCursorPointer:I.value,onToggleFullscreen:In,onGeneratePdf:C(an),onGenerateCsv:Bn,onGenerateImage:C(Kn),onGenerateSvg:C(Gn),onToggleTable:Ln,onToggleAnnotator:Fn,onCopyAlt:Yn,style:_({visibility:C($t)?C(Zt)?`visible`:`hidden`:`visible`})},ze({_:2},[b(C(De)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:T(n=>[x(e.$slots,t,Ge(He(C(Oe)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasAltCopy.hasFullscreen.isFullscreen.chartElement.position.titles.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):p(``,!0),h(`div`,tt,[(v(),m(`svg`,{ref_key:`svgRef`,ref:L,xmlns:C(de),"aria-describedby":`chart-instructions-${O.value}`,viewBox:`0 0 ${U.value.chartWidth<=0?10:U.value.chartWidth} ${U.value.svgHeight<=0?10:U.value.svgHeight}`,class:We({"vue-data-ui-loading":C(Gt),"no-transition":!j.value.useCssAnimation}),style:_(`max-width:100%;overflow:visible;background:transparent;color:${P.value.color};visibility:${C(hn)?`visible`:`hidden`}`),role:`img`,"aria-live":`polite`,preserveAspectRatio:`xMidYMid`,tabindex:`0`,onFocus:kn,onBlur:An,onKeydown:Nn},[Ve(C(Ct)),x(e.$slots,`svg-underlayer`,{svg:{drawingArea:U.value,data:W.value,isPrintingImg:C(nn)||C(rn)||C(Un),isPrintingSvg:C(Wn)}},void 0,!0),e.$slots[`chart-background`]?(v(),m(`foreignObject`,{key:0,x:U.value.left,y:U.value.top,width:U.value.width<=0?10:U.value.width,height:U.value.height<=0?10:U.value.height,style:{pointerEvents:`none`}},[x(e.$slots,`chart-background`,{},void 0,!0)],8,rt)):p(``,!0),(v(!0),m(u,null,b(W.value,e=>(v(),m(u,null,[h(`path`,{class:`transition-opacity`,d:`M${e.path}`,stroke:N.value.lines.coatingColor,"stroke-width":N.value.lines.strokeWidth+2,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,style:_({opacity:k.value==null||k.value===e.id?1:.1}),onMouseenter:t=>k.value=e.id,onMouseleave:i[0]||=e=>k.value=null},null,44,it),h(`path`,{class:`transition-opacity`,d:`M${e.path}`,stroke:e.color,"stroke-width":N.value.lines.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,style:_({opacity:k.value==null||k.value===e.id?1:.1}),onMouseenter:t=>Q(e,e),onMouseleave:t=>$(e,e),onClick:t=>Jn(e,e)},null,44,at)],64))),256)),(v(!0),m(u,null,b(W.value,t=>(v(),m(u,null,[M.value.labels.displayedValue===`rank`?(v(!0),m(u,{key:0},b(t.coordinates,(e,n)=>(v(),m(`circle`,{class:`transition-opacity`,cx:e.x,cy:e.y,r:M.value.radius,fill:t.color,stroke:M.value.stroke,"stroke-width":M.value.strokeWidth,style:_({opacity:k.value==null||k.value===t.id?1:.1}),onMouseenter:r=>Q({...e,pointIndex:n},t),onMouseleave:r=>$({...e,pointIndex:n},t),onClick:r=>Q({...e,pointIndex:n},t)},null,44,ot))),256)):p(``,!0),M.value.labels.show&&M.value.labels.displayedValue===`rank`?(v(!0),m(u,{key:1},b(t.coordinates,e=>(v(),m(`text`,{class:`transition-opacity`,x:e.x,y:e.y+M.value.labels.fontSize/3,fill:e.labelColor,"font-size":M.value.labels.fontSize,"text-anchor":`middle`,style:_({userSelect:`none`,pointerEvents:`none`,opacity:k.value==null||k.value===t.id?1:.1})},S(e.rank),13,st))),256)):p(``,!0),M.value.labels.displayedValue===`value`?(v(!0),m(u,{key:2},b(t.coordinates,n=>(v(),m(u,null,[C(o)(n.value)?(v(),m(`rect`,Ue({key:0,class:`transition-opacity`},{ref_for:!0},Cn(n),{style:{opacity:k.value==null||k.value===t.id?1:.1},onMouseenter:n=>Q({...e.point,pointIndex:e.i},t),onMouseleave:n=>$({...e.point,pointIndex:e.i},t),onClick:n=>Q({...e.point,pointIndex:e.i},t)}),null,16,ct)):p(``,!0),C(o)(n.value)&&M.value.labels.show?(v(),m(`text`,{key:1,class:`transition-opacity`,x:n.x,y:n.y+M.value.labels.fontSize/3,fill:n.labelColor,"font-size":M.value.labels.fontSize,"text-anchor":`middle`,style:_({userSelect:`none`,pointerEvents:`none`,opacity:k.value==null||k.value===t.id?1:.1})},S(n.displayValue),13,lt)):p(``,!0)],64))),256)):p(``,!0)],64))),256)),N.value.nameLabels.leftLabels.show?(v(),m(`g`,{key:1,ref_key:`labelsLeft`,ref:Bt},[(v(!0),m(u,null,b(Sn.value.left.filter(e=>C(o)(e.value)),(e,t)=>(v(),m(`text`,{class:`transition-opacity`,x:U.value.left,y:e.y+N.value.nameLabels.fontSize/3,fill:N.value.nameLabels.useSerieColor?e.color:N.value.nameLabels.color,"font-size":N.value.nameLabels.fontSize,"font--weight":N.value.nameLabels.bold?`bold`:`normal`,"text-anchor":`end`,innerHTML:C(c)({content:e.name,fontSize:N.value.nameLabels.fontSize,fill:N.value.nameLabels.useSerieColor?e.color:N.value.nameLabels.color,x:U.value.left-N.value.nameLabels.offsetX,y:e.y+N.value.nameLabels.fontSize/3,translateY:!0}),style:_({opacity:k.value==null||k.value===e.id?1:.1}),onMouseenter:t=>Q(e,e),onMouseleave:t=>$(e,e),onClick:t=>Jn(e,e)},null,44,ut))),256))],512)):p(``,!0),N.value.nameLabels.rightLabels.show?(v(),m(`g`,{key:2,ref_key:`labelsRight`,ref:Vt},[(v(!0),m(u,null,b(Sn.value.right.filter(e=>C(o)(e.value)),(e,t)=>(v(),m(`text`,{class:`transition-opacity`,x:U.value.right,y:e.y+N.value.nameLabels.fontSize/3,fill:N.value.nameLabels.useSerieColor?e.color:N.value.nameLabels.color,"font-size":N.value.nameLabels.fontSize,"font--weight":N.value.nameLabels.bold?`bold`:`normal`,"text-anchor":`start`,innerHTML:C(c)({content:e.name,fontSize:N.value.nameLabels.fontSize,fill:N.value.nameLabels.useSerieColor?e.color:N.value.nameLabels.color,x:U.value.right+N.value.nameLabels.offsetX,y:e.y+N.value.nameLabels.fontSize/3,translateY:!0}),style:_({opacity:k.value==null||k.value===e.id?1:.1}),onMouseenter:t=>Q(e,e),onMouseleave:t=>$(e,e),onClick:t=>Jn(e,e)},null,44,dt))),256))],512)):p(``,!0),N.value.timeLabels.show?(v(),m(`g`,{key:3,ref_key:`timeLabelsEls`,ref:Ht},[e.$slots[`time-label`]?(v(),m(`g`,ft,[(v(!0),m(u,null,b(K.value,(t,n)=>(v(),m(`g`,null,[x(e.$slots,`time-label`,Ue({ref_for:!0},{x:U.value.unitW*n+U.value.unitW/2+U.value.left,y:U.value.chartHeight+N.value.timeLabels.offsetY,fontSize:N.value.timeLabels.fontSize,fill:N.value.timeLabels.color,transform:`translate(${U.value.unitW*n+U.value.unitW/2+U.value.left}, ${U.value.chartHeight+N.value.timeLabels.offsetY}), rotate(${N.value.timeLabels.rotation})`,absoluteIndex:t.absoluteIndex,content:t.text,textAnchor:N.value.timeLabels.rotation>0?`start`:P.value.layout.timeLabels.rotation<0?`end`:`middle`,show:!0}),void 0,!0)]))),256))])):(v(),m(`g`,pt,[(v(!0),m(u,null,b(K.value,(e,t)=>(v(),m(`g`,null,[String(e.text).includes(`
2
- `)?(v(),m(`text`,{key:t+`-multi`,"text-anchor":N.value.timeLabels.rotation>0?`start`:N.value.timeLabels.rotation<0?`end`:`middle`,"font-size":N.value.timeLabels.fontSize,fill:N.value.timeLabels.color,transform:`
3
- translate(
4
- ${U.value.unitW*t+U.value.unitW/2+U.value.left},
5
- ${U.value.chartHeight+N.value.timeLabels.fontSize*1.3+N.value.timeLabels.offsetY}
6
- ),
7
- rotate(${N.value.timeLabels.rotation})
8
- `,innerHTML:C(c)({content:String(e.text),fontSize:N.value.timeLabels.fontSize,fill:P.value.layout.timeLabels.color,stroke:P.value.backgroundColor,x:0,y:0})},null,8,ht)):(v(),m(`text`,{class:`vue-data-ui-time-label`,key:t,"text-anchor":N.value.timeLabels.rotation>0?`start`:N.value.timeLabels.rotation<0?`end`:`middle`,"font-size":N.value.timeLabels.fontSize,"font-weight":N.value.timeLabels.bold?`bold`:`normal`,fill:N.value.timeLabels.color,stroke:P.value.backgroundColor,"stroke-width":`3`,"stroke-linejoin":`round`,"stroke-linecap":`round`,"paint-order":`stroke fill`,transform:`translate(${U.value.unitW*t+U.value.unitW/2+U.value.left}, ${U.value.chartHeight+N.value.timeLabels.offsetY}), rotate(${N.value.timeLabels.rotation})`},S(e.text),9,mt))]))),256))]))],512)):p(``,!0),x(e.$slots,`svg`,{svg:{drawingArea:U.value,data:W.value,isPrintingImg:C(nn)||C(rn)||C(Un),isPrintingSvg:C(Wn)}},void 0,!0)],46,nt)),e.$slots.hint?(v(),m(`div`,gt,[x(e.$slots,`hint`,Ge(He({hint:j.value.a11y.translations.keyboardNavigation,isVisible:Ut.value})),void 0,!0)])):p(``,!0)]),e.$slots.watermark?(v(),m(`div`,_t,[x(e.$slots,`watermark`,Ge(He({isPrinting:C(nn)||C(rn)||C(Un)||C(Wn)})),void 0,!0)])):p(``,!0),Ot.value&&F.value.buttons.table?(v(),f(Je(X.value.component),Ue({key:6},X.value.props,{ref_key:`tableUnit`,ref:Lt,onClose:Rn}),ze({content:T(()=>[Ve(C(bt),{colNames:Z.value.colNames,head:Z.value.head,body:Z.value.body,config:Z.value.config,title:j.value.table.useDialog?``:X.value.title,withCloseButton:!j.value.table.useDialog,isCursorPointer:I.value,onClose:Rn},{th:T(({th:e})=>[h(`div`,null,S(e),1)]),td:T(({td:e})=>[Be(S(e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`])]),_:2},[j.value.table.useDialog?{name:`title`,fn:T(()=>[Be(S(X.value.title),1)]),key:`0`}:void 0,j.value.table.useDialog?{name:`actions`,fn:T(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[1]||=e=>Bn(F.value.callbacks.csv),style:_({cursor:I.value?`pointer`:`default`})},[Ve(C(vt),{name:`fileCsv`,stroke:X.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):p(``,!0),e.$slots.source?(v(),m(`div`,{key:7,ref_key:`source`,ref:Mt,dir:`auto`},[x(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),x(e.$slots,`skeleton`,{},()=>[C(Gt)?(v(),f(ge,{key:0})):p(``,!0)],!0)],46,$e))}},[[`__scopeId`,`data-v-a567376d`]]);export{Qe as n,vt as t};
@@ -1,22 +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,Jt as ee,Qt as c,X as te,Yt as ne,_ as re,_t as ie,at as ae,b as l,c as oe,gt as se,in as ce,nt as le,pt as ue,rn as de,t as fe,wt as pe,zt as me}from"./lib-rPeBMZrn.js";import{n as he,t as ge}from"./BaseScanner-8NdoBs7B.js";import{n as _e,t as ve}from"./useHints-C-TwxM0Y.js";import{t as ye}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as be}from"./useNestedProp-DnGoh-XS.js";import{t as xe}from"./useThemeCheck-BKNRbGeC.js";import{t as Se}from"./img-D4RQwASc.js";import{n as Ce}from"./Title-BliHuXfT.js";import{t as we}from"./useChartExport-BZts4KFb.js";import{n as Te,t as Ee}from"./tableIntegration-CNoJ1CIY.js";import{n as De,t as Oe}from"./userOptionsSlots-DYuo-E5m.js";import{n as ke,r as Ae,t as je}from"./useTimeLabels-Das5O74F.js";import{t as Me}from"./usePrinter-DVf3YcG5.js";import{t as Ne}from"./useTransitions-ChGGrtrv.js";import{t as Pe}from"./useSvgLabelLayout-42Kats14.js";import{t as Fe}from"./useTimeLabelCollider-BTybMUFi.js";import{t as Ie}from"./useResponsive-CENUxfEL.js";import{t as Le}from"./DefGrad-DKMq1REY.js";import{t as Re}from"./SlicerPreview-ChKbdZSU.js";import{t as ze}from"./A11yDataTable-DWNlWXzs.js";import{t as Be}from"./useUserOptionState-CXlFnwPv.js";import{t as Ve}from"./useChartAccessibility-DOMuYJfm.js";import{t as He}from"./annotationViewport-X8fvs7pz.js";import{t as Ue}from"./vue_ui_candlestick-DKvha_Ab.js";import{Fragment as u,computed as d,createBlock as We,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createSlots as Ge,createTextVNode as Ke,createVNode as qe,defineAsyncComponent as h,guardReactiveProps as Je,mergeProps as Ye,nextTick as Xe,normalizeClass as g,normalizeProps as Ze,normalizeStyle as Qe,onBeforeUnmount as $e,onMounted as et,openBlock as _,ref as v,renderList as y,renderSlot as b,resolveDynamicComponent as tt,shallowRef as nt,toDisplayString as rt,toRefs as it,unref as x,watch as at,watchEffect as ot,withCtx as S}from"vue";var st=/* @__PURE__ */ e({default:()=>Ht}),ct=[`id`],lt=[`id`],ut={style:{position:`relative`}},dt=[`xmlns`,`aria-describedby`,`viewBox`],ft=[`x`,`y`,`width`,`height`],pt={key:1},mt={key:0},ht=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],gt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],_t=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],vt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`,`stroke-dasharray`],yt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],bt=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],xt=[`transform`,`text-anchor`,`font-size`,`fill`,`font-weight`],St=[`transform`,`text-anchor`,`font-size`,`fill`,`font-weight`],Ct=[`transform`,`text-anchor`,`font-size`,`fill`,`stroke`,`font-weight`],wt=[`x`,`y`,`width`,`height`,`fill`,`rx`],Tt={key:0},Et=[`cx`,`cy`,`r`,`fill`],Dt=[`cx`,`cy`,`r`,`fill`],Ot={key:1},kt=[`x`,`y`,`width`,`height`,`rx`,`fill`],At=[`x`,`y`,`width`,`height`,`fill`,`rx`],jt=[`x`,`y`,`height`,`width`,`fill`,`rx`],Mt=[`x`,`y`,`height`,`width`,`fill`,`rx`,`stroke`,`stroke-width`],Nt=[`d`,`stroke`],Pt=[`x`,`y`,`height`,`width`,`fill`,`onMouseover`,`onMouseleave`,`onClick`],Ft=[`x`,`y`,`width`,`height`,`fill`,`fill-opacity`,`stroke`,`stroke-opacity`,`stroke-width`,`stroke-dasharray`],It=[`data-start`,`data-end`],Lt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Rt={key:5,class:`vue-data-ui-watermark`},zt=[`d`,`stroke`],Bt=[`d`,`stroke`,`stroke-width`],Vt=[`innerHTML`],Ht=/*#__PURE__*/ ye({__name:`vue-ui-candlestick`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}},selectedXIndex:{type:Number,default:void 0},zoomState:{type:Object,default:null}},emits:[`selectX`,`zoomStart`,`zoomEnd`,`zoomReset`,`update:zoomState`,`copyAlt`],setup(e,{expose:ye,emit:st}){let Ht=h(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Ut=h(()=>import(`./Tooltip-C1q0Qoh7.js`)),Wt=h(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Gt=h(()=>import(`./DataTable-Dof6yhO7.js`)),Kt=h(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),qt=h(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Jt=h(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),Yt=h(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_candlestick:Xt}=i(),{isThemeValid:Zt,warnInvalidTheme:Qt}=xe(),C=e,w=st,$t=d(()=>!!C.dataset&&C.dataset.length),T=v(!1),en=v(!1),tn=0,nn=v(null),E=v(te()),rn=v(!1),an=v(``),D=v(void 0),on=v(0),O=v(null),sn=v(null),cn=v(null),ln=v(null),un=v(null),dn=v(null),fn=v(0),pn=v(0),mn=v(0),hn=v(null),gn=v(null),_n=v(null),vn=v(null),yn=v(null),k=v(null),bn=v({x:0,y:0}),xn=v(`pointer`),Sn=v(!1),A=v(Mn()),j=d(()=>A.value.style.layout.candle),M=d(()=>A.value.style.layout.grid),N=d(()=>A.value.style.layout),P=d(()=>A.value.style),F=d(()=>A.value.userOptions);_e({config:()=>A.value,dataset:()=>C.dataset,component:`VueUiCandlestick`,rules:[ve.emptyArray,{test:e=>e.length>200,message:[`👀 Dataset has > 200 points, which can cause performance issues. Consider:`,``,`▶️ Adding date inputs to constraint the dataset into a specific timeframe`,``,`▶️ Aggregate the data to larger time series to reduce the number of datapoints.`]}]});let{transitionEnabled:Cn}=Ne({config:()=>A.value.transitions,dataset:()=>C.dataset}),wn=d(()=>A.value.userOptions.useCursorPointer),Tn=d(()=>ce({defaultConfig:{useCssAnimation:!1,userOptions:{show:!1},table:{show:!1},style:{backgroundColor:`#99999930`,layout:{candle:{colors:{bearish:`#BABABA`,bullish:`#CACACA`}},grid:{stroke:`#6A6A6A`,verticalLines:{stroke:`#6A6A6A`},horizontalLines:{stroke:`#6A6A6A`},yAxis:{dataLabels:{show:!1},scale:{min:null,max:null}}},wick:{stroke:`#6A6A6A`,extremity:{color:`#6A6A6A`}}},tooltip:{show:!1},zoom:{show:!1,startIndex:null,endIndex:null}}},userConfig:A.value.skeletonConfig??{}})),{loading:I,FINAL_DATASET:L,manualLoading:En}=he({...it(C),FINAL_CONFIG:A,prepareConfig:Mn,callback:()=>{Promise.resolve().then(async()=>{await Yr()})},skeletonDataset:C.config?.skeletonDataset??[[17040672e5,10,20,2,10,30],[17067456e5,10,30,5,20,50],[17092512e5,20,50,10,30,80],[17119296e5,30,80,20,50,130],[17145216e5,50,130,30,100,210],[17172e8,80,210,50,150,340],[1719792e6,130,340,80,280,550],[17224704e5,210,550,130,450,890],[17251488e5,340,890,210,750,1440],[17277408e5,550,1440,340,1230,2330],[17304192e5,890,2330,550,1950,3770],[17330112e5,1440,3770,890,3200,5100]],skeletonConfig:ce({defaultConfig:A.value,userConfig:Tn.value})}),{userOptionsVisible:Dn,setUserOptionsVisibility:On,keepUserOptionState:kn}=Be({config:A.value}),{svgRef:R}=Ve({config:P.value.title});function An(){On(!0)}function jn(){On(!1),w(`selectX`,{seriesIndex:null,datapoint:null}),D.value=null}function Mn(){let e=be({userConfig:C.config,defaultConfig:Xt}),t={};C.config&&pe(C.config,`style.layout.grid.xAxis.dataLabels.showFirstAndLast`)&&(e.style.layout.grid.xAxis.dataLabels.showFirstAndLast=!!C.config.style.layout.grid.xAxis.dataLabels.showFirstAndLast);let n=e.theme;if(n){if(!Zt.value(e))Qt(e),t=e;else{let r=be({userConfig:Ue[n]||C.config,defaultConfig:e});t={...be({userConfig:C.config,defaultConfig:r})}}}else t=e;return t}let Nn=c(C.config);at(()=>C.config,(e,t)=>{let n=c(e),r=n!==Nn;Nn=n;let i=Mn();r?(I.value||(A.value=Mn()),Dn.value=!A.value.userOptions.showOnChartHover,In(),fn.value+=1,mn.value+=1,pn.value+=1,V.value.showTable=A.value.table.show,V.value.showTooltip=P.value.tooltip.show,ur()):(A.value.style.tooltip=i.style.tooltip,V.value.showTooltip=A.value.style.tooltip.show)},{deep:!0}),at(()=>C.dataset,e=>{Array.isArray(e)&&e.length>0&&(En.value=!1),Gr()},{deep:!0});let z=v({height:P.value.height,width:P.value.width,xAxisFontSize:M.value.xAxis.dataLabels.fontSize,yAxisFontSize:M.value.yAxis.dataLabels.fontSize}),B=nt(null),Pn=nt(null);et(()=>{In()});let Fn=d(()=>A.value.debug);function In(){me(C.dataset)&&(ae({componentName:`VueUiCandlestick`,type:`dataset`,debug:Fn.value}),En.value=!0),me(C.dataset)||(En.value=A.value.loading),setTimeout(()=>{T.value=!0},10),A.value.responsive&&(B.value&&(Pn.value&&B.value.unobserve(Pn.value),B.value.disconnect()),B.value=new ResizeObserver(()=>{T.value=!1;let{width:e,height:t}=Ie({chart:O.value,title:P.value.title.text?sn.value:null,slicer:P.value.zoom.show&&W.value>6?ln.value.$el:null,legend:cn.value,source:un.value,noTitle:dn.value});cancelAnimationFrame(tn),tn=requestAnimationFrame(()=>{z.value.width=e,z.value.height=t-12,en.value=!0,A.value.responsiveProportionalSizing?(z.value.xAxisFontSize=de({relator:Math.min(e,t),adjuster:P.value.width,source:M.value.xAxis.dataLabels.fontSize,threshold:6,fallback:6}),z.value.yAxisFontSize=de({relator:Math.min(e,t),adjuster:P.value.width,source:M.value.yAxis.dataLabels.fontSize,threshold:6,fallback:6})):(z.value.xAxisFontSize=M.value.xAxis.dataLabels.fontSize,z.value.yAxisFontSize=M.value.yAxis.dataLabels.fontSize),nn.value&&clearTimeout(nn.value),nn.value=setTimeout(()=>{T.value=!0},10)})}),Pn.value=O.value.parentNode,B.value.observe(Pn.value)),Yr()}$e(()=>{cancelAnimationFrame(tn),B.value&&(Pn.value&&B.value.unobserve(Pn.value),B.value.disconnect())});let{isPrinting:Ln,isImaging:Rn,generatePdf:zn,generateImage:Bn}=Me({elementId:`vue-ui-candlestick_${E.value}`,fileName:P.value.title.text||`vue-ui-candlestick`,options:A.value.userOptions.print}),Vn=d(()=>A.value.userOptions.show&&!P.value.title.text),V=v({showTable:A.value.table.show,showTooltip:P.value.tooltip.show}),{metrics:Hn,ready:Un,settling:H,update:Wn}=Pe({svgRef:R,canMeasure:()=>(!A.value.responsive||en.value)&&(!M.value.xAxis.dataLabels.show||Tr.value),initialMetrics:{scaleLabelsWidth:0,timeLabelsHeight:0},measure:e=>({scaleLabelsWidth:hn.value?e(hn.value).textWidth:M.value.yAxis.dataLabels.offsetX,timeLabelsHeight:e(gn.value).height})}),Gn=d(()=>gn.value?Hn.value.timeLabelsHeight+z.value.xAxisFontSize:0),Kn=d(()=>M.value.yAxis.position===`right`);function qn(){let e=Hn.value.scaleLabelsWidth,t=M.value.yAxis.axisName?.show?M.value.yAxis.axisName.fontSize+M.value.yAxis.axisName.offsetX:0,n=e+13+t;return{left:Kn.value?0:n,right:Kn.value?n:0,scaleLabelsWidth:e,yAxisNameWidth:t,crosshair:13}}let U=d(()=>{let{top:e,right:t,bottom:n,left:r}=N.value.padding,i=qn();return{top:e+12,right:z.value.width-t-i.right,left:r+i.left,bottom:z.value.height-n-Gn.value,width:z.value.width-r-t-i.left-i.right,height:z.value.height-e-n-Gn.value-12,scaleLabelsWidth:i.scaleLabelsWidth,yAxisNameWidth:i.yAxisNameWidth,crosshair:i.crosshair}}),Jn=d(()=>{let{left:e,top:t,width:n,height:r}=U.value,i=G.value.start,a=G.value.end-i,o=n/a,s=K.value.start-i,ee=K.value.end-i,c=Math.max(0,Math.min(a,s)),te=Math.max(0,Math.min(a,ee));return{x:e+c*o,y:t,width:(te-c)*o,height:r,fill:P.value.zoom.preview.fill,stroke:P.value.zoom.preview.stroke,"stroke-width":P.value.zoom.preview.strokeWidth,"stroke-dasharray":P.value.zoom.preview.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:{pointerEvents:`none`,transition:`none !important`,animation:`none !important`}}}),W=d(()=>L.value.length),G=v({start:0,end:W.value}),K=v({start:0,end:W.value}),Yn=v(!1),Xn=v(!1),Zn=v(null),q=v(null),J=v(null),Qn=v(!1),$n=v({time:0,x:0,y:0,pointerType:null}),er=d(()=>P.value.zoom?.dragToZoom),Y=d(()=>er.value.show&&$t.value&&qr.value&&W.value>1&&!I.value),tr=null,nr={},rr=d(()=>P.value.zoom.preview.enable&&(K.value.start!==G.value.start||K.value.end!==G.value.end));function ir(e,t){K.value[e]=t}function ar(e,t=G.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 or(e){let t=ar(e);t&&w(`update:zoomState`,t)}function sr(){tr&&=(cancelAnimationFrame(tr),null),nr={}}function cr(e){let t=ar(e);if(!t)return null;let{start:n,end:r}=t;return(n!==Number(G.value.start)||r!==Number(G.value.end))&&(sr(),G.value={start:n,end:r},K.value={start:n,end:r},ur()),{start:Number(G.value.start),end:Number(G.value.end)}}function lr(e){let t=cr(e);return t?(w(`update:zoomState`,t),t):null}function ur(){let e=Math.max(0,Math.min(G.value.start??0,W.value-1)),t=Math.max(e+1,Math.min(G.value.end??W.value,W.value));(!Number.isFinite(e)||!Number.isFinite(t)||t<=e)&&(e=0,t=W.value),G.value.start=e,G.value.end=t,K.value.start=e,K.value.end=t,ln.value&&ln.value.setRangeValues(e,t)}let dr=d(()=>L.value.map((e,t)=>({...e,absoluteIndex:t}))),fr=d(()=>dr.value.slice(G.value.start,G.value.end)),pr=d(()=>(Fn.value&&L.value.forEach((e,t)=>{[null,void 0].includes(e[0])&&ae({componentName:`VueUiCandlestick`,type:`datasetAttribute`,property:`period (index 0)`,index:t}),[null,void 0].includes(e[1])&&ae({componentName:`VueUiCandlestick`,type:`datasetAttribute`,property:`open (index 1)`,index:t}),[null,void 0].includes(e[2])&&ae({componentName:`VueUiCandlestick`,type:`datasetAttribute`,property:`high (index 2)`,index:t}),[null,void 0].includes(e[3])&&ae({componentName:`VueUiCandlestick`,type:`datasetAttribute`,property:`low (index 3)`,index:t}),[null,void 0].includes(e[4])&&ae({componentName:`VueUiCandlestick`,type:`datasetAttribute`,property:`close (index 4)`,index:t}),[null,void 0].includes(e[5])&&ae({componentName:`VueUiCandlestick`,type:`datasetAttribute`,property:`volume (index 5)`,index:t})}),fr.value.map(e=>({absoluteIndex:e.absoluteIndex,period:e[0],open:e[1],high:e[2],low:e[3],close:e[4],volume:e[5]})))),mr=d(()=>dr.value.map(e=>({absoluteIndex:e.absoluteIndex,period:e[0],open:e[1],high:e[2],low:e[3],close:e[4],volume:e[5]}))),X=d(()=>U.value.width/fr.value.length),hr=d(()=>{let e={o:-1/0,h:-1/0,l:-1/0},t={o:1/0,h:1/0,l:1/0},n=-1/0,r=1/0;for(let i of pr.value)e.o=Math.max(e.o,i.open),e.h=Math.max(e.h,i.high),e.l=Math.max(e.l,i.low),t.o=Math.min(t.o,i.open),t.h=Math.min(t.h,i.high),t.l=Math.min(t.l,i.low),n=Math.max(n,i.volume),r=Math.min(r,i.volume);return e.c=e.l,t.c=t.l,{max:e,min:t,volumeMax:n,volumeMin:r}}),gr=d(()=>({max:M.value.yAxis.scale.max===null?hr.value.max.h:M.value.yAxis.scale.max,min:M.value.yAxis.scale.min===null?0:M.value.yAxis.scale.min})),Z=d(()=>re(gr.value.min,gr.value.max,M.value.yAxis.dataLabels.steps));function _r(e,t,n=null,r=null){return{...e,x:l(U.value.left+t*X.value+X.value/2),y:l(U.value.top+(1-(e-Z.value.min)/(Z.value.max-Z.value.min))*U.value.height),value:l(e),isMax:e===n,isMin:e===r}}let Q=d(()=>{let{max:e,min:t,volumeMax:n,volumeMin:r}=hr.value;return pr.value.map((i,a)=>{let o=_r(i.open,a,e.o,t.o),s=_r(i.high,a,e.h,t.h),ee=_r(i.low,a,e.l,t.l),c=_r(i.close,a,e.c,t.c),te=i.close>i.open,ne=i.volume===n,re=i.volume===r;return{period:i.period,open:o,high:s,low:ee,close:c,volume:i.volume,isBullish:te,absoluteIndex:i.absoluteIndex,isMaxVolume:ne,isMinVolume:re}})}),vr=d(()=>{let e=-1/0;for(let t of L.value)e=Math.max(e,t[2]);return e});function yr({item:e,index:t,minimapH:n,unitW:r,min:i,max:a}){return{...e,x:l(t*r),y:l((1-(e-i)/(a-i))*n),value:l(e)}}let br=d(()=>{let e=mr.value,t=M.value.yAxis.scale.min??0,n=M.value.yAxis.scale.max??vr.value,r,i,a;return({minimapH:o,unitW:s})=>(a&&r===o&&i===s||(r=o,i=s,a=e.map((e,r)=>{let i=yr({item:e.open,index:r,minimapH:o,unitW:s,min:t,max:n}),a=yr({item:e.high,index:r,minimapH:o,unitW:s,min:t,max:n}),ee=yr({item:e.low,index:r,minimapH:o,unitW:s,min:t,max:n}),c=yr({item:e.close,index:r,minimapH:o,unitW:s,min:t,max:n}),te=e.close>e.open;return{period:e.period,open:i,high:a,low:ee,close:c,volume:e.volume,isBullish:te,absoluteIndex:e.absoluteIndex}})),a)}),xr=d(()=>P.value.zoom.minimap.show?[{name:``,series:L.value.map(e=>e[2]),color:`#000000`,isVisible:!0}]:[]);function Sr(e){return l((e-Z.value.min)/(Z.value.max-Z.value.min))}let Cr=d(()=>Z.value.ticks.map(e=>({y:U.value.bottom-U.value.height*Sr(e),value:l(e)}))),wr=d(()=>pr.value.map(e=>e.period)),$=v([]),Tr=v(!1),Er=v([]),Dr=0;ot(()=>{let e=++Dr;(async()=>{let t=await je({values:L.value.map(e=>e[0]),maxDatapoints:L.value.length,formatter:M.value.xAxis.dataLabels.datetimeFormatter,start:G.value.start,end:G.value.end});e===Dr&&($.value=t,Tr.value=!0)})()});let Or=0;ot(()=>{let e=++Or;(async()=>{let t=await je({values:L.value.map(e=>e[0]),maxDatapoints:L.value.length,formatter:M.value.xAxis.dataLabels.datetimeFormatter,start:0,end:W.value});e===Or&&(Er.value=t)})()});let kr=v({months:[],shortMonths:[],days:[],shortDays:[]}),Ar=0;ot(()=>{let e=++Ar,t=M.value.xAxis.dataLabels.datetimeFormatter;(async()=>{let n=await Ae(t.locale).catch(()=>Ae(`en`));e===Ar&&(kr.value=n.data)})()});let jr=d(()=>{let e=M.value.xAxis.dataLabels.datetimeFormatter,t=ke({useUTC:e.useUTC,locale:kr.value,januaryAsYear:e.januaryAsYear});return(e,n)=>{let r=L.value.map(e=>e[0])?.[e];return r==null?``:t.formatDate(new Date(r),n)}}),Mr=d(()=>(L.value.map(e=>e[0])||[]).map((e,t)=>({text:jr.value(t,P.value.tooltip.timeFormat),absoluteIndex:t}))),Nr=d(()=>(L.value.map(e=>e[0])||[]).map((e,t)=>({text:jr.value(t,P.value.zoom.timeFormat),absoluteIndex:t}))),Pr=d(()=>($.value||[]).map(e=>e?.text??``)),Fr=d(()=>(Er.value||[]).map(e=>e?.text??``)),Ir=d(()=>{let e=Math.max(1,Math.floor(Number(M.value.xAxis.dataLabels.modulo)||1)),t=Pr.value,n=Fr.value,r=G.value.start??0,i=r>0||t.length<n.length;return se({configuredModulo:e,visibleTexts:t,allTexts:n,startAbs:r,isZoomed:i})}),Lr=d(()=>{let e=M.value.xAxis.dataLabels,t=G.value.start??0,n=D.value,r=W.value,i=Pr.value,a=Fr.value,o=oe(!!e.showOnlyFirstAndLast,!!e.showOnlyAtModulo,Ir.value,i,a,t,n,r);if(!e.showFirstAndLast||e.showOnlyFirstAndLast||!o.length)return o;let s=o.length-1;return o.map((e,t)=>t!==0&&t!==s?e:{...e,text:i[t]??``})}),Rr=d(()=>M.value.xAxis.dataLabels.datetimeFormatter.enable?{start:$.value.find(e=>e.absoluteIndex===G.value.start)?.text??``,end:$.value.find(e=>e.absoluteIndex===G.value.end-1)?.text??``}:{start:L.value[G.value.start]?L.value[G.value.start][0]:L.value[0][0],end:L.value[G.value.end-1]?L.value[G.value.end-1][0]:L.value.at(-1)[0]}),zr=v(null);function Br(e,t){A.value.events.datapointClick&&A.value.events.datapointClick({datapoint:t,seriesIndex:e+G.value.start})}function Vr(e,t){A.value.events.datapointLeave&&A.value.events.datapointLeave({datapoint:t,seriesIndex:e+G.value.start}),D.value=void 0,rn.value=!1,k.value=null,xn.value=`pointer`}at(()=>C.selectedXIndex,e=>{if([null,void 0].includes(C.selectedXIndex)){D.value=null;return}let t=e-G.value.start;t<0||e>=G.value.end?D.value=null:D.value=t??null},{immediate:!0});function Hr(e,t,n=`pointer`){A.value.events.datapointEnter&&A.value.events.datapointEnter({datapoint:t,seriesIndex:e+G.value.start}),D.value=e,k.value=e,xn.value=n,zr.value={datapoint:t,seriesIndex:e,series:Q.value,config:A.value},Fi({seriesIndex:e,datapoint:t});let r=P.value.tooltip.customFormat;if(s(r)&&ue(()=>r({seriesIndex:e,datapoint:t,series:Q.value,config:A.value})))an.value=r({seriesIndex:e,datapoint:t,series:Q.value,config:A.value});else if(P.value.tooltip.show){let n=``,{period:r,open:i,high:o,low:s,close:ee,volume:c,isBullish:te}=Q.value[e],{period:ne,open:re,high:ie,low:ae,close:l,volume:oe}=A.value.translations,se=M.value.xAxis.dataLabels.datetimeFormatter.enable?P.value.tooltip.useDefaultTimeFormat?$.value[e].text:Mr.value[e].text:r;n+=`<div><svg style="margin-right:6px" viewBox="0 0 12 12" height="12" width="12"><rect x="0" y="0" height="12" width="12" rx="${j.value.borderRadius*3}" stroke="${j.value.stroke}" stroke-width="${j.value.strokeWidth}"
2
- fill="${j.value.gradient.show?te?`url(#bullish_gradient_${E.value})`:`url(#bearish_gradient_${E.value})`:te?j.value.colors.bullish:j.value.colors.bearish}"/></svg>${se}</div>`,n+=`${oe} : <b>${isNaN(c)?`-`:Number(c.toFixed(P.value.tooltip.roundingValue)).toLocaleString()}</b>`,n+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${P.value.tooltip.borderColor}">`;let ce=a({p:P.value.tooltip.prefix,v:i.value,s:P.value.tooltip.suffix,r:P.value.tooltip.roundingValue}),le=a({p:P.value.tooltip.prefix,v:o.value,s:P.value.tooltip.suffix,r:P.value.tooltip.roundingValue}),ue=a({p:P.value.tooltip.prefix,v:s.value,s:P.value.tooltip.suffix,r:P.value.tooltip.roundingValue}),de=a({p:P.value.tooltip.prefix,v:ee.value,s:P.value.tooltip.suffix,r:P.value.tooltip.roundingValue});P.value.tooltip.showChart?n+=`<div style="width:100%;display:flex;align-items:center;justify-content:center;">
3
- <svg viewBox="0 0 100 100" width="100px" style="background: transparent; overflow: visible">
4
- <g>
5
- <line x1="50" x2="50" y1="20" y2="80" stroke="${t.isBullish?j.value.colors.bullish:j.value.colors.bearish}" stroke-width="2" stroke-linecap="round" />
6
- ${t.isBullish?`
7
- <line x1="45" x2="50" y1="65" y2="65" stroke="${j.value.colors.bullish}" stroke-width="1.5" stroke-linecap="round" />
8
- <line x1="50" x2="55" y1="35" y2="35" stroke="${j.value.colors.bullish}" stroke-width="1.5" stroke-linecap="round" />
9
- <text x="38" y="70" text-anchor="end" fill="${P.value.tooltip.color}">${ce}</text>
10
- <text x="62" y="40" text-anchor="start" fill="${P.value.tooltip.color}">${de}</text>
11
- `:`
12
- <line x1="45" x2="50" y1="35" y2="35" stroke="${j.value.colors.bearish}" stroke-width="1.5" stroke-linecap="round" />
13
- <line x1="50" x2="55" y1="65" y2="65" stroke="${j.value.colors.bearish}" stroke-width="1.5" stroke-linecap="round" />
14
- <text x="40" y="40" text-anchor="end" fill="${P.value.tooltip.color}">${ce}</text>
15
- <text x="60" y="70" text-anchor="start" fill="${P.value.tooltip.color}">${de}</text>
16
- `}
17
- <text x="50" y="13" text-anchor="middle" fill="${P.value.tooltip.color}">${le}</text>
18
- <text x="50" y="97" text-anchor="middle" fill="${P.value.tooltip.color}">${ue}</text>
19
- <g>
20
- </svg>
21
- <div>
22
- `:(n+=`<div>${re}: <b>${ce}</b></div>`,n+=`<div>${ie}: <b>${le}</b></div>`,n+=`<div>${ae}: <b>${ue}</b></div>`,n+=`<div>${l}: <b>${de}</b></div>`),n+=`</div>`,an.value=`<div style="text-align:right">${n}</div>`}rn.value=!0}let Ur=v(null);function Wr(){return new Promise(e=>requestAnimationFrame(()=>requestAnimationFrame(()=>e())))}$e(()=>{Ur.value&&cancelAnimationFrame(Ur.value),sr(),Ti()});async function Gr({force:e=!1,publish:t=!1}={}){let n=!e;Yr(n),await Xe(),Ur.value&&cancelAnimationFrame(Ur.value),Ur.value=requestAnimationFrame(async()=>{await Wr(),Yr(n),Ur.value=null,t&&(or({start:Number(G.value.start),end:Number(G.value.end)}),w(`zoomReset`))})}let Kr=v(!1),qr=v(!1),Jr=v(!1);at([()=>C.zoomState,qr],([e,t])=>{t&&e&&cr(e)},{deep:!0,immediate:!0});function Yr(e=!0){if(!Kr.value){Kr.value=!0;try{let{startIndex:t,endIndex:n}=P.value.zoom,r=W.value,i=t??0,a=n==null?r:Math.min(Xr(n+1,i),r);Jr.value=!0,G.value.start=i,G.value.end=a,K.value.start=i,K.value.end=a,ur(),qr.value=!0,e&&C.zoomState&&cr(C.zoomState)}finally{queueMicrotask(()=>{Jr.value=!1}),Kr.value=!1}}}function Xr(e,t=G.value.start){let n=W.value,r=Number(t);return e>n?n:e<0||e<=r?Math.min(r+1,n):e}function Zr(e=null){Xe(()=>{let t=[A.value.translations.period,A.value.translations.open,A.value.translations.high,A.value.translations.low,A.value.translations.close,A.value.translations.volume],n=Q.value.map((e,t)=>[M.value.xAxis.dataLabels.datetimeFormatter.enable?$.value[t].text:e.period,e.open.value,e.high.value,e.low.value,e.close.value,e.volume]),r=[[P.value.title.text],[P.value.title.subtitle.text],[[``],[``],[``]],t].concat(n),i=o(r);e?e(i):le({csvContent:i,title:P.value.title.text||`vue-ui-candlestick`})})}let Qr=d(()=>{let e=Q.value.map((e,t)=>{let n=M.value.xAxis.dataLabels.datetimeFormatter.enable?$.value?.[t]?.text??``:e.period,r=a({p:A.value.table.td.prefix,v:e.open.value,s:A.value.table.td.suffix,r:A.value.table.td.roundingValue}),i=a({p:A.value.table.td.prefix,v:e.high.value,s:A.value.table.td.suffix,r:A.value.table.td.roundingValue}),o=a({p:A.value.table.td.prefix,v:e.low.value,s:A.value.table.td.suffix,r:A.value.table.td.roundingValue}),s=a({p:A.value.table.td.prefix,v:e.close.value,s:A.value.table.td.suffix,r:A.value.table.td.roundingValue});return[`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" height="12" width="12" style="margin-right: 6px"><rect x="0" y="0" height="12" width="12" rx="${j.value.borderRadius*3}" fill="${j.value.gradient.show?e.isBullish?`url(#bullish_gradient_${E.value})`:`url(#bearish_gradient_${E.value})`:e.isBullish?j.value.colors.bullish:j.value.colors.bearish}"/></svg> ${n}`,r,i,o,s,`${isNaN(e.volume)?`-`:e.volume.toLocaleString()}`]}),t=Q.value.map((e,t)=>[M.value.xAxis.dataLabels.datetimeFormatter.enable?$.value?.[t]?.text??``:e.period,a({p:A.value.table.td.prefix,v:e.open.value,s:A.value.table.td.suffix,r:A.value.table.td.roundingValue}),a({p:A.value.table.td.prefix,v:e.high.value,s:A.value.table.td.suffix,r:A.value.table.td.roundingValue}),a({p:A.value.table.td.prefix,v:e.low.value,s:A.value.table.td.suffix,r:A.value.table.td.roundingValue}),a({p:A.value.table.td.prefix,v:e.close.value,s:A.value.table.td.suffix,r:A.value.table.td.roundingValue}),`${isNaN(e.volume)?`-`:e.volume}`]),n={th:{backgroundColor:A.value.table.th.backgroundColor,color:A.value.table.th.color,outline:A.value.table.th.outline},td:{backgroundColor:A.value.table.td.backgroundColor,color:A.value.table.td.color,outline:A.value.table.td.outline},breakpoint:A.value.table.responsiveBreakpoint},r=[A.value.translations.period,A.value.translations.open,A.value.translations.high,A.value.translations.low,A.value.translations.last,A.value.translations.volume];return{head:r,body:e,bodyA11y:t,config:n,colNames:r}}),$r=v(!1);function ei(e){$r.value=e,on.value+=1}function ti(){V.value.showTable=!V.value.showTable}function ni(){V.value.showTooltip=!V.value.showTooltip}let ri=v(!1);function ii(){ri.value=!ri.value}async function ai({scale:e=2}={}){if(!O.value)return;let{imageUri:t,base64:n}=await Se({domElement:O.value,base64:!0,img:!0,scale:e}),r=O.value.getBoundingClientRect(),i={width:r.width,height:r.height,aspectRatio:r.height?r.width/r.height:0},a=await ie(t,e)??i;return{imageUri:t,base64:n,title:P.value.title.text,...a}}let oi=d(()=>z.value.width),si=d(()=>z.value.height);Fe({timeLabelsEls:gn,timeLabels:$,slicer:G,configRef:A,rotationPath:[`style`,`layout`,`grid`,`xAxis`,`dataLabels`,`rotation`],autoRotatePath:[`style`,`layout`,`grid`,`xAxis`,`dataLabels`,`autoRotate`,`enable`],isAutoSize:!1,rotation:M.value.xAxis.dataLabels.autoRotate.angle,width:oi,height:si}),at(A,()=>{V.value={showTable:A.value.table.show,showTooltip:P.value.tooltip.show}},{immediate:!0});let ci=d(()=>Ee({config:A,style:P,mutableConfig:V,dialog:Yt,accordion:Wt,isFullscreen:$r,parent:O,maxWidth:800,isCursorPointer:wn}));at(()=>V.value.showTable,e=>Te(e,A,_n));function li(){V.value.showTable=!1,vn.value&&vn.value.setTableIconState(!1)}let ui=d(()=>P.value.backgroundColor),di=d(()=>P.value.title),{isCallbackImaging:fi,isCallbackSvg:pi,generateSvg:mi,onGenerateImage:hi}=we({svg:R,title:di,legend:null,legendItems:null,backgroundColor:ui,getSvgCallback:()=>A.value.userOptions.callbacks.svg,generateImage:Bn});function gi(e){yn.value=e}function _i(e){nr={...nr,...e},tr&&cancelAnimationFrame(tr),tr=requestAnimationFrame(()=>{let e={...G.value,...nr};nr={},tr=null,G.value=e,K.value={...e},ur(),or({start:Number(G.value.start),end:Number(G.value.end)})})}function vi(e){if(Kr.value||Jr.value)return;let t=Number(e);Number.isFinite(t)&&(w(`zoomStart`,{index:t,isZoom:t!==0}),t!==G.value.start&&_i({start:t}))}function yi(e){if(Kr.value||Jr.value)return;let t=nr.start===void 0?G.value.start:nr.start,n=Xr(Number(e),t);Number.isFinite(n)&&(w(`zoomEnd`,{index:n,isZoom:n!==W.value}),(n!==G.value.end||nr.start!==void 0)&&_i({end:n}))}function bi(e){let t=R.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,ee=(n.height-o)/2;return{x:(e.clientX-n.left-s)/i+r.x,y:(e.clientY-n.top-ee)/i+r.y}}let xi=d(()=>!Yn.value||Zn.value==null||q.value==null?null:{x:Math.min(Zn.value,q.value),y:U.value.top,width:Math.abs(q.value-Zn.value),height:U.value.height}),Si=d(()=>qr.value?Number(G.value.start)!==0||Number(G.value.end)!==Number(W.value):!1);function Ci(e){return Math.min(Math.max(e,U.value.left),U.value.right)}function wi(){D.value=void 0,k.value=null,xn.value=`pointer`,rn.value=!1,yn.value=null}function Ti(e){let t=e?.pointerId==null?J.value:e.pointerId;t!=null&&R.value?.hasPointerCapture?.(t)&&R.value.releasePointerCapture(t),Yn.value=!1,Zn.value=null,q.value=null,J.value=null}function Ei(){Qn.value=!0,setTimeout(()=>{Qn.value=!1},0)}function Di(e){Qn.value&&(Qn.value=!1,e.preventDefault(),e.stopPropagation())}function Oi(e){if(!Y.value||!Si.value||!e)return!1;let t=Date.now(),n=e.pointerType||`mouse`,r=$n.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?($n.value={time:0,x:0,y:0,pointerType:null},Ei(),Ti(e),Gr({force:!0,publish:!0}),!0):($n.value={time:t,x:e.clientX,y:e.clientY,pointerType:n},!1)}function ki(e){let t=Number(G.value.end)-Number(G.value.start);if(t<=0||!Number.isFinite(X.value)||X.value<=0)return null;let n=Math.floor((Ci(e)-U.value.left)/X.value);return Math.max(0,Math.min(t-1,n))}function Ai(e,t){let n=ki(e),r=ki(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(G.value.start)+i,end:Number(G.value.start)+a+1}}function ji(e){let t=lr(e);return t?(w(`zoomStart`,{index:t.start,isZoom:t.start!==0}),w(`zoomEnd`,{index:t.end,isZoom:t.end!==W.value}),t):null}function Mi(e){if(!Y.value||ri.value||e.button!==void 0&&e.button!==0||J.value!=null&&e.pointerId!==J.value)return;let t=bi(e);if(!t)return;let{left:n,right:r,top:i,bottom:a}=U.value;if(t.x<n||t.x>r||t.y<i||t.y>a||Number(G.value.end)-Number(G.value.start)<=1)return;Xn.value=!0,R.value?.focus?.({preventScroll:!0}),wi();let o=Ci(t.x);J.value=e.pointerId,Yn.value=!0,Zn.value=o,q.value=o}function Ni(e){if(!Y.value||!Yn.value||J.value!=null&&e.pointerId!==J.value)return;let t=bi(e);t&&(q.value=Ci(t.x),wi(),Zn.value!=null&&Math.abs(q.value-Zn.value)>=2&&!R.value?.hasPointerCapture?.(e.pointerId)&&R.value?.setPointerCapture?.(e.pointerId))}function Pi(e){if(!Y.value||!Yn.value||J.value!=null&&e.pointerId!==J.value)return;let t=bi(e);t&&(q.value=Ci(t.x));let n=Zn.value,r=q.value;if((n==null||r==null?0:Math.abs(r-n))<Math.max(4,U.value.width*.01)){if(Oi(e))return;Ti(e);return}let i=Ai(Math.min(n,r),Math.max(n,r));i?(Ti(e),ji(i)&&($n.value={time:0,x:0,y:0,pointerType:null},wi(),Ei())):Ti(e)}function Fi({seriesIndex:e,datapoint:t}){let n=G.value.start+e;w(`selectX`,{dataset:t,index:n,indexLabel:``})}async function Ii(){w(`copyAlt`,{config:A.value,dataset:Q.value}),A.value.userOptions.callbacks.altCopy?await Promise.resolve(A.value.userOptions.callbacks.altCopy({config:A.value,dataset:Q.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function Li(){k.value=null,Sn.value=!0}function Ri(){Xn.value=!1,k.value=null,xn.value=`pointer`,rn.value=!1,D.value=void 0,Sn.value=!1}function zi(e){if(!R.value||ri.value||document.activeElement!==R.value||(Xn.value=!1,!Q.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(Y.value&&(Si.value||Yn.value)){Ti(),Gr({force:!0,publish:!0});return}k.value=null,xn.value=`pointer`,rn.value=!1,D.value=void 0;return}if(r){if(k.value===null)return;let e=Q.value[k.value];if(!e)return;Br(k.value,e);return}let a=k.value,o=D.value,s=a!==null&&a>=0&&a<Q.value.length,ee=o!=null&&o>=0&&o<Q.value.length;s?n?(a+=1,a>=Q.value.length&&(a=0)):t&&(--a,a<0&&(a=Q.value.length-1)):ee?(a=n?o+1:o-1,a>=Q.value.length&&(a=0),a<0&&(a=Q.value.length-1)):a=n?0:Q.value.length-1;let c=Q.value[a];c&&(Bi(a),Hr(a,c,`keyboard`))}function Bi(e){if(!Number.isFinite(e)||!R.value)return;let t=U.value.left+X.value*e+X.value/2,n=U.value.top+U.value.height/2,r=R.value.getBoundingClientRect();bn.value={x:r.left+t/z.value.width*r.width,y:r.top+n/z.value.height*r.height}}let Vi=d(()=>({headers:Qr.value?.colNames??[],rows:Qr.value?.bodyA11y??[]}));ye({getImage:ai,generatePdf:zn,generateCsv:Zr,generateImage:Bn,generateSvg:mi,toggleTable:ti,toggleTooltip:ni,toggleAnnotator:ii,toggleFullscreen:ei,copyAlt:Ii,resetZoom:()=>Gr({force:!0,publish:!0}),setZoomState:lr}),at(()=>[z.value,M.value,A.value.style.fontFamily,C.dataset,G.value.start,G.value.end,$.value,Tr.value,en.value,hn.value,gn.value],Wn,{flush:`post`,deep:!0});let Hi=d(()=>He({enabled:F.value?.annotator?.followZoom,area:U.value,range:G.value,ticks:Cr.value}));return(e,i)=>(_(),p(`div`,{ref_key:`candlestickChart`,ref:O,class:g(`vue-data-ui-component vue-ui-candlestick ${$r.value?`vue-data-ui-wrapper-fullscreen`:``} ${A.value.useCssAnimation?``:`vue-ui-dna`}`),style:Qe(`position:relative;font-family:${P.value.fontFamily}; text-align:center;background:${P.value.backgroundColor}; ${A.value.responsive?`height: 100%`:``}`),id:`vue-ui-candlestick_${E.value}`,onMouseenter:An,onMouseleave:jn},[m(`div`,{id:`chart-instructions-${E.value}`,class:`sr-only`},[m(`p`,null,rt(A.value.a11y.translations.keyboardNavigation),1)],8,lt),Vi.value?.rows?.length?(_(),We(ze,{key:0,uid:E.value,head:Vi.value.headers,body:Vi.value.rows,notice:A.value.a11y.translations.tableAvailable,caption:A.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):f(``,!0),F.value.buttons.annotator?(_(),We(x(Kt),Ye({key:1},x(n)(F.value.annotator),{svgRef:x(R),followZoom:F.value?.annotator?.followZoom,annotationViewport:Hi.value,backgroundColor:P.value.backgroundColor,color:P.value.color,active:ri.value,isCursorPointer:wn.value,palette:F.value.annotatorPalette,onClose:ii}),Ge({_:2},[y(x(r),n=>({name:n,fn:S(r=>[b(e.$slots,n,Ze(Je(x(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`followZoom`,`annotationViewport`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):f(``,!0),Vn.value?(_(),p(`div`,{key:2,ref_key:`noTitle`,ref:dn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):f(``,!0),P.value.title.text?(_(),p(`div`,{key:3,ref_key:`chartTitle`,ref:sn,style:`width:100%;background:transparent`},[(_(),We(Ce,{key:`title_${mn.value}`,config:{title:{cy:`candlestick-div-title`,...P.value.title},subtitle:{cy:`candlestick-div-subtitle`,...P.value.title.subtitle}}},null,8,[`config`]))],512)):f(``,!0),F.value.show&&$t.value&&(x(kn)||x(Dn))?(_(),We(x(qt),{ref_key:`userOptionsRef`,ref:vn,key:`user_options_${on.value}`,backgroundColor:P.value.backgroundColor,color:P.value.color,isImaging:x(Rn),isPrinting:x(Ln),uid:E.value,hasTooltip:F.value.buttons.tooltip&&P.value.tooltip.show,hasPdf:F.value.buttons.pdf,hasImg:F.value.buttons.img,hasSvg:F.value.buttons.svg,hasXls:F.value.buttons.csv,hasTable:F.value.buttons.table,hasFullscreen:F.value.buttons.fullscreen,hasAltCopy:F.value.buttons.altCopy,isFullscreen:$r.value,isTooltip:V.value.showTooltip,titles:{...F.value.buttonTitles},chartElement:O.value,position:F.value.position,hasAnnotator:F.value.buttons.annotator,isAnnotation:ri.value,callbacks:F.value.callbacks,printScale:F.value.print.scale,tableDialog:A.value.table.useDialog,isCursorPointer:wn.value,onToggleFullscreen:ei,onGeneratePdf:x(zn),onGenerateCsv:Zr,onGenerateImage:x(hi),onGenerateSvg:x(mi),onToggleTable:ti,onToggleTooltip:ni,onToggleAnnotator:ii,onCopyAlt:Ii,style:Qe({visibility:x(kn)?x(Dn)?`visible`:`hidden`:`visible`})},Ge({_:2},[y(x(De)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:S(n=>[b(e.$slots,t,Ze(Je(x(Oe)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.isTooltip.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):f(``,!0),m(`div`,ut,[(_(),p(`svg`,{ref_key:`svgRef`,ref:R,xmlns:x(fe),"aria-describedby":`chart-instructions-${E.value}`,class:g({"vue-data-ui-fullscreen--on":$r.value,"vue-data-ui-fulscreen--off":!$r.value,"vue-data-ui-no-transition":!x(Cn)||x(H),"vue-ui-candlestick-chart-zoom-pointer-focus":Y.value&&Xn.value}),viewBox:`0 0 ${z.value.width<=0?10:z.value.width} ${z.value.height<=0?10:z.value.height}`,style:Qe({maxWidth:`100%`,visibility:x(Un)?`visible`:`hidden`,overflow:`visible`,background:`transparent`,color:P.value.color,cursor:Y.value?Yn.value?`col-resize`:`crosshair`:void 0,touchAction:Y.value?`pan-y`:void 0,userSelect:Y.value?`none`:void 0}),tabindex:`0`,onFocus:Li,onBlur:Ri,onKeydown:zi,onPointerdown:Mi,onPointermove:Ni,onPointerup:Pi,onPointercancel:Ti,onClickCapture:Di},[qe(x(Jt)),b(e.$slots,`svg-underlayer`,{svg:{...z.value,data:Q.value,drawingArea:U.value,isPrintingImg:x(Ln)||x(Rn)||x(fi),isPrintingSvg:x(pi)}},void 0,!0),e.$slots[`chart-background`]?(_(),p(`foreignObject`,{key:0,x:U.value.left,y:U.value.top,width:Math.max(.1,U.value.width),height:Math.max(.1,U.value.height),style:{pointerEvents:`none`}},[b(e.$slots,`chart-background`,{},void 0,!0)],8,ft)):f(``,!0),Q.value.length>0?(_(),p(`g`,pt,[m(`defs`,null,[qe(Le,{t:`linear`,id:`bearish_gradient_${E.value}`,x2:`0%`,y2:`100%`,stops:[[`0%`,j.value.colors.bearish,1],[`50%`,x(ne)(j.value.colors.bearish,.02),.87],[`100%`,x(ne)(j.value.colors.bearish,.05),.4]]},null,8,[`id`,`stops`]),qe(Le,{t:`linear`,id:`bullish_gradient_${E.value}`,x2:`0%`,y2:`100%`,stops:[[`0%`,j.value.colors.bullish,1],[`50%`,x(ne)(j.value.colors.bullish,.02),.87],[`100%`,x(ne)(j.value.colors.bullish,.05),.4]]},null,8,[`id`,`stops`])]),M.value.show?(_(),p(`g`,mt,[m(`line`,{x1:Kn.value?U.value.right:U.value.left,x2:Kn.value?U.value.right:U.value.left,y1:U.value.top,y2:U.value.bottom,stroke:M.value.stroke,"stroke-width":M.value.strokeWidth,"stroke-linecap":`round`},null,8,ht),m(`line`,{x1:U.value.left,x2:U.value.right,y1:U.value.bottom,y2:U.value.bottom,stroke:M.value.stroke,"stroke-width":M.value.strokeWidth,"stroke-linecap":`round`},null,8,gt),M.value.horizontalLines.show?(_(!0),p(u,{key:0},y(Cr.value,e=>(_(),p(`line`,{x1:U.value.left,x2:U.value.right,y1:e.y,y2:e.y,stroke:M.value.horizontalLines.stroke,"stroke-width":M.value.horizontalLines.strokeWidth,"stroke-dasharray":M.value.horizontalLines.strokeDasharray,"stroke-linecap":`round`},null,8,_t))),256)):f(``,!0),M.value.verticalLines.show?(_(!0),p(u,{key:1},y(Lr.value,(e,t)=>(_(),p(`g`,null,[e.text?(_(),p(`line`,{key:0,x1:U.value.left+X.value*t+X.value/2,x2:U.value.left+X.value*t+X.value/2,y1:U.value.top,y2:U.value.bottom,stroke:M.value.verticalLines.stroke,"stroke-width":M.value.verticalLines.strokeWidth,"stroke-dasharray":M.value.verticalLines.strokeDasharray,"stroke-linecap":`round`},null,8,vt)):f(``,!0)]))),256)):f(``,!0),M.value.xAxis.ticks.show?(_(!0),p(u,{key:2},y(Lr.value,(e,t)=>(_(),p(`g`,null,[e.text?(_(),p(`line`,{key:0,x1:U.value.left+X.value*t+X.value/2,x2:U.value.left+X.value*t+X.value/2,y1:U.value.bottom,y2:U.value.bottom+3,stroke:M.value.stroke,"stroke-width":M.value.strokeWidth,"stroke-linecap":`round`},null,8,yt)):f(``,!0)]))),256)):f(``,!0)])):f(``,!0),M.value.yAxis.dataLabels.show?(_(),p(`g`,{key:1,ref_key:`scaleLabels`,ref:hn},[(_(!0),p(u,null,y(Cr.value,(e,t)=>(_(),p(`g`,{key:`sl_${t}`},[e.value>=Z.value.min&&e.value<=Z.value.max?(_(),p(`line`,{key:0,x1:Kn.value?U.value.right:U.value.left,x2:Kn.value?U.value.right+5:U.value.left-5,y1:e.y,y2:e.y,stroke:M.value.stroke,"stroke-width":M.value.strokeWidth,"stroke-linecap":`round`},null,8,bt)):f(``,!0),e.value>=Z.value.min&&e.value<=Z.value.max?(_(),p(`text`,{key:1,class:g({"vue-data-ui-transition":x(Cn)&&!x(H)}),transform:`translate(${Kn.value?U.value.right+8+M.value.yAxis.dataLabels.offsetX:U.value.left-8+M.value.yAxis.dataLabels.offsetX}, ${e.y+z.value.yAxisFontSize/3})`,"text-anchor":Kn.value?`start`:`end`,"font-size":z.value.yAxisFontSize,fill:M.value.yAxis.dataLabels.color,"font-weight":M.value.yAxis.dataLabels.bold?`bold`:`normal`},rt(x(a)({p:M.value.yAxis.dataLabels.prefix,v:e.value,s:M.value.yAxis.dataLabels.suffix,r:M.value.yAxis.dataLabels.roundingValue})),11,xt)):f(``,!0)]))),128))],512)):f(``,!0),M.value.xAxis.dataLabels.show&&!M.value.xAxis.dataLabels.datetimeFormatter.enable?(_(),p(`g`,{key:2,ref_key:`timeLabelsEls`,ref:gn},[(_(!0),p(u,null,y(wr.value,(e,t)=>(_(),p(`g`,null,[m(`text`,{class:`vue-data-ui-time-label`,transform:`translate(${U.value.left+X.value*t+X.value/2}, ${U.value.bottom+z.value.xAxisFontSize*1.5}), rotate(${M.value.xAxis.dataLabels.rotation})`,"text-anchor":M.value.xAxis.dataLabels.rotation>0?`start`:M.value.xAxis.dataLabels.rotation<0?`end`:`middle`,"font-size":z.value.xAxisFontSize,fill:M.value.xAxis.dataLabels.color,"font-weight":M.value.xAxis.dataLabels.bold?`bold`:`normal`},rt(e),9,St)]))),256))],512)):f(``,!0),M.value.xAxis.dataLabels.show&&M.value.xAxis.dataLabels.datetimeFormatter.enable?(_(),p(`g`,{key:3,ref_key:`timeLabelsEls`,ref:gn},[(_(!0),p(u,null,y(Lr.value,(e,t)=>(_(),p(`g`,null,[m(`text`,{class:`vue-data-ui-time-label`,transform:`translate(${U.value.left+X.value*t+X.value/2}, ${U.value.bottom+z.value.xAxisFontSize*1.5}), rotate(${M.value.xAxis.dataLabels.rotation})`,"text-anchor":M.value.xAxis.dataLabels.rotation>0?`start`:M.value.xAxis.dataLabels.rotation<0?`end`:`middle`,"font-size":z.value.xAxisFontSize,fill:M.value.xAxis.dataLabels.color,stroke:P.value.backgroundColor,"stroke-width":`3`,"stroke-linecap":`round`,"stroke-linejoin":`round`,"paint-order":`stroke fill`,"font-weight":M.value.xAxis.dataLabels.bold?`bold`:`normal`},rt(e?.text??``),9,Ct)]))),256))],512)):f(``,!0),A.value.type===`candlestick`?(_(),p(u,{key:4},[m(`g`,null,[(_(!0),p(u,null,y(Q.value,(e,t)=>(_(),p(`g`,null,[m(`rect`,{x:e.open.x-N.value.wick.strokeWidth/2,y:e.high.y,width:N.value.wick.strokeWidth,height:Math.abs(e.high.y-e.low.y),fill:N.value.wick.stroke,stroke:`none`,rx:N.value.wick.strokeWidth/2,class:g({"vue-data-ui-transition":T.value&&!x(I)&&!x(H)})},null,10,wt),N.value.wick.extremity.shape===`circle`?(_(),p(`g`,Tt,[m(`circle`,{cx:e.high.x,cy:e.high.y,r:N.value.wick.extremity.size===`auto`?X.value/20:N.value.wick.extremity.size,fill:N.value.wick.extremity.color,class:g({"vue-data-ui-transition":T.value&&!x(I)&&!x(H)})},null,10,Et),m(`circle`,{cx:e.low.x,cy:e.low.y,r:N.value.wick.extremity.size===`auto`?X.value/20:N.value.wick.extremity.size,fill:N.value.wick.extremity.color,class:g({"vue-data-ui-transition":T.value&&!x(I)&&!x(H)})},null,10,Dt)])):f(``,!0),N.value.wick.extremity.shape===`line`?(_(),p(`g`,Ot,[m(`rect`,{x:e.high.x-(N.value.wick.extremity.size===`auto`?X.value*N.value.candle.widthRatio:N.value.wick.extremity.size)/2,y:e.high.y-N.value.wick.strokeWidth/2,width:Math.abs(e.high.x-(N.value.wick.extremity.size===`auto`?X.value*P.value.layout.candle.widthRatio:P.value.layout.wick.extremity.size)/2-(e.high.x+(P.value.layout.wick.extremity.size===`auto`?X.value*P.value.layout.candle.widthRatio:P.value.layout.wick.extremity.size)/2)),height:N.value.wick.strokeWidth,rx:N.value.wick.strokeWidth/2,fill:N.value.wick.extremity.color,stroke:`none`,class:g({"vue-data-ui-transition":T.value&&!x(I)&&!x(H)})},null,10,kt),m(`rect`,{x:e.low.x-(N.value.wick.extremity.size===`auto`?X.value*N.value.candle.widthRatio:N.value.wick.extremity.size)/2,y:e.low.y-N.value.wick.strokeWidth/2,width:Math.abs(e.low.x-(N.value.wick.extremity.size===`auto`?X.value*P.value.layout.candle.widthRatio:P.value.layout.wick.extremity.size)/2-(e.low.x+(P.value.layout.wick.extremity.size===`auto`?X.value*P.value.layout.candle.widthRatio:P.value.layout.wick.extremity.size)/2)),height:N.value.wick.strokeWidth,fill:N.value.wick.extremity.color,stroke:`none`,rx:N.value.wick.strokeWidth/2,class:g({"vue-data-ui-transition":T.value&&!x(I)&&!x(H)})},null,10,At)])):f(``,!0)]))),256))]),m(`g`,null,[(_(!0),p(u,null,y(Q.value,(e,t)=>(_(),p(`rect`,{x:e.open.x-X.value/2+X.value*(1-j.value.widthRatio)/2,y:e.isBullish?e.close.y:e.open.y,height:Math.abs(e.close.y-e.open.y)<=0?1e-4:Math.abs(e.close.y-e.open.y),width:X.value*j.value.widthRatio<=0?1e-4:X.value*j.value.widthRatio,fill:j.value.gradient.underlayer,rx:j.value.borderRadius,stroke:`none`,class:g({"vue-data-ui-transition":T.value&&!x(I)&&!x(H)})},null,10,jt))),256)),(_(!0),p(u,null,y(Q.value,(e,t)=>(_(),p(`rect`,{x:e.open.x-X.value/2+X.value*(1-j.value.widthRatio)/2,y:e.isBullish?e.close.y:e.open.y,height:Math.abs(e.close.y-e.open.y)<=0?1e-4:Math.abs(e.close.y-e.open.y),width:X.value*j.value.widthRatio<=0?1e-4:X.value*j.value.widthRatio,fill:e.isBullish?j.value.gradient.show?`url(#bullish_gradient_${E.value})`:j.value.colors.bullish:j.value.gradient.show?`url(#bearish_gradient_${E.value})`:j.value.colors.bearish,rx:j.value.borderRadius,stroke:j.value.stroke,"stroke-width":j.value.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:g({"vue-data-ui-transition":T.value&&!x(I)&&!x(H)})},null,10,Mt))),256))])],64)):f(``,!0),A.value.type===`ohlc`?(_(!0),p(u,{key:5},y(Q.value,(e,t)=>(_(),p(`g`,{key:`ohlc_${e.absoluteIndex}`},[m(`path`,{d:`M ${e.high.x},${e.high.y} ${e.low.x},${e.low.y} M${e.open.x-Math.min(6,X.value/3)},${e.open.y} ${e.open.x},${e.open.y} M${e.close.x},${e.close.y} ${e.close.x+Math.min(6,X.value/3)},${e.close.y}`,stroke:e.isBullish?j.value.colors.bullish:j.value.colors.bearish,"stroke-width":1,class:g({"vue-data-ui-transition":x(Cn)&&!x(H)}),"stroke-linecap":`round`,"stroke-linejoin":`round`},null,10,Nt)]))),128)):f(``,!0),m(`g`,null,[(_(!0),p(u,null,y(Q.value,(e,t)=>(_(),p(`rect`,{x:U.value.left+t*X.value,y:U.value.top,height:U.value.height<=0?1e-4:U.value.height,width:X.value<=0?1e-4:X.value,fill:D.value===t||yn.value===t?x(ee)(N.value.selector.color,N.value.selector.opacity):`transparent`,onMouseover:()=>Hr(t,e,`pointer`),onMouseleave:()=>Vr(t,e),onClick:()=>Br(t,e)},null,40,Pt))),256))])])):f(``,!0),xi.value?(_(),p(`rect`,{key:2,x:xi.value.x,y:xi.value.y,width:xi.value.width,height:xi.value.height,fill:er.value.selection.fill,"fill-opacity":er.value.selection.fillOpacity,stroke:er.value.selection.stroke,"stroke-opacity":er.value.selection.strokeOpacity,"stroke-width":er.value.selection.strokeWidth,"stroke-dasharray":er.value.selection.strokeDasharray,"stroke-linecap":`round`,"stroke-linejoin":`round`,"pointer-events":`none`},null,8,Ft)):f(``,!0),rr.value?(_(),p(`rect`,Ye({key:3},Jn.value,{"data-start":G.value.start,"data-end":G.value.end}),null,16,It)):f(``,!0),b(e.$slots,`svg`,{svg:{...z.value,data:Q.value,drawingArea:U.value,isPrintingImg:x(Ln)||x(Rn)||x(fi),isPrintingSvg:x(pi)}},void 0,!0)],46,dt)),e.$slots.hint?(_(),p(`div`,Lt,[b(e.$slots,`hint`,Ze(Je({hint:A.value.a11y.translations.keyboardNavigation,isVisible:Sn.value})),void 0,!0)])):f(``,!0)]),e.$slots.watermark?(_(),p(`div`,Rt,[b(e.$slots,`watermark`,Ze(Je({isPrinting:x(Ln)||x(Rn)||x(fi)||x(pi)})),void 0,!0)])):f(``,!0),P.value.zoom.show&&W.value>6&&$t.value&&qr.value?(_(),We(Re,{key:6,ref_key:`chartSlicer`,ref:ln,"data-dom-to-png-ignore-layout":``,allMinimaps:xr.value,background:P.value.zoom.color,borderColor:P.value.backgroundColor,customFormat:P.value.zoom.customFormat,cutNullValues:!1,enableRangeHandles:P.value.zoom.enableRangeHandles,enableSelectionDrag:P.value.zoom.enableSelectionDrag,end:G.value.end,focusOnDrag:P.value.zoom.focusOnDrag,focusRangeRatio:P.value.zoom.focusRangeRatio,fontSize:P.value.zoom.fontSize,immediate:!P.value.zoom.preview.enable,inputColor:P.value.zoom.color,isPreview:rr.value,labelLeft:Rr.value.start||``,labelRight:Rr.value.end||``,max:W.value,min:0,minimap:P.value.zoom.minimap.show?x(L).map(e=>e[2]):[],minimapCompact:P.value.zoom.minimap.compact,minimapFrameColor:P.value.zoom.minimap.frameColor,minimapIndicatorColor:P.value.zoom.minimap.indicatorColor,minimapMerged:!1,minimapSelectedColor:P.value.zoom.minimap.selectedColor,minimapSelectedColorOpacity:P.value.zoom.minimap.selectedColorOpacity,minimapSelectedIndex:D.value,minimapSelectionRadius:1,preciseLabels:Nr.value,refreshEndPoint:P.value.zoom.endIndex===null?W.value:P.value.zoom.endIndex+1,refreshStartPoint:P.value.zoom.startIndex===null?0:P.value.zoom.startIndex,selectColor:P.value.zoom.highlightColor,selectedSeries:x(L),smoothMinimap:!1,start:G.value.start,textColor:P.value.color,timeLabels:Er.value,usePreciseLabels:M.value.xAxis.dataLabels.datetimeFormatter.enable&&!P.value.zoom.useDefaultFormat,useResetSlot:P.value.zoom.useResetSlot,valueEnd:G.value.end,valueStart:G.value.start,verticalHandles:P.value.zoom.minimap.verticalHandles,minScale:M.value.yAxis.scale.min,maxScale:M.value.yAxis.scale.max,maxWidth:P.value.zoom.maxWidth,minimapLeftInsetRatio:z.value.width>0&&P.value.zoom.autoFit?U.value.left/z.value.width:null,minimapRightInsetRatio:z.value.width>0&&P.value.zoom.autoFit?(z.value.width-U.value.right)/z.value.width:null,additionalMinimapHeight:P.value.zoom.minimap.additionalHeight,handleType:P.value.zoom.minimap.handleType,handleIconColor:P.value.zoom.minimap.handleIconColor,handleBorderWidth:P.value.zoom.minimap.handleBorderWidth,handleBorderColor:P.value.zoom.minimap.handleBorderColor,handleFill:P.value.zoom.minimap.handleFill,handleWidth:P.value.zoom.minimap.handleWidth,"onUpdate:end":yi,"onUpdate:start":vi,onTrapMouse:gi,onReset:i[0]||=()=>Gr({force:!0,publish:!0}),onFutureEnd:i[1]||=e=>ir(`end`,e),onFutureStart:i[2]||=e=>ir(`start`,e)},{"reset-action":S(({reset:t})=>[b(e.$slots,`reset-action`,Ze(Je({reset:t})),void 0,!0)]),slotMap:S(({height:e,unitW:t})=>[(_(!0),p(u,null,y(br.value({minimapH:e,unitW:t}),(e,n)=>(_(),p(`g`,null,[m(`path`,{d:`M ${e.high.x},${e.high.y} ${e.low.x},${e.low.y}`,stroke:e.isBullish?j.value.colors.bullish:j.value.colors.bearish,"stroke-width":1,style:Qe({opacity:n>=K.value.start&&n<=K.value.end?1:.6})},null,12,zt),m(`path`,{d:`M ${e.open.x},${e.open.y} ${e.close.x},${e.close.y}`,stroke:e.isBullish?j.value.colors.bullish:j.value.colors.bearish,"stroke-width":Math.min(6,t/1.5),style:Qe({opacity:n>=K.value.start&&n<=K.value.end?1:.6})},null,12,Bt)]))),256))]),_:3},8,/* @__PURE__ */ `allMinimaps.background.borderColor.customFormat.enableRangeHandles.enableSelectionDrag.end.focusOnDrag.focusRangeRatio.fontSize.immediate.inputColor.isPreview.labelLeft.labelRight.max.minimap.minimapCompact.minimapFrameColor.minimapIndicatorColor.minimapSelectedColor.minimapSelectedColorOpacity.minimapSelectedIndex.preciseLabels.refreshEndPoint.refreshStartPoint.selectColor.selectedSeries.start.textColor.timeLabels.usePreciseLabels.useResetSlot.valueEnd.valueStart.verticalHandles.minScale.maxScale.maxWidth.minimapLeftInsetRatio.minimapRightInsetRatio.additionalMinimapHeight.handleType.handleIconColor.handleBorderWidth.handleBorderColor.handleFill.handleWidth`.split(`.`))):f(``,!0),m(`div`,{ref_key:`chartLegend`,ref:cn},[b(e.$slots,`legend`,{legend:Q.value},void 0,!0)],512),e.$slots.source?(_(),p(`div`,{key:7,ref_key:`source`,ref:un,dir:`auto`},[b(e.$slots,`source`,{},void 0,!0)],512)):f(``,!0),qe(x(Ut),{teleportTo:P.value.tooltip.teleportTo,show:V.value.showTooltip&&rn.value,backgroundColor:P.value.tooltip.backgroundColor,color:P.value.tooltip.color,borderRadius:P.value.tooltip.borderRadius,borderColor:P.value.tooltip.borderColor,borderWidth:P.value.tooltip.borderWidth,fontSize:P.value.tooltip.fontSize,backgroundOpacity:P.value.tooltip.backgroundOpacity,position:P.value.tooltip.position,offsetX:P.value.tooltip.offsetX,offsetY:P.value.tooltip.offsetY,parent:O.value,content:an.value,isFullscreen:$r.value,isCustom:P.value.tooltip.customFormat&&typeof P.value.tooltip.customFormat==`function`,smooth:P.value.tooltip.smooth,backdropFilter:P.value.tooltip.backdropFilter,smoothForce:P.value.tooltip.smoothForce,smoothSnapThreshold:P.value.tooltip.smoothSnapThreshold,isA11yMode:xn.value===`keyboard`,a11yPosition:bn.value},{"tooltip-before":S(()=>[b(e.$slots,`tooltip-before`,Ze(Je({...zr.value})),void 0,!0)]),tooltip:S(()=>[b(e.$slots,`tooltip`,Ze(Je({...zr.value})),void 0,!0)]),"tooltip-after":S(()=>[b(e.$slots,`tooltip-after`,Ze(Je({...zr.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`]),$t.value&&F.value.buttons.table?(_(),We(tt(ci.value.component),Ye({key:8},ci.value.props,{ref_key:`tableUnit`,ref:_n,onClose:li}),Ge({content:S(()=>[(_(),We(x(Gt),{key:`table_${pn.value}`,colNames:Qr.value.colNames,head:Qr.value.head,body:Qr.value.body,config:Qr.value.config,title:A.value.table.useDialog?``:ci.value.title,withCloseButton:!A.value.table.useDialog,isCursorPointer:wn.value,onClose:li},{th:S(({th:e})=>[Ke(rt(e),1)]),td:S(({td:e})=>[m(`div`,{innerHTML:e},null,8,Vt)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[A.value.table.useDialog?{name:`title`,fn:S(()=>[Ke(rt(ci.value.title),1)]),key:`0`}:void 0,A.value.table.useDialog?{name:`actions`,fn:S(()=>[m(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[3]||=e=>Zr(F.value.callbacks.csv),style:Qe({cursor:wn.value?`pointer`:`default`})},[qe(x(Ht),{name:`fileCsv`,stroke:ci.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):f(``,!0),b(e.$slots,`skeleton`,{},()=>[x(I)?(_(),We(ge,{key:0})):f(``,!0)],!0)],46,ct))}},[[`__scopeId`,`data-v-8eccbdcd`]]);export{st as n,Ht as t};
@@ -1 +0,0 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-By3Vb5kz.js";import{D as n,Jt as r,X as i,at as a,nt as ee,zt as o}from"./lib-rPeBMZrn.js";import{n as te,t as ne}from"./useHints-C-TwxM0Y.js";import{t as re}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as ie}from"./useNestedProp-DnGoh-XS.js";import{n as ae,t as oe}from"./userOptionsSlots-DYuo-E5m.js";import{t as se}from"./usePrinter-DVf3YcG5.js";import{t as ce}from"./useUserOptionState-CXlFnwPv.js";import{t as le}from"./usePrefersMotion-XLHwega2.js";import{Fragment as s,computed as c,createBlock as ue,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as de,createTextVNode as f,defineAsyncComponent as fe,guardReactiveProps as pe,mergeProps as me,nextTick as he,normalizeClass as ge,normalizeProps as _e,normalizeStyle as p,onBeforeUnmount as m,onMounted as h,openBlock as g,ref as _,renderList as v,renderSlot as y,shallowRef as ve,toDisplayString as b,unref as x,useSlots as ye,watch as S,withCtx as be}from"vue";var C=/* @__PURE__ */ e({default:()=>w}),xe=[`id`],Se=[`aria-labelledby`],Ce=[`id`],we=[`height`],Te=[`id`],Ee=[`data-cell`,`aria-label`,`height`],De={key:2,ref:`source`,dir:`auto`},w=/*#__PURE__*/ re({__name:`vue-ui-carousel-table`,props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},emits:[`copyAlt`],setup(e,{expose:re,emit:C}){let w=fe(()=>import(`./vue-ui-skeleton-98OnGJ2N.js`).then(e=>e.n)),Oe=fe(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),{vue_ui_carousel_table:ke}=t(),Ae=le(),T=e,je=C,E=_(i()),Me=_(!1),D=_(!!T.dataset),Ne=ye();h(()=>{Pe()});let O=c({get:()=>N(),set:e=>e}),k=c(()=>O.value.debug);h(()=>{Ne[`chart-background`]&&k.value&&console.warn(`VueUiCarouselTable does not support the #chart-background slot.`)});function Pe(){o(T.dataset)?a({componentName:`VueUiCarouselTable`,type:`dataset`,debug:k.value}):((!T.dataset.head||o(T.dataset.head))&&(a({componentName:`VueUiCarouselTable`,type:`datasetAttribute`,property:`head`,debug:k.value}),D.value=!1),(!T.dataset.body||o(T.dataset.body))&&(a({componentName:`VueUiCarouselTable`,type:`datasetAttribute`,property:`body`,debug:k.value}),D.value=!1)),Ae.value&&(O.value.userOptions.buttons.animation=!1)}te({config:()=>O.value,dataset:()=>T.dataset,component:`VueUiCarouselTable`,rules:[ne.noHint]});let Fe=c(()=>O.value.userOptions.useCursorPointer),{userOptionsVisible:A,setUserOptionsVisibility:j,keepUserOptionState:M}=ce({config:O.value});function N(){return ie({userConfig:T.config,defaultConfig:ke})}S(()=>T.config,e=>{O.value=N(),A.value=!O.value.userOptions.showOnChartHover,Pe()},{deep:!0}),S(()=>T.dataset,e=>{G()},{deep:!0});let{isPrinting:P,isImaging:Ie,generatePdf:Le,generateImage:Re}=se({elementId:`carousel-table_${E.value}`,fileName:O.value.caption.text||`vue-ui-carousel-table`,options:O.value.userOptions.print}),F=_({showAnimation:O.value.animation.use}),I=_(null),ze=_(null),L=_(null),R=_(null),z=_(0),B=_(0),V=_(!1),H=_(null),U=_(null),W=_(0);function G(){H.value&&(U.value={elements:H.value.getElementsByTagName(`tr`),heights:Array.from(H.value.getElementsByTagName(`tr`)).map(e=>e.getBoundingClientRect().height)})}h(G);let Be=c(()=>!U.value||!U.value.heights.length?0:Math.max(...U.value.heights)+z.value+B.value),Ve=c(()=>T.dataset.body?O.value.tbody.tr.visible<=T.dataset.body.length?O.value.tbody.tr.visible:T.dataset.body.length:0),He=c(()=>(O.value.tbody.tr.height+O.value.tbody.tr.td.padding.top+O.value.tbody.tr.td.padding.bottom+O.value.tbody.tr.border.size*2)*Ve.value+z.value+B.value),K=_(0),q=_(null),J=_(0),Y=_(!1),Ue=_(0);h(()=>{L.value&&(z.value=L.value.getBoundingClientRect().height),R.value&&(B.value=R.value.getBoundingClientRect().height),F.value.showAnimation&&U.value&&Ge()}),h(()=>{if(I.value){let e=I.value.querySelector(`thead`),t=Array.from(H.value.querySelectorAll(`tr`));function n(){let n=e.getBoundingClientRect().bottom;t.forEach(e=>{e.getBoundingClientRect().top<n?e.style.visibility=`hidden`:e.style.visibility=`visible`})}I.value.addEventListener(`scroll`,n),n(),m(()=>{I.value.removeEventListener(`scroll`,n)})}});function We(e){Me.value=e,Ue.value+=1}function Ge(){Ae.value||!q.value&&!Y.value&&(O.value.animation.type===`scroll`?q.value=requestAnimationFrame(qe):q.value=requestAnimationFrame(Je))}function Ke(){if(!I.value)return!1;let{scrollTop:e,scrollHeight:t,clientHeight:n}=I.value;return e+n>=t}function qe(e){Y.value||(J.value||=e,e-J.value>=O.value.animation.speedMs&&(K.value+=U.value.heights[W.value],(Ke()||W.value>=U.value.heights.length)&&(K.value=0,W.value=-1),W.value+=1,I.value&&I.value.scrollTo({top:K.value,behavior:`smooth`}),J.value=e),q.value=requestAnimationFrame(qe))}function Je(e){if(Y.value)return;J.value||=e;let t=e-J.value,n=O.value.animation.speedMs/4/1e3;t>=n&&(K.value+=n,K.value>=I.value.scrollHeight-I.value.clientHeight&&(K.value=0),I.value&&I.value.scrollTo({top:K.value,behavior:`auto`}),J.value=e),q.value=requestAnimationFrame(Je)}function X(){Y.value=!0,cancelAnimationFrame(q.value),q.value=null}m(X);function Z(){Y.value&&F.value.showAnimation&&(Y.value=!1,J.value=0,Ge())}function Ye(){O.value.animation.pauseOnHover&&X()}let Q=_(null);function Xe(){X(),clearTimeout(Q.value)}function Ze(){clearTimeout(Q.value),Q.value=setTimeout(Z,1e3)}S(()=>O.value.animation.use,e=>{e?(F.value.showAnimation=!0,Z()):(F.value.showAnimation=!1,X())}),S(()=>O.value.animation.type,e=>{X(),K.value=0,W.value=0,I.value.scrollTo({top:0,behavior:`auto`}),Z()});let Qe=c(()=>O.value.responsiveBreakpoint),$=ve(null);h(()=>{$.value=new ResizeObserver(e=>{e.forEach(e=>{V.value=e.contentRect.width<Qe.value}),z.value=L.value?L.value.getBoundingClientRect().height:0,B.value=R.value?R.value.getBoundingClientRect().height:0,W.value=0,he(()=>{X(),J.value=0,K.value=0,G(),Z()})}),I.value&&$.value.observe(I.value)}),m(()=>{$.value&&$.value.disconnect()});function $e(){Le()}function et(){F.value.showAnimation=!F.value.showAnimation,F.value.showAnimation?Z():X()}function tt(e=null){he(()=>{let t=T.dataset.head.map((e,t)=>[[T.dataset.body[t]]]),r=[[O.value.caption.text],[T.dataset.head.map(e=>[e])]].concat(t),i=n(r);e?e(i):ee({csvContent:i,title:O.value.caption.text||`vue-ui-carousel-table`})})}async function nt(){je(`copyAlt`,{config:O.value,dataset:T.dataset}),O.value.userOptions.callbacks.altCopy?await Promise.resolve(O.value.userOptions.callbacks.altCopy({config:O.value,dataset:T.dataset})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}return re({pauseAnimation:X,resumeAnimation:Z,toggleAnimation:et,generateCsv:tt,generatePdf:$e,generateImage:Re,copyAlt:nt}),(t,n)=>(g(),u(`div`,{class:`vue-data-ui-component vue-ui-carousel-table`,style:{position:`relative`,overflow:`visible`},ref_key:`chartContainer`,ref:ze,onMouseenter:n[5]||=()=>x(j)(!0),onMouseleave:n[6]||=()=>x(j)(!1)},[d(`div`,{ref_key:`tableContainer`,ref:I,id:`carousel-table_${E.value}`,style:p({height:x(P)||x(Ie)?`auto`:`${Math.max(He.value,Be.value)}px`,containerType:`inline-size`,position:`relative`,overflow:`auto`,fontFamily:O.value.fontFamily}),class:ge({"vue-ui-responsive":V.value,"is-playing":O.value.scrollbar.hide||!Y.value&&O.value.scrollbar.showOnlyOnHover}),onMouseover:n[0]||=e=>Ye(),onMouseleave:n[1]||=e=>Z(),onTouchstart:n[2]||=e=>Xe(),onTouchend:n[3]||=e=>Ze(),onTouchcancel:n[4]||=e=>Ze()},[D.value?(g(),u(`table`,{key:0,class:`vue-data-ui-carousel-table`,"aria-labelledby":`carousel-caption-${E.value}`,style:p({...O.value.style,border:`${O.value.border.size}px solid ${O.value.border.color}`,width:`100%`,borderCollapse:`collapse`,backgroundColor:O.value.tbody.backgroundColor})},[d(`caption`,{ref_key:`caption`,ref:L,class:`vue-data-ui-carousel-table-caption`,id:`carousel-caption-${E.value}`,style:p({...O.value.caption.style,fontFamily:`inherit`,position:`sticky`,top:0,zIndex:2,paddingTop:O.value.caption.padding.top+`px`,paddingRight:O.value.caption.padding.right+`px`,paddingBottom:O.value.caption.padding.bottom+`px`,paddingLeft:O.value.caption.padding.left+`px`,boxShadow:V.value?O.value.thead.tr.style.boxShadow:`none`,minHeight:`36px`,display:t.$slots.caption||O.value.caption.text||O.value.userOptions.show?``:`none`})},[f(b(O.value.caption.text&&!t.$slots.caption?O.value.caption.text:``)+` `,1),y(t.$slots,`caption`,{},void 0,!0)],12,Ce),d(`thead`,{role:`rowgroup`,style:p({...O.value.thead.style,position:`sticky`,top:`${t.$slots.caption||O.value.caption.text||O.value.userOptions.show?z.value:0}px`,zIndex:1})},[d(`tr`,{ref_key:`tableRow`,ref:R,role:`row`,style:p({...O.value.thead.tr.style,border:O.value.thead.tr.border.size?`${O.value.thead.tr.border.size}px solid ${O.value.thead.tr.border.color}`:`none`,boxShadow:V.value?`none`:O.value.thead.tr.style.boxShadow}),height:`${O.value.thead.tr.height}px`},[(g(!0),u(s,null,v(e.dataset.head,(e,n)=>(g(),u(`th`,{role:`cell`,key:`th_${n}`,id:`col-${n}`,scope:`col`,style:p({...O.value.thead.tr.th.style,border:O.value.thead.tr.th.border.size?`${O.value.thead.tr.th.border.size}px solid ${O.value.thead.tr.th.border.color}`:`none`,paddingTop:O.value.thead.tr.th.padding.top+`px`,paddingRight:O.value.thead.tr.th.padding.right+`px`,paddingBottom:O.value.thead.tr.th.padding.bottom+`px`,paddingLeft:O.value.thead.tr.th.padding.left+`px`})},[f(b(t.$slots.th?``:e)+` `,1),y(t.$slots,`th`,me({ref_for:!0},{th:e,colIndex:n}),void 0,!0)],12,Te))),128))],12,we)],4),e.dataset.body&&e.dataset.head?(g(),u(`tbody`,{key:0,ref_key:`tbody`,ref:H,"aria-live":`polite`,style:{clipPath:`inset(0,0,0,0)`}},[(g(!0),u(s,null,v(e.dataset.body,(n,i)=>(g(),u(`tr`,{style:p({...O.value.tbody.tr.style,border:`${O.value.tbody.tr.border.size}px solid ${O.value.tbody.tr.border.color}`,verticalAlign:`middle`})},[(g(!0),u(s,null,v(n,(n,a)=>(g(),u(`td`,{role:`cell`,"data-cell":e.dataset.head[a]||``,"aria-label":`${e.dataset.head[a]}: ${n}`,style:p({...O.value.tbody.tr.td.style,border:`${O.value.tbody.tr.td.border.size}px solid ${O.value.tbody.tr.td.border.color}`,backgroundColor:x(r)(O.value.tbody.tr.td.style.backgroundColor,i%2==0&&O.value.tbody.tr.td.alternateColor?O.value.tbody.tr.td.alternateOpacity*100:100),paddingTop:O.value.tbody.tr.td.padding.top+`px`,paddingRight:O.value.tbody.tr.td.padding.right+`px`,paddingBottom:O.value.tbody.tr.td.padding.bottom+`px`,paddingLeft:O.value.tbody.tr.td.padding.left+`px`,verticalAlign:`middle`}),height:`${O.value.tbody.tr.height}px`},[f(b(t.$slots.td?``:n)+` `,1),y(t.$slots,`td`,me({ref_for:!0},{td:n,rowIndex:i,colIndex:a}),void 0,!0)],12,Ee))),256))],4))),256))],512)):l(``,!0)],12,Se)):l(``,!0)],46,xe),D.value?l(``,!0):(g(),ue(x(w),{key:0,config:{type:`table`}})),O.value.userOptions.show&&D.value&&(x(M)||x(A))?(g(),ue(x(Oe),{ref:`details`,key:`user_option_${Ue.value}`,backgroundColor:O.value.style.backgroundColor,color:O.value.style.color,isPrinting:x(P),isImaging:x(Ie),uid:E.value,hasTooltip:!1,hasPdf:O.value.userOptions.buttons.pdf,hasImg:O.value.userOptions.buttons.img,hasXls:O.value.userOptions.buttons.csv,hasTable:!1,hasLabel:!1,hasAnimation:O.value.userOptions.buttons.animation,isAnimation:!F.value.showAnimation,hasFullscreen:O.value.userOptions.buttons.fullscreen,hasAltCopy:O.value.userOptions.buttons.altCopy,isFullscreen:Me.value,chartElement:ze.value,position:O.value.userOptions.position,titles:{...O.value.userOptions.buttonTitles},zIndex:3,offsetX:12,callbacks:O.value.userOptions.callbacks,printScale:O.value.userOptions.print.scale,isCursorPointer:Fe.value,onGeneratePdf:$e,onGenerateCsv:tt,onGenerateImage:x(Re),onToggleAnimation:et,onToggleFullscreen:We,onCopyAlt:nt,style:p({visibility:x(M)?x(A)?`visible`:`hidden`:`visible`})},de({_:2},[v(x(ae)(t.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionAnimation optionFullscreen optionAltCopy custom-menu-before custom-menu-after`),e=>({name:e,fn:be(n=>[y(t.$slots,e,_e(pe(x(oe)(e,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasPdf`,`hasImg`,`hasXls`,`hasAnimation`,`isAnimation`,`hasFullscreen`,`hasAltCopy`,`isFullscreen`,`chartElement`,`position`,`titles`,`callbacks`,`printScale`,`isCursorPointer`,`onGenerateImage`,`style`])):l(``,!0),t.$slots.source?(g(),u(`div`,De,[y(t.$slots,`source`,{},void 0,!0)],512)):l(``,!0)],544))}},[[`__scopeId`,`data-v-f8c6267a`]]);export{C as n,w 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,Ht as s,It as ee,Jt as c,S as te,X as ne,Yt as re,at as ie,f as l,h as ae,i as u,in as oe,nt as se,p as ce,r as le,t as ue,w as de,yt 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"./img-D4RQwASc.js";import{t as xe}from"./useChartExport-BZts4KFb.js";import{t as Se}from"./tableIntegration-CNoJ1CIY.js";import{n as Ce,t as we}from"./userOptionsSlots-DYuo-E5m.js";import{t as Te}from"./usePrinter-DVf3YcG5.js";import{t as Ee}from"./DefGrad-DKMq1REY.js";import{t as De}from"./A11yDataTable-DWNlWXzs.js";import{t as Oe}from"./useUserOptionState-CXlFnwPv.js";import{t as ke}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ae}from"./useTableResponsive-uSz_qZOB.js";import{t as je}from"./vue_ui_chestnut-BxxivKN7.js";import{Fragment as d,computed as f,createBlock as Me,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Ne,createTextVNode as Pe,createVNode as Fe,defineAsyncComponent as Ie,guardReactiveProps as Le,mergeProps as Re,nextTick as ze,normalizeClass as g,normalizeProps as Be,normalizeStyle as _,onMounted as Ve,openBlock as v,ref as y,renderList as b,renderSlot as x,resolveDynamicComponent as He,toDisplayString as S,toRefs as Ue,unref as C,useCssVars as We,watch as Ge,withCtx as Ke,withKeys as qe}from"vue";var Je=/* @__PURE__ */ e({default:()=>Bn}),Ye=[`id`],Xe=[`id`],Ze={"aria-live":`polite`,class:`sr-only`},Qe={key:2,ref:`noTitle`,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},$e={style:{position:`relative`}},et=[`xmlns`,`aria-describedby`,`viewBox`],tt=[`width`,`height`],nt={key:1},rt=[`fill`,`font-weight`,`font-size`,`x`,`y`],it=[`fill`,`font-weight`,`font-size`,`x`,`y`],at={key:2},ot=[`x`,`y`,`font-size`,`font-weight`,`fill`],st=[`x`,`y`,`font-size`,`font-weight`,`fill`],ct=[`d`,`stroke`,`fill`],lt=[`cx`,`cy`,`r`,`fill`],ut=[`aria-label`,`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`,`onClick`],dt={key:3},ft=[`x`,`y`,`font-size`,`fill`,`onClick`],pt={key:0},mt=[`x`,`y`,`fill`,`font-size`,`font-weight`],ht=[`x`,`y`,`height`,`width`,`fill`,`rx`,`onClick`],gt=[`aria-label`,`x`,`y`,`height`,`width`,`fill`,`rx`,`stroke`,`stroke-width`,`onClick`],_t={key:4},vt=[`x`,`y`,`fill`,`font-size`,`onClick`],yt=[`d`,`stroke`],bt=[`aria-label`,`fill`,`cx`,`cy`,`r`,`onClick`],xt={key:5},St=[`x`,`y`,`font-size`,`font-weight`,`fill`],Ct=[`x1`,`x2`,`y1`,`y2`,`stroke`,`stroke-width`],wt=[`y`,`height`,`width`],Tt={style:{width:`100%`,height:`100%`,display:`flex`,"align-items":`center`,"justify-content":`center`,"flex-direction":`column`}},Et={style:{display:`flex`,"align-items":`center`,"justify-content":`center`,gap:`12px`,"flex-wrap":`wrap`,"flex-direction":`row`}},Dt={viewBox:`0 0 20 20`,height:`16`,width:`16`},Ot=[`fill`],kt={key:7},At=[`y`,`height`,`width`],jt={style:{width:`100%`,height:`100%`,display:`flex`,"align-items":`center`,"justify-content":`center`,"flex-direction":`column`}},Mt={style:{display:`flex`,"align-items":`center`,"justify-content":`center`,gap:`12px`,"flex-wrap":`wrap`,"flex-direction":`row`}},Nt={viewBox:`0 0 20 20`,height:`16`,width:`16`},Pt=[`fill`],Ft=[`cx`,`cy`,`fill`],It=[`d`,`stroke`],Lt=[`cx`,`cy`,`fill`],Rt=[`d`,`stroke`],zt=[`cx`,`cy`,`fill`],Bt=[`cx`,`cy`,`fill`],Vt=[`x`,`y`,`fill`,`font-size`,`font-weight`],Ht=[`x`,`y`,`fill`,`font-size`,`font-weight`],Ut=[`x`,`text-anchor`,`y`,`fill`,`font-size`],Wt=[`x`,`text-anchor`,`y`,`fill`,`font-size`],Gt=[`x`,`text-anchor`,`y`,`fill`,`font-size`],Kt=[`x`,`text-anchor`,`y`,`fill`,`font-size`],qt=[`x`,`text-anchor`,`y`,`fill`,`font-size`],Jt=[`x`,`y`,`font-size`,`fill`],Yt=[`x`,`y`,`font-size`,`fill`],Xt=[`x`,`y`,`font-size`,`fill`],Zt={key:4,class:`vue-data-ui-watermark`},Qt={key:5,ref:`source`,dir:`auto`},$t={class:`vue-ui-data-table`},en={key:0},tn=[`data-cell`],nn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},rn={key:0},an={key:1},on=[`data-cell`],sn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},cn={key:0},ln={key:1},un=[`data-cell`],dn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},fn={key:0},pn={key:1},mn=[`data-cell`],hn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},gn={key:0},_n={key:1},vn=[`data-cell`],yn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},bn={key:0},xn={key:1},Sn=[`data-cell`],Cn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},wn={key:0},Tn={key:1},En=[`data-cell`],Dn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},On={key:0},kn={key:1},An=[`data-cell`],jn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Mn=[`data-cell`],Nn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Pn=[`data-cell`],Fn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},In=[`data-cell`],Ln={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Rn=[`data-cell`],zn={style:{display:`flex`,"align-items":`center`,gap:`5px`,"justify-content":`flex-end`,width:`100%`,"padding-right":`3px`}},Bn=/*#__PURE__*/ ve({__name:`vue-ui-chestnut`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectRoot`,`selectBranch`,`selectNut`,`copyAlt`],setup(e,{expose:ve,emit:Je}){We(e=>({v5624e750:e.tdo}));let Bn=Ie(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Vn=Ie(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Hn=Ie(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Un=Ie(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Wn=Ie(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),Gn=Ie(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_chestnut:Kn}=i(),w=e,qn=f(()=>!!w.dataset&&w.dataset.length),T=y(ne()),Jn=y(null),Yn=y(0),Xn=y(null),Zn=y(null),Qn=y(!1),E=y(!1),D=y(``),O=y({level:`root`,rootIndex:0,branchIndex:0,nutIndex:0,locked:!1}),k=y(or()),A=f(()=>k.value.style.chart.layout.roots),j=f(()=>k.value.style.chart.layout.branches),M=f(()=>k.value.style.chart.layout.nuts),N=f(()=>k.value.style.chart.layout),P=f(()=>k.value.style.chart);ge({config:()=>k.value,dataset:()=>w.dataset,component:`VueUiChestnut`,rules:[_e.emptyArray,{test:e=>e.some(e=>e?.branches&&e.branches.length>10),message:[`👀 Some root has > 10 branches, which can make the chart heavy. Consider:`,``,`▶️ Grouping some branches in broader categories.`]},{test:e=>e.some(e=>e?.branches&&e.branches.some(e=>e?.breakdown&&e?.breakdown.length>6)),message:[`👀 Some donuts have > 6 series. Consider:`,``,`▶️ Grouping small values into an "Other" category.`]}]});let F=f(()=>k.value.userOptions.useCursorPointer),$n=f(()=>oe({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{grandTotal:{show:!1},roots:{stroke:`#6A6A6A`,labels:{show:!1}},verticalSeparator:{stroke:`transparent`},branches:{stroke:`#6A6A6A`,underlayerColor:`#6A6A6A90`,labels:{show:!1,dataLabels:{show:!1}}}}}}},userConfig:k.value.skeletonConfig??{}})),{loading:er,FINAL_DATASET:tr}=me({...Ue(w),FINAL_CONFIG:k,prepareConfig:or,skeletonDataset:w.config?.skeletonDataset??[{name:`_`,color:`#969696`,branches:[{name:`_`,value:32,breakdown:[{name:`_`,value:16,color:`#CACACA`},{name:`_`,value:16,color:`#6A6A6A`}]},{name:`_`,value:16,breakdown:[{name:`_`,value:8,color:`#CACACA`},{name:`_`,value:8,color:`#6A6A6A`}]},{name:`_`,value:8,breakdown:[{name:`_`,value:4,color:`#CACACA`},{name:`_`,value:4,color:`#6A6A6A`}]},{name:`_`,value:4,breakdown:[{name:`_`,value:2,color:`#CACACA`},{name:`_`,value:2,color:`#6A6A6A`}]}]},{name:`_`,color:`#C4C4C4`,branches:[{name:`_`,value:24,breakdown:[{name:`_`,value:12,color:`#CACACA`},{name:`_`,value:12,color:`#6A6A6A`}]},{name:`_`,value:12,breakdown:[{name:`_`,value:6,color:`#CACACA`},{name:`_`,value:6,color:`#6A6A6A`}]},{name:`_`,value:6,breakdown:[{name:`_`,value:3,color:`#CACACA`},{name:`_`,value:3,color:`#6A6A6A`}]},{name:`_`,value:2,breakdown:[{name:`_`,value:1,color:`#CACACA`},{name:`_`,value:1,color:`#6A6A6A`}]}]}],skeletonConfig:oe({defaultConfig:k.value,userConfig:$n.value})}),{userOptionsVisible:nr,setUserOptionsVisibility:rr,keepUserOptionState:ir}=Oe({config:k.value}),{svgRef:ar}=ke({config:N.value.title});function or(){return ye(w.config,Kn,je)}Ge(()=>w.config,e=>{k.value=or(),nr.value=!k.value.userOptions.showOnChartHover,pr.value.showTable=k.value.table.show,Pr()},{deep:!0});let{isPrinting:sr,isImaging:cr,generatePdf:lr,generateImage:ur}=Te({elementId:`vue-ui-chestnut_${T.value}`,fileName:N.value.title.text||`vue-ui-chestnut`,options:k.value.userOptions.print}),dr=f(()=>k.value.userOptions.show),fr=f(()=>de(k.value.customPalette)),pr=y({showTable:k.value.table.show});Ge(k,()=>{pr.value={showTable:k.value.table.show}},{immediate:!0});let mr=y(null),hr=f(()=>k.value.table.responsiveBreakpoint),I=y({gap:6,padding:{top:102,left:12,right:12,bottom:96},width:1024,height:0,branchSize:32,branchStart:128}),L=f(()=>({left:I.value.padding.left,top:I.value.padding.top,right:I.value.width-I.value.padding.right,bottom:I.value.height-I.value.padding.bottom,width:I.value.width-(I.value.padding.left+I.value.padding.right),height:I.value.height-(I.value.padding.top+I.value.padding.bottom),seedX:I.value.padding.left+64})),R=f(()=>tr.value.flatMap(e=>(e.branches||[]).map(e=>e.value||0)).reduce((e,t)=>e+t,0)),gr=f(()=>k.value.debug),z=f(()=>(gr.value&&tr.value.forEach((e,t)=>{fe({datasetObject:e,requiredAttributes:[`name`,`branches`]}).forEach(e=>{ie({componentName:`VueUiChestnut`,type:`datasetSerieAttribute`,property:e,index:t})}),e.branches&&e.branches.forEach((e,n)=>{fe({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{ie({componentName:`VueUiChestnut`,type:`datasetSerieAttribute`,property:e,index:`${t} - ${n}`})}),e.breakdown&&e.breakdown.forEach((e,r)=>{fe({datasetObject:e,requiredAttributes:[`name`,`value`]}).forEach(e=>{ie({componentName:`VueUiChestnut`,type:`datasetSerieAttribute`,property:e,index:`${t} - ${n} - ${r}`})})})})}),tr.value.map((e,t)=>{let n=(e.branches||[]).map(e=>e.value||0).reduce((e,t)=>e+t,0);return{...e,color:te(e.color)||fr.value[t]||s[t]||s[t%s.length],id:e.id||`root_${t}_${T.value}`,type:`root`,total:n,rootIndex:t,branches:(e.branches||[]).map((r,i)=>({...r,rootName:e.name,rootIndex:t,color:te(e.color)||fr.value[t]||s[t]||s[t%s.length],value:r.value>=0?r.value:0,id:r.id||`branch_${t}_${i}_${T.value}`,proportionToRoot:r.value/n,type:`branch`,breakdown:(r.breakdown||[]).map((a,o)=>({table:{rootName:e.name,rootValue:n,rootToTotal:n/R.value,branchName:r.name,branchValue:r.value,branchToTotal:r.value/R.value,branchToRoot:r.value/n,nutName:a.name,nutValue:a.value,nutToTotal:a.value/R.value,nutToRoot:a.value/n,nutToBranch:a.value/r.value},...a,type:`nut`,branchName:r.name,rootName:e.name,branchTotal:r.value>=0?r.value:0,proportionToBranch:a.value/r.value,proportionToRoot:a.value/n,proportionToTree:a.value/R.value,rootIndex:t,id:a.id||`nut_${t}_${i}_${o}_${T.value}`,color:te(a.color)||fr.value[o]||s[o]||s[o%s.length],value:a.value>=0?a.value:0}))}))}})));function _r(){return z.value}let vr=Je,yr=f(()=>z.value.flatMap(e=>e.branches).length),br=f(()=>Math.max(...z.value.map(e=>e.branches.map(e=>e.value).reduce((e,t)=>e+t,0)))),xr=f(()=>Math.max(...z.value.flatMap(e=>e.branches.map(e=>e.value)))),Sr=f(()=>256+I.value.padding.left),B=f(()=>z.value.sort((e,t)=>t.total-e.total).map((e,t)=>{let n=L.value.height/z.value.length/2,r=e.total/br.value*(n>64?64:n);return{...e,x:L.value.seedX,y:L.value.top+L.value.height/z.value.length*(t+1)-(L.value.height/z.value.length/2+I.value.gap/2),r:r<I.value.branchSize/2?I.value.branchSize/2:r}})),Cr=f(()=>j.value.widthRatio<=0?.1:j.value.widthRatio>1.8?1.8:j.value.widthRatio),wr=f(()=>B.value.flatMap(e=>e.branches)),V=f(()=>wr.value.sort((e,t)=>t.value-e.value).map((e,t)=>({...e,y1:t*I.value.branchSize+L.value.top+t*I.value.gap,y2:t*I.value.branchSize+I.value.branchSize,x1:Sr.value,x2:384*e.value/xr.value*Cr.value+Sr.value}))),Tr=f(()=>B.value),Er=f(()=>Tr.value.map(e=>V.value.filter(t=>t.rootIndex===e.rootIndex).sort((e,t)=>e.y1-t.y1))),Dr=f(()=>Tr.value.map((e,t)=>Er.value[t].map(e=>(e.breakdown||[]).map((t,n)=>({...t,nutIndex:n,rootIndex:e.rootIndex,branchId:e.id,branchName:e.name,branchValue:e.value,rootName:e.rootName})))));function Or(e){let t=B.value.find(t=>t.rootIndex===e.rootIndex);return{x:t.x,y:t.y,r:t.r}}let H=y(null),U=y(null),W=y(null),G=y(null);function K(){H.value=null,W.value=null,G.value=null}function q(e){if(H.value)return e.type===`root`?e.rootIndex===H.value.rootIndex:e.type===`branch`?e.id===H.value.id:e.type===`nut`&&e.branchName===H.value.name&&e.rootIndex===H.value.rootIndex;if(W.value)return e.type===`root`?e.rootIndex===W.value.rootIndex:e.type===`branch`?e.id===W.value.id:e.type===`nut`&&e.branchName===W.value.name&&e.rootIndex===W.value.rootIndex;if(G.value)return e.type===`root`?e.id===G.value.id:e.type===`branch`||e.type===`nut`?e.rootIndex===G.value.rootIndex:!1;if(li.value&&E.value){if(O.value.level===`root`)return e.type===`root`?Z.value&&e.id===Z.value.id:e.type===`branch`||e.type===`nut`?Z.value&&e.rootIndex===Z.value.rootIndex:!1;if(O.value.level===`branch`)return e.type===`root`?Z.value&&e.rootIndex===Z.value.rootIndex:e.type===`branch`?si.value&&e.id===si.value.id:(e.type,!1);if(O.value.level===`nut`)return e.type===`root`?Z.value&&e.rootIndex===Z.value.rootIndex:e.type===`branch`?ci.value&&e.id===ci.value.id:e.type===`nut`&&ci.value&&e.branchName===ci.value.name&&e.rootIndex===ci.value.rootIndex}return!0}function kr(e){K();let t=Tr.value.findIndex(t=>t.rootIndex===e.rootIndex),n=(Er.value[t]||[]).findIndex(t=>t.id===e.id);t!==-1&&(O.value.rootIndex=t),n!==-1&&(O.value.branchIndex=n),O.value.level=`nut`,O.value.nutIndex=0,ze(()=>{H.value=e,W.value=e,U.value=ee({series:e.breakdown,base:1},e.x2+24+M.value.offsetX,e.y1+I.value.branchSize/2,80,80),vr(`selectNut`,e.breakdown),Q()})}function J(){H.value=null,U.value=null,vr(`selectNut`,null)}function Ar(e){let t=Tr.value.findIndex(t=>t.rootIndex===e.rootIndex),n=(Er.value[t]||[]).findIndex(t=>t.id===e.id);t!==-1&&(O.value.rootIndex=t),n!==-1&&(O.value.branchIndex=n),O.value.level=`branch`,O.value.nutIndex=0,W.value&&W.value.id===e.id?(W.value=null,K(),vr(`selectBranch`,null),Q()):(K(),W.value=e,vr(`selectBranch`,e),Q())}function jr(e){let t=Tr.value.findIndex(t=>t.id===e.id);t!==-1&&(O.value.rootIndex=t),O.value.level=`root`,O.value.branchIndex=0,O.value.nutIndex=0,G.value&&G.value.id===e.id?(K(),vr(`selectRoot`,null),Q()):(K(),G.value=e,vr(`selectRoot`,e),Q())}function Mr(){return L.value.bottom-(H.value.y1+180)<0?0:L.value.bottom}function Nr(e){return e.proportion*100>M.value.selected.labels.dataLabels.hideUnderValue}Ve(()=>{Pr()});function Pr(){pe(w.dataset)&&ie({componentName:`VueUiChestnut`,type:`dataset`,debug:gr.value});let e=yr.value*(I.value.branchSize+I.value.gap)+I.value.padding.top+I.value.padding.bottom;I.value.height=e}let Y=f(()=>({head:[k.value.table.th.translations.rootName,k.value.table.th.translations.rootValue,k.value.table.th.translations.rootToTotal,k.value.table.th.translations.branchName,k.value.table.th.translations.branchValue,k.value.table.th.translations.branchToRoot,k.value.table.th.translations.branchToTotal,k.value.table.th.translations.nutName,k.value.table.th.translations.nutValue,k.value.table.th.translations.nutToBranch,k.value.table.th.translations.nutToRoot,k.value.table.th.translations.nutToTotal],body:z.value.flatMap((e,t)=>e.branches.flatMap((e,t)=>e.breakdown.flatMap((e,t)=>e.table)))}));function Fr(e=null){ze(()=>{let t=[[N.value.title.text],[N.value.title.subtitle.text],[``],[`Grand total`,R.value],[``]],n=Y.value.head,r=Y.value.body.map((e,t)=>[Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?``:e.rootName,Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?``:e.rootValue,Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?``:e.rootToTotal,Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?``:e.branchName,Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?``:e.branchValue,Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?``:e.branchToRoot,Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?``:e.branchToTotal,e.nutName,e.nutValue,e.nutToBranch,e.nutToRoot,e.nutToTotal]),i=t.concat([n]).concat(r),a=o(i);e?e(a):se({csvContent:a,title:N.value.title.text||`vue-ui-chestnut`})})}let Ir=y(!1);function Lr(e){Ir.value=e,Yn.value+=1}function Rr(){pr.value.showTable=!pr.value.showTable}let zr=y(!1);function Br(){zr.value=!zr.value}async function Vr({scale:e=2}={}){if(!Jn.value)return;let{width:t,height:n}=Jn.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await be({domElement:Jn.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:N.value.title.text,width:t,height:n,aspectRatio:r}}function Hr(e){let t=Or(e),n=e.x1,r=e.y1,i=I.value.branchSize,a=t.x+t.r/2,o=t.y;return[`M ${n},${r}`,`C ${n-20},${r} ${n-20},${r} ${a},${o}`,`C ${a},${o} ${n-20},${r+i} ${n},${r+i}`,`Z`].join(` `)}let Ur=f(()=>Se({config:k,style:P,mutableConfig:pr,dialog:Gn,accordion:Vn,isFullscreen:Ir,parent:Jn,maxWidth:800,titleStyle:N,isCursorPointer:F}));Ge(()=>pr.value.showTable,async e=>{k.value.table.show||(e&&k.value.table.useDialog&&Xn.value?(await ze(),Xn.value.open()):`close`in Xn.value&&Xn.value.close())});let{isResponsive:Wr}=Ae(mr,hr);function Gr(){pr.value.showTable=!1,Zn.value&&Zn.value.setTableIconState(!1)}let Kr=f(()=>z.value.map((e,t)=>({...e,display:`${e.name}: ${u(A.value.labels.formatter,e.total,a({p:N.value.legend.prefix,v:e.total,s:N.value.legend.suffix,r:N.value.legend.roundingValue}),{datapoint:e})} (${a({v:e.total/R.value*100,s:`%`,r:N.value.legend.roundingPercentage})})`}))),qr=f(()=>Kr.value.map(e=>({color:e.color,name:e.display,shape:`circle`}))),Jr=f(()=>P.value.backgroundColor),Yr=f(()=>({...N.value.legend,textAlign:`center`,show:!0,position:`bottom`})),Xr=f(()=>N.value.title),{isCallbackImaging:Zr,isCallbackSvg:Qr,generateSvg:$r,onGenerateImage:ei}=xe({svg:ar,title:Xr,legend:Yr,legendItems:qr,backgroundColor:Jr,titleEmbedded:!0,getSvgCallback:()=>k.value.userOptions.callbacks.svg,generateImage:ur});async function ti(){vr(`copyAlt`,{config:k.value,dataset:z.value}),k.value.userOptions.callbacks.altCopy?await Promise.resolve(k.value.userOptions.callbacks.altCopy({config:k.value,dataset:z.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function ni(e){if(!e)return``;let t=a({p:N.value.legend.prefix,v:e.total,s:N.value.legend.suffix,r:N.value.legend.roundingValue}),n=a({v:e.total/R.value*100,s:`%`,r:N.value.legend.roundingPercentage});return`Root ${e.name}. Value ${t}. ${n} of total.`}function ri(e){if(!e)return``;let t=a({p:j.value.labels.dataLabels.prefix,v:e.value,s:j.value.labels.dataLabels.suffix,r:j.value.labels.dataLabels.roundingValue}),n=a({v:e.proportionToRoot*100,s:`%`,r:N.value.legend.roundingPercentage});return`Branch ${e.name}. Root ${e.rootName}. Value ${t}. ${n} of root ${e.rootName}.`}function ii(e){if(!e)return``;let t=a({p:N.value.legend.prefix,v:e.value,s:N.value.legend.suffix,r:M.value.selected.labels.roundingValue}),n=a({v:e.proportionToBranch*100,s:`%`,r:M.value.selected.labels.roundingPercentage});return`Nut ${e.name}. Branch ${e.branchName}. Root ${e.rootName}. Value ${t}. ${n} of branch ${e.branchName}.`}let ai=f(()=>Tr.value[O.value.rootIndex]||null),X=f(()=>(Er.value[O.value.rootIndex]||[])[O.value.branchIndex]||null),oi=f(()=>((Dr.value[O.value.rootIndex]||[])[O.value.branchIndex]||[])[O.value.nutIndex]||null),Z=f(()=>ai.value),si=f(()=>X.value),ci=f(()=>O.value.level===`nut`?X.value:null),li=f(()=>Qn.value);function Q(){O.value.level===`root`?D.value=ni(ai.value):O.value.level===`branch`?D.value=ri(X.value):O.value.level===`nut`&&(D.value=ii(oi.value))}function $(){O.value={level:`root`,rootIndex:0,branchIndex:0,nutIndex:0,locked:!1},D.value=``}function ui(){let e=Er.value[O.value.rootIndex]||[];e.length?(O.value.branchIndex>=e.length&&(O.value.branchIndex=0),O.value.branchIndex<0&&(O.value.branchIndex=e.length-1)):O.value.branchIndex=0}function di(){let e=(Dr.value[O.value.rootIndex]||[])[O.value.branchIndex]||[];e.length?(O.value.nutIndex>=e.length&&(O.value.nutIndex=0),O.value.nutIndex<0&&(O.value.nutIndex=e.length-1)):O.value.nutIndex=0}function fi(e){if(O.value.level===`root`){let t=Tr.value.length;if(!t)return;O.value.rootIndex+=e,O.value.rootIndex>=t&&(O.value.rootIndex=0),O.value.rootIndex<0&&(O.value.rootIndex=t-1),O.value.branchIndex=0,O.value.nutIndex=0,Q()}else O.value.level===`branch`?(O.value.branchIndex+=e,ui(),O.value.nutIndex=0,Q()):O.value.level===`nut`&&(O.value.nutIndex+=e,di(),Q())}function pi(e){if(e>0){if(O.value.level===`root`){if(!(Er.value[O.value.rootIndex]||[]).length)return;O.value.level=`branch`,O.value.branchIndex=0,O.value.nutIndex=0,Q();return}if(O.value.level===`branch`){if(!((Dr.value[O.value.rootIndex]||[])[O.value.branchIndex]||[]).length)return;O.value.level=`nut`,O.value.nutIndex=0,X.value?kr(X.value):Q();return}}else O.value.level===`nut`?(J(),W.value=null,O.value.level=`branch`,O.value.nutIndex=0,Q()):O.value.level===`branch`&&(W.value=null,G.value=null,O.value.level=`root`,O.value.nutIndex=0,Q())}function mi(){O.value.level===`root`&&ai.value?(jr(ai.value),D.value=`${ni(ai.value)} selected.`):O.value.level===`branch`&&X.value?(Ar(X.value),D.value=`${ri(X.value)} selected.`):O.value.level===`nut`&&X.value&&oi.value&&(kr(X.value),D.value=`${ii(oi.value)} details opened.`)}function hi(){Qn.value=!0,E.value=!1}function gi(){Qn.value=!1,E.value=!1,D.value=``,G.value||W.value||H.value||$()}function _i(e){let t=e.key===`ArrowUp`,n=e.key===`ArrowDown`,r=e.key===`ArrowLeft`,i=e.key===`ArrowRight`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;(t||n||r||i||a||o)&&(e.preventDefault(),e.stopPropagation(),Qn.value||=!0,o?(K(),$(),E.value=!1):((t||n||r||i)&&(E.value=!0),t?fi(-1):n?fi(1):r?pi(-1):i?pi(1):a&&mi()))}let vi=f(()=>({headers:Y.value.head,rows:Y.value.body.map(e=>[e.rootName,e.rootValue,a({v:e.rootToTotal*100,s:`%`,r:k.value.table.td.roundingPercentage}),e.branchName,e.branchValue,a({v:e.branchToRoot*100,s:`%`,r:k.value.table.td.roundingPercentage}),a({v:e.branchToTotal*100,s:`%`,r:k.value.table.td.roundingPercentage}),e.nutName,e.nutValue,a({v:e.nutToBranch*100,s:`%`,r:k.value.table.td.roundingPercentage}),a({v:e.nutToRoot*100,s:`%`,r:k.value.table.td.roundingPercentage}),a({v:e.nutToTotal*100,s:`%`,r:k.value.table.td.roundingPercentage})])}));return ve({getData:_r,getImage:Vr,generatePdf:lr,generateCsv:Fr,generateImage:ur,generateSvg:$r,toggleTable:Rr,toggleAnnotator:Br,toggleFullscreen:Lr,copyAlt:ti}),(e,i)=>(v(),m(`div`,{class:g(`vue-data-ui-component vue-ui-chestnut ${Ir.value?`vue-data-ui-wrapper-fullscreen`:``}`),ref_key:`chestnutChart`,ref:Jn,id:`vue-ui-chestnut_${T.value}`,style:_(`font-family:${k.value.style.fontFamily};width:100%; text-align:center;background:${P.value.backgroundColor}`),onMouseenter:i[12]||=()=>C(rr)(!0),onMouseleave:i[13]||=()=>C(rr)(!1)},[h(`div`,{id:`chart-instructions-${T.value}`,class:`sr-only`},[h(`p`,null,S(k.value.a11y.translations.keyboardNavigation),1)],8,Xe),h(`div`,Ze,S(D.value),1),vi.value?.rows?.length?(v(),Me(De,{key:0,uid:T.value,head:vi.value.headers,body:vi.value.rows,notice:k.value.a11y.translations.tableAvailable,caption:k.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):p(``,!0),k.value.userOptions.buttons.annotator?(v(),Me(C(Hn),Re({key:1},C(n)(k.value.userOptions.annotator),{svgRef:C(ar),backgroundColor:P.value.backgroundColor,color:P.value.color,active:zr.value,isCursorPointer:F.value,palette:k.value.userOptions.annotatorPalette,onClose:Br}),Ne({_:2},[b(C(r),n=>({name:n,fn:Ke(r=>[x(e.$slots,n,Be(Le(C(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):p(``,!0),dr.value?(v(),m(`div`,Qe,null,512)):p(``,!0),k.value.userOptions.show&&qn.value&&(C(ir)||C(nr))?(v(),Me(C(Un),{ref_key:`userOptionsRef`,ref:Zn,key:`user_options_${Yn.value}`,backgroundColor:P.value.backgroundColor,color:P.value.color,isImaging:C(cr),isPrinting:C(sr),uid:T.value,hasPdf:k.value.userOptions.buttons.pdf,hasImg:k.value.userOptions.buttons.img,hasSvg:k.value.userOptions.buttons.svg,hasXls:k.value.userOptions.buttons.csv,hasTable:k.value.userOptions.buttons.table,hasFullscreen:k.value.userOptions.buttons.fullscreen,hasAltCopy:k.value.userOptions.buttons.altCopy,isFullscreen:Ir.value,titles:{...k.value.userOptions.buttonTitles},chartElement:Jn.value,position:k.value.userOptions.position,hasAnnotator:k.value.userOptions.buttons.annotator,isAnnotation:zr.value,callbacks:k.value.userOptions.callbacks,printScale:k.value.userOptions.print.scale,tableDialog:k.value.table.useDialog,isCursorPointer:F.value,onToggleFullscreen:Lr,onGeneratePdf:C(lr),onGenerateCsv:Fr,onGenerateImage:C(ei),onGenerateSvg:C($r),onToggleTable:Rr,onToggleAnnotator:Br,onCopyAlt:ti,style:_({visibility:C(ir)?C(nr)?`visible`:`hidden`:`visible`})},Ne({_:2},[b(C(Ce)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Ke(n=>[x(e.$slots,t,Be(Le(C(we)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isImaging.isPrinting.uid.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.titles.chartElement.position.hasAnnotator.isAnnotation.callbacks.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):p(``,!0),h(`div`,$e,[I.value.height>0?(v(),m(`svg`,{key:0,ref_key:`svgRef`,ref:ar,xmlns:C(ue),"aria-describedby":`chart-instructions-${T.value}`,class:g({"vue-data-ui-fullscreen--on":Ir.value,"vue-data-ui-fulscreen--off":!Ir.value}),viewBox:`0 0 ${I.value.width<=0?10:I.value.width} ${I.value.height<=0?10:I.value.height}`,style:_(`overflow:visible;background:transparent;color:${P.value.color}`),tabindex:`0`,onFocus:hi,onBlur:gi,onKeydown:_i},[Fe(C(Wn)),x(e.$slots,`svg-underlayer`,{svg:{...I.value,isPrintingImg:C(sr)||C(cr)||C(Zr),isPrintingSvg:C(Qr)}},void 0,!0),e.$slots[`chart-background`]?(v(),m(`foreignObject`,{key:0,x:0,y:0,width:I.value.width<=0?10:I.value.width,height:I.value.height<=0?10:I.value.height,style:{pointerEvents:`none`}},[x(e.$slots,`chart-background`,{},void 0,!0)],8,tt)):p(``,!0),H.value?p(``,!0):(v(),m(`g`,nt,[N.value.title.text?(v(),m(`text`,{key:0,"text-anchor":`middle`,fill:N.value.title.color,"font-weight":N.value.title.bold?`bold`:`normal`,"font-size":N.value.title.fontSize,x:I.value.width/2,y:12+N.value.title.fontSize+N.value.title.offsetY,onClick:i[0]||=()=>{K(),$(),E.value=!1}},S(N.value.title.text),9,rt)):p(``,!0),N.value.title.subtitle.text?(v(),m(`text`,{key:1,"text-anchor":`middle`,fill:N.value.title.subtitle.color,"font-weight":N.value.title.subtitle.bold?`bold`:`normal`,"font-size":N.value.title.subtitle.fontSize,x:I.value.width/2,y:48+N.value.title.subtitle.fontSize+N.value.title.subtitle.offsetY,onClick:i[1]||=()=>{K(),$(),E.value=!1}},S(N.value.title.subtitle.text),9,it)):p(``,!0)])),h(`defs`,null,[(v(!0),m(d,null,b(z.value,(e,t)=>(v(),Me(Ee,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`root_gradient_${T.value}_${e.rootIndex}`,key:`root_gradient_${T.value}_${e.rootIndex}`,stops:[[`0%`,C(c)(C(re)(e.color,.05),100-A.value.gradientIntensity),1],[`100%`,e.color,1]]},null,8,[`id`,`stops`]))),128)),(v(!0),m(d,null,b(z.value,e=>(v(),Me(Ee,{t:`linear`,x1:`0%`,y1:`0%`,x2:`100%`,y2:`0%`,id:`branch_gradient_${T.value}_${e.rootIndex}`,key:`branch_gradient_${T.value}_${e.rootIndex}`,stops:[[`0%`,e.color,1],[`100%`,C(c)(C(re)(e.color,.02),100-j.value.gradientIntensity),1]]},null,8,[`id`,`stops`]))),128)),Fe(Ee,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`nutpick_${T.value}`,stops:[[`0%`,C(c)(`#FFFFFF`,0),0],[`80%`,C(c)(`#FFFFFF`,M.value.selected.gradientIntensity),1],[`100%`,C(c)(`#FFFFFF`,0),0]]},null,8,[`id`,`stops`]),Fe(Ee,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`nut_${T.value}`,stops:[[`0%`,C(c)(`#FFFFFF`,0),0],[`80%`,C(c)(`#FFFFFF`,M.value.gradientIntensity),1],[`100%`,C(c)(`#FFFFFF`,0),0]]},null,8,[`id`,`stops`]),Fe(Ee,{t:`radial`,cx:`50%`,cy:`50%`,r:`50%`,fx:`50%`,fy:`50%`,id:`nut_underlayer_${T.value}`,stops:[[`0%`,C(c)(P.value.backgroundColor,100),1],[`80%`,C(c)(P.value.backgroundColor,60),1],[`100%`,C(c)(P.value.backgroundColor,0),1]]},null,8,[`id`,`stops`])]),N.value.grandTotal.show?(v(),m(`g`,at,[h(`text`,{x:L.value.seedX,y:32+N.value.grandTotal.offsetY,"font-size":N.value.grandTotal.fontSize,"font-weight":N.value.grandTotal.bold?`bold`:`normal`,fill:N.value.grandTotal.color,"text-anchor":`middle`,onClick:i[2]||=()=>{K(),$(),E.value=!1}},S(N.value.grandTotal.text),9,ot),h(`text`,{x:L.value.seedX,y:38+N.value.grandTotal.fontSize+N.value.grandTotal.offsetY,"font-size":N.value.grandTotal.fontSize,"font-weight":N.value.grandTotal.bold?`bold`:`normal`,fill:N.value.grandTotal.color,"text-anchor":`middle`,onClick:i[3]||=()=>{K(),$(),E.value=!1}},S(C(u)(N.value.grandTotal.formatter,R.value,C(a)({p:N.value.grandTotal.prefix,v:R.value,s:N.value.grandTotal.suffix,r:N.value.grandTotal.roundingValue}))),9,st)])):p(``,!0),(v(!0),m(d,null,b(V.value,e=>(v(),m(`g`,null,[h(`defs`,null,[Fe(Ee,{t:`linear`,id:`link_grad_${e.id}`,stops:[[`0%`,e.color,1],[`100%`,C(c)(e.color,N.value.links.opacity),1]]},null,8,[`id`,`stops`])]),h(`path`,{d:Hr(e),stroke:C(c)(e.color,N.value.links.opacity),fill:`url(#link_grad_${e.id})`,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:_(`opacity:${+!!q(e)}`),onClick:i[4]||=()=>{K(),$(),E.value=!1}},null,12,ct)]))),256)),(v(!0),m(d,null,b(B.value,e=>(v(),m(`circle`,{cx:e.x,cy:e.y,r:e.r,fill:A.value.underlayerColor,stroke:`none`,style:_(`cursor:${F.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`)},null,12,lt))),256)),(v(!0),m(d,null,b(B.value,(e,t)=>(v(),m(`circle`,{"aria-label":ni(e),cx:e.x,cy:e.y,r:e.r,fill:A.value.useGradient?`url(#root_gradient_${T.value}_${e.rootIndex})`:e.color,stroke:A.value.stroke,"stroke-width":A.value.strokeWidth,style:_(`cursor:${F.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`),onClick:t=>jr(e)},null,12,ut))),256)),A.value.labels.show?(v(),m(`g`,dt,[(v(!0),m(d,null,b(B.value,(e,t)=>(v(),m(`text`,{x:e.x,y:e.y+A.value.labels.fontSize/2.6,"text-anchor":`middle`,"font-size":A.value.labels.fontSize,fill:A.value.labels.adaptColorToBackground?C(le)(e.color):A.value.labels.color,"font-weight":`bold`,style:_(`cursor:${F.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`),onClick:t=>jr(e)},S(C(u)(A.value.labels.formatter,e.total,C(a)({p:A.value.labels.prefix,v:e.total,s:A.value.labels.suffix,r:A.value.labels.roundingValue}),{datapoint:e})),13,ft))),256)),(v(!0),m(d,null,b(B.value,e=>(v(),m(`g`,null,[H.value&&e.rootIndex===H.value.rootIndex||W.value&&e.rootIndex===W.value.rootIndex||G.value&&e.rootIndex===G.value.rootIndex?(v(),m(`g`,pt,[h(`text`,{x:e.x,y:e.y+e.r+24,"text-anchor":`middle`,fill:A.value.labels.name.color,"font-size":A.value.labels.name.fontSize,"font-weight":A.value.labels.name.bold?`bold`:`normal`,onClick:i[5]||=()=>{K(),$(),E.value=!1}},S(e.name),9,mt)])):p(``,!0)]))),256))])):p(``,!0),(v(!0),m(d,null,b(V.value,e=>(v(),m(`rect`,{x:e.x1,y:e.y1,height:I.value.branchSize,width:e.x2-e.x1,fill:j.value.underlayerColor,rx:j.value.borderRadius,stroke:`none`,style:_(`opacity:${q(e)?1:.05}`),onClick:t=>Ar(e)},null,12,ht))),256)),(v(!0),m(d,null,b(V.value,(e,t)=>(v(),m(`rect`,{"aria-label":ri(e),x:e.x1,y:e.y1,height:I.value.branchSize,width:e.x2-e.x1,fill:j.value.useGradient?`url(#branch_gradient_${T.value}_${e.rootIndex})`:e.color,rx:j.value.borderRadius,stroke:j.value.stroke,"stroke-width":j.value.strokeWidth,style:_(`cursor:${F.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`),onClick:t=>Ar(e)},null,12,gt))),256)),j.value.labels.dataLabels.show?(v(),m(`g`,_t,[(v(!0),m(d,null,b(V.value,e=>(v(),m(`g`,null,[e.proportionToRoot*100>j.value.labels.dataLabels.hideUnderValue?(v(),m(`text`,{key:0,x:e.x1+6,y:e.y1+I.value.branchSize/1.5,"text-anchor":`start`,fill:C(le)(e.color),"font-size":j.value.labels.dataLabels.fontSize,"font-weight":`bold`,style:_(`cursor:${F.value?`pointer`:`default`}; opacity:${q(e)?1:.05}`),onClick:t=>Ar(e)},S(C(u)(j.value.labels.dataLabels.formatter,e.value,C(a)({p:N.value.branches.labels.dataLabels.prefix,v:e.value,s:N.value.branches.labels.dataLabels.suffix,r:N.value.branches.labels.dataLabels.roundingValue}),{datapoint:e})),13,vt)):p(``,!0)]))),256))])):p(``,!0),(v(!0),m(d,null,b(V.value,(e,t)=>(v(),m(`g`,null,[(v(!0),m(d,null,b(C(ee)({series:e.breakdown,base:1},e.x2+24+M.value.offsetX,e.y1+I.value.branchSize/2,I.value.branchSize/3,I.value.branchSize/3),(t,n)=>(v(),m(`path`,{d:t.path,stroke:t.color,"stroke-width":10,fill:`none`,style:_(`opacity:${q(e)?1:.1}`)},null,12,yt))),256)),h(`circle`,{"aria-label":`Open details for branch ${e.name} in root ${e.rootName}`,fill:M.value.useGradient?`url(#nut_${T.value})`:`transparent`,cx:e.x2+24+M.value.offsetX,cy:e.y1+I.value.branchSize/2,r:I.value.branchSize/2+2,onClick:t=>kr(e),style:_(`cursor:${F.value?`pointer`:`default`};opacity:${q(e)?1:.1}`)},null,12,bt)]))),256)),j.value.labels.show&&!W.value?(v(),m(`g`,xt,[(v(!0),m(d,null,b(V.value,e=>(v(),m(`text`,{x:e.x2+I.value.branchSize+24+M.value.offsetX,y:e.y1+I.value.branchSize/2+5,"font-size":j.value.labels.fontSize,"font-weight":j.value.labels.bold?`bold`:`normal`,fill:j.value.labels.color,"text-anchor":`start`,style:_(`opacity:${q(e)?1:.1}`)},S(e.name),13,St))),256))])):p(``,!0),h(`line`,{x1:256+I.value.padding.left,x2:256+I.value.padding.left,y1:L.value.top,y2:L.value.bottom,stroke:N.value.verticalSeparator.stroke,"stroke-width":N.value.verticalSeparator.strokeWidth},null,8,Ct),!H.value&&!W.value?(v(),m(`foreignObject`,{key:6,x:0,y:L.value.bottom,height:I.value.height-L.value.bottom,width:I.value.width,style:{overflow:`visible`},"data-no-svg-export":``,onClick:i[6]||=()=>{K(),$(),E.value=!1}},[h(`div`,Tt,[h(`div`,Et,[(v(!0),m(d,null,b(B.value,e=>(v(),m(`div`,{style:_(`display:flex;align-items:center;gap:3px;flex-direction:row;font-size:${N.value.legend.fontSize}px;`)},[(v(),m(`svg`,Dt,[h(`circle`,{cx:`10`,cy:`10`,r:`10`,fill:e.color,stroke:`none`},null,8,Ot)])),C(er)?p(``,!0):(v(),m(d,{key:0},[h(`span`,null,S(e.name)+`:`,1),h(`b`,null,S(C(u)(N.value.roots.labels.formatter,e.total,C(a)({p:P.value.layout.legend.prefix,v:e.total,s:P.value.layout.legend.suffix,r:P.value.layout.legend.roundingValue}),{datapoint:e})),1),Pe(` (`+S(C(a)({v:e.total/R.value*100,s:`%`,r:N.value.legend.roundingPercentage}))+`) `,1)],64))],4))),256))])])],8,wt)):p(``,!0),H.value&&U.value?(v(),m(`g`,kt,[(v(),m(`foreignObject`,{x:0,y:Mr(),height:I.value.height-L.value.bottom,width:I.value.width,style:{overflow:`visible`},onClick:i[7]||=()=>{K(),$(),E.value=!1}},[h(`div`,jt,[h(`b`,null,S(H.value.name),1),h(`div`,Mt,[(v(!0),m(d,null,b(H.value.breakdown,(e,t)=>(v(),m(`div`,{style:_(`display:flex;align-items:center;gap:6px;flex-direction:row;font-size:${N.value.legend.fontSize}px;`)},[(v(),m(`svg`,Nt,[h(`circle`,{cx:`10`,cy:`10`,r:`10`,fill:e.color,stroke:`none`},null,8,Pt)])),h(`span`,null,[Pe(S(e.name)+`: `,1),h(`b`,null,S(N.value.legend.prefix)+` `+S(e.value.toFixed(P.value.layout.nuts.selected.labels.roundingValue))+` `+S(N.value.legend.suffix),1),Pe(` (`+S((e.proportionToBranch*100).toFixed(N.value.nuts.selected.labels.roundingPercentage))+`%)`,1)])],4))),256))])])],8,At)),h(`circle`,{cx:H.value.x2+24+M.value.offsetX,cy:H.value.y1+I.value.branchSize/2,r:256,fill:`url(#nut_underlayer_${T.value})`,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,Ft),(v(!0),m(d,null,b(U.value,e=>(v(),m(`g`,null,[Nr(e)?(v(),m(`path`,{key:0,d:C(ae)(e,{x:H.value.x2+24+M.value.offsetX,y:H.value.y1+I.value.branchSize/2},16,16,!1,!1,64),stroke:e.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,It)):p(``,!0)]))),256)),h(`circle`,{cx:H.value.x2+24+M.value.offsetX,cy:H.value.y1+I.value.branchSize/2,r:118,fill:P.value.backgroundColor,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,Lt),(v(!0),m(d,null,b(U.value,e=>(v(),m(`path`,{d:e.path,stroke:e.color,"stroke-width":64,fill:`none`,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,Rt))),256)),h(`circle`,{cx:H.value.x2+24+M.value.offsetX,cy:H.value.y1+I.value.branchSize/2,r:110,fill:`url(#nutpick_${T.value})`,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,zt),h(`circle`,{cx:H.value.x2+24+M.value.offsetX,cy:H.value.y1+I.value.branchSize/2,r:64,fill:P.value.backgroundColor,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},null,10,Bt),h(`text`,{x:H.value.x2+24+M.value.offsetX,y:H.value.y1+8,fill:M.value.selected.labels.core.total.color,"font-size":M.value.selected.labels.core.total.fontSize,"font-weight":M.value.selected.labels.core.total.bold?`bold`:`normal`,"text-anchor":`middle`,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(k.value.translations.total),11,Vt),h(`text`,{x:H.value.x2+24+M.value.offsetX,y:H.value.y1+36,fill:M.value.selected.labels.core.value.color,"font-size":M.value.selected.labels.core.value.fontSize,"font-weight":M.value.selected.labels.core.value.bold?`bold`:`normal`,"text-anchor":`middle`,onClick:J,class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(C(u)(M.value.selected.labels.dataLabels.formatter,H.value.value,C(a)({p:M.value.selected.labels.core.value.prefix,v:H.value.value,s:M.value.selected.labels.core.value.suffix,r:M.value.selected.roundingValue}),{datapoint:H.value})),11,Ht),(v(!0),m(d,null,b(U.value,(e,t)=>(v(),m(`g`,null,[Nr(e)?(v(),m(`text`,{key:0,x:C(l)(e).x,"text-anchor":C(l)(e).anchor,y:C(ce)(e)-M.value.selected.labels.dataLabels.fontSize/6,fill:e.color,"font-size":M.value.selected.labels.dataLabels.fontSize/2,style:_(`font-weight:${M.value.selected.labels.dataLabels.bold?`bold`:``}`),class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},` ⬤ `,14,Ut)):p(``,!0),Nr(e)?(v(),m(`text`,{key:1,x:C(l)(e,!0).x,"text-anchor":C(l)(e,!0).anchor,y:C(ce)(e),fill:M.value.selected.labels.dataLabels.color,"font-size":M.value.selected.labels.dataLabels.fontSize,style:_(`font-weight:${M.value.selected.labels.dataLabels.bold?`bold`:``}`),class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(H.value.breakdown[t].name),15,Wt)):p(``,!0)]))),256)),(v(!0),m(d,null,b(U.value,(e,t)=>(v(),m(`g`,null,[Nr(e)?(v(),m(`text`,{key:0,x:C(l)(e,!0).x,"text-anchor":C(l)(e).anchor,y:C(ce)(e)+M.value.selected.labels.dataLabels.fontSize,fill:M.value.selected.labels.dataLabels.color,"font-size":M.value.selected.labels.dataLabels.fontSize,style:_(`font-weight:${M.value.selected.labels.dataLabels.bold?`bold`:``}`),class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(C(a)({v:H.value.breakdown[t].value/H.value.value*100,s:`%`,r:M.value.selected.labels.roundingPercentage}))+` `+S(k.value.translations.of)+` `+S(H.value.breakdown[t].branchName)+` `+S(C(u)(M.value.selected.labels.dataLabels.formatter,H.value.breakdown[t].value,C(a)({p:M.value.selected.labels.dataLabels.prefix,v:H.value.breakdown[t].value,s:M.value.selected.labels.dataLabels.suffix,r:M.value.selected.roundingValue}),{datapoint:U.value,seriesIndex:t})),15,Gt)):p(``,!0),Nr(e)?(v(),m(`text`,{key:1,x:C(l)(e,!0).x,"text-anchor":C(l)(e).anchor,y:C(ce)(e)+M.value.selected.labels.dataLabels.fontSize*2,fill:M.value.selected.labels.dataLabels.color,"font-size":M.value.selected.labels.dataLabels.fontSize,style:_(`font-weight:${M.value.selected.labels.dataLabels.bold?`bold`:``}`),class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(C(a)({v:H.value.breakdown[t].proportionToRoot*100,s:`%`,r:M.value.selected.labels.roundingPercentage}))+` `+S(k.value.translations.of)+` `+S(H.value.breakdown[t].rootName),15,Kt)):p(``,!0),Nr(e)?(v(),m(`text`,{key:2,x:C(l)(e,!0).x,"text-anchor":C(l)(e).anchor,y:C(ce)(e)+M.value.selected.labels.dataLabels.fontSize*3,fill:M.value.selected.labels.dataLabels.color,"font-size":M.value.selected.labels.dataLabels.fontSize,style:_(`font-weight:${M.value.selected.labels.dataLabels.bold?`bold`:``}`),class:g(M.value.selected.useMotion?`vue-ui-chestnut-animated`:``)},S(C(a)({v:H.value.breakdown[t].proportionToTree*100,s:`%`,r:M.value.selected.labels.roundingPercentage}))+` `+S(k.value.translations.proportionToTree),15,qt)):p(``,!0)]))),256))])):p(``,!0),(v(!0),m(d,null,b(V.value,e=>(v(),m(`g`,null,[W.value&&W.value.id===e.id&&!H.value?(v(),m(`text`,{key:0,x:e.x1+6,y:e.y1+I.value.branchSize+24,"font-weight":`bold`,"text-anchor":`start`,"font-size":j.value.labels.dataLabels.fontSize,fill:j.value.labels.color,onClick:i[8]||=()=>{K(),$(),E.value=!1}},S(e.name)+`: `+S(C(u)(j.value.labels.dataLabels.formatter,e.value,C(a)({p:j.value.labels.dataLabels.prefix,v:e.value,s:j.value.labels.dataLabels.suffix,r:j.value.labels.dataLabels.roundingValue}),{datapoint:e})),9,Jt)):p(``,!0),W.value&&W.value.id===e.id&&!H.value?(v(),m(`text`,{key:1,x:e.x1+6,y:e.y1+I.value.branchSize+48,"text-anchor":`start`,"font-size":j.value.labels.dataLabels.fontSize,fill:j.value.labels.color,onClick:i[9]||=()=>{K(),$(),E.value=!1}},S(C(a)({v:e.proportionToRoot*100,s:`%`,r:j.value.labels.dataLabels.roundingPercentage}))+` `+S(k.value.translations.of)+` `+S(e.rootName),9,Yt)):p(``,!0),W.value&&W.value.id===e.id&&!H.value?(v(),m(`text`,{key:2,x:e.x1+6,y:e.y1+I.value.branchSize+72,"text-anchor":`start`,"font-size":j.value.labels.dataLabels.fontSize,fill:j.value.labels.color,onClick:i[10]||=()=>{K(),$(),E.value=!1}},S(C(a)({v:e.value/R.value*100,s:`%`,r:j.value.labels.dataLabels.roundingPercentage}))+` `+S(k.value.translations.proportionToTree),9,Xt)):p(``,!0)]))),256)),x(e.$slots,`svg`,{svg:{...I.value,isPrintingImg:C(sr)||C(cr)||C(Zr),isPrintingSvg:C(Qr)}},void 0,!0)],46,et)):p(``,!0)]),e.$slots.watermark?(v(),m(`div`,Zt,[x(e.$slots,`watermark`,Be(Le({isPrinting:C(sr)||C(cr)||C(Zr)||C(Qr)})),void 0,!0)])):p(``,!0),x(e.$slots,`legend`,{legend:z.value},void 0,!0),e.$slots.source?(v(),m(`div`,Qt,[x(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),qn.value&&k.value.userOptions.buttons.table?(v(),Me(He(Ur.value.component),Re({key:6},Ur.value.props,{ref_key:`tableUnit`,ref:Xn,onClose:Gr}),Ne({content:Ke(()=>[h(`div`,{ref_key:`tableContainer`,ref:mr,class:`vue-ui-chestnut-table`,style:_(`${k.value.table.useDialog?``:`max-height: 300px;margin-top:24px`}`)},[h(`div`,{style:_(`${k.value.table.useDialog?``:`padding-top:36px;`}position: relative`)},[k.value.table.useDialog?p(``,!0):(v(),m(`div`,{key:0,role:`button`,tabindex:`0`,style:_(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:${F.value?`pointer`:`default`}; background:${k.value.table.th.backgroundColor};`),onClick:Gr,onKeypress:qe(Gr,[`enter`])},[Fe(C(Bn),{name:`close`,stroke:k.value.table.th.color,"stroke-width":2},null,8,[`stroke`])],36)),h(`div`,{style:{width:`100%`},class:g({"vue-ui-responsive":C(Wr)})},[h(`table`,$t,[k.value.table.useDialog?p(``,!0):(v(),m(`caption`,{key:0,style:_({backgroundColor:k.value.table.th.backgroundColor,color:k.value.table.th.color,outline:k.value.table.th.outline}),class:`vue-ui-data-table__caption`},[Pe(S(N.value.title.text)+` `,1),N.value.title.subtitle.text?(v(),m(`span`,en,S(N.value.title.subtitle.text),1)):p(``,!0)],4)),h(`thead`,null,[h(`tr`,{role:`row`,style:_(`background:${k.value.table.th.backgroundColor};color:${k.value.table.th.color}`)},[(v(!0),m(d,null,b(Y.value.head,e=>(v(),m(`th`,{style:_(`outline:${k.value.table.th.outline}`)},S(e),5))),256))],4)]),h(`tbody`,null,[(v(!0),m(d,null,b(Y.value.body,(e,t)=>(v(),m(`tr`,{class:g({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":t%2==0,"vue-ui-data-table__tbody__row-odd":t%2!=0}),style:_(`background:${k.value.table.td.backgroundColor};color:${k.value.table.td.color}`)},[h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[0]},[h(`div`,nn,[Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?(v(),m(`span`,rn)):(v(),m(`span`,an,S(e.rootName),1))])],12,tn),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[1]},[h(`div`,sn,[Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?(v(),m(`span`,cn)):(v(),m(`span`,ln,S(e.rootValue.toFixed(k.value.table.td.roundingValue)),1))])],12,on),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[2]},[h(`div`,dn,[Y.value.body[t-1]&&Y.value.body[t-1].rootName===e.rootName?(v(),m(`span`,fn)):(v(),m(`span`,pn,S((e.rootToTotal*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1))])],12,un),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[3]},[h(`div`,hn,[Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?(v(),m(`span`,gn)):(v(),m(`span`,_n,S(e.branchName),1))])],12,mn),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[4]},[h(`div`,yn,[Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?(v(),m(`span`,bn)):(v(),m(`span`,xn,S(e.branchValue.toFixed(k.value.table.td.roundingValue)),1))])],12,vn),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[5]},[h(`div`,Cn,[Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?(v(),m(`span`,wn)):(v(),m(`span`,Tn,S((e.branchToRoot*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1))])],12,Sn),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[6]},[h(`div`,Dn,[Y.value.body[t-1]&&Y.value.body[t-1].branchName===e.branchName?(v(),m(`span`,On)):(v(),m(`span`,kn,S((e.branchToTotal*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1))])],12,En),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[7]},[h(`div`,jn,S(e.nutName),1)],12,An),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[8]},[h(`div`,Nn,S(e.nutValue.toFixed(k.value.table.td.roundingValue)),1)],12,Mn),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[9]},[h(`div`,Fn,S((e.nutToBranch*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1)],12,Pn),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[10]},[h(`div`,Ln,S((e.nutToRoot*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1)],12,In),h(`td`,{class:`vue-ui-data-table__tbody__td`,style:_(`outline:${k.value.table.td.outline}`),"data-cell":Y.value.head[11]},[h(`div`,zn,S((e.nutToTotal*100).toFixed(k.value.table.td.roundingPercentage))+`% `,1)],12,Rn)],6))),256))])])],2)],4)],4)]),_:2},[k.value.table.useDialog?{name:`title`,fn:Ke(()=>[Pe(S(Ur.value.title),1)]),key:`0`}:void 0,k.value.table.useDialog?{name:`actions`,fn:Ke(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[11]||=e=>Fr(k.value.userOptions.callbacks.csv)},[Fe(C(Bn),{name:`fileCsv`,stroke:Ur.value.props.color},null,8,[`stroke`])])]),key:`1`}:void 0]),1040)):p(``,!0),x(e.$slots,`skeleton`,{},()=>[C(er)?(v(),Me(he,{key:0})):p(``,!0)],!0)],46,Ye))}},[[`__scopeId`,`data-v-bbde84b6`]]);export{Je as n,Bn as t};
@@ -1,21 +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,Ht as s,S as c,X as ee,Y as l,at as te,i as ne,in as re,nt as ie,r as ae,sn as oe,t as se,w as ce,yt as le,zt as ue}from"./lib-rPeBMZrn.js";import{n as de,t as fe}from"./BaseScanner-8NdoBs7B.js";import{n as pe}from"./useHints-C-TwxM0Y.js";import{t as me}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as he}from"./resolveChartConfig-CIhClE5R.js";import{t as ge}from"./chartImage-DPGnEuYM.js";import{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"./Shape-CRe8woTu.js";import{c as Te}from"./canvas-lib-22VpOI4_.js";import{t as Ee}from"./useResponsive-CENUxfEL.js";import{t as De}from"./A11yDataTable-DWNlWXzs.js";import{t as Oe}from"./useUserOptionState-CXlFnwPv.js";import{t as ke}from"./useChartAccessibility-DOMuYJfm.js";import{t as Ae}from"./Legend-DM0ClX3D.js";import{t as je}from"./vue_ui_chord-Fq6VBRT1.js";import{Fragment as u,Teleport as Me,computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createElementVNode as h,createSlots as Ne,createTextVNode as Pe,createVNode as Fe,defineAsyncComponent as g,guardReactiveProps as Ie,mergeProps as Le,nextTick as Re,normalizeClass as _,normalizeProps as ze,normalizeStyle as v,onBeforeUnmount as Be,onMounted as Ve,openBlock as y,ref as b,renderList as x,renderSlot as S,resolveDynamicComponent as He,shallowRef as Ue,toDisplayString as C,toRefs as We,unref as w,useCssVars as Ge,watch as Ke,withCtx as T,withModifiers as qe}from"vue";var Je=/* @__PURE__ */ e({default:()=>Et}),Ye=[`id`],Xe=[`id`],Ze=[`id`],Qe=[`xmlns`,`viewBox`,`aria-describedby`],$e=[`width`,`height`],et={key:1},tt=[`id`,`d`],nt={key:2},rt=[`transform`],it=[`d`,`fill`,`stroke`,`stroke-width`,`onMouseenter`,`onMouseleave`,`onClick`],at=[`d`,`fill`,`stroke`,`stroke-width`],ot=[`d`,`fill`],st=[`d`,`fill`,`stroke`,`stroke-width`,`onMouseenter`,`onClick`,`onMouseleave`],ct=[`d`,`fill`,`stroke`,`stroke-width`],lt=[`d`,`fill`,`stroke`,`stroke-width`],ut=[`d`,`fill`,`stroke`,`stroke-width`],dt={key:0},ft=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],pt=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],mt=[`cx`,`cy`,`r`,`stroke`,`stroke-width`,`fill`],ht=[`transform`,`fill`,`text-anchor`,`font-size`,`font-weight`],gt={key:1},_t=[`font-size`,`font-weight`,`fill`],vt=[`href`],yt=[`transform`,`text-anchor`,`font-size`,`font-weight`,`fill`,`innerHTML`],bt={key:5,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},xt={key:6,class:`vue-data-ui-watermark`},St=[`id`],Ct=[`onClick`],wt={key:9,"data-dom-to-png-ignore":``,class:`reset-wrapper`},Tt={style:{"text-align":`right`,width:`100%`}},Et=/*#__PURE__*/ me({__name:`vue-ui-chord`,props:{dataset:{type:Object,default(){return{}}},config:{type:Object,default(){return{}}}},emits:[`selectLegend`,`selectGroup`,`selectRibbon`,`copyAlt`],setup(e,{expose:me,emit:Je}){Ge(e=>({v937160c2:e.slicerColor}));let Et=g(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Dt=g(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Ot=g(()=>import(`./DataTable-Dof6yhO7.js`)),kt=g(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),At=g(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),jt=g(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Mt=g(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),{vue_ui_chord:Nt}=i(),E=e,Pt=Je,D=b(!!E.dataset&&Object.hasOwn(E.dataset,`matrix`)),O=b(ee()),k=b(null),A=b(null),j=b(null),Ft=b(0),M=b(null),It=b(null),Lt=b(null),Rt=b(null),zt=b(null),Bt=b(0),Vt=b(0),Ht=b(0),Ut=b(!1),N=Ue(null),P=Ue(null),Wt=b(!1),Gt=b(null),Kt=b(null),F=b(`group`),I=b(null),qt=b(!1),L=b(an()),R=d(()=>L.value.style.chart.arcs),z=d(()=>L.value.style.chart.ribbons),B=d(()=>L.value.style.chart);pe({config:()=>L.value,dataset:()=>E.dataset,component:`VueUiChord`,rules:[{test:e=>e.matrix&&e.matrix.length>12,message:[`👀 The number of groups > 12, the chart might become hard to read. Consider:`,``,`▶️ Using broader groups to reduce their number.`]}]});let V=d(()=>L.value.userOptions.useCursorPointer),Jt=d(()=>re({defaultConfig:{useCssAnimation:!1,userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,legend:{backgroundColor:`transparent`},arcs:{stroke:`#6A6A6A`,labels:{show:!1}},ribbons:{stroke:`#6A6A6A`,underlayerOpacity:0,labels:{show:!1}}}}},userConfig:L.value.skeletonConfig??{}})),{loading:Yt,FINAL_DATASET:H,manualLoading:Xt}=de({...We(E),FINAL_CONFIG:L,prepareConfig:an,callback:()=>{Promise.resolve().then(async()=>{await Re(),W.value.showTable=L.value.table.show})},skeletonDataset:E.config?.skeletonDataset??{matrix:[[12e3,6e3,9e3,3e3],[2e3,1e4,2e3,6001],[8e3,1600,8e3,8001],[1e3,1e3,1e3,7001]],labels:[],colors:[`#DBDBDB`,`#C4C4C4`,`#ADADAD`,`#969696`]},skeletonConfig:re({defaultConfig:L.value,userConfig:Jt.value})}),{userOptionsVisible:Zt,setUserOptionsVisibility:Qt,keepUserOptionState:$t}=Oe({config:L.value}),{svgRef:U}=ke({config:B.value.title}),{isPrinting:en,isImaging:tn,generatePdf:nn,generateImage:rn}=Ce({elementId:`chord_${O.value}`,fileName:B.value.title.text||`vue-ui-chord`,options:L.value.userOptions.print}),W=b({showTable:L.value.table.show});function an(){return he(E.config,Nt,je)}Ke(()=>E.config,e=>{Yt.value||(L.value=an()),Zt.value=!L.value.userOptions.showOnChartHover,sn(),Bt.value+=1,Vt.value+=1,Ht.value+=1,X.value=L.value.initialRotation,W.value.showTable=L.value.table.show},{deep:!0});let G=d(()=>L.value.debug);Ke(()=>E.dataset,()=>{on(),sn(),Bt.value+=1,Vt.value+=1,Ht.value+=1});function on(){if(ue(E.dataset)){te({componentName:`VueUiChord`,type:`dataset`,debug:G.value}),D.value=!1,Xt.value=!0;return}let e=le({datasetObject:E.dataset,requiredAttributes:[`matrix`]});if(e.length){G.value&&e.forEach(e=>{te({componentName:`VueUiChord`,type:`datasetAttribute`,property:e})}),D.value=!1,Xt.value=!0;return}let t=E.dataset.matrix;if(!Array.isArray(t)||t.length<2){G.value&&console.warn(`VueUiChord: dataset.matrix requires a minimum of 2 datapoints, for example:
2
-
3
- matrix:[
4
- [1, 1],
5
- [1, 1]
6
- ]`),D.value=!1,Xt.value=!0;return}let n=t.length,r=t.findIndex(e=>!Array.isArray(e)||e.length!==n);r===-1?(D.value=!0,Xt.value=!1):(G.value&&console.warn(`VueUiChord - Invalid matrix: dataset.matrix at index ${r} has ${Array.isArray(t[r])?t[r].length:`NaN`} elements instead of the required ${n}
7
-
8
- dataset.matrix[${r}] = [${Array.isArray(t[r])?t[r].toString():`invalid`}]`),D.value=!1,Xt.value=!0)}function sn(){if(on(),L.value.responsive){let e=Te(()=>{let{width:e,height:t,heightNoTitle:n,heightSource:r,heightTitle:i,heightLegend:a}=Ee({chart:M.value,title:B.value.title.text?It.value:null,legend:B.value.legend.show?Lt.value:null,source:Rt.value,noTitle:zt.value}),o=i+a+r+n;e<t?M.value.style.width=`100%`:(M.value.style.height=`100%`,U.value.style.height=`calc(100% - ${o}px)`)},100);N.value&&(P.value&&N.value.unobserve(P.value),N.value.disconnect()),N.value=new ResizeObserver(e),P.value=M.value.parentNode,N.value.observe(P.value),e()}ln.value=setTimeout(()=>{Ut.value=!0},500)}function cn(){!H.value||!Object.hasOwn(H.value,`matrix`)||H.value.matrix.length<2?(G.value&&console.warn(`VueUiChord: dataset.matrix requires a minimum of 2 datapoints, for example:
9
-
10
- matrix:[
11
- [1, 1],
12
- [1, 1]
13
- ]`),D.value=!1):H.value.matrix.forEach((e,t)=>{e.length!==H.value.matrix.length&&(G.value&&console.warn(`VueUiChord - Invalid matrix: dataset.matrix at index ${t} has ${e.length} elements instead of the required ${H.value.matrix.length}\n\ndataset.matrix[${t}] = [${e.toString()}] has a length of ${e.length} but should have the same length as the matrix itself (${H.value.matrix.length})`),D.value=!1)})}let ln=b(null);Ve(()=>{Wt.value=!0,sn()});let K=b({height:600,width:600}),un=d(()=>L.value.userOptions.show&&!B.value.title.text),dn=d(()=>ce(L.value.customPalette)),q=d(()=>({inner:K.value.width*.3*R.value.innerRadiusRatio,outer:K.value.width*.34*R.value.outerRadiusRatio})),fn=d(()=>R.value.padAngle/100),J=d(()=>({matrix:H.value.matrix??[[0]],labels:H.value.labels??[``],colors:H.value.colors&&Array.isArray(H.value.colors)&&H.value.colors.length?H.value.colors.map(e=>c(e)):H.value.matrix.map((e,t)=>dn.value[t]||s[t]||s[t%s.length])}));function pn(e,t){let n=e.length,r=q.value.inner,i=Array(n).fill(0),a=0;for(let t=0;t<n;t+=1)for(let r=0;r<n;r+=1)i[t]+=e[t][r],a+=e[t][r];let o=(2*Math.PI-t*n)/a,s=[],c=0;for(let e=0;e<n;e+=1){let n=c,r=n+i[e]*o;s.push({index:e,pattern:`pattern_${O.value}_${e}`,startAngle:n,endAngle:r,name:J.value.labels[e],id:ee(),color:J.value.colors[e],proportion:i[e]/a}),c=r+t}let l=[];for(let t=0;t<n;t+=1){let n=e[t].map((e,t)=>({j:t,v:e}));n.sort((e,t)=>t.v-e.v);let i=s[t].startAngle;for(let{j:e,v:a}of n){let n=i,c=n+a*o;l.push({index:t,subIndex:e,pattern:`pattern_${O.value}_${t}`,startAngle:n,endAngle:c,value:a,groupName:J.value.labels[t],groupId:s[t].id,groupColor:J.value.colors[t],midAngle:(n+c)/2,midBaseX:Math.cos((n+c)/2-Math.PI/2)*r,midBaseY:Math.sin((n+c)/2-Math.PI/2)*r}),i=c}}let te=[];for(let e of l){let t=l.find(t=>t.index===e.subIndex&&t.subIndex===e.index);te.push({source:e,target:t,id:ee()})}return{groups:s,chords:te}}let Y=d(()=>{let e=pn(J.value.matrix,fn.value);return cn(),e.chords.sort((e,t)=>Math.max(t.source.value,t.target.value)-Math.max(e.source.value,e.target.value)),e}),mn=d(()=>{let e=q.value.outer+z.value.labels.offset+12,t=z.value.labels.fontSize*.6,n=[];if(A.value){let r=A.value;if(r.source.value){let i=String(r.source.value);n.push({id:r.id+`-src`,theta:r.source.midAngle,w:i.length*t/e,midBaseX:r.source.midBaseX,midBaseY:r.source.midBaseY,groupColor:r.source.groupColor,value:r.source.value})}if(r.target&&r.target.value&&r.target.value!==r.source.value){let i=String(r.target.value);n.push({id:r.id+`-tgt`,theta:r.target.midAngle,w:i.length*t/e,midBaseX:r.target.midBaseX,midBaseY:r.target.midBaseY,groupColor:r.target.groupColor,value:r.target.value})}return n}function r(r){Y.value.chords.filter(e=>e.source.groupId===r&&e.source.value).forEach(r=>{{let i=String(r.source.value);n.push({id:r.id+`-src`,theta:r.source.midAngle,w:i.length*t/e,midBaseX:r.source.midBaseX,midBaseY:r.source.midBaseY,groupColor:r.source.groupColor,value:r.source.value})}if(r.target&&r.target.value&&r.target.value!==r.source.value){let i=String(r.target.value);n.push({id:r.id+`-tgt`,theta:r.target.midAngle,w:i.length*t/e,midBaseX:r.target.midBaseX,midBaseY:r.target.midBaseY,groupColor:r.target.groupColor,value:r.target.value})}})}return j.value&&r(j.value),k.value&&r(k.value.id),n}),hn=d(()=>{let e=mn.value.map(e=>({...e})).sort((e,t)=>e.theta-t.theta),t=z.value.labels.minSeparationDeg*Math.PI/180,n=!0,r=0;for(;n&&r++<10;){n=!1;for(let r=1;r<e.length;r+=1){let i=e[r-1],a=e[r],o=i.theta+i.w+t;a.theta<o&&(a.theta=o,n=!0)}let r=e[0],i=e[e.length-1],a=i.theta+i.w+t-2*Math.PI;r.theta<a&&(r.theta=a,n=!0)}return e});function gn(e,t,n,r){let i=e-Math.PI/2,a=t-Math.PI/2,o=Math.cos(i)*n,s=Math.sin(i)*n,c=Math.cos(a)*n,ee=Math.sin(a)*n,l=Math.cos(a)*r,te=Math.sin(a)*r,ne=Math.cos(i)*r,re=Math.sin(i)*r,ie=+(t-e>Math.PI);return`M${o},${s} A${n},${n} 0 ${ie} 1 ${c},${ee} L${l},${te} A${r},${r} 0 ${ie} 0 ${ne},${re} Z`}function _n(e,t){let n=q.value.inner,r=e.startAngle-Math.PI/2,i=e.endAngle-Math.PI/2,a=t.startAngle-Math.PI/2,o=t.endAngle-Math.PI/2,s=Math.cos(r)*n,c=Math.sin(r)*n,ee=Math.cos(i)*n,l=Math.sin(i)*n,te=Math.cos(a)*n,ne=Math.sin(a)*n,re=Math.cos(o)*n,ie=Math.sin(o)*n;return`M${s},${c}A${n},${n} 0 ${+(e.endAngle-e.startAngle>Math.PI)} 1 ${ee},${l}Q0,0 ${te},${ne}A${n},${n} 0 ${+(t.endAngle-t.startAngle>Math.PI)} 1 ${re},${ie}Q0,0 ${s},${c}Z`}let vn=d(()=>X.value*Math.PI/180);function yn(e){return(e.startAngle+e.endAngle)/2}function bn(e){return((yn(e)+vn.value)%(2*Math.PI)+2*Math.PI)%(2*Math.PI)}function xn(e){let t=e+vn.value;return t=(t%(2*Math.PI)+2*Math.PI)%(2*Math.PI),t>Math.PI?`end`:`start`}function Sn(e){let t=e-Math.PI/2;return`translate(${Math.cos(t)*(q.value.outer+R.value.labels.offset+24)},${Math.sin(t)*(q.value.outer+R.value.labels.offset+24)})`}function Cn(e,t,n){let r=e-Math.PI/2,i=t-Math.PI/2,a=Math.cos(r)*n,o=Math.sin(r)*n,s=Math.cos(i)*n,c=Math.sin(i)*n;return`M${a},${o} A${n},${n} 0 ${+(t-e>Math.PI)} 1 ${s},${c}`}let X=b(L.value.initialRotation),wn=b(!1),Tn=0,En=0;function Dn(e){let t=U.value.getBoundingClientRect(),n=t.left+t.width/2,r=t.top+t.height/2,i=e.clientX??e.touches[0].clientX,a=e.clientY??e.touches[0].clientY;return Math.atan2(a-r,i-n)}function On(e){L.value.enableRotation&&!Hn.value&&(e.preventDefault(),wn.value=!0,Tn=X.value,En=Dn(e))}function kn(e){if(!wn.value)return;let t=Dn(e);X.value=Tn+(t-En)*180/Math.PI}function An(){wn.value=!1}function jn(e){return ne(z.value.labels.formatter,e,a({p:z.value.labels.prefix,v:e,s:z.value.labels.suffix,r:z.value.labels.rounding}))}Ve(()=>{window.addEventListener(`mousemove`,kn),window.addEventListener(`mouseup`,An),window.addEventListener(`touchmove`,kn,{passive:!1}),window.addEventListener(`touchend`,An)}),Be(()=>{window.removeEventListener(`mousemove`,kn),window.removeEventListener(`mouseup`,An),window.removeEventListener(`touchmove`,kn),window.removeEventListener(`touchend`,An),clearTimeout(ln.value),N.value&&(P.value&&N.value.unobserve(P.value),N.value.disconnect())});let Mn=b(!1);function Nn(e){Mn.value=e,Ft.value+=1}function Pn(e,t){L.value.events.datapointEnter&&L.value.events.datapointEnter({datapoint:e,seriesIndex:t}),!j.value&&(k.value=e)}function Fn(e,t){k.value=null,L.value.events.datapointLeave&&L.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function In(e,t){Pt(`selectGroup`,e),L.value.events.datapointClick&&L.value.events.datapointClick({datapoint:e,seriesIndex:t})}function Ln(e,t){L.value.events.datapointEnter&&L.value.events.datapointEnter({datapoint:e,seriesIndex:t}),!j.value&&(A.value=e)}function Rn(e,t){A.value=null,L.value.events.datapointLeave&&L.value.events.datapointLeave({datapoint:e,seriesIndex:t})}function zn(e,t){Pt(`selectRibbon`,e),L.value.events.datapointClick&&L.value.events.datapointClick({datapoint:e,seriesIndex:t})}function Bn(e){return!j.value&&!k.value&&!A.value?.8:(j.value?j.value===e.source.groupId:k.value?k.value.id===e.source.groupId:A.value?.id===e.id)?1:.1}function Vn(e){return!j.value&&!k.value&&!A.value||(j.value?j.value===e.id:k.value?k.value.id===e.id:[A.value?.source.groupId,A.value?.target.groupId].includes(e.id))?1:.3}let Hn=b(!1);function Un(){Hn.value=!Hn.value}function Wn(){W.value.showTable=!W.value.showTable}function Gn(){return Y.value}let Z=b(null);function Kn(){let e=L.value.initialRotation;Z.value!==null&&cancelAnimationFrame(Z.value);let t=()=>{X.value+=(e-X.value)*.05,Math.abs(X.value-e)<.1?(X.value=e,Z.value=null):Z.value=requestAnimationFrame(t)};Z.value=requestAnimationFrame(t)}Be(()=>{Z.value!==null&&cancelAnimationFrame(Z.value)});function qn(e){e===j.value?(j.value=null,Pt(`selectLegend`,null)):(j.value=e,Pt(`selectLegend`,Y.value.groups.find(t=>t.id===e)))}let Jn=d(()=>Y.value.groups.map((e,t)=>({name:e.name,color:e.color,shape:`circle`,patternIndex:t,pattern:`pattern_${O.value}_${t}`,id:e.id,select:()=>qn(e.id),opacity:j.value?j.value===e.id?1:.3:1}))),Yn=d(()=>({cy:`chord-div-legend`,backgroundColor:B.value.legend.backgroundColor,color:B.value.legend.color,fontSize:B.value.legend.fontSize,paddingBottom:12,fontWeight:B.value.legend.bold?`bold`:``})),Q=d(()=>({head:Y.value.groups.map((e,t)=>({name:e.name||t,color:e.color})),body:J.value.matrix})),Xn=d(()=>{let e=[{name:``,color:null},...Q.value.head];return{colNames:e,head:e,body:Q.value.body.map((e,t)=>[Q.value.head[t],...Q.value.body[t]]),config:{th:{backgroundColor:L.value.table.th.backgroundColor,color:L.value.table.th.color,outline:L.value.table.th.outline},td:{backgroundColor:L.value.table.td.backgroundColor,color:L.value.table.td.color,outline:L.value.table.td.outline},breakpoint:L.value.table.responsiveBreakpoint}}});function Zn(e=null){Re(()=>{let t=J.value.matrix.map((e,t)=>[[J.value.labels[t]||t],e]),n=[[B.value.title.text],[B.value.title.subtitle.text],[[``],...J.value.labels.map((e,t)=>[e||t])]].concat(t),r=o(n);e?e(r):ie({csvContent:r,title:B.value.title.text||`vue-ui-chord`})})}let Qn=ge(M,()=>B.value.title.text);function $n(e,t){return`${J.value.labels[t]}${R.value.labels.showPercentage?a({p:` (`,v:isNaN(e.proportion)?0:e.proportion*100,s:`%)`,r:R.value.labels.roundingPercentage}):``}`}let er=d(()=>be({config:L,style:B,mutableConfig:W,dialog:Mt,accordion:Et,isFullscreen:Mn,parent:M,maxWidth:800,isCursorPointer:V}));Ke(()=>W.value.showTable,e=>ye(e,L,Gt));function tr(){W.value.showTable=!1,Kt.value&&Kt.value.setTableIconState(!1)}let nr=d(()=>B.value.backgroundColor),rr=d(()=>B.value.legend),ir=d(()=>B.value.title),{isCallbackImaging:ar,isCallbackSvg:or,generateSvg:sr,onGenerateImage:cr}=ve({svg:U,title:ir,legend:rr,legendItems:Jn,backgroundColor:nr,getSvgCallback:()=>L.value.userOptions.callbacks.svg,generateImage:rn});async function lr(){Pt(`copyAlt`,{config:L.value,dataset:J.value}),L.value.userOptions.callbacks.altCopy?await Promise.resolve(L.value.userOptions.callbacks.altCopy({config:L.value,dataset:J.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}let ur=d(()=>(k.value?Y.value.chords.filter(e=>e.source.groupId===k.value.id):j.value?Y.value.chords.filter(e=>e.source.groupId===j.value):Y.value.chords).filter(e=>e.source.value)),$=d(()=>({groups:Y.value.groups.map((e,t)=>({type:`group`,index:t,item:e})),ribbons:ur.value.map((e,t)=>({type:`ribbon`,index:t,item:{...e,path:_n(e.source,e.target),color:J.value.colors[e.source.index]}}))})),dr=d(()=>({headers:[``,...Q.value.head.map(e=>e.name)],rows:Q.value.body.map((e,t)=>[Q.value.head[t]?.name??`${t}`,...e.map(e=>jn(e))])}));function fr(e){let t=$.value.groups[e];t&&(F.value=`group`,I.value=e,A.value=null,k.value=t.item)}function pr(e){let t=$.value.ribbons[e];t&&(F.value=`ribbon`,I.value=e,k.value=null,A.value=t.item)}function mr(){I.value=null,F.value=`group`,k.value=null,A.value=null}function hr(){qt.value=!0,F.value=`group`,I.value=null}function gr(){qt.value=!1,mr()}function _r(e){if(!U.value||Hn.value||document.activeElement!==U.value)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){mr();return}if(r){F.value=`group`,$.value.groups.length&&fr(I.value===null?0:Math.min(I.value,$.value.groups.length-1));return}if(i){if(!$.value.ribbons.length)return;F.value=`ribbon`,pr(I.value===null?0:Math.min(I.value,$.value.ribbons.length-1));return}if(a){if(F.value===`group`){let e=$.value.groups[I.value];e&&In(e.item,e.index)}else{let e=$.value.ribbons[I.value];e&&zn(e.item,e.index)}return}let s=F.value===`group`?$.value.groups:$.value.ribbons;if(!s.length)return;let c=I.value;c===null||c<0||c>=s.length?c=n?0:s.length-1:n?(c+=1,c>=s.length&&(c=0)):t&&(--c,c<0&&(c=s.length-1)),F.value===`group`?fr(c):pr(c)}return me({getData:Gn,getImage:Qn,generateCsv:Zn,generateImage:rn,generateSvg:sr,generatePdf:nn,toggleAnnotator:Un,toggleTable:Wn,toggleFullscreen:Nn,copyAlt:lr}),(e,i)=>(y(),m(`div`,{ref_key:`chordChart`,ref:M,class:_({"vue-data-ui-component":!0,"vue-ui-chord":!0,"vue-data-ui-wrapper-fullscreen":Mn.value,"vue-data-ui-responsive":L.value.responsive}),style:v(`font-family:${L.value.style.fontFamily};width:100%; text-align:center;background:${B.value.backgroundColor}`),id:`chord_${O.value}`,onMouseenter:i[2]||=()=>w(Qt)(!0),onMouseleave:i[3]||=()=>w(Qt)(!1)},[h(`div`,{id:`chart-instructions-${O.value}`,class:`sr-only`},[h(`p`,null,C(L.value.a11y.translations.keyboardNavigation),1)],8,Xe),dr.value?.rows?.length?(y(),f(De,{key:0,uid:O.value,head:dr.value.headers,body:dr.value.rows,notice:L.value.a11y.translations.tableAvailable,caption:L.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):p(``,!0),L.value.userOptions.buttons.annotator&&w(U)?(y(),f(w(At),Le({key:1},w(n)(L.value.userOptions.annotator),{color:B.value.color,backgroundColor:B.value.backgroundColor,active:Hn.value,svgRef:w(U),isCursorPointer:V.value,palette:L.value.userOptions.annotatorPalette,onClose:Un}),Ne({_:2},[x(w(r),n=>({name:n,fn:T(r=>[S(e.$slots,n,ze(Ie(w(t)(n,r))),void 0,!0)])}))]),1040,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`,`palette`])):p(``,!0),S(e.$slots,`userConfig`,{},void 0,!0),un.value?(y(),m(`div`,{key:2,ref_key:`noTitle`,ref:zt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):p(``,!0),B.value.title.text?(y(),m(`div`,{key:3,ref_key:`chartTitle`,ref:It,style:`width:100%;background:transparent;padding-bottom:24px`},[(y(),f(_e,{key:`title_${Bt.value}`,config:{title:{cy:`chord-div-title`,...B.value.title},subtitle:{cy:`chord-div-subtitle`,...B.value.title.subtitle}}},null,8,[`config`]))],512)):p(``,!0),h(`div`,{id:`legend-top-${O.value}`},null,8,Ze),L.value.userOptions.show&&D.value&&(w($t)||w(Zt))?(y(),f(w(jt),{ref_key:`userOptionsRef`,ref:Kt,key:`user_option_${Ft.value}`,backgroundColor:B.value.backgroundColor,color:B.value.color,isPrinting:w(en),isImaging:w(tn),uid:O.value,hasTooltip:!1,hasPdf:L.value.userOptions.buttons.pdf,hasImg:L.value.userOptions.buttons.img,hasSvg:L.value.userOptions.buttons.svg,hasXls:L.value.userOptions.buttons.csv,hasTable:L.value.userOptions.buttons.table,hasLabel:!1,hasFullscreen:L.value.userOptions.buttons.fullscreen,hasAltCopy:L.value.userOptions.buttons.altCopy,isFullscreen:Mn.value,chartElement:M.value,position:L.value.userOptions.position,titles:{...L.value.userOptions.buttonTitles},hasAnnotator:L.value.userOptions.buttons.annotator,isAnnotation:Hn.value,callbacks:L.value.userOptions.callbacks,printScale:L.value.userOptions.print.scale,tableDialog:L.value.table.useDialog,isCursorPointer:V.value,onToggleFullscreen:Nn,onGeneratePdf:w(nn),onGenerateCsv:Zn,onGenerateImage:w(cr),onGenerateSvg:w(sr),onToggleTable:Wn,onToggleAnnotator:Un,onCopyAlt:lr,style:v({visibility:w($t)?w(Zt)?`visible`:`hidden`:`visible`})},Ne({_:2},[x(w(xe)(e.$slots,`menuIcon optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:T(n=>[S(e.$slots,t,ze(Ie(w(Se)(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(`.`))):p(``,!0),(y(),m(`svg`,{xmlns:w(se),ref_key:`svgRef`,ref:U,viewBox:`0 0 ${K.value.width} ${K.value.height}`,"aria-describedby":`chart-instructions-${O.value}`,tabindex:`0`,preserveAspectRatio:`xMidYMid meet`,style:{overflow:`visible`},class:_({"vue-ui-chord-rotating":wn.value,"vue-ui-chord-idle":!wn.value}),onMousedown:qe(On,[`prevent`]),onTouchstart:qe(On,[`prevent`]),onFocus:hr,onBlur:gr,onKeydown:_r},[Fe(w(kt)),S(e.$slots,`svg-underlayer`,{svg:{height:600,width:600,isPrintingImg:w(en)||w(tn)||w(ar),isPrintingSvg:w(or)}},void 0,!0),e.$slots[`chart-background`]?(y(),m(`foreignObject`,{key:0,x:0,y:0,width:K.value.width<=0?10:K.value.width,height:K.value.height<=0?10:K.value.height,style:{pointerEvents:`none`}},[S(e.$slots,`chart-background`,{},void 0,!0)],8,$e)):p(``,!0),R.value.labels.curved?(y(),m(`defs`,et,[(y(!0),m(u,null,x(Y.value.groups,(e,t)=>(y(),m(`path`,{key:`labelPath-${t}`,id:`labelPath-${t}_${O.value}`,d:Cn(e.startAngle,e.endAngle,(q.value.inner+q.value.outer)/2+R.value.labels.offset),fill:`none`},null,8,tt))),128))])):p(``,!0),e.$slots.pattern?(y(),m(`g`,nt,[(y(!0),m(u,null,x(Y.value.groups,(t,n)=>(y(),m(`defs`,null,[S(e.$slots,`pattern`,Le({ref_for:!0},{seriesIndex:t.index,patternId:`pattern_${O.value}_${n}`}),void 0,!0)]))),256))])):p(``,!0),h(`g`,{transform:`translate(${K.value.width/2}, ${K.value.height/2}) rotate(${X.value})`},[(y(!0),m(u,null,x(Y.value.groups,(t,n)=>(y(),m(`g`,null,[(y(),m(`path`,{class:_({"vue-ui-chord-arc":!0,"vue-ui-chord-arc-animated":L.value.useCssAnimation&&!Ut.value}),key:`arc-${n}`,d:gn(t.startAngle,t.endAngle,q.value.outer,q.value.inner),fill:J.value.colors[n],stroke:R.value.stroke,"stroke-width":R.value.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:v({opacity:Vn(t)}),onMouseenter:e=>Pn(t,n),onMouseleave:e=>Fn(t,n),onClick:e=>In(t,n)},null,46,it)),e.$slots.pattern?(y(),m(`path`,{class:_({"vue-ui-chord-arc":!0,"vue-ui-chord-arc-animated":L.value.useCssAnimation&&!Ut.value}),key:`arc-${n}`,d:gn(t.startAngle,t.endAngle,q.value.outer,q.value.inner),fill:`url(#${t.pattern})`,stroke:R.value.stroke,"stroke-width":R.value.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:v({opacity:Vn(t),pointerEvents:`none`})},null,14,at)):p(``,!0)]))),256)),h(`g`,null,[(y(!0),m(u,null,x(k.value?Y.value.chords.filter(e=>e.source.groupId===k.value.id):j.value?Y.value.chords.filter(e=>e.source.groupId===j.value):Y.value.chords,(t,n)=>(y(),m(u,{key:`ribbon-${t.id}`},[t.source.value?(y(),m(`path`,{key:0,class:_({"vue-ui-chord-ribbon":!0}),d:_n(t.source,t.target),fill:B.value.backgroundColor,style:v({opacity:z.value.underlayerOpacity})},null,12,ot)):p(``,!0),t.source.value?(y(),m(`path`,{key:1,class:_({"vue-ui-chord-ribbon":!0}),d:_n(t.source,t.target),fill:J.value.colors[t.source.index],stroke:z.value.stroke,"stroke-width":z.value.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:v({opacity:Bn(t)}),onMouseenter:e=>Ln({...t,path:_n(t.source,t.target),color:J.value.colors[t.source.index]},n),onClick:e=>zn({...t,color:J.value.colors[t.source.index]},n),onMouseleave:e=>Rn({...t,color:J.value.colors[t.source.index]},n)},null,44,st)):p(``,!0),t.source.value&&e.$slots.pattern?(y(),m(`path`,{key:2,class:_({"vue-ui-chord-ribbon":!0}),d:_n(t.source,t.target),fill:`url(#pattern_${O.value}_${t.source.index})`,stroke:z.value.stroke,"stroke-width":z.value.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,style:v({opacity:Bn(t),pointerEvents:`none`})},null,12,ct)):p(``,!0)],64))),128)),A.value?(y(),m(`path`,{key:0,d:A.value.path,fill:A.value.color,stroke:z.value.stroke,"stroke-width":z.value.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:_({"vue-ui-chord-ribbon":!0}),style:{pointerEvents:`none`}},null,8,lt)):p(``,!0),A.value&&e.$slots.pattern?(y(),m(`path`,{key:1,d:A.value.path,fill:`url(#${A.value.source.pattern})`,stroke:z.value.stroke,"stroke-width":z.value.strokeWidth,"stroke-linecap":`round`,"stroke-linejoin":`round`,class:_({"vue-ui-chord-ribbon":!0}),style:{pointerEvents:`none`}},null,8,ut)):p(``,!0)]),(k.value||A.value||j.value)&&z.value.labels.show?(y(),m(`g`,dt,[(y(!0),m(u,null,x(hn.value,e=>(y(),m(u,{key:e.id},[h(`line`,{x1:e.midBaseX,y1:e.midBaseY,x2:Math.cos(e.theta-Math.PI/2)*(q.value.outer+z.value.labels.offset+12),y2:Math.sin(e.theta-Math.PI/2)*(q.value.outer+z.value.labels.offset+12),stroke:B.value.backgroundColor,"stroke-width":z.value.labels.connector.strokeWidth*3,"pointer-events":`none`},null,8,ft),h(`line`,{x1:e.midBaseX,y1:e.midBaseY,x2:Math.cos(e.theta-Math.PI/2)*(q.value.outer+z.value.labels.offset+12),y2:Math.sin(e.theta-Math.PI/2)*(q.value.outer+z.value.labels.offset+12),stroke:z.value.labels.connector.stroke,"stroke-width":z.value.labels.connector.strokeWidth,"pointer-events":`none`},null,8,pt),z.value.labels.marker.show?(y(),m(`circle`,{key:0,cx:Math.cos(e.theta-Math.PI/2)*(q.value.outer+z.value.labels.offset+12),cy:Math.sin(e.theta-Math.PI/2)*(q.value.outer+z.value.labels.offset+12),r:z.value.labels.marker.radius,stroke:z.value.labels.marker.stroke,"stroke-width":z.value.labels.marker.strokeWidth,fill:e.groupColor,"pointer-events":`none`},null,8,mt)):p(``,!0),h(`text`,{transform:`
14
- translate(
15
- ${Math.cos(e.theta-Math.PI/2)*(q.value.outer+z.value.labels.offset+24)},
16
- ${Math.sin(e.theta-Math.PI/2)*(q.value.outer+z.value.labels.offset+24)}
17
- ) rotate(${-X.value})
18
- `,fill:z.value.labels.useSerieColor?e.groupColor:z.value.labels.color,"text-anchor":xn(e.theta),"font-size":z.value.labels.fontSize,"font-weight":z.value.labels.bold?`bold`:`normal`,dy:`.35em`,"pointer-events":`none`},C(jn(e.value)),9,ht)],64))),128))])):p(``,!0),R.value.labels.show?(y(),m(`g`,gt,[R.value.labels.curved?(y(!0),m(u,{key:0},x(Y.value.groups,(e,t)=>(y(),m(`text`,{class:`vue-ui-chord-label-curved`,key:`curved-label-${t}`,"font-size":R.value.labels.fontSize,"font-weight":R.value.labels.bold?`bold`:`normal`,fill:R.value.labels.adaptColorToBackground?w(ae)(J.value.colors[t]):R.value.labels.color},[h(`textPath`,{href:`#labelPath-${t}_${O.value}`,startOffset:`50%`,"text-anchor":`middle`},C(J.value.labels[t])+C(R.value.labels.showPercentage?w(a)({p:` (`,v:isNaN(e.proportion)?0:e.proportion*100,s:`%)`,r:R.value.labels.roundingPercentage}):``),9,vt)],8,_t))),128)):!k.value&&!A.value&&!j.value?(y(!0),m(u,{key:1},x(Y.value.groups,(e,t)=>(y(),m(`text`,{class:`vue-ui-chord-label-straight`,key:`label-${t}`,transform:`
19
- ${Sn((e.startAngle+e.endAngle)/2)}
20
- rotate(${-X.value})
21
- `,dy:`.35em`,"text-anchor":bn(e)>Math.PI?`end`:`start`,"font-size":R.value.labels.fontSize,"font-weight":R.value.labels.bold?`bold`:`normal`,fill:R.value.labels.color,innerHTML:w(l)({content:w(oe)($n(e,t)),fontSize:R.value.labels.fontSize,fill:R.value.labels.color,x:0,y:0})},null,8,yt))),128)):p(``,!0)])):p(``,!0)],8,rt),S(e.$slots,`svg`,{svg:{height:600,width:600,isPrintingImg:w(en)||w(tn)||w(ar),isPrintingSvg:w(or)}},void 0,!0)],42,Qe)),e.$slots.hint?(y(),m(`div`,bt,[S(e.$slots,`hint`,ze(Ie({hint:L.value.a11y.translations.keyboardNavigation,isVisible:qt.value})),void 0,!0)])):p(``,!0),e.$slots.watermark?(y(),m(`div`,xt,[S(e.$slots,`watermark`,ze(Ie({isPrinting:w(en)||w(tn)||w(ar)||w(or)})),void 0,!0)])):p(``,!0),h(`div`,{id:`legend-bottom-${O.value}`},null,8,St),Wt.value&&(B.value.legend.show||e.$slots.legend)?(y(),f(Me,{key:7,to:B.value.legend.position===`top`?`#legend-top-${O.value}`:`#legend-bottom-${O.value}`},[h(`div`,{ref_key:`chartLegend`,ref:Lt},[S(e.$slots,`legend`,{legend:Jn.value},()=>[B.value.legend.show?(y(),f(Ae,{key:`legend_${Ht.value}`,legendSet:Jn.value,config:Yn.value,isCursorPointer:V.value,onClickMarker:i[0]||=({legend:e})=>qn(e.id)},Ne({item:T(({legend:e})=>[h(`div`,{style:v({opacity:j.value?j.value===e.id?1:.3:1}),onClick:t=>e.select()},C(e.name),13,Ct)]),_:2},[e.$slots.pattern?{name:`legend-pattern`,fn:T(({legend:e,index:t})=>[Fe(we,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${O.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):p(``,!0)],!0)],512)],8,[`to`])):p(``,!0),e.$slots.source?(y(),m(`div`,{key:8,ref_key:`source`,ref:Rt,dir:`auto`},[S(e.$slots,`source`,{},void 0,!0)],512)):p(``,!0),X.value===L.value.initialRotation?p(``,!0):(y(),m(`div`,wt,[S(e.$slots,`reset-action`,{reset:Kn},()=>[h(`button`,{"data-cy-reset":``,tabindex:`0`,role:`button`,class:`vue-data-ui-refresh-button`,style:v({background:B.value.backgroundColor,cursor:V.value?`pointer`:`default`}),onClick:Kn},[Fe(w(Dt),{name:`refresh`,stroke:B.value.color},null,8,[`stroke`])],4)],!0)])),D.value&&L.value.userOptions.buttons.table?(y(),f(He(er.value.component),Le({key:10},er.value.props,{ref_key:`tableUnit`,ref:Gt,onClose:tr}),Ne({content:T(()=>[(y(),f(w(Ot),{key:`table_${Vt.value}`,colNames:Xn.value.colNames,head:Xn.value.head,body:Xn.value.body,config:Xn.value.config,title:L.value.table.useDialog?``:er.value.title,withCloseButton:!L.value.table.useDialog,isCursorPointer:V.value,onClose:tr},{th:T(({th:e})=>[Pe(C(e.name),1)]),td:T(({td:e})=>[h(`div`,Tt,C(e.name?e.name:jn(e)),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[L.value.table.useDialog?{name:`title`,fn:T(()=>[Pe(C(er.value.title),1)]),key:`0`}:void 0,L.value.table.useDialog?{name:`actions`,fn:T(()=>[h(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[1]||=e=>Zn(L.value.userOptions.callbacks.csv),style:v({cursor:V.value?`pointer`:`default`})},[Fe(w(Dt),{name:`fileCsv`,stroke:er.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):p(``,!0),S(e.$slots,`skeleton`,{},()=>[w(Yt)?(y(),f(fe,{key:0})):p(``,!0)],!0)],46,Ye))}},[[`__scopeId`,`data-v-1e2198ea`]]);export{Je as n,Et as t};
@@ -1,13 +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,Ft as c,Ht as l,Q as u,S as d,X as f,Zt as p,at as m,i as ee,in as h,nn as g,nt as te,q as ne,r as re,t as ie,tn as ae,w as oe,zt as se}from"./lib-rPeBMZrn.js";import{n as ce,t as le}from"./BaseScanner-8NdoBs7B.js";import{n as ue,t as de}from"./useHints-C-TwxM0Y.js";import{t as fe}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as pe}from"./resolveChartConfig-CIhClE5R.js";import{t as me}from"./chartImage-DPGnEuYM.js";import{n as he}from"./Title-BliHuXfT.js";import{t as ge}from"./useChartExport-BZts4KFb.js";import{t as _e}from"./tableIntegration-CNoJ1CIY.js";import{n as ve,t as ye}from"./userOptionsSlots-DYuo-E5m.js";import{t as be}from"./usePrinter-DVf3YcG5.js";import{t as xe}from"./useTransitions-ChGGrtrv.js";import{c as Se}from"./canvas-lib-22VpOI4_.js";import{t as Ce}from"./useResponsive-CENUxfEL.js";import{t as we}from"./DefGrad-DKMq1REY.js";import{t as Te}from"./A11yDataTable-DWNlWXzs.js";import{t as Ee}from"./useUserOptionState-CXlFnwPv.js";import{t as De}from"./useChartAccessibility-DOMuYJfm.js";import{n as Oe}from"./annotationViewport-X8fvs7pz.js";import{t as ke}from"./usePanZoom-CE6Ofyy8.js";import{t as Ae}from"./vue_ui_circle_pack-CfXkXi7v.js";import{Fragment as _,computed as v,createBlock as y,createCommentVNode as b,createElementBlock as x,createElementVNode as S,createSlots as je,createTextVNode as Me,createVNode as Ne,defineAsyncComponent as C,guardReactiveProps as w,mergeProps as Pe,nextTick as Fe,normalizeClass as T,normalizeProps as E,normalizeStyle as Ie,onBeforeUnmount as Le,onMounted as Re,openBlock as D,ref as O,renderList as k,renderSlot as A,resolveDynamicComponent as ze,toDisplayString as j,toRefs as Be,unref as M,useCssVars as Ve,watch as He,withCtx as N}from"vue";function Ue(e,t=0){let n=e.reduce((e,{x:n,r})=>Math.min(e,n-r-t),1/0),r=e.reduce((e,{x:n,r})=>Math.max(e,n+r+t),-1/0),i=e.reduce((e,{y:n,r})=>Math.min(e,n-r-t),1/0),a=e.reduce((e,{y:n,r})=>Math.max(e,n+r+t),-1/0);return[n,i,r-n,a-i]}function We(e,t,n){let r=e._,i=e.next._,a=r.r+i.r,o=(r.x*i.r+i.x*r.r)/a,s=(r.y*i.r+i.y*r.r)/a;return Math.max(Math.abs(o*n),Math.abs(s*t))}function Ge(e,t,n){let r=We,i=e.length;if(!i)return e;e.sort((e,t)=>t.r-e.r);let a,o,s;if(a=e[0],a.x=0,a.y=0,!(i>1))return e;if(o=e[1],a.x=-o.r,o.x=a.r,o.y=0,!(i>2))return Je(e,n,t),e;Ke(o,a,s=e[2]),a=new tt(a),o=new tt(o),s=new tt(s),a.next=s.previous=o,o.next=a.previous=s,s.next=o.previous=a;packLoop:for(let c=3;c<i;++c){Ke(a._,o._,s=e[c]),s=new tt(s);let i=o.next,l=a.previous,u=o._.r,d=a._.r;do if(u<=d){if(qe(i._,s._)){o=i,a.next=o,o.previous=a,--c;continue packLoop}u+=i._.r,i=i.next}else{if(qe(l._,s._)){a=l,a.next=o,o.previous=a,--c;continue packLoop}d+=l._.r,l=l.previous}while(i!==l.next);s.previous=a,s.next=o,a.next=o.previous=o=s;let f=a,p=r(a,n,t),m=a.next;for(;m!==o;){let e=r(m,n,t);e<p&&(f=m,p=e),m=m.next}a=f,o=a.next}return Je(e,n,t),Ze(e,n,t),e}function Ke(e,t,n){let r=e.x-t.x,i=e.y-t.y,a=r*r+i*i;if(a){let o=(t.r+n.r)**2,s=(e.r+n.r)**2;if(o>s){let t=(a+s-o)/(2*a),c=Math.sqrt(Math.max(0,s/a-t*t));n.x=e.x-t*r-c*i,n.y=e.y-t*i+c*r}else{let e=(a+o-s)/(2*a),c=Math.sqrt(Math.max(0,o/a-e*e));n.x=t.x+e*r-c*i,n.y=t.y+e*i+c*r}}else n.x=t.x+n.r,n.y=t.y}function qe(e,t){let n=e.r+t.r-1e-6,r=t.x-e.x,i=t.y-e.y;return n>0&&n*n>r*r+i*i}function Je(e,t,n){if(e.length<4)return;let r=e[0].r,i=e.findIndex(e=>e.r<r*.6),a=i===-1?Math.min(e.length,12):i,o=e.slice(0,Math.max(3,a));for(let t=0;t<80;t+=1){let t=!1;for(let n=0;n<o.length;n+=1){let r=o[n],i=.06*(1-n/Math.max(1,o.length)),a=r.x*(1-i),s=r.y*(1-i);Ye(r,a,s,e,n)&&(r.x=a,r.y=s,t=!0)}if(Xe(o),!t)break}let s=o.reduce((e,t)=>e+t.x,0)/o.length,c=o.reduce((e,t)=>e+t.y,0)/o.length;for(let t of e)t.x-=s,t.y-=c}function Ye(e,t,n,r){let i=e.x,a=e.y;e.x=t,e.y=n;for(let t of r)if(t!==e&&qe(e,t))return e.x=i,e.y=a,!1;return e.x=i,e.y=a,!0}function Xe(e){for(let t=0;t<6;t+=1){let t=!1;for(let n=0;n<e.length-1;n+=1)for(let r=n+1;r<e.length;r+=1){let i=e[n],a=e[r],o=a.x-i.x,s=a.y-i.y,c=Math.sqrt(o*o+s*s)||1e-6,l=i.r+a.r;if(c<l){let e=(l-c)/2,n=o/c,r=s/c;i.x-=n*e,i.y-=r*e,a.x+=n*e,a.y+=r*e,t=!0}}if(!t)break}}function Ze(e,t,n){if(e.length<6)return;let r=e[0].r,i=e.findIndex(e=>e.r<=r*.45);if(i!==-1)for(let r=i;r<e.length;r+=1){let i=e[r],a=Qe(i,e.slice(0,r),t,n);a&&(i.x=a.x,i.y=a.y)}}function Qe(e,t,n,r){if(t.length<2)return null;let i=null,a=1/0;for(let o=0;o<t.length-1;o+=1)for(let s=o+1;s<t.length;s+=1){let c=t[o],l=t[s],u=$e(c,l,e.r);for(let o of u){if(!o)continue;let s={...e,x:o.x,y:o.y};if(!P(s,t))continue;let c=et(s,t,n,r);c<a&&(a=c,i=o)}}return i}function $e(e,t,n){let r=e.r+n,i=t.r+n,a=t.x-e.x,o=t.y-e.y,s=a*a+o*o,c=Math.sqrt(s);if(!c||c>r+i||c<Math.abs(r-i))return[];let l=(r*r-i*i+s)/(2*c),u=r*r-l*l;if(u<0)return[];let d=Math.sqrt(u),f=a/c,p=o/c,m=e.x+l*f,ee=e.y+l*p,h=-p*d,g=f*d;return[{x:m+h,y:ee+g},{x:m-h,y:ee-g}]}function P(e,t){for(let n of t)if(qe(n,e))return!1;return!0}function et(e,t,n,r){let i=e.x/Math.max(1,n),a=e.y/Math.max(1,r),o=i*i+a*a,s=[];for(let n of t){let t=e.x-n.x,r=e.y-n.y,i=Math.sqrt(t*t+r*r)-(e.r+n.r);s.push(i)}s.sort((e,t)=>e-t);let c=s[0]??0,l=s[1]??c,u=s[2]??l;return c*8+l*4+u*2+o*e.r*12}var tt=class{constructor(e){this._=e,this.next=null,this.previous=null}},nt=/* @__PURE__ */ e({default:()=>F}),rt=[`id`],it=[`id`],at=[`xmlns`,`aria-describedby`,`viewBox`],ot=[`x`,`y`,`width`,`height`],st={key:0},ct=[`x`,`y`,`width`,`height`,`stroke`,`stroke-width`,`fill`,`rx`,`onMouseenter`,`onMouseout`,`onClick`],lt=[`x`,`y`,`width`,`height`,`stroke`,`stroke-width`,`fill`,`rx`],ut=[`x`,`y`,`width`,`height`,`fill`,`rx`],dt=[`transform`,`font-size`,`fill`,`font-weight`],ft=[`transform`,`font-size`,`fill`,`font-weight`],pt={key:1,style:{pointerEvents:`none`}},mt=[`stroke`,`stroke-width`,`stroke-dasharray`,`opacity`,`d`],ht=[`x`,`y`,`width`,`height`,`rx`,`ry`,`fill`,`stroke`,`stroke-width`,`filter`],gt=[`fill`,`x`,`y`,`rx`,`width`,`height`],_t=[`transform`,`font-size`,`fill`,`font-family`],vt=[`dy`],yt={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},bt={key:5,class:`vue-data-ui-watermark`},xt={key:6,"data-dom-to-png-ignore":``,class:`reset-wrapper`},St={style:{display:`flex`,"align-items":`center`}},F=/*#__PURE__*/ fe({__name:`vue-ui-circle-pack`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectDatapoint`,`copyAlt`],setup(e,{expose:fe,emit:We}){Ve(e=>({c1b7fbec:hr.value}));let Ke=C(()=>import(`./Tooltip-C1q0Qoh7.js`)),qe=C(()=>import(`./BaseIcon-CoY0vuL3.js`).then(e=>e.n)),Je=C(()=>import(`./vue-ui-accordion-DFxSW8ET.js`).then(e=>e.n)),Ye=C(()=>import(`./DataTable-Dof6yhO7.js`)),Xe=C(()=>import(`./UserOptions-B9EyfU9n.js`).then(e=>e.n)),Ze=C(()=>import(`./PenAndPaper-DoNTA-SV.js`).then(e=>e.t)),Qe=C(()=>import(`./PackageVersion-D6_O7PmZ.js`).then(e=>e.t)),$e=C(()=>import(`./BaseDraggableDialog-BK7dj9O6.js`).then(e=>e.n)),P=e,et=We,{vue_ui_circle_pack:tt}=i(),nt=v(()=>!!P.dataset&&P.dataset.length),F=O(f()),I=O(null),Ct=O(null),wt=O(null),Tt=O(0),Et=O(0),Dt=O(0),Ot=O(null),kt=O(null),At=O(null),jt=O(!1),Mt=O(``),L=O(null),R=O(null),Nt=O({x:0,y:0}),Pt=O(`pointer`),Ft=O(!1),z=O(Ht()),B=v(()=>z.value.style.chart.circles.labels),V=v(()=>z.value.style.chart.circles),H=v(()=>z.value.style.chart);ue({config:()=>z.value,dataset:()=>P.dataset,component:`VueUiCirclePack`,rules:[de.emptyArray,{test:e=>e.length===1&&(!e[0].children||e[0]?.children.length===0),message:[`👀 The dataset only has a single series. Consider:`,``,`▶️ Using a value display instead of a chart component, or using VueUiKpi.`]},{test:e=>e.length===1&&e[0]?.children&&e[0]?.children.length<6,message:[`👀 The number of datapoints is probably too low for this type of chart. Consider:`,``,`▶️ Using VueUiDonut or VueUiWaffle instead.`]}]});let{transitionEnabled:U}=xe({config:()=>z.value.transitions,dataset:()=>P.dataset}),W=v(()=>z.value.userOptions.useCursorPointer),It=v(()=>h({defaultConfig:{userOptions:{show:!1},table:{show:!1},style:{chart:{backgroundColor:`#99999930`,circles:{stroke:`#6A6A6A`,labels:{name:{show:!1},value:{show:!1}}}}}},userConfig:z.value.skeletonConfig??{}})),{loading:Lt,FINAL_DATASET:Rt}=ce({...Be(P),FINAL_CONFIG:z,prepareConfig:Ht,skeletonDataset:P.config?.skeletonDataset??[{name:`_`,value:13,color:`#F2F2F2`},{name:`_`,value:8,color:`#DBDBDB`},{name:`_`,value:5,color:`#ADADAD`},{name:`_`,value:3,color:`#969696`},{name:`_`,value:2,color:`#808080`},{name:`_`,value:1,color:`#696969`}],skeletonConfig:h({defaultConfig:z.value,userConfig:It.value})}),{svgRef:G}=De({config:H.value.title}),{userOptionsVisible:zt,setUserOptionsVisibility:Bt,keepUserOptionState:Vt}=Ee({config:z.value});function Ht(){return pe(P.config,tt,Ae)}let Ut=p(P.config);He(()=>P.config,(e,t)=>{let n=p(e),r=n!==Ut;Ut=n;let i=Ht();r?(z.value=i,zt.value=!z.value.userOptions.showOnChartHover,pn(),Tt.value+=1,Et.value+=1,K.value.showTable=z.value.table.show,K.value.showTooltip=H.value.tooltip.show,K.value.showZoom=H.value.zoom?.show??!1):(z.value.style.chart.tooltip=i.style.chart.tooltip,K.value.showTooltip=z.value.style.chart.tooltip.show)},{deep:!0});let{isPrinting:Wt,isImaging:Gt,generatePdf:Kt,generateImage:qt}=be({elementId:`vue-ui-circle-pack_${F.value}`,fileName:H.value.title.text||`vue-ui-circle-pack`,options:z.value.userOptions.print}),Jt=v(()=>z.value.userOptions.show&&!H.value.title.text),K=O({showTable:z.value.table.show,showTooltip:H.value.tooltip.show,showZoom:H.value.zoom?.show??!1});He(z,()=>{K.value={showTable:z.value.table.show,showTooltip:H.value.tooltip.show,showZoom:H.value.zoom?.show??!1}},{immediate:!0});let q=O({h:10,w:10}),Yt=O([0,0,100,100]),Xt=O({x:0,y:0,width:100,height:100}),Zt=v(()=>z.value.debug),Qt=v(()=>{let e=z.value.style?.chart||{};return e.dimensions&&typeof e.dimensions.width==`number`?e.dimensions.width:typeof e.width==`number`?e.width:300}),$t=v(()=>{let e=z.value.style?.chart||{};return e.dimensions&&typeof e.dimensions.height==`number`?e.dimensions.height:typeof e.height==`number`?e.height:300}),J=O([]),Y=O([]),X=O(null),Z=O(null);function en(e,t){q.value={w:e,h:t};let n=hn.value.map(tn);if(!n.length){let n={x:0,y:0,width:e,height:t};J.value=[],Y.value=[],Yt.value=[n.x,n.y,n.width,n.height],Xt.value={...n},jn(n);return}let r=Ge(n,t,e),[i,a,o,s]=Ue(r,1),c=Math.min(o?e/o:1,s?t/s:1),l=(e-o*c)/2,u=(t-s*c)/2,d=r.map(e=>({...e,x:(e.x-i)*c+l,y:(e.y-a)*c+u,r:e.r*c}));J.value=cn(d),Y.value=J.value;let f=Hn({x:0,y:0,width:e,height:t});Yt.value=[f.x,f.y,f.width,f.height],Xt.value={...f},jn(f)}function tn(e){return{...e,children:Array.isArray(e.children)?e.children.map(tn):[]}}function nn(e){let t=Number(e?.value);return Number.isFinite(t)&&t>0?t:Array.isArray(e?.children)?e.children.reduce((e,t)=>e+nn(t),0):0}function rn(e,t){let n=g[z.value.theme||`default`]||l,r=mn.value.length?mn.value:n.length?n:l;return d(e.color)||r[t%r.length]||l[t%l.length]}function an(e){return!Array.isArray(e.children)||!e.children.length?1:e.children.reduce((e,t)=>e+an(t),0)}function on(e,t=null,n=0,r=[]){return Array.isArray(e)?e.map((e,i)=>{let a=nn(e);if(!Number.isFinite(a)||a<=0)return null;let o=f(),s=[...r,i],c=s.reduce((e,t,n)=>e+t+n,0),l=e.color||t?.color?d(e.color||t?.color):rn(e,c),u=on(e.children,{id:o,name:e.name,color:l,rootId:t?.rootId??o},n+1,s);return{...e,value:a,r:a,id:o,color:l,depth:n,parentId:t?.id??null,parentName:t?.name??null,rootId:t?.rootId??o,hasChildren:u.length>0,childCount:u.length,leafCount:u.length?an({children:u}):1,hierarchyPath:s,children:u}}).filter(Boolean):[]}function sn(e){if(!Array.isArray(e.children)||!e.children.length)return[];let t=e.r*2;if(!t)return[];let n=Ge(e.children.map(tn),t,t),[r,i,a,o]=Ue(n,1),s=Math.min(a?t/a:1,o?t/o:1)*.9,c=a*s,l=o*s,u=e.x-c/2,d=e.y-l/2;return n.map(e=>({...e,x:(e.x-r)*s+u,y:(e.y-i)*s+d,r:e.r*s}))}function cn(e){let t=[];return e.forEach(e=>{let n=sn(e);t.push({...e,children:n}),t.push(...cn(n))}),t}function ln(e,t){return!e||!t||!Array.isArray(e.hierarchyPath)||!Array.isArray(t.hierarchyPath)||e.hierarchyPath.length<=t.hierarchyPath.length?!1:t.hierarchyPath.every((t,n)=>e.hierarchyPath[n]===t)}function un(e){return e.hasChildren?B.value.parents.show:B.value.children.show}function dn(){if(!z.value.responsive||!I.value)return;let e=Se(()=>{let{width:e,height:t}=Ce({chart:I.value,title:H.value.title.text?Ct.value:null,legend:null,source:Ot.value,noTitle:wt.value});requestAnimationFrame(()=>{e&&t&&(G.value&&(G.value.setAttribute(`width`,e),G.value.setAttribute(`height`,t)),en(e,t))})});X.value&&(Z.value&&X.value.unobserve(Z.value),X.value.disconnect()),X.value=new ResizeObserver(e),Z.value=I.value.parentNode||I.value,Z.value&&X.value.observe(Z.value),e()}function fn(){X.value&&(Z.value&&X.value.unobserve(Z.value),X.value.disconnect(),X.value=null,Z.value=null)}async function pn(){se(P.dataset)&&m({componentName:`VueUiCirclePack`,type:`dataset`,debug:Zt.value});let e=Qt.value,t=$t.value;en(e,t),z.value.responsive?dn():fn()}Re(pn),Le(()=>{fn()}),He(()=>Rt.value,async e=>{await pn()},{deep:!0});let mn=v(()=>oe(z.value.customPalette)),hn=v(()=>on(Rt.value)),gn=v(()=>J.value.length?Math.max(...J.value.map(e=>e.r)):0);function _n(e,t){return gn.value?t/gn.value*e:0}function vn(e,t){z.value.events.datapointLeave&&z.value.events.datapointLeave({datapoint:e,seriesIndex:t}),(Pt.value!==`keyboard`||L.value?.id!==e?.id)&&(jt.value=!1,L.value=null,R.value=null,Pt.value=`pointer`)}function yn(e,t){et(`selectDatapoint`,e),z.value.events.datapointClick&&z.value.events.datapointClick({datapoint:e,seriesIndex:t})}let bn=O(null),xn=O(!1);function Sn(e,t,n=`pointer`){L.value=e,R.value=t,Pt.value=n,z.value.events.datapointEnter&&z.value.events.datapointEnter({datapoint:e,seriesIndex:t}),bn.value={datapoint:e,seriesIndex:t,config:z.value,series:Y.value},jt.value=!0;let r=H.value.tooltip.customFormat;if(xn.value=!1,s(r))try{let n=r({seriesIndex:t,datapoint:e,series:Y.value,config:z.value});typeof n==`string`&&(Mt.value=n,xn.value=!0)}catch{console.warn(`Custom format cannot be applied.`),xn.value=!1}if(!xn.value){let t=``;t+=`
2
- <div style="display:flex;align-items:center;gap:4px;">
3
- <svg viewBox="0 0 10 10" height="${H.value.tooltip.fontSize}" width="${H.value.tooltip.fontSize}">
4
- <circle
5
- cx="5"
6
- cy="5"
7
- r="5"
8
- fill="${V.value.gradient.show?`url(#${e.id})`:e.color}"
9
- />
10
- </svg>
11
- <span>${e.name}: <b>${Cn(e)}</b></span>
12
- </div>
13
- `,Mt.value=t}}function Cn(e){return ee(B.value.value.formatter,e.value,a({p:B.value.value.prefix,v:e.value,s:B.value.value.suffix,r:B.value.value.rounding}))}function wn(e){if(!e)return 0;let t=Cn(e),n=e.r/(t.length||1)*(t.length===1?1:2);return Math.min(e.r/2.5,n)}let Q=O(!1);function Tn(e){Q.value=e,Dt.value+=1}let En=O(!1);function Dn(){En.value=!En.value}let On=v(()=>!En.value&&K.value.showZoom),{viewBox:$,resetZoom:kn,isZoom:An,setInitialViewBox:jn}=ke(G,{x:0,y:0,width:Math.max(10,q.value.w),height:Math.max(10,q.value.h)},H.value.zoom?.speed??1,On);function Mn(e,t,n=0){return!(e.x+e.width+n<t.x||t.x+t.width+n<e.x||e.y+e.height+n<t.y||t.y+t.height+n<e.y)}function Nn(e,t,n=0){let r=Math.min(Math.max(t.x,e.x-n),e.x+e.width+n),i=Math.min(Math.max(t.y,e.y-n),e.y+e.height+n),a=t.x-r,o=t.y-i;return a*a+o*o<=t.r*t.r}function Pn(e,t,n=1){let r=Math.max(4*n,Math.min(t.width,t.height)*.01);return{...e,x:Math.min(Math.max(e.x,t.x+r),t.x+t.width-e.width-r),y:Math.min(Math.max(e.y,t.y+r),t.y+t.height-e.height-r)}}function Fn(e){let t=[e.name];return B.value.value.show&&t.push(Cn(e)),t.filter(Boolean)}function In(e,t,n,r,i){let a=e.x,o=e.y;return{right:{x:a+e.r+i,y:o-n/2,anchorX:a+e.r,anchorY:o},left:{x:a-e.r-i-t,y:o-n/2,anchorX:a-e.r,anchorY:o},top:{x:a-t/2,y:o-e.r-i-n,anchorX:a,anchorY:o-e.r},bottom:{x:a-t/2,y:o+e.r+i,anchorX:a,anchorY:o+e.r},topRight:{x:a+e.r*.7+i,y:o-e.r*.7-i-n,anchorX:a+e.r*.7,anchorY:o-e.r*.7},topLeft:{x:a-e.r*.7-i-t,y:o-e.r*.7-i-n,anchorX:a-e.r*.7,anchorY:o-e.r*.7},bottomRight:{x:a+e.r*.7+i,y:o+e.r*.7+i,anchorX:a+e.r*.7,anchorY:o+e.r*.7},bottomLeft:{x:a-e.r*.7-i-t,y:o+e.r*.7+i,anchorX:a-e.r*.7,anchorY:o+e.r*.7}}[r]}function Ln(e,t){let n=[],r=t.get(e.parentId);for(;r;)n.push(r),r=t.get(r.parentId);return n}function Rn(e,t,n,r,i,a){let o=e.x,s=e.y,c=t||e,l=a*.6,u={right:{x:c.x+c.r+a,y:s-r/2},left:{x:c.x-c.r-a-n,y:s-r/2},top:{x:o-n/2,y:c.y-c.r-a-r},bottom:{x:o-n/2,y:c.y+c.r+a},topRight:{x:c.x+c.r+a,y:c.y-c.r-a-r-l},topLeft:{x:c.x-c.r-a-n,y:c.y-c.r-a-r-l},bottomRight:{x:c.x+c.r+a,y:c.y+c.r+a+l},bottomLeft:{x:c.x-c.r-a-n,y:c.y+c.r+a+l}}[i],d=u.x+n/2,f=u.y+r/2,p=Math.atan2(f-s,d-o);return{...u,anchorX:o+Math.cos(p)*e.r,anchorY:s+Math.sin(p)*e.r}}function zn(e,t={}){let{clamp:n=!0,scale:r=1}=t;if(!J.value.length||!q.value.w||!q.value.h||!H.value.parentTooltips.show)return[];let i=Math.max(8,H.value.parentTooltips.fontSizeRatio*10)*r,a=i*1.25,o=i*.75,s=i*.55,c=Math.max(8*r,Math.min(e.width,e.height)*.025),l=Math.max(2*r,Math.min(e.width,e.height)*.006),u=[`right`,`left`,`top`,`bottom`,`topRight`,`topLeft`,`bottomRight`,`bottomLeft`],d=[],f=new Map(J.value.map(e=>[e.id,e]));return J.value.filter(e=>e.hasChildren&&e.name).sort((e,t)=>t.r-e.r).forEach(t=>{let p=Ln(t,f).at(-1),m=Fn(t),ee=m.reduce((e,t)=>Math.max(e,String(t).length),0),h=Math.max(i*5,ee*i*.62+o*2),g=m.length*a+s*2,te=p?u.map(e=>Rn(t,p,h,g,e,c)):[],ne=u.map(e=>In(t,h,g,e,c)),re=[...te,...ne].map(t=>{let i=n?Pn({x:t.x,y:t.y,width:h,height:g},e,r):{x:t.x,y:t.y,width:h,height:g};return{...i,anchorX:t.anchorX,anchorY:t.anchorY,lineX:i.x+i.width/2,lineY:i.y+i.height/2}}).find(e=>!d.some(t=>Mn(e,t,l))&&!J.value.some(t=>Nn(e,t,l)));re&&d.push({...re,datapoint:t,id:`parent_tooltip_${t.id}`,color:t.color,lines:m,fontSize:i,lineHeight:a,paddingX:o,paddingY:s,scale:r})}),d}function Bn(e){let t=Xt.value;if(!t.width||!t.height||!e.width||!e.height)return 1;let n=Math.min(e.width/t.width,e.height/t.height);return Number.isFinite(n)&&n>0?n:1}let Vn=v(()=>zn($.value,{clamp:!0,scale:Bn($.value)}));function Hn(e){let t=zn(e,{clamp:!1});if(!t.length)return e;let n=Math.min(e.x,...t.map(e=>e.x)),r=Math.min(e.y,...t.map(e=>e.y)),i=Math.max(e.x+e.width,...t.map(e=>e.x+e.width)),a=Math.max(e.y+e.height,...t.map(e=>e.y+e.height)),o=Math.max(8,Math.min(e.width,e.height)*.025);return{x:n-o,y:r-o,width:i-n+o*2,height:a-r+o*2}}function Un(e){let t=[];function n(e,r=0,i=``){e.forEach(e=>{t.push({name:e.name,value:e.value,color:e.color,parentName:i,depth:r}),Array.isArray(e.children)&&e.children.length&&n(e.children,r+1,e.name)})}return n(e),t}let Wn=v(()=>{let e=Un(hn.value);return{head:Y.value.map(e=>({name:e.name,value:e.value,color:e.color})).toSorted((e,t)=>t.value-e.value),body:e.map(e=>e.value),hierarchy:e}}),Gn=v(()=>Un(hn.value).map(e=>({...e,name:`${`- `.repeat(e.depth)}${e.name}`})));function Kn(e=null){Fe(()=>{let t=Gn.value.map(e=>[[e.name],[e.parentName||``],[e.depth],[e.value]]),n=[[H.value.title.text],[H.value.title.subtitle.text],[[z.value.table.columnNames.datapoint],[`Parent`],[`Depth`],[z.value.table.columnNames.value]]].concat(t),r=o(n);e?e(r):te({csvContent:r,title:H.value.title.text||`vue-ui-circle-pack`})})}let qn=v(()=>{let e=[z.value.table.columnNames.datapoint,z.value.table.columnNames.parent,z.value.table.columnNames.depth,z.value.table.columnNames.value],t=Wn.value.hierarchy.map(e=>{let t=a({p:B.value.value.prefix,v:e.value,s:B.value.value.suffix,r:B.value.value.rounding});return[{color:e.color,name:`${` `.repeat(e.depth)}${e.name}`},e.parentName??``,e.depth??0,t]}),n={th:{backgroundColor:z.value.table.th.backgroundColor,color:z.value.table.th.color,outline:z.value.table.th.outline},td:{backgroundColor:z.value.table.td.backgroundColor,color:z.value.table.td.color,outline:z.value.table.td.outline},breakpoint:z.value.table.responsiveBreakpoint};return{colNames:[z.value.table.columnNames.datapoint,z.value.table.columnNames.parent,z.value.table.columnNames.depth,z.value.table.columnNames.value],head:e,body:t,config:n}});function Jn(){K.value.showTable=!K.value.showTable}function Yn(){K.value.showTooltip=!K.value.showTooltip}function Xn(){K.value.showZoom=!K.value.showZoom}function Zn(){return hn.value}let Qn=me(I,()=>H.value.title.text),$n=v(()=>_e({config:z,style:H,mutableConfig:K,dialog:$e,accordion:Je,isFullscreen:Q,parent:I,maxWidth:500,isCursorPointer:W}));He(()=>K.value.showTable,e=>{z.value.table.show||(e&&z.value.table.useDialog&&kt.value?kt.value.open():kt.value&&`close`in kt.value&&kt.value.close())});function er(){K.value.showTable=!1,At.value&&At.value.setTableIconState(!1)}let tr=v(()=>H.value.backgroundColor),nr=v(()=>H.value.title),{isCallbackImaging:rr,isCallbackSvg:ir,generateSvg:ar,onGenerateImage:or}=ge({svg:G,title:nr,legend:null,legendItems:null,backgroundColor:tr,getSvgCallback:()=>z.value.userOptions.callbacks.svg,generateImage:qt});async function sr(){et(`copyAlt`,{config:z.value,dataset:hn.value,flattenedDataset:Y.value}),z.value.userOptions.callbacks.altCopy?await Promise.resolve(z.value.userOptions.callbacks.altCopy({config:z.value,dataset:hn.value,flattenedDataset:Y.value})):console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.")}function cr(e){if(!Number.isFinite(e)||!G.value)return;let t=J.value[e];if(!t)return;let n=ae(t.x,t.y,G.value);n&&(Nt.value=n)}function lr(){if(R.value!==null){let e=J.value[R.value];e&&vn(e,R.value)}R.value=null,Pt.value=`pointer`,jt.value=!1,L.value=null}function ur(){R.value=null,Ft.value=!0}function dr(){lr(),Ft.value=!1}function fr(e,t){let n=J.value.length;return n?e===null||e<0||e>=n?t===`next`?0:n-1:t===`previous`?(e-1+n)%n:(e+1)%n:null}function pr(e){if(!G.value||En.value||document.activeElement!==G.value||!J.value.length)return;let t=[`ArrowLeft`,`ArrowUp`].includes(e.key),n=[`ArrowRight`,`ArrowDown`].includes(e.key),r=e.key===`Enter`||e.key===` `,i=e.key===`Escape`;if(!t&&!n&&!r&&!i)return;if(e.preventDefault(),e.stopPropagation(),i){lr();return}if(r){if(R.value===null)return;let e=J.value[R.value];if(!e)return;yn(e,R.value);return}let a=R.value;a===null||a<0||a>=J.value.length?a=n?0:J.value.length-1:n?a=fr(a,`next`):t&&(a=fr(a,`previous`));let o=J.value[a];o&&(R.value=a,cr(a),Sn(o,a,`keyboard`))}let mr=v(()=>({headers:qn.value?.colNames??[],rows:qn.value?.body?.map(e=>[e[0]?.name??``,e[1]])??[]})),hr=v(()=>H.value.color);fe({getData:Zn,getImage:Qn,generateCsv:Kn,generatePdf:Kt,generateImage:qt,generateSvg:ar,toggleTable:Jn,toggleAnnotator:Dn,toggleFullscreen:Tn,copyAlt:sr,toggleZoom:Xn,resetZoom:kn});let gr=v(()=>Oe(z.value.userOptions?.annotator?.followZoom,$.value));return(e,i)=>(D(),x(`div`,{id:`vue-ui-circle-pack_${F.value}`,class:T(`vue-data-ui-component vue-ui-circle-pack ${Q.value?`vue-data-ui-wrapper-fullscreen`:``} ${M(Lt)?`loading`:``}`),ref_key:`circlePackChart`,ref:I,style:Ie(`font-family:${z.value.style.fontFamily};text-align:center;background:${H.value.backgroundColor};`),onMouseenter:i[2]||=()=>M(Bt)(!0),onMouseleave:i[3]||=()=>M(Bt)(!1)},[S(`div`,{id:`chart-instructions-${F.value}`,class:`sr-only`},[S(`p`,null,j(z.value.a11y.translations.keyboardNavigation),1)],8,it),mr.value?.rows?.length?(D(),y(Te,{key:0,uid:F.value,head:mr.value.headers,body:mr.value.rows,notice:z.value.a11y.translations.tableAvailable,caption:z.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):b(``,!0),z.value.userOptions.buttons.annotator?(D(),y(M(Ze),Pe({key:1},M(n)(z.value.userOptions.annotator),{svgRef:M(G),followZoom:z.value.userOptions?.annotator?.followZoom,annotationViewport:gr.value,backgroundColor:H.value.backgroundColor,color:H.value.color,active:En.value,isCursorPointer:W.value,palette:z.value.userOptions.annotatorPalette,onClose:Dn}),je({_:2},[k(M(r),n=>({name:n,fn:N(r=>[A(e.$slots,n,E(w(M(t)(n,r))),void 0,!0)])}))]),1040,[`svgRef`,`followZoom`,`annotationViewport`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):b(``,!0),A(e.$slots,`userConfig`,{},void 0,!0),Jt.value?(D(),x(`div`,{key:2,ref_key:`noTitle`,ref:wt,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):b(``,!0),H.value.title.text?(D(),x(`div`,{key:3,ref_key:`chartTitle`,ref:Ct,style:`width:100%;background:transparent;padding-bottom:12px`},[(D(),y(he,{key:`title_${Tt.value}`,config:{title:{cy:`donut-div-title`,...H.value.title},subtitle:{cy:`donut-div-subtitle`,...H.value.title.subtitle}}},null,8,[`config`]))],512)):b(``,!0),z.value.userOptions.show&&nt.value&&(M(Vt)||M(zt))?(D(),y(M(Xe),{ref_key:`userOptionsRef`,ref:At,key:`user_option_${Dt.value}`,backgroundColor:H.value.backgroundColor,color:H.value.color,isPrinting:M(Wt),isImaging:M(Gt),uid:F.value,hasTooltip:z.value.userOptions.buttons.tooltip,isTooltip:K.value.showTooltip,hasLabel:!1,hasPdf:z.value.userOptions.buttons.pdf,hasImg:z.value.userOptions.buttons.img,hasSvg:z.value.userOptions.buttons.svg,hasXls:z.value.userOptions.buttons.csv,hasTable:z.value.userOptions.buttons.table,hasFullscreen:z.value.userOptions.buttons.fullscreen,hasAltCopy:z.value.userOptions.buttons.altCopy,isFullscreen:Q.value,chartElement:I.value,position:z.value.userOptions.position,callbacks:z.value.userOptions.callbacks,printScale:z.value.userOptions.print.scale,titles:{...z.value.userOptions.buttonTitles},hasAnnotator:z.value.userOptions.buttons.annotator,isAnnotation:En.value,tableDialog:z.value.table.useDialog,isCursorPointer:W.value,hasZoom:z.value.userOptions.buttons.zoom,isZoom:K.value.showZoom,onToggleFullscreen:Tn,onGeneratePdf:M(Kt),onGenerateCsv:Kn,onGenerateImage:M(or),onGenerateSvg:M(ar),onToggleTable:Jn,onToggleTooltip:Yn,onToggleAnnotator:Dn,onToggleZoom:Xn,onCopyAlt:sr,style:Ie({visibility:M(Vt)?M(zt)?`visible`:`hidden`:`visible`})},je({_:2},[k(M(ve)(e.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionFullscreen optionAnnotator optionZoom optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:N(n=>[A(e.$slots,t,E(w(M(ye)(t,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.isTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.callbacks.printScale.titles.hasAnnotator.isAnnotation.tableDialog.isCursorPointer.hasZoom.isZoom.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):b(``,!0),S(`div`,{class:T({"vue-ui-circle-pack-svg-container":!0,"not-responsive":!z.value.responsive})},[(D(),x(`svg`,{ref_key:`svgRef`,ref:G,xmlns:M(ie),"aria-describedby":`chart-instructions-${F.value}`,viewBox:`${M($).x} ${M($).y} ${M($).width} ${M($).height}`,preserveAspectRatio:`xMidYMid meet`,class:T({"vue-data-ui-fullscreen--on":Q.value,"vue-data-ui-fulscreen--off":!Q.value,"not-responsive":!z.value.responsive,"vue-data-ui-no-transition":!M(U)}),style:Ie(`display:block;${z.value.responsive?`width:100%;height:auto`:`height:100%;`};overflow:${K.value.showZoom?`hidden`:`visible`};background:transparent;color:${H.value.color};background:${H.value.backgroundColor};`),tabindex:`0`,onFocus:ur,onBlur:dr,onKeydown:pr},[Ne(M(Qe)),A(e.$slots,`svg-underlayer`,{svg:{drawingArea:{...M($)},width:q.value.w,height:q.value.h,isPrintingImg:M(Wt)||M(Gt)||M(rr),isPrintingSvg:M(ir)}},void 0,!0),e.$slots[`chart-background`]?(D(),x(`foreignObject`,{key:0,x:M($).x,y:M($).y,width:q.value.w,height:q.value.h,style:{pointerEvents:`none`}},[A(e.$slots,`chart-background`,{},void 0,!0)],8,ot)):b(``,!0),(D(!0),x(_,null,k(J.value,(t,n)=>(D(),x(_,{key:t.id},[S(`defs`,null,[Ne(we,{t:`radial`,id:t.id,fy:`30%`,stops:[[`10%`,M(c)(t.color,V.value.gradient.intensity/100),1],[`90%`,M(u)(t.color,.1),1],[`100%`,t.color,1]]},null,8,[`id`,`stops`])]),e.$slots.pattern?(D(),x(`g`,st,[S(`defs`,null,[A(e.$slots,`pattern`,Pe({ref_for:!0},{...t,patternId:`pattern_${F.value}_${t.id}`}),void 0,!0)])])):b(``,!0),S(`rect`,{class:T({"vue-data-ui-transition":M(U)}),x:t.x-t.r,y:t.y-t.r,width:t.r*2,height:t.r*2,stroke:V.value.stroke,"vector-effect":`non-scaling-stroke`,"stroke-width":V.value.strokeWidth*(gn.value||1)/100,fill:V.value.gradient.show?`url(#${t.id})`:t.color,rx:t.r,onMouseenter:e=>Sn(t,n,`pointer`),onMouseout:e=>vn(t,n),onClick:e=>yn(t,n)},null,42,ct),e.$slots.pattern?(D(),x(`rect`,{key:1,class:T({"vue-data-ui-transition":M(U)}),x:t.x-t.r,y:t.y-t.r,width:t.r*2,height:t.r*2,stroke:V.value.stroke,"vector-effect":`non-scaling-stroke`,"stroke-width":V.value.strokeWidth*(gn.value||1)/100,fill:`url(#pattern_${F.value}_${t.id})`,rx:t.r,style:{pointerEvents:`none`}},null,10,lt)):b(``,!0)],64))),128)),(D(!0),x(_,null,k(J.value,(e,t)=>(D(),x(_,{key:e.id},[e.hasChildren?b(``,!0):(D(),x(`rect`,{key:0,class:T({"vue-data-ui-transition":M(U)}),x:e.x-e.r,y:e.y-e.r,width:e.r*2,height:e.r*2,stroke:`none`,fill:L.value&&L.value.id===e.id?V.value.gradient.show?`url(#${e.id})`:e.color:`transparent`,rx:e.r,style:Ie({filter:L.value&&L.value.id===e.id?`drop-shadow(0px 0px 6px ${V.value.selectedShadowColor})`:`none`,opacity:+!!L.value,pointerEvents:`none`})},null,14,ut))],64))),128)),(D(!0),x(_,null,k(J.value,(t,n)=>(D(),x(_,{key:`cl_${t.id}`},[e.$slots[`data-label`]&&un(t)?A(e.$slots,`data-label`,Pe({ref_for:!0},{...t,createTSpans:M(ne),fontSize:{name:t.r/3*B.value.name.fontSizeRatio,value:wn(t)*B.value.value.fontSizeRatio},color:B.value.name.color?B.value.name.color:M(re)(t.color)}),void 0,!0,0):(D(),x(_,{key:1},[B.value.name.show&&t.name&&un(t)?(D(),x(`text`,{key:0,style:{pointerEvents:`none`},class:T({"vue-data-ui-transition":M(U)}),transform:`translate(${t.x}, ${t.y+_n(t.r,B.value.name.offsetY)-t.r/10})`,"font-size":t.r/3*B.value.name.fontSizeRatio,fill:B.value.name.color===`auto`?M(re)(t.color):B.value.name.color,"font-weight":B.value.name.bold?`bold`:`normal`,"text-anchor":`middle`},j(t.name),11,dt)):b(``,!0),B.value.value.show&&un(t)?(D(),x(`text`,{key:1,class:T({"vue-data-ui-transition":M(U)}),style:{pointerEvents:`none`,transition:`opacity 0.2s ease-in-out`},transform:`translate(${t.x}, ${t.y+_n(t.r,B.value.value.offsetY)+t.r/2.5})`,"font-size":wn(t)*B.value.value.fontSizeRatio,fill:B.value.value.color===`auto`?M(re)(t.color):B.value.value.color,"font-weight":B.value.value.bold?`bold`:`normal`,"text-anchor":`middle`},j(Cn(t)),11,ft)):b(``,!0)],64)),A(e.$slots,`circle`,Pe({ref_for:!0},{...t,showLabel:un(t),isSelected:L.value?.id===t.id,isDescendantOfSelected:ln(t,L.value),uid:`${n}_${F.value}`}),void 0,!0)],64))),128)),Vn.value.length&&H.value.parentTooltips.show?(D(),x(`g`,pt,[(D(!0),x(_,null,k(Vn.value,t=>(D(),x(`g`,{key:`tltp_${t.id}`},[S(`path`,{class:T({"vue-data-ui-transition":M(U)}),stroke:H.value.parentTooltips.link.useSerieColor?t.color:H.value.parentTooltips.link.stroke,"vector-effect":`non-scaling-stroke`,"stroke-width":H.value.parentTooltips.link.strokeWidth,"stroke-linecap":`round`,"stroke-dasharray":H.value.parentTooltips.link.strokeDasharray,opacity:H.value.parentTooltips.link.opacity,d:`M${t.anchorX}, ${t.anchorY} ${t.lineX}, ${t.lineY}`},null,10,mt),S(`rect`,{class:T({"vue-data-ui-transition":M(U)}),x:t.x,y:t.y,width:t.width,height:t.height,rx:Math.max(3*t.scale,t.fontSize/2.5)*H.value.parentTooltips.borderRadiusRatio,ry:Math.max(3*t.scale,t.fontSize/2.5)*H.value.parentTooltips.borderRadiusRatio,fill:H.value.parentTooltips.backgroundColor,stroke:H.value.parentTooltips.useSerieColor?t.color:H.value.parentTooltips.stroke,"vector-effect":`non-scaling-stroke`,"stroke-width":H.value.parentTooltips.strokeWidth,filter:H.value.parentTooltips.filter},null,10,ht),A(e.$slots,`parent-tooltip`,Pe({ref_for:!0},{...t}),()=>[S(`rect`,{class:T({"vue-data-ui-transition":M(U)}),fill:t.color,x:t.x+t.paddingX*1.3-t.fontSize*.35,y:t.y+t.paddingY+t.lineHeight/2-t.fontSize*.35,rx:t.fontSize*.35,width:t.fontSize*.7,height:t.fontSize*.7},null,10,gt),S(`text`,{class:T({"vue-data-ui-transition":M(U)}),transform:`translate(${t.x+t.paddingX+t.fontSize}, ${t.y+t.paddingY+t.fontSize})`,"font-size":t.fontSize,fill:H.value.parentTooltips.color,"font-family":z.value.style.fontFamily,"text-anchor":`start`},[(D(!0),x(_,null,k(t.lines,(e,n)=>(D(),x(`tspan`,{key:`${t.id}_${n}`,x:0,dy:n===0?0:t.lineHeight},j(e),9,vt))),128))],10,_t)],!0)]))),128))])):b(``,!0),A(e.$slots,`svg`,{svg:{drawingArea:{...M($)},width:q.value.w,height:q.value.h,isPrintingImg:M(Wt)||M(Gt)||M(rr),isPrintingSvg:M(ir)}},void 0,!0)],46,at)),e.$slots.hint?(D(),x(`div`,yt,[A(e.$slots,`hint`,E(w({hint:z.value.a11y.translations.keyboardNavigation,isVisible:Ft.value})),void 0,!0)])):b(``,!0)],2),e.$slots.watermark?(D(),x(`div`,bt,[A(e.$slots,`watermark`,E(w({isPrinting:M(Wt)||M(Gt)||M(rr)||M(ir)})),void 0,!0)])):b(``,!0),M(An)?(D(),x(`div`,xt,[A(e.$slots,`reset-action`,{reset:M(kn)},()=>[S(`button`,{"data-cy-reset":``,tabindex:`0`,role:`button`,class:`vue-data-ui-refresh-button`,style:Ie({background:H.value.backgroundColor,cursor:W.value?`pointer`:`default`}),onClick:i[0]||=e=>M(kn)(!0)},[Ne(M(qe),{name:`refresh`,stroke:H.value.color},null,8,[`stroke`])],4)],!0)])):b(``,!0),e.$slots.source?(D(),x(`div`,{key:7,ref_key:`source`,ref:Ot,dir:`auto`},[A(e.$slots,`source`,{},void 0,!0)],512)):b(``,!0),Ne(M(Ke),{teleportTo:H.value.tooltip.teleportTo,show:K.value.showTooltip&&jt.value,backgroundColor:H.value.tooltip.backgroundColor,color:H.value.tooltip.color,fontSize:H.value.tooltip.fontSize,borderRadius:H.value.tooltip.borderRadius,borderColor:H.value.tooltip.borderColor,borderWidth:H.value.tooltip.borderWidth,backgroundOpacity:H.value.tooltip.backgroundOpacity,position:H.value.tooltip.position,offsetX:H.value.tooltip.offsetX,offsetY:H.value.tooltip.offsetY,parent:I.value,content:Mt.value,isCustom:xn.value,isFullscreen:Q.value,smooth:H.value.tooltip.smooth,backdropFilter:H.value.tooltip.backdropFilter,smoothForce:H.value.tooltip.smoothForce,smoothSnapThreshold:H.value.tooltip.smoothSnapThrehsold,isA11yMode:Pt.value===`keyboard`,a11yPosition:Nt.value},{"tooltip-before":N(()=>[A(e.$slots,`tooltip-before`,E(w({...bn.value})),void 0,!0)]),tooltip:N(()=>[A(e.$slots,`tooltip`,E(w({...bn.value})),void 0,!0)]),"tooltip-after":N(()=>[A(e.$slots,`tooltip-after`,E(w({...bn.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`]),nt.value&&z.value.userOptions.buttons.table?(D(),y(ze($n.value.component),Pe({key:8},$n.value.props,{ref_key:`tableUnit`,ref:kt,onClose:er}),je({content:N(()=>[(D(),y(M(Ye),{key:`table_${Et.value}`,colNames:qn.value.colNames,head:qn.value.head,body:qn.value.body,config:qn.value.config,title:z.value.table.useDialog?``:$n.value.title,withCloseButton:!z.value.table.useDialog,isCursorPointer:W.value,onClose:er},{th:N(({th:e})=>[S(`div`,St,j(e),1)]),td:N(({td:e})=>[Me(j(e.name||e),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[z.value.table.useDialog?{name:`title`,fn:N(()=>[Me(j($n.value.title),1)]),key:`0`}:void 0,z.value.table.useDialog?{name:`actions`,fn:N(()=>[S(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[1]||=e=>Kn(z.value.userOptions.callbacks.csv),style:Ie({cursor:W.value?`pointer`:`default`})},[Ne(M(qe),{name:`fileCsv`,stroke:$n.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):b(``,!0),A(e.$slots,`skeleton`,{},()=>[M(Lt)?(D(),y(le,{key:0})):b(``,!0)],!0)],46,rt))}},[[`__scopeId`,`data-v-5a7cf7f3`]]);export{nt as n,F as t};