vue-data-ui 2.3.2 → 2.3.4

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 (148) hide show
  1. package/dist/Arrow-B6gJebT9.js +101 -0
  2. package/dist/Arrow-C5yj6zwY.cjs +1 -0
  3. package/dist/BaseIcon-7_g11dRj.js +174 -0
  4. package/dist/BaseIcon-JtWoVorZ.cjs +1 -0
  5. package/dist/DataTable-CwaOlAsy.js +127 -0
  6. package/dist/DataTable-Rm9II-m2.cjs +1 -0
  7. package/dist/Legend-CxvJTjEm.js +62 -0
  8. package/dist/Legend-D59FIuMs.cjs +1 -0
  9. package/dist/Shape-CVItL3vh.cjs +1 -0
  10. package/dist/Shape-CjLV0scA.js +107 -0
  11. package/dist/Slicer-Bxg5niHl.js +156 -0
  12. package/dist/Slicer-Cdss5Rus.cjs +1 -0
  13. package/dist/Title-2iks1ziC.js +46 -0
  14. package/dist/Title-Bb-A5OSV.cjs +1 -0
  15. package/dist/Tooltip-C3phqKuU.js +94 -0
  16. package/dist/Tooltip-C_UE6y-E.cjs +1 -0
  17. package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
  18. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  19. package/dist/html2canvas.esm-BA_v9SIU.cjs +22 -0
  20. package/dist/html2canvas.esm-d2sM-0Wm.js +4870 -0
  21. package/dist/index-p5gfZSvB.cjs +4 -0
  22. package/dist/index-uOtklCCx.js +10268 -0
  23. package/dist/{index.es-BoVO5twe.js → index.es-YufTdp0y.js} +1 -1
  24. package/dist/{index.es-w_iDpZ-o.cjs → index.es-uyeSCnWE.cjs} +1 -1
  25. package/dist/jspdf.es.min-C660YX78.js +8038 -0
  26. package/dist/jspdf.es.min-DLYY9DTT.cjs +243 -0
  27. package/dist/pdf-97UbtKC2.js +44 -0
  28. package/dist/pdf-Cz3729tZ.cjs +1 -0
  29. package/dist/style.css +1 -1
  30. package/dist/useNestedProp-2kIU-7On.cjs +1 -0
  31. package/dist/useNestedProp-BgWkUab_.js +13 -0
  32. package/dist/usePrinter-B6xQCyL-.js +464 -0
  33. package/dist/usePrinter-fZlsJid8.cjs +1 -0
  34. package/dist/useResponsive-B3TrDDIG.cjs +1 -0
  35. package/dist/useResponsive-NZB-WLRF.js +187 -0
  36. package/dist/vue-data-ui-Be0rgmbA.cjs +9 -0
  37. package/dist/vue-data-ui-Ccy6rBZN.js +246 -0
  38. package/dist/vue-data-ui.cjs +1 -1
  39. package/dist/vue-data-ui.js +62 -61
  40. package/dist/vue-ui-3d-bar-BKMPFDi2.js +1085 -0
  41. package/dist/vue-ui-3d-bar-CKa4UXq4.cjs +19 -0
  42. package/dist/vue-ui-accordion-C_pwrAJl.cjs +1 -0
  43. package/dist/vue-ui-accordion-HJPf7My0.js +77 -0
  44. package/dist/vue-ui-age-pyramid-CE1xnA-8.cjs +1 -0
  45. package/dist/vue-ui-age-pyramid-DB_CL-gu.js +596 -0
  46. package/dist/vue-ui-annotator-BAMZcPlH.cjs +371 -0
  47. package/dist/vue-ui-annotator-DQsAL-nZ.js +2177 -0
  48. package/dist/vue-ui-candlestick-DCl8fpNu.js +657 -0
  49. package/dist/vue-ui-candlestick-Duv6oG79.cjs +2 -0
  50. package/dist/vue-ui-chestnut-BYHA6MT4.js +1051 -0
  51. package/dist/vue-ui-chestnut-mIZ4-ZEM.cjs +6 -0
  52. package/dist/vue-ui-cursor-C96IChA3.js +229 -0
  53. package/dist/vue-ui-cursor-De7dy4Mo.cjs +1 -0
  54. package/dist/vue-ui-dashboard-B2Yz41yO.js +232 -0
  55. package/dist/vue-ui-dashboard-BMGwKr0K.cjs +1 -0
  56. package/dist/vue-ui-digits-BnxLp7zQ.js +153 -0
  57. package/dist/vue-ui-digits-DSWyL-5K.cjs +1 -0
  58. package/dist/vue-ui-donut-1kei9ws5.cjs +1 -0
  59. package/dist/vue-ui-donut-B9iXisHK.js +743 -0
  60. package/dist/vue-ui-donut-evolution-B7Sun8sw.js +799 -0
  61. package/dist/vue-ui-donut-evolution-yv17DnGy.cjs +1 -0
  62. package/dist/vue-ui-dumbbell-BJEf_JEq.cjs +9 -0
  63. package/dist/vue-ui-dumbbell-DIsDnD1d.js +624 -0
  64. package/dist/vue-ui-flow-BTivYoGd.js +454 -0
  65. package/dist/vue-ui-flow-DOxJa8di.cjs +1 -0
  66. package/dist/vue-ui-galaxy-BEmywfFB.js +485 -0
  67. package/dist/vue-ui-galaxy-CHGOwCwM.cjs +1 -0
  68. package/dist/vue-ui-gauge-QAfMl-8t.cjs +1 -0
  69. package/dist/vue-ui-gauge-o4rDOqF3.js +466 -0
  70. package/dist/vue-ui-heatmap-BS4EzedX.cjs +1 -0
  71. package/dist/vue-ui-heatmap-DwqQqEsk.js +598 -0
  72. package/dist/vue-ui-kpi-F4qkJ_U-.cjs +1 -0
  73. package/dist/vue-ui-kpi-h8elYTcA.js +54 -0
  74. package/dist/vue-ui-mini-loader-C_8B2Pm6.cjs +1 -0
  75. package/dist/vue-ui-mini-loader-Cgoi9rhH.js +131 -0
  76. package/dist/vue-ui-molecule-Bmv76SWz.js +750 -0
  77. package/dist/vue-ui-molecule-C5CY_YYc.cjs +1 -0
  78. package/dist/vue-ui-mood-radar-BN0dzlfp.cjs +1 -0
  79. package/dist/vue-ui-mood-radar-DeMouUIe.js +548 -0
  80. package/dist/vue-ui-nested-donuts-ZyFoV-Zn.cjs +16 -0
  81. package/dist/vue-ui-nested-donuts-wOUkSVyZ.js +771 -0
  82. package/dist/vue-ui-onion-DCOKG2wG.js +554 -0
  83. package/dist/vue-ui-onion-VmTUo7TR.cjs +1 -0
  84. package/dist/vue-ui-parallel-coordinate-plot-BGtO2P4a.js +651 -0
  85. package/dist/vue-ui-parallel-coordinate-plot-BziXRF8E.cjs +8 -0
  86. package/dist/vue-ui-quadrant--JOTjPZh.js +1178 -0
  87. package/dist/vue-ui-quadrant-DawUUrur.cjs +1 -0
  88. package/dist/vue-ui-quick-chart-LXKfaJgS.js +1310 -0
  89. package/dist/vue-ui-quick-chart-jFlFtiNV.cjs +13 -0
  90. package/dist/vue-ui-radar-CWNIqvcA.js +614 -0
  91. package/dist/vue-ui-radar-VGH-lhaT.cjs +1 -0
  92. package/dist/vue-ui-rating-BNrIoJHN.js +271 -0
  93. package/dist/vue-ui-rating-Dtu6pwGx.cjs +1 -0
  94. package/dist/vue-ui-relation-circle-B3NKudOy.js +304 -0
  95. package/dist/vue-ui-relation-circle-Dwpx9o18.cjs +1 -0
  96. package/dist/vue-ui-rings-CsUngX_F.js +510 -0
  97. package/dist/vue-ui-rings-D9_OG--0.cjs +1 -0
  98. package/dist/vue-ui-scatter-DUsuh7bd.cjs +1 -0
  99. package/dist/vue-ui-scatter-DgxTz4Jx.js +874 -0
  100. package/dist/vue-ui-screenshot-51H_VrYY.js +160 -0
  101. package/dist/vue-ui-screenshot-C2Dz7CAe.cjs +3 -0
  102. package/dist/vue-ui-skeleton-BM9rwmxY.js +2064 -0
  103. package/dist/vue-ui-skeleton-sjfOtCZr.cjs +41 -0
  104. package/dist/vue-ui-smiley-DNnBtHht.cjs +2 -0
  105. package/dist/vue-ui-smiley-H5rSN-1B.js +763 -0
  106. package/dist/vue-ui-spark-trend-CLXZDYlk.js +246 -0
  107. package/dist/vue-ui-spark-trend-R4JJvfry.cjs +1 -0
  108. package/dist/vue-ui-sparkbar-C0k4ah-7.js +242 -0
  109. package/dist/vue-ui-sparkbar-CEUDIw0A.cjs +1 -0
  110. package/dist/vue-ui-sparkgauge-BHj00A07.js +157 -0
  111. package/dist/vue-ui-sparkgauge-CaEw6nmI.cjs +1 -0
  112. package/dist/vue-ui-sparkhistogram-B6GuavEu.cjs +1 -0
  113. package/dist/vue-ui-sparkhistogram-DbMLYKqE.js +244 -0
  114. package/dist/vue-ui-sparkline-CJydanLS.cjs +1 -0
  115. package/dist/vue-ui-sparkline-CYova9x3.js +333 -0
  116. package/dist/vue-ui-sparkstackbar-Df__yM5b.cjs +1 -0
  117. package/dist/vue-ui-sparkstackbar-N5rVBM2h.js +244 -0
  118. package/dist/vue-ui-strip-plot-DJJ1vEWz.js +618 -0
  119. package/dist/vue-ui-strip-plot-b5lhB35d.cjs +1 -0
  120. package/dist/vue-ui-table-NHhOVDbs.cjs +14 -0
  121. package/dist/vue-ui-table-heatmap-Cro2etCY.js +237 -0
  122. package/dist/vue-ui-table-heatmap-DlL2nCqz.cjs +1 -0
  123. package/dist/vue-ui-table-sparkline-Bw2Gc_ur.cjs +1 -0
  124. package/dist/vue-ui-table-sparkline-DppMitqF.js +420 -0
  125. package/dist/vue-ui-table-xSvwJIa7.js +1430 -0
  126. package/dist/vue-ui-thermometer-M2kdp1x5.js +385 -0
  127. package/dist/vue-ui-thermometer-Q_3PX2V3.cjs +1 -0
  128. package/dist/vue-ui-timer-BtSDeIRp.cjs +64 -0
  129. package/dist/vue-ui-timer-CAaQ-QD6.js +453 -0
  130. package/dist/vue-ui-tiremarks-CbGOSEvD.cjs +1 -0
  131. package/dist/vue-ui-tiremarks-JFv4JLP0.js +249 -0
  132. package/dist/vue-ui-treemap-BqDX-bPf.cjs +1 -0
  133. package/dist/vue-ui-treemap-DCnv-xYr.js +722 -0
  134. package/dist/vue-ui-vertical-bar-CEbApJZl.js +737 -0
  135. package/dist/vue-ui-vertical-bar-CJB_KXyr.cjs +4 -0
  136. package/dist/vue-ui-waffle-CTS6C7gu.js +638 -0
  137. package/dist/vue-ui-waffle-IMEbGe-b.cjs +1 -0
  138. package/dist/vue-ui-wheel-CuOmEWMQ.cjs +1 -0
  139. package/dist/vue-ui-wheel-_zyCdFiI.js +227 -0
  140. package/dist/vue-ui-word-cloud-RDlXBEAN.js +346 -0
  141. package/dist/vue-ui-word-cloud-Y7Yk7uUJ.cjs +1 -0
  142. package/dist/vue-ui-xy-BZJQBKnU.cjs +3 -0
  143. package/dist/vue-ui-xy-DsvN9EIQ.js +2064 -0
  144. package/dist/vue-ui-xy-canvas-D_dnbyFS.cjs +9 -0
  145. package/dist/vue-ui-xy-canvas-Dbcw8-9Q.js +1006 -0
  146. package/package.json +1 -1
  147. package/dist/index-C6KVJkgd.cjs +0 -843
  148. package/dist/index-bDBuMYfe.js +0 -57303
