vue-data-ui 3.25.4 → 3.25.6

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