vue-data-ui 3.7.14 → 3.7.15

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 (136) hide show
  1. package/dist/{PackageVersion-DtFSiS0a.js → PackageVersion-BAF3mEBQ.js} +1 -1
  2. package/dist/{Title-BwhstTFA.js → Title-Hk29BxeL.js} +1 -1
  3. package/dist/components/vue-ui-3d-bar.js +1 -1
  4. package/dist/components/vue-ui-accordion.js +1 -1
  5. package/dist/components/vue-ui-age-pyramid.js +1 -1
  6. package/dist/components/vue-ui-annotator.js +1 -1
  7. package/dist/components/vue-ui-bullet.js +1 -1
  8. package/dist/components/vue-ui-candlestick.js +1 -1
  9. package/dist/components/vue-ui-carousel-table.js +1 -1
  10. package/dist/components/vue-ui-chestnut.js +1 -1
  11. package/dist/components/vue-ui-chord.js +1 -1
  12. package/dist/components/vue-ui-circle-pack.js +1 -1
  13. package/dist/components/vue-ui-cursor.js +1 -1
  14. package/dist/components/vue-ui-dashboard.js +1 -1
  15. package/dist/components/vue-ui-digits.js +1 -1
  16. package/dist/components/vue-ui-donut-evolution.js +1 -1
  17. package/dist/components/vue-ui-donut.js +1 -1
  18. package/dist/components/vue-ui-dumbbell.js +1 -1
  19. package/dist/components/vue-ui-flow.js +1 -1
  20. package/dist/components/vue-ui-funnel.js +1 -1
  21. package/dist/components/vue-ui-galaxy.js +1 -1
  22. package/dist/components/vue-ui-gauge.js +1 -1
  23. package/dist/components/vue-ui-gizmo.js +1 -1
  24. package/dist/components/vue-ui-heatmap.js +1 -1
  25. package/dist/components/vue-ui-history-plot.js +1 -1
  26. package/dist/components/vue-ui-horizontal-bar.js +1 -1
  27. package/dist/components/vue-ui-kpi.js +1 -1
  28. package/dist/components/vue-ui-mini-loader.js +1 -1
  29. package/dist/components/vue-ui-molecule.js +1 -1
  30. package/dist/components/vue-ui-mood-radar.js +1 -1
  31. package/dist/components/vue-ui-nested-donuts.js +1 -1
  32. package/dist/components/vue-ui-onion.js +1 -1
  33. package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
  34. package/dist/components/vue-ui-quadrant.js +1 -1
  35. package/dist/components/vue-ui-quick-chart.js +1 -1
  36. package/dist/components/vue-ui-radar.js +1 -1
  37. package/dist/components/vue-ui-rating.js +1 -1
  38. package/dist/components/vue-ui-relation-circle.js +1 -1
  39. package/dist/components/vue-ui-ridgeline.js +1 -1
  40. package/dist/components/vue-ui-rings.js +1 -1
  41. package/dist/components/vue-ui-scatter.js +1 -1
  42. package/dist/components/vue-ui-skeleton.js +1 -1
  43. package/dist/components/vue-ui-smiley.js +1 -1
  44. package/dist/components/vue-ui-spark-trend.js +1 -1
  45. package/dist/components/vue-ui-sparkbar.js +1 -1
  46. package/dist/components/vue-ui-sparkgauge.js +1 -1
  47. package/dist/components/vue-ui-sparkhistogram.js +1 -1
  48. package/dist/components/vue-ui-sparkline.js +1 -1
  49. package/dist/components/vue-ui-sparkstackbar.js +1 -1
  50. package/dist/components/vue-ui-stackbar.js +1 -1
  51. package/dist/components/vue-ui-stackline.js +1 -1
  52. package/dist/components/vue-ui-strip-plot.js +1 -1
  53. package/dist/components/vue-ui-table-heatmap.js +1 -1
  54. package/dist/components/vue-ui-table-sparkline.js +1 -1
  55. package/dist/components/vue-ui-table.js +1 -1
  56. package/dist/components/vue-ui-thermometer.js +1 -1
  57. package/dist/components/vue-ui-timer.js +1 -1
  58. package/dist/components/vue-ui-tiremarks.js +1 -1
  59. package/dist/components/vue-ui-treemap.js +1 -1
  60. package/dist/components/vue-ui-vertical-bar.js +1 -1
  61. package/dist/components/vue-ui-waffle.js +1 -1
  62. package/dist/components/vue-ui-wheel.js +1 -1
  63. package/dist/components/vue-ui-word-cloud.js +1 -1
  64. package/dist/components/vue-ui-world.js +1 -1
  65. package/dist/components/vue-ui-xy-canvas.js +1 -1
  66. package/dist/components/vue-ui-xy.js +1 -1
  67. package/dist/style.css +1 -1
  68. package/dist/types/vue-data-ui.d.ts +3 -0
  69. package/dist/{useNestedProp-BjZ1Lg9E.js → useNestedProp-CVGae3Qt.js} +3 -1
  70. package/dist/{vue-data-ui-Y3bsII4e.js → vue-data-ui-BcTiYl7u.js} +64 -64
  71. package/dist/vue-data-ui.js +66 -66
  72. package/dist/{vue-ui-3d-bar-BEq_QYDw.js → vue-ui-3d-bar-Cg4nzpjZ.js} +3 -3
  73. package/dist/{vue-ui-accordion-BXTVRRX7.js → vue-ui-accordion-B3SlkXqV.js} +1 -1
  74. package/dist/{vue-ui-age-pyramid-CTZ8MQWv.js → vue-ui-age-pyramid-BGA_e57_.js} +3 -3
  75. package/dist/{vue-ui-annotator-CmCG1U2b.js → vue-ui-annotator-BHmNl_oD.js} +2 -2
  76. package/dist/{vue-ui-bullet-CdszYw76.js → vue-ui-bullet-B8Td03RZ.js} +3 -3
  77. package/dist/{vue-ui-candlestick-BgqEDWwB.js → vue-ui-candlestick-aRpv_WG-.js} +3 -3
  78. package/dist/{vue-ui-carousel-table-B-Nig8SF.js → vue-ui-carousel-table-yjrmp9Q4.js} +2 -2
  79. package/dist/{vue-ui-chestnut-BQDpGhPH.js → vue-ui-chestnut-mlal6Cjv.js} +2 -2
  80. package/dist/{vue-ui-chord-Cm8enZ-m.js → vue-ui-chord-Ddbwnzl7.js} +3 -3
  81. package/dist/{vue-ui-circle-pack-CsFGW1eB.js → vue-ui-circle-pack-DUw81Lbf.js} +3 -3
  82. package/dist/{vue-ui-cursor-4Ldkkd2T.js → vue-ui-cursor-CIynd5w9.js} +1 -1
  83. package/dist/{vue-ui-dashboard-UOeqXi6-.js → vue-ui-dashboard-BzIopzfw.js} +64 -64
  84. package/dist/{vue-ui-digits-uszbkbEK.js → vue-ui-digits-BDVx5bMH.js} +1 -1
  85. package/dist/{vue-ui-donut-Ckz6GstQ.js → vue-ui-donut-D-uqv9-W.js} +3 -3
  86. package/dist/{vue-ui-donut-evolution-CFRT7O_s.js → vue-ui-donut-evolution-C25j-w7G.js} +3 -3
  87. package/dist/{vue-ui-dumbbell-Djwlq0Rf.js → vue-ui-dumbbell-DaBN6kZz.js} +3 -3
  88. package/dist/{vue-ui-flow-B97OGV1a.js → vue-ui-flow-LBrbktKK.js} +412 -401
  89. package/dist/{vue-ui-funnel-BXG8DRLY.js → vue-ui-funnel-StsSjaZJ.js} +3 -3
  90. package/dist/{vue-ui-galaxy-D2O9-OYS.js → vue-ui-galaxy-DATC0Ww1.js} +3 -3
  91. package/dist/{vue-ui-gauge-B0FlPkKR.js → vue-ui-gauge-BuSVuoeo.js} +3 -3
  92. package/dist/{vue-ui-gizmo-BW0UgYhD.js → vue-ui-gizmo-B4Du388h.js} +2 -2
  93. package/dist/{vue-ui-heatmap-Dpn7FGns.js → vue-ui-heatmap-C7jHSpqL.js} +4 -4
  94. package/dist/{vue-ui-history-plot-CL2ZEcD2.js → vue-ui-history-plot-CMGhB2Zv.js} +3 -3
  95. package/dist/{vue-ui-horizontal-bar-D2mcVfxK.js → vue-ui-horizontal-bar-BlG3kfkk.js} +4 -4
  96. package/dist/{vue-ui-kpi-Bkxvv0Re.js → vue-ui-kpi-CTUnzHcT.js} +2 -2
  97. package/dist/{vue-ui-mini-loader-oYhRTSA7.js → vue-ui-mini-loader-DYMh6g7y.js} +1 -1
  98. package/dist/{vue-ui-molecule-vv1p3SyW.js → vue-ui-molecule-BNwKqzIg.js} +2 -2
  99. package/dist/{vue-ui-mood-radar-Whcu-ZOg.js → vue-ui-mood-radar-Bpfe33cj.js} +3 -3
  100. package/dist/{vue-ui-nested-donuts-CzWDhltb.js → vue-ui-nested-donuts-CG6vyTLr.js} +3 -3
  101. package/dist/{vue-ui-onion-D8UDqyva.js → vue-ui-onion-BNrW85xB.js} +3 -3
  102. package/dist/{vue-ui-parallel-coordinate-plot-CIZH5K2W.js → vue-ui-parallel-coordinate-plot-prQ8DLgP.js} +3 -3
  103. package/dist/{vue-ui-quadrant-Dnt0cVR5.js → vue-ui-quadrant-mFM3WtKm.js} +3 -3
  104. package/dist/{vue-ui-quick-chart-3PF3h9Px.js → vue-ui-quick-chart-CmJEoZEj.js} +2 -2
  105. package/dist/{vue-ui-radar-CEbL9Shz.js → vue-ui-radar-MheG5gvf.js} +3 -3
  106. package/dist/{vue-ui-rating-BALFx0aJ.js → vue-ui-rating-BAfHKHmb.js} +1 -1
  107. package/dist/{vue-ui-relation-circle-DzpqvYOF.js → vue-ui-relation-circle-BPZDXdVc.js} +3 -3
  108. package/dist/{vue-ui-ridgeline-D-PPE15J.js → vue-ui-ridgeline-BPDURc5t.js} +3 -3
  109. package/dist/{vue-ui-rings-lhCHl30r.js → vue-ui-rings-ByeUycTV.js} +3 -3
  110. package/dist/{vue-ui-scatter-CzHyLXEO.js → vue-ui-scatter-HkSLoM2F.js} +3 -3
  111. package/dist/{vue-ui-skeleton-DleKPF3G.js → vue-ui-skeleton-DtciU6S2.js} +2 -2
  112. package/dist/{vue-ui-smiley-DABDSgAF.js → vue-ui-smiley-B8k0b8-R.js} +1 -1
  113. package/dist/{vue-ui-spark-trend-DpwkGAmg.js → vue-ui-spark-trend-lSw8HYoA.js} +2 -2
  114. package/dist/{vue-ui-sparkbar-CbJvU0rf.js → vue-ui-sparkbar-DZlTPWdS.js} +2 -2
  115. package/dist/{vue-ui-sparkgauge-B0CvXpE3.js → vue-ui-sparkgauge-Cwl9Ksz2.js} +2 -2
  116. package/dist/{vue-ui-sparkhistogram-BMqK69TJ.js → vue-ui-sparkhistogram-Bq2DS4V0.js} +2 -2
  117. package/dist/{vue-ui-sparkline-BzXfYlcf.js → vue-ui-sparkline-DbkCbelr.js} +2 -2
  118. package/dist/{vue-ui-sparkstackbar-DoA2pTmw.js → vue-ui-sparkstackbar-DWDEh2j6.js} +2 -2
  119. package/dist/{vue-ui-stackbar-AJjoa2tk.js → vue-ui-stackbar-BhbkdK0G.js} +3 -3
  120. package/dist/{vue-ui-stackline-CN5pHu5R.js → vue-ui-stackline-DqKYCBDP.js} +3 -3
  121. package/dist/{vue-ui-strip-plot-Dzl2_jdd.js → vue-ui-strip-plot-BUbyj8j8.js} +3 -3
  122. package/dist/{vue-ui-table-CkrPb0oh.js → vue-ui-table-B1bx46AB.js} +3 -3
  123. package/dist/{vue-ui-table-heatmap-BHqtF71-.js → vue-ui-table-heatmap-kuly5Mc1.js} +1 -1
  124. package/dist/{vue-ui-table-sparkline-83wvFrDq.js → vue-ui-table-sparkline-B9YLMDpp.js} +2 -2
  125. package/dist/{vue-ui-thermometer-C-q3BXx7.js → vue-ui-thermometer-DGM9Cnnw.js} +3 -3
  126. package/dist/{vue-ui-timer-DdPan7AR.js → vue-ui-timer-C1uo5WJb.js} +3 -3
  127. package/dist/{vue-ui-tiremarks-CM4SFul5.js → vue-ui-tiremarks-B-xq7Ivj.js} +3 -3
  128. package/dist/{vue-ui-treemap-BFIBgzvj.js → vue-ui-treemap-VI1FYNqD.js} +3 -3
  129. package/dist/{vue-ui-waffle-b5MrZni2.js → vue-ui-waffle-WdacXwVf.js} +3 -3
  130. package/dist/{vue-ui-wheel-BphjlN7h.js → vue-ui-wheel-C7yfIwbK.js} +3 -3
  131. package/dist/vue-ui-word-cloud-BlNxODSZ.js +1419 -0
  132. package/dist/{vue-ui-world-khFqzGoQ.js → vue-ui-world-vfrFZPI1.js} +2 -2
  133. package/dist/{vue-ui-xy-DyWuuhwF.js → vue-ui-xy-DHN5H4Ln.js} +4 -4
  134. package/dist/{vue-ui-xy-canvas-i1eQQ9Bt.js → vue-ui-xy-canvas-B3oAOFin.js} +3 -3
  135. package/package.json +1 -1
  136. package/dist/vue-ui-word-cloud-BE7kYijj.js +0 -1224
