vue-data-ui 3.0.0-next.0 → 3.0.0-next.2

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 (102) hide show
  1. package/README.md +108 -67
  2. package/dist/{Arrow-CzFtSJ1v.js → Arrow-Dck2Ea5K.js} +1 -1
  3. package/dist/{BaseDraggableDialog-0S5xhs2P.js → BaseDraggableDialog-CatHZ1ns.js} +2 -2
  4. package/dist/{BaseIcon-DoDjTdD5.js → BaseIcon-BmZ4MREl.js} +1 -1
  5. package/dist/{ColorPicker-BGRchgqQ.js → ColorPicker-C1MXyD9Q.js} +2 -2
  6. package/dist/{DataTable-BBbOgI-a.js → DataTable-CgL0Rz0x.js} +2 -2
  7. package/dist/{Legend-Q4bOb-Nf.js → Legend-CYbP3Kfg.js} +12 -11
  8. package/dist/{NonSvgPenAndPaper-DNKRvsBB.js → NonSvgPenAndPaper-CcbcJm_U.js} +3 -3
  9. package/dist/{PackageVersion-D0VPY8-5.js → PackageVersion-CAkNkiIG.js} +1 -1
  10. package/dist/{PenAndPaper-DhBJsnob.js → PenAndPaper-Cx1-5zdD.js} +32 -32
  11. package/dist/{Shape-DbsLJ-SE.js → Shape-DBXkGxKt.js} +1 -1
  12. package/dist/{Slicer-DZEFp2GU.js → Slicer-nrMi5hzj.js} +2 -2
  13. package/dist/{SparkTooltip-CoOJR62O.js → SparkTooltip-fNzL4pIU.js} +1 -1
  14. package/dist/{Title-D29apS4l.js → Title-pVYRzQXY.js} +1 -1
  15. package/dist/Tooltip-NwATo4ZJ.js +157 -0
  16. package/dist/{UserOptions-Bdit7AWO.js → UserOptions-DAsRxxrf.js} +137 -129
  17. package/dist/{dom-to-png-BdPIrHOF.js → dom-to-png-BF_4H_6u.js} +1 -1
  18. package/dist/img-ku4zevVD.js +33 -0
  19. package/dist/{index-DMqAxz7R.js → index-BzfnuLnw.js} +1199 -1135
  20. package/dist/pdf-CguiIsUc.js +58 -0
  21. package/dist/style.css +1 -1
  22. package/dist/types/vue-data-ui.d.cts +1051 -217
  23. package/dist/types/vue-data-ui.d.ts +1051 -217
  24. package/dist/useLoading-Bt5Doa8m.js +28 -0
  25. package/dist/{useNestedProp-YgN3FV_8.js → useNestedProp-DorElw91.js} +1 -1
  26. package/dist/{usePrinter-COkTjv6C.js → usePrinter-C9qkgv0r.js} +2 -2
  27. package/dist/vue-data-ui-DQef_oFO.js +314 -0
  28. package/dist/vue-data-ui.js +13 -13
  29. package/dist/{vue-ui-3d-bar-Ojgjl20n.js → vue-ui-3d-bar-DPSamIA-.js} +261 -245
  30. package/dist/{vue-ui-accordion-P6eFHGQp.js → vue-ui-accordion-DgZK-qDz.js} +3 -3
  31. package/dist/{vue-ui-age-pyramid-IcMpAhiw.js → vue-ui-age-pyramid-DVeGKvf9.js} +233 -217
  32. package/dist/{vue-ui-annotator-Bk7d86-x.js → vue-ui-annotator-6ikkK-FK.js} +2 -2
  33. package/dist/{vue-ui-bullet-DCvWbCPk.js → vue-ui-bullet-Bg4hfFk2.js} +172 -156
  34. package/dist/{vue-ui-candlestick-DCf-88Yv.js → vue-ui-candlestick-Bi59FGXn.js} +271 -254
  35. package/dist/{vue-ui-carousel-table-DEsl0XUh.js → vue-ui-carousel-table-DitKhrFT.js} +17 -16
  36. package/dist/{vue-ui-chestnut-Cg10-3wu.js → vue-ui-chestnut-D8wGAZod.js} +419 -403
  37. package/dist/{vue-ui-chord-BWYzR6vf.js → vue-ui-chord-C-uTVCDP.js} +256 -240
  38. package/dist/{vue-ui-circle-pack-CO2Ra2-5.js → vue-ui-circle-pack-CPy6xcxv.js} +230 -214
  39. package/dist/{vue-ui-cursor-BbYHJDbV.js → vue-ui-cursor-Dd7vUd0q.js} +2 -2
  40. package/dist/{vue-ui-dashboard-DkCnNuse.js → vue-ui-dashboard-CKurbu8M.js} +62 -62
  41. package/dist/{vue-ui-digits-DRsphHt2.js → vue-ui-digits-DfdZI11G.js} +2 -2
  42. package/dist/{vue-ui-donut-evolution-B5F2-0bh.js → vue-ui-donut-evolution-CKbLO8yR.js} +370 -357
  43. package/dist/vue-ui-donut-tECBFvud.js +1532 -0
  44. package/dist/{vue-ui-dumbbell-DqqSxoSh.js → vue-ui-dumbbell-DI5Lj3r_.js} +216 -200
  45. package/dist/{vue-ui-flow-CTIcUJgV.js → vue-ui-flow-CjU48s9z.js} +217 -201
  46. package/dist/{vue-ui-funnel-k7KD7Xoc.js → vue-ui-funnel-DM_5vHZ4.js} +213 -197
  47. package/dist/{vue-ui-galaxy-C9EHaP4I.js → vue-ui-galaxy-ocvZgZJx.js} +215 -202
  48. package/dist/{vue-ui-gauge-CBiM_1-n.js → vue-ui-gauge-DajNoY-D.js} +220 -204
  49. package/dist/{vue-ui-gizmo-CAc7b2oK.js → vue-ui-gizmo-DTnzeQbm.js} +3 -3
  50. package/dist/{vue-ui-heatmap-B3ubrP2v.js → vue-ui-heatmap-CfBS8jQe.js} +244 -224
  51. package/dist/{vue-ui-history-plot-XCqccO3b.js → vue-ui-history-plot-BuOPWQoP.js} +268 -252
  52. package/dist/{vue-ui-kpi-DTGMDjaZ.js → vue-ui-kpi-DLGHOIRj.js} +3 -3
  53. package/dist/{vue-ui-mini-loader-Cn_7nvVq.js → vue-ui-mini-loader-CHAHi4c9.js} +2 -2
  54. package/dist/{vue-ui-molecule-BugMXFAK.js → vue-ui-molecule-R5-oDFeW.js} +204 -188
  55. package/dist/{vue-ui-mood-radar-Cv4dHZPL.js → vue-ui-mood-radar-Ddf2gaES.js} +206 -190
  56. package/dist/vue-ui-nested-donuts-CksklV83.js +1177 -0
  57. package/dist/{vue-ui-onion-Bha2hRAb.js → vue-ui-onion-D2n4zUkV.js} +196 -180
  58. package/dist/{vue-ui-parallel-coordinate-plot-DWJ2DWx4.js → vue-ui-parallel-coordinate-plot-CNWQqlxf.js} +194 -178
  59. package/dist/{vue-ui-quadrant-BKHZoTml.js → vue-ui-quadrant-CxNj2FEx.js} +321 -305
  60. package/dist/{vue-ui-quick-chart-D_k3lbU8.js → vue-ui-quick-chart-Bm_VmhJR.js} +347 -331
  61. package/dist/{vue-ui-radar-Co4EOjSk.js → vue-ui-radar-DSYMQJ6K.js} +193 -177
  62. package/dist/{vue-ui-rating-dtNN0EdX.js → vue-ui-rating-BiQpwXnc.js} +2 -2
  63. package/dist/{vue-ui-relation-circle-CR4UpQzM.js → vue-ui-relation-circle-Cdxe78Bm.js} +188 -172
  64. package/dist/{vue-ui-ridgeline-BKX97EnR.js → vue-ui-ridgeline-DpeM2hRi.js} +212 -196
  65. package/dist/{vue-ui-rings-EPTwyt6D.js → vue-ui-rings-BenmQHKv.js} +223 -210
  66. package/dist/{vue-ui-scatter-BlxzblSR.js → vue-ui-scatter-mDMY1H6U.js} +288 -273
  67. package/dist/{vue-ui-skeleton-CjN2ZdgT.js → vue-ui-skeleton-Ch_XkFuP.js} +3 -3
  68. package/dist/{vue-ui-smiley-DdF_ErYG.js → vue-ui-smiley-DTig5lTU.js} +2 -2
  69. package/dist/{vue-ui-spark-trend-RdOlCuT9.js → vue-ui-spark-trend-BkDsp8E0.js} +3 -3
  70. package/dist/{vue-ui-sparkbar-DWufRGcN.js → vue-ui-sparkbar-CgqoyBOm.js} +3 -3
  71. package/dist/{vue-ui-sparkgauge-IP1O3qyT.js → vue-ui-sparkgauge-B4jR_Y62.js} +3 -3
  72. package/dist/{vue-ui-sparkhistogram-Cnv9xZ8H.js → vue-ui-sparkhistogram-DfxjglLy.js} +4 -4
  73. package/dist/{vue-ui-sparkline-CYgeD5V3.js → vue-ui-sparkline-M3QR8xJE.js} +3 -3
  74. package/dist/{vue-ui-sparkstackbar-BCwoK9xd.js → vue-ui-sparkstackbar-B2Ls-Mb8.js} +3 -3
  75. package/dist/{vue-ui-stackbar-CqFIvfrK.js → vue-ui-stackbar-DIHkn6__.js} +497 -474
  76. package/dist/{vue-ui-strip-plot-Dq-kDRai.js → vue-ui-strip-plot-B_ZLbu2D.js} +241 -225
  77. package/dist/{vue-ui-table-vaIdQnPl.js → vue-ui-table-BhymhDOh.js} +3 -3
  78. package/dist/{vue-ui-table-heatmap-U_Td0cdh.js → vue-ui-table-heatmap-DokRh4dS.js} +26 -25
  79. package/dist/{vue-ui-table-sparkline-DkOaHx5L.js → vue-ui-table-sparkline-DxBZGKZJ.js} +8 -7
  80. package/dist/{vue-ui-thermometer-CzckBZgs.js → vue-ui-thermometer-e2L6IdF-.js} +170 -154
  81. package/dist/{vue-ui-timer-DSdUshUs.js → vue-ui-timer-BG2EwK3o.js} +5 -5
  82. package/dist/vue-ui-tiremarks-nzQH7woJ.js +358 -0
  83. package/dist/vue-ui-treemap-CZxyi6fl.js +965 -0
  84. package/dist/{vue-ui-vertical-bar-Dd4sYeAC.js → vue-ui-vertical-bar-DahdX1Sn.js} +382 -360
  85. package/dist/{vue-ui-waffle-DusUVY6y.js → vue-ui-waffle-D399D4UE.js} +234 -221
  86. package/dist/vue-ui-wheel-DtcwtHzJ.js +352 -0
  87. package/dist/{vue-ui-word-cloud-_7uYjJ5A.js → vue-ui-word-cloud-CTDceQsf.js} +249 -233
  88. package/dist/{vue-ui-world-COIyBHII.js → vue-ui-world-BjNSbqMZ.js} +239 -223
  89. package/dist/vue-ui-xy-BkTP-JpK.js +2958 -0
  90. package/dist/{vue-ui-xy-canvas-CuYRyub2.js → vue-ui-xy-canvas-BKAowbe0.js} +447 -431
  91. package/package.json +2 -2
  92. package/dist/Tooltip-hVZUY_s5.js +0 -149
  93. package/dist/img-BeMVTwmF.js +0 -20
  94. package/dist/pdf-DPxOdzfi.js +0 -51
  95. package/dist/useMouse-AicQS8Vf.js +0 -13
  96. package/dist/vue-data-ui-nceqWRts.js +0 -301
  97. package/dist/vue-ui-donut-DSE7ubVv.js +0 -1315
  98. package/dist/vue-ui-nested-donuts-CYe0Are_.js +0 -1154
  99. package/dist/vue-ui-tiremarks-B2WWklqG.js +0 -342
  100. package/dist/vue-ui-treemap-D1dgDhjG.js +0 -952
  101. package/dist/vue-ui-wheel-ClsKBh52.js +0 -336
  102. package/dist/vue-ui-xy-C_OUyzTC.js +0 -3135