@@ -0,0 +1,464 @@
1
+ import { ref as c, onMounted as j, onBeforeUnmount as N, withDirectives as W, openBlock as o, createElementBlock as s, normalizeStyle as d, createElementVNode as w, withModifiers as X, withKeys as q, createVNode as H, normalizeClass as y, renderSlot as $, Fragment as B, createBlock as f, toDisplayString as C, createCommentVNode as u, normalizeProps as R, mergeProps as G, unref as J } from "vue";
2
+ import v from "./BaseIcon-7_g11dRj.js";
3
+ import { _ as Q } from "./_plugin-vue_export-helper-CHgC5LLL.js";
4
+ import { p as Y } from "./pdf-97UbtKC2.js";
5
+ import Z from "./html2canvas.esm-d2sM-0Wm.js";
6
+ const x = {
7
+ beforeMount(e, r) {
8
+ e.clickOutsideEvent = function(a) {
9
+ e === a.target || e.contains(a.target) || r.value(a);
10
+ }, document.addEventListener("click", e.clickOutsideEvent);
11
+ },
12
+ unmounted(e) {
13
+ document.removeEventListener("click", e.clickOutsideEvent);
14
+ }
15
+ }, _ = ["title", "onClick", "onKeypress"], ee = ["data-open"], te = {
16
+ __name: "UserOptions",
17
+ props: {
18
+ hasPdf: {
19
+ type: Boolean,
20
+ default: !0
21
+ },
22
+ hasXls: {
23
+ type: Boolean,
24
+ default: !0
25
+ },
26
+ hasImg: {
27
+ type: Boolean,
28
+ default: !1
29
+ },
30
+ hasLabel: {
31
+ type: Boolean,
32
+ default: !1
33
+ },
34
+ isLabelActive: {
35
+ type: Boolean,
36
+ default: !1
37
+ },
38
+ hasTable: {
39
+ type: Boolean,
40
+ default: !1
41
+ },
42
+ hasSort: {
43
+ type: Boolean,
44
+ default: !1
45
+ },
46
+ hasStack: {
47
+ type: Boolean,
48
+ default: !1
49
+ },
50
+ hasTooltip: {
51
+ type: Boolean,
52
+ default: !1
53
+ },
54
+ color: {
55
+ type: String
56
+ },
57
+ backgroundColor: {
58
+ type: String
59
+ },
60
+ isPrinting: {
61
+ type: Boolean,
62
+ default: !1
63
+ },
64
+ isImaging: {
65
+ type: Boolean,
66
+ default: !1
67
+ },
68
+ title: {
69
+ type: String
70
+ },
71
+ uid: {
72
+ type: String
73
+ },
74
+ hasFullscreen: {
75
+ type: Boolean,
76
+ default: !1
77
+ },
78
+ chartElement: {
79
+ type: HTMLElement,
80
+ default: null
81
+ },
82
+ isFullscreen: {
83
+ type: Boolean,
84
+ default: !1
85
+ },
86
+ isStacked: {
87
+ type: Boolean,
88
+ default: !1
89
+ },
90
+ isTooltip: {
91
+ type: Boolean,
92
+ default: !1
93
+ },
94
+ titles: {
95
+ type: Object,
96
+ default() {
97
+ return {};
98
+ }
99
+ },
100
+ showTooltips: {
101
+ type: Boolean,
102
+ default: !0
103
+ }
104
+ },
105
+ emits: ["generatePdf", "generateCsv", "generateImage", "toggleTable", "toggleLabels", "toggleSort", "toggleFullscreen", "toggleStack", "toggleTooltip"],
106
+ setup(e, { emit: r }) {
107
+ const a = e;
108
+ function T() {
109
+ r("generatePdf");
110
+ }
111
+ function S() {
112
+ r("generateCsv");
113
+ }
114
+ function m() {
115
+ r("generateImage");
116
+ }
117
+ const k = c(!1);
118
+ function O() {
119
+ k.value = !k.value, r("toggleTable");
120
+ }
121
+ const p = c(!1), h = c(!0);
122
+ function L() {
123
+ b.value = window.innerWidth > 600, p.value = !p.value, p.value && (h.value = !1);
124
+ }
125
+ function D() {
126
+ a.isPrinting || a.isImaging || (p.value = !1);
127
+ }
128
+ function U() {
129
+ p.value && D();
130
+ }
131
+ const M = c(a.isLabelActive);
132
+ function z() {
133
+ M.value = !M.value, r("toggleLabels");
134
+ }
135
+ function A() {
136
+ r("toggleSort");
137
+ }
138
+ const I = c(a.isStacked);
139
+ function K() {
140
+ I.value = !I.value, r("toggleStack");
141
+ }
142
+ const E = c(a.isTooltip);
143
+ function V() {
144
+ E.value = !E.value, r("toggleTooltip");
145
+ }
146
+ const g = c(!1);
147
+ function F(l) {
148
+ a.chartElement && (l === "in" ? (g.value = !0, a.chartElement.requestFullscreen(), r("toggleFullscreen", !0)) : (g.value = !1, document && document.exitFullscreen(), r("toggleFullscreen", !1)));
149
+ }
150
+ function P(l) {
151
+ document.fullscreenElement ? g.value = !0 : g.value = !1;
152
+ }
153
+ j(() => {
154
+ document.addEventListener("fullscreenchange", P);
155
+ }), N(() => {
156
+ document.removeEventListener("fullscreenchange", P);
157
+ });
158
+ const b = c(window.innerWidth > 600), n = c({
159
+ tooltip: !1,
160
+ pdf: !1,
161
+ csv: !1,
162
+ img: !1,
163
+ table: !1,
164
+ labels: !1,
165
+ sort: !1,
166
+ stack: !1,
167
+ fullscreen: !1
168
+ });
169
+ return (l, t) => W((o(), s("div", {
170
+ "data-html2canvas-ignore": "",
171
+ class: "vue-ui-user-options",
172
+ style: d(`height: 34px; position: ${g.value ? "fixed" : "absolute"}; top: 0; right:${g.value ? "12px" : "0"}; padding: 4px; background:transparent; z-index: 1`)
173
+ }, [
174
+ w("div", {
175
+ tabindex: "0",
176
+ title: p.value ? e.titles.close || "" : e.titles.open || "",
177
+ style: d(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; cursor:pointer; background:${e.backgroundColor}`),
178
+ onClick: X(L, ["stop"]),
179
+ onKeypress: q(L, ["enter"])
180
+ }, [
181
+ H(v, {
182
+ name: p.value ? "close" : "menu",
183
+ stroke: "#CCCCCC",
184
+ "stroke-width": 2
185
+ }, null, 8, ["name"])
186
+ ], 44, _),
187
+ w("div", {
188
+ "data-open": p.value,
189
+ class: y({ "vue-ui-user-options-drawer": !0 }),
190
+ style: d(`background:${e.backgroundColor};`)
191
+ }, [
192
+ e.hasTooltip ? (o(), s("button", {
193
+ key: 0,
194
+ tabindex: "0",
195
+ class: "vue-ui-user-options-button",
196
+ onClick: V,
197
+ onMouseenter: t[0] || (t[0] = (i) => n.value.tooltip = !0),
198
+ onMouseout: t[1] || (t[1] = (i) => n.value.tooltip = !1)
199
+ }, [
200
+ l.$slots.optionTooltip ? $(l.$slots, "optionTooltip", { key: 0 }, void 0, !0) : (o(), s(B, { key: 1 }, [
201
+ E.value ? (o(), f(v, {
202
+ key: 0,
203
+ name: "tooltip",
204
+ stroke: e.color,
205
+ style: { "pointer-events": "none" }
206
+ }, null, 8, ["stroke"])) : (o(), f(v, {
207
+ key: 1,
208
+ name: "tooltipDisabled",
209
+ stroke: e.color,
210
+ style: { "pointer-events": "none" }
211
+ }, null, 8, ["stroke"]))
212
+ ], 64)),
213
+ b.value && e.titles.tooltip && !l.$slots.optionTooltip ? (o(), s("div", {
214
+ key: 2,
215
+ class: y({ "button-info": !0, "button-info-visible": n.value.tooltip }),
216
+ style: d({ background: e.backgroundColor, color: e.color })
217
+ }, C(e.titles.tooltip), 7)) : u("", !0)
218
+ ], 32)) : u("", !0),
219
+ e.hasPdf ? (o(), s("button", {
220
+ key: 1,
221
+ tabindex: "0",
222
+ class: "vue-ui-user-options-button",
223
+ onClick: T,
224
+ onMouseenter: t[2] || (t[2] = (i) => n.value.pdf = !0),
225
+ onMouseout: t[3] || (t[3] = (i) => n.value.pdf = !1)
226
+ }, [
227
+ l.$slots.optionPdf ? $(l.$slots, "optionPdf", { key: 0 }, void 0, !0) : (o(), s(B, { key: 1 }, [
228
+ e.isPrinting ? (o(), f(v, {
229
+ key: 0,
230
+ name: "spin",
231
+ isSpin: "",
232
+ stroke: e.color,
233
+ style: { "pointer-events": "none" }
234
+ }, null, 8, ["stroke"])) : (o(), f(v, {
235
+ key: 1,
236
+ name: "pdf",
237
+ stroke: e.color,
238
+ style: { "pointer-events": "none" }
239
+ }, null, 8, ["stroke"]))
240
+ ], 64)),
241
+ b.value && e.titles.pdf && !l.$slots.optionPdf ? (o(), s("div", {
242
+ key: 2,
243
+ class: y({ "button-info": !0, "button-info-visible": n.value.pdf }),
244
+ style: d({ background: e.backgroundColor, color: e.color })
245
+ }, C(e.titles.pdf), 7)) : u("", !0)
246
+ ], 32)) : u("", !0),
247
+ e.hasXls ? (o(), s("button", {
248
+ key: 2,
249
+ tabindex: "0",
250
+ class: "vue-ui-user-options-button",
251
+ onClick: S,
252
+ onMouseenter: t[4] || (t[4] = (i) => n.value.csv = !0),
253
+ onMouseout: t[5] || (t[5] = (i) => n.value.csv = !1)
254
+ }, [
255
+ l.$slots.optionCsv ? $(l.$slots, "optionCsv", { key: 0 }, void 0, !0) : (o(), f(v, {
256
+ key: 1,
257
+ name: "excel",
258
+ stroke: e.color,
259
+ style: { "pointer-events": "none" }
260
+ }, null, 8, ["stroke"])),
261
+ b.value && e.titles.csv && !l.$slots.optionCsv ? (o(), s("div", {
262
+ key: 2,
263
+ class: y({ "button-info": !0, "button-info-visible": n.value.csv }),
264
+ style: d({ background: e.backgroundColor, color: e.color })
265
+ }, C(e.titles.csv), 7)) : u("", !0)
266
+ ], 32)) : u("", !0),
267
+ e.hasImg ? (o(), s("button", {
268
+ key: 3,
269
+ tabindex: "0",
270
+ class: "vue-ui-user-options-button",
271
+ onClick: m,
272
+ onMouseenter: t[6] || (t[6] = (i) => n.value.img = !0),
273
+ onMouseout: t[7] || (t[7] = (i) => n.value.img = !1)
274
+ }, [
275
+ l.$slots.optionImg ? $(l.$slots, "optionImg", { key: 0 }, void 0, !0) : (o(), s(B, { key: 1 }, [
276
+ e.isImaging ? (o(), f(v, {
277
+ key: 0,
278
+ name: "spin",
279
+ isSpin: "",
280
+ stroke: e.color,
281
+ style: { "pointer-events": "none" }
282
+ }, null, 8, ["stroke"])) : (o(), f(v, {
283
+ key: 1,
284
+ name: "image",
285
+ stroke: e.color,
286
+ style: { "pointer-events": "none" }
287
+ }, null, 8, ["stroke"]))
288
+ ], 64)),
289
+ b.value && e.titles.img && !l.$slots.optionImg ? (o(), s("div", {
290
+ key: 2,
291
+ class: y({ "button-info": !0, "button-info-visible": n.value.img }),
292
+ style: d({ background: e.backgroundColor, color: e.color })
293
+ }, C(e.titles.img), 7)) : u("", !0)
294
+ ], 32)) : u("", !0),
295
+ e.hasTable ? (o(), s("button", {
296
+ key: 4,
297
+ tabindex: "0",
298
+ class: "vue-ui-user-options-button",
299
+ onClick: O,
300
+ onMouseenter: t[8] || (t[8] = (i) => n.value.table = !0),
301
+ onMouseout: t[9] || (t[9] = (i) => n.value.table = !1)
302
+ }, [
303
+ l.$slots.optionTable ? $(l.$slots, "optionTable", { key: 0 }, void 0, !0) : (o(), f(v, {
304
+ key: 1,
305
+ name: k.value ? "tableClose" : "tableOpen",
306
+ stroke: e.color,
307
+ style: { "pointer-events": "none" }
308
+ }, null, 8, ["name", "stroke"])),
309
+ b.value && e.titles.table && !l.$slots.optionTable ? (o(), s("div", {
310
+ key: 2,
311
+ class: y({ "button-info": !0, "button-info-visible": n.value.table }),
312
+ style: d({ background: e.backgroundColor, color: e.color })
313
+ }, C(e.titles.table), 7)) : u("", !0)
314
+ ], 32)) : u("", !0),
315
+ e.hasLabel ? (o(), s("button", {
316
+ key: 5,
317
+ tabindex: "0",
318
+ class: "vue-ui-user-options-button",
319
+ onClick: z,
320
+ onMouseenter: t[10] || (t[10] = (i) => n.value.labels = !0),
321
+ onMouseout: t[11] || (t[11] = (i) => n.value.labels = !1)
322
+ }, [
323
+ l.$slots.optionLabels ? $(l.$slots, "optionLabels", { key: 0 }, void 0, !0) : (o(), f(v, {
324
+ key: 1,
325
+ name: M.value ? "labelClose" : "labelOpen",
326
+ stroke: e.color,
327
+ style: { "pointer-events": "none" }
328
+ }, null, 8, ["name", "stroke"])),
329
+ b.value && e.titles.labels && !l.$slots.optionLabels ? (o(), s("div", {
330
+ key: 2,
331
+ class: y({ "button-info": !0, "button-info-visible": n.value.labels }),
332
+ style: d({ background: e.backgroundColor, color: e.color })
333
+ }, C(e.titles.labels), 7)) : u("", !0)
334
+ ], 32)) : u("", !0),
335
+ e.hasSort ? (o(), s("button", {
336
+ key: 6,
337
+ tabindex: "0",
338
+ class: "vue-ui-user-options-button",
339
+ onClick: A,
340
+ onMouseenter: t[12] || (t[12] = (i) => n.value.sort = !0),
341
+ onMouseout: t[13] || (t[13] = (i) => n.value.sort = !1)
342
+ }, [
343
+ l.$slots.optionSort ? $(l.$slots, "optionSort", { key: 0 }, void 0, !0) : (o(), f(v, {
344
+ key: 1,
345
+ name: "sort",
346
+ stroke: e.color,
347
+ style: { "pointer-events": "none" }
348
+ }, null, 8, ["stroke"])),
349
+ b.value && e.titles.sort && !l.$slots.optionSort ? (o(), s("div", {
350
+ key: 2,
351
+ class: y({ "button-info": !0, "button-info-visible": n.value.sort }),
352
+ style: d({ background: e.backgroundColor, color: e.color })
353
+ }, C(e.titles.sort), 7)) : u("", !0)
354
+ ], 32)) : u("", !0),
355
+ e.hasStack ? (o(), s("button", {
356
+ key: 7,
357
+ tabindex: "0",
358
+ class: "vue-ui-user-options-button",
359
+ onClick: K,
360
+ onMouseenter: t[14] || (t[14] = (i) => n.value.stack = !0),
361
+ onMouseout: t[15] || (t[15] = (i) => n.value.stack = !1)
362
+ }, [
363
+ l.$slots.optionStack ? $(l.$slots, "optionStack", { key: 0 }, void 0, !0) : (o(), s(B, { key: 1 }, [
364
+ I.value ? (o(), f(v, {
365
+ key: 0,
366
+ name: "unstack",
367
+ stroke: e.color,
368
+ style: { "pointer-events": "none" }
369
+ }, null, 8, ["stroke"])) : (o(), f(v, {
370
+ key: 1,
371
+ name: "stack",
372
+ stroke: e.color,
373
+ style: { "pointer-events": "none" }
374
+ }, null, 8, ["stroke"]))
375
+ ], 64)),
376
+ b.value && e.titles.stack && !l.$slots.optionStack ? (o(), s("div", {
377
+ key: 2,
378
+ class: y({ "button-info": !0, "button-info-visible": n.value.stack }),
379
+ style: d({ background: e.backgroundColor, color: e.color })
380
+ }, C(e.titles.stack), 7)) : u("", !0)
381
+ ], 32)) : u("", !0),
382
+ e.hasFullscreen ? (o(), s("button", {
383
+ key: 8,
384
+ tabindex: "0",
385
+ class: "vue-ui-user-options-button",
386
+ onMouseenter: t[16] || (t[16] = (i) => n.value.fullscreen = !0),
387
+ onMouseout: t[17] || (t[17] = (i) => n.value.fullscreen = !1),
388
+ onClick: t[18] || (t[18] = (i) => F(g.value ? "out" : "in"))
389
+ }, [
390
+ l.$slots.optionFullscreen ? $(l.$slots, "optionFullscreen", R(G({ key: 0 }, { toggleFullscreen: F, isFullscreen: g.value })), void 0, !0) : (o(), s(B, { key: 1 }, [
391
+ g.value ? (o(), f(v, {
392
+ key: 0,
393
+ name: "exitFullscreen",
394
+ stroke: e.color,
395
+ style: { "pointer-events": "none" }
396
+ }, null, 8, ["stroke"])) : u("", !0),
397
+ g.value ? u("", !0) : (o(), f(v, {
398
+ key: 1,
399
+ name: "fullscreen",
400
+ stroke: e.color,
401
+ style: { "pointer-events": "none" }
402
+ }, null, 8, ["stroke"]))
403
+ ], 64)),
404
+ b.value && e.titles.fullscreen && !l.$slots.optionFullscreen ? (o(), s("div", {
405
+ key: 2,
406
+ class: y({ "button-info": !0, "button-info-visible": n.value.fullscreen }),
407
+ style: d({ background: e.backgroundColor, color: e.color })
408
+ }, C(e.titles.fullscreen), 7)) : u("", !0)
409
+ ], 32)) : u("", !0)
410
+ ], 12, ee)
411
+ ], 4)), [
412
+ [J(x), U]
413
+ ]);
414
+ }
415
+ }, ie = /* @__PURE__ */ Q(te, [["__scopeId", "data-v-693c5f9e"]]);
416
+ function oe({ domElement: e, fileName: r, format: a = "png" }) {
417
+ if (e)
418
+ return new Promise((T, S) => {
419
+ const m = document.createElement("a");
420
+ Z(e, { scale: 2 }).then((k) => {
421
+ m.href = k.toDataURL(`image/${a}`), m.download = `${r}.${a}`, m.click(), m && m.remove(), T();
422
+ }).catch((k) => {
423
+ console.error("Error generating image:", k), S(k);
424
+ });
425
+ });
426
+ }
427
+ function re({
428
+ elementId: e,
429
+ fileName: r
430
+ }) {
431
+ const a = c(!1), T = c(!1), S = c(null);
432
+ function m() {
433
+ a.value = !0, clearTimeout(S.value), S.value = setTimeout(() => {
434
+ Y({
435
+ domElement: document.getElementById(e),
436
+ fileName: r
437
+ }).finally(() => {
438
+ a.value = !1;
439
+ });
440
+ }, 100);
441
+ }
442
+ function k() {
443
+ T.value = !0, clearTimeout(S.value), S.value = setTimeout(() => {
444
+ oe({
445
+ domElement: document.getElementById(e),
446
+ fileName: r,
447
+ format: "png"
448
+ }).finally(() => {
449
+ T.value = !1;
450
+ }, 100);
451
+ });
452
+ }
453
+ return {
454
+ generatePdf: m,
455
+ generateImage: k,
456
+ isPrinting: a,
457
+ isImaging: T
458
+ };
459
+ }
460
+ export {
461
+ ie as U,
462
+ oe as s,
463
+ re as u
464
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),r=require("./BaseIcon-JtWoVorZ.cjs"),F=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),L=require("./pdf-Cz3729tZ.cjs"),P=require("./html2canvas.esm-BA_v9SIU.cjs"),w={beforeMount(t,u){t.clickOutsideEvent=function(a){t===a.target||t.contains(a.target)||u.value(a)},document.addEventListener("click",t.clickOutsideEvent)},unmounted(t){document.removeEventListener("click",t.clickOutsideEvent)}},D=["title","onClick","onKeypress"],O=["data-open"],h={__name:"UserOptions",props:{hasPdf:{type:Boolean,default:!0},hasXls:{type:Boolean,default:!0},hasImg:{type:Boolean,default:!1},hasLabel:{type:Boolean,default:!1},isLabelActive:{type:Boolean,default:!1},hasTable:{type:Boolean,default:!1},hasSort:{type:Boolean,default:!1},hasStack:{type:Boolean,default:!1},hasTooltip:{type:Boolean,default:!1},color:{type:String},backgroundColor:{type:String},isPrinting:{type:Boolean,default:!1},isImaging:{type:Boolean,default:!1},title:{type:String},uid:{type:String},hasFullscreen:{type:Boolean,default:!1},chartElement:{type:HTMLElement,default:null},isFullscreen:{type:Boolean,default:!1},isStacked:{type:Boolean,default:!1},isTooltip:{type:Boolean,default:!1},titles:{type:Object,default(){return{}}},showTooltips:{type:Boolean,default:!0}},emits:["generatePdf","generateCsv","generateImage","toggleTable","toggleLabels","toggleSort","toggleFullscreen","toggleStack","toggleTooltip"],setup(t,{emit:u}){const a=t;function m(){u("generatePdf")}function f(){u("generateCsv")}function d(){u("generateImage")}const i=e.ref(!1);function $(){i.value=!i.value,u("toggleTable")}const v=e.ref(!1),E=e.ref(!0);function B(){k.value=window.innerWidth>600,v.value=!v.value,v.value&&(E.value=!1)}function T(){a.isPrinting||a.isImaging||(v.value=!1)}function z(){v.value&&T()}const g=e.ref(a.isLabelActive);function V(){g.value=!g.value,u("toggleLabels")}function I(){u("toggleSort")}const y=e.ref(a.isStacked);function M(){y.value=!y.value,u("toggleStack")}const b=e.ref(a.isTooltip);function N(){b.value=!b.value,u("toggleTooltip")}const c=e.ref(!1);function p(l){a.chartElement&&(l==="in"?(c.value=!0,a.chartElement.requestFullscreen(),u("toggleFullscreen",!0)):(c.value=!1,document&&document.exitFullscreen(),u("toggleFullscreen",!1)))}function C(l){document.fullscreenElement?c.value=!0:c.value=!1}e.onMounted(()=>{document.addEventListener("fullscreenchange",C)}),e.onBeforeUnmount(()=>{document.removeEventListener("fullscreenchange",C)});const k=e.ref(window.innerWidth>600),n=e.ref({tooltip:!1,pdf:!1,csv:!1,img:!1,table:!1,labels:!1,sort:!1,stack:!1,fullscreen:!1});return(l,o)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{"data-html2canvas-ignore":"",class:"vue-ui-user-options",style:e.normalizeStyle(`height: 34px; position: ${c.value?"fixed":"absolute"}; top: 0; right:${c.value?"12px":"0"}; padding: 4px; background:transparent; z-index: 1`)},[e.createElementVNode("div",{tabindex:"0",title:v.value?t.titles.close||"":t.titles.open||"",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; right:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; cursor:pointer; background:${t.backgroundColor}`),onClick:e.withModifiers(B,["stop"]),onKeypress:e.withKeys(B,["enter"])},[e.createVNode(r.default,{name:v.value?"close":"menu",stroke:"#CCCCCC","stroke-width":2},null,8,["name"])],44,D),e.createElementVNode("div",{"data-open":v.value,class:e.normalizeClass({"vue-ui-user-options-drawer":!0}),style:e.normalizeStyle(`background:${t.backgroundColor};`)},[t.hasTooltip?(e.openBlock(),e.createElementBlock("button",{key:0,tabindex:"0",class:"vue-ui-user-options-button",onClick:N,onMouseenter:o[0]||(o[0]=s=>n.value.tooltip=!0),onMouseout:o[1]||(o[1]=s=>n.value.tooltip=!1)},[l.$slots.optionTooltip?e.renderSlot(l.$slots,"optionTooltip",{key:0},void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[b.value?(e.openBlock(),e.createBlock(r.default,{key:0,name:"tooltip",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])):(e.openBlock(),e.createBlock(r.default,{key:1,name:"tooltipDisabled",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"]))],64)),k.value&&t.titles.tooltip&&!l.$slots.optionTooltip?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.tooltip}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.tooltip),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasPdf?(e.openBlock(),e.createElementBlock("button",{key:1,tabindex:"0",class:"vue-ui-user-options-button",onClick:m,onMouseenter:o[2]||(o[2]=s=>n.value.pdf=!0),onMouseout:o[3]||(o[3]=s=>n.value.pdf=!1)},[l.$slots.optionPdf?e.renderSlot(l.$slots,"optionPdf",{key:0},void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.isPrinting?(e.openBlock(),e.createBlock(r.default,{key:0,name:"spin",isSpin:"",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])):(e.openBlock(),e.createBlock(r.default,{key:1,name:"pdf",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"]))],64)),k.value&&t.titles.pdf&&!l.$slots.optionPdf?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.pdf}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.pdf),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasXls?(e.openBlock(),e.createElementBlock("button",{key:2,tabindex:"0",class:"vue-ui-user-options-button",onClick:f,onMouseenter:o[4]||(o[4]=s=>n.value.csv=!0),onMouseout:o[5]||(o[5]=s=>n.value.csv=!1)},[l.$slots.optionCsv?e.renderSlot(l.$slots,"optionCsv",{key:0},void 0,!0):(e.openBlock(),e.createBlock(r.default,{key:1,name:"excel",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])),k.value&&t.titles.csv&&!l.$slots.optionCsv?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.csv}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.csv),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasImg?(e.openBlock(),e.createElementBlock("button",{key:3,tabindex:"0",class:"vue-ui-user-options-button",onClick:d,onMouseenter:o[6]||(o[6]=s=>n.value.img=!0),onMouseout:o[7]||(o[7]=s=>n.value.img=!1)},[l.$slots.optionImg?e.renderSlot(l.$slots,"optionImg",{key:0},void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[t.isImaging?(e.openBlock(),e.createBlock(r.default,{key:0,name:"spin",isSpin:"",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])):(e.openBlock(),e.createBlock(r.default,{key:1,name:"image",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"]))],64)),k.value&&t.titles.img&&!l.$slots.optionImg?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.img}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.img),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasTable?(e.openBlock(),e.createElementBlock("button",{key:4,tabindex:"0",class:"vue-ui-user-options-button",onClick:$,onMouseenter:o[8]||(o[8]=s=>n.value.table=!0),onMouseout:o[9]||(o[9]=s=>n.value.table=!1)},[l.$slots.optionTable?e.renderSlot(l.$slots,"optionTable",{key:0},void 0,!0):(e.openBlock(),e.createBlock(r.default,{key:1,name:i.value?"tableClose":"tableOpen",stroke:t.color,style:{"pointer-events":"none"}},null,8,["name","stroke"])),k.value&&t.titles.table&&!l.$slots.optionTable?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.table}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.table),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasLabel?(e.openBlock(),e.createElementBlock("button",{key:5,tabindex:"0",class:"vue-ui-user-options-button",onClick:V,onMouseenter:o[10]||(o[10]=s=>n.value.labels=!0),onMouseout:o[11]||(o[11]=s=>n.value.labels=!1)},[l.$slots.optionLabels?e.renderSlot(l.$slots,"optionLabels",{key:0},void 0,!0):(e.openBlock(),e.createBlock(r.default,{key:1,name:g.value?"labelClose":"labelOpen",stroke:t.color,style:{"pointer-events":"none"}},null,8,["name","stroke"])),k.value&&t.titles.labels&&!l.$slots.optionLabels?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.labels}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.labels),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasSort?(e.openBlock(),e.createElementBlock("button",{key:6,tabindex:"0",class:"vue-ui-user-options-button",onClick:I,onMouseenter:o[12]||(o[12]=s=>n.value.sort=!0),onMouseout:o[13]||(o[13]=s=>n.value.sort=!1)},[l.$slots.optionSort?e.renderSlot(l.$slots,"optionSort",{key:0},void 0,!0):(e.openBlock(),e.createBlock(r.default,{key:1,name:"sort",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])),k.value&&t.titles.sort&&!l.$slots.optionSort?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.sort}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.sort),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasStack?(e.openBlock(),e.createElementBlock("button",{key:7,tabindex:"0",class:"vue-ui-user-options-button",onClick:M,onMouseenter:o[14]||(o[14]=s=>n.value.stack=!0),onMouseout:o[15]||(o[15]=s=>n.value.stack=!1)},[l.$slots.optionStack?e.renderSlot(l.$slots,"optionStack",{key:0},void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[y.value?(e.openBlock(),e.createBlock(r.default,{key:0,name:"unstack",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])):(e.openBlock(),e.createBlock(r.default,{key:1,name:"stack",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"]))],64)),k.value&&t.titles.stack&&!l.$slots.optionStack?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.stack}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.stack),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0),t.hasFullscreen?(e.openBlock(),e.createElementBlock("button",{key:8,tabindex:"0",class:"vue-ui-user-options-button",onMouseenter:o[16]||(o[16]=s=>n.value.fullscreen=!0),onMouseout:o[17]||(o[17]=s=>n.value.fullscreen=!1),onClick:o[18]||(o[18]=s=>p(c.value?"out":"in"))},[l.$slots.optionFullscreen?e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.mergeProps({key:0},{toggleFullscreen:p,isFullscreen:c.value})),void 0,!0):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[c.value?(e.openBlock(),e.createBlock(r.default,{key:0,name:"exitFullscreen",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"])):e.createCommentVNode("",!0),c.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(r.default,{key:1,name:"fullscreen",stroke:t.color,style:{"pointer-events":"none"}},null,8,["stroke"]))],64)),k.value&&t.titles.fullscreen&&!l.$slots.optionFullscreen?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass({"button-info":!0,"button-info-visible":n.value.fullscreen}),style:e.normalizeStyle({background:t.backgroundColor,color:t.color})},e.toDisplayString(t.titles.fullscreen),7)):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0)],12,O)],4)),[[e.unref(w),z]])}},q=F._export_sfc(h,[["__scopeId","data-v-693c5f9e"]]);function S({domElement:t,fileName:u,format:a="png"}){if(t)return new Promise((m,f)=>{const d=document.createElement("a");P.default(t,{scale:2}).then(i=>{d.href=i.toDataURL(`image/${a}`),d.download=`${u}.${a}`,d.click(),d&&d.remove(),m()}).catch(i=>{console.error("Error generating image:",i),f(i)})})}function U({elementId:t,fileName:u}){const a=e.ref(!1),m=e.ref(!1),f=e.ref(null);function d(){a.value=!0,clearTimeout(f.value),f.value=setTimeout(()=>{L.pdf({domElement:document.getElementById(t),fileName:u}).finally(()=>{a.value=!1})},100)}function i(){m.value=!0,clearTimeout(f.value),f.value=setTimeout(()=>{S({domElement:document.getElementById(t),fileName:u,format:"png"}).finally(()=>{m.value=!1},100)})}return{generatePdf:d,generateImage:i,isPrinting:a,isImaging:m}}exports.UserOptions=q;exports.saveAsImage=S;exports.usePrinter=U;
@@ -0,0 +1 @@
1
+ "use strict";function b(e,i,o,t={}){if(o<=0)return;e.save();const{color:s="black",lineWidth:u=1,lineCap:d="round",lineJoin:f="round",lineDash:w=null,lineDashoffset:r=0,shadowColor:l=null,shadowBlur:a=0,shadowOffsetX:y=0,shadowOffsetY:g=0,fillStyle:N="#FFFFFF"}=t;e.beginPath(),e.arc(i.x,i.y,o,0,2*Math.PI),e.strokeStyle=s,e.lineWidth=u,e.lineCap=d,e.lineJoin=f,w&&(e.setLineDash(w),e.lineDashoffset=r),l&&(e.shadowColor=l,e.shadowOffsetX=y,e.shadowOffsetY=g),a&&(e.shadowBlur=a),N&&(e.fillStyle=N),e.fillStyle&&e.fill(),e.stroke(),e.restore()}function C(e,i,o={}){if(!i.length)return;e.save();const{color:t="black",lineWidth:s=1,lineCap:u="round",lineJoin:d="round",lineDash:f=null,lineDashoffset:w=0,shadowColor:r=null,shadowBlur:l=0,shadowOffsetX:a=0,shadowOffsetY:y=0}=o;e.beginPath(),e.moveTo(i[0].x,i[0].y);for(let g=1;g<i.length;g+=1)e.lineTo(i[g].x,i[g].y);e.strokeStyle=t,e.lineWidth=s,e.lineCap=u,e.lineJoin=d,f&&(e.setLineDash(f),e.lineDashoffset=w),r&&(e.shadowColor=r,e.shadowOffsetX=a,e.shadowOffsetY=y),l&&(e.shadowBlur=l),e.stroke(),e.restore()}function m(e,i,o={}){if(!i.length)return;e.save();const{strokeColor:t="black",lineWidth:s=1,lineCap:u="round",lineJoin:d="round",lineDash:f=null,lineDashoffset:w=0,fillColor:r=null,gradient:l=null,shadowColor:a=null,shadowBlur:y=0,shadowOffsetX:g=0,shadowOffsetY:N=0}=o;e.beginPath(),e.moveTo(i[0].x,i[0].y);for(let n=1;n<i.length;n+=1)e.lineTo(i[n].x,i[n].y);if(e.closePath(),e.strokeStyle=t,e.lineWidth=s,e.lineCap=u,e.lineJoin=d,f&&(e.setLineDash(f),e.lineDashoffset=w),a&&(e.shadowColor=a,e.shadowBlur=y,e.shadowOffsetX=g,e.shadowOffsetY=N),l){let n;l.type==="linear"?n=e.createLinearGradient(h(l.start.x,Number.MIN_VALUE),h(l.start.y,Number.MIN_VALUE),h(l.end.x,Number.MIN_VALUE*2),h(l.end.y,Number.MIN_VALUE*2)):l.type==="radial"&&(n=e.createRadialGradient(h(l.start.x,Number.MIN_VALUE),h(l.start.y,Number.MIN_VALUE),l.start.r||0,h(l.end.x,Number.MIN_VALUE*2),h(l.end.y,Number.MIN_VALUE*2),l.end.r||0)),n&&l.stops&&(l.stops.forEach(p=>{n.addColorStop(p.offset,p.color)}),e.fillStyle=n)}else r&&(e.fillStyle=r);e.fillStyle&&e.fill(),t&&e.stroke(),e.restore()}function L(e,i,o={}){if(!i.length)return;e.save();const{strokeColor:t="black",lineWidth:s=1,lineCap:u="round",lineJoin:d="round",lineDash:f=null,lineDashoffset:w=0,fillColor:r=null,gradient:l=null,shadowColor:a=null,shadowBlur:y=0,shadowOffsetX:g=0,shadowOffsetY:N=0}=o;e.beginPath(),e.moveTo(i[0].x,i[0].y);for(let n=1;n<i.length;n+=1)e.lineTo(i[n].x,i[n].y);if(e.closePath(),e.strokeStyle=t,e.lineWidth=s,e.lineCap=u,e.lineJoin=d,f&&(e.setLineDash(f),e.lineDashoffset=w),a&&(e.shadowColor=a,e.shadowBlur=y,e.shadowOffsetX=g,e.shadowOffsetY=N),l){let n;l.type==="linear"?n=e.createLinearGradient(h(l.start.x,Number.MIN_VALUE),h(l.start.y,Number.MIN_VALUE),h(l.end.x,Number.MIN_VALUE*2),h(l.end.y,Number.MIN_VALUE*2)):l.type==="radial"&&(n=e.createRadialGradient(h(l.start.x,Number.MIN_VALUE),h(l.start.y,Number.MIN_VALUE),l.start.r||0,h(l.end.x,Number.MIN_VALUE*2),h(l.end.y,Number.MIN_VALUE*2),l.end.r||0)),n&&l.stops&&(l.stops.forEach(p=>{n.addColorStop(p.offset,p.color)}),e.fillStyle=n)}else r&&(e.fillStyle=r);e.fillStyle&&e.fill(),t&&e.stroke(),e.restore()}function I(e,i,o,t,s={}){e.save();const{font:u="16px sans-serif",color:d="black",align:f="start",baseline:w="alphabetic",maxWidth:r=void 0,rotation:l=0,shadowColor:a=null,shadowBlur:y=0,shadowOffsetX:g=0,shadowOffsetY:N=0,strokeColor:n=null,lineWidth:p=1}=s;e.font=u,e.fillStyle=d,e.textAlign=f,e.textBaseline=w,a&&(e.shadowColor=a,e.shadowBlur=y,e.shadowOffsetX=g,e.shadowOffsetY=N),n&&(e.strokeStyle=n,e.lineWidth=p),l!==0&&(e.translate(o,t),e.rotate(Math.PI/180*l),e.translate(-o,-t)),e.fillText(i,o,t,r),n&&e.strokeText(i,o,t,r),e.restore()}function O(e,i=20){let o;return function(...t){const s=this;o||(e.apply(s,t),o=!0,setTimeout(()=>o=!1,i))}}function E(e,i,o=!1){let t;return function(...s){const u=this,d=function(){t=null,o||e.apply(u,s)},f=o&&!t;clearTimeout(t),t=setTimeout(d,i),f&&e.apply(u,s)}}function k(e){const i=document.createElement("canvas");return i.width=e.width||1,i.height=e.height||1,e.width||(e.width=1),e.height||(e.height=1),i.getContext("2d").drawImage(e,0,0),i}function h(e,i){return[null,void 0,NaN,1/0,-1/0].includes(e)?i:e}function M({chart:e,title:i=null,slicer:o=null,legend:t=null}){let s=0,u=0;if(e){const d=e.parentNode,{height:f,width:w}=d.getBoundingClientRect();let r=0,l=0,a=0;i&&(r=i.getBoundingClientRect().height),o&&(l=o.getBoundingClientRect().height),t&&(a=t.getBoundingClientRect().height),s=f-r-l-a,u=w}return{width:u,height:s}}exports.circle=b;exports.cloneCanvas=k;exports.debounce=E;exports.line=C;exports.polygon=m;exports.rect=L;exports.text=I;exports.throttle=O;exports.useResponsive=M;