vue-data-ui 3.0.23 → 3.1.1

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 (108) hide show
  1. package/dist/{Arrow-B1Op9F3x.js → Arrow-xQM7mBzd.js} +1 -1
  2. package/dist/{BaseDraggableDialog-B4OaMIom.js → BaseDraggableDialog-B2BQC0-h.js} +72 -59
  3. package/dist/{BaseIcon-CgUOIGjr.js → BaseIcon-DLesaZpW.js} +1 -1
  4. package/dist/{useLoading-D7YHNtLX.js → BaseScanner-BgWxam9d.js} +11 -11
  5. package/dist/{ColorPicker-C0nf8VH0.js → ColorPicker-BKvJvFtX.js} +2 -2
  6. package/dist/DataTable-BAf4Obr9.js +140 -0
  7. package/dist/{Legend-CyYXMSsW.js → Legend-8_V5egWW.js} +2 -2
  8. package/dist/{NonSvgPenAndPaper-D63qeScu.js → NonSvgPenAndPaper-Cq4fHmA0.js} +3 -3
  9. package/dist/{PackageVersion-B6M-3jRt.js → PackageVersion-Cv_ypT0N.js} +1 -1
  10. package/dist/{PenAndPaper-zym5uEeN.js → PenAndPaper-B6OvfyHH.js} +3 -3
  11. package/dist/{Shape-CYVs2kYz.js → Shape-Cjca5zta.js} +1 -1
  12. package/dist/{Slicer-BTIFUO4x.js → Slicer-6w3K8gAc.js} +2 -2
  13. package/dist/{SparkTooltip-CNz7AYUL.js → SparkTooltip-BV4Z-NMp.js} +1 -1
  14. package/dist/{Title-D_e0SFWS.js → Title-Dz-j6ERs.js} +1 -1
  15. package/dist/{Tooltip-DjVoFYj1.js → Tooltip-BTGOEC7w.js} +1 -1
  16. package/dist/{UserOptions-z0NWZ7aQ.js → UserOptions-CsDlFB0L.js} +2 -2
  17. package/dist/{dom-to-png-DD0au3Qz.js → dom-to-png-BOu5-Ohz.js} +1 -1
  18. package/dist/{img-z5p1gGfY.js → img-gBDz7xQQ.js} +1 -1
  19. package/dist/{index-BEuUtONc.js → index-BKQqb9lF.js} +37 -2
  20. package/dist/{pdf-BmUjVBni.js → pdf-Cjsn5GEE.js} +1 -1
  21. package/dist/style.css +1 -1
  22. package/dist/types/vue-data-ui.d.cts +35 -0
  23. package/dist/types/vue-data-ui.d.ts +35 -0
  24. package/dist/{useAutoSizeLabelsInsideViewbox-CchB8S-o.js → useAutoSizeLabelsInsideViewbox-IO2dh0Uq.js} +1 -1
  25. package/dist/{useNestedProp-DhLFhguL.js → useNestedProp-aBOhgs4U.js} +1 -1
  26. package/dist/{usePrinter-DiB0_UNt.js → usePrinter-BzuXiubT.js} +2 -2
  27. package/dist/useTableResponsive-Cbx-ACcP.js +22 -0
  28. package/dist/{vue-data-ui-DJIAas-7.js → vue-data-ui-B6eM6hF3.js} +64 -64
  29. package/dist/vue-data-ui.js +1 -1
  30. package/dist/vue-ui-3d-bar-DBeWmnvH.js +1369 -0
  31. package/dist/{vue-ui-accordion-B4YfUjZ5.js → vue-ui-accordion-B5QeV3BK.js} +3 -3
  32. package/dist/{vue-ui-age-pyramid-CkXXNN79.js → vue-ui-age-pyramid-rZFdUsgz.js} +333 -286
  33. package/dist/{vue-ui-annotator-DnSsIkvU.js → vue-ui-annotator-CCCuslrT.js} +2 -2
  34. package/dist/{vue-ui-bullet-kZkBsWPY.js → vue-ui-bullet-DhJf9mvK.js} +8 -8
  35. package/dist/{vue-ui-candlestick-CIn0xZm0.js → vue-ui-candlestick-CGVtDKqZ.js} +453 -406
  36. package/dist/{vue-ui-carousel-table-f1FDOAqH.js → vue-ui-carousel-table-DLAR3WY8.js} +4 -4
  37. package/dist/{vue-ui-chestnut-B-jSj7FT.js → vue-ui-chestnut-BXnSxoXB.js} +563 -520
  38. package/dist/vue-ui-chord-DH_MwAKX.js +1100 -0
  39. package/dist/vue-ui-circle-pack-Cx_E1R63.js +755 -0
  40. package/dist/{vue-ui-cursor-DdBrui6i.js → vue-ui-cursor-CEvH1qDS.js} +2 -2
  41. package/dist/{vue-ui-dashboard-DSUfW7mI.js → vue-ui-dashboard-CvduVgEy.js} +62 -62
  42. package/dist/{vue-ui-digits-Cb3Wq5WR.js → vue-ui-digits-PTozKs3l.js} +2 -2
  43. package/dist/{vue-ui-donut-BCZqlAO3.js → vue-ui-donut-CsEtKJJD.js} +477 -431
  44. package/dist/{vue-ui-donut-evolution-HmQBq9VP.js → vue-ui-donut-evolution-DD7o-CxF.js} +482 -435
  45. package/dist/{vue-ui-dumbbell-B5w2oqNO.js → vue-ui-dumbbell-DfPYl3fu.js} +443 -398
  46. package/dist/vue-ui-flow-CSTTZHwg.js +900 -0
  47. package/dist/vue-ui-funnel-C-NUZqIo.js +666 -0
  48. package/dist/vue-ui-galaxy-BwsZnU6T.js +744 -0
  49. package/dist/{vue-ui-gauge-C_KLPWk2.js → vue-ui-gauge-D9MUneq0.js} +8 -8
  50. package/dist/{vue-ui-gizmo-CsPX25Ti.js → vue-ui-gizmo-Dnzs9wSf.js} +4 -4
  51. package/dist/{vue-ui-heatmap-BHq6hBaL.js → vue-ui-heatmap-CYaQIhy8.js} +501 -461
  52. package/dist/{vue-ui-history-plot-DgpYiaUD.js → vue-ui-history-plot-DMTFzl-_.js} +408 -361
  53. package/dist/{vue-ui-kpi-DOgibU7W.js → vue-ui-kpi-CkPotdff.js} +3 -3
  54. package/dist/{vue-ui-mini-loader-BjsQAxDx.js → vue-ui-mini-loader-CCE-bDOJ.js} +2 -2
  55. package/dist/vue-ui-molecule-DaN5lroq.js +702 -0
  56. package/dist/{vue-ui-mood-radar-DMwVl3wz.js → vue-ui-mood-radar-tM0mmZh8.js} +342 -291
  57. package/dist/{vue-ui-nested-donuts-H0GzIAF0.js → vue-ui-nested-donuts-RB4r6beI.js} +548 -502
  58. package/dist/{vue-ui-onion-A6nKcus1.js → vue-ui-onion-CxDozHg3.js} +363 -317
  59. package/dist/vue-ui-parallel-coordinate-plot-CK9nNExU.js +979 -0
  60. package/dist/vue-ui-quadrant-C7tLJYn7.js +1483 -0
  61. package/dist/{vue-ui-quick-chart-mwXE3w_o.js → vue-ui-quick-chart-MUBAkrHb.js} +7 -7
  62. package/dist/vue-ui-radar-Br4K80I9.js +858 -0
  63. package/dist/{vue-ui-rating-CleNHFo5.js → vue-ui-rating-NtvT9r_M.js} +2 -2
  64. package/dist/{vue-ui-relation-circle-CMCH7Ia6.js → vue-ui-relation-circle-CPQjAy1g.js} +8 -8
  65. package/dist/vue-ui-ridgeline-C2M_Cjlh.js +1204 -0
  66. package/dist/vue-ui-rings-DEru-cWN.js +785 -0
  67. package/dist/{vue-ui-scatter-kv28dsT3.js → vue-ui-scatter-CJKkiKle.js} +594 -548
  68. package/dist/{vue-ui-skeleton-DCNOYh9x.js → vue-ui-skeleton--twnjS2t.js} +3 -3
  69. package/dist/{vue-ui-smiley-DcS0CM-z.js → vue-ui-smiley-CNccdPZ7.js} +2 -2
  70. package/dist/{vue-ui-spark-trend-LHgReXth.js → vue-ui-spark-trend-9BFkkC0u.js} +4 -4
  71. package/dist/{vue-ui-sparkbar-Da315uRq.js → vue-ui-sparkbar-RYAThoA4.js} +4 -4
  72. package/dist/{vue-ui-sparkgauge-BeAkjGap.js → vue-ui-sparkgauge-DkPlmgMF.js} +4 -4
  73. package/dist/{vue-ui-sparkhistogram-Cy19W3y1.js → vue-ui-sparkhistogram-6EkCyYRF.js} +5 -5
  74. package/dist/{vue-ui-sparkline-IjlQWgs3.js → vue-ui-sparkline-Bl3nj8zd.js} +4 -4
  75. package/dist/{vue-ui-sparkstackbar-CoFgOa3r.js → vue-ui-sparkstackbar-B88lA7iy.js} +4 -4
  76. package/dist/{vue-ui-stackbar-fbCs4sHF.js → vue-ui-stackbar-Csj7NhT6.js} +525 -479
  77. package/dist/{vue-ui-strip-plot-Cm8Zr6RE.js → vue-ui-strip-plot-yY9NsUUI.js} +390 -343
  78. package/dist/{vue-ui-table-q7jWgS26.js → vue-ui-table-Dg6U31ex.js} +3 -3
  79. package/dist/{vue-ui-table-heatmap-CsK9gR1G.js → vue-ui-table-heatmap-BWU7CAWP.js} +5 -5
  80. package/dist/{vue-ui-table-sparkline-CXTPucPr.js → vue-ui-table-sparkline-DV4Y9aRL.js} +4 -4
  81. package/dist/{vue-ui-thermometer-BFxdNgrd.js → vue-ui-thermometer-C3fKamV-.js} +8 -8
  82. package/dist/{vue-ui-timer-BsoeDFjK.js → vue-ui-timer-6VAK9XyF.js} +5 -5
  83. package/dist/{vue-ui-tiremarks-BW_jSayT.js → vue-ui-tiremarks-BB-KAkF7.js} +7 -7
  84. package/dist/vue-ui-treemap-GrXkD_3Z.js +1092 -0
  85. package/dist/{vue-ui-vertical-bar-OrLV4CxH.js → vue-ui-vertical-bar-Mmz6u4aX.js} +504 -461
  86. package/dist/{vue-ui-waffle-BA6rNfVs.js → vue-ui-waffle-DzPVRUOA.js} +416 -370
  87. package/dist/{vue-ui-wheel-B_BkI-5f.js → vue-ui-wheel-idRCvS5t.js} +7 -7
  88. package/dist/vue-ui-word-cloud-B2641uNP.js +811 -0
  89. package/dist/{vue-ui-world-B4mKuSSn.js → vue-ui-world-D6s5Eph8.js} +512 -466
  90. package/dist/{vue-ui-xy-m1SWJk77.js → vue-ui-xy-BKTGSvfU.js} +1551 -1500
  91. package/dist/vue-ui-xy-canvas-BOQyxVRl.js +1291 -0
  92. package/package.json +1 -1
  93. package/dist/DataTable-nO6ydJO2.js +0 -133
  94. package/dist/vue-ui-3d-bar-B56WqLJ-.js +0 -1323
  95. package/dist/vue-ui-chord-Ck4yV3Tb.js +0 -1049
  96. package/dist/vue-ui-circle-pack-BAfRk_Hd.js +0 -709
  97. package/dist/vue-ui-flow-BXkxtUoF.js +0 -852
  98. package/dist/vue-ui-funnel-DFvDO--q.js +0 -620
  99. package/dist/vue-ui-galaxy-BXNLLc3U.js +0 -691
  100. package/dist/vue-ui-molecule-BtyMTwEn.js +0 -656
  101. package/dist/vue-ui-parallel-coordinate-plot-DZ9_0F5c.js +0 -927
  102. package/dist/vue-ui-quadrant-CUggSeUN.js +0 -1432
  103. package/dist/vue-ui-radar-BRKZ8e_X.js +0 -807
  104. package/dist/vue-ui-ridgeline-xW7UrSfR.js +0 -1157
  105. package/dist/vue-ui-rings-D3NfFMaO.js +0 -739
  106. package/dist/vue-ui-treemap-DhAYSVB9.js +0 -1046
  107. package/dist/vue-ui-word-cloud-CrSLGFOK.js +0 -765
  108. package/dist/vue-ui-xy-canvas-CX2JT6T3.js +0 -1243
