vue-data-ui 3.27.1 → 3.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/README.md +49 -41
  2. package/dist/{Arrow-C2W0uGrq.js → Arrow-D6OAn5rm.js} +1 -1
  3. package/dist/{BaseDraggableDialog-D_tuHEjO.js → BaseDraggableDialog-Bw_azO0n.js} +1 -1
  4. package/dist/BaseIcon-DDctLkeT.js +1 -0
  5. package/dist/{BaseLegendToggle-Bq5FjyuI.js → BaseLegendToggle-BOcw1ke8.js} +1 -1
  6. package/dist/BaseZoomControls-Cq5AOHQ0.js +1 -0
  7. package/dist/{ColorPicker-MLwiwxl5.js → ColorPicker-DHQvvLT9.js} +1 -1
  8. package/dist/DataTable-BcVZLSs8.js +1 -0
  9. package/dist/{HillActions-CHg1AQ3p.js → HillActions-Bq3UJ1Ut.js} +1 -1
  10. package/dist/{Legend-D8YoT1RJ.js → Legend-D8NunRPr.js} +1 -1
  11. package/dist/{NonSvgPenAndPaper-CqtJpZKh.js → NonSvgPenAndPaper-CxQZ0YED.js} +1 -1
  12. package/dist/{PackageVersion-CdkxOy58.js → PackageVersion-ATrKWi8V.js} +1 -1
  13. package/dist/{PenAndPaper-IMw576MC.js → PenAndPaper-BsBFp16i.js} +1 -1
  14. package/dist/{Shape-Bp9YNtPc.js → Shape-gDVRWM6n.js} +1 -1
  15. package/dist/SlicerPreview-Dpu4nMz6.js +1 -0
  16. package/dist/{SparkTooltip-C5JMcBXT.js → SparkTooltip-cWKhrsKX.js} +1 -1
  17. package/dist/{Title-BGYFqulv.js → Title-BLA0tM3g.js} +1 -1
  18. package/dist/{Tooltip-Cus2-XNQ.js → Tooltip-Iyb_S6oQ.js} +1 -1
  19. package/dist/UserOptions-BSJ_S_us.js +1 -0
  20. package/dist/{chartImage-CIvU_04o.js → chartImage-r-G4CkRK.js} +1 -1
  21. package/dist/components/arrow.js +1 -1
  22. package/dist/components/vue-ui-3d-bar.js +1 -1
  23. package/dist/components/vue-ui-accordion.js +1 -1
  24. package/dist/components/vue-ui-age-pyramid.js +1 -1
  25. package/dist/components/vue-ui-annotator.js +1 -1
  26. package/dist/components/vue-ui-bullet.js +1 -1
  27. package/dist/components/vue-ui-bump.js +1 -1
  28. package/dist/components/vue-ui-candlestick.js +1 -1
  29. package/dist/components/vue-ui-carousel-table.js +1 -1
  30. package/dist/components/vue-ui-chestnut.js +1 -1
  31. package/dist/components/vue-ui-chord.js +1 -1
  32. package/dist/components/vue-ui-circle-pack.js +1 -1
  33. package/dist/components/vue-ui-cursor.js +1 -1
  34. package/dist/components/vue-ui-dag.js +1 -1
  35. package/dist/components/vue-ui-dashboard.js +1 -1
  36. package/dist/components/vue-ui-digits.js +1 -1
  37. package/dist/components/vue-ui-donut-evolution.js +1 -1
  38. package/dist/components/vue-ui-donut.js +1 -1
  39. package/dist/components/vue-ui-dumbbell.js +1 -1
  40. package/dist/components/vue-ui-flow.js +1 -1
  41. package/dist/components/vue-ui-funnel.js +1 -1
  42. package/dist/components/vue-ui-galaxy.js +1 -1
  43. package/dist/components/vue-ui-gauge.js +1 -1
  44. package/dist/components/vue-ui-geo.js +1 -1
  45. package/dist/components/vue-ui-gizmo.js +1 -1
  46. package/dist/components/vue-ui-graph.js +1 -0
  47. package/dist/components/vue-ui-heatmap.js +1 -1
  48. package/dist/components/vue-ui-hill.js +1 -1
  49. package/dist/components/vue-ui-history-plot.js +1 -1
  50. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  51. package/dist/components/vue-ui-icon.js +1 -1
  52. package/dist/components/vue-ui-kpi.js +1 -1
  53. package/dist/components/vue-ui-label.js +1 -1
  54. package/dist/components/vue-ui-mini-loader.js +1 -1
  55. package/dist/components/vue-ui-molecule.js +1 -1
  56. package/dist/components/vue-ui-mood-radar.js +1 -1
  57. package/dist/components/vue-ui-nested-donuts.js +1 -1
  58. package/dist/components/vue-ui-onion.js +1 -1
  59. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  60. package/dist/components/vue-ui-quadrant.js +1 -1
  61. package/dist/components/vue-ui-quick-chart.js +1 -1
  62. package/dist/components/vue-ui-radar.js +1 -1
  63. package/dist/components/vue-ui-rating.js +1 -1
  64. package/dist/components/vue-ui-relation-circle.js +1 -1
  65. package/dist/components/vue-ui-ridgeline.js +1 -1
  66. package/dist/components/vue-ui-rings.js +1 -1
  67. package/dist/components/vue-ui-scatter.js +1 -1
  68. package/dist/components/vue-ui-skeleton.js +1 -1
  69. package/dist/components/vue-ui-smiley.js +1 -1
  70. package/dist/components/vue-ui-spark-trend.js +1 -1
  71. package/dist/components/vue-ui-sparkbar.js +1 -1
  72. package/dist/components/vue-ui-sparkgauge.js +1 -1
  73. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  74. package/dist/components/vue-ui-sparkline.js +1 -1
  75. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  76. package/dist/components/vue-ui-stackbar.js +1 -1
  77. package/dist/components/vue-ui-stackline.js +1 -1
  78. package/dist/components/vue-ui-strip-plot.js +1 -1
  79. package/dist/components/vue-ui-table-heatmap.js +1 -1
  80. package/dist/components/vue-ui-table-sparkline.js +1 -1
  81. package/dist/components/vue-ui-table.js +1 -1
  82. package/dist/components/vue-ui-thermometer.js +1 -1
  83. package/dist/components/vue-ui-timer.js +1 -1
  84. package/dist/components/vue-ui-tiremarks.js +1 -1
  85. package/dist/components/vue-ui-treemap.js +1 -1
  86. package/dist/components/vue-ui-vertical-bar.js +1 -1
  87. package/dist/components/vue-ui-waffle.js +1 -1
  88. package/dist/components/vue-ui-wheel.js +1 -1
  89. package/dist/components/vue-ui-word-cloud.js +1 -1
  90. package/dist/components/vue-ui-world.js +1 -1
  91. package/dist/components/vue-ui-xy-canvas.js +1 -1
  92. package/dist/components/vue-ui-xy.js +1 -1
  93. package/dist/{dom-to-png-D8t3Bm7s.js → dom-to-png-Cp6rAdnI.js} +1 -1
  94. package/dist/{exposedLib-DHtyEc_G.js → exposedLib-BDGMSW1B.js} +1 -1
  95. package/dist/{img-DiT4ivZ5.js → img-DiP2_5_r.js} +1 -1
  96. package/dist/{labelUtils-CG3uVXoZ.js → labelUtils-DXiFpsZl.js} +1 -1
  97. package/dist/{lib-CV_IANZ6.js → lib-DqD8nbyX.js} +2 -2
  98. package/dist/package-UBaXe2y9.js +1 -0
  99. package/dist/{pdf-BQSB1V3H.js → pdf-y3S8SBFk.js} +1 -1
  100. package/dist/{render-common-BdZ5aRyn.js → render-common-tsNLeNaX.js} +1 -1
  101. package/dist/{resolveChartConfig-DZg-korK.js → resolveChartConfig-ChGWTt5l.js} +1 -1
  102. package/dist/ssr/vue-ui-donut.js +1 -1
  103. package/dist/ssr/vue-ui-xy.js +1 -1
  104. package/dist/ssr.js +1 -1
  105. package/dist/style.css +1 -1
  106. package/dist/types/vue-data-ui.d.ts +323 -0
  107. package/dist/types/vue-ui-graph.d.ts +21 -0
  108. package/dist/useConfig-DM9fSqjh.js +1 -0
  109. package/dist/{useNestedProp-CB186vF2.js → useNestedProp-DrLnzyHO.js} +1 -1
  110. package/dist/useObjectBindings-Cn4Vz0RY.js +1 -0
  111. package/dist/{usePrinter-hLW3cv4N.js → usePrinter-Cj4eIYC_.js} +1 -1
  112. package/dist/utils.js +1 -1
  113. package/dist/vue-data-ui-yeD7UyUU.js +1 -0
  114. package/dist/vue-data-ui.js +1 -1
  115. package/dist/vue-ui-3d-bar-COrzyTkO.js +19 -0
  116. package/dist/vue-ui-accordion-3lBpCjGm.js +1 -0
  117. package/dist/vue-ui-age-pyramid-CAoVjkOA.js +1 -0
  118. package/dist/vue-ui-annotator-CpTZHnPw.js +331 -0
  119. package/dist/vue-ui-bullet-yvY_gdw2.js +34 -0
  120. package/dist/vue-ui-bump-ChsFkIq9.js +10 -0
  121. package/dist/vue-ui-candlestick-D9UXZQoN.js +22 -0
  122. package/dist/vue-ui-carousel-table-CKyE4hME.js +1 -0
  123. package/dist/vue-ui-chestnut-BuLjW5nb.js +1 -0
  124. package/dist/vue-ui-chord-Bjwt2_BK.js +21 -0
  125. package/dist/vue-ui-circle-pack-BpAuZruK.js +13 -0
  126. package/dist/vue-ui-cursor-Dn-IBaP8.js +1 -0
  127. package/dist/vue-ui-dag-CyY3cSa6.js +9 -0
  128. package/dist/vue-ui-dashboard-DmyStkQM.js +1 -0
  129. package/dist/{vue-ui-digits-CXKKmfGj.js → vue-ui-digits-BBiRMr01.js} +2 -2
  130. package/dist/{vue-ui-donut-CKkBtyPK.js → vue-ui-donut-CGyBWxzh.js} +2 -2
  131. package/dist/vue-ui-donut-DMF74OY0.js +47 -0
  132. package/dist/vue-ui-donut-evolution-Du4zLc8D.js +2 -0
  133. package/dist/vue-ui-dumbbell-CxL_AY5e.js +9 -0
  134. package/dist/vue-ui-flow-h6kTMamJ.js +3 -0
  135. package/dist/vue-ui-funnel-BG5Addzr.js +1 -0
  136. package/dist/vue-ui-galaxy-CgnshY8i.js +1 -0
  137. package/dist/vue-ui-gauge-a13ojQPr.js +1 -0
  138. package/dist/vue-ui-geo-CflzhtuD.js +1 -0
  139. package/dist/vue-ui-gizmo-K1lfslsA.js +1 -0
  140. package/dist/vue-ui-graph-C2Se8bnB.js +7 -0
  141. package/dist/vue-ui-heatmap-5NsQkMwS.js +1 -0
  142. package/dist/vue-ui-hill-COnjVS2L.js +1 -0
  143. package/dist/vue-ui-history-plot-BRJdXsNo.js +2 -0
  144. package/dist/vue-ui-horizontal-bar-G0wEKTRu.js +4 -0
  145. package/dist/vue-ui-kpi-BZjfQxmY.js +1 -0
  146. package/dist/{vue-ui-label-B4pkXBxc.js → vue-ui-label-BD_hTtgZ.js} +2 -2
  147. package/dist/vue-ui-mini-loader-ltQXdeeW.js +1 -0
  148. package/dist/vue-ui-molecule-DI-CS5w8.js +1 -0
  149. package/dist/vue-ui-mood-radar-B5ar9WAZ.js +1 -0
  150. package/dist/vue-ui-nested-donuts-BP2YzVma.js +19 -0
  151. package/dist/vue-ui-onion-CCiZ6jmF.js +5 -0
  152. package/dist/vue-ui-parallel-coordinate-plot-3E0CysDx.js +9 -0
  153. package/dist/vue-ui-quadrant-BwgwvKy8.js +2 -0
  154. package/dist/vue-ui-quick-chart-BXNg0LNe.js +17 -0
  155. package/dist/vue-ui-radar-B9Ntj_Gj.js +1 -0
  156. package/dist/vue-ui-rating-B33u3iIn.js +1 -0
  157. package/dist/vue-ui-relation-circle-B60IUw50.js +1 -0
  158. package/dist/vue-ui-ridgeline-BPbYng2A.js +2 -0
  159. package/dist/vue-ui-rings-BXo9p3Ab.js +1 -0
  160. package/dist/vue-ui-scatter-BwrYPDzh.js +9 -0
  161. package/dist/{vue-ui-skeleton-DI7pcimU.js → vue-ui-skeleton-DTn7uIui.js} +3 -3
  162. package/dist/{vue-ui-smiley-D70sJZWl.js → vue-ui-smiley-qCRUFmpq.js} +1 -1
  163. package/dist/vue-ui-spark-trend-wKFu-O7B.js +1 -0
  164. package/dist/vue-ui-sparkbar-DPFzdX-D.js +1 -0
  165. package/dist/vue-ui-sparkgauge-DlEPsxc0.js +1 -0
  166. package/dist/vue-ui-sparkhistogram-DLZxE6oz.js +1 -0
  167. package/dist/vue-ui-sparkline-BflZPl7s.js +1 -0
  168. package/dist/vue-ui-sparkstackbar-DvSQfGeA.js +1 -0
  169. package/dist/vue-ui-stackbar-JKC9qE6M.js +29 -0
  170. package/dist/vue-ui-stackline-G7-oqfzp.js +39 -0
  171. package/dist/vue-ui-strip-plot-54u7AUip.js +2 -0
  172. package/dist/vue-ui-table-3F8i2ZjT.js +14 -0
  173. package/dist/vue-ui-table-heatmap-CtYPYMIJ.js +1 -0
  174. package/dist/vue-ui-table-sparkline-CTfYTzhA.js +1 -0
  175. package/dist/vue-ui-thermometer-BpFbPqxK.js +1 -0
  176. package/dist/vue-ui-timer-DsWRNtRa.js +64 -0
  177. package/dist/vue-ui-tiremarks-C4wVcSVP.js +1 -0
  178. package/dist/vue-ui-treemap-mYRv6gga.js +1 -0
  179. package/dist/vue-ui-waffle-DNBIZqZz.js +1 -0
  180. package/dist/vue-ui-wheel-DPHDp0t1.js +1 -0
  181. package/dist/vue-ui-word-cloud-BY4YsW7-.js +4 -0
  182. package/dist/vue-ui-world-DQWjoFDx.js +19 -0
  183. package/dist/vue-ui-xy-DfvcqUwW.js +31 -0
  184. package/dist/vue-ui-xy-M9aD-G5a.js +24 -0
  185. package/dist/vue-ui-xy-canvas-BpwG1Ipj.js +9 -0
  186. package/dist/vue_ui_graph-B1ACwQj7.js +1 -0
  187. package/package.json +1 -1
  188. package/dist/BaseIcon-DdIyewwY.js +0 -1
  189. package/dist/BaseZoomControls-DoYifY2y.js +0 -1
  190. package/dist/DataTable-WNecJMcY.js +0 -1
  191. package/dist/SlicerPreview-CNUciSbY.js +0 -1
  192. package/dist/UserOptions-DTxMeZv3.js +0 -1
  193. package/dist/package-DE5cU1Rg.js +0 -1
  194. package/dist/useConfig-CKdzPrcf.js +0 -1
  195. package/dist/useObjectBindings-Dse7YyAf.js +0 -1
  196. package/dist/vue-data-ui-DyYgLIZN.js +0 -1
  197. package/dist/vue-ui-3d-bar-BZAoyWkc.js +0 -19
  198. package/dist/vue-ui-accordion-BNvevckx.js +0 -1
  199. package/dist/vue-ui-age-pyramid-DkA6vpU3.js +0 -1
  200. package/dist/vue-ui-annotator-DuQME4Hh.js +0 -331
  201. package/dist/vue-ui-bullet-BVs8JX8S.js +0 -34
  202. package/dist/vue-ui-bump-DYdm3EvF.js +0 -10
  203. package/dist/vue-ui-candlestick-DZgxl4mW.js +0 -22
  204. package/dist/vue-ui-carousel-table-BB7DsTUt.js +0 -1
  205. package/dist/vue-ui-chestnut-Bo1h5rBt.js +0 -1
  206. package/dist/vue-ui-chord-B6_veyvO.js +0 -21
  207. package/dist/vue-ui-circle-pack-Bm7e2YNh.js +0 -13
  208. package/dist/vue-ui-cursor-TidZDuSh.js +0 -1
  209. package/dist/vue-ui-dag-BiN_AnLo.js +0 -9
  210. package/dist/vue-ui-dashboard-zepAVN_W.js +0 -1
  211. package/dist/vue-ui-donut-DLDUpjDU.js +0 -47
  212. package/dist/vue-ui-donut-evolution-BxMTdE5G.js +0 -2
  213. package/dist/vue-ui-dumbbell-C8rNwdz0.js +0 -9
  214. package/dist/vue-ui-flow-Dru76A2O.js +0 -3
  215. package/dist/vue-ui-funnel-D_u1h5S9.js +0 -1
  216. package/dist/vue-ui-galaxy-sBEH18Xj.js +0 -1
  217. package/dist/vue-ui-gauge-Do3RN8ne.js +0 -1
  218. package/dist/vue-ui-geo-DDbtx_iJ.js +0 -1
  219. package/dist/vue-ui-gizmo-eic6xLjB.js +0 -1
  220. package/dist/vue-ui-heatmap-DlmJRsM8.js +0 -1
  221. package/dist/vue-ui-hill-C5oiuIXh.js +0 -1
  222. package/dist/vue-ui-history-plot-BJjnkWcT.js +0 -2
  223. package/dist/vue-ui-horizontal-bar-BRDBJEl1.js +0 -4
  224. package/dist/vue-ui-kpi-C-eed3jO.js +0 -1
  225. package/dist/vue-ui-mini-loader-CElmv_iF.js +0 -1
  226. package/dist/vue-ui-molecule-BeyQWZU9.js +0 -1
  227. package/dist/vue-ui-mood-radar-Bh0kHfiZ.js +0 -1
  228. package/dist/vue-ui-nested-donuts-FlnJfDaF.js +0 -19
  229. package/dist/vue-ui-onion-BjhSpjtW.js +0 -5
  230. package/dist/vue-ui-parallel-coordinate-plot-CHV6XDti.js +0 -9
  231. package/dist/vue-ui-quadrant-BaKSTJDv.js +0 -2
  232. package/dist/vue-ui-quick-chart-Nc2mVlle.js +0 -17
  233. package/dist/vue-ui-radar-BzUfkLlC.js +0 -1
  234. package/dist/vue-ui-rating-BwWXvbAg.js +0 -1
  235. package/dist/vue-ui-relation-circle-nAZEg-BL.js +0 -1
  236. package/dist/vue-ui-ridgeline-DxLZg1E2.js +0 -2
  237. package/dist/vue-ui-rings-BOti0NGb.js +0 -1
  238. package/dist/vue-ui-scatter-CCNMggyo.js +0 -9
  239. package/dist/vue-ui-spark-trend-BVtfEalS.js +0 -1
  240. package/dist/vue-ui-sparkbar-CdsLI7Ke.js +0 -1
  241. package/dist/vue-ui-sparkgauge-wmj5Wnnp.js +0 -1
  242. package/dist/vue-ui-sparkhistogram-D8S_P_P4.js +0 -1
  243. package/dist/vue-ui-sparkline-BjsJnS_9.js +0 -1
  244. package/dist/vue-ui-sparkstackbar-ZN8LXzoV.js +0 -1
  245. package/dist/vue-ui-stackbar-Dx_EN3pT.js +0 -29
  246. package/dist/vue-ui-stackline-DW-oxJvA.js +0 -39
  247. package/dist/vue-ui-strip-plot-D7kjJ3Qh.js +0 -2
  248. package/dist/vue-ui-table-CaFVLHxE.js +0 -14
  249. package/dist/vue-ui-table-heatmap-Ctf7Rhqo.js +0 -1
  250. package/dist/vue-ui-table-sparkline-C0I0cXBS.js +0 -1
  251. package/dist/vue-ui-thermometer-B6og15Al.js +0 -1
  252. package/dist/vue-ui-timer-DgXvO2Q7.js +0 -64
  253. package/dist/vue-ui-tiremarks-Dh6fZ454.js +0 -1
  254. package/dist/vue-ui-treemap-7JuvN6P_.js +0 -1
  255. package/dist/vue-ui-waffle-BqvGzfse.js +0 -1
  256. package/dist/vue-ui-wheel-SdwJqKA7.js +0 -1
  257. package/dist/vue-ui-word-cloud-1WVV_k12.js +0 -4
  258. package/dist/vue-ui-world-DjMy_utm.js +0 -19
  259. package/dist/vue-ui-xy-DaozHMfg.js +0 -31
  260. package/dist/vue-ui-xy-canvas-CegvS9RR.js +0 -9
  261. package/dist/vue-ui-xy-rGHSI1am.js +0 -24
