vue-data-ui 3.18.5 → 3.19.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 (145) hide show
  1. package/dist/{PackageVersion-sdNn_SJC.js → PackageVersion-D5dkifa6.js} +1 -1
  2. package/dist/components/vue-ui-3d-bar.js +1 -1
  3. package/dist/components/vue-ui-accordion.js +1 -1
  4. package/dist/components/vue-ui-age-pyramid.js +1 -1
  5. package/dist/components/vue-ui-annotator.js +1 -1
  6. package/dist/components/vue-ui-bullet.js +1 -1
  7. package/dist/components/vue-ui-bump.js +1 -1
  8. package/dist/components/vue-ui-candlestick.js +1 -1
  9. package/dist/components/vue-ui-carousel-table.js +1 -1
  10. package/dist/components/vue-ui-chestnut.js +1 -1
  11. package/dist/components/vue-ui-chord.js +1 -1
  12. package/dist/components/vue-ui-circle-pack.js +1 -1
  13. package/dist/components/vue-ui-cursor.js +1 -1
  14. package/dist/components/vue-ui-dag.js +1 -1
  15. package/dist/components/vue-ui-dashboard.js +1 -1
  16. package/dist/components/vue-ui-digits.js +1 -1
  17. package/dist/components/vue-ui-donut-evolution.js +1 -1
  18. package/dist/components/vue-ui-donut.js +1 -1
  19. package/dist/components/vue-ui-dumbbell.js +1 -1
  20. package/dist/components/vue-ui-flow.js +1 -1
  21. package/dist/components/vue-ui-funnel.js +1 -1
  22. package/dist/components/vue-ui-galaxy.js +1 -1
  23. package/dist/components/vue-ui-gauge.js +1 -1
  24. package/dist/components/vue-ui-geo.js +1 -1
  25. package/dist/components/vue-ui-gizmo.js +1 -1
  26. package/dist/components/vue-ui-heatmap.js +1 -1
  27. package/dist/components/vue-ui-history-plot.js +1 -1
  28. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  29. package/dist/components/vue-ui-kpi.js +1 -1
  30. package/dist/components/vue-ui-mini-loader.js +1 -1
  31. package/dist/components/vue-ui-molecule.js +1 -1
  32. package/dist/components/vue-ui-mood-radar.js +1 -1
  33. package/dist/components/vue-ui-nested-donuts.js +1 -1
  34. package/dist/components/vue-ui-onion.js +1 -1
  35. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  36. package/dist/components/vue-ui-quadrant.js +1 -1
  37. package/dist/components/vue-ui-quick-chart.js +1 -1
  38. package/dist/components/vue-ui-radar.js +1 -1
  39. package/dist/components/vue-ui-rating.js +1 -1
  40. package/dist/components/vue-ui-relation-circle.js +1 -1
  41. package/dist/components/vue-ui-ridgeline.js +1 -1
  42. package/dist/components/vue-ui-rings.js +1 -1
  43. package/dist/components/vue-ui-scatter.js +1 -1
  44. package/dist/components/vue-ui-skeleton.js +1 -1
  45. package/dist/components/vue-ui-smiley.js +1 -1
  46. package/dist/components/vue-ui-spark-trend.js +1 -1
  47. package/dist/components/vue-ui-sparkbar.js +1 -1
  48. package/dist/components/vue-ui-sparkgauge.js +1 -1
  49. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  50. package/dist/components/vue-ui-sparkline.js +1 -1
  51. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  52. package/dist/components/vue-ui-stackbar.js +1 -1
  53. package/dist/components/vue-ui-stackline.js +1 -1
  54. package/dist/components/vue-ui-strip-plot.js +1 -1
  55. package/dist/components/vue-ui-table-heatmap.js +1 -1
  56. package/dist/components/vue-ui-table-sparkline.js +1 -1
  57. package/dist/components/vue-ui-table.js +1 -1
  58. package/dist/components/vue-ui-thermometer.js +1 -1
  59. package/dist/components/vue-ui-timer.js +1 -1
  60. package/dist/components/vue-ui-tiremarks.js +1 -1
  61. package/dist/components/vue-ui-treemap.js +1 -1
  62. package/dist/components/vue-ui-vertical-bar.js +1 -1
  63. package/dist/components/vue-ui-waffle.js +1 -1
  64. package/dist/components/vue-ui-wheel.js +1 -1
  65. package/dist/components/vue-ui-word-cloud.js +1 -1
  66. package/dist/components/vue-ui-world.js +1 -1
  67. package/dist/components/vue-ui-xy-canvas.js +1 -1
  68. package/dist/components/vue-ui-xy.js +1 -1
  69. package/dist/style.css +1 -1
  70. package/dist/types/vue-data-ui.d.ts +77 -0
  71. package/dist/types/vue-ui-circle-pack.d.ts +12 -0
  72. package/dist/{useConfig-Bc9KHPF4.js → useConfig-nXlOKvBq.js} +29 -2
  73. package/dist/{useObjectBindings-BvfJ3hRY.js → useObjectBindings-SXpt83LZ.js} +2 -2
  74. package/dist/utils.js +1 -1
  75. package/dist/{vue-data-ui-sGqoT3c9.js → vue-data-ui-DxDDhG_Z.js} +67 -67
  76. package/dist/vue-data-ui.js +68 -68
  77. package/dist/{vue-ui-3d-bar-C3hPjSrg.js → vue-ui-3d-bar-Dkpnduj2.js} +2 -2
  78. package/dist/{vue-ui-accordion-DX5HeXF5.js → vue-ui-accordion-CWXbkzsg.js} +1 -1
  79. package/dist/{vue-ui-age-pyramid-GGrD4IEh.js → vue-ui-age-pyramid-YRzKi3YZ.js} +2 -2
  80. package/dist/{vue-ui-annotator-CQ_CYhzf.js → vue-ui-annotator-C6MknYlp.js} +2 -2
  81. package/dist/{vue-ui-bullet-DtrCqmnf.js → vue-ui-bullet--e6wu_eV.js} +2 -2
  82. package/dist/{vue-ui-bump-x1u4Tz4C.js → vue-ui-bump-k2AwGC59.js} +2 -2
  83. package/dist/{vue-ui-candlestick-CKUDQebI.js → vue-ui-candlestick-BVmiu7I8.js} +2 -2
  84. package/dist/{vue-ui-carousel-table-DgIS8XIx.js → vue-ui-carousel-table-CDYCZkJe.js} +2 -2
  85. package/dist/{vue-ui-chestnut-DH0Ao100.js → vue-ui-chestnut-CoPll4kt.js} +2 -2
  86. package/dist/{vue-ui-chord-DKIblwCg.js → vue-ui-chord-Zxza5Lek.js} +2 -2
  87. package/dist/vue-ui-circle-pack-CGss-GQ3.js +1596 -0
  88. package/dist/{vue-ui-cursor-BPS6jUrO.js → vue-ui-cursor-g1ARqBdZ.js} +2 -2
  89. package/dist/{vue-ui-dag-DxpIAmJq.js → vue-ui-dag-C_APXc5p.js} +2 -2
  90. package/dist/{vue-ui-dashboard-CVLuS3tw.js → vue-ui-dashboard-WaoHmE2e.js} +65 -65
  91. package/dist/{vue-ui-digits-CBjh1slE.js → vue-ui-digits-B6B0VxQN.js} +2 -2
  92. package/dist/{vue-ui-donut-D07k4eg8.js → vue-ui-donut-C9DqiLiv.js} +2 -2
  93. package/dist/{vue-ui-donut-evolution-Dpm9YUOj.js → vue-ui-donut-evolution-Bk8wqv1D.js} +2 -2
  94. package/dist/{vue-ui-dumbbell-D_4zIeyv.js → vue-ui-dumbbell-DFXC67IB.js} +2 -2
  95. package/dist/{vue-ui-flow-Zy3rBFZi.js → vue-ui-flow-nyqdaw6K.js} +2 -2
  96. package/dist/{vue-ui-funnel-hr5juV4V.js → vue-ui-funnel-AWd3vkNN.js} +2 -2
  97. package/dist/{vue-ui-galaxy-CdELCFAd.js → vue-ui-galaxy-9fc9Hd8V.js} +2 -2
  98. package/dist/{vue-ui-gauge-BLzmjcQD.js → vue-ui-gauge-CWFeHBud.js} +2 -2
  99. package/dist/{vue-ui-geo-BChbk2Hg.js → vue-ui-geo-Dmzbrvxi.js} +2 -2
  100. package/dist/{vue-ui-gizmo-rGmWdhBQ.js → vue-ui-gizmo-C7-ia7Qj.js} +2 -2
  101. package/dist/{vue-ui-heatmap-BkemBgrx.js → vue-ui-heatmap-u70d0SIw.js} +3 -3
  102. package/dist/{vue-ui-history-plot-DtRwG20f.js → vue-ui-history-plot-CAyTp6g-.js} +2 -2
  103. package/dist/{vue-ui-horizontal-bar-v8JHlakm.js → vue-ui-horizontal-bar-BwLGyJym.js} +3 -3
  104. package/dist/{vue-ui-kpi-CbYGRjw6.js → vue-ui-kpi-C3y5-BRC.js} +2 -2
  105. package/dist/{vue-ui-mini-loader-CINjHFmm.js → vue-ui-mini-loader-B-4A16WA.js} +1 -1
  106. package/dist/{vue-ui-molecule-D-J2pWsN.js → vue-ui-molecule-DHdJBIhR.js} +5 -4
  107. package/dist/{vue-ui-mood-radar-CdRxxk0n.js → vue-ui-mood-radar-3rQ3seXn.js} +2 -2
  108. package/dist/{vue-ui-nested-donuts-Cz7EHVyx.js → vue-ui-nested-donuts-CkyNVcNS.js} +2 -2
  109. package/dist/{vue-ui-onion-CO8p1JTi.js → vue-ui-onion-BRS0F7vR.js} +2 -2
  110. package/dist/{vue-ui-parallel-coordinate-plot-r2k875_U.js → vue-ui-parallel-coordinate-plot-CK2ZUlSw.js} +2 -2
  111. package/dist/{vue-ui-quadrant-BAvO1Glx.js → vue-ui-quadrant-Cj2KV_z7.js} +2 -2
  112. package/dist/{vue-ui-quick-chart-Dnp1rtbG.js → vue-ui-quick-chart-Bhr12oH8.js} +2 -2
  113. package/dist/{vue-ui-radar-BrxOXNdC.js → vue-ui-radar-DnOyaQkz.js} +2 -2
  114. package/dist/{vue-ui-rating-BFfT2Pqg.js → vue-ui-rating-BJ9v9H9k.js} +1 -1
  115. package/dist/{vue-ui-relation-circle-CbC71cfl.js → vue-ui-relation-circle-u9QEc8ee.js} +2 -2
  116. package/dist/{vue-ui-ridgeline-cOTWhQj-.js → vue-ui-ridgeline-DYTp5R9J.js} +2 -2
  117. package/dist/{vue-ui-rings-CRrBrqta.js → vue-ui-rings-ClYcK_nn.js} +2 -2
  118. package/dist/{vue-ui-scatter-DuHuJOUV.js → vue-ui-scatter-D0SU1o_K.js} +2 -2
  119. package/dist/{vue-ui-skeleton-Csp41587.js → vue-ui-skeleton-8lXnB1kN.js} +2 -2
  120. package/dist/{vue-ui-smiley-DEXO-F37.js → vue-ui-smiley-XGOYNEOl.js} +1 -1
  121. package/dist/{vue-ui-spark-trend-pqdjH6Xm.js → vue-ui-spark-trend-BSpJpbES.js} +2 -2
  122. package/dist/{vue-ui-sparkbar-C-X2phQ7.js → vue-ui-sparkbar-DNDThOca.js} +2 -2
  123. package/dist/{vue-ui-sparkgauge-Dh1N1yEe.js → vue-ui-sparkgauge-yWuiAETN.js} +2 -2
  124. package/dist/{vue-ui-sparkhistogram-D-fkk68G.js → vue-ui-sparkhistogram-BDBECsRm.js} +2 -2
  125. package/dist/{vue-ui-sparkline-DE8Z8Ciy.js → vue-ui-sparkline-CuYL1Whh.js} +210 -206
  126. package/dist/{vue-ui-sparkstackbar-CVx0Bd7_.js → vue-ui-sparkstackbar-22TzSWXm.js} +2 -2
  127. package/dist/{vue-ui-stackbar-DiIJJhri.js → vue-ui-stackbar-DUVQRjp6.js} +2 -2
  128. package/dist/{vue-ui-stackline-C9EzEmfc.js → vue-ui-stackline-J0R-RjHc.js} +2 -2
  129. package/dist/{vue-ui-strip-plot-jMZRbtW9.js → vue-ui-strip-plot-CZtkOhgu.js} +2 -2
  130. package/dist/{vue-ui-table-BQu89RtZ.js → vue-ui-table-DLPvMKgy.js} +3 -3
  131. package/dist/{vue-ui-table-heatmap-BUtctJvL.js → vue-ui-table-heatmap-CjSOXgXq.js} +1 -1
  132. package/dist/{vue-ui-table-sparkline-glnC8X0z.js → vue-ui-table-sparkline-DOzz3o1m.js} +2 -2
  133. package/dist/{vue-ui-thermometer-DtRXXI_M.js → vue-ui-thermometer-Bfqbd1ax.js} +2 -2
  134. package/dist/{vue-ui-timer-PNQOfSZO.js → vue-ui-timer-D0-TQScN.js} +2 -2
  135. package/dist/{vue-ui-tiremarks-BiUnlf_f.js → vue-ui-tiremarks-BVSRY8Gj.js} +2 -2
  136. package/dist/{vue-ui-treemap-Dz8-KYZ-.js → vue-ui-treemap-DH06-VQ7.js} +2 -2
  137. package/dist/{vue-ui-waffle-CGNSkRrU.js → vue-ui-waffle-CerCRZ-W.js} +2 -2
  138. package/dist/{vue-ui-wheel-B58ts6kX.js → vue-ui-wheel-B1lApEvE.js} +2 -2
  139. package/dist/{vue-ui-word-cloud-DXx7rzvb.js → vue-ui-word-cloud-B_NoJE4l.js} +2 -2
  140. package/dist/{vue-ui-world-DMNizkIB.js → vue-ui-world-CI3t1Fim.js} +2 -2
  141. package/dist/{vue-ui-xy-canvas-CO5nY0eA.js → vue-ui-xy-canvas-QZ0PIIIj.js} +2 -2
  142. package/dist/{vue-ui-xy-BnRvI9E8.js → vue-ui-xy-xLZXDH_8.js} +3 -3
  143. package/dist/{vue_ui_circle_pack-DBKz_Fi_.js → vue_ui_circle_pack-FjH0ZQeb.js} +42 -0
  144. package/package.json +1 -1
  145. package/dist/vue-ui-circle-pack-CY6Q5PYZ.js +0 -1183
