@caipira/tamandua 0.0.11 → 0.0.13

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 (38) hide show
  1. package/dist/ChartLine.css +1 -0
  2. package/dist/ChartLine.js +6 -0
  3. package/dist/ChartLine.vue_vue_type_style_index_0_lang-DO_gKCe4.js +824 -0
  4. package/dist/ChartTreemap.js +6 -0
  5. package/dist/ChartTreemap.vue_vue_type_script_setup_true_lang-BSKB-UTM.js +278 -0
  6. package/dist/components.js +80 -80
  7. package/dist/{plugin-DdQB9R9S.js → plugin-Bj5VaUuH.js} +1 -1
  8. package/dist/{plugin-CQ6DHzD0.js → plugin-DDXOF4cU.js} +1 -1
  9. package/dist/plugins-DNNQp3qM.js +109 -0
  10. package/dist/plugins.js +88 -86
  11. package/dist/tamandua.js +6 -17
  12. package/dist/transform-DSaNEFMr.js +1756 -0
  13. package/dist/types/components/ChartLine/ChartLine.story.d.ts +19 -0
  14. package/dist/types/components/ChartLine/index.d.ts +5 -0
  15. package/dist/types/components/ChartLine/types.d.ts +17 -0
  16. package/dist/types/components/ChartTreemap/ChartTreemap.story.d.ts +6 -0
  17. package/dist/types/components/ChartTreemap/index.d.ts +5 -0
  18. package/dist/types/components/{LineChart → ChartTreemap}/types.d.ts +1 -1
  19. package/dist/types/components/Form/Form.vue.d.ts +3 -3
  20. package/dist/types/components/index.d.ts +4 -4
  21. package/dist/types/components/plugins.d.ts +3 -3
  22. package/dist/types/types/form.d.ts +1 -1
  23. package/dist/types/types/ui.d.ts +0 -17
  24. package/package.json +114 -114
  25. package/volar.d.ts +2 -2
  26. package/dist/LineChart.js +0 -6
  27. package/dist/LineChart.vue_vue_type_script_setup_true_lang-Do8SXht4.js +0 -17
  28. package/dist/PieChart.js +0 -6
  29. package/dist/PieChart.vue_vue_type_script_setup_true_lang-CmEDNOuk.js +0 -17
  30. package/dist/index-CgLIzaY3.js +0 -7772
  31. package/dist/plugins-QF-BxY4i.js +0 -107
  32. package/dist/types/components/LineChart/index.d.ts +0 -5
  33. package/dist/types/components/PieChart/index.d.ts +0 -5
  34. package/dist/types/components/PieChart/types.d.ts +0 -4
  35. /package/dist/types/components/{LineChart/LineChart.vue.d.ts → ChartLine/ChartLine.vue.d.ts} +0 -0
  36. /package/dist/types/components/{LineChart → ChartLine}/plugin.d.ts +0 -0
  37. /package/dist/types/components/{PieChart/PieChart.vue.d.ts → ChartTreemap/ChartTreemap.vue.d.ts} +0 -0
  38. /package/dist/types/components/{PieChart → ChartTreemap}/plugin.d.ts +0 -0
