vue-data-ui 3.23.9 → 3.23.11

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