vue-data-ui 3.0.0-next.7 → 3.0.0-next.70

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/{Arrow-Bl8urcli.js → Arrow-fzydFjfE.js} +1 -1
  2. package/dist/{BaseDraggableDialog-CyhpaZU5.js → BaseDraggableDialog-BwazM8ka.js} +2 -2
  3. package/dist/{BaseIcon-BCZfTCeM.js → BaseIcon-BnbvQjs5.js} +1 -1
  4. package/dist/{ColorPicker-CSJf42vx.js → ColorPicker-DR1Yr4kR.js} +2 -2
  5. package/dist/{DataTable-mQ6Wd-rR.js → DataTable-CKpA_OA_.js} +2 -2
  6. package/dist/{Legend-B2hrDh4G.js → Legend-ChXhJNzd.js} +2 -2
  7. package/dist/{NonSvgPenAndPaper-DQ8KsK4W.js → NonSvgPenAndPaper-CPOpM7Os.js} +3 -3
  8. package/dist/{PackageVersion-CeEYZfaH.js → PackageVersion-CBHvscRY.js} +1 -1
  9. package/dist/{PenAndPaper-DhSxfUrQ.js → PenAndPaper-BCcfYvgR.js} +3 -3
  10. package/dist/{Shape-C2qH26wh.js → Shape-C1rNfsMY.js} +43 -37
  11. package/dist/Slicer-D8a4Wv1q.js +602 -0
  12. package/dist/{SparkTooltip-BcHgW6YX.js → SparkTooltip-BUdf02cs.js} +1 -1
  13. package/dist/{Title-B7Xb3YuE.js → Title-feqCv0Si.js} +1 -1
  14. package/dist/{Tooltip-BidRoM5E.js → Tooltip-DQbksria.js} +23 -19
  15. package/dist/{UserOptions-0tvMM8PF.js → UserOptions-CGnAZpYs.js} +2 -2
  16. package/dist/{dom-to-png-CTrlbKHr.js → dom-to-png-DTPmkDTK.js} +1 -1
  17. package/dist/{img-D72yZNUg.js → img-_RMhslMZ.js} +1 -1
  18. package/dist/{index-Cg-RjxqH.js → index-CnY41r21.js} +2103 -1411
  19. package/dist/{pdf-DgX01_wu.js → pdf-C02XBmhm.js} +1 -1
  20. package/dist/style.css +1 -1
  21. package/dist/types/vue-data-ui.d.cts +600 -22
  22. package/dist/types/vue-data-ui.d.ts +600 -22
  23. package/dist/useAutoSizeLabelsInsideViewbox-DVYZBwNc.js +81 -0
  24. package/dist/useFitSvgText-2crs6Fv5.js +69 -0
  25. package/dist/useLoading-D7YHNtLX.js +29 -0
  26. package/dist/useNestedProp-DtUATNAU.js +13 -0
  27. package/dist/usePanZoom-BVca3eMk.js +122 -0
  28. package/dist/{usePrinter-BUzmyQf9.js → usePrinter-CJ1uZx0D.js} +2 -2
  29. package/dist/useTimeLabelCollider-CIsgDrl9.js +78 -0
  30. package/dist/{useTimeLabels-Mrr0jrpL.js → useTimeLabels-DkzmKfZn.js} +211 -152
  31. package/dist/{vue-data-ui-DpO93ey5.js → vue-data-ui-DDBabVWX.js} +105 -100
  32. package/dist/vue-data-ui.js +23 -22
  33. package/dist/vue-ui-3d-bar-CtPXePUa.js +1323 -0
  34. package/dist/{vue-ui-accordion-CRomxzaL.js → vue-ui-accordion-CnLY8CrQ.js} +3 -3
  35. package/dist/vue-ui-age-pyramid-CvrNLE47.js +834 -0
  36. package/dist/{vue-ui-annotator-BAOxPiFx.js → vue-ui-annotator-NuSwWka4.js} +2 -2
  37. package/dist/vue-ui-bullet-CpIVgkPB.js +571 -0
  38. package/dist/vue-ui-candlestick-DGWKUeJp.js +999 -0
  39. package/dist/{vue-ui-carousel-table-DVGlPZIa.js → vue-ui-carousel-table-DWbQS8F3.js} +29 -29
  40. package/dist/{vue-ui-chestnut-P1v4ffD0.js → vue-ui-chestnut-K4-oOYff.js} +5 -5
  41. package/dist/vue-ui-chord-DqmP8yTR.js +1038 -0
  42. package/dist/{vue-ui-circle-pack-FXmemXgl.js → vue-ui-circle-pack-D_ufubH5.js} +24 -24
  43. package/dist/{vue-ui-cursor-CdvMgIrP.js → vue-ui-cursor-B0tP4woK.js} +2 -2
  44. package/dist/{vue-ui-dashboard-Vke0452J.js → vue-ui-dashboard-D_7qyx3P.js} +62 -62
  45. package/dist/{vue-ui-digits-BVhyYqCs.js → vue-ui-digits-pUQErY07.js} +2 -2
  46. package/dist/{vue-ui-donut-BpIivKcf.js → vue-ui-donut-Dl__PVfq.js} +320 -308
  47. package/dist/vue-ui-donut-evolution-BCGGTZZI.js +1075 -0
  48. package/dist/vue-ui-dumbbell-KzCa3k9g.js +1119 -0
  49. package/dist/vue-ui-flow-B1AOqk14.js +841 -0
  50. package/dist/{vue-ui-funnel-BbFmbsft.js → vue-ui-funnel-DCl9v71X.js} +16 -16
  51. package/dist/{vue-ui-galaxy-Cn6vHbaw.js → vue-ui-galaxy-0rAzDHe5.js} +60 -58
  52. package/dist/vue-ui-gauge-Cg4qAOEf.js +791 -0
  53. package/dist/vue-ui-gizmo-CQmMkODw.js +210 -0
  54. package/dist/vue-ui-heatmap-CgkgUDI0.js +1078 -0
  55. package/dist/vue-ui-history-plot-CYvkTszV.js +1073 -0
  56. package/dist/{vue-ui-kpi-jN_yMnLj.js → vue-ui-kpi-BDuOZbc2.js} +26 -26
  57. package/dist/{vue-ui-mini-loader-rYr76x8g.js → vue-ui-mini-loader-BZaU_YD-.js} +2 -2
  58. package/dist/{vue-ui-molecule-BWZHOQLi.js → vue-ui-molecule-HYjHgVuN.js} +53 -51
  59. package/dist/vue-ui-mood-radar-4pYtL93A.js +785 -0
  60. package/dist/vue-ui-nested-donuts-BVbvVm19.js +1286 -0
  61. package/dist/vue-ui-onion-DQg97Dwm.js +776 -0
  62. package/dist/vue-ui-parallel-coordinate-plot-KQ4FTUda.js +915 -0
  63. package/dist/{vue-ui-quadrant-BFFzfDw3.js → vue-ui-quadrant-D8OU7TFs.js} +512 -459
  64. package/dist/vue-ui-quick-chart-BOKDoHdK.js +1761 -0
  65. package/dist/vue-ui-radar-2hTf-Qrf.js +796 -0
  66. package/dist/{vue-ui-rating-BAauyqTn.js → vue-ui-rating-QriKDSO7.js} +2 -2
  67. package/dist/vue-ui-relation-circle-DqLiKEHw.js +598 -0
  68. package/dist/vue-ui-ridgeline-CvFlsavM.js +1153 -0
  69. package/dist/vue-ui-rings-B2ges9Ud.js +728 -0
  70. package/dist/vue-ui-scatter-DQJeFlv4.js +1178 -0
  71. package/dist/{vue-ui-skeleton-CUOhCY4p.js → vue-ui-skeleton-Bghm5obp.js} +3 -3
  72. package/dist/{vue-ui-smiley-B6SqWMov.js → vue-ui-smiley-C3SkDNoz.js} +26 -26
  73. package/dist/vue-ui-spark-trend-dd8h3N7H.js +315 -0
  74. package/dist/vue-ui-sparkbar-BTj8M7fY.js +351 -0
  75. package/dist/vue-ui-sparkgauge-BBQAo-W1.js +232 -0
  76. package/dist/vue-ui-sparkhistogram-C4ZEcb8S.js +380 -0
  77. package/dist/vue-ui-sparkline-Bm3GpqJx.js +489 -0
  78. package/dist/vue-ui-sparkstackbar-Dde4iayd.js +421 -0
  79. package/dist/vue-ui-stackbar-DPvfNjwH.js +1370 -0
  80. package/dist/vue-ui-strip-plot-iZIN9U90.js +915 -0
  81. package/dist/{vue-ui-table-Dwjl3L0p.js → vue-ui-table-C4EoviSd.js} +11 -11
  82. package/dist/{vue-ui-table-heatmap-DazTE3fa.js → vue-ui-table-heatmap-D-eqO3LU.js} +5 -5
  83. package/dist/{vue-ui-table-sparkline-BXMPUEpN.js → vue-ui-table-sparkline-CD7IH49g.js} +14 -14
  84. package/dist/vue-ui-thermometer-BKEFH2Xt.js +541 -0
  85. package/dist/{vue-ui-timer-yLvNAZL_.js → vue-ui-timer-hhKj1gPp.js} +5 -5
  86. package/dist/vue-ui-tiremarks-CmNwCnVC.js +406 -0
  87. package/dist/vue-ui-treemap-BL7T8x_B.js +1035 -0
  88. package/dist/{vue-ui-vertical-bar-BrYCoVym.js → vue-ui-vertical-bar-CGn_OX3P.js} +71 -69
  89. package/dist/vue-ui-waffle-qfT-wDhI.js +910 -0
  90. package/dist/vue-ui-wheel-B8J8C3AN.js +379 -0
  91. package/dist/vue-ui-word-cloud-B6oHFfEK.js +765 -0
  92. package/dist/{vue-ui-world-B4Dqrk4l.js → vue-ui-world-BEv_oTrC.js} +11 -9
  93. package/dist/vue-ui-xy-DPBrciAR.js +3771 -0
  94. package/dist/{vue-ui-xy-canvas-D7fL36kT.js → vue-ui-xy-canvas-BXT3mXj5.js} +265 -264
  95. package/package.json +1 -1
  96. package/dist/Slicer-BD8Z8VCW.js +0 -577
  97. package/dist/useLoading-Bt5Doa8m.js +0 -28
  98. package/dist/useNestedProp-C_G5E08Y.js +0 -13
  99. package/dist/usePanZoom-BQMvRXEQ.js +0 -115
  100. package/dist/vue-ui-3d-bar-D8imUwEz.js +0 -1227
  101. package/dist/vue-ui-age-pyramid-CV7gtFOC.js +0 -746
  102. package/dist/vue-ui-bullet-BtuMMBF7.js +0 -513
  103. package/dist/vue-ui-candlestick-BsRtXKrv.js +0 -873
  104. package/dist/vue-ui-chord-CIuzYmpM.js +0 -949
  105. package/dist/vue-ui-donut-evolution-BRlsCA4U.js +0 -903
  106. package/dist/vue-ui-dumbbell-D87Dumjh.js +0 -753
  107. package/dist/vue-ui-flow-D_L_xssL.js +0 -765
  108. package/dist/vue-ui-gauge-Ds4terqY.js +0 -738
  109. package/dist/vue-ui-gizmo-BTncpI62.js +0 -192
  110. package/dist/vue-ui-heatmap-B6GpjeWC.js +0 -877
  111. package/dist/vue-ui-history-plot-DTDzEeGq.js +0 -924
  112. package/dist/vue-ui-mood-radar-CPfS6f1L.js +0 -670
  113. package/dist/vue-ui-nested-donuts-Bsd2kGoJ.js +0 -1177
  114. package/dist/vue-ui-onion-BQ4nISXW.js +0 -701
  115. package/dist/vue-ui-parallel-coordinate-plot-BoHgVgbn.js +0 -807
  116. package/dist/vue-ui-quick-chart-oNMTeOAL.js +0 -1612
  117. package/dist/vue-ui-radar-98mXFZe-.js +0 -741
  118. package/dist/vue-ui-relation-circle-6oDCSxkO.js +0 -542
  119. package/dist/vue-ui-ridgeline-CugMGjOU.js +0 -969
  120. package/dist/vue-ui-rings-bsGXaD2m.js +0 -685
  121. package/dist/vue-ui-scatter-7ssLliGg.js +0 -1045
  122. package/dist/vue-ui-spark-trend-jauInkkN.js +0 -291
  123. package/dist/vue-ui-sparkbar-DXByIxQH.js +0 -301
  124. package/dist/vue-ui-sparkgauge-BMrV2gDi.js +0 -201
  125. package/dist/vue-ui-sparkhistogram-CoNM4G7o.js +0 -313
  126. package/dist/vue-ui-sparkline-DrN3_wS0.js +0 -459
  127. package/dist/vue-ui-sparkstackbar-W1a0JQi9.js +0 -381
  128. package/dist/vue-ui-stackbar-D1-gbUgE.js +0 -1207
  129. package/dist/vue-ui-strip-plot-KhfvrVuN.js +0 -761
  130. package/dist/vue-ui-thermometer-Cn6lJRs3.js +0 -495
  131. package/dist/vue-ui-tiremarks-BYsWePfK.js +0 -358
  132. package/dist/vue-ui-treemap-Ce7RVFG3.js +0 -965
  133. package/dist/vue-ui-waffle-CCrR2T1G.js +0 -863
  134. package/dist/vue-ui-wheel-BuxjnrDN.js +0 -352
  135. package/dist/vue-ui-word-cloud-C6fawHJE.js +0 -659
  136. package/dist/vue-ui-xy-ubRnv9iJ.js +0 -2980
