vue-data-ui 3.22.13 → 3.23.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 (224) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +13 -1
  3. package/dist/{Arrow-DKx74WtM.js → Arrow-o2qHNvrC.js} +1 -1
  4. package/dist/{BaseDraggableDialog-3n8udWmh.js → BaseDraggableDialog-qTnfhLBz.js} +2 -2
  5. package/dist/{BaseIcon-CP5RWnqt.js → BaseIcon-91MZoczJ.js} +4 -3
  6. package/dist/{BaseLegendToggle-DsWphmIb.js → BaseLegendToggle-CtAPwzr2.js} +1 -1
  7. package/dist/{BaseZoomControls-C9_ygNN4.js → BaseZoomControls-rdzlicuz.js} +2 -2
  8. package/dist/{ColorPicker-3N_HVgXs.js → ColorPicker-CIAkdPrj.js} +2 -2
  9. package/dist/{DataTable-DzPEVvSo.js → DataTable-D4tM9s5Y.js} +2 -2
  10. package/dist/HillActions-BWhxHlrj.js +187 -0
  11. package/dist/{Legend-C0xAnJdO.js → Legend-CQTRlzK-.js} +2 -2
  12. package/dist/{NonSvgPenAndPaper-B_mE5UbR.js → NonSvgPenAndPaper-Cawacw1W.js} +19 -19
  13. package/dist/{PackageVersion-B6Hokxw9.js → PackageVersion--QCMh5k_.js} +1 -1
  14. package/dist/{PenAndPaper-CSMVXpg2.js → PenAndPaper-cE4J8-rA.js} +11 -11
  15. package/dist/{Shape-BfnXr1nJ.js → Shape-BPMV94Ij.js} +3 -3
  16. package/dist/{Slicer-C6qNUmZ4.js → Slicer-5yIrdoJv.js} +15 -15
  17. package/dist/SlicerPreview-DvjLV2TW.js +1689 -0
  18. package/dist/{SparkTooltip-uoUiL_P8.js → SparkTooltip-BaYtEKS6.js} +6 -6
  19. package/dist/Title-BODtwViI.js +87 -0
  20. package/dist/{Tooltip-CA1rtSyl.js → Tooltip-CMTGxeYO.js} +1 -1
  21. package/dist/{UserOptions-DzAFK9cY.js → UserOptions-3ujTo3LD.js} +2 -2
  22. package/dist/components/arrow.js +1 -1
  23. package/dist/components/vue-ui-3d-bar.js +1 -1
  24. package/dist/components/vue-ui-accordion.js +1 -1
  25. package/dist/components/vue-ui-age-pyramid.js +1 -1
  26. package/dist/components/vue-ui-annotator.js +1 -1
  27. package/dist/components/vue-ui-bullet.js +1 -1
  28. package/dist/components/vue-ui-bump.js +1 -1
  29. package/dist/components/vue-ui-candlestick.js +1 -1
  30. package/dist/components/vue-ui-carousel-table.js +1 -1
  31. package/dist/components/vue-ui-chestnut.js +1 -1
  32. package/dist/components/vue-ui-chord.js +1 -1
  33. package/dist/components/vue-ui-circle-pack.js +1 -1
  34. package/dist/components/vue-ui-cursor.js +1 -1
  35. package/dist/components/vue-ui-dag.js +1 -1
  36. package/dist/components/vue-ui-dashboard.js +1 -1
  37. package/dist/components/vue-ui-digits.js +1 -1
  38. package/dist/components/vue-ui-donut-evolution.js +1 -1
  39. package/dist/components/vue-ui-donut.js +1 -1
  40. package/dist/components/vue-ui-dumbbell.js +1 -1
  41. package/dist/components/vue-ui-flow.js +1 -1
  42. package/dist/components/vue-ui-funnel.js +1 -1
  43. package/dist/components/vue-ui-galaxy.js +1 -1
  44. package/dist/components/vue-ui-gauge.js +1 -1
  45. package/dist/components/vue-ui-geo.js +1 -1
  46. package/dist/components/vue-ui-gizmo.js +1 -1
  47. package/dist/components/vue-ui-heatmap.js +1 -1
  48. package/dist/components/vue-ui-hill.js +2 -0
  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-mini-loader.js +1 -1
  54. package/dist/components/vue-ui-molecule.js +1 -1
  55. package/dist/components/vue-ui-mood-radar.js +1 -1
  56. package/dist/components/vue-ui-nested-donuts.js +1 -1
  57. package/dist/components/vue-ui-onion.js +1 -1
  58. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  59. package/dist/components/vue-ui-quadrant.js +1 -1
  60. package/dist/components/vue-ui-quick-chart.js +1 -1
  61. package/dist/components/vue-ui-radar.js +1 -1
  62. package/dist/components/vue-ui-rating.js +1 -1
  63. package/dist/components/vue-ui-relation-circle.js +1 -1
  64. package/dist/components/vue-ui-ridgeline.js +1 -1
  65. package/dist/components/vue-ui-rings.js +1 -1
  66. package/dist/components/vue-ui-scatter.js +1 -1
  67. package/dist/components/vue-ui-skeleton.js +1 -1
  68. package/dist/components/vue-ui-smiley.js +1 -1
  69. package/dist/components/vue-ui-spark-trend.js +1 -1
  70. package/dist/components/vue-ui-sparkbar.js +1 -1
  71. package/dist/components/vue-ui-sparkgauge.js +1 -1
  72. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  73. package/dist/components/vue-ui-sparkline.js +1 -1
  74. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  75. package/dist/components/vue-ui-stackbar.js +1 -1
  76. package/dist/components/vue-ui-stackline.js +1 -1
  77. package/dist/components/vue-ui-strip-plot.js +1 -1
  78. package/dist/components/vue-ui-table-heatmap.js +1 -1
  79. package/dist/components/vue-ui-table-sparkline.js +1 -1
  80. package/dist/components/vue-ui-table.js +1 -1
  81. package/dist/components/vue-ui-thermometer.js +1 -1
  82. package/dist/components/vue-ui-timer.js +1 -1
  83. package/dist/components/vue-ui-tiremarks.js +1 -1
  84. package/dist/components/vue-ui-treemap.js +1 -1
  85. package/dist/components/vue-ui-vertical-bar.js +1 -1
  86. package/dist/components/vue-ui-waffle.js +1 -1
  87. package/dist/components/vue-ui-wheel.js +1 -1
  88. package/dist/components/vue-ui-word-cloud.js +1 -1
  89. package/dist/components/vue-ui-world.js +1 -1
  90. package/dist/components/vue-ui-xy-canvas.js +1 -1
  91. package/dist/components/vue-ui-xy.js +1 -1
  92. package/dist/{dom-to-png-BdAFKZQg.js → dom-to-png-4tdMNGPX.js} +1 -1
  93. package/dist/exposedLib-DWLRqRhv.js +25 -0
  94. package/dist/{img-Bikk1dGb.js → img-DIQG5q8T.js} +1 -1
  95. package/dist/{labelUtils-BUhssos9.js → labelUtils-C5lnc_xc.js} +1 -1
  96. package/dist/{lib-CFm_J26b.js → lib-BuMGJ_a0.js} +216 -173
  97. package/dist/{package-DmDydylu.js → package-BMc_ZieJ.js} +1 -1
  98. package/dist/{pdf-zmz3l2uy.js → pdf-Cnz4NKM9.js} +1 -1
  99. package/dist/{render-common-BIG8JYGK.js → render-common-Ktg2LZFG.js} +21 -21
  100. package/dist/ssr/vue-ui-donut.js +1 -1
  101. package/dist/ssr/vue-ui-xy.js +1 -1
  102. package/dist/ssr.js +2 -2
  103. package/dist/style.css +1 -1
  104. package/dist/types/vue-data-ui.d.ts +493 -0
  105. package/dist/types/vue-ui-hill.d.ts +90 -0
  106. package/dist/useAutoSizeLabelsInsideViewbox-DvDwcwi_.js +122 -0
  107. package/dist/{useConfig-C0V0eG7L.js → useConfig-BilxnBNr.js} +767 -476
  108. package/dist/useHints-Dq_w2E8B.js +66 -0
  109. package/dist/{useNestedProp-BY6DNN3i.js → useNestedProp--NSEmhOH.js} +1 -1
  110. package/dist/{useObjectBindings-Djwpii4d.js → useObjectBindings-Cwq7NcQz.js} +3 -2
  111. package/dist/{usePrinter-BH-xle1O.js → usePrinter-BFvi4jVy.js} +2 -2
  112. package/dist/useTransitions-g_zBREk2.js +39 -0
  113. package/dist/utils.js +14 -14
  114. package/dist/{vue-data-ui-rkzh6EkO.js → vue-data-ui-EsawKe_W.js} +85 -81
  115. package/dist/vue-data-ui.js +77 -76
  116. package/dist/vue-ui-3d-bar-RSUS2xpL.js +1849 -0
  117. package/dist/{vue-ui-accordion-UA88lv4d.js → vue-ui-accordion-61MlW-Ge.js} +4 -4
  118. package/dist/vue-ui-age-pyramid-CgnPWA93.js +1263 -0
  119. package/dist/vue-ui-annotator-DBRT85HG.js +2913 -0
  120. package/dist/vue-ui-bullet-Bc3-WaN1.js +724 -0
  121. package/dist/{vue-ui-bump-BS7RCf0Z.js → vue-ui-bump-Dvv3iSKr.js} +332 -295
  122. package/dist/{vue-ui-candlestick-BZSGDKrM.js → vue-ui-candlestick-DvvsrIdp.js} +464 -440
  123. package/dist/vue-ui-carousel-table-DtsNVim8.js +463 -0
  124. package/dist/vue-ui-chestnut-ArloORzP.js +2068 -0
  125. package/dist/{vue-ui-chord-D6G7ceE-.js → vue-ui-chord-xX5gWZy8.js} +430 -424
  126. package/dist/vue-ui-circle-pack-D8wykmqg.js +1638 -0
  127. package/dist/{vue-ui-cursor-BpN5MsXM.js → vue-ui-cursor-CxgE6Phh.js} +61 -61
  128. package/dist/{vue-ui-dag-BzgOgXzU.js → vue-ui-dag-C9Sf9vH7.js} +924 -916
  129. package/dist/vue-ui-dashboard-bGmaglAj.js +520 -0
  130. package/dist/{vue-ui-digits-OMPrn8fb.js → vue-ui-digits-DgDE-_Fn.js} +58 -50
  131. package/dist/vue-ui-donut-B_n6wF6B.js +2440 -0
  132. package/dist/{vue-ui-donut-Cp5NbZ1r.js → vue-ui-donut-Bmo149AR.js} +113 -113
  133. package/dist/{vue-ui-donut-evolution-DHVi5rOn.js → vue-ui-donut-evolution-D6vH_hfx.js} +528 -447
  134. package/dist/vue-ui-dumbbell-BX4Ao_wR.js +1582 -0
  135. package/dist/{vue-ui-flow-BusUK3H0.js → vue-ui-flow-Bshw8pT_.js} +415 -407
  136. package/dist/vue-ui-funnel-CjYosIik.js +797 -0
  137. package/dist/vue-ui-galaxy-CvXgy-dy.js +1111 -0
  138. package/dist/vue-ui-gauge-CByT0_vF.js +953 -0
  139. package/dist/{vue-ui-geo-CyFgFKlh.js → vue-ui-geo-C-gSZL2q.js} +378 -363
  140. package/dist/{vue-ui-gizmo-DdeXwCQp.js → vue-ui-gizmo-CJdxyPID.js} +57 -49
  141. package/dist/{vue-ui-heatmap-D8-qJ7fg.js → vue-ui-heatmap-DEEKv8ip.js} +498 -490
  142. package/dist/vue-ui-hill-D7LYAgAL.js +1768 -0
  143. package/dist/{vue-ui-history-plot-C2Aqk2ON.js → vue-ui-history-plot-BhcU94Pt.js} +553 -556
  144. package/dist/vue-ui-horizontal-bar-CfFye5tL.js +1733 -0
  145. package/dist/vue-ui-kpi-DCBnNfTb.js +104 -0
  146. package/dist/vue-ui-mini-loader-CtWpqnLW.js +133 -0
  147. package/dist/vue-ui-molecule-D3igGyOy.js +958 -0
  148. package/dist/{vue-ui-mood-radar-BiOjxFEN.js → vue-ui-mood-radar-sl6DMxqR.js} +349 -341
  149. package/dist/{vue-ui-nested-donuts-Cl1HVvDp.js → vue-ui-nested-donuts-aS4YzaB3.js} +449 -413
  150. package/dist/vue-ui-onion-EhPTZpW_.js +1258 -0
  151. package/dist/vue-ui-parallel-coordinate-plot-DE9wTmQQ.js +1455 -0
  152. package/dist/{vue-ui-quadrant-B21LkUc8.js → vue-ui-quadrant-SaY_RPSE.js} +625 -617
  153. package/dist/vue-ui-quick-chart-CJ9rejnj.js +2389 -0
  154. package/dist/{vue-ui-radar-CyzAyVos.js → vue-ui-radar-CaNen5Fj.js} +356 -310
  155. package/dist/vue-ui-rating--K7rX2an.js +360 -0
  156. package/dist/vue-ui-relation-circle-FLs8vOxQ.js +925 -0
  157. package/dist/vue-ui-ridgeline-Beg5hshN.js +1663 -0
  158. package/dist/{vue-ui-rings-FtcdX8xl.js → vue-ui-rings-BevKD8P-.js} +449 -423
  159. package/dist/{vue-ui-scatter-Cp_-2ahf.js → vue-ui-scatter-CNA7jF-o.js} +721 -702
  160. package/dist/{vue-ui-skeleton-COytVrfN.js → vue-ui-skeleton-B9ZP1w-i.js} +395 -387
  161. package/dist/{vue-ui-smiley-Da2jgkb7.js → vue-ui-smiley-DYnqqk6u.js} +128 -120
  162. package/dist/{vue-ui-spark-trend-DC2KUlEY.js → vue-ui-spark-trend-R0ebpg-G.js} +132 -117
  163. package/dist/{vue-ui-sparkbar-DdxQOFIF.js → vue-ui-sparkbar-DYC3By0v.js} +119 -111
  164. package/dist/{vue-ui-sparkgauge-DTA-fORH.js → vue-ui-sparkgauge-Bw6no-In.js} +76 -68
  165. package/dist/vue-ui-sparkhistogram-DvRKy8rq.js +590 -0
  166. package/dist/{vue-ui-sparkline-DcR_N-zT.js → vue-ui-sparkline-Dz1uzBos.js} +389 -364
  167. package/dist/vue-ui-sparkstackbar-DlnPdZih.js +692 -0
  168. package/dist/vue-ui-stackbar-B-THcavY.js +2350 -0
  169. package/dist/vue-ui-stackline-3dBPoI0h.js +2464 -0
  170. package/dist/{vue-ui-strip-plot-NLCwYvyw.js → vue-ui-strip-plot-ACeYOoHj.js} +505 -484
  171. package/dist/vue-ui-table-heatmap-DVwMqzje.js +364 -0
  172. package/dist/{vue-ui-table-AM9brdwU.js → vue-ui-table-rFy16bp0.js} +512 -504
  173. package/dist/{vue-ui-table-sparkline-BE6DAvur.js → vue-ui-table-sparkline-CABJzK8p.js} +207 -181
  174. package/dist/vue-ui-thermometer-CVQ-H69Q.js +777 -0
  175. package/dist/{vue-ui-timer-BZM5ITG9.js → vue-ui-timer-Bm8LpsnI.js} +66 -58
  176. package/dist/{vue-ui-tiremarks-BCncDpHX.js → vue-ui-tiremarks-DB3f5qiz.js} +127 -119
  177. package/dist/vue-ui-treemap-DP0Sx8Y8.js +1760 -0
  178. package/dist/vue-ui-waffle-iPpdk1Bm.js +1412 -0
  179. package/dist/vue-ui-wheel-BJkEYfLj.js +892 -0
  180. package/dist/{vue-ui-word-cloud-D7R7nhk1.js → vue-ui-word-cloud-B2sxtel9.js} +440 -432
  181. package/dist/{vue-ui-world-DZBt-07p.js → vue-ui-world-BBQZLnzm.js} +343 -335
  182. package/dist/vue-ui-xy-ChZg7AtI.js +1364 -0
  183. package/dist/{vue-ui-xy-CluEZ7lS.js → vue-ui-xy-DZj5DT-q.js} +1633 -1587
  184. package/dist/{vue-ui-xy-canvas-7YSYRdwr.js → vue-ui-xy-canvas-BN2u0bOJ.js} +456 -430
  185. package/dist/vue_ui_hill-dnltu0L-.js +368 -0
  186. package/package.json +2 -2
  187. package/dist/SlicerPreview-Cw6WMVhG.js +0 -1689
  188. package/dist/Title-BuPs74IB.js +0 -87
  189. package/dist/exposedLib-Ciw6TGtP.js +0 -25
  190. package/dist/useAutoSizeLabelsInsideViewbox-C9RNjsGv.js +0 -50
  191. package/dist/useMountedDelay-BAjrhRJb.js +0 -14
  192. package/dist/vue-ui-3d-bar-D5xHEWr1.js +0 -1824
  193. package/dist/vue-ui-age-pyramid-CAJg01c7.js +0 -1246
  194. package/dist/vue-ui-annotator-q3ZKx6ua.js +0 -2905
  195. package/dist/vue-ui-bullet-ByeaWGfI.js +0 -709
  196. package/dist/vue-ui-carousel-table-DO5NRXvX.js +0 -455
  197. package/dist/vue-ui-chestnut-BfeSPeEh.js +0 -2042
  198. package/dist/vue-ui-circle-pack-Cqmlw7AV.js +0 -1610
  199. package/dist/vue-ui-dashboard-DLvGJXJY.js +0 -512
  200. package/dist/vue-ui-donut-ZIRebAWc.js +0 -2418
  201. package/dist/vue-ui-dumbbell-gDYjU2oF.js +0 -1564
  202. package/dist/vue-ui-funnel-BtaYaU0r.js +0 -781
  203. package/dist/vue-ui-galaxy-BMp-HzDh.js +0 -1076
  204. package/dist/vue-ui-gauge-CBou0cFE.js +0 -925
  205. package/dist/vue-ui-horizontal-bar-BuwxI7d1.js +0 -1689
  206. package/dist/vue-ui-kpi-ByxoO01r.js +0 -96
  207. package/dist/vue-ui-mini-loader-D9pprk2c.js +0 -125
  208. package/dist/vue-ui-molecule-BqJJq49_.js +0 -932
  209. package/dist/vue-ui-onion-CRQOxurS.js +0 -1199
  210. package/dist/vue-ui-parallel-coordinate-plot-Dhn18RtR.js +0 -1412
  211. package/dist/vue-ui-quick-chart-DAhSXYnp.js +0 -2443
  212. package/dist/vue-ui-rating-DbxK-ftN.js +0 -352
  213. package/dist/vue-ui-relation-circle-Cb33DMZo.js +0 -917
  214. package/dist/vue-ui-ridgeline-D7aArzQk.js +0 -1627
  215. package/dist/vue-ui-sparkhistogram-D1oFTrvt.js +0 -575
  216. package/dist/vue-ui-sparkstackbar-BlFio0lP.js +0 -674
  217. package/dist/vue-ui-stackbar-Cu13EdVa.js +0 -2322
  218. package/dist/vue-ui-stackline-DKL0o_-3.js +0 -2427
  219. package/dist/vue-ui-table-heatmap-CSI482KG.js +0 -338
  220. package/dist/vue-ui-thermometer-D6Czx7Fb.js +0 -769
  221. package/dist/vue-ui-treemap-BOEYCOdk.js +0 -1727
  222. package/dist/vue-ui-waffle-BrM8IHdG.js +0 -1367
  223. package/dist/vue-ui-wheel-BNsajigQ.js +0 -884
  224. package/dist/vue-ui-xy-Dt_1bSBT.js +0 -1364