@@ -0,0 +1,1177 @@
1
+ import { defineAsyncComponent as E, computed as k, ref as h, watch as ot, onMounted as st, nextTick as ut, shallowRef as nt, onBeforeUnmount as Bt, createElementBlock as i, openBlock as n, unref as r, normalizeStyle as ne, normalizeClass as R, createBlock as U, createCommentVNode as m, createVNode as rt, createSlots as Et, withCtx as C, renderSlot as x, normalizeProps as X, guardReactiveProps as W, createElementVNode as p, Fragment as T, renderList as A, toDisplayString as S, withDirectives as it, vShow as dt, createTextVNode as Rt } from "vue";
2
+ import { u as Ut, c as Gt, t as Yt, p as Te, a as Xt, G as z, o as Wt, e as q, b as qt, d as Ht, m as Ae, f as O, X as Jt, s as Kt, L as Qt, k as Oe, n as H, i as K, x as ct, q as Zt, r as jt, y as el, v as Fe, T as vt } from "./index-BzfnuLnw.js";
3
+ import { t as tl, u as ll } from "./useResponsive-DfdjqQps.js";
4
+ import { u as ht } from "./useNestedProp-DorElw91.js";
5
+ import { u as al } from "./usePrinter-C9qkgv0r.js";
6
+ import { u as ol } from "./useUserOptionState-BIvW1Kz7.js";
7
+ import { u as sl } from "./useChartAccessibility-9icAAmYg.js";
8
+ import ul from "./Title-pVYRzQXY.js";
9
+ import nl from "./Legend-CYbP3Kfg.js";
10
+ import rl from "./img-ku4zevVD.js";
11
+ import { _ as il } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
+ const dl = ["id"], cl = ["xmlns", "viewBox"], vl = ["width", "height"], hl = ["id"], fl = ["offset", "stop-color"], yl = ["offset", "stop-opacity"], pl = ["id"], bl = ["id"], gl = ["id"], ml = ["flood-color"], wl = ["d", "fill", "stroke", "stroke-width", "filter"], $l = ["d", "fill", "stroke", "stroke-width"], kl = { key: 1 }, Cl = ["d", "fill"], xl = { key: 2 }, Ll = ["x", "y", "font-size", "font-weight", "fill"], _l = { key: 3 }, Tl = ["filter"], Al = ["opacity", "text-anchor", "x", "y", "fill", "font-size", "font-weight"], Ol = ["opacity", "text-anchor", "x", "y", "fill", "font-size", "font-weight"], Fl = ["text-anchor", "x", "y", "fill", "font-size", "font-weight"], Nl = ["d", "fill", "onMouseenter", "onClick"], Sl = {
13
+ key: 5,
14
+ class: "vue-data-ui-watermark"
15
+ }, Il = {
16
+ key: 0,
17
+ class: "vue-ui-nested-donuts-legend-title"
18
+ }, Vl = ["onClick"], Pl = ["innerHTML"], Dl = {
19
+ __name: "vue-ui-nested-donuts",
20
+ props: {
21
+ config: {
22
+ type: Object,
23
+ default() {
24
+ return {};
25
+ }
26
+ },
27
+ dataset: {
28
+ type: Array,
29
+ default() {
30
+ return [];
31
+ }
32
+ }
33
+ },
34
+ emits: ["selectLegend", "selectDatapoint"],
35
+ setup(ft, { expose: yt, emit: pt }) {
36
+ const bt = E(() => import("./vue-ui-accordion-DgZK-qDz.js")), gt = E(() => import("./DataTable-CgL0Rz0x.js")), mt = E(() => import("./PackageVersion-CAkNkiIG.js")), wt = E(() => import("./PenAndPaper-Cx1-5zdD.js")), $t = E(() => import("./vue-ui-skeleton-Ch_XkFuP.js")), kt = E(() => import("./Tooltip-NwATo4ZJ.js")), Ct = E(() => import("./UserOptions-DAsRxxrf.js")), { vue_ui_nested_donuts: xt } = Ut(), L = ft, Q = k(() => !!L.dataset && L.dataset.length), b = h(Gt()), re = h(!1), ie = h(""), de = h(null), Ne = h(0), V = h(null), Se = h(null), ce = h(null), Ie = h(null), Ve = h(null), Pe = h(0), De = h(0), ze = h(0), M = h(!0), B = h([]), J = h([]), G = h(!1);
37
+ function Me(l) {
38
+ G.value = l, Ne.value += 1;
39
+ }
40
+ const e = k({
41
+ get: () => Re(),
42
+ set: (l) => l
43
+ }), { userOptionsVisible: ve, setUserOptionsVisibility: Be, keepUserOptionState: Ee } = ol({ config: e.value }), { svgRef: Z } = sl({
44
+ config: e.value.style.chart.title
45
+ });
46
+ function Re() {
47
+ const l = ht({
48
+ userConfig: L.config,
49
+ defaultConfig: xt
50
+ });
51
+ return l.theme ? {
52
+ ...ht({
53
+ userConfig: Xt.vue_ui_nested_donuts[l.theme] || L.config,
54
+ defaultConfig: l
55
+ }),
56
+ customPalette: Yt[l.theme] || Te
57
+ } : l;
58
+ }
59
+ ot(
60
+ () => L.config,
61
+ (l) => {
62
+ e.value = Re(), ve.value = !e.value.userOptions.showOnChartHover, he(), Pe.value += 1, De.value += 1, ze.value += 1, $.value.dataLabels.show = e.value.style.chart.layout.labels.dataLabels.show, $.value.showTable = e.value.table.show, $.value.showTooltip = e.value.style.chart.tooltip.show, f.value.width = e.value.style.chart.width, f.value.height = e.value.style.chart.height;
63
+ },
64
+ { deep: !0 }
65
+ );
66
+ const Ue = k(() => {
67
+ const { top: l, right: s, bottom: a, left: o } = e.value.style.chart.padding;
68
+ return {
69
+ css: `padding:${l}px ${s}px ${a}px ${o}px`,
70
+ top: l,
71
+ right: s,
72
+ bottom: a,
73
+ left: o
74
+ };
75
+ });
76
+ function Lt(l, s = 1e3, a = 50) {
77
+ return new Promise((o) => {
78
+ const t = l.length;
79
+ B.value = Array(t).fill(0), J.value = [];
80
+ let u = 0;
81
+ l.forEach((c, v) => {
82
+ setTimeout(() => {
83
+ const F = performance.now();
84
+ function d(y) {
85
+ const _ = Math.min((y - F) / s, 1), we = vt(_), $e = c * we;
86
+ B.value[v] = $e, B.value = [...B.value];
87
+ const se = [];
88
+ let ke = 0;
89
+ L.dataset.forEach((ue, Ce) => {
90
+ const Pt = Fe(ue.series.reduce(
91
+ (Le, _e) => Le + Fe(z(_e.values).reduce((zt, Mt) => zt + Mt, 0)),
92
+ 0
93
+ )), Dt = Fe(B.value.slice(ke, ke + ue.series.length).reduce((Le, _e) => Le + _e, 0)), xe = Pt - Dt;
94
+ xe > Number.MIN_VALUE && se.push({
95
+ name: "__ghost__",
96
+ arcOf: ue.name,
97
+ arcOfId: `${b.value}_${Ce}`,
98
+ id: `ghost_${b.value}_${Ce}`,
99
+ seriesIndex: -1,
100
+ datasetIndex: Ce,
101
+ color: "transparent",
102
+ value: xe,
103
+ fullValue: xe,
104
+ absoluteValues: [],
105
+ ghost: !0
106
+ }), ke += ue.series.length;
107
+ }), J.value = se, _ < 1 ? requestAnimationFrame(d) : (u += 1, u === t && o());
108
+ }
109
+ requestAnimationFrame(d);
110
+ }, v * a);
111
+ });
112
+ });
113
+ }
114
+ st(async () => {
115
+ if (he(), e.value.startAnimation?.show) {
116
+ const s = L.dataset.flatMap((a) => a.series).map(
117
+ (a) => z(a.values).reduce((o, t) => o + t, 0)
118
+ );
119
+ B.value = s.map(() => 0), M.value = !0, J.value = L.dataset.map((a, o) => {
120
+ const t = a.series.reduce(
121
+ (u, c) => u + z(c.values).reduce((v, F) => v + F, 0),
122
+ 0
123
+ );
124
+ return {
125
+ name: "__ghost__",
126
+ arcOf: a.name,
127
+ arcOfId: `${b.value}_${o}`,
128
+ id: `ghost_${b.value}_${o}`,
129
+ seriesIndex: -1,
130
+ datasetIndex: o,
131
+ color: "transparent",
132
+ value: t,
133
+ fullValue: t,
134
+ absoluteValues: [],
135
+ ghost: !0
136
+ };
137
+ }), await ut(), Lt(
138
+ s,
139
+ e.value.startAnimation.durationMs,
140
+ e.value.startAnimation.staggerMs
141
+ ).then(() => {
142
+ M.value = !1, J.value = [];
143
+ });
144
+ } else
145
+ M.value = !1;
146
+ });
147
+ const P = nt(null), Y = nt(null);
148
+ st(() => {
149
+ he();
150
+ });
151
+ function he() {
152
+ if (Wt(L.dataset) && q({
153
+ componentName: "VueUiNestedDonuts",
154
+ type: "dataset"
155
+ }), e.value.responsive) {
156
+ const l = tl(() => {
157
+ const { width: s, height: a } = ll({
158
+ chart: V.value,
159
+ title: e.value.style.chart.title.text ? Se.value : null,
160
+ legend: e.value.style.chart.legend.show ? ce.value : null,
161
+ source: Ie.value,
162
+ noTitle: Ve.value,
163
+ padding: Ue.value
164
+ });
165
+ requestAnimationFrame(() => {
166
+ f.value.width = s, f.value.height = a;
167
+ });
168
+ });
169
+ P.value && (Y.value && P.value.unobserve(Y.value), P.value.disconnect()), P.value = new ResizeObserver(l), Y.value = V.value.parentNode, P.value.observe(Y.value);
170
+ }
171
+ }
172
+ Bt(() => {
173
+ P.value && (Y.value && P.value.unobserve(Y.value), P.value.disconnect());
174
+ });
175
+ const { isPrinting: Ge, isImaging: Ye, generatePdf: Xe, generateImage: We } = al({
176
+ elementId: `nested_donuts_${b.value}`,
177
+ fileName: e.value.style.chart.title.text || "vue-ui-nested-donuts",
178
+ options: e.value.userOptions.print
179
+ }), _t = k(() => e.value.userOptions.show && !e.value.style.chart.title.text), Tt = k(() => qt(e.value.customPalette)), $ = h({
180
+ dataLabels: {
181
+ show: e.value.style.chart.layout.labels.dataLabels.show
182
+ },
183
+ showTable: e.value.table.show,
184
+ showTooltip: e.value.style.chart.tooltip.show
185
+ }), f = h({
186
+ width: e.value.style.chart.width,
187
+ height: e.value.style.chart.height
188
+ }), qe = pt;
189
+ function At({ datapoint: l, index: s }) {
190
+ qe("selectDatapoint", { datapoint: l, index: s });
191
+ }
192
+ function He({
193
+ from: l,
194
+ to: s,
195
+ duration: a,
196
+ onUpdate: o,
197
+ onDone: t,
198
+ easing: u = vt
199
+ }) {
200
+ const c = performance.now();
201
+ function v(F) {
202
+ const d = Math.min((F - c) / a, 1), y = u(d), _ = l + (s - l) * y;
203
+ o(_, d), d < 1 ? requestAnimationFrame(v) : (o(s, 1), t && t());
204
+ }
205
+ requestAnimationFrame(v);
206
+ }
207
+ const w = h([]), N = k(() => {
208
+ L.dataset.forEach((s, a) => {
209
+ [null, void 0].includes(s.name) && q({
210
+ componentName: "VueUiNestedDonuts",
211
+ type: "datasetSerieAttribute",
212
+ property: "name",
213
+ index: a
214
+ }), [null, void 0].includes(s.series) ? q({
215
+ componentName: "VueUiNestedDonuts",
216
+ type: "datasetSerieAttribute",
217
+ property: "series",
218
+ index: a
219
+ }) : s.series.length === 0 ? q({
220
+ componentName: "VueUiNestedDonuts",
221
+ type: "datasetAttributeEmpty",
222
+ property: `series at index ${a}`
223
+ }) : s.series.forEach((o, t) => {
224
+ [null, void 0].includes(o.name) && q({
225
+ componentName: "VueUiNestedDonuts",
226
+ type: "datasetSerieAttribute",
227
+ property: "name",
228
+ index: t,
229
+ key: "serie"
230
+ }), [null, void 0].includes(o.values) && q({
231
+ componentName: "VueUiNestedDonuts",
232
+ type: "datasetSerieAttribute",
233
+ property: "values",
234
+ index: t,
235
+ key: "serie"
236
+ });
237
+ });
238
+ });
239
+ let l = 0;
240
+ return L.dataset.map((s, a) => ({
241
+ ...s,
242
+ total: s.series.filter((o) => !w.value.includes(o.id)).map((o) => z(o.values).reduce((t, u) => t + u, 0)).reduce((o, t) => o + t, 0),
243
+ datasetIndex: a,
244
+ id: `${b.value}_${a}`,
245
+ series: s.series.map((o, t) => {
246
+ const u = z(o.values).reduce((c, v) => c + v, 0);
247
+ return {
248
+ name: o.name,
249
+ arcOf: s.name,
250
+ arcOfId: `${b.value}_${a}`,
251
+ id: `${b.value}_${a}_${t}`,
252
+ seriesIndex: t,
253
+ datasetIndex: a,
254
+ color: Ht(o.color) || Tt.value[t] || Te[t % Te.length],
255
+ value: M.value ? B.value[l++] ?? 0 : u,
256
+ absoluteValues: o.values || []
257
+ };
258
+ })
259
+ }));
260
+ }), I = k(() => Math.min(f.value.height, f.value.width) * (e.value.style.chart.layout.donut.strokeWidth / 512)), Je = k(() => [...N.value].map((l, s) => {
261
+ const a = l.series.filter((o) => !w.value.includes(o.id)).map((o) => o.value).reduce((o, t) => o + t, 0);
262
+ return {
263
+ ...l,
264
+ total: a,
265
+ series: l.series.filter((o) => !w.value.includes(o.id)).map((o) => ({
266
+ ...o,
267
+ proportion: o.value / a
268
+ }))
269
+ };
270
+ }));
271
+ function Ot(l, s, a) {
272
+ let o = 0;
273
+ for (let t = 0; t < l.length; t += 1)
274
+ a.includes(l[t]) && (o += 1);
275
+ return o < s;
276
+ }
277
+ const g = h(Je.value);
278
+ ot(
279
+ () => Je.value,
280
+ (l) => g.value = l
281
+ );
282
+ function fe(l) {
283
+ qe("selectLegend", l);
284
+ const s = L.dataset.flatMap(
285
+ (d, y) => d.series.map((_, we) => ({
286
+ value: z(_.values).reduce(($e, se) => $e + se, 0),
287
+ id: `${b.value}_${y}_${we}`,
288
+ arcOfId: `${b.value}_${y}`
289
+ }))
290
+ ).find((d) => d.id === l.id);
291
+ if (!s) return;
292
+ const a = N.value.flatMap((d) => d.series).find((d) => d.id === l.id)?.value ?? 0, o = g.value.flatMap((d) => d.series).find((d) => d.id === l.id);
293
+ let u = o ? o.value : 0;
294
+ const c = N.value.find(
295
+ (d) => d.id === s.arcOfId
296
+ );
297
+ if (!c) return;
298
+ const v = c.series.map((d) => d.id), F = Ot(
299
+ v,
300
+ v.length - 1,
301
+ w.value
302
+ );
303
+ w.value.includes(l.id) ? (w.value = w.value.filter((d) => d !== l.id), e.value.serieToggleAnimation.show ? He({
304
+ from: u,
305
+ to: a,
306
+ duration: e.value.serieToggleAnimation.durationMs,
307
+ onUpdate: (d) => {
308
+ g.value = g.value.map((y) => ({
309
+ ...y,
310
+ series: y.series.map((_) => _.id === l.id ? { ..._, value: d } : _)
311
+ }));
312
+ }
313
+ }) : g.value = g.value.map((d) => ({
314
+ ...d,
315
+ series: d.series.map((y) => y.id === l.id ? { ...y, value: a } : y)
316
+ }))) : F && (e.value.serieToggleAnimation.show ? He({
317
+ from: u,
318
+ to: 0,
319
+ duration: e.value.serieToggleAnimation.durationMs,
320
+ onUpdate: (d) => {
321
+ g.value = g.value.map((y) => ({
322
+ ...y,
323
+ series: y.series.map((_) => _.id === l.id ? { ..._, value: d } : _)
324
+ }));
325
+ },
326
+ onDone: () => {
327
+ w.value.push(l.id);
328
+ }
329
+ }) : (g.value = g.value.map((d) => ({
330
+ ...d,
331
+ series: d.series.map((y) => y.id === l.id ? { ...y, value: 0 } : y)
332
+ })), w.value.push(l.id)));
333
+ }
334
+ const j = k(() => I.value / N.value.length * e.value.style.chart.layout.donut.spacingRatio), Ke = k(() => g.value.map((l, s) => I.value - s * I.value / N.value.length)), ee = k(() => g.value.map((l, s) => {
335
+ const a = Math.abs(l.series.map((v) => v.value).reduce((v, F) => v + F, 0)) > 0, o = I.value - s * I.value / g.value.length, t = M.value ? J.value.find((v) => v.datasetIndex === s) : null, u = [...l.series, ...t ? [t] : []].map((v) => ({
336
+ ...v,
337
+ value: v.value < 1e-11 ? Number.MIN_VALUE : v.value
338
+ })), c = Ae(
339
+ { series: [
340
+ { name: "_", color: e.value.style.chart.layout.donut.emptyFill, value: 1 }
341
+ ] },
342
+ f.value.width / 2,
343
+ f.value.height / 2,
344
+ o,
345
+ o,
346
+ 1.99999,
347
+ 2,
348
+ 1,
349
+ 360,
350
+ 105.25,
351
+ j.value
352
+ );
353
+ return {
354
+ ...l,
355
+ hasData: a,
356
+ radius: o,
357
+ skeleton: c,
358
+ donut: Ae(
359
+ { series: u },
360
+ f.value.width / 2,
361
+ f.value.height / 2,
362
+ o,
363
+ o,
364
+ 1.99999,
365
+ 2,
366
+ 1,
367
+ 360,
368
+ 105.25,
369
+ j.value
370
+ )
371
+ };
372
+ })), Qe = k(() => [...N.value].map((l, s) => {
373
+ const a = s * I.value / N.value.length;
374
+ return {
375
+ sizeRatio: a,
376
+ donut: Ae(
377
+ { series: [{ value: 1 }] },
378
+ f.value.width / 2,
379
+ f.value.height / 2,
380
+ I.value - a,
381
+ I.value - a,
382
+ 1.99999,
383
+ 2,
384
+ 1,
385
+ 360,
386
+ 105.25,
387
+ I.value / N.value.length * e.value.style.chart.layout.donut.spacingRatio
388
+ )[0]
389
+ };
390
+ })), Ze = h(null), te = h(null), le = h(null), ye = h(null);
391
+ function Ft({ datapoint: l, _relativeIndex: s, seriesIndex: a }) {
392
+ Ze.value = l.arcOfId, te.value = l.id, le.value = a, de.value = l.id, ye.value = {
393
+ datapoint: l,
394
+ seriesIndex: a,
395
+ series: g.value,
396
+ config: e.value
397
+ };
398
+ const o = e.value.style.chart.tooltip.customFormat;
399
+ if (ct(o) && el(
400
+ () => o({
401
+ seriesIndex: a,
402
+ datapoint: l,
403
+ series: g.value,
404
+ config: e.value
405
+ })
406
+ ))
407
+ ie.value = o({
408
+ seriesIndex: a,
409
+ datapoint: l,
410
+ series: g.value,
411
+ config: e.value
412
+ });
413
+ else {
414
+ let t = "";
415
+ if (e.value.style.chart.tooltip.showAllItemsAtIndex && w.value.length === 0) {
416
+ const u = g.value.map((c) => c.series.find((v) => v.seriesIndex === a));
417
+ u.forEach((c, v) => {
418
+ if (!c) return "";
419
+ t += `
420
+ <div style="display:flex; flex-direction: column; justify-content:flex-start; align-items:flex-start;padding:6px 0; ${v < u.length - 1 ? `border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor}` : ""}">
421
+ <div style="display:flex; flex-direction: row; gap: 3px; justify-content:flex-start; align-items:center;">
422
+ <svg viewBox="0 0 20 20" height="${e.value.style.chart.tooltip.fontSize}" width="${e.value.style.chart.tooltip.fontSize}">
423
+ <circle cx="10" cy="10" r="10" fill="${c.color}"/>
424
+ </svg>
425
+ <span>
426
+ ${c.arcOf ?? ""} - ${c.name}
427
+ </span>
428
+ </div>
429
+ <span>
430
+ ${e.value.style.chart.tooltip.showValue ? `<b>${K(
431
+ e.value.style.chart.layout.labels.dataLabels.formatter,
432
+ l.value,
433
+ O({
434
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
435
+ v: l.value,
436
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
437
+ r: e.value.style.chart.tooltip.roundingValue
438
+ }),
439
+ { datapoint: l, seriesIndex: a }
440
+ )}
441
+ </b>` : ""}
442
+ ${e.value.style.chart.tooltip.showPercentage ? `(${O({
443
+ v: c.proportion * 100,
444
+ s: "%",
445
+ r: e.value.style.chart.tooltip.roundingPercentage
446
+ })})` : ""}
447
+ </span>
448
+ </div>
449
+ `;
450
+ });
451
+ } else
452
+ t += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;">${l.arcOf ?? ""} - ${l.name}</div>`, t += `<div style="display:flex;flex-direction:row;gap:6px;align-items:center;"><svg viewBox="0 0 12 12" height="14" width="14"><circle cx="6" cy="6" r="6" stroke="none" fill="${l.color}"/></svg>`, e.value.style.chart.tooltip.showValue && (t += `<b>${K(
453
+ e.value.style.chart.layout.labels.dataLabels.formatter,
454
+ l.value,
455
+ O({
456
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
457
+ v: l.value,
458
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
459
+ r: e.value.style.chart.tooltip.roundingValue
460
+ }),
461
+ { datapoint: l, seriesIndex: a }
462
+ )}</b>`), e.value.style.chart.tooltip.showPercentage && (e.value.style.chart.tooltip.showValue ? t += `<span>(${O({
463
+ v: l.proportion * 100,
464
+ s: "%",
465
+ r: e.value.style.chart.tooltip.roundingPercentage
466
+ })})</span></div>` : t += `<b>${O({
467
+ v: l.proportion * 100,
468
+ s: "%",
469
+ r: e.value.style.chart.tooltip.roundingPercentage
470
+ })}</b></div>`);
471
+ ie.value = `<div style="font-size:${e.value.style.chart.tooltip.fontSize}px">${t}</div>`;
472
+ }
473
+ re.value = !0;
474
+ }
475
+ function pe(l) {
476
+ return l.proportion * 100 > e.value.style.chart.layout.labels.dataLabels.hideUnderValue;
477
+ }
478
+ function je(l, s) {
479
+ if (!e.value.useBlurOnHover)
480
+ return "";
481
+ if (e.value.style.chart.tooltip.showAllItemsAtIndex && w.value.length === 0)
482
+ return [null, void 0].includes(le.value) || le.value === s ? "" : `url(#blur_${b.value})`;
483
+ if (!e.value.style.chart.tooltip.showAllItemsAtIndex || w.value.length)
484
+ return [null, void 0].includes(te.value) || te.value === l.id ? "" : `url(#blur_${b.value})`;
485
+ }
486
+ const be = k(() => N.value.map((l, s) => {
487
+ const a = l.series.filter(
488
+ (t) => !w.value.includes(t.id)
489
+ ), o = M.value ? a.map((t) => {
490
+ const u = L.dataset[s].series.findIndex(
491
+ (c) => c.name === t.name
492
+ );
493
+ return z(
494
+ L.dataset[s].series[u].values
495
+ ).reduce((c, v) => c + v, 0);
496
+ }).reduce((t, u) => t + u, 0) : a.map((t) => t.value).reduce((t, u) => t + u, 0);
497
+ return l.series.map((t, u) => {
498
+ const c = z(L.dataset[s].series[u].values).reduce(
499
+ (F, d) => F + d,
500
+ 0
501
+ ), v = M.value ? c : t.value;
502
+ return {
503
+ name: t.name,
504
+ color: t.color,
505
+ value: v,
506
+ shape: "circle",
507
+ arcOf: t.arcOf,
508
+ id: t.id,
509
+ seriesIndex: u,
510
+ datasetIndex: s,
511
+ total: o,
512
+ opacity: w.value.includes(t.id) ? 0.5 : 1,
513
+ segregate: () => fe(t),
514
+ isSegregated: w.value.includes(t.id)
515
+ };
516
+ });
517
+ })), Nt = k(() => ({
518
+ cy: "nested-donuts-legend",
519
+ backgroundColor: e.value.style.chart.legend.backgroundColor,
520
+ color: e.value.style.chart.legend.color,
521
+ fontSize: e.value.style.chart.legend.fontSize,
522
+ paddingBottom: 12,
523
+ fontWeight: e.value.style.chart.legend.bold ? "bold" : ""
524
+ })), D = k(() => {
525
+ const l = g.value.flatMap((a) => a.series.map((o) => ({
526
+ name: `${a.name} - ${o.name}`,
527
+ color: o.color,
528
+ total: a.total
529
+ }))), s = g.value.flatMap((a) => a.series.map((o) => o.value));
530
+ return { head: l, body: s };
531
+ });
532
+ function et(l = null) {
533
+ ut(() => {
534
+ const s = D.value.head.map((t, u) => [
535
+ [t.name],
536
+ [D.value.body[u]],
537
+ [
538
+ isNaN(D.value.body[u] / t.total) ? "-" : D.value.body[u] / t.total * 100
539
+ ]
540
+ ]), a = [
541
+ [e.value.style.chart.title.text],
542
+ [e.value.style.chart.title.subtitle.text],
543
+ [[""], ["val"], ["%"]]
544
+ ].concat(s), o = Zt(a);
545
+ l ? l(o) : jt({
546
+ csvContent: o,
547
+ title: e.value.style.chart.title.text || "vue-ui-nested-donuts"
548
+ });
549
+ });
550
+ }
551
+ const ae = k(() => {
552
+ const l = [
553
+ e.value.table.columnNames.series,
554
+ e.value.table.columnNames.value,
555
+ e.value.table.columnNames.percentage
556
+ ], s = D.value.head.map((t, u) => {
557
+ const c = O({
558
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
559
+ v: D.value.body[u],
560
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
561
+ r: e.value.table.td.roundingValue
562
+ });
563
+ return [
564
+ {
565
+ color: t.color,
566
+ name: t.name
567
+ },
568
+ c,
569
+ isNaN(D.value.body[u] / t.total) ? "-" : O({
570
+ v: D.value.body[u] / t.total * 100,
571
+ s: "%",
572
+ r: e.value.table.td.roundingPercentage
573
+ })
574
+ ];
575
+ }), a = {
576
+ th: {
577
+ backgroundColor: e.value.table.th.backgroundColor,
578
+ color: e.value.table.th.color,
579
+ outline: e.value.table.th.outline
580
+ },
581
+ td: {
582
+ backgroundColor: e.value.table.td.backgroundColor,
583
+ color: e.value.table.td.color,
584
+ outline: e.value.table.td.outline
585
+ },
586
+ breakpoint: e.value.table.responsiveBreakpoint
587
+ };
588
+ return {
589
+ colNames: [
590
+ e.value.table.columnNames.series,
591
+ e.value.table.columnNames.value,
592
+ e.value.table.columnNames.percentage
593
+ ],
594
+ head: l,
595
+ body: s,
596
+ config: a
597
+ };
598
+ });
599
+ function St() {
600
+ return N.value;
601
+ }
602
+ function tt() {
603
+ $.value.showTable = !$.value.showTable;
604
+ }
605
+ function lt() {
606
+ $.value.dataLabels.show = !$.value.dataLabels.show;
607
+ }
608
+ function at() {
609
+ $.value.showTooltip = !$.value.showTooltip;
610
+ }
611
+ const oe = h(!1);
612
+ function ge() {
613
+ oe.value = !oe.value;
614
+ }
615
+ async function It({ scale: l = 2 } = {}) {
616
+ if (!V.value) return;
617
+ const { width: s, height: a } = V.value.getBoundingClientRect(), o = s / a, { imageUri: t, base64: u } = await rl({ domElement: V.value, base64: !0, img: !0, scale: l });
618
+ return {
619
+ imageUri: t,
620
+ base64: u,
621
+ title: e.value.style.chart.title.text,
622
+ width: s,
623
+ height: a,
624
+ aspectRatio: o
625
+ };
626
+ }
627
+ const me = h(null);
628
+ function Vt() {
629
+ if (!me.value) return;
630
+ const { x: l, y: s, width: a, height: o } = me.value.getBBox();
631
+ Z.value && Z.value.setAttribute("viewBox", `${l} ${s} ${a + Math.min(0, l)} ${o + Math.min(0, s)}`);
632
+ }
633
+ return yt({
634
+ autoSize: Vt,
635
+ getData: St,
636
+ getImage: It,
637
+ generatePdf: Xe,
638
+ generateCsv: et,
639
+ generateImage: We,
640
+ toggleTable: tt,
641
+ toggleLabels: lt,
642
+ toggleTooltip: at,
643
+ toggleAnnotator: ge,
644
+ toggleFullscreen: Me
645
+ }), (l, s) => (n(), i("div", {
646
+ ref_key: "nestedDonutsChart",
647
+ ref: V,
648
+ class: R(`vue-ui-nested-donuts ${G.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${e.value.useCssAnimation ? "" : "vue-ui-dna"}`),
649
+ style: ne(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
650
+ id: `nested_donuts_${b.value}`,
651
+ onMouseenter: s[3] || (s[3] = () => r(Be)(!0)),
652
+ onMouseleave: s[4] || (s[4] = () => r(Be)(!1))
653
+ }, [
654
+ e.value.userOptions.buttons.annotator ? (n(), U(r(wt), {
655
+ key: 0,
656
+ svgRef: r(Z),
657
+ backgroundColor: e.value.style.chart.backgroundColor,
658
+ color: e.value.style.chart.color,
659
+ active: oe.value,
660
+ onClose: ge
661
+ }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : m("", !0),
662
+ _t.value ? (n(), i("div", {
663
+ key: 1,
664
+ ref_key: "noTitle",
665
+ ref: Ve,
666
+ class: "vue-data-ui-no-title-space",
667
+ style: "height:36px; width: 100%;background:transparent"
668
+ }, null, 512)) : m("", !0),
669
+ e.value.style.chart.title.text ? (n(), i("div", {
670
+ key: 2,
671
+ ref_key: "chartTitle",
672
+ ref: Se
673
+ }, [
674
+ (n(), U(ul, {
675
+ key: `title_${Pe.value}`,
676
+ config: {
677
+ title: {
678
+ cy: "donut-div-title",
679
+ ...e.value.style.chart.title
680
+ },
681
+ subtitle: {
682
+ cy: "donut-div-subtitle",
683
+ ...e.value.style.chart.title.subtitle
684
+ }
685
+ }
686
+ }, null, 8, ["config"]))
687
+ ], 512)) : m("", !0),
688
+ e.value.userOptions.show && Q.value && (r(Ee) || r(ve)) ? (n(), U(r(Ct), {
689
+ ref: "details",
690
+ key: `user_option_${Ne.value}`,
691
+ backgroundColor: e.value.style.chart.backgroundColor,
692
+ color: e.value.style.chart.color,
693
+ isPrinting: r(Ge),
694
+ isImaging: r(Ye),
695
+ uid: b.value,
696
+ hasTooltip: e.value.userOptions.buttons.tooltip && e.value.style.chart.tooltip.show,
697
+ hasPdf: e.value.userOptions.buttons.pdf,
698
+ hasXls: e.value.userOptions.buttons.csv,
699
+ hasImg: e.value.userOptions.buttons.img,
700
+ hasTable: e.value.userOptions.buttons.table,
701
+ hasLabel: e.value.userOptions.buttons.labels,
702
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
703
+ isFullscreen: G.value,
704
+ isTooltip: $.value.showTooltip,
705
+ titles: { ...e.value.userOptions.buttonTitles },
706
+ chartElement: V.value,
707
+ position: e.value.userOptions.position,
708
+ hasAnnotator: e.value.userOptions.buttons.annotator,
709
+ isAnnotation: oe.value,
710
+ callbacks: e.value.userOptions.callbacks,
711
+ printScale: e.value.userOptions.print.scale,
712
+ onToggleFullscreen: Me,
713
+ onGeneratePdf: r(Xe),
714
+ onGenerateCsv: et,
715
+ onGenerateImage: r(We),
716
+ onToggleTable: tt,
717
+ onToggleLabels: lt,
718
+ onToggleTooltip: at,
719
+ onToggleAnnotator: ge,
720
+ style: ne({
721
+ visibility: r(Ee) ? r(ve) ? "visible" : "hidden" : "visible"
722
+ })
723
+ }, Et({ _: 2 }, [
724
+ l.$slots.menuIcon ? {
725
+ name: "menuIcon",
726
+ fn: C(({ isOpen: a, color: o }) => [
727
+ x(l.$slots, "menuIcon", X(W({ isOpen: a, color: o })), void 0, !0)
728
+ ]),
729
+ key: "0"
730
+ } : void 0,
731
+ l.$slots.optionTooltip ? {
732
+ name: "optionTooltip",
733
+ fn: C(() => [
734
+ x(l.$slots, "optionTooltip", {}, void 0, !0)
735
+ ]),
736
+ key: "1"
737
+ } : void 0,
738
+ l.$slots.optionPdf ? {
739
+ name: "optionPdf",
740
+ fn: C(() => [
741
+ x(l.$slots, "optionPdf", {}, void 0, !0)
742
+ ]),
743
+ key: "2"
744
+ } : void 0,
745
+ l.$slots.optionCsv ? {
746
+ name: "optionCsv",
747
+ fn: C(() => [
748
+ x(l.$slots, "optionCsv", {}, void 0, !0)
749
+ ]),
750
+ key: "3"
751
+ } : void 0,
752
+ l.$slots.optionImg ? {
753
+ name: "optionImg",
754
+ fn: C(() => [
755
+ x(l.$slots, "optionImg", {}, void 0, !0)
756
+ ]),
757
+ key: "4"
758
+ } : void 0,
759
+ l.$slots.optionTable ? {
760
+ name: "optionTable",
761
+ fn: C(() => [
762
+ x(l.$slots, "optionTable", {}, void 0, !0)
763
+ ]),
764
+ key: "5"
765
+ } : void 0,
766
+ l.$slots.optionLabels ? {
767
+ name: "optionLabels",
768
+ fn: C(() => [
769
+ x(l.$slots, "optionLabels", {}, void 0, !0)
770
+ ]),
771
+ key: "6"
772
+ } : void 0,
773
+ l.$slots.optionFullscreen ? {
774
+ name: "optionFullscreen",
775
+ fn: C(({ toggleFullscreen: a, isFullscreen: o }) => [
776
+ x(l.$slots, "optionFullscreen", X(W({ toggleFullscreen: a, isFullscreen: o })), void 0, !0)
777
+ ]),
778
+ key: "7"
779
+ } : void 0,
780
+ l.$slots.optionAnnotator ? {
781
+ name: "optionAnnotator",
782
+ fn: C(({ toggleAnnotator: a, isAnnotator: o }) => [
783
+ x(l.$slots, "optionAnnotator", X(W({ toggleAnnotator: a, isAnnotator: o })), void 0, !0)
784
+ ]),
785
+ key: "8"
786
+ } : void 0
787
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasTooltip", "hasPdf", "hasXls", "hasImg", "hasTable", "hasLabel", "hasFullscreen", "isFullscreen", "isTooltip", "titles", "chartElement", "position", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : m("", !0),
788
+ Q.value ? (n(), i("svg", {
789
+ key: 4,
790
+ ref_key: "svgRef",
791
+ ref: Z,
792
+ xmlns: r(Jt),
793
+ class: R({
794
+ "vue-data-ui-fullscreen--on": G.value,
795
+ "vue-data-ui-fulscreen--off": !G.value,
796
+ "vue-data-ui-svg": !0
797
+ }),
798
+ viewBox: `0 0 ${f.value.width <= 0 ? 1e-3 : f.value.width} ${f.value.height < 0 ? 1e-3 : f.value.height}`,
799
+ style: ne(`max-width:100%; overflow: visible; background:transparent;color:${e.value.style.chart.color};${Ue.value.css}`)
800
+ }, [
801
+ p("g", {
802
+ ref_key: "G",
803
+ ref: me,
804
+ class: "vue-data-ui-g"
805
+ }, [
806
+ rt(r(mt)),
807
+ l.$slots["chart-background"] ? (n(), i("foreignObject", {
808
+ key: 0,
809
+ x: 0,
810
+ y: 0,
811
+ width: f.value.width <= 0 ? 1e-3 : f.value.width,
812
+ height: f.value.height < 0 ? 1e-3 : f.value.height,
813
+ style: {
814
+ pointerEvents: "none"
815
+ }
816
+ }, [
817
+ x(l.$slots, "chart-background", {}, void 0, !0)
818
+ ], 8, vl)) : m("", !0),
819
+ p("defs", null, [
820
+ (n(!0), i(T, null, A(Qe.value, (a, o) => (n(), i("radialGradient", {
821
+ id: `radial_${b.value}_${o}`
822
+ }, [
823
+ s[5] || (s[5] = p("stop", {
824
+ offset: "0%",
825
+ "stop-color": "#FFFFFF",
826
+ "stop-opacity": "0"
827
+ }, null, -1)),
828
+ p("stop", {
829
+ offset: `${(1 - j.value / Ke.value[o]) * 100}%`,
830
+ "stop-color": r(Kt)("#FFFFFF", 0),
831
+ "stop-opacity": "0"
832
+ }, null, 8, fl),
833
+ p("stop", {
834
+ offset: `${(1 - j.value / Ke.value[o] / 2) * 100}%`,
835
+ "stop-color": "#FFFFFF",
836
+ "stop-opacity": e.value.style.chart.gradientIntensity / 100
837
+ }, null, 8, yl),
838
+ s[6] || (s[6] = p("stop", {
839
+ offset: "100%",
840
+ "stop-color": "#FFFFFF",
841
+ "stop-opacity": "0"
842
+ }, null, -1))
843
+ ], 8, hl))), 256))
844
+ ]),
845
+ p("defs", null, [
846
+ p("filter", {
847
+ id: `blur_${b.value}`,
848
+ x: "-50%",
849
+ y: "-50%",
850
+ width: "200%",
851
+ height: "200%"
852
+ }, [
853
+ p("feGaussianBlur", {
854
+ in: "SourceGraphic",
855
+ stdDeviation: 2,
856
+ id: `blur_std_${b.value}`
857
+ }, null, 8, bl),
858
+ s[7] || (s[7] = p("feColorMatrix", {
859
+ type: "saturate",
860
+ values: "0"
861
+ }, null, -1))
862
+ ], 8, pl),
863
+ p("filter", {
864
+ id: `shadow_${b.value}`,
865
+ "color-interpolation-filters": "sRGB"
866
+ }, [
867
+ p("feDropShadow", {
868
+ dx: "0",
869
+ dy: "0",
870
+ stdDeviation: "10",
871
+ "flood-opacity": "0.5",
872
+ "flood-color": e.value.style.chart.layout.donut.shadowColor
873
+ }, null, 8, ml)
874
+ ], 8, gl)
875
+ ]),
876
+ (n(!0), i(T, null, A(ee.value, (a, o) => (n(), i("g", null, [
877
+ a.hasData ? (n(!0), i(T, { key: 0 }, A(a.donut.filter((t) => !t.ghost), (t, u) => (n(), i("g", null, [
878
+ p("path", {
879
+ class: "vue-ui-donut-arc-path",
880
+ d: t.arcSlice,
881
+ fill: t.color,
882
+ stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
883
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth,
884
+ filter: je(t, u)
885
+ }, null, 8, wl)
886
+ ]))), 256)) : (n(!0), i(T, { key: 1 }, A(a.skeleton, (t, u) => (n(), i("g", null, [
887
+ p("path", {
888
+ class: "vue-ui-donut-arc-path",
889
+ d: t.arcSlice,
890
+ fill: t.color,
891
+ stroke: e.value.style.chart.layout.donut.borderColorAuto ? e.value.style.chart.backgroundColor : e.value.style.chart.layout.donut.borderColor,
892
+ "stroke-width": e.value.style.chart.layout.donut.borderWidth
893
+ }, null, 8, $l)
894
+ ]))), 256))
895
+ ]))), 256)),
896
+ e.value.style.chart.useGradient ? (n(), i("g", kl, [
897
+ (n(!0), i(T, null, A(Qe.value, (a, o) => (n(), i("g", null, [
898
+ p("path", {
899
+ d: a.donut.arcSlice,
900
+ fill: `url(#radial_${b.value}_${o})`,
901
+ stroke: "transparent",
902
+ "stroke-width": "0"
903
+ }, null, 8, Cl)
904
+ ]))), 256))
905
+ ])) : m("", !0),
906
+ e.value.style.chart.layout.labels.dataLabels.showDonutName ? (n(), i("g", xl, [
907
+ (n(!0), i(T, null, A(ee.value, (a, o) => (n(), i("g", null, [
908
+ (n(!0), i(T, null, A(a.donut, (t, u) => (n(), i("g", null, [
909
+ u === 0 && f.value.width && f.value.height ? (n(), i("text", {
910
+ key: 0,
911
+ class: R({ animated: e.value.useCssAnimation }),
912
+ x: f.value.width / 2,
913
+ y: t.startY - e.value.style.chart.layout.labels.dataLabels.fontSize + e.value.style.chart.layout.labels.dataLabels.donutNameOffsetY,
914
+ "text-anchor": "middle",
915
+ "font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
916
+ "font-weight": e.value.style.chart.layout.labels.dataLabels.boldDonutName ? "bold" : "normal",
917
+ fill: e.value.style.chart.layout.labels.dataLabels.color
918
+ }, S(e.value.style.chart.layout.labels.dataLabels.donutNameAbbreviation ? r(Qt)({
919
+ source: a.name,
920
+ length: e.value.style.chart.layout.labels.dataLabels.donutNameMaxAbbreviationSize
921
+ }) : a.name), 11, Ll)) : m("", !0)
922
+ ]))), 256))
923
+ ]))), 256))
924
+ ])) : m("", !0),
925
+ e.value.style.chart.layout.labels.dataLabels.show ? (n(), i("g", _l, [
926
+ (n(!0), i(T, null, A(ee.value, (a, o) => (n(), i("g", null, [
927
+ (n(!0), i(T, null, A(a.donut.filter((t) => !t.ghost), (t, u) => (n(), i("g", {
928
+ filter: je(t, u)
929
+ }, [
930
+ it(p("text", {
931
+ class: R({ animated: e.value.useCssAnimation }),
932
+ opacity: pe(t) ? 1 : 0,
933
+ "text-anchor": r(H)(t, !0).anchor,
934
+ x: r(H)(
935
+ t,
936
+ !1,
937
+ e.value.style.chart.layout.labels.dataLabels.offsetX
938
+ ).x || 0,
939
+ y: r(Oe)(
940
+ t,
941
+ e.value.style.chart.layout.labels.dataLabels.offsetY,
942
+ e.value.style.chart.layout.labels.dataLabels.offsetY
943
+ ),
944
+ fill: e.value.style.chart.layout.labels.dataLabels.useSerieColor ? t.color : e.value.style.chart.layout.labels.dataLabels.color,
945
+ "font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
946
+ "font-weight": e.value.style.chart.layout.labels.dataLabels.boldPercentage ? "bold" : "normal"
947
+ }, S(r(O)({
948
+ v: t.proportion * 100,
949
+ s: "%",
950
+ r: e.value.style.chart.layout.labels.dataLabels.roundingPercentage
951
+ })), 11, Al), [
952
+ [
953
+ dt,
954
+ $.value.dataLabels.show && e.value.style.chart.layout.labels.dataLabels.showPercentage
955
+ ]
956
+ ]),
957
+ it(p("text", {
958
+ class: R({ animated: e.value.useCssAnimation }),
959
+ opacity: pe(t) ? 1 : 0,
960
+ "text-anchor": r(H)(t, !0).anchor,
961
+ x: r(H)(
962
+ t,
963
+ !1,
964
+ e.value.style.chart.layout.labels.dataLabels.offsetX
965
+ ).x || 0,
966
+ y: r(Oe)(
967
+ t,
968
+ e.value.style.chart.layout.labels.dataLabels.offsetY,
969
+ e.value.style.chart.layout.labels.dataLabels.offsetY
970
+ ) + e.value.style.chart.layout.labels.dataLabels.fontSize,
971
+ fill: e.value.style.chart.layout.labels.dataLabels.useSerieColor ? t.color : e.value.style.chart.layout.labels.dataLabels.color,
972
+ "font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
973
+ "font-weight": e.value.style.chart.layout.labels.dataLabels.boldValue ? "bold" : "normal"
974
+ }, " (" + S(r(K)(
975
+ e.value.style.chart.layout.labels.dataLabels.formatter,
976
+ t.value,
977
+ r(O)({
978
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
979
+ v: t.value,
980
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
981
+ r: e.value.style.chart.layout.labels.dataLabels.roundingValue
982
+ }),
983
+ { datapoint: t, seriesIndex: o, datapointIndex: u }
984
+ )) + ") ", 11, Ol), [
985
+ [
986
+ dt,
987
+ $.value.dataLabels.show && e.value.style.chart.layout.labels.dataLabels.showPercentage && e.value.style.chart.layout.labels.dataLabels.showValue
988
+ ]
989
+ ]),
990
+ pe(t) && $.value.dataLabels.show && !e.value.style.chart.layout.labels.dataLabels.showPercentage && e.value.style.chart.layout.labels.dataLabels.showValue ? (n(), i("text", {
991
+ key: 0,
992
+ class: R({ animated: e.value.useCssAnimation }),
993
+ "text-anchor": r(H)(t, !0).anchor,
994
+ x: r(H)(
995
+ t,
996
+ !1,
997
+ e.value.style.chart.layout.labels.dataLabels.offsetX
998
+ ).x || 0,
999
+ y: r(Oe)(
1000
+ t,
1001
+ e.value.style.chart.layout.labels.dataLabels.offsetY,
1002
+ e.value.style.chart.layout.labels.dataLabels.offsetY
1003
+ ),
1004
+ fill: e.value.style.chart.layout.labels.dataLabels.useSerieColor ? t.color : e.value.style.chart.layout.labels.dataLabels.color,
1005
+ "font-size": e.value.style.chart.layout.labels.dataLabels.fontSize,
1006
+ "font-weight": e.value.style.chart.layout.labels.dataLabels.boldValue ? "bold" : "normal"
1007
+ }, S(r(K)(
1008
+ e.value.style.chart.layout.labels.dataLabels.formatter,
1009
+ t.value,
1010
+ r(O)({
1011
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
1012
+ v: t.value,
1013
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
1014
+ r: e.value.style.chart.layout.labels.dataLabels.roundingValue
1015
+ }),
1016
+ { datapoint: t, seriesIndex: o, datapointIndex: u }
1017
+ )), 11, Fl)) : m("", !0)
1018
+ ], 8, Tl))), 256))
1019
+ ]))), 256))
1020
+ ])) : m("", !0),
1021
+ (n(!0), i(T, null, A(ee.value, (a, o) => (n(), i("g", null, [
1022
+ (n(!0), i(T, null, A(a.donut, (t, u) => (n(), i("g", null, [
1023
+ p("path", {
1024
+ d: t.arcSlice,
1025
+ fill: de.value === t.id ? e.value.style.chart.layout.donut.selectedColor : "transparent",
1026
+ onMouseenter: (c) => Ft({
1027
+ datapoint: t,
1028
+ seriesIndex: t.seriesIndex
1029
+ }),
1030
+ onClick: (c) => At({ datapoint: t, index: u }),
1031
+ onMouseleave: s[0] || (s[0] = (c) => {
1032
+ re.value = !1, Ze.value = null, te.value = null, le.value = null, de.value = null;
1033
+ })
1034
+ }, null, 40, Nl)
1035
+ ]))), 256))
1036
+ ]))), 256)),
1037
+ x(l.$slots, "svg", { svg: f.value }, void 0, !0)
1038
+ ], 512)
1039
+ ], 14, cl)) : m("", !0),
1040
+ l.$slots.watermark ? (n(), i("div", Sl, [
1041
+ x(l.$slots, "watermark", X(W({ isPrinting: r(Ge) || r(Ye) })), void 0, !0)
1042
+ ])) : m("", !0),
1043
+ Q.value ? m("", !0) : (n(), U(r($t), {
1044
+ key: 6,
1045
+ config: {
1046
+ type: "donut",
1047
+ style: {
1048
+ backgroundColor: e.value.style.chart.backgroundColor,
1049
+ donut: {
1050
+ color: "#CCCCCC"
1051
+ }
1052
+ }
1053
+ }
1054
+ }, null, 8, ["config"])),
1055
+ rt(r(kt), {
1056
+ show: $.value.showTooltip && re.value,
1057
+ backgroundColor: e.value.style.chart.tooltip.backgroundColor,
1058
+ color: e.value.style.chart.tooltip.color,
1059
+ borderRadius: e.value.style.chart.tooltip.borderRadius,
1060
+ borderColor: e.value.style.chart.tooltip.borderColor,
1061
+ borderWidth: e.value.style.chart.tooltip.borderWidth,
1062
+ fontSize: e.value.style.chart.tooltip.fontSize,
1063
+ backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
1064
+ position: e.value.style.chart.tooltip.position,
1065
+ offsetY: e.value.style.chart.tooltip.offsetY,
1066
+ parent: V.value,
1067
+ content: ie.value,
1068
+ isFullscreen: G.value,
1069
+ isCustom: r(ct)(e.value.style.chart.tooltip.customFormat)
1070
+ }, {
1071
+ "tooltip-before": C(() => [
1072
+ x(l.$slots, "tooltip-before", X(W({ ...ye.value })), void 0, !0)
1073
+ ]),
1074
+ "tooltip-after": C(() => [
1075
+ x(l.$slots, "tooltip-after", X(W({ ...ye.value })), void 0, !0)
1076
+ ]),
1077
+ _: 3
1078
+ }, 8, ["show", "backgroundColor", "color", "borderRadius", "borderColor", "borderWidth", "fontSize", "backgroundOpacity", "position", "offsetY", "parent", "content", "isFullscreen", "isCustom"]),
1079
+ e.value.style.chart.legend.show ? (n(), i("div", {
1080
+ key: 7,
1081
+ ref_key: "chartLegend",
1082
+ ref: ce,
1083
+ class: R({ "vue-ui-nested-donuts-legend": be.value.length > 1 })
1084
+ }, [
1085
+ (n(!0), i(T, null, A(be.value, (a, o) => (n(), U(nl, {
1086
+ key: `legend_${o}_${ze.value}`,
1087
+ legendSet: a,
1088
+ config: Nt.value,
1089
+ onClickMarker: s[1] || (s[1] = ({ legend: t }) => fe(t))
1090
+ }, {
1091
+ legendTitle: C(({ titleSet: t }) => [
1092
+ t[0] && t[0].arcOf ? (n(), i("div", Il, S(t[0].arcOf), 1)) : m("", !0)
1093
+ ]),
1094
+ item: C(({ legend: t, index: u }) => [
1095
+ p("div", {
1096
+ onClick: (c) => fe(t),
1097
+ style: ne(`opacity:${w.value.includes(t.id) ? 0.5 : 1}`)
1098
+ }, S(t.name) + S(e.value.style.chart.legend.showPercentage || e.value.style.chart.legend.showValue ? ":" : "") + " " + S(e.value.style.chart.legend.showValue ? r(K)(
1099
+ e.value.style.chart.layout.labels.dataLabels.formatter,
1100
+ t.value,
1101
+ r(O)({
1102
+ p: e.value.style.chart.layout.labels.dataLabels.prefix,
1103
+ v: t.value,
1104
+ s: e.value.style.chart.layout.labels.dataLabels.suffix,
1105
+ r: e.value.style.chart.legend.roundingValue
1106
+ }),
1107
+ { datapoint: t, seriesIndex: u }
1108
+ ) : "") + " " + S(e.value.style.chart.legend.showPercentage ? w.value.includes(t.id) ? `${e.value.style.chart.legend.showValue ? "(" : ""}- %${e.value.style.chart.legend.showValue ? ")" : ""}` : `${e.value.style.chart.legend.showValue ? "(" : ""}${isNaN(t.value / t.total) ? "-" : r(O)({
1109
+ v: t.value / t.total * 100,
1110
+ s: "%",
1111
+ r: e.value.style.chart.legend.roundingPercentage
1112
+ })}${e.value.style.chart.legend.showValue ? ")" : ""}` : ""), 13, Vl)
1113
+ ]),
1114
+ _: 2
1115
+ }, 1032, ["legendSet", "config"]))), 128))
1116
+ ], 2)) : m("", !0),
1117
+ e.value.style.chart.legend.show ? m("", !0) : (n(), i("div", {
1118
+ key: 8,
1119
+ ref_key: "chartLegend",
1120
+ ref: ce
1121
+ }, [
1122
+ x(l.$slots, "legend", { legend: be.value }, void 0, !0)
1123
+ ], 512)),
1124
+ l.$slots.source ? (n(), i("div", {
1125
+ key: 9,
1126
+ ref_key: "source",
1127
+ ref: Ie,
1128
+ dir: "auto"
1129
+ }, [
1130
+ x(l.$slots, "source", {}, void 0, !0)
1131
+ ], 512)) : m("", !0),
1132
+ Q.value ? (n(), U(r(bt), {
1133
+ key: 10,
1134
+ hideDetails: "",
1135
+ config: {
1136
+ open: $.value.showTable,
1137
+ maxHeight: 1e4,
1138
+ body: {
1139
+ backgroundColor: e.value.style.chart.backgroundColor,
1140
+ color: e.value.style.chart.color
1141
+ },
1142
+ head: {
1143
+ backgroundColor: e.value.style.chart.backgroundColor,
1144
+ color: e.value.style.chart.color
1145
+ }
1146
+ }
1147
+ }, {
1148
+ content: C(() => [
1149
+ (n(), U(r(gt), {
1150
+ key: `table_${De.value}`,
1151
+ colNames: ae.value.colNames,
1152
+ head: ae.value.head,
1153
+ body: ae.value.body,
1154
+ config: ae.value.config,
1155
+ title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? ` : ${e.value.style.chart.title.subtitle.text}` : ""}`,
1156
+ onClose: s[2] || (s[2] = (a) => $.value.showTable = !1)
1157
+ }, {
1158
+ th: C(({ th: a }) => [
1159
+ p("div", {
1160
+ innerHTML: a,
1161
+ style: { display: "flex", "align-items": "center" }
1162
+ }, null, 8, Pl)
1163
+ ]),
1164
+ td: C(({ td: a }) => [
1165
+ Rt(S(a.name || a), 1)
1166
+ ]),
1167
+ _: 1
1168
+ }, 8, ["colNames", "head", "body", "config", "title"]))
1169
+ ]),
1170
+ _: 1
1171
+ }, 8, ["config"])) : m("", !0)
1172
+ ], 46, dl));
1173
+ }
1174
+ }, Hl = /* @__PURE__ */ il(Dl, [["__scopeId", "data-v-89767698"]]);
1175
+ export {
1176
+ Hl as default
1177
+ };