@@ -0,0 +1,1038 @@
1
+ import { useCssVars as Ft, defineAsyncComponent as H, ref as d, shallowRef as Ke, toRefs as zt, watch as et, computed as C, onMounted as tt, onBeforeUnmount as at, createElementBlock as i, openBlock as r, unref as v, normalizeStyle as D, normalizeClass as F, createBlock as Y, createCommentVNode as h, renderSlot as k, createElementVNode as O, createSlots as ot, withCtx as P, normalizeProps as ie, guardReactiveProps as ce, withModifiers as lt, createVNode as ke, Fragment as z, renderList as G, mergeProps as Xt, toDisplayString as Q, createTextVNode as Ut, nextTick as Vt } from "vue";
2
+ import { u as jt, c as $e, t as Yt, a as Gt, p as ve, b as Wt, o as qt, f as st, g as Ht, d as Qt, e as Zt, X as Jt, F as Kt, i as we, a0 as ea, ac as ta, v as aa, w as oa, k as la } from "./index-CnY41r21.js";
3
+ import { u as sa } from "./useUserOptionState-BIvW1Kz7.js";
4
+ import { u as nt } from "./useNestedProp-DtUATNAU.js";
5
+ import { u as na } from "./useChartAccessibility-9icAAmYg.js";
6
+ import { u as ra } from "./usePrinter-CJ1uZx0D.js";
7
+ import { t as ua, u as ia } from "./useResponsive-DfdjqQps.js";
8
+ import ca from "./Legend-ChXhJNzd.js";
9
+ import va from "./Title-feqCv0Si.js";
10
+ import { _ as da } from "./Shape-C1rNfsMY.js";
11
+ import ha from "./img-_RMhslMZ.js";
12
+ import { u as fa, B as ga } from "./useLoading-D7YHNtLX.js";
13
+ import { _ as pa } from "./_plugin-vue_export-helper-CHgC5LLL.js";
14
+ const ba = ["id"], ma = ["xmlns", "viewBox"], ya = ["width", "height"], ka = { key: 1 }, $a = ["id", "d"], wa = { key: 2 }, Ca = ["transform"], Ma = ["d", "fill", "stroke", "stroke-width", "onMouseenter", "onMouseleave", "onClick"], xa = ["d", "fill", "stroke", "stroke-width"], Aa = ["d", "fill"], Ia = ["d", "fill", "stroke", "stroke-width", "onMouseenter", "onClick", "onMouseleave"], _a = ["d", "fill", "stroke", "stroke-width"], Pa = ["d", "fill", "stroke", "stroke-width"], Sa = ["d", "fill", "stroke", "stroke-width"], Ta = { key: 0 }, Ba = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], La = ["x1", "y1", "x2", "y2", "stroke", "stroke-width"], Oa = ["cx", "cy", "r", "stroke", "stroke-width", "fill"], Ea = ["transform", "fill", "text-anchor", "font-size", "font-weight"], Na = { key: 1 }, Ra = ["font-size", "font-weight", "fill"], Da = ["href"], Fa = ["transform", "text-anchor", "font-size", "font-weight", "fill", "innerHTML"], za = {
15
+ key: 4,
16
+ class: "vue-data-ui-watermark"
17
+ }, Xa = ["onClick"], Ua = {
18
+ key: 6,
19
+ "data-dom-to-png-ignore": "",
20
+ class: "reset-wrapper"
21
+ }, Va = { style: { "text-align": "right", width: "100%" } }, ja = {
22
+ __name: "vue-ui-chord",
23
+ props: {
24
+ dataset: {
25
+ type: Object,
26
+ default() {
27
+ return {};
28
+ }
29
+ },
30
+ config: {
31
+ type: Object,
32
+ default() {
33
+ return {};
34
+ }
35
+ }
36
+ },
37
+ emits: ["selectLegend", "selectGroup", "selectRibbon"],
38
+ setup(rt, { expose: ut, emit: it }) {
39
+ Ft((e) => ({
40
+ "3d3f80fa": e.slicerColor
41
+ }));
42
+ const ct = H(() => import("./vue-ui-accordion-CnLY8CrQ.js")), vt = H(() => import("./BaseIcon-BnbvQjs5.js")), dt = H(() => import("./DataTable-CKpA_OA_.js")), ht = H(() => import("./PackageVersion-CBHvscRY.js")), ft = H(() => import("./PenAndPaper-BCcfYvgR.js")), gt = H(() => import("./UserOptions-CGnAZpYs.js")), { vue_ui_chord: pt } = jt(), T = rt, oe = it, E = d(!!T.dataset && Object.hasOwn(T.dataset, "matrix")), S = d($e()), $ = d(null), b = d(null), g = d(null), Ce = d(0), N = d(null), Me = d(null), xe = d(null), Ae = d(null), Ie = d(null), de = d(0), he = d(0), fe = d(0), W = d(!1), X = Ke(null), q = Ke(null), a = d(pe()), { loading: _e, FINAL_DATASET: w, manualLoading: Z } = fa({
43
+ ...zt(T),
44
+ FINAL_CONFIG: a,
45
+ prepareConfig: pe,
46
+ skeletonDataset: {
47
+ matrix: [
48
+ [12e3, 6e3, 9e3, 3e3],
49
+ [2e3, 1e4, 2e3, 6001],
50
+ [8e3, 1600, 8e3, 8001],
51
+ [1e3, 1e3, 1e3, 7001]
52
+ ],
53
+ labels: [],
54
+ colors: ["#DBDBDB", "#C4C4C4", "#ADADAD", "#969696"]
55
+ },
56
+ skeletonConfig: Yt({
57
+ defaultConfig: a.value,
58
+ userConfig: {
59
+ useCssAnimation: !1,
60
+ userOptions: { show: !1 },
61
+ table: { show: !1 },
62
+ style: {
63
+ chart: {
64
+ backgroundColor: "#99999930",
65
+ legend: {
66
+ backgroundColor: "transparent"
67
+ },
68
+ arcs: {
69
+ stroke: "#6A6A6A",
70
+ labels: {
71
+ show: !1
72
+ }
73
+ },
74
+ ribbons: {
75
+ stroke: "#6A6A6A",
76
+ underlayerOpacity: 0,
77
+ labels: {
78
+ show: !1
79
+ }
80
+ }
81
+ }
82
+ }
83
+ }
84
+ })
85
+ }), { userOptionsVisible: ge, setUserOptionsVisibility: Pe, keepUserOptionState: Se } = sa({ config: a.value }), { svgRef: J } = na({ config: a.value.style.chart.title }), { isPrinting: Te, isImaging: Be, generatePdf: Le, generateImage: Oe } = ra({
86
+ elementId: `chord_${S.value}`,
87
+ fileName: a.value.style.chart.title.text || "vue-ui-chord",
88
+ options: a.value.userOptions.print
89
+ }), K = d({
90
+ showTable: a.value.table.show
91
+ });
92
+ function pe() {
93
+ const e = nt({
94
+ userConfig: T.config,
95
+ defaultConfig: pt
96
+ });
97
+ return e.theme ? {
98
+ ...nt({
99
+ userConfig: Wt.vue_ui_chord[e.theme] || T.config,
100
+ defaultConfig: e
101
+ }),
102
+ customPalette: Gt[e.theme] || ve
103
+ } : e;
104
+ }
105
+ et(() => T.config, (e) => {
106
+ _e.value || (a.value = pe()), ge.value = !a.value.userOptions.showOnChartHover, be(), de.value += 1, he.value += 1, fe.value += 1, x.value = a.value.initialRotation, K.value.showTable = a.value.table.show;
107
+ }, { deep: !0 });
108
+ const Ee = C(() => a.value.debug);
109
+ et(() => T.dataset, () => {
110
+ Ne(), be(), de.value += 1, he.value += 1, fe.value += 1;
111
+ });
112
+ function Ne() {
113
+ if (qt(T.dataset)) {
114
+ st({
115
+ componentName: "VueUiChord",
116
+ type: "dataset",
117
+ debug: Ee.value
118
+ }), E.value = !1, Z.value = !0;
119
+ return;
120
+ }
121
+ const e = Ht({
122
+ datasetObject: T.dataset,
123
+ requiredAttributes: ["matrix"]
124
+ });
125
+ if (e.length) {
126
+ e.forEach((n) => {
127
+ st({
128
+ componentName: "VueUiChord",
129
+ type: "datasetAttribute",
130
+ property: n,
131
+ debug: Ee.value
132
+ });
133
+ }), E.value = !1, Z.value = !0;
134
+ return;
135
+ }
136
+ const o = T.dataset.matrix;
137
+ if (!Array.isArray(o) || o.length < 2) {
138
+ console.warn(`VueUiChord: dataset.matrix requires a minimum of 2 datapoints, for example:
139
+
140
+ matrix:[
141
+ [1, 1],
142
+ [1, 1]
143
+ ]`), E.value = !1, Z.value = !0;
144
+ return;
145
+ }
146
+ const t = o.length, l = o.findIndex((n) => !Array.isArray(n) || n.length !== t);
147
+ if (l !== -1) {
148
+ console.warn(
149
+ `VueUiChord - Invalid matrix: dataset.matrix at index ${l} has ${Array.isArray(o[l]) ? o[l].length : "NaN"} elements instead of the required ${t}
150
+
151
+ dataset.matrix[${l}] = [${Array.isArray(o[l]) ? o[l].toString() : "invalid"}]`
152
+ ), E.value = !1, Z.value = !0;
153
+ return;
154
+ }
155
+ E.value = !0, Z.value = !1;
156
+ }
157
+ function be() {
158
+ if (Ne(), a.value.responsive) {
159
+ const e = ua(() => {
160
+ const { width: o, height: t, heightNoTitle: l, heightSource: n, heightTitle: s, heightLegend: u } = ia({
161
+ chart: N.value,
162
+ title: a.value.style.chart.title.text ? Me.value : null,
163
+ legend: a.value.style.chart.legend.show ? xe.value : null,
164
+ source: Ae.value,
165
+ noTitle: Ie.value
166
+ }), f = s + u + n + l;
167
+ o < t ? N.value.style.width = "100%" : (N.value.style.height = "100%", J.value.style.height = `calc(100% - ${f}px)`);
168
+ }, 100);
169
+ X.value && (q.value && X.value.unobserve(q.value), X.value.disconnect()), X.value = new ResizeObserver(e), q.value = N.value.parentNode, X.value.observe(q.value), e();
170
+ }
171
+ Re.value = setTimeout(() => {
172
+ W.value = !0;
173
+ }, 500);
174
+ }
175
+ function bt() {
176
+ if (!w.value || !Object.hasOwn(w.value, "matrix") || w.value.matrix.length < 2) {
177
+ console.warn(`VueUiChord: dataset.matrix requires a minimum of 2 datapoints, for example:
178
+
179
+ matrix:[
180
+ [1, 1],
181
+ [1, 1]
182
+ ]`), E.value = !1;
183
+ return;
184
+ }
185
+ w.value.matrix.forEach((e, o) => {
186
+ e.length !== w.value.matrix.length && (console.warn(`VueUiChord - Invalid matrix: dataset.matrix at index ${o} has ${e.length} elements instead of the required ${w.value.matrix.length}
187
+
188
+ dataset.matrix[${o}] = [${e.toString()}] has a length of ${e.length} but should have the same length as the matrix itself (${w.value.matrix.length})`), E.value = !1);
189
+ });
190
+ }
191
+ const Re = d(null);
192
+ tt(() => {
193
+ be();
194
+ });
195
+ const B = d({
196
+ height: 600,
197
+ width: 600
198
+ }), mt = C(() => a.value.userOptions.show && !a.value.style.chart.title.text), yt = C(() => Qt(a.value.customPalette)), p = C(() => ({
199
+ inner: B.value.width * 0.3 * a.value.style.chart.arcs.innerRadiusRatio,
200
+ outer: B.value.width * 0.34 * a.value.style.chart.arcs.outerRadiusRatio
201
+ })), kt = C(() => a.value.style.chart.arcs.padAngle / 100), m = C(() => ({
202
+ matrix: w.value.matrix ?? [[0]],
203
+ labels: w.value.labels ?? [""],
204
+ colors: w.value.colors && Array.isArray(w.value.colors) && w.value.colors.length ? w.value.colors.map((e) => Zt(e)) : w.value.matrix.map((e, o) => yt.value[o] || ve[o] || ve[o % ve.length])
205
+ }));
206
+ function $t(e, o) {
207
+ const t = e.length, l = p.value.inner, n = new Array(t).fill(0);
208
+ let s = 0;
209
+ for (let c = 0; c < t; c += 1)
210
+ for (let y = 0; y < t; y += 1)
211
+ n[c] += e[c][y], s += e[c][y];
212
+ const u = (2 * Math.PI - o * t) / s, f = [];
213
+ let A = 0;
214
+ for (let c = 0; c < t; c += 1) {
215
+ const y = A, _ = y + n[c] * u;
216
+ f.push({
217
+ index: c,
218
+ pattern: `pattern_${S.value}_${c}`,
219
+ startAngle: y,
220
+ endAngle: _,
221
+ name: m.value.labels[c],
222
+ id: $e(),
223
+ color: m.value.colors[c],
224
+ proportion: n[c] / s
225
+ }), A = _ + o;
226
+ }
227
+ const I = [];
228
+ for (let c = 0; c < t; c += 1) {
229
+ const y = e[c].map((L, U) => ({ j: U, v: L }));
230
+ y.sort((L, U) => U.v - L.v);
231
+ let _ = f[c].startAngle;
232
+ for (const { j: L, v: U } of y) {
233
+ const j = _, ae = j + U * u;
234
+ I.push({
235
+ index: c,
236
+ subIndex: L,
237
+ pattern: `pattern_${S.value}_${c}`,
238
+ startAngle: j,
239
+ endAngle: ae,
240
+ value: U,
241
+ groupName: m.value.labels[c],
242
+ groupId: f[c].id,
243
+ groupColor: m.value.colors[c],
244
+ midAngle: (j + ae) / 2,
245
+ midBaseX: Math.cos((j + ae) / 2 - Math.PI / 2) * l,
246
+ midBaseY: Math.sin((j + ae) / 2 - Math.PI / 2) * l
247
+ }), _ = ae;
248
+ }
249
+ }
250
+ const R = [];
251
+ for (const c of I) {
252
+ const y = I.find(
253
+ (_) => _.index === c.subIndex && _.subIndex === c.index
254
+ );
255
+ R.push({ source: c, target: y, id: $e() });
256
+ }
257
+ return { groups: f, chords: R };
258
+ }
259
+ const M = C(() => {
260
+ const e = $t(m.value.matrix, kt.value);
261
+ return bt(), e.chords.sort(
262
+ (o, t) => Math.max(t.source.value, t.target.value) - Math.max(o.source.value, o.target.value)
263
+ ), e;
264
+ }), wt = C(() => {
265
+ const e = p.value.outer + a.value.style.chart.ribbons.labels.offset + 12, t = a.value.style.chart.ribbons.labels.fontSize * 0.6, l = [];
266
+ if (b.value) {
267
+ const s = b.value;
268
+ if (s.source.value) {
269
+ const u = String(s.source.value);
270
+ l.push({
271
+ id: s.id + "-src",
272
+ theta: s.source.midAngle,
273
+ w: u.length * t / e,
274
+ midBaseX: s.source.midBaseX,
275
+ midBaseY: s.source.midBaseY,
276
+ groupColor: s.source.groupColor,
277
+ value: s.source.value
278
+ });
279
+ }
280
+ if (s.target && s.target.value && s.target.value !== s.source.value) {
281
+ const u = String(s.target.value);
282
+ l.push({
283
+ id: s.id + "-tgt",
284
+ theta: s.target.midAngle,
285
+ w: u.length * t / e,
286
+ midBaseX: s.target.midBaseX,
287
+ midBaseY: s.target.midBaseY,
288
+ groupColor: s.target.groupColor,
289
+ value: s.target.value
290
+ });
291
+ }
292
+ return l;
293
+ }
294
+ function n(s) {
295
+ M.value.chords.filter((u) => u.source.groupId === s && u.source.value).forEach((u) => {
296
+ {
297
+ const f = String(u.source.value);
298
+ l.push({
299
+ id: u.id + "-src",
300
+ theta: u.source.midAngle,
301
+ w: f.length * t / e,
302
+ midBaseX: u.source.midBaseX,
303
+ midBaseY: u.source.midBaseY,
304
+ groupColor: u.source.groupColor,
305
+ value: u.source.value
306
+ });
307
+ }
308
+ if (u.target && u.target.value && u.target.value !== u.source.value) {
309
+ const f = String(u.target.value);
310
+ l.push({
311
+ id: u.id + "-tgt",
312
+ theta: u.target.midAngle,
313
+ w: f.length * t / e,
314
+ midBaseX: u.target.midBaseX,
315
+ midBaseY: u.target.midBaseY,
316
+ groupColor: u.target.groupColor,
317
+ value: u.target.value
318
+ });
319
+ }
320
+ });
321
+ }
322
+ return g.value && n(g.value), $.value && n($.value.id), l;
323
+ }), Ct = C(() => {
324
+ const e = wt.value.map((n) => ({ ...n })).sort((n, s) => n.theta - s.theta), o = a.value.style.chart.ribbons.labels.minSeparationDeg * Math.PI / 180;
325
+ let t = !0, l = 0;
326
+ for (; t && l++ < 10; ) {
327
+ t = !1;
328
+ for (let f = 1; f < e.length; f += 1) {
329
+ const A = e[f - 1], I = e[f], R = A.theta + A.w + o;
330
+ I.theta < R && (I.theta = R, t = !0);
331
+ }
332
+ const n = e[0], s = e[e.length - 1], u = s.theta + s.w + o - 2 * Math.PI;
333
+ n.theta < u && (n.theta = u, t = !0);
334
+ }
335
+ return e;
336
+ });
337
+ function De(e, o, t, l) {
338
+ const n = e - Math.PI / 2, s = o - Math.PI / 2, u = Math.cos(n) * t, f = Math.sin(n) * t, A = Math.cos(s) * t, I = Math.sin(s) * t, R = Math.cos(s) * l, c = Math.sin(s) * l, y = Math.cos(n) * l, _ = Math.sin(n) * l, L = o - e > Math.PI ? 1 : 0;
339
+ return `M${u},${f} A${t},${t} 0 ${L} 1 ${A},${I} L${R},${c} A${l},${l} 0 ${L} 0 ${y},${_} Z`;
340
+ }
341
+ function le(e, o) {
342
+ const t = p.value.inner, l = e.startAngle - Math.PI / 2, n = e.endAngle - Math.PI / 2, s = o.startAngle - Math.PI / 2, u = o.endAngle - Math.PI / 2, f = Math.cos(l) * t, A = Math.sin(l) * t, I = Math.cos(n) * t, R = Math.sin(n) * t, c = Math.cos(s) * t, y = Math.sin(s) * t, _ = Math.cos(u) * t, L = Math.sin(u) * t, U = e.endAngle - e.startAngle > Math.PI ? 1 : 0, j = o.endAngle - o.startAngle > Math.PI ? 1 : 0;
343
+ return `M${f},${A}A${t},${t} 0 ${U} 1 ${I},${R}Q0,0 ${c},${y}A${t},${t} 0 ${j} 1 ${_},${L}Q0,0 ${f},${A}Z`;
344
+ }
345
+ const Fe = C(() => x.value * Math.PI / 180);
346
+ function Mt(e) {
347
+ return (e.startAngle + e.endAngle) / 2;
348
+ }
349
+ function xt(e) {
350
+ return ((Mt(e) + Fe.value) % (2 * Math.PI) + 2 * Math.PI) % (2 * Math.PI);
351
+ }
352
+ function At(e) {
353
+ let o = e + Fe.value;
354
+ return o = (o % (2 * Math.PI) + 2 * Math.PI) % (2 * Math.PI), o > Math.PI ? "end" : "start";
355
+ }
356
+ function It(e) {
357
+ const o = e - Math.PI / 2, t = Math.cos(o) * (p.value.outer + a.value.style.chart.arcs.labels.offset + 24), l = Math.sin(o) * (p.value.outer + a.value.style.chart.arcs.labels.offset + 24);
358
+ return `translate(${t},${l})`;
359
+ }
360
+ function _t(e, o, t) {
361
+ const l = e - Math.PI / 2, n = o - Math.PI / 2, s = Math.cos(l) * t, u = Math.sin(l) * t, f = Math.cos(n) * t, A = Math.sin(n) * t, I = o - e > Math.PI ? 1 : 0;
362
+ return `M${s},${u} A${t},${t} 0 ${I} 1 ${f},${A}`;
363
+ }
364
+ const x = d(a.value.initialRotation), ee = d(!1);
365
+ let ze = 0, Xe = 0;
366
+ function Ue(e) {
367
+ const o = J.value.getBoundingClientRect(), t = o.left + o.width / 2, l = o.top + o.height / 2, n = e.clientX ?? e.touches[0].clientX, s = e.clientY ?? e.touches[0].clientY;
368
+ return Math.atan2(s - l, n - t);
369
+ }
370
+ function Ve(e) {
371
+ !a.value.enableRotation || te.value || (e.preventDefault(), ee.value = !0, ze = x.value, Xe = Ue(e));
372
+ }
373
+ function se(e) {
374
+ if (!ee.value) return;
375
+ const o = Ue(e);
376
+ x.value = ze + (o - Xe) * 180 / Math.PI;
377
+ }
378
+ function ne() {
379
+ ee.value = !1;
380
+ }
381
+ function je(e) {
382
+ return la(
383
+ a.value.style.chart.ribbons.labels.formatter,
384
+ e,
385
+ we({
386
+ p: a.value.style.chart.ribbons.labels.prefix,
387
+ v: e,
388
+ s: a.value.style.chart.ribbons.labels.suffix,
389
+ r: a.value.style.chart.ribbons.labels.rounding
390
+ })
391
+ );
392
+ }
393
+ tt(() => {
394
+ window.addEventListener("mousemove", se), window.addEventListener("mouseup", ne), window.addEventListener("touchmove", se, { passive: !1 }), window.addEventListener("touchend", ne);
395
+ }), at(() => {
396
+ window.removeEventListener("mousemove", se), window.removeEventListener("mouseup", ne), window.removeEventListener("touchmove", se), window.removeEventListener("touchend", ne), clearTimeout(Re.value), X.value && (q.value && X.value.unobserve(q.value), X.value.disconnect());
397
+ });
398
+ const me = d(!1);
399
+ function Ye(e) {
400
+ me.value = e, Ce.value += 1;
401
+ }
402
+ function Pt(e, o) {
403
+ a.value.events.datapointEnter && a.value.events.datapointEnter({ datapoint: e, seriesIndex: o }), !g.value && ($.value = e);
404
+ }
405
+ function St(e, o) {
406
+ $.value = null, a.value.events.datapointLeave && a.value.events.datapointLeave({ datapoint: e, seriesIndex: o });
407
+ }
408
+ function Tt(e, o) {
409
+ oe("selectGroup", e), a.value.events.datapointClick && a.value.events.datapointClick({ datapoint: e, seriesIndex: o });
410
+ }
411
+ function Bt(e, o) {
412
+ a.value.events.datapointEnter && a.value.events.datapointEnter({ datapoint: e, seriesIndex: o }), !g.value && (b.value = e);
413
+ }
414
+ function Lt(e, o) {
415
+ b.value = null, a.value.events.datapointLeave && a.value.events.datapointLeave({ datapoint: e, seriesIndex: o });
416
+ }
417
+ function Ot(e, o) {
418
+ oe("selectRibbon", e), a.value.events.datapointClick && a.value.events.datapointClick({ datapoint: e, seriesIndex: o });
419
+ }
420
+ function Ge(e) {
421
+ return !g.value && !$.value && !b.value ? 0.8 : (g.value ? g.value === e.source.groupId : $.value ? $.value.id === e.source.groupId : b.value?.id === e.id) ? 1 : 0.1;
422
+ }
423
+ function We(e) {
424
+ return !g.value && !$.value && !b.value || (g.value ? g.value === e.id : $.value ? $.value.id === e.id : [b.value?.source.groupId, b.value?.target.groupId].includes(e.id)) ? 1 : 0.3;
425
+ }
426
+ const te = d(!1);
427
+ function ye() {
428
+ te.value = !te.value;
429
+ }
430
+ function qe() {
431
+ K.value.showTable = !K.value.showTable;
432
+ }
433
+ function Et() {
434
+ return M.value;
435
+ }
436
+ const V = d(null);
437
+ function He() {
438
+ const e = a.value.initialRotation;
439
+ V.value !== null && cancelAnimationFrame(V.value);
440
+ const o = () => {
441
+ x.value += (e - x.value) * 0.05, Math.abs(x.value - e) < 0.1 ? (x.value = e, V.value = null) : V.value = requestAnimationFrame(o);
442
+ };
443
+ V.value = requestAnimationFrame(o);
444
+ }
445
+ at(() => {
446
+ V.value !== null && cancelAnimationFrame(V.value);
447
+ });
448
+ function Qe(e) {
449
+ e === g.value ? (g.value = null, oe("selectLegend", null)) : (g.value = e, oe("selectLegend", M.value.groups.find((o) => o.id === e)));
450
+ }
451
+ const Ze = C(() => M.value.groups.map((e, o) => ({
452
+ name: e.name,
453
+ color: e.color,
454
+ shape: "circle",
455
+ patternIndex: o,
456
+ pattern: `pattern_${S.value}_${o}`,
457
+ id: e.id,
458
+ select: () => Qe(e.id),
459
+ opacity: g.value ? g.value === e.id ? 1 : 0.3 : 1
460
+ }))), Nt = C(() => ({
461
+ cy: "chord-div-legend",
462
+ backgroundColor: a.value.style.chart.legend.backgroundColor,
463
+ color: a.value.style.chart.legend.color,
464
+ fontSize: a.value.style.chart.legend.fontSize,
465
+ paddingBottom: 12,
466
+ fontWeight: a.value.style.chart.legend.bold ? "bold" : ""
467
+ })), re = C(() => {
468
+ const e = M.value.groups.map((t, l) => ({
469
+ name: t.name || l,
470
+ color: t.color
471
+ })), o = m.value.matrix;
472
+ return { head: e, body: o };
473
+ }), ue = C(() => {
474
+ const e = [{ name: "", color: null }, ...re.value.head], o = re.value.body.map((n, s) => [
475
+ re.value.head[s],
476
+ ...re.value.body[s]
477
+ ]), t = {
478
+ th: {
479
+ backgroundColor: a.value.table.th.backgroundColor,
480
+ color: a.value.table.th.color,
481
+ outline: a.value.table.th.outline
482
+ },
483
+ td: {
484
+ backgroundColor: a.value.table.td.backgroundColor,
485
+ color: a.value.table.td.color,
486
+ outline: a.value.table.td.outline
487
+ },
488
+ breakpoint: a.value.table.responsiveBreakpoint
489
+ };
490
+ return {
491
+ colNames: e,
492
+ head: e,
493
+ body: o,
494
+ config: t
495
+ };
496
+ });
497
+ function Je(e = null) {
498
+ Vt(() => {
499
+ const o = m.value.matrix.map((n, s) => [
500
+ [m.value.labels[s] || s],
501
+ n
502
+ ]), t = [
503
+ [a.value.style.chart.title.text],
504
+ [a.value.style.chart.title.subtitle.text],
505
+ [
506
+ [""],
507
+ ...m.value.labels.map((n, s) => [n || s])
508
+ ]
509
+ ].concat(o), l = aa(t);
510
+ e ? e(l) : oa({ csvContent: l, title: a.value.style.chart.title.text || "vue-ui-chord" });
511
+ });
512
+ }
513
+ async function Rt({ scale: e = 2 } = {}) {
514
+ if (!N.value) return;
515
+ const { width: o, height: t } = N.value.getBoundingClientRect(), l = o / t, { imageUri: n, base64: s } = await ha({ domElement: N.value, base64: !0, img: !0, scale: e });
516
+ return {
517
+ imageUri: n,
518
+ base64: s,
519
+ title: a.value.style.chart.title.text,
520
+ width: o,
521
+ height: t,
522
+ aspectRatio: l
523
+ };
524
+ }
525
+ function Dt(e, o) {
526
+ return `${m.value.labels[o]}${a.value.style.chart.arcs.labels.showPercentage ? we({
527
+ p: " (",
528
+ v: isNaN(e.proportion) ? 0 : e.proportion * 100,
529
+ s: "%)",
530
+ r: a.value.style.chart.arcs.labels.roundingPercentage
531
+ }) : ""}`;
532
+ }
533
+ return ut({
534
+ getData: Et,
535
+ getImage: Rt,
536
+ generateCsv: Je,
537
+ generateImage: Oe,
538
+ generatePdf: Le,
539
+ toggleAnnotator: ye,
540
+ toggleTable: qe,
541
+ toggleFullscreen: Ye
542
+ }), (e, o) => (r(), i("div", {
543
+ ref_key: "chordChart",
544
+ ref: N,
545
+ class: F({
546
+ "vue-ui-chord": !0,
547
+ "vue-data-ui-wrapper-fullscreen": me.value,
548
+ "vue-data-ui-responsive": a.value.responsive
549
+ }),
550
+ style: D(`font-family:${a.value.style.fontFamily};width:100%; text-align:center;background:${a.value.style.chart.backgroundColor}`),
551
+ id: `chord_${S.value}`,
552
+ onMouseenter: o[2] || (o[2] = () => v(Pe)(!0)),
553
+ onMouseleave: o[3] || (o[3] = () => v(Pe)(!1))
554
+ }, [
555
+ a.value.userOptions.buttons.annotator && v(J) ? (r(), Y(v(ft), {
556
+ key: 0,
557
+ color: a.value.style.chart.color,
558
+ backgroundColor: a.value.style.chart.backgroundColor,
559
+ active: te.value,
560
+ svgRef: v(J),
561
+ onClose: ye
562
+ }, null, 8, ["color", "backgroundColor", "active", "svgRef"])) : h("", !0),
563
+ k(e.$slots, "userConfig", {}, void 0, !0),
564
+ mt.value ? (r(), i("div", {
565
+ key: 1,
566
+ ref_key: "noTitle",
567
+ ref: Ie,
568
+ class: "vue-data-ui-no-title-space",
569
+ style: "height:36px; width: 100%;background:transparent"
570
+ }, null, 512)) : h("", !0),
571
+ a.value.style.chart.title.text ? (r(), i("div", {
572
+ key: 2,
573
+ ref_key: "chartTitle",
574
+ ref: Me,
575
+ style: "width:100%;background:transparent;padding-bottom:24px"
576
+ }, [
577
+ (r(), Y(va, {
578
+ key: `title_${de.value}`,
579
+ config: {
580
+ title: {
581
+ cy: "chord-div-title",
582
+ ...a.value.style.chart.title
583
+ },
584
+ subtitle: {
585
+ cy: "chord-div-subtitle",
586
+ ...a.value.style.chart.title.subtitle
587
+ }
588
+ }
589
+ }, null, 8, ["config"]))
590
+ ], 512)) : h("", !0),
591
+ a.value.userOptions.show && E.value && (v(Se) || v(ge)) ? (r(), Y(v(gt), {
592
+ ref: "details",
593
+ key: `user_option_${Ce.value}`,
594
+ backgroundColor: a.value.style.chart.backgroundColor,
595
+ color: a.value.style.chart.color,
596
+ isPrinting: v(Te),
597
+ isImaging: v(Be),
598
+ uid: S.value,
599
+ hasTooltip: !1,
600
+ hasPdf: a.value.userOptions.buttons.pdf,
601
+ hasImg: a.value.userOptions.buttons.img,
602
+ hasXls: a.value.userOptions.buttons.csv,
603
+ hasTable: a.value.userOptions.buttons.table,
604
+ hasLabel: !1,
605
+ hasFullscreen: a.value.userOptions.buttons.fullscreen,
606
+ isFullscreen: me.value,
607
+ chartElement: N.value,
608
+ position: a.value.userOptions.position,
609
+ titles: { ...a.value.userOptions.buttonTitles },
610
+ hasAnnotator: a.value.userOptions.buttons.annotator,
611
+ isAnnotation: te.value,
612
+ callbacks: a.value.userOptions.callbacks,
613
+ printScale: a.value.userOptions.print.scale,
614
+ onToggleFullscreen: Ye,
615
+ onGeneratePdf: v(Le),
616
+ onGenerateCsv: Je,
617
+ onGenerateImage: v(Oe),
618
+ onToggleTable: qe,
619
+ onToggleAnnotator: ye,
620
+ style: D({
621
+ visibility: v(Se) ? v(ge) ? "visible" : "hidden" : "visible"
622
+ })
623
+ }, ot({ _: 2 }, [
624
+ e.$slots.menuIcon ? {
625
+ name: "menuIcon",
626
+ fn: P(({ isOpen: t, color: l }) => [
627
+ k(e.$slots, "menuIcon", ie(ce({ isOpen: t, color: l })), void 0, !0)
628
+ ]),
629
+ key: "0"
630
+ } : void 0,
631
+ e.$slots.optionPdf ? {
632
+ name: "optionPdf",
633
+ fn: P(() => [
634
+ k(e.$slots, "optionPdf", {}, void 0, !0)
635
+ ]),
636
+ key: "1"
637
+ } : void 0,
638
+ e.$slots.optionCsv ? {
639
+ name: "optionCsv",
640
+ fn: P(() => [
641
+ k(e.$slots, "optionCsv", {}, void 0, !0)
642
+ ]),
643
+ key: "2"
644
+ } : void 0,
645
+ e.$slots.optionImg ? {
646
+ name: "optionImg",
647
+ fn: P(() => [
648
+ k(e.$slots, "optionImg", {}, void 0, !0)
649
+ ]),
650
+ key: "3"
651
+ } : void 0,
652
+ e.$slots.optionTable ? {
653
+ name: "optionTable",
654
+ fn: P(() => [
655
+ k(e.$slots, "optionTable", {}, void 0, !0)
656
+ ]),
657
+ key: "4"
658
+ } : void 0,
659
+ e.$slots.optionFullscreen ? {
660
+ name: "optionFullscreen",
661
+ fn: P(({ toggleFullscreen: t, isFullscreen: l }) => [
662
+ k(e.$slots, "optionFullscreen", ie(ce({ toggleFullscreen: t, isFullscreen: l })), void 0, !0)
663
+ ]),
664
+ key: "5"
665
+ } : void 0,
666
+ e.$slots.optionAnnotator ? {
667
+ name: "optionAnnotator",
668
+ fn: P(({ toggleAnnotator: t, isAnnotator: l }) => [
669
+ k(e.$slots, "optionAnnotator", ie(ce({ toggleAnnotator: t, isAnnotator: l })), void 0, !0)
670
+ ]),
671
+ key: "6"
672
+ } : void 0
673
+ ]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasXls", "hasTable", "hasFullscreen", "isFullscreen", "chartElement", "position", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "onGeneratePdf", "onGenerateImage", "style"])) : h("", !0),
674
+ (r(), i("svg", {
675
+ xmlns: v(Jt),
676
+ ref_key: "svgRef",
677
+ ref: J,
678
+ viewBox: `0 0 ${B.value.width} ${B.value.height}`,
679
+ preserveAspectRatio: "xMidYMid meet",
680
+ style: {
681
+ overflow: "visible"
682
+ },
683
+ class: F({ "vue-ui-chord-rotating": ee.value, "vue-ui-chord-idle": !ee.value }),
684
+ onMousedown: lt(Ve, ["prevent"]),
685
+ onTouchstart: lt(Ve, ["prevent"])
686
+ }, [
687
+ ke(v(ht)),
688
+ e.$slots["chart-background"] ? (r(), i("foreignObject", {
689
+ key: 0,
690
+ x: 0,
691
+ y: 0,
692
+ width: B.value.width <= 0 ? 10 : B.value.width,
693
+ height: B.value.height <= 0 ? 10 : B.value.height,
694
+ style: {
695
+ pointerEvents: "none"
696
+ }
697
+ }, [
698
+ k(e.$slots, "chart-background", {}, void 0, !0)
699
+ ], 8, ya)) : h("", !0),
700
+ a.value.style.chart.arcs.labels.curved ? (r(), i("defs", ka, [
701
+ (r(!0), i(z, null, G(M.value.groups, (t, l) => (r(), i("path", {
702
+ key: `labelPath-${l}`,
703
+ id: `labelPath-${l}_${S.value}`,
704
+ d: _t(
705
+ t.startAngle,
706
+ t.endAngle,
707
+ (p.value.inner + p.value.outer) / 2 + a.value.style.chart.arcs.labels.offset
708
+ ),
709
+ fill: "none"
710
+ }, null, 8, $a))), 128))
711
+ ])) : h("", !0),
712
+ e.$slots.pattern ? (r(), i("g", wa, [
713
+ (r(!0), i(z, null, G(M.value.groups, (t, l) => (r(), i("defs", null, [
714
+ k(e.$slots, "pattern", Xt({ ref_for: !0 }, { seriesIndex: t.index, patternId: `pattern_${S.value}_${l}` }), void 0, !0)
715
+ ]))), 256))
716
+ ])) : h("", !0),
717
+ O("g", {
718
+ transform: `translate(${B.value.width / 2}, ${B.value.height / 2}) rotate(${x.value})`
719
+ }, [
720
+ (r(!0), i(z, null, G(M.value.groups, (t, l) => (r(), i("g", null, [
721
+ (r(), i("path", {
722
+ class: F({ "vue-ui-chord-arc": !0, "vue-ui-chord-arc-animated": a.value.useCssAnimation && !W.value }),
723
+ key: `arc-${l}`,
724
+ d: De(
725
+ t.startAngle,
726
+ t.endAngle,
727
+ p.value.outer,
728
+ p.value.inner
729
+ ),
730
+ fill: m.value.colors[l],
731
+ stroke: a.value.style.chart.arcs.stroke,
732
+ "stroke-width": a.value.style.chart.arcs.strokeWidth,
733
+ "stroke-linecap": "round",
734
+ "stroke-linejoin": "round",
735
+ style: D({
736
+ opacity: We(t)
737
+ }),
738
+ onMouseenter: (n) => Pt(t, l),
739
+ onMouseleave: (n) => St(t, l),
740
+ onClick: (n) => Tt(t, l)
741
+ }, null, 46, Ma)),
742
+ e.$slots.pattern ? (r(), i("path", {
743
+ class: F({ "vue-ui-chord-arc": !0, "vue-ui-chord-arc-animated": a.value.useCssAnimation && !W.value }),
744
+ key: `arc-${l}`,
745
+ d: De(
746
+ t.startAngle,
747
+ t.endAngle,
748
+ p.value.outer,
749
+ p.value.inner
750
+ ),
751
+ fill: `url(#${t.pattern})`,
752
+ stroke: a.value.style.chart.arcs.stroke,
753
+ "stroke-width": a.value.style.chart.arcs.strokeWidth,
754
+ "stroke-linecap": "round",
755
+ "stroke-linejoin": "round",
756
+ style: D({
757
+ opacity: We(t),
758
+ pointerEvents: "none"
759
+ })
760
+ }, null, 14, xa)) : h("", !0)
761
+ ]))), 256)),
762
+ O("g", null, [
763
+ (r(!0), i(z, null, G($.value ? M.value.chords.filter((t) => t.source.groupId === $.value.id) : g.value ? M.value.chords.filter((t) => t.source.groupId === g.value) : M.value.chords, (t, l) => (r(), i(z, {
764
+ key: `ribbon-${t.id}`
765
+ }, [
766
+ t.source.value ? (r(), i("path", {
767
+ key: 0,
768
+ class: F({ "vue-ui-chord-ribbon": !0, "vue-ui-chord-ribbon-animated": a.value.useCssAnimation && !W.value }),
769
+ d: le(t.source, t.target),
770
+ fill: a.value.style.chart.backgroundColor,
771
+ style: D({ opacity: a.value.style.chart.ribbons.underlayerOpacity })
772
+ }, null, 14, Aa)) : h("", !0),
773
+ t.source.value ? (r(), i("path", {
774
+ key: 1,
775
+ class: F({ "vue-ui-chord-ribbon": !0, "vue-ui-chord-ribbon-animated": a.value.useCssAnimation && !W.value }),
776
+ d: le(t.source, t.target),
777
+ fill: m.value.colors[t.source.index],
778
+ stroke: a.value.style.chart.ribbons.stroke,
779
+ "stroke-width": a.value.style.chart.ribbons.strokeWidth,
780
+ "stroke-linecap": "round",
781
+ "stroke-linejoin": "round",
782
+ style: D({ opacity: Ge(t) }),
783
+ onMouseenter: (n) => Bt({
784
+ ...t,
785
+ path: le(t.source, t.target),
786
+ color: m.value.colors[t.source.index]
787
+ }, l),
788
+ onClick: (n) => Ot({
789
+ ...t,
790
+ color: m.value.colors[t.source.index]
791
+ }, l),
792
+ onMouseleave: (n) => Lt({
793
+ ...t,
794
+ color: m.value.colors[t.source.index]
795
+ }, l)
796
+ }, null, 46, Ia)) : h("", !0),
797
+ t.source.value && e.$slots.pattern ? (r(), i("path", {
798
+ key: 2,
799
+ class: F({ "vue-ui-chord-ribbon": !0, "vue-ui-chord-ribbon-animated": a.value.useCssAnimation && !W.value }),
800
+ d: le(t.source, t.target),
801
+ fill: `url(#pattern_${S.value}_${t.source.index})`,
802
+ stroke: a.value.style.chart.ribbons.stroke,
803
+ "stroke-width": a.value.style.chart.ribbons.strokeWidth,
804
+ "stroke-linecap": "round",
805
+ "stroke-linejoin": "round",
806
+ style: D({
807
+ opacity: Ge(t),
808
+ pointerEvents: "none"
809
+ })
810
+ }, null, 14, _a)) : h("", !0)
811
+ ], 64))), 128)),
812
+ b.value ? (r(), i("path", {
813
+ key: 0,
814
+ d: b.value.path,
815
+ fill: b.value.color,
816
+ stroke: a.value.style.chart.ribbons.stroke,
817
+ "stroke-width": a.value.style.chart.ribbons.strokeWidth,
818
+ "stroke-linecap": "round",
819
+ "stroke-linejoin": "round",
820
+ class: F({ "vue-ui-chord-ribbon": !0 }),
821
+ style: {
822
+ pointerEvents: "none"
823
+ }
824
+ }, null, 8, Pa)) : h("", !0),
825
+ b.value && e.$slots.pattern ? (r(), i("path", {
826
+ key: 1,
827
+ d: b.value.path,
828
+ fill: `url(#${b.value.source.pattern})`,
829
+ stroke: a.value.style.chart.ribbons.stroke,
830
+ "stroke-width": a.value.style.chart.ribbons.strokeWidth,
831
+ "stroke-linecap": "round",
832
+ "stroke-linejoin": "round",
833
+ class: F({ "vue-ui-chord-ribbon": !0 }),
834
+ style: {
835
+ pointerEvents: "none"
836
+ }
837
+ }, null, 8, Sa)) : h("", !0)
838
+ ]),
839
+ ($.value || b.value || g.value) && a.value.style.chart.ribbons.labels.show ? (r(), i("g", Ta, [
840
+ (r(!0), i(z, null, G(Ct.value, (t) => (r(), i(z, {
841
+ key: t.id
842
+ }, [
843
+ O("line", {
844
+ x1: t.midBaseX,
845
+ y1: t.midBaseY,
846
+ x2: Math.cos(t.theta - Math.PI / 2) * (p.value.outer + a.value.style.chart.ribbons.labels.offset + 12),
847
+ y2: Math.sin(t.theta - Math.PI / 2) * (p.value.outer + a.value.style.chart.ribbons.labels.offset + 12),
848
+ stroke: a.value.style.chart.backgroundColor,
849
+ "stroke-width": a.value.style.chart.ribbons.labels.connector.strokeWidth * 3,
850
+ "pointer-events": "none"
851
+ }, null, 8, Ba),
852
+ O("line", {
853
+ x1: t.midBaseX,
854
+ y1: t.midBaseY,
855
+ x2: Math.cos(t.theta - Math.PI / 2) * (p.value.outer + a.value.style.chart.ribbons.labels.offset + 12),
856
+ y2: Math.sin(t.theta - Math.PI / 2) * (p.value.outer + a.value.style.chart.ribbons.labels.offset + 12),
857
+ stroke: a.value.style.chart.ribbons.labels.connector.stroke,
858
+ "stroke-width": a.value.style.chart.ribbons.labels.connector.strokeWidth,
859
+ "pointer-events": "none"
860
+ }, null, 8, La),
861
+ a.value.style.chart.ribbons.labels.marker.show ? (r(), i("circle", {
862
+ key: 0,
863
+ cx: Math.cos(t.theta - Math.PI / 2) * (p.value.outer + a.value.style.chart.ribbons.labels.offset + 12),
864
+ cy: Math.sin(t.theta - Math.PI / 2) * (p.value.outer + a.value.style.chart.ribbons.labels.offset + 12),
865
+ r: a.value.style.chart.ribbons.labels.marker.radius,
866
+ stroke: a.value.style.chart.ribbons.labels.marker.stroke,
867
+ "stroke-width": a.value.style.chart.ribbons.labels.marker.strokeWidth,
868
+ fill: t.groupColor,
869
+ "pointer-events": "none"
870
+ }, null, 8, Oa)) : h("", !0),
871
+ O("text", {
872
+ transform: `
873
+ translate(
874
+ ${Math.cos(t.theta - Math.PI / 2) * (p.value.outer + a.value.style.chart.ribbons.labels.offset + 24)},
875
+ ${Math.sin(t.theta - Math.PI / 2) * (p.value.outer + a.value.style.chart.ribbons.labels.offset + 24)}
876
+ ) rotate(${-x.value})
877
+ `,
878
+ fill: a.value.style.chart.ribbons.labels.useSerieColor ? t.groupColor : a.value.style.chart.ribbons.labels.color,
879
+ "text-anchor": At(t.theta),
880
+ "font-size": a.value.style.chart.ribbons.labels.fontSize,
881
+ "font-weight": a.value.style.chart.ribbons.labels.bold ? "bold" : "normal",
882
+ dy: ".35em",
883
+ "pointer-events": "none"
884
+ }, Q(je(t.value)), 9, Ea)
885
+ ], 64))), 128))
886
+ ])) : h("", !0),
887
+ a.value.style.chart.arcs.labels.show ? (r(), i("g", Na, [
888
+ a.value.style.chart.arcs.labels.curved ? (r(!0), i(z, { key: 0 }, G(M.value.groups, (t, l) => (r(), i("text", {
889
+ class: "vue-ui-chord-label-curved",
890
+ key: `curved-label-${l}`,
891
+ "font-size": a.value.style.chart.arcs.labels.fontSize,
892
+ "font-weight": a.value.style.chart.arcs.labels.bold ? "bold" : "normal",
893
+ fill: a.value.style.chart.arcs.labels.adaptColorToBackground ? v(Kt)(m.value.colors[l]) : a.value.style.chart.arcs.labels.color
894
+ }, [
895
+ O("textPath", {
896
+ href: `#labelPath-${l}_${S.value}`,
897
+ startOffset: "50%",
898
+ "text-anchor": "middle"
899
+ }, Q(m.value.labels[l]) + Q(a.value.style.chart.arcs.labels.showPercentage ? v(we)({
900
+ p: " (",
901
+ v: isNaN(t.proportion) ? 0 : t.proportion * 100,
902
+ s: "%)",
903
+ r: a.value.style.chart.arcs.labels.roundingPercentage
904
+ }) : ""), 9, Da)
905
+ ], 8, Ra))), 128)) : !$.value && !b.value && !g.value ? (r(!0), i(z, { key: 1 }, G(M.value.groups, (t, l) => (r(), i("text", {
906
+ class: "vue-ui-chord-label-straight",
907
+ key: `label-${l}`,
908
+ transform: `
909
+ ${It((t.startAngle + t.endAngle) / 2)}
910
+ rotate(${-x.value})
911
+ `,
912
+ dy: ".35em",
913
+ "text-anchor": xt(t) > Math.PI ? "end" : "start",
914
+ "font-size": a.value.style.chart.arcs.labels.fontSize,
915
+ "font-weight": a.value.style.chart.arcs.labels.bold ? "bold" : "normal",
916
+ fill: a.value.style.chart.arcs.labels.color,
917
+ innerHTML: v(ea)({
918
+ content: v(ta)(Dt(t, l)),
919
+ fontSize: a.value.style.chart.arcs.labels.fontSize,
920
+ fill: a.value.style.chart.arcs.labels.color,
921
+ x: 0,
922
+ y: 0
923
+ })
924
+ }, null, 8, Fa))), 128)) : h("", !0)
925
+ ])) : h("", !0)
926
+ ], 8, Ca),
927
+ k(e.$slots, "svg", { svg: { height: 600, width: 600 } }, void 0, !0)
928
+ ], 42, ma)),
929
+ e.$slots.watermark ? (r(), i("div", za, [
930
+ k(e.$slots, "watermark", ie(ce({ isPrinting: v(Te) || v(Be) })), void 0, !0)
931
+ ])) : h("", !0),
932
+ O("div", {
933
+ ref_key: "chartLegend",
934
+ ref: xe
935
+ }, [
936
+ a.value.style.chart.legend.show ? (r(), Y(ca, {
937
+ key: `legend_${fe.value}`,
938
+ legendSet: Ze.value,
939
+ config: Nt.value,
940
+ onClickMarker: o[0] || (o[0] = ({ legend: t }) => Qe(t.id))
941
+ }, ot({
942
+ item: P(({ legend: t }) => [
943
+ O("div", {
944
+ style: D({
945
+ opacity: g.value ? g.value === t.id ? 1 : 0.3 : 1
946
+ }),
947
+ onClick: (l) => t.select()
948
+ }, Q(t.name), 13, Xa)
949
+ ]),
950
+ _: 2
951
+ }, [
952
+ e.$slots.pattern ? {
953
+ name: "legend-pattern",
954
+ fn: P(({ legend: t, index: l }) => [
955
+ ke(da, {
956
+ shape: t.shape,
957
+ radius: 30,
958
+ stroke: "none",
959
+ plot: { x: 30, y: 30 },
960
+ fill: `url(#pattern_${S.value}_${l})`
961
+ }, null, 8, ["shape", "fill"])
962
+ ]),
963
+ key: "0"
964
+ } : void 0
965
+ ]), 1032, ["legendSet", "config"])) : h("", !0),
966
+ k(e.$slots, "legend", { legend: Ze.value }, void 0, !0)
967
+ ], 512),
968
+ e.$slots.source ? (r(), i("div", {
969
+ key: 5,
970
+ ref_key: "source",
971
+ ref: Ae,
972
+ dir: "auto"
973
+ }, [
974
+ k(e.$slots, "source", {}, void 0, !0)
975
+ ], 512)) : h("", !0),
976
+ x.value !== a.value.initialRotation ? (r(), i("div", Ua, [
977
+ k(e.$slots, "reset-action", { reset: He }, () => [
978
+ O("button", {
979
+ "data-cy-reset": "",
980
+ tabindex: "0",
981
+ role: "button",
982
+ class: "vue-data-ui-refresh-button",
983
+ style: D({
984
+ background: a.value.style.chart.backgroundColor
985
+ }),
986
+ onClick: He
987
+ }, [
988
+ ke(v(vt), {
989
+ name: "refresh",
990
+ stroke: a.value.style.chart.color
991
+ }, null, 8, ["stroke"])
992
+ ], 4)
993
+ ], !0)
994
+ ])) : h("", !0),
995
+ E.value ? (r(), Y(v(ct), {
996
+ key: 7,
997
+ hideDetails: "",
998
+ config: {
999
+ open: K.value.showTable,
1000
+ maxHeight: 1e4,
1001
+ body: {
1002
+ backgroundColor: a.value.style.chart.backgroundColor,
1003
+ color: a.value.style.chart.color
1004
+ },
1005
+ head: {
1006
+ backgroundColor: a.value.style.chart.backgroundColor,
1007
+ color: a.value.style.chart.color
1008
+ }
1009
+ }
1010
+ }, {
1011
+ content: P(() => [
1012
+ (r(), Y(v(dt), {
1013
+ key: `table_${he.value}`,
1014
+ colNames: ue.value.colNames,
1015
+ head: ue.value.head,
1016
+ body: ue.value.body,
1017
+ config: ue.value.config,
1018
+ title: `${a.value.style.chart.title.text}${a.value.style.chart.title.subtitle.text ? ` : ${a.value.style.chart.title.subtitle.text}` : ""}`,
1019
+ onClose: o[1] || (o[1] = (t) => K.value.showTable = !1)
1020
+ }, {
1021
+ th: P(({ th: t }) => [
1022
+ Ut(Q(t.name), 1)
1023
+ ]),
1024
+ td: P(({ td: t }) => [
1025
+ O("div", Va, Q(t.name ? t.name : je(t)), 1)
1026
+ ]),
1027
+ _: 1
1028
+ }, 8, ["colNames", "head", "body", "config", "title"]))
1029
+ ]),
1030
+ _: 1
1031
+ }, 8, ["config"])) : h("", !0),
1032
+ v(_e) ? (r(), Y(ga, { key: 8 })) : h("", !0)
1033
+ ], 46, ba));
1034
+ }
1035
+ }, lo = /* @__PURE__ */ pa(ja, [["__scopeId", "data-v-cea95e88"]]);
1036
+ export {
1037
+ lo as default
1038
+ };