vue-data-ui 3.22.7 → 3.22.8

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