@@ -0,0 +1,1596 @@
1
+ import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
2
+ import { G as t, H as n, It as r, J as i, Lt as a, S as o, St as s, Tt as c, W as l, X as u, i as d, pt as f, r as p, t as m, x as h, y as g, yt as ee, z as te, zt as ne } from "./lib-BkiwukKO.js";
3
+ import { t as re } from "./useConfig-nXlOKvBq.js";
4
+ import { t as ie } from "./usePrinter-X0yWOynH.js";
5
+ import { n as ae, t as oe } from "./BaseScanner-C7dmAref.js";
6
+ import { t as se } from "./useSvgExport-Dtu973wa.js";
7
+ import { t as ce } from "./useNestedProp-Ck4hsrpu.js";
8
+ import { t as le } from "./useThemeCheck-rFK9Zlb_.js";
9
+ import { t as ue } from "./img-BjOr008R.js";
10
+ import { n as de } from "./Title-__gWq2g6.js";
11
+ import { t as fe } from "./_plugin-vue_export-helper-Dq1MygBL.js";
12
+ import { c as pe } from "./canvas-lib-DTaADQOK.js";
13
+ import { t as me } from "./useResponsive-CrAInupd.js";
14
+ import { t as he } from "./A11yDataTable-q2-8fSlJ.js";
15
+ import { t as ge } from "./useUserOptionState-CjPJPTg2.js";
16
+ import { t as _e } from "./useChartAccessibility-Do37qcw2.js";
17
+ import { t as ve } from "./usePanZoom-B-4M_gmY.js";
18
+ import { t as ye } from "./vue_ui_circle_pack-FjH0ZQeb.js";
19
+ import { Fragment as _, computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createSlots as be, createTextVNode as xe, createVNode as Se, defineAsyncComponent as C, guardReactiveProps as w, mergeProps as Ce, nextTick as we, normalizeClass as Te, normalizeProps as T, normalizeStyle as E, onBeforeUnmount as Ee, onMounted as De, openBlock as D, ref as O, renderList as Oe, renderSlot as k, resolveDynamicComponent as ke, toDisplayString as A, toRefs as Ae, unref as j, useCssVars as je, watch as Me, withCtx as M } from "vue";
20
+ //#region src/packCircles.js
21
+ function Ne(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 Pe(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 Fe(e, t, n) {
35
+ let r = Pe, 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 Le(e, n, t), e;
41
+ Ie(o, a, s = e[2]), a = new We(a), o = new We(o), s = new We(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
+ Ie(a._, o._, s = e[c]), s = new We(s);
44
+ let i = o.next, l = a.previous, u = o._.r, d = a._.r;
45
+ do
46
+ if (u <= d) {
47
+ if (N(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 (N(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 Le(e, n, t), Be(e, n, t), e;
69
+ }
70
+ function Ie(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 N(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 Le(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
+ Re(r, a, s, e, n) && (r.x = a, r.y = s, t = !0);
95
+ }
96
+ if (ze(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 Re(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 && N(e, t)) return e.x = i, e.y = a, !1;
105
+ return e.x = i, e.y = a, !0;
106
+ }
107
+ function ze(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 Be(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 = Ve(i, e.slice(0, r), t, n);
125
+ a && (i.x = a.x, i.y = a.y);
126
+ }
127
+ }
128
+ function Ve(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 = He(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 (!P(s, t)) continue;
141
+ let c = Ue(s, t, n, r);
142
+ c < a && (a = c, i = o);
143
+ }
144
+ }
145
+ return i;
146
+ }
147
+ function He(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, ee = f * d;
153
+ return [{
154
+ x: m + g,
155
+ y: h + ee
156
+ }, {
157
+ x: m - g,
158
+ y: h - ee
159
+ }];
160
+ }
161
+ function P(e, t) {
162
+ for (let n of t) if (N(n, e)) return !1;
163
+ return !0;
164
+ }
165
+ function Ue(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 We = class {
176
+ constructor(e) {
177
+ this._ = e, this.next = null, this.previous = null;
178
+ }
179
+ }, Ge = /* @__PURE__ */ e({ default: () => gt }), Ke = ["id"], qe = ["id"], Je = [
180
+ "xmlns",
181
+ "aria-describedby",
182
+ "viewBox"
183
+ ], Ye = [
184
+ "x",
185
+ "y",
186
+ "width",
187
+ "height"
188
+ ], Xe = ["id"], Ze = ["stop-color"], Qe = ["stop-color"], $e = ["stop-color"], et = { key: 0 }, tt = [
189
+ "x",
190
+ "y",
191
+ "width",
192
+ "height",
193
+ "stroke",
194
+ "stroke-width",
195
+ "fill",
196
+ "rx",
197
+ "onMouseenter",
198
+ "onMouseout",
199
+ "onClick"
200
+ ], nt = [
201
+ "x",
202
+ "y",
203
+ "width",
204
+ "height",
205
+ "stroke",
206
+ "stroke-width",
207
+ "fill",
208
+ "rx"
209
+ ], rt = [
210
+ "x",
211
+ "y",
212
+ "width",
213
+ "height",
214
+ "fill",
215
+ "rx"
216
+ ], it = [
217
+ "x",
218
+ "y",
219
+ "font-size",
220
+ "fill",
221
+ "font-weight"
222
+ ], at = [
223
+ "x",
224
+ "y",
225
+ "font-size",
226
+ "fill",
227
+ "font-weight"
228
+ ], ot = {
229
+ key: 1,
230
+ style: { pointerEvents: "none" }
231
+ }, st = [
232
+ "x1",
233
+ "y1",
234
+ "x2",
235
+ "y2",
236
+ "stroke",
237
+ "stroke-width",
238
+ "stroke-dasharray",
239
+ "opacity"
240
+ ], ct = [
241
+ "x",
242
+ "y",
243
+ "width",
244
+ "height",
245
+ "rx",
246
+ "fill",
247
+ "stroke",
248
+ "stroke-width",
249
+ "filter"
250
+ ], lt = [
251
+ "cx",
252
+ "cy",
253
+ "r",
254
+ "fill"
255
+ ], ut = [
256
+ "x",
257
+ "y",
258
+ "font-size",
259
+ "fill",
260
+ "font-family"
261
+ ], dt = ["x", "dy"], ft = {
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
+ }, pt = {
272
+ key: 5,
273
+ class: "vue-data-ui-watermark"
274
+ }, mt = {
275
+ key: 6,
276
+ "data-dom-to-png-ignore": "",
277
+ class: "reset-wrapper"
278
+ }, ht = ["innerHTML"], gt = /* @__PURE__ */ fe({
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: fe, emit: Pe }) {
296
+ je((e) => ({ v1d300711: ir.value }));
297
+ let Ie = C(() => import("./Tooltip-B7lmdbac.js")), N = C(() => import("./BaseIcon-CEmt3Ifx.js").then((e) => e.n)), Le = C(() => import("./vue-ui-accordion-CWXbkzsg.js").then((e) => e.n)), Re = C(() => import("./DataTable-BvDJEAma.js")), ze = C(() => import("./UserOptions-DMw8EZEo.js").then((e) => e.n)), Be = C(() => import("./PenAndPaper-DwpL8Z0l.js").then((e) => e.t)), Ve = C(() => import("./PackageVersion-D5dkifa6.js").then((e) => e.t)), He = C(() => import("./BaseDraggableDialog-BQcmQAK5.js").then((e) => e.n)), P = e, Ue = Pe, { vue_ui_circle_pack: We } = re(), { isThemeValid: Ge, warnInvalidTheme: gt } = le(), _t = v(() => !!P.dataset && P.dataset.length), F = O(n()), I = O(null), vt = O(null), yt = O(null), bt = O(0), xt = O(0), St = O(0), Ct = O(null), L = O(null), wt = O(null), Tt = O(!1), Et = O(""), R = O(null), Dt = O(!1), Ot = O(!1), z = O(null), kt = O({
298
+ x: 0,
299
+ y: 0
300
+ }), At = O("pointer"), jt = O(!1), B = O(Rt()), V = v(() => B.value.userOptions.useCursorPointer), Mt = v(() => ne({
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: B.value.skeletonConfig ?? {}
316
+ })), { loading: Nt, FINAL_DATASET: Pt } = ae({
317
+ ...Ae(P),
318
+ FINAL_CONFIG: B,
319
+ prepareConfig: Rt,
320
+ skeletonDataset: P.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: ne({
353
+ defaultConfig: B.value,
354
+ userConfig: Mt.value
355
+ })
356
+ }), { svgRef: H } = _e({ config: B.value.style.chart.title }), { userOptionsVisible: Ft, setUserOptionsVisibility: It, keepUserOptionState: Lt } = ge({ config: B.value });
357
+ function Rt() {
358
+ let e = ce({
359
+ userConfig: P.config,
360
+ defaultConfig: We
361
+ }), t = e.theme;
362
+ if (!t) return e;
363
+ if (!Ge.value(e)) return gt(e), e;
364
+ let n = ce({
365
+ userConfig: ye[t] || P.config,
366
+ defaultConfig: e
367
+ }), r = ce({
368
+ userConfig: P.config,
369
+ defaultConfig: n
370
+ });
371
+ return {
372
+ ...r,
373
+ customPalette: r.customPalette.length ? r.customPalette : a[t] || c
374
+ };
375
+ }
376
+ Me(() => P.config, (e) => {
377
+ B.value = Rt(), Ft.value = !B.value.userOptions.showOnChartHover, sn(), bt.value += 1, xt.value += 1, U.value.showTable = B.value.table.show, U.value.showTooltip = B.value.style.chart.tooltip.show, U.value.showZoom = B.value.style.chart.zoom?.show ?? !1;
378
+ }, { deep: !0 });
379
+ let { isPrinting: zt, isImaging: Bt, generatePdf: Vt, generateImage: Ht } = ie({
380
+ elementId: `vue-ui-circle-pack_${F.value}`,
381
+ fileName: B.value.style.chart.title.text || "vue-ui-circle-pack",
382
+ options: B.value.userOptions.print
383
+ }), Ut = v(() => B.value.userOptions.show && !B.value.style.chart.title.text), U = O({
384
+ showTable: B.value.table.show,
385
+ showTooltip: B.value.style.chart.tooltip.show,
386
+ showZoom: B.value.style.chart.zoom?.show ?? !1
387
+ });
388
+ Me(B, () => {
389
+ U.value = {
390
+ showTable: B.value.table.show,
391
+ showTooltip: B.value.style.chart.tooltip.show,
392
+ showZoom: B.value.style.chart.zoom?.show ?? !1
393
+ };
394
+ }, { immediate: !0 });
395
+ let W = O({
396
+ h: 10,
397
+ w: 10
398
+ }), Wt = O([
399
+ 0,
400
+ 0,
401
+ 100,
402
+ 100
403
+ ]), Gt = v(() => B.value.debug), Kt = v(() => {
404
+ let e = B.value.style?.chart || {};
405
+ return e.dimensions && typeof e.dimensions.width == "number" ? e.dimensions.width : typeof e.width == "number" ? e.width : 300;
406
+ }), qt = v(() => {
407
+ let e = B.value.style?.chart || {};
408
+ return e.dimensions && typeof e.dimensions.height == "number" ? e.dimensions.height : typeof e.height == "number" ? e.height : 300;
409
+ }), G = O([]), K = O([]), q = O(null), J = O(null);
410
+ function Jt(e, t) {
411
+ W.value = {
412
+ w: e,
413
+ h: t
414
+ };
415
+ let n = Y.value.map(Yt);
416
+ if (!n.length) {
417
+ let n = {
418
+ x: 0,
419
+ y: 0,
420
+ width: e,
421
+ height: t
422
+ };
423
+ G.value = [], K.value = [], Wt.value = [
424
+ n.x,
425
+ n.y,
426
+ n.width,
427
+ n.height
428
+ ], Cn(n);
429
+ return;
430
+ }
431
+ let r = Fe(n, t, e), [i, a, o, s] = Ne(r, 1), c = Math.min(o ? e / o : 1, s ? t / s : 1), l = (e - o * c) / 2, u = (t - s * c) / 2;
432
+ G.value = tn(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
+ }))), K.value = G.value;
438
+ let d = Nn({
439
+ x: 0,
440
+ y: 0,
441
+ width: e,
442
+ height: t
443
+ });
444
+ Wt.value = [
445
+ d.x,
446
+ d.y,
447
+ d.width,
448
+ d.height
449
+ ], Cn(d);
450
+ }
451
+ function Yt(e) {
452
+ return {
453
+ ...e,
454
+ children: Array.isArray(e.children) ? e.children.map(Yt) : []
455
+ };
456
+ }
457
+ function Xt(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 + Xt(t), 0) : 0;
460
+ }
461
+ function Zt(e, t) {
462
+ let n = a[B.value.theme || "default"] || c, r = cn.value.length ? cn.value : n.length ? n : c;
463
+ return g(e.color) || r[t % r.length] || c[t % c.length];
464
+ }
465
+ function Qt(e) {
466
+ return !Array.isArray(e.children) || !e.children.length ? 1 : e.children.reduce((e, t) => e + Qt(t), 0);
467
+ }
468
+ function $t(e, t = null, r = 0, i = []) {
469
+ return Array.isArray(e) ? e.map((e, a) => {
470
+ let o = Xt(e);
471
+ if (!Number.isFinite(o) || o <= 0) return null;
472
+ let s = n(), c = [...i, a], l = c.reduce((e, t, n) => e + t + n, 0), u = e.color || t?.color ? g(e.color || t?.color) : Zt(e, l), d = $t(e.children, {
473
+ id: s,
474
+ name: e.name,
475
+ color: u,
476
+ rootId: t?.rootId ?? s
477
+ }, r + 1, c);
478
+ return {
479
+ ...e,
480
+ value: o,
481
+ r: o,
482
+ id: s,
483
+ color: u,
484
+ depth: r,
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 ? Qt({ children: d }) : 1,
491
+ hierarchyPath: c,
492
+ children: d
493
+ };
494
+ }).filter(Boolean) : [];
495
+ }
496
+ function en(e) {
497
+ if (!Array.isArray(e.children) || !e.children.length) return [];
498
+ let t = e.r * 2;
499
+ if (!t) return [];
500
+ let n = Fe(e.children.map(Yt), t, t), [r, i, a, o] = Ne(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 tn(e) {
509
+ let t = [];
510
+ return e.forEach((e) => {
511
+ let n = en(e);
512
+ t.push({
513
+ ...e,
514
+ children: n
515
+ }), t.push(...tn(n));
516
+ }), t;
517
+ }
518
+ function nn(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 rn(e) {
522
+ return e.hasChildren ? B.value.style.chart.circles.labels.parents.show : B.value.style.chart.circles.labels.children.show;
523
+ }
524
+ function an() {
525
+ if (!B.value.responsive || !I.value) return;
526
+ let e = pe(() => {
527
+ let { width: e, height: t } = me({
528
+ chart: I.value,
529
+ title: B.value.style.chart.title.text ? vt.value : null,
530
+ legend: null,
531
+ source: Ct.value,
532
+ noTitle: yt.value
533
+ });
534
+ requestAnimationFrame(() => {
535
+ !e || !t || (H.value && (H.value.setAttribute("width", e), H.value.setAttribute("height", t)), Jt(e, t));
536
+ });
537
+ });
538
+ q.value && (J.value && q.value.unobserve(J.value), q.value.disconnect()), q.value = new ResizeObserver(e), J.value = I.value.parentNode || I.value, J.value && q.value.observe(J.value), e();
539
+ }
540
+ function on() {
541
+ q.value && (J.value && q.value.unobserve(J.value), q.value.disconnect(), q.value = null, J.value = null);
542
+ }
543
+ async function sn() {
544
+ s(P.dataset) && u({
545
+ componentName: "VueUiCirclePack",
546
+ type: "dataset",
547
+ debug: Gt.value
548
+ });
549
+ let e = Kt.value, t = qt.value;
550
+ Jt(e, t), B.value.responsive ? an() : on();
551
+ }
552
+ De(sn), Ee(() => {
553
+ on();
554
+ }), Me(() => Pt.value, async (e) => {
555
+ await sn();
556
+ }, { deep: !0 });
557
+ let cn = v(() => h(B.value.customPalette)), Y = v(() => $t(Pt.value)), ln = v(() => G.value.length ? Math.max(...G.value.map((e) => e.r)) : 0);
558
+ function un(e, t) {
559
+ return ln.value ? t / ln.value * e : 0;
560
+ }
561
+ function dn(e, t) {
562
+ B.value.events.datapointLeave && B.value.events.datapointLeave({
563
+ datapoint: e,
564
+ seriesIndex: t
565
+ }), !(At.value === "keyboard" && R.value?.id === e?.id) && (Tt.value = !1, R.value = null, z.value = null, At.value = "pointer");
566
+ }
567
+ function fn(e, t) {
568
+ Ue("selectDatapoint", e), B.value.events.datapointClick && B.value.events.datapointClick({
569
+ datapoint: e,
570
+ seriesIndex: t
571
+ });
572
+ }
573
+ let pn = O(null), mn = O(!1);
574
+ function hn(e, t, n = "pointer") {
575
+ R.value = e, z.value = t, At.value = n, B.value.events.datapointEnter && B.value.events.datapointEnter({
576
+ datapoint: e,
577
+ seriesIndex: t
578
+ }), pn.value = {
579
+ datapoint: e,
580
+ seriesIndex: t,
581
+ config: B.value,
582
+ series: K.value
583
+ }, Tt.value = !0;
584
+ let r = B.value.style.chart.tooltip.customFormat;
585
+ if (mn.value = !1, f(r)) try {
586
+ let n = r({
587
+ seriesIndex: t,
588
+ datapoint: e,
589
+ series: K.value,
590
+ config: B.value
591
+ });
592
+ typeof n == "string" && (Et.value = n, mn.value = !0);
593
+ } catch {
594
+ console.warn("Custom format cannot be applied."), mn.value = !1;
595
+ }
596
+ if (!mn.value) {
597
+ let t = "";
598
+ t += `
599
+ <div style="display:flex;align-items:center;gap:4px;">
600
+ <svg viewBox="0 0 10 10" height="${B.value.style.chart.tooltip.fontSize}" width="${B.value.style.chart.tooltip.fontSize}">
601
+ <circle
602
+ cx="5"
603
+ cy="5"
604
+ r="5"
605
+ fill="${B.value.style.chart.circles.gradient.show ? `url(#${e.id})` : e.color}"
606
+ />
607
+ </svg>
608
+ <span>${e.name}: <b>${gn(e)}</b></span>
609
+ </div>
610
+ `, Et.value = t;
611
+ }
612
+ }
613
+ function gn(e) {
614
+ return d(B.value.style.chart.circles.labels.value.formatter, e.value, t({
615
+ p: B.value.style.chart.circles.labels.value.prefix,
616
+ v: e.value,
617
+ s: B.value.style.chart.circles.labels.value.suffix,
618
+ r: B.value.style.chart.circles.labels.value.rounding
619
+ }));
620
+ }
621
+ function _n(e) {
622
+ if (!e) return 0;
623
+ let t = gn(e), n = e.r / (t.length || 1) * (t.length === 1 ? 1 : 2);
624
+ return Math.min(e.r / 2.5, n);
625
+ }
626
+ let X = O(!1);
627
+ function vn(e) {
628
+ X.value = e, St.value += 1;
629
+ }
630
+ let Z = O(!1);
631
+ function yn() {
632
+ Z.value = !Z.value;
633
+ }
634
+ let bn = v(() => !Z.value && U.value.showZoom), { viewBox: Q, resetZoom: xn, isZoom: Sn, setInitialViewBox: Cn } = ve(H, {
635
+ x: 0,
636
+ y: 0,
637
+ width: Math.max(10, W.value.w),
638
+ height: Math.max(10, W.value.h)
639
+ }, B.value.style.chart.zoom?.speed ?? 1, bn);
640
+ function wn(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 Tn(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 En(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 Dn(e) {
656
+ let t = [e.name];
657
+ return B.value.style.chart.circles.labels.value.show && t.push(gn(e)), t.filter(Boolean);
658
+ }
659
+ function On(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 kn(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 An(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 jn(e, t = {}) {
759
+ let { clamp: n = !0 } = t;
760
+ if (!G.value.length || !W.value.w || !W.value.h || !B.value.style.chart.parentTooltips.show) return [];
761
+ let r = Math.max(8, B.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(G.value.map((e) => [e.id, e]));
771
+ return G.value.filter((e) => e.hasChildren && e.name).sort((e, t) => t.r - e.r).forEach((t) => {
772
+ 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) => {
773
+ let r = n ? En({
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) => wn(e, t, c)) ? !1 : !G.value.some((t) => Tn(e, t, c)));
792
+ ne && u.push({
793
+ ...ne,
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 Mn = v(() => jn(Q.value, { clamp: !0 }));
806
+ function Nn(e) {
807
+ let t = jn(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 Pn(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 Fn = v(() => {
833
+ let e = Pn(Y.value);
834
+ return {
835
+ head: K.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
+ }), In = v(() => Pn(Y.value).map((e) => ({
844
+ ...e,
845
+ name: `${"- ".repeat(e.depth)}${e.name}`
846
+ })));
847
+ function Ln(e = null) {
848
+ we(() => {
849
+ let t = In.value.map((e) => [
850
+ [e.name],
851
+ [e.parentName || ""],
852
+ [e.depth],
853
+ [e.value]
854
+ ]), n = o([
855
+ [B.value.style.chart.title.text],
856
+ [B.value.style.chart.title.subtitle.text],
857
+ [
858
+ [B.value.table.columnNames.datapoint],
859
+ ["Parent"],
860
+ ["Depth"],
861
+ [B.value.table.columnNames.value]
862
+ ]
863
+ ].concat(t));
864
+ e ? e(n) : i({
865
+ csvContent: n,
866
+ title: B.value.style.chart.title.text || "vue-ui-circle-pack"
867
+ });
868
+ });
869
+ }
870
+ let $ = v(() => {
871
+ let e = [
872
+ B.value.table.columnNames.datapoint,
873
+ B.value.table.columnNames.parent,
874
+ B.value.table.columnNames.depth,
875
+ B.value.table.columnNames.value
876
+ ], n = Fn.value.hierarchy.map((e) => {
877
+ let n = t({
878
+ p: B.value.style.chart.circles.labels.value.prefix,
879
+ v: e.value,
880
+ s: B.value.style.chart.circles.labels.value.suffix,
881
+ r: B.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
+ n
891
+ ];
892
+ }), r = {
893
+ th: {
894
+ backgroundColor: B.value.table.th.backgroundColor,
895
+ color: B.value.table.th.color,
896
+ outline: B.value.table.th.outline
897
+ },
898
+ td: {
899
+ backgroundColor: B.value.table.td.backgroundColor,
900
+ color: B.value.table.td.color,
901
+ outline: B.value.table.td.outline
902
+ },
903
+ breakpoint: B.value.table.responsiveBreakpoint
904
+ };
905
+ return {
906
+ colNames: [
907
+ B.value.table.columnNames.datapoint,
908
+ B.value.table.columnNames.parent,
909
+ B.value.table.columnNames.depth,
910
+ B.value.table.columnNames.value
911
+ ],
912
+ head: e,
913
+ body: n,
914
+ config: r
915
+ };
916
+ });
917
+ function Rn() {
918
+ U.value.showTable = !U.value.showTable;
919
+ }
920
+ function zn() {
921
+ U.value.showTooltip = !U.value.showTooltip;
922
+ }
923
+ function Bn() {
924
+ U.value.showZoom = !U.value.showZoom;
925
+ }
926
+ function Vn() {
927
+ return Y.value;
928
+ }
929
+ async function Hn({ scale: e = 2 } = {}) {
930
+ if (!I.value) return;
931
+ let { width: t, height: n } = I.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await ue({
932
+ domElement: I.value,
933
+ base64: !0,
934
+ img: !0,
935
+ scale: e
936
+ });
937
+ return {
938
+ imageUri: i,
939
+ base64: a,
940
+ title: B.value.style.chart.title.text,
941
+ width: t,
942
+ height: n,
943
+ aspectRatio: r
944
+ };
945
+ }
946
+ let Un = v(() => {
947
+ let e = B.value.table.useDialog && !B.value.table.show, t = U.value.showTable;
948
+ return {
949
+ component: e ? He : Le,
950
+ title: `${B.value.style.chart.title.text}${B.value.style.chart.title.subtitle.text ? `: ${B.value.style.chart.title.subtitle.text}` : ""}`,
951
+ props: e ? {
952
+ backgroundColor: B.value.table.th.backgroundColor,
953
+ color: B.value.table.th.color,
954
+ headerColor: B.value.table.th.color,
955
+ headerBg: B.value.table.th.backgroundColor,
956
+ isFullscreen: X.value,
957
+ fullscreenParent: I.value,
958
+ forcedWidth: Math.min(500, window.innerWidth * .8),
959
+ isCursorPointer: V.value
960
+ } : {
961
+ hideDetails: !0,
962
+ config: {
963
+ open: t,
964
+ maxHeight: 1e4,
965
+ body: {
966
+ backgroundColor: B.value.style.chart.backgroundColor,
967
+ color: B.value.style.chart.color
968
+ },
969
+ head: {
970
+ backgroundColor: B.value.style.chart.backgroundColor,
971
+ color: B.value.style.chart.color
972
+ }
973
+ }
974
+ }
975
+ };
976
+ });
977
+ Me(() => U.value.showTable, (e) => {
978
+ B.value.table.show || (e && B.value.table.useDialog && L.value ? L.value.open() : L.value && "close" in L.value && L.value.close());
979
+ });
980
+ function Wn() {
981
+ U.value.showTable = !1, wt.value && wt.value.setTableIconState(!1);
982
+ }
983
+ let Gn = v(() => B.value.style.chart.backgroundColor), { exportSvg: Kn, getSvg: qn } = se({
984
+ svg: H,
985
+ title: v(() => B.value.style.chart.title),
986
+ backgroundColor: Gn
987
+ });
988
+ async function Jn({ isCb: e }) {
989
+ Ot.value = !0, await we();
990
+ try {
991
+ if (e) {
992
+ let { blob: e, url: t, text: n, dataUrl: r } = await qn();
993
+ await Promise.resolve(B.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
+ Ot.value = !1;
1002
+ }
1003
+ }
1004
+ function Yn(e) {
1005
+ if (e?.stage === "start") {
1006
+ Dt.value = !0;
1007
+ return;
1008
+ }
1009
+ if (e?.stage === "end") {
1010
+ Dt.value = !1;
1011
+ return;
1012
+ }
1013
+ Ht();
1014
+ }
1015
+ async function Xn() {
1016
+ if (Ue("copyAlt", {
1017
+ config: B.value,
1018
+ dataset: Y.value,
1019
+ flattenedDataset: K.value
1020
+ }), !B.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(B.value.userOptions.callbacks.altCopy({
1025
+ config: B.value,
1026
+ dataset: Y.value,
1027
+ flattenedDataset: K.value
1028
+ }));
1029
+ }
1030
+ function Zn(e) {
1031
+ if (!Number.isFinite(e) || !H.value) return;
1032
+ let t = G.value[e];
1033
+ if (!t) return;
1034
+ let n = r(t.x, t.y, H.value);
1035
+ n && (kt.value = n);
1036
+ }
1037
+ function Qn() {
1038
+ if (z.value !== null) {
1039
+ let e = G.value[z.value];
1040
+ e && dn(e, z.value);
1041
+ }
1042
+ z.value = null, At.value = "pointer", Tt.value = !1, R.value = null;
1043
+ }
1044
+ function $n() {
1045
+ z.value = null, jt.value = !0;
1046
+ }
1047
+ function er() {
1048
+ Qn(), jt.value = !1;
1049
+ }
1050
+ function tr(e, t) {
1051
+ let n = G.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 (!H.value || Z.value || document.activeElement !== H.value || !G.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 (z.value === null) return;
1064
+ let e = G.value[z.value];
1065
+ if (!e) return;
1066
+ fn(e, z.value);
1067
+ return;
1068
+ }
1069
+ let a = z.value;
1070
+ a === null || a < 0 || a >= G.value.length ? a = n ? 0 : G.value.length - 1 : n ? a = tr(a, "next") : t && (a = tr(a, "previous"));
1071
+ let o = G.value[a];
1072
+ o && (z.value = a, Zn(a), hn(o, a, "keyboard"));
1073
+ }
1074
+ let rr = v(() => ({
1075
+ headers: $.value?.colNames ?? [],
1076
+ rows: $.value?.body?.map((e) => [e[0]?.name ?? "", e[1]]) ?? []
1077
+ })), ir = v(() => B.value.style.chart.color);
1078
+ return fe({
1079
+ getData: Vn,
1080
+ getImage: Hn,
1081
+ generateCsv: Ln,
1082
+ generatePdf: Vt,
1083
+ generateImage: Ht,
1084
+ generateSvg: Jn,
1085
+ toggleTable: Rn,
1086
+ toggleAnnotator: yn,
1087
+ toggleFullscreen: vn,
1088
+ copyAlt: Xn,
1089
+ toggleZoom: Bn,
1090
+ resetZoom: xn
1091
+ }), (e, t) => (D(), x("div", {
1092
+ id: `vue-ui-circle-pack_${F.value}`,
1093
+ class: Te(`vue-data-ui-component vue-ui-circle-pack ${X.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${j(Nt) ? "loading" : ""}`),
1094
+ ref_key: "circlePackChart",
1095
+ ref: I,
1096
+ style: E(`font-family:${B.value.style.fontFamily};text-align:center;background:${B.value.style.chart.backgroundColor};`),
1097
+ onMouseenter: t[2] ||= () => j(It)(!0),
1098
+ onMouseleave: t[3] ||= () => j(It)(!1)
1099
+ }, [
1100
+ S("div", {
1101
+ id: `chart-instructions-${F.value}`,
1102
+ class: "sr-only"
1103
+ }, [S("p", null, A(B.value.a11y.translations.keyboardNavigation), 1)], 8, qe),
1104
+ rr.value?.rows?.length ? (D(), y(he, {
1105
+ key: 0,
1106
+ uid: F.value,
1107
+ head: rr.value.headers,
1108
+ body: rr.value.rows,
1109
+ notice: B.value.a11y.translations.tableAvailable,
1110
+ caption: B.value.a11y.translations.tableCaption
1111
+ }, null, 8, [
1112
+ "uid",
1113
+ "head",
1114
+ "body",
1115
+ "notice",
1116
+ "caption"
1117
+ ])) : b("", !0),
1118
+ B.value.userOptions.buttons.annotator ? (D(), y(j(Be), {
1119
+ key: 1,
1120
+ svgRef: j(H),
1121
+ backgroundColor: B.value.style.chart.backgroundColor,
1122
+ color: B.value.style.chart.color,
1123
+ active: Z.value,
1124
+ scale: ln.value / 100,
1125
+ isCursorPointer: V.value,
1126
+ onClose: yn
1127
+ }, {
1128
+ "annotator-action-close": M(() => [k(e.$slots, "annotator-action-close", {}, void 0, !0)]),
1129
+ "annotator-action-color": M(({ color: t }) => [k(e.$slots, "annotator-action-color", T(w({ color: t })), void 0, !0)]),
1130
+ "annotator-action-draw": M(({ mode: t }) => [k(e.$slots, "annotator-action-draw", T(w({ mode: t })), void 0, !0)]),
1131
+ "annotator-action-undo": M(({ disabled: t }) => [k(e.$slots, "annotator-action-undo", T(w({ disabled: t })), void 0, !0)]),
1132
+ "annotator-action-redo": M(({ disabled: t }) => [k(e.$slots, "annotator-action-redo", T(w({ disabled: t })), void 0, !0)]),
1133
+ "annotator-action-delete": M(({ disabled: t }) => [k(e.$slots, "annotator-action-delete", T(w({ disabled: t })), void 0, !0)]),
1134
+ _: 3
1135
+ }, 8, [
1136
+ "svgRef",
1137
+ "backgroundColor",
1138
+ "color",
1139
+ "active",
1140
+ "scale",
1141
+ "isCursorPointer"
1142
+ ])) : b("", !0),
1143
+ k(e.$slots, "userConfig", {}, void 0, !0),
1144
+ Ut.value ? (D(), x("div", {
1145
+ key: 2,
1146
+ ref_key: "noTitle",
1147
+ ref: yt,
1148
+ class: "vue-data-ui-no-title-space",
1149
+ style: "height:36px; width: 100%;background:transparent"
1150
+ }, null, 512)) : b("", !0),
1151
+ B.value.style.chart.title.text ? (D(), x("div", {
1152
+ key: 3,
1153
+ ref_key: "chartTitle",
1154
+ ref: vt,
1155
+ style: "width:100%;background:transparent;padding-bottom:12px"
1156
+ }, [(D(), y(de, {
1157
+ key: `title_${bt.value}`,
1158
+ config: {
1159
+ title: {
1160
+ cy: "donut-div-title",
1161
+ ...B.value.style.chart.title
1162
+ },
1163
+ subtitle: {
1164
+ cy: "donut-div-subtitle",
1165
+ ...B.value.style.chart.title.subtitle
1166
+ }
1167
+ }
1168
+ }, null, 8, ["config"]))], 512)) : b("", !0),
1169
+ B.value.userOptions.show && _t.value && (j(Lt) || j(Ft)) ? (D(), y(j(ze), {
1170
+ ref_key: "userOptionsRef",
1171
+ ref: wt,
1172
+ key: `user_option_${St.value}`,
1173
+ backgroundColor: B.value.style.chart.backgroundColor,
1174
+ color: B.value.style.chart.color,
1175
+ isPrinting: j(zt),
1176
+ isImaging: j(Bt),
1177
+ uid: F.value,
1178
+ hasTooltip: B.value.userOptions.buttons.tooltip,
1179
+ isTooltip: U.value.showTooltip,
1180
+ hasLabel: !1,
1181
+ hasPdf: B.value.userOptions.buttons.pdf,
1182
+ hasImg: B.value.userOptions.buttons.img,
1183
+ hasSvg: B.value.userOptions.buttons.svg,
1184
+ hasXls: B.value.userOptions.buttons.csv,
1185
+ hasTable: B.value.userOptions.buttons.table,
1186
+ hasFullscreen: B.value.userOptions.buttons.fullscreen,
1187
+ hasAltCopy: B.value.userOptions.buttons.altCopy,
1188
+ isFullscreen: X.value,
1189
+ chartElement: I.value,
1190
+ position: B.value.userOptions.position,
1191
+ callbacks: B.value.userOptions.callbacks,
1192
+ printScale: B.value.userOptions.print.scale,
1193
+ titles: { ...B.value.userOptions.buttonTitles },
1194
+ hasAnnotator: B.value.userOptions.buttons.annotator,
1195
+ isAnnotation: Z.value,
1196
+ tableDialog: B.value.table.useDialog,
1197
+ isCursorPointer: V.value,
1198
+ hasZoom: B.value.userOptions.buttons.zoom,
1199
+ isZoom: U.value.showZoom,
1200
+ onToggleFullscreen: vn,
1201
+ onGeneratePdf: j(Vt),
1202
+ onGenerateCsv: Ln,
1203
+ onGenerateImage: Yn,
1204
+ onGenerateSvg: Jn,
1205
+ onToggleTable: Rn,
1206
+ onToggleTooltip: zn,
1207
+ onToggleAnnotator: yn,
1208
+ onToggleZoom: Bn,
1209
+ onCopyAlt: Xn,
1210
+ style: E({ visibility: j(Lt) ? j(Ft) ? "visible" : "hidden" : "visible" })
1211
+ }, be({ _: 2 }, [
1212
+ e.$slots.menuIcon ? {
1213
+ name: "menuIcon",
1214
+ fn: M(({ isOpen: t, color: n }) => [k(e.$slots, "menuIcon", T(w({
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: M(() => [k(e.$slots, "optionTooltip", {}, void 0, !0)]),
1223
+ key: "1"
1224
+ } : void 0,
1225
+ e.$slots.optionPdf ? {
1226
+ name: "optionPdf",
1227
+ fn: M(() => [k(e.$slots, "optionPdf", {}, void 0, !0)]),
1228
+ key: "2"
1229
+ } : void 0,
1230
+ e.$slots.optionCsv ? {
1231
+ name: "optionCsv",
1232
+ fn: M(() => [k(e.$slots, "optionCsv", {}, void 0, !0)]),
1233
+ key: "3"
1234
+ } : void 0,
1235
+ e.$slots.optionImg ? {
1236
+ name: "optionImg",
1237
+ fn: M(() => [k(e.$slots, "optionImg", {}, void 0, !0)]),
1238
+ key: "4"
1239
+ } : void 0,
1240
+ e.$slots.optionSvg ? {
1241
+ name: "optionSvg",
1242
+ fn: M(() => [k(e.$slots, "optionSvg", {}, void 0, !0)]),
1243
+ key: "5"
1244
+ } : void 0,
1245
+ e.$slots.optionTable ? {
1246
+ name: "optionTable",
1247
+ fn: M(() => [k(e.$slots, "optionTable", {}, void 0, !0)]),
1248
+ key: "6"
1249
+ } : void 0,
1250
+ e.$slots.optionFullscreen ? {
1251
+ name: "optionFullscreen",
1252
+ fn: M(({ toggleFullscreen: t, isFullscreen: n }) => [k(e.$slots, "optionFullscreen", T(w({
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: M(({ toggleAnnotator: t, isAnnotator: n }) => [k(e.$slots, "optionAnnotator", T(w({
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: M(({ toggleZoom: t, isZoomLocked: n }) => [k(e.$slots, "optionZoom", T(w({
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: M(({ altCopy: t }) => [k(e.$slots, "optionAltCopy", T(w({ altCopy: t })), void 0, !0)]),
1277
+ key: "10"
1278
+ } : void 0
1279
+ ]), 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),
1280
+ S("div", { class: Te({
1281
+ "vue-ui-circle-pack-svg-container": !0,
1282
+ "not-responsive": !B.value.responsive
1283
+ }) }, [(D(), x("svg", {
1284
+ ref_key: "svgRef",
1285
+ ref: H,
1286
+ xmlns: j(m),
1287
+ "aria-describedby": `chart-instructions-${F.value}`,
1288
+ viewBox: `${j(Q).x} ${j(Q).y} ${j(Q).width} ${j(Q).height}`,
1289
+ preserveAspectRatio: "xMidYMid meet",
1290
+ class: Te({
1291
+ "vue-data-ui-fullscreen--on": X.value,
1292
+ "vue-data-ui-fulscreen--off": !X.value,
1293
+ "not-responsive": !B.value.responsive
1294
+ }),
1295
+ style: E(`display:block;${B.value.responsive ? "width:100%;height:auto" : "height:100%;"};overflow:${U.value.showZoom ? "hidden" : "visible"};background:transparent;color:${B.value.style.chart.color};background:${B.value.style.chart.backgroundColor};`),
1296
+ tabindex: "0",
1297
+ onFocus: $n,
1298
+ onBlur: er,
1299
+ onKeydown: nr
1300
+ }, [
1301
+ Se(j(Ve)),
1302
+ e.$slots["chart-background"] ? (D(), x("foreignObject", {
1303
+ key: 0,
1304
+ x: j(Q).x,
1305
+ y: j(Q).y,
1306
+ width: W.value.w,
1307
+ height: W.value.h,
1308
+ style: { pointerEvents: "none" }
1309
+ }, [k(e.$slots, "chart-background", {}, void 0, !0)], 8, Ye)) : b("", !0),
1310
+ (D(!0), x(_, null, Oe(G.value, (t, n) => (D(), x(_, { key: t.id }, [
1311
+ S("defs", null, [S("radialGradient", {
1312
+ id: t.id,
1313
+ fy: "30%"
1314
+ }, [
1315
+ S("stop", {
1316
+ offset: "10%",
1317
+ "stop-color": j(ee)(t.color, B.value.style.chart.circles.gradient.intensity / 100)
1318
+ }, null, 8, Ze),
1319
+ S("stop", {
1320
+ offset: "90%",
1321
+ "stop-color": j(l)(t.color, .1)
1322
+ }, null, 8, Qe),
1323
+ S("stop", {
1324
+ offset: "100%",
1325
+ "stop-color": t.color
1326
+ }, null, 8, $e)
1327
+ ], 8, Xe)]),
1328
+ e.$slots.pattern ? (D(), x("g", et, [S("defs", null, [k(e.$slots, "pattern", Ce({ ref_for: !0 }, {
1329
+ ...t,
1330
+ patternId: `pattern_${F.value}_${t.id}`
1331
+ }), void 0, !0)])])) : b("", !0),
1332
+ S("rect", {
1333
+ x: t.x - t.r,
1334
+ y: t.y - t.r,
1335
+ width: t.r * 2,
1336
+ height: t.r * 2,
1337
+ stroke: B.value.style.chart.circles.stroke,
1338
+ "stroke-width": B.value.style.chart.circles.strokeWidth * (ln.value || 1) / 100,
1339
+ fill: B.value.style.chart.circles.gradient.show ? `url(#${t.id})` : t.color,
1340
+ rx: t.r,
1341
+ onMouseenter: (e) => hn(t, n, "pointer"),
1342
+ onMouseout: (e) => dn(t, n),
1343
+ onClick: (e) => fn(t, n)
1344
+ }, null, 40, tt),
1345
+ e.$slots.pattern ? (D(), x("rect", {
1346
+ key: 1,
1347
+ x: t.x - t.r,
1348
+ y: t.y - t.r,
1349
+ width: t.r * 2,
1350
+ height: t.r * 2,
1351
+ stroke: B.value.style.chart.circles.stroke,
1352
+ "stroke-width": B.value.style.chart.circles.strokeWidth * (ln.value || 1) / 100,
1353
+ fill: `url(#pattern_${F.value}_${t.id})`,
1354
+ rx: t.r,
1355
+ style: { pointerEvents: "none" }
1356
+ }, null, 8, nt)) : b("", !0)
1357
+ ], 64))), 128)),
1358
+ (D(!0), x(_, null, Oe(G.value, (e, t) => (D(), x(_, { key: e.id }, [e.hasChildren ? b("", !0) : (D(), x("rect", {
1359
+ key: 0,
1360
+ x: e.x - e.r,
1361
+ y: e.y - e.r,
1362
+ width: e.r * 2,
1363
+ height: e.r * 2,
1364
+ stroke: "none",
1365
+ fill: R.value && R.value.id === e.id ? B.value.style.chart.circles.gradient.show ? `url(#${e.id})` : e.color : "transparent",
1366
+ rx: e.r,
1367
+ style: E({
1368
+ filter: R.value && R.value.id === e.id ? `drop-shadow(0px 0px 6px ${B.value.style.chart.circles.selectedShadowColor})` : "none",
1369
+ opacity: +!!R.value,
1370
+ pointerEvents: "none",
1371
+ transition: "opacity 0.2s ease-in-out"
1372
+ })
1373
+ }, null, 12, rt))], 64))), 128)),
1374
+ (D(!0), x(_, null, Oe(G.value, (t, n) => (D(), x(_, { key: t.id }, [e.$slots["data-label"] && rn(t) ? k(e.$slots, "data-label", Ce({
1375
+ key: 0,
1376
+ ref_for: !0
1377
+ }, {
1378
+ ...t,
1379
+ createTSpans: j(te),
1380
+ fontSize: {
1381
+ name: t.r / 3 * B.value.style.chart.circles.labels.name.fontSizeRatio,
1382
+ value: _n(t) * B.value.style.chart.circles.labels.value.fontSizeRatio
1383
+ },
1384
+ color: B.value.style.chart.circles.labels.name.color ? B.value.style.chart.circles.labels.name.color : j(p)(t.color)
1385
+ }), void 0, !0) : (D(), x(_, { key: 1 }, [B.value.style.chart.circles.labels.name.show && t.name && rn(t) ? (D(), x("text", {
1386
+ key: 0,
1387
+ style: {
1388
+ pointerEvents: "none",
1389
+ transition: "opacity 0.2s ease-in-out"
1390
+ },
1391
+ x: t.x,
1392
+ y: t.y + un(t.r, B.value.style.chart.circles.labels.name.offsetY) - t.r / 10,
1393
+ "font-size": t.r / 3 * B.value.style.chart.circles.labels.name.fontSizeRatio,
1394
+ fill: B.value.style.chart.circles.labels.name.color === "auto" ? j(p)(t.color) : B.value.style.chart.circles.labels.name.color,
1395
+ "font-weight": B.value.style.chart.circles.labels.name.bold ? "bold" : "normal",
1396
+ "text-anchor": "middle"
1397
+ }, A(t.name), 9, it)) : b("", !0), B.value.style.chart.circles.labels.value.show && rn(t) ? (D(), x("text", {
1398
+ key: 1,
1399
+ style: {
1400
+ pointerEvents: "none",
1401
+ transition: "opacity 0.2s ease-in-out"
1402
+ },
1403
+ x: t.x,
1404
+ y: t.y + un(t.r, B.value.style.chart.circles.labels.value.offsetY) + t.r / 2.5,
1405
+ "font-size": _n(t) * B.value.style.chart.circles.labels.value.fontSizeRatio,
1406
+ fill: B.value.style.chart.circles.labels.value.color === "auto" ? j(p)(t.color) : B.value.style.chart.circles.labels.value.color,
1407
+ "font-weight": B.value.style.chart.circles.labels.value.bold ? "bold" : "normal",
1408
+ "text-anchor": "middle"
1409
+ }, A(gn(t)), 9, at)) : b("", !0)], 64)), k(e.$slots, "circle", Ce({ ref_for: !0 }, {
1410
+ ...t,
1411
+ showLabel: rn(t),
1412
+ isSelected: R.value?.id === t.id,
1413
+ isDescendantOfSelected: nn(t, R.value),
1414
+ uid: `${n}_${F.value}`
1415
+ }), void 0, !0)], 64))), 128)),
1416
+ Mn.value.length && B.value.style.chart.parentTooltips.show ? (D(), x("g", ot, [(D(!0), x(_, null, Oe(Mn.value, (t) => (D(), x("g", { key: t.id }, [
1417
+ S("line", {
1418
+ x1: t.anchorX,
1419
+ y1: t.anchorY,
1420
+ x2: t.lineX,
1421
+ y2: t.lineY,
1422
+ stroke: B.value.style.chart.parentTooltips.link.useSerieColor ? t.color : B.value.style.chart.parentTooltips.link.stroke,
1423
+ "stroke-width": B.value.style.chart.parentTooltips.link.strokeWidth,
1424
+ "stroke-linecap": "round",
1425
+ "stroke-dasharray": B.value.style.chart.parentTooltips.link.strokeDasharray,
1426
+ opacity: B.value.style.chart.parentTooltips.link.opacity
1427
+ }, null, 8, st),
1428
+ S("rect", {
1429
+ x: t.x,
1430
+ y: t.y,
1431
+ width: t.width,
1432
+ height: t.height,
1433
+ rx: Math.max(3, t.fontSize / 2.5) * B.value.style.chart.parentTooltips.borderRadiusRatio,
1434
+ fill: B.value.style.chart.parentTooltips.backgroundColor,
1435
+ stroke: B.value.style.chart.parentTooltips.useSerieColor ? t.color : B.value.style.chart.parentTooltips.stroke,
1436
+ "stroke-width": B.value.style.chart.parentTooltips.strokeWidth,
1437
+ filter: B.value.style.chart.parentTooltips.filter
1438
+ }, null, 8, ct),
1439
+ k(e.$slots, "parent-tooltip", Ce({ ref_for: !0 }, { ...t }), () => [S("circle", {
1440
+ cx: t.x + t.paddingX * 1.3,
1441
+ cy: t.y + t.paddingY + t.lineHeight / 2,
1442
+ r: t.fontSize * .35,
1443
+ fill: t.color
1444
+ }, null, 8, lt), S("text", {
1445
+ x: t.x + t.paddingX + t.fontSize,
1446
+ y: t.y + t.paddingY + t.fontSize,
1447
+ "font-size": t.fontSize,
1448
+ fill: B.value.style.chart.parentTooltips.color,
1449
+ "font-family": B.value.style.fontFamily,
1450
+ "text-anchor": "start"
1451
+ }, [(D(!0), x(_, null, Oe(t.lines, (e, n) => (D(), x("tspan", {
1452
+ key: `${t.id}_${n}`,
1453
+ x: t.x + t.paddingX + t.fontSize,
1454
+ dy: n === 0 ? 0 : t.lineHeight
1455
+ }, A(e), 9, dt))), 128))], 8, ut)], !0)
1456
+ ]))), 128))])) : b("", !0),
1457
+ k(e.$slots, "svg", { svg: {
1458
+ drawingArea: { ...j(Q) },
1459
+ width: W.value.w,
1460
+ height: W.value.h,
1461
+ isPrintingImg: j(zt) || j(Bt) || Dt.value,
1462
+ isPrintingSvg: Ot.value
1463
+ } }, void 0, !0)
1464
+ ], 46, Je)), e.$slots.hint ? (D(), x("div", ft, [k(e.$slots, "hint", T(w({
1465
+ hint: B.value.a11y.translations.keyboardNavigation,
1466
+ isVisible: jt.value
1467
+ })), void 0, !0)])) : b("", !0)], 2),
1468
+ e.$slots.watermark ? (D(), x("div", pt, [k(e.$slots, "watermark", T(w({ isPrinting: j(zt) || j(Bt) || Dt.value || Ot.value })), void 0, !0)])) : b("", !0),
1469
+ j(Sn) ? (D(), x("div", mt, [k(e.$slots, "reset-action", { reset: j(xn) }, () => [S("button", {
1470
+ "data-cy-reset": "",
1471
+ tabindex: "0",
1472
+ role: "button",
1473
+ class: "vue-data-ui-refresh-button",
1474
+ style: E({
1475
+ background: B.value.style.chart.backgroundColor,
1476
+ cursor: V.value ? "pointer" : "default"
1477
+ }),
1478
+ onClick: t[0] ||= (e) => j(xn)(!0)
1479
+ }, [Se(j(N), {
1480
+ name: "refresh",
1481
+ stroke: B.value.style.chart.color
1482
+ }, null, 8, ["stroke"])], 4)], !0)])) : b("", !0),
1483
+ e.$slots.source ? (D(), x("div", {
1484
+ key: 7,
1485
+ ref_key: "source",
1486
+ ref: Ct,
1487
+ dir: "auto"
1488
+ }, [k(e.$slots, "source", {}, void 0, !0)], 512)) : b("", !0),
1489
+ Se(j(Ie), {
1490
+ teleportTo: B.value.style.chart.tooltip.teleportTo,
1491
+ show: U.value.showTooltip && Tt.value,
1492
+ backgroundColor: B.value.style.chart.tooltip.backgroundColor,
1493
+ color: B.value.style.chart.tooltip.color,
1494
+ fontSize: B.value.style.chart.tooltip.fontSize,
1495
+ borderRadius: B.value.style.chart.tooltip.borderRadius,
1496
+ borderColor: B.value.style.chart.tooltip.borderColor,
1497
+ borderWidth: B.value.style.chart.tooltip.borderWidth,
1498
+ backgroundOpacity: B.value.style.chart.tooltip.backgroundOpacity,
1499
+ position: B.value.style.chart.tooltip.position,
1500
+ offsetY: B.value.style.chart.tooltip.offsetY,
1501
+ parent: I.value,
1502
+ content: Et.value,
1503
+ isCustom: mn.value,
1504
+ isFullscreen: X.value,
1505
+ smooth: B.value.style.chart.tooltip.smooth,
1506
+ backdropFilter: B.value.style.chart.tooltip.backdropFilter,
1507
+ smoothForce: B.value.style.chart.tooltip.smoothForce,
1508
+ smoothSnapThreshold: B.value.style.chart.tooltip.smoothSnapThrehsold,
1509
+ isA11yMode: At.value === "keyboard",
1510
+ a11yPosition: kt.value
1511
+ }, {
1512
+ "tooltip-before": M(() => [k(e.$slots, "tooltip-before", T(w({ ...pn.value })), void 0, !0)]),
1513
+ tooltip: M(() => [k(e.$slots, "tooltip", T(w({ ...pn.value })), void 0, !0)]),
1514
+ "tooltip-after": M(() => [k(e.$slots, "tooltip-after", T(w({ ...pn.value })), void 0, !0)]),
1515
+ _: 3
1516
+ }, 8, [
1517
+ "teleportTo",
1518
+ "show",
1519
+ "backgroundColor",
1520
+ "color",
1521
+ "fontSize",
1522
+ "borderRadius",
1523
+ "borderColor",
1524
+ "borderWidth",
1525
+ "backgroundOpacity",
1526
+ "position",
1527
+ "offsetY",
1528
+ "parent",
1529
+ "content",
1530
+ "isCustom",
1531
+ "isFullscreen",
1532
+ "smooth",
1533
+ "backdropFilter",
1534
+ "smoothForce",
1535
+ "smoothSnapThreshold",
1536
+ "isA11yMode",
1537
+ "a11yPosition"
1538
+ ]),
1539
+ _t.value && B.value.userOptions.buttons.table ? (D(), y(ke(Un.value.component), Ce({ key: 8 }, Un.value.props, {
1540
+ ref_key: "tableUnit",
1541
+ ref: L,
1542
+ onClose: Wn
1543
+ }), be({
1544
+ content: M(() => [(D(), y(j(Re), {
1545
+ key: `table_${xt.value}`,
1546
+ colNames: $.value.colNames,
1547
+ head: $.value.head,
1548
+ body: $.value.body,
1549
+ config: $.value.config,
1550
+ title: B.value.table.useDialog ? "" : Un.value.title,
1551
+ withCloseButton: !B.value.table.useDialog,
1552
+ isCursorPointer: V.value,
1553
+ onClose: Wn
1554
+ }, {
1555
+ th: M(({ th: e }) => [S("div", {
1556
+ innerHTML: e,
1557
+ style: {
1558
+ display: "flex",
1559
+ "align-items": "center"
1560
+ }
1561
+ }, null, 8, ht)]),
1562
+ td: M(({ td: e }) => [xe(A(e.name || e), 1)]),
1563
+ _: 1
1564
+ }, 8, [
1565
+ "colNames",
1566
+ "head",
1567
+ "body",
1568
+ "config",
1569
+ "title",
1570
+ "withCloseButton",
1571
+ "isCursorPointer"
1572
+ ]))]),
1573
+ _: 2
1574
+ }, [B.value.table.useDialog ? {
1575
+ name: "title",
1576
+ fn: M(() => [xe(A(Un.value.title), 1)]),
1577
+ key: "0"
1578
+ } : void 0, B.value.table.useDialog ? {
1579
+ name: "actions",
1580
+ fn: M(() => [S("button", {
1581
+ tabindex: "0",
1582
+ class: "vue-ui-user-options-button",
1583
+ onClick: t[1] ||= (e) => Ln(B.value.userOptions.callbacks.csv),
1584
+ style: E({ cursor: V.value ? "pointer" : "default" })
1585
+ }, [Se(j(N), {
1586
+ name: "fileCsv",
1587
+ stroke: Un.value.props.color
1588
+ }, null, 8, ["stroke"])], 4)]),
1589
+ key: "1"
1590
+ } : void 0]), 1040)) : b("", !0),
1591
+ k(e.$slots, "skeleton", {}, () => [j(Nt) ? (D(), y(oe, { key: 0 })) : b("", !0)], !0)
1592
+ ], 46, Ke));
1593
+ }
1594
+ }, [["__scopeId", "data-v-ea73f0d1"]]);
1595
+ //#endregion
1596
+ export { Ge as n, gt as t };