@@ -0,0 +1,9 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-DM9fSqjh.js";import{Pt as n,S as r,St as i,X as a,Y as o,at as s,in as c,rt as l,t as u,zt as d}from"./lib-DqD8nbyX.js";import{n as f,t as p}from"./BaseScanner-8NdoBs7B.js";import{n as m,t as h}from"./useHints-BH9r_0Vd.js";import{t as g}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as _}from"./resolveChartConfig-ChGWTt5l.js";import{t as ee}from"./img-DiP2_5_r.js";import{t as te}from"./BaseZoomControls-Cq5AOHQ0.js";import{n as ne}from"./Title-BLA0tM3g.js";import{t as re}from"./useChartExport-DtPNpc9M.js";import{n as ie,t as ae}from"./annotationSlots-BRR85CqJ.js";import{n as oe,t as se}from"./userOptionsSlots-DYuo-E5m.js";import{t as ce}from"./usePrinter-Cj4eIYC_.js";import{l as le,t as ue}from"./useResponsive-D2CPcpda.js";import{t as de}from"./A11yDataTable-DWNlWXzs.js";import{t as fe}from"./useUserOptionState-CXlFnwPv.js";import{t as pe}from"./useChartAccessibility-DOMuYJfm.js";import{t as me}from"./usePanZoom-BdjP5Suc.js";import{t as he}from"./vue_ui_dag-1b_dLSym.js";import{Fragment as ge,Teleport as _e,Transition as ve,computed as v,createBlock as y,createCommentVNode as b,createElementBlock as x,createElementVNode as S,createSlots as ye,createTextVNode as be,createVNode as xe,defineAsyncComponent as Se,guardReactiveProps as Ce,mergeProps as we,nextTick as Te,normalizeClass as Ee,normalizeProps as De,normalizeStyle as Oe,onBeforeUnmount as ke,onMounted as Ae,openBlock as C,ref as w,renderList as je,renderSlot as T,toDisplayString as Me,toRefs as Ne,unref as E,watch as Pe,watchEffect as Fe,withCtx as Ie,withModifiers as Le}from"vue";var Re=`\0`,ze=`\0`,Be=``,D=class{_isDirected=!0;_isMultigraph=!1;_isCompound=!1;_label;_defaultNodeLabelFn=()=>void 0;_defaultEdgeLabelFn=()=>void 0;_nodes={};_in={};_preds={};_out={};_sucs={};_edgeObjs={};_edgeLabels={};_nodeCount=0;_edgeCount=0;_parent;_children;constructor(e){e&&(this._isDirected=!Object.hasOwn(e,`directed`)||e.directed,this._isMultigraph=Object.hasOwn(e,`multigraph`)?e.multigraph:!1,this._isCompound=Object.hasOwn(e,`compound`)?e.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[ze]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return this._defaultNodeLabelFn=e,typeof e!=`function`&&(this._defaultNodeLabelFn=()=>e),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){let e=this;return this.nodes().filter(t=>Object.keys(e._in[t]).length===0)}sinks(){let e=this;return this.nodes().filter(t=>Object.keys(e._out[t]).length===0)}setNodes(e,t){let n=arguments,r=this;return e.forEach(e=>{n.length>1?r.setNode(e,t):r.setNode(e)}),this}setNode(e,t){return Object.hasOwn(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=ze,this._children[e]={},this._children[ze][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.hasOwn(this._nodes,e)}removeNode(e){let t=this;if(Object.hasOwn(this._nodes,e)){let n=e=>t.removeEdge(t._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(e=>{t.setParent(e)}),delete this._children[e]),Object.keys(this._in[e]).forEach(n),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error(`Cannot set parent in a non-compound graph`);if(t===void 0)t=ze;else{t+=``;for(let n=t;n!==void 0;n=this.parent(n))if(n===e)throw Error(`Setting `+t+` as parent of `+e+` would create a cycle`);this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){let t=this._parent[e];if(t!==ze)return t}}children(e=ze){if(this._isCompound){let t=this._children[e];if(t)return Object.keys(t)}else if(e===ze)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){let t=this._preds[e];if(t)return Object.keys(t)}successors(e){let t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){let t=this.predecessors(e);if(t){let n=new Set(t);for(let t of this.successors(e))n.add(t);return Array.from(n.values())}}isLeaf(e){let t;return t=this.isDirected()?this.successors(e):this.neighbors(e),t.length===0}filterNodes(e){let t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());let n=this;Object.entries(this._nodes).forEach(([n,r])=>{e(n)&&t.setNode(n,r)}),Object.values(this._edgeObjs).forEach(e=>{t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});let r={};function i(e){let a=n.parent(e);return a===void 0||t.hasNode(a)?(r[e]=a,a):a in r?r[a]:i(a)}return this._isCompound&&t.nodes().forEach(e=>t.setParent(e,i(e))),t}setDefaultEdgeLabel(e){return this._defaultEdgeLabelFn=e,typeof e!=`function`&&(this._defaultEdgeLabelFn=()=>e),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){let n=this,r=arguments;return e.reduce((e,i)=>(r.length>1?n.setEdge(e,i,t):n.setEdge(e,i),i)),this}setEdge(){let e,t,n,r,i=!1,a=arguments[0];typeof a==`object`&&a&&`v`in a?(e=a.v,t=a.w,n=a.name,arguments.length===2&&(r=arguments[1],i=!0)):(e=a,t=arguments[1],n=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),e=``+e,t=``+t,n!==void 0&&(n=``+n);let o=k(this._isDirected,e,t,n);if(Object.hasOwn(this._edgeLabels,o))return i&&(this._edgeLabels[o]=r),this;if(n!==void 0&&!this._isMultigraph)throw Error(`Cannot set a named edge when isMultigraph = false`);this.setNode(e),this.setNode(t),this._edgeLabels[o]=i?r:this._defaultEdgeLabelFn(e,t,n);let s=He(this._isDirected,e,t,n);return e=s.v,t=s.w,Object.freeze(s),this._edgeObjs[o]=s,Ve(this._preds[t],e),Ve(this._sucs[e],t),this._in[t][o]=s,this._out[e][o]=s,this._edgeCount++,this}edge(e,t,n){let r=arguments.length===1?Ue(this._isDirected,arguments[0]):k(this._isDirected,e,t,n);return this._edgeLabels[r]}edgeAsObj(){let e=this.edge(...arguments);return typeof e==`object`?e:{label:e}}hasEdge(e,t,n){let r=arguments.length===1?Ue(this._isDirected,arguments[0]):k(this._isDirected,e,t,n);return Object.hasOwn(this._edgeLabels,r)}removeEdge(e,t,n){let r=arguments.length===1?Ue(this._isDirected,arguments[0]):k(this._isDirected,e,t,n),i=this._edgeObjs[r];return i&&(e=i.v,t=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],O(this._preds[t],e),O(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this}inEdges(e,t){let n=this._in[e];if(n){let e=Object.values(n);return t?e.filter(e=>e.v===t):e}}outEdges(e,t){let n=this._out[e];if(n){let e=Object.values(n);return t?e.filter(e=>e.w===t):e}}nodeEdges(e,t){let n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}};function Ve(e,t){e[t]?e[t]++:e[t]=1}function O(e,t){--e[t]||delete e[t]}function k(e,t,n,r){let i=``+t,a=``+n;if(!e&&i>a){let e=i;i=a,a=e}return i+Be+a+Be+(r===void 0?Re:r)}function He(e,t,n,r){let i=``+t,a=``+n;if(!e&&i>a){let e=i;i=a,a=e}let o={v:i,w:a};return r&&(o.name=r),o}function Ue(e,t){return k(e,t.v,t.w,t.name)}var We=class{constructor(){let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return Ge(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&Ge(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,n=t._prev;for(;n!==t;)e.push(JSON.stringify(n,Ke)),n=n._prev;return`[`+e.join(`, `)+`]`}};function Ge(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Ke(e,t){if(e!==`_next`&&e!==`_prev`)return t}var qe=()=>1;function Je(e,t){if(e.nodeCount()<=1)return[];let n=M(e,t||qe);return A(n.graph,n.buckets,n.zeroIndex).flatMap(t=>e.outEdges(t.v,t.w))}function A(e,t,n){let r=[],i=t[t.length-1],a=t[0],o;for(;e.nodeCount();){for(;o=a.dequeue();)j(e,t,n,o);for(;o=i.dequeue();)j(e,t,n,o);if(e.nodeCount()){for(let i=t.length-2;i>0;--i)if(o=t[i].dequeue(),o){r=r.concat(j(e,t,n,o,!0));break}}}return r}function j(e,t,n,r,i){let a=i?[]:void 0;return e.inEdges(r.v).forEach(r=>{let o=e.edge(r),s=e.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,N(t,n,s)}),e.outEdges(r.v).forEach(r=>{let i=e.edge(r),a=e.node(r.w);a.in-=i,N(t,n,a)}),e.removeNode(r.v),a}function M(e,t){let n=new D,r=0,i=0;e.nodes().forEach(e=>{n.setNode(e,{v:e,in:0,out:0})}),e.edges().forEach(e=>{let a=n.edge(e.v,e.w)||0,o=t(e),s=a+o;n.setEdge(e.v,e.w,s),i=Math.max(i,n.node(e.v).out+=o),r=Math.max(r,n.node(e.w).in+=o)});let a=Ye(i+r+3).map(()=>new We),o=r+1;return n.nodes().forEach(e=>{N(a,o,n.node(e))}),{graph:n,buckets:a,zeroIndex:o}}function N(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}function Ye(e){let t=[];for(let n=0;n<e;n++)t.push(n);return t}function P(e,t,n,r){let i=r;for(;e.hasNode(i);)i=U(r);return n.dummy=t,e.setNode(i,n),i}function Xe(e){let t=new D().setGraph(e.graph());return e.nodes().forEach(n=>{t.setNode(n,e.node(n))}),e.edges().forEach(n=>{let r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function F(e){let t=new D({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function I(e){let t=e.nodes().map(t=>{let n={};return e.outEdges(t).forEach(t=>{n[t.w]=(n[t.w]||0)+e.edge(t).weight}),n});return W(e.nodes(),t)}function L(e){let t=e.nodes().map(t=>{let n={};return e.inEdges(t).forEach(t=>{n[t.v]=(n[t.v]||0)+e.edge(t).weight}),n});return W(e.nodes(),t)}function R(e,t){let n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw Error(`Not possible to find intersection inside of the rectangle`);let c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=s*i/a,l=s):(i<0&&(o=-o),c=o,l=o*a/i),{x:n+c,y:r+l}}function z(e){let t=at(tt(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let r=e.node(n),i=r.rank;i!==void 0&&(t[i][r.order]=n)}),t}function Ze(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MAX_VALUE:n}),n=V(Math.min,t);e.nodes().forEach(t=>{let r=e.node(t);Object.hasOwn(r,`rank`)&&(r.rank-=n)})}function Qe(e){let t=e.nodes().map(t=>e.node(t).rank).filter(e=>e!==void 0),n=V(Math.min,t),r=[];e.nodes().forEach(t=>{let i=e.node(t).rank-n;r[i]||(r[i]=[]),r[i].push(t)});let i=0,a=e.graph().nodeRankFactor;Array.from(r).forEach((t,n)=>{t===void 0&&n%a!==0?--i:t!==void 0&&i&&t.forEach(t=>{e.node(t).rank+=i})})}function $e(e,t,n,r){let i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),P(e,`border`,i,t)}var et=65535;function B(e,t=et){let n=[];for(let r=0;r<e.length;r+=t){let i=e.slice(r,r+t);n.push(i)}return n}function V(e,t){if(t.length>et){let n=B(t);return e.apply(null,n.map(t=>e.apply(null,t)))}return e.apply(null,t)}function tt(e){let t=e.nodes().map(t=>{let n=e.node(t).rank;return n===void 0?Number.MIN_VALUE:n});return V(Math.max,t)}function nt(e,t){let n={lhs:[],rhs:[]};return e.forEach(e=>{t(e)?n.lhs.push(e):n.rhs.push(e)}),n}function H(e,t){let n=Date.now();try{return t()}finally{console.log(e+` time: `+(Date.now()-n)+`ms`)}}function rt(e,t){return t()}var it=0;function U(e){let t=++it;return e+String(t)}function at(e,t,n=1){t??(t=e,e=0);let r=e=>e<t;n<0&&(r=e=>t<e);let i=[];for(let t=e;r(t);t+=n)i.push(t);return i}function ot(e,t){let n={};for(let r of t)e[r]!==void 0&&(n[r]=e[r]);return n}function st(e,t){let n=t;if(typeof t==`string`){let e=t;n=t=>t[e]}return Object.entries(e).reduce((e,[t,r])=>(e[t]=n(r,t),e),{})}function W(e,t){return e.reduce((e,n,r)=>(e[n]=t[r],e),{})}var G={addBorderNode:$e,addDummyNode:P,applyWithChunking:V,asNonCompoundGraph:F,buildLayerMatrix:z,intersectRect:R,mapValues:st,maxRank:tt,normalizeRanks:Ze,notime:rt,partition:nt,pick:ot,predecessorWeights:L,range:at,removeEmptyRanks:Qe,simplify:Xe,successorWeights:I,time:H,uniqueId:U,zipObject:W};function K(e){(e.graph().acyclicer===`greedy`?Je(e,t(e)):lt(e)).forEach(t=>{let n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,U(`rev`))});function t(e){return t=>e.edge(t).weight}}function ct(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}function lt(e){let t=[],n={},r={};function i(a){Object.hasOwn(r,a)||(r[a]=!0,n[a]=!0,e.outEdges(a).forEach(e=>{Object.hasOwn(n,e.w)?t.push(e):i(e.w)}),delete n[a])}return e.nodes().forEach(i),t}function ut(e){e.graph().dummyChains=[],e.edges().forEach(t=>q(e,t))}function q(e,t){let n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),c=s.labelRank;if(a===r+1)return;e.removeEdge(t);let l,u,d=0;for(++r;r<a;++d,++r)s.points=[],u={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},l=P(e,`edge`,u,`_d`),r===c&&(u.width=s.width,u.height=s.height,u.dummy=`edge-label`,u.labelpos=s.labelpos),e.setEdge(n,l,{weight:s.weight},o),d===0&&e.graph().dummyChains.push(l),n=l;e.setEdge(n,i,{weight:s.weight},o)}function dt(e){e.graph().dummyChains.forEach(t=>{let n=e.node(t),r=n.edgeLabel;e.setEdge(n.edgeObj,r);let i;for(;n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy===`edge-label`&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}function ft(e){function t(n){let r=e.node(n);if(r&&Object.prototype.hasOwnProperty.call(r,`rank`))return r.rank;let i=e.outEdges(n)||[];if(!i.length)return r&&(r.rank=0),0;let a=i.map(n=>e.node(n.w)?t(n.w)-e.edge(n).minlen:1/0),o=V(Math.min,a);return o===1/0&&(o=0),r&&(r.rank=o),o}(e.sources()||[]).forEach(t)}function pt(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}function mt(e){ht(e);let t=new D;e.nodes().forEach(e=>{t.setNode(e,{})});let n=e.nodes();if(!n.length)return t;let r=n[0],i=/* @__PURE__ */ new Set([r]);for(;i.size<n.length;){let r=gt(e,i);if(!r){let e=n.find(e=>!i.has(e));i.add(e),t.setNode(e,{});continue}let{edgeObject:a,delta:o,attachFrom:s,attachTo:c}=r;_t(e,i,s,o),t.setEdge(a.v,a.w,{}),i.add(c)}return t}function ht(e){e.nodes().forEach(t=>{let n=e.node(t)||{};Object.prototype.hasOwnProperty.call(n,`rank`)||(n.rank=0,e.setNode(t,n))})}function gt(e,t){let n=null;return e.edges().forEach(r=>{let i=t.has(r.v);if(i===t.has(r.w))return;let a=pt(e,r),o=Math.abs(a);if(!n||o<n.absoluteSlack){let e=i?r.v:r.w,t=i?r.w:r.v;n={edgeObject:r,delta:i?a:-a,attachFrom:e,attachTo:t,absoluteSlack:o}}}),n}function _t(e,t,n,r){r&&e.nodes().forEach(n=>{if(!t.has(n)){let t=e.node(n);t.rank+=r}})}function vt(e){let t=Xe(e);return ft(t),t.nodes().forEach(n=>{let r=t.node(n),i=e.node(n)||{};i.rank=r.rank,e.setNode(n,i)}),e}function yt(e,t){}function bt(e,t){}function xt(e,t,n){return 0}function St(e){return null}function Ct(e,t){return null}vt.initLowLimValues=yt,vt.initCutValues=bt,vt.calcCutValue=xt,vt.leaveEdge=St,vt.enterEdge=Ct;var wt=ft;function Tt(e){let t=e.graph().ranker;if(t instanceof Function)return t(e);switch(e.graph().ranker){case`network-simplex`:Ot(e);break;case`tight-tree`:Dt(e);break;case`longest-path`:Et(e);break;case`none`:break;default:Ot(e)}}var Et=wt;function Dt(e){wt(e),mt(e)}function Ot(e){vt(e)}function kt(e){let t=At(e);e.graph().dummyChains.forEach(n=>{let r=e.node(n),i=r.edgeObj,a=J(e,t,i.v,i.w),o=a.path,s=a.lca,c=0,l=o[c],u=!0,d=n;for(;d!==i.w;){if(r=e.node(d),u){for(;(l=o[c])!==s&&e.node(l).maxRank<r.rank;)c++;l===s&&(u=!1)}if(!u){for(;c<o.length-1&&e.node(l=o[c+1]).minRank<=r.rank;)c++;l=o[c]}e.setParent(d,l),d=e.successors(d)[0]}})}function J(e,t,n,r){let i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),c,l;c=n;do c=e.parent(c),i.push(c);while(c&&(t[c].low>o||s>t[c].lim));for(l=c,c=r;(c=e.parent(c))!==l;)a.push(c);return{path:i.concat(a.reverse()),lca:l}}function At(e){let t={},n=0;function r(i){let a=n;e.children(i).forEach(r),t[i]={low:a,lim:n++}}return e.children().forEach(r),t}function jt(e){let t=G.addDummyNode(e,`root`,{},`_root`),n=Mt(e),r=Object.values(n),i=G.applyWithChunking(Math.max,r)-1,a=2*i+1;e.graph().nestingRoot=t,e.edges().forEach(t=>{e.edge(t).minlen*=a});let o=Nt(e)+1;e.children().forEach(r=>{Y(e,t,a,o,i,n,r)}),e.graph().nodeRankFactor=a}function Y(e,t,n,r,i,a,o){let s=e.children(o);if(!s.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:n});return}let c=G.addBorderNode(e,`_bt`),l=G.addBorderNode(e,`_bb`),u=e.node(o);e.setParent(c,o),u.borderTop=c,e.setParent(l,o),u.borderBottom=l,s.forEach(s=>{Y(e,t,n,r,i,a,s);let u=e.node(s),d=u.borderTop?u.borderTop:s,f=u.borderBottom?u.borderBottom:s,p=u.borderTop?r:2*r,m=d===f?i-a[o]+1:1;e.setEdge(c,d,{weight:p,minlen:m,nestingEdge:!0}),e.setEdge(f,l,{weight:p,minlen:m,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,c,{weight:0,minlen:i+a[o]})}function Mt(e){let t={};function n(r,i){let a=e.children(r);a&&a.length&&a.forEach(e=>n(e,i+1)),t[r]=i}return e.children().forEach(e=>n(e,1)),t}function Nt(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function X(e){let t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(t=>{e.edge(t).nestingEdge&&e.removeEdge(t)})}function Pt(e){function t(n){let r=e.children(n),i=e.node(n);if(r.length&&r.forEach(t),Object.hasOwn(i,`minRank`)){i.borderLeft=[],i.borderRight=[];for(let t=i.minRank,r=i.maxRank+1;t<r;++t)Ft(e,`borderLeft`,`_bl`,n,i,t),Ft(e,`borderRight`,`_br`,n,i,t)}}e.children().forEach(t)}function Ft(e,t,n,r,i,a){let o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],c=P(e,`border`,o,n);i[t][a]=c,e.setParent(c,r),s&&e.setEdge(s,c,{weight:1})}function It(e){let t=e.graph().rankdir.toLowerCase();(t===`lr`||t===`rl`)&&Rt(e)}function Lt(e){let t=e.graph().rankdir.toLowerCase();(t===`bt`||t===`rl`)&&Bt(e),(t===`lr`||t===`rl`)&&(Ht(e),Rt(e))}function Rt(e){e.nodes().forEach(t=>{zt(e.node(t))}),e.edges().forEach(t=>{zt(e.edge(t))})}function zt(e){let t=e.width;e.width=e.height,e.height=t}function Bt(e){e.nodes().forEach(t=>{Vt(e.node(t))}),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(Vt),Object.hasOwn(n,`y`)&&Vt(n)})}function Vt(e){e.y=-e.y}function Ht(e){e.nodes().forEach(t=>{Z(e.node(t))}),e.edges().forEach(t=>{let n=e.edge(t);n.points.forEach(Z),Object.hasOwn(n,`x`)&&Z(n)})}function Z(e){let t=e.x;e.x=e.y,e.y=t}var Ut={adjust:It,undo:Lt};function Wt(e){let t={},n=e.nodes().filter(t=>e.children(t).length===0),r=n.map(t=>e.node(t).rank),i=at(V(Math.max,r)+1).map(()=>[]);function a(n){if(t[n])return;t[n]=!0;let r=e.node(n);i[r.rank].push(n),e.successors(n).forEach(a)}return n.sort((t,n)=>e.node(t).rank-e.node(n).rank).forEach(a),i}function Gt(e,t){let n=0;for(let r=1;r<t.length;++r)n+=Kt(e,t[r-1],t[r]);return n}function Kt(e,t,n){let r=W(n,n.map((e,t)=>t)),i=t.flatMap(t=>e.outEdges(t).map(t=>({pos:r[t.w],weight:e.edge(t).weight})).sort((e,t)=>e.pos-t.pos)),a=1;for(;a<n.length;)a<<=1;let o=2*a-1;--a;let s=Array(o).fill(0),c=0;return i.forEach(e=>{let t=e.pos+a;s[t]+=e.weight;let n=0;for(;t>0;)t%2&&(n+=s[t+1]),t=t-1>>1,s[t]+=e.weight;c+=e.weight*n}),c}function qt(e,t=[]){return t.map(t=>{let n=e.inEdges(t);if(!n.length)return{v:t};let r=n.reduce((t,n)=>{let r=e.edge(n),i=e.node(n.v);return{sum:t.sum+r.weight*i.order,weight:t.weight+r.weight}},{sum:0,weight:0});return{v:t,barycenter:r.sum/r.weight,weight:r.weight}})}function Jt(e,t){let n={};return e.forEach((e,t)=>{let r=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};e.barycenter!==void 0&&(r.barycenter=e.barycenter,r.weight=e.weight)}),t.edges().forEach(e=>{let t=n[e.v],r=n[e.w];t!==void 0&&r!==void 0&&(r.indegree++,t.out.push(r))}),Yt(Object.values(n).filter(e=>!e.indegree))}function Yt(e){let t=[];function n(e){return t=>{t.merged||(t.barycenter===void 0||e.barycenter===void 0||t.barycenter>=e.barycenter)&&Xt(e,t)}}function r(t){return n=>{n.in.push(t),--n.indegree===0&&e.push(n)}}for(;e.length;){let i=e.pop();t.push(i),i.in.reverse().forEach(n(i)),i.out.forEach(r(i))}return t.filter(e=>!e.merged).map(e=>ot(e,[`vs`,`i`,`barycenter`,`weight`]))}function Xt(e,t){let n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}function Q(e,t){let n=nt(e,e=>Object.hasOwn(e,`barycenter`)),r=n.lhs,i=n.rhs.sort((e,t)=>t.i-e.i),a=[],o=0,s=0,c=0;r.sort(Qt(!!t)),c=Zt(a,i,c),r.forEach(e=>{c+=e.vs.length,a.push(e.vs),o+=e.barycenter*e.weight,s+=e.weight,c=Zt(a,i,c)});let l={vs:a.flat(!0)};return s&&(l.barycenter=o/s,l.weight=s),l}function Zt(e,t,n){let r;for(;t.length&&(r=t[t.length-1]).i<=n;)t.pop(),e.push(r.vs),n++;return n}function Qt(e){return(t,n)=>t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}function $t(e,t,n,r){let i=e.children(t),a=e.node(t),o=a?a.borderLeft:void 0,s=a?a.borderRight:void 0,c={};o&&(i=i.filter(e=>e!==o&&e!==s));let l=qt(e,i);l.forEach(t=>{if(e.children(t.v).length){let i=$t(e,t.v,n,r);c[t.v]=i,Object.hasOwn(i,`barycenter`)&&tn(t,i)}});let u=Jt(l,n);en(u,c);let d=Q(u,r);if(o&&(d.vs=[o,d.vs,s].flat(!0),e.predecessors(o).length)){let t=e.node(e.predecessors(o)[0]),n=e.node(e.predecessors(s)[0]);Object.hasOwn(d,`barycenter`)||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+t.order+n.order)/(d.weight+2),d.weight+=2}return d}function en(e,t){e.forEach(e=>{e.vs=e.vs.flatMap(e=>t[e]?t[e].vs:e)})}function tn(e,t){e.barycenter===void 0?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}function nn(e,t,n,r){r||=e.nodes();let i=rn(e),a=new D({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(t=>e.node(t));return r.forEach(r=>{let o=e.node(r),s=e.parent(r);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(a.setNode(r),a.setParent(r,s||i),e[n](r).forEach(t=>{let n=t.v===r?t.w:t.v,i=a.edge(n,r),o=i?i.weight:0;a.setEdge(n,r,{weight:e.edge(t).weight+o})}),Object.hasOwn(o,`minRank`)&&a.setNode(r,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),a}function rn(e){let t;for(;e.hasNode(t=U(`_root`)););return t}function an(e,t,n){let r={},i;n.forEach(n=>{let a=e.parent(n),o,s;for(;a;){if(o=e.parent(a),o?(s=r[o],r[o]=a):(s=i,i=a),s&&s!==a){t.setEdge(s,a);return}a=o}})}function on(e,t={}){if(typeof t.customOrder==`function`){t.customOrder(e,on);return}let n=tt(e),r=sn(e,at(1,n+1),`inEdges`),i=sn(e,at(n-1,-1,-1),`outEdges`),a=Wt(e);if(ln(e,a),t.disableOptimalOrderHeuristic)return;let o=1/0,s,c=t.constraints||[];for(let t=0,n=0;n<4;++t,++n){cn(t%2==0?r:i,t%4>=2,c),a=z(e);let l=Gt(e,a);l<o?(o=l,n=0,s=structuredClone(a)):l===o&&(s=structuredClone(a))}ln(e,s)}function sn(e,t,n){let r=/* @__PURE__ */ new Map;function i(e,t){r.has(e)||r.set(e,[]),r.get(e).push(t)}for(let t of e.nodes()){let n=e.node(t);if(typeof n.rank==`number`&&i(n.rank,t),typeof n.minRank==`number`&&typeof n.maxRank==`number`)for(let e=n.minRank;e<=n.maxRank;e++)e!==n.rank&&i(e,t)}return t.map(t=>nn(e,t,n,r.get(t)||[]))}function cn(e,t,n){let r=new D;e.forEach(e=>{n.forEach(e=>r.setEdge(e.left,e.right));let i=e.graph().root,a=$t(e,i,r,t);a.vs.forEach((t,n)=>{e.node(t).order=n}),an(e,r,a.vs)})}function ln(e,t){Object.values(t).forEach(t=>{t.forEach((t,n)=>{e.node(t).order=n})})}function un(e,t){let n={};function r(t,r){let i=0,a=0,o=t.length,s=r[r.length-1];return r.forEach((t,c)=>{let l=fn(e,t),u=l?e.node(l).order:o;(l||t===s)&&(r.slice(a,c+1).forEach(t=>{e.predecessors(t).forEach(r=>{let a=e.node(r),o=a.order;(o<i||u<o)&&!(a.dummy&&e.node(t).dummy)&&pn(n,r,t)})}),a=c+1,i=u)}),r}return t.length&&t.reduce(r),n}function dn(e,t){let n={};function r(t,r,i,a,o){let s;at(r,i).forEach(r=>{s=t[r],e.node(s).dummy&&e.predecessors(s).forEach(t=>{let r=e.node(t);r.dummy&&(r.order<a||r.order>o)&&pn(n,t,s)})})}function i(t,n){let i=-1,a,o=0;return n.forEach((s,c)=>{if(e.node(s).dummy===`border`){let t=e.predecessors(s);t.length&&(a=e.node(t[0]).order,r(n,o,c,i,a),o=c,i=a)}r(n,o,n.length,a,t.length)}),n}return t.length&&t.reduce(i),n}function fn(e,t){if(e.node(t).dummy)return e.predecessors(t).find(t=>e.node(t).dummy)}function pn(e,t,n){if(t>n){let e=t;t=n,n=e}let r=e[t];r||(e[t]=r={}),r[n]=!0}function $(e,t,n){if(t>n){let e=t;t=n,n=e}return!!e[t]&&Object.hasOwn(e[t],n)}function mn(e,t,n,r){let i={},a={},o={};return t.forEach(e=>{e.forEach((e,t)=>{i[e]=e,a[e]=e,o[e]=t})}),t.forEach(e=>{let t=-1;e.forEach(e=>{let s=r(e);if(s.length){s=s.sort((e,t)=>o[e]-o[t]);let r=(s.length-1)/2;for(let c=Math.floor(r),l=Math.ceil(r);c<=l;++c){let r=s[c];a[e]===e&&t<o[r]&&!$(n,e,r)&&(a[r]=e,a[e]=i[e]=i[r],t=o[r])}}})}),{root:i,align:a}}function hn(e,t,n,r,i){let a={},o=gn(e,t,n,i),s=i?`borderLeft`:`borderRight`;function c(e,t){let n=o.nodes().slice(),r={},i=n.pop();for(;i;){if(r[i])e(i);else{r[i]=!0,n.push(i);for(let e of t(i))n.push(e)}i=n.pop()}}function l(e){a[e]=o.inEdges(e).reduce((e,t)=>Math.max(e,a[t.v]+o.edge(t)),0)}function u(t){let n=o.outEdges(t).reduce((e,t)=>Math.min(e,a[t.w]-o.edge(t)),1/0),r=e.node(t);n!==1/0&&r.borderType!==s&&(a[t]=Math.max(a[t],n))}return c(l,o.predecessors.bind(o)),c(u,o.successors.bind(o)),Object.keys(r).forEach(e=>{a[e]=a[n[e]]}),a}function gn(e,t,n,r){let i=new e.constructor,a=e.graph(),o=xn(a.nodesep,a.edgesep,r);return t.forEach(t=>{let r;t.forEach(t=>{let a=n[t];if(i.setNode(a),r){let s=n[r],c=i.edge(s,a);i.setEdge(s,a,Math.max(o(e,t,r),c||0))}r=t})}),i}function _n(e,t){return Object.values(t).reduce((t,n)=>{let r=-1/0,i=1/0;Object.entries(n).forEach(([t,n])=>{let a=Sn(e,t)/2;r=Math.max(n+a,r),i=Math.min(n-a,i)});let a=r-i;return a<t[0]&&(t=[a,n]),t},[1/0,null])[1]}function vn(e,t){let n=Object.values(t),r=V(Math.min,n),i=V(Math.max,n);[`u`,`d`].forEach(n=>{[`l`,`r`].forEach(a=>{let o=n+a,s=e[o];if(s===t)return;let c=Object.values(s),l=r-V(Math.min,c);a!==`l`&&(l=i-V(Math.max,c)),l&&(s=st(s,e=>e+l),e[o]=s)})})}function yn(e,t){return st(e.ul,(n,r)=>{if(t)return e[t.toLowerCase()][r];let i=Object.values(e).map(e=>e[r]).sort((e,t)=>e-t);return(i[1]+i[2])/2})}function bn(e){let t=z(e),n=Object.assign(un(e,t),dn(e,t)),r={},i;return[`u`,`d`].forEach(a=>{i=a===`u`?t:Object.values(t).reverse(),[`l`,`r`].forEach(t=>{let o=i;t===`r`&&(o=o.map(e=>Object.values(e).reverse()));let s=(a===`u`?e.predecessors:e.successors).bind(e),c=mn(e,o,n,s),l=hn(e,o,c.root,c.align,t===`r`);t===`r`&&(l=st(l,e=>-e)),r[a+t]=l})}),vn(r,_n(e,r)),yn(r,e.graph().align)}function xn(e,t,n){return(r,i,a)=>{let o=r.node(i),s=r.node(a),c=0,l;if(c+=o.width/2,Object.hasOwn(o,`labelpos`))switch(o.labelpos.toLowerCase()){case`l`:l=-o.width/2;break;case`r`:l=o.width/2}if(l&&(c+=n?l:-l),l=0,c+=(o.dummy?t:e)/2,c+=(s.dummy?t:e)/2,c+=s.width/2,Object.hasOwn(s,`labelpos`))switch(s.labelpos.toLowerCase()){case`l`:l=s.width/2;break;case`r`:l=-s.width/2}return l&&(c+=n?l:-l),l=0,c}}function Sn(e,t){return e.node(t).width}function Cn(e){let t=F(e);wn(t);let n=bn(t);Object.entries(n).forEach(([t,n])=>{e.node(t).x=n})}function wn(e){let t=z(e),n=e.graph().ranksep,r=0;t.forEach(t=>{let i=t.reduce((t,n)=>{let r=e.node(n).height;return t>r?t:r},0);t.forEach(t=>{e.node(t).y=r+i/2}),r+=i+n})}function Tn(e,t={}){let n=t.debugTiming?H:rt;return n(`layout`,()=>{let r=n(` buildLayoutGraph`,()=>In(e));return n(` runLayout`,()=>En(r,n,t)),n(` updateInputGraph`,()=>Dn(e,r)),r})}function En(e,t,n){t(` makeSpaceForEdgeLabels`,()=>Ln(e)),t(` removeSelfEdges`,()=>qn(e)),t(` acyclic`,()=>K(e)),t(` nestingGraph.run`,()=>jt(e)),t(` rank`,()=>Tt(F(e))),t(` injectEdgeLabelProxies`,()=>Rn(e)),t(` removeEmptyRanks`,()=>Qe(e)),t(` nestingGraph.cleanup`,()=>X(e)),t(` normalizeRanks`,()=>Ze(e)),t(` assignRankMinMax`,()=>zn(e)),t(` removeEdgeLabelProxies`,()=>Bn(e)),t(` normalize.run`,()=>ut(e)),t(` parentDummyChains`,()=>kt(e)),t(` addBorderSegments`,()=>Pt(e)),t(` order`,()=>on(e,n)),t(` insertSelfEdges`,()=>Jn(e)),t(` adjustCoordinateSystem`,()=>Ut.adjust(e)),t(` position`,()=>Cn(e)),t(` positionSelfEdges`,()=>Yn(e)),t(` removeBorderNodes`,()=>Kn(e)),t(` normalize.undo`,()=>dt(e)),t(` fixupEdgeLabelCoords`,()=>Wn(e)),t(` undoCoordinateSystem`,()=>Ut.undo(e)),t(` translateGraph`,()=>Vn(e)),t(` assignNodeIntersects`,()=>Un(e)),t(` reversePoints`,()=>Gn(e)),t(` acyclic.undo`,()=>ct(e))}function Dn(e,t){e.nodes().forEach(n=>{let r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,r.order=i.order,r.rank=i.rank,t.children(n).length&&(r.width=i.width,r.height=i.height))}),e.edges().forEach(n=>{let r=e.edge(n),i=t.edge(n);r.points=i.points,Object.hasOwn(i,`x`)&&(r.x=i.x,r.y=i.y)});let n=t.graph(),r=e.graph();r.width=n.width,r.height=n.height}var On=[`nodesep`,`edgesep`,`ranksep`,`marginx`,`marginy`],kn={ranksep:50,edgesep:20,nodesep:50,rankdir:`tb`},An=[`acyclicer`,`ranker`,`rankdir`,`align`],jn=[`width`,`height`,`rank`],Mn={width:0,height:0},Nn=[`minlen`,`weight`,`width`,`height`,`labeloffset`],Pn={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:`r`},Fn=[`labelpos`,`arrowshape`];function In(e){let t=Zn(e.graph()),n={...kn,...Xn(t,On),...ot(t,An)},r=new D({multigraph:!0,compound:!0});return r.setGraph(n),e.nodes().forEach(t=>{let n=Xn(Zn(e.node(t)),jn);Object.keys(Mn).forEach(e=>{n[e]===void 0&&(n[e]=Mn[e])}),r.setNode(t,n),r.setParent(t,e.parent(t))}),e.edges().forEach(t=>{let n=Zn(e.edge(t));r.setEdge(t,{...Pn,...Xn(n,Nn),...ot(n,Fn)})}),r}function Ln(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!==`c`&&(t.rankdir===`TB`||t.rankdir===`BT`?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function Rn(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let n=e.node(t.v);P(e,`edge-proxy`,{rank:(e.node(t.w).rank-n.rank)/2+n.rank,e:t},`_ep`)}})}function zn(e){let t=0;e.nodes().forEach(n=>{let r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=Math.max(t,r.maxRank))}),e.graph().maxRank=t}function Bn(e){e.nodes().forEach(t=>{let n=e.node(t);n.dummy===`edge-proxy`&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function Vn(e){let t=1/0,n=0,r=1/0,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function c(e){let a=e.x,o=e.y,s=e.width,c=e.height;t=Math.min(t,a-s/2),n=Math.max(n,a+s/2),r=Math.min(r,o-c/2),i=Math.max(i,o+c/2)}e.nodes().forEach(t=>c(e.node(t))),e.edges().forEach(t=>{let n=e.edge(t);Object.hasOwn(n,`x`)&&c(n)}),t-=o,r-=s,e.nodes().forEach(n=>{let i=e.node(n);i.x-=t,i.y-=r}),e.edges().forEach(n=>{let i=e.edge(n);i.points.forEach(e=>{e.x-=t,e.y-=r}),Object.hasOwn(i,`x`)&&(i.x-=t),Object.hasOwn(i,`y`)&&(i.y-=r)}),a.width=n-t+o,a.height=i-r+s}function Hn(e,t,n){if(!n||!t)return e;let r=t.x-e.x,i=t.y-e.y,a=Math.sqrt(r*r+i*i);if(!a||a<=n)return e;let o=n/a;return{x:e.x+r*o,y:e.y+i*o}}function Un(e){e.edges().forEach(t=>{let n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;!n.points||!n.points.length?(n.points=[],a=i,o=r):(a=n.points[0],o=n.points[n.points.length-1]);let s=R(r,a),c=R(i,o),l=n.points.length?n.points[0]:a,u=n.points.length?n.points[n.points.length-1]:o,d=n.arrowshape,f=d===`normal`||d===`vee`,p=!!n.reversed,m=s,h=c;f&&(p?m=Hn(s,l,4):h=Hn(c,u,4)),n.points.unshift(m),n.points.push(h)})}function Wn(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,`x`))switch((n.labelpos===`l`||n.labelpos===`r`)&&(n.width-=n.labeloffset),n.labelpos){case`l`:n.x-=n.width/2+n.labeloffset;break;case`r`:n.x+=n.width/2+n.labeloffset}})}function Gn(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function Kn(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(n.borderLeft[n.borderLeft.length-1]),o=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy===`border`&&e.removeNode(t)})}function qn(e){e.edges().forEach(t=>{if(t.v===t.w){let n=e.node(t.v);n.selfEdges||=[],n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function Jn(e){z(e).forEach(t=>{let n=0;t.forEach((t,r)=>{let i=e.node(t);i.order=r+n,(i.selfEdges||[]).forEach(t=>{P(e,`selfedge`,{width:t.label.width,height:t.label.height,rank:i.rank,order:r+ ++n,e:t.e,label:t.label},`_se`)}),delete i.selfEdges})})}function Yn(e){e.nodes().forEach(t=>{let n=e.node(t);if(n.dummy===`selfedge`){let r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function Xn(e,t){return st(ot(e,t),Number)}function Zn(e){let t={};return e&&Object.entries(e).forEach(([e,n])=>{let r=e;typeof r==`string`&&(r=r.toLowerCase()),t[r]=n}),t}var Qn={rankDirection:`TB`,nodeSeparation:50,rankSeparation:50,edgeSeparation:10,align:void 0,nodeWidth:100,nodeHeight:40,curvedEdges:!1,padding:20,arrowShape:`normal`,arrowSize:10};function $n(e){return e.length?e.map((e,t)=>`${t===0?`M`:`L`} ${e.x} ${e.y}`).join(` `):``}function er(e){if(!e.length)return``;if(e.length===1){let t=e[0];return`M ${t.x} ${t.y}`}if(e.length===2)return`M ${e[0].x} ${e[0].y} L ${e[1].x} ${e[1].y}`;let[t]=e,n=`M ${t.x} ${t.y}`;for(let t=1;t<e.length-1;t+=1){e[t-1];let r=e[t],i=e[t+1],a=r.x,o=r.y,s=(r.x+i.x)/2,c=(r.y+i.y)/2;n+=` Q ${a} ${o} ${s} ${c}`}let r=e[e.length-1];return n+=` L ${r.x} ${r.y}`,n}function tr(e){let{nodes:t,edges:n,configuration:r}=e,o=w(null),s=w(null),c=`dag-arrow-${a()}`;function l(e,t,n){s.value=null,o.value=null;let r={...Qn,...n},l=new D({multigraph:!0,compound:!0});l.setGraph({rankdir:r.rankDirection,nodesep:r.nodeSeparation,ranksep:r.rankSeparation,edgesep:r.edgeSeparation,align:r.align}),e.forEach(e=>{l.setNode(e.id,{label:e.label,width:e.width??r.nodeWidth,height:e.height??r.nodeHeight})}),t.forEach(e=>{l.setEdge(e.from,e.to,{weight:e.weight??1,minlen:e.minLength??1,arrowShape:r.arrowShape??`normal`})}),Tn(l);let u=e.map(e=>{let t=l.node(e.id);return{id:e.id,label:e.label,x:t.x,y:t.y,width:t.width,height:t.height,original:e}}),d=l.edges().map(e=>{let n=l.edge(e),i=n.points||[];if(!i.length)return null;let o=r.curvedEdges?er(i):$n(i),s=r.arrowShape===`undirected`?null:`url(#${c})`,u=t.find(t=>t?.from===e.v&&t?.to===e.w);return{id:`${e.v}->${e.w}->${a()}`,from:e.v,to:e.w,points:i,pathData:o,markerEnd:s,original:{...u,...n}}}).filter(Boolean),f=r.padding;if(!u.length){o.value={nodes:[],edges:d,viewBox:`0 0 0 0`,arrowShape:r.arrowShape,arrowSize:r.arrowSize};return}let p=u.flatMap(e=>[e.x-e.width/2,e.x+e.width/2]),m=u.flatMap(e=>[e.y-e.height/2,e.y+e.height/2]),h=Math.min(...p)-f,g=Math.max(...p)+f,_=Math.min(...m)-f,ee=Math.max(...m)+f;o.value={nodes:u,edges:d.map(e=>({...e,midpoint:e.pathData?i(e.pathData):{x:0,y:0}})),viewBox:`${h} ${_} ${g-h} ${ee-_}`,arrowShape:r.arrowShape,arrowSize:r.arrowSize}}return Fe(()=>{try{l(E(t)||[],E(n)||[],E(r)||{})}catch(e){console.error(`[useDag] layout error:`,e),s.value=e,o.value=null}}),{layoutData:o,lastError:s,arrowMarkerIdentifier:c,recomputeLayout:()=>{l(E(t)||[],E(n)||[],E(r)||{})}}}var nr=/* @__PURE__ */ e({default:()=>Ir}),rr=[`id`],ir=[`id`],ar={key:1,class:`dag-chart-error`},or={style:{position:`relative`}},sr=[`viewBox`,`xmlns`,`aria-describedby`],cr={key:0},lr=[`id`,`width`,`height`],ur=[`cx`,`cy`,`r`,`fill`],dr=[`x`,`y`,`width`,`height`,`fill`],fr={key:2},pr=[`id`,`markerWidth`,`markerHeight`,`refX`,`refY`],mr=[`d`,`fill`,`stroke`],hr=[`d`,`fill`,`stroke`],gr={class:`vue-ui-dag-edges`},_r=[`data-a11y-midpoint-id`,`aria-label`,`onMouseenter`],vr={class:`vue-ui-dag-nodes`},yr=[`onClick`,`onMouseenter`,`onMouseleave`],br=[`data-a11y-node-id`,`aria-label`],xr=[`x`,`y`,`width`,`height`],Sr={class:`vue-ui-dag-edges`},Cr=[`d`,`stroke-width`,`marker-end`],wr={class:`vue-ui-dag-node-labels`},Tr=[`onClick`,`onMouseenter`,`onMouseleave`],Er=[`x`,`y`,`font-size`,`fill`,`font-weight`],Dr=[`x`,`y`,`font-size`,`fill`,`font-weight`,`innerHTML`],Or={key:1},kr={key:1,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},Ar={key:6,class:`vue-data-ui-watermark`},jr=[`data-position`],Mr={key:0},Nr=[`data-position`],Pr={key:0},Fr=1.5,Ir=/*#__PURE__*/ g({__name:`vue-ui-dag`,props:{dataset:{type:Object,default(){return{nodes:[],edges:[]}}},config:{type:Object,default(){return{}}}},emits:[`onNodeClick`,`onMidpointEnter`,`onMidpointLeave`,`copyAlt`,`rotate`],setup(e,{expose:i,emit:g}){let Fe=Se(()=>import(`./PenAndPaper-BsBFp16i.js`).then(e=>e.t)),Re=Se(()=>import(`./UserOptions-BSJ_S_us.js`).then(e=>e.n)),ze=Se(()=>import(`./PackageVersion-ATrKWi8V.js`).then(e=>e.t)),{vue_ui_dag:Be}=t(),D=e,Ve=g,O=w(null),k=w(a()),He=w(null),Ue=w(null),We=w(null),Ge=w(0),Ke=w(0),qe=w(!1),Je=w(!1),A=w(null),j=w(null),M=w(null),N=w(null),Ye=w(null),P=w(`pointer`),Xe=w(!1),F=w(ht()),I=v(()=>F.value.style.chart.nodes),L=v(()=>F.value.style.chart.edges),R=v(()=>F.value.style.chart.midpoints),z=v(()=>F.value.style.chart);m({config:()=>F.value,dataset:()=>D.dataset,component:`VueUiDag`,rules:[h.noHint]});let Ze=v(()=>F.value.userOptions.useCursorPointer),Qe=w(F.value.style.chart.width),$e=w(F.value.style.chart.height),et=w({x:0,y:0}),B=w(null),V=w(null),tt=w({left:`0px`,top:`0px`}),nt=w(`top`),H=w(!1),rt=w({x:0,y:0}),it=w({x:0,y:0}),U=w(null),at=w(null),ot=w({left:`0px`,top:`0px`}),st=w(`top`),W=w(!1),G=w(!1),{svgRef:K}=pe({config:z.value.title}),{userOptionsVisible:ct,setUserOptionsVisibility:lt,keepUserOptionState:ut}=fe({config:F.value}),q=w(F.value.style.chart.layout.rankDirection),dt=v(()=>c({defaultConfig:{userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,nodes:{stroke:`#CCCCCC`,backgroundColor:`#DDDDDD50`},edges:{stroke:`#CCCCCC`},midpoints:{stroke:`#CCCCCC`,fill:`#CCCCCC`}}}},userConfig:F.value.skeletonConfig??{}})),{loading:ft,FINAL_DATASET:pt,manualLoading:mt}=f({...Ne(D),FINAL_CONFIG:F,prepareConfig:ht,skeletonDataset:D.config?.skeletonDataset??{nodes:[{id:`A`,label:``},{id:`B`,label:``},{id:`C`,label:``}],edges:[{from:`A`,to:`B`},{from:`A`,to:`C`}]},skeletonConfig:c({defaultConfig:F.value,userConfig:dt.value})});function ht(){return _(D.config,Be,he)}let gt=v(()=>F.value.debug);Ae(async()=>{d(D.dataset)&&(s({componentName:`VueUiDag`,type:`dataset`,debug:gt.value}),Je.value=!1,mt.value=!0),(!D.dataset.nodes||D.dataset.nodes.length===0)&&(s({componentName:`VueUiDag`,type:`datasetAttributeEmpty`,property:`nodes`,index:0,debug:gt.value}),Je.value=!1,mt.value=!0),Je.value=!0,await Te(),rn()}),Pe(()=>D.config,async e=>{ft.value||(F.value=ht()),ct.value=!F.value.userOptions.showOnChartHover,Ge.value+=1,q.value=z.value.layout.rankDirection,Qe.value=z.value.width,$e.value=z.value.height,Nt.value=z.value.zoom.active,await Te(),rn()},{deep:!0});let{isPrinting:_t,isImaging:vt,generatePdf:yt,generateImage:bt}=ce({elementId:`dag_${k.value}`,fileName:z.value.title.text||`vue-ui-dag`,options:F.value.userOptions.print}),xt=v(()=>z.value.backgroundColor),St=v(()=>z.value.title),{isCallbackImaging:Ct,isCallbackSvg:wt,generateSvg:Tt,onGenerateImage:Et}=re({svg:K,title:St,legend:null,legendItems:null,backgroundColor:xt,getSvgCallback:()=>F.value.userOptions.callbacks.svg,generateImage:bt});function Dt(){qe.value=!0,lt(!0)}function Ot(){lt(!1),qe.value=!1}function kt({tooltipRef:e,isVisibleRef:t,anchorRef:n,styleRef:r,placementRef:i,offsetRef:a,margin:o=24}){return function(){let s=e.value;if(!s||!t.value)return;let c=s.getBoundingClientRect(),l=window.innerWidth,u=window.innerHeight,d=n.value.x,f=n.value.y,p=a?.value?.x??0,m=a?.value?.y??0,h=f-m-c.height-o,g=d-c.width/2,_=`top`;if(h<o){let e=f+m+o;e+c.height<=u-o?(h=e,_=`bottom`):(h=f-c.height/2,h<o&&(h=o),h+c.height>u-o&&(h=u-c.height-o),_=`center`)}g<o&&(g=o),g+c.width>l-o&&(g=l-c.width-o);let ee=g<=o,te=g+c.width>=l-o;if((ee||te)&&_!==`center`){let e,t,n=d-p-o;l-(d+p)-o>=n?(e=`right`,t=d+p+o):(e=`left`,t=d-p-o-c.width),t>=o&&t+c.width<=l-o&&(g=t,h=f-c.height/2,h<o&&(h=o),h+c.height>u-o&&(h=u-c.height-o),_=e)}i.value=_,r.value={left:`${g}px`,top:`${h}px`}}}let{layoutData:J,lastError:At,arrowMarkerIdentifier:jt}=tr({nodes:v(()=>pt.value.nodes.map(e=>({...e,backgroundColor:e.backgroundColor?r(e.backgroundColor):I.value.backgroundColor,color:e.color?r(e.color):I.value.labels.color}))),edges:v(()=>pt.value.edges),configuration:v(()=>({...z.value.layout,rankDirection:q.value}))});function Y(e){return J.value?J.value.nodes.find(t=>t.id===e):null}v(()=>{if(!J.value)return[];let e=L.value.stroke,t=/* @__PURE__ */ new Set;return J.value.edges.forEach(n=>{t.add({id:n.id,from:n.from,to:n.to,color:n.original?.color||e})}),Array.from(t)});let Mt=v(()=>{let e=Qe.value,t=$e.value,n=Number(e),r=Number(t),i=Number.isFinite(n)&&n>0,a=Number.isFinite(r)&&r>0;return!i&&!a?null:{width:i?n:null,height:a?r:null}}),Nt=w(z.value.zoom.active),{viewBox:X,resetZoom:Pt,setInitialViewBox:Ft,scale:It,zoomByFactor:Lt}=me(K,{x:0,y:0,width:100,height:100},1,Nt,()=>{H.value=!1}),Rt=null;async function zt(e,{smooth:t=!0,duration:r=300,zoomReset:i=!1,zoom:a=null}={}){let o=Y(e);if(!o)return!1;let s=X.value;if(!s)return!1;let c={x:Number(s.x),y:Number(s.y),width:Number(s.width),height:Number(s.height)},u=It.value,d=c.width,f=c.height,p=u;if(Number.isFinite(a)&&a>0||i){Pt(!1);let e=X.value,t=Number.isFinite(a)&&a>0?a/100:1;d=Number(e.width)/t,f=Number(e.height)/t,p=t,X.value={...c},It.value=u}let m=Number(o.x),h=Number(o.y);if(!Number.isFinite(c.x)||!Number.isFinite(c.y)||!Number.isFinite(c.width)||!Number.isFinite(c.height)||!Number.isFinite(d)||!Number.isFinite(f)||!Number.isFinite(m)||!Number.isFinite(h))return!1;let g={x:m-d/2,y:h-f/2,width:d,height:f};if(Rt!==null&&(cancelAnimationFrame(Rt),Rt=null),H.value=!1,!t||r<=0)return X.value=g,It.value=p,!0;let _=performance.now();function ee(e){let t=Math.min((e-_)/r,1),i=l(t);X.value={x:n(c.x,g.x,i),y:n(c.y,g.y,i),width:n(c.width,g.width,i),height:n(c.height,g.height,i)},It.value=n(u,p,i),t<1?Rt=requestAnimationFrame(ee):(X.value=g,It.value=p,Rt=null)}return Rt=requestAnimationFrame(ee),!0}function Bt(){Nt.value=!Nt.value}function Vt(){let e=J.value&&J.value.viewBox;if(!e)return;let t=String(e).split(` `).map(Number);if(t.length!==4)return;let[n,r,i,a]=t;if(!Number.isFinite(n)||!Number.isFinite(r)||!Number.isFinite(i)||!Number.isFinite(a))return;let o=i,s=a,c=n,l=r,u=Mt.value;u&&(u.width!==null&&(o=u.width),u.height!==null&&(s=u.height),c=n-(o-i)/2,l=r-(s-a)/2),Ft({x:c,y:l,width:o,height:s},{overwriteCurrentIfNotZoomed:!0})}Pe(()=>J.value&&J.value.viewBox,()=>{Vt()},{immediate:!0}),Pe(()=>Mt.value,()=>{Vt()}),Pe(()=>G.value,e=>{Nt.value=!e});let Ht=v(()=>{let e=X.value;return e?`${e.x} ${e.y} ${e.width} ${e.height}`:`0 0 0 0`}),Z=w(!1);function Ut(e){Z.value=e,Ke.value+=1}function Wt(){G.value=!G.value}function Gt(){Lt(Fr,!0)}function Kt(){Lt(1/Fr,!0)}let qt=[`TB`,`RL`,`BT`,`LR`];function Jt(){q.value=qt[(qt.indexOf(q.value)+1)%qt.length],Pt(),Ve(`rotate`,q.value)}let Yt=kt({tooltipRef:V,isVisibleRef:W,anchorRef:et,styleRef:tt,placementRef:nt,isNode:!1}),Xt=kt({tooltipRef:at,isVisibleRef:H,anchorRef:rt,styleRef:ot,placementRef:st,offsetRef:it}),Q=w(null);async function Zt(e){Ve(`onMidpointEnter`,e);let t=K.value;if(!t||!e?.midpoint)return;let n=t.createSVGPoint();n.x=e.midpoint.x,n.y=e.midpoint.y;let r=t.getScreenCTM();if(!r)return;let i=n.matrixTransform(r);et.value={x:i.x,y:i.y},B.value=e,W.value=!0,R.value.selectedEdge.animated===!0&&(Q.value=e.id,un()),await Te(),Yt()}function Qt(){W.value=!1,B.value=null,Ve(`onMidpointLeave`),R.value.selectedEdge.animated===!0&&(Q.value=null,un())}async function $t(e){if(Ve(`onNodeClick`,e),!I.value.tooltip.showOnClick)return;let t=K.value;if(!t)return;let n=t.createSVGPoint();n.x=e.x,n.y=e.y;let r=t.getScreenCTM();if(!r)return;let i=n.matrixTransform(r),a=z.value.layout.nodeWidth,o=z.value.layout.nodeHeight,s=r.a,c=r.d,l=a*s,u=o*c;it.value={x:l/2,y:u/2},rt.value={x:i.x,y:i.y},U.value=e,H.value=!0,await Te(),Xt()}function en(){H.value=!1,U.value=null}function tn(e){if(!(H.value||W.value))return;let t=at.value;if(t&&t.contains(e.target))return;let n=V.value;if(n&&n.contains(e.target))return;let r=K.value;if(r&&r.contains(e.target)){let t=e.target.closest(`.vue-ui-dag-node`),n=e.target.closest(`.vue-ui-dag-edge-midpoint`);if(t||n)return}en(),Qt(),Xe.value||Ln()}function nn(e){e.key===`Escape`&&(H.value&&en(),W.value&&Qt())}Ae(()=>{document.addEventListener(`mousedown`,tn),document.addEventListener(`keydown`,nn)}),ke(()=>{document.removeEventListener(`mousedown`,tn),document.removeEventListener(`keydown`,nn),A.value&&(j.value&&A.value.unobserve(j.value),A.value.disconnect())});function rn(){if(!F.value.responsive){A.value&&(j.value&&A.value.unobserve(j.value),A.value.disconnect(),A.value=null,j.value=null);return}let e=le(()=>{if(!O.value)return;let{width:e,height:t}=ue({chart:O.value,title:z.value.title.text?He.value:null,legend:z.value.controls.show?We.value?.$el:null,source:Ue.value});requestAnimationFrame(()=>{Qe.value=Math.max(.1,e),$e.value=Math.max(.1,t-12)})});A.value&&(j.value&&A.value.unobserve(j.value),A.value.disconnect()),A.value=new ResizeObserver(e),j.value=O.value?O.value.parentNode:null,j.value&&A.value.observe(j.value),e()}function an(e,t={}){let{direction:n=-1,mode:r=`oneLapNearest`,dasharray:i=null}=t;if(!e||typeof e.getTotalLength!=`function`)return gt.value&&console.warn(`VueUiDag @getIdealDashoffsetDelta: invalid path element`,e),0;let a=e.getTotalLength(),o=d(i??e.getAttribute(`stroke-dasharray`)??(typeof getComputedStyle==`function`?getComputedStyle(e).strokeDasharray:``));if(!Number.isFinite(o)||o<=0)return n*a;let s=Math.max(1,Math.round(a/o)),c=Math.max(1,Math.ceil(a/o)),l=Math.max(1,Math.floor(a/o)),u;return u=r===`pattern`?o:r===`oneLapCeil`?c*o:r===`oneLapFloor`?l*o:s*o,n*u;function d(e){if(!e||e===`none`)return NaN;let t=String(e).replace(/,/g,` `).trim().split(/\s+/).map(e=>Number.parseFloat(e)).filter(e=>Number.isFinite(e));if(!t.length)return NaN;let n=t.reduce((e,t)=>e+t,0);return t.length%2==1?n*2:n}}let on=w(/* @__PURE__ */ new Map),sn=w(/* @__PURE__ */ new Map);function cn(e){return function(t){t?on.value.set(e,t):on.value.delete(e)}}function ln(){sn.value.forEach(e=>{try{e.cancel()}catch{}}),sn.value.clear()}function un(){ln();let e=J.value?.edges??[];if(!e.length)return;let t=L.value.animations,n=Number(t.referenceDistance)>0?Number(t.referenceDistance):24;e.forEach(e=>{let r=R.value.selectedEdge.animated===!0&&Q.value!=null&&e.id===Q.value,i=!!e?.original?.animated||!!e?.animated||r,a=on.value.get(e.id);if(!a)return;if(!i){a.style.strokeDasharray=`0`,a.style.strokeDashoffset=`0`;return}let o=e?.original?.dasharray??t.dasharray;a.style.strokeDasharray=String(o),a.style.strokeDashoffset=`0`;let s=![void 0,null].includes(e?.original?.animationDirection),c=![void 0,null].includes(t.animationDirection),l=an(a,{direction:s?Number(e.original.animationDirection):c?Number(t.animationDirection):-1,mode:`oneLapNearest`,dasharray:String(o)}),u=e?.original?.animationDurationMs??t.animationDurationMs??1e3,d=Number(u),f=Number.isFinite(d)&&d>0?n/d:n/1e3,p=Math.max(1,Math.round(Math.abs(l)/Math.max(1e-9,f))),m=a.animate([{strokeDashoffset:0},{strokeDashoffset:l}],{duration:p,iterations:1/0,easing:`linear`});sn.value.set(e.id,m)})}Pe(()=>J.value&&J.value.edges,async()=>{await Te(),un()},{deep:!0,immediate:!0}),ke(()=>{ln()});async function dn({scale:e=2}={}){if(!O.value)return;let{width:t,height:n}=O.value.getBoundingClientRect(),r=t/n,{imageUri:i,base64:a}=await ee({domElement:O.value,base64:!0,img:!0,scale:e});return{imageUri:i,base64:a,title:z.value.title.text??`vue-ui-dag`,width:t,height:n,aspectRatio:r}}let fn=v(()=>{let e=Number(z.value.layout.nodeHeight);return Number.isFinite(e)&&e>0?e/z.value.backgroundPattern.spacingRatio:12}),pn=v(()=>fn.value*(z.value.backgroundPattern.dotRadiusRatio/100)),$=w(null),mn=null,hn=0;function gn(e){mn&&=(clearTimeout(mn),null),$.value!==e&&($.value=e,(I.value.selected.downstreamEdges.animated===!0||I.value.selected.upstreamEdges.animated===!0)&&un())}function _n(e){P.value=`pointer`,Q.value=null,gn(e)}async function vn(e){P.value=`pointer`,$.value=null,await Zt(e)}function yn(e){let t=++hn;mn&&clearTimeout(mn),mn=setTimeout(()=>{t===hn&&$.value===e&&($.value=null,(I.value.selected.downstreamEdges.animated===!0||I.value.selected.upstreamEdges.animated===!0)&&un())},20)}function bn(e){let t=e.from===$.value,n=e.to===$.value,r=N.value===`midpoint`&&M.value===e.id,i=Q.value===e.id||B.value?.id===e.id||r,a=e.original.color??L.value.stroke;return i&&R.value.selectedEdge.stroke!=null?a=R.value.selectedEdge.stroke:t&&I.value.selected.downstreamEdges.stroke!=null?a=I.value.selected.downstreamEdges.stroke:n&&I.value.selected.upstreamEdges.stroke!=null&&(a=I.value.selected.upstreamEdges.stroke),e.animated=t&&I.value.selected.downstreamEdges.animated===!0||n&&I.value.selected.upstreamEdges.animated===!0||r&&R.value.selectedEdge.animated===!0?!0:(J.value?.edges.find(t=>t.id===e.id))?.original?.animated??!1,{d:e.pathData,fill:`none`,stroke:a,"stroke-width":L.value.strokeWidth*(i||e.from===$.value?2:1),"stroke-linecap":`round`,"stroke-linejoin":`round`}}function xn(e){return N.value===`node`&&M.value===e}function Sn(e){let t=$.value===e.id,n=N.value===`node`&&M.value===e.id,r=t||n,i=r&&I.value.selected.backgroundColor!=null?I.value.selected.backgroundColor:e.original.backgroundColor,a=r&&I.value.selected.stroke!=null?I.value.selected.stroke:I.value.stroke,o=r&&I.value.selected.strokeWidth!=null?I.value.selected.strokeWidth:I.value.strokeWidth;return{x:e.x-e.width/2,y:e.y-e.height/2,width:e.width,height:e.height,rx:I.value.borderRadius,fill:i,stroke:a,"stroke-width":o}}function Cn(e){let t=e.from===$.value,n=e.to===$.value,r=N.value===`midpoint`&&M.value===e.id,i=Q.value===e.id||B.value?.id===e.id||r,a=e.original.color??L.value.stroke;return i&&R.value.selectedEdge.stroke!=null?a=R.value.selectedEdge.stroke:t&&I.value.selected.downstreamEdges.stroke!=null?a=I.value.selected.downstreamEdges.stroke:n&&I.value.selected.upstreamEdges.stroke!=null&&(a=I.value.selected.upstreamEdges.stroke),{cx:e?.midpoint?.x,cy:e?.midpoint?.y,r:R.value.radius,fill:r?R.value.selectedEdge.stroke??R.value.fill:R.value.fill,stroke:a,"stroke-width":L.value.strokeWidth*(i||e.from===$.value?2:1)}}function wn(e){let t=e.from===$.value,n=e.to===$.value,r=N.value===`midpoint`&&M.value===e.id,i=Q.value===e.id||B.value?.id===e.id||r,a=e.color??e.original?.color??L.value.stroke;return i&&R.value.selectedEdge.stroke!=null?a=R.value.selectedEdge.stroke:t&&I.value.selected.downstreamEdges.stroke!=null?a=I.value.selected.downstreamEdges.stroke:n&&I.value.selected.upstreamEdges.stroke!=null&&(a=I.value.selected.upstreamEdges.stroke),a}function Tn(e){return`${jt}-${String(e).replace(/[^a-zA-Z0-9_-]/g,`_`)}`}function En(){return J.value}async function Dn(){if(Ve(`copyAlt`,{config:F.value,dataset:pt.value}),!F.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(F.value.userOptions.callbacks.altCopy({config:F.value,dataset:pt.value}))}let On=v(()=>(J.value?.nodes??[]).map(e=>({id:e.id,type:`node`,x:e.x,y:e.y,label:e.label??e.id,raw:e}))),kn=v(()=>R.value.show?(J.value?.edges??[]).filter(e=>e?.midpoint).map(e=>({id:e.id,type:`midpoint`,x:e.midpoint.x,y:e.midpoint.y,label:`${Y(e.from)?.label??e.from} → ${Y(e.to)?.label??e.to}`,raw:e})):[]),An=v(()=>[...On.value,...kn.value].sort((e,t)=>e.x===t.x?e.y-t.y:e.x-t.x)),jn=v(()=>{let e=/* @__PURE__ */ new Map;return An.value.forEach((t,n)=>{e.set(`${t.type}:${t.id}`,n)}),e}),Mn=v(()=>{let e=J.value?.nodes??[],t=J.value?.edges??[];return{headers:[F.value.a11y?.translations?.node??`Node`,F.value.a11y?.translations?.parents??`Parents`,F.value.a11y?.translations?.children??`Children`],rows:e.map(e=>{let n=t.filter(t=>t.to===e.id).map(e=>Y(e.from)?.label??e.from).join(`, `),r=t.filter(t=>t.from===e.id).map(e=>Y(e.to)?.label??e.to).join(`, `);return[e.label??e.id,n||`—`,r||`—`]})}});function Nn(e){return`${e.type}:${e.id}`}function Pn(){return M.value==null||N.value==null?null:An.value.find(e=>e.id===M.value&&e.type===N.value)??null}async function Fn(e){if(e){if(e.type===`node`){Qt();return}e.type===`midpoint`&&(en(),await Zt(e.raw))}}function In(e){if(e){if(M.value=e.id,N.value=e.type,Ye.value=jn.value.get(Nn(e))??null,e.type===`node`){gn(e.id),Q.value=null;return}e.type===`midpoint`&&($.value=null,Q.value=e.id,R.value.selectedEdge.animated===!0&&un())}}function Ln(){M.value=null,N.value=null,Ye.value=null,H.value||($.value=null),W.value||(Q.value=null,R.value.selectedEdge.animated===!0&&un())}function Rn(){Xe.value=!0,Ln()}function zn(){Xe.value=!1,en(),Qt(),Ln()}function Bn(e,t,n){let r=t.x-e.x,i=t.y-e.y;return n===`right`&&r<=0||n===`left`&&r>=0||n===`down`&&i<=0||n===`up`&&i>=0?1/0:n===`right`||n===`left`?Math.abs(r)*1e3+Math.abs(i):Math.abs(i)*1e3+Math.abs(r)}function Vn(e,t){let n=An.value.filter(t=>Nn(t)!==Nn(e));if(!n.length)return null;let r=null,i=1/0;return n.forEach(n=>{let a=Bn(e,n,t);a<i&&(i=a,r=n)}),r||(t===`right`||t===`down`?An.value[0]??null:An.value[An.value.length-1]??null)}async function Hn(e){e&&(P.value=`keyboard`,e.type===`node`&&(Qt(),await $t(e.raw)))}async function Un(e){if(!K.value||G.value||document.activeElement!==K.value||!An.value.length)return;let t=e.key===`ArrowLeft`,n=e.key===`ArrowRight`,r=e.key===`ArrowUp`,i=e.key===`ArrowDown`,a=e.key===`Enter`||e.key===` `,o=e.key===`Escape`;if(!t&&!n&&!r&&!i&&!a&&!o)return;if(e.preventDefault(),e.stopPropagation(),o){en(),Qt(),Ln();return}let s=Pn();if(a){if(!s)return;s.type===`node`&&await Hn(s);return}if(!s){let e=An.value[0];if(!e)return;In(e),await Fn(e);return}let c=null;n?c=Vn(s,`right`):t?c=Vn(s,`left`):i?c=Vn(s,`down`):r&&(c=Vn(s,`up`)),c&&(en(),Qt(),In(c),await Fn(c))}return i({getData:En,getImage:dn,generatePdf:yt,generateSvg:Tt,generateImage:bt,toggleAnnotator:Wt,toggleFullscreen:Ut,zoomIn:Gt,zoomOut:Kt,resetZoom:Pt,switchDirection:Jt,copyAlt:Dn,focusOnNode:zt}),(e,t)=>(C(),x(`div`,{class:Ee(`vue-data-ui-component vue-ui-dag ${Z.value?`vue-data-ui-wrapper-fullscreen`:``} ${F.value.responsive?`vue-ui-dag-responsive`:``}`),id:`dag_${k.value}`,ref_key:`dagChart`,ref:O,style:Oe({fontFamily:F.value.style.fontFamily,backgroundColor:z.value.backgroundColor,padding:`0.5rem`}),onMouseenter:Dt,onMouseleave:Ot},[S(`div`,{id:`chart-instructions-${k.value}`,class:`sr-only`},[S(`p`,null,Me(F.value.a11y.translations.keyboardNavigation),1)],8,ir),Mn.value?.rows?.length?(C(),y(de,{key:0,uid:k.value,head:Mn.value.headers,body:Mn.value.rows,notice:F.value.a11y.translations.tableAvailable,caption:F.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):b(``,!0),E(At)?(C(),x(`div`,ar,Me(String(E(At))),1)):b(``,!0),F.value.userOptions.buttons.annotator?(C(),y(E(Fe),{key:2,svgRef:E(K),backgroundColor:z.value.backgroundColor,color:z.value.color,active:G.value,isCursorPointer:Ze.value,palette:F.value.userOptions.annotatorPalette,onClose:Wt},ye({_:2},[je(E(ae),t=>({name:t,fn:Ie(n=>[T(e.$slots,t,De(Ce(E(ie)(t,n))),void 0,!0)])}))]),1032,[`svgRef`,`backgroundColor`,`color`,`active`,`isCursorPointer`,`palette`])):b(``,!0),F.value.userOptions.show&&Je.value&&(E(ut)||E(ct))?(C(),y(E(Re),{ref:`userOptionsRef`,key:`user_option_${Ke.value}`,backgroundColor:z.value.backgroundColor,color:z.value.color,isPrinting:E(_t),isImaging:E(vt),uid:k.value,hasTooltip:!1,hasTable:!1,hasXls:!1,hasLabel:!1,hasPdf:F.value.userOptions.buttons.pdf,hasImg:F.value.userOptions.buttons.img,hasSvg:F.value.userOptions.buttons.svg,hasFullscreen:F.value.userOptions.buttons.fullscreen,hasAltCopy:F.value.userOptions.buttons.altCopy,isFullscreen:Z.value,chartElement:O.value,position:F.value.userOptions.position,titles:{...F.value.userOptions.buttonTitles},hasAnnotator:F.value.userOptions.buttons.annotator,isAnnotation:G.value,callbacks:F.value.userOptions.callbacks,printScale:F.value.userOptions.print.scale,hasZoom:F.value.userOptions.buttons.zoom,isZoom:Nt.value,isCursorPointer:Ze.value,onToggleFullscreen:Ut,onGeneratePdf:E(yt),onGenerateImage:E(Et),onGenerateSvg:E(Tt),onToggleAnnotator:Wt,onToggleZoom:Bt,onCopyAlt:Dn,style:Oe({visibility:E(ut)?E(ct)?`visible`:`hidden`:`visible`})},ye({_:2},[je(E(oe)(e.$slots,`menuIcon optionPdf optionImg optionSvg optionFullscreen optionAnnotator optionZoom optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:Ie(n=>[T(e.$slots,t,De(Ce(E(se)(t,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`hasPdf`,`hasImg`,`hasSvg`,`hasFullscreen`,`hasAltCopy`,`isFullscreen`,`chartElement`,`position`,`titles`,`hasAnnotator`,`isAnnotation`,`callbacks`,`printScale`,`hasZoom`,`isZoom`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`onGenerateSvg`,`style`])):b(``,!0),z.value.title.text?(C(),x(`div`,{key:4,ref_key:`chartTitle`,ref:He,style:`width:100%;background:transparent;`},[(C(),y(ne,{key:`title_${Ge.value}`,config:{title:{cy:`dag-title`,...z.value.title},subtitle:{cy:`dag-subtitle`,...z.value.title.subtitle}}},null,8,[`config`]))],512)):b(``,!0),z.value.controls.position===`top`&&!E(ft)&&z.value.controls.show?(C(),y(te,{key:5,ref_key:`zoomControls`,ref:We,config:F.value,scale:E(It),isFullscreen:Z.value,withDirection:``,onZoomIn:Gt,onZoomOut:Kt,onResetZoom:t[0]||=()=>E(Pt)(!0),onSwitchDirection:Jt},null,8,[`config`,`scale`,`isFullscreen`])):b(``,!0),S(`div`,or,[E(J)?(C(),x(`svg`,{key:0,ref_key:`svgRef`,ref:K,class:Ee({"vue-ui-dag-svg":!0,"vue-data-ui-loading":E(ft)}),viewBox:Ht.value,xmlns:E(u),style:Oe({backgroundColor:z.value.backgroundColor,height:`100%`,width:`100%`}),tabindex:`0`,"aria-describedby":`chart-instructions-${k.value}`,onFocus:Rn,onBlur:zn,onKeydown:Un},[xe(E(ze)),z.value.backgroundPattern.show?(C(),x(`defs`,cr,[S(`pattern`,{id:`dag_bg_pattern_${k.value}`,patternUnits:`userSpaceOnUse`,width:fn.value,height:fn.value},[T(e.$slots,`background-pattern`,De(Ce({x:fn.value/2,y:fn.value/2,color:z.value.backgroundPattern.dotColor})),()=>[S(`circle`,{cx:fn.value/2,cy:fn.value/2,r:pn.value,fill:z.value.backgroundPattern.dotColor},null,8,ur)],!0)],8,lr)])):b(``,!0),z.value.backgroundPattern.show?(C(),x(`rect`,{key:1,x:E(X)?.x??0,y:E(X)?.y??0,width:E(X)?.width??0,height:E(X)?.height??0,fill:`url(#dag_bg_pattern_${k.value})`,style:Oe({pointerEvents:`none`,opacity:z.value.backgroundPattern.opacity})},null,12,dr)):b(``,!0),E(J).arrowShape===`undirected`?b(``,!0):(C(),x(`defs`,fr,[(C(!0),x(ge,null,je(E(J).edges,e=>(C(),x(`marker`,{key:`marker_${e.id}`,id:Tn(e.id),markerWidth:E(J).arrowSize,markerHeight:E(J).arrowSize,refX:E(J).arrowSize-3,refY:E(J).arrowSize/2,orient:`auto`,markerUnits:`strokeWidth`},[E(J).arrowShape===`normal`?(C(),x(`path`,{key:0,d:`M 0 0 L ${E(J).arrowSize} ${E(J).arrowSize/2} L 0 ${E(J).arrowSize} Z`,fill:wn(e),stroke:wn(e),"stroke-width":`0`,style:{transition:`stroke 0.2s ease-in-out,
2
+ fill 0.2s ease-in-out,
3
+ stroke-width 0.2s ease-in-out`}},null,8,mr)):(C(),x(`path`,{key:1,d:`M 0 0 L ${E(J).arrowSize} ${E(J).arrowSize/2} L 0 ${E(J).arrowSize} L ${E(J).arrowSize/3} ${E(J).arrowSize/2} Z`,fill:wn(e),stroke:wn(e),"stroke-width":`0`,style:{transition:`stroke 0.2s ease-in-out,
4
+ fill 0.2s ease-in-out,
5
+ stroke-width 0.2s ease-in-out`}},null,8,hr))],8,pr))),128))])),S(`g`,gr,[(C(!0),x(ge,null,je(E(J).edges,e=>(C(),x(ge,{key:e.id},[S(`path`,we({"data-cy-edge":``,ref_for:!0,ref:cn(e.id)},{ref_for:!0},bn(e),{style:{"pointer-events":`none`,transition:`stroke-width 0.2s ease-in-out,
6
+ stroke 0.2s ease-in-out`}}),null,16),R.value.show?(C(),x(`circle`,we({key:0,"data-cy-midpoint":``,class:`vue-ui-dag-edge-midpoint`,"data-a11y-midpoint-id":e.id},{ref_for:!0},Cn(e),{"aria-label":`${Y(e.from)?.label??e.from} to ${Y(e.to)?.label??e.to}`,style:{transition:`stroke-width 0.2s ease-in-out,
7
+ stroke 0.2s ease-in-out,
8
+ fill 0.2s ease-in-out`},onMouseenter:t=>vn(e),onMouseleave:Qt}),null,16,_r)):b(``,!0)],64))),128))]),S(`g`,vr,[(C(!0),x(ge,null,je(E(J).nodes,t=>(C(),x(`g`,{key:t.id,class:`vue-ui-dag-node`,onClick:Le(e=>I.value.tooltip.showOnClick&&$t(t),[`stop`]),onMouseenter:e=>_n(t.id),onMouseleave:e=>yn(t.id)},[e.$slots.node?b(``,!0):(C(),x(`rect`,we({key:0,"data-cy-node":``},{ref_for:!0},Sn(t),{"data-a11y-node-id":t.id,"aria-label":`${t.label??t.id}`,style:{cursor:I.value.tooltip.showOnClick&&Ze.value?`pointer`:`default`,transition:`stroke 0.2s ease-in-out, stroke-width 0.2s ease-in-out, fill 0.2s ease-in-out`}}),null,16,br)),e.$slots.node?(C(),x(`foreignObject`,{key:1,x:t.x-t.width/2,y:t.y-t.height/2,width:t.width,height:t.height,style:{overflow:`visible`}},[T(e.$slots,`node`,we({ref_for:!0},{node:t,orientation:q.value}),void 0,!0)],8,xr)):b(``,!0)],40,yr))),128))]),S(`g`,Sr,[(C(!0),x(ge,null,je(E(J).edges,e=>(C(),x(`path`,{key:e.id,d:e.pathData,fill:`none`,stroke:`transparent`,"stroke-width":L.value.strokeWidth*(e.from===$.value||e.id===B.value?.id?1.3:1),"stroke-linecap":`round`,"stroke-linejoin":`round`,"marker-end":E(J).arrowShape===`undirected`?null:`url(#${Tn(e.id)})`,style:{"pointer-events":`none`,transition:`stroke-width 0.2s ease-in-out,
9
+ stroke 0.2s ease-in-out`}},null,8,Cr))),128))]),S(`g`,wr,[(C(!0),x(ge,null,je(E(J).nodes,t=>(C(),x(`g`,{key:t.id,onClick:Le(e=>I.value.tooltip.showOnClick&&$t(t),[`stop`]),onMouseenter:e=>gn(t.id),onMouseleave:e=>yn(t.id)},[e.$slots[`free-node-label`]?b(``,!0):(C(),x(ge,{key:0},[e.$slots[`node-label`]?(C(),x(`text`,{key:0,x:t.x,y:t.y+I.value.labels.fontSize/3,"text-anchor":`middle`,"font-size":I.value.labels.fontSize,fill:$.value===t.id&&I.value.selected.labelColor!=null?I.value.selected.labelColor:t.original.color,"font-weight":I.value.labels.bold?`bold`:`normal`,style:{transition:`fill 0.2s ease-in-out`}},[T(e.$slots,`node-label`,we({ref_for:!0},{node:t,orientation:q.value}),()=>[be(Me(t.label),1)],!0)],8,Er)):!e.$slots[`free-node-label`]&&!e.$slots.node?(C(),x(`text`,{key:1,"data-cy-node-label":``,x:t.x,y:t.y+I.value.labels.fontSize/3,"text-anchor":`middle`,"font-size":I.value.labels.fontSize,fill:($.value===t.id||xn(t.id))&&I.value.selected.labelColor!=null?I.value.selected.labelColor:t.original.color,"font-weight":I.value.labels.bold?`bold`:`normal`,style:{transition:`fill 0.2s ease-in-out`},innerHTML:E(o)({content:t.label,fontSize:I.value.labels.fontSize,fontWeight:z.value.nodes.labels.bold?`bold`:`normal`,fill:($.value===t.id||xn(t.id))&&I.value.selected.labelColor!=null?I.value.selected.labelColor:t.original.color,x:t.x,y:t.y,autoOffset:!0})},null,8,Dr)):b(``,!0)],64)),e.$slots[`free-node-label`]?(C(),x(`g`,Or,[T(e.$slots,`free-node-label`,we({ref_for:!0},{node:t,layoutData:E(J),orientation:q.value}),void 0,!0)])):b(``,!0)],40,Tr))),128))]),T(e.$slots,`svg`,{svg:{drawingArea:E(X),data:E(J),orientation:q.value,isPrintingImg:E(_t)||E(vt)||E(Ct),isPrintingSvg:E(wt)}},void 0,!0)],46,sr)):b(``,!0),e.$slots.hint?(C(),x(`div`,kr,[T(e.$slots,`hint`,De(Ce({hint:F.value.a11y.translations.keyboardNavigation,isVisible:Xe.value})),void 0,!0)])):b(``,!0)]),e.$slots.watermark?(C(),x(`div`,Ar,[T(e.$slots,`watermark`,De(Ce({isPrinting:E(_t)||E(vt)||E(Ct)||E(wt)})),void 0,!0)])):b(``,!0),xe(ve,{name:`fade`},{default:Ie(()=>[W.value?(C(),y(_e,{key:0,to:Z.value?O.value:`body`},[S(`div`,{"data-cy-tooltip-midpoint":``,ref_key:`tooltipRef`,ref:V,class:`vue-ui-dag-tooltip`,style:Oe({...tt.value,maxWidth:R.value.tooltip.maxWidth,"--vue-data-ui-dag-tooltip-background":R.value.tooltip.backgroundColor,"--vue-data-ui-dag-tooltip-color":R.value.tooltip.color}),"data-position":nt.value},[T(e.$slots,`tooltip-midpoint`,De(Ce({edge:B.value,layoutData:E(J)})),()=>[B.value?(C(),x(`div`,Mr,Me(Y(B.value.from)?.label??B.value.from)+` → `+Me(Y(B.value.to)?.label??B.value.to),1)):b(``,!0)],!0)],12,jr)],8,[`to`])):b(``,!0)]),_:3}),xe(ve,{name:`fade`},{default:Ie(()=>[H.value?(C(),y(_e,{key:0,to:Z.value?O.value:`body`},[S(`div`,{"data-cy-tooltip-node":``,ref_key:`nodeTooltipRef`,ref:at,class:`vue-ui-dag-node-tooltip`,style:Oe({maxWidth:I.value.tooltip.maxWidth,left:ot.value.left,top:ot.value.top,"--vue-data-ui-dag-node-tooltip-background":I.value.tooltip.backgroundColor,"--vue-data-ui-dag-node-tooltip-color":I.value.tooltip.color}),"data-position":st.value},[T(e.$slots,`tooltip-node`,De(Ce({node:U.value,layoutData:E(J)})),()=>[U.value?(C(),x(`div`,Pr,Me(U.value.label),1)):b(``,!0)],!0)],12,Nr)],8,[`to`])):b(``,!0)]),_:3}),z.value.controls.position===`bottom`&&!E(ft)&&z.value.controls.show?(C(),y(te,{key:7,ref_key:`zoomControls`,ref:We,config:F.value,scale:E(It),isFullscreen:Z.value,withDirection:``,onZoomIn:Gt,onZoomOut:Kt,onResetZoom:t[1]||=()=>E(Pt)(!0),onSwitchDirection:Jt},null,8,[`config`,`scale`,`isFullscreen`])):b(``,!0),e.$slots.source?(C(),x(`div`,{key:8,ref_key:`source`,ref:Ue,dir:`auto`},[T(e.$slots,`source`,{},void 0,!0)],512)):b(``,!0),T(e.$slots,`skeleton`,{},()=>[E(ft)?(C(),y(p,{key:0})):b(``,!0)],!0)],46,rr))}},[[`__scopeId`,`data-v-0b0b4695`]]);export{nr as n,Ir as t};
@@ -0,0 +1 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-DM9fSqjh.js";import{X as n}from"./lib-DqD8nbyX.js";import{n as r,t as i}from"./useHints-BH9r_0Vd.js";import{t as a}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as ee}from"./useNestedProp-DrLnzyHO.js";import{n as te,t as ne}from"./annotationSlots-BRR85CqJ.js";import{n as re,t as ie}from"./userOptionsSlots-DYuo-E5m.js";import{t as ae}from"./usePrinter-Cj4eIYC_.js";import{t as oe}from"./useUserOptionState-CXlFnwPv.js";import{t as se}from"./UserOptions-BSJ_S_us.js";import{n as ce}from"./PenAndPaper-BsBFp16i.js";import{Fragment as o,computed as s,createBlock as c,createCommentVNode as l,createElementBlock as u,createElementVNode as d,createSlots as f,defineAsyncComponent as p,guardReactiveProps as m,mergeProps as le,normalizeClass as ue,normalizeProps as de,normalizeStyle as h,openBlock as g,ref as _,renderList as v,renderSlot as y,resolveDynamicComponent as fe,unref as b,useCssVars as pe,watch as x,withCtx as S}from"vue";var C=/* @__PURE__ */ e({default:()=>T}),me=[`id`],he=[`onMousedown`,`onTouchstart`],ge=[`onMousedown`,`onTouchstart`],_e=[`onMousedown`,`onTouchstart`],ve=[`onMousedown`,`onTouchstart`],ye=[`onMousedown`,`onTouchstart`],w=1,T=/*#__PURE__*/ a({__name:`vue-ui-dashboard`,props:{dataset:Array,config:Object},emits:[`change`,`copyAlt`],setup(e,{expose:a,emit:C}){pe(e=>({ed4ebd52:Me.value,v1504d0e3:Ne.value}));let T={VueDataUi:p(()=>import(`./vue-data-ui-yeD7UyUU.js`).then(e=>e.n)),VueUi3dBar:p(()=>import(`./vue-ui-3d-bar-COrzyTkO.js`).then(e=>e.n)),VueUiAccordion:p(()=>import(`./vue-ui-accordion-3lBpCjGm.js`).then(e=>e.n)),VueUiAgePyramid:p(()=>import(`./vue-ui-age-pyramid-CAoVjkOA.js`).then(e=>e.n)),VueUiAnnotator:p(()=>import(`./vue-ui-annotator-CpTZHnPw.js`).then(e=>e.n)),VueUiCandlestick:p(()=>import(`./vue-ui-candlestick-D9UXZQoN.js`).then(e=>e.n)),VueUiChestnut:p(()=>import(`./vue-ui-chestnut-BuLjW5nb.js`).then(e=>e.n)),VueUiDigits:p(()=>import(`./vue-ui-digits-BBiRMr01.js`).then(e=>e.n)),VueUiDonut:p(()=>import(`./vue-ui-donut-DMF74OY0.js`).then(e=>e.n)),VueUiDonutEvolution:p(()=>import(`./vue-ui-donut-evolution-Du4zLc8D.js`).then(e=>e.n)),VueUiDumbbell:p(()=>import(`./vue-ui-dumbbell-CxL_AY5e.js`).then(e=>e.n)),VueUiFlow:p(()=>import(`./vue-ui-flow-h6kTMamJ.js`).then(e=>e.n)),VueUiGalaxy:p(()=>import(`./vue-ui-galaxy-CgnshY8i.js`).then(e=>e.n)),VueUiGauge:p(()=>import(`./vue-ui-gauge-a13ojQPr.js`).then(e=>e.n)),VueUiHeatmap:p(()=>import(`./vue-ui-heatmap-5NsQkMwS.js`).then(e=>e.n)),VueUiKpi:p(()=>import(`./vue-ui-kpi-BZjfQxmY.js`).then(e=>e.n)),VueUiMiniLoader:p(()=>import(`./vue-ui-mini-loader-ltQXdeeW.js`).then(e=>e.n)),VueUiMolecule:p(()=>import(`./vue-ui-molecule-DI-CS5w8.js`).then(e=>e.n)),VueUiMoodRadar:p(()=>import(`./vue-ui-mood-radar-B5ar9WAZ.js`).then(e=>e.n)),VueUiNestedDonuts:p(()=>import(`./vue-ui-nested-donuts-BP2YzVma.js`).then(e=>e.n)),VueUiOnion:p(()=>import(`./vue-ui-onion-CCiZ6jmF.js`).then(e=>e.n)),VueUiParallelCoordinatePlot:p(()=>import(`./vue-ui-parallel-coordinate-plot-3E0CysDx.js`).then(e=>e.n)),VueUiQuadrant:p(()=>import(`./vue-ui-quadrant-BwgwvKy8.js`).then(e=>e.n)),VueUiQuickChart:p(()=>import(`./vue-ui-quick-chart-BXNg0LNe.js`).then(e=>e.n)),VueUiRadar:p(()=>import(`./vue-ui-radar-B9Ntj_Gj.js`).then(e=>e.n)),VueUiRating:p(()=>import(`./vue-ui-rating-B33u3iIn.js`).then(e=>e.n)),VueUiRelationCircle:p(()=>import(`./vue-ui-relation-circle-B60IUw50.js`).then(e=>e.n)),VueUiRings:p(()=>import(`./vue-ui-rings-BXo9p3Ab.js`).then(e=>e.n)),VueUiScatter:p(()=>import(`./vue-ui-scatter-BwrYPDzh.js`).then(e=>e.n)),VueUiSkeleton:p(()=>import(`./vue-ui-skeleton-DTn7uIui.js`).then(e=>e.n)),VueUiSmiley:p(()=>import(`./vue-ui-smiley-qCRUFmpq.js`).then(e=>e.n)),VueUiSparkHistogram:p(()=>import(`./vue-ui-sparkhistogram-DLZxE6oz.js`).then(e=>e.n)),VueUiSparkStackbar:p(()=>import(`./vue-ui-sparkstackbar-DvSQfGeA.js`).then(e=>e.n)),VueUiSparkTrend:p(()=>import(`./vue-ui-spark-trend-wKFu-O7B.js`).then(e=>e.n)),VueUiSparkbar:p(()=>import(`./vue-ui-sparkbar-DPFzdX-D.js`).then(e=>e.n)),VueUiSparkgauge:p(()=>import(`./vue-ui-sparkgauge-DlEPsxc0.js`).then(e=>e.n)),VueUiSparkline:p(()=>import(`./vue-ui-sparkline-BflZPl7s.js`).then(e=>e.n)),VueUiStripPlot:p(()=>import(`./vue-ui-strip-plot-54u7AUip.js`).then(e=>e.n)),VueUiTable:p(()=>import(`./vue-ui-table-3F8i2ZjT.js`).then(e=>e.n)),VueUiTableHeatmap:p(()=>import(`./vue-ui-table-heatmap-CtYPYMIJ.js`).then(e=>e.n)),VueUiTableSparkline:p(()=>import(`./vue-ui-table-sparkline-CTfYTzhA.js`).then(e=>e.n)),VueUiThermometer:p(()=>import(`./vue-ui-thermometer-BpFbPqxK.js`).then(e=>e.n)),VueUiTimer:p(()=>import(`./vue-ui-timer-DsWRNtRa.js`).then(e=>e.n)),VueUiTiremarks:p(()=>import(`./vue-ui-tiremarks-C4wVcSVP.js`).then(e=>e.n)),VueUiTreemap:p(()=>import(`./vue-ui-treemap-mYRv6gga.js`).then(e=>e.n)),VueUiVerticalBar:p(()=>import(`./vue-ui-horizontal-bar-G0wEKTRu.js`).then(e=>e.n)),VueUiHorizontalBar:p(()=>import(`./vue-ui-horizontal-bar-G0wEKTRu.js`).then(e=>e.n)),VueUiWaffle:p(()=>import(`./vue-ui-waffle-DNBIZqZz.js`).then(e=>e.n)),VueUiWheel:p(()=>import(`./vue-ui-wheel-DPHDp0t1.js`).then(e=>e.n)),VueUiWordCloud:p(()=>import(`./vue-ui-word-cloud-BY4YsW7-.js`).then(e=>e.n)),VueUiXy:p(()=>import(`./vue-ui-xy-M9aD-G5a.js`).then(e=>e.n)),VueUiXyCanvas:p(()=>import(`./vue-ui-xy-canvas-BpwG1Ipj.js`).then(e=>e.n)),VueUiCarouselTable:p(()=>import(`./vue-ui-carousel-table-CKyE4hME.js`).then(e=>e.n)),VueUiGizmo:p(()=>import(`./vue-ui-gizmo-K1lfslsA.js`).then(e=>e.n)),VueUiStackbar:p(()=>import(`./vue-ui-stackbar-JKC9qE6M.js`).then(e=>e.n)),VueUiStackline:p(()=>import(`./vue-ui-stackline-G7-oqfzp.js`).then(e=>e.n)),VueUiBullet:p(()=>import(`./vue-ui-bullet-yvY_gdw2.js`).then(e=>e.n)),VueUiFunnel:p(()=>import(`./vue-ui-funnel-BG5Addzr.js`).then(e=>e.n)),VueUiHistoryPlot:p(()=>import(`./vue-ui-history-plot-BRJdXsNo.js`).then(e=>e.n)),VueUiCirclePack:p(()=>import(`./vue-ui-circle-pack-BpAuZruK.js`).then(e=>e.n)),VueUiWorld:p(()=>import(`./vue-ui-world-DQWjoFDx.js`).then(e=>e.n)),VueUiChord:p(()=>import(`./vue-ui-chord-Bjwt2_BK.js`).then(e=>e.n)),VueUiRidgeline:p(()=>import(`./vue-ui-ridgeline-BPbYng2A.js`).then(e=>e.n)),VueUiDag:p(()=>import(`./vue-ui-dag-CyY3cSa6.js`).then(e=>e.n))},{vue_ui_dashboard:be}=t(),xe=_(null),Se=_(null),E=_(null),D=e,O=s(()=>ee({userConfig:D.config,defaultConfig:be}));r({config:()=>O.value,dataset:()=>D.dataset,component:`VueUiDashboard`,rules:[i.noHint]});let k=s(()=>O.value.userOptions.useCursorPointer),A=_(n()),j=_(O.value.locked);function Ce(){j.value=!j.value}x(()=>D.config,()=>{j.value=O.value.locked,Q.value=!O.value.userOptions.showOnChartHover});function M(){return D.dataset.map((e,t)=>({...e,index:t}))}let N=_(M());x(()=>D.dataset,()=>{N.value=M()});let P=s(()=>N.value.map(e=>({...e,resolvedComponent:typeof e.component==`string`?T[e.component]:e.component}))),F=_(null),I=_(null),L=_({x:0,y:0}),R=_({x:0,y:0}),z=_(null),B=_(!1),V=_(null),H=_(!1);function U(e){let t=e.target;(t.tagName===`INPUT`&&t.type===`range`||t.classList.contains(`range-handle`))&&(H.value=!0)}function W(e){let t=e.target;t.tagName===`INPUT`&&t.type===`range`&&(H.value=!1)}let{isPrinting:we,isImaging:Te,generatePdf:G,generateImage:Ee}=ae({elementId:`vue-ui-dashboard_${A.value}`,fileName:O.value.userOptions.print.filename||`dashboard`,options:{...O.value.userOptions.print,aspectRatio:O.value.style.board.aspectRatio}});function De(e){if(!j.value&&(B.value=!0,V.value=e,I.value===null)){F.value=e,L.value={x:event.clientX,y:event.clientY};let t=N.value[e],n=100-t.width,r=100-t.height;t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left>n&&(t.left=n),t.top>r&&(t.top=r),t.left<0&&(t.left=0),t.top<0&&(t.top=0),t.left+t.width>100&&(t.left=100-t.width),t.top+t.height>100&&(t.top=100-t.height)}}function K(e,t){B.value=!0,V.value=e,I.value={index:e,direction:t};let n=N.value[e];R.value={x:event.clientX,y:event.clientY,initialWidth:n.width,initialHeight:n.height}}function q(e,t,n){if(I.value.direction.includes(`top`)){let t=e.height-n/z.value.offsetHeight*100;t>=w&&(e.top+=n/z.value.offsetHeight*100,e.height=t)}if(I.value.direction.includes(`bottom`)){let t=e.height+n/z.value.offsetHeight*100;t>=w&&(e.height=t)}if(I.value.direction.includes(`left`)){let n=e.width-t/z.value.offsetWidth*100;n>=w&&(e.left+=t/z.value.offsetWidth*100,e.width=n)}if(I.value.direction.includes(`right`)){let n=e.width+t/z.value.offsetWidth*100;n>=w&&(e.width=n)}}function Oe(e){if(!(j.value||H.value)){if(B.value=!0,F.value!==null){let t=N.value[F.value],n=e.clientX-L.value.x,r=e.clientY-L.value.y,i=t.left+n/z.value.offsetWidth*100,a=t.top+r/z.value.offsetHeight*100;i>=0&&a>=0&&i+t.width<=100&&a+t.height<=100&&(t.left=i,t.top=a),L.value={x:e.clientX,y:e.clientY}}if(I.value!==null){let t=N.value[I.value.index];q(t,e.clientX-R.value.x,e.clientY-R.value.y),R.value={x:e.clientX,y:e.clientY}}}}let J=C;x(N,e=>{e&&!B.value&&J(`change`,N.value)},{deep:!0});function ke(){F.value=null,I.value=null,B.value=!1,V.value=null,N.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}function Ae(e){j.value||H.value||(B.value=!0,V.value=e,I.value===null&&(F.value=e,L.value={x:event.touches[0].clientX,y:event.touches[0].clientY}))}function Y(e,t,n){if(B.value=!0,V.value=e,I.value===null){I.value={index:e,direction:t};let r=N.value[e];R.value={x:n.touches[0].clientX,y:n.touches[0].clientY,initialWidth:r.width,initialHeight:r.height}}}function X(e){if(B.value=!0,e.preventDefault(),I.value!==null){let t=N.value[I.value.index];q(t,e.touches[0].clientX-R.value.x,e.touches[0].clientY-R.value.y),R.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function je(e){if(!(j.value||H.value)&&(B.value=!0,e.preventDefault(),F.value!==null)){let t=N.value[F.value],n=e.touches[0].clientX-L.value.x,r=e.touches[0].clientY-L.value.y,i=t.left+n/z.value.offsetWidth*100,a=t.top+r/z.value.offsetHeight*100;i>=0&&a>=0&&i+t.width<=100&&a+t.height<=100&&(t.left=i,t.top=a),L.value={x:e.touches[0].clientX,y:e.touches[0].clientY}}}function Z(){B.value=!1,V.value=null,F.value=null,I.value=null,N.value.forEach(e=>{e.left=Math.round(e.left/100*100),e.top=Math.round(e.top/100*100),e.width=Math.round(e.width/100*100),e.height=Math.round(e.height/100*100)})}let Me=s(()=>O.value.style.item.borderColor),Ne=s(()=>O.value.style.resizeHandles.backgroundColor),Pe=s(()=>O.value.style.board.aspectRatio),Fe=s(()=>O.value.style.board.backgroundColor),Ie=s(()=>O.value.style.board.border);function Le(){return N.value}let{userOptionsVisible:Q,setUserOptionsVisibility:Re,keepUserOptionState:ze}=oe({config:O.value}),$=_(!1);function Be(){$.value=!$.value}function Ve(){Re(!0)}function He(){Re(!1)}async function Ue(){if(J(`copyAlt`,{config:O.value,dataset:P.value}),!O.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(O.value.userOptions.callbacks.altCopy({config:O.value,dataset:P.value}))}return a({generatePdf:G,getItemsPositions:Le,toggleLock:Ce,copyAlt:Ue}),(e,t)=>(g(),u(`div`,{id:`vue-ui-dashboard_${A.value}`,onMousedown:U,onMouseup:W,onTouchstart:U,onTouchend:W,onMouseenter:Ve,onMouseleave:He,ref_key:`dashboardRef`,ref:xe,style:{position:`relative`},class:`vue-data-ui-component`},[d(`div`,{class:`vue-ui-dashboard-container`,ref_key:`dashboardContainer`,ref:z,style:h(`outline:${Ie.value}; background:${Fe.value}; aspect-ratio:${Pe.value};${$.value?`pointer-events:none`:``}`)},[d(`div`,{class:`vue-ui-dashboard-grid-container`,ref:`container`,onMousemove:Oe,onMouseup:ke,onTouchmove:je,onTouchend:Z,style:h(`background:${O.value.style.board.backgroundColor}`)},[t[4]||=d(`div`,{class:`vue-ui-dashboard-grid`},null,-1),(g(!0),u(o,null,v(P.value,(n,r)=>(g(),u(`div`,{key:n.id,class:ue({"vue-ui-dashboard-grid-item":!0,"vue-ui-dashboard-grid-item--locked":j.value}),style:h({width:`${n.width}%`,height:`${n.height}%`,left:`${n.left}%`,top:`${n.top}%`,cursor:`move`,boxShadow:V.value===r?`0 6px 12px -3px rgba(0,0,0,0.3)`:``,zIndex:V.value===r?P.value.length+1:n.index,backgroundColor:O.value.style.item.backgroundColor}),onMousedown:e=>De(r),onTouchstart:e=>Ae(r,n)},[j.value?l(``,!0):(g(),u(o,{key:0},[d(`div`,{class:`vue-ui-dashboard-resize-handle vue-ui-dashboard-top-left`,onMousedown:e=>K(r,`top-left`),onTouchstart:e=>Y(r,`top-left`,e),onTouchmove:t[0]||=e=>X(e),onTouchend:Z},null,40,ge),d(`div`,{class:`vue-ui-dashboard-resize-handle vue-ui-dashboard-top-right`,onMousedown:e=>K(r,`top-right`),onTouchstart:e=>Y(r,`top-right`,e),onTouchmove:t[1]||=e=>X(e),onTouchend:Z},null,40,_e),d(`div`,{class:`vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-left`,onMousedown:e=>K(r,`bottom-left`),onTouchstart:e=>Y(r,`bottom-left`,e),onTouchmove:t[2]||=e=>X(e),onTouchend:Z},null,40,ve),d(`div`,{class:`vue-ui-dashboard-resize-handle vue-ui-dashboard-bottom-right`,onMousedown:e=>K(r,`bottom-right`),onTouchstart:e=>Y(r,`bottom-right`,e),onTouchmove:t[3]||=e=>X(e),onTouchend:Z},null,40,ye)],64)),y(e.$slots,`top`,{item:n,index:r},void 0,!0),n.resolvedComponent?(g(),c(fe(n.resolvedComponent),le({key:1,ref_for:!0},n.props),null,16)):y(e.$slots,`content`,{item:n,index:r,left:n.left,top:n.top,height:n.height,width:n.width},void 0,!0,2),y(e.$slots,`bottom`,{item:n,index:r},void 0,!0)],46,he))),128))],36)],4),(g(),u(`svg`,{style:h({width:`100%`,height:`100%`,pointerEvents:`none`,position:`absolute`,top:0,left:0,zIndex:P.value.length+1}),ref_key:`svgRef`,ref:E},null,4)),O.value.userOptions.buttons.annotator&&z.value&&E.value?(g(),c(ce,{key:0,color:O.value.style.board.color,backgroundColor:O.value.style.board.backgroundColor,active:$.value,svgRef:E.value,isCursorPointer:k.value,onClose:Be,style:h({zIndex:P.value.length+1}),palette:O.value.userOptions.annotatorPalette},f({_:2},[v(b(ne),t=>({name:t,fn:S(n=>[y(e.$slots,t,de(m(b(te)(t,n))),void 0,!0)])}))]),1032,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`,`style`,`palette`])):l(``,!0),(O.value.allowPrint||O.value.userOptions.show)&&(O.value.userOptions.buttons.pdf||O.value.userOptions.buttons.img)?(g(),c(se,{key:1,ref_key:`userOptionsRef`,ref:Se,backgroundColor:O.value.style.board.backgroundColor,color:O.value.style.board.color,isPrinting:b(we),isImaging:b(Te),uid:A.value,position:O.value.userOptions.position,hasTooltip:!1,hasPdf:O.value.userOptions.buttons.pdf,hasImg:O.value.userOptions.buttons.img,hasXls:!1,hasTable:!1,hasLabel:!1,hasFullscreen:!1,hasAltCopy:O.value.userOptions.buttons.altCopy,chartElement:z.value,callbacks:O.value.userOptions.callbacks,hasAnnotator:O.value.userOptions.buttons.annotator,isAnnotation:$.value,printScale:O.value.userOptions.print.scale,titles:{...O.value.userOptions.buttonTitles},isCursorPointer:k.value,onGeneratePdf:b(G),onGenerateImage:b(Ee),onToggleAnnotator:Be,onCopyAlt:Ue,style:h({visibility:b(ze)?b(Q)?`visible`:`hidden`:`visible`,zIndex:P.value.length+1})},f({_:2},[v(b(re)(e.$slots,`menuIcon optionPdf optionImg optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),t=>({name:t,fn:S(n=>[y(e.$slots,t,de(m(b(ie)(t,n))),void 0,!0)])}))]),1032,[`backgroundColor`,`color`,`isPrinting`,`isImaging`,`uid`,`position`,`hasPdf`,`hasImg`,`hasAltCopy`,`chartElement`,`callbacks`,`hasAnnotator`,`isAnnotation`,`printScale`,`titles`,`isCursorPointer`,`onGeneratePdf`,`onGenerateImage`,`style`])):l(``,!0)],40,me))}},[[`__scopeId`,`data-v-96466658`]]);export{C as n,T as t};
@@ -1,4 +1,4 @@
1
- import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{X as t,t as n}from"./lib-CV_IANZ6.js";import{n as r,t as i}from"./useHints-BH9r_0Vd.js";import{t as a}from"./useConfig-CKdzPrcf.js";import{t as o}from"./useNestedProp-CB186vF2.js";import{t as s}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as c}from"./PackageVersion-CdkxOy58.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createVNode as h,normalizeStyle as g,openBlock as _,ref as v,renderList as y,toDisplayString as b,unref as x}from"vue";var S={key:0},C=[`d`,`fill`],w=[`d`,`fill`],T=[`d`,`fill`],E=[`d`,`fill`],D=[`d`,`fill`],O=[`d`,`fill`],k=[`d`,`fill`],A={key:1},j=[`cx`,`cy`,`r`,`fill`],M={__name:`Digit`,props:{quanta:{type:String,default:null},backgroundColor:{type:String,default:`#e1e5e8`},color:{type:String,default:`#000000`},x:{type:Number,default:0},y:{type:Number,default:0},thickness:{type:Number,default:1}},setup(e){let t=e,n=v({0:`1111110`,1:`0110000`,2:`1101101`,3:`1111001`,4:`0110011`,5:`1011011`,6:`1011111`,7:`1110000`,8:`1111111`,9:`1111011`,"-":`0000001`,X:`0000000`}),r=u(()=>2*(t.thickness||1)),i=u(()=>[void 0,null].includes(t.quanta)?n.value.X:n.value[t.quanta]);return(t,n)=>(_(),p(l,null,[[void 0,null,`.`].includes(e.quanta)?f(``,!0):(_(),p(`g`,S,[m(`path`,{d:`M ${e.x} ${e.y}
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-DM9fSqjh.js";import{X as n,t as r}from"./lib-DqD8nbyX.js";import{n as i,t as a}from"./useHints-BH9r_0Vd.js";import{t as o}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as s}from"./useNestedProp-DrLnzyHO.js";import{n as c}from"./PackageVersion-ATrKWi8V.js";import{Fragment as l,computed as u,createBlock as d,createCommentVNode as f,createElementBlock as p,createElementVNode as m,createVNode as h,normalizeStyle as g,openBlock as _,ref as v,renderList as y,toDisplayString as b,unref as x}from"vue";var S={key:0},C=[`d`,`fill`],w=[`d`,`fill`],T=[`d`,`fill`],E=[`d`,`fill`],D=[`d`,`fill`],O=[`d`,`fill`],k=[`d`,`fill`],A={key:1},j=[`cx`,`cy`,`r`,`fill`],M={__name:`Digit`,props:{quanta:{type:String,default:null},backgroundColor:{type:String,default:`#e1e5e8`},color:{type:String,default:`#000000`},x:{type:Number,default:0},y:{type:Number,default:0},thickness:{type:Number,default:1}},setup(e){let t=e,n=v({0:`1111110`,1:`0110000`,2:`1101101`,3:`1111001`,4:`0110011`,5:`1011011`,6:`1011111`,7:`1110000`,8:`1111111`,9:`1111011`,"-":`0000001`,X:`0000000`}),r=u(()=>2*(t.thickness||1)),i=u(()=>[void 0,null].includes(t.quanta)?n.value.X:n.value[t.quanta]);return(t,n)=>(_(),p(l,null,[[void 0,null,`.`].includes(e.quanta)?f(``,!0):(_(),p(`g`,S,[m(`path`,{d:`M ${e.x} ${e.y}
2
2
  L ${e.x+r.value} ${e.y-r.value}
3
3
  L ${e.x+26-r.value} ${e.y-r.value}
4
4
  L ${e.x+26} ${e.y}
@@ -39,4 +39,4 @@ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{X as t,t as n}from"./l
39
39
  L ${e.x+26-r.value} ${e.y+30+r.value}
40
40
  L ${e.x+26} ${e.y+30}
41
41
  L ${e.x+26-r.value} ${e.y+30-r.value}
42
- L ${e.x+r.value} ${e.y+30-r.value}`,fill:i.value[6]==1?e.color:e.backgroundColor,stroke:`none`},null,8,k)])),e.quanta==`.`?(_(),p(`g`,A,[m(`circle`,{cx:e.x-8,cy:e.y+60,r:2+r.value/2,fill:e.color},null,8,j)])):f(``,!0)],64))}},N=/* @__PURE__ */ e({default:()=>I}),P=[`id`],F=[`xmlns`,`viewBox`,`aria-describedby`],I=/*#__PURE__*/ s({__name:`vue-ui-digits`,props:{dataset:{type:Number,default:0},config:{type:Object,default(){return{}}}},setup(e){let{vue_ui_digits:s}=a(),f=e,v=u(()=>o({userConfig:f.config,defaultConfig:s}));r({config:()=>v.value,dataset:()=>f.dataset,component:`VueUiDigits`,rules:[i.noHint]});let S=u(()=>{let e=(f.dataset||0).toString().split(``),t=[],n={x:10,y:10},r=0;for(let i=0;i<e.length;i+=1){let a=e[i];t.push({x:n.x+r,y:n.y,quanta:a}),r+=a==`.`?2:44}return t}),C=u(()=>Math.max(...S.value.map(e=>e.x))+36),w=t();return(t,r)=>(_(),p(l,null,[m(`div`,{class:`sr-only`,id:`digit-${x(w)}`},b(e.dataset),9,P),(_(),p(`svg`,{class:`vue-data-ui-component vue-ui-digits`,xmlns:x(n),viewBox:`0 0 ${C.value} 80`,style:g(`background:${v.value.backgroundColor};${v.value.height?`height:${v.value.height};`:``}${v.value.width?`width:${v.value.width}`:``}`),"aria-describedby":`digit-${x(w)}`},[h(c),(_(!0),p(l,null,y(S.value,e=>(_(),d(M,{x:e.x,y:e.y,quanta:e.quanta,color:v.value.digits.color,backgroundColor:v.value.digits.skeletonColor,thickness:v.value.digits.thickness},null,8,[`x`,`y`,`quanta`,`color`,`backgroundColor`,`thickness`]))),256))],12,F))],64))}},[[`__scopeId`,`data-v-63bfbc12`]]);export{N as n,I as t};
42
+ L ${e.x+r.value} ${e.y+30-r.value}`,fill:i.value[6]==1?e.color:e.backgroundColor,stroke:`none`},null,8,k)])),e.quanta==`.`?(_(),p(`g`,A,[m(`circle`,{cx:e.x-8,cy:e.y+60,r:2+r.value/2,fill:e.color},null,8,j)])):f(``,!0)],64))}},N=/* @__PURE__ */ e({default:()=>I}),P=[`id`],F=[`xmlns`,`viewBox`,`aria-describedby`],I=/*#__PURE__*/ o({__name:`vue-ui-digits`,props:{dataset:{type:Number,default:0},config:{type:Object,default(){return{}}}},setup(e){let{vue_ui_digits:o}=t(),f=e,v=u(()=>s({userConfig:f.config,defaultConfig:o}));i({config:()=>v.value,dataset:()=>f.dataset,component:`VueUiDigits`,rules:[a.noHint]});let S=u(()=>{let e=(f.dataset||0).toString().split(``),t=[],n={x:10,y:10},r=0;for(let i=0;i<e.length;i+=1){let a=e[i];t.push({x:n.x+r,y:n.y,quanta:a}),r+=a==`.`?2:44}return t}),C=u(()=>Math.max(...S.value.map(e=>e.x))+36),w=n();return(t,n)=>(_(),p(l,null,[m(`div`,{class:`sr-only`,id:`digit-${x(w)}`},b(e.dataset),9,P),(_(),p(`svg`,{class:`vue-data-ui-component vue-ui-digits`,xmlns:x(r),viewBox:`0 0 ${C.value} 80`,style:g(`background:${v.value.backgroundColor};${v.value.height?`height:${v.value.height};`:``}${v.value.width?`width:${v.value.width}`:``}`),"aria-describedby":`digit-${x(w)}`},[h(c),(_(!0),p(l,null,y(S.value,e=>(_(),d(M,{x:e.x,y:e.y,quanta:e.quanta,color:v.value.digits.color,backgroundColor:v.value.digits.skeletonColor,thickness:v.value.digits.thickness},null,8,[`x`,`y`,`quanta`,`color`,`backgroundColor`,`thickness`]))),256))],12,F))],64))}},[[`__scopeId`,`data-v-63bfbc12`]]);export{N as n,I as t};
@@ -1,6 +1,6 @@
1
- import{$ as e,Bt as t,Ht as n,It as r,Jt as i,S as a,X as o,Y as s,Yt as c,b as l,f as u,h as d,i as f,in as p,j as m,nn as h,p as g,st as _,t as v}from"./lib-CV_IANZ6.js";import{t as y}from"./useConfig-CKdzPrcf.js";import{t as b}from"./vue_ui_donut-T5PeOqvf.js";import{_ as x,a as S,c as C,d as w,g as T,i as E,l as D,n as O,o as k,p as A,r as j,s as ee,t as te,u as M,v as N}from"./render-common-BdZ5aRyn.js";var{vue_ui_donut:ne}=y();function re({config:e={}}={}){let t=e??{},r=p({userConfig:t,defaultConfig:ne}),i=r.theme;if(!i)return{...r,customPalette:r.customPalette?.length?r.customPalette:n};let a=p({userConfig:b[i]||{},defaultConfig:r}),o=p({userConfig:t,defaultConfig:a});return{...o,customPalette:o.customPalette?.length?o.customPalette:h[i]||n}}function P(e,t=0){let n=Number(e);return Number.isFinite(n)?n:t}function F(e,t,n){return String(t).split(`.`).reduce((e,t)=>e&&e[t]!==void 0?e[t]:void 0,e)??n}function ie(e){return typeof e!=`object`||!e?0:Array.isArray(e.values)?e.values.reduce((e,t)=>e+P(t,0),0):Array.isArray(e.series)?e.series.reduce((e,t)=>e+P(t,0),0):P(e.value??e.y??0,0)}function ae(e,t){return String(e?.name??e?.label??`Serie ${t+1}`)}function oe(e=[],t){let r=Array.isArray(t.customPalette)?t.customPalette:n;return(Array.isArray(e)?e:[]).map((e,t)=>({source:e,sourceIndex:t,value:ie(e)})).filter(e=>Number.isFinite(e.value)).sort((e,t)=>e.source?.ghost&&!t.source?.ghost?1:t.source?.ghost&&!e.source?.ghost?-1:t.value-e.value).map((e,t)=>{let n=e.source,i=e.value,o=(n?.color?a(n.color):``)||r[t%r.length];return{...n,id:n?.id??`donut_serie_${t}`,name:ae(n,t),value:i,absoluteValue:Math.abs(i),absoluteValues:Array.isArray(n?.values)?n.values:[i],color:o,index:t,sourceIndex:e.sourceIndex,patternIndex:n?.patternIndex??t,seriesIndex:n?.seriesIndex??t,ghost:!!n?.ghost}}).filter(e=>Number.isFinite(e.absoluteValue))}function se(e){return e.reduce((e,t)=>e+t.absoluteValue,0)}function ce({series:e,total:t,startAngle:n=-90}){let r=n;return e.map(e=>{let n=t?e.absoluteValue/t:0,i=n*360,a=r,o=r+i;return r=o,{...e,ratio:n,percentage:n*100,startAngle:a,endAngle:o,midAngle:a+i/2}})}function le({dataset:e=[],config:t={},width:n=512,height:r=512,additionalSvgContent:i=``,svgTitle:a=``}={}){let o=re({config:t}),s=oe(e,o),c=se(s),l={top:P(F(o,`chart.padding.top`,24),24),right:P(F(o,`chart.padding.right`,24),24),bottom:P(F(o,`chart.padding.bottom`,24),24),left:P(F(o,`chart.padding.left`,24),24)},u={top:l.top,left:l.left,right:n-l.right,bottom:r-l.bottom};u.width=Math.max(1,u.right-u.left),u.height=Math.max(1,u.bottom-u.top);let d={x:u.left+u.width/2,y:u.top+u.height/2},f=Math.max(1,Math.min(u.width,u.height)/2),p=P(F(o,`chart.donut.radius`,f),f),m=P(F(o,`chart.donut.holeRatio`,.5),.5);return{width:n,height:r,dataset:e,config:o,drawingArea:u,center:d,radius:p,innerRadius:Math.max(0,Math.min(p-1,p*m)),total:c,series:ce({series:s,total:c,startAngle:P(F(o,`chart.donut.startAngle`,-90),-90)}),additionalSvgContent:i,svgTitle:a}}var ue=o();function I(){return ue}function L(e){return k(S(e,`backgroundColor`,`#FFFFFF`),`#FFFFFF`)}function de(e){return x(e?.value??e?.absoluteValue??0,0)}function R(e){return T(e.series).filter(e=>!e?.ghost).map((e,t)=>({...e,value:Math.abs(de(e)),color:k(e.color,`#000000`),name:String(e.name??`Serie ${t+1}`),seriesIndex:e.seriesIndex??e.index??t,patternIndex:e.patternIndex??e.index??t})).filter(e=>Number.isFinite(e.value))}function z(e){return e.reduce((e,t)=>e+Math.abs(x(t.value,0)),0)}function fe(e){let t=S(e,`title`,{}),n=A(t,`subtitle`,{});if(!t.text)return 0;let r=x(t.fontSize,20),i=n.show!==!1&&n.text?x(n.fontSize,14):0;return x(t.paddingTop,12)+r+(i?i+12:0)+x(t.paddingBottom,36)}function pe({state:e,series:t}){let{config:n,width:r}=e,i=S(n,`legend`,{}),a=x(i.fontSize,12),o=x(i.markerSize,10),s=x(i.itemGap,24),c=x(i.rowGap,8),l=x(i.padding,8),u=x(i.labelGap,8),d=Math.max(1,r-l*2),f=[],p=[],m=0;return t.forEach(t=>{let n=Ve(e,t),r=O(n,a),i=o+u+r,c=m+i+(p.length?s:0);p.length&&c>d&&(f.push({items:p,width:m}),p=[],m=0),p.push({serie:t,label:n,itemWidth:i}),m+=i+(p.length>1?s:0)}),p.length&&f.push({items:p,width:m}),{rows:f,fontSize:a,markerSize:o,itemGap:s,labelGap:u,rowGap:c,padding:l,height:f.length*Math.max(o,a)+Math.max(0,f.length-1)*c+l*2}}function B(e,t){return!S(e.config,`legend.show`,!0)||!t.length?{rows:[],height:0,padding:0,fontSize:12,markerSize:10,rowGap:0}:pe({state:e,series:t})}function V(e){return!!E(e,`pie`,S(e,`pie`,!1))}function me(e,t){let{config:n,width:r,height:i}=e,a=fe(n),o=B(e,t),s=S(n,`legend.show`,!0),c=S(n,`legend.position`,`bottom`),l=s&&c===`top`?o.height:0,u=s&&c!==`top`?o.height:0,d=x(S(n,`padding.top`,24),24),f=x(S(n,`padding.right`,24),24),p=x(S(n,`padding.bottom`,24),24),m=x(S(n,`padding.left`,24),24),h={top:d+a+l,right:r-f,bottom:i-p-u,left:m};h.width=Math.max(1,h.right-h.left),h.height=Math.max(1,h.bottom-h.top);let g=a?x(E(n,`title.chartOffsetY`,24),24):0,_=Math.max(1,h.height-g),v={x:h.left+h.width/2,y:h.top+g/2+_/2},y=x(S(n,`layout.donut.radiusRatio`,.35),.35),b=Math.max(.1,Math.min(.50001,y)),C=Math.max(12,Math.min(h.width,_)*b),w=S(n,`layout.donut.radius`,null),T=w==null?C:Math.min(C,x(w,C)),D=x(S(n,`layout.donut.strokeWidth`,64),64)/300,O=Math.max(Math.min(T*D*2,T),12*(1+D)),k=S(n,`layout.donut.thickness`,S(n,`layout.donut.size`,O)),A=Math.max(0,Math.min(T-1,k==null?O:x(k,O)));return{...e,drawingArea:h,center:v,radius:T,thickness:A,innerRadius:V(n)?0:Math.max(0,T-A)}}function he(e,t){let n=x(S(e.config,`layout.donut.rotation`,105.25),105.25);return r({series:t},e.center.x,e.center.y,e.radius,e.radius,1.99999,2,1,360,n,V(e.config)?e.radius:e.thickness).map((e,n)=>({...e,index:n,color:k(e.color,t[n]?.color),value:x(e.value,0),name:String(e.name??t[n]?.name??`Serie ${n+1}`),patternIndex:e.patternIndex??t[n]?.patternIndex??n,seriesIndex:e.seriesIndex??t[n]?.seriesIndex??n}))}function ge(e,t){let n=Math.max(1,...t.map(e=>Math.abs(x(e.value,0)))),r=t.map(e=>Math.abs(x(e.value,0))/n);return m({series:r,center:e.center,maxRadius:Math.min(e.drawingArea.width,e.drawingArea.height)/3,hasGhost:!1})}function H(e){return`gradient_${I()}`}function U(e,t){return`polar_gradient_${t}_${I()}`}function _e(e){return E(e.config,`type`,`classic`)!==`classic`||!S(e.config,`useGradient`,!1)?``:w(`circle`,{"data-cy":`donut-gradient-hollow`,cx:e.center.x,cy:e.center.y,r:e.radius<=0?10:e.radius,fill:`url(#${H(e)})`})}function W(e){return`drop_shadow_${I()}`}function ve(e){let{config:t,width:n}=e,r=S(t,`title`,{}),i=A(r,`subtitle`,{});if(!r.text)return``;let a=r.textAlign||`center`,o=a===`left`?x(r.paddingLeft,12):a===`right`?n-x(r.paddingRight,12):n/2,s=a===`left`?`start`:a===`right`?`end`:`middle`,c=x(r.fontSize,20),l=x(i.fontSize,14),u=x(r.paddingTop,12)+c,d=[N(r.text,{"data-cy":`donut-div-title`,x:o,y:u,"font-size":c,"font-weight":r.bold?`700`:`400`,"text-anchor":s,fill:k(r.color,j(t))})];return i.text&&d.push(N(i.text,{"data-cy":`donut-div-subtitle`,x:o,y:u+l+4,"font-size":l,"font-weight":i.bold?`700`:`400`,"text-anchor":s,fill:k(i.color||r.color,j(t))})),M(`g`,{"data-layer":`title`},d.join(``))}function ye(e,t){let{config:n}=e,r=[],a=!!S(n,`useGradient`,!1),o=!!S(n,`layout.donut.useShadow`,!1);if(a){let a=E(n,`type`,`classic`),o=x(S(n,`gradientIntensity`,30),30);if(a===`classic`&&Number.isFinite(e.thickness/e.radius)){let t=V(n)?1:e.thickness/e.radius;r.push(M(`radialGradient`,{id:H(e)},[w(`stop`,{offset:`0%`,"stop-color":i(L(n),0),"stop-opacity":0}),w(`stop`,{offset:`${(1-t)*100}%`,"stop-color":i(`#FFFFFF`,0),"stop-opacity":0}),w(`stop`,{offset:`${(1-t/2)*100}%`,"stop-color":i(`#FFFFFF`,o)}),w(`stop`,{offset:`100%`,"stop-color":i(L(n),0),"stop-opacity":0})].join(``)))}a===`polar`&&t.forEach((t,n)=>{let i=e.polarAreas?.[n];i?.middlePoint&&r.push(M(`radialGradient`,{id:U(e,n),cx:`${l(i.middlePoint.x/e.width*100)}%`,cy:`${l(i.middlePoint.y/e.height*100)}%`,r:`62%`},[w(`stop`,{offset:`0%`,"stop-color":c(t.color,.05),"stop-opacity":o/100}),w(`stop`,{offset:`100%`,"stop-color":t.color})].join(``)))})}if(o){let t=k(S(n,`layout.donut.shadowColor`,`#000000`),`#000000`),i=x(S(n,`layout.donut.shadowOpacity`,.2),.2),a=x(S(n,`layout.donut.shadowBlur`,6),6),o=x(S(n,`layout.donut.shadowOffsetY`,3),3);r.push(M(`filter`,{id:W(e),x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[w(`feDropShadow`,{dx:0,dy:o,stdDeviation:a,"flood-color":t,"flood-opacity":i})].join(``)))}return r.length?M(`defs`,{"data-layer":`definitions`},r.join(``)):``}function be(e,t){return t.color}function xe(e,t,n){return S(e.config,`useGradient`,!1)?`url(#${U(e,n)})`:t.color}function G(e){let{config:t}=e;return S(t,`layout.donut.borderColorAuto`,!0)?L(t):k(S(t,`layout.donut.borderColor`,L(t)),L(t))}function K(e){return S(e.config,`layout.donut.useShadow`,!1)?`url(#${W(e)})`:void 0}function Se(e,t){if(!t.length)return``;let n=G(e),r=x(S(e.config,`layout.donut.borderWidth`,1),1),i=[];return t.forEach((t,a)=>{x(t.proportion,0)<=0||(i.push(w(`path`,{"data-cy":`donut-arc-underlay-${a}`,d:t.arcSlice,fill:`#FFFFFF`,stroke:L(e.config)})),i.push(w(`path`,{class:`vue-ui-donut-arc-path`,"data-cy":`donut-arc-${a}`,d:t.arcSlice,fill:be(e,t,a),stroke:n,"stroke-width":r,filter:K(e)})))}),M(`g`,{"data-layer":`classic-slices`},i.join(``))}function Ce(e,t,n){if(!t.length)return``;let r=G(e),i=x(S(e.config,`layout.donut.borderWidth`,1),1),a=[];return t.forEach((t,o)=>{let s=n[o];s?.path&&(a.push(w(`path`,{"data-cy":`polar-arc-underlay-${o}`,d:s.path,fill:`#FFFFFF`,stroke:r})),a.push(w(`path`,{class:`vue-ui-donut-arc-path`,"data-cy":`donut-arc-${o}`,d:s.path,fill:xe(e,t,o),stroke:r,"stroke-width":i,filter:K(e)})))}),M(`g`,{"data-layer":`polar-slices`},a.join(``))}function q(t,n,r=`layout.labels.value.rounding`){let{config:i}=t,a=S(i,`layout.labels`,{}),o=a.dataLabels??{},s=a.value??{},c=e({p:o.prefix??``,v:n.value,s:o.suffix??``,r:x(S(i,r,s.rounding??0),s.rounding??0)});return f(s.formatter,n.value,c,{datapoint:n})}function J(t,n){let{config:r}=t,i=S(r,`layout.labels.percentage`,{}),a=x(n.proportion,0)*100,o=e({v:a,s:`%`,r:x(i.rounding,0)});return f(i.formatter,a,o,{datapoint:n})}function Y(e,t){let n=S(e.config,`layout.labels`,{}),r=!!n.name?.show,i=!!(n.value?.show??!0),a=!!(n.percentage?.show??!0);return{name:r?String(t.name??``):``,value:i?q(e,t):``,percentage:a?J(e,t):``}}function we(e,t){let{value:n,percentage:r}=Y(e,t);return r&&n?`${r} (${n})`:r||n||``}function X(e,t){let n=S(e.config,`layout.labels`,{}),r=n.dataLabels??{},i=!!(n.value?.show??!0),a=!!(n.percentage?.show??!0),o=i?q(e,t):``,s=a?J(e,t):``;return o&&s?r.valuePercentageRatio===`percentageFirst`?`${s}\n${o}`:`${o}\n${s}`:o||s||``}function Z(e,t){let n=S(e.config,`layout.labels`,{}).dataLabels??{};if(!E(e.config,`dataLabels.show`,n.show??!0)||!n.show)return!1;let r=x(n.hideUnderValue,0);return x(t.proportion,0)*100>r}function Te(e,t){let n=S(e.config,`layout.labels.dataLabels`,{}),r=x(n.smallArcClusterThreshold,0),i=x(n.hideUnderValue,0),a=x(t.proportion,0)*100;return a>i&&r>0&&a<=r}function Q(e){return!!S(e.config,`layout.curvedMarkers`,S(e.config,`layout.donut.curvedMarkers`,!1))}function Ee(e,t){let n=S(e.config,`layout.labels.dataLabels`,{}),r={},i=e.center.x,a=e.center.y,o=x(n.smallArcClusterFontSize??n.fontSize,10),s=o/3,c=o*1.5,d=e.drawingArea.top+16,f=e.drawingArea.bottom-16,p=i-(e.radius+6),m=i+(e.radius+6),h=Q(e);function _(e){return{x:l(e.center?.endX??e.endX),y:l(e.center?.endY??e.endY)}}function v({midX:e,midY:t,bandX:n,bandY:r}){if(!h)return`M ${e} ${t} L ${e} ${r} L ${n} ${r}`;let o=n<i?-1:1,s=n-e,c=r-t,l=Math.sqrt(s*s+c*c)||1,u=e-i,d=t-a,f=Math.sqrt(u*u+d*d)||1,p=u/f,m=d/f,g=f+9;function _({x:e,y:t}){let n=e-i,r=t-a,o=Math.sqrt(n*n+r*r)||1;if(o>=g)return{x:e,y:t};let s=g/o;return{x:i+n*s,y:a+r*s}}if(l<56){let o=s/l,u=-(c/l),d=o,f=(e+n)*.5,h=(t+r)*.5,g=(f+u-i)**2+(h+d-a)**2;(f-u-i)**2+(h-d-a)**2>g&&(u=-u,d=-d);let v=Math.max(0,Math.min(1,(l-18)/44)),y=v*v*(3-2*v),b=e+s*.78,x=t+c*.78,S=_({x:b+u*(2.5+y*4)*.9+p*(1+y*2.5),y:x+d*(2.5+y*4)*.9+m*(1+y*2.5)});return`M ${e} ${t} Q ${S.x} ${S.y} ${n} ${r}`}let v=l*.34;v<20&&(v=20),v>46&&(v=46);let y=l*.46;y<22&&(y=22),y>70&&(y=70);let b=_({x:e+p*v,y:t+m*v}),x=i+o*Math.max(Math.abs(n-i),g),S=_({x:n-o*Math.min(y,Math.abs(x-n)*.75),y:r});return`M ${e} ${t} C ${b.x} ${b.y} ${S.x} ${S.y} ${n} ${r}`}function y(e){let t=String(e??``).split(/\n/g);return c+Math.max(0,t.length-1)*o*1.2}function b({arc:e,index:t}){let n=_(e);return{arc:e,index:t,midX:n.x,midY:n.y,inlineMarkerX:u(e).x,inlineMarkerY:g(e)-3.5,labelHeight:y(e.name)}}function C(e){let t=e.inlineMarkerY<a,n=e.inlineMarkerX<i;return t&&n?`TL`:t&&!n?`TR`:!t&&n?`BL`:`BR`}function w(e,t){let n=t.startsWith(`T`);e.sort((e,t)=>n?e.inlineMarkerY-t.inlineMarkerY||e.index-t.index:t.inlineMarkerY-e.inlineMarkerY||e.index-t.index)}function T({side:e,markerX:t,markerY:n,labelY:r,connectorPath:i}){return{side:e,labelX:e===`left`?t-8:t+8,labelY:r+s,textAnchor:e===`left`?`end`:`start`,markerX:t,markerY:n,connectorPath:i}}function E({candidateList:e,side:t,bandMarkerX:n,startY:i,direction:a}){let o=i;e.forEach(e=>{let{index:i,midX:s,midY:c,labelHeight:l}=e,u;a===`down`?(u=o,o+=l):(o-=l,u=o);let d=u,f=v({midX:s,midY:c,bandX:n,bandY:d});r[i]=T({side:t,markerX:n,markerY:d,labelY:u,connectorPath:f})})}let D={TL:[],TR:[],BL:[],BR:[]};return t.map((e,t)=>b({arc:e,index:t})).filter(({arc:t})=>Z(e,t)&&Te(e,t)).forEach(e=>{D[C(e)].push(e)}),Object.keys(D).forEach(e=>{w(D[e],e)}),E({candidateList:D.TL,side:`left`,bandMarkerX:p,startY:d,direction:`down`}),E({candidateList:D.TR,side:`right`,bandMarkerX:m,startY:d,direction:`down`}),D.BL.length>1&&E({candidateList:D.BL,side:`left`,bandMarkerX:p,startY:f,direction:`up`}),D.BR.length>1&&E({candidateList:D.BR,side:`right`,bandMarkerX:m,startY:f,direction:`up`}),r}function De({state:e,arc:t,arcIndex:n,smallArcLayout:r,fontSize:i}){let a=S(e.config,`layout.labels`,{}),o=a.percentage??{},s=a.name??{},c=r?.labelX??u(t,!0,12).x,l=r?.labelY??g(t),d=r?.textAnchor??u(t,!0,12).anchor,{name:f}=Y(e,t),p=we(e,t),m=String(f).split(/\n/g),h=f?m.map((t,n)=>M(`tspan`,{class:`vue-data-ui-datalabel-name`,x:n===0?void 0:c,dy:n===0?void 0:i*1.2,fill:k(s.color,j(e.config)),"font-size":i,"font-weight":s.bold?`700`:`400`},_(t+(n===m.length-1?` `:``)))).join(``):``,v=p?M(`tspan`,{class:`vue-data-ui-datalabel-value`,fill:k(o.color,j(e.config)),"font-size":i,"font-weight":o.bold?`700`:`400`},_(p)):``;return M(`text`,{"data-cy":`donut-label-inline-${n}`,class:`vue-data-ui-datalabel-inline`,x:c,y:l,"text-anchor":d},`${h}${v}`)}function Oe(e,t){let n=S(e.config,`layout.labels`,{}),r=n.dataLabels??{};if(!E(e.config,`dataLabels.show`,r.show??!0)||!r.show)return``;let i=x(r.fontSize??n.value?.fontSize??12,12);k(r.color??n.value?.color??j(e.config),j(e.config)),r.bold??n.value?.bold;let a=x(r.offset,16),o=Ee(e,t),s=[];return t.forEach((t,n)=>{if(!Z(e,t))return;let c=o[n];if(X(e,t),c){s.push(De({state:e,arc:t,arcIndex:n,smallArcLayout:c,fontSize:x(r.smallArcClusterFontSize,i)}));return}s.push(De({state:e,arc:t,arcIndex:n,smallArcLayout:{labelX:u(t,!1,a+i/2).x,labelY:g(t,a,a),textAnchor:u(t).anchor},fontSize:i}))}),s.length?M(`g`,{"data-layer":`data-labels`},s.join(``)):``}function ke(e,n,r=42){return t({initX:n.middlePoint.x,initY:n.middlePoint.y,offset:r,centerX:e.center.x,centerY:e.center.y})}function Ae(e,t){return t.x<e.center.x?`end`:t.x>e.center.x?`start`:`middle`}function je(e,t,n,r){let i=S(e.config,`layout.labels`,{}),a=i.percentage??{},o=i.name??{},s=x(a.fontSize,i.dataLabels?.fontSize??12),c=x(o.fontSize,i.dataLabels?.fontSize??12),l=M(`tspan`,{class:`vue-data-ui-datalabel-value`,fill:k(a.color,j(e.config)),"font-size":s,"font-weight":a.bold?`700`:`400`},_(String(X(e,t).replace(/\n/g,` / `)))),u=o.show?String(t.name??``).split(/\n/g).map((t,r)=>M(`tspan`,{class:`vue-data-ui-datalabel-name`,x:r===0?void 0:n,dy:r===0?void 0:c*1.2,fill:k(o.color,j(e.config)),"font-size":c,"font-weight":o.bold?`700`:`400`},_(t))).join(``):``;return r===`end`?`${u}${l}`:`${l}${u}`}function Me(e,t,n){let r=S(e.config,`layout.labels`,{}),i=r.dataLabels??{},a=r.value??{},o=r.percentage??{},c=r.name??{};if(!E(e.config,`dataLabels.show`,i.show??!0)||!i.show)return``;let l=!!i.oneLine,u=x(a.fontSize,i.fontSize??12),d=x(c.fontSize,i.fontSize??12),f=[];return t.forEach((t,r)=>{let i=n[r];if(!i||!Z(e,t))return;let a=ke(e,i,42),p=Ae(e,a);if(l){f.push(M(`text`,{"data-cy":`polar-label-inline`,class:`vue-data-ui-datalabel-inline`,x:a.x,y:a.y,"text-anchor":p},je(e,t,a.x,p)));return}f.push(M(`text`,{"data-cy":`polar-label-value`,class:`vue-data-ui-datalabel-value`,x:a.x,y:a.y,"font-size":u,"font-weight":o.bold?`700`:`400`,"text-anchor":p,fill:valueFill},te({content:X(e,t),x:a.x,fontSize:u,fill:valueFill,textAnchor:p}))),c.show&&f.push(M(`text`,{"data-cy":`polar-label-name`,class:`vue-data-ui-datalabel-name`,x:a.x,y:a.y+d*1.2,"font-size":d,"font-weight":c.bold?`700`:`400`,"text-anchor":p,fill:k(c.color,j(e.config))},s({content:_(String(t.name??``)),fontSize:d,fill:k(c.color,j(e.config)),x:a.x})))}),f.length?M(`g`,{"data-layer":`polar-data-labels`},f.join(``)):``}function Ne(e,t,n=null){if(n?.connectorPath)return n.connectorPath;let r=S(e.config,`layout.labels.dataLabels`,{}),i=x(r.offset,16),a=x(r.markerFlatLength,12),o=Q(e);return d(t,!1,i,i,!1,!1,0,a,o)}function Pe(e,t){let n=S(e.config,`layout.labels.dataLabels`,{});if(!E(e.config,`dataLabels.show`,n.show??!0)||!n.show)return``;let r=Ee(e,t),i=[];return t.forEach((t,a)=>{if(!Z(e,t))return;let o=r[a],s=Ne(e,t,o);s&&(i.push(w(`path`,{"data-cy":`donut-marker-${a}`,d:s,stroke:t.color,"stroke-width":x(n.markerStrokeWidth,1),"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`})),i.push(w(`circle`,{"data-cy":`donut-label-marker-${a}`,cx:o?.markerX??u(t).x,cy:o?.markerY??g(t)-3.5,r:x(n.markerRadius,3),fill:t.color,stroke:L(e.config),"stroke-width":1})))}),i.length?M(`g`,{"data-layer":`label-markers`},i.join(``)):``}function Fe(e,n,r){let i=S(e.config,`layout.labels.dataLabels`,{});if(!E(e.config,`dataLabels.show`,i.show??!0)||!i.show)return``;let a=[];return n.forEach((n,o)=>{let s=r[o];if(!s?.middlePoint||!Z(e,n))return;let c=t({initX:s.middlePoint.x,initY:s.middlePoint.y,offset:24,centerX:e.center.x,centerY:e.center.y});a.push(w(`path`,{"data-cy":`polar-marker-${o}`,d:`M ${c.x},${c.y} ${s.middlePoint.x},${s.middlePoint.y}`,stroke:n.color,"stroke-width":x(i.markerStrokeWidth,1),"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`})),a.push(w(`circle`,{"data-cy":`polar-label-marker-${o}`,cx:c.x,cy:c.y,r:x(i.markerRadius,3),fill:n.color,stroke:L(e.config),"stroke-width":1}))}),a.length?M(`g`,{"data-layer":`polar-label-markers`},a.join(``)):``}function $(e,t){return e==null||e===``?``:N(e,{"text-anchor":`middle`,...t})}function Ie(t,n,r){if(E(t.config,`type`,`classic`)!==`classic`||V(t.config)||!n)return``;let i=S(t.config,`layout.labels.hollow`,{}),a=i.total??{},o=i.average??{},s=[];if(a.show){let r=x(a.fontSize,14),i=!!o.show,c=t.center.y-(i?r:0)+x(a.offsetY,0),l=a.value??{},u=x(l.fontSize,r),d=f(l.formatter,n,e({p:l.prefix??``,v:n,s:l.suffix??``,r:x(l.rounding,0)}),{total:n});s.push($(a.text??``,{"data-cy":`hollow-total-name`,x:t.center.x,y:c,fill:k(a.color,j(t.config)),"font-size":r,"font-weight":a.bold?`700`:`400`})),s.push($(d,{"data-cy":`hollow-total-value`,x:t.center.x,y:t.center.y+r-(i?r:0)+x(l.offsetY,0),fill:k(l.color,k(a.color,j(t.config))),"font-size":u,"font-weight":l.bold?`700`:`400`}))}if(o.show){let i=x(o.fontSize,14),c=!!a.show,l=n/Math.max(1,r.length),u=o.value??{},d=x(u.fontSize,i),p=f(u.formatter,l,e({p:u.prefix??``,v:l,s:u.suffix??``,r:x(u.rounding,0)}),{average:l});s.push($(o.text??``,{"data-cy":`hollow-average-name`,x:t.center.x,y:t.center.y+(c?i:0)+x(o.offsetY,0),fill:k(o.color,j(t.config)),"font-size":i,"font-weight":o.bold?`700`:`400`})),s.push($(p,{"data-cy":`hollow-average-value`,x:t.center.x,y:t.center.y+(c?i:0)+i+x(u.offsetY,0),fill:k(u.color,k(o.color,j(t.config))),"font-size":d,"font-weight":u.bold?`700`:`400`}))}return s.filter(Boolean).length?M(`g`,{class:`vue-data-ui-donut-hollow-labels`,"data-layer":`hollow-labels`},s.join(``)):``}function Le(t,n){let{config:r,center:i}=t,a=S(r,`layout.donut.labels.total`,S(r,`layout.labels.total`,{}));if(!a.show||!Number.isFinite(n)||n<=0)return``;let o=S(r,`layout.labels.dataLabels`,{}),s=x(a.fontSize,20),c=k(a.color,j(r)),l=f(a.formatter,n,e({p:o.prefix??``,v:n,s:o.suffix??``,r:x(a.rounding,0)}),{total:n});return N(l,{"data-cy":`donut-total`,x:i.x,y:i.y+s/3,"font-size":s,"font-weight":a.bold?`700`:`400`,"text-anchor":`middle`,fill:c})}function Re(e,t){let n=z(R(e));return n?x(t.value,0)/n*100:0}function ze(t,n){let r=S(t.config,`legend`,{}),i=S(t.config,`layout.labels`,{}),a=i.dataLabels??{},o=i.value??{},s=e({p:a.prefix??``,v:n.value,s:a.suffix??``,r:x(r.roundingValue,o.rounding??0)});return f(o.formatter,n.value,s,{datapoint:n,serie:n})}function Be(t,n){let r=S(t.config,`legend`,{}),i=S(t.config,`layout.labels`,{}).percentage??{},a=Re(t,n),o=e({v:a,s:`%`,r:x(r.roundingPercentage,i.rounding??0)});return f(i.formatter,a,o,{datapoint:n,serie:n})}function Ve(e,t){let n=S(e.config,`legend`,{}),r=[],i=n.showPercentage?Be(e,t):``,a=n.showValue?ze(e,t):``,o=i&&n.usePercentageParens?`(${i})`:i,s=a&&n.useValueParens?`(${a})`:a;return n.showValueFirst?(s&&r.push(s),o&&r.push(o)):(o&&r.push(o),s&&r.push(s)),`${t.name}${r.length?`: ${r.join(` `)}`:``}`}function He(e,t){let n=S(e.config,`legend`,{});if(!n.show||!t.length)return``;let r=B(e,t),i=k(n.color,j(e.config)),a=n.position||`bottom`,o=Math.max(r.markerSize,r.fontSize),s=a===`top`?r.padding+o:e.height-r.height+r.padding+o,c=[];return r.rows.forEach((t,a)=>{let l=r.padding+(e.width-r.padding*2)/2-t.width/2,u=s+a*(o+r.rowGap);t.items.forEach(({serie:e,label:t,itemWidth:a})=>{c.push(w(`circle`,{cx:l+r.markerSize/2,cy:u,r:r.markerSize/2,fill:e.color,opacity:e.opacity??1})),c.push(N(t,{x:l+r.markerSize+r.labelGap,y:u+2,"font-size":r.fontSize,"font-weight":n.bold?`700`:`400`,"dominant-baseline":`middle`,fill:i,opacity:e.opacity??1})),l+=a+r.itemGap})}),M(`g`,{"data-layer":`legend`,"data-cy":`donut-div-legend`},c.join(``))}function Ue(e){return M(`g`,{"data-layer":`no-data`},[w(`circle`,{cx:e.center.x,cy:e.center.y,r:Math.max(1,e.radius),fill:k(S(e.config,`layout.donut.emptyFill`,`#E1E5E8`),`#E1E5E8`),opacity:.4})].join(``))}function We(e,t){let n=e.additionalSvgContent;return typeof n==`function`?n({width:e.width,height:e.height,drawingArea:e.drawingArea,center:e.center,radius:e.radius,thickness:e.thickness,innerRadius:e.innerRadius,config:e.config,series:t.map(e=>({...e}))})??``:n??``}function Ge(e,t,n){let r=`${E(e.config,`title.text`,`Donut chart`)||e.svgTitle||`Donut chart`}. ${t.length} series. Total ${l(n)}.`;return M(`title`,{},_(r))}async function Ke(e){let t=e.config,n=x(e.width,S(t,`width`,512)),r=x(e.height,S(t,`height`,512)),i=R(e),a=z(i),o=me({...e,width:n,height:r},i),s=he(o,i),c=ge(o,i),l=E(t,`type`,`classic`),u=a>0&&s.some(e=>x(e.proportion,0)>0);return`
1
+ import{t as e}from"./useConfig-DM9fSqjh.js";import{$ as t,Bt as n,Ht as r,It as i,Jt as a,S as o,X as s,Y as c,Yt as l,b as u,f as d,h as f,i as p,in as m,j as h,nn as g,p as _,st as v,t as y}from"./lib-DqD8nbyX.js";import{t as b}from"./vue_ui_donut-T5PeOqvf.js";import{_ as x,a as S,c as C,d as w,g as T,i as E,l as D,n as O,o as k,p as A,r as j,s as ee,t as te,u as M,v as N}from"./render-common-tsNLeNaX.js";var{vue_ui_donut:ne}=e();function re({config:e={}}={}){let t=e??{},n=m({userConfig:t,defaultConfig:ne}),i=n.theme;if(!i)return{...n,customPalette:n.customPalette?.length?n.customPalette:r};let a=m({userConfig:b[i]||{},defaultConfig:n}),o=m({userConfig:t,defaultConfig:a});return{...o,customPalette:o.customPalette?.length?o.customPalette:g[i]||r}}function P(e,t=0){let n=Number(e);return Number.isFinite(n)?n:t}function F(e,t,n){return String(t).split(`.`).reduce((e,t)=>e&&e[t]!==void 0?e[t]:void 0,e)??n}function ie(e){return typeof e!=`object`||!e?0:Array.isArray(e.values)?e.values.reduce((e,t)=>e+P(t,0),0):Array.isArray(e.series)?e.series.reduce((e,t)=>e+P(t,0),0):P(e.value??e.y??0,0)}function ae(e,t){return String(e?.name??e?.label??`Serie ${t+1}`)}function oe(e=[],t){let n=Array.isArray(t.customPalette)?t.customPalette:r;return(Array.isArray(e)?e:[]).map((e,t)=>({source:e,sourceIndex:t,value:ie(e)})).filter(e=>Number.isFinite(e.value)).sort((e,t)=>e.source?.ghost&&!t.source?.ghost?1:t.source?.ghost&&!e.source?.ghost?-1:t.value-e.value).map((e,t)=>{let r=e.source,i=e.value,a=(r?.color?o(r.color):``)||n[t%n.length];return{...r,id:r?.id??`donut_serie_${t}`,name:ae(r,t),value:i,absoluteValue:Math.abs(i),absoluteValues:Array.isArray(r?.values)?r.values:[i],color:a,index:t,sourceIndex:e.sourceIndex,patternIndex:r?.patternIndex??t,seriesIndex:r?.seriesIndex??t,ghost:!!r?.ghost}}).filter(e=>Number.isFinite(e.absoluteValue))}function se(e){return e.reduce((e,t)=>e+t.absoluteValue,0)}function ce({series:e,total:t,startAngle:n=-90}){let r=n;return e.map(e=>{let n=t?e.absoluteValue/t:0,i=n*360,a=r,o=r+i;return r=o,{...e,ratio:n,percentage:n*100,startAngle:a,endAngle:o,midAngle:a+i/2}})}function le({dataset:e=[],config:t={},width:n=512,height:r=512,additionalSvgContent:i=``,svgTitle:a=``}={}){let o=re({config:t}),s=oe(e,o),c=se(s),l={top:P(F(o,`chart.padding.top`,24),24),right:P(F(o,`chart.padding.right`,24),24),bottom:P(F(o,`chart.padding.bottom`,24),24),left:P(F(o,`chart.padding.left`,24),24)},u={top:l.top,left:l.left,right:n-l.right,bottom:r-l.bottom};u.width=Math.max(1,u.right-u.left),u.height=Math.max(1,u.bottom-u.top);let d={x:u.left+u.width/2,y:u.top+u.height/2},f=Math.max(1,Math.min(u.width,u.height)/2),p=P(F(o,`chart.donut.radius`,f),f),m=P(F(o,`chart.donut.holeRatio`,.5),.5);return{width:n,height:r,dataset:e,config:o,drawingArea:u,center:d,radius:p,innerRadius:Math.max(0,Math.min(p-1,p*m)),total:c,series:ce({series:s,total:c,startAngle:P(F(o,`chart.donut.startAngle`,-90),-90)}),additionalSvgContent:i,svgTitle:a}}var ue=s();function I(){return ue}function L(e){return k(S(e,`backgroundColor`,`#FFFFFF`),`#FFFFFF`)}function de(e){return x(e?.value??e?.absoluteValue??0,0)}function R(e){return T(e.series).filter(e=>!e?.ghost).map((e,t)=>({...e,value:Math.abs(de(e)),color:k(e.color,`#000000`),name:String(e.name??`Serie ${t+1}`),seriesIndex:e.seriesIndex??e.index??t,patternIndex:e.patternIndex??e.index??t})).filter(e=>Number.isFinite(e.value))}function z(e){return e.reduce((e,t)=>e+Math.abs(x(t.value,0)),0)}function fe(e){let t=S(e,`title`,{}),n=A(t,`subtitle`,{});if(!t.text)return 0;let r=x(t.fontSize,20),i=n.show!==!1&&n.text?x(n.fontSize,14):0;return x(t.paddingTop,12)+r+(i?i+12:0)+x(t.paddingBottom,36)}function pe({state:e,series:t}){let{config:n,width:r}=e,i=S(n,`legend`,{}),a=x(i.fontSize,12),o=x(i.markerSize,10),s=x(i.itemGap,24),c=x(i.rowGap,8),l=x(i.padding,8),u=x(i.labelGap,8),d=Math.max(1,r-l*2),f=[],p=[],m=0;return t.forEach(t=>{let n=Ve(e,t),r=O(n,a),i=o+u+r,c=m+i+(p.length?s:0);p.length&&c>d&&(f.push({items:p,width:m}),p=[],m=0),p.push({serie:t,label:n,itemWidth:i}),m+=i+(p.length>1?s:0)}),p.length&&f.push({items:p,width:m}),{rows:f,fontSize:a,markerSize:o,itemGap:s,labelGap:u,rowGap:c,padding:l,height:f.length*Math.max(o,a)+Math.max(0,f.length-1)*c+l*2}}function B(e,t){return!S(e.config,`legend.show`,!0)||!t.length?{rows:[],height:0,padding:0,fontSize:12,markerSize:10,rowGap:0}:pe({state:e,series:t})}function V(e){return!!E(e,`pie`,S(e,`pie`,!1))}function me(e,t){let{config:n,width:r,height:i}=e,a=fe(n),o=B(e,t),s=S(n,`legend.show`,!0),c=S(n,`legend.position`,`bottom`),l=s&&c===`top`?o.height:0,u=s&&c!==`top`?o.height:0,d=x(S(n,`padding.top`,24),24),f=x(S(n,`padding.right`,24),24),p=x(S(n,`padding.bottom`,24),24),m=x(S(n,`padding.left`,24),24),h={top:d+a+l,right:r-f,bottom:i-p-u,left:m};h.width=Math.max(1,h.right-h.left),h.height=Math.max(1,h.bottom-h.top);let g=a?x(E(n,`title.chartOffsetY`,24),24):0,_=Math.max(1,h.height-g),v={x:h.left+h.width/2,y:h.top+g/2+_/2},y=x(S(n,`layout.donut.radiusRatio`,.35),.35),b=Math.max(.1,Math.min(.50001,y)),C=Math.max(12,Math.min(h.width,_)*b),w=S(n,`layout.donut.radius`,null),T=w==null?C:Math.min(C,x(w,C)),D=x(S(n,`layout.donut.strokeWidth`,64),64)/300,O=Math.max(Math.min(T*D*2,T),12*(1+D)),k=S(n,`layout.donut.thickness`,S(n,`layout.donut.size`,O)),A=Math.max(0,Math.min(T-1,k==null?O:x(k,O)));return{...e,drawingArea:h,center:v,radius:T,thickness:A,innerRadius:V(n)?0:Math.max(0,T-A)}}function he(e,t){let n=x(S(e.config,`layout.donut.rotation`,105.25),105.25);return i({series:t},e.center.x,e.center.y,e.radius,e.radius,1.99999,2,1,360,n,V(e.config)?e.radius:e.thickness).map((e,n)=>({...e,index:n,color:k(e.color,t[n]?.color),value:x(e.value,0),name:String(e.name??t[n]?.name??`Serie ${n+1}`),patternIndex:e.patternIndex??t[n]?.patternIndex??n,seriesIndex:e.seriesIndex??t[n]?.seriesIndex??n}))}function ge(e,t){let n=Math.max(1,...t.map(e=>Math.abs(x(e.value,0)))),r=t.map(e=>Math.abs(x(e.value,0))/n);return h({series:r,center:e.center,maxRadius:Math.min(e.drawingArea.width,e.drawingArea.height)/3,hasGhost:!1})}function H(e){return`gradient_${I()}`}function U(e,t){return`polar_gradient_${t}_${I()}`}function _e(e){return E(e.config,`type`,`classic`)!==`classic`||!S(e.config,`useGradient`,!1)?``:w(`circle`,{"data-cy":`donut-gradient-hollow`,cx:e.center.x,cy:e.center.y,r:e.radius<=0?10:e.radius,fill:`url(#${H(e)})`})}function W(e){return`drop_shadow_${I()}`}function ve(e){let{config:t,width:n}=e,r=S(t,`title`,{}),i=A(r,`subtitle`,{});if(!r.text)return``;let a=r.textAlign||`center`,o=a===`left`?x(r.paddingLeft,12):a===`right`?n-x(r.paddingRight,12):n/2,s=a===`left`?`start`:a===`right`?`end`:`middle`,c=x(r.fontSize,20),l=x(i.fontSize,14),u=x(r.paddingTop,12)+c,d=[N(r.text,{"data-cy":`donut-div-title`,x:o,y:u,"font-size":c,"font-weight":r.bold?`700`:`400`,"text-anchor":s,fill:k(r.color,j(t))})];return i.text&&d.push(N(i.text,{"data-cy":`donut-div-subtitle`,x:o,y:u+l+4,"font-size":l,"font-weight":i.bold?`700`:`400`,"text-anchor":s,fill:k(i.color||r.color,j(t))})),M(`g`,{"data-layer":`title`},d.join(``))}function ye(e,t){let{config:n}=e,r=[],i=!!S(n,`useGradient`,!1),o=!!S(n,`layout.donut.useShadow`,!1);if(i){let i=E(n,`type`,`classic`),o=x(S(n,`gradientIntensity`,30),30);if(i===`classic`&&Number.isFinite(e.thickness/e.radius)){let t=V(n)?1:e.thickness/e.radius;r.push(M(`radialGradient`,{id:H(e)},[w(`stop`,{offset:`0%`,"stop-color":a(L(n),0),"stop-opacity":0}),w(`stop`,{offset:`${(1-t)*100}%`,"stop-color":a(`#FFFFFF`,0),"stop-opacity":0}),w(`stop`,{offset:`${(1-t/2)*100}%`,"stop-color":a(`#FFFFFF`,o)}),w(`stop`,{offset:`100%`,"stop-color":a(L(n),0),"stop-opacity":0})].join(``)))}i===`polar`&&t.forEach((t,n)=>{let i=e.polarAreas?.[n];i?.middlePoint&&r.push(M(`radialGradient`,{id:U(e,n),cx:`${u(i.middlePoint.x/e.width*100)}%`,cy:`${u(i.middlePoint.y/e.height*100)}%`,r:`62%`},[w(`stop`,{offset:`0%`,"stop-color":l(t.color,.05),"stop-opacity":o/100}),w(`stop`,{offset:`100%`,"stop-color":t.color})].join(``)))})}if(o){let t=k(S(n,`layout.donut.shadowColor`,`#000000`),`#000000`),i=x(S(n,`layout.donut.shadowOpacity`,.2),.2),a=x(S(n,`layout.donut.shadowBlur`,6),6),o=x(S(n,`layout.donut.shadowOffsetY`,3),3);r.push(M(`filter`,{id:W(e),x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[w(`feDropShadow`,{dx:0,dy:o,stdDeviation:a,"flood-color":t,"flood-opacity":i})].join(``)))}return r.length?M(`defs`,{"data-layer":`definitions`},r.join(``)):``}function be(e,t){return t.color}function xe(e,t,n){return S(e.config,`useGradient`,!1)?`url(#${U(e,n)})`:t.color}function G(e){let{config:t}=e;return S(t,`layout.donut.borderColorAuto`,!0)?L(t):k(S(t,`layout.donut.borderColor`,L(t)),L(t))}function K(e){return S(e.config,`layout.donut.useShadow`,!1)?`url(#${W(e)})`:void 0}function Se(e,t){if(!t.length)return``;let n=G(e),r=x(S(e.config,`layout.donut.borderWidth`,1),1),i=[];return t.forEach((t,a)=>{x(t.proportion,0)<=0||(i.push(w(`path`,{"data-cy":`donut-arc-underlay-${a}`,d:t.arcSlice,fill:`#FFFFFF`,stroke:L(e.config)})),i.push(w(`path`,{class:`vue-ui-donut-arc-path`,"data-cy":`donut-arc-${a}`,d:t.arcSlice,fill:be(e,t,a),stroke:n,"stroke-width":r,filter:K(e)})))}),M(`g`,{"data-layer":`classic-slices`},i.join(``))}function Ce(e,t,n){if(!t.length)return``;let r=G(e),i=x(S(e.config,`layout.donut.borderWidth`,1),1),a=[];return t.forEach((t,o)=>{let s=n[o];s?.path&&(a.push(w(`path`,{"data-cy":`polar-arc-underlay-${o}`,d:s.path,fill:`#FFFFFF`,stroke:r})),a.push(w(`path`,{class:`vue-ui-donut-arc-path`,"data-cy":`donut-arc-${o}`,d:s.path,fill:xe(e,t,o),stroke:r,"stroke-width":i,filter:K(e)})))}),M(`g`,{"data-layer":`polar-slices`},a.join(``))}function q(e,n,r=`layout.labels.value.rounding`){let{config:i}=e,a=S(i,`layout.labels`,{}),o=a.dataLabels??{},s=a.value??{},c=t({p:o.prefix??``,v:n.value,s:o.suffix??``,r:x(S(i,r,s.rounding??0),s.rounding??0)});return p(s.formatter,n.value,c,{datapoint:n})}function J(e,n){let{config:r}=e,i=S(r,`layout.labels.percentage`,{}),a=x(n.proportion,0)*100,o=t({v:a,s:`%`,r:x(i.rounding,0)});return p(i.formatter,a,o,{datapoint:n})}function Y(e,t){let n=S(e.config,`layout.labels`,{}),r=!!n.name?.show,i=!!(n.value?.show??!0),a=!!(n.percentage?.show??!0);return{name:r?String(t.name??``):``,value:i?q(e,t):``,percentage:a?J(e,t):``}}function we(e,t){let{value:n,percentage:r}=Y(e,t);return r&&n?`${r} (${n})`:r||n||``}function X(e,t){let n=S(e.config,`layout.labels`,{}),r=n.dataLabels??{},i=!!(n.value?.show??!0),a=!!(n.percentage?.show??!0),o=i?q(e,t):``,s=a?J(e,t):``;return o&&s?r.valuePercentageRatio===`percentageFirst`?`${s}\n${o}`:`${o}\n${s}`:o||s||``}function Z(e,t){let n=S(e.config,`layout.labels`,{}).dataLabels??{};if(!E(e.config,`dataLabels.show`,n.show??!0)||!n.show)return!1;let r=x(n.hideUnderValue,0);return x(t.proportion,0)*100>r}function Te(e,t){let n=S(e.config,`layout.labels.dataLabels`,{}),r=x(n.smallArcClusterThreshold,0),i=x(n.hideUnderValue,0),a=x(t.proportion,0)*100;return a>i&&r>0&&a<=r}function Q(e){return!!S(e.config,`layout.curvedMarkers`,S(e.config,`layout.donut.curvedMarkers`,!1))}function Ee(e,t){let n=S(e.config,`layout.labels.dataLabels`,{}),r={},i=e.center.x,a=e.center.y,o=x(n.smallArcClusterFontSize??n.fontSize,10),s=o/3,c=o*1.5,l=e.drawingArea.top+16,f=e.drawingArea.bottom-16,p=i-(e.radius+6),m=i+(e.radius+6),h=Q(e);function g(e){return{x:u(e.center?.endX??e.endX),y:u(e.center?.endY??e.endY)}}function v({midX:e,midY:t,bandX:n,bandY:r}){if(!h)return`M ${e} ${t} L ${e} ${r} L ${n} ${r}`;let o=n<i?-1:1,s=n-e,c=r-t,l=Math.sqrt(s*s+c*c)||1,u=e-i,d=t-a,f=Math.sqrt(u*u+d*d)||1,p=u/f,m=d/f,g=f+9;function _({x:e,y:t}){let n=e-i,r=t-a,o=Math.sqrt(n*n+r*r)||1;if(o>=g)return{x:e,y:t};let s=g/o;return{x:i+n*s,y:a+r*s}}if(l<56){let o=s/l,u=-(c/l),d=o,f=(e+n)*.5,h=(t+r)*.5,g=(f+u-i)**2+(h+d-a)**2;(f-u-i)**2+(h-d-a)**2>g&&(u=-u,d=-d);let v=Math.max(0,Math.min(1,(l-18)/44)),y=v*v*(3-2*v),b=e+s*.78,x=t+c*.78,S=_({x:b+u*(2.5+y*4)*.9+p*(1+y*2.5),y:x+d*(2.5+y*4)*.9+m*(1+y*2.5)});return`M ${e} ${t} Q ${S.x} ${S.y} ${n} ${r}`}let v=l*.34;v<20&&(v=20),v>46&&(v=46);let y=l*.46;y<22&&(y=22),y>70&&(y=70);let b=_({x:e+p*v,y:t+m*v}),x=i+o*Math.max(Math.abs(n-i),g),S=_({x:n-o*Math.min(y,Math.abs(x-n)*.75),y:r});return`M ${e} ${t} C ${b.x} ${b.y} ${S.x} ${S.y} ${n} ${r}`}function y(e){let t=String(e??``).split(/\n/g);return c+Math.max(0,t.length-1)*o*1.2}function b({arc:e,index:t}){let n=g(e);return{arc:e,index:t,midX:n.x,midY:n.y,inlineMarkerX:d(e).x,inlineMarkerY:_(e)-3.5,labelHeight:y(e.name)}}function C(e){let t=e.inlineMarkerY<a,n=e.inlineMarkerX<i;return t&&n?`TL`:t&&!n?`TR`:!t&&n?`BL`:`BR`}function w(e,t){let n=t.startsWith(`T`);e.sort((e,t)=>n?e.inlineMarkerY-t.inlineMarkerY||e.index-t.index:t.inlineMarkerY-e.inlineMarkerY||e.index-t.index)}function T({side:e,markerX:t,markerY:n,labelY:r,connectorPath:i}){return{side:e,labelX:e===`left`?t-8:t+8,labelY:r+s,textAnchor:e===`left`?`end`:`start`,markerX:t,markerY:n,connectorPath:i}}function E({candidateList:e,side:t,bandMarkerX:n,startY:i,direction:a}){let o=i;e.forEach(e=>{let{index:i,midX:s,midY:c,labelHeight:l}=e,u;a===`down`?(u=o,o+=l):(o-=l,u=o);let d=u,f=v({midX:s,midY:c,bandX:n,bandY:d});r[i]=T({side:t,markerX:n,markerY:d,labelY:u,connectorPath:f})})}let D={TL:[],TR:[],BL:[],BR:[]};return t.map((e,t)=>b({arc:e,index:t})).filter(({arc:t})=>Z(e,t)&&Te(e,t)).forEach(e=>{D[C(e)].push(e)}),Object.keys(D).forEach(e=>{w(D[e],e)}),E({candidateList:D.TL,side:`left`,bandMarkerX:p,startY:l,direction:`down`}),E({candidateList:D.TR,side:`right`,bandMarkerX:m,startY:l,direction:`down`}),D.BL.length>1&&E({candidateList:D.BL,side:`left`,bandMarkerX:p,startY:f,direction:`up`}),D.BR.length>1&&E({candidateList:D.BR,side:`right`,bandMarkerX:m,startY:f,direction:`up`}),r}function De({state:e,arc:t,arcIndex:n,smallArcLayout:r,fontSize:i}){let a=S(e.config,`layout.labels`,{}),o=a.percentage??{},s=a.name??{},c=r?.labelX??d(t,!0,12).x,l=r?.labelY??_(t),u=r?.textAnchor??d(t,!0,12).anchor,{name:f}=Y(e,t),p=we(e,t),m=String(f).split(/\n/g),h=f?m.map((t,n)=>M(`tspan`,{class:`vue-data-ui-datalabel-name`,x:n===0?void 0:c,dy:n===0?void 0:i*1.2,fill:k(s.color,j(e.config)),"font-size":i,"font-weight":s.bold?`700`:`400`},v(t+(n===m.length-1?` `:``)))).join(``):``,g=p?M(`tspan`,{class:`vue-data-ui-datalabel-value`,fill:k(o.color,j(e.config)),"font-size":i,"font-weight":o.bold?`700`:`400`},v(p)):``;return M(`text`,{"data-cy":`donut-label-inline-${n}`,class:`vue-data-ui-datalabel-inline`,x:c,y:l,"text-anchor":u},`${h}${g}`)}function Oe(e,t){let n=S(e.config,`layout.labels`,{}),r=n.dataLabels??{};if(!E(e.config,`dataLabels.show`,r.show??!0)||!r.show)return``;let i=x(r.fontSize??n.value?.fontSize??12,12);k(r.color??n.value?.color??j(e.config),j(e.config)),r.bold??n.value?.bold;let a=x(r.offset,16),o=Ee(e,t),s=[];return t.forEach((t,n)=>{if(!Z(e,t))return;let c=o[n];if(X(e,t),c){s.push(De({state:e,arc:t,arcIndex:n,smallArcLayout:c,fontSize:x(r.smallArcClusterFontSize,i)}));return}s.push(De({state:e,arc:t,arcIndex:n,smallArcLayout:{labelX:d(t,!1,a+i/2).x,labelY:_(t,a,a),textAnchor:d(t).anchor},fontSize:i}))}),s.length?M(`g`,{"data-layer":`data-labels`},s.join(``)):``}function ke(e,t,r=42){return n({initX:t.middlePoint.x,initY:t.middlePoint.y,offset:r,centerX:e.center.x,centerY:e.center.y})}function Ae(e,t){return t.x<e.center.x?`end`:t.x>e.center.x?`start`:`middle`}function je(e,t,n,r){let i=S(e.config,`layout.labels`,{}),a=i.percentage??{},o=i.name??{},s=x(a.fontSize,i.dataLabels?.fontSize??12),c=x(o.fontSize,i.dataLabels?.fontSize??12),l=M(`tspan`,{class:`vue-data-ui-datalabel-value`,fill:k(a.color,j(e.config)),"font-size":s,"font-weight":a.bold?`700`:`400`},v(String(X(e,t).replace(/\n/g,` / `)))),u=o.show?String(t.name??``).split(/\n/g).map((t,r)=>M(`tspan`,{class:`vue-data-ui-datalabel-name`,x:r===0?void 0:n,dy:r===0?void 0:c*1.2,fill:k(o.color,j(e.config)),"font-size":c,"font-weight":o.bold?`700`:`400`},v(t))).join(``):``;return r===`end`?`${u}${l}`:`${l}${u}`}function Me(e,t,n){let r=S(e.config,`layout.labels`,{}),i=r.dataLabels??{},a=r.value??{},o=r.percentage??{},s=r.name??{};if(!E(e.config,`dataLabels.show`,i.show??!0)||!i.show)return``;let l=!!i.oneLine,u=x(a.fontSize,i.fontSize??12),d=x(s.fontSize,i.fontSize??12),f=[];return t.forEach((t,r)=>{let i=n[r];if(!i||!Z(e,t))return;let a=ke(e,i,42),p=Ae(e,a);if(l){f.push(M(`text`,{"data-cy":`polar-label-inline`,class:`vue-data-ui-datalabel-inline`,x:a.x,y:a.y,"text-anchor":p},je(e,t,a.x,p)));return}f.push(M(`text`,{"data-cy":`polar-label-value`,class:`vue-data-ui-datalabel-value`,x:a.x,y:a.y,"font-size":u,"font-weight":o.bold?`700`:`400`,"text-anchor":p,fill:valueFill},te({content:X(e,t),x:a.x,fontSize:u,fill:valueFill,textAnchor:p}))),s.show&&f.push(M(`text`,{"data-cy":`polar-label-name`,class:`vue-data-ui-datalabel-name`,x:a.x,y:a.y+d*1.2,"font-size":d,"font-weight":s.bold?`700`:`400`,"text-anchor":p,fill:k(s.color,j(e.config))},c({content:v(String(t.name??``)),fontSize:d,fill:k(s.color,j(e.config)),x:a.x})))}),f.length?M(`g`,{"data-layer":`polar-data-labels`},f.join(``)):``}function Ne(e,t,n=null){if(n?.connectorPath)return n.connectorPath;let r=S(e.config,`layout.labels.dataLabels`,{}),i=x(r.offset,16),a=x(r.markerFlatLength,12),o=Q(e);return f(t,!1,i,i,!1,!1,0,a,o)}function Pe(e,t){let n=S(e.config,`layout.labels.dataLabels`,{});if(!E(e.config,`dataLabels.show`,n.show??!0)||!n.show)return``;let r=Ee(e,t),i=[];return t.forEach((t,a)=>{if(!Z(e,t))return;let o=r[a],s=Ne(e,t,o);s&&(i.push(w(`path`,{"data-cy":`donut-marker-${a}`,d:s,stroke:t.color,"stroke-width":x(n.markerStrokeWidth,1),"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`})),i.push(w(`circle`,{"data-cy":`donut-label-marker-${a}`,cx:o?.markerX??d(t).x,cy:o?.markerY??_(t)-3.5,r:x(n.markerRadius,3),fill:t.color,stroke:L(e.config),"stroke-width":1})))}),i.length?M(`g`,{"data-layer":`label-markers`},i.join(``)):``}function Fe(e,t,r){let i=S(e.config,`layout.labels.dataLabels`,{});if(!E(e.config,`dataLabels.show`,i.show??!0)||!i.show)return``;let a=[];return t.forEach((t,o)=>{let s=r[o];if(!s?.middlePoint||!Z(e,t))return;let c=n({initX:s.middlePoint.x,initY:s.middlePoint.y,offset:24,centerX:e.center.x,centerY:e.center.y});a.push(w(`path`,{"data-cy":`polar-marker-${o}`,d:`M ${c.x},${c.y} ${s.middlePoint.x},${s.middlePoint.y}`,stroke:t.color,"stroke-width":x(i.markerStrokeWidth,1),"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`})),a.push(w(`circle`,{"data-cy":`polar-label-marker-${o}`,cx:c.x,cy:c.y,r:x(i.markerRadius,3),fill:t.color,stroke:L(e.config),"stroke-width":1}))}),a.length?M(`g`,{"data-layer":`polar-label-markers`},a.join(``)):``}function $(e,t){return e==null||e===``?``:N(e,{"text-anchor":`middle`,...t})}function Ie(e,n,r){if(E(e.config,`type`,`classic`)!==`classic`||V(e.config)||!n)return``;let i=S(e.config,`layout.labels.hollow`,{}),a=i.total??{},o=i.average??{},s=[];if(a.show){let r=x(a.fontSize,14),i=!!o.show,c=e.center.y-(i?r:0)+x(a.offsetY,0),l=a.value??{},u=x(l.fontSize,r),d=p(l.formatter,n,t({p:l.prefix??``,v:n,s:l.suffix??``,r:x(l.rounding,0)}),{total:n});s.push($(a.text??``,{"data-cy":`hollow-total-name`,x:e.center.x,y:c,fill:k(a.color,j(e.config)),"font-size":r,"font-weight":a.bold?`700`:`400`})),s.push($(d,{"data-cy":`hollow-total-value`,x:e.center.x,y:e.center.y+r-(i?r:0)+x(l.offsetY,0),fill:k(l.color,k(a.color,j(e.config))),"font-size":u,"font-weight":l.bold?`700`:`400`}))}if(o.show){let i=x(o.fontSize,14),c=!!a.show,l=n/Math.max(1,r.length),u=o.value??{},d=x(u.fontSize,i),f=p(u.formatter,l,t({p:u.prefix??``,v:l,s:u.suffix??``,r:x(u.rounding,0)}),{average:l});s.push($(o.text??``,{"data-cy":`hollow-average-name`,x:e.center.x,y:e.center.y+(c?i:0)+x(o.offsetY,0),fill:k(o.color,j(e.config)),"font-size":i,"font-weight":o.bold?`700`:`400`})),s.push($(f,{"data-cy":`hollow-average-value`,x:e.center.x,y:e.center.y+(c?i:0)+i+x(u.offsetY,0),fill:k(u.color,k(o.color,j(e.config))),"font-size":d,"font-weight":u.bold?`700`:`400`}))}return s.filter(Boolean).length?M(`g`,{class:`vue-data-ui-donut-hollow-labels`,"data-layer":`hollow-labels`},s.join(``)):``}function Le(e,n){let{config:r,center:i}=e,a=S(r,`layout.donut.labels.total`,S(r,`layout.labels.total`,{}));if(!a.show||!Number.isFinite(n)||n<=0)return``;let o=S(r,`layout.labels.dataLabels`,{}),s=x(a.fontSize,20),c=k(a.color,j(r)),l=p(a.formatter,n,t({p:o.prefix??``,v:n,s:o.suffix??``,r:x(a.rounding,0)}),{total:n});return N(l,{"data-cy":`donut-total`,x:i.x,y:i.y+s/3,"font-size":s,"font-weight":a.bold?`700`:`400`,"text-anchor":`middle`,fill:c})}function Re(e,t){let n=z(R(e));return n?x(t.value,0)/n*100:0}function ze(e,n){let r=S(e.config,`legend`,{}),i=S(e.config,`layout.labels`,{}),a=i.dataLabels??{},o=i.value??{},s=t({p:a.prefix??``,v:n.value,s:a.suffix??``,r:x(r.roundingValue,o.rounding??0)});return p(o.formatter,n.value,s,{datapoint:n,serie:n})}function Be(e,n){let r=S(e.config,`legend`,{}),i=S(e.config,`layout.labels`,{}).percentage??{},a=Re(e,n),o=t({v:a,s:`%`,r:x(r.roundingPercentage,i.rounding??0)});return p(i.formatter,a,o,{datapoint:n,serie:n})}function Ve(e,t){let n=S(e.config,`legend`,{}),r=[],i=n.showPercentage?Be(e,t):``,a=n.showValue?ze(e,t):``,o=i&&n.usePercentageParens?`(${i})`:i,s=a&&n.useValueParens?`(${a})`:a;return n.showValueFirst?(s&&r.push(s),o&&r.push(o)):(o&&r.push(o),s&&r.push(s)),`${t.name}${r.length?`: ${r.join(` `)}`:``}`}function He(e,t){let n=S(e.config,`legend`,{});if(!n.show||!t.length)return``;let r=B(e,t),i=k(n.color,j(e.config)),a=n.position||`bottom`,o=Math.max(r.markerSize,r.fontSize),s=a===`top`?r.padding+o:e.height-r.height+r.padding+o,c=[];return r.rows.forEach((t,a)=>{let l=r.padding+(e.width-r.padding*2)/2-t.width/2,u=s+a*(o+r.rowGap);t.items.forEach(({serie:e,label:t,itemWidth:a})=>{c.push(w(`circle`,{cx:l+r.markerSize/2,cy:u,r:r.markerSize/2,fill:e.color,opacity:e.opacity??1})),c.push(N(t,{x:l+r.markerSize+r.labelGap,y:u+2,"font-size":r.fontSize,"font-weight":n.bold?`700`:`400`,"dominant-baseline":`middle`,fill:i,opacity:e.opacity??1})),l+=a+r.itemGap})}),M(`g`,{"data-layer":`legend`,"data-cy":`donut-div-legend`},c.join(``))}function Ue(e){return M(`g`,{"data-layer":`no-data`},[w(`circle`,{cx:e.center.x,cy:e.center.y,r:Math.max(1,e.radius),fill:k(S(e.config,`layout.donut.emptyFill`,`#E1E5E8`),`#E1E5E8`),opacity:.4})].join(``))}function We(e,t){let n=e.additionalSvgContent;return typeof n==`function`?n({width:e.width,height:e.height,drawingArea:e.drawingArea,center:e.center,radius:e.radius,thickness:e.thickness,innerRadius:e.innerRadius,config:e.config,series:t.map(e=>({...e}))})??``:n??``}function Ge(e,t,n){let r=`${E(e.config,`title.text`,`Donut chart`)||e.svgTitle||`Donut chart`}. ${t.length} series. Total ${u(n)}.`;return M(`title`,{},v(r))}async function Ke(e){let t=e.config,n=x(e.width,S(t,`width`,512)),r=x(e.height,S(t,`height`,512)),i=R(e),a=z(i),o=me({...e,width:n,height:r},i),s=he(o,i),c=ge(o,i),l=E(t,`type`,`classic`),u=a>0&&s.some(e=>x(e.proportion,0)>0);return`
2
2
  <svg
3
- xmlns="${v}"
3
+ xmlns="${y}"
4
4
  width="100%"
5
5
  viewBox="0 0 ${n} ${r}"
6
6
  role="img"
@@ -0,0 +1,47 @@
1
+ import{t as e}from"./rolldown-runtime-DK3Fl9T5.js";import{t}from"./useConfig-DM9fSqjh.js";import{$ as n,Bt as r,D as i,Dt as a,Ht as o,It as s,Jt as c,S as l,X as u,Y as ee,Yt as te,Zt as ne,at as d,b as re,dt as ie,f,h as p,i as m,in as ae,it as oe,j as se,nn as ce,nt as le,p as h,s as ue,t as de,ut as fe,w as pe,yt as me,zt as he}from"./lib-DqD8nbyX.js";import{n as ge,t as _e}from"./BaseScanner-8NdoBs7B.js";import{n as ve,t as ye}from"./useHints-BH9r_0Vd.js";import{t as be}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{t as xe}from"./useNestedProp-DrLnzyHO.js";import{t as Se}from"./useThemeCheck-BKNRbGeC.js";import{t as Ce}from"./chartImage-r-G4CkRK.js";import{n as we}from"./Title-BLA0tM3g.js";import{t as Te}from"./useChartExport-DtPNpc9M.js";import{n as Ee,t as De}from"./tableIntegration-CNoJ1CIY.js";import{n as Oe,t as ke}from"./annotationSlots-BRR85CqJ.js";import{n as Ae,t as je}from"./userOptionsSlots-DYuo-E5m.js";import{t as Me}from"./usePrinter-Cj4eIYC_.js";import{t as Ne}from"./Shape-gDVRWM6n.js";import{l as Pe,t as Fe}from"./useResponsive-D2CPcpda.js";import{t as Ie}from"./DefGrad-DKMq1REY.js";import{t as Le}from"./BaseLegendToggle-BOcw1ke8.js";import{t as Re}from"./A11yDataTable-DWNlWXzs.js";import{t as ze}from"./useUserOptionState-CXlFnwPv.js";import{t as Be}from"./useChartAccessibility-DOMuYJfm.js";import{n as Ve,t as He}from"./labelUtils-DXiFpsZl.js";import{t as Ue}from"./vue_ui_donut-T5PeOqvf.js";import{t as We}from"./Legend-D8NunRPr.js";import{Fragment as g,Teleport as Ge,computed as _,createBlock as v,createCommentVNode as y,createElementBlock as b,createElementVNode as x,createSlots as Ke,createTextVNode as qe,createVNode as Je,defineAsyncComponent as Ye,guardReactiveProps as Xe,mergeProps as Ze,nextTick as Qe,normalizeClass as $e,normalizeProps as et,normalizeStyle as S,onBeforeUnmount as tt,onMounted as nt,openBlock as C,ref as w,renderList as T,renderSlot as E,resolveDynamicComponent as rt,shallowRef as it,toDisplayString as D,toRefs as at,unref as O,useSlots as ot,vShow as st,watch as ct,withCtx as k,withDirectives as lt}from"vue";function ut(e){let{FINAL_CONFIG:t,noGhostDonut:n,svg:r,padding:i,labels_inline_fontSize:a,minSize:o,findArcMidpoint:s,calcMarkerOffsetX:c,calcMarkerOffsetY:l,animatingIndex:u,segregated:ee,isSmallArc:te}=e;return{smallArcLayoutsClassic:_(()=>{if(t.value.type!==`classic`)return{};let e={},ne=n.value||[];if(!ne.length)return e;let d=r.value.width/2,re=r.value.height/2,ie=i.value.top+16,f=r.value.height-i.value.bottom-16,p=a.value,m=p/3,ae=p*1.5,oe=d-(o.value+6),se=d+(o.value+6),ce=!!t.value.style.chart.layout.curvedMarkers;function le({midX:e,midY:t,bandX:n,bandY:r}){if(!ce)return`M ${e} ${t} L ${e} ${r} L ${n} ${r}`;let i=n<d?-1:1,a=n-e,o=r-t,s=Math.sqrt(a*a+o*o)||1,c=e-d,l=t-re,u=Math.sqrt(c*c+l*l)||1,ee=c/u,te=l/u,ne=u+9;function ie({x:e,y:t}){let n=e-d,r=t-re,i=Math.sqrt(n*n+r*r)||1;if(i>=ne)return{x:e,y:t};let a=ne/i;return{x:d+n*a,y:re+r*a}}if(s<56){let i=a/s,c=-(o/s),l=i,u=(e+n)*.5,ne=(t+r)*.5,f=u+c,p=ne+l,m=(f-d)*(f-d)+(p-re)*(p-re),ae=u-c,oe=ne-l;(ae-d)*(ae-d)+(oe-re)*(oe-re)>m&&(c=-c,l=-l);let se=.78,ce=e+a*se,le=t+o*se,h=Math.max(0,Math.min(1,(s-18)/44)),ue=h*h*(3-2*h),de=2.5+ue*4,fe=1+ue*2.5;de*=.9;let pe=ie({x:ce+c*de+ee*fe,y:le+l*de+te*fe});return`M ${e} ${t} Q ${pe.x} ${pe.y} ${n} ${r}`}let f=s*.34;f<20&&(f=20),f>46&&(f=46);let p=s*.46;p<22&&(p=22),p>70&&(p=70);let m={x:e+ee*f,y:t+te*f},ae=d+i*Math.max(Math.abs(n-d),ne),oe={x:n-i*Math.min(p,Math.abs(ae-n)*.75),y:r},se=ie(m),le=ie(oe);return`M ${e} ${t} C ${se.x} ${se.y} ${le.x} ${le.y} ${n} ${r}`}function h(e){let t=String(e??``).split(/\n/g),n=Math.max(0,t.length-1)*(p*1.2);return ae+n}function ue({arc:e,index:t}){let{x:n,y:r}=s(e.path);return{arc:e,index:t,midX:n,midY:r,inlineMarkerX:c(e).x,inlineMarkerY:l(e)-3.5,labelHeight:h(e.name)}}function de(e){let{arc:t}=e,n=t.seriesIndex??0;return u.value===n||ee.value.includes(n)?!1:te(t,n)}function fe(e){let t=e.inlineMarkerY<re,n=e.inlineMarkerX<d;return t&&n?`TL`:t&&!n?`TR`:!t&&n?`BL`:`BR`}function pe(e,t){if(t.startsWith(`T`)){e.sort((e,t)=>e.inlineMarkerY-t.inlineMarkerY||e.index-t.index);return}e.sort((e,t)=>t.inlineMarkerY-e.inlineMarkerY||e.index-t.index)}function me({side:e,markerX:t,markerY:n,labelY:r,connectorPath:i}){return{side:e,labelX:e===`left`?t-8:t+8,labelY:r+m,textAnchor:e===`left`?`end`:`start`,markerX:t,markerY:n,connectorPath:i}}function he({candidateList:t,side:n,bandMarkerX:r,startY:i,direction:a}){let o=i;t.forEach(t=>{let{index:i,midX:s,midY:c,labelHeight:l}=t,u;a===`down`?(u=o,o+=l):(o-=l,u=o);let ee=u,te=le({midX:s,midY:c,bandX:r,bandY:ee});e[i]=me({side:n,markerX:r,markerY:ee,labelY:u,connectorPath:te})})}let ge=ne.map((e,t)=>ue({arc:e,index:t})).filter(de),_e={TL:[],TR:[],BL:[],BR:[]};return ge.forEach(e=>{_e[fe(e)].push(e)}),Object.keys(_e).forEach(e=>{pe(_e[e],e)}),he({candidateList:_e.TL,side:`left`,bandMarkerX:oe,startY:ie,direction:`down`}),he({candidateList:_e.TR,side:`right`,bandMarkerX:se,startY:ie,direction:`down`}),_e.BL.length>1&&he({candidateList:_e.BL,side:`left`,bandMarkerX:oe,startY:f,direction:`up`}),_e.BR.length>1&&he({candidateList:_e.BR,side:`right`,bandMarkerX:se,startY:f,direction:`up`}),e})}}var dt=/* @__PURE__ */ e({default:()=>En}),ft=[`id`],pt=[`id`],mt=[`id`],ht={style:{position:`relative`}},gt=[`xmlns`,`aria-describedby`,`viewBox`],_t=[`width`,`height`],vt={key:1},yt={key:2},bt=[`id`],xt=[`id`],St=[`id`],Ct=[`flood-color`],wt=[`id`],Tt=[`flood-color`],Et=[`d`,`stroke`,`filter`],Dt=[`d`,`stroke`,`filter`],Ot=[`cx`,`cy`,`r`,`fill`,`filter`],kt={key:6},At=[`stroke`,`d`],jt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Mt={key:0},Nt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Pt={key:0},Ft=[`stroke`,`d`],It={key:0},Lt=[`d`,`stroke`,`stroke-width`,`filter`],Rt={key:1},zt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Bt=[`d`,`fill`,`stroke`,`stroke-width`,`filter`],Vt={key:1},Ht=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Ut=[`cx`,`cy`,`r`,`fill`,`stroke`,`stroke-width`],Wt={key:0},Gt=[`d`,`fill`,`stroke`,`stroke-width`],Kt=[`cx`,`cy`,`r`,`stroke`],qt=[`cx`,`cy`,`r`,`fill`],Jt=[`cx`,`cy`,`r`],Yt={key:0},Xt=[`d`,`stroke`,`fill`,`onMouseenter`,`onMouseleave`,`onClick`],Zt={key:1},Qt=[`cx`,`cy`,`r`],$t=[`x`,`y`,`fill`,`font-size`],en=[`x`,`y`,`fill`,`font-size`],tn=[`x`,`y`,`fill`,`font-size`],nn=[`x`,`y`,`fill`,`font-size`],rn=[`filter`,`opacity`],an={key:0},on=[`x`,`y`],sn={key:1},cn=[`cx`,`cy`,`fill`,`stroke`,`filter`,`onClick`,`onMouseenter`,`onMouseleave`],ln=[`text-anchor`,`x`,`y`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],un=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`],dn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],fn=[`cx`,`cy`,`fill`,`stroke`,`filter`,`onClick`,`onMouseenter`,`onMouseleave`],pn=[`text-anchor`,`x`,`y`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],mn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`],hn=[`text-anchor`,`x`,`y`,`fill`,`font-size`,`onClick`,`onMouseenter`,`onMouseleave`,`innerHTML`],gn={key:2},_n=[`x`,`y`,`width`],vn=[`x`,`y`,`width`],yn={key:0,style:{position:`absolute`,top:`100%`,left:`0`,width:`100%`},"data-dom-to-png-ignore":``,"aria-hidden":`true`},bn={key:5,class:`vue-data-ui-watermark`},xn=[`id`],Sn=[`onClick`],Cn={key:8,class:`vue-ui-donut-hollow`},wn={key:0},Tn={key:1},En=/*#__PURE__*/ be({__name:`vue-ui-donut`,props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:[`selectLegend`,`selectDatapoint`,`copyAlt`],setup(e,{expose:be,emit:dt}){let En=Ye(()=>import(`./Tooltip-Iyb_S6oQ.js`)),Dn=Ye(()=>import(`./BaseIcon-DDctLkeT.js`).then(e=>e.n)),On=Ye(()=>import(`./vue-ui-accordion-3lBpCjGm.js`).then(e=>e.n)),kn=Ye(()=>import(`./DataTable-BcVZLSs8.js`)),An=Ye(()=>import(`./PenAndPaper-BsBFp16i.js`).then(e=>e.t)),jn=Ye(()=>import(`./UserOptions-BSJ_S_us.js`).then(e=>e.n)),Mn=Ye(()=>import(`./PackageVersion-ATrKWi8V.js`).then(e=>e.t)),Nn=Ye(()=>import(`./BaseDraggableDialog-Bw_azO0n.js`).then(e=>e.n)),{vue_ui_donut:Pn}=t(),{isThemeValid:Fn,warnInvalidTheme:In}=Se(),Ln=ot(),A=e,Rn=_({get(){return!!A.dataset&&A.dataset.length},set(e){return e}}),zn=it(null),Bn=w(null),Vn=w(null),Hn=w(null),Un=it(null),Wn=it(null),Gn=it(null),Kn=it(null),qn=it(null),Jn=it(null),Yn=w(0),Xn=w(0),Zn=w(0),Qn=w(!1),$n=w(null),er=w(null),tr=w(null),nr=w({x:0,y:0}),rr=w(`pointer`),ir=w(!1),ar=_({get:()=>P.value.style.chart.layout.labels.percentage.fontSize,set:e=>e}),j=_({get:()=>P.value.style.chart.layout.labels.name.fontSize,set:e=>e}),or=_({get:()=>P.value.style.chart.layout.labels.dataLabels.smallArcClusterFontSize,set:e=>e}),sr=!1,cr=()=>{P.value.autoSize&&!sr&&(sr=!0,requestAnimationFrame(()=>{sr=!1;let e=P.value,t=Bn.value,n=z.value;if(!e.autoSize||!t||!n)return;let[r,i,a,o]=n.getAttribute(`viewBox`).split(` `).map(Number),s={x:r,y:i,width:a,height:o},c=[{selector:`.vue-data-ui-datalabel-value`,baseSize:F.value.percentage.fontSize,minSize:F.value.percentage.minFontSize,sizeRef:ar},{selector:`.vue-data-ui-datalabel-name`,baseSize:F.value.name.fontSize,minSize:F.value.name.minFontSize,sizeRef:j},{selector:`.vue-data-ui-datalabel-inline`,baseSize:F.value.dataLabels.smallArcClusterFontSize,minSize:F.value.name.minFontSize,sizeRef:or}];c.map(e=>t.querySelectorAll(e.selector).length).reduce((e,t)=>e+t,0)!==0&&c.forEach(({selector:e,baseSize:n,minSize:r,sizeRef:i})=>{t.querySelectorAll(e).forEach(e=>{i.value=ue({el:e,bounds:s,currentFontSize:n,minFontSize:r,attempts:200,padding:1})})})}))};nt(async()=>{Qn.value=!0,dr(),requestAnimationFrame(cr)});let lr;nt(()=>{zn.value&&(lr=new ResizeObserver(e=>{for(let t of e){let{width:e,height:n}=t.contentRect;if(e>0&&n>0){cr();break}}}),lr.observe(zn.value.parentElement))}),tt(()=>{lr?.disconnect()}),tt(()=>{Gn.value&&(Kn.value&&Gn.value.unobserve(Kn.value),Gn.value.disconnect())});let ur=_(()=>P.value.debug);function dr(){if(he(A.dataset)?(d({componentName:`VueUiDonut`,type:`dataset`,debug:ur.value}),Rn.value=!1,xr.value=!0):(A.dataset.forEach((e,t)=>{me({datasetObject:e,requiredAttributes:[`name`,`values`]}).forEach(e=>{d({componentName:`VueUiDonut`,type:`datasetSerieAttribute`,property:e,index:t,debug:ur.value}),Rn.value=!1,xr.value=!0})}),ur.value&&A.dataset.forEach((e,t)=>{(!e.name||e.name===``)&&d({componentName:`VueUiDonut`,type:`datasetAttributeEmpty`,property:`name`,index:t})})),he(A.dataset)||(xr.value=P.value.loading),P.value.responsive){let e=Pe(()=>{let{width:e,height:t}=Fe({chart:zn.value,title:P.value.style.chart.title.text?Un.value:null,legend:P.value.style.chart.legend.show?Wn.value:null,source:qn.value,noTitle:Jn.value,padding:P.value.autoSize?void 0:Nr.value});requestAnimationFrame(()=>{V.value.width=e,V.value.height=t,cr()})});Gn.value&&(Kn.value&&Gn.value.unobserve(Kn.value),Gn.value.disconnect()),Gn.value=new ResizeObserver(e),Kn.value=zn.value.parentNode,Gn.value.observe(Kn.value)}}let M=w(u()),fr=w(!1),pr=w(``),N=w(null),mr=w(0);function hr(){let e=xe({userConfig:A.config,defaultConfig:Pn}),t={},n=e.theme;if(!n)t=e;else if(!Fn.value(e))In(e),t=e;else{let r=xe({userConfig:Ue[n]||A.config,defaultConfig:e});t={...xe({userConfig:A.config,defaultConfig:r}),customPalette:e.customPalette.length?e.customPalette:ce[n]||o}}return t}let P=w(hr()),F=_(()=>P.value.style.chart.layout.labels),I=_(()=>P.value.style.chart.layout.donut),gr=_(()=>P.value.style.chart.layout),L=_(()=>P.value.style.chart);ve({config:()=>P.value,dataset:()=>A.dataset,component:`VueUiDonut`,rules:[ye.singleSeries,ye.emptyArray,{test:e=>e.length>6,message:[`👀 The number of series is > 6. Consider:`,``,`▶️ Grouping small values dynamically into a single "Other" series.`,``,`▶️ Using filters to let users choose a maximum number of series to display.`,``,`▶️ Using VueUiHorizontalBar instead to make the dataset breakdown easier to read.`]}]});let _r=_(()=>P.value.userOptions.useCursorPointer),vr=_(()=>ae({defaultConfig:{useCssAnimation:!1,table:{show:!1},startAnimation:{show:!1},userOptions:{show:!1},style:{chart:{backgroundColor:`#99999930`,layout:{labels:{dataLabels:{show:!1},hollow:{average:{show:!1},total:{show:!1}},value:{show:!1}}},legend:{backgroundColor:`transparent`,showValue:!1,showPercentage:!1},title:{color:`#1A1A1A`,subtitle:{color:`#5A5A5A`}}}}},userConfig:P.value.skeletonConfig??{}})),{loading:yr,FINAL_DATASET:br,manualLoading:xr,skeletonDataset:Sr}=ge({...at(A),FINAL_CONFIG:P,prepareConfig:hr,skeletonDataset:A.config?.skeletonDataset??[{name:``,values:[3],color:`#BABABA`},{name:``,values:[2],color:`#AAAAAA`},{name:``,values:[1],color:`#CACACA`}],skeletonConfig:ae({defaultConfig:P.value,userConfig:vr.value})}),R=w(!0),Cr=w(0),wr=w(!1),Tr=null;function Er(e=1e3){return new Promise(t=>{let n=performance.now();function r(i){let a=i-n,o=Math.min(a/e,1),s=oe(o);Cr.value=s,o<1?Tr=requestAnimationFrame(r):(Cr.value=1,Tr=null,t())}Tr!==null&&cancelAnimationFrame(Tr),Cr.value=0,Tr=requestAnimationFrame(r)})}ct(()=>yr.value,async e=>{if(e||wr.value)return;let t=br.value===Sr,n=P.value.startAnimation?.show;!t&&n?(wr.value=!0,await Er(P.value.startAnimation.durationMs||1e3)):Cr.value=1,R.value=!1},{immediate:!0});let{userOptionsVisible:Dr,setUserOptionsVisibility:Or,keepUserOptionState:kr}=ze({config:P.value}),{svgRef:z}=Be({config:L.value.title});function Ar(){Or(!0)}function jr(){Or(!1)}let Mr=ne(A.config);ct(()=>A.config,(e,t)=>{let n=ne(e),r=n!==Mr;Mr=n;let i=hr();if(!r){P.value.style.chart.tooltip=i.style.chart.tooltip,B.value.showTooltip=P.value.style.chart.tooltip.show;return}yr.value||(P.value=i),Dr.value=!P.value.userOptions.showOnChartHover,dr(),Yn.value+=1,Xn.value+=1,Zn.value+=1,B.value.dataLabels.show=F.value.dataLabels.show,B.value.showTable=P.value.table.show,B.value.showTooltip=L.value.tooltip.show,V.value.height=L.value.height,V.value.width=L.value.width},{deep:!0});let Nr=_(()=>{let{top:e,right:t,bottom:n,left:r}=L.value.padding;return{css:`padding:${e}px ${t}px ${n}px ${r}px`,top:e,right:t,bottom:n,left:r}}),{isPrinting:Pr,isImaging:Fr,generatePdf:Ir,generateImage:Lr}=Me({elementId:`donut__${M.value}`,fileName:L.value.title.text||`vue-ui-donut`,options:P.value.userOptions.print}),Rr=_(()=>P.value.userOptions.show&&!L.value.title.text),zr=_(()=>pe(P.value.customPalette)),B=w({dataLabels:{show:F.value.dataLabels.show},showTable:P.value.table.show,showTooltip:L.value.tooltip.show});ct(P,()=>{B.value={dataLabels:{show:F.value.dataLabels.show},showTable:P.value.table.show,showTooltip:L.value.tooltip.show}},{immediate:!0});let V=w({height:L.value.height,width:L.value.width}),Br=_(()=>{if(P.value.pie)return G.value;let e=I.value.strokeWidth/512,t=Math.min(V.value.width,V.value.height)*e,n=t>G.value?G.value:t;return Math.max(n,12*(1+e))}),Vr=dt,H=_(()=>br.value.sort((e,t)=>{let n=Array.isArray(e.values)?e.values.reduce((e,t)=>e+t,0):e.value??0,r=Array.isArray(t.values)?t.values.reduce((e,t)=>e+t,0):t.value??0;return e.ghost&&!t.ghost?1:t.ghost&&!e.ghost?-1:r-n}).map((e,t)=>({name:e.name,color:l(e.color)||zr.value[t]||o[t]||o[t%o.length],value:re(e.values.reduce((e,t)=>e+t,0)),absoluteValues:e.values,comment:e.comment||``,patternIndex:t,seriesIndex:t,ghost:!1,pattern:`pattern_${M.value}_${t}`})));ct(()=>A.dataset,e=>{Array.isArray(e)&&e.length>0&&(xr.value=!1)},{immediate:!0});let U=it(H.value);ct(()=>H.value,e=>{U.value=e,requestAnimationFrame(cr)});function Hr(){return H.value.map(e=>({name:e.name,color:e.color,value:e.value}))}let W=w([]),Ur=w(!1),Wr=w(null);function Gr(){Vr(`selectLegend`,$r.value.map(e=>({name:e.name,color:e.color,value:e.value})))}function Kr({from:e,to:t,duration:n,onUpdate:r,onDone:i,easing:a=oe}){let o=performance.now();function s(c){let l=Math.min((c-o)/n,1),u=a(l);r(e+(t-e)*u,l),l<1?requestAnimationFrame(s):(r(t,1),i&&i())}requestAnimationFrame(s)}function qr(){W.value.length?W.value=[]:ei.value.forEach((e,t)=>{W.value.push(t)}),Gr()}function Jr(e){let t=H.value.find((t,n)=>n===e),n=U.value.find((t,n)=>n===e).value;if(W.value.includes(e)){W.value=W.value.filter(t=>t!==e);let r=t.value;function i(){U.value=U.value.map((t,n)=>e===n?{...t,value:r}:t),Gr()}function a(){Ur.value=!0,Wr.value=e,Kr({from:n,to:r,duration:P.value.serieToggleAnimation.durationMs,onUpdate:(t,n)=>{U.value=U.value.map((n,r)=>e===r?{...n,value:t}:n),requestAnimationFrame(cr)},onDone:()=>{i(),Ur.value=!1,Wr.value=null}})}P.value.serieToggleAnimation.show&&P.value.type===`classic`?a():(i(),requestAnimationFrame(cr))}else if(W.value.length<H.value.length-1){function t(){W.value.push(e),U.value=U.value.map((t,n)=>e===n?{...t,value:0}:t),Gr()}function r(){Ur.value=!0,Wr.value=e,Kr({from:n,to:0,duration:P.value.serieToggleAnimation.durationMs,onUpdate:(t,n)=>{U.value=U.value.map((n,r)=>e===r?{...n,value:t}:n),requestAnimationFrame(cr)},onDone:()=>{t(),requestAnimationFrame(cr),Ur.value=!1,Wr.value=null}})}P.value.serieToggleAnimation.show&&P.value.type===`classic`?r():t()}}function Yr(e){return H.value.length?H.value.find(t=>t.name===e)||(ur.value&&console.warn(`VueUiDonut - Series name not found "${e}"`),null):(ur.value&&console.warn(`VueUiDonut - There are no series to show.`),null)}function Xr(e){let t=Yr(e);t!==null&&W.value.includes(t.seriesIndex)&&Jr(t.seriesIndex)}function Zr(e){let t=Yr(e);t!==null&&(W.value.includes(t.seriesIndex)||Jr(t.seriesIndex))}let Qr=_(()=>br.value.reduce((e,t)=>e+t.values.reduce((e,t)=>e+t,0),0)),$r=_(()=>{if(R.value&&!yr.value){let e=Cr.value,t=H.value.map(t=>({...t,value:t.value*e,color:t.color,ghost:!1})),n=Qr.value*(1-e);return n>0&&t.push({name:`__ghost__`,value:n,color:`transparent`,ghost:!0}),t}return U.value.forEach(e=>{if([null,void 0].includes(e.values))return{...e,values:[]}}),U.value.map((e,t)=>({...e,seriesIndex:t})).filter((e,t)=>!W.value.includes(t))}),ei=_(()=>br.value.map((e,t)=>{let n=(e.values||[]).reduce((e,t)=>e+t,0),r=n/br.value.map(e=>(e.values||[]).reduce((e,t)=>e+t,0)).reduce((e,t)=>e+t,0);return{name:e.name,color:l(e.color)||zr.value[t]||o[t]||o[t%o.length],value:n,shape:`circle`,patternIndex:t,proportion:r}}).map((e,t)=>{let r=m(F.value.value.formatter,e.value,n({p:F.value.dataLabels.prefix,v:e.value,s:F.value.dataLabels.suffix,r:L.value.legend.roundingValue}),{datapoint:e,index:t}),i=m(F.value.percentage.formatter,di(e),n({v:di(e),s:`%`,r:L.value.legend.roundingPercentage})),a=Di({val:r,percentage:W.value.includes(t)?`${Ei(e.proportion*100)}%`:i,showVal:L.value.legend.showValue,showPercentage:L.value.legend.showPercentage,config:L.value.legend});return{...e,opacity:W.value.includes(t)?.5:1,segregate:()=>!Ur.value&&Jr(t),isSegregated:W.value.includes(t),display:`${e.name}${L.value.legend.showPercentage||L.value.legend.showValue?`: `:``}${a}`}})),ti=_(()=>({cy:`donut-div-legend`,backgroundColor:L.value.legend.backgroundColor,color:L.value.legend.color,fontSize:L.value.legend.fontSize,paddingBottom:12,fontWeight:L.value.legend.bold?`bold`:``})),G=_(()=>{let e=I.value.radiusRatio,t=Math.max(.1,Math.min(.50001,e)),n=Math.min(V.value.width*t,V.value.height*t);return Math.max(12,n)}),K=_(()=>s({series:$r.value},V.value.width/2,V.value.height/2,G.value,G.value,1.99999,2,1,360,105.25,Br.value)),ni=_(()=>Math.abs($r.value.map(e=>e.value).reduce((e,t)=>e+t,0))>0),ri=_(()=>s({series:[{value:1,color:I.value.emptyFill,name:`_`,seriesIndex:0,patternIndex:-1,ghost:!1,absoluteValues:[1]}]},V.value.width/2,V.value.height/2,G.value,G.value,1.99999,2,1,360,105.25,Br.value)),q=_(()=>K.value.filter(e=>!e.ghost)),J=_(()=>{let e=Math.max(...$r.value.map(e=>e.value)),t=$r.value.map(t=>t.value/e);return se({series:t,center:{x:V.value.width/2,y:V.value.height/2},maxRadius:Math.min(V.value.width,V.value.height)/3,hasGhost:R.value})});function ii(e){return e.x>V.value.width/2+6?`start`:e.x<V.value.width/2-6?`end`:`middle`}function ai(e){return e.middlePoint.y>V.value.height/2?r({initX:e.middlePoint.x,initY:e.middlePoint.y,offset:100,centerX:V.value.width/2,centerY:V.value.height/2}).y:r({initX:e.middlePoint.x,initY:e.middlePoint.y,offset:0,centerX:V.value.width/2,centerY:V.value.height/2}).y-100}function Y(e){return e.proportion*100>F.value.dataLabels.hideUnderValue}function oi(e,t){let n=F.value.dataLabels.hideUnderValue,r=F.value.dataLabels.smallArcClusterThreshold,i=(li.value[t]??e.proportion??0)*100;return i>n&&i<=r}let{smallArcLayoutsClassic:X}=ut({FINAL_CONFIG:P,noGhostDonut:q,svg:V,padding:Nr,labels_inline_fontSize:or,minSize:G,findArcMidpoint:fe,calcMarkerOffsetX:f,calcMarkerOffsetY:h,animatingIndex:Wr,segregated:W,isSmallArc:oi});function si(e,t){let r=e.value/ci(t);return isNaN(r)?0:m(F.value.percentage.formatter,r*100,n({v:r*100,s:`%`,r:F.value.percentage.rounding}),{datapoint:e})}function ci(e){return[...e].map(e=>e.value).reduce((e,t)=>e+t,0)}let Z=_(()=>$r.value.map(e=>e.value).reduce((e,t)=>e+t,0)),li=_(()=>{let e=H.value.reduce((e,t)=>e+t.value,0);return e<=0?[]:H.value.map(t=>t.value/e)}),ui=_(()=>Z.value/$r.value.length);function di(e){return Ur.value?e.proportion*100:e.value/Z.value*100}let fi=w(null),pi=w(!1);function mi({datapoint:e,seriesIndex:t}){P.value.events.datapointLeave&&P.value.events.datapointLeave({datapoint:e,seriesIndex:t}),fr.value=!1,N.value=null,tr.value=null,rr.value=`pointer`}function Q({datapoint:e,relativeIndex:t,seriesIndex:r,show:i=!1,triggerMode:o=`pointer`}){P.value.events.datapointEnter&&P.value.events.datapointEnter({datapoint:e,seriesIndex:r}),rr.value=o,tr.value=t,fi.value={datapoint:e,seriesIndex:r,config:P.value,series:H.value},fr.value=i,N.value=t;let s=``,l=L.value.tooltip.customFormat;if(pi.value=!1,a(l))try{let t=l({seriesIndex:r,datapoint:e,series:H.value,config:P.value});typeof t==`string`&&(pr.value=t,pi.value=!0)}catch{console.warn(`Custom format cannot be applied.`),pi.value=!1}pi.value||(s+=`<div style="width:100%;text-align:center;border-bottom:1px solid ${L.value.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${e.name}</div>`,s+=`<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 60 60" height="14" width="14"><circle cx="30" cy="30" r="30" stroke="none" fill="${e.color}"/>${Ln.pattern?`<circle cx="30" cy="30" r="30" stroke="none" fill="url(#pattern_${M.value}_${r})"/>`:``}</svg>`,s+=`<b>${Di({showVal:L.value.tooltip.showValue,showPercentage:L.value.tooltip.showPercentage,val:`<span>${m(F.value.value.formatter,e.value,n({p:F.value.dataLabels.prefix,v:e.value,s:F.value.dataLabels.suffix,r:L.value.tooltip.roundingValue}),{datapoint:e,relativeIndex:t,seriesIndex:r})}</span>`,percentage:m(F.value.percentage.formatter,e.proportion*100,n({v:e.proportion*100,s:`%`,r:L.value.tooltip.roundingPercentage}),{datapoint:e,relativeIndex:t,seriesIndex:r}),config:L.value.tooltip})}</b></div>`,L.value.comments.showInTooltip&&e.comment&&(s+=`<div class="vue-data-ui-tooltip-comment" style="background:${c(e.color,12.5)}; padding: 6px; margin-bottom: 6px; margin-top:6px; border-left: 1px solid ${e.color}">${e.comment}</div>`),pr.value=`<div>${s}</div>`)}function hi(e,t){let n=X.value[t];if(n)return{textAnchor:n.textAnchor,x:n.labelX,y:n.labelY};let r=f(e,!0,12);return{textAnchor:r.anchor,x:r.x,y:h(e)}}function gi(e,t,n){let{textAnchor:r,x:i}=hi(e,t),a=Oi(e),o=`
2
+ <tspan
3
+ class="vue-data-ui-datalabel-inline"
4
+ fill="${F.value.percentage.color}"
5
+ font-size="${n?or.value:ar.value}px"
6
+ style="font-weight:${F.value.percentage.bold?`bold`:``}"
7
+ >${a}</tspan>
8
+ `,s=String(e.name??``).split(/\n/g),c=``;return s.forEach((e,t)=>{c+=t===0?`
9
+ <tspan
10
+ class="${n?`vue-data-ui-datalabel-inline`:`vue-data-ui-datalabel-name`}"
11
+ fill="${F.value.name.color}"
12
+ font-size="${n?or.value:j.value}px"
13
+ style="font-weight:${F.value.name.bold?`bold`:``}"
14
+ >${e}</tspan>
15
+ `:`
16
+ <tspan
17
+ class="${n?`vue-data-ui-datalabel-inline`:`vue-data-ui-datalabel-name`}"
18
+ x="${i}"
19
+ dy="${(n?or.value:j.value)*1.2}"
20
+ fill="${F.value.name.color}"
21
+ font-size="${n?or.value:j.value}px"
22
+ style="font-weight:${F.value.name.bold?`bold`:``}"
23
+ >${e}</tspan>
24
+ `}),r===`end`?`${F.value.name.show?c:``}${o}`:`${o}${F.value.name.show?c:``}`}function _i(e,t){let n=J.value[t].middlePoint,i=ii(n),a=r({initX:n.x,initY:n.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}),o=a.x;a.y;let s=Oi(e),c=`
25
+ <tspan
26
+ class="vue-data-ui-datalabel-value"
27
+ fill="${F.value.percentage.color}"
28
+ font-size="${ar.value}px"
29
+ style="font-weight:${F.value.percentage.bold?`bold`:`normal`}"
30
+ >${s}</tspan>
31
+ `,l=String(e.name??``).split(/\n/g),u=``;return l.forEach((e,t)=>{u+=t===0?`
32
+ <tspan
33
+ class="vue-data-ui-datalabel-name"
34
+ fill="${F.value.name.color}"
35
+ font-size="${j.value}px"
36
+ style="font-weight:${F.value.name.bold?`bold`:`normal`}"
37
+ >${e}</tspan>
38
+ `:`
39
+ <tspan
40
+ class="vue-data-ui-datalabel-name"
41
+ x="${o}"
42
+ dy="${j.value*1.2}"
43
+ fill="${F.value.name.color}"
44
+ font-size="${j.value}px"
45
+ style="font-weight:${F.value.name.bold?`bold`:`normal`}"
46
+ >${e}</tspan>
47
+ `}),i===`end`?`${F.value.name.show?u:``}${c}`:`${c}${F.value.name.show?u:``}`}function vi(e){return P.value.useBlurOnHover&&![null,void 0].includes(N.value)&&N.value!==e?`url(#blur_${M.value})`:``}function yi(e){if(!Ur.value||Wr.value===null||e.seriesIndex!==Wr.value)return 1;let t=(e.proportion??0)*100,n=F.value.dataLabels.hideUnderValue,r=F.value.dataLabels.smallArcClusterThreshold+2,i=n;return t>=r?1:t<=i?0:(t-i)/(r-i)}let bi=_(()=>({head:$r.value.map(e=>({name:e.name,color:e.color})),body:$r.value.map(e=>e.value)}));function xi(e=null){Qe(()=>{let t=bi.value.head.map((e,t)=>[[e.name],[bi.value.body[t]],[isNaN(bi.value.body[t]/Z.value)?`-`:bi.value.body[t]/Z.value*100]]),n=[[L.value.title.text],[L.value.title.subtitle.text],[[``],[`val`],[`%`]]].concat(t),r=i(n);e?e(r):le({csvContent:r,title:L.value.title.text||`vue-ui-donut`})})}let Si=_(()=>{let e=[`__SUM__`,n({p:F.value.dataLabels.prefix,v:Z.value,s:F.value.dataLabels.suffix,r:P.value.table.td.roundingValue}),`100%`],t=bi.value.head.map((e,t)=>[{color:e.color,name:e.name||`-`},bi.value.body[t],isNaN(bi.value.body[t]/Z.value)?`-`:(bi.value.body[t]/Z.value*100).toFixed(P.value.table.td.roundingPercentage)+`%`]),r=t.map(e=>e.map((e,t)=>t===0?e.name:e)),i={th:{backgroundColor:P.value.table.th.backgroundColor,color:P.value.table.th.color,outline:P.value.table.th.outline},td:{backgroundColor:P.value.table.td.backgroundColor,color:P.value.table.td.color,outline:P.value.table.td.outline},breakpoint:P.value.table.responsiveBreakpoint};return{colNames:[P.value.table.columnNames.series,P.value.table.columnNames.value,P.value.table.columnNames.percentage],head:e,body:t,a11yBody:r,config:i}}),Ci=w(!1);function wi(e){Ci.value=e,mr.value+=1}let Ti=_(()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent));function Ei(e){return Ve({num:e,rounding:L.value.legend.roundingPercentage})}function Di({val:e,percentage:t,showVal:n,showPercentage:r,config:i}){return He({config:i,val:e,percentage:t,showVal:n,showPercentage:r})}function Oi(e){return Di({val:m(F.value.value.formatter,e.value,n({p:F.value.dataLabels.prefix,v:e.value,s:F.value.dataLabels.suffix,r:F.value.value.rounding}),{datapoint:e}),percentage:si(e,q.value),showVal:F.value.value.show,showPercentage:F.value.percentage.show,config:F.value.dataLabels})}function $(e,t){P.value.events.datapointClick&&P.value.events.datapointClick({datapoint:e,seriesIndex:e.seriesIndex}),Vr(`selectDatapoint`,{datapoint:e,index:t})}function ki(){B.value.showTable=!B.value.showTable}function Ai(){B.value.dataLabels.show=!B.value.dataLabels.show}function ji(){B.value.showTooltip=!B.value.showTooltip}let Mi=w(!1);function Ni(){Mi.value=!Mi.value}let Pi=Ce(zn,()=>L.value.title.text);function Fi(){if(!Bn.value)return;let{x:e,y:t,width:n,height:r}=Bn.value.getBBox();z.value&&z.value.setAttribute(`viewBox`,`${e} ${t} ${n+Math.min(0,e)} ${r+Math.min(0,t)}`)}let Ii=_(()=>De({config:P,style:L,mutableConfig:B,dialog:Nn,accordion:On,isFullscreen:Ci,parent:zn,maxWidth:500,isCursorPointer:_r}));ct(()=>B.value.showTable,e=>Ee(e,P,$n));function Li(){B.value.showTable=!1,er.value&&er.value.setTableIconState(!1)}let Ri=_(()=>ei.value.map(e=>({...e,name:e.display}))),zi=_(()=>L.value.backgroundColor),Bi=_(()=>L.value.legend),Vi=_(()=>L.value.title),{isCallbackImaging:Hi,isCallbackSvg:Ui,generateSvg:Wi,onGenerateImage:Gi}=Te({svg:z,title:Vi,legend:Bi,legendItems:Ri,backgroundColor:zi,getSvgCallback:()=>P.value.userOptions.callbacks.svg,generateImage:Lr});async function Ki(){if(Vr(`copyAlt`,{config:P.value,dataset:U.value}),!P.value.userOptions.callbacks.altCopy){console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");return}await Promise.resolve(P.value.userOptions.callbacks.altCopy({config:P.value,dataset:U.value}))}function qi(){tr.value=null,ir.value=!0}function Ji(){tr.value=null,rr.value=`pointer`,fr.value=!1,N.value=null,ir.value=!1}function Yi(e){if(!z.value||Mi.value||document.activeElement!==z.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){tr.value=null,rr.value=`pointer`,fr.value=!1,N.value=null;return}if(r){if(tr.value===null)return;let e=q.value[tr.value];if(!e)return;$(e,tr.value);return}let a=tr.value,o=N.value,s=a!==null&&a>=0&&a<q.value.length,c=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)):c?(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 l=q.value[a];l&&(tr.value=a,Xi(a),Q({datapoint:l,relativeIndex:a,seriesIndex:l.seriesIndex,show:!0,triggerMode:`keyboard`}))}function Xi(e){if(!Number.isFinite(e)||!z.value)return;let t=V.value.width/2,n=V.value.height/2;if(P.value.type===`classic`){let r=q.value[e];if(!r?.arcSlice)return;let i=fe(r.arcSlice);if(!i)return;t=i.x,n=i.y}else{let r=J.value[e]?.middlePoint;if(!r)return;t=r.x,n=r.y}let r=z.value.getBoundingClientRect();nr.value={x:r.left+t/V.value.width*r.width,y:r.top+n/V.value.height*r.height}}let Zi=_(()=>({headers:Si.value?.colNames??[],rows:Si.value?.a11yBody??[]}));return be({autoSize:Fi,getData:Hr,getImage:Pi,generatePdf:Ir,generateCsv:xi,generateImage:Lr,generateSvg:Wi,hideSeries:Zr,showSeries:Xr,toggleTable:ki,toggleLabels:Ai,toggleTooltip:ji,toggleAnnotator:Ni,toggleFullscreen:wi,copyAlt:Ki}),(t,i)=>(C(),b(`div`,{ref_key:`donutChart`,ref:zn,class:$e(`vue-data-ui-component vue-ui-donut ${Ci.value?`vue-data-ui-wrapper-fullscreen`:``} ${P.value.useCssAnimation?``:`vue-ui-dna`}`),style:S(`font-family:${P.value.style.fontFamily};width:100%; ${P.value.responsive?`height:100%;`:``} text-align:center;background:${L.value.backgroundColor}`),id:`donut__${M.value}`,onMouseenter:Ar,onMouseleave:jr},[x(`div`,{id:`chart-instructions-${M.value}`,class:`sr-only`},[x(`p`,null,D(P.value.a11y.translations.keyboardNavigation),1)],8,pt),Zi.value?.rows?.length?(C(),v(Re,{key:0,uid:M.value,head:Zi.value.headers,body:Zi.value.rows,notice:P.value.a11y.translations.tableAvailable,caption:P.value.a11y.translations.tableCaption},null,8,[`uid`,`head`,`body`,`notice`,`caption`])):y(``,!0),P.value.userOptions.buttons.annotator&&O(z)?(C(),v(O(An),{key:1,color:L.value.color,backgroundColor:L.value.backgroundColor,active:Mi.value,svgRef:O(z),isCursorPointer:_r.value,palette:P.value.userOptions.annotatorPalette,onClose:Ni},Ke({_:2},[T(O(ke),e=>({name:e,fn:k(n=>[E(t.$slots,e,et(Xe(O(Oe)(e,n))),void 0,!0)])}))]),1032,[`color`,`backgroundColor`,`active`,`svgRef`,`isCursorPointer`,`palette`])):y(``,!0),E(t.$slots,`userConfig`,{},void 0,!0),Rr.value?(C(),b(`div`,{key:2,ref_key:`noTitle`,ref:Jn,class:`vue-data-ui-no-title-space`,style:`height:36px; width: 100%;background:transparent`},null,512)):y(``,!0),L.value.title.text?(C(),b(`div`,{key:3,ref_key:`chartTitle`,ref:Un,style:`width:100%;background:transparent;padding-bottom:24px`},[(C(),v(we,{key:`title_${Yn.value}`,config:{title:{cy:`donut-div-title`,...L.value.title},subtitle:{cy:`donut-div-subtitle`,...L.value.title.subtitle}}},null,8,[`config`]))],512)):y(``,!0),x(`div`,{id:`legend-top-${M.value}`},null,8,mt),P.value.userOptions.show&&Rn.value&&(O(kr)||O(Dr))?(C(),v(O(jn),{ref_key:`userOptionsRef`,ref:er,key:`user_option_${mr.value}`,backgroundColor:L.value.backgroundColor,color:L.value.color,isPrinting:O(Pr),isImaging:O(Fr),uid:M.value,hasTooltip:L.value.tooltip.show&&P.value.userOptions.buttons.tooltip,hasPdf:P.value.userOptions.buttons.pdf,hasImg:P.value.userOptions.buttons.img,hasSvg:P.value.userOptions.buttons.svg,hasXls:P.value.userOptions.buttons.csv,hasTable:P.value.userOptions.buttons.table,hasLabel:P.value.userOptions.buttons.labels,hasFullscreen:P.value.userOptions.buttons.fullscreen,hasAltCopy:P.value.userOptions.buttons.altCopy,isFullscreen:Ci.value,chartElement:zn.value,position:P.value.userOptions.position,callbacks:P.value.userOptions.callbacks,isTooltip:B.value.showTooltip,titles:{...P.value.userOptions.buttonTitles},hasAnnotator:P.value.userOptions.buttons.annotator,isAnnotation:Mi.value,printScale:P.value.userOptions.print.scale,tableDialog:P.value.table.useDialog,isCursorPointer:_r.value,onToggleFullscreen:wi,onGeneratePdf:O(Ir),onGenerateCsv:xi,onGenerateImage:O(Gi),onGenerateSvg:O(Wi),onToggleTable:ki,onToggleLabels:Ai,onToggleTooltip:ji,onToggleAnnotator:Ni,onCopyAlt:Ki,style:S({visibility:O(kr)?O(Dr)?`visible`:`hidden`:`visible`})},Ke({_:2},[T(O(Ae)(t.$slots,`menuIcon optionTooltip optionPdf optionCsv optionImg optionSvg optionTable optionLabels optionFullscreen optionAnnotator optionAltCopy custom-menu-before custom-menu-after`),e=>({name:e,fn:k(n=>[E(t.$slots,e,et(Xe(O(je)(e,n))),void 0,!0)])}))]),1032,/* @__PURE__ */ `backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasLabel.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.callbacks.isTooltip.titles.hasAnnotator.isAnnotation.printScale.tableDialog.isCursorPointer.onGeneratePdf.onGenerateImage.onGenerateSvg.style`.split(`.`))):y(``,!0),x(`div`,ht,[(C(),b(`svg`,{ref_key:`svgRef`,ref:z,xmlns:O(de),"aria-describedby":`chart-instructions-${M.value}`,class:$e({"vue-data-ui-fullscreen--on":Ci.value,"vue-data-ui-fulscreen--off":!Ci.value,"vue-data-ui-svg":!0}),viewBox:`0 0 ${V.value.width<=0?10:V.value.width} ${V.value.height<=0?10:V.value.height}`,style:S(`max-width:100%; overflow: visible; background:transparent;color:${L.value.color};${Nr.value.css}`),tabindex:`0`,onFocus:qi,onBlur:Ji,onKeydown:Yi},[x(`g`,{ref_key:`G`,ref:Bn,class:`vue-data-ui-g`},[Je(O(Mn)),t.$slots[`chart-background`]?(C(),b(`foreignObject`,{key:0,x:0,y:0,width:V.value.width<=0?10:V.value.width,height:V.value.height<=0?10:V.value.height,style:{pointerEvents:`none`}},[E(t.$slots,`chart-background`,{},void 0,!0)],8,_t)):y(``,!0),P.value.type===`classic`&&!isNaN(Br.value/G.value)?(C(),b(`defs`,vt,[L.value.useGradient?(C(),v(Ie,{key:0,t:`radial`,id:`gradient_${M.value}`,stops:[[`0%`,O(c)(L.value.backgroundColor,0),0],[`${(1-Br.value/G.value)*100}%`,O(c)(`#FFFFFF`,0),0],[`${(1-Br.value/G.value/2)*100}%`,O(c)(`#FFFFFF`,L.value.gradientIntensity),1],[`100%`,O(c)(L.value.backgroundColor,0),0]]},null,8,[`id`,`stops`])):y(``,!0)])):y(``,!0),P.value.type===`polar`?(C(),b(`defs`,yt,[(C(!0),b(g,null,T(J.value,(e,t)=>(C(),v(Ie,{t:`radial`,id:`polar_gradient_${t}_${M.value}`,key:`pg_${t}_${M.value}`,cx:(isNaN(e.middlePoint.x/V.value.width*100)?0:e.middlePoint.x/V.value.width*100)+`%`,cy:(isNaN(e.middlePoint.y/V.value.height*100)?0:e.middlePoint.y/V.value.height*100)+`%`,r:`62%`,stops:[[`0%`,O(te)(K.value[t].color,.05),L.value.gradientIntensity/100],[`100%`,K.value[t].color,1]]},null,8,[`id`,`cx`,`cy`,`stops`]))),128))])):y(``,!0),x(`defs`,null,[x(`filter`,{id:`blur_${M.value}`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[x(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:2,id:`blur_std_${M.value}`},null,8,xt),i[5]||=x(`feColorMatrix`,{type:`saturate`,values:`0`},null,-1)],8,bt),x(`filter`,{id:`shadow_${M.value}`,"color-interpolation-filters":`sRGB`},[x(`feDropShadow`,{dx:`0`,dy:`0`,stdDeviation:`10`,"flood-opacity":`0.5`,"flood-color":I.value.shadowColor},null,8,Ct)],8,St),x(`filter`,{id:`drop_shadow_${M.value}`,"color-interpolation-filters":`sRGB`,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`},[x(`feDropShadow`,{dx:`0`,dy:`0`,stdDeviation:`3`,"flood-opacity":`1`,"flood-color":I.value.shadowColor},null,8,Tt)],8,wt)]),P.value.type===`classic`?(C(!0),b(g,{key:3},T(K.value.filter(e=>!e.ghost),(e,t)=>(C(),b(`g`,null,[Y(e)&&B.value.dataLabels.show?(C(),b(`path`,{key:0,d:O(X)[t]?.connectorPath||O(p)(e,{x:V.value.width/2,y:V.value.height/2},16,16,!1,!1,Br.value,12,gr.value.curvedMarkers),stroke:e.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,filter:vi(t)},null,8,Et)):y(``,!0)]))),256)):y(``,!0),P.value.type===`polar`?(C(!0),b(g,{key:4},T(K.value.filter(e=>!e.ghost),(e,t)=>(C(),b(`g`,null,[Y(e)&&B.value.dataLabels.show?(C(),b(`path`,{key:0,d:`M ${O(r)({initX:J.value[t].middlePoint.x,initY:J.value[t].middlePoint.y,offset:24,centerX:V.value.width/2,centerY:V.value.height/2}).x},${O(r)({initX:J.value[t].middlePoint.x,initY:J.value[t].middlePoint.y,offset:24,centerX:V.value.width/2,centerY:V.value.height/2}).y} ${J.value[t].middlePoint.x},${J.value[t].middlePoint.y}`,stroke:e.color,"stroke-width":`1`,"stroke-linecap":`round`,"stroke-linejoin":`round`,fill:`none`,filter:vi(t),style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Dt)):y(``,!0)]))),256)):y(``,!0),P.value.type===`classic`&&I.value.useShadow?(C(),b(`circle`,{key:5,cx:V.value.width/2,cy:V.value.height/2,r:G.value<=0?10:G.value,fill:L.value.backgroundColor,filter:`url(#shadow_${M.value})`},null,8,Ot)):y(``,!0),t.$slots.pattern?(C(),b(`g`,kt,[(C(!0),b(g,null,T(e.dataset,(e,n)=>(C(),b(`defs`,{key:`pattern-${e.patternIndex}`},[E(t.$slots,`pattern`,Ze({ref_for:!0},{seriesIndex:n,patternId:`pattern_${M.value}_${n}`}),void 0,!0)]))),128))])):y(``,!0),Z.value&&P.value.type===`classic`?(C(),b(g,{key:7},[(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{stroke:L.value.backgroundColor,d:e.arcSlice,fill:`#FFFFFF`},null,8,At))),256)),(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:e.color,stroke:I.value.borderColorAuto?L.value.backgroundColor:I.value.borderColor,"stroke-width":I.value.borderWidth,filter:vi(t)},null,8,jt))),256)),t.$slots.pattern?(C(),b(`g`,Mt,[(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:`url(#${e.pattern})`,stroke:I.value.borderColorAuto?L.value.backgroundColor:I.value.borderColor,"stroke-width":I.value.borderWidth,filter:vi(t)},null,8,Nt))),256))])):y(``,!0)],64)):y(``,!0),Z.value&&P.value.type===`polar`?(C(),b(g,{key:8},[K.value.length>1?(C(),b(`g`,Pt,[(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{stroke:I.value.borderColorAuto?L.value.backgroundColor:I.value.borderColor,d:J.value[t].path,fill:`#FFFFFF`,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Ft))),256)),I.value.useShadow?(C(),b(`g`,It,[(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:J.value[t].path,fill:`transparent`,stroke:I.value.borderColorAuto?L.value.backgroundColor:gr.value.donut.borderColor,"stroke-width":I.value.borderWidth,filter:`url(#drop_shadow_${M.value})`,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Lt))),256))])):y(``,!0),t.$slots.pattern?(C(),b(`g`,Rt,[(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:J.value[t].path,fill:`url(#${e.pattern})`,stroke:I.value.borderColorAuto?L.value.backgroundColor:gr.value.donut.borderColor,"stroke-width":I.value.borderWidth,filter:vi(t),style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`,transformOrigin:`center`})},null,12,zt))),256))])):y(``,!0),(C(!0),b(g,null,T(q.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:J.value[t].path,fill:L.value.useGradient?`url(#polar_gradient_${t}_${M.value})`:e.color,stroke:I.value.borderColorAuto?L.value.backgroundColor:I.value.borderColor,"stroke-width":I.value.borderWidth,filter:vi(t),style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,12,Bt))),256))])):(C(),b(`g`,Vt,[t.$slots.pattern?(C(),b(`circle`,{key:0,cx:V.value.width/2,cy:V.value.height/2,r:G.value,fill:`url(#pattern_${M.value}_${K.value[0].patternIndex})`,stroke:L.value.backgroundColor,"stroke-width":I.value.borderWidth},null,8,Ht)):y(``,!0),x(`circle`,{cx:V.value.width/2,cy:V.value.height/2,r:G.value,fill:L.value.useGradient?`url(#polar_gradient_0_${M.value})`:K.value[0].color,stroke:L.value.backgroundColor,"stroke-width":I.value.borderWidth},null,8,Ut)]))],64)):(C(),b(g,{key:9},[P.value.type===`classic`&&!ni.value?(C(),b(`g`,Wt,[(C(!0),b(g,null,T(ri.value,(e,t)=>(C(),b(`path`,{class:`vue-ui-donut-arc-path`,d:e.arcSlice,fill:e.color,stroke:L.value.backgroundColor,"stroke-width":I.value.borderWidth},null,8,Gt))),256))])):y(``,!0),x(`circle`,{cx:V.value.width/2,cy:V.value.height/2,r:G.value<=0?10:G.value,fill:`transparent`,stroke:L.value.backgroundColor},null,8,Kt)],64)),L.value.useGradient&&P.value.type===`classic`?(C(),b(`circle`,{key:10,cx:V.value.width/2,cy:V.value.height/2,r:G.value<=0?10:G.value,fill:`url(#gradient_${M.value})`},null,8,qt)):y(``,!0),x(`circle`,{ref_key:`circle_hollow`,ref:Hn,style:{pointerEvents:`none`},fill:`none`,cx:V.value.width/2,cy:V.value.height/2,r:Math.max(.1,Br.value*1.7)},null,8,Jt),Z.value?(C(),b(g,{key:11},[K.value.length>1||P.value.type===`classic`?(C(),b(`g`,Yt,[(C(!0),b(g,null,T(K.value.filter(e=>!e.ghost),(e,t)=>(C(),b(`path`,{d:P.value.type===`classic`?e.arcSlice:J.value[t].path,stroke:I.value.borderColorAuto?L.value.backgroundColor:I.value.borderColor,fill:N.value===t?I.value.selectedColor:`transparent`,onMouseenter:n=>Q({datapoint:e,relativeIndex:t,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),onClick:n=>$(e,t)},null,40,Xt))),256))])):(C(),b(`g`,Zt,[x(`circle`,{cx:V.value.width/2,cy:V.value.height/2,r:G.value,fill:`transparent`,onMouseenter:i[0]||=e=>Q({datapoint:K.value[0],relativeIndex:0,seriesIndex:K.value[0].seriesIndex,show:!0}),onMouseleave:i[1]||=e=>mi({datapoint:K.value[0],seriesIndex:K.value[0].seriesIndex}),onClick:i[2]||=e=>$(K.value[0],t.i)},null,40,Qt)]))],64)):y(``,!0),P.value.type===`classic`?(C(),b(`g`,{key:12,ref_key:`G_hollow`,ref:Vn,class:`vue-data-ui-donut-hollow-labels`},[F.value.hollow.total.show?(C(),b(`text`,{key:0,"text-anchor":`middle`,x:V.value.width/2,y:V.value.height/2-(F.value.hollow.average.show?F.value.hollow.total.fontSize:0)+F.value.hollow.total.offsetY,fill:F.value.hollow.total.color,"font-size":F.value.hollow.total.fontSize,style:S(`font-weight:${F.value.hollow.total.bold?`bold`:``}`)},D(F.value.hollow.total.text),13,$t)):y(``,!0),F.value.hollow.total.show?(C(),b(`text`,{key:1,"text-anchor":`middle`,x:V.value.width/2,y:V.value.height/2+F.value.hollow.total.fontSize-(F.value.hollow.average.show?F.value.hollow.total.fontSize:0)+F.value.hollow.total.value.offsetY,fill:F.value.hollow.total.value.color,"font-size":F.value.hollow.total.value.fontSize,style:S(`font-weight:${F.value.hollow.total.value.bold?`bold`:``}`)},D(O(m)(F.value.hollow.total.value.formatter,Z.value,O(n)({p:F.value.hollow.total.value.prefix,v:Z.value,s:F.value.hollow.total.value.suffix}))),13,en)):y(``,!0),F.value.hollow.average.show?(C(),b(`text`,{key:2,"text-anchor":`middle`,x:V.value.width/2,y:V.value.height/2+(F.value.hollow.total.show?F.value.hollow.average.fontSize:0)+F.value.hollow.average.offsetY,fill:F.value.hollow.average.color,"font-size":F.value.hollow.average.fontSize,style:S(`font-weight:${F.value.hollow.average.bold?`bold`:``}`)},D(F.value.hollow.average.text),13,tn)):y(``,!0),F.value.hollow.average.show?(C(),b(`text`,{key:3,"text-anchor":`middle`,x:V.value.width/2,y:V.value.height/2+(F.value.hollow.total.show?F.value.hollow.average.fontSize:0)+F.value.hollow.average.fontSize+F.value.hollow.average.value.offsetY,fill:F.value.hollow.average.value.color,"font-size":F.value.hollow.average.value.fontSize,style:S(`font-weight:${F.value.hollow.average.value.bold?`bold`:``}`)},D(Ur.value||R.value?`--`:O(m)(F.value.hollow.average.value.formatter,O(ie)(ui.value),O(n)({p:F.value.hollow.average.value.prefix,v:O(ie)(ui.value),s:F.value.hollow.average.value.suffix,r:F.value.hollow.average.value.rounding}))),13,nn)):y(``,!0)],512)):y(``,!0),(C(!0),b(g,null,T(q.value.filter(e=>!e.ghost),(e,n)=>(C(),b(`g`,{filter:vi(n),key:e.seriesIndex,opacity:yi(e)},[F.value.dataLabels.useLabelSlots?(C(),b(`g`,an,[(C(),b(`foreignObject`,{x:O(f)(e,!0).anchor===`end`?O(f)(e).x-120:O(f)(e,!0).anchor===`middle`?O(f)(e).x-60:O(f)(e).x,y:O(h)(e)-(Ti.value?20:0),width:`120`,height:`60`,style:{overflow:`visible`}},[x(`div`,null,[E(t.$slots,`dataLabel`,Ze({ref_for:!0},{datapoint:e,isBlur:!P.value.useBlurOnHover||[null,void 0].includes(N.value)||N.value===n,isSafari:Ti.value,isVisible:Y(e)&&B.value.dataLabels.show,textAlign:O(f)(e,!0,16,!0).anchor,flexAlign:O(f)(e,!0,16).anchor,percentage:si(e,q.value)}),void 0,!0)])],8,on))])):(C(),b(`g`,sn,[P.value.type===`classic`?(C(),b(g,{key:0},[Y(e)&&B.value.dataLabels.show?(C(),b(`circle`,{key:0,cx:O(X)[n]?.markerX??O(f)(e).x,cy:O(X)[n]?.markerY??O(h)(e)-3.5,fill:e.color,stroke:L.value.backgroundColor,"stroke-width":1,r:3,filter:!P.value.useBlurOnHover||[null,void 0].includes(N.value)||N.value===n?``:`url(#blur_${M.value})`,onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex})},null,40,cn)):y(``,!0),F.value.dataLabels.oneLine||O(X)[n]?lt((C(),b(`text`,{key:1,class:`vue-data-ui-datalabel-inline`,"text-anchor":O(X)[n]?.textAnchor||O(f)(e,!0,12).anchor,x:O(X)[n]?.labelX??O(f)(e,!0,12).x,y:O(X)[n]?.labelY??O(h)(e),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:gi(e,n,!!O(X)[n])},null,40,ln)),[[st,Y(e)&&B.value.dataLabels.show]]):(C(),b(g,{key:2},[lt(x(`text`,{class:`vue-data-ui-datalabel-value`,"text-anchor":O(X)[n]?.textAnchor||O(f)(e,!0,12).anchor,x:O(X)[n]?.labelX??O(f)(e,!0,12).x,y:O(X)[n]?.labelY??O(h)(e),fill:F.value.percentage.color,"font-size":ar.value+`px`,style:S(`font-weight:${F.value.percentage.bold?`bold`:``}`),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex})},D(Oi(e)),45,un),[[st,Y(e)&&B.value.dataLabels.show]]),lt(x(`text`,{class:`vue-data-ui-datalabel-name`,"text-anchor":O(X)[n]?.textAnchor||O(f)(e).anchor,x:O(X)[n]?.labelX??O(f)(e,!0,12).x,y:(O(X)[n]?.labelY??O(h)(e))+j.value*1.2,fill:F.value.name.color,"font-size":j.value+`px`,style:S(`font-weight:${F.value.name.bold?`bold`:``}`),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:O(ee)({content:e.name,fontSize:j.value,fill:F.value.name.color,x:O(X)[n]?.labelX??O(f)(e,!0,12).x,y:(O(X)[n]?.labelY??O(h)(e))+j.value})},null,44,dn),[[st,Y(e,!0,12)&&B.value.dataLabels.show&&F.value.name.show]])],64))],64)):y(``,!0),P.value.type===`polar`?(C(),b(g,{key:1},[Y(e)&&B.value.dataLabels.show?(C(),b(`circle`,{key:0,cx:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:24,centerX:V.value.width/2,centerY:V.value.height/2}).x,cy:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:24,centerX:V.value.width/2,centerY:V.value.height/2}).y,fill:e.color,stroke:L.value.backgroundColor,"stroke-width":1,r:3,filter:!P.value.useBlurOnHover||[null,void 0].includes(N.value)||N.value===n?``:`url(#blur_${M.value})`,onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`})},null,44,fn)):y(``,!0),F.value.dataLabels.oneLine?lt((C(),b(`text`,{key:1,class:`vue-data-ui-datalabel-inline`,"text-anchor":ii(J.value[n].middlePoint),x:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x,y:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).y,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`}),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:_i(e,n)},null,44,pn)),[[st,Y(e)&&B.value.dataLabels.show]]):(C(),b(g,{key:2},[Y(e)&&B.value.dataLabels.show?(C(),b(`text`,{key:0,class:`vue-data-ui-datalabel-value`,"text-anchor":ii(J.value[n].middlePoint),x:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x,y:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).y,fill:F.value.percentage.color,"font-size":ar.value,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:F.value.percentage.bold?`bold`:`normal`}),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex})},D(Oi(e)),45,mn)):y(``,!0),Y(e,!0,12)&&B.value.dataLabels.show&&F.value.name.show?(C(),b(`text`,{key:1,class:`vue-data-ui-datalabel-name`,"text-anchor":ii(J.value[n].middlePoint),x:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x,y:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).y+j.value*1.2,fill:F.value.name.color,"font-size":j.value,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`,fontWeight:F.value.name.bold?`bold`:`normal`}),onClick:t=>$(e,n),onMouseenter:t=>Q({datapoint:e,relativeIndex:n,seriesIndex:e.seriesIndex,show:!0}),onMouseleave:t=>mi({datapoint:e,seriesIndex:e.seriesIndex}),innerHTML:O(ee)({content:e.name,fontSize:j.value,fill:F.value.name.color,x:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x,y:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).y+j.value*1.2})},null,44,hn)):y(``,!0)],64))],64)):y(``,!0)])),B.value.dataLabels.show&&L.value.comments.show&&e.comment?(C(),b(`g`,gn,[Y(e)&&P.value.type===`classic`?(C(),b(`foreignObject`,{key:0,x:L.value.comments.offsetX+(O(f)(e,!0).anchor===`end`?O(f)(e).x-L.value.comments.width:O(f)(e,!0).anchor===`middle`?O(f)(e).x-L.value.comments.width/2:O(f)(e).x),y:O(h)(e)+24+L.value.comments.offsetY,width:L.value.comments.width,height:`200`,style:{overflow:`visible`,"pointer-events":`none`}},[x(`div`,null,[E(t.$slots,`plot-comment`,{plot:{...e,textAlign:O(f)(e,!0,16,!0).anchor,flexAlign:O(f)(e,!0,16).anchor,isFirstLoad:R.value}},void 0,!0)])],8,_n)):y(``,!0),Y(e)&&P.value.type===`polar`?(C(),b(`foreignObject`,{key:1,x:L.value.comments.offsetX+(ii(J.value[n].middlePoint)===`end`?O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x-L.value.comments.width:ii(J.value[n].middlePoint)===`middle`?O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x-L.value.comments.width/2:O(r)({initX:J.value[n].middlePoint.x,initY:J.value[n].middlePoint.y,offset:42,centerX:V.value.width/2,centerY:V.value.height/2}).x),y:ai(J.value[n])+L.value.comments.offsetY,width:L.value.comments.width,height:`200`,style:S({transition:R.value||!P.value.serieToggleAnimation.show?`none`:`all ${P.value.serieToggleAnimation.durationMs}ms ease-in-out`,overflow:`visible`,pointerEvents:`none`})},[x(`div`,null,[E(t.$slots,`plot-comment`,{plot:{...e,textAlign:ii(J.value[n].middlePoint),flexAlign:ii(J.value[n].middlePoint),isFirstLoad:R.value}},void 0,!0)])],12,vn)):y(``,!0)])):y(``,!0)],8,rn))),128)),E(t.$slots,`svg`,{svg:{...V.value,datapoints:K.value,isPrintingImg:O(Pr)||O(Fr)||O(Hi),isPrintingSvg:O(Ui)}},void 0,!0)],512)],46,gt)),t.$slots.hint?(C(),b(`div`,yn,[E(t.$slots,`hint`,et(Xe({hint:P.value.a11y.translations.keyboardNavigation,isVisible:ir.value})),void 0,!0)])):y(``,!0)]),t.$slots.watermark?(C(),b(`div`,bn,[E(t.$slots,`watermark`,et(Xe({isPrinting:O(Pr)||O(Fr)||O(Hi)||O(Ui)})),void 0,!0)])):y(``,!0),x(`div`,{id:`legend-bottom-${M.value}`},null,8,xn),Qn.value&&(L.value.legend.show||t.$slots.legend)?(C(),v(Ge,{key:6,to:L.value.legend.position===`top`?`#legend-top-${M.value}`:`#legend-bottom-${M.value}`},[x(`div`,{ref_key:`chartLegend`,ref:Wn},[E(t.$slots,`legend`,{legend:ei.value},()=>[L.value.legend.show?(C(),v(We,{key:`legend_${Zn.value}`,legendSet:ei.value,config:ti.value,onClickMarker:i[3]||=({i:e})=>Jr(e),isCursorPointer:_r.value},Ke({item:k(({legend:e,index:t})=>[x(`div`,{style:S(`opacity:${W.value.includes(t)?.5:1}`),onClick:t=>e.segregate()},D(e.display),13,Sn)]),legendToggle:k(()=>[ei.value.length>2&&L.value.legend.selectAllToggle.show&&!O(yr)?(C(),v(Le,{key:0,backgroundColor:L.value.legend.selectAllToggle.backgroundColor,color:L.value.legend.selectAllToggle.color,fontSize:L.value.legend.fontSize,checked:W.value.length>0,isCursorPointer:_r.value,onToggle:qr},null,8,[`backgroundColor`,`color`,`fontSize`,`checked`,`isCursorPointer`])):y(``,!0)]),_:2},[t.$slots.pattern?{name:`legend-pattern`,fn:k(({legend:e,index:t})=>[Je(Ne,{shape:e.shape,radius:30,stroke:`none`,plot:{x:30,y:30},fill:`url(#pattern_${M.value}_${t})`},null,8,[`shape`,`fill`])]),key:`0`}:void 0]),1032,[`legendSet`,`config`,`isCursorPointer`])):y(``,!0)],!0)],512)],8,[`to`])):y(``,!0),t.$slots.source?(C(),b(`div`,{key:7,ref_key:`source`,ref:qn,dir:`auto`},[E(t.$slots,`source`,{},void 0,!0)],512)):y(``,!0),t.$slots.hollow?(C(),b(`div`,Cn,[E(t.$slots,`hollow`,et(Xe({total:Z.value,average:ui.value,dataset:H.value,...V.value})),void 0,!0)])):y(``,!0),Je(O(En),{teleportTo:L.value.tooltip.teleportTo,show:B.value.showTooltip&&fr.value,backgroundColor:L.value.tooltip.backgroundColor,color:L.value.tooltip.color,fontSize:L.value.tooltip.fontSize,borderRadius:L.value.tooltip.borderRadius,borderColor:L.value.tooltip.borderColor,borderWidth:L.value.tooltip.borderWidth,backgroundOpacity:L.value.tooltip.backgroundOpacity,position:L.value.tooltip.position,offsetX:L.value.tooltip.offsetX,offsetY:L.value.tooltip.offsetY,parent:zn.value,content:pr.value,isCustom:pi.value,isFullscreen:Ci.value,smooth:L.value.tooltip.smooth,backdropFilter:L.value.tooltip.backdropFilter,smoothForce:L.value.tooltip.smoothForce,smoothSnapThreshold:L.value.tooltip.smoothSnapThrehsold,isA11yMode:rr.value===`keyboard`,a11yPosition:nr.value},{"tooltip-before":k(()=>[E(t.$slots,`tooltip-before`,et(Xe({...fi.value})),void 0,!0)]),tooltip:k(()=>[E(t.$slots,`tooltip`,et(Xe({...fi.value})),void 0,!0)]),"tooltip-after":k(()=>[E(t.$slots,`tooltip-after`,et(Xe({...fi.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`]),Rn.value&&P.value.userOptions.buttons.table?(C(),v(rt(Ii.value.component),Ze({key:9},Ii.value.props,{ref_key:`tableUnit`,ref:$n,onClose:Li}),Ke({content:k(()=>[(C(),v(O(kn),{key:`table_${Xn.value}`,colNames:Si.value.colNames,head:Si.value.head,body:Si.value.body,config:Si.value.config,title:P.value.table.useDialog?``:Ii.value.title,withCloseButton:!P.value.table.useDialog,isCursorPointer:_r.value,onClose:Li},{th:k(({th:e})=>[e===`__SUM__`?(C(),b(`div`,wn,[Je(O(Dn),{name:`sigma`,stroke:Si.value.config.th.color,size:16},null,8,[`stroke`])])):(C(),b(`div`,Tn,D(e),1))]),td:k(({td:e})=>[qe(D(e.name?e.name:isNaN(Number(e))?e.includes(`%`)?e:O(m)(F.value.percentage.formatter,e,O(n)({v:e,s:`%`,r:F.value.percentage.rounding})):O(m)(F.value.value.formatter,e,O(n)({p:F.value.dataLabels.prefix,v:e,s:F.value.dataLabels.suffix,r:F.value.value.rounding}))),1)]),_:1},8,[`colNames`,`head`,`body`,`config`,`title`,`withCloseButton`,`isCursorPointer`]))]),_:2},[P.value.table.useDialog?{name:`title`,fn:k(()=>[qe(D(Ii.value.title),1)]),key:`0`}:void 0,P.value.table.useDialog?{name:`actions`,fn:k(()=>[x(`button`,{tabindex:`0`,class:`vue-ui-user-options-button`,onClick:i[4]||=e=>xi(P.value.userOptions.callbacks.csv),style:S({cursor:_r.value?`pointer`:`default`})},[Je(O(Dn),{name:`fileCsv`,stroke:Ii.value.props.color},null,8,[`stroke`])],4)]),key:`1`}:void 0]),1040)):y(``,!0),E(t.$slots,`skeleton`,{},()=>[O(yr)?(C(),v(_e,{key:0})):y(``,!0)],!0)],46,ft))}},[[`__scopeId`,`data-v-75934a20`]]);export{dt as n,En as t};