@@ -0,0 +1,824 @@
1
+ import './ChartLine.css';
2
+ import { defineComponent as Pn, onMounted as zn, openBlock as En, createElementBlock as Fn, createElementVNode as jn } from "vue";
3
+ import { c as Tn, i as W, a as an, b as on, d as In, s as un } from "./transform-DSaNEFMr.js";
4
+ function q(n, t) {
5
+ return n == null || t == null ? NaN : n < t ? -1 : n > t ? 1 : n >= t ? 0 : NaN;
6
+ }
7
+ function Ln(n, t) {
8
+ return n == null || t == null ? NaN : t < n ? -1 : t > n ? 1 : t >= n ? 0 : NaN;
9
+ }
10
+ function kn(n) {
11
+ let t, r, e;
12
+ n.length !== 2 ? (t = q, r = (f, s) => q(n(f), s), e = (f, s) => n(f) - s) : (t = n === q || n === Ln ? n : Cn, r = n, e = n);
13
+ function i(f, s, o = 0, h = f.length) {
14
+ if (o < h) {
15
+ if (t(s, s) !== 0)
16
+ return h;
17
+ do {
18
+ const l = o + h >>> 1;
19
+ r(f[l], s) < 0 ? o = l + 1 : h = l;
20
+ } while (o < h);
21
+ }
22
+ return o;
23
+ }
24
+ function a(f, s, o = 0, h = f.length) {
25
+ if (o < h) {
26
+ if (t(s, s) !== 0)
27
+ return h;
28
+ do {
29
+ const l = o + h >>> 1;
30
+ r(f[l], s) <= 0 ? o = l + 1 : h = l;
31
+ } while (o < h);
32
+ }
33
+ return o;
34
+ }
35
+ function u(f, s, o = 0, h = f.length) {
36
+ const l = i(f, s, o, h - 1);
37
+ return l > o && e(f[l - 1], s) > -e(f[l], s) ? l - 1 : l;
38
+ }
39
+ return { left: i, center: u, right: a };
40
+ }
41
+ function Cn() {
42
+ return 0;
43
+ }
44
+ function Rn(n) {
45
+ return n === null ? NaN : +n;
46
+ }
47
+ const Vn = kn(q), On = Vn.right;
48
+ kn(Rn).center;
49
+ class sn extends Map {
50
+ constructor(t, r = Dn) {
51
+ if (super(), Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: r } }), t != null)
52
+ for (const [e, i] of t)
53
+ this.set(e, i);
54
+ }
55
+ get(t) {
56
+ return super.get(fn(this, t));
57
+ }
58
+ has(t) {
59
+ return super.has(fn(this, t));
60
+ }
61
+ set(t, r) {
62
+ return super.set(qn(this, t), r);
63
+ }
64
+ delete(t) {
65
+ return super.delete(Bn(this, t));
66
+ }
67
+ }
68
+ function fn({ _intern: n, _key: t }, r) {
69
+ const e = t(r);
70
+ return n.has(e) ? n.get(e) : r;
71
+ }
72
+ function qn({ _intern: n, _key: t }, r) {
73
+ const e = t(r);
74
+ return n.has(e) ? n.get(e) : (n.set(e, r), r);
75
+ }
76
+ function Bn({ _intern: n, _key: t }, r) {
77
+ const e = t(r);
78
+ return n.has(e) && (r = n.get(e), n.delete(e)), r;
79
+ }
80
+ function Dn(n) {
81
+ return n !== null && typeof n == "object" ? n.valueOf() : n;
82
+ }
83
+ const Hn = Math.sqrt(50), Xn = Math.sqrt(10), Zn = Math.sqrt(2);
84
+ function D(n, t, r) {
85
+ const e = (t - n) / Math.max(0, r), i = Math.floor(Math.log10(e)), a = e / Math.pow(10, i), u = a >= Hn ? 10 : a >= Xn ? 5 : a >= Zn ? 2 : 1;
86
+ let f, s, o;
87
+ return i < 0 ? (o = Math.pow(10, -i) / u, f = Math.round(n * o), s = Math.round(t * o), f / o < n && ++f, s / o > t && --s, o = -o) : (o = Math.pow(10, i) * u, f = Math.round(n / o), s = Math.round(t / o), f * o < n && ++f, s * o > t && --s), s < f && 0.5 <= r && r < 2 ? D(n, t, r * 2) : [f, s, o];
88
+ }
89
+ function Gn(n, t, r) {
90
+ if (t = +t, n = +n, r = +r, !(r > 0))
91
+ return [];
92
+ if (n === t)
93
+ return [n];
94
+ const e = t < n, [i, a, u] = e ? D(t, n, r) : D(n, t, r);
95
+ if (!(a >= i))
96
+ return [];
97
+ const f = a - i + 1, s = new Array(f);
98
+ if (e)
99
+ if (u < 0)
100
+ for (let o = 0; o < f; ++o)
101
+ s[o] = (a - o) / -u;
102
+ else
103
+ for (let o = 0; o < f; ++o)
104
+ s[o] = (a - o) * u;
105
+ else if (u < 0)
106
+ for (let o = 0; o < f; ++o)
107
+ s[o] = (i + o) / -u;
108
+ else
109
+ for (let o = 0; o < f; ++o)
110
+ s[o] = (i + o) * u;
111
+ return s;
112
+ }
113
+ function Y(n, t, r) {
114
+ return t = +t, n = +n, r = +r, D(n, t, r)[2];
115
+ }
116
+ function Wn(n, t, r) {
117
+ t = +t, n = +n, r = +r;
118
+ const e = t < n, i = e ? Y(t, n, r) : Y(n, t, r);
119
+ return (e ? -1 : 1) * (i < 0 ? 1 / -i : i);
120
+ }
121
+ function Yn(n, t) {
122
+ let r;
123
+ if (t === void 0)
124
+ for (const e of n)
125
+ e != null && (r < e || r === void 0 && e >= e) && (r = e);
126
+ else {
127
+ let e = -1;
128
+ for (let i of n)
129
+ (i = t(i, ++e, n)) != null && (r < i || r === void 0 && i >= i) && (r = i);
130
+ }
131
+ return r;
132
+ }
133
+ function Qn(n, t, r) {
134
+ n = +n, t = +t, r = (i = arguments.length) < 2 ? (t = n, n = 0, 1) : i < 3 ? 1 : +r;
135
+ for (var e = -1, i = Math.max(0, Math.ceil((t - n) / r)) | 0, a = new Array(i); ++e < i; )
136
+ a[e] = n + e * r;
137
+ return a;
138
+ }
139
+ function Un(n) {
140
+ return n;
141
+ }
142
+ var Z = 1, G = 2, Q = 3, L = 4, cn = 1e-6;
143
+ function Jn(n) {
144
+ return "translate(" + n + ",0)";
145
+ }
146
+ function Kn(n) {
147
+ return "translate(0," + n + ")";
148
+ }
149
+ function nt(n) {
150
+ return (t) => +n(t);
151
+ }
152
+ function tt(n, t) {
153
+ return t = Math.max(0, n.bandwidth() - t * 2) / 2, n.round() && (t = Math.round(t)), (r) => +n(r) + t;
154
+ }
155
+ function et() {
156
+ return !this.__axis;
157
+ }
158
+ function wn(n, t) {
159
+ var r = [], e = null, i = null, a = 6, u = 6, f = 3, s = typeof window < "u" && window.devicePixelRatio > 1 ? 0 : 0.5, o = n === Z || n === L ? -1 : 1, h = n === L || n === G ? "x" : "y", l = n === Z || n === Q ? Jn : Kn;
160
+ function c(d) {
161
+ var g = e ?? (t.ticks ? t.ticks.apply(t, r) : t.domain()), x = i ?? (t.tickFormat ? t.tickFormat.apply(t, r) : Un), p = Math.max(a, 0) + f, M = t.range(), _ = +M[0] + s, k = +M[M.length - 1] + s, v = (t.bandwidth ? tt : nt)(t.copy(), s), y = d.selection ? d.selection() : d, N = y.selectAll(".domain").data([null]), b = y.selectAll(".tick").data(g, t).order(), z = b.exit(), E = b.enter().append("g").attr("class", "tick"), S = b.select("line"), m = b.select("text");
162
+ N = N.merge(N.enter().insert("path", ".tick").attr("class", "domain").attr("stroke", "currentColor")), b = b.merge(E), S = S.merge(E.append("line").attr("stroke", "currentColor").attr(h + "2", o * a)), m = m.merge(E.append("text").attr("fill", "currentColor").attr(h, o * p).attr("dy", n === Z ? "0em" : n === Q ? "0.71em" : "0.32em")), d !== y && (N = N.transition(d), b = b.transition(d), S = S.transition(d), m = m.transition(d), z = z.transition(d).attr("opacity", cn).attr("transform", function($) {
163
+ return isFinite($ = v($)) ? l($ + s) : this.getAttribute("transform");
164
+ }), E.attr("opacity", cn).attr("transform", function($) {
165
+ var w = this.parentNode.__axis;
166
+ return l((w && isFinite(w = w($)) ? w : v($)) + s);
167
+ })), z.remove(), N.attr("d", n === L || n === G ? u ? "M" + o * u + "," + _ + "H" + s + "V" + k + "H" + o * u : "M" + s + "," + _ + "V" + k : u ? "M" + _ + "," + o * u + "V" + s + "H" + k + "V" + o * u : "M" + _ + "," + s + "H" + k), b.attr("opacity", 1).attr("transform", function($) {
168
+ return l(v($) + s);
169
+ }), S.attr(h + "2", o * a), m.attr(h, o * p).text(x), y.filter(et).attr("fill", "none").attr("font-size", 10).attr("font-family", "sans-serif").attr("text-anchor", n === G ? "start" : n === L ? "end" : "middle"), y.each(function() {
170
+ this.__axis = v;
171
+ });
172
+ }
173
+ return c.scale = function(d) {
174
+ return arguments.length ? (t = d, c) : t;
175
+ }, c.ticks = function() {
176
+ return r = Array.from(arguments), c;
177
+ }, c.tickArguments = function(d) {
178
+ return arguments.length ? (r = d == null ? [] : Array.from(d), c) : r.slice();
179
+ }, c.tickValues = function(d) {
180
+ return arguments.length ? (e = d == null ? null : Array.from(d), c) : e && e.slice();
181
+ }, c.tickFormat = function(d) {
182
+ return arguments.length ? (i = d, c) : i;
183
+ }, c.tickSize = function(d) {
184
+ return arguments.length ? (a = u = +d, c) : a;
185
+ }, c.tickSizeInner = function(d) {
186
+ return arguments.length ? (a = +d, c) : a;
187
+ }, c.tickSizeOuter = function(d) {
188
+ return arguments.length ? (u = +d, c) : u;
189
+ }, c.tickPadding = function(d) {
190
+ return arguments.length ? (f = +d, c) : f;
191
+ }, c.offset = function(d) {
192
+ return arguments.length ? (s = +d, c) : s;
193
+ }, c;
194
+ }
195
+ function ln(n) {
196
+ return wn(Q, n);
197
+ }
198
+ function hn(n) {
199
+ return wn(L, n);
200
+ }
201
+ function rt(n, t) {
202
+ t || (t = []);
203
+ var r = n ? Math.min(t.length, n.length) : 0, e = t.slice(), i;
204
+ return function(a) {
205
+ for (i = 0; i < r; ++i)
206
+ e[i] = n[i] * (1 - a) + t[i] * a;
207
+ return e;
208
+ };
209
+ }
210
+ function it(n) {
211
+ return ArrayBuffer.isView(n) && !(n instanceof DataView);
212
+ }
213
+ function at(n, t) {
214
+ var r = t ? t.length : 0, e = n ? Math.min(r, n.length) : 0, i = new Array(e), a = new Array(r), u;
215
+ for (u = 0; u < e; ++u)
216
+ i[u] = nn(n[u], t[u]);
217
+ for (; u < r; ++u)
218
+ a[u] = t[u];
219
+ return function(f) {
220
+ for (u = 0; u < e; ++u)
221
+ a[u] = i[u](f);
222
+ return a;
223
+ };
224
+ }
225
+ function ot(n, t) {
226
+ var r = /* @__PURE__ */ new Date();
227
+ return n = +n, t = +t, function(e) {
228
+ return r.setTime(n * (1 - e) + t * e), r;
229
+ };
230
+ }
231
+ function ut(n, t) {
232
+ var r = {}, e = {}, i;
233
+ (n === null || typeof n != "object") && (n = {}), (t === null || typeof t != "object") && (t = {});
234
+ for (i in t)
235
+ i in n ? r[i] = nn(n[i], t[i]) : e[i] = t[i];
236
+ return function(a) {
237
+ for (i in r)
238
+ e[i] = r[i](a);
239
+ return e;
240
+ };
241
+ }
242
+ function nn(n, t) {
243
+ var r = typeof t, e;
244
+ return t == null || r === "boolean" ? Tn(t) : (r === "number" ? W : r === "string" ? (e = an(t)) ? (t = e, on) : In : t instanceof an ? on : t instanceof Date ? ot : it(t) ? rt : Array.isArray(t) ? at : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? ut : W)(n, t);
245
+ }
246
+ function st(n, t) {
247
+ return n = +n, t = +t, function(r) {
248
+ return Math.round(n * (1 - r) + t * r);
249
+ };
250
+ }
251
+ const U = Math.PI, J = 2 * U, P = 1e-6, ft = J - P;
252
+ function $n(n) {
253
+ this._ += n[0];
254
+ for (let t = 1, r = n.length; t < r; ++t)
255
+ this._ += arguments[t] + n[t];
256
+ }
257
+ function ct(n) {
258
+ let t = Math.floor(n);
259
+ if (!(t >= 0))
260
+ throw new Error(`invalid digits: ${n}`);
261
+ if (t > 15)
262
+ return $n;
263
+ const r = 10 ** t;
264
+ return function(e) {
265
+ this._ += e[0];
266
+ for (let i = 1, a = e.length; i < a; ++i)
267
+ this._ += Math.round(arguments[i] * r) / r + e[i];
268
+ };
269
+ }
270
+ class lt {
271
+ constructor(t) {
272
+ this._x0 = this._y0 = // start of current subpath
273
+ this._x1 = this._y1 = null, this._ = "", this._append = t == null ? $n : ct(t);
274
+ }
275
+ moveTo(t, r) {
276
+ this._append`M${this._x0 = this._x1 = +t},${this._y0 = this._y1 = +r}`;
277
+ }
278
+ closePath() {
279
+ this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._append`Z`);
280
+ }
281
+ lineTo(t, r) {
282
+ this._append`L${this._x1 = +t},${this._y1 = +r}`;
283
+ }
284
+ quadraticCurveTo(t, r, e, i) {
285
+ this._append`Q${+t},${+r},${this._x1 = +e},${this._y1 = +i}`;
286
+ }
287
+ bezierCurveTo(t, r, e, i, a, u) {
288
+ this._append`C${+t},${+r},${+e},${+i},${this._x1 = +a},${this._y1 = +u}`;
289
+ }
290
+ arcTo(t, r, e, i, a) {
291
+ if (t = +t, r = +r, e = +e, i = +i, a = +a, a < 0)
292
+ throw new Error(`negative radius: ${a}`);
293
+ let u = this._x1, f = this._y1, s = e - t, o = i - r, h = u - t, l = f - r, c = h * h + l * l;
294
+ if (this._x1 === null)
295
+ this._append`M${this._x1 = t},${this._y1 = r}`;
296
+ else if (c > P)
297
+ if (!(Math.abs(l * s - o * h) > P) || !a)
298
+ this._append`L${this._x1 = t},${this._y1 = r}`;
299
+ else {
300
+ let d = e - u, g = i - f, x = s * s + o * o, p = d * d + g * g, M = Math.sqrt(x), _ = Math.sqrt(c), k = a * Math.tan((U - Math.acos((x + c - p) / (2 * M * _))) / 2), v = k / _, y = k / M;
301
+ Math.abs(v - 1) > P && this._append`L${t + v * h},${r + v * l}`, this._append`A${a},${a},0,0,${+(l * d > h * g)},${this._x1 = t + y * s},${this._y1 = r + y * o}`;
302
+ }
303
+ }
304
+ arc(t, r, e, i, a, u) {
305
+ if (t = +t, r = +r, e = +e, u = !!u, e < 0)
306
+ throw new Error(`negative radius: ${e}`);
307
+ let f = e * Math.cos(i), s = e * Math.sin(i), o = t + f, h = r + s, l = 1 ^ u, c = u ? i - a : a - i;
308
+ this._x1 === null ? this._append`M${o},${h}` : (Math.abs(this._x1 - o) > P || Math.abs(this._y1 - h) > P) && this._append`L${o},${h}`, e && (c < 0 && (c = c % J + J), c > ft ? this._append`A${e},${e},0,1,${l},${t - f},${r - s}A${e},${e},0,1,${l},${this._x1 = o},${this._y1 = h}` : c > P && this._append`A${e},${e},0,${+(c >= U)},${l},${this._x1 = t + e * Math.cos(a)},${this._y1 = r + e * Math.sin(a)}`);
309
+ }
310
+ rect(t, r, e, i) {
311
+ this._append`M${this._x0 = this._x1 = +t},${this._y0 = this._y1 = +r}h${e = +e}v${+i}h${-e}Z`;
312
+ }
313
+ toString() {
314
+ return this._;
315
+ }
316
+ }
317
+ function ht(n) {
318
+ return Math.abs(n = Math.round(n)) >= 1e21 ? n.toLocaleString("en").replace(/,/g, "") : n.toString(10);
319
+ }
320
+ function H(n, t) {
321
+ if ((r = (n = t ? n.toExponential(t - 1) : n.toExponential()).indexOf("e")) < 0)
322
+ return null;
323
+ var r, e = n.slice(0, r);
324
+ return [
325
+ e.length > 1 ? e[0] + e.slice(2) : e,
326
+ +n.slice(r + 1)
327
+ ];
328
+ }
329
+ function I(n) {
330
+ return n = H(Math.abs(n)), n ? n[1] : NaN;
331
+ }
332
+ function dt(n, t) {
333
+ return function(r, e) {
334
+ for (var i = r.length, a = [], u = 0, f = n[0], s = 0; i > 0 && f > 0 && (s + f + 1 > e && (f = Math.max(1, e - s)), a.push(r.substring(i -= f, i + f)), !((s += f + 1) > e)); )
335
+ f = n[u = (u + 1) % n.length];
336
+ return a.reverse().join(t);
337
+ };
338
+ }
339
+ function mt(n) {
340
+ return function(t) {
341
+ return t.replace(/[0-9]/g, function(r) {
342
+ return n[+r];
343
+ });
344
+ };
345
+ }
346
+ var gt = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
347
+ function X(n) {
348
+ if (!(t = gt.exec(n)))
349
+ throw new Error("invalid format: " + n);
350
+ var t;
351
+ return new tn({
352
+ fill: t[1],
353
+ align: t[2],
354
+ sign: t[3],
355
+ symbol: t[4],
356
+ zero: t[5],
357
+ width: t[6],
358
+ comma: t[7],
359
+ precision: t[8] && t[8].slice(1),
360
+ trim: t[9],
361
+ type: t[10]
362
+ });
363
+ }
364
+ X.prototype = tn.prototype;
365
+ function tn(n) {
366
+ this.fill = n.fill === void 0 ? " " : n.fill + "", this.align = n.align === void 0 ? ">" : n.align + "", this.sign = n.sign === void 0 ? "-" : n.sign + "", this.symbol = n.symbol === void 0 ? "" : n.symbol + "", this.zero = !!n.zero, this.width = n.width === void 0 ? void 0 : +n.width, this.comma = !!n.comma, this.precision = n.precision === void 0 ? void 0 : +n.precision, this.trim = !!n.trim, this.type = n.type === void 0 ? "" : n.type + "";
367
+ }
368
+ tn.prototype.toString = function() {
369
+ return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
370
+ };
371
+ function pt(n) {
372
+ n:
373
+ for (var t = n.length, r = 1, e = -1, i; r < t; ++r)
374
+ switch (n[r]) {
375
+ case ".":
376
+ e = i = r;
377
+ break;
378
+ case "0":
379
+ e === 0 && (e = r), i = r;
380
+ break;
381
+ default:
382
+ if (!+n[r])
383
+ break n;
384
+ e > 0 && (e = 0);
385
+ break;
386
+ }
387
+ return e > 0 ? n.slice(0, e) + n.slice(i + 1) : n;
388
+ }
389
+ var xn;
390
+ function yt(n, t) {
391
+ var r = H(n, t);
392
+ if (!r)
393
+ return n + "";
394
+ var e = r[0], i = r[1], a = i - (xn = Math.max(-8, Math.min(8, Math.floor(i / 3))) * 3) + 1, u = e.length;
395
+ return a === u ? e : a > u ? e + new Array(a - u + 1).join("0") : a > 0 ? e.slice(0, a) + "." + e.slice(a) : "0." + new Array(1 - a).join("0") + H(n, Math.max(0, t + a - 1))[0];
396
+ }
397
+ function dn(n, t) {
398
+ var r = H(n, t);
399
+ if (!r)
400
+ return n + "";
401
+ var e = r[0], i = r[1];
402
+ return i < 0 ? "0." + new Array(-i).join("0") + e : e.length > i + 1 ? e.slice(0, i + 1) + "." + e.slice(i + 1) : e + new Array(i - e.length + 2).join("0");
403
+ }
404
+ const mn = {
405
+ "%": (n, t) => (n * 100).toFixed(t),
406
+ b: (n) => Math.round(n).toString(2),
407
+ c: (n) => n + "",
408
+ d: ht,
409
+ e: (n, t) => n.toExponential(t),
410
+ f: (n, t) => n.toFixed(t),
411
+ g: (n, t) => n.toPrecision(t),
412
+ o: (n) => Math.round(n).toString(8),
413
+ p: (n, t) => dn(n * 100, t),
414
+ r: dn,
415
+ s: yt,
416
+ X: (n) => Math.round(n).toString(16).toUpperCase(),
417
+ x: (n) => Math.round(n).toString(16)
418
+ };
419
+ function gn(n) {
420
+ return n;
421
+ }
422
+ var pn = Array.prototype.map, yn = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
423
+ function Mt(n) {
424
+ var t = n.grouping === void 0 || n.thousands === void 0 ? gn : dt(pn.call(n.grouping, Number), n.thousands + ""), r = n.currency === void 0 ? "" : n.currency[0] + "", e = n.currency === void 0 ? "" : n.currency[1] + "", i = n.decimal === void 0 ? "." : n.decimal + "", a = n.numerals === void 0 ? gn : mt(pn.call(n.numerals, String)), u = n.percent === void 0 ? "%" : n.percent + "", f = n.minus === void 0 ? "−" : n.minus + "", s = n.nan === void 0 ? "NaN" : n.nan + "";
425
+ function o(l) {
426
+ l = X(l);
427
+ var c = l.fill, d = l.align, g = l.sign, x = l.symbol, p = l.zero, M = l.width, _ = l.comma, k = l.precision, v = l.trim, y = l.type;
428
+ y === "n" ? (_ = !0, y = "g") : mn[y] || (k === void 0 && (k = 12), v = !0, y = "g"), (p || c === "0" && d === "=") && (p = !0, c = "0", d = "=");
429
+ var N = x === "$" ? r : x === "#" && /[boxX]/.test(y) ? "0" + y.toLowerCase() : "", b = x === "$" ? e : /[%p]/.test(y) ? u : "", z = mn[y], E = /[defgprs%]/.test(y);
430
+ k = k === void 0 ? 6 : /[gprs]/.test(y) ? Math.max(1, Math.min(21, k)) : Math.max(0, Math.min(20, k));
431
+ function S(m) {
432
+ var $ = N, w = b, F, rn, C;
433
+ if (y === "c")
434
+ w = z(m) + w, m = "";
435
+ else {
436
+ m = +m;
437
+ var R = m < 0 || 1 / m < 0;
438
+ if (m = isNaN(m) ? s : z(Math.abs(m), k), v && (m = pt(m)), R && +m == 0 && g !== "+" && (R = !1), $ = (R ? g === "(" ? g : f : g === "-" || g === "(" ? "" : g) + $, w = (y === "s" ? yn[8 + xn / 3] : "") + w + (R && g === "(" ? ")" : ""), E) {
439
+ for (F = -1, rn = m.length; ++F < rn; )
440
+ if (C = m.charCodeAt(F), 48 > C || C > 57) {
441
+ w = (C === 46 ? i + m.slice(F + 1) : m.slice(F)) + w, m = m.slice(0, F);
442
+ break;
443
+ }
444
+ }
445
+ }
446
+ _ && !p && (m = t(m, 1 / 0));
447
+ var V = $.length + m.length + w.length, A = V < M ? new Array(M - V + 1).join(c) : "";
448
+ switch (_ && p && (m = t(A + m, A.length ? M - w.length : 1 / 0), A = ""), d) {
449
+ case "<":
450
+ m = $ + m + w + A;
451
+ break;
452
+ case "=":
453
+ m = $ + A + m + w;
454
+ break;
455
+ case "^":
456
+ m = A.slice(0, V = A.length >> 1) + $ + m + w + A.slice(V);
457
+ break;
458
+ default:
459
+ m = A + $ + m + w;
460
+ break;
461
+ }
462
+ return a(m);
463
+ }
464
+ return S.toString = function() {
465
+ return l + "";
466
+ }, S;
467
+ }
468
+ function h(l, c) {
469
+ var d = o((l = X(l), l.type = "f", l)), g = Math.max(-8, Math.min(8, Math.floor(I(c) / 3))) * 3, x = Math.pow(10, -g), p = yn[8 + g / 3];
470
+ return function(M) {
471
+ return d(x * M) + p;
472
+ };
473
+ }
474
+ return {
475
+ format: o,
476
+ formatPrefix: h
477
+ };
478
+ }
479
+ var O, vn, bn;
480
+ _t({
481
+ thousands: ",",
482
+ grouping: [3],
483
+ currency: ["$", ""]
484
+ });
485
+ function _t(n) {
486
+ return O = Mt(n), vn = O.format, bn = O.formatPrefix, O;
487
+ }
488
+ function kt(n) {
489
+ return Math.max(0, -I(Math.abs(n)));
490
+ }
491
+ function wt(n, t) {
492
+ return Math.max(0, Math.max(-8, Math.min(8, Math.floor(I(t) / 3))) * 3 - I(Math.abs(n)));
493
+ }
494
+ function $t(n, t) {
495
+ return n = Math.abs(n), t = Math.abs(t) - n, Math.max(0, I(t) - I(n)) + 1;
496
+ }
497
+ function en(n, t) {
498
+ switch (arguments.length) {
499
+ case 0:
500
+ break;
501
+ case 1:
502
+ this.range(n);
503
+ break;
504
+ default:
505
+ this.range(t).domain(n);
506
+ break;
507
+ }
508
+ return this;
509
+ }
510
+ const Mn = Symbol("implicit");
511
+ function An() {
512
+ var n = new sn(), t = [], r = [], e = Mn;
513
+ function i(a) {
514
+ let u = n.get(a);
515
+ if (u === void 0) {
516
+ if (e !== Mn)
517
+ return e;
518
+ n.set(a, u = t.push(a) - 1);
519
+ }
520
+ return r[u % r.length];
521
+ }
522
+ return i.domain = function(a) {
523
+ if (!arguments.length)
524
+ return t.slice();
525
+ t = [], n = new sn();
526
+ for (const u of a)
527
+ n.has(u) || n.set(u, t.push(u) - 1);
528
+ return i;
529
+ }, i.range = function(a) {
530
+ return arguments.length ? (r = Array.from(a), i) : r.slice();
531
+ }, i.unknown = function(a) {
532
+ return arguments.length ? (e = a, i) : e;
533
+ }, i.copy = function() {
534
+ return An(t, r).unknown(e);
535
+ }, en.apply(i, arguments), i;
536
+ }
537
+ function Nn() {
538
+ var n = An().unknown(void 0), t = n.domain, r = n.range, e = 0, i = 1, a, u, f = !1, s = 0, o = 0, h = 0.5;
539
+ delete n.unknown;
540
+ function l() {
541
+ var c = t().length, d = i < e, g = d ? i : e, x = d ? e : i;
542
+ a = (x - g) / Math.max(1, c - s + o * 2), f && (a = Math.floor(a)), g += (x - g - a * (c - s)) * h, u = a * (1 - s), f && (g = Math.round(g), u = Math.round(u));
543
+ var p = Qn(c).map(function(M) {
544
+ return g + a * M;
545
+ });
546
+ return r(d ? p.reverse() : p);
547
+ }
548
+ return n.domain = function(c) {
549
+ return arguments.length ? (t(c), l()) : t();
550
+ }, n.range = function(c) {
551
+ return arguments.length ? ([e, i] = c, e = +e, i = +i, l()) : [e, i];
552
+ }, n.rangeRound = function(c) {
553
+ return [e, i] = c, e = +e, i = +i, f = !0, l();
554
+ }, n.bandwidth = function() {
555
+ return u;
556
+ }, n.step = function() {
557
+ return a;
558
+ }, n.round = function(c) {
559
+ return arguments.length ? (f = !!c, l()) : f;
560
+ }, n.padding = function(c) {
561
+ return arguments.length ? (s = Math.min(1, o = +c), l()) : s;
562
+ }, n.paddingInner = function(c) {
563
+ return arguments.length ? (s = Math.min(1, c), l()) : s;
564
+ }, n.paddingOuter = function(c) {
565
+ return arguments.length ? (o = +c, l()) : o;
566
+ }, n.align = function(c) {
567
+ return arguments.length ? (h = Math.max(0, Math.min(1, c)), l()) : h;
568
+ }, n.copy = function() {
569
+ return Nn(t(), [e, i]).round(f).paddingInner(s).paddingOuter(o).align(h);
570
+ }, en.apply(l(), arguments);
571
+ }
572
+ function xt(n) {
573
+ return function() {
574
+ return n;
575
+ };
576
+ }
577
+ function vt(n) {
578
+ return +n;
579
+ }
580
+ var _n = [0, 1];
581
+ function T(n) {
582
+ return n;
583
+ }
584
+ function K(n, t) {
585
+ return (t -= n = +n) ? function(r) {
586
+ return (r - n) / t;
587
+ } : xt(isNaN(t) ? NaN : 0.5);
588
+ }
589
+ function bt(n, t) {
590
+ var r;
591
+ return n > t && (r = n, n = t, t = r), function(e) {
592
+ return Math.max(n, Math.min(t, e));
593
+ };
594
+ }
595
+ function At(n, t, r) {
596
+ var e = n[0], i = n[1], a = t[0], u = t[1];
597
+ return i < e ? (e = K(i, e), a = r(u, a)) : (e = K(e, i), a = r(a, u)), function(f) {
598
+ return a(e(f));
599
+ };
600
+ }
601
+ function Nt(n, t, r) {
602
+ var e = Math.min(n.length, t.length) - 1, i = new Array(e), a = new Array(e), u = -1;
603
+ for (n[e] < n[0] && (n = n.slice().reverse(), t = t.slice().reverse()); ++u < e; )
604
+ i[u] = K(n[u], n[u + 1]), a[u] = r(t[u], t[u + 1]);
605
+ return function(f) {
606
+ var s = On(n, f, 1, e) - 1;
607
+ return a[s](i[s](f));
608
+ };
609
+ }
610
+ function St(n, t) {
611
+ return t.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown());
612
+ }
613
+ function Pt() {
614
+ var n = _n, t = _n, r = nn, e, i, a, u = T, f, s, o;
615
+ function h() {
616
+ var c = Math.min(n.length, t.length);
617
+ return u !== T && (u = bt(n[0], n[c - 1])), f = c > 2 ? Nt : At, s = o = null, l;
618
+ }
619
+ function l(c) {
620
+ return c == null || isNaN(c = +c) ? a : (s || (s = f(n.map(e), t, r)))(e(u(c)));
621
+ }
622
+ return l.invert = function(c) {
623
+ return u(i((o || (o = f(t, n.map(e), W)))(c)));
624
+ }, l.domain = function(c) {
625
+ return arguments.length ? (n = Array.from(c, vt), h()) : n.slice();
626
+ }, l.range = function(c) {
627
+ return arguments.length ? (t = Array.from(c), h()) : t.slice();
628
+ }, l.rangeRound = function(c) {
629
+ return t = Array.from(c), r = st, h();
630
+ }, l.clamp = function(c) {
631
+ return arguments.length ? (u = c ? !0 : T, h()) : u !== T;
632
+ }, l.interpolate = function(c) {
633
+ return arguments.length ? (r = c, h()) : r;
634
+ }, l.unknown = function(c) {
635
+ return arguments.length ? (a = c, l) : a;
636
+ }, function(c, d) {
637
+ return e = c, i = d, h();
638
+ };
639
+ }
640
+ function zt() {
641
+ return Pt()(T, T);
642
+ }
643
+ function Et(n, t, r, e) {
644
+ var i = Wn(n, t, r), a;
645
+ switch (e = X(e ?? ",f"), e.type) {
646
+ case "s": {
647
+ var u = Math.max(Math.abs(n), Math.abs(t));
648
+ return e.precision == null && !isNaN(a = wt(i, u)) && (e.precision = a), bn(e, u);
649
+ }
650
+ case "":
651
+ case "e":
652
+ case "g":
653
+ case "p":
654
+ case "r": {
655
+ e.precision == null && !isNaN(a = $t(i, Math.max(Math.abs(n), Math.abs(t)))) && (e.precision = a - (e.type === "e"));
656
+ break;
657
+ }
658
+ case "f":
659
+ case "%": {
660
+ e.precision == null && !isNaN(a = kt(i)) && (e.precision = a - (e.type === "%") * 2);
661
+ break;
662
+ }
663
+ }
664
+ return vn(e);
665
+ }
666
+ function Ft(n) {
667
+ var t = n.domain;
668
+ return n.ticks = function(r) {
669
+ var e = t();
670
+ return Gn(e[0], e[e.length - 1], r ?? 10);
671
+ }, n.tickFormat = function(r, e) {
672
+ var i = t();
673
+ return Et(i[0], i[i.length - 1], r ?? 10, e);
674
+ }, n.nice = function(r) {
675
+ r == null && (r = 10);
676
+ var e = t(), i = 0, a = e.length - 1, u = e[i], f = e[a], s, o, h = 10;
677
+ for (f < u && (o = u, u = f, f = o, o = i, i = a, a = o); h-- > 0; ) {
678
+ if (o = Y(u, f, r), o === s)
679
+ return e[i] = u, e[a] = f, t(e);
680
+ if (o > 0)
681
+ u = Math.floor(u / o) * o, f = Math.ceil(f / o) * o;
682
+ else if (o < 0)
683
+ u = Math.ceil(u * o) / o, f = Math.floor(f * o) / o;
684
+ else
685
+ break;
686
+ s = o;
687
+ }
688
+ return n;
689
+ }, n;
690
+ }
691
+ function B() {
692
+ var n = zt();
693
+ return n.copy = function() {
694
+ return St(n, B());
695
+ }, en.apply(n, arguments), Ft(n);
696
+ }
697
+ function j(n) {
698
+ return function() {
699
+ return n;
700
+ };
701
+ }
702
+ function jt(n) {
703
+ let t = 3;
704
+ return n.digits = function(r) {
705
+ if (!arguments.length)
706
+ return t;
707
+ if (r == null)
708
+ t = null;
709
+ else {
710
+ const e = Math.floor(r);
711
+ if (!(e >= 0))
712
+ throw new RangeError(`invalid digits: ${r}`);
713
+ t = e;
714
+ }
715
+ return n;
716
+ }, () => new lt(t);
717
+ }
718
+ function Tt(n) {
719
+ return typeof n == "object" && "length" in n ? n : Array.from(n);
720
+ }
721
+ function Sn(n) {
722
+ this._context = n;
723
+ }
724
+ Sn.prototype = {
725
+ areaStart: function() {
726
+ this._line = 0;
727
+ },
728
+ areaEnd: function() {
729
+ this._line = NaN;
730
+ },
731
+ lineStart: function() {
732
+ this._point = 0;
733
+ },
734
+ lineEnd: function() {
735
+ (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
736
+ },
737
+ point: function(n, t) {
738
+ switch (n = +n, t = +t, this._point) {
739
+ case 0:
740
+ this._point = 1, this._line ? this._context.lineTo(n, t) : this._context.moveTo(n, t);
741
+ break;
742
+ case 1:
743
+ this._point = 2;
744
+ default:
745
+ this._context.lineTo(n, t);
746
+ break;
747
+ }
748
+ }
749
+ };
750
+ function It(n) {
751
+ return new Sn(n);
752
+ }
753
+ function Lt(n) {
754
+ return n[0];
755
+ }
756
+ function Ct(n) {
757
+ return n[1];
758
+ }
759
+ function Rt(n, t) {
760
+ var r = j(!0), e = null, i = It, a = null, u = jt(f);
761
+ n = typeof n == "function" ? n : n === void 0 ? Lt : j(n), t = typeof t == "function" ? t : t === void 0 ? Ct : j(t);
762
+ function f(s) {
763
+ var o, h = (s = Tt(s)).length, l, c = !1, d;
764
+ for (e == null && (a = i(d = u())), o = 0; o <= h; ++o)
765
+ !(o < h && r(l = s[o], o, s)) === c && ((c = !c) ? a.lineStart() : a.lineEnd()), c && a.point(+n(l, o, s), +t(l, o, s));
766
+ if (d)
767
+ return a = null, d + "" || null;
768
+ }
769
+ return f.x = function(s) {
770
+ return arguments.length ? (n = typeof s == "function" ? s : j(+s), f) : n;
771
+ }, f.y = function(s) {
772
+ return arguments.length ? (t = typeof s == "function" ? s : j(+s), f) : t;
773
+ }, f.defined = function(s) {
774
+ return arguments.length ? (r = typeof s == "function" ? s : j(!!s), f) : r;
775
+ }, f.curve = function(s) {
776
+ return arguments.length ? (i = s, e != null && (a = i(e)), f) : i;
777
+ }, f.context = function(s) {
778
+ return arguments.length ? (s == null ? e = a = null : a = i(e = s), f) : e;
779
+ }, f;
780
+ }
781
+ const Vt = /* @__PURE__ */ jn("svg", null, null, -1), Ot = [
782
+ Vt
783
+ ];
784
+ let qt = 0;
785
+ const Ht = /* @__PURE__ */ Pn({
786
+ name: "TChartLine",
787
+ __name: "ChartLine",
788
+ props: {
789
+ data: {},
790
+ options: { default: () => ({ scatterplot: !0 }) }
791
+ },
792
+ setup(n) {
793
+ const t = n, r = `tamandua-chart-line-${++qt}`, e = () => {
794
+ const i = parseInt(
795
+ un(`div#${r}`).style("width"),
796
+ 10
797
+ ), a = { top: 10, right: 10, bottom: 30, left: 50 }, u = i, f = 400, s = u - a.left - a.right, o = f - a.top - a.bottom, h = un(`div#${r} svg`).attr("width", u).attr("height", f).append("g").attr("transform", `translate(${a.left},${a.top})`), l = Nn().domain(t.data.labels).range([0, s]), c = Yn(t.data.datasets.flatMap((p) => p.data)) ?? 0, d = B().domain([0, c]).range([o, 0]);
798
+ t.options.grid && (h.append("g").attr("class", "axis-grid").attr("transform", `translate(0,${o})`).call(
799
+ ln(B().range([0, s])).tickSize(-o).tickFormat("").ticks(10)
800
+ ), h.append("g").attr("class", "axis-grid").call(
801
+ hn(B().range([o, 0])).tickSize(-s).tickFormat("").ticks(5)
802
+ ));
803
+ const g = l.bandwidth() / 2, x = Rt().x((p, M) => (l(t.data.labels[M]) ?? 0) + g).y((p) => d(p));
804
+ t.data.datasets.forEach((p) => {
805
+ h.append("path").datum(p.data).attr("fill", "none").attr("stroke", p.color).attr("stroke-width", 2).attr("d", x);
806
+ }), h.append("g").attr("transform", `translate(0,${o})`).call(ln(l)), h.append("g").call(hn(d)), t.options.scatterplot && t.data.datasets.map((p) => {
807
+ const M = Array.from(t.data.labels).map((_, k) => ({
808
+ label: _,
809
+ value: p.data[k]
810
+ }));
811
+ h.append("g").selectAll("dot").data(M).enter().append("circle").attr("cx", (_) => l(_.label) + g).attr("cy", (_) => d(_.value)).attr("r", 3).attr("fill", p.color);
812
+ });
813
+ };
814
+ return zn(() => {
815
+ e();
816
+ }), (i, a) => (En(), Fn("div", {
817
+ id: r,
818
+ class: "w-full"
819
+ }, Ot));
820
+ }
821
+ });
822
+ export {
823
+ Ht as _
824
+ };