@@ -0,0 +1,1638 @@
1
+ import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
2
+ import { $ as t, D as n, Gt as r, Jt as i, Kt as a, Ot as o, Pt as s, S as c, W as l, X as u, Y as d, i as f, jt as p, q as m, r as h, t as g, tt as ee, w as te, xt as ne } from "./lib-BuMGJ_a0.js";
3
+ import { n as re, t as ie } from "./useHints-Dq_w2E8B.js";
4
+ import { t as ae } from "./useConfig-BilxnBNr.js";
5
+ import { t as oe } from "./usePrinter-BFvi4jVy.js";
6
+ import { n as se, t as ce } from "./BaseScanner-DZvpgOjM.js";
7
+ import { t as le } from "./useSvgExport-Ba9qBr9M.js";
8
+ import { t as ue } from "./useNestedProp--NSEmhOH.js";
9
+ import { t as de } from "./useThemeCheck-C43Tcqmk.js";
10
+ import { t as fe } from "./useTransitions-g_zBREk2.js";
11
+ import { t as pe } from "./img-DIQG5q8T.js";
12
+ import { n as me } from "./Title-BODtwViI.js";
13
+ import { t as he } from "./_plugin-vue_export-helper-B3ysoDQm.js";
14
+ import { l as ge, t as _e } from "./useResponsive-ZtArZtUf.js";
15
+ import { t as ve } from "./DefGrad-DVBqDjhO.js";
16
+ import { t as ye } from "./A11yDataTable-DdRsVULz.js";
17
+ import { t as be } from "./useUserOptionState-DK-_1ddE.js";
18
+ import { t as xe } from "./useChartAccessibility-DYqac8yF.js";
19
+ import { t as Se } from "./usePanZoom-CYU3B4T3.js";
20
+ import { t as Ce } from "./vue_ui_circle_pack-DZC_rdfn.js";
21
+ import { Fragment as _, computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createSlots as we, createTextVNode as Te, createVNode as Ee, defineAsyncComponent as C, guardReactiveProps as w, mergeProps as De, nextTick as Oe, normalizeClass as T, normalizeProps as E, normalizeStyle as D, onBeforeUnmount as ke, onMounted as Ae, openBlock as O, ref as k, renderList as je, renderSlot as A, resolveDynamicComponent as Me, toDisplayString as j, toRefs as Ne, unref as M, useCssVars as Pe, watch as Fe, withCtx as N } from "vue";
22
+ //#region src/packCircles.js
23
+ function Ie(e, t = 0) {
24
+ let n = e.reduce((e, { x: n, r }) => Math.min(e, n - r - t), Infinity), r = e.reduce((e, { x: n, r }) => Math.max(e, n + r + t), -Infinity), i = e.reduce((e, { y: n, r }) => Math.min(e, n - r - t), Infinity), a = e.reduce((e, { y: n, r }) => Math.max(e, n + r + t), -Infinity);
25
+ return [
26
+ n,
27
+ i,
28
+ r - n,
29
+ a - i
30
+ ];
31
+ }
32
+ function Le(e, t, n) {
33
+ let r = e._, i = e.next._, a = r.r + i.r, o = (r.x * i.r + i.x * r.r) / a, s = (r.y * i.r + i.y * r.r) / a;
34
+ return Math.max(Math.abs(o * n), Math.abs(s * t));
35
+ }
36
+ function Re(e, t, n) {
37
+ let r = Le, i = e.length;
38
+ if (!i) return e;
39
+ e.sort((e, t) => t.r - e.r);
40
+ let a, o, s;
41
+ if (a = e[0], a.x = 0, a.y = 0, !(i > 1)) return e;
42
+ if (o = e[1], a.x = -o.r, o.x = a.r, o.y = 0, !(i > 2)) return Be(e, n, t), e;
43
+ ze(o, a, s = e[2]), a = new qe(a), o = new qe(o), s = new qe(s), a.next = s.previous = o, o.next = a.previous = s, s.next = o.previous = a;
44
+ packLoop: for (let c = 3; c < i; ++c) {
45
+ ze(a._, o._, s = e[c]), s = new qe(s);
46
+ let i = o.next, l = a.previous, u = o._.r, d = a._.r;
47
+ do
48
+ if (u <= d) {
49
+ if (P(i._, s._)) {
50
+ o = i, a.next = o, o.previous = a, --c;
51
+ continue packLoop;
52
+ }
53
+ u += i._.r, i = i.next;
54
+ } else {
55
+ if (P(l._, s._)) {
56
+ a = l, a.next = o, o.previous = a, --c;
57
+ continue packLoop;
58
+ }
59
+ d += l._.r, l = l.previous;
60
+ }
61
+ while (i !== l.next);
62
+ s.previous = a, s.next = o, a.next = o.previous = o = s;
63
+ let f = a, p = r(a, n, t), m = a.next;
64
+ for (; m !== o;) {
65
+ let e = r(m, n, t);
66
+ e < p && (f = m, p = e), m = m.next;
67
+ }
68
+ a = f, o = a.next;
69
+ }
70
+ return Be(e, n, t), Ue(e, n, t), e;
71
+ }
72
+ function ze(e, t, n) {
73
+ let r = e.x - t.x, i = e.y - t.y, a = r * r + i * i;
74
+ if (a) {
75
+ let o = (t.r + n.r) ** 2, s = (e.r + n.r) ** 2;
76
+ if (o > s) {
77
+ let t = (a + s - o) / (2 * a), c = Math.sqrt(Math.max(0, s / a - t * t));
78
+ n.x = e.x - t * r - c * i, n.y = e.y - t * i + c * r;
79
+ } else {
80
+ let e = (a + o - s) / (2 * a), c = Math.sqrt(Math.max(0, o / a - e * e));
81
+ n.x = t.x + e * r - c * i, n.y = t.y + e * i + c * r;
82
+ }
83
+ } else n.x = t.x + n.r, n.y = t.y;
84
+ }
85
+ function P(e, t) {
86
+ let n = e.r + t.r - 1e-6, r = t.x - e.x, i = t.y - e.y;
87
+ return n > 0 && n * n > r * r + i * i;
88
+ }
89
+ function Be(e, t, n) {
90
+ if (e.length < 4) return;
91
+ let r = e[0].r, i = e.findIndex((e) => e.r < r * .6), a = i === -1 ? Math.min(e.length, 12) : i, o = e.slice(0, Math.max(3, a));
92
+ for (let t = 0; t < 80; t += 1) {
93
+ let t = !1;
94
+ for (let n = 0; n < o.length; n += 1) {
95
+ let r = o[n], i = .06 * (1 - n / Math.max(1, o.length)), a = r.x * (1 - i), s = r.y * (1 - i);
96
+ Ve(r, a, s, e, n) && (r.x = a, r.y = s, t = !0);
97
+ }
98
+ if (He(o), !t) break;
99
+ }
100
+ let s = o.reduce((e, t) => e + t.x, 0) / o.length, c = o.reduce((e, t) => e + t.y, 0) / o.length;
101
+ for (let t of e) t.x -= s, t.y -= c;
102
+ }
103
+ function Ve(e, t, n, r) {
104
+ let i = e.x, a = e.y;
105
+ e.x = t, e.y = n;
106
+ for (let t of r) if (t !== e && P(e, t)) return e.x = i, e.y = a, !1;
107
+ return e.x = i, e.y = a, !0;
108
+ }
109
+ function He(e) {
110
+ for (let t = 0; t < 6; t += 1) {
111
+ let t = !1;
112
+ for (let n = 0; n < e.length - 1; n += 1) for (let r = n + 1; r < e.length; r += 1) {
113
+ let i = e[n], a = e[r], o = a.x - i.x, s = a.y - i.y, c = Math.sqrt(o * o + s * s) || 1e-6, l = i.r + a.r;
114
+ if (c < l) {
115
+ let e = (l - c) / 2, n = o / c, r = s / c;
116
+ i.x -= n * e, i.y -= r * e, a.x += n * e, a.y += r * e, t = !0;
117
+ }
118
+ }
119
+ if (!t) break;
120
+ }
121
+ }
122
+ function Ue(e, t, n) {
123
+ if (e.length < 6) return;
124
+ let r = e[0].r, i = e.findIndex((e) => e.r <= r * .45);
125
+ if (i !== -1) for (let r = i; r < e.length; r += 1) {
126
+ let i = e[r], a = We(i, e.slice(0, r), t, n);
127
+ a && (i.x = a.x, i.y = a.y);
128
+ }
129
+ }
130
+ function We(e, t, n, r) {
131
+ if (t.length < 2) return null;
132
+ let i = null, a = Infinity;
133
+ for (let o = 0; o < t.length - 1; o += 1) for (let s = o + 1; s < t.length; s += 1) {
134
+ let c = t[o], l = t[s], u = Ge(c, l, e.r);
135
+ for (let o of u) {
136
+ if (!o) continue;
137
+ let s = {
138
+ ...e,
139
+ x: o.x,
140
+ y: o.y
141
+ };
142
+ if (!F(s, t)) continue;
143
+ let c = Ke(s, t, n, r);
144
+ c < a && (a = c, i = o);
145
+ }
146
+ }
147
+ return i;
148
+ }
149
+ function Ge(e, t, n) {
150
+ let r = e.r + n, i = t.r + n, a = t.x - e.x, o = t.y - e.y, s = a * a + o * o, c = Math.sqrt(s);
151
+ if (!c || c > r + i || c < Math.abs(r - i)) return [];
152
+ let l = (r * r - i * i + s) / (2 * c), u = r * r - l * l;
153
+ if (u < 0) return [];
154
+ let d = Math.sqrt(u), f = a / c, p = o / c, m = e.x + l * f, h = e.y + l * p, g = -p * d, ee = f * d;
155
+ return [{
156
+ x: m + g,
157
+ y: h + ee
158
+ }, {
159
+ x: m - g,
160
+ y: h - ee
161
+ }];
162
+ }
163
+ function F(e, t) {
164
+ for (let n of t) if (P(n, e)) return !1;
165
+ return !0;
166
+ }
167
+ function Ke(e, t, n, r) {
168
+ let i = e.x / Math.max(1, n), a = e.y / Math.max(1, r), o = i * i + a * a, s = [];
169
+ for (let n of t) {
170
+ let t = e.x - n.x, r = e.y - n.y, i = Math.sqrt(t * t + r * r) - (e.r + n.r);
171
+ s.push(i);
172
+ }
173
+ s.sort((e, t) => e - t);
174
+ let c = s[0] ?? 0, l = s[1] ?? c, u = s[2] ?? l;
175
+ return c * 8 + l * 4 + u * 2 + o * e.r * 12;
176
+ }
177
+ var qe = class {
178
+ constructor(e) {
179
+ this._ = e, this.next = null, this.previous = null;
180
+ }
181
+ }, Je = /* @__PURE__ */ e({ default: () => ht }), Ye = ["id"], Xe = ["id"], Ze = [
182
+ "xmlns",
183
+ "aria-describedby",
184
+ "viewBox"
185
+ ], Qe = [
186
+ "x",
187
+ "y",
188
+ "width",
189
+ "height"
190
+ ], $e = { key: 0 }, et = [
191
+ "x",
192
+ "y",
193
+ "width",
194
+ "height",
195
+ "stroke",
196
+ "stroke-width",
197
+ "fill",
198
+ "rx",
199
+ "onMouseenter",
200
+ "onMouseout",
201
+ "onClick"
202
+ ], tt = [
203
+ "x",
204
+ "y",
205
+ "width",
206
+ "height",
207
+ "stroke",
208
+ "stroke-width",
209
+ "fill",
210
+ "rx"
211
+ ], nt = [
212
+ "x",
213
+ "y",
214
+ "width",
215
+ "height",
216
+ "fill",
217
+ "rx"
218
+ ], rt = [
219
+ "transform",
220
+ "font-size",
221
+ "fill",
222
+ "font-weight"
223
+ ], it = [
224
+ "transform",
225
+ "font-size",
226
+ "fill",
227
+ "font-weight"
228
+ ], at = {
229
+ key: 1,
230
+ style: { pointerEvents: "none" }
231
+ }, ot = [
232
+ "stroke",
233
+ "stroke-width",
234
+ "stroke-dasharray",
235
+ "opacity",
236
+ "d"
237
+ ], st = [
238
+ "x",
239
+ "y",
240
+ "width",
241
+ "height",
242
+ "rx",
243
+ "fill",
244
+ "stroke",
245
+ "stroke-width",
246
+ "filter"
247
+ ], ct = [
248
+ "fill",
249
+ "x",
250
+ "y",
251
+ "rx",
252
+ "width",
253
+ "height"
254
+ ], lt = [
255
+ "transform",
256
+ "font-size",
257
+ "fill",
258
+ "font-family"
259
+ ], ut = ["dy"], dt = {
260
+ key: 0,
261
+ style: {
262
+ position: "absolute",
263
+ top: "100%",
264
+ left: "0",
265
+ width: "100%"
266
+ },
267
+ "data-dom-to-png-ignore": "",
268
+ "aria-hidden": "true"
269
+ }, ft = {
270
+ key: 5,
271
+ class: "vue-data-ui-watermark"
272
+ }, pt = {
273
+ key: 6,
274
+ "data-dom-to-png-ignore": "",
275
+ class: "reset-wrapper"
276
+ }, mt = ["innerHTML"], ht = /*#__PURE__*/ he({
277
+ __name: "vue-ui-circle-pack",
278
+ props: {
279
+ config: {
280
+ type: Object,
281
+ default() {
282
+ return {};
283
+ }
284
+ },
285
+ dataset: {
286
+ type: Array,
287
+ default() {
288
+ return [];
289
+ }
290
+ }
291
+ },
292
+ emits: ["selectDatapoint", "copyAlt"],
293
+ setup(e, { expose: he, emit: Le }) {
294
+ Pe((e) => ({ v1645a666: ar.value }));
295
+ let ze = C(() => import("./Tooltip-CMTGxeYO.js")), P = C(() => import("./BaseIcon-91MZoczJ.js").then((e) => e.n)), Be = C(() => import("./vue-ui-accordion-61MlW-Ge.js").then((e) => e.n)), Ve = C(() => import("./DataTable-D4tM9s5Y.js")), He = C(() => import("./UserOptions-3ujTo3LD.js").then((e) => e.n)), Ue = C(() => import("./PenAndPaper-cE4J8-rA.js").then((e) => e.t)), We = C(() => import("./PackageVersion--QCMh5k_.js").then((e) => e.t)), Ge = C(() => import("./BaseDraggableDialog-qTnfhLBz.js").then((e) => e.n)), F = e, Ke = Le, { vue_ui_circle_pack: qe } = ae(), { isThemeValid: Je, warnInvalidTheme: ht } = de(), gt = v(() => !!F.dataset && F.dataset.length), I = k(m()), L = k(null), _t = k(null), vt = k(null), yt = k(0), bt = k(0), xt = k(0), St = k(null), R = k(null), Ct = k(null), wt = k(!1), Tt = k(""), z = k(null), Et = k(!1), Dt = k(!1), B = k(null), Ot = k({
296
+ x: 0,
297
+ y: 0
298
+ }), kt = k("pointer"), At = k(!1), V = k(Lt());
299
+ re({
300
+ config: () => V.value,
301
+ dataset: () => F.dataset,
302
+ component: "VueUiCirclePack",
303
+ rules: [
304
+ ie.emptyArray,
305
+ {
306
+ test: (e) => e.length === 1 && (!e[0].children || e[0]?.children.length === 0),
307
+ message: [
308
+ "👀 The dataset only has a single series. Consider:",
309
+ "",
310
+ "▶️ Using a value display instead of a chart component, or using VueUiKpi."
311
+ ]
312
+ },
313
+ {
314
+ test: (e) => e.length === 1 && e[0]?.children && e[0]?.children.length < 6,
315
+ message: [
316
+ "👀 The number of datapoints is probably too low for this type of chart. Consider:",
317
+ "",
318
+ "▶️ Using VueUiDonut or VueUiWaffle instead."
319
+ ]
320
+ }
321
+ ]
322
+ });
323
+ let { transitionEnabled: H } = fe({
324
+ config: () => V.value.transitions,
325
+ dataset: () => F.dataset
326
+ }), U = v(() => V.value.userOptions.useCursorPointer), jt = v(() => i({
327
+ defaultConfig: {
328
+ userOptions: { show: !1 },
329
+ table: { show: !1 },
330
+ style: { chart: {
331
+ backgroundColor: "#99999930",
332
+ circles: {
333
+ stroke: "#6A6A6A",
334
+ labels: {
335
+ name: { show: !1 },
336
+ value: { show: !1 }
337
+ }
338
+ }
339
+ } }
340
+ },
341
+ userConfig: V.value.skeletonConfig ?? {}
342
+ })), { loading: Mt, FINAL_DATASET: Nt } = se({
343
+ ...Ne(F),
344
+ FINAL_CONFIG: V,
345
+ prepareConfig: Lt,
346
+ skeletonDataset: F.config?.skeletonDataset ?? [
347
+ {
348
+ name: "_",
349
+ value: 13,
350
+ color: "#F2F2F2"
351
+ },
352
+ {
353
+ name: "_",
354
+ value: 8,
355
+ color: "#DBDBDB"
356
+ },
357
+ {
358
+ name: "_",
359
+ value: 5,
360
+ color: "#ADADAD"
361
+ },
362
+ {
363
+ name: "_",
364
+ value: 3,
365
+ color: "#969696"
366
+ },
367
+ {
368
+ name: "_",
369
+ value: 2,
370
+ color: "#808080"
371
+ },
372
+ {
373
+ name: "_",
374
+ value: 1,
375
+ color: "#696969"
376
+ }
377
+ ],
378
+ skeletonConfig: i({
379
+ defaultConfig: V.value,
380
+ userConfig: jt.value
381
+ })
382
+ }), { svgRef: W } = xe({ config: V.value.style.chart.title }), { userOptionsVisible: Pt, setUserOptionsVisibility: Ft, keepUserOptionState: It } = be({ config: V.value });
383
+ function Lt() {
384
+ let e = ue({
385
+ userConfig: F.config,
386
+ defaultConfig: qe
387
+ }), t = e.theme;
388
+ if (!t) return e;
389
+ if (!Je.value(e)) return ht(e), e;
390
+ let n = ue({
391
+ userConfig: Ce[t] || F.config,
392
+ defaultConfig: e
393
+ }), r = ue({
394
+ userConfig: F.config,
395
+ defaultConfig: n
396
+ });
397
+ return {
398
+ ...r,
399
+ customPalette: r.customPalette.length ? r.customPalette : a[t] || s
400
+ };
401
+ }
402
+ Fe(() => F.config, (e) => {
403
+ V.value = Lt(), Pt.value = !V.value.userOptions.showOnChartHover, on(), yt.value += 1, bt.value += 1, G.value.showTable = V.value.table.show, G.value.showTooltip = V.value.style.chart.tooltip.show, G.value.showZoom = V.value.style.chart.zoom?.show ?? !1;
404
+ }, { deep: !0 });
405
+ let { isPrinting: Rt, isImaging: zt, generatePdf: Bt, generateImage: Vt } = oe({
406
+ elementId: `vue-ui-circle-pack_${I.value}`,
407
+ fileName: V.value.style.chart.title.text || "vue-ui-circle-pack",
408
+ options: V.value.userOptions.print
409
+ }), Ht = v(() => V.value.userOptions.show && !V.value.style.chart.title.text), G = k({
410
+ showTable: V.value.table.show,
411
+ showTooltip: V.value.style.chart.tooltip.show,
412
+ showZoom: V.value.style.chart.zoom?.show ?? !1
413
+ });
414
+ Fe(V, () => {
415
+ G.value = {
416
+ showTable: V.value.table.show,
417
+ showTooltip: V.value.style.chart.tooltip.show,
418
+ showZoom: V.value.style.chart.zoom?.show ?? !1
419
+ };
420
+ }, { immediate: !0 });
421
+ let K = k({
422
+ h: 10,
423
+ w: 10
424
+ }), Ut = k([
425
+ 0,
426
+ 0,
427
+ 100,
428
+ 100
429
+ ]), Wt = v(() => V.value.debug), Gt = v(() => {
430
+ let e = V.value.style?.chart || {};
431
+ return e.dimensions && typeof e.dimensions.width == "number" ? e.dimensions.width : typeof e.width == "number" ? e.width : 300;
432
+ }), Kt = v(() => {
433
+ let e = V.value.style?.chart || {};
434
+ return e.dimensions && typeof e.dimensions.height == "number" ? e.dimensions.height : typeof e.height == "number" ? e.height : 300;
435
+ }), q = k([]), J = k([]), Y = k(null), X = k(null);
436
+ function qt(e, t) {
437
+ K.value = {
438
+ w: e,
439
+ h: t
440
+ };
441
+ let n = Z.value.map(Jt);
442
+ if (!n.length) {
443
+ let n = {
444
+ x: 0,
445
+ y: 0,
446
+ width: e,
447
+ height: t
448
+ };
449
+ q.value = [], J.value = [], Ut.value = [
450
+ n.x,
451
+ n.y,
452
+ n.width,
453
+ n.height
454
+ ], Cn(n);
455
+ return;
456
+ }
457
+ let r = Re(n, t, e), [i, a, o, s] = Ie(r, 1), c = Math.min(o ? e / o : 1, s ? t / s : 1), l = (e - o * c) / 2, u = (t - s * c) / 2, d = r.map((e) => ({
458
+ ...e,
459
+ x: (e.x - i) * c + l,
460
+ y: (e.y - a) * c + u,
461
+ r: e.r * c
462
+ }));
463
+ q.value = en(d), J.value = q.value;
464
+ let f = Nn({
465
+ x: 0,
466
+ y: 0,
467
+ width: e,
468
+ height: t
469
+ });
470
+ Ut.value = [
471
+ f.x,
472
+ f.y,
473
+ f.width,
474
+ f.height
475
+ ], Cn(f);
476
+ }
477
+ function Jt(e) {
478
+ return {
479
+ ...e,
480
+ children: Array.isArray(e.children) ? e.children.map(Jt) : []
481
+ };
482
+ }
483
+ function Yt(e) {
484
+ let t = Number(e?.value);
485
+ return Number.isFinite(t) && t > 0 ? t : Array.isArray(e?.children) ? e.children.reduce((e, t) => e + Yt(t), 0) : 0;
486
+ }
487
+ function Xt(e, t) {
488
+ let n = a[V.value.theme || "default"] || s, r = sn.value.length ? sn.value : n.length ? n : s;
489
+ return c(e.color) || r[t % r.length] || s[t % s.length];
490
+ }
491
+ function Zt(e) {
492
+ return !Array.isArray(e.children) || !e.children.length ? 1 : e.children.reduce((e, t) => e + Zt(t), 0);
493
+ }
494
+ function Qt(e, t = null, n = 0, r = []) {
495
+ return Array.isArray(e) ? e.map((e, i) => {
496
+ let a = Yt(e);
497
+ if (!Number.isFinite(a) || a <= 0) return null;
498
+ let o = m(), s = [...r, i], l = s.reduce((e, t, n) => e + t + n, 0), u = e.color || t?.color ? c(e.color || t?.color) : Xt(e, l), d = Qt(e.children, {
499
+ id: o,
500
+ name: e.name,
501
+ color: u,
502
+ rootId: t?.rootId ?? o
503
+ }, n + 1, s);
504
+ return {
505
+ ...e,
506
+ value: a,
507
+ r: a,
508
+ id: o,
509
+ color: u,
510
+ depth: n,
511
+ parentId: t?.id ?? null,
512
+ parentName: t?.name ?? null,
513
+ rootId: t?.rootId ?? o,
514
+ hasChildren: d.length > 0,
515
+ childCount: d.length,
516
+ leafCount: d.length ? Zt({ children: d }) : 1,
517
+ hierarchyPath: s,
518
+ children: d
519
+ };
520
+ }).filter(Boolean) : [];
521
+ }
522
+ function $t(e) {
523
+ if (!Array.isArray(e.children) || !e.children.length) return [];
524
+ let t = e.r * 2;
525
+ if (!t) return [];
526
+ let n = Re(e.children.map(Jt), t, t), [r, i, a, o] = Ie(n, 1), s = Math.min(a ? t / a : 1, o ? t / o : 1) * .9, c = a * s, l = o * s, u = e.x - c / 2, d = e.y - l / 2;
527
+ return n.map((e) => ({
528
+ ...e,
529
+ x: (e.x - r) * s + u,
530
+ y: (e.y - i) * s + d,
531
+ r: e.r * s
532
+ }));
533
+ }
534
+ function en(e) {
535
+ let t = [];
536
+ return e.forEach((e) => {
537
+ let n = $t(e);
538
+ t.push({
539
+ ...e,
540
+ children: n
541
+ }), t.push(...en(n));
542
+ }), t;
543
+ }
544
+ function tn(e, t) {
545
+ return !e || !t || !Array.isArray(e.hierarchyPath) || !Array.isArray(t.hierarchyPath) || e.hierarchyPath.length <= t.hierarchyPath.length ? !1 : t.hierarchyPath.every((t, n) => e.hierarchyPath[n] === t);
546
+ }
547
+ function nn(e) {
548
+ return e.hasChildren ? V.value.style.chart.circles.labels.parents.show : V.value.style.chart.circles.labels.children.show;
549
+ }
550
+ function rn() {
551
+ if (!V.value.responsive || !L.value) return;
552
+ let e = ge(() => {
553
+ let { width: e, height: t } = _e({
554
+ chart: L.value,
555
+ title: V.value.style.chart.title.text ? _t.value : null,
556
+ legend: null,
557
+ source: St.value,
558
+ noTitle: vt.value
559
+ });
560
+ requestAnimationFrame(() => {
561
+ !e || !t || (W.value && (W.value.setAttribute("width", e), W.value.setAttribute("height", t)), qt(e, t));
562
+ });
563
+ });
564
+ Y.value && (X.value && Y.value.unobserve(X.value), Y.value.disconnect()), Y.value = new ResizeObserver(e), X.value = L.value.parentNode || L.value, X.value && Y.value.observe(X.value), e();
565
+ }
566
+ function an() {
567
+ Y.value && (X.value && Y.value.unobserve(X.value), Y.value.disconnect(), Y.value = null, X.value = null);
568
+ }
569
+ async function on() {
570
+ p(F.dataset) && ee({
571
+ componentName: "VueUiCirclePack",
572
+ type: "dataset",
573
+ debug: Wt.value
574
+ });
575
+ let e = Gt.value, t = Kt.value;
576
+ qt(e, t), V.value.responsive ? rn() : an();
577
+ }
578
+ Ae(on), ke(() => {
579
+ an();
580
+ }), Fe(() => Nt.value, async (e) => {
581
+ await on();
582
+ }, { deep: !0 });
583
+ let sn = v(() => te(V.value.customPalette)), Z = v(() => Qt(Nt.value)), cn = v(() => q.value.length ? Math.max(...q.value.map((e) => e.r)) : 0);
584
+ function ln(e, t) {
585
+ return cn.value ? t / cn.value * e : 0;
586
+ }
587
+ function un(e, t) {
588
+ V.value.events.datapointLeave && V.value.events.datapointLeave({
589
+ datapoint: e,
590
+ seriesIndex: t
591
+ }), !(kt.value === "keyboard" && z.value?.id === e?.id) && (wt.value = !1, z.value = null, B.value = null, kt.value = "pointer");
592
+ }
593
+ function dn(e, t) {
594
+ Ke("selectDatapoint", e), V.value.events.datapointClick && V.value.events.datapointClick({
595
+ datapoint: e,
596
+ seriesIndex: t
597
+ });
598
+ }
599
+ let fn = k(null), pn = k(!1);
600
+ function mn(e, t, n = "pointer") {
601
+ z.value = e, B.value = t, kt.value = n, V.value.events.datapointEnter && V.value.events.datapointEnter({
602
+ datapoint: e,
603
+ seriesIndex: t
604
+ }), fn.value = {
605
+ datapoint: e,
606
+ seriesIndex: t,
607
+ config: V.value,
608
+ series: J.value
609
+ }, wt.value = !0;
610
+ let r = V.value.style.chart.tooltip.customFormat;
611
+ if (pn.value = !1, ne(r)) try {
612
+ let n = r({
613
+ seriesIndex: t,
614
+ datapoint: e,
615
+ series: J.value,
616
+ config: V.value
617
+ });
618
+ typeof n == "string" && (Tt.value = n, pn.value = !0);
619
+ } catch {
620
+ console.warn("Custom format cannot be applied."), pn.value = !1;
621
+ }
622
+ if (!pn.value) {
623
+ let t = "";
624
+ t += `
625
+ <div style="display:flex;align-items:center;gap:4px;">
626
+ <svg viewBox="0 0 10 10" height="${V.value.style.chart.tooltip.fontSize}" width="${V.value.style.chart.tooltip.fontSize}">
627
+ <circle
628
+ cx="5"
629
+ cy="5"
630
+ r="5"
631
+ fill="${V.value.style.chart.circles.gradient.show ? `url(#${e.id})` : e.color}"
632
+ />
633
+ </svg>
634
+ <span>${e.name}: <b>${hn(e)}</b></span>
635
+ </div>
636
+ `, Tt.value = t;
637
+ }
638
+ }
639
+ function hn(e) {
640
+ return f(V.value.style.chart.circles.labels.value.formatter, e.value, u({
641
+ p: V.value.style.chart.circles.labels.value.prefix,
642
+ v: e.value,
643
+ s: V.value.style.chart.circles.labels.value.suffix,
644
+ r: V.value.style.chart.circles.labels.value.rounding
645
+ }));
646
+ }
647
+ function gn(e) {
648
+ if (!e) return 0;
649
+ let t = hn(e), n = e.r / (t.length || 1) * (t.length === 1 ? 1 : 2);
650
+ return Math.min(e.r / 2.5, n);
651
+ }
652
+ let Q = k(!1);
653
+ function _n(e) {
654
+ Q.value = e, xt.value += 1;
655
+ }
656
+ let vn = k(!1);
657
+ function yn() {
658
+ vn.value = !vn.value;
659
+ }
660
+ let bn = v(() => !vn.value && G.value.showZoom), { viewBox: $, resetZoom: xn, isZoom: Sn, setInitialViewBox: Cn } = Se(W, {
661
+ x: 0,
662
+ y: 0,
663
+ width: Math.max(10, K.value.w),
664
+ height: Math.max(10, K.value.h)
665
+ }, V.value.style.chart.zoom?.speed ?? 1, bn);
666
+ function wn(e, t, n = 0) {
667
+ return !(e.x + e.width + n < t.x || t.x + t.width + n < e.x || e.y + e.height + n < t.y || t.y + t.height + n < e.y);
668
+ }
669
+ function Tn(e, t, n = 0) {
670
+ let r = Math.min(Math.max(t.x, e.x - n), e.x + e.width + n), i = Math.min(Math.max(t.y, e.y - n), e.y + e.height + n), a = t.x - r, o = t.y - i;
671
+ return a * a + o * o <= t.r * t.r;
672
+ }
673
+ function En(e, t) {
674
+ let n = Math.max(4, Math.min(t.width, t.height) * .01);
675
+ return {
676
+ ...e,
677
+ x: Math.min(Math.max(e.x, t.x + n), t.x + t.width - e.width - n),
678
+ y: Math.min(Math.max(e.y, t.y + n), t.y + t.height - e.height - n)
679
+ };
680
+ }
681
+ function Dn(e) {
682
+ let t = [e.name];
683
+ return V.value.style.chart.circles.labels.value.show && t.push(hn(e)), t.filter(Boolean);
684
+ }
685
+ function On(e, t, n, r, i) {
686
+ let a = e.x, o = e.y;
687
+ return {
688
+ right: {
689
+ x: a + e.r + i,
690
+ y: o - n / 2,
691
+ anchorX: a + e.r,
692
+ anchorY: o
693
+ },
694
+ left: {
695
+ x: a - e.r - i - t,
696
+ y: o - n / 2,
697
+ anchorX: a - e.r,
698
+ anchorY: o
699
+ },
700
+ top: {
701
+ x: a - t / 2,
702
+ y: o - e.r - i - n,
703
+ anchorX: a,
704
+ anchorY: o - e.r
705
+ },
706
+ bottom: {
707
+ x: a - t / 2,
708
+ y: o + e.r + i,
709
+ anchorX: a,
710
+ anchorY: o + e.r
711
+ },
712
+ topRight: {
713
+ x: a + e.r * .7 + i,
714
+ y: o - e.r * .7 - i - n,
715
+ anchorX: a + e.r * .7,
716
+ anchorY: o - e.r * .7
717
+ },
718
+ topLeft: {
719
+ x: a - e.r * .7 - i - t,
720
+ y: o - e.r * .7 - i - n,
721
+ anchorX: a - e.r * .7,
722
+ anchorY: o - e.r * .7
723
+ },
724
+ bottomRight: {
725
+ x: a + e.r * .7 + i,
726
+ y: o + e.r * .7 + i,
727
+ anchorX: a + e.r * .7,
728
+ anchorY: o + e.r * .7
729
+ },
730
+ bottomLeft: {
731
+ x: a - e.r * .7 - i - t,
732
+ y: o + e.r * .7 + i,
733
+ anchorX: a - e.r * .7,
734
+ anchorY: o + e.r * .7
735
+ }
736
+ }[r];
737
+ }
738
+ function kn(e, t) {
739
+ let n = [], r = t.get(e.parentId);
740
+ for (; r;) n.push(r), r = t.get(r.parentId);
741
+ return n;
742
+ }
743
+ function An(e, t, n, r, i, a) {
744
+ let o = e.x, s = e.y, c = t || e, l = a * .6, u = {
745
+ right: {
746
+ x: c.x + c.r + a,
747
+ y: s - r / 2
748
+ },
749
+ left: {
750
+ x: c.x - c.r - a - n,
751
+ y: s - r / 2
752
+ },
753
+ top: {
754
+ x: o - n / 2,
755
+ y: c.y - c.r - a - r
756
+ },
757
+ bottom: {
758
+ x: o - n / 2,
759
+ y: c.y + c.r + a
760
+ },
761
+ topRight: {
762
+ x: c.x + c.r + a,
763
+ y: c.y - c.r - a - r - l
764
+ },
765
+ topLeft: {
766
+ x: c.x - c.r - a - n,
767
+ y: c.y - c.r - a - r - l
768
+ },
769
+ bottomRight: {
770
+ x: c.x + c.r + a,
771
+ y: c.y + c.r + a + l
772
+ },
773
+ bottomLeft: {
774
+ x: c.x - c.r - a - n,
775
+ y: c.y + c.r + a + l
776
+ }
777
+ }[i], d = u.x + n / 2, f = u.y + r / 2, p = Math.atan2(f - s, d - o);
778
+ return {
779
+ ...u,
780
+ anchorX: o + Math.cos(p) * e.r,
781
+ anchorY: s + Math.sin(p) * e.r
782
+ };
783
+ }
784
+ function jn(e, t = {}) {
785
+ let { clamp: n = !0 } = t;
786
+ if (!q.value.length || !K.value.w || !K.value.h || !V.value.style.chart.parentTooltips.show) return [];
787
+ let r = Math.max(8, V.value.style.chart.parentTooltips.fontSizeRatio * 10), i = r * 1.25, a = r * .75, o = r * .55, s = Math.max(8, Math.min(e.width, e.height) * .025), c = Math.max(2, Math.min(e.width, e.height) * .006), l = [
788
+ "right",
789
+ "left",
790
+ "top",
791
+ "bottom",
792
+ "topRight",
793
+ "topLeft",
794
+ "bottomRight",
795
+ "bottomLeft"
796
+ ], u = [], d = new Map(q.value.map((e) => [e.id, e]));
797
+ return q.value.filter((e) => e.hasChildren && e.name).sort((e, t) => t.r - e.r).forEach((t) => {
798
+ let f = kn(t, d).at(-1), p = Dn(t), m = p.reduce((e, t) => Math.max(e, String(t).length), 0), h = Math.max(r * 5, m * r * .62 + a * 2), g = p.length * i + o * 2, ee = f ? l.map((e) => An(t, f, h, g, e, s)) : [], te = l.map((e) => On(t, h, g, e, s)), ne = [...ee, ...te].map((t) => {
799
+ let r = n ? En({
800
+ x: t.x,
801
+ y: t.y,
802
+ width: h,
803
+ height: g
804
+ }, e) : {
805
+ x: t.x,
806
+ y: t.y,
807
+ width: h,
808
+ height: g
809
+ };
810
+ return {
811
+ ...r,
812
+ anchorX: t.anchorX,
813
+ anchorY: t.anchorY,
814
+ lineX: r.x + r.width / 2,
815
+ lineY: r.y + r.height / 2
816
+ };
817
+ }).find((e) => !u.some((t) => wn(e, t, c)) && !q.value.some((t) => Tn(e, t, c)));
818
+ ne && u.push({
819
+ ...ne,
820
+ datapoint: t,
821
+ id: `parent_tooltip_${t.id}`,
822
+ color: t.color,
823
+ lines: p,
824
+ fontSize: r,
825
+ lineHeight: i,
826
+ paddingX: a,
827
+ paddingY: o
828
+ });
829
+ }), u;
830
+ }
831
+ let Mn = v(() => jn($.value, { clamp: !0 }));
832
+ function Nn(e) {
833
+ let t = jn(e, { clamp: !1 });
834
+ if (!t.length) return e;
835
+ let n = Math.min(e.x, ...t.map((e) => e.x)), r = Math.min(e.y, ...t.map((e) => e.y)), i = Math.max(e.x + e.width, ...t.map((e) => e.x + e.width)), a = Math.max(e.y + e.height, ...t.map((e) => e.y + e.height)), o = Math.max(8, Math.min(e.width, e.height) * .025);
836
+ return {
837
+ x: n - o,
838
+ y: r - o,
839
+ width: i - n + o * 2,
840
+ height: a - r + o * 2
841
+ };
842
+ }
843
+ function Pn(e) {
844
+ let t = [];
845
+ function n(e, r = 0, i = "") {
846
+ e.forEach((e) => {
847
+ t.push({
848
+ name: e.name,
849
+ value: e.value,
850
+ color: e.color,
851
+ parentName: i,
852
+ depth: r
853
+ }), Array.isArray(e.children) && e.children.length && n(e.children, r + 1, e.name);
854
+ });
855
+ }
856
+ return n(e), t;
857
+ }
858
+ let Fn = v(() => {
859
+ let e = Pn(Z.value);
860
+ return {
861
+ head: J.value.map((e) => ({
862
+ name: e.name,
863
+ value: e.value,
864
+ color: e.color
865
+ })).toSorted((e, t) => t.value - e.value),
866
+ body: e.map((e) => e.value),
867
+ hierarchy: e
868
+ };
869
+ }), In = v(() => Pn(Z.value).map((e) => ({
870
+ ...e,
871
+ name: `${"- ".repeat(e.depth)}${e.name}`
872
+ })));
873
+ function Ln(e = null) {
874
+ Oe(() => {
875
+ let r = In.value.map((e) => [
876
+ [e.name],
877
+ [e.parentName || ""],
878
+ [e.depth],
879
+ [e.value]
880
+ ]), i = n([
881
+ [V.value.style.chart.title.text],
882
+ [V.value.style.chart.title.subtitle.text],
883
+ [
884
+ [V.value.table.columnNames.datapoint],
885
+ ["Parent"],
886
+ ["Depth"],
887
+ [V.value.table.columnNames.value]
888
+ ]
889
+ ].concat(r));
890
+ e ? e(i) : t({
891
+ csvContent: i,
892
+ title: V.value.style.chart.title.text || "vue-ui-circle-pack"
893
+ });
894
+ });
895
+ }
896
+ let Rn = v(() => {
897
+ let e = [
898
+ V.value.table.columnNames.datapoint,
899
+ V.value.table.columnNames.parent,
900
+ V.value.table.columnNames.depth,
901
+ V.value.table.columnNames.value
902
+ ], t = Fn.value.hierarchy.map((e) => {
903
+ let t = u({
904
+ p: V.value.style.chart.circles.labels.value.prefix,
905
+ v: e.value,
906
+ s: V.value.style.chart.circles.labels.value.suffix,
907
+ r: V.value.style.chart.circles.labels.value.rounding
908
+ });
909
+ return [
910
+ {
911
+ color: e.color,
912
+ name: `${" ".repeat(e.depth)}${e.name}`
913
+ },
914
+ e.parentName ?? "",
915
+ e.depth ?? 0,
916
+ t
917
+ ];
918
+ }), n = {
919
+ th: {
920
+ backgroundColor: V.value.table.th.backgroundColor,
921
+ color: V.value.table.th.color,
922
+ outline: V.value.table.th.outline
923
+ },
924
+ td: {
925
+ backgroundColor: V.value.table.td.backgroundColor,
926
+ color: V.value.table.td.color,
927
+ outline: V.value.table.td.outline
928
+ },
929
+ breakpoint: V.value.table.responsiveBreakpoint
930
+ };
931
+ return {
932
+ colNames: [
933
+ V.value.table.columnNames.datapoint,
934
+ V.value.table.columnNames.parent,
935
+ V.value.table.columnNames.depth,
936
+ V.value.table.columnNames.value
937
+ ],
938
+ head: e,
939
+ body: t,
940
+ config: n
941
+ };
942
+ });
943
+ function zn() {
944
+ G.value.showTable = !G.value.showTable;
945
+ }
946
+ function Bn() {
947
+ G.value.showTooltip = !G.value.showTooltip;
948
+ }
949
+ function Vn() {
950
+ G.value.showZoom = !G.value.showZoom;
951
+ }
952
+ function Hn() {
953
+ return Z.value;
954
+ }
955
+ async function Un({ scale: e = 2 } = {}) {
956
+ if (!L.value) return;
957
+ let { width: t, height: n } = L.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await pe({
958
+ domElement: L.value,
959
+ base64: !0,
960
+ img: !0,
961
+ scale: e
962
+ });
963
+ return {
964
+ imageUri: i,
965
+ base64: a,
966
+ title: V.value.style.chart.title.text,
967
+ width: t,
968
+ height: n,
969
+ aspectRatio: r
970
+ };
971
+ }
972
+ let Wn = v(() => {
973
+ let e = V.value.table.useDialog && !V.value.table.show, t = G.value.showTable;
974
+ return {
975
+ component: e ? Ge : Be,
976
+ title: `${V.value.style.chart.title.text}${V.value.style.chart.title.subtitle.text ? `: ${V.value.style.chart.title.subtitle.text}` : ""}`,
977
+ props: e ? {
978
+ backgroundColor: V.value.table.th.backgroundColor,
979
+ color: V.value.table.th.color,
980
+ headerColor: V.value.table.th.color,
981
+ headerBg: V.value.table.th.backgroundColor,
982
+ isFullscreen: Q.value,
983
+ fullscreenParent: L.value,
984
+ forcedWidth: Math.min(500, window.innerWidth * .8),
985
+ isCursorPointer: U.value
986
+ } : {
987
+ hideDetails: !0,
988
+ config: {
989
+ open: t,
990
+ maxHeight: 1e4,
991
+ body: {
992
+ backgroundColor: V.value.style.chart.backgroundColor,
993
+ color: V.value.style.chart.color
994
+ },
995
+ head: {
996
+ backgroundColor: V.value.style.chart.backgroundColor,
997
+ color: V.value.style.chart.color
998
+ }
999
+ }
1000
+ }
1001
+ };
1002
+ });
1003
+ Fe(() => G.value.showTable, (e) => {
1004
+ V.value.table.show || (e && V.value.table.useDialog && R.value ? R.value.open() : R.value && "close" in R.value && R.value.close());
1005
+ });
1006
+ function Gn() {
1007
+ G.value.showTable = !1, Ct.value && Ct.value.setTableIconState(!1);
1008
+ }
1009
+ let Kn = v(() => V.value.style.chart.backgroundColor), { exportSvg: qn, getSvg: Jn } = le({
1010
+ svg: W,
1011
+ title: v(() => V.value.style.chart.title),
1012
+ backgroundColor: Kn
1013
+ });
1014
+ async function Yn({ isCb: e }) {
1015
+ Dt.value = !0, await Oe();
1016
+ try {
1017
+ if (e) {
1018
+ let { blob: e, url: t, text: n, dataUrl: r } = await Jn();
1019
+ await Promise.resolve(V.value.userOptions.callbacks.svg({
1020
+ blob: e,
1021
+ url: t,
1022
+ text: n,
1023
+ dataUrl: r
1024
+ }));
1025
+ } else await Promise.resolve(qn());
1026
+ } finally {
1027
+ Dt.value = !1;
1028
+ }
1029
+ }
1030
+ function Xn(e) {
1031
+ if (e?.stage === "start") {
1032
+ Et.value = !0;
1033
+ return;
1034
+ }
1035
+ if (e?.stage === "end") {
1036
+ Et.value = !1;
1037
+ return;
1038
+ }
1039
+ Vt();
1040
+ }
1041
+ async function Zn() {
1042
+ if (Ke("copyAlt", {
1043
+ config: V.value,
1044
+ dataset: Z.value,
1045
+ flattenedDataset: J.value
1046
+ }), !V.value.userOptions.callbacks.altCopy) {
1047
+ console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
1048
+ return;
1049
+ }
1050
+ await Promise.resolve(V.value.userOptions.callbacks.altCopy({
1051
+ config: V.value,
1052
+ dataset: Z.value,
1053
+ flattenedDataset: J.value
1054
+ }));
1055
+ }
1056
+ function Qn(e) {
1057
+ if (!Number.isFinite(e) || !W.value) return;
1058
+ let t = q.value[e];
1059
+ if (!t) return;
1060
+ let n = r(t.x, t.y, W.value);
1061
+ n && (Ot.value = n);
1062
+ }
1063
+ function $n() {
1064
+ if (B.value !== null) {
1065
+ let e = q.value[B.value];
1066
+ e && un(e, B.value);
1067
+ }
1068
+ B.value = null, kt.value = "pointer", wt.value = !1, z.value = null;
1069
+ }
1070
+ function er() {
1071
+ B.value = null, At.value = !0;
1072
+ }
1073
+ function tr() {
1074
+ $n(), At.value = !1;
1075
+ }
1076
+ function nr(e, t) {
1077
+ let n = q.value.length;
1078
+ return n ? e === null || e < 0 || e >= n ? t === "next" ? 0 : n - 1 : t === "previous" ? (e - 1 + n) % n : (e + 1) % n : null;
1079
+ }
1080
+ function rr(e) {
1081
+ if (!W.value || vn.value || document.activeElement !== W.value || !q.value.length) return;
1082
+ let t = ["ArrowLeft", "ArrowUp"].includes(e.key), n = ["ArrowRight", "ArrowDown"].includes(e.key), r = e.key === "Enter" || e.key === " ", i = e.key === "Escape";
1083
+ if (!t && !n && !r && !i) return;
1084
+ if (e.preventDefault(), e.stopPropagation(), i) {
1085
+ $n();
1086
+ return;
1087
+ }
1088
+ if (r) {
1089
+ if (B.value === null) return;
1090
+ let e = q.value[B.value];
1091
+ if (!e) return;
1092
+ dn(e, B.value);
1093
+ return;
1094
+ }
1095
+ let a = B.value;
1096
+ a === null || a < 0 || a >= q.value.length ? a = n ? 0 : q.value.length - 1 : n ? a = nr(a, "next") : t && (a = nr(a, "previous"));
1097
+ let o = q.value[a];
1098
+ o && (B.value = a, Qn(a), mn(o, a, "keyboard"));
1099
+ }
1100
+ let ir = v(() => ({
1101
+ headers: Rn.value?.colNames ?? [],
1102
+ rows: Rn.value?.body?.map((e) => [e[0]?.name ?? "", e[1]]) ?? []
1103
+ })), ar = v(() => V.value.style.chart.color);
1104
+ return he({
1105
+ getData: Hn,
1106
+ getImage: Un,
1107
+ generateCsv: Ln,
1108
+ generatePdf: Bt,
1109
+ generateImage: Vt,
1110
+ generateSvg: Yn,
1111
+ toggleTable: zn,
1112
+ toggleAnnotator: yn,
1113
+ toggleFullscreen: _n,
1114
+ copyAlt: Zn,
1115
+ toggleZoom: Vn,
1116
+ resetZoom: xn
1117
+ }), (e, t) => (O(), x("div", {
1118
+ id: `vue-ui-circle-pack_${I.value}`,
1119
+ class: T(`vue-data-ui-component vue-ui-circle-pack ${Q.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${M(Mt) ? "loading" : ""}`),
1120
+ ref_key: "circlePackChart",
1121
+ ref: L,
1122
+ style: D(`font-family:${V.value.style.fontFamily};text-align:center;background:${V.value.style.chart.backgroundColor};`),
1123
+ onMouseenter: t[2] ||= () => M(Ft)(!0),
1124
+ onMouseleave: t[3] ||= () => M(Ft)(!1)
1125
+ }, [
1126
+ S("div", {
1127
+ id: `chart-instructions-${I.value}`,
1128
+ class: "sr-only"
1129
+ }, [S("p", null, j(V.value.a11y.translations.keyboardNavigation), 1)], 8, Xe),
1130
+ ir.value?.rows?.length ? (O(), y(ye, {
1131
+ key: 0,
1132
+ uid: I.value,
1133
+ head: ir.value.headers,
1134
+ body: ir.value.rows,
1135
+ notice: V.value.a11y.translations.tableAvailable,
1136
+ caption: V.value.a11y.translations.tableCaption
1137
+ }, null, 8, [
1138
+ "uid",
1139
+ "head",
1140
+ "body",
1141
+ "notice",
1142
+ "caption"
1143
+ ])) : b("", !0),
1144
+ V.value.userOptions.buttons.annotator ? (O(), y(M(Ue), {
1145
+ key: 1,
1146
+ svgRef: M(W),
1147
+ backgroundColor: V.value.style.chart.backgroundColor,
1148
+ color: V.value.style.chart.color,
1149
+ active: vn.value,
1150
+ scale: cn.value / 100,
1151
+ isCursorPointer: U.value,
1152
+ onClose: yn
1153
+ }, {
1154
+ "annotator-action-close": N(() => [A(e.$slots, "annotator-action-close", {}, void 0, !0)]),
1155
+ "annotator-action-color": N(({ color: t }) => [A(e.$slots, "annotator-action-color", E(w({ color: t })), void 0, !0)]),
1156
+ "annotator-action-draw": N(({ mode: t }) => [A(e.$slots, "annotator-action-draw", E(w({ mode: t })), void 0, !0)]),
1157
+ "annotator-action-undo": N(({ disabled: t }) => [A(e.$slots, "annotator-action-undo", E(w({ disabled: t })), void 0, !0)]),
1158
+ "annotator-action-redo": N(({ disabled: t }) => [A(e.$slots, "annotator-action-redo", E(w({ disabled: t })), void 0, !0)]),
1159
+ "annotator-action-delete": N(({ disabled: t }) => [A(e.$slots, "annotator-action-delete", E(w({ disabled: t })), void 0, !0)]),
1160
+ _: 3
1161
+ }, 8, [
1162
+ "svgRef",
1163
+ "backgroundColor",
1164
+ "color",
1165
+ "active",
1166
+ "scale",
1167
+ "isCursorPointer"
1168
+ ])) : b("", !0),
1169
+ A(e.$slots, "userConfig", {}, void 0, !0),
1170
+ Ht.value ? (O(), x("div", {
1171
+ key: 2,
1172
+ ref_key: "noTitle",
1173
+ ref: vt,
1174
+ class: "vue-data-ui-no-title-space",
1175
+ style: "height:36px; width: 100%;background:transparent"
1176
+ }, null, 512)) : b("", !0),
1177
+ V.value.style.chart.title.text ? (O(), x("div", {
1178
+ key: 3,
1179
+ ref_key: "chartTitle",
1180
+ ref: _t,
1181
+ style: "width:100%;background:transparent;padding-bottom:12px"
1182
+ }, [(O(), y(me, {
1183
+ key: `title_${yt.value}`,
1184
+ config: {
1185
+ title: {
1186
+ cy: "donut-div-title",
1187
+ ...V.value.style.chart.title
1188
+ },
1189
+ subtitle: {
1190
+ cy: "donut-div-subtitle",
1191
+ ...V.value.style.chart.title.subtitle
1192
+ }
1193
+ }
1194
+ }, null, 8, ["config"]))], 512)) : b("", !0),
1195
+ V.value.userOptions.show && gt.value && (M(It) || M(Pt)) ? (O(), y(M(He), {
1196
+ ref_key: "userOptionsRef",
1197
+ ref: Ct,
1198
+ key: `user_option_${xt.value}`,
1199
+ backgroundColor: V.value.style.chart.backgroundColor,
1200
+ color: V.value.style.chart.color,
1201
+ isPrinting: M(Rt),
1202
+ isImaging: M(zt),
1203
+ uid: I.value,
1204
+ hasTooltip: V.value.userOptions.buttons.tooltip,
1205
+ isTooltip: G.value.showTooltip,
1206
+ hasLabel: !1,
1207
+ hasPdf: V.value.userOptions.buttons.pdf,
1208
+ hasImg: V.value.userOptions.buttons.img,
1209
+ hasSvg: V.value.userOptions.buttons.svg,
1210
+ hasXls: V.value.userOptions.buttons.csv,
1211
+ hasTable: V.value.userOptions.buttons.table,
1212
+ hasFullscreen: V.value.userOptions.buttons.fullscreen,
1213
+ hasAltCopy: V.value.userOptions.buttons.altCopy,
1214
+ isFullscreen: Q.value,
1215
+ chartElement: L.value,
1216
+ position: V.value.userOptions.position,
1217
+ callbacks: V.value.userOptions.callbacks,
1218
+ printScale: V.value.userOptions.print.scale,
1219
+ titles: { ...V.value.userOptions.buttonTitles },
1220
+ hasAnnotator: V.value.userOptions.buttons.annotator,
1221
+ isAnnotation: vn.value,
1222
+ tableDialog: V.value.table.useDialog,
1223
+ isCursorPointer: U.value,
1224
+ hasZoom: V.value.userOptions.buttons.zoom,
1225
+ isZoom: G.value.showZoom,
1226
+ onToggleFullscreen: _n,
1227
+ onGeneratePdf: M(Bt),
1228
+ onGenerateCsv: Ln,
1229
+ onGenerateImage: Xn,
1230
+ onGenerateSvg: Yn,
1231
+ onToggleTable: zn,
1232
+ onToggleTooltip: Bn,
1233
+ onToggleAnnotator: yn,
1234
+ onToggleZoom: Vn,
1235
+ onCopyAlt: Zn,
1236
+ style: D({ visibility: M(It) ? M(Pt) ? "visible" : "hidden" : "visible" })
1237
+ }, we({ _: 2 }, [
1238
+ e.$slots.menuIcon ? {
1239
+ name: "menuIcon",
1240
+ fn: N(({ isOpen: t, color: n }) => [A(e.$slots, "menuIcon", E(w({
1241
+ isOpen: t,
1242
+ color: n
1243
+ })), void 0, !0)]),
1244
+ key: "0"
1245
+ } : void 0,
1246
+ e.$slots.optionTooltip ? {
1247
+ name: "optionTooltip",
1248
+ fn: N(() => [A(e.$slots, "optionTooltip", {}, void 0, !0)]),
1249
+ key: "1"
1250
+ } : void 0,
1251
+ e.$slots.optionPdf ? {
1252
+ name: "optionPdf",
1253
+ fn: N(() => [A(e.$slots, "optionPdf", {}, void 0, !0)]),
1254
+ key: "2"
1255
+ } : void 0,
1256
+ e.$slots.optionCsv ? {
1257
+ name: "optionCsv",
1258
+ fn: N(() => [A(e.$slots, "optionCsv", {}, void 0, !0)]),
1259
+ key: "3"
1260
+ } : void 0,
1261
+ e.$slots.optionImg ? {
1262
+ name: "optionImg",
1263
+ fn: N(() => [A(e.$slots, "optionImg", {}, void 0, !0)]),
1264
+ key: "4"
1265
+ } : void 0,
1266
+ e.$slots.optionSvg ? {
1267
+ name: "optionSvg",
1268
+ fn: N(() => [A(e.$slots, "optionSvg", {}, void 0, !0)]),
1269
+ key: "5"
1270
+ } : void 0,
1271
+ e.$slots.optionTable ? {
1272
+ name: "optionTable",
1273
+ fn: N(() => [A(e.$slots, "optionTable", {}, void 0, !0)]),
1274
+ key: "6"
1275
+ } : void 0,
1276
+ e.$slots.optionFullscreen ? {
1277
+ name: "optionFullscreen",
1278
+ fn: N(({ toggleFullscreen: t, isFullscreen: n }) => [A(e.$slots, "optionFullscreen", E(w({
1279
+ toggleFullscreen: t,
1280
+ isFullscreen: n
1281
+ })), void 0, !0)]),
1282
+ key: "7"
1283
+ } : void 0,
1284
+ e.$slots.optionAnnotator ? {
1285
+ name: "optionAnnotator",
1286
+ fn: N(({ toggleAnnotator: t, isAnnotator: n }) => [A(e.$slots, "optionAnnotator", E(w({
1287
+ toggleAnnotator: t,
1288
+ isAnnotator: n
1289
+ })), void 0, !0)]),
1290
+ key: "8"
1291
+ } : void 0,
1292
+ e.$slots.optionZoom ? {
1293
+ name: "optionZoom",
1294
+ fn: N(({ toggleZoom: t, isZoomLocked: n }) => [A(e.$slots, "optionZoom", E(w({
1295
+ toggleZoom: t,
1296
+ isZoomLocked: n
1297
+ })), void 0, !0)]),
1298
+ key: "9"
1299
+ } : void 0,
1300
+ e.$slots.optionAltCopy ? {
1301
+ name: "optionAltCopy",
1302
+ fn: N(({ altCopy: t }) => [A(e.$slots, "optionAltCopy", E(w({ altCopy: t })), void 0, !0)]),
1303
+ key: "10"
1304
+ } : void 0,
1305
+ e.$slots["custom-menu-before"] ? {
1306
+ name: "custom-menu-before",
1307
+ fn: N(() => [A(e.$slots, "custom-menu-before", {}, void 0, !0)]),
1308
+ key: "11"
1309
+ } : void 0,
1310
+ e.$slots["custom-menu-after"] ? {
1311
+ name: "custom-menu-after",
1312
+ fn: N(() => [A(e.$slots, "custom-menu-after", {}, void 0, !0)]),
1313
+ key: "12"
1314
+ } : void 0
1315
+ ]), 1032, /* @__PURE__ */ "backgroundColor.color.isPrinting.isImaging.uid.hasTooltip.isTooltip.hasPdf.hasImg.hasSvg.hasXls.hasTable.hasFullscreen.hasAltCopy.isFullscreen.chartElement.position.callbacks.printScale.titles.hasAnnotator.isAnnotation.tableDialog.isCursorPointer.hasZoom.isZoom.onGeneratePdf.style".split("."))) : b("", !0),
1316
+ S("div", { class: T({
1317
+ "vue-ui-circle-pack-svg-container": !0,
1318
+ "not-responsive": !V.value.responsive
1319
+ }) }, [(O(), x("svg", {
1320
+ ref_key: "svgRef",
1321
+ ref: W,
1322
+ xmlns: M(g),
1323
+ "aria-describedby": `chart-instructions-${I.value}`,
1324
+ viewBox: `${M($).x} ${M($).y} ${M($).width} ${M($).height}`,
1325
+ preserveAspectRatio: "xMidYMid meet",
1326
+ class: T({
1327
+ "vue-data-ui-fullscreen--on": Q.value,
1328
+ "vue-data-ui-fulscreen--off": !Q.value,
1329
+ "not-responsive": !V.value.responsive,
1330
+ "vue-data-ui-no-transition": !M(H)
1331
+ }),
1332
+ style: D(`display:block;${V.value.responsive ? "width:100%;height:auto" : "height:100%;"};overflow:${G.value.showZoom ? "hidden" : "visible"};background:transparent;color:${V.value.style.chart.color};background:${V.value.style.chart.backgroundColor};`),
1333
+ tabindex: "0",
1334
+ onFocus: er,
1335
+ onBlur: tr,
1336
+ onKeydown: rr
1337
+ }, [
1338
+ Ee(M(We)),
1339
+ e.$slots["chart-background"] ? (O(), x("foreignObject", {
1340
+ key: 0,
1341
+ x: M($).x,
1342
+ y: M($).y,
1343
+ width: K.value.w,
1344
+ height: K.value.h,
1345
+ style: { pointerEvents: "none" }
1346
+ }, [A(e.$slots, "chart-background", {}, void 0, !0)], 8, Qe)) : b("", !0),
1347
+ (O(!0), x(_, null, je(q.value, (t, n) => (O(), x(_, { key: t.id }, [
1348
+ S("defs", null, [Ee(ve, {
1349
+ t: "radial",
1350
+ id: t.id,
1351
+ fy: "30%",
1352
+ stops: [
1353
+ [
1354
+ "10%",
1355
+ M(o)(t.color, V.value.style.chart.circles.gradient.intensity / 100),
1356
+ 1
1357
+ ],
1358
+ [
1359
+ "90%",
1360
+ M(d)(t.color, .1),
1361
+ 1
1362
+ ],
1363
+ [
1364
+ "100%",
1365
+ t.color,
1366
+ 1
1367
+ ]
1368
+ ]
1369
+ }, null, 8, ["id", "stops"])]),
1370
+ e.$slots.pattern ? (O(), x("g", $e, [S("defs", null, [A(e.$slots, "pattern", De({ ref_for: !0 }, {
1371
+ ...t,
1372
+ patternId: `pattern_${I.value}_${t.id}`
1373
+ }), void 0, !0)])])) : b("", !0),
1374
+ S("rect", {
1375
+ class: T({ "vue-data-ui-transition": M(H) }),
1376
+ x: t.x - t.r,
1377
+ y: t.y - t.r,
1378
+ width: t.r * 2,
1379
+ height: t.r * 2,
1380
+ stroke: V.value.style.chart.circles.stroke,
1381
+ "stroke-width": V.value.style.chart.circles.strokeWidth * (cn.value || 1) / 100,
1382
+ fill: V.value.style.chart.circles.gradient.show ? `url(#${t.id})` : t.color,
1383
+ rx: t.r,
1384
+ onMouseenter: (e) => mn(t, n, "pointer"),
1385
+ onMouseout: (e) => un(t, n),
1386
+ onClick: (e) => dn(t, n)
1387
+ }, null, 42, et),
1388
+ e.$slots.pattern ? (O(), x("rect", {
1389
+ key: 1,
1390
+ class: T({ "vue-data-ui-transition": M(H) }),
1391
+ x: t.x - t.r,
1392
+ y: t.y - t.r,
1393
+ width: t.r * 2,
1394
+ height: t.r * 2,
1395
+ stroke: V.value.style.chart.circles.stroke,
1396
+ "stroke-width": V.value.style.chart.circles.strokeWidth * (cn.value || 1) / 100,
1397
+ fill: `url(#pattern_${I.value}_${t.id})`,
1398
+ rx: t.r,
1399
+ style: { pointerEvents: "none" }
1400
+ }, null, 10, tt)) : b("", !0)
1401
+ ], 64))), 128)),
1402
+ (O(!0), x(_, null, je(q.value, (e, t) => (O(), x(_, { key: e.id }, [e.hasChildren ? b("", !0) : (O(), x("rect", {
1403
+ key: 0,
1404
+ class: T({ "vue-data-ui-transition": M(H) }),
1405
+ x: e.x - e.r,
1406
+ y: e.y - e.r,
1407
+ width: e.r * 2,
1408
+ height: e.r * 2,
1409
+ stroke: "none",
1410
+ fill: z.value && z.value.id === e.id ? V.value.style.chart.circles.gradient.show ? `url(#${e.id})` : e.color : "transparent",
1411
+ rx: e.r,
1412
+ style: D({
1413
+ filter: z.value && z.value.id === e.id ? `drop-shadow(0px 0px 6px ${V.value.style.chart.circles.selectedShadowColor})` : "none",
1414
+ opacity: +!!z.value,
1415
+ pointerEvents: "none"
1416
+ })
1417
+ }, null, 14, nt))], 64))), 128)),
1418
+ (O(!0), x(_, null, je(q.value, (t, n) => (O(), x(_, { key: `cl_${t.id}` }, [e.$slots["data-label"] && nn(t) ? A(e.$slots, "data-label", De({ ref_for: !0 }, {
1419
+ ...t,
1420
+ createTSpans: M(l),
1421
+ fontSize: {
1422
+ name: t.r / 3 * V.value.style.chart.circles.labels.name.fontSizeRatio,
1423
+ value: gn(t) * V.value.style.chart.circles.labels.value.fontSizeRatio
1424
+ },
1425
+ color: V.value.style.chart.circles.labels.name.color ? V.value.style.chart.circles.labels.name.color : M(h)(t.color)
1426
+ }), void 0, !0, 0) : (O(), x(_, { key: 1 }, [V.value.style.chart.circles.labels.name.show && t.name && nn(t) ? (O(), x("text", {
1427
+ key: 0,
1428
+ style: { pointerEvents: "none" },
1429
+ class: T({ "vue-data-ui-transition": M(H) }),
1430
+ transform: `translate(${t.x}, ${t.y + ln(t.r, V.value.style.chart.circles.labels.name.offsetY) - t.r / 10})`,
1431
+ "font-size": t.r / 3 * V.value.style.chart.circles.labels.name.fontSizeRatio,
1432
+ fill: V.value.style.chart.circles.labels.name.color === "auto" ? M(h)(t.color) : V.value.style.chart.circles.labels.name.color,
1433
+ "font-weight": V.value.style.chart.circles.labels.name.bold ? "bold" : "normal",
1434
+ "text-anchor": "middle"
1435
+ }, j(t.name), 11, rt)) : b("", !0), V.value.style.chart.circles.labels.value.show && nn(t) ? (O(), x("text", {
1436
+ key: 1,
1437
+ class: T({ "vue-data-ui-transition": M(H) }),
1438
+ style: {
1439
+ pointerEvents: "none",
1440
+ transition: "opacity 0.2s ease-in-out"
1441
+ },
1442
+ transform: `translate(${t.x}, ${t.y + ln(t.r, V.value.style.chart.circles.labels.value.offsetY) + t.r / 2.5})`,
1443
+ "font-size": gn(t) * V.value.style.chart.circles.labels.value.fontSizeRatio,
1444
+ fill: V.value.style.chart.circles.labels.value.color === "auto" ? M(h)(t.color) : V.value.style.chart.circles.labels.value.color,
1445
+ "font-weight": V.value.style.chart.circles.labels.value.bold ? "bold" : "normal",
1446
+ "text-anchor": "middle"
1447
+ }, j(hn(t)), 11, it)) : b("", !0)], 64)), A(e.$slots, "circle", De({ ref_for: !0 }, {
1448
+ ...t,
1449
+ showLabel: nn(t),
1450
+ isSelected: z.value?.id === t.id,
1451
+ isDescendantOfSelected: tn(t, z.value),
1452
+ uid: `${n}_${I.value}`
1453
+ }), void 0, !0)], 64))), 128)),
1454
+ Mn.value.length && V.value.style.chart.parentTooltips.show ? (O(), x("g", at, [(O(!0), x(_, null, je(Mn.value, (t) => (O(), x("g", { key: `tltp_${t.id}` }, [
1455
+ S("path", {
1456
+ class: T({ "vue-data-ui-transition": M(H) }),
1457
+ stroke: V.value.style.chart.parentTooltips.link.useSerieColor ? t.color : V.value.style.chart.parentTooltips.link.stroke,
1458
+ "stroke-width": V.value.style.chart.parentTooltips.link.strokeWidth,
1459
+ "stroke-linecap": "round",
1460
+ "stroke-dasharray": V.value.style.chart.parentTooltips.link.strokeDasharray,
1461
+ opacity: V.value.style.chart.parentTooltips.link.opacity,
1462
+ d: `M${t.anchorX}, ${t.anchorY} ${t.lineX}, ${t.lineY}`
1463
+ }, null, 10, ot),
1464
+ S("rect", {
1465
+ class: T({ "vue-data-ui-transition": M(H) }),
1466
+ x: t.x,
1467
+ y: t.y,
1468
+ width: t.width,
1469
+ height: t.height,
1470
+ rx: Math.max(3, t.fontSize / 2.5) * V.value.style.chart.parentTooltips.borderRadiusRatio,
1471
+ fill: V.value.style.chart.parentTooltips.backgroundColor,
1472
+ stroke: V.value.style.chart.parentTooltips.useSerieColor ? t.color : V.value.style.chart.parentTooltips.stroke,
1473
+ "stroke-width": V.value.style.chart.parentTooltips.strokeWidth,
1474
+ filter: V.value.style.chart.parentTooltips.filter
1475
+ }, null, 10, st),
1476
+ A(e.$slots, "parent-tooltip", De({ ref_for: !0 }, { ...t }), () => [S("rect", {
1477
+ class: T({ "vue-data-ui-transition": M(H) }),
1478
+ fill: t.color,
1479
+ x: t.x + t.paddingX * 1.3 - t.fontSize * .35,
1480
+ y: t.y + t.paddingY + t.lineHeight / 2 - t.fontSize * .35,
1481
+ rx: t.fontSize * .35,
1482
+ width: t.fontSize * .7,
1483
+ height: t.fontSize * .7
1484
+ }, null, 10, ct), S("text", {
1485
+ class: T({ "vue-data-ui-transition": M(H) }),
1486
+ transform: `translate(${t.x + t.paddingX + t.fontSize}, ${t.y + t.paddingY + t.fontSize})`,
1487
+ "font-size": t.fontSize,
1488
+ fill: V.value.style.chart.parentTooltips.color,
1489
+ "font-family": V.value.style.fontFamily,
1490
+ "text-anchor": "start"
1491
+ }, [(O(!0), x(_, null, je(t.lines, (e, n) => (O(), x("tspan", {
1492
+ key: `${t.id}_${n}`,
1493
+ x: 0,
1494
+ dy: n === 0 ? 0 : t.lineHeight
1495
+ }, j(e), 9, ut))), 128))], 10, lt)], !0)
1496
+ ]))), 128))])) : b("", !0),
1497
+ A(e.$slots, "svg", { svg: {
1498
+ drawingArea: { ...M($) },
1499
+ width: K.value.w,
1500
+ height: K.value.h,
1501
+ isPrintingImg: M(Rt) || M(zt) || Et.value,
1502
+ isPrintingSvg: Dt.value
1503
+ } }, void 0, !0)
1504
+ ], 46, Ze)), e.$slots.hint ? (O(), x("div", dt, [A(e.$slots, "hint", E(w({
1505
+ hint: V.value.a11y.translations.keyboardNavigation,
1506
+ isVisible: At.value
1507
+ })), void 0, !0)])) : b("", !0)], 2),
1508
+ e.$slots.watermark ? (O(), x("div", ft, [A(e.$slots, "watermark", E(w({ isPrinting: M(Rt) || M(zt) || Et.value || Dt.value })), void 0, !0)])) : b("", !0),
1509
+ M(Sn) ? (O(), x("div", pt, [A(e.$slots, "reset-action", { reset: M(xn) }, () => [S("button", {
1510
+ "data-cy-reset": "",
1511
+ tabindex: "0",
1512
+ role: "button",
1513
+ class: "vue-data-ui-refresh-button",
1514
+ style: D({
1515
+ background: V.value.style.chart.backgroundColor,
1516
+ cursor: U.value ? "pointer" : "default"
1517
+ }),
1518
+ onClick: t[0] ||= (e) => M(xn)(!0)
1519
+ }, [Ee(M(P), {
1520
+ name: "refresh",
1521
+ stroke: V.value.style.chart.color
1522
+ }, null, 8, ["stroke"])], 4)], !0)])) : b("", !0),
1523
+ e.$slots.source ? (O(), x("div", {
1524
+ key: 7,
1525
+ ref_key: "source",
1526
+ ref: St,
1527
+ dir: "auto"
1528
+ }, [A(e.$slots, "source", {}, void 0, !0)], 512)) : b("", !0),
1529
+ Ee(M(ze), {
1530
+ teleportTo: V.value.style.chart.tooltip.teleportTo,
1531
+ show: G.value.showTooltip && wt.value,
1532
+ backgroundColor: V.value.style.chart.tooltip.backgroundColor,
1533
+ color: V.value.style.chart.tooltip.color,
1534
+ fontSize: V.value.style.chart.tooltip.fontSize,
1535
+ borderRadius: V.value.style.chart.tooltip.borderRadius,
1536
+ borderColor: V.value.style.chart.tooltip.borderColor,
1537
+ borderWidth: V.value.style.chart.tooltip.borderWidth,
1538
+ backgroundOpacity: V.value.style.chart.tooltip.backgroundOpacity,
1539
+ position: V.value.style.chart.tooltip.position,
1540
+ offsetX: V.value.style.chart.tooltip.offsetX,
1541
+ offsetY: V.value.style.chart.tooltip.offsetY,
1542
+ parent: L.value,
1543
+ content: Tt.value,
1544
+ isCustom: pn.value,
1545
+ isFullscreen: Q.value,
1546
+ smooth: V.value.style.chart.tooltip.smooth,
1547
+ backdropFilter: V.value.style.chart.tooltip.backdropFilter,
1548
+ smoothForce: V.value.style.chart.tooltip.smoothForce,
1549
+ smoothSnapThreshold: V.value.style.chart.tooltip.smoothSnapThrehsold,
1550
+ isA11yMode: kt.value === "keyboard",
1551
+ a11yPosition: Ot.value
1552
+ }, {
1553
+ "tooltip-before": N(() => [A(e.$slots, "tooltip-before", E(w({ ...fn.value })), void 0, !0)]),
1554
+ tooltip: N(() => [A(e.$slots, "tooltip", E(w({ ...fn.value })), void 0, !0)]),
1555
+ "tooltip-after": N(() => [A(e.$slots, "tooltip-after", E(w({ ...fn.value })), void 0, !0)]),
1556
+ _: 3
1557
+ }, 8, [
1558
+ "teleportTo",
1559
+ "show",
1560
+ "backgroundColor",
1561
+ "color",
1562
+ "fontSize",
1563
+ "borderRadius",
1564
+ "borderColor",
1565
+ "borderWidth",
1566
+ "backgroundOpacity",
1567
+ "position",
1568
+ "offsetX",
1569
+ "offsetY",
1570
+ "parent",
1571
+ "content",
1572
+ "isCustom",
1573
+ "isFullscreen",
1574
+ "smooth",
1575
+ "backdropFilter",
1576
+ "smoothForce",
1577
+ "smoothSnapThreshold",
1578
+ "isA11yMode",
1579
+ "a11yPosition"
1580
+ ]),
1581
+ gt.value && V.value.userOptions.buttons.table ? (O(), y(Me(Wn.value.component), De({ key: 8 }, Wn.value.props, {
1582
+ ref_key: "tableUnit",
1583
+ ref: R,
1584
+ onClose: Gn
1585
+ }), we({
1586
+ content: N(() => [(O(), y(M(Ve), {
1587
+ key: `table_${bt.value}`,
1588
+ colNames: Rn.value.colNames,
1589
+ head: Rn.value.head,
1590
+ body: Rn.value.body,
1591
+ config: Rn.value.config,
1592
+ title: V.value.table.useDialog ? "" : Wn.value.title,
1593
+ withCloseButton: !V.value.table.useDialog,
1594
+ isCursorPointer: U.value,
1595
+ onClose: Gn
1596
+ }, {
1597
+ th: N(({ th: e }) => [S("div", {
1598
+ innerHTML: e,
1599
+ style: {
1600
+ display: "flex",
1601
+ "align-items": "center"
1602
+ }
1603
+ }, null, 8, mt)]),
1604
+ td: N(({ td: e }) => [Te(j(e.name || e), 1)]),
1605
+ _: 1
1606
+ }, 8, [
1607
+ "colNames",
1608
+ "head",
1609
+ "body",
1610
+ "config",
1611
+ "title",
1612
+ "withCloseButton",
1613
+ "isCursorPointer"
1614
+ ]))]),
1615
+ _: 2
1616
+ }, [V.value.table.useDialog ? {
1617
+ name: "title",
1618
+ fn: N(() => [Te(j(Wn.value.title), 1)]),
1619
+ key: "0"
1620
+ } : void 0, V.value.table.useDialog ? {
1621
+ name: "actions",
1622
+ fn: N(() => [S("button", {
1623
+ tabindex: "0",
1624
+ class: "vue-ui-user-options-button",
1625
+ onClick: t[1] ||= (e) => Ln(V.value.userOptions.callbacks.csv),
1626
+ style: D({ cursor: U.value ? "pointer" : "default" })
1627
+ }, [Ee(M(P), {
1628
+ name: "fileCsv",
1629
+ stroke: Wn.value.props.color
1630
+ }, null, 8, ["stroke"])], 4)]),
1631
+ key: "1"
1632
+ } : void 0]), 1040)) : b("", !0),
1633
+ A(e.$slots, "skeleton", {}, () => [M(Mt) ? (O(), y(ce, { key: 0 })) : b("", !0)], !0)
1634
+ ], 46, Ye));
1635
+ }
1636
+ }, [["__scopeId", "data-v-8906f266"]]);
1637
+ //#endregion
1638
+ export { Je as n, ht as t };