@@ -1,1224 +0,0 @@
1
- import { useCssVars as Ot, defineAsyncComponent as se, computed as ie, ref as z, toRefs as Et, watch as Pe, shallowRef as Qe, onMounted as It, onBeforeUnmount as Pt, createElementBlock as G, openBlock as _, unref as A, normalizeStyle as _e, createBlock as ke, createCommentVNode as K, createVNode as Ye, withCtx as E, renderSlot as I, normalizeProps as V, guardReactiveProps as Z, createSlots as et, normalizeClass as tt, createElementVNode as Re, Fragment as Rt, renderList as Bt, toDisplayString as qe, resolveDynamicComponent as Dt, mergeProps as Xt, createTextVNode as ot, nextTick as at } from "vue";
2
- import { d as nt, u as _t } from "./useResponsive-DfdjqQps.js";
3
- import { c as Yt, t as Wt, ap as Nt, M as Vt, i as Zt, p as We, o as lt, g as st, k as Ut, d as Lt, X as jt, u as qt, q as Ht, x as Gt } from "./lib-DUaaQGCv.js";
4
- import { u as Kt, a as He } from "./useNestedProp-BjZ1Lg9E.js";
5
- import { u as Jt, B as Qt } from "./BaseScanner-BgWxam9d.js";
6
- import { u as eo } from "./usePrinter-BdVu83IN.js";
7
- import { u as to } from "./useSvgExport-DrjCWun4.js";
8
- import { u as oo } from "./useThemeCheck-DGJ31Vi5.js";
9
- import { u as ao } from "./useUserOptionState-BIvW1Kz7.js";
10
- import { u as no } from "./useChartAccessibility-9icAAmYg.js";
11
- import lo from "./img-BYzbY8TZ.js";
12
- import so from "./Title-BwhstTFA.js";
13
- import { u as io } from "./usePanZoom-DZtyJi5q.js";
14
- import { _ as ro } from "./_plugin-vue_export-helper-CHgC5LLL.js";
15
- function uo({
16
- word: s,
17
- fontSize: i,
18
- pad: f,
19
- canvas: d,
20
- ctx: r,
21
- svg: m
22
- }) {
23
- const n = `${m.style && m.style.bold ? "bold " : ""}${i}px Arial`;
24
- r.font = n;
25
- const g = r.measureText(s.name), v = Math.ceil(g.width) + 2 + (f ? f * 2 : 0), k = Math.ceil(i) + 2 + (f ? f * 2 : 0);
26
- d.width = v, d.height = k, r.font = n, r.textAlign = "center", r.textBaseline = "middle", r.fillStyle = "black", r.fillText(s.name, v / 2, k / 2);
27
- const p = r.getImageData(0, 0, v, k).data, y = [], l = [];
28
- let a = v, M = k, C = 0, S = 0, c = !1;
29
- for (let w = 0; w < k; w += 1) {
30
- const Y = w * v * 4;
31
- let B = -1, W = !1;
32
- for (let P = 0; P < v; P += 1) {
33
- const re = Y + P * 4 + 3;
34
- p[re] > 1 ? (y.push([P, w]), c = !0, P < a && (a = P), P > C && (C = P), w < M && (M = w), w > S && (S = w), W || (W = !0, B = P)) : W && (l.push([w, B, P - 1]), W = !1, B = -1);
35
- }
36
- W && l.push([w, B, v - 1]);
37
- }
38
- return c || (a = 0, M = 0, C = 0, S = 0), { w: v, h: k, wordMask: y, runs: l, minX: a, minY: M, maxX: C, maxY: S };
39
- }
40
- function co(s) {
41
- const i = [];
42
- if (!s.length) return i;
43
- let f = s[0][1], d = s[0][0], r = d;
44
- for (let m = 1; m < s.length; m += 1) {
45
- const u = s[m][0], n = s[m][1];
46
- n !== f ? (i.push([f, d, r]), f = n, d = u, r = u) : (u === r + 1 || (i.push([f, d, r]), d = u), r = u);
47
- }
48
- return i.push([f, d, r]), i;
49
- }
50
- function vo({
51
- maskBits: s,
52
- maskRowStride: i,
53
- maskW: f,
54
- maskH: d,
55
- wx: r,
56
- wy: m,
57
- runs: u
58
- }) {
59
- for (let n = 0; n < u.length; n += 1) {
60
- const g = u[n][0], v = u[n][1], k = u[n][2], b = m + g;
61
- if (b < 0 || b >= d) return !1;
62
- const p = r + v, y = r + k;
63
- if (p < 0 || y >= f) return !1;
64
- const l = b * i, a = p >>> 5, M = y >>> 5, C = p & 31, S = y & 31;
65
- if (a === M) {
66
- const c = s[l + a], Y = 4294967295 >>> 32 - (S - C + 1) << C >>> 0;
67
- if (c & Y) return !1;
68
- } else {
69
- {
70
- const c = s[l + a], w = 4294967295 << C >>> 0;
71
- if (c & w) return !1;
72
- }
73
- for (let c = a + 1; c < M; c += 1)
74
- if (s[l + c]) return !1;
75
- {
76
- const c = s[l + M], w = 4294967295 >>> 31 - S >>> 0;
77
- if (c & w) return !1;
78
- }
79
- }
80
- }
81
- return !0;
82
- }
83
- function fo({
84
- maskBits: s,
85
- maskRowStride: i,
86
- maskW: f,
87
- maskH: d,
88
- wx: r,
89
- wy: m,
90
- runs: u
91
- }) {
92
- for (let n = 0; n < u.length; n += 1) {
93
- const g = u[n][0], v = u[n][1], k = u[n][2], b = m + g;
94
- if (b < 0 || b >= d) continue;
95
- const p = r + v, y = r + k;
96
- if (y < 0 || p >= f) continue;
97
- const l = b * i, a = p >>> 5, M = y >>> 5, C = p & 31, S = y & 31;
98
- if (a === M) {
99
- const w = 4294967295 >>> 32 - (S - C + 1) << C >>> 0;
100
- s[l + a] |= w;
101
- } else {
102
- {
103
- const c = 4294967295 << C >>> 0;
104
- s[l + a] |= c;
105
- }
106
- for (let c = a + 1; c < M; c += 1)
107
- s[l + c] = 4294967295;
108
- {
109
- const c = 4294967295 >>> 31 - S >>> 0;
110
- s[l + M] |= c;
111
- }
112
- }
113
- }
114
- }
115
- function ho({ wordMask: s, w: i, h: f, dilation: d }) {
116
- const r = new Uint8Array(i * f), m = [];
117
- for (let n = 0; n < s.length; n += 1) {
118
- const g = s[n][0], k = s[n][1] * i + g;
119
- r[k] || (r[k] = 1, m.push(k));
120
- }
121
- for (let n = 0; n < m.length; n += 1) {
122
- const g = m[n], v = g / i | 0, k = g - v * i;
123
- for (let b = -d; b <= d; b += 1) {
124
- const p = v + b;
125
- if (p < 0 || p >= f) continue;
126
- const y = p * i;
127
- for (let l = -d; l <= d; l += 1) {
128
- if (l === 0 && b === 0) continue;
129
- const a = k + l;
130
- a < 0 || a >= i || (r[y + a] = 1);
131
- }
132
- }
133
- }
134
- const u = [];
135
- for (let n = 0; n < r.length; n += 1)
136
- if (r[n]) {
137
- const g = n / i | 0, v = n - g * i;
138
- u.push([v, g]);
139
- }
140
- return u;
141
- }
142
- function mo({
143
- runs: s,
144
- w: i,
145
- h: f,
146
- dilation: d
147
- }) {
148
- const r = new Uint8Array(i * f), m = [];
149
- for (let n = 0; n < s.length; n += 1) {
150
- const g = s[n], v = g[0], k = g[1], b = g[2], p = v * i;
151
- for (let y = k; y <= b; y += 1) {
152
- const l = p + y;
153
- r[l] || (r[l] = 1, m.push(l));
154
- }
155
- }
156
- for (let n = 0; n < m.length; n += 1) {
157
- const g = m[n], v = g / i | 0, k = g - v * i;
158
- for (let b = -d; b <= d; b += 1) {
159
- const p = v + b;
160
- if (p < 0 || p >= f) continue;
161
- const y = p * i;
162
- for (let l = -d; l <= d; l += 1) {
163
- if (l === 0 && b === 0) continue;
164
- const a = k + l;
165
- a < 0 || a >= i || (r[y + a] = 1);
166
- }
167
- }
168
- }
169
- const u = [];
170
- for (let n = 0; n < f; n += 1) {
171
- const g = n * i;
172
- let v = -1, k = !1;
173
- for (let b = 0; b < i; b += 1)
174
- r[g + b] ? k || (k = !0, v = b) : k && (u.push([n, v, b - 1]), k = !1, v = -1);
175
- k && u.push([n, v, i - 1]);
176
- }
177
- return u;
178
- }
179
- function po(s, i) {
180
- const f = s.runs, d = s.w, r = s.h, m = Math.max(1, Math.round(d * i)), u = Math.max(1, Math.round(r * i)), n = new Array(u);
181
- let g = m, v = u, k = 0, b = 0, p = !1;
182
- for (let l = 0; l < f.length; l += 1) {
183
- const a = f[l], M = a[0], C = a[1], S = a[2], c = Math.round(M * i);
184
- if (c < 0 || c >= u) continue;
185
- const w = Math.round(C * i), Y = Math.round((S + 1) * i) - 1;
186
- if (Y < w) continue;
187
- let B = n[c];
188
- B || (B = [], n[c] = B), B.push([w, Y]), p = !0, w < g && (g = w), Y > k && (k = Y), c < v && (v = c), c > b && (b = c);
189
- }
190
- if (!p)
191
- return {
192
- w: m,
193
- h: u,
194
- runs: [],
195
- minX: 0,
196
- minY: 0,
197
- maxX: 0,
198
- maxY: 0
199
- };
200
- const y = [];
201
- for (let l = 0; l < u; l += 1) {
202
- const a = n[l];
203
- if (!a || a.length === 0) continue;
204
- a.sort((S, c) => S[0] - c[0]);
205
- let M = a[0][0], C = a[0][1];
206
- for (let S = 1; S < a.length; S += 1) {
207
- const c = a[S][0], w = a[S][1];
208
- c <= C + 1 ? w > C && (C = w) : (y.push([l, M, C]), M = c, C = w);
209
- }
210
- y.push([l, M, C]);
211
- }
212
- return {
213
- w: m,
214
- h: u,
215
- runs: y,
216
- minX: g,
217
- minY: v,
218
- maxX: k,
219
- maxY: b
220
- };
221
- }
222
- const it = /* @__PURE__ */ new Map(), rt = /* @__PURE__ */ new Map();
223
- function go({ word: s, fontSize: i, pad: f, svg: d }) {
224
- const r = d.style && d.style.bold ? 1 : 0, m = f || 0;
225
- return `${s.name}::${i}::${m}::${r}`;
226
- }
227
- function bo({
228
- word: s,
229
- fontSize: i,
230
- pad: f,
231
- canvas: d,
232
- ctx: r,
233
- svg: m
234
- }) {
235
- const u = go({ word: s, fontSize: i, pad: f, svg: m }), n = it.get(u);
236
- if (n) return { key: u, bitmap: n };
237
- const g = uo({ word: s, fontSize: i, pad: f, canvas: d, ctx: r, svg: m });
238
- return it.set(u, g), { key: u, bitmap: g };
239
- }
240
- function yo({
241
- bitmapKey: s,
242
- wordMask: i,
243
- w: f,
244
- h: d,
245
- dilation: r
246
- }) {
247
- const m = `${s}::d${r}`, u = rt.get(m);
248
- if (u) return u;
249
- const n = ho({ wordMask: i, w: f, h: d, dilation: r }), g = co(n), v = { wordMask: n, runs: g };
250
- return rt.set(m, v), v;
251
- }
252
- const Co = 6, ko = 2, ut = Math.PI / 180, ct = [], dt = [];
253
- for (let s = 0; s < 360; s += Co) {
254
- const i = s * ut;
255
- ct.push(Math.cos(i)), dt.push(Math.sin(i));
256
- }
257
- const vt = [], ft = [];
258
- for (let s = 0; s < 360; s += ko) {
259
- const i = s * ut;
260
- vt.push(Math.cos(i)), ft.push(Math.sin(i));
261
- }
262
- function wo(s, i, f) {
263
- if (!s.length) return;
264
- let d = 1 / 0, r = -1 / 0, m = 1 / 0, u = -1 / 0;
265
- for (let l = 0; l < s.length; l += 1) {
266
- const a = s[l], M = a.x + a.minX, C = a.x + a.maxX, S = a.y + a.minY, c = a.y + a.maxY;
267
- M < d && (d = M), C > r && (r = C), S < m && (m = S), c > u && (u = c);
268
- }
269
- if (!isFinite(d) || !isFinite(r) || !isFinite(m) || !isFinite(u)) return;
270
- const n = Math.max(
271
- Math.abs(d),
272
- Math.abs(r)
273
- ), g = Math.max(
274
- Math.abs(m),
275
- Math.abs(u)
276
- );
277
- if (n === 0 || g === 0) return;
278
- const v = 0.9, k = i * 0.5 * v / n, b = f * 0.5 * v / g;
279
- let p = Math.min(k, b);
280
- if (p <= 1) return;
281
- const y = 4;
282
- p > y && (p = y);
283
- for (let l = 0; l < s.length; l += 1) {
284
- const a = s[l];
285
- a.x *= p, a.y *= p, a.width *= p, a.height *= p, a.fontSize *= p, a.minX *= p, a.maxX *= p, a.minY *= p, a.maxY *= p;
286
- }
287
- }
288
- async function Fo({
289
- words: s,
290
- proximity: i = 0,
291
- svg: f,
292
- strictPixelPadding: d,
293
- onProgress: r,
294
- debugTiming: m = !1
295
- }) {
296
- const u = typeof performance < "u" && typeof performance.now == "function", n = () => u ? performance.now() : Date.now(), g = n(), v = 12;
297
- let k = g;
298
- async function b() {
299
- n() - k >= v && (await new Promise((X) => setTimeout(X, 0)), k = n());
300
- }
301
- const p = f.width, y = f.height, l = Math.round(p), a = Math.round(y), M = 1, C = f.minFontSize, S = Math.min(f.maxFontSize, 100), c = s.map((R) => R.value), w = Math.min(...c), Y = Math.max(...c);
302
- if (l <= 0 || a <= 0) return [];
303
- const B = l + 31 >>> 5, W = new Uint32Array(B * a), P = document.createElement("canvas"), re = P.getContext("2d", { willReadFrequently: !0 });
304
- P.width = l, P.height = a;
305
- const fe = 2, e = 1, Ne = Math.max(l, a), we = Math.floor(l / 2), Ve = Math.floor(a / 2), xe = [...s.map((R, X) => ({
306
- ...R,
307
- __wcIndex: X,
308
- id: R.id != null ? R.id : `${R.name}__${X}`
309
- }))].sort((R, X) => X.value - R.value), N = [], Be = 0.9;
310
- for (let R = 0; R < xe.length; R += 1) {
311
- const X = xe[R], Se = N.length;
312
- let ue;
313
- Y === w ? ue = S : ue = (X.value - w) / (Y - w) * (S - C) + C, ue = Math.max(
314
- C,
315
- Math.min(S, ue)
316
- );
317
- const te = ue, O = bo({
318
- word: X,
319
- fontSize: te,
320
- pad: i,
321
- canvas: P,
322
- ctx: re,
323
- svg: f
324
- }), Ue = O.key, J = O.bitmap, j = J.w, oe = J.h;
325
- if (j <= 0 || oe <= 0) {
326
- await b();
327
- continue;
328
- }
329
- const Ae = Math.max(M / te, 0.1);
330
- let ae = !1;
331
- async function $e(me, De, Te) {
332
- let x = 1;
333
- for (; !ae && x >= Ae; ) {
334
- let U;
335
- x === 1 ? U = J : U = po(J, x);
336
- let D = U.runs, q = U.w, ce = U.h;
337
- const pe = U.minX, Me = U.minY, ge = U.maxX, ne = U.maxY;
338
- d && D.length && (x === 1 ? D = yo({
339
- bitmapKey: Ue,
340
- wordMask: J.wordMask,
341
- w: J.w,
342
- h: J.h,
343
- dilation: 2
344
- }).runs : D = mo({
345
- runs: D,
346
- w: q,
347
- h: ce,
348
- dilation: 2
349
- }));
350
- let de = 0, ze = 0;
351
- const Oe = Te ? vt : ct, Xe = Te ? ft : dt;
352
- for (; de < Ne && !ae && ze < De; ) {
353
- for (let L = 0; L < Oe.length; L += 1) {
354
- ze += 1;
355
- const Q = Math.round(we + de * Oe[L] - q / 2), le = Math.round(Ve + de * Xe[L] - ce / 2);
356
- if (!(Q < 0 || le < 0 || Q + q > l || le + ce > a) && vo({
357
- maskBits: W,
358
- maskRowStride: B,
359
- maskW: l,
360
- maskH: a,
361
- wx: Q,
362
- wy: le,
363
- runs: D
364
- })) {
365
- const { __wcIndex: Ge, ...be } = X, ye = Math.max(
366
- M,
367
- Math.round(te * x)
368
- );
369
- N.push({
370
- ...be,
371
- x: Q - l / 2,
372
- y: le - a / 2,
373
- fontSize: ye,
374
- width: q,
375
- height: ce,
376
- angle: 0,
377
- minX: pe,
378
- minY: Me,
379
- maxX: ge,
380
- maxY: ne
381
- }), fo({
382
- maskBits: W,
383
- maskRowStride: B,
384
- maskW: l,
385
- maskH: a,
386
- wx: Q,
387
- wy: le,
388
- runs: D
389
- }), ae = !0;
390
- break;
391
- }
392
- }
393
- de += me, (ze & 1023) === 0 && await b();
394
- }
395
- ae || (x *= Be), await b();
396
- }
397
- }
398
- if (await $e(fe, 1e4, !1), ae || await $e(e, 25e3, !0), r && N.length > Se) {
399
- const me = N[N.length - 1];
400
- r({ word: me, all: N });
401
- }
402
- await b();
403
- }
404
- if (!N.length)
405
- return [];
406
- wo(N, l, a);
407
- const he = n() - g;
408
- return m && typeof console < "u" && console.log && console.log(
409
- "[vue-data-ui][word-cloud] positionWordsAsync:",
410
- `${he.toFixed(2)} ms for ${s.length} words`
411
- ), N.sort((R, X) => X.fontSize - R.fontSize);
412
- }
413
- const ht = { style: { chart: { backgroundColor: "#1A1A1A", color: "#CCCCCC", title: { color: "#CCCCCC", subtitle: { color: "#757575" } }, words: { selectedStroke: "#1A1A1A" }, tooltip: { backgroundColor: "#1A1A1A", backgroundOpacity: 70, color: "#CCCCCC", borderColor: "#5A5A5A" } } }, table: { th: { backgroundColor: "#1A1A1A", color: "#CCCCCC" }, td: { backgroundColor: "#1A1A1A", color: "#CCCCCC" } } }, mt = { style: { chart: { backgroundColor: "#FFF8E1", color: "#424242", title: { color: "#424242", subtitle: { color: "#757575" } }, words: { selectedStroke: "#FFF8E1" }, tooltip: { backgroundColor: "#FFECB3", backgroundOpacity: 30, color: "#424242", borderColor: "#FF8A65" }, zoom: { color: "#5D4037", highlightColor: "#FF8A65" } } }, table: { th: { backgroundColor: "#FFF8E1", color: "#424242" }, td: { backgroundColor: "#FFF8E1", color: "#424242" } } }, pt = { style: { chart: { backgroundColor: "#1E1E1E", color: "#BDBDBD", title: { color: "#FFF8E1", subtitle: { color: "#BDBDBD" } }, words: { selectedStroke: "#1E1E1E" }, tooltip: { backgroundColor: "#1E1E1E", backgroundOpacity: 30, color: "#FFF8E1", borderColor: "#FF8A65" }, zoom: { color: "#5D4037", highlightColor: "#FF8A65" } } }, table: { th: { backgroundColor: "#1E1E1E", color: "#BDBDBD" }, td: { backgroundColor: "#1E1E1E", color: "#BDBDBD" } } }, gt = { style: { chart: { backgroundColor: "#1A1A1A", color: "#99AA99", title: { color: "#66CC66", subtitle: { color: "#99AA99" } }, words: { selectedStroke: "#1A1A1A" } } }, table: { th: { backgroundColor: "#1A1A1A", color: "#99AA99" }, td: { backgroundColor: "#1A1A1A", color: "#AACCAA" } } }, bt = { style: { chart: { backgroundColor: "#fbfafa", color: "#8A9892", title: { color: "#8A9892", subtitle: { color: "#99AA99" } }, words: { selectedStroke: "#fbfafa" } } }, table: { th: { backgroundColor: "#fbfafa", color: "#8F837A" }, td: { backgroundColor: "#fbfafa", color: "#8F837A" } } }, yt = { style: { chart: { backgroundColor: "#f6f6fb", color: "#50606C", title: { color: "#50606C", subtitle: { color: "#718890" } }, words: { selectedStroke: "#f6f6fb" } } }, table: { th: { backgroundColor: "#f6f6fb", color: "#50606C" }, td: { backgroundColor: "#f6f6fb", color: "#50606C" } } }, Ct = {
414
- default: {},
415
- dark: ht,
416
- celebration: mt,
417
- celebrationNight: pt,
418
- hack: gt,
419
- zen: bt,
420
- concrete: yt
421
- }, Go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
422
- __proto__: null,
423
- celebration: mt,
424
- celebrationNight: pt,
425
- concrete: yt,
426
- dark: ht,
427
- default: Ct,
428
- hack: gt,
429
- zen: bt
430
- }, Symbol.toStringTag, { value: "Module" })), xo = ["id", "data-resizing", "data-relayout"], So = ["xmlns", "viewBox"], Ao = ["width", "height"], $o = ["transform"], To = ["transform"], Mo = ["x", "y", "width", "height", "onMouseover", "onMouseleave", "onClick"], zo = ["fill", "font-weight", "font-size", "transform", "stroke", "stroke-width"], Oo = {
431
- key: 3,
432
- class: "vue-data-ui-watermark"
433
- }, Eo = {
434
- key: 4,
435
- "data-dom-to-png-ignore": "",
436
- class: "reset-wrapper"
437
- }, Io = ["innerHTML"], Po = {
438
- __name: "vue-ui-word-cloud",
439
- props: {
440
- config: {
441
- type: Object,
442
- default() {
443
- return {};
444
- }
445
- },
446
- dataset: {
447
- type: [Array, String],
448
- default() {
449
- return [];
450
- }
451
- }
452
- },
453
- setup(s, { expose: i }) {
454
- Ot((t) => ({
455
- v99bcef08: t.slicerColor
456
- }));
457
- const f = se(() => import("./Tooltip-De7i-i20.js")), d = se(() => import("./BaseIcon-Dl4VBlHV.js")), r = se(() => import("./vue-ui-accordion-BXTVRRX7.js")), m = se(() => import("./DataTable-Ho3Bf5oq.js")), u = se(() => import("./PenAndPaper-kymjF6_b.js")), n = se(() => import("./UserOptions-DgscxIaa.js")), g = se(() => import("./PackageVersion-DtFSiS0a.js")), v = se(() => import("./BaseDraggableDialog-DZVSjhEw.js")), { vue_ui_word_cloud: k } = Kt(), { isThemeValid: b, warnInvalidTheme: p } = oo(), y = s, l = ie({
458
- get() {
459
- return !!y.dataset && y.dataset.length;
460
- },
461
- set(t) {
462
- return t;
463
- }
464
- }), a = z(Yt()), M = z(0), C = z(null), S = z(null), c = z(null), w = z(0), Y = z(0), B = z(!1), W = z(null), P = z(null), re = z(!1), fe = z(!1), e = z(R()), { loading: Ne, FINAL_DATASET: we, manualLoading: Ve } = Jt({
465
- ...Et(y),
466
- FINAL_CONFIG: e,
467
- prepareConfig: R,
468
- callback: () => {
469
- Promise.resolve().then(() => {
470
- x.value.showTable = e.value.table.show, x.value.showTooltip = e.value.style.chart.tooltip.show, x.value.showZoom = e.value.style.chart.zoom.show;
471
- });
472
- },
473
- skeletonDataset: [
474
- { name: "Lorem", value: 6 },
475
- { name: "ipsum", value: 3 },
476
- { name: "dolor", value: 1 },
477
- { name: "sit", value: 3 },
478
- { name: "amet", value: 3 },
479
- { name: "consectetur", value: 2 },
480
- { name: "adipiscing", value: 1 },
481
- { name: "elit", value: 2 },
482
- { name: "Vivamus", value: 2 },
483
- { name: "pulvinar", value: 1 },
484
- { name: "pretium", value: 1 },
485
- { name: "venenatis", value: 2 },
486
- { name: "Donec", value: 1 },
487
- { name: "imperdiet", value: 3 },
488
- { name: "id", value: 1 },
489
- { name: "porttitor", value: 2 },
490
- { name: "tristique", value: 1 },
491
- { name: "Aenean", value: 2 },
492
- { name: "ac", value: 5 },
493
- { name: "commodo", value: 2 },
494
- { name: "justo", value: 2 },
495
- { name: "Vestibulum", value: 2 },
496
- { name: "placerat", value: 1 },
497
- { name: "molestie", value: 1 },
498
- { name: "nisl", value: 1 },
499
- { name: "lacinia", value: 2 },
500
- { name: "nulla", value: 1 },
501
- { name: "posuere", value: 2 },
502
- { name: "quis", value: 3 },
503
- { name: "ullamcorper", value: 1 },
504
- { name: "eu", value: 1 },
505
- { name: "ex", value: 1 },
506
- { name: "vitae", value: 3 },
507
- { name: "facilisis", value: 1 },
508
- { name: "Aliquam", value: 1 },
509
- { name: "erat", value: 1 },
510
- { name: "volutpat", value: 1 },
511
- { name: "Proin", value: 1 },
512
- { name: "nunc", value: 1 },
513
- { name: "felis", value: 1 },
514
- { name: "gravida", value: 3 },
515
- { name: "sed", value: 1 },
516
- { name: "orci", value: 1 },
517
- { name: "Interdum", value: 1 },
518
- { name: "et", value: 1 },
519
- { name: "malesuada", value: 1 },
520
- { name: "fames", value: 1 },
521
- { name: "ante", value: 1 }
522
- ],
523
- skeletonConfig: Wt({
524
- defaultConfig: e.value,
525
- userConfig: {
526
- userOptions: { show: !1 },
527
- table: { show: !1 },
528
- useCssAnimation: !1,
529
- animationDelayMs: 0,
530
- nodeCategories: {},
531
- nodeCategoryColors: {},
532
- style: {
533
- chart: {
534
- backgroundColor: "#99999930",
535
- words: {
536
- color: "#6A6A6A",
537
- usePalette: !1,
538
- selectedStroke: "#CCCCCC"
539
- }
540
- }
541
- }
542
- }
543
- })
544
- }), Fe = z(xe());
545
- function xe() {
546
- return typeof we.value == "string" ? Nt(we.value) : we.value.map((t, h) => ({
547
- ...t,
548
- value: Vt(t.value)
549
- }));
550
- }
551
- const { userOptionsVisible: N, setUserOptionsVisibility: Be, keepUserOptionState: Ze } = ao({ config: e.value }), { svgRef: he } = no({ config: e.value.style.chart.title });
552
- function R() {
553
- const t = He({
554
- userConfig: y.config,
555
- defaultConfig: k
556
- }), h = t.theme;
557
- if (!h) return t;
558
- if (!b.value(t))
559
- return p(t), t;
560
- const o = He({
561
- userConfig: Ct[h] || y.config,
562
- defaultConfig: t
563
- }), F = He({
564
- userConfig: y.config,
565
- defaultConfig: o
566
- });
567
- return {
568
- ...F,
569
- customPalette: F.customPalette.length ? F.customPalette : Zt[h] || We
570
- };
571
- }
572
- const X = z({ x: 0, y: 0 });
573
- function Se() {
574
- const t = {
575
- x: 0,
576
- y: 0,
577
- width: Math.max(10, O.value.width),
578
- height: Math.max(10, O.value.height)
579
- };
580
- wt(t), X.value = {
581
- x: t.x + t.width / 2,
582
- y: t.y + t.height / 2
583
- }, ye();
584
- }
585
- const ue = nt(() => {
586
- ce();
587
- }, 100), te = z(!1);
588
- Pe(() => te.value, (t) => {
589
- t === !1 && (fe.value = !0, ue(), Se());
590
- }), Pe(() => y.config, (t) => {
591
- e.value = R(), N.value = !e.value.userOptions.showOnChartHover, ae(), w.value += 1, Y.value += 1, x.value.showTable = e.value.table.show, x.value.showTooltip = e.value.style.chart.tooltip.show, x.value.showZoom = e.value.style.chart.zoom.show;
592
- }, { deep: !0 });
593
- const O = z({
594
- width: e.value.style.chart.width,
595
- height: e.value.style.chart.height,
596
- maxFontSize: e.value.style.chart.words.maxFontSize,
597
- minFontSize: e.value.style.chart.words.minFontSize,
598
- bold: e.value.style.chart.words.bold
599
- }), Ue = nt(() => {
600
- const { width: t, height: h } = _t({
601
- chart: C.value,
602
- title: e.value.style.chart.title.text ? S.value : null,
603
- source: c.value
604
- });
605
- requestAnimationFrame(async () => {
606
- O.value.width = Math.max(10, t), O.value.height = Math.max(10, h - 12), await at(), te.value = !1;
607
- });
608
- }, 100), J = () => {
609
- te.value = !0, Ue();
610
- }, j = Qe(null), oe = Qe(null);
611
- It(ae);
612
- const Ae = ie(() => !!e.value.debug);
613
- function ae() {
614
- lt(y.dataset) ? st({
615
- componentName: "VueUiWordCloud",
616
- type: "dataset",
617
- debug: Ae.value
618
- }) : Fe.value.forEach((t, h) => {
619
- Ut({
620
- datasetObject: t,
621
- requiredAttributes: ["name", "value"]
622
- }).forEach((o) => {
623
- l.value = !1, st({
624
- componentName: "VueUiWordCloud",
625
- type: "datasetSerieAttribute",
626
- property: o,
627
- index: h,
628
- debug: Ae.value
629
- });
630
- });
631
- }), lt(y.dataset) || (Ve.value = e.value.loading), e.value.responsive && (j.value && (oe.value && j.value.unobserve(oe.value), j.value.disconnect()), j.value = new ResizeObserver(J), oe.value = C.value.parentNode, j.value.observe(oe.value)), Se();
632
- }
633
- Pt(() => {
634
- j.value && (oe.value && j.value.unobserve(oe.value), j.value.disconnect());
635
- });
636
- const { isPrinting: $e, isImaging: me, generatePdf: De, generateImage: Te } = eo({
637
- elementId: `wordCloud_${a.value}`,
638
- fileName: e.value.style.chart.title.text || "vue-ui-word-cloud",
639
- options: e.value.userOptions.print
640
- }), x = z({
641
- showTable: e.value.table.show,
642
- showTooltip: e.value.style.chart.tooltip.show,
643
- showZoom: e.value.style.chart.zoom.show
644
- });
645
- Pe(e, () => {
646
- x.value.showTable = e.value.table.show, x.value.showTooltip = e.value.style.chart.tooltip.show, x.value.showZoom = e.value.style.chart.zoom.show;
647
- }, { immediate: !0 });
648
- function U(t, h, o = "Arial") {
649
- const $ = document.createElement("canvas").getContext("2d");
650
- return $.font = `${h}px ${e.value.style.chart.words.bold ? "bold" : "normal"} ${o}`, {
651
- width: $.measureText(t).width + e.value.style.chart.words.proximity,
652
- height: h
653
- };
654
- }
655
- const D = z([]), q = /* @__PURE__ */ new Map();
656
- function ce() {
657
- const t = [...Fe.value].map(($) => $.value), h = Math.max(...t), o = Math.min(...t), F = [...Fe.value].map(($, T) => {
658
- let H = ($.value - o) / (h - o) * (O.value.maxFontSize - O.value.minFontSize) + O.value.minFontSize;
659
- H = isNaN(H) ? O.value.minFontSize : H;
660
- const ve = U($.name, H);
661
- return {
662
- ...$,
663
- id: $.id ?? `${$.name}__${T}`,
664
- fontSize: H,
665
- width: ve.width,
666
- height: ve.height,
667
- color: e.value.style.chart.words.usePalette ? e.value.customPalette[T] || e.value.customPalette[T % e.value.customPalette.length] || We[T] || We[T % We.length] : e.value.style.chart.words.color
668
- };
669
- });
670
- D.value.length = 0, q.clear(), Fo({
671
- debugTiming: Ae.value,
672
- words: F,
673
- svg: O.value,
674
- proximity: e.value.style.chart.words.proximity,
675
- strictPixelPadding: e.value.strictPixelPadding,
676
- onProgress: ({ all: $ }) => {
677
- for (const T of $) {
678
- const H = T.id;
679
- let ve = q.get(H);
680
- if (ve === void 0)
681
- ve = D.value.length, q.set(H, ve), D.value.push({ ...T });
682
- else {
683
- const ee = D.value[ve];
684
- ee.x = T.x, ee.y = T.y, ee.width = T.width, ee.height = T.height, ee.fontSize = T.fontSize, ee.minX = T.minX, ee.minY = T.minY, ee.maxX = T.maxX, ee.maxY = T.maxY;
685
- }
686
- }
687
- }
688
- }), D.value.sort(($, T) => T.fontSize - $.fontSize), q.clear(), D.value.forEach(($, T) => {
689
- q.set($.id, T);
690
- }), re.value = !0, fe.value = !1;
691
- }
692
- const pe = ie(() => {
693
- const t = D.value.map((o) => ({
694
- name: o.name,
695
- color: o.color
696
- })), h = D.value.map((o) => o.value);
697
- return { head: t, body: h };
698
- });
699
- function Me(t = null) {
700
- at(() => {
701
- const h = pe.value.head.map(($, T) => [[
702
- $.name
703
- ], [pe.value.body[T]]]), o = [[e.value.style.chart.title.text], [e.value.style.chart.title.subtitle.text], [[""], [e.value.table.columnNames.value]]].concat(h), F = qt(o);
704
- t ? t(F) : Ht({ csvContent: F, title: e.value.style.chart.title.text || "vue-ui-word-cloud" });
705
- });
706
- }
707
- const ge = ie(() => {
708
- const t = [
709
- e.value.table.columnNames.series,
710
- e.value.table.columnNames.value
711
- ], h = pe.value.head.map(($, T) => {
712
- const H = Lt({ p: e.value.table.td.prefix, v: pe.value.body[T], s: e.value.table.td.suffix, r: e.value.table.td.roundingValue });
713
- return [
714
- {
715
- color: $.color,
716
- name: $.name
717
- },
718
- H
719
- ];
720
- }), o = {
721
- th: {
722
- backgroundColor: e.value.table.th.backgroundColor,
723
- color: e.value.table.th.color,
724
- outline: e.value.table.th.outline
725
- },
726
- td: {
727
- backgroundColor: e.value.table.td.backgroundColor,
728
- color: e.value.table.td.color,
729
- outline: e.value.table.td.outline
730
- },
731
- breakpoint: e.value.table.responsiveBreakpoint
732
- };
733
- return {
734
- colNames: [
735
- e.value.table.columnNames.series,
736
- e.value.table.columnNames.value
737
- ],
738
- head: t,
739
- body: h,
740
- config: o
741
- };
742
- }), ne = z(!1);
743
- function de(t) {
744
- ne.value = t, M.value += 1;
745
- }
746
- function ze() {
747
- return D.value;
748
- }
749
- function Oe() {
750
- x.value.showTable = !x.value.showTable;
751
- }
752
- function Xe() {
753
- x.value.showTooltip = !x.value.showTooltip;
754
- }
755
- const L = z(!1);
756
- function Q() {
757
- L.value = !L.value;
758
- }
759
- function le() {
760
- x.value.showZoom = !x.value.showZoom;
761
- }
762
- const Ge = ie(() => !L.value && x.value.showZoom), { viewBox: be, resetZoom: ye, isZoom: kt, setInitialViewBox: wt } = io(he, {
763
- x: 0,
764
- y: 0,
765
- width: O.value.width <= 0 ? 10 : O.value.width,
766
- height: O.value.height <= 0 ? 10 : O.value.height
767
- }, 1, Ge);
768
- Pe(() => y.dataset, () => {
769
- Fe.value = xe(), e.value.responsive || (ce(), Se());
770
- }, { immediate: !0 });
771
- async function Ft({ scale: t = 2 } = {}) {
772
- if (!C.value) return;
773
- const { width: h, height: o } = C.value.getBoundingClientRect(), F = h / o, { imageUri: $, base64: T } = await lo({ domElement: C.value, base64: !0, img: !0, scale: t });
774
- return {
775
- imageUri: $,
776
- base64: T,
777
- title: e.value.style.chart.title.text,
778
- width: h,
779
- height: o,
780
- aspectRatio: F
781
- };
782
- }
783
- const Ee = ie(() => {
784
- const t = e.value.table.useDialog && !e.value.table.show, h = x.value.showTable;
785
- return {
786
- component: t ? v : r,
787
- title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
788
- props: t ? {
789
- backgroundColor: e.value.table.th.backgroundColor,
790
- color: e.value.table.th.color,
791
- headerColor: e.value.table.th.color,
792
- headerBg: e.value.table.th.backgroundColor,
793
- isFullscreen: ne.value,
794
- fullscreenParent: C.value,
795
- forcedWidth: Math.min(500, window.innerWidth * 0.8)
796
- } : {
797
- hideDetails: !0,
798
- config: {
799
- open: h,
800
- maxHeight: 1e4,
801
- body: {
802
- backgroundColor: e.value.style.chart.backgroundColor,
803
- color: e.value.style.chart.color
804
- },
805
- head: {
806
- backgroundColor: e.value.style.chart.backgroundColor,
807
- color: e.value.style.chart.color
808
- }
809
- }
810
- }
811
- };
812
- });
813
- Pe(() => x.value.showTable, (t) => {
814
- e.value.table.show || (t && e.value.table.useDialog && W.value ? W.value.open() : "close" in W.value && W.value.close());
815
- });
816
- function Ke() {
817
- x.value.showTable = !1, P.value && P.value.setTableIconState(!1);
818
- }
819
- const xt = ie(() => e.value.style.chart.backgroundColor), St = ie(() => e.value.style.chart.title), { exportSvg: At, getSvg: $t } = to({
820
- svg: he,
821
- title: St,
822
- backgroundColor: xt
823
- });
824
- async function Je({ isCb: t }) {
825
- if (t) {
826
- const { blob: h, url: o, text: F, dataUrl: $ } = await $t();
827
- e.value.userOptions.callbacks.svg({ blob: h, url: o, text: F, dataUrl: $ });
828
- } else
829
- At();
830
- }
831
- i({
832
- getData: ze,
833
- getImage: Ft,
834
- generateCsv: Me,
835
- generatePdf: De,
836
- generateImage: Te,
837
- generateSvg: Je,
838
- resetZoom: ye,
839
- toggleTable: Oe,
840
- toggleTooltip: Xe,
841
- toggleAnnotator: Q,
842
- toggleFullscreen: de,
843
- toggleZoom: le
844
- });
845
- const Ce = z(null), Ie = z(!1), Le = z(""), je = z(null);
846
- function Tt(t, h) {
847
- Ce.value = null, B.value = !1, e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: t, seriesIndex: h });
848
- }
849
- function Mt(t, h) {
850
- e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: t, seriesIndex: h });
851
- }
852
- function zt(t, h) {
853
- if (e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: t, seriesIndex: h }), !x.value.showTooltip) return;
854
- Ce.value = t.id, je.value = { datapoint: t, config: e.value };
855
- const o = e.value.style.chart.tooltip.customFormat;
856
- if (Ie.value = !1, Gt(o))
857
- try {
858
- const F = o({
859
- datapoint: t,
860
- config: e.value
861
- });
862
- typeof F == "string" && (Le.value = F, Ie.value = !0);
863
- } catch {
864
- console.warn("Custom format cannot be applied."), Ie.value = !1;
865
- }
866
- if (!Ie.value) {
867
- let F = `<svg viewBox="0 0 10 10" height="${e.value.style.chart.tooltip.fontSize}"><circle cx="5" cy="5" r="5" fill="${t.color}"/></svg><span>${t.name}:</span><b>${(t.value || 0).toFixed(e.value.style.chart.tooltip.roundingValue)}</b>`;
868
- Le.value = `<div dir="auto" style="display:flex; gap:4px; align-items:center; jsutify-content:center;">${F}</div>`;
869
- }
870
- B.value = !0;
871
- }
872
- return (t, h) => (_(), G("div", {
873
- class: "vue-data-ui-component vue-ui-word-cloud",
874
- ref_key: "wordCloudChart",
875
- ref: C,
876
- id: `wordCloud_${a.value}`,
877
- "data-resizing": te.value,
878
- "data-relayout": fe.value,
879
- style: _e(`width: 100%; font-family:${e.value.style.fontFamily};background:${e.value.style.chart.backgroundColor};${e.value.responsive ? "height:100%" : ""}`),
880
- onMouseenter: h[2] || (h[2] = () => A(Be)(!0)),
881
- onMouseleave: h[3] || (h[3] = () => A(Be)(!1))
882
- }, [
883
- e.value.userOptions.buttons.annotator ? (_(), ke(A(u), {
884
- key: 0,
885
- svgRef: A(he),
886
- backgroundColor: e.value.style.chart.backgroundColor,
887
- color: e.value.style.chart.color,
888
- active: L.value,
889
- onClose: Q
890
- }, {
891
- "annotator-action-close": E(() => [
892
- I(t.$slots, "annotator-action-close", {}, void 0, !0)
893
- ]),
894
- "annotator-action-color": E(({ color: o }) => [
895
- I(t.$slots, "annotator-action-color", V(Z({ color: o })), void 0, !0)
896
- ]),
897
- "annotator-action-draw": E(({ mode: o }) => [
898
- I(t.$slots, "annotator-action-draw", V(Z({ mode: o })), void 0, !0)
899
- ]),
900
- "annotator-action-undo": E(({ disabled: o }) => [
901
- I(t.$slots, "annotator-action-undo", V(Z({ disabled: o })), void 0, !0)
902
- ]),
903
- "annotator-action-redo": E(({ disabled: o }) => [
904
- I(t.$slots, "annotator-action-redo", V(Z({ disabled: o })), void 0, !0)
905
- ]),
906
- "annotator-action-delete": E(({ disabled: o }) => [
907
- I(t.$slots, "annotator-action-delete", V(Z({ disabled: o })), void 0, !0)
908
- ]),
909
- _: 3
910
- }, 8, ["svgRef", "backgroundColor", "color", "active"])) : K("", !0),
911
- e.value.style.chart.title.text ? (_(), G("div", {
912
- key: 1,
913
- ref_key: "chartTitle",
914
- ref: S,
915
- style: "width:100%;background:transparent;padding-bottom:24px"
916
- }, [
917
- (_(), ke(so, {
918
- key: `title_${w.value}`,
919
- config: {
920
- title: {
921
- ...e.value.style.chart.title
922
- },
923
- subtitle: {
924
- ...e.value.style.chart.title.subtitle
925
- }
926
- }
927
- }, null, 8, ["config"]))
928
- ], 512)) : K("", !0),
929
- e.value.userOptions.show && l.value && (A(Ze) || A(N)) ? (_(), ke(A(n), {
930
- ref_key: "userOptionsRef",
931
- ref: P,
932
- key: `user_option_${M.value}`,
933
- backgroundColor: e.value.style.chart.backgroundColor,
934
- color: e.value.style.chart.color,
935
- isPrinting: A($e),
936
- isImaging: A(me),
937
- uid: a.value,
938
- hasPdf: e.value.userOptions.buttons.pdf,
939
- hasXls: e.value.userOptions.buttons.csv,
940
- hasImg: e.value.userOptions.buttons.img,
941
- hasSvg: e.value.userOptions.buttons.svg,
942
- hasTable: e.value.userOptions.buttons.table,
943
- hasFullscreen: e.value.userOptions.buttons.fullscreen,
944
- isFullscreen: ne.value,
945
- titles: { ...e.value.userOptions.buttonTitles },
946
- chartElement: C.value,
947
- position: e.value.userOptions.position,
948
- hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
949
- isTooltip: x.value.showTooltip,
950
- hasAnnotator: e.value.userOptions.buttons.annotator,
951
- isAnnotation: L.value,
952
- callbacks: e.value.userOptions.callbacks,
953
- printScale: e.value.userOptions.print.scale,
954
- tableDialog: e.value.table.useDialog,
955
- hasZoom: e.value.userOptions.buttons.zoom,
956
- isZoom: x.value.showZoom,
957
- onToggleFullscreen: de,
958
- onGeneratePdf: A(De),
959
- onGenerateCsv: Me,
960
- onGenerateImage: A(Te),
961
- onGenerateSvg: Je,
962
- onToggleTable: Oe,
963
- onToggleTooltip: Xe,
964
- onToggleAnnotator: Q,
965
- onToggleZoom: le,
966
- style: _e({
967
- visibility: A(Ze) ? A(N) ? "visible" : "hidden" : "visible"
968
- })
969
- }, et({ _: 2 }, [
970
- t.$slots.menuIcon ? {
971
- name: "menuIcon",
972
- fn: E(({ isOpen: o, color: F }) => [
973
- I(t.$slots, "menuIcon", V(Z({ isOpen: o, color: F })), void 0, !0)
974
- ]),
975
- key: "0"
976
- } : void 0,
977
- t.$slots.optionPdf ? {
978
- name: "optionPdf",
979
- fn: E(() => [
980
- I(t.$slots, "optionPdf", {}, void 0, !0)
981
- ]),
982
- key: "1"
983
- } : void 0,
984
- t.$slots.optionCsv ? {
985
- name: "optionCsv",
986
- fn: E(() => [
987
- I(t.$slots, "optionCsv", {}, void 0, !0)
988
- ]),
989
- key: "2"
990
- } : void 0,
991
- t.$slots.optionImg ? {
992
- name: "optionImg",
993
- fn: E(() => [
994
- I(t.$slots, "optionImg", {}, void 0, !0)
995
- ]),
996
- key: "3"
997
- } : void 0,
998
- t.$slots.optionSvg ? {
999
- name: "optionSvg",
1000
- fn: E(() => [
1001
- I(t.$slots, "optionSvg", {}, void 0, !0)
1002
- ]),
1003
- key: "4"
1004
- } : void 0,
1005
- t.$slots.optionTable ? {
1006
- name: "optionTable",
1007
- fn: E(() => [
1008
- I(t.$slots, "optionTable", {}, void 0, !0)
1009
- ]),
1010
- key: "5"
1011
- } : void 0,
1012
- t.$slots.optionFullscreen ? {
1013
- name: "optionFullscreen",
1014
- fn: E(({ toggleFullscreen: o, isFullscreen: F }) => [
1015
- I(t.$slots, "optionFullscreen", V(Z({ toggleFullscreen: o, isFullscreen: F })), void 0, !0)
1016
- ]),
1017
- key: "6"
1018
- } : void 0,
1019
- t.$slots.optionAnnotator ? {
1020
- name: "optionAnnotator",
1021
- fn: E(({ toggleAnnotator: o, isAnnotator: F }) => [
1022
- I(t.$slots, "optionAnnotator", V(Z({ toggleAnnotator: o, isAnnotator: F })), void 0, !0)
1023
- ]),
1024
- key: "7"
1025
- } : void 0,
1026
- t.$slots.optionZoom ? {
1027
- name: "optionZoom",
1028
- fn: E(({ toggleZoom: o, isZoomLocked: F }) => [
1029
- I(t.$slots, "optionZoom", V(Z({ toggleZoom: o, isZoomLocked: F })), void 0, !0)
1030
- ]),
1031
- key: "8"
1032
- } : void 0
1033
- ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasSvg", "hasTable", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasTooltip", "isTooltip", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "tableDialog", "hasZoom", "isZoom", "onGeneratePdf", "onGenerateImage", "style"])) : K("", !0),
1034
- (_(), G("svg", {
1035
- ref_key: "svgRef",
1036
- ref: he,
1037
- class: tt({ "vue-data-ui-fullscreen--on": ne.value, "vue-data-ui-fulscreen--off": !ne.value }),
1038
- xmlns: A(jt),
1039
- viewBox: `${A(be).x} ${A(be).y} ${A(be).width} ${A(be).height}`,
1040
- style: "overflow:hidden;background:transparent;"
1041
- }, [
1042
- Ye(A(g)),
1043
- t.$slots["chart-background"] ? (_(), G("foreignObject", {
1044
- key: 0,
1045
- x: 0,
1046
- y: 0,
1047
- width: O.value.width <= 0 ? 10 : O.value.width,
1048
- height: O.value.height <= 0 ? 10 : O.value.height,
1049
- style: {
1050
- pointerEvents: "none"
1051
- }
1052
- }, [
1053
- I(t.$slots, "chart-background", {}, void 0, !0)
1054
- ], 8, Ao)) : K("", !0),
1055
- Re("g", {
1056
- transform: `translate(${X.value.x}, ${X.value.y})`,
1057
- class: tt({ "wc-finalized": re.value })
1058
- }, [
1059
- (_(!0), G(Rt, null, Bt(D.value, (o, F) => (_(), G("g", {
1060
- key: o.id,
1061
- class: "vue-ui-word-cloud-word",
1062
- transform: `translate(${o.x}, ${o.y})`
1063
- }, [
1064
- o.minX !== void 0 ? (_(), G("rect", {
1065
- key: 0,
1066
- x: o.minX,
1067
- y: o.minY * 1.25,
1068
- width: o.maxX - o.minX,
1069
- height: o.maxY - o.minY,
1070
- fill: "transparent",
1071
- "pointer-events": "visiblePainted",
1072
- onMouseover: ($) => zt(o, F),
1073
- onMouseleave: ($) => Tt(o, F),
1074
- onClick: ($) => Mt(o, F)
1075
- }, null, 40, Mo)) : K("", !0),
1076
- Re("text", {
1077
- fill: o.color,
1078
- "font-weight": e.value.style.chart.words.bold ? "bold" : "normal",
1079
- x: 0,
1080
- y: 0,
1081
- "font-size": o.fontSize,
1082
- transform: `translate(${o.width / 2}, ${o.height / 2})`,
1083
- "text-anchor": "middle",
1084
- "dominant-baseline": "central",
1085
- "paint-order": "stroke fill",
1086
- stroke: !Ce.value || Ce.value === o.id ? e.value.style.chart.words.selectedStroke : void 0,
1087
- "stroke-width": o.height * 0.05,
1088
- "stroke-linecap": "round",
1089
- "stroke-linejoin": "round",
1090
- style: _e(`
1091
- pointer-events:none;
1092
- fill-opacity:${!Ce.value || Ce.value === o.id || !re.value ? 1 : e.value.style.chart.words.hoverOpacity} !important;
1093
- `)
1094
- }, qe(o.name), 13, zo)
1095
- ], 8, To))), 128))
1096
- ], 10, $o),
1097
- I(t.$slots, "svg", {
1098
- svg: { height: O.value.height, width: O.value.width }
1099
- }, void 0, !0)
1100
- ], 10, So)),
1101
- t.$slots.watermark ? (_(), G("div", Oo, [
1102
- I(t.$slots, "watermark", V(Z({ isPrinting: A($e) || A(me) })), void 0, !0)
1103
- ])) : K("", !0),
1104
- A(kt) ? (_(), G("div", Eo, [
1105
- I(t.$slots, "reset-action", { reset: A(ye) }, () => [
1106
- Re("button", {
1107
- "data-cy-reset": "",
1108
- tabindex: "0",
1109
- role: "button",
1110
- class: "vue-data-ui-refresh-button",
1111
- style: _e({
1112
- background: e.value.style.chart.backgroundColor
1113
- }),
1114
- onClick: h[0] || (h[0] = (o) => A(ye)(!0))
1115
- }, [
1116
- Ye(A(d), {
1117
- name: "refresh",
1118
- stroke: e.value.style.chart.color
1119
- }, null, 8, ["stroke"])
1120
- ], 4)
1121
- ], !0)
1122
- ])) : K("", !0),
1123
- Ye(A(f), {
1124
- show: x.value.showTooltip && B.value,
1125
- backgroundColor: e.value.style.chart.tooltip.backgroundColor,
1126
- color: e.value.style.chart.tooltip.color,
1127
- fontSize: e.value.style.chart.tooltip.fontSize,
1128
- borderRadius: e.value.style.chart.tooltip.borderRadius,
1129
- borderColor: e.value.style.chart.tooltip.borderColor,
1130
- borderWidth: e.value.style.chart.tooltip.borderWidth,
1131
- backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
1132
- position: e.value.style.chart.tooltip.position,
1133
- offsetY: e.value.style.chart.tooltip.offsetY,
1134
- parent: C.value,
1135
- content: Le.value,
1136
- isCustom: Ie.value,
1137
- isFullscreen: ne.value,
1138
- smooth: e.value.style.chart.tooltip.smooth,
1139
- backdropFilter: e.value.style.chart.tooltip.backdropFilter,
1140
- smoothForce: e.value.style.chart.tooltip.smoothForce,
1141
- smoothSnapThreshold: e.value.style.chart.tooltip.smoothSnapThreshold
1142
- }, {
1143
- "tooltip-before": E(() => [
1144
- I(t.$slots, "tooltip-before", V(Z({ ...je.value })), void 0, !0)
1145
- ]),
1146
- "tooltip-after": E(() => [
1147
- I(t.$slots, "tooltip-after", V(Z({ ...je.value })), void 0, !0)
1148
- ]),
1149
- _: 3
1150
- }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "isFullscreen", "smooth", "backdropFilter", "smoothForce", "smoothSnapThreshold"]),
1151
- t.$slots.source ? (_(), G("div", {
1152
- key: 5,
1153
- ref_key: "source",
1154
- ref: c,
1155
- dir: "auto"
1156
- }, [
1157
- I(t.$slots, "source", {}, void 0, !0)
1158
- ], 512)) : K("", !0),
1159
- l.value && e.value.userOptions.buttons.table ? (_(), ke(Dt(Ee.value.component), Xt({ key: 6 }, Ee.value.props, {
1160
- ref_key: "tableUnit",
1161
- ref: W,
1162
- onClose: Ke
1163
- }), et({
1164
- content: E(() => [
1165
- (_(), ke(A(m), {
1166
- key: `table_${Y.value}`,
1167
- colNames: ge.value.colNames,
1168
- head: ge.value.head,
1169
- body: ge.value.body,
1170
- config: ge.value.config,
1171
- title: e.value.table.useDialog ? "" : Ee.value.title,
1172
- withCloseButton: !e.value.table.useDialog,
1173
- onClose: Ke
1174
- }, {
1175
- th: E(({ th: o }) => [
1176
- Re("div", {
1177
- innerHTML: o,
1178
- style: { display: "flex", "align-items": "center" }
1179
- }, null, 8, Io)
1180
- ]),
1181
- td: E(({ td: o }) => [
1182
- ot(qe(o.name || o), 1)
1183
- ]),
1184
- _: 1
1185
- }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"]))
1186
- ]),
1187
- _: 2
1188
- }, [
1189
- e.value.table.useDialog ? {
1190
- name: "title",
1191
- fn: E(() => [
1192
- ot(qe(Ee.value.title), 1)
1193
- ]),
1194
- key: "0"
1195
- } : void 0,
1196
- e.value.table.useDialog ? {
1197
- name: "actions",
1198
- fn: E(() => [
1199
- Re("button", {
1200
- tabindex: "0",
1201
- class: "vue-ui-user-options-button",
1202
- onClick: h[1] || (h[1] = (o) => Me(e.value.userOptions.callbacks.csv))
1203
- }, [
1204
- Ye(A(d), {
1205
- name: "excel",
1206
- stroke: Ee.value.props.color
1207
- }, null, 8, ["stroke"])
1208
- ])
1209
- ]),
1210
- key: "1"
1211
- } : void 0
1212
- ]), 1040)) : K("", !0),
1213
- A(Ne) ? (_(), ke(Qt, { key: 7 })) : K("", !0)
1214
- ], 44, xo));
1215
- }
1216
- }, Ro = /* @__PURE__ */ ro(Po, [["__scopeId", "data-v-6599bd6f"]]), Ko = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1217
- __proto__: null,
1218
- default: Ro
1219
- }, Symbol.toStringTag, { value: "Module" }));
1220
- export {
1221
- Go as a,
1222
- Ko as b,
1223
- Ro as v
1224
- };