@@ -0,0 +1,900 @@
1
+ import { defineAsyncComponent as R, ref as v, computed as g, onMounted as Kt, toRefs as Zt, watch as Te, createElementBlock as p, openBlock as i, unref as r, normalizeStyle as W, normalizeClass as bt, createBlock as q, createCommentVNode as T, createElementVNode as Y, createVNode as xe, createSlots as Ct, withCtx as b, renderSlot as k, normalizeProps as Q, guardReactiveProps as ee, Fragment as de, renderList as he, toDisplayString as te, Teleport as Jt, resolveDynamicComponent as Qt, mergeProps as eo, createTextVNode as kt, nextTick as to } from "vue";
2
+ import { u as oo, c as He, t as lo, o as wt, f as ao, a as no, p as L, b as so, d as ro, h as x, e as uo, i as fe, X as io, F as $t, L as co, k as Re, v as vo, w as ho, y as fo } from "./index-BKQqb9lF.js";
3
+ import { t as po, u as go } from "./useResponsive-DfdjqQps.js";
4
+ import { u as mo } from "./usePrinter-BzuXiubT.js";
5
+ import { u as yo, B as bo } from "./BaseScanner-BgWxam9d.js";
6
+ import { u as At } from "./useNestedProp-aBOhgs4U.js";
7
+ import { u as Co } from "./useUserOptionState-BIvW1Kz7.js";
8
+ import { u as ko } from "./useChartAccessibility-9icAAmYg.js";
9
+ import wo from "./Legend-8_V5egWW.js";
10
+ import $o from "./Title-Dz-j6ERs.js";
11
+ import Ao from "./img-gBDz7xQQ.js";
12
+ import { _ as To } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
+ const xo = ["id"], _o = {
14
+ key: 1,
15
+ ref: "noTitle",
16
+ class: "vue-data-ui-no-title-space",
17
+ style: "height:36px; width: 100%;background:transparent"
18
+ }, So = ["id"], Oo = ["xmlns", "viewBox"], No = ["width", "height"], Fo = ["id"], Eo = ["stop-color"], Po = ["stop-color"], Mo = ["d", "fill", "stroke", "stroke-width"], Io = ["x", "y", "height", "width", "fill", "stroke", "stroke-width", "onMouseenter", "onMouseleave", "onClick"], Do = { key: 1 }, Lo = ["x", "y", "font-size", "fill"], zo = ["x", "y", "font-size", "fill"], Bo = {
19
+ key: 4,
20
+ class: "vue-data-ui-watermark"
21
+ }, Ho = ["id"], Ro = ["onClick"], Wo = ["innerHTML"], Yo = {
22
+ __name: "vue-ui-flow",
23
+ props: {
24
+ config: {
25
+ type: Object,
26
+ default() {
27
+ return {};
28
+ }
29
+ },
30
+ dataset: {
31
+ type: Array,
32
+ default() {
33
+ return [];
34
+ }
35
+ }
36
+ },
37
+ setup(Tt, { expose: xt }) {
38
+ const _t = R(() => import("./Tooltip-BTGOEC7w.js")), St = R(() => import("./BaseIcon-DLesaZpW.js")), Ot = R(() => import("./vue-ui-accordion-B5QeV3BK.js")), Nt = R(() => import("./DataTable-BAf4Obr9.js")), Ft = R(() => import("./PenAndPaper-B6OvfyHH.js")), Et = R(() => import("./UserOptions-CsDlFB0L.js")), Pt = R(() => import("./PackageVersion-Cv_ypT0N.js")), Mt = R(() => import("./BaseDraggableDialog-B2BQC0-h.js")), { vue_ui_flow: It } = oo(), E = Tt, G = v(He()), I = v(null), We = v(0), Ye = v(0), _e = v(!1), Se = v(""), Ge = v(null), Ue = v(null), je = v(null), oe = v(null), pe = v(null), Ve = v(!1), le = v(null), Xe = g(() => !!E.dataset && E.dataset.length);
39
+ Kt(() => {
40
+ Ve.value = !0, Ke();
41
+ });
42
+ const U = v(!1);
43
+ function qe(o) {
44
+ U.value = o, We.value += 1;
45
+ }
46
+ const e = v(Ee()), { loading: Oe, FINAL_DATASET: ge, manualLoading: Ne } = yo({
47
+ ...Zt(E),
48
+ FINAL_CONFIG: e,
49
+ prepareConfig: Ee,
50
+ skeletonDataset: [
51
+ ["A", "B", 2, "#CACACA"],
52
+ ["B", "C", 1, "#CACACA"],
53
+ ["C", "D", 0.5, "#CACACA"],
54
+ ["E", "F", 1, "#AAAAAA"],
55
+ ["F", "G", 0.5, "#AAAAAA"],
56
+ ["G", "H", 0.25, "#AAAAAA"]
57
+ ],
58
+ skeletonConfig: lo({
59
+ defaultConfig: e.value,
60
+ userConfig: {
61
+ userOptions: { show: !1 },
62
+ nodeCategories: {
63
+ B: "A",
64
+ C: "B"
65
+ },
66
+ nodeCategoryColors: {
67
+ A: "#CACACA",
68
+ B: "#AAAAAA"
69
+ },
70
+ table: { show: !1 },
71
+ style: {
72
+ chart: {
73
+ backgroundColor: "#99999930",
74
+ legend: {
75
+ backgroundColor: "transparent"
76
+ },
77
+ nodes: {
78
+ labels: {
79
+ show: !1
80
+ },
81
+ stroke: "#666666"
82
+ },
83
+ links: {
84
+ stroke: "#666666"
85
+ }
86
+ }
87
+ }
88
+ }
89
+ })
90
+ }), Dt = g(() => !!e.value.debug);
91
+ function Ke() {
92
+ if (wt(E.dataset) && (ao({
93
+ componentName: "VueUiFlow",
94
+ type: "dataset",
95
+ debug: Dt.value
96
+ }), Ne.value = !0), wt(E.dataset) || (Ne.value = e.value.loading), e.value.responsive) {
97
+ const o = po(() => {
98
+ const { width: l, height: t } = go({
99
+ chart: I.value,
100
+ title: e.value.style.chart.title.text ? Ue.value : null,
101
+ legend: e.value.style.chart.legend.show ? Ge.value : null,
102
+ source: je.value
103
+ });
104
+ requestAnimationFrame(() => {
105
+ et.value = l, tt.value = t;
106
+ });
107
+ });
108
+ oe.value && (pe.value && oe.value.unobserve(pe.value), oe.value.disconnect()), oe.value = new ResizeObserver(o), pe.value = I.value.parentNode, oe.value.observe(pe.value);
109
+ }
110
+ }
111
+ const { userOptionsVisible: Fe, setUserOptionsVisibility: Ze, keepUserOptionState: Je } = Co({ config: e.value }), { svgRef: Qe } = ko({
112
+ config: e.value.style.chart.title
113
+ });
114
+ function Ee() {
115
+ const o = At({
116
+ userConfig: E.config,
117
+ defaultConfig: It
118
+ });
119
+ let l = o;
120
+ return o.theme ? l = {
121
+ ...At({
122
+ userConfig: so.vue_ui_flow[o.theme] || E.config,
123
+ defaultConfig: o
124
+ }),
125
+ customPalette: no[o.theme] || L
126
+ } : l = o, l.nodeCategories = E.config.nodeCategories || {}, l.nodeCategoryColors = E.config.nodeCategoryColors || {}, l;
127
+ }
128
+ const et = v(e.value.style.chart.width), tt = v(e.value.style.chart.height);
129
+ Te(
130
+ () => E.config,
131
+ (o) => {
132
+ Oe.value || (e.value = Ee()), Fe.value = !e.value.userOptions.showOnChartHover, Ke(), Ye.value += 1, _.value.showTable = e.value.table.show;
133
+ },
134
+ { deep: !0 }
135
+ ), Te(() => E.dataset, (o) => {
136
+ Array.isArray(o) && o.length > 0 && (Ne.value = !1);
137
+ }, { deep: !0 });
138
+ const { isPrinting: ot, isImaging: lt, generatePdf: at, generateImage: nt } = mo({
139
+ elementId: `flow_${G.value}`,
140
+ fileName: e.value.style.chart.title.text || "vue-ui-flow",
141
+ options: e.value.userOptions.print
142
+ }), Lt = g(() => e.value.userOptions.show && !e.value.style.chart.title.text), me = g(() => ro(e.value.customPalette)), ye = g(() => e.value.style.chart.nodes.width), _ = v({
143
+ showTable: e.value.table.show,
144
+ showTooltip: e.value.style.chart.tooltip.show
145
+ });
146
+ Te(e, () => {
147
+ _.value = {
148
+ showTable: e.value.table.show,
149
+ showTooltip: e.value.style.chart.tooltip.show
150
+ };
151
+ }, { immediate: !0 });
152
+ const st = g(() => !ge.value || !ge.value.length ? [] : ge.value.map((o, l) => [
153
+ o[0],
154
+ o[1],
155
+ x(o[2]),
156
+ o[3] ? uo(o[3]) : me.value[l] || me.value[l % me.value.length] || L[l] || L[l % L.length]
157
+ ]));
158
+ function zt(o) {
159
+ const l = {}, t = {};
160
+ function n(a, u) {
161
+ l[a] || (l[a] = {
162
+ level: null,
163
+ inflow: 0,
164
+ outflow: 0,
165
+ children: [],
166
+ color: null,
167
+ uid: He()
168
+ }), l[a].level === null && (l[a].level = u), t[u] || (t[u] = []), t[u].includes(a) || t[u].push(a);
169
+ }
170
+ o.forEach(([a, u, d]) => {
171
+ const h = l[a]?.level ?? 0, O = h + 1;
172
+ n(a, h), n(u, O), l[a].children.push({ target: u, value: d }), l[a].outflow += d, l[u].inflow += d;
173
+ });
174
+ const s = new Set(o.map(([a]) => a)), $ = new Set(o.map(([, a]) => a)), Z = Array.from(s).filter((a) => !$.has(a)), ue = {};
175
+ Z.forEach((a, u) => {
176
+ ue[a] = me.value[u] || L[u % L.length];
177
+ });
178
+ const ie = {};
179
+ o.forEach(([a, u, d, h]) => {
180
+ h && (ie[a] = h, ie[u] = h);
181
+ }), Object.keys(l).forEach((a, u) => {
182
+ const d = e.value.nodeCategories?.[a], h = d ? e.value.nodeCategoryColors?.[d] : null;
183
+ l[a].color = ie[a] || h || (Z.includes(a) ? ue[a] : null) || L[u % L.length];
184
+ }), Object.keys(l).forEach((a) => {
185
+ l[a].value = Math.max(l[a].inflow, l[a].outflow);
186
+ });
187
+ const we = ae.value, De = it.value.width, J = it.value.height, D = Object.keys(t).map(Number).sort((a, u) => a - u), $e = D.length || 1, Le = $e > 1 ? De / ($e - 1) : 0, A = Number(ye.value), M = Number(
188
+ e.value.style.chart.nodes.gapPx ?? e.value.style.chart.nodes.gap ?? 8
189
+ ), ce = Number(e.value.style.chart.nodes.minHeight || 0);
190
+ function c(a) {
191
+ const u = t[a], d = u.length;
192
+ if (!d) return 1 / 0;
193
+ const h = Math.max(0, (d - 1) * M), O = Math.max(0, J - h), z = Math.min(ce, d ? O / d : 0);
194
+ let C = 0, N = u.map((f) => l[f].value || 0), y = N.reduce((f, F) => f + F, 0);
195
+ for (let f = 0; f < 12; f += 1) {
196
+ const F = y > 0 ? (O - C) / y : 0, B = [];
197
+ for (let P = 0; P < N.length; P += 1) {
198
+ const H = N[P];
199
+ H < 0 || H * F < z && B.push(P);
200
+ }
201
+ if (!B.length) return Math.max(0, F);
202
+ for (const P of B)
203
+ C += z, y -= N[P], N[P] = -1;
204
+ if (y <= 0) return 0;
205
+ }
206
+ return y > 0 ? Math.max(0, (O - C) / y) : 0;
207
+ }
208
+ const m = D.map(c), V = m.length ? Math.min(...m) : 0, X = {};
209
+ D.forEach((a) => {
210
+ const u = t[a], d = u.length, h = Math.max(0, (d - 1) * M), O = Math.max(0, J - h), z = Math.min(ce, d ? O / d : 0), C = u.map(
211
+ (f) => Math.max(z, (l[f].value || 0) * V)
212
+ ), N = C.reduce((f, F) => f + F, 0) + h;
213
+ let y = Math.max(0, (J - N) / 2);
214
+ u.forEach((f, F) => {
215
+ const B = C[F], P = we.left + a * Le, H = y;
216
+ X[f] = {
217
+ x: P,
218
+ y: H,
219
+ absoluteY: H,
220
+ height: B,
221
+ i: F,
222
+ color: l[f].color,
223
+ value: l[f].value
224
+ }, y += B, F < d - 1 && (y += M);
225
+ });
226
+ });
227
+ const gt = [], ve = we.top, ze = {}, Be = {};
228
+ Object.keys(l).forEach((a) => {
229
+ ze[a] = X[a]?.y ?? 0, Be[a] = 0;
230
+ });
231
+ const Ut = 1e-6, jt = 0.25;
232
+ return D.forEach((a) => {
233
+ t[a].forEach((d) => {
234
+ const h = l[d], O = X[d];
235
+ if (!h.children || !h.children.length) return;
236
+ let z = O.y;
237
+ h.children.forEach(({ target: C, value: N }) => {
238
+ const y = X[C], f = l[C], F = h.outflow > 0 ? N / h.outflow : 0, B = f.inflow > 0 ? N / f.inflow : 0, P = x(z + ve), H = x(z + F * O.height + ve), mt = ze[C];
239
+ let Ae = mt + B * y.height;
240
+ Be[C] += N;
241
+ const Vt = f.inflow > 0 && Be[C] >= f.inflow - Ut, yt = y.y + y.height;
242
+ (Vt || Ae > yt - jt) && (Ae = yt);
243
+ const Xt = x(mt + ve), qt = x(Ae + ve);
244
+ gt.push({
245
+ id: He(),
246
+ source: d,
247
+ target: C,
248
+ path: `M ${x(O.x + A)} ${P} L ${x(O.x + A)} ${H} L ${x(y.x)} ${qt} L ${x(y.x)} ${Xt} Z`,
249
+ value: N,
250
+ sourceColor: h.color,
251
+ targetColor: l[C].color
252
+ }), z = H - ve, ze[C] = Ae;
253
+ });
254
+ });
255
+ }), { nodeCoordinates: X, links: gt };
256
+ }
257
+ const S = g(() => {
258
+ const o = zt(ge.value);
259
+ return {
260
+ nodes: Object.keys(o.nodeCoordinates).map((l, t) => ({
261
+ ...o.nodeCoordinates[l],
262
+ name: l
263
+ })),
264
+ links: o.links
265
+ };
266
+ }), rt = g(() => et.value), ut = g(() => tt.value), ae = g(() => e.value.style.chart.padding), it = g(() => ({
267
+ width: Math.max(0, rt.value - 40 - ae.value.right - ae.value.left),
268
+ height: Math.max(0, ut.value - ae.value.top - ae.value.bottom)
269
+ })), ne = g(() => ({
270
+ width: rt.value,
271
+ height: ut.value
272
+ }));
273
+ function Bt(o) {
274
+ const l = {}, t = {}, n = /* @__PURE__ */ new Set();
275
+ return st.value.forEach(([s, $, Z]) => {
276
+ l[s] || (l[s] = []), t[$] || (t[$] = []), l[s].push($), t[$].push(s);
277
+ }), l[o] && l[o].forEach((s) => n.add(s)), t[o] && t[o].forEach((s) => n.add(s)), Array.from(n).concat(o);
278
+ }
279
+ const w = v(null), K = v(null), se = v(null), be = v(!1);
280
+ function Ht(o, l) {
281
+ j.value = [], w.value = Bt(o.name), K.value = o.name;
282
+ const t = o.name, n = st.value;
283
+ let s = 0, $ = 0, Z = [], ue = [];
284
+ const ie = new Set(n.map(([c]) => c)), we = new Set(n.map(([, c]) => c)), De = Array.from(ie).filter((c) => !we.has(c)), J = n.filter(([c]) => De.includes(c)).reduce((c, [m, V, X]) => c + X, 0), D = {};
285
+ S.value.nodes.forEach((c) => {
286
+ D[c.name] = c.color;
287
+ }), n.forEach(([c, m, V]) => {
288
+ m === t && (s += V, Z.push({ source: c, value: V, color: D[c] })), c === t && ($ += V, ue.push({ target: m, value: V, color: D[m] }));
289
+ });
290
+ const $e = Math.max(s, $), Le = J > 0 ? $e / J * 100 : 0, A = {
291
+ name: t,
292
+ inflow: s,
293
+ outflow: $,
294
+ from: Z,
295
+ to: ue,
296
+ percentOfTotal: Le,
297
+ color: D[t] || "#000000"
298
+ };
299
+ e.value.events.datapointEnter && e.value.events.datapointEnter({ datapoint: A, seriesIndex: l }), se.value = { datapoint: A }, _e.value = !0;
300
+ let M = "";
301
+ const ce = e.value.style.chart.tooltip.customFormat;
302
+ if (be.value = !1, fo(ce))
303
+ try {
304
+ const c = ce({
305
+ datapoint: A,
306
+ series: S.value,
307
+ config: e.value
308
+ });
309
+ typeof c == "string" && (Se.value = c, be.value = !0);
310
+ } catch {
311
+ console.warn("Custom format cannot be applied.");
312
+ }
313
+ if (!be.value) {
314
+ const c = e.value.style.chart.tooltip.showPercentage ? `<div>${fe({
315
+ p: e.value.style.chart.tooltip.translations.percentOfTotal,
316
+ v: A.percentOfTotal,
317
+ s: "%",
318
+ r: e.value.style.chart.tooltip.roundingPercentage
319
+ })}</div>` : "";
320
+ M += `<div style="width:100%;text-align:center;border-bottom:1px solid ${e.value.style.chart.tooltip.borderColor};padding-bottom:6px;margin-bottom:3px;"><span style="margin-right:4px; color:${A.color}">⏹</span>${A.name}${c}</div>`, A.from.length && (M += `<div>${e.value.style.chart.tooltip.translations.from}</div>`, A.from.forEach((m) => {
321
+ M += `<div><span style="color:${m.color}">⏹←</span> ${m.source}: ${Re(
322
+ e.value.style.chart.nodes.labels.formatter,
323
+ m.value,
324
+ fe({
325
+ p: e.value.style.chart.nodes.labels.prefix,
326
+ v: m.value,
327
+ s: e.value.style.chart.nodes.labels.suffix,
328
+ r: e.value.style.chart.nodes.labels.rounding
329
+ })
330
+ )}</div>`;
331
+ })), A.to.length && (M += `<div style="margin-top:6px;">${e.value.style.chart.tooltip.translations.to}</div>`, A.to.forEach((m) => {
332
+ M += `<div><span style="color:${m.color}">⏹→</span> ${m.target}: ${Re(
333
+ e.value.style.chart.nodes.labels.formatter,
334
+ m.value,
335
+ fe({
336
+ p: e.value.style.chart.nodes.labels.prefix,
337
+ v: m.value,
338
+ s: e.value.style.chart.nodes.labels.suffix,
339
+ r: e.value.style.chart.nodes.labels.rounding
340
+ })
341
+ )}</div>`;
342
+ })), Se.value = M;
343
+ }
344
+ }
345
+ function ct(o) {
346
+ const l = se.value;
347
+ e.value.events.datapointLeave && e.value.events.datapointLeave({ datapoint: l, seriesIndex: o }), w.value = null, K.value = null, _e.value = !1;
348
+ }
349
+ function Rt(o) {
350
+ const l = se.value;
351
+ e.value.events.datapointClick && e.value.events.datapointClick({ datapoint: l, seriesIndex: o });
352
+ }
353
+ const vt = g(() => S.value.links.map(
354
+ ({ source: o, target: l, sourceColor: t, targetColor: n, value: s }) => ({
355
+ source: o,
356
+ target: l,
357
+ sourceColor: t,
358
+ targetColor: n,
359
+ value: s
360
+ })
361
+ ));
362
+ function Pe(o = null) {
363
+ to(() => {
364
+ const l = vt.value.map((s, $) => [[s.source], [s.target], [s.value]]), t = [
365
+ [e.value.style.chart.title.text],
366
+ [e.value.style.chart.title.subtitle.text],
367
+ [
368
+ [e.value.table.columnNames.source],
369
+ [e.value.table.columnNames.target],
370
+ [e.value.table.columnNames.value]
371
+ ]
372
+ ].concat(l), n = vo(t);
373
+ o ? o(n) : ho({
374
+ csvContent: n,
375
+ title: e.value.style.chart.title.text || "vue-ui-flow"
376
+ });
377
+ });
378
+ }
379
+ const Ce = g(() => {
380
+ const o = [
381
+ e.value.table.columnNames.source,
382
+ e.value.table.columnNames.target,
383
+ e.value.table.columnNames.value
384
+ ], l = vt.value.map((s, $) => [
385
+ {
386
+ color: s.sourceColor,
387
+ name: s.source,
388
+ shape: "square"
389
+ },
390
+ {
391
+ color: s.targetColor,
392
+ name: s.target,
393
+ shape: "square"
394
+ },
395
+ fe({
396
+ p: e.value.style.chart.nodes.labels.prefix,
397
+ v: s.value,
398
+ s: e.value.style.chart.nodes.labels.suffix,
399
+ r: e.value.style.chart.nodes.labels.rounding
400
+ })
401
+ ]), t = {
402
+ th: {
403
+ backgroundColor: e.value.table.th.backgroundColor,
404
+ color: e.value.table.th.color,
405
+ outline: e.value.table.th.outline
406
+ },
407
+ td: {
408
+ backgroundColor: e.value.table.td.backgroundColor,
409
+ color: e.value.table.td.color,
410
+ outline: e.value.table.td.outline
411
+ },
412
+ breakpoint: e.value.table.responsiveBreakpoint
413
+ };
414
+ return {
415
+ colNames: [
416
+ e.value.table.columnNames.source,
417
+ e.value.table.columnNames.target,
418
+ e.value.table.columnNames.value
419
+ ],
420
+ head: o,
421
+ body: l,
422
+ config: t
423
+ };
424
+ });
425
+ function Wt() {
426
+ return S.value;
427
+ }
428
+ function dt() {
429
+ _.value.showTable = !_.value.showTable;
430
+ }
431
+ const ke = v(!1);
432
+ function Me() {
433
+ ke.value = !ke.value;
434
+ }
435
+ function ht() {
436
+ _.value.showTooltip = !_.value.showTooltip;
437
+ }
438
+ const ft = g(() => {
439
+ const o = new Set(
440
+ S.value.nodes.map(
441
+ (l) => e.value.nodeCategories[l.name] || "__uncategorized__"
442
+ )
443
+ );
444
+ return Array.from(o).map((l) => ({
445
+ name: l,
446
+ color: e.value.nodeCategoryColors[l] || L[0],
447
+ shape: "square",
448
+ count: S.value.nodes.filter(
449
+ (t) => (e.value.nodeCategories[t.name] || "__uncategorized__") === l
450
+ ).length
451
+ })).map((l, t) => ({
452
+ ...l,
453
+ segregate: () => Ie({ legend: l, i: t }),
454
+ opacity: j.value.length ? j.value.includes(t) ? 1 : 0.5 : 1
455
+ }));
456
+ }), pt = g(
457
+ () => ft.value.filter((o) => o.name !== "__uncategorized__")
458
+ ), j = v([]);
459
+ function Ie({ legend: o, i: l }) {
460
+ const t = o.name;
461
+ if (w.value?.every(
462
+ (n) => e.value.nodeCategories[n] === t
463
+ )) {
464
+ w.value = null, K.value = null, j.value = [];
465
+ return;
466
+ }
467
+ j.value = [l], w.value = S.value.nodes.filter((n) => e.value.nodeCategories[n.name] === t).map((n) => n.name), K.value = null;
468
+ }
469
+ const Yt = g(() => ({
470
+ cy: "flow-legend",
471
+ backgroundColor: e.value.style.chart.legend.backgroundColor,
472
+ color: e.value.style.chart.legend.color,
473
+ fontSize: e.value.style.chart.legend.fontSize,
474
+ paddingBottom: e.value.style.chart.legend.paddingBottom,
475
+ fontWeight: e.value.style.chart.legend.bold ? "bold" : "normal"
476
+ }));
477
+ async function Gt({ scale: o = 2 } = {}) {
478
+ if (!I.value) return;
479
+ const { width: l, height: t } = I.value.getBoundingClientRect(), n = l / t, { imageUri: s, base64: $ } = await Ao({ domElement: I.value, base64: !0, img: !0, scale: o });
480
+ return {
481
+ imageUri: s,
482
+ base64: $,
483
+ title: e.value.style.chart.title.text,
484
+ width: l,
485
+ height: t,
486
+ aspectRatio: n
487
+ };
488
+ }
489
+ const re = g(() => {
490
+ const o = e.value.table.useDialog && !e.value.table.show, l = _.value.showTable;
491
+ return {
492
+ component: o ? Mt : Ot,
493
+ title: `${e.value.style.chart.title.text}${e.value.style.chart.title.subtitle.text ? `: ${e.value.style.chart.title.subtitle.text}` : ""}`,
494
+ props: o ? {
495
+ backgroundColor: e.value.table.th.backgroundColor,
496
+ color: e.value.table.th.color,
497
+ headerColor: e.value.table.th.color,
498
+ headerBg: e.value.table.th.backgroundColor,
499
+ isFullscreen: U.value,
500
+ fullscreenParent: I.value,
501
+ forcedWidth: Math.min(800, window.innerWidth * 0.8)
502
+ } : {
503
+ hideDetails: !0,
504
+ config: {
505
+ open: l,
506
+ maxHeight: 1e4,
507
+ body: {
508
+ backgroundColor: e.value.style.chart.backgroundColor,
509
+ color: e.value.style.chart.color
510
+ },
511
+ head: {
512
+ backgroundColor: e.value.style.chart.backgroundColor,
513
+ color: e.value.style.chart.color
514
+ }
515
+ }
516
+ }
517
+ };
518
+ });
519
+ return Te(() => _.value.showTable, (o) => {
520
+ e.value.table.show || (o && e.value.table.useDialog && le.value ? le.value.open() : "close" in le.value && le.value.close());
521
+ }), xt({
522
+ getData: Wt,
523
+ getImage: Gt,
524
+ generateCsv: Pe,
525
+ generateImage: nt,
526
+ generatePdf: at,
527
+ toggleTable: dt,
528
+ toggleAnnotator: Me,
529
+ toggleTooltip: ht,
530
+ drillCategory: Ie,
531
+ unselectNode: ct,
532
+ toggleFullscreen: qe
533
+ }), (o, l) => (i(), p("div", {
534
+ ref_key: "flowChart",
535
+ ref: I,
536
+ class: bt(`vue-ui-flow ${U.value ? "vue-data-ui-wrapper-fullscreen" : ""}`),
537
+ style: W(`font-family:${e.value.style.fontFamily};width:100%; text-align:center;background:${e.value.style.chart.backgroundColor}`),
538
+ id: `flow_${G.value}`,
539
+ onMouseenter: l[4] || (l[4] = () => r(Ze)(!0)),
540
+ onMouseleave: l[5] || (l[5] = () => r(Ze)(!1))
541
+ }, [
542
+ e.value.userOptions.buttons.annotator ? (i(), q(r(Ft), {
543
+ key: 0,
544
+ svgRef: r(Qe),
545
+ backgroundColor: e.value.style.chart.backgroundColor,
546
+ color: e.value.style.chart.color,
547
+ active: ke.value,
548
+ onClose: Me
549
+ }, null, 8, ["svgRef", "backgroundColor", "color", "active"])) : T("", !0),
550
+ Lt.value ? (i(), p("div", _o, null, 512)) : T("", !0),
551
+ e.value.style.chart.title.text ? (i(), p("div", {
552
+ key: 2,
553
+ ref_key: "chartTitle",
554
+ ref: Ue,
555
+ style: "width:100%;background:transparent;padding-bottom:24px"
556
+ }, [
557
+ (i(), q($o, {
558
+ key: `title_${Ye.value}`,
559
+ config: {
560
+ title: {
561
+ cy: "flow-title",
562
+ ...e.value.style.chart.title
563
+ },
564
+ subtitle: {
565
+ cy: "flow-subtitle",
566
+ ...e.value.style.chart.title.subtitle
567
+ }
568
+ }
569
+ }, null, 8, ["config"]))
570
+ ], 512)) : T("", !0),
571
+ Y("div", {
572
+ id: `legend-top-${G.value}`
573
+ }, null, 8, So),
574
+ e.value.userOptions.show && Xe.value && (r(Je) || r(Fe)) ? (i(), q(r(Et), {
575
+ ref: "details",
576
+ key: `user_option_${We.value}`,
577
+ backgroundColor: e.value.style.chart.backgroundColor,
578
+ color: e.value.style.chart.color,
579
+ isPrinting: r(ot),
580
+ isImaging: r(lt),
581
+ uid: G.value,
582
+ hasPdf: e.value.userOptions.buttons.pdf,
583
+ hasXls: e.value.userOptions.buttons.csv,
584
+ hasImg: e.value.userOptions.buttons.img,
585
+ hasTable: e.value.userOptions.buttons.table,
586
+ callbacks: e.value.userOptions.callbacks,
587
+ hasFullscreen: e.value.userOptions.buttons.fullscreen,
588
+ isFullscreen: U.value,
589
+ titles: { ...e.value.userOptions.buttonTitles },
590
+ chartElement: I.value,
591
+ position: e.value.userOptions.position,
592
+ hasAnnotator: e.value.userOptions.buttons.annotator,
593
+ printScale: e.value.userOptions.print.scale,
594
+ isAnnotation: ke.value,
595
+ hasTooltip: e.value.style.chart.tooltip.show && e.value.userOptions.buttons.tooltip,
596
+ isTooltip: _.value.showTooltip,
597
+ onToggleTooltip: ht,
598
+ onToggleFullscreen: qe,
599
+ onGeneratePdf: r(at),
600
+ onGenerateCsv: Pe,
601
+ onGenerateImage: r(nt),
602
+ onToggleTable: dt,
603
+ onToggleAnnotator: Me,
604
+ style: W({
605
+ visibility: r(Je) ? r(Fe) ? "visible" : "hidden" : "visible"
606
+ })
607
+ }, Ct({ _: 2 }, [
608
+ o.$slots.menuIcon ? {
609
+ name: "menuIcon",
610
+ fn: b(({ isOpen: t, color: n }) => [
611
+ k(o.$slots, "menuIcon", Q(ee({ isOpen: t, color: n })), void 0, !0)
612
+ ]),
613
+ key: "0"
614
+ } : void 0,
615
+ o.$slots.optionTooltip ? {
616
+ name: "optionTooltip",
617
+ fn: b(() => [
618
+ k(o.$slots, "optionTooltip", {}, void 0, !0)
619
+ ]),
620
+ key: "1"
621
+ } : void 0,
622
+ o.$slots.optionPdf ? {
623
+ name: "optionPdf",
624
+ fn: b(() => [
625
+ k(o.$slots, "optionPdf", {}, void 0, !0)
626
+ ]),
627
+ key: "2"
628
+ } : void 0,
629
+ o.$slots.optionCsv ? {
630
+ name: "optionCsv",
631
+ fn: b(() => [
632
+ k(o.$slots, "optionCsv", {}, void 0, !0)
633
+ ]),
634
+ key: "3"
635
+ } : void 0,
636
+ o.$slots.optionImg ? {
637
+ name: "optionImg",
638
+ fn: b(() => [
639
+ k(o.$slots, "optionImg", {}, void 0, !0)
640
+ ]),
641
+ key: "4"
642
+ } : void 0,
643
+ o.$slots.optionTable ? {
644
+ name: "optionTable",
645
+ fn: b(() => [
646
+ k(o.$slots, "optionTable", {}, void 0, !0)
647
+ ]),
648
+ key: "5"
649
+ } : void 0,
650
+ o.$slots.optionFullscreen ? {
651
+ name: "optionFullscreen",
652
+ fn: b(({ toggleFullscreen: t, isFullscreen: n }) => [
653
+ k(o.$slots, "optionFullscreen", Q(ee({ toggleFullscreen: t, isFullscreen: n })), void 0, !0)
654
+ ]),
655
+ key: "6"
656
+ } : void 0,
657
+ o.$slots.optionAnnotator ? {
658
+ name: "optionAnnotator",
659
+ fn: b(({ toggleAnnotator: t, isAnnotator: n }) => [
660
+ k(o.$slots, "optionAnnotator", Q(ee({ toggleAnnotator: t, isAnnotator: n })), void 0, !0)
661
+ ]),
662
+ key: "7"
663
+ } : void 0
664
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasXls", "hasImg", "hasTable", "callbacks", "hasFullscreen", "isFullscreen", "titles", "chartElement", "position", "hasAnnotator", "printScale", "isAnnotation", "hasTooltip", "isTooltip", "onGeneratePdf", "onGenerateImage", "style"])) : T("", !0),
665
+ (i(), p("svg", {
666
+ ref_key: "svgRef",
667
+ ref: Qe,
668
+ xmlns: r(io),
669
+ viewBox: `0 0 ${ne.value.width} ${ne.value.height}`,
670
+ class: bt({
671
+ "vue-data-ui-fullscreen--on": U.value,
672
+ "vue-data-ui-fulscreen--off": !U.value
673
+ }),
674
+ style: W({
675
+ maxWidth: "100%",
676
+ overflow: "visible",
677
+ background: "transparent",
678
+ color: e.value.style.chart.color
679
+ })
680
+ }, [
681
+ xe(r(Pt)),
682
+ o.$slots["chart-background"] ? (i(), p("foreignObject", {
683
+ key: 0,
684
+ x: 0,
685
+ y: 0,
686
+ width: ne.value.width,
687
+ height: ne.value.height,
688
+ style: {
689
+ pointerEvents: "none"
690
+ }
691
+ }, [
692
+ k(o.$slots, "chart-background", {}, void 0, !0)
693
+ ], 8, No)) : T("", !0),
694
+ Y("defs", null, [
695
+ (i(!0), p(de, null, he(S.value.links, (t, n) => (i(), p("linearGradient", {
696
+ id: t.id,
697
+ x1: "0%",
698
+ y1: "0%",
699
+ x2: "100%",
700
+ y2: "0%"
701
+ }, [
702
+ Y("stop", {
703
+ offset: "0%",
704
+ "stop-color": t.sourceColor
705
+ }, null, 8, Eo),
706
+ Y("stop", {
707
+ offset: "100%",
708
+ "stop-color": t.targetColor
709
+ }, null, 8, Po)
710
+ ], 8, Fo))), 256))
711
+ ]),
712
+ (i(!0), p(de, null, he(S.value.links, (t) => (i(), p("path", {
713
+ class: "vue-ui-flow-link",
714
+ d: t.path,
715
+ "stroke-linejoin": "round",
716
+ "stroke-miterlimit": "1",
717
+ fill: `url(#${t.id})`,
718
+ stroke: e.value.style.chart.links.stroke,
719
+ "stroke-width": e.value.style.chart.links.strokeWidth,
720
+ style: W(`
721
+ opacity:${w.value ? w.value.includes(t.source) && w.value.includes(t.target) ? 1 : 0.3 : K.value ? [t.target, t.source].includes(K.value) ? 1 : 0.3 : e.value.style.chart.links.opacity}
722
+ `)
723
+ }, null, 12, Mo))), 256)),
724
+ (i(!0), p(de, null, he(S.value.nodes, (t, n) => (i(), p("rect", {
725
+ class: "vue-ui-flow-node",
726
+ x: t.x,
727
+ y: r(x)(t.absoluteY) + e.value.style.chart.padding.top,
728
+ height: r(x)(t.height),
729
+ width: ye.value,
730
+ fill: t.color,
731
+ stroke: e.value.style.chart.nodes.stroke,
732
+ "stroke-width": e.value.style.chart.nodes.strokeWidth,
733
+ onMouseenter: (s) => Ht(t, n),
734
+ onMouseleave: (s) => ct(n),
735
+ style: W(`opacity:${w.value ? w.value.includes(t.name) ? 1 : 0.3 : 1}`),
736
+ onClick: (s) => Rt(n)
737
+ }, null, 44, Io))), 256)),
738
+ e.value.style.chart.nodes.labels.show ? (i(), p("g", Do, [
739
+ (i(!0), p(de, null, he(S.value.nodes, (t, n) => (i(), p("text", {
740
+ x: t.x + ye.value / 2,
741
+ y: r(x)(
742
+ t.absoluteY + t.height / 2 - e.value.style.chart.nodes.labels.fontSize / 4
743
+ ) + e.value.style.chart.padding.top,
744
+ "font-size": e.value.style.chart.nodes.labels.fontSize,
745
+ fill: r($t)(t.color),
746
+ "text-anchor": "middle",
747
+ style: W(`pointer-events: none; opacity:${w.value ? w.value.includes(t.name) ? 1 : 0 : 1}`)
748
+ }, te(e.value.style.chart.nodes.labels.abbreviation.use ? r(co)({
749
+ source: t.name,
750
+ length: e.value.style.chart.nodes.labels.abbreviation.length
751
+ }) : t.name), 13, Lo))), 256)),
752
+ (i(!0), p(de, null, he(S.value.nodes, (t, n) => (i(), p("text", {
753
+ x: t.x + ye.value / 2,
754
+ y: r(x)(
755
+ t.absoluteY + t.height / 2 + e.value.style.chart.nodes.labels.fontSize
756
+ ) + e.value.style.chart.padding.top,
757
+ "font-size": e.value.style.chart.nodes.labels.fontSize,
758
+ fill: r($t)(t.color),
759
+ "text-anchor": "middle",
760
+ style: W(`pointer-events: none; opacity:${w.value ? w.value.includes(t.name) ? 1 : 0 : 1}`)
761
+ }, te(r(Re)(
762
+ e.value.style.chart.nodes.labels.formatter,
763
+ t.value,
764
+ r(fe)({
765
+ p: e.value.style.chart.nodes.labels.prefix,
766
+ v: t.value,
767
+ s: e.value.style.chart.nodes.labels.suffix,
768
+ r: e.value.style.chart.nodes.labels.rounding
769
+ }),
770
+ { datapoint: t, seriesIndex: n }
771
+ )), 13, zo))), 256))
772
+ ])) : T("", !0),
773
+ k(o.$slots, "svg", { svg: ne.value }, void 0, !0)
774
+ ], 14, Oo)),
775
+ o.$slots.watermark ? (i(), p("div", Bo, [
776
+ k(o.$slots, "watermark", Q(ee({ isPrinting: r(ot) || r(lt) })), void 0, !0)
777
+ ])) : T("", !0),
778
+ Y("div", {
779
+ id: `legend-bottom-${G.value}`
780
+ }, null, 8, Ho),
781
+ Ve.value ? (i(), q(Jt, {
782
+ key: 5,
783
+ to: e.value.style.chart.legend.position === "top" ? `#legend-top-${G.value}` : `#legend-bottom-${G.value}`
784
+ }, [
785
+ Y("div", {
786
+ ref_key: "chartLegend",
787
+ ref: Ge
788
+ }, [
789
+ e.value.style.chart.legend.show && pt.value.length ? (i(), q(wo, {
790
+ key: 0,
791
+ legendSet: pt.value,
792
+ config: Yt.value,
793
+ onClickMarker: l[0] || (l[0] = (t) => Ie(t))
794
+ }, {
795
+ item: b(({ legend: t, index: n }) => [
796
+ r(Oe) ? T("", !0) : (i(), p("div", {
797
+ key: 0,
798
+ onClick: (s) => t.segregate(),
799
+ style: W(`opacity:${j.value.length ? j.value.includes(n) ? 1 : 0.5 : 1}`)
800
+ }, te(t.name) + " (" + te(t.count) + ") ", 13, Ro))
801
+ ]),
802
+ _: 1
803
+ }, 8, ["legendSet", "config"])) : T("", !0),
804
+ k(o.$slots, "legend", { legend: ft.value }, void 0, !0)
805
+ ], 512)
806
+ ], 8, ["to"])) : T("", !0),
807
+ o.$slots.source ? (i(), p("div", {
808
+ key: 6,
809
+ ref_key: "source",
810
+ ref: je,
811
+ dir: "auto"
812
+ }, [
813
+ k(o.$slots, "source", {}, void 0, !0)
814
+ ], 512)) : T("", !0),
815
+ xe(r(_t), {
816
+ show: _.value.showTooltip && _e.value,
817
+ backgroundColor: e.value.style.chart.tooltip.backgroundColor,
818
+ color: e.value.style.chart.tooltip.color,
819
+ fontSize: e.value.style.chart.tooltip.fontSize,
820
+ borderRadius: e.value.style.chart.tooltip.borderRadius,
821
+ borderColor: e.value.style.chart.tooltip.borderColor,
822
+ borderWidth: e.value.style.chart.tooltip.borderWidth,
823
+ backgroundOpacity: e.value.style.chart.tooltip.backgroundOpacity,
824
+ position: e.value.style.chart.tooltip.position,
825
+ offsetY: e.value.style.chart.tooltip.offsetY,
826
+ parent: I.value,
827
+ content: Se.value,
828
+ isCustom: be.value,
829
+ isFullscreen: U.value,
830
+ smooth: e.value.style.chart.tooltip.smooth,
831
+ backdropFilter: e.value.style.chart.tooltip.backdropFilter
832
+ }, {
833
+ "tooltip-before": b(() => [
834
+ k(o.$slots, "tooltip-before", Q(ee({ ...se.value })), void 0, !0)
835
+ ]),
836
+ "tooltip-after": b(() => [
837
+ k(o.$slots, "tooltip-after", Q(ee({ ...se.value })), void 0, !0)
838
+ ]),
839
+ _: 3
840
+ }, 8, ["show", "backgroundColor", "color", "fontSize", "borderRadius", "borderColor", "borderWidth", "backgroundOpacity", "position", "offsetY", "parent", "content", "isCustom", "isFullscreen", "smooth", "backdropFilter"]),
841
+ Xe.value ? (i(), q(Qt(re.value.component), eo({ key: 7 }, re.value.props, {
842
+ ref_key: "tableUnit",
843
+ ref: le,
844
+ onClose: l[3] || (l[3] = (t) => _.value.showTable = !1)
845
+ }), Ct({
846
+ content: b(() => [
847
+ xe(r(Nt), {
848
+ colNames: Ce.value.colNames,
849
+ head: Ce.value.head,
850
+ body: Ce.value.body,
851
+ config: Ce.value.config,
852
+ title: e.value.table.useDialog ? "" : re.value.title,
853
+ withCloseButton: !e.value.table.useDialog,
854
+ onClose: l[2] || (l[2] = (t) => _.value.showTable = !1)
855
+ }, {
856
+ th: b(({ th: t }) => [
857
+ Y("div", {
858
+ innerHTML: t,
859
+ style: { display: "flex", "align-items": "center" }
860
+ }, null, 8, Wo)
861
+ ]),
862
+ td: b(({ td: t }) => [
863
+ kt(te(t.name || t), 1)
864
+ ]),
865
+ _: 1
866
+ }, 8, ["colNames", "head", "body", "config", "title", "withCloseButton"])
867
+ ]),
868
+ _: 2
869
+ }, [
870
+ e.value.table.useDialog ? {
871
+ name: "title",
872
+ fn: b(() => [
873
+ kt(te(re.value.title), 1)
874
+ ]),
875
+ key: "0"
876
+ } : void 0,
877
+ e.value.table.useDialog ? {
878
+ name: "actions",
879
+ fn: b(() => [
880
+ Y("button", {
881
+ tabindex: "0",
882
+ class: "vue-ui-user-options-button",
883
+ onClick: l[1] || (l[1] = (t) => Pe(e.value.userOptions.callbacks.csv))
884
+ }, [
885
+ xe(r(St), {
886
+ name: "excel",
887
+ stroke: re.value.props.color
888
+ }, null, 8, ["stroke"])
889
+ ])
890
+ ]),
891
+ key: "1"
892
+ } : void 0
893
+ ]), 1040)) : T("", !0),
894
+ r(Oe) ? (i(), q(bo, { key: 8 })) : T("", !0)
895
+ ], 46, xo));
896
+ }
897
+ }, ol = /* @__PURE__ */ To(Yo, [["__scopeId", "data-v-3a106da6"]]);
898
+ export {
899
+ ol as default
900
+ };