@selectwin/kit 0.1.23 → 0.1.25

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.
package/dist/index.js CHANGED
@@ -28,54 +28,54 @@ function Ks({ className: t, theme: n, glowTarget: l }) {
28
28
  if (!s) return;
29
29
  const a = s.getContext("2d");
30
30
  if (!a) return;
31
- const r = ((Q = window.matchMedia) == null ? void 0 : Q.call(window, "(prefers-reduced-motion: reduce)").matches) ?? !1, d = n === "dark", o = 30, i = 1.2, h = 160, u = 8, f = 2.9, g = 0.32, v = 1.4, y = 18, x = Math.PI * 2, $ = getComputedStyle(s), [_, p, b] = Cl($, "--select-dot", d ? [235, 238, 255] : [64, 68, 92]), [w, k, M] = Ll($.getPropertyValue("--select-primary"), d ? [255, 255, 255] : [33, 37, 41]);
32
- let S = 0, N = 0, C = [], L = 0, E = 0, A = null, F = 0;
31
+ const r = ((Q = window.matchMedia) == null ? void 0 : Q.call(window, "(prefers-reduced-motion: reduce)").matches) ?? !1, d = n === "dark", o = 30, i = 1.2, h = 160, u = 8, f = 2.9, g = 0.32, v = 1.4, y = 18, x = Math.PI * 2, $ = getComputedStyle(s), [_, p, b] = Cl($, "--select-dot", d ? [235, 238, 255] : [64, 68, 92]), [S, k, M] = Ll($.getPropertyValue("--select-primary"), d ? [255, 255, 255] : [33, 37, 41]);
32
+ let w = 0, N = 0, C = [], L = 0, E = 0, A = null, F = 0;
33
33
  const B = { x: 0, y: 0 };
34
- let W = 0, P = 0, O = -10;
35
- const T = Me.quickTo(B, "x", { duration: 0.5, ease: "power3.out" }), Z = Me.quickTo(B, "y", { duration: 0.5, ease: "power3.out" });
34
+ let T = 0, I = 0, O = -10;
35
+ const W = Me.quickTo(B, "x", { duration: 0.5, ease: "power3.out" }), Z = Me.quickTo(B, "y", { duration: 0.5, ease: "power3.out" });
36
36
  function G() {
37
37
  const z = s.getBoundingClientRect();
38
- L = z.left, E = z.top, S = z.width, N = z.height;
38
+ L = z.left, E = z.top, w = z.width, N = z.height;
39
39
  const ue = Math.min(window.devicePixelRatio || 1, 2);
40
- s.width = Math.round(S * ue), s.height = Math.round(N * ue), a.setTransform(ue, 0, 0, ue, 0, 0);
40
+ s.width = Math.round(w * ue), s.height = Math.round(N * ue), a.setTransform(ue, 0, 0, ue, 0, 0);
41
41
  const ie = s.closest(".select-auth") ?? document;
42
42
  A = l ? ie.querySelector(l) : null, C = [];
43
- const he = Math.ceil(S / o) + 1, de = Math.ceil(N / o) + 1, ae = (S - (he - 1) * o) / 2, $e = (N - (de - 1) * o) / 2;
43
+ const he = Math.ceil(w / o) + 1, de = Math.ceil(N / o) + 1, ae = (w - (he - 1) * o) / 2, $e = (N - (de - 1) * o) / 2;
44
44
  for (let Ce = 0; Ce < de; Ce++)
45
45
  for (let Le = 0; Le < he; Le++) {
46
46
  const Ne = ae + Le * o, Ie = $e + Ce * o;
47
47
  C.push({ x: Ne, y: Ie, phase: (Ne + Ie) * 0.013 });
48
48
  }
49
- B.x === 0 && B.y === 0 && (B.x = W = S / 2, B.y = P = N / 2);
49
+ B.x === 0 && B.y === 0 && (B.x = T = w / 2, B.y = I = N / 2);
50
50
  }
51
51
  function J(z, ue, ie, he, de) {
52
52
  if (!A) return;
53
53
  const ae = A.getBoundingClientRect(), $e = ae.left - L + ae.width / 2, Ce = ae.top - E + ae.height / 2, Le = ae.width / 2, Ne = ae.height / 2, Ie = (z - $e) / (Le + y), ke = (ue - Ce) / (Ne + y), Ue = Math.sqrt(Ie * Ie + ke * ke), je = Ue < 1 ? 1 - Ue : 0, Fe = je * je * (3 - 2 * je);
54
54
  if (Fe > 1e-3 || F > 1e-3) {
55
- const I = on((z - $e) / Math.max(Le, 1), -1, 1) * 10 * Fe, V = on((ue - Ce) / Math.max(Ne, 1), -1, 1) * 10 * Fe;
56
- A.style.setProperty("--select-card-glow", Fe.toFixed(3)), A.style.setProperty("--select-card-glow-rgb", `${ie}, ${he}, ${de}`), A.style.setProperty("--select-card-glow-x", `${I.toFixed(1)}px`), A.style.setProperty("--select-card-glow-y", `${V.toFixed(1)}px`);
55
+ const P = on((z - $e) / Math.max(Le, 1), -1, 1) * 10 * Fe, V = on((ue - Ce) / Math.max(Ne, 1), -1, 1) * 10 * Fe;
56
+ A.style.setProperty("--select-card-glow", Fe.toFixed(3)), A.style.setProperty("--select-card-glow-rgb", `${ie}, ${he}, ${de}`), A.style.setProperty("--select-card-glow-x", `${P.toFixed(1)}px`), A.style.setProperty("--select-card-glow-y", `${V.toFixed(1)}px`);
57
57
  }
58
58
  F = Fe;
59
59
  }
60
60
  function re() {
61
- a.clearRect(0, 0, S, N), a.fillStyle = `rgba(${_},${p},${b},${g})`;
61
+ a.clearRect(0, 0, w, N), a.fillStyle = `rgba(${_},${p},${b},${g})`;
62
62
  for (const z of C)
63
63
  a.beginPath(), a.arc(z.x, z.y, i, 0, x), a.fill();
64
64
  A == null || A.style.setProperty("--select-card-glow", "0");
65
65
  }
66
66
  function me(z) {
67
67
  let ue, ie;
68
- z - O < v ? (ue = W, ie = P) : (ue = S * 0.5 + Math.cos(z * 0.45) * S * 0.3, ie = N * 0.5 + Math.sin(z * 0.6) * N * 0.28), T(ue), Z(ie);
68
+ z - O < v ? (ue = T, ie = I) : (ue = w * 0.5 + Math.cos(z * 0.45) * w * 0.3, ie = N * 0.5 + Math.sin(z * 0.6) * N * 0.28), W(ue), Z(ie);
69
69
  const he = B.x, de = B.y;
70
- a.clearRect(0, 0, S, N);
70
+ a.clearRect(0, 0, w, N);
71
71
  for (let ae = 0; ae < C.length; ae++) {
72
- const $e = C[ae], Ce = $e.x - he, Le = $e.y - de, Ne = Math.sqrt(Ce * Ce + Le * Le), Ie = Ne < h ? 1 - Ne / h : 0, ke = Ie * Ie, Ue = Math.sin(z * 1.4 + $e.phase) * 0.5 + 0.5, je = ke * u, Fe = Ne > 1e-4 ? 1 / Ne : 0, I = $e.x - Ce * Fe * je, V = $e.y - Le * Fe * je, U = 1 + ke * (f - 1) + Ue * 0.14, oe = Math.min(1, g + Ue * 0.08 + ke * (1 - g)), ee = _ + (w - _) * ke | 0, se = p + (k - p) * ke | 0, pe = b + (M - b) * ke | 0;
73
- ke > 0.12 ? (a.shadowColor = `rgba(${w},${k},${M},${0.6 * ke})`, a.shadowBlur = 12 * ke) : a.shadowBlur = 0, a.beginPath(), a.arc(I, V, i * U, 0, x), a.fillStyle = `rgba(${ee},${se},${pe},${oe})`, a.fill();
72
+ const $e = C[ae], Ce = $e.x - he, Le = $e.y - de, Ne = Math.sqrt(Ce * Ce + Le * Le), Ie = Ne < h ? 1 - Ne / h : 0, ke = Ie * Ie, Ue = Math.sin(z * 1.4 + $e.phase) * 0.5 + 0.5, je = ke * u, Fe = Ne > 1e-4 ? 1 / Ne : 0, P = $e.x - Ce * Fe * je, V = $e.y - Le * Fe * je, U = 1 + ke * (f - 1) + Ue * 0.14, oe = Math.min(1, g + Ue * 0.08 + ke * (1 - g)), ee = _ + (S - _) * ke | 0, se = p + (k - p) * ke | 0, pe = b + (M - b) * ke | 0;
73
+ ke > 0.12 ? (a.shadowColor = `rgba(${S},${k},${M},${0.6 * ke})`, a.shadowBlur = 12 * ke) : a.shadowBlur = 0, a.beginPath(), a.arc(P, V, i * U, 0, x), a.fillStyle = `rgba(${ee},${se},${pe},${oe})`, a.fill();
74
74
  }
75
- a.shadowBlur = 0, J(he, de, w, k, M);
75
+ a.shadowBlur = 0, J(he, de, S, k, M);
76
76
  }
77
77
  function Se(z) {
78
- W = z.clientX - L, P = z.clientY - E, O = Me.ticker.time;
78
+ T = z.clientX - L, I = z.clientY - E, O = Me.ticker.time;
79
79
  }
80
80
  function ne() {
81
81
  const z = s.getBoundingClientRect();
@@ -120,12 +120,12 @@ const El = (t) => {
120
120
  }
121
121
  }
122
122
  function h(u, f) {
123
- const { ctx: g, pointer: v } = t, [y, x, $] = t.ink, [_, p, b] = t.accent, w = t.w(), k = t.h();
124
- g.clearRect(0, 0, w, k);
125
- const M = v.x, S = v.y;
123
+ const { ctx: g, pointer: v } = t, [y, x, $] = t.ink, [_, p, b] = t.accent, S = t.w(), k = t.h();
124
+ g.clearRect(0, 0, S, k);
125
+ const M = v.x, w = v.y;
126
126
  for (const N of d) {
127
- const C = N.x - M, L = N.y - S, E = Math.hypot(C, L), A = f > 0 && E < 150 ? 1 - E / 150 : 0, F = A * A * f, B = Math.sin(u * 1.1 + N.phase) * 0.5 + 0.5, W = F * 6, P = E > 1e-3 ? 1 / E : 0, O = N.x - C * P * W, T = N.y - L * P * W, Z = 1 + F * (2.4 - 1) + B * 0.1, G = Math.min(1, 0.3 + B * 0.06 + F * (1 - 0.3)), J = y + (_ - y) * F | 0, re = x + (p - x) * F | 0, me = $ + (b - $) * F | 0;
128
- t.dark && F > 0.14 ? (g.shadowColor = `rgba(${_},${p},${b},${0.5 * F})`, g.shadowBlur = 10 * F) : g.shadowBlur = 0, g.beginPath(), g.arc(O, T, 1.2 * Z, 0, tt), g.fillStyle = `rgba(${J},${re},${me},${G})`, g.fill();
127
+ const C = N.x - M, L = N.y - w, E = Math.hypot(C, L), A = f > 0 && E < 150 ? 1 - E / 150 : 0, F = A * A * f, B = Math.sin(u * 1.1 + N.phase) * 0.5 + 0.5, T = F * 6, I = E > 1e-3 ? 1 / E : 0, O = N.x - C * I * T, W = N.y - L * I * T, Z = 1 + F * (2.4 - 1) + B * 0.1, G = Math.min(1, 0.3 + B * 0.06 + F * (1 - 0.3)), J = y + (_ - y) * F | 0, re = x + (p - x) * F | 0, me = $ + (b - $) * F | 0;
128
+ t.dark && F > 0.14 ? (g.shadowColor = `rgba(${_},${p},${b},${0.5 * F})`, g.shadowBlur = 10 * F) : g.shadowBlur = 0, g.beginPath(), g.arc(O, W, 1.2 * Z, 0, tt), g.fillStyle = `rgba(${J},${re},${me},${G})`, g.fill();
129
129
  }
130
130
  g.shadowBlur = 0;
131
131
  }
@@ -155,8 +155,8 @@ const El = (t) => {
155
155
  i.lineWidth = 1;
156
156
  for (let p = 0; p < a.length; p++) {
157
157
  const b = a[p];
158
- for (let w = p + 1; w < a.length; w++) {
159
- const k = a[w], M = b.x - k.x, S = b.y - k.y, N = M * M + S * S;
158
+ for (let S = p + 1; S < a.length; S++) {
159
+ const k = a[S], M = b.x - k.x, w = b.y - k.y, N = M * M + w * w;
160
160
  if (N < 132 * 132) {
161
161
  const C = 1 - Math.sqrt(N) / 132;
162
162
  i.strokeStyle = `rgba(${u},${f},${g},${(C * C * 0.5).toFixed(3)})`, i.beginPath(), i.moveTo(b.x, b.y), i.lineTo(k.x, k.y), i.stroke();
@@ -167,11 +167,11 @@ const El = (t) => {
167
167
  for (const p of a) {
168
168
  let b = 0;
169
169
  if (o) {
170
- const S = Math.hypot(p.x - $, p.y - _);
171
- S < 175 && (b = 1 - S / 175, i.strokeStyle = `rgba(${v},${y},${x},${(b * b * 0.5).toFixed(3)})`, i.beginPath(), i.moveTo($, _), i.lineTo(p.x, p.y), i.stroke());
170
+ const w = Math.hypot(p.x - $, p.y - _);
171
+ w < 175 && (b = 1 - w / 175, i.strokeStyle = `rgba(${v},${y},${x},${(b * b * 0.5).toFixed(3)})`, i.beginPath(), i.moveTo($, _), i.lineTo(p.x, p.y), i.stroke());
172
172
  }
173
- const w = u + (v - u) * b | 0, k = f + (y - f) * b | 0, M = g + (x - g) * b | 0;
174
- t.dark && b > 0.2 ? (i.shadowColor = `rgba(${v},${y},${x},${0.6 * b})`, i.shadowBlur = 10 * b) : i.shadowBlur = 0, i.beginPath(), i.arc(p.x, p.y, 1.4 + b * 2.2, 0, tt), i.fillStyle = `rgba(${w},${k},${M},${0.5 + b * 0.5})`, i.fill();
173
+ const S = u + (v - u) * b | 0, k = f + (y - f) * b | 0, M = g + (x - g) * b | 0;
174
+ t.dark && b > 0.2 ? (i.shadowColor = `rgba(${v},${y},${x},${0.6 * b})`, i.shadowBlur = 10 * b) : i.shadowBlur = 0, i.beginPath(), i.arc(p.x, p.y, 1.4 + b * 2.2, 0, tt), i.fillStyle = `rgba(${S},${k},${M},${0.5 + b * 0.5})`, i.fill();
175
175
  }
176
176
  i.shadowBlur = 0;
177
177
  }
@@ -202,21 +202,21 @@ const El = (t) => {
202
202
  g.moveTo(0, C), g.lineTo(c, C);
203
203
  }
204
204
  g.stroke();
205
- const w = (u * 0.12 % 1 + 1) % 1 * s, k = g.createLinearGradient(0, w - 90, 0, w + 90);
206
- k.addColorStop(0, `rgba(${_},${p},${b},0)`), k.addColorStop(0.5, `rgba(${_},${p},${b},${t.dark ? 0.08 : 0.05})`), k.addColorStop(1, `rgba(${_},${p},${b},0)`), g.fillStyle = k, g.fillRect(0, w - 90, c, 90 * 2), g.strokeStyle = `rgba(${_},${p},${b},0.18)`, g.beginPath(), g.moveTo(0, w), g.lineTo(c, w), g.stroke();
207
- const M = v.x, S = v.y;
205
+ const S = (u * 0.12 % 1 + 1) % 1 * s, k = g.createLinearGradient(0, S - 90, 0, S + 90);
206
+ k.addColorStop(0, `rgba(${_},${p},${b},0)`), k.addColorStop(0.5, `rgba(${_},${p},${b},${t.dark ? 0.08 : 0.05})`), k.addColorStop(1, `rgba(${_},${p},${b},0)`), g.fillStyle = k, g.fillRect(0, S - 90, c, 90 * 2), g.strokeStyle = `rgba(${_},${p},${b},0.18)`, g.beginPath(), g.moveTo(0, S), g.lineTo(c, S), g.stroke();
207
+ const M = v.x, w = v.y;
208
208
  for (let N = 0; N < r; N++) {
209
- const C = o + N * 44, L = 1 - Math.min(1, Math.abs(C - w) / 90), E = L * L * 0.8;
209
+ const C = o + N * 44, L = 1 - Math.min(1, Math.abs(C - S) / 90), E = L * L * 0.8;
210
210
  for (let A = 0; A < a; A++) {
211
211
  const F = d + A * 44;
212
212
  let B = E;
213
213
  if (f) {
214
- const T = Math.hypot(F - M, C - S);
215
- T < 120 && (B = Math.max(B, (1 - T / 120) ** 2));
214
+ const W = Math.hypot(F - M, C - w);
215
+ W < 120 && (B = Math.max(B, (1 - W / 120) ** 2));
216
216
  }
217
217
  if (B < 0.02) continue;
218
- const W = y + (_ - y) * B | 0, P = x + (p - x) * B | 0, O = $ + (b - $) * B | 0;
219
- g.beginPath(), g.arc(F, C, 1 + B * 2.2, 0, tt), g.fillStyle = `rgba(${W},${P},${O},${0.3 + B * 0.6})`, g.fill();
218
+ const T = y + (_ - y) * B | 0, I = x + (p - x) * B | 0, O = $ + (b - $) * B | 0;
219
+ g.beginPath(), g.arc(F, C, 1 + B * 2.2, 0, tt), g.fillStyle = `rgba(${T},${I},${O},${0.3 + B * 0.6})`, g.fill();
220
220
  }
221
221
  }
222
222
  }
@@ -250,21 +250,21 @@ const El = (t) => {
250
250
  const { ctx: u, pointer: f } = t, [g, v, y] = t.ink, [x, $, _] = t.accent;
251
251
  u.clearRect(0, 0, l, c), u.lineCap = "round";
252
252
  const p = f.x, b = f.y;
253
- for (const w of s) {
254
- let k = a(w.x, w.y, i), M = 0;
253
+ for (const S of s) {
254
+ let k = a(S.x, S.y, i), M = 0;
255
255
  if (h) {
256
- const E = w.x - p, A = w.y - b, F = Math.hypot(E, A);
256
+ const E = S.x - p, A = S.y - b, F = Math.hypot(E, A);
257
257
  F < 160 && (M = 1 - F / 160, k = $t(k, Math.atan2(A, E) + Math.PI / 2, M * 0.7));
258
258
  }
259
- const S = 0.9 + M * 0.6;
260
- if (w.x += Math.cos(k) * S, w.y += Math.sin(k) * S, w.hist.push(w.x, w.y), w.hist.length > 9 * 2 && w.hist.splice(0, w.hist.length - 9 * 2), ++w.life > w.max || w.x < -20 || w.x > l + 20 || w.y < -20 || w.y > c + 20) {
261
- r(w);
259
+ const w = 0.9 + M * 0.6;
260
+ if (S.x += Math.cos(k) * w, S.y += Math.sin(k) * w, S.hist.push(S.x, S.y), S.hist.length > 9 * 2 && S.hist.splice(0, S.hist.length - 9 * 2), ++S.life > S.max || S.x < -20 || S.x > l + 20 || S.y < -20 || S.y > c + 20) {
261
+ r(S);
262
262
  continue;
263
263
  }
264
264
  const N = g + (x - g) * M | 0, C = v + ($ - v) * M | 0, L = y + (_ - y) * M | 0;
265
265
  u.strokeStyle = `rgba(${N},${C},${L},${0.16 + M * 0.5})`, u.lineWidth = 1 + M * 0.8, u.beginPath();
266
- for (let E = 0; E < w.hist.length; E += 2) {
267
- const A = w.hist[E], F = w.hist[E + 1];
266
+ for (let E = 0; E < S.hist.length; E += 2) {
267
+ const A = S.hist[E], F = S.hist[E + 1];
268
268
  E === 0 ? u.moveTo(A, F) : u.lineTo(A, F);
269
269
  }
270
270
  u.stroke();
@@ -294,11 +294,11 @@ const El = (t) => {
294
294
  for (let x = 0; x < g; x++) {
295
295
  let $ = Math.floor(Math.random() * i), _ = Math.floor(Math.random() * h);
296
296
  const p = [u + $ * 26, f + _ * 26], b = 3 + Math.floor(Math.random() * 5);
297
- let w = Math.floor(Math.random() * 4);
297
+ let S = Math.floor(Math.random() * 4);
298
298
  for (let C = 0; C < b; C++) {
299
- Math.random() < 0.6 && (w = (w + (Math.random() < 0.5 ? 1 : 3)) % 4);
299
+ Math.random() < 0.6 && (S = (S + (Math.random() < 0.5 ? 1 : 3)) % 4);
300
300
  const L = 1 + Math.floor(Math.random() * 4);
301
- $ = Ye($ + v[w] * L, 0, i), _ = Ye(_ + y[w] * L, 0, h), p.push(u + $ * 26, f + _ * 26);
301
+ $ = Ye($ + v[S] * L, 0, i), _ = Ye(_ + y[S] * L, 0, h), p.push(u + $ * 26, f + _ * 26);
302
302
  }
303
303
  const k = [];
304
304
  let M = 0;
@@ -307,9 +307,9 @@ const El = (t) => {
307
307
  k.push(L), M += L;
308
308
  }
309
309
  if (M < 26) continue;
310
- const S = [], N = 1 + (Math.random() < 0.4 ? 1 : 0);
311
- for (let C = 0; C < N; C++) S.push({ p: Math.random(), sp: 0.1 + Math.random() * 0.16 });
312
- s.push({ pts: p, len: M, seg: k, pulses: S });
310
+ const w = [], N = 1 + (Math.random() < 0.4 ? 1 : 0);
311
+ for (let C = 0; C < N; C++) w.push({ p: Math.random(), sp: 0.1 + Math.random() * 0.16 });
312
+ s.push({ pts: p, len: M, seg: k, pulses: w });
313
313
  }
314
314
  }
315
315
  function r(i, h) {
@@ -332,19 +332,19 @@ const El = (t) => {
332
332
  const { ctx: u, pointer: f } = t, [g, v, y] = t.ink, [x, $, _] = t.accent;
333
333
  u.clearRect(0, 0, l, c), u.lineJoin = "round", u.lineCap = "round";
334
334
  const p = f.x, b = f.y;
335
- for (const w of s) {
335
+ for (const S of s) {
336
336
  let k = 0;
337
337
  if (h) {
338
- const M = Math.hypot(w.pts[0] - p, w.pts[1] - b);
338
+ const M = Math.hypot(S.pts[0] - p, S.pts[1] - b);
339
339
  M < 200 && (k = (1 - M / 200) * 0.6);
340
340
  }
341
- u.strokeStyle = `rgba(${g},${v},${y},${0.12 + k * 0.18})`, u.lineWidth = 1.2, u.beginPath(), u.moveTo(w.pts[0], w.pts[1]);
342
- for (let M = 2; M < w.pts.length; M += 2) u.lineTo(w.pts[M], w.pts[M + 1]);
343
- u.stroke(), d(w.pts[0], w.pts[1], g, v, y, k), d(w.pts[w.pts.length - 2], w.pts[w.pts.length - 1], g, v, y, k);
344
- for (const M of w.pulses) {
341
+ u.strokeStyle = `rgba(${g},${v},${y},${0.12 + k * 0.18})`, u.lineWidth = 1.2, u.beginPath(), u.moveTo(S.pts[0], S.pts[1]);
342
+ for (let M = 2; M < S.pts.length; M += 2) u.lineTo(S.pts[M], S.pts[M + 1]);
343
+ u.stroke(), d(S.pts[0], S.pts[1], g, v, y, k), d(S.pts[S.pts.length - 2], S.pts[S.pts.length - 1], g, v, y, k);
344
+ for (const M of S.pulses) {
345
345
  M.p += M.sp * i, M.p > 1 && (M.p -= 1);
346
- const [S, N] = r(w, M.p);
347
- t.dark && (u.shadowColor = `rgba(${x},${$},${_},0.85)`, u.shadowBlur = 10), u.beginPath(), u.arc(S, N, 2.1, 0, tt), u.fillStyle = `rgba(${x},${$},${_},0.95)`, u.fill(), u.shadowBlur = 0;
346
+ const [w, N] = r(S, M.p);
347
+ t.dark && (u.shadowColor = `rgba(${x},${$},${_},0.85)`, u.shadowBlur = 10), u.beginPath(), u.arc(w, N, 2.1, 0, tt), u.fillStyle = `rgba(${x},${$},${_},0.95)`, u.fill(), u.shadowBlur = 0;
348
348
  }
349
349
  }
350
350
  }
@@ -380,8 +380,8 @@ function Qs({
380
380
  const d = ((Z = window.matchMedia) == null ? void 0 : Z.call(window, "(prefers-reduced-motion: reduce)").matches) ?? !1, o = n === "dark", i = getComputedStyle(a), h = Al(i, "--select-dot", o ? [235, 238, 255] : [64, 68, 92]), u = Fl(i.getPropertyValue("--select-primary"), o ? [255, 255, 255] : [33, 37, 41]);
381
381
  let f = 0, g = 0, v = 0, y = 0, x = null, $ = 0;
382
382
  const _ = 1.2, p = { x: 0, y: 0 }, b = { x: 0, y: 0, active: !1 };
383
- let w = 0, k = 0, M = -10;
384
- const S = Me.quickTo(p, "x", { duration: 0.5, ease: "power3.out" }), N = Me.quickTo(p, "y", { duration: 0.5, ease: "power3.out" });
383
+ let S = 0, k = 0, M = -10;
384
+ const w = Me.quickTo(p, "x", { duration: 0.5, ease: "power3.out" }), N = Me.quickTo(p, "y", { duration: 0.5, ease: "power3.out" });
385
385
  function C(G, J) {
386
386
  if (!x) return;
387
387
  const re = x.getBoundingClientRect(), me = re.left - v + re.width / 2, Se = re.top - y + re.height / 2, ne = re.width / 2, H = re.height / 2, Q = 18, z = (G - me) / (ne + Q), ue = (J - Se) / (H + Q), ie = Math.sqrt(z * z + ue * ue), he = ie < 1 ? 1 - ie : 0, de = he * he * (3 - 2 * he);
@@ -401,26 +401,26 @@ function Qs({
401
401
  const J = Math.min(window.devicePixelRatio || 1, 2);
402
402
  a.width = Math.round(f * J), a.height = Math.round(g * J), r.setTransform(J, 0, 0, J, 0, 0);
403
403
  const re = a.closest(".select-auth") ?? document;
404
- x = l ? re.querySelector(l) : null, p.x === 0 && p.y === 0 && (p.x = w = f / 2, p.y = k = g / 2), A.build();
404
+ x = l ? re.querySelector(l) : null, p.x === 0 && p.y === 0 && (p.x = S = f / 2, p.y = k = g / 2), A.build();
405
405
  }
406
406
  let B = -1;
407
- function W(G) {
407
+ function T(G) {
408
408
  const J = B < 0 ? 0 : Math.min(G - B, 0.05);
409
- B = G, b.active = G - M < _, S(b.active ? w : f / 2), N(b.active ? k : g / 2), b.x = p.x, b.y = p.y, A.frame(G, J);
409
+ B = G, b.active = G - M < _, w(b.active ? S : f / 2), N(b.active ? k : g / 2), b.x = p.x, b.y = p.y, A.frame(G, J);
410
410
  }
411
- function P(G) {
412
- w = G.clientX - v, k = G.clientY - y, M = Me.ticker.time;
411
+ function I(G) {
412
+ S = G.clientX - v, k = G.clientY - y, M = Me.ticker.time;
413
413
  }
414
414
  function O() {
415
415
  const G = a.getBoundingClientRect();
416
416
  v = G.left, y = G.top;
417
417
  }
418
418
  F();
419
- const T = new ResizeObserver(() => {
419
+ const W = new ResizeObserver(() => {
420
420
  F(), d && A.paintStatic();
421
421
  });
422
- return T.observe(a), d ? (A.paintStatic(), () => T.disconnect()) : (window.addEventListener("pointermove", P, { passive: !0 }), window.addEventListener("scroll", O, { passive: !0 }), Me.ticker.add(W), () => {
423
- Me.ticker.remove(W), Me.killTweensOf(p), window.removeEventListener("pointermove", P), window.removeEventListener("scroll", O), T.disconnect(), x == null || x.style.removeProperty("--select-card-glow");
422
+ return W.observe(a), d ? (A.paintStatic(), () => W.disconnect()) : (window.addEventListener("pointermove", I, { passive: !0 }), window.addEventListener("scroll", O, { passive: !0 }), Me.ticker.add(T), () => {
423
+ Me.ticker.remove(T), Me.killTweensOf(p), window.removeEventListener("pointermove", I), window.removeEventListener("scroll", O), W.disconnect(), x == null || x.style.removeProperty("--select-card-glow");
424
424
  });
425
425
  }, [n, l, c]), /* @__PURE__ */ e("canvas", { ref: s, className: t, "aria-hidden": "true" });
426
426
  }
@@ -453,11 +453,11 @@ const ea = R(function({ title: n, subtitle: l, logo: c, mark: s, children: a, fo
453
453
  const [g, v] = D([]), y = q(0), x = (_) => {
454
454
  var k;
455
455
  if (i == null || i(_), o || s || typeof window < "u" && ((k = window.matchMedia) != null && k.call(window, "(prefers-reduced-motion: reduce)").matches)) return;
456
- const p = _.currentTarget.getBoundingClientRect(), b = Math.max(p.width, p.height) * 2, w = y.current++;
456
+ const p = _.currentTarget.getBoundingClientRect(), b = Math.max(p.width, p.height) * 2, S = y.current++;
457
457
  v((M) => [
458
458
  ...M,
459
459
  {
460
- key: w,
460
+ key: S,
461
461
  style: {
462
462
  width: b,
463
463
  height: b,
@@ -866,9 +866,9 @@ const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a,
866
866
  ] }),
867
867
  s
868
868
  ] });
869
- }), We = R(function({ label: n, value: l, onChange: c, type: s = "text", labelAction: a, info: r, description: d, hint: o, error: i, prefix: h, suffix: u, mono: f, autoComplete: g, placeholder: v, required: y, disabled: x, readOnly: $, name: _, id: p, minLength: b, maxLength: w, min: k, max: M, step: S, inputMode: N, autoFocus: C, onBlur: L, onKeyDown: E, size: A = "md", className: F, ...B }, W) {
870
- const P = te(), O = p ?? P, [T, Z] = D(!1), G = s === "password", J = G && T ? "text" : s, re = i ? `${O}-err` : o ? `${O}-hint` : void 0, me = h != null || u != null, Se = s === "number" && !me && !$, ne = l === "" ? null : Number(l), H = (ie) => {
871
- const he = Number(S ?? 1) || 1;
869
+ }), We = R(function({ label: n, value: l, onChange: c, type: s = "text", labelAction: a, info: r, description: d, hint: o, error: i, prefix: h, suffix: u, mono: f, autoComplete: g, placeholder: v, required: y, disabled: x, readOnly: $, name: _, id: p, minLength: b, maxLength: S, min: k, max: M, step: w, inputMode: N, autoFocus: C, onBlur: L, onKeyDown: E, size: A = "md", className: F, ...B }, T) {
870
+ const I = te(), O = p ?? I, [W, Z] = D(!1), G = s === "password", J = G && W ? "text" : s, re = i ? `${O}-err` : o ? `${O}-hint` : void 0, me = h != null || u != null, Se = s === "number" && !me && !$, ne = l === "" ? null : Number(l), H = (ie) => {
871
+ const he = Number(w ?? 1) || 1;
872
872
  let ae = (ne != null && Number.isFinite(ne) ? ne : 0) + ie * he;
873
873
  k != null && (ae = Math.max(Number(k), ae)), M != null && (ae = Math.min(Number(M), ae)), c(String(ae));
874
874
  }, Q = k != null && ne != null && ne <= Number(k), z = M != null && ne != null && ne >= Number(M), ue = /* @__PURE__ */ e(
@@ -888,17 +888,17 @@ const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a,
888
888
  readOnly: $,
889
889
  name: _,
890
890
  minLength: b,
891
- maxLength: w,
891
+ maxLength: S,
892
892
  min: k,
893
893
  max: M,
894
- step: S,
894
+ step: w,
895
895
  inputMode: N,
896
896
  autoFocus: C,
897
897
  "aria-invalid": i ? !0 : void 0,
898
898
  "aria-describedby": re
899
899
  }
900
900
  );
901
- return /* @__PURE__ */ m("div", { ref: W, ...B, className: `select-field${A === "sm" ? " select-field--sm" : ""}${F ? " " + F : ""}`, children: [
901
+ return /* @__PURE__ */ m("div", { ref: T, ...B, className: `select-field${A === "sm" ? " select-field--sm" : ""}${F ? " " + F : ""}`, children: [
902
902
  (n || r || a) && /* @__PURE__ */ e(lt, { htmlFor: O, label: n, info: r, action: a }),
903
903
  d && /* @__PURE__ */ e("p", { className: "select-field__desc", children: d }),
904
904
  /* @__PURE__ */ m("div", { className: `select-input-wrap${me ? " select-input-wrap--affixed" : ""}${i ? " select-input-wrap--error" : ""}`, children: [
@@ -911,8 +911,8 @@ const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a,
911
911
  type: "button",
912
912
  className: "select-input__reveal",
913
913
  onClick: () => Z((ie) => !ie),
914
- "aria-label": T ? "Ocultar senha" : "Mostrar senha",
915
- children: T ? /* @__PURE__ */ e(Gn, {}) : /* @__PURE__ */ e(Zn, {})
914
+ "aria-label": W ? "Ocultar senha" : "Mostrar senha",
915
+ children: W ? /* @__PURE__ */ e(Gn, {}) : /* @__PURE__ */ e(Zn, {})
916
916
  }
917
917
  ),
918
918
  Se && /* @__PURE__ */ m("span", { className: "select-stepper", children: [
@@ -963,14 +963,14 @@ const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a,
963
963
  a && /* @__PURE__ */ e("span", { className: "select-checkbox__hint", children: a })
964
964
  ] });
965
965
  }), Wa = R(function({ label: n, value: l, onChange: c, labelAction: s, info: a, description: r, hint: d, error: o, placeholder: i, rows: h = 4, mono: u, name: f, required: g, disabled: v, maxLength: y, onBlur: x, size: $ = "md", className: _, ...p }, b) {
966
- const w = te(), k = o ? `${w}-err` : d ? `${w}-hint` : void 0;
966
+ const S = te(), k = o ? `${S}-err` : d ? `${S}-hint` : void 0;
967
967
  return /* @__PURE__ */ m("div", { ref: b, ...p, className: `select-field${$ === "sm" ? " select-field--sm" : ""}${_ ? " " + _ : ""}`, children: [
968
- (n || a || s) && /* @__PURE__ */ e(lt, { htmlFor: w, label: n, info: a, action: s }),
968
+ (n || a || s) && /* @__PURE__ */ e(lt, { htmlFor: S, label: n, info: a, action: s }),
969
969
  r && /* @__PURE__ */ e("p", { className: "select-field__desc", children: r }),
970
970
  /* @__PURE__ */ e(
971
971
  "textarea",
972
972
  {
973
- id: w,
973
+ id: S,
974
974
  className: `select-input select-textarea${u ? " select-textarea--mono" : ""}${o ? " select-input--error" : ""}`,
975
975
  value: l,
976
976
  onChange: (M) => c(M.target.value),
@@ -985,7 +985,7 @@ const lt = R(function({ htmlFor: n, label: l, info: c, action: s, className: a,
985
985
  "aria-describedby": k
986
986
  }
987
987
  ),
988
- o ? /* @__PURE__ */ e("p", { id: `${w}-err`, className: "select-field__error", children: o }) : d ? /* @__PURE__ */ e("p", { id: `${w}-hint`, className: "select-field__hint", children: d }) : null
988
+ o ? /* @__PURE__ */ e("p", { id: `${S}-err`, className: "select-field__error", children: o }) : d ? /* @__PURE__ */ e("p", { id: `${S}-hint`, className: "select-field__hint", children: d }) : null
989
989
  ] });
990
990
  }), Oa = R(function({ label: n, value: l, onChange: c, unit: s, info: a, hint: r, error: d, placeholder: o = "0", disabled: i = !1, min: h, max: u, className: f, ...g }, v) {
991
991
  const y = te();
@@ -1178,10 +1178,10 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
1178
1178
  onDrop: (C) => {
1179
1179
  C.preventDefault(), g(!1), _(Array.from(C.dataTransfer.files));
1180
1180
  }
1181
- }, w = () => {
1181
+ }, S = () => {
1182
1182
  var C;
1183
1183
  return (C = u.current) == null ? void 0 : C.click();
1184
- }, k = (C) => l(n.filter((L, E) => E !== C)), M = r != null && n.length >= r, S = (a || n.length === 0) && !M, N = n.length > 0;
1184
+ }, k = (C) => l(n.filter((L, E) => E !== C)), M = r != null && n.length >= r, w = (a || n.length === 0) && !M, N = n.length > 0;
1185
1185
  return /* @__PURE__ */ m("div", { ref: h, ...i, className: `select-dropzone-wrap${o ? " " + o : ""}`, children: [
1186
1186
  N && /* @__PURE__ */ m("div", { className: "select-filetile-grid", children: [
1187
1187
  n.map((C, L) => /* @__PURE__ */ e(
@@ -1195,12 +1195,12 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
1195
1195
  },
1196
1196
  `${C.name}-${L}`
1197
1197
  )),
1198
- S && /* @__PURE__ */ m(
1198
+ w && /* @__PURE__ */ m(
1199
1199
  "button",
1200
1200
  {
1201
1201
  type: "button",
1202
1202
  className: `select-dropzone select-dropzone--tile${f ? " is-over" : ""}`,
1203
- onClick: w,
1203
+ onClick: S,
1204
1204
  ...b,
1205
1205
  children: [
1206
1206
  /* @__PURE__ */ e(kt, {}),
@@ -1209,12 +1209,12 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
1209
1209
  }
1210
1210
  )
1211
1211
  ] }),
1212
- !N && S && /* @__PURE__ */ m(
1212
+ !N && w && /* @__PURE__ */ m(
1213
1213
  "button",
1214
1214
  {
1215
1215
  type: "button",
1216
1216
  className: `select-dropzone${f ? " is-over" : ""}`,
1217
- onClick: w,
1217
+ onClick: S,
1218
1218
  ...b,
1219
1219
  children: [
1220
1220
  /* @__PURE__ */ e(kt, {}),
@@ -1289,7 +1289,7 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
1289
1289
  r != null && !f && /* @__PURE__ */ e("p", { className: "select-field__hint", children: r })
1290
1290
  ] });
1291
1291
  }), tc = R(function({ label: n, mode: l = "multiple", files: c, onFilesChange: s, urls: a, onUrlsChange: r, accept: d = ".jpg,.jpeg,.png,.webp", maxSizeMB: o = 3, maxItems: i = 10, maxFiles: h, uploadHint: u, urlPlaceholder: f, helpText: g, className: v, ...y }, x) {
1292
- const $ = l === "single", _ = q(null), [p, b] = D(!1), [w, k] = D(0), [M, S] = D(""), [N, C] = D(null), L = $ ? 1 : Math.max(1, i), E = $ ? 1 : h ?? L, A = c.length + a.length, F = $ ? A === 0 : A < L && c.length < E, B = $ ? A === 0 : A < L, W = A > 0, P = o * 1024 * 1024, O = xe(() => c.map((H) => Kn(H) ? URL.createObjectURL(H) : null), [c]);
1292
+ const $ = l === "single", _ = q(null), [p, b] = D(!1), [S, k] = D(0), [M, w] = D(""), [N, C] = D(null), L = $ ? 1 : Math.max(1, i), E = $ ? 1 : h ?? L, A = c.length + a.length, F = $ ? A === 0 : A < L && c.length < E, B = $ ? A === 0 : A < L, T = A > 0, I = o * 1024 * 1024, O = xe(() => c.map((H) => Kn(H) ? URL.createObjectURL(H) : null), [c]);
1293
1293
  le(
1294
1294
  () => () => {
1295
1295
  O.forEach((H) => {
@@ -1298,8 +1298,8 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
1298
1298
  },
1299
1299
  [O]
1300
1300
  );
1301
- const T = (H) => {
1302
- const Q = H.filter((ie) => ie.size <= P && Xn(ie, d));
1301
+ const W = (H) => {
1302
+ const Q = H.filter((ie) => ie.size <= I && Xn(ie, d));
1303
1303
  if (k(H.length - Q.length), !Q.length) return;
1304
1304
  if ($) {
1305
1305
  r([]), s(Q.slice(0, 1));
@@ -1318,7 +1318,7 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
1318
1318
  C("Essa URL já foi adicionada.");
1319
1319
  return;
1320
1320
  }
1321
- $ ? (s([]), r([H])) : r([...a, H].slice(0, L)), S(""), C(null);
1321
+ $ ? (s([]), r([H])) : r([...a, H].slice(0, L)), w(""), C(null);
1322
1322
  }
1323
1323
  }, G = (H) => {
1324
1324
  H.key === "Enter" && (H.preventDefault(), Z());
@@ -1331,13 +1331,13 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
1331
1331
  },
1332
1332
  onDragLeave: () => b(!1),
1333
1333
  onDrop: (H) => {
1334
- H.preventDefault(), b(!1), T(Array.from(H.dataTransfer.files));
1334
+ H.preventDefault(), b(!1), W(Array.from(H.dataTransfer.files));
1335
1335
  }
1336
1336
  };
1337
1337
  return /* @__PURE__ */ m("div", { ref: x, ...y, className: `select-field select-imageupload${v ? " " + v : ""}`, children: [
1338
1338
  n && /* @__PURE__ */ e("span", { className: "select-field__label", children: n }),
1339
1339
  /* @__PURE__ */ m("div", { className: `select-uploadzone${p ? " is-over" : ""}`, ...ne, children: [
1340
- W ? /* @__PURE__ */ m("div", { className: "select-filetile-grid", children: [
1340
+ T ? /* @__PURE__ */ m("div", { className: "select-filetile-grid", children: [
1341
1341
  c.map((H, Q) => /* @__PURE__ */ e(
1342
1342
  wt,
1343
1343
  {
@@ -1366,7 +1366,7 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
1366
1366
  size: "sm",
1367
1367
  value: M,
1368
1368
  onChange: (H) => {
1369
- S(H), N && C(null);
1369
+ w(H), N && C(null);
1370
1370
  },
1371
1371
  onKeyDown: G,
1372
1372
  type: "url",
@@ -1387,13 +1387,13 @@ const Va = R(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
1387
1387
  multiple: !$,
1388
1388
  hidden: !0,
1389
1389
  onChange: (H) => {
1390
- T(Array.from(H.target.files ?? [])), H.target.value = "";
1390
+ W(Array.from(H.target.files ?? [])), H.target.value = "";
1391
1391
  }
1392
1392
  }
1393
1393
  )
1394
1394
  ] }),
1395
- w > 0 && /* @__PURE__ */ m(ut, { tone: "warning", children: [
1396
- w,
1395
+ S > 0 && /* @__PURE__ */ m(ut, { tone: "warning", children: [
1396
+ S,
1397
1397
  " arquivo(s) ignorado(s): tipo não permitido ou acima de ",
1398
1398
  o,
1399
1399
  " MB."
@@ -1766,8 +1766,8 @@ function Oe({
1766
1766
  var k;
1767
1767
  const _ = ((k = h.current) == null ? void 0 : k.firstElementChild) ?? h.current, p = u.current;
1768
1768
  if (!_ || !p) return;
1769
- const b = _.getBoundingClientRect(), w = ll(b, { width: p.offsetWidth, height: p.offsetHeight }, s, a);
1770
- v({ top: w.top, left: w.left, minWidth: o ? b.width : void 0 });
1769
+ const b = _.getBoundingClientRect(), S = ll(b, { width: p.offsetWidth, height: p.offsetHeight }, s, a);
1770
+ v({ top: S.top, left: S.left, minWidth: o ? b.width : void 0 });
1771
1771
  }, [s, a, o]);
1772
1772
  return Ee(() => {
1773
1773
  if (!t) {
@@ -1799,8 +1799,8 @@ function Oe({
1799
1799
  if (!t) return;
1800
1800
  const _ = (b) => {
1801
1801
  var k, M;
1802
- const w = b.target;
1803
- (k = u.current) != null && k.contains(w) || (M = h.current) != null && M.contains(w) || Qe.length && Qe[Qe.length - 1] !== u.current || n();
1802
+ const S = b.target;
1803
+ (k = u.current) != null && k.contains(S) || (M = h.current) != null && M.contains(S) || Qe.length && Qe[Qe.length - 1] !== u.current || n();
1804
1804
  }, p = (b) => {
1805
1805
  b.key === "Escape" && (b.stopPropagation(), n());
1806
1806
  };
@@ -2385,7 +2385,7 @@ function Ic({ text: t, term: n }) {
2385
2385
  return l ? /* @__PURE__ */ e("pre", { className: "select-json__pre", children: l.map((c, s) => /* @__PURE__ */ e("span", { className: `select-json__v--${c.cls}`, children: /* @__PURE__ */ e(St, { text: c.text, term: n }) }, s)) }) : /* @__PURE__ */ e("pre", { className: "select-json__pre", children: /* @__PURE__ */ e(St, { text: t, term: n }) });
2386
2386
  }
2387
2387
  const n1 = R(function({ value: n, title: l = "Metadados", maxHeight: c = 360, defaultOpen: s = !1, defaultExpandDepth: a = 1, searchable: r = !0, emptyLabel: d = "Sem dados", className: o, ...i }, h) {
2388
- const [u, f] = D(s), [g, v] = D("tree"), [y, x] = D(""), [$, _] = D(/* @__PURE__ */ new Set()), [p, b] = Bc(), w = q(null), k = xe(() => yc(n), [n]), M = Nc(k), S = xe(
2388
+ const [u, f] = D(s), [g, v] = D("tree"), [y, x] = D(""), [$, _] = D(/* @__PURE__ */ new Set()), [p, b] = Bc(), S = q(null), k = xe(() => yc(n), [n]), M = Nc(k), w = xe(
2389
2389
  () => typeof n == "string" && k === n ? n : rl(k),
2390
2390
  [n, k]
2391
2391
  ), N = xe(() => rt(k, () => {
@@ -2393,23 +2393,23 @@ const n1 = R(function({ value: n, title: l = "Metadados", maxHeight: c = 360, de
2393
2393
  le(() => {
2394
2394
  _(N ? /* @__PURE__ */ new Set() : $c(k, a)), x("");
2395
2395
  }, [k, a, N]);
2396
- const E = xe(() => Sc(k, C ? y : ""), [k, y, C]), A = y.trim().length > 0, F = C ? E.count : Ac(S, y);
2396
+ const E = xe(() => Sc(k, C ? y : ""), [k, y, C]), A = y.trim().length > 0, F = C ? E.count : Ac(w, y);
2397
2397
  le(() => {
2398
2398
  var Z, G;
2399
- !u || !A || (G = (Z = w.current) == null ? void 0 : Z.querySelector(".select-json__hit")) == null || G.scrollIntoView({ block: "nearest" });
2399
+ !u || !A || (G = (Z = S.current) == null ? void 0 : Z.querySelector(".select-json__hit")) == null || G.scrollIntoView({ block: "nearest" });
2400
2400
  }, [u, A, y, g]);
2401
2401
  const B = Te((Z) => {
2402
2402
  _((G) => {
2403
2403
  const J = new Set(G);
2404
2404
  return J.delete(Z) || J.add(Z), J;
2405
2405
  });
2406
- }, []), W = L.length > 0 && L.every((Z) => $.has(Z)), P = () => _(W ? /* @__PURE__ */ new Set() : new Set(L)), O = { expanded: $, toggle: B, search: y, result: E, copied: p, copy: b }, T = u && !M;
2406
+ }, []), T = L.length > 0 && L.every((Z) => $.has(Z)), I = () => _(T ? /* @__PURE__ */ new Set() : new Set(L)), O = { expanded: $, toggle: B, search: y, result: E, copied: p, copy: b }, W = u && !M;
2407
2407
  return /* @__PURE__ */ m("div", { ref: h, ...i, className: `select-json${o ? " " + o : ""}`, children: [
2408
2408
  /* @__PURE__ */ m("div", { className: "select-json__head", children: [
2409
2409
  /* @__PURE__ */ e(Xe, { as: "h2", variant: "headingSm", children: l }),
2410
- /* @__PURE__ */ e(gc, { open: T, onToggle: () => f((Z) => !Z), openLabel: "Ocultar", disabled: M, children: M ? d : "Mostrar" })
2410
+ /* @__PURE__ */ e(gc, { open: W, onToggle: () => f((Z) => !Z), openLabel: "Ocultar", disabled: M, children: M ? d : "Mostrar" })
2411
2411
  ] }),
2412
- T && /* @__PURE__ */ m("div", { className: "select-json__body", children: [
2412
+ W && /* @__PURE__ */ m("div", { className: "select-json__body", children: [
2413
2413
  /* @__PURE__ */ m("div", { className: "select-json__toolbar", children: [
2414
2414
  r ? /* @__PURE__ */ m(_e, { children: [
2415
2415
  /* @__PURE__ */ e("span", { className: "select-json__searchicon", "aria-hidden": "true", children: /* @__PURE__ */ e(Jt, {}) }),
@@ -2430,10 +2430,10 @@ const n1 = R(function({ value: n, title: l = "Metadados", maxHeight: c = 360, de
2430
2430
  ge,
2431
2431
  {
2432
2432
  icon: /* @__PURE__ */ e(jn, {}),
2433
- label: W ? "Recolher tudo" : "Expandir tudo",
2433
+ label: T ? "Recolher tudo" : "Expandir tudo",
2434
2434
  size: "sm",
2435
- active: W,
2436
- onClick: P
2435
+ active: T,
2436
+ onClick: I
2437
2437
  }
2438
2438
  ),
2439
2439
  /* @__PURE__ */ e(
@@ -2454,18 +2454,18 @@ const n1 = R(function({ value: n, title: l = "Metadados", maxHeight: c = 360, de
2454
2454
  label: p === "all" ? "Copiado!" : "Copiar JSON",
2455
2455
  size: "sm",
2456
2456
  active: p === "all",
2457
- onClick: () => b("all", S)
2457
+ onClick: () => b("all", w)
2458
2458
  }
2459
2459
  )
2460
2460
  ] }),
2461
- /* @__PURE__ */ e("div", { ref: w, className: "select-json__scroll", style: { maxHeight: c }, children: C ? A && E.count === 0 ? /* @__PURE__ */ e("div", { className: "select-json__empty", children: /* @__PURE__ */ m(Xe, { as: "p", tone: "subdued", variant: "bodySm", children: [
2461
+ /* @__PURE__ */ e("div", { ref: S, className: "select-json__scroll", style: { maxHeight: c }, children: C ? A && E.count === 0 ? /* @__PURE__ */ e("div", { className: "select-json__empty", children: /* @__PURE__ */ m(Xe, { as: "p", tone: "subdued", variant: "bodySm", children: [
2462
2462
  "Nenhuma chave ou valor corresponde a “",
2463
2463
  y.trim(),
2464
2464
  "”."
2465
2465
  ] }) }) : /* @__PURE__ */ e("div", { className: "select-json__tree", children: He(k) ? /* @__PURE__ */ e(dl, { value: k, path: "", depth: 0, ancestors: [k], ctx: O }) : /* @__PURE__ */ m("div", { className: "select-json__row", style: { "--json-depth": 0 }, children: [
2466
2466
  /* @__PURE__ */ e("span", { className: "select-json__caret select-json__caret--empty", "aria-hidden": "true" }),
2467
2467
  /* @__PURE__ */ e("span", { className: "select-json__label", children: /* @__PURE__ */ e(il, { value: k, term: y, forceFull: !0 }) })
2468
- ] }) }) : /* @__PURE__ */ e(Ic, { text: S, term: y }) })
2468
+ ] }) }) : /* @__PURE__ */ e(Ic, { text: w, term: y }) })
2469
2469
  ] })
2470
2470
  ] });
2471
2471
  }), Pc = {
@@ -2539,8 +2539,8 @@ function Bt(t = {}) {
2539
2539
  Me.set(y, x);
2540
2540
  const p = new IntersectionObserver(
2541
2541
  (b) => {
2542
- for (const w of b)
2543
- w.isIntersecting && (_(), f && p.unobserve(w.target));
2542
+ for (const S of b)
2543
+ S.isIntersecting && (_(), f && p.unobserve(S.target));
2544
2544
  },
2545
2545
  { threshold: 0 }
2546
2546
  );
@@ -2634,8 +2634,8 @@ const o1 = R(function({ email: n, onSignOut: l, signOutLabel: c = "Sair", prefix
2634
2634
  }, g = (_, p) => {
2635
2635
  const b = u.slice();
2636
2636
  b[_] = p;
2637
- const w = b.join("").slice(0, c);
2638
- return l(w), w;
2637
+ const S = b.join("").slice(0, c);
2638
+ return l(S), S;
2639
2639
  }, v = (_, p) => {
2640
2640
  const b = p.replace(/\D/g, "");
2641
2641
  if (!b) {
@@ -2643,18 +2643,18 @@ const o1 = R(function({ email: n, onSignOut: l, signOutLabel: c = "Sair", prefix
2643
2643
  return;
2644
2644
  }
2645
2645
  if (b.length === 1) {
2646
- const w = g(_, b);
2647
- _ < c - 1 && f(_ + 1), w.length === c && (s == null || s(w));
2646
+ const S = g(_, b);
2647
+ _ < c - 1 && f(_ + 1), S.length === c && (s == null || s(S));
2648
2648
  } else
2649
2649
  y(b, _);
2650
2650
  }, y = (_, p) => {
2651
2651
  const b = u.slice();
2652
2652
  for (let M = 0; M < _.length && p + M < c; M++)
2653
2653
  b[p + M] = _[M] ?? "";
2654
- const w = b.join("").slice(0, c);
2655
- l(w);
2654
+ const S = b.join("").slice(0, c);
2655
+ l(S);
2656
2656
  const k = Math.min(p + _.length, c) - 1;
2657
- f(Math.min(k + 1, c - 1)), w.length === c && (s == null || s(w));
2657
+ f(Math.min(k + 1, c - 1)), S.length === c && (s == null || s(S));
2658
2658
  }, x = (_, p) => {
2659
2659
  p.key === "Backspace" && !u[_] && _ > 0 ? (p.preventDefault(), g(_ - 1, ""), f(_ - 1)) : p.key === "ArrowLeft" && _ > 0 ? (p.preventDefault(), f(_ - 1)) : p.key === "ArrowRight" && _ < c - 1 && (p.preventDefault(), f(_ + 1));
2660
2660
  }, $ = (_, p) => {
@@ -3471,16 +3471,16 @@ const ns = R(function({ page: n, pageCount: l, total: c, pageSize: s, hasPreviou
3471
3471
  }
3472
3472
  ),
3473
3473
  _ ? p.map(
3474
- (w, k) => w === "gap" ? /* @__PURE__ */ e("span", { className: "select-pagination__gap", "aria-hidden": "true", children: "…" }, `gap-${k}`) : /* @__PURE__ */ e(
3474
+ (S, k) => S === "gap" ? /* @__PURE__ */ e("span", { className: "select-pagination__gap", "aria-hidden": "true", children: "…" }, `gap-${k}`) : /* @__PURE__ */ e(
3475
3475
  "button",
3476
3476
  {
3477
3477
  type: "button",
3478
- className: `select-pagination__page${w === n ? " is-active" : ""}`,
3479
- onClick: () => i == null ? void 0 : i(w),
3480
- "aria-current": w === n ? "page" : void 0,
3481
- children: w
3478
+ className: `select-pagination__page${S === n ? " is-active" : ""}`,
3479
+ onClick: () => i == null ? void 0 : i(S),
3480
+ "aria-current": S === n ? "page" : void 0,
3481
+ children: S
3482
3482
  },
3483
- w
3483
+ S
3484
3484
  )
3485
3485
  ) : /* @__PURE__ */ e("span", { className: "select-pagination__current", children: l != null ? `${n} / ${l}` : `Página ${n}` }),
3486
3486
  /* @__PURE__ */ e(
@@ -3550,28 +3550,28 @@ function T1({
3550
3550
  filters: i,
3551
3551
  columnsKey: h
3552
3552
  }) {
3553
- const [u, f] = D(() => h ? ls(h) : []), [g, v] = D(!1), [y, x] = D(!1), $ = xe(() => new Set(u), [u]), _ = t.filter(yn), p = _.length > 0 && _.every((P) => $.has(P.key)), b = (P) => !p && $.has(P.key) && yn(P), w = t.filter((P) => !b(P)), k = _.filter((P) => !b(P)), [M, S] = D(null), N = (P) => {
3553
+ const [u, f] = D(() => h ? ls(h) : []), [g, v] = D(!1), [y, x] = D(!1), $ = xe(() => new Set(u), [u]), _ = t.filter(yn), p = _.length > 0 && _.every((I) => $.has(I.key)), b = (I) => !p && $.has(I.key) && yn(I), S = t.filter((I) => !b(I)), k = _.filter((I) => !b(I)), [M, w] = D(null), N = (I) => {
3554
3554
  f((O) => {
3555
- const T = !O.includes(P.key), Z = T ? [...O, P.key] : O.filter((G) => G !== P.key);
3556
- return h && cs(h, Z), T && S((G) => G && G.key === P.key ? null : G), Z;
3555
+ const W = !O.includes(I.key), Z = W ? [...O, I.key] : O.filter((G) => G !== I.key);
3556
+ return h && cs(h, Z), W && w((G) => G && G.key === I.key ? null : G), Z;
3557
3557
  });
3558
- }, C = (P) => {
3559
- S((O) => {
3560
- const T = P.sortDefault ?? "asc";
3561
- return !O || O.key !== P.key ? { key: P.key, dir: T } : O.dir === T ? { key: P.key, dir: T === "asc" ? "desc" : "asc" } : null;
3558
+ }, C = (I) => {
3559
+ w((O) => {
3560
+ const W = I.sortDefault ?? "asc";
3561
+ return !O || O.key !== I.key ? { key: I.key, dir: W } : O.dir === W ? { key: I.key, dir: W === "asc" ? "desc" : "asc" } : null;
3562
3562
  });
3563
- }, L = M ? t.find((P) => P.key === M.key) : void 0, E = xe(() => {
3564
- const P = L == null ? void 0 : L.sortValue;
3565
- if (!M || !P) return n;
3563
+ }, L = M ? t.find((I) => I.key === M.key) : void 0, E = xe(() => {
3564
+ const I = L == null ? void 0 : L.sortValue;
3565
+ if (!M || !I) return n;
3566
3566
  const O = M.dir === "asc" ? 1 : -1;
3567
- return [...n].sort((T, Z) => ss(P(T), P(Z), O));
3568
- }, [n, M, L]), A = w.map((P) => ({
3569
- label: P.title,
3570
- align: P.align,
3571
- width: P.width,
3572
- sortable: !!P.sortValue,
3573
- sortDir: (M == null ? void 0 : M.key) === P.key ? M.dir : null,
3574
- onSort: P.sortValue ? () => C(P) : void 0
3567
+ return [...n].sort((W, Z) => ss(I(W), I(Z), O));
3568
+ }, [n, M, L]), A = S.map((I) => ({
3569
+ label: I.title,
3570
+ align: I.align,
3571
+ width: I.width,
3572
+ sortable: !!I.sortValue,
3573
+ sortDir: (M == null ? void 0 : M.key) === I.key ? M.dir : null,
3574
+ onSort: I.sortValue ? () => C(I) : void 0
3575
3575
  })), F = !c && s ? /* @__PURE__ */ e(zc, { icon: s.icon, title: s.heading, subtitle: s.text, action: s.action }) : void 0, B = h && _.length > 0 ? /* @__PURE__ */ e(
3576
3576
  Oe,
3577
3577
  {
@@ -3587,26 +3587,26 @@ function T1({
3587
3587
  size: "sm",
3588
3588
  active: g,
3589
3589
  "aria-expanded": g,
3590
- onClick: () => v((P) => !P)
3590
+ onClick: () => v((I) => !I)
3591
3591
  }
3592
3592
  ),
3593
- children: /* @__PURE__ */ e("div", { className: "select-facet__panel", children: /* @__PURE__ */ e("div", { className: "select-facet__options", role: "menu", children: _.map((P) => {
3594
- const O = !b(P), T = O && k.length === 1;
3593
+ children: /* @__PURE__ */ e("div", { className: "select-facet__panel", children: /* @__PURE__ */ e("div", { className: "select-facet__options", role: "menu", children: _.map((I) => {
3594
+ const O = !b(I), W = O && k.length === 1;
3595
3595
  return /* @__PURE__ */ m(
3596
3596
  "button",
3597
3597
  {
3598
3598
  type: "button",
3599
3599
  role: "menuitemcheckbox",
3600
3600
  "aria-checked": O,
3601
- disabled: T,
3601
+ disabled: W,
3602
3602
  className: `select-facet__opt${O ? " is-selected" : ""}`,
3603
- onClick: () => N(P),
3603
+ onClick: () => N(I),
3604
3604
  children: [
3605
- /* @__PURE__ */ e("span", { children: P.title }),
3605
+ /* @__PURE__ */ e("span", { children: I.title }),
3606
3606
  O && /* @__PURE__ */ e("span", { className: "select-facet__check", "aria-hidden": "true", children: /* @__PURE__ */ e(Ae, {}) })
3607
3607
  ]
3608
3608
  },
3609
- P.key
3609
+ I.key
3610
3610
  );
3611
3611
  }) }) })
3612
3612
  }
@@ -3615,7 +3615,7 @@ function T1({
3615
3615
  /* @__PURE__ */ e(Yc, { columns: A, empty: F, title: d, filters: i, action: B ? /* @__PURE__ */ m("span", { className: "select-datatable__toolbar", children: [
3616
3616
  o,
3617
3617
  B
3618
- ] }) : o, children: c ? Array.from({ length: 5 }, (P, O) => /* @__PURE__ */ e(bn, { children: w.map((T, Z) => /* @__PURE__ */ e(xn, { align: T.align, width: T.width, children: /* @__PURE__ */ e("span", { className: "select-skeleton select-datatable__skel" }) }, Z)) }, `skeleton-${O}`)) : E.map((P) => /* @__PURE__ */ e(bn, { onClick: r ? () => r(P) : void 0, children: w.map((O, T) => /* @__PURE__ */ e(xn, { align: O.align, width: O.width, children: O.render(P) }, T)) }, l(P))) }),
3618
+ ] }) : o, children: c ? Array.from({ length: 5 }, (I, O) => /* @__PURE__ */ e(bn, { children: S.map((W, Z) => /* @__PURE__ */ e(xn, { align: W.align, width: W.width, children: /* @__PURE__ */ e("span", { className: "select-skeleton select-datatable__skel" }) }, Z)) }, `skeleton-${O}`)) : E.map((I) => /* @__PURE__ */ e(bn, { onClick: r ? () => r(I) : void 0, children: S.map((O, W) => /* @__PURE__ */ e(xn, { align: O.align, width: O.width, children: O.render(I) }, W)) }, l(I))) }),
3619
3619
  a && /* @__PURE__ */ m("div", { className: "select-datatable__pagination", children: [
3620
3620
  a.pageSizeOptions && a.pageSizeOptions.length > 1 && a.onPageSizeChange && /* @__PURE__ */ e("div", { className: "select-datatable__pagesize", children: /* @__PURE__ */ e(
3621
3621
  Oe,
@@ -3629,7 +3629,7 @@ function T1({
3629
3629
  {
3630
3630
  type: "button",
3631
3631
  className: `select-facet${y ? " is-active" : ""}`,
3632
- onClick: () => x((P) => !P),
3632
+ onClick: () => x((I) => !I),
3633
3633
  "aria-expanded": y,
3634
3634
  "aria-haspopup": "listbox",
3635
3635
  children: [
@@ -3641,8 +3641,8 @@ function T1({
3641
3641
  ]
3642
3642
  }
3643
3643
  ),
3644
- children: /* @__PURE__ */ e("div", { className: "select-facet__panel", children: /* @__PURE__ */ e("div", { className: "select-facet__options", role: "listbox", children: a.pageSizeOptions.map((P) => {
3645
- const O = P === a.pageSize;
3644
+ children: /* @__PURE__ */ e("div", { className: "select-facet__panel", children: /* @__PURE__ */ e("div", { className: "select-facet__options", role: "listbox", children: a.pageSizeOptions.map((I) => {
3645
+ const O = I === a.pageSize;
3646
3646
  return /* @__PURE__ */ m(
3647
3647
  "button",
3648
3648
  {
@@ -3651,18 +3651,18 @@ function T1({
3651
3651
  "aria-selected": O,
3652
3652
  className: `select-facet__opt${O ? " is-selected" : ""}`,
3653
3653
  onClick: () => {
3654
- var T;
3655
- (T = a.onPageSizeChange) == null || T.call(a, P), x(!1);
3654
+ var W;
3655
+ (W = a.onPageSizeChange) == null || W.call(a, I), x(!1);
3656
3656
  },
3657
3657
  children: [
3658
3658
  /* @__PURE__ */ m("span", { children: [
3659
- P,
3659
+ I,
3660
3660
  " por página"
3661
3661
  ] }),
3662
3662
  O && /* @__PURE__ */ e("span", { className: "select-facet__check", "aria-hidden": "true", children: /* @__PURE__ */ e(Ae, {}) })
3663
3663
  ]
3664
3664
  },
3665
- P
3665
+ I
3666
3666
  );
3667
3667
  }) }) })
3668
3668
  }
@@ -3712,16 +3712,16 @@ function is(t, n) {
3712
3712
  return n ? `${l} ${De(t.getHours())}:${De(t.getMinutes())}` : l;
3713
3713
  }
3714
3714
  const ds = R(function({ label: n, value: l, onChange: c, showTime: s = !1, placeholder: a, required: r, disabled: d, error: o, hint: i, minDate: h, maxDate: u, clearable: f = !0, id: g, className: v, ...y }, x) {
3715
- const $ = te(), _ = g ?? $, [p, b] = D(!1), w = rs(l), [k, M] = D(() => vt(w ?? /* @__PURE__ */ new Date())), S = h ? ct(h) : null, N = u ? ct(u) : null, C = (T) => !!S && ct(T) < S || !!N && ct(T) > N, L = Mn(vt(k), -vt(k).getDay()), E = Array.from({ length: 42 }, (T, Z) => Mn(L, Z)), A = ct(/* @__PURE__ */ new Date()), F = () => {
3716
- d || (M(vt(w ?? /* @__PURE__ */ new Date())), b((T) => !T));
3717
- }, B = (T) => {
3718
- if (C(T)) return;
3719
- const Z = new Date(T);
3720
- s && Z.setHours((w == null ? void 0 : w.getHours()) ?? 0, (w == null ? void 0 : w.getMinutes()) ?? 0, 0, 0), c(wn(Z, s)), s || b(!1);
3721
- }, W = (T) => {
3722
- const [Z = "", G = ""] = T.split(":"), J = Number(Z), re = Number(G), me = new Date(w ?? A);
3715
+ const $ = te(), _ = g ?? $, [p, b] = D(!1), S = rs(l), [k, M] = D(() => vt(S ?? /* @__PURE__ */ new Date())), w = h ? ct(h) : null, N = u ? ct(u) : null, C = (W) => !!w && ct(W) < w || !!N && ct(W) > N, L = Mn(vt(k), -vt(k).getDay()), E = Array.from({ length: 42 }, (W, Z) => Mn(L, Z)), A = ct(/* @__PURE__ */ new Date()), F = () => {
3716
+ d || (M(vt(S ?? /* @__PURE__ */ new Date())), b((W) => !W));
3717
+ }, B = (W) => {
3718
+ if (C(W)) return;
3719
+ const Z = new Date(W);
3720
+ s && Z.setHours((S == null ? void 0 : S.getHours()) ?? 0, (S == null ? void 0 : S.getMinutes()) ?? 0, 0, 0), c(wn(Z, s)), s || b(!1);
3721
+ }, T = (W) => {
3722
+ const [Z = "", G = ""] = W.split(":"), J = Number(Z), re = Number(G), me = new Date(S ?? A);
3723
3723
  me.setHours(Number.isFinite(J) ? J : 0, Number.isFinite(re) ? re : 0, 0, 0), c(wn(me, !0));
3724
- }, P = () => {
3724
+ }, I = () => {
3725
3725
  c(""), b(!1);
3726
3726
  }, O = /* @__PURE__ */ m("div", { className: `select-input-wrap${o ? " select-input-wrap--error" : ""}`, children: [
3727
3727
  /* @__PURE__ */ e(
@@ -3735,7 +3735,7 @@ const ds = R(function({ label: n, value: l, onChange: c, showTime: s = !1, place
3735
3735
  "aria-haspopup": "dialog",
3736
3736
  "aria-expanded": p,
3737
3737
  "aria-invalid": o ? !0 : void 0,
3738
- children: w ? is(w, s) : /* @__PURE__ */ e("span", { className: "select-datefield__ph", children: a ?? (s ? "Selecione data e hora" : "Selecione uma data") })
3738
+ children: S ? is(S, s) : /* @__PURE__ */ e("span", { className: "select-datefield__ph", children: a ?? (s ? "Selecione data e hora" : "Selecione uma data") })
3739
3739
  }
3740
3740
  ),
3741
3741
  /* @__PURE__ */ e("span", { className: "select-datefield__icon", "aria-hidden": "true", children: /* @__PURE__ */ e(qn, {}) })
@@ -3744,19 +3744,19 @@ const ds = R(function({ label: n, value: l, onChange: c, showTime: s = !1, place
3744
3744
  n && /* @__PURE__ */ e(lt, { htmlFor: _, label: r ? `${n} *` : n }),
3745
3745
  /* @__PURE__ */ e("div", { className: "select-datefield", children: /* @__PURE__ */ e(Oe, { active: p, onClose: () => b(!1), placement: "bottom-start", role: "dialog", activator: O, children: /* @__PURE__ */ m("div", { className: "select-datefield__pop", children: [
3746
3746
  /* @__PURE__ */ m("div", { className: "select-datepicker__calhead", children: [
3747
- /* @__PURE__ */ e("button", { type: "button", className: "select-datepicker__nav", "aria-label": "Mês anterior", onClick: () => M((T) => $n(T, -1)), children: /* @__PURE__ */ e(Kt, {}) }),
3747
+ /* @__PURE__ */ e("button", { type: "button", className: "select-datepicker__nav", "aria-label": "Mês anterior", onClick: () => M((W) => $n(W, -1)), children: /* @__PURE__ */ e(Kt, {}) }),
3748
3748
  /* @__PURE__ */ m("span", { className: "select-datepicker__monthlabel", children: [
3749
3749
  os[k.getMonth()],
3750
3750
  " ",
3751
3751
  k.getFullYear()
3752
3752
  ] }),
3753
- /* @__PURE__ */ e("button", { type: "button", className: "select-datepicker__nav", "aria-label": "Próximo mês", onClick: () => M((T) => $n(T, 1)), children: /* @__PURE__ */ e(dt, {}) })
3753
+ /* @__PURE__ */ e("button", { type: "button", className: "select-datepicker__nav", "aria-label": "Próximo mês", onClick: () => M((W) => $n(W, 1)), children: /* @__PURE__ */ e(dt, {}) })
3754
3754
  ] }),
3755
3755
  /* @__PURE__ */ m("div", { className: "select-datepicker__grid", role: "grid", children: [
3756
- as.map((T) => /* @__PURE__ */ e("div", { className: "select-datepicker__weekday", children: T }, T)),
3757
- E.map((T) => {
3758
- const Z = T.getMonth() !== k.getMonth(), G = !!w && kn(T, w), J = "select-datepicker__daybtn" + (G ? " is-selected" : "") + (kn(T, A) && !G ? " is-today" : "") + (Z ? " is-outside" : "");
3759
- return /* @__PURE__ */ e("div", { className: "select-datepicker__day", children: /* @__PURE__ */ e("button", { type: "button", className: J, disabled: C(T), onClick: () => B(T), children: T.getDate() }) }, T.getTime());
3756
+ as.map((W) => /* @__PURE__ */ e("div", { className: "select-datepicker__weekday", children: W }, W)),
3757
+ E.map((W) => {
3758
+ const Z = W.getMonth() !== k.getMonth(), G = !!S && kn(W, S), J = "select-datepicker__daybtn" + (G ? " is-selected" : "") + (kn(W, A) && !G ? " is-today" : "") + (Z ? " is-outside" : "");
3759
+ return /* @__PURE__ */ e("div", { className: "select-datepicker__day", children: /* @__PURE__ */ e("button", { type: "button", className: J, disabled: C(W), onClick: () => B(W), children: W.getDate() }) }, W.getTime());
3760
3760
  })
3761
3761
  ] }),
3762
3762
  s && /* @__PURE__ */ m("div", { className: "select-datefield__time", children: [
@@ -3767,13 +3767,13 @@ const ds = R(function({ label: n, value: l, onChange: c, showTime: s = !1, place
3767
3767
  type: "time",
3768
3768
  className: "select-input select-datefield__time-input",
3769
3769
  "aria-label": "Horário",
3770
- value: w ? `${De(w.getHours())}:${De(w.getMinutes())}` : "",
3771
- onChange: (T) => W(T.target.value)
3770
+ value: S ? `${De(S.getHours())}:${De(S.getMinutes())}` : "",
3771
+ onChange: (W) => T(W.target.value)
3772
3772
  }
3773
3773
  )
3774
3774
  ] }),
3775
3775
  /* @__PURE__ */ m("div", { className: "select-datefield__footer", children: [
3776
- f && w ? /* @__PURE__ */ e(ve, { variant: "secondary", inline: !0, onClick: P, children: "Limpar" }) : /* @__PURE__ */ e("span", {}),
3776
+ f && S ? /* @__PURE__ */ e(ve, { variant: "secondary", inline: !0, onClick: I, children: "Limpar" }) : /* @__PURE__ */ e("span", {}),
3777
3777
  /* @__PURE__ */ m("div", { className: "select-datefield__footer-right", children: [
3778
3778
  /* @__PURE__ */ e(ve, { variant: "secondary", inline: !0, onClick: () => B(A), children: "Hoje" }),
3779
3779
  s && /* @__PURE__ */ e(ve, { variant: "primary", inline: !0, onClick: () => b(!1), children: "Concluir" })
@@ -3870,10 +3870,10 @@ function us({
3870
3870
  );
3871
3871
  }
3872
3872
  const W1 = R(function({ filters: n, values: l, onChange: c, onClearAll: s, search: a, disabled: r, className: d, ...o }, i) {
3873
- const [h, u] = D([]), [f, g] = D(null), [v, y] = D(!1), x = (M) => (l[M.key] ?? "").trim() !== "", $ = (M) => !!M.pinned || x(M) || h.includes(M.key), _ = n.filter($), p = n.filter((M) => !$(M)), b = n.filter(x), w = () => {
3873
+ const [h, u] = D([]), [f, g] = D(null), [v, y] = D(!1), x = (M) => (l[M.key] ?? "").trim() !== "", $ = (M) => !!M.pinned || x(M) || h.includes(M.key), _ = n.filter($), p = n.filter((M) => !$(M)), b = n.filter(x), S = () => {
3874
3874
  u([]), g(null), s();
3875
3875
  }, k = (M) => {
3876
- u((S) => S.includes(M) ? S : [...S, M]), y(!1), g(M);
3876
+ u((w) => w.includes(M) ? w : [...w, M]), y(!1), g(M);
3877
3877
  };
3878
3878
  return /* @__PURE__ */ m("div", { ref: i, ...o, className: `select-filterbar${d ? " " + d : ""}`, children: [
3879
3879
  /* @__PURE__ */ m("div", { className: "select-filterbar__row", children: [
@@ -3906,10 +3906,10 @@ const W1 = R(function({ filters: n, values: l, onChange: c, onClearAll: s, searc
3906
3906
  {
3907
3907
  filter: M,
3908
3908
  value: l[M.key] ?? "",
3909
- onChange: (S) => c(M.key, S),
3909
+ onChange: (w) => c(M.key, w),
3910
3910
  open: f === M.key,
3911
- onToggle: () => g((S) => S === M.key ? null : M.key),
3912
- onClose: () => g((S) => S === M.key ? null : S),
3911
+ onToggle: () => g((w) => w === M.key ? null : M.key),
3912
+ onClose: () => g((w) => w === M.key ? null : w),
3913
3913
  disabled: r
3914
3914
  },
3915
3915
  M.key
@@ -3964,11 +3964,11 @@ const W1 = R(function({ filters: n, values: l, onChange: c, onClearAll: s, searc
3964
3964
  }
3965
3965
  )
3966
3966
  ] }, M.key)),
3967
- /* @__PURE__ */ e("button", { type: "button", className: "select-filterbar__clear", onClick: w, children: "Limpar tudo" })
3967
+ /* @__PURE__ */ e("button", { type: "button", className: "select-filterbar__clear", onClick: S, children: "Limpar tudo" })
3968
3968
  ] })
3969
3969
  ] });
3970
3970
  }), O1 = R(function({ label: n, options: l, selected: c, onChange: s, placeholder: a = "Selecionar…", hint: r, error: d, onBlur: o, size: i = "md", className: h, ...u }, f) {
3971
- const [g, v] = D(!1), [y, x] = D(""), $ = l.filter((b) => b.label.toLowerCase().includes(y.trim().toLowerCase())), _ = (b) => s(c.includes(b) ? c.filter((w) => w !== b) : [...c, b]), p = c.map((b) => l.find((w) => w.value === b)).filter((b) => b != null);
3971
+ const [g, v] = D(!1), [y, x] = D(""), $ = l.filter((b) => b.label.toLowerCase().includes(y.trim().toLowerCase())), _ = (b) => s(c.includes(b) ? c.filter((S) => S !== b) : [...c, b]), p = c.map((b) => l.find((S) => S.value === b)).filter((b) => b != null);
3972
3972
  return /* @__PURE__ */ m("div", { ref: f, ...u, className: `select-field${i === "sm" ? " select-field--sm" : ""}${h ? " " + h : ""}`, children: [
3973
3973
  n && /* @__PURE__ */ e("div", { className: "select-field__labelrow", children: /* @__PURE__ */ e("span", { className: "select-field__label", children: n }) }),
3974
3974
  /* @__PURE__ */ e(
@@ -4003,8 +4003,8 @@ const W1 = R(function({ filters: n, values: l, onChange: c, onClearAll: s, searc
4003
4003
  type: "button",
4004
4004
  className: "select-tagselect__remove",
4005
4005
  "aria-label": `Remover ${b.label}`,
4006
- onClick: (w) => {
4007
- w.stopPropagation(), _(b.value);
4006
+ onClick: (S) => {
4007
+ S.stopPropagation(), _(b.value);
4008
4008
  },
4009
4009
  children: /* @__PURE__ */ e(Ke, {})
4010
4010
  }
@@ -4017,21 +4017,21 @@ const W1 = R(function({ filters: n, values: l, onChange: c, onClearAll: s, searc
4017
4017
  children: /* @__PURE__ */ m("div", { className: "select-tagselect__menu", children: [
4018
4018
  /* @__PURE__ */ e("div", { className: "select-tagselect__search", children: /* @__PURE__ */ e(ml, { value: y, onChange: x, placeholder: "Buscar…" }) }),
4019
4019
  /* @__PURE__ */ e("div", { className: "select-tagselect__options", role: "presentation", children: $.length === 0 ? /* @__PURE__ */ e("div", { className: "select-tagselect__empty", children: "Nada encontrado" }) : $.map((b) => {
4020
- const w = c.includes(b.value);
4020
+ const S = c.includes(b.value);
4021
4021
  return /* @__PURE__ */ m(
4022
4022
  "button",
4023
4023
  {
4024
4024
  type: "button",
4025
4025
  role: "option",
4026
- "aria-selected": w,
4027
- className: `select-tagselect__option${w ? " is-selected" : ""}`,
4026
+ "aria-selected": S,
4027
+ className: `select-tagselect__option${S ? " is-selected" : ""}`,
4028
4028
  onClick: () => _(b.value),
4029
4029
  children: [
4030
4030
  /* @__PURE__ */ m("span", { className: "select-tagselect__optlabel", children: [
4031
4031
  b.label,
4032
4032
  b.secondary && /* @__PURE__ */ e("span", { className: "select-tagselect__optsec", children: b.secondary })
4033
4033
  ] }),
4034
- w && /* @__PURE__ */ e("span", { className: "select-tagselect__check", "aria-hidden": "true", children: /* @__PURE__ */ e(Ae, {}) })
4034
+ S && /* @__PURE__ */ e("span", { className: "select-tagselect__check", "aria-hidden": "true", children: /* @__PURE__ */ e(Ae, {}) })
4035
4035
  ]
4036
4036
  },
4037
4037
  b.value
@@ -4525,12 +4525,12 @@ function J1({ data: t, height: n = 240, color: l, format: c = Y, className: s, .
4525
4525
  /* @__PURE__ */ e("text", { x: f.left - 8, y: _(p), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: c(p) })
4526
4526
  ] }, b)),
4527
4527
  t.map((p, b) => {
4528
- const w = f.left + y * b + y / 2, k = p.value / u * v, M = $ - k;
4528
+ const S = f.left + y * b + y / 2, k = p.value / u * v, M = $ - k;
4529
4529
  return /* @__PURE__ */ m("g", { children: [
4530
4530
  /* @__PURE__ */ e(
4531
4531
  "rect",
4532
4532
  {
4533
- x: w - x / 2,
4533
+ x: S - x / 2,
4534
4534
  y: M,
4535
4535
  width: x,
4536
4536
  height: Math.max(0, k),
@@ -4539,7 +4539,7 @@ function J1({ data: t, height: n = 240, color: l, format: c = Y, className: s, .
4539
4539
  className: "select-chart__bar",
4540
4540
  style: { animationDelay: `${b * 40}ms` },
4541
4541
  onMouseEnter: () => o.show({
4542
- x: w,
4542
+ x: S,
4543
4543
  y: M,
4544
4544
  place: M < f.top + 52 ? "bottom" : "top",
4545
4545
  rows: [{ label: p.label, value: c(p.value), color: h }]
@@ -4547,7 +4547,7 @@ function J1({ data: t, height: n = 240, color: l, format: c = Y, className: s, .
4547
4547
  onMouseLeave: o.hide
4548
4548
  }
4549
4549
  ),
4550
- /* @__PURE__ */ e("text", { x: w, y: n - f.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: p.label })
4550
+ /* @__PURE__ */ e("text", { x: S, y: n - f.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: p.label })
4551
4551
  ] }, b);
4552
4552
  })
4553
4553
  ] }),
@@ -4555,32 +4555,32 @@ function J1({ data: t, height: n = 240, color: l, format: c = Y, className: s, .
4555
4555
  ] });
4556
4556
  }
4557
4557
  function Q1({ series: t, labels: n, height: l = 240, format: c = Y, area: s = !1, className: a, ...r }) {
4558
- const { ref: d, width: o } = ce(l), i = X(), h = te(), [u, f] = D(null), { max: g, values: v } = Ss(Math.max(0, ...t.flatMap((S) => S.data))), y = Be, x = Math.max(0, o - y.left - y.right), $ = l - y.top - y.bottom, _ = n.length, p = (S) => y.left + (_ <= 1 ? x / 2 : S / (_ - 1) * x), b = (S) => y.top + $ - S / g * $, w = _ > 1 ? x / (_ - 1) : x, k = Math.max(1, Math.ceil(_ / 7)), M = y.top + $;
4558
+ const { ref: d, width: o } = ce(l), i = X(), h = te(), [u, f] = D(null), { max: g, values: v } = Ss(Math.max(0, ...t.flatMap((w) => w.data))), y = Be, x = Math.max(0, o - y.left - y.right), $ = l - y.top - y.bottom, _ = n.length, p = (w) => y.left + (_ <= 1 ? x / 2 : w / (_ - 1) * x), b = (w) => y.top + $ - w / g * $, S = _ > 1 ? x / (_ - 1) : x, k = Math.max(1, Math.ceil(_ / 7)), M = y.top + $;
4559
4559
  return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: d, children: [
4560
4560
  o > 0 && /* @__PURE__ */ m("svg", { width: o, height: l, className: "select-chart", children: [
4561
- /* @__PURE__ */ e("defs", { children: t.map((S, N) => {
4562
- const C = S.color ?? j(N);
4561
+ /* @__PURE__ */ e("defs", { children: t.map((w, N) => {
4562
+ const C = w.color ?? j(N);
4563
4563
  return /* @__PURE__ */ m("linearGradient", { id: `${h}-a${N}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
4564
4564
  /* @__PURE__ */ e("stop", { offset: "0%", stopColor: C, stopOpacity: 0.32 }),
4565
4565
  /* @__PURE__ */ e("stop", { offset: "100%", stopColor: C, stopOpacity: 0 })
4566
4566
  ] }, N);
4567
4567
  }) }),
4568
- v.map((S, N) => /* @__PURE__ */ m("g", { children: [
4568
+ v.map((w, N) => /* @__PURE__ */ m("g", { children: [
4569
4569
  /* @__PURE__ */ e(
4570
4570
  "line",
4571
4571
  {
4572
4572
  x1: y.left,
4573
4573
  x2: o - y.right,
4574
- y1: b(S),
4575
- y2: b(S),
4576
- className: S === 0 ? "select-chart__axis" : "select-chart__grid"
4574
+ y1: b(w),
4575
+ y2: b(w),
4576
+ className: w === 0 ? "select-chart__axis" : "select-chart__grid"
4577
4577
  }
4578
4578
  ),
4579
- /* @__PURE__ */ e("text", { x: y.left - 8, y: b(S), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: c(S) })
4579
+ /* @__PURE__ */ e("text", { x: y.left - 8, y: b(w), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: c(w) })
4580
4580
  ] }, N)),
4581
4581
  u != null && /* @__PURE__ */ e("line", { x1: p(u), x2: p(u), y1: y.top, y2: M, className: "select-chart__crosshair" }),
4582
- t.map((S, N) => {
4583
- const C = S.color ?? j(N), L = S.data.map((E, A) => [p(A), b(E)]);
4582
+ t.map((w, N) => {
4583
+ const C = w.color ?? j(N), L = w.data.map((E, A) => [p(A), b(E)]);
4584
4584
  return /* @__PURE__ */ m("g", { children: [
4585
4585
  s && /* @__PURE__ */ e("path", { d: xl(L, M), fill: `url(#${h}-a${N})`, className: "select-chart__area" }),
4586
4586
  /* @__PURE__ */ e(
@@ -4598,26 +4598,26 @@ function Q1({ series: t, labels: n, height: l = 240, format: c = Y, area: s = !1
4598
4598
  )
4599
4599
  ] }, N);
4600
4600
  }),
4601
- u != null && t.map((S, N) => /* @__PURE__ */ e(
4601
+ u != null && t.map((w, N) => /* @__PURE__ */ e(
4602
4602
  "circle",
4603
4603
  {
4604
4604
  cx: p(u),
4605
- cy: b(S.data[u] ?? 0),
4605
+ cy: b(w.data[u] ?? 0),
4606
4606
  r: 3.5,
4607
- fill: S.color ?? j(N),
4607
+ fill: w.color ?? j(N),
4608
4608
  className: "select-chart__dot select-chart__dot--active"
4609
4609
  },
4610
4610
  N
4611
4611
  )),
4612
4612
  n.map(
4613
- (S, N) => N % k === 0 || N === _ - 1 ? /* @__PURE__ */ e("text", { x: p(N), y: l - y.bottom + 16, className: "select-chart__xlabel", textAnchor: N === 0 ? "start" : N === _ - 1 ? "end" : "middle", children: S }, N) : null
4613
+ (w, N) => N % k === 0 || N === _ - 1 ? /* @__PURE__ */ e("text", { x: p(N), y: l - y.bottom + 16, className: "select-chart__xlabel", textAnchor: N === 0 ? "start" : N === _ - 1 ? "end" : "middle", children: w }, N) : null
4614
4614
  ),
4615
- n.map((S, N) => /* @__PURE__ */ e(
4615
+ n.map((w, N) => /* @__PURE__ */ e(
4616
4616
  "rect",
4617
4617
  {
4618
- x: p(N) - w / 2,
4618
+ x: p(N) - S / 2,
4619
4619
  y: y.top,
4620
- width: w,
4620
+ width: S,
4621
4621
  height: $,
4622
4622
  fill: "transparent",
4623
4623
  onMouseEnter: () => {
@@ -4627,7 +4627,7 @@ function Q1({ series: t, labels: n, height: l = 240, format: c = Y, area: s = !1
4627
4627
  x: p(N),
4628
4628
  y: C,
4629
4629
  place: C < y.top + 52 ? "bottom" : "top",
4630
- title: S,
4630
+ title: w,
4631
4631
  rows: t.map((L, E) => ({ label: L.name, value: c(L.data[N] ?? 0), color: L.color ?? j(E) }))
4632
4632
  });
4633
4633
  },
@@ -4644,7 +4644,7 @@ function Q1({ series: t, labels: n, height: l = 240, format: c = Y, area: s = !1
4644
4644
  function eo({ series: t, labels: n, height: l = 240, format: c = Y, className: s, ...a }) {
4645
4645
  const { ref: r, width: d } = ce(l), o = X(), i = te(), [h, u] = D(null), f = n.length, g = new Array(f).fill(0), v = t.map(
4646
4646
  (N) => N.data.map((C, L) => (g[L] = (g[L] ?? 0) + (C ?? 0), g[L]))
4647
- ), y = ye(Math.max(0, ...g)), x = Be, $ = Math.max(0, d - x.left - x.right), _ = l - x.top - x.bottom, p = (N) => x.left + (f <= 1 ? $ / 2 : N / (f - 1) * $), b = (N) => x.top + _ - N / y * _, w = f > 1 ? $ / (f - 1) : $, k = Math.max(1, Math.ceil(f / 7)), M = x.top + _, S = v[v.length - 1];
4647
+ ), y = ye(Math.max(0, ...g)), x = Be, $ = Math.max(0, d - x.left - x.right), _ = l - x.top - x.bottom, p = (N) => x.left + (f <= 1 ? $ / 2 : N / (f - 1) * $), b = (N) => x.top + _ - N / y * _, S = f > 1 ? $ / (f - 1) : $, k = Math.max(1, Math.ceil(f / 7)), M = x.top + _, w = v[v.length - 1];
4648
4648
  return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
4649
4649
  d > 0 && /* @__PURE__ */ m("svg", { width: d, height: l, className: "select-chart", children: [
4650
4650
  /* @__PURE__ */ e("defs", { children: t.map((N, C) => {
@@ -4681,14 +4681,14 @@ function eo({ series: t, labels: n, height: l = 240, format: c = Y, className: s
4681
4681
  n.map((N, C) => /* @__PURE__ */ e(
4682
4682
  "rect",
4683
4683
  {
4684
- x: p(C) - w / 2,
4684
+ x: p(C) - S / 2,
4685
4685
  y: x.top,
4686
- width: w,
4686
+ width: S,
4687
4687
  height: _,
4688
4688
  fill: "transparent",
4689
4689
  onMouseEnter: () => {
4690
4690
  u(C);
4691
- const L = b((S == null ? void 0 : S[C]) ?? 0);
4691
+ const L = b((w == null ? void 0 : w[C]) ?? 0);
4692
4692
  o.show({
4693
4693
  x: p(C),
4694
4694
  y: L,
@@ -4708,7 +4708,7 @@ function eo({ series: t, labels: n, height: l = 240, format: c = Y, className: s
4708
4708
  ] });
4709
4709
  }
4710
4710
  function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = Y, formatLine: a = (o) => `${Math.round(o)}%`, className: r, ...d }) {
4711
- const { ref: o, width: i } = ce(c), h = X(), u = te(), [f, g] = D(null), v = { ...Be, right: 58 }, y = Math.max(0, i - v.left - v.right), x = c - v.top - v.bottom, $ = t.length, _ = ye(Math.max(0, ...n.data)), p = ye(Math.max(0, ...l.data)), b = $ > 0 ? y / $ : 0, w = Math.min(b * 0.5, 36), k = Math.max(1, Math.ceil($ / 8)), M = n.color ?? j(0), S = l.color ?? j(1), N = v.top + x, C = (F) => N - F / _ * x, L = (F) => N - F / p * x, E = (F) => v.left + b * F + b / 2, A = l.data.map((F, B) => [E(B), L(F)]);
4711
+ const { ref: o, width: i } = ce(c), h = X(), u = te(), [f, g] = D(null), v = { ...Be, right: 58 }, y = Math.max(0, i - v.left - v.right), x = c - v.top - v.bottom, $ = t.length, _ = ye(Math.max(0, ...n.data)), p = ye(Math.max(0, ...l.data)), b = $ > 0 ? y / $ : 0, S = Math.min(b * 0.5, 36), k = Math.max(1, Math.ceil($ / 8)), M = n.color ?? j(0), w = l.color ?? j(1), N = v.top + x, C = (F) => N - F / _ * x, L = (F) => N - F / p * x, E = (F) => v.left + b * F + b / 2, A = l.data.map((F, B) => [E(B), L(F)]);
4712
4712
  return /* @__PURE__ */ m("div", { ...d, className: `select-chart-wrap${r ? " " + r : ""}`, ref: o, children: [
4713
4713
  i > 0 && /* @__PURE__ */ m("svg", { width: i, height: c, className: "select-chart", children: [
4714
4714
  /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ m("linearGradient", { id: `${u}-bar`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
@@ -4730,14 +4730,14 @@ function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = Y, fo
4730
4730
  ] }, B)),
4731
4731
  we(p).map((F, B) => /* @__PURE__ */ e("text", { x: i - 4, y: L(F), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: a(F) }, `r${B}`)),
4732
4732
  n.data.map((F, B) => {
4733
- const W = F / _ * x;
4733
+ const T = F / _ * x;
4734
4734
  return /* @__PURE__ */ e(
4735
4735
  "rect",
4736
4736
  {
4737
- x: E(B) - w / 2,
4738
- y: N - W,
4739
- width: w,
4740
- height: Math.max(0, W),
4737
+ x: E(B) - S / 2,
4738
+ y: N - T,
4739
+ width: S,
4740
+ height: Math.max(0, T),
4741
4741
  rx: 5,
4742
4742
  fill: `url(#${u}-bar)`,
4743
4743
  className: "select-chart__bar",
@@ -4752,7 +4752,7 @@ function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = Y, fo
4752
4752
  {
4753
4753
  d: Ge(A),
4754
4754
  fill: "none",
4755
- stroke: S,
4755
+ stroke: w,
4756
4756
  strokeWidth: 2.5,
4757
4757
  strokeLinecap: "round",
4758
4758
  strokeLinejoin: "round",
@@ -4766,7 +4766,7 @@ function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = Y, fo
4766
4766
  cx: E(f),
4767
4767
  cy: L(l.data[f] ?? 0),
4768
4768
  r: 4,
4769
- fill: S,
4769
+ fill: w,
4770
4770
  className: "select-chart__dot select-chart__dot--active"
4771
4771
  }
4772
4772
  ),
@@ -4783,15 +4783,15 @@ function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = Y, fo
4783
4783
  fill: "transparent",
4784
4784
  onMouseEnter: () => {
4785
4785
  g(B);
4786
- const W = Math.min(C(n.data[B] ?? 0), L(l.data[B] ?? 0));
4786
+ const T = Math.min(C(n.data[B] ?? 0), L(l.data[B] ?? 0));
4787
4787
  h.show({
4788
4788
  x: E(B),
4789
- y: W,
4790
- place: W < v.top + 52 ? "bottom" : "top",
4789
+ y: T,
4790
+ place: T < v.top + 52 ? "bottom" : "top",
4791
4791
  title: F,
4792
4792
  rows: [
4793
4793
  { label: n.name, value: s(n.data[B] ?? 0), color: M },
4794
- { label: l.name, value: a(l.data[B] ?? 0), color: S }
4794
+ { label: l.name, value: a(l.data[B] ?? 0), color: w }
4795
4795
  ]
4796
4796
  });
4797
4797
  },
@@ -4807,21 +4807,21 @@ function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = Y, fo
4807
4807
  }
4808
4808
  const no = R(function({ segments: n, size: l = 200, thickness: c = 26, format: s = Y, centerLabel: a, legend: r = !0, gap: d = 2, pie: o = !1, className: i, ...h }, u) {
4809
4809
  const f = X(), g = te(), v = q(null), y = Ct(v, l), x = n.reduce((k, M) => k + M.value, 0) || 1, $ = y / 2, _ = y / 2, p = y / 2 - 2, b = o ? 0 : p - c;
4810
- let w = 0;
4810
+ let S = 0;
4811
4811
  return /* @__PURE__ */ m("div", { ref: u, ...h, className: `select-donut-wrap${i ? " " + i : ""}`, children: [
4812
4812
  /* @__PURE__ */ m("div", { ref: v, className: "select-donut-ring", style: { width: `${l / 16}rem`, aspectRatio: "1" }, children: [
4813
4813
  /* @__PURE__ */ m("svg", { width: y, height: y, viewBox: `0 0 ${y} ${y}`, className: "select-chart select-donut", "aria-hidden": "true", children: [
4814
4814
  /* @__PURE__ */ e("defs", { children: n.map((k, M) => {
4815
- const S = k.color ?? j(M);
4815
+ const w = k.color ?? j(M);
4816
4816
  return /* @__PURE__ */ m("linearGradient", { id: `${g}-s${M}`, gradientUnits: "userSpaceOnUse", x1: "0", y1: "0", x2: "0", y2: y, children: [
4817
- /* @__PURE__ */ e("stop", { offset: "0%", stopColor: S, stopOpacity: 1 }),
4818
- /* @__PURE__ */ e("stop", { offset: "100%", stopColor: S, stopOpacity: 0.6 })
4817
+ /* @__PURE__ */ e("stop", { offset: "0%", stopColor: w, stopOpacity: 1 }),
4818
+ /* @__PURE__ */ e("stop", { offset: "100%", stopColor: w, stopOpacity: 0.6 })
4819
4819
  ] }, M);
4820
4820
  }) }),
4821
4821
  n.map((k, M) => {
4822
- const S = w / x * 360;
4823
- w += k.value;
4824
- const N = w / x * 360, C = k.color ?? j(M), E = N - S > d * 1.5 ? d / 2 : 0, A = S + E, F = Math.max(A + 0.01, N - E);
4822
+ const w = S / x * 360;
4823
+ S += k.value;
4824
+ const N = S / x * 360, C = k.color ?? j(M), E = N - w > d * 1.5 ? d / 2 : 0, A = w + E, F = Math.max(A + 0.01, N - E);
4825
4825
  return /* @__PURE__ */ e(
4826
4826
  "path",
4827
4827
  {
@@ -4829,11 +4829,11 @@ const no = R(function({ segments: n, size: l = 200, thickness: c = 26, format: s
4829
4829
  fill: `url(#${g}-s${M})`,
4830
4830
  className: "select-chart__seg",
4831
4831
  onMouseEnter: () => {
4832
- const B = ((S + N) / 2 - 90) * Math.PI / 180, W = $ + (p + 6) * Math.cos(B), P = _ + (p + 6) * Math.sin(B);
4832
+ const B = ((w + N) / 2 - 90) * Math.PI / 180, T = $ + (p + 6) * Math.cos(B), I = _ + (p + 6) * Math.sin(B);
4833
4833
  f.show({
4834
- x: W,
4835
- y: P,
4836
- place: P <= _ ? "top" : "bottom",
4834
+ x: T,
4835
+ y: I,
4836
+ place: I <= _ ? "top" : "bottom",
4837
4837
  title: k.label,
4838
4838
  rows: [{ label: "Valor", value: s(k.value), color: C }]
4839
4839
  });
@@ -4855,17 +4855,17 @@ const no = R(function({ segments: n, size: l = 200, thickness: c = 26, format: s
4855
4855
  ] });
4856
4856
  });
4857
4857
  function lo({ series: t, labels: n, height: l = 240, format: c = Y, stacked: s = !1, className: a, ...r }) {
4858
- const { ref: d, width: o } = ce(l), i = X(), h = te(), u = n.length, f = t.length || 1, g = n.map((M, S) => t.reduce((N, C) => N + (C.data[S] ?? 0), 0)), v = ye(s ? Math.max(0, ...g) : Math.max(0, ...t.flatMap((M) => M.data))), y = Be, x = Math.max(0, o - y.left - y.right), $ = l - y.top - y.bottom, _ = y.top + $, p = u ? x / u : 0, b = (M) => _ - M / v * $, w = Math.min(p * 0.72, f * 40), k = s ? Math.min(p * 0.5, 44) : w / f;
4858
+ const { ref: d, width: o } = ce(l), i = X(), h = te(), u = n.length, f = t.length || 1, g = n.map((M, w) => t.reduce((N, C) => N + (C.data[w] ?? 0), 0)), v = ye(s ? Math.max(0, ...g) : Math.max(0, ...t.flatMap((M) => M.data))), y = Be, x = Math.max(0, o - y.left - y.right), $ = l - y.top - y.bottom, _ = y.top + $, p = u ? x / u : 0, b = (M) => _ - M / v * $, S = Math.min(p * 0.72, f * 40), k = s ? Math.min(p * 0.5, 44) : S / f;
4859
4859
  return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: d, children: [
4860
4860
  o > 0 && /* @__PURE__ */ m("svg", { width: o, height: l, className: "select-chart", children: [
4861
- /* @__PURE__ */ e("defs", { children: t.map((M, S) => {
4862
- const N = M.color ?? j(S);
4863
- return /* @__PURE__ */ m("linearGradient", { id: `${h}-c${S}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
4861
+ /* @__PURE__ */ e("defs", { children: t.map((M, w) => {
4862
+ const N = M.color ?? j(w);
4863
+ return /* @__PURE__ */ m("linearGradient", { id: `${h}-c${w}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
4864
4864
  /* @__PURE__ */ e("stop", { offset: "0%", stopColor: N, stopOpacity: 1 }),
4865
4865
  /* @__PURE__ */ e("stop", { offset: "100%", stopColor: N, stopOpacity: 0.62 })
4866
- ] }, S);
4866
+ ] }, w);
4867
4867
  }) }),
4868
- we(v).map((M, S) => /* @__PURE__ */ m("g", { children: [
4868
+ we(v).map((M, w) => /* @__PURE__ */ m("g", { children: [
4869
4869
  /* @__PURE__ */ e(
4870
4870
  "line",
4871
4871
  {
@@ -4873,17 +4873,17 @@ function lo({ series: t, labels: n, height: l = 240, format: c = Y, stacked: s =
4873
4873
  x2: o - y.right,
4874
4874
  y1: b(M),
4875
4875
  y2: b(M),
4876
- className: S === 0 ? "select-chart__axis" : "select-chart__grid"
4876
+ className: w === 0 ? "select-chart__axis" : "select-chart__grid"
4877
4877
  }
4878
4878
  ),
4879
4879
  /* @__PURE__ */ e("text", { x: y.left - 8, y: b(M), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: c(M) })
4880
- ] }, S)),
4881
- n.map((M, S) => {
4882
- const N = y.left + p * S;
4880
+ ] }, w)),
4881
+ n.map((M, w) => {
4882
+ const N = y.left + p * w;
4883
4883
  if (s) {
4884
4884
  let L = 0;
4885
4885
  return /* @__PURE__ */ e("g", { children: t.map((E, A) => {
4886
- const F = (E.data[S] ?? 0) / v * $, B = _ - L - F;
4886
+ const F = (E.data[w] ?? 0) / v * $, B = _ - L - F;
4887
4887
  return L += F, /* @__PURE__ */ e(
4888
4888
  "rect",
4889
4889
  {
@@ -4894,15 +4894,15 @@ function lo({ series: t, labels: n, height: l = 240, format: c = Y, stacked: s =
4894
4894
  rx: 3,
4895
4895
  fill: `url(#${h}-c${A})`,
4896
4896
  className: "select-chart__bar",
4897
- style: { animationDelay: `${S * 30}ms` }
4897
+ style: { animationDelay: `${w * 30}ms` }
4898
4898
  },
4899
4899
  A
4900
4900
  );
4901
- }) }, S);
4901
+ }) }, w);
4902
4902
  }
4903
- const C = N + (p - w) / 2;
4903
+ const C = N + (p - S) / 2;
4904
4904
  return /* @__PURE__ */ e("g", { children: t.map((L, E) => {
4905
- const A = (L.data[S] ?? 0) / v * $;
4905
+ const A = (L.data[w] ?? 0) / v * $;
4906
4906
  return /* @__PURE__ */ e(
4907
4907
  "rect",
4908
4908
  {
@@ -4913,33 +4913,33 @@ function lo({ series: t, labels: n, height: l = 240, format: c = Y, stacked: s =
4913
4913
  rx: 3,
4914
4914
  fill: `url(#${h}-c${E})`,
4915
4915
  className: "select-chart__bar",
4916
- style: { animationDelay: `${(S * f + E) * 25}ms` }
4916
+ style: { animationDelay: `${(w * f + E) * 25}ms` }
4917
4917
  },
4918
4918
  E
4919
4919
  );
4920
- }) }, S);
4920
+ }) }, w);
4921
4921
  }),
4922
- n.map((M, S) => /* @__PURE__ */ e("text", { x: y.left + p * S + p / 2, y: l - y.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: M }, S)),
4923
- n.map((M, S) => {
4924
- const N = s ? b(g[S] ?? 0) : Math.min(...t.map((C) => b(C.data[S] ?? 0)));
4922
+ n.map((M, w) => /* @__PURE__ */ e("text", { x: y.left + p * w + p / 2, y: l - y.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: M }, w)),
4923
+ n.map((M, w) => {
4924
+ const N = s ? b(g[w] ?? 0) : Math.min(...t.map((C) => b(C.data[w] ?? 0)));
4925
4925
  return /* @__PURE__ */ e(
4926
4926
  "rect",
4927
4927
  {
4928
- x: y.left + p * S,
4928
+ x: y.left + p * w,
4929
4929
  y: y.top,
4930
4930
  width: p,
4931
4931
  height: $,
4932
4932
  fill: "transparent",
4933
4933
  onMouseEnter: () => i.show({
4934
- x: y.left + p * S + p / 2,
4934
+ x: y.left + p * w + p / 2,
4935
4935
  y: N,
4936
4936
  place: N < y.top + 52 ? "bottom" : "top",
4937
4937
  title: M,
4938
- rows: t.map((C, L) => ({ label: C.name, value: c(C.data[S] ?? 0), color: C.color ?? j(L) }))
4938
+ rows: t.map((C, L) => ({ label: C.name, value: c(C.data[w] ?? 0), color: C.color ?? j(L) }))
4939
4939
  }),
4940
4940
  onMouseLeave: i.hide
4941
4941
  },
4942
- `h${S}`
4942
+ `h${w}`
4943
4943
  );
4944
4944
  })
4945
4945
  ] }),
@@ -5022,48 +5022,55 @@ const Ls = (t) => `${t.toLocaleString("pt-BR", { maximumFractionDigits: t < 10 ?
5022
5022
  ] }),
5023
5023
  c != null && /* @__PURE__ */ e("div", { className: "select-gauge__caption", children: c })
5024
5024
  ] });
5025
- }), ao = R(function({ columns: n, rows: l, format: c = Y, formatValue: s, color: a = "var(--select-chart-1)", showValues: r = !0, min: d, max: o, cellSize: i = 40, maxCellSize: h = 96, className: u, ...f }, g) {
5026
- const v = X(), y = l.flatMap((w) => w.values).filter((w) => w != null && Number.isFinite(w)), x = d ?? (y.length ? Math.min(...y) : 0), _ = (o ?? (y.length ? Math.max(...y) : 1)) - x || 1, p = { "--heat-color": a }, b = {
5027
- gridTemplateColumns: `minmax(56px, max-content) repeat(${n.length}, minmax(${i}px, ${Math.max(i, h)}px))`
5025
+ }), ao = R(function({ columns: n, rows: l, format: c = Y, formatValue: s, color: a = "var(--select-chart-1)", showValues: r = !0, min: d, max: o, cellSize: i = 40, maxCellSize: h = 96, cellHeight: u = 30, className: f, ...g }, v) {
5026
+ const y = X(), x = l.flatMap((M) => M.values).filter((M) => M != null && Number.isFinite(M)), $ = d ?? (x.length ? Math.min(...x) : 0), p = (o ?? (x.length ? Math.max(...x) : 1)) - $ || 1, b = { "--heat-color": a }, S = {
5027
+ gridTemplateColumns: `minmax(56px, max-content) repeat(${n.length}, minmax(${i}px, ${Math.max(i, h)}px))`,
5028
+ width: "fit-content",
5029
+ maxWidth: "100%",
5030
+ minWidth: 0
5031
+ }, k = {
5032
+ minHeight: u,
5033
+ ...u >= 40 ? { fontSize: "0.8125rem" } : null
5028
5034
  };
5029
- return /* @__PURE__ */ m("div", { ref: g, ...f, className: `select-chart-wrap select-heatmap${u ? " " + u : ""}`, style: p, children: [
5030
- /* @__PURE__ */ m("div", { className: "select-heatmap__grid", style: b, children: [
5035
+ return /* @__PURE__ */ m("div", { ref: v, ...g, className: `select-chart-wrap select-heatmap${f ? " " + f : ""}`, style: b, children: [
5036
+ /* @__PURE__ */ m("div", { className: "select-heatmap__grid", style: S, children: [
5031
5037
  /* @__PURE__ */ e("div", { className: "select-heatmap__corner" }),
5032
- n.map((w) => /* @__PURE__ */ e("div", { className: "select-heatmap__colhead", children: w }, w)),
5033
- l.map((w) => /* @__PURE__ */ m(Yt, { children: [
5034
- /* @__PURE__ */ e("div", { className: "select-heatmap__rowhead", children: w.label }),
5035
- w.values.map((k, M) => {
5036
- const S = `${w.label}-${n[M] ?? M}`;
5037
- if (k == null || !Number.isFinite(k))
5038
- return /* @__PURE__ */ e("div", { className: "select-heatmap__cell select-heatmap__cell--empty" }, S);
5039
- const N = Math.max(0, Math.min(1, (k - x) / _)), C = Math.round((0.14 + N * 0.86) * 100), L = Math.max(6, C - 16);
5038
+ n.map((M) => /* @__PURE__ */ e("div", { className: "select-heatmap__colhead", children: M }, M)),
5039
+ l.map((M) => /* @__PURE__ */ m(Yt, { children: [
5040
+ /* @__PURE__ */ e("div", { className: "select-heatmap__rowhead", children: M.label }),
5041
+ M.values.map((w, N) => {
5042
+ const C = `${M.label}-${n[N] ?? N}`;
5043
+ if (w == null || !Number.isFinite(w))
5044
+ return /* @__PURE__ */ e("div", { className: "select-heatmap__cell select-heatmap__cell--empty", style: k }, C);
5045
+ const L = Math.max(0, Math.min(1, (w - $) / p)), E = Math.round((0.14 + L * 0.86) * 100), A = Math.max(6, E - 16);
5040
5046
  return /* @__PURE__ */ e(
5041
5047
  "div",
5042
5048
  {
5043
5049
  className: "select-heatmap__cell",
5044
5050
  style: {
5045
- background: `linear-gradient(150deg, color-mix(in srgb, ${a} ${L}%, transparent), color-mix(in srgb, ${a} ${C}%, transparent))`,
5046
- color: N > 0.55 ? "#fff" : "var(--select-text)"
5051
+ ...k,
5052
+ background: `linear-gradient(150deg, color-mix(in srgb, ${a} ${A}%, transparent), color-mix(in srgb, ${a} ${E}%, transparent))`,
5053
+ color: L > 0.55 ? "#fff" : "var(--select-text)"
5047
5054
  },
5048
- onMouseEnter: (E) => {
5049
- const A = E.currentTarget.closest(".select-chart-wrap"), F = E.currentTarget.getBoundingClientRect(), B = A == null ? void 0 : A.getBoundingClientRect(), W = B ? F.top - B.top : 0, P = W < 64 ? "bottom" : "top", O = (B ? F.left - B.left : 0) + F.width / 2, T = P === "bottom" ? B ? F.bottom - B.top : 0 : W;
5050
- v.show({
5051
- x: O,
5052
- y: T,
5053
- place: P,
5054
- title: `${w.label} · ${n[M] ?? ""}`,
5055
- rows: [{ label: "Valor", value: (s ?? c)(k), color: a }]
5055
+ onMouseEnter: (F) => {
5056
+ const B = F.currentTarget.closest(".select-chart-wrap"), T = F.currentTarget.getBoundingClientRect(), I = B == null ? void 0 : B.getBoundingClientRect(), O = I ? T.top - I.top : 0, W = O < 64 ? "bottom" : "top", Z = (I ? T.left - I.left : 0) + T.width / 2, G = W === "bottom" ? I ? T.bottom - I.top : 0 : O;
5057
+ y.show({
5058
+ x: Z,
5059
+ y: G,
5060
+ place: W,
5061
+ title: `${M.label} · ${n[N] ?? ""}`,
5062
+ rows: [{ label: "Valor", value: (s ?? c)(w), color: a }]
5056
5063
  });
5057
5064
  },
5058
- onMouseLeave: v.hide,
5059
- children: r ? c(k) : ""
5065
+ onMouseLeave: y.hide,
5066
+ children: r ? c(w) : ""
5060
5067
  },
5061
- S
5068
+ C
5062
5069
  );
5063
5070
  })
5064
- ] }, w.label))
5071
+ ] }, M.label))
5065
5072
  ] }),
5066
- /* @__PURE__ */ e(K, { tip: v.tip })
5073
+ /* @__PURE__ */ e(K, { tip: y.tip })
5067
5074
  ] });
5068
5075
  });
5069
5076
  function oo({
@@ -5150,14 +5157,14 @@ function io({ data: t, height: n, color: l, format: c = Y, formatValue: s, distr
5150
5157
  const g = n ?? t.length * 36 + 6 + 26, { ref: v, width: y } = ce(g), x = X(), $ = te(), _ = ye(Math.max(0, ...t.map((F) => F.value))), p = t.reduce((F, B) => Math.max(F, B.label.length), 0), b = Math.min(
5151
5158
  Math.max(Bn, p * En + Tt),
5152
5159
  Math.max(Bn, y * As)
5153
- ), w = r ?? b, k = Math.max(3, Math.floor((w - Tt) / En)), M = (F) => F.length <= k ? F : `${F.slice(0, k - 1).trimEnd()}…`, S = Math.max(0, y - w - 28), N = g - 6 - 26, C = t.length ? N / t.length : 0, L = Math.min(C * 0.62, 22), E = (F) => w + F / _ * S, A = (F, B) => F.color ?? (a ? j(B) : l ?? j(0));
5160
+ ), S = r ?? b, k = Math.max(3, Math.floor((S - Tt) / En)), M = (F) => F.length <= k ? F : `${F.slice(0, k - 1).trimEnd()}…`, w = Math.max(0, y - S - 28), N = g - 6 - 26, C = t.length ? N / t.length : 0, L = Math.min(C * 0.62, 22), E = (F) => S + F / _ * w, A = (F, B) => F.color ?? (a ? j(B) : l ?? j(0));
5154
5161
  return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${d ? " " + d : ""}`, ref: v, children: [
5155
5162
  y > 0 && /* @__PURE__ */ m("svg", { width: y, height: g, className: "select-chart", children: [
5156
5163
  /* @__PURE__ */ e("defs", { children: t.map((F, B) => {
5157
- const W = A(F, B);
5164
+ const T = A(F, B);
5158
5165
  return /* @__PURE__ */ m("linearGradient", { id: `${$}-h${B}`, x1: "0", y1: "0", x2: "1", y2: "0", children: [
5159
- /* @__PURE__ */ e("stop", { offset: "0%", stopColor: W, stopOpacity: 1 }),
5160
- /* @__PURE__ */ e("stop", { offset: "100%", stopColor: W, stopOpacity: 0.5 })
5166
+ /* @__PURE__ */ e("stop", { offset: "0%", stopColor: T, stopOpacity: 1 }),
5167
+ /* @__PURE__ */ e("stop", { offset: "100%", stopColor: T, stopOpacity: 0.5 })
5161
5168
  ] }, B);
5162
5169
  }) }),
5163
5170
  we(_).map((F, B) => /* @__PURE__ */ m("g", { children: [
@@ -5174,24 +5181,24 @@ function io({ data: t, height: n, color: l, format: c = Y, formatValue: s, distr
5174
5181
  /* @__PURE__ */ e("text", { x: E(F), y: g - 26 + 16, className: "select-chart__xlabel", textAnchor: "middle", children: c(F) })
5175
5182
  ] }, B)),
5176
5183
  t.map((F, B) => {
5177
- const W = 6 + C * B + C / 2, P = F.value / _ * S, O = A(F, B);
5184
+ const T = 6 + C * B + C / 2, I = F.value / _ * w, O = A(F, B);
5178
5185
  return /* @__PURE__ */ m("g", { children: [
5179
- /* @__PURE__ */ e("rect", { x: w, y: W - L / 2, width: S, height: L, rx: 5, className: "select-chart__track-bar" }),
5186
+ /* @__PURE__ */ e("rect", { x: S, y: T - L / 2, width: w, height: L, rx: 5, className: "select-chart__track-bar" }),
5180
5187
  /* @__PURE__ */ e(
5181
5188
  "rect",
5182
5189
  {
5183
- x: w,
5184
- y: W - L / 2,
5185
- width: Math.max(0, P),
5190
+ x: S,
5191
+ y: T - L / 2,
5192
+ width: Math.max(0, I),
5186
5193
  height: L,
5187
5194
  rx: 5,
5188
5195
  fill: `url(#${$}-h${B})`,
5189
5196
  className: "select-chart__hbar",
5190
5197
  style: { animationDelay: `${B * 40}ms` },
5191
5198
  onMouseEnter: () => x.show({
5192
- x: w + P,
5193
- y: W - L / 2,
5194
- place: W - L / 2 < 50 ? "bottom" : "top",
5199
+ x: S + I,
5200
+ y: T - L / 2,
5201
+ place: T - L / 2 < 50 ? "bottom" : "top",
5195
5202
  rows: [{ label: F.label, value: (s ?? c)(F.value), color: O }]
5196
5203
  }),
5197
5204
  onMouseLeave: x.hide
@@ -5200,8 +5207,8 @@ function io({ data: t, height: n, color: l, format: c = Y, formatValue: s, distr
5200
5207
  /* @__PURE__ */ m(
5201
5208
  "text",
5202
5209
  {
5203
- x: w - Tt / 2,
5204
- y: W,
5210
+ x: S - Tt / 2,
5211
+ y: T,
5205
5212
  className: "select-chart__ylabel",
5206
5213
  dominantBaseline: "middle",
5207
5214
  textAnchor: "end",
@@ -5229,7 +5236,7 @@ function uo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
5229
5236
  total: "var(--select-chart-1)",
5230
5237
  inc: "var(--select-chart-4)",
5231
5238
  dec: "var(--select-chart-3)"
5232
- }, w = (k) => k.total ? "total" : k.value >= 0 ? "inc" : "dec";
5239
+ }, S = (k) => k.total ? "total" : k.value >= 0 ? "inc" : "dec";
5233
5240
  return /* @__PURE__ */ m("div", { ...s, className: `select-chart-wrap${c ? " " + c : ""}`, ref: a, children: [
5234
5241
  r > 0 && /* @__PURE__ */ m("svg", { width: r, height: n, className: "select-chart", children: [
5235
5242
  /* @__PURE__ */ e("defs", { children: ["total", "inc", "dec"].map((k) => /* @__PURE__ */ m("linearGradient", { id: `${o}-${k}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
@@ -5250,16 +5257,16 @@ function uo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
5250
5257
  /* @__PURE__ */ e("text", { x: f.left - 8, y: p(k), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(k) })
5251
5258
  ] }, M)),
5252
5259
  h.slice(0, -1).map((k, M) => {
5253
- const S = f.left + $ * M + $ / 2 + _ / 2, N = f.left + $ * (M + 1) + $ / 2 - _ / 2;
5254
- return /* @__PURE__ */ e("line", { x1: S, x2: N, y1: p(k.end), y2: p(k.end), className: "select-chart__crosshair" }, `c${M}`);
5260
+ const w = f.left + $ * M + $ / 2 + _ / 2, N = f.left + $ * (M + 1) + $ / 2 - _ / 2;
5261
+ return /* @__PURE__ */ e("line", { x1: w, x2: N, y1: p(k.end), y2: p(k.end), className: "select-chart__crosshair" }, `c${M}`);
5255
5262
  }),
5256
5263
  h.map((k, M) => {
5257
- const S = f.left + $ * M + $ / 2, N = p(Math.max(k.start, k.end)), C = Math.abs(p(k.start) - p(k.end)), L = w(k);
5264
+ const w = f.left + $ * M + $ / 2, N = p(Math.max(k.start, k.end)), C = Math.abs(p(k.start) - p(k.end)), L = S(k);
5258
5265
  return /* @__PURE__ */ m("g", { children: [
5259
5266
  /* @__PURE__ */ e(
5260
5267
  "rect",
5261
5268
  {
5262
- x: S - _ / 2,
5269
+ x: w - _ / 2,
5263
5270
  y: N,
5264
5271
  width: _,
5265
5272
  height: Math.max(2, C),
@@ -5268,7 +5275,7 @@ function uo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
5268
5275
  className: "select-chart__bar",
5269
5276
  style: { animationDelay: `${M * 40}ms` },
5270
5277
  onMouseEnter: () => d.show({
5271
- x: S,
5278
+ x: w,
5272
5279
  y: N,
5273
5280
  place: N < f.top + 52 ? "bottom" : "top",
5274
5281
  title: k.label,
@@ -5280,7 +5287,7 @@ function uo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
5280
5287
  onMouseLeave: d.hide
5281
5288
  }
5282
5289
  ),
5283
- /* @__PURE__ */ e("text", { x: S, y: n - f.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: k.label })
5290
+ /* @__PURE__ */ e("text", { x: w, y: n - f.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: k.label })
5284
5291
  ] }, M);
5285
5292
  })
5286
5293
  ] }),
@@ -5345,16 +5352,16 @@ function Fs(t, n, l) {
5345
5352
  if (i >= h) {
5346
5353
  const p = _ / h;
5347
5354
  let b = o;
5348
- $.forEach((w, k) => {
5355
+ $.forEach((S, k) => {
5349
5356
  const M = x[k] / p;
5350
- c.push({ x: d, y: b, w: p, h: M, idx: w }), b += M;
5357
+ c.push({ x: d, y: b, w: p, h: M, idx: S }), b += M;
5351
5358
  }), a(r.slice(y), d + p, o, i - p, h);
5352
5359
  } else {
5353
5360
  const p = _ / i;
5354
5361
  let b = d;
5355
- $.forEach((w, k) => {
5362
+ $.forEach((S, k) => {
5356
5363
  const M = x[k] / p;
5357
- c.push({ x: b, y: o, w: M, h: p, idx: w }), b += M;
5364
+ c.push({ x: b, y: o, w: M, h: p, idx: S }), b += M;
5358
5365
  }), a(r.slice(y), d, o + p, i, h - p);
5359
5366
  }
5360
5367
  };
@@ -5409,36 +5416,36 @@ function po({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
5409
5416
  ] });
5410
5417
  }
5411
5418
  function mo({ series: t, height: n = 240, xFormat: l = Y, yFormat: c = Y, xMax: s, yMax: a, maxRadius: r = 18, className: d, ...o }) {
5412
- const { ref: i, width: h } = ce(n), u = X(), f = t.flatMap((M) => M.points), g = ye(s ?? Math.max(0, ...f.map((M) => M.x))), v = ye(a ?? Math.max(0, ...f.map((M) => M.y))), y = Math.max(1, ...f.map((M) => M.r ?? 0)), x = Be, $ = Math.max(0, h - x.left - x.right), _ = n - x.top - x.bottom, p = x.top + _, b = (M) => x.left + M / g * $, w = (M) => p - M / v * _, k = (M) => M.r ? 4 + Math.sqrt(M.r) / Math.sqrt(y) * (r - 4) : 4.5;
5419
+ const { ref: i, width: h } = ce(n), u = X(), f = t.flatMap((M) => M.points), g = ye(s ?? Math.max(0, ...f.map((M) => M.x))), v = ye(a ?? Math.max(0, ...f.map((M) => M.y))), y = Math.max(1, ...f.map((M) => M.r ?? 0)), x = Be, $ = Math.max(0, h - x.left - x.right), _ = n - x.top - x.bottom, p = x.top + _, b = (M) => x.left + M / g * $, S = (M) => p - M / v * _, k = (M) => M.r ? 4 + Math.sqrt(M.r) / Math.sqrt(y) * (r - 4) : 4.5;
5413
5420
  return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${d ? " " + d : ""}`, ref: i, children: [
5414
5421
  h > 0 && /* @__PURE__ */ m("svg", { width: h, height: n, className: "select-chart", children: [
5415
- we(v).map((M, S) => /* @__PURE__ */ m("g", { children: [
5422
+ we(v).map((M, w) => /* @__PURE__ */ m("g", { children: [
5416
5423
  /* @__PURE__ */ e(
5417
5424
  "line",
5418
5425
  {
5419
5426
  x1: x.left,
5420
5427
  x2: h - x.right,
5421
- y1: w(M),
5422
- y2: w(M),
5423
- className: S === 0 ? "select-chart__axis" : "select-chart__grid"
5428
+ y1: S(M),
5429
+ y2: S(M),
5430
+ className: w === 0 ? "select-chart__axis" : "select-chart__grid"
5424
5431
  }
5425
5432
  ),
5426
- /* @__PURE__ */ e("text", { x: x.left - 8, y: w(M), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: c(M) })
5427
- ] }, `y${S}`)),
5428
- we(g).map((M, S, N) => /* @__PURE__ */ e("text", { x: b(M), y: n - x.bottom + 16, className: "select-chart__xlabel", textAnchor: S === 0 ? "start" : S === N.length - 1 ? "end" : "middle", children: l(M) }, `x${S}`)),
5429
- t.map((M, S) => {
5430
- const N = M.color ?? j(S);
5433
+ /* @__PURE__ */ e("text", { x: x.left - 8, y: S(M), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: c(M) })
5434
+ ] }, `y${w}`)),
5435
+ we(g).map((M, w, N) => /* @__PURE__ */ e("text", { x: b(M), y: n - x.bottom + 16, className: "select-chart__xlabel", textAnchor: w === 0 ? "start" : w === N.length - 1 ? "end" : "middle", children: l(M) }, `x${w}`)),
5436
+ t.map((M, w) => {
5437
+ const N = M.color ?? j(w);
5431
5438
  return /* @__PURE__ */ e("g", { fill: N, children: M.points.map((C, L) => /* @__PURE__ */ e(
5432
5439
  "circle",
5433
5440
  {
5434
5441
  cx: b(C.x),
5435
- cy: w(C.y),
5442
+ cy: S(C.y),
5436
5443
  r: k(C),
5437
5444
  className: "select-chart__point",
5438
5445
  onMouseEnter: () => u.show({
5439
5446
  x: b(C.x),
5440
- y: w(C.y) - k(C),
5441
- place: w(C.y) - k(C) < x.top + 52 ? "bottom" : "top",
5447
+ y: S(C.y) - k(C),
5448
+ place: S(C.y) - k(C) < x.top + 52 ? "bottom" : "top",
5442
5449
  title: C.label ?? M.name,
5443
5450
  rows: [
5444
5451
  { label: "X", value: l(C.x), color: N },
@@ -5449,32 +5456,32 @@ function mo({ series: t, height: n = 240, xFormat: l = Y, yFormat: c = Y, xMax:
5449
5456
  onMouseLeave: u.hide
5450
5457
  },
5451
5458
  L
5452
- )) }, S);
5459
+ )) }, w);
5453
5460
  })
5454
5461
  ] }),
5455
5462
  /* @__PURE__ */ e(K, { tip: u.tip })
5456
5463
  ] });
5457
5464
  }
5458
5465
  const fo = R(function({ axes: n, series: l, size: c = 240, max: s, format: a = Y, levels: r = 4, legend: d = !0, className: o, ...i }, h) {
5459
- const u = X(), f = te(), g = n.length, v = c / 2, y = c / 2, x = c / 2 - 30, $ = s ?? ye(Math.max(1, ...l.flatMap((w) => w.values))), _ = (w) => (-90 + w * 360 / g) * Math.PI / 180, p = (w, k) => [v + k * Math.cos(_(w)), y + k * Math.sin(_(w))], b = (w) => w.map((k, M) => `${M === 0 ? "M" : "L"}${p(M, k).map((S) => S.toFixed(2)).join(",")}`).join(" ") + " Z";
5466
+ const u = X(), f = te(), g = n.length, v = c / 2, y = c / 2, x = c / 2 - 30, $ = s ?? ye(Math.max(1, ...l.flatMap((S) => S.values))), _ = (S) => (-90 + S * 360 / g) * Math.PI / 180, p = (S, k) => [v + k * Math.cos(_(S)), y + k * Math.sin(_(S))], b = (S) => S.map((k, M) => `${M === 0 ? "M" : "L"}${p(M, k).map((w) => w.toFixed(2)).join(",")}`).join(" ") + " Z";
5460
5467
  return /* @__PURE__ */ m("div", { ref: h, ...i, className: `select-donut-wrap${o ? " " + o : ""}`, children: [
5461
5468
  /* @__PURE__ */ m("div", { className: "select-radar", style: { width: c, aspectRatio: "1" }, children: [
5462
5469
  /* @__PURE__ */ m("svg", { width: c, height: c, viewBox: `0 0 ${c} ${c}`, className: "select-chart", "aria-hidden": "true", children: [
5463
- /* @__PURE__ */ e("defs", { children: l.map((w, k) => {
5464
- const M = w.color ?? j(k);
5470
+ /* @__PURE__ */ e("defs", { children: l.map((S, k) => {
5471
+ const M = S.color ?? j(k);
5465
5472
  return /* @__PURE__ */ m("radialGradient", { id: `${f}-rd${k}`, children: [
5466
5473
  /* @__PURE__ */ e("stop", { offset: "0%", stopColor: M, stopOpacity: 0.32 }),
5467
5474
  /* @__PURE__ */ e("stop", { offset: "100%", stopColor: M, stopOpacity: 0.12 })
5468
5475
  ] }, k);
5469
5476
  }) }),
5470
- Array.from({ length: r }, (w, k) => {
5477
+ Array.from({ length: r }, (S, k) => {
5471
5478
  const M = x * (k + 1) / r;
5472
5479
  return /* @__PURE__ */ e("path", { d: b(n.map(() => M)), className: "select-chart__grid", fill: "none" }, k);
5473
5480
  }),
5474
- n.map((w, k) => {
5475
- const [M, S] = p(k, x), [N, C] = p(k, x + 14);
5481
+ n.map((S, k) => {
5482
+ const [M, w] = p(k, x), [N, C] = p(k, x + 14);
5476
5483
  return /* @__PURE__ */ m("g", { children: [
5477
- /* @__PURE__ */ e("line", { x1: v, y1: y, x2: M, y2: S, className: "select-chart__grid" }),
5484
+ /* @__PURE__ */ e("line", { x1: v, y1: y, x2: M, y2: w, className: "select-chart__grid" }),
5478
5485
  /* @__PURE__ */ e(
5479
5486
  "text",
5480
5487
  {
@@ -5483,16 +5490,16 @@ const fo = R(function({ axes: n, series: l, size: c = 240, max: s, format: a = Y
5483
5490
  className: "select-chart__xlabel",
5484
5491
  textAnchor: Math.abs(N - v) < 4 ? "middle" : N > v ? "start" : "end",
5485
5492
  dominantBaseline: "middle",
5486
- children: w
5493
+ children: S
5487
5494
  }
5488
5495
  )
5489
5496
  ] }, k);
5490
5497
  }),
5491
- l.map((w, k) => {
5492
- const M = w.color ?? j(k), S = w.values.map((N) => Math.max(0, N) / $ * x);
5498
+ l.map((S, k) => {
5499
+ const M = S.color ?? j(k), w = S.values.map((N) => Math.max(0, N) / $ * x);
5493
5500
  return /* @__PURE__ */ m("g", { children: [
5494
- /* @__PURE__ */ e("path", { d: b(S), fill: `url(#${f}-rd${k})`, stroke: M, strokeWidth: 2, strokeLinejoin: "round", className: "select-chart__area" }),
5495
- S.map((N, C) => {
5501
+ /* @__PURE__ */ e("path", { d: b(w), fill: `url(#${f}-rd${k})`, stroke: M, strokeWidth: 2, strokeLinejoin: "round", className: "select-chart__area" }),
5502
+ w.map((N, C) => {
5496
5503
  const [L, E] = p(C, N);
5497
5504
  return /* @__PURE__ */ e(
5498
5505
  "circle",
@@ -5507,7 +5514,7 @@ const fo = R(function({ axes: n, series: l, size: c = 240, max: s, format: a = Y
5507
5514
  y: E,
5508
5515
  place: E < 44 ? "bottom" : "top",
5509
5516
  title: n[C],
5510
- rows: [{ label: w.name, value: a(w.values[C] ?? 0), color: M }]
5517
+ rows: [{ label: S.name, value: a(S.values[C] ?? 0), color: M }]
5511
5518
  }),
5512
5519
  onMouseLeave: u.hide
5513
5520
  },
@@ -5519,9 +5526,9 @@ const fo = R(function({ axes: n, series: l, size: c = 240, max: s, format: a = Y
5519
5526
  ] }),
5520
5527
  /* @__PURE__ */ e(K, { tip: u.tip })
5521
5528
  ] }),
5522
- d && l.length > 1 && /* @__PURE__ */ e("ul", { className: "select-donut__legend", children: l.map((w, k) => /* @__PURE__ */ m("li", { className: "select-donut__legitem", children: [
5523
- /* @__PURE__ */ e("span", { className: "select-donut__dot", style: { background: w.color ?? j(k) } }),
5524
- /* @__PURE__ */ e("span", { className: "select-donut__leglabel", children: w.name })
5529
+ d && l.length > 1 && /* @__PURE__ */ e("ul", { className: "select-donut__legend", children: l.map((S, k) => /* @__PURE__ */ m("li", { className: "select-donut__legitem", children: [
5530
+ /* @__PURE__ */ e("span", { className: "select-donut__dot", style: { background: S.color ?? j(k) } }),
5531
+ /* @__PURE__ */ e("span", { className: "select-donut__leglabel", children: S.name })
5525
5532
  ] }, k)) })
5526
5533
  ] });
5527
5534
  });
@@ -5533,24 +5540,24 @@ function _o({ links: t, height: n = 260, format: l = Y, nodeWidth: c = 14, nodeG
5533
5540
  const E = /* @__PURE__ */ new Map();
5534
5541
  let A = v;
5535
5542
  return N.forEach((F, B) => {
5536
- const W = g(F, C) * _;
5537
- E.set(F, { name: F, y: A, h: W, cursor: A, color: j(B + L) }), A += W + s;
5543
+ const T = g(F, C) * _;
5544
+ E.set(F, { name: F, y: A, h: T, cursor: A, color: j(B + L) }), A += T + s;
5538
5545
  }), E;
5539
- }, b = p(h, "source", 0), w = p(u, "target", h.length), k = c, M = o - c, S = (k + M) / 2;
5546
+ }, b = p(h, "source", 0), S = p(u, "target", h.length), k = c, M = o - c, w = (k + M) / 2;
5540
5547
  return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: d, children: [
5541
5548
  o > 0 && /* @__PURE__ */ m("svg", { width: o, height: n, className: "select-chart", children: [
5542
5549
  t.map((N, C) => {
5543
- const L = b.get(N.source), E = w.get(N.target), A = N.value * _, F = L.cursor, B = E.cursor;
5550
+ const L = b.get(N.source), E = S.get(N.target), A = N.value * _, F = L.cursor, B = E.cursor;
5544
5551
  L.cursor += A, E.cursor += A;
5545
- const W = `M${k},${F} C${S},${F} ${S},${B} ${M},${B} L${M},${B + A} C${S},${B + A} ${S},${F + A} ${k},${F + A} Z`;
5552
+ const T = `M${k},${F} C${w},${F} ${w},${B} ${M},${B} L${M},${B + A} C${w},${B + A} ${w},${F + A} ${k},${F + A} Z`;
5546
5553
  return /* @__PURE__ */ e(
5547
5554
  "path",
5548
5555
  {
5549
- d: W,
5556
+ d: T,
5550
5557
  fill: L.color,
5551
5558
  className: "select-sankey__link",
5552
5559
  onMouseEnter: () => i.show({
5553
- x: S,
5560
+ x: w,
5554
5561
  y: (F + B + A) / 2,
5555
5562
  place: "top",
5556
5563
  title: `${N.source} → ${N.target}`,
@@ -5565,7 +5572,7 @@ function _o({ links: t, height: n = 260, format: l = Y, nodeWidth: c = 14, nodeG
5565
5572
  /* @__PURE__ */ e("rect", { x: 0, y: N.y, width: c, height: Math.max(1, N.h), rx: 3, fill: N.color, className: "select-sankey__node" }),
5566
5573
  /* @__PURE__ */ e("text", { x: c + 6, y: N.y + N.h / 2, className: "select-sankey__label", dominantBaseline: "middle", textAnchor: "start", children: N.name })
5567
5574
  ] }, `s${C}`)),
5568
- [...w.values()].map((N, C) => /* @__PURE__ */ m("g", { children: [
5575
+ [...S.values()].map((N, C) => /* @__PURE__ */ m("g", { children: [
5569
5576
  /* @__PURE__ */ e("rect", { x: o - c, y: N.y, width: c, height: Math.max(1, N.h), rx: 3, fill: N.color, className: "select-sankey__node" }),
5570
5577
  /* @__PURE__ */ e("text", { x: o - c - 6, y: N.y + N.h / 2, className: "select-sankey__label", dominantBaseline: "middle", textAnchor: "end", children: N.name })
5571
5578
  ] }, `t${C}`))
@@ -5574,46 +5581,46 @@ function _o({ links: t, height: n = 260, format: l = Y, nodeWidth: c = 14, nodeG
5574
5581
  ] });
5575
5582
  }
5576
5583
  function vo({ data: t, height: n = 240, format: l = Y, upColor: c = "var(--select-chart-4)", downColor: s = "var(--select-chart-3)", className: a, ...r }) {
5577
- const { ref: d, width: o } = ce(n), i = X(), h = Be, u = Math.max(0, o - h.left - h.right), f = n - h.top - h.bottom, g = h.top + f, v = Math.max(1, ...t.map((S) => S.high)), y = Math.min(v, ...t.map((S) => S.low)), x = (v - y) * 0.08 || 1, $ = y - x, _ = v + x, p = (S) => g - (S - $) / (_ - $) * f, b = t.length, w = b ? u / b : 0, k = Math.min(w * 0.5, 18), M = Array.from({ length: 5 }, (S, N) => $ + (_ - $) * N / 4);
5584
+ const { ref: d, width: o } = ce(n), i = X(), h = Be, u = Math.max(0, o - h.left - h.right), f = n - h.top - h.bottom, g = h.top + f, v = Math.max(1, ...t.map((w) => w.high)), y = Math.min(v, ...t.map((w) => w.low)), x = (v - y) * 0.08 || 1, $ = y - x, _ = v + x, p = (w) => g - (w - $) / (_ - $) * f, b = t.length, S = b ? u / b : 0, k = Math.min(S * 0.5, 18), M = Array.from({ length: 5 }, (w, N) => $ + (_ - $) * N / 4);
5578
5585
  return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: d, children: [
5579
5586
  o > 0 && /* @__PURE__ */ m("svg", { width: o, height: n, className: "select-chart", children: [
5580
- M.map((S, N) => /* @__PURE__ */ m("g", { children: [
5587
+ M.map((w, N) => /* @__PURE__ */ m("g", { children: [
5581
5588
  /* @__PURE__ */ e(
5582
5589
  "line",
5583
5590
  {
5584
5591
  x1: h.left,
5585
5592
  x2: o - h.right,
5586
- y1: p(S),
5587
- y2: p(S),
5593
+ y1: p(w),
5594
+ y2: p(w),
5588
5595
  className: N === 0 ? "select-chart__axis" : "select-chart__grid"
5589
5596
  }
5590
5597
  ),
5591
- /* @__PURE__ */ e("text", { x: h.left - 8, y: p(S), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(S) })
5598
+ /* @__PURE__ */ e("text", { x: h.left - 8, y: p(w), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(w) })
5592
5599
  ] }, N)),
5593
- t.map((S, N) => {
5594
- const C = h.left + w * N + w / 2, L = S.close >= S.open, E = L ? c : s, A = p(Math.max(S.open, S.close)), F = Math.max(1, Math.abs(p(S.open) - p(S.close)));
5600
+ t.map((w, N) => {
5601
+ const C = h.left + S * N + S / 2, L = w.close >= w.open, E = L ? c : s, A = p(Math.max(w.open, w.close)), F = Math.max(1, Math.abs(p(w.open) - p(w.close)));
5595
5602
  return /* @__PURE__ */ m("g", { children: [
5596
- /* @__PURE__ */ e("line", { x1: C, x2: C, y1: p(S.high), y2: p(S.low), stroke: E, strokeWidth: 1.5 }),
5603
+ /* @__PURE__ */ e("line", { x1: C, x2: C, y1: p(w.high), y2: p(w.low), stroke: E, strokeWidth: 1.5 }),
5597
5604
  /* @__PURE__ */ e("rect", { x: C - k / 2, y: A, width: k, height: F, rx: 2, fill: E, fillOpacity: L ? 0.9 : 0.78 }),
5598
- /* @__PURE__ */ e("text", { x: C, y: n - h.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: S.label }),
5605
+ /* @__PURE__ */ e("text", { x: C, y: n - h.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: w.label }),
5599
5606
  /* @__PURE__ */ e(
5600
5607
  "rect",
5601
5608
  {
5602
- x: h.left + w * N,
5609
+ x: h.left + S * N,
5603
5610
  y: h.top,
5604
- width: w,
5611
+ width: S,
5605
5612
  height: f,
5606
5613
  fill: "transparent",
5607
5614
  onMouseEnter: () => i.show({
5608
5615
  x: C,
5609
- y: p(S.high),
5610
- place: p(S.high) < h.top + 64 ? "bottom" : "top",
5611
- title: S.label,
5616
+ y: p(w.high),
5617
+ place: p(w.high) < h.top + 64 ? "bottom" : "top",
5618
+ title: w.label,
5612
5619
  rows: [
5613
- { label: "Abertura", value: l(S.open), color: E },
5614
- { label: "Máxima", value: l(S.high) },
5615
- { label: "Mínima", value: l(S.low) },
5616
- { label: "Fechamento", value: l(S.close) }
5620
+ { label: "Abertura", value: l(w.open), color: E },
5621
+ { label: "Máxima", value: l(w.high) },
5622
+ { label: "Mínima", value: l(w.low) },
5623
+ { label: "Fechamento", value: l(w.close) }
5617
5624
  ]
5618
5625
  }),
5619
5626
  onMouseLeave: i.hide
@@ -5682,7 +5689,7 @@ function go({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
5682
5689
  ] });
5683
5690
  }
5684
5691
  function bo({ data: t, height: n, min: l, max: c, format: s = Y, labelWidth: a = 96, className: r, ...d }) {
5685
- const f = n ?? t.length * 36 + 6 + 26, { ref: g, width: v } = ce(f), y = X(), x = te(), $ = l ?? Math.min(0, ...t.map((L) => L.start)), p = (c ?? Math.max(1, ...t.map((L) => L.end))) - $ || 1, b = a, w = Math.max(0, v - b - 14), k = f - 6 - 26, M = t.length ? k / t.length : 0, S = Math.min(M * 0.6, 22), N = (L) => b + (L - $) / p * w, C = Array.from({ length: 5 }, (L, E) => $ + p * E / 4);
5692
+ const f = n ?? t.length * 36 + 6 + 26, { ref: g, width: v } = ce(f), y = X(), x = te(), $ = l ?? Math.min(0, ...t.map((L) => L.start)), p = (c ?? Math.max(1, ...t.map((L) => L.end))) - $ || 1, b = a, S = Math.max(0, v - b - 14), k = f - 6 - 26, M = t.length ? k / t.length : 0, w = Math.min(M * 0.6, 22), N = (L) => b + (L - $) / p * S, C = Array.from({ length: 5 }, (L, E) => $ + p * E / 4);
5686
5693
  return /* @__PURE__ */ m("div", { ...d, className: `select-chart-wrap${r ? " " + r : ""}`, ref: g, children: [
5687
5694
  v > 0 && /* @__PURE__ */ m("svg", { width: v, height: f, className: "select-chart", children: [
5688
5695
  /* @__PURE__ */ e("defs", { children: t.map((L, E) => {
@@ -5706,25 +5713,25 @@ function bo({ data: t, height: n, min: l, max: c, format: s = Y, labelWidth: a =
5706
5713
  /* @__PURE__ */ e("text", { x: N(L), y: f - 26 + 16, className: "select-chart__xlabel", textAnchor: "middle", children: s(L) })
5707
5714
  ] }, E)),
5708
5715
  t.map((L, E) => {
5709
- const A = 6 + M * E + M / 2, F = N(L.start), B = Math.max(2, N(L.end) - N(L.start)), W = L.color ?? j(E);
5716
+ const A = 6 + M * E + M / 2, F = N(L.start), B = Math.max(2, N(L.end) - N(L.start)), T = L.color ?? j(E);
5710
5717
  return /* @__PURE__ */ m("g", { children: [
5711
5718
  /* @__PURE__ */ e(
5712
5719
  "rect",
5713
5720
  {
5714
5721
  x: F,
5715
- y: A - S / 2,
5722
+ y: A - w / 2,
5716
5723
  width: B,
5717
- height: S,
5724
+ height: w,
5718
5725
  rx: 5,
5719
5726
  fill: `url(#${x}-rg${E})`,
5720
5727
  className: "select-chart__hbar",
5721
5728
  style: { animationDelay: `${E * 40}ms` },
5722
5729
  onMouseEnter: () => y.show({
5723
5730
  x: F + B / 2,
5724
- y: A - S / 2,
5725
- place: A - S / 2 < 50 ? "bottom" : "top",
5731
+ y: A - w / 2,
5732
+ place: A - w / 2 < 50 ? "bottom" : "top",
5726
5733
  title: L.label,
5727
- rows: [{ label: "Intervalo", value: `${s(L.start)} – ${s(L.end)}`, color: W }]
5734
+ rows: [{ label: "Intervalo", value: `${s(L.start)} – ${s(L.end)}`, color: T }]
5728
5735
  }),
5729
5736
  onMouseLeave: y.hide
5730
5737
  }
@@ -5739,17 +5746,17 @@ function bo({ data: t, height: n, min: l, max: c, format: s = Y, labelWidth: a =
5739
5746
  const xo = R(function({ weeks: n, color: l = "var(--select-chart-4)", dayLabels: c = ["Seg", "", "Qua", "", "Sex", "", "Dom"], columnLabels: s, format: a = Y, cell: r = 14, gap: d = 3, min: o, max: i, className: h, ...u }, f) {
5740
5747
  const g = X();
5741
5748
  te();
5742
- const v = n.flat().filter((S) => S != null && Number.isFinite(S)), y = o ?? (v.length ? Math.min(...v) : 0), $ = (i ?? (v.length ? Math.max(...v) : 1)) - y || 1, _ = 30, p = s ? 16 : 4, b = r + d, w = _ + n.length * b, k = p + 7 * b, M = { "--heat-color": l };
5749
+ const v = n.flat().filter((w) => w != null && Number.isFinite(w)), y = o ?? (v.length ? Math.min(...v) : 0), $ = (i ?? (v.length ? Math.max(...v) : 1)) - y || 1, _ = 30, p = s ? 16 : 4, b = r + d, S = _ + n.length * b, k = p + 7 * b, M = { "--heat-color": l };
5743
5750
  return /* @__PURE__ */ m("div", { ref: f, ...u, className: `select-chart-wrap select-calheat${h ? " " + h : ""}`, style: M, children: [
5744
- /* @__PURE__ */ m("svg", { width: w, height: k, className: "select-chart", children: [
5751
+ /* @__PURE__ */ m("svg", { width: S, height: k, className: "select-chart", children: [
5745
5752
  c.map(
5746
- (S, N) => S ? /* @__PURE__ */ e("text", { x: _ - 6, y: p + N * b + r / 2, className: "select-chart__xlabel", dominantBaseline: "middle", textAnchor: "end", children: S }, N) : null
5753
+ (w, N) => w ? /* @__PURE__ */ e("text", { x: _ - 6, y: p + N * b + r / 2, className: "select-chart__xlabel", dominantBaseline: "middle", textAnchor: "end", children: w }, N) : null
5747
5754
  ),
5748
5755
  s == null ? void 0 : s.map(
5749
- (S, N) => S ? /* @__PURE__ */ e("text", { x: _ + N * b, y: p - 4, className: "select-chart__xlabel", textAnchor: "start", children: S }, N) : null
5756
+ (w, N) => w ? /* @__PURE__ */ e("text", { x: _ + N * b, y: p - 4, className: "select-chart__xlabel", textAnchor: "start", children: w }, N) : null
5750
5757
  ),
5751
5758
  n.map(
5752
- (S, N) => S.map((C, L) => {
5759
+ (w, N) => w.map((C, L) => {
5753
5760
  const E = _ + N * b, A = p + L * b;
5754
5761
  if (C == null || !Number.isFinite(C))
5755
5762
  return /* @__PURE__ */ e("rect", { x: E, y: A, width: r, height: r, rx: 3, className: "select-chart__calcell select-chart__calcell--empty" }, `${N}-${L}`);
@@ -5787,15 +5794,15 @@ const xo = R(function({ weeks: n, color: l = "var(--select-chart-4)", dayLabels:
5787
5794
  /* @__PURE__ */ m("svg", { width: l, height: l, viewBox: `0 0 ${l} ${l}`, className: "select-chart", "aria-hidden": "true", children: [
5788
5795
  [0.34, 0.67, 1].map(($, _) => /* @__PURE__ */ e("circle", { cx: h, cy: u, r: f * $, className: "select-chart__grid", fill: "none" }, _)),
5789
5796
  n.map(($, _) => {
5790
- const p = _ * x, b = (_ + 1) * x - 1.5, w = $.color ?? j(_), k = Math.max(2, y($.value)), M = ((p + b) / 2 - 90) * (Math.PI / 180), S = h + k * Math.cos(M), N = u + k * Math.sin(M);
5797
+ const p = _ * x, b = (_ + 1) * x - 1.5, S = $.color ?? j(_), k = Math.max(2, y($.value)), M = ((p + b) / 2 - 90) * (Math.PI / 180), w = h + k * Math.cos(M), N = u + k * Math.sin(M);
5791
5798
  return /* @__PURE__ */ e(
5792
5799
  "path",
5793
5800
  {
5794
5801
  d: it(h, u, k, 0, p, b),
5795
- fill: w,
5802
+ fill: S,
5796
5803
  fillOpacity: 0.8,
5797
5804
  className: "select-chart__seg",
5798
- onMouseEnter: () => i.show({ x: S, y: N, place: N < u ? "top" : "bottom", title: $.label, rows: [{ label: "Valor", value: c($.value), color: w }] }),
5805
+ onMouseEnter: () => i.show({ x: w, y: N, place: N < u ? "top" : "bottom", title: $.label, rows: [{ label: "Valor", value: c($.value), color: S }] }),
5799
5806
  onMouseLeave: i.hide
5800
5807
  },
5801
5808
  _
@@ -5859,29 +5866,29 @@ function No({ data: t, leftLabel: n, rightLabel: l, height: c = 240, format: s =
5859
5866
  ] });
5860
5867
  }
5861
5868
  function Mo({ data: t, height: n, format: l = Y, fromLabel: c = "Antes", toLabel: s = "Depois", labelWidth: a = 96, className: r, ...d }) {
5862
- const f = n ?? t.length * 34 + 6 + 26, { ref: g, width: v } = ce(f), y = X(), x = "var(--select-chart-2)", $ = "var(--select-chart-1)", _ = ye(Math.max(1, ...t.flatMap((S) => [S.from, S.to]))), p = a, b = Math.max(0, v - p - 14), w = f - 6 - 26, k = t.length ? w / t.length : 0, M = (S) => p + S / _ * b;
5869
+ const f = n ?? t.length * 34 + 6 + 26, { ref: g, width: v } = ce(f), y = X(), x = "var(--select-chart-2)", $ = "var(--select-chart-1)", _ = ye(Math.max(1, ...t.flatMap((w) => [w.from, w.to]))), p = a, b = Math.max(0, v - p - 14), S = f - 6 - 26, k = t.length ? S / t.length : 0, M = (w) => p + w / _ * b;
5863
5870
  return /* @__PURE__ */ m("div", { ...d, className: `select-chart-wrap${r ? " " + r : ""}`, ref: g, children: [
5864
5871
  v > 0 && /* @__PURE__ */ m("svg", { width: v, height: f, className: "select-chart", children: [
5865
- we(_).map((S, N) => /* @__PURE__ */ m("g", { children: [
5872
+ we(_).map((w, N) => /* @__PURE__ */ m("g", { children: [
5866
5873
  /* @__PURE__ */ e(
5867
5874
  "line",
5868
5875
  {
5869
- x1: M(S),
5870
- x2: M(S),
5876
+ x1: M(w),
5877
+ x2: M(w),
5871
5878
  y1: 6,
5872
- y2: 6 + w,
5879
+ y2: 6 + S,
5873
5880
  className: N === 0 ? "select-chart__axis" : "select-chart__grid"
5874
5881
  }
5875
5882
  ),
5876
- /* @__PURE__ */ e("text", { x: M(S), y: f - 26 + 16, className: "select-chart__xlabel", textAnchor: "middle", children: l(S) })
5883
+ /* @__PURE__ */ e("text", { x: M(w), y: f - 26 + 16, className: "select-chart__xlabel", textAnchor: "middle", children: l(w) })
5877
5884
  ] }, N)),
5878
- t.map((S, N) => {
5885
+ t.map((w, N) => {
5879
5886
  const C = 6 + k * N + k / 2;
5880
5887
  return /* @__PURE__ */ m("g", { children: [
5881
- /* @__PURE__ */ e("line", { x1: M(S.from), x2: M(S.to), y1: C, y2: C, stroke: "var(--select-chart-track)", strokeWidth: 4, strokeLinecap: "round" }),
5882
- /* @__PURE__ */ e("circle", { cx: M(S.from), cy: C, r: 5, fill: x, className: "select-chart__dot" }),
5883
- /* @__PURE__ */ e("circle", { cx: M(S.to), cy: C, r: 5, fill: $, className: "select-chart__dot" }),
5884
- /* @__PURE__ */ e("text", { x: p - 8, y: C, className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: S.label }),
5888
+ /* @__PURE__ */ e("line", { x1: M(w.from), x2: M(w.to), y1: C, y2: C, stroke: "var(--select-chart-track)", strokeWidth: 4, strokeLinecap: "round" }),
5889
+ /* @__PURE__ */ e("circle", { cx: M(w.from), cy: C, r: 5, fill: x, className: "select-chart__dot" }),
5890
+ /* @__PURE__ */ e("circle", { cx: M(w.to), cy: C, r: 5, fill: $, className: "select-chart__dot" }),
5891
+ /* @__PURE__ */ e("text", { x: p - 8, y: C, className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: w.label }),
5885
5892
  /* @__PURE__ */ e(
5886
5893
  "rect",
5887
5894
  {
@@ -5891,14 +5898,14 @@ function Mo({ data: t, height: n, format: l = Y, fromLabel: c = "Antes", toLabel
5891
5898
  height: k,
5892
5899
  fill: "transparent",
5893
5900
  onMouseEnter: () => y.show({
5894
- x: (M(S.from) + M(S.to)) / 2,
5901
+ x: (M(w.from) + M(w.to)) / 2,
5895
5902
  y: C - 8,
5896
5903
  place: C - 8 < 50 ? "bottom" : "top",
5897
- title: S.label,
5904
+ title: w.label,
5898
5905
  rows: [
5899
- { label: c, value: l(S.from), color: x },
5900
- { label: s, value: l(S.to), color: $ },
5901
- { label: "Δ", value: `${S.to - S.from >= 0 ? "+" : ""}${l(S.to - S.from)}` }
5906
+ { label: c, value: l(w.from), color: x },
5907
+ { label: s, value: l(w.to), color: $ },
5908
+ { label: "Δ", value: `${w.to - w.from >= 0 ? "+" : ""}${l(w.to - w.from)}` }
5902
5909
  ]
5903
5910
  }),
5904
5911
  onMouseLeave: y.hide
@@ -5911,7 +5918,7 @@ function Mo({ data: t, height: n, format: l = Y, fromLabel: c = "Antes", toLabel
5911
5918
  ] });
5912
5919
  }
5913
5920
  function $o({ columns: t, height: n = 240, format: l = Y, gap: c = 3, className: s, ...a }) {
5914
- const { ref: r, width: d } = ce(n), o = X(), i = { top: 6, right: 6, bottom: 24, left: 6 }, h = Math.max(0, d - i.left - i.right), u = n - i.top - i.bottom, f = t.map((p) => p.segments.reduce((b, w) => b + w.value, 0)), g = f.reduce((p, b) => p + b, 0) || 1, v = [];
5921
+ const { ref: r, width: d } = ce(n), o = X(), i = { top: 6, right: 6, bottom: 24, left: 6 }, h = Math.max(0, d - i.left - i.right), u = n - i.top - i.bottom, f = t.map((p) => p.segments.reduce((b, S) => b + S.value, 0)), g = f.reduce((p, b) => p + b, 0) || 1, v = [];
5915
5922
  t.forEach((p) => p.segments.forEach((b) => {
5916
5923
  v.includes(b.key) || v.push(b.key);
5917
5924
  }));
@@ -5919,13 +5926,13 @@ function $o({ columns: t, height: n = 240, format: l = Y, gap: c = 3, className:
5919
5926
  let _ = i.left;
5920
5927
  return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
5921
5928
  d > 0 && /* @__PURE__ */ e("svg", { width: d, height: n, className: "select-chart", children: t.map((p, b) => {
5922
- const w = f[b] || 1, k = w / g * $, M = _;
5929
+ const S = f[b] || 1, k = S / g * $, M = _;
5923
5930
  _ += k + c;
5924
- let S = i.top;
5931
+ let w = i.top;
5925
5932
  return /* @__PURE__ */ m("g", { children: [
5926
5933
  p.segments.map((N, C) => {
5927
- const L = N.value / w * u, E = S;
5928
- S += L;
5934
+ const L = N.value / S * u, E = w;
5935
+ w += L;
5929
5936
  const A = y(N.key, N.color);
5930
5937
  return /* @__PURE__ */ e(
5931
5938
  "rect",
@@ -5944,7 +5951,7 @@ function $o({ columns: t, height: n = 240, format: l = Y, gap: c = 3, className:
5944
5951
  title: `${p.label} · ${N.key}`,
5945
5952
  rows: [
5946
5953
  { label: "Valor", value: l(N.value), color: A },
5947
- { label: "Share", value: `${Math.round(N.value / w * 100)}%` }
5954
+ { label: "Share", value: `${Math.round(N.value / S * 100)}%` }
5948
5955
  ]
5949
5956
  }),
5950
5957
  onMouseLeave: o.hide
@@ -5967,17 +5974,17 @@ const ko = R(function({ value: n, max: l = 100, bands: c, size: s = 220, thickne
5967
5974
  const E = Math.PI + L * Math.PI;
5968
5975
  return [v + g * Math.cos(E), y + g * Math.sin(E)];
5969
5976
  }, p = (L, E) => {
5970
- const [A, F] = _(L), [B, W] = _(E);
5971
- return `M ${A.toFixed(2)} ${F.toFixed(2)} A ${g} ${g} 0 0 1 ${B.toFixed(2)} ${W.toFixed(2)}`;
5977
+ const [A, F] = _(L), [B, T] = _(E);
5978
+ return `M ${A.toFixed(2)} ${F.toFixed(2)} A ${g} ${g} 0 0 1 ${B.toFixed(2)} ${T.toFixed(2)}`;
5972
5979
  };
5973
5980
  let b = 0;
5974
- const w = c.map((L) => {
5981
+ const S = c.map((L) => {
5975
5982
  const E = $(b) / l, A = $(L.upTo) / l;
5976
5983
  return b = L.upTo, { t0: E, t1: A, color: L.color };
5977
- }), k = $(n) / l, M = Math.PI + k * Math.PI, S = g * 0.82, N = v + S * Math.cos(M), C = y + S * Math.sin(M);
5984
+ }), k = $(n) / l, M = Math.PI + k * Math.PI, w = g * 0.82, N = v + w * Math.cos(M), C = y + w * Math.sin(M);
5978
5985
  return /* @__PURE__ */ e("div", { ref: h, ...i, className: `select-gauge${o ? " " + o : ""}`, style: { width: `${s / 16}rem` }, children: /* @__PURE__ */ m("div", { className: "select-gauge__ring", style: { width: "100%", aspectRatio: `${s} / ${x}` }, children: [
5979
5986
  /* @__PURE__ */ m("svg", { width: "100%", height: "100%", viewBox: `0 0 ${s} ${x}`, className: "select-chart", "aria-hidden": "true", children: [
5980
- w.map((L, E) => /* @__PURE__ */ e("path", { d: p(L.t0, L.t1), fill: "none", stroke: L.color, strokeWidth: u, strokeLinecap: "butt" }, E)),
5987
+ S.map((L, E) => /* @__PURE__ */ e("path", { d: p(L.t0, L.t1), fill: "none", stroke: L.color, strokeWidth: u, strokeLinecap: "butt" }, E)),
5981
5988
  /* @__PURE__ */ e("line", { x1: v, y1: y, x2: N, y2: C, stroke: "var(--select-text)", strokeWidth: 3, strokeLinecap: "round", className: "select-gaugeband__needle" }),
5982
5989
  /* @__PURE__ */ e("circle", { cx: v, cy: y, r: 5, fill: "var(--select-text)" })
5983
5990
  ] }),
@@ -5988,20 +5995,20 @@ const ko = R(function({ value: n, max: l = 100, bands: c, size: s = 220, thickne
5988
5995
  ] }) });
5989
5996
  });
5990
5997
  function wo({ series: t, labels: n, height: l = 240, format: c = Y, className: s, ...a }) {
5991
- const { ref: r, width: d } = ce(l), o = X(), i = te(), [h, u] = D(null), f = n.length, g = { top: 14, right: 14, bottom: 28, left: 14 }, v = Math.max(0, d - g.left - g.right), y = l - g.top - g.bottom, x = n.map((k, M) => t.reduce((S, N) => S + (N.data[M] ?? 0), 0)), $ = Math.max(1, ...x), _ = y / $, p = (k) => g.left + (f <= 1 ? v / 2 : k / (f - 1) * v), b = n.map(() => 0), w = t.map((k, M) => {
5992
- const S = [], N = [];
5998
+ const { ref: r, width: d } = ce(l), o = X(), i = te(), [h, u] = D(null), f = n.length, g = { top: 14, right: 14, bottom: 28, left: 14 }, v = Math.max(0, d - g.left - g.right), y = l - g.top - g.bottom, x = n.map((k, M) => t.reduce((w, N) => w + (N.data[M] ?? 0), 0)), $ = Math.max(1, ...x), _ = y / $, p = (k) => g.left + (f <= 1 ? v / 2 : k / (f - 1) * v), b = n.map(() => 0), S = t.map((k, M) => {
5999
+ const w = [], N = [];
5993
6000
  return n.forEach((C, L) => {
5994
6001
  const A = g.top + (y - x[L] * _) / 2 + b[L] * _, F = A + (k.data[L] ?? 0) * _;
5995
- S.push([p(L), A]), N.push([p(L), F]), b[L] = b[L] + (k.data[L] ?? 0);
5996
- }), { upper: S, lower: N, color: k.color ?? j(M), name: k.name };
6002
+ w.push([p(L), A]), N.push([p(L), F]), b[L] = b[L] + (k.data[L] ?? 0);
6003
+ }), { upper: w, lower: N, color: k.color ?? j(M), name: k.name };
5997
6004
  });
5998
6005
  return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
5999
6006
  d > 0 && /* @__PURE__ */ m("svg", { width: d, height: l, className: "select-chart", children: [
6000
- /* @__PURE__ */ e("defs", { children: w.map((k, M) => /* @__PURE__ */ m("linearGradient", { id: `${i}-st${M}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
6007
+ /* @__PURE__ */ e("defs", { children: S.map((k, M) => /* @__PURE__ */ m("linearGradient", { id: `${i}-st${M}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
6001
6008
  /* @__PURE__ */ e("stop", { offset: "0%", stopColor: k.color, stopOpacity: 0.95 }),
6002
6009
  /* @__PURE__ */ e("stop", { offset: "100%", stopColor: k.color, stopOpacity: 0.6 })
6003
6010
  ] }, M)) }),
6004
- w.map((k, M) => /* @__PURE__ */ e("path", { d: yl(k.upper, k.lower), fill: `url(#${i}-st${M})`, className: "select-chart__area" }, M)),
6011
+ S.map((k, M) => /* @__PURE__ */ e("path", { d: yl(k.upper, k.lower), fill: `url(#${i}-st${M})`, className: "select-chart__area" }, M)),
6005
6012
  h != null && /* @__PURE__ */ e("line", { x1: p(h), x2: p(h), y1: g.top, y2: g.top + y, className: "select-chart__crosshair" }),
6006
6013
  n.map(
6007
6014
  (k, M) => M % Math.max(1, Math.ceil(f / 7)) === 0 || M === f - 1 ? /* @__PURE__ */ e("text", { x: p(M), y: l - g.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: k }, M) : null
@@ -6020,7 +6027,7 @@ function wo({ series: t, labels: n, height: l = 240, format: c = Y, className: s
6020
6027
  y: g.top + y / 2,
6021
6028
  place: "top",
6022
6029
  title: k,
6023
- rows: t.map((S, N) => ({ label: S.name, value: c(S.data[M] ?? 0), color: S.color ?? j(N) }))
6030
+ rows: t.map((w, N) => ({ label: w.name, value: c(w.data[M] ?? 0), color: w.color ?? j(N) }))
6024
6031
  });
6025
6032
  },
6026
6033
  onMouseLeave: () => {
@@ -6044,23 +6051,23 @@ const So = R(function({ data: n, size: l = 220, format: c = Y, legend: s = !0, c
6044
6051
  /* @__PURE__ */ e("svg", { width: l, height: l, viewBox: `0 0 ${l} ${l}`, className: "select-chart select-donut", "aria-hidden": "true", children: n.map(($, _) => {
6045
6052
  const p = v[_], b = x / y * 360;
6046
6053
  x += p;
6047
- const w = x / y * 360, k = $.color ?? j(_);
6054
+ const S = x / y * 360, k = $.color ?? j(_);
6048
6055
  let M = b;
6049
6056
  return /* @__PURE__ */ m("g", { children: [
6050
6057
  /* @__PURE__ */ e(
6051
6058
  "path",
6052
6059
  {
6053
- d: it(i, h, f, g, b + 0.6, Math.max(b + 0.7, w - 0.6)),
6060
+ d: it(i, h, f, g, b + 0.6, Math.max(b + 0.7, S - 0.6)),
6054
6061
  fill: k,
6055
6062
  className: "select-chart__seg",
6056
6063
  onMouseEnter: () => o.show({ x: i, y: h - f, place: h - f < 44 ? "bottom" : "top", title: $.label, rows: [{ label: "Total", value: c(p), color: k }] }),
6057
6064
  onMouseLeave: o.hide
6058
6065
  }
6059
6066
  ),
6060
- ($.children ?? []).map((S, N) => {
6067
+ ($.children ?? []).map((w, N) => {
6061
6068
  const C = M;
6062
- M += S.value / y * 360;
6063
- const L = M, E = S.color ?? k, A = 0.45 + N % 3 * 0.2, F = ((C + L) / 2 - 90) * (Math.PI / 180);
6069
+ M += w.value / y * 360;
6070
+ const L = M, E = w.color ?? k, A = 0.45 + N % 3 * 0.2, F = ((C + L) / 2 - 90) * (Math.PI / 180);
6064
6071
  return /* @__PURE__ */ e(
6065
6072
  "path",
6066
6073
  {
@@ -6072,10 +6079,10 @@ const So = R(function({ data: n, size: l = 220, format: c = Y, legend: s = !0, c
6072
6079
  x: i + (u - 6) * Math.cos(F),
6073
6080
  y: h + (u - 6) * Math.sin(F),
6074
6081
  place: h + (u - 6) * Math.sin(F) < h ? "top" : "bottom",
6075
- title: `${$.label} · ${S.label}`,
6082
+ title: `${$.label} · ${w.label}`,
6076
6083
  rows: [
6077
- { label: "Valor", value: c(S.value), color: k },
6078
- { label: "Share", value: `${Math.round(S.value / (p || 1) * 100)}%` }
6084
+ { label: "Valor", value: c(w.value), color: k },
6085
+ { label: "Share", value: `${Math.round(w.value / (p || 1) * 100)}%` }
6079
6086
  ]
6080
6087
  }),
6081
6088
  onMouseLeave: o.hide
@@ -6112,13 +6119,13 @@ function Co({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
6112
6119
  /* @__PURE__ */ e("text", { x: o.left - 8, y: g(_), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(_) })
6113
6120
  ] }, p)),
6114
6121
  t.map((_, p) => {
6115
- const b = o.left + y * p + y / 2, w = _.color ?? j(p), k = _.bins.length, M = (A) => g(_.min + (_.max - _.min) * A / Math.max(1, k - 1)), S = (A) => _.bins[A] / $ * x, N = [], C = [];
6116
- for (let A = k - 1; A >= 0; A--) N.push([b + S(A), M(A)]);
6117
- for (let A = 0; A < k; A++) C.push([b - S(A), M(A)]);
6122
+ const b = o.left + y * p + y / 2, S = _.color ?? j(p), k = _.bins.length, M = (A) => g(_.min + (_.max - _.min) * A / Math.max(1, k - 1)), w = (A) => _.bins[A] / $ * x, N = [], C = [];
6123
+ for (let A = k - 1; A >= 0; A--) N.push([b + w(A), M(A)]);
6124
+ for (let A = 0; A < k; A++) C.push([b - w(A), M(A)]);
6118
6125
  const L = `${Cn(N)} ${Cn(C).replace(/^M/, "L")} Z`, E = _.median != null ? g(_.median) : null;
6119
6126
  return /* @__PURE__ */ m("g", { children: [
6120
- /* @__PURE__ */ e("path", { d: L, fill: w, fillOpacity: 0.32, stroke: w, strokeWidth: 1.5, strokeLinejoin: "round" }),
6121
- E != null && /* @__PURE__ */ e("line", { x1: b - x * 0.6, x2: b + x * 0.6, y1: E, y2: E, stroke: w, strokeWidth: 2 }),
6127
+ /* @__PURE__ */ e("path", { d: L, fill: S, fillOpacity: 0.32, stroke: S, strokeWidth: 1.5, strokeLinejoin: "round" }),
6128
+ E != null && /* @__PURE__ */ e("line", { x1: b - x * 0.6, x2: b + x * 0.6, y1: E, y2: E, stroke: S, strokeWidth: 2 }),
6122
6129
  /* @__PURE__ */ e("text", { x: b, y: n - o.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: _.label }),
6123
6130
  /* @__PURE__ */ e(
6124
6131
  "rect",
@@ -6134,7 +6141,7 @@ function Co({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
6134
6141
  place: g(_.max) < o.top + 64 ? "bottom" : "top",
6135
6142
  title: _.label,
6136
6143
  rows: [
6137
- { label: "Máx", value: l(_.max), color: w },
6144
+ { label: "Máx", value: l(_.max), color: S },
6138
6145
  ..._.median != null ? [{ label: "Mediana", value: l(_.median) }] : [],
6139
6146
  { label: "Mín", value: l(_.min) }
6140
6147
  ]
@@ -6163,19 +6170,19 @@ const Lo = R(function({ matrix: n, labels: l, size: c = 240, format: s = Y, padA
6163
6170
  b[N][L] = [C, C + E], C += E;
6164
6171
  }
6165
6172
  }
6166
- const w = (N, C) => [u + C * Math.cos(N - Math.PI / 2), f + C * Math.sin(N - Math.PI / 2)], k = (N, C, L, E) => {
6167
- const [A, F] = w(N, v), [B, W] = w(C, v), [P, O] = w(L, v), [T, Z] = w(E, v);
6168
- return `M${A.toFixed(2)},${F.toFixed(2)} A${v},${v} 0 0 1 ${B.toFixed(2)},${W.toFixed(2)} Q${u},${f} ${P.toFixed(2)},${O.toFixed(2)} A${v},${v} 0 0 1 ${T.toFixed(2)},${Z.toFixed(2)} Q${u},${f} ${A.toFixed(2)},${F.toFixed(2)} Z`;
6169
- }, M = (N) => N * 180 / Math.PI, S = [];
6173
+ const S = (N, C) => [u + C * Math.cos(N - Math.PI / 2), f + C * Math.sin(N - Math.PI / 2)], k = (N, C, L, E) => {
6174
+ const [A, F] = S(N, v), [B, T] = S(C, v), [I, O] = S(L, v), [W, Z] = S(E, v);
6175
+ return `M${A.toFixed(2)},${F.toFixed(2)} A${v},${v} 0 0 1 ${B.toFixed(2)},${T.toFixed(2)} Q${u},${f} ${I.toFixed(2)},${O.toFixed(2)} A${v},${v} 0 0 1 ${W.toFixed(2)},${Z.toFixed(2)} Q${u},${f} ${A.toFixed(2)},${F.toFixed(2)} Z`;
6176
+ }, M = (N) => N * 180 / Math.PI, w = [];
6170
6177
  for (let N = 0; N < h; N++)
6171
6178
  for (let C = N; C < h; C++) {
6172
6179
  if (N === C || n[N][C] + n[C][N] <= 0) continue;
6173
6180
  const [L, E] = b[N][C], [A, F] = b[C][N];
6174
- S.push({ d: k(L, E, A, F), color: j(N), i: N, j: C, value: n[N][C] + n[C][N] });
6181
+ w.push({ d: k(L, E, A, F), color: j(N), i: N, j: C, value: n[N][C] + n[C][N] });
6175
6182
  }
6176
6183
  return /* @__PURE__ */ e("div", { ref: o, ...d, className: `select-donut-wrap${r ? " " + r : ""}`, children: /* @__PURE__ */ m("div", { className: "select-radial", style: { width: c, aspectRatio: "1" }, children: [
6177
6184
  /* @__PURE__ */ m("svg", { width: c, height: c, viewBox: `0 0 ${c} ${c}`, className: "select-chart", "aria-hidden": "true", children: [
6178
- S.map((N, C) => /* @__PURE__ */ e(
6185
+ w.map((N, C) => /* @__PURE__ */ e(
6179
6186
  "path",
6180
6187
  {
6181
6188
  d: N.d,
@@ -6193,7 +6200,7 @@ const Lo = R(function({ matrix: n, labels: l, size: c = 240, format: s = Y, padA
6193
6200
  C
6194
6201
  )),
6195
6202
  _.map((N, C) => {
6196
- const L = (N.a0 + N.a1) / 2, [E, A] = w(L, g + 12);
6203
+ const L = (N.a0 + N.a1) / 2, [E, A] = S(L, g + 12);
6197
6204
  return /* @__PURE__ */ m("g", { children: [
6198
6205
  /* @__PURE__ */ e("path", { d: it(u, f, g, v, M(N.a0), M(N.a1)), fill: j(C), className: "select-chord__arc" }),
6199
6206
  /* @__PURE__ */ e(
@@ -6214,10 +6221,10 @@ const Lo = R(function({ matrix: n, labels: l, size: c = 240, format: s = Y, padA
6214
6221
  ] }) });
6215
6222
  });
6216
6223
  function Ao({ points: t, height: n = 240, radius: l = 16, color: c = "var(--select-chart-1)", xMax: s, yMax: a, format: r = Y, className: d, ...o }) {
6217
- const { ref: i, width: h } = ce(n), u = X(), f = 12, g = Math.max(0, h - f * 2), v = n - f * 2, y = s ?? Math.max(1, ...t.map((C) => C.x)), x = a ?? Math.max(1, ...t.map((C) => C.y)), $ = (C) => f + C / y * g, _ = (C) => f + v - C / x * v, p = l, b = Math.sqrt(3), w = (C, L) => {
6218
- let E = C, A = L, F = -E - A, B = Math.round(E), W = Math.round(F), P = Math.round(A);
6219
- const O = Math.abs(B - E), T = Math.abs(W - F), Z = Math.abs(P - A);
6220
- return O > T && O > Z ? B = -W - P : T > Z ? W = -B - P : P = -B - W, [B, P];
6224
+ const { ref: i, width: h } = ce(n), u = X(), f = 12, g = Math.max(0, h - f * 2), v = n - f * 2, y = s ?? Math.max(1, ...t.map((C) => C.x)), x = a ?? Math.max(1, ...t.map((C) => C.y)), $ = (C) => f + C / y * g, _ = (C) => f + v - C / x * v, p = l, b = Math.sqrt(3), S = (C, L) => {
6225
+ let E = C, A = L, F = -E - A, B = Math.round(E), T = Math.round(F), I = Math.round(A);
6226
+ const O = Math.abs(B - E), W = Math.abs(T - F), Z = Math.abs(I - A);
6227
+ return O > W && O > Z ? B = -T - I : W > Z ? T = -B - I : I = -B - T, [B, I];
6221
6228
  }, k = (C, L) => [p * b * (C + L / 2), p * (3 / 2) * L], M = (C, L) => {
6222
6229
  let E = "";
6223
6230
  for (let A = 0; A < 6; A++) {
@@ -6225,21 +6232,21 @@ function Ao({ points: t, height: n = 240, radius: l = 16, color: c = "var(--sele
6225
6232
  E += `${A === 0 ? "M" : "L"}${(C + p * Math.cos(F)).toFixed(1)},${(L + p * Math.sin(F)).toFixed(1)}`;
6226
6233
  }
6227
6234
  return E + "Z";
6228
- }, S = /* @__PURE__ */ new Map();
6235
+ }, w = /* @__PURE__ */ new Map();
6229
6236
  for (const C of t) {
6230
- const L = $(C.x), E = _(C.y), A = (b / 3 * L - 1 / 3 * E) / p, F = 2 / 3 * E / p, [B, W] = w(A, F), P = `${B},${W}`;
6231
- S.set(P, (S.get(P) ?? 0) + 1);
6237
+ const L = $(C.x), E = _(C.y), A = (b / 3 * L - 1 / 3 * E) / p, F = 2 / 3 * E / p, [B, T] = S(A, F), I = `${B},${T}`;
6238
+ w.set(I, (w.get(I) ?? 0) + 1);
6232
6239
  }
6233
- const N = Math.max(1, ...S.values());
6240
+ const N = Math.max(1, ...w.values());
6234
6241
  return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${d ? " " + d : ""}`, ref: i, children: [
6235
- h > 0 && /* @__PURE__ */ e("svg", { width: h, height: n, className: "select-chart", children: [...S].map(([C, L]) => {
6236
- const [E, A] = C.split(",").map(Number), [F, B] = k(E, A), W = L / N, P = Math.round((0.16 + W * 0.84) * 100);
6242
+ h > 0 && /* @__PURE__ */ e("svg", { width: h, height: n, className: "select-chart", children: [...w].map(([C, L]) => {
6243
+ const [E, A] = C.split(",").map(Number), [F, B] = k(E, A), T = L / N, I = Math.round((0.16 + T * 0.84) * 100);
6237
6244
  return /* @__PURE__ */ e(
6238
6245
  "path",
6239
6246
  {
6240
6247
  d: M(F, B),
6241
6248
  className: "select-chart__calcell",
6242
- style: { fill: `color-mix(in srgb, ${c} ${P}%, transparent)`, "--heat-color": c },
6249
+ style: { fill: `color-mix(in srgb, ${c} ${I}%, transparent)`, "--heat-color": c },
6243
6250
  onMouseEnter: () => u.show({
6244
6251
  x: F,
6245
6252
  y: B - p,
@@ -6417,48 +6424,48 @@ function Pn(t, n, l) {
6417
6424
  }
6418
6425
  const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) < 1e-6, Eo = R(function({ points: n = [], arcs: l = [], size: c = 320, tilt: s = -18, spin: a = !0, speed: r = 7, color: d = "var(--select-chart-1)", format: o = Y, legend: i = !0, map: h = !0, fluid: u = !1, onZoomChange: f, className: g, ...v }, y) {
6419
6426
  var Fe;
6420
- const x = te(), $ = X(), _ = q(null), p = Ct(_, c), b = n.length ? n.reduce((I, V) => I + V.lng, 0) / n.length : 0, w = q(
6427
+ const x = te(), $ = X(), _ = q(null), p = Ct(_, c), b = n.length ? n.reduce((P, V) => P + V.lng, 0) / n.length : 0, S = q(
6421
6428
  typeof window < "u" && !!((Fe = window.matchMedia) != null && Fe.call(window, "(prefers-reduced-motion: reduce)").matches)
6422
- ), k = q({ lng: -b, lat: s }), M = q({ lng: 0, lat: 0 }), S = q(1), N = q(null), C = q(null), L = q(!1), E = q(0), A = q(0), F = q(0), [, B] = D(0), [W, P] = D(!1), [O, T] = D(null), Z = () => {
6429
+ ), k = q({ lng: -b, lat: s }), M = q({ lng: 0, lat: 0 }), w = q(1), N = q(null), C = q(null), L = q(!1), E = q(0), A = q(0), F = q(0), [, B] = D(0), [T, I] = D(!1), [O, W] = D(null), Z = () => {
6423
6430
  A.current || (F.current = performance.now(), A.current = requestAnimationFrame(G));
6424
6431
  };
6425
- function G(I) {
6426
- const V = Math.min(0.05, (I - F.current) / 1e3);
6427
- F.current = I, E.current += V;
6432
+ function G(P) {
6433
+ const V = Math.min(0.05, (P - F.current) / 1e3);
6434
+ F.current = P, E.current += V;
6428
6435
  const U = M.current, oe = Math.abs(U.lng) + Math.abs(U.lat) > 0.02;
6429
6436
  if (!C.current) if (N.current) {
6430
6437
  const se = Math.min(1, V * 6);
6431
6438
  k.current.lng += (N.current.lng - k.current.lng) * se, k.current.lat += (N.current.lat - k.current.lat) * se, Math.abs(N.current.lng - k.current.lng) < 0.2 && Math.abs(N.current.lat - k.current.lat) < 0.2 && (N.current = null);
6432
- } else oe ? (k.current.lng += U.lng * V * 60, k.current.lat = Math.max(-85, Math.min(85, k.current.lat + U.lat * V * 60)), U.lng *= 0.94, U.lat *= 0.94) : (U.lng = 0, U.lat = 0, a && !w.current && !L.current && (k.current.lng += r * V));
6433
- B((se) => (se + 1) % 1e6), !w.current || !!C.current || !!N.current || Math.abs(U.lng) + Math.abs(U.lat) > 0.02 ? A.current = requestAnimationFrame(G) : A.current = 0;
6439
+ } else oe ? (k.current.lng += U.lng * V * 60, k.current.lat = Math.max(-85, Math.min(85, k.current.lat + U.lat * V * 60)), U.lng *= 0.94, U.lat *= 0.94) : (U.lng = 0, U.lat = 0, a && !S.current && !L.current && (k.current.lng += r * V));
6440
+ B((se) => (se + 1) % 1e6), !S.current || !!C.current || !!N.current || Math.abs(U.lng) + Math.abs(U.lat) > 0.02 ? A.current = requestAnimationFrame(G) : A.current = 0;
6434
6441
  }
6435
- le(() => (w.current || Z(), () => {
6442
+ le(() => (S.current || Z(), () => {
6436
6443
  A.current && cancelAnimationFrame(A.current), A.current = 0;
6437
6444
  }), []);
6438
6445
  const J = q(f);
6439
6446
  J.current = f, le(() => {
6440
- const I = _.current;
6441
- if (!I) return;
6447
+ const P = _.current;
6448
+ if (!P) return;
6442
6449
  const V = (U) => {
6443
6450
  var ee;
6444
6451
  U.preventDefault();
6445
- const oe = S.current * (U.deltaY < 0 ? 1.12 : 0.89);
6446
- S.current = Math.max(0.8, Math.min(1.8, oe)), (ee = J.current) == null || ee.call(J, S.current), Z(), B((se) => (se + 1) % 1e6);
6452
+ const oe = w.current * (U.deltaY < 0 ? 1.12 : 0.89);
6453
+ w.current = Math.max(0.8, Math.min(1.8, oe)), (ee = J.current) == null || ee.call(J, w.current), Z(), B((se) => (se + 1) % 1e6);
6447
6454
  };
6448
- return I.addEventListener("wheel", V, { passive: !1 }), () => I.removeEventListener("wheel", V);
6455
+ return P.addEventListener("wheel", V, { passive: !1 }), () => P.removeEventListener("wheel", V);
6449
6456
  }, []);
6450
- const re = (I) => {
6457
+ const re = (P) => {
6451
6458
  var V, U;
6452
- (U = (V = I.target).setPointerCapture) == null || U.call(V, I.pointerId), C.current = { x: I.clientX, y: I.clientY }, M.current = { lng: 0, lat: 0 }, N.current = null, P(!0), Z();
6453
- }, me = (I) => {
6459
+ (U = (V = P.target).setPointerCapture) == null || U.call(V, P.pointerId), C.current = { x: P.clientX, y: P.clientY }, M.current = { lng: 0, lat: 0 }, N.current = null, I(!0), Z();
6460
+ }, me = (P) => {
6454
6461
  if (!C.current) return;
6455
- const V = 0.34 / S.current, U = I.clientX - C.current.x, oe = I.clientY - C.current.y;
6456
- C.current = { x: I.clientX, y: I.clientY }, k.current.lng += U * V, k.current.lat = Math.max(-85, Math.min(85, k.current.lat + oe * V)), M.current = { lng: U * V, lat: oe * V };
6457
- }, Se = (I) => {
6462
+ const V = 0.34 / w.current, U = P.clientX - C.current.x, oe = P.clientY - C.current.y;
6463
+ C.current = { x: P.clientX, y: P.clientY }, k.current.lng += U * V, k.current.lat = Math.max(-85, Math.min(85, k.current.lat + oe * V)), M.current = { lng: U * V, lat: oe * V };
6464
+ }, Se = (P) => {
6458
6465
  var V, U;
6459
- C.current && ((U = (V = I.target).releasePointerCapture) == null || U.call(V, I.pointerId), C.current = null, P(!1), Z());
6460
- }, ne = (p / 2 - 6) * S.current, H = p / 2, Q = p / 2, z = (I) => {
6461
- const V = bt(I, k.current.lng, k.current.lat);
6466
+ C.current && ((U = (V = P.target).releasePointerCapture) == null || U.call(V, P.pointerId), C.current = null, I(!1), Z());
6467
+ }, ne = (p / 2 - 6) * w.current, H = p / 2, Q = p / 2, z = (P) => {
6468
+ const V = bt(P, k.current.lng, k.current.lat);
6462
6469
  return { x: H + ne * V[0], y: Q - ne * V[1], z: V[2] };
6463
6470
  }, ue = xe(() => {
6464
6471
  const V = [];
@@ -6474,17 +6481,17 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
6474
6481
  }
6475
6482
  return V;
6476
6483
  }, []), ie = xe(
6477
- () => Es.map((I) => {
6484
+ () => Es.map((P) => {
6478
6485
  const V = [];
6479
- for (let U = 0; U < I.length; U += 2) V.push(et(I[U + 1], I[U]));
6486
+ for (let U = 0; U < P.length; U += 2) V.push(et(P[U + 1], P[U]));
6480
6487
  return V;
6481
6488
  }),
6482
6489
  []
6483
- ), he = (I) => ({ x: H + ne * I[0], y: Q - ne * I[1] });
6490
+ ), he = (P) => ({ x: H + ne * P[0], y: Q - ne * P[1] });
6484
6491
  let de = "", ae = "";
6485
6492
  if (h)
6486
- for (const I of ie) {
6487
- const V = I.map((se) => bt(se, k.current.lng, k.current.lat)), U = V.length;
6493
+ for (const P of ie) {
6494
+ const V = P.map((se) => bt(se, k.current.lng, k.current.lat)), U = V.length;
6488
6495
  let oe = !1;
6489
6496
  for (const se of V)
6490
6497
  if (se[2] > 0) {
@@ -6517,45 +6524,45 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
6517
6524
  de += se(ee[ee.length - 1], ee[0]), de += "Z";
6518
6525
  }
6519
6526
  }
6520
- const $e = (I) => {
6527
+ const $e = (P) => {
6521
6528
  let V = "", U = !1;
6522
- for (const oe of I) {
6529
+ for (const oe of P) {
6523
6530
  const ee = z(oe);
6524
6531
  ee.z > 0 ? (V += `${U ? "L" : "M"}${ee.x.toFixed(1)},${ee.y.toFixed(1)}`, U = !0) : U = !1;
6525
6532
  }
6526
6533
  return V;
6527
- }, Ce = Math.max(1, ...n.map((I) => I.value ?? 0)), Le = n.map((I, V) => {
6528
- const U = z(et(I.lat, I.lng));
6534
+ }, Ce = Math.max(1, ...n.map((P) => P.value ?? 0)), Le = n.map((P, V) => {
6535
+ const U = z(et(P.lat, P.lng));
6529
6536
  return {
6530
- ...I,
6537
+ ...P,
6531
6538
  i: V,
6532
6539
  p: U,
6533
6540
  vis: U.z > 0,
6534
- r: 3 + Math.max(0, I.value ?? 0) / Ce * 6,
6535
- col: I.color ?? d
6541
+ r: 3 + Math.max(0, P.value ?? 0) / Ce * 6,
6542
+ col: P.color ?? d
6536
6543
  };
6537
- }), Ne = O != null ? n[O] : null, Ie = 0.16, ke = l.map((I, V) => {
6538
- const U = et(I.from.lat, I.from.lng), oe = et(I.to.lat, I.to.lng);
6544
+ }), Ne = O != null ? n[O] : null, Ie = 0.16, ke = l.map((P, V) => {
6545
+ const U = et(P.from.lat, P.from.lng), oe = et(P.to.lat, P.to.lng);
6539
6546
  let ee = "", se = !1;
6540
6547
  for (let Ze = 0; Ze <= 40; Ze++) {
6541
6548
  const mt = Ze / 40, ft = Pn(U, oe, mt), Pt = 1 + 0.34 * Math.sin(Math.PI * mt), $l = bt(ft, k.current.lng, k.current.lat), an = z([ft[0] * Pt, ft[1] * Pt, ft[2] * Pt]);
6542
6549
  $l[2] > -0.05 ? (ee += `${se ? "L" : "M"}${an.x.toFixed(1)},${an.y.toFixed(1)}`, se = !0) : se = !1;
6543
6550
  }
6544
- const pe = w.current ? 0.5 : (E.current * Ie + V * 0.27) % 1, fe = Pn(U, oe, pe), Ve = 1 + 0.34 * Math.sin(Math.PI * pe), Pe = bt(fe, k.current.lng, k.current.lat), Je = z([fe[0] * Ve, fe[1] * Ve, fe[2] * Ve]), sn = Ne != null && (Rn(I.from, Ne) || Rn(I.to, Ne));
6545
- return { d: ee, col: I.color ?? d, i: V, flow: { ...Je, vis: Pe[2] > 0 }, active: sn };
6546
- }), Ue = Ne != null, je = i ? [...n].sort((I, V) => (V.value ?? 0) - (I.value ?? 0)).slice(0, 6) : [];
6551
+ const pe = S.current ? 0.5 : (E.current * Ie + V * 0.27) % 1, fe = Pn(U, oe, pe), Ve = 1 + 0.34 * Math.sin(Math.PI * pe), Pe = bt(fe, k.current.lng, k.current.lat), Je = z([fe[0] * Ve, fe[1] * Ve, fe[2] * Ve]), sn = Ne != null && (Rn(P.from, Ne) || Rn(P.to, Ne));
6552
+ return { d: ee, col: P.color ?? d, i: V, flow: { ...Je, vis: Pe[2] > 0 }, active: sn };
6553
+ }), Ue = Ne != null, je = i ? [...n].sort((P, V) => (V.value ?? 0) - (P.value ?? 0)).slice(0, 6) : [];
6547
6554
  return /* @__PURE__ */ m("div", { ref: y, ...v, className: `select-globe${g ? " " + g : ""}`, children: [
6548
6555
  /* @__PURE__ */ m(
6549
6556
  "div",
6550
6557
  {
6551
6558
  ref: _,
6552
- className: `select-globe__stage${W ? " is-grabbing" : ""}`,
6559
+ className: `select-globe__stage${T ? " is-grabbing" : ""}`,
6553
6560
  style: { width: u ? "100%" : `${c / 16}rem`, aspectRatio: "1" },
6554
6561
  onPointerEnter: () => {
6555
6562
  L.current = !0;
6556
6563
  },
6557
- onPointerLeave: (I) => {
6558
- L.current = !1, Se(I), T(null), $.hide(), Z();
6564
+ onPointerLeave: (P) => {
6565
+ L.current = !1, Se(P), W(null), $.hide(), Z();
6559
6566
  },
6560
6567
  onPointerDown: re,
6561
6568
  onPointerMove: me,
@@ -6618,93 +6625,93 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
6618
6625
  stroke: `color-mix(in srgb, ${d} 68%, transparent)`
6619
6626
  }
6620
6627
  ),
6621
- ue.map((I, V) => /* @__PURE__ */ e("path", { d: $e(I), className: "select-globe__grid" }, `g${V}`)),
6622
- ke.map((I) => /* @__PURE__ */ m(
6628
+ ue.map((P, V) => /* @__PURE__ */ e("path", { d: $e(P), className: "select-globe__grid" }, `g${V}`)),
6629
+ ke.map((P) => /* @__PURE__ */ m(
6623
6630
  "g",
6624
6631
  {
6625
6632
  className: "select-globe__arcgrp",
6626
- style: { opacity: Ue && !I.active ? 0.18 : 1 },
6633
+ style: { opacity: Ue && !P.active ? 0.18 : 1 },
6627
6634
  children: [
6628
6635
  /* @__PURE__ */ e(
6629
6636
  "path",
6630
6637
  {
6631
- d: I.d,
6638
+ d: P.d,
6632
6639
  className: "select-globe__arc",
6633
- stroke: I.col === d ? `url(#${x}-arc)` : I.col,
6634
- strokeWidth: I.active ? 2.5 : 1.75
6640
+ stroke: P.col === d ? `url(#${x}-arc)` : P.col,
6641
+ strokeWidth: P.active ? 2.5 : 1.75
6635
6642
  }
6636
6643
  ),
6637
- I.flow.vis && /* @__PURE__ */ e(
6644
+ P.flow.vis && /* @__PURE__ */ e(
6638
6645
  "circle",
6639
6646
  {
6640
- cx: I.flow.x,
6641
- cy: I.flow.y,
6642
- r: I.active ? 3 : 2.2,
6643
- fill: I.col,
6647
+ cx: P.flow.x,
6648
+ cy: P.flow.y,
6649
+ r: P.active ? 3 : 2.2,
6650
+ fill: P.col,
6644
6651
  className: "select-globe__flow",
6645
- style: { filter: `drop-shadow(0 0 4px ${I.col})` }
6652
+ style: { filter: `drop-shadow(0 0 4px ${P.col})` }
6646
6653
  }
6647
6654
  )
6648
6655
  ]
6649
6656
  },
6650
- `a${I.i}`
6657
+ `a${P.i}`
6651
6658
  ))
6652
6659
  ] }),
6653
- Le.filter((I) => I.vis).map((I) => {
6654
- const V = O === I.i;
6660
+ Le.filter((P) => P.vis).map((P) => {
6661
+ const V = O === P.i;
6655
6662
  return /* @__PURE__ */ m("g", { style: { opacity: Ue && !V ? 0.45 : 1 }, children: [
6656
- /* @__PURE__ */ e("circle", { cx: I.p.x, cy: I.p.y, r: I.r, fill: I.col, className: "select-globe__pulse" }),
6657
- V && /* @__PURE__ */ e("circle", { cx: I.p.x, cy: I.p.y, r: I.r + 4, fill: "none", stroke: I.col, strokeWidth: 1.5, opacity: 0.6 }),
6663
+ /* @__PURE__ */ e("circle", { cx: P.p.x, cy: P.p.y, r: P.r, fill: P.col, className: "select-globe__pulse" }),
6664
+ V && /* @__PURE__ */ e("circle", { cx: P.p.x, cy: P.p.y, r: P.r + 4, fill: "none", stroke: P.col, strokeWidth: 1.5, opacity: 0.6 }),
6658
6665
  /* @__PURE__ */ e(
6659
6666
  "circle",
6660
6667
  {
6661
- cx: I.p.x,
6662
- cy: I.p.y,
6663
- r: V ? I.r + 1.5 : I.r,
6664
- fill: I.col,
6668
+ cx: P.p.x,
6669
+ cy: P.p.y,
6670
+ r: V ? P.r + 1.5 : P.r,
6671
+ fill: P.col,
6665
6672
  className: "select-globe__point",
6666
6673
  onPointerEnter: () => {
6667
- T(I.i), $.show({
6668
- x: I.p.x,
6669
- y: I.p.y - I.r - 4,
6670
- place: I.p.y < Q ? "bottom" : "top",
6671
- title: I.label,
6672
- rows: I.value != null ? [{ label: "Volume", value: o(I.value), color: I.col }] : []
6674
+ W(P.i), $.show({
6675
+ x: P.p.x,
6676
+ y: P.p.y - P.r - 4,
6677
+ place: P.p.y < Q ? "bottom" : "top",
6678
+ title: P.label,
6679
+ rows: P.value != null ? [{ label: "Volume", value: o(P.value), color: P.col }] : []
6673
6680
  });
6674
6681
  },
6675
6682
  onPointerLeave: () => {
6676
- T(null), $.hide();
6683
+ W(null), $.hide();
6677
6684
  },
6678
6685
  onClick: () => {
6679
- N.current = { lng: -I.lng, lat: s }, Z();
6686
+ N.current = { lng: -P.lng, lat: s }, Z();
6680
6687
  }
6681
6688
  }
6682
6689
  )
6683
- ] }, `m${I.i}`);
6690
+ ] }, `m${P.i}`);
6684
6691
  })
6685
6692
  ] }),
6686
6693
  /* @__PURE__ */ e(K, { tip: $.tip })
6687
6694
  ]
6688
6695
  }
6689
6696
  ),
6690
- je.length > 0 && /* @__PURE__ */ e("ul", { className: "select-donut__legend", children: je.map((I, V) => /* @__PURE__ */ m("li", { className: "select-donut__legitem", children: [
6691
- /* @__PURE__ */ e("span", { className: "select-donut__dot", style: { background: I.color ?? d } }),
6692
- /* @__PURE__ */ e("span", { className: "select-donut__leglabel", children: I.label }),
6693
- I.value != null && /* @__PURE__ */ e("span", { className: "select-donut__legval", children: o(I.value) })
6697
+ je.length > 0 && /* @__PURE__ */ e("ul", { className: "select-donut__legend", children: je.map((P, V) => /* @__PURE__ */ m("li", { className: "select-donut__legitem", children: [
6698
+ /* @__PURE__ */ e("span", { className: "select-donut__dot", style: { background: P.color ?? d } }),
6699
+ /* @__PURE__ */ e("span", { className: "select-donut__leglabel", children: P.label }),
6700
+ P.value != null && /* @__PURE__ */ e("span", { className: "select-donut__legval", children: o(P.value) })
6694
6701
  ] }, V)) })
6695
6702
  ] });
6696
6703
  });
6697
6704
  function Bo({ children: t, speed: n = 28, className: l, ...c }) {
6698
6705
  const s = q(null), a = q(null), r = q(null), d = Ct(s, 0), o = Ct(r, 0), i = d > 0 && o > d + 1, h = q(0), u = q(null), f = q(!1);
6699
6706
  le(() => {
6700
- var w;
6707
+ var S;
6701
6708
  const x = a.current;
6702
6709
  if (!x) return;
6703
6710
  if (!i) {
6704
6711
  h.current = 0, x.style.transform = "";
6705
6712
  return;
6706
6713
  }
6707
- const $ = ((w = window.matchMedia) == null ? void 0 : w.call(window, "(prefers-reduced-motion: reduce)").matches) ?? !1;
6714
+ const $ = ((S = window.matchMedia) == null ? void 0 : S.call(window, "(prefers-reduced-motion: reduce)").matches) ?? !1;
6708
6715
  let _ = 0, p = performance.now();
6709
6716
  const b = (k) => {
6710
6717
  const M = Math.min(0.1, (k - p) / 1e3);
@@ -6746,7 +6753,7 @@ function Io({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
6746
6753
  var A;
6747
6754
  const { ref: a, width: r } = ce(n), d = X(), o = te(), [i, h] = D(null), u = { ...Be, right: 44 }, f = [...t].sort((F, B) => B.value - F.value), g = f.length, v = f.reduce((F, B) => F + B.value, 0) || 1;
6748
6755
  let y = 0;
6749
- const x = f.map((F) => (y += F.value, y / v * 100)), $ = Math.max(0, r - u.left - u.right), _ = n - u.top - u.bottom, p = ye(((A = f[0]) == null ? void 0 : A.value) ?? 1), b = g > 0 ? $ / g : 0, w = Math.min(b * 0.62, 46), k = u.top + _, M = (F) => k - F / p * _, S = (F) => k - F / 100 * _, N = (F) => u.left + b * F + b / 2, C = x.map((F, B) => [N(B), S(F)]), L = j(0), E = j(1);
6756
+ const x = f.map((F) => (y += F.value, y / v * 100)), $ = Math.max(0, r - u.left - u.right), _ = n - u.top - u.bottom, p = ye(((A = f[0]) == null ? void 0 : A.value) ?? 1), b = g > 0 ? $ / g : 0, S = Math.min(b * 0.62, 46), k = u.top + _, M = (F) => k - F / p * _, w = (F) => k - F / 100 * _, N = (F) => u.left + b * F + b / 2, C = x.map((F, B) => [N(B), w(F)]), L = j(0), E = j(1);
6750
6757
  return /* @__PURE__ */ m("div", { ...s, className: `select-chart-wrap${c ? " " + c : ""}`, ref: a, children: [
6751
6758
  r > 0 && /* @__PURE__ */ m("svg", { width: r, height: n, className: "select-chart", onMouseLeave: () => {
6752
6759
  h(null), d.hide();
@@ -6759,27 +6766,27 @@ function Io({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
6759
6766
  /* @__PURE__ */ e("line", { x1: u.left, x2: r - u.right, y1: M(F), y2: M(F), className: B === 0 ? "select-chart__axis" : "select-chart__grid" }),
6760
6767
  /* @__PURE__ */ e("text", { x: u.left - 8, y: M(F), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(F) })
6761
6768
  ] }, B)),
6762
- [0, 25, 50, 75, 100].map((F, B) => /* @__PURE__ */ m("text", { x: r - 4, y: S(F), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: [
6769
+ [0, 25, 50, 75, 100].map((F, B) => /* @__PURE__ */ m("text", { x: r - 4, y: w(F), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: [
6763
6770
  F,
6764
6771
  "%"
6765
6772
  ] }, `r${B}`)),
6766
- /* @__PURE__ */ e("line", { x1: u.left, x2: r - u.right, y1: S(80), y2: S(80), className: "select-chart__crosshair" }),
6773
+ /* @__PURE__ */ e("line", { x1: u.left, x2: r - u.right, y1: w(80), y2: w(80), className: "select-chart__crosshair" }),
6767
6774
  f.map((F, B) => {
6768
- const W = M(F.value);
6775
+ const T = M(F.value);
6769
6776
  return /* @__PURE__ */ e(
6770
6777
  "rect",
6771
6778
  {
6772
- x: N(B) - w / 2,
6773
- y: W,
6774
- width: w,
6775
- height: Math.max(0, k - W),
6779
+ x: N(B) - S / 2,
6780
+ y: T,
6781
+ width: S,
6782
+ height: Math.max(0, k - T),
6776
6783
  rx: 4,
6777
6784
  fill: `url(#${o}-b)`,
6778
6785
  className: "select-chart__bar",
6779
6786
  onMouseEnter: () => d.show({
6780
6787
  x: N(B),
6781
- y: W,
6782
- place: W < u.top + 40 ? "bottom" : "top",
6788
+ y: T,
6789
+ place: T < u.top + 40 ? "bottom" : "top",
6783
6790
  title: F.label,
6784
6791
  rows: [
6785
6792
  { label: "Valor", value: l(F.value), color: L },
@@ -6829,7 +6836,7 @@ const Po = R(function({ segments: n, cols: l = 10, rows: c = 10, format: s = Y,
6829
6836
  ] });
6830
6837
  });
6831
6838
  function Ro({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", height: c, format: s = Y, leftColor: a, rightColor: r, centerWidth: d = 84, className: o, ...i }) {
6832
- const h = c ?? Math.max(180, t.length * 40 + 36), { ref: u, width: f } = ce(h), g = X(), [v, y] = D(null), x = 8, $ = 26, _ = 8, p = Math.max(1, ...t.flatMap((L) => [L.left, L.right])), b = Math.max(0, (f - d - x * 2) / 2), w = t.length ? (h - $ - _) / t.length : 0, k = Math.min(w * 0.6, 26), M = x + b, S = x + b + d, N = a ?? j(1), C = r ?? j(0);
6839
+ const h = c ?? Math.max(180, t.length * 40 + 36), { ref: u, width: f } = ce(h), g = X(), [v, y] = D(null), x = 8, $ = 26, _ = 8, p = Math.max(1, ...t.flatMap((L) => [L.left, L.right])), b = Math.max(0, (f - d - x * 2) / 2), S = t.length ? (h - $ - _) / t.length : 0, k = Math.min(S * 0.6, 26), M = x + b, w = x + b + d, N = a ?? j(1), C = r ?? j(0);
6833
6840
  return /* @__PURE__ */ m("div", { ...i, className: `select-chart-wrap${o ? " " + o : ""}`, ref: u, children: [
6834
6841
  f > 0 && /* @__PURE__ */ m("svg", { width: f, height: h, className: "select-chart", onMouseLeave: () => {
6835
6842
  y(null), g.hide();
@@ -6837,8 +6844,8 @@ function Ro({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", hei
6837
6844
  /* @__PURE__ */ e("text", { x, y: 14, className: "select-chart__xlabel", textAnchor: "start", style: { fill: N, fontWeight: 600 }, children: n }),
6838
6845
  /* @__PURE__ */ e("text", { x: f - x, y: 14, className: "select-chart__xlabel", textAnchor: "end", style: { fill: C, fontWeight: 600 }, children: l }),
6839
6846
  t.map((L, E) => {
6840
- const A = $ + w * E + w / 2, F = L.left / p * b, B = L.right / p * b, W = v === L.label;
6841
- return /* @__PURE__ */ m("g", { style: { opacity: v === null || W ? 1 : 0.5 }, children: [
6847
+ const A = $ + S * E + S / 2, F = L.left / p * b, B = L.right / p * b, T = v === L.label;
6848
+ return /* @__PURE__ */ m("g", { style: { opacity: v === null || T ? 1 : 0.5 }, children: [
6842
6849
  /* @__PURE__ */ e(
6843
6850
  "rect",
6844
6851
  {
@@ -6860,7 +6867,7 @@ function Ro({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", hei
6860
6867
  /* @__PURE__ */ e(
6861
6868
  "rect",
6862
6869
  {
6863
- x: S,
6870
+ x: w,
6864
6871
  y: A - k / 2,
6865
6872
  width: B,
6866
6873
  height: k,
@@ -6868,14 +6875,14 @@ function Ro({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", hei
6868
6875
  fill: C,
6869
6876
  className: "select-pyramid__bar select-pyramid__bar--r",
6870
6877
  onMouseEnter: () => {
6871
- y(L.label), g.show({ x: S + B, y: A - k / 2, place: "top", title: L.label, rows: [{ label: l, value: s(L.right), color: C }] });
6878
+ y(L.label), g.show({ x: w + B, y: A - k / 2, place: "top", title: L.label, rows: [{ label: l, value: s(L.right), color: C }] });
6872
6879
  },
6873
6880
  onMouseLeave: () => {
6874
6881
  y(null), g.hide();
6875
6882
  }
6876
6883
  }
6877
6884
  ),
6878
- /* @__PURE__ */ e("text", { x: (M + S) / 2, y: A, className: "select-chart__xlabel", dominantBaseline: "middle", textAnchor: "middle", children: L.label })
6885
+ /* @__PURE__ */ e("text", { x: (M + w) / 2, y: A, className: "select-chart__xlabel", dominantBaseline: "middle", textAnchor: "middle", children: L.label })
6879
6886
  ] }, L.label);
6880
6887
  })
6881
6888
  ] }),
@@ -6885,8 +6892,8 @@ function Ro({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", hei
6885
6892
  function Do({ series: t, labels: n, height: l = 240, format: c = Y, className: s, ...a }) {
6886
6893
  const { ref: r, width: d } = ce(l), o = X(), [i, h] = D(null), u = { top: 16, right: 78, bottom: 28, left: 28 }, f = n.length, g = t.length, v = Math.max(0, d - u.left - u.right), y = l - u.top - u.bottom, x = t.map(() => new Array(f).fill(0));
6887
6894
  for (let p = 0; p < f; p++)
6888
- t.map((w, k) => ({ si: k, v: w.data[p] ?? 0 })).sort((w, k) => k.v - w.v).forEach((w, k) => {
6889
- x[w.si][p] = k + 1;
6895
+ t.map((S, k) => ({ si: k, v: S.data[p] ?? 0 })).sort((S, k) => k.v - S.v).forEach((S, k) => {
6896
+ x[S.si][p] = k + 1;
6890
6897
  });
6891
6898
  const $ = (p) => u.left + (f <= 1 ? v / 2 : v / (f - 1) * p), _ = (p) => u.top + (g <= 1 ? y / 2 : y / (g - 1) * (p - 1));
6892
6899
  return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
@@ -6895,35 +6902,35 @@ function Do({ series: t, labels: n, height: l = 240, format: c = Y, className: s
6895
6902
  }, children: [
6896
6903
  n.map((p, b) => /* @__PURE__ */ e("text", { x: $(b), y: l - u.bottom + 16, className: "select-chart__xlabel", textAnchor: b === 0 ? "start" : b === f - 1 ? "end" : "middle", children: p }, b)),
6897
6904
  t.map((p, b) => {
6898
- const w = p.color ?? j(b), k = x[b].map((M, S) => [$(S), _(M)]);
6905
+ const S = p.color ?? j(b), k = x[b].map((M, w) => [$(w), _(M)]);
6899
6906
  return /* @__PURE__ */ m("g", { style: { opacity: i === null || i === b ? 1 : 0.22 }, children: [
6900
6907
  /* @__PURE__ */ e(
6901
6908
  "path",
6902
6909
  {
6903
6910
  d: Ge(k),
6904
6911
  fill: "none",
6905
- stroke: w,
6912
+ stroke: S,
6906
6913
  strokeWidth: i === b ? 3.5 : 2.5,
6907
6914
  strokeLinecap: "round",
6908
6915
  style: { cursor: "pointer" },
6909
6916
  onMouseEnter: () => h(b)
6910
6917
  }
6911
6918
  ),
6912
- k.map((M, S) => /* @__PURE__ */ e(
6919
+ k.map((M, w) => /* @__PURE__ */ e(
6913
6920
  "circle",
6914
6921
  {
6915
6922
  cx: M[0],
6916
6923
  cy: M[1],
6917
6924
  r: i === b ? 5.5 : 4,
6918
- fill: w,
6925
+ fill: S,
6919
6926
  className: "select-chart__dot",
6920
6927
  onMouseEnter: () => {
6921
- h(b), o.show({ x: M[0], y: M[1] - 8, place: "top", title: p.name, rows: [{ label: n[S] ?? "", value: `#${x[b][S]} · ${c(p.data[S] ?? 0)}`, color: w }] });
6928
+ h(b), o.show({ x: M[0], y: M[1] - 8, place: "top", title: p.name, rows: [{ label: n[w] ?? "", value: `#${x[b][w]} · ${c(p.data[w] ?? 0)}`, color: S }] });
6922
6929
  }
6923
6930
  },
6924
- S
6931
+ w
6925
6932
  )),
6926
- /* @__PURE__ */ e("text", { x: $(f - 1) + 10, y: _(x[b][f - 1]), className: "select-chart__xlabel", dominantBaseline: "middle", textAnchor: "start", style: { fill: w, fontWeight: 600 }, children: p.name })
6933
+ /* @__PURE__ */ e("text", { x: $(f - 1) + 10, y: _(x[b][f - 1]), className: "select-chart__xlabel", dominantBaseline: "middle", textAnchor: "start", style: { fill: S, fontWeight: 600 }, children: p.name })
6927
6934
  ] }, b);
6928
6935
  })
6929
6936
  ] }),
@@ -6935,8 +6942,8 @@ function To({ axes: t, data: n, height: l = 260, format: c = Y, className: s, ..
6935
6942
  const p = n.map((b) => b.values[_.key] ?? 0);
6936
6943
  return { min: Math.min(...p), max: Math.max(...p) };
6937
6944
  }), $ = (_, p) => {
6938
- const b = x[_], w = b.max === b.min ? 0.5 : (p - b.min) / (b.max - b.min);
6939
- return u.top + g - w * g;
6945
+ const b = x[_], S = b.max === b.min ? 0.5 : (p - b.min) / (b.max - b.min);
6946
+ return u.top + g - S * g;
6940
6947
  };
6941
6948
  return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
6942
6949
  d > 0 && /* @__PURE__ */ m("svg", { width: d, height: l, className: "select-chart", onMouseLeave: () => {
@@ -6949,11 +6956,11 @@ function To({ axes: t, data: n, height: l = 260, format: c = Y, className: s, ..
6949
6956
  /* @__PURE__ */ e("text", { x: y(p), y: u.top + g + 14, className: "select-chart__ylabel", textAnchor: "middle", style: { fontSize: 9 }, children: c(x[p].min) })
6950
6957
  ] }, _.key)),
6951
6958
  n.map((_, p) => {
6952
- const b = _.color ?? j(p), w = t.map((k, M) => `${M ? "L" : "M"}${y(M).toFixed(1)},${$(M, _.values[k.key] ?? 0).toFixed(1)}`).join("");
6959
+ const b = _.color ?? j(p), S = t.map((k, M) => `${M ? "L" : "M"}${y(M).toFixed(1)},${$(M, _.values[k.key] ?? 0).toFixed(1)}`).join("");
6953
6960
  return /* @__PURE__ */ e(
6954
6961
  "path",
6955
6962
  {
6956
- d: w,
6963
+ d: S,
6957
6964
  fill: "none",
6958
6965
  stroke: b,
6959
6966
  strokeWidth: i === p ? 3 : 1.75,
@@ -6990,11 +6997,11 @@ function Nl(t, n = 0) {
6990
6997
  function Wo({ data: t, height: n = 240, format: l = Y, className: c, ...s }) {
6991
6998
  const { ref: a, width: r } = ce(n), d = X(), [o, i] = D(null), h = Nl(t), u = n / (h + 1), f = [], g = (v, y, x, $, _) => {
6992
6999
  if (f.push({ node: v, x0: y, x1: x, depth: $, color: v.color ?? j(_), value: Mt(v) }), v.children && v.children.length) {
6993
- const p = v.children.reduce((w, k) => w + Mt(k), 0) || 1;
7000
+ const p = v.children.reduce((S, k) => S + Mt(k), 0) || 1;
6994
7001
  let b = y;
6995
- v.children.forEach((w, k) => {
6996
- const M = (x - y) * Mt(w) / p;
6997
- g(w, b, b + M, $ + 1, $ === 0 ? k : _), b += M;
7002
+ v.children.forEach((S, k) => {
7003
+ const M = (x - y) * Mt(S) / p;
7004
+ g(S, b, b + M, $ + 1, $ === 0 ? k : _), b += M;
6998
7005
  });
6999
7006
  }
7000
7007
  };
@@ -7037,12 +7044,12 @@ function Oo({ data: t, height: n = 260, className: l, ...c }) {
7037
7044
  if (a > 0) {
7038
7045
  const u = [];
7039
7046
  let f = 0, g = 0;
7040
- const v = (p, b, w, k) => {
7047
+ const v = (p, b, S, k) => {
7041
7048
  g = Math.max(g, b);
7042
- const M = { node: p, depth: b, yUnit: 0, ci: w, parent: k };
7049
+ const M = { node: p, depth: b, yUnit: 0, ci: S, parent: k };
7043
7050
  if (p.children && p.children.length) {
7044
- const S = p.children.map((N, C) => v(N, b + 1, b === 0 ? C : w, M));
7045
- M.yUnit = (S[0].yUnit + S[S.length - 1].yUnit) / 2;
7051
+ const w = p.children.map((N, C) => v(N, b + 1, b === 0 ? C : S, M));
7052
+ M.yUnit = (w[0].yUnit + w[w.length - 1].yUnit) / 2;
7046
7053
  } else
7047
7054
  M.yUnit = f, f++;
7048
7055
  return u.push(M), M;
@@ -7063,7 +7070,7 @@ function Oo({ data: t, height: n = 260, className: l, ...c }) {
7063
7070
  ) : null
7064
7071
  ),
7065
7072
  u.map((p, b) => {
7066
- const w = p.node.color ?? j(p.ci), k = $(p.depth), M = _(p.yUnit), S = !p.node.children || !p.node.children.length;
7073
+ const S = p.node.color ?? j(p.ci), k = $(p.depth), M = _(p.yUnit), w = !p.node.children || !p.node.children.length;
7067
7074
  return /* @__PURE__ */ m("g", { style: { opacity: d === null || d === b ? 1 : 0.4 }, children: [
7068
7075
  /* @__PURE__ */ e(
7069
7076
  "circle",
@@ -7071,7 +7078,7 @@ function Oo({ data: t, height: n = 260, className: l, ...c }) {
7071
7078
  cx: k,
7072
7079
  cy: M,
7073
7080
  r: d === b ? 6 : 4.5,
7074
- fill: w,
7081
+ fill: S,
7075
7082
  className: "select-tree__node",
7076
7083
  onMouseEnter: () => {
7077
7084
  o(b), r.show({ x: k, y: M - 8, place: "top", title: p.node.label, rows: [] });
@@ -7084,11 +7091,11 @@ function Oo({ data: t, height: n = 260, className: l, ...c }) {
7084
7091
  /* @__PURE__ */ e(
7085
7092
  "text",
7086
7093
  {
7087
- x: S ? k + 9 : k,
7088
- y: S ? M : M - 9,
7094
+ x: w ? k + 9 : k,
7095
+ y: w ? M : M - 9,
7089
7096
  className: "select-chart__xlabel",
7090
7097
  dominantBaseline: "middle",
7091
- textAnchor: S ? "start" : "middle",
7098
+ textAnchor: w ? "start" : "middle",
7092
7099
  children: p.node.label
7093
7100
  }
7094
7101
  )
@@ -7159,13 +7166,13 @@ const Ho = R(function({ sets: n, size: l = 240, className: c, ...s }, a) {
7159
7166
  let C = 0, L = 0, E = null;
7160
7167
  for (let A = 0; A < 8e3; A++) {
7161
7168
  const F = Math.cos(C) * L, B = Math.sin(C) * L;
7162
- let W = !0;
7163
- for (const P of f)
7164
- if (Math.hypot(F - P.x, B - P.y) < P.r + N.r + 2) {
7165
- W = !1;
7169
+ let T = !0;
7170
+ for (const I of f)
7171
+ if (Math.hypot(F - I.x, B - I.y) < I.r + N.r + 2) {
7172
+ T = !1;
7166
7173
  break;
7167
7174
  }
7168
- if (W) {
7175
+ if (T) {
7169
7176
  E = [F, B];
7170
7177
  break;
7171
7178
  }
@@ -7173,7 +7180,7 @@ const Ho = R(function({ sets: n, size: l = 240, className: c, ...s }, a) {
7173
7180
  }
7174
7181
  E && f.push({ d: N.d, i: N.i, x: E[0], y: E[1], r: N.r });
7175
7182
  }
7176
- const g = Math.min(...f.map((N) => N.x - N.r)), v = Math.max(...f.map((N) => N.x + N.r)), y = Math.min(...f.map((N) => N.y - N.r)), x = Math.max(...f.map((N) => N.y + N.r)), $ = v - g || 1, _ = x - y || 1, p = 8, b = Math.min((l - p * 2) / $, (l - p * 2) / _), w = (l - $ * b) / 2 - g * b, k = (l - _ * b) / 2 - y * b, M = (N) => N * b + w, S = (N) => N * b + k;
7183
+ const g = Math.min(...f.map((N) => N.x - N.r)), v = Math.max(...f.map((N) => N.x + N.r)), y = Math.min(...f.map((N) => N.y - N.r)), x = Math.max(...f.map((N) => N.y + N.r)), $ = v - g || 1, _ = x - y || 1, p = 8, b = Math.min((l - p * 2) / $, (l - p * 2) / _), S = (l - $ * b) / 2 - g * b, k = (l - _ * b) / 2 - y * b, M = (N) => N * b + S, w = (N) => N * b + k;
7177
7184
  return /* @__PURE__ */ m("div", { ref: r, ...a, className: `select-donut-wrap${s ? " " + s : ""}`, children: [
7178
7185
  /* @__PURE__ */ e("div", { className: "select-radial", style: { width: l, aspectRatio: "1" }, children: /* @__PURE__ */ e("svg", { width: l, height: l, viewBox: `0 0 ${l} ${l}`, className: "select-chart", onMouseLeave: () => {
7179
7186
  i(null), d.hide();
@@ -7184,7 +7191,7 @@ const Ho = R(function({ sets: n, size: l = 240, className: c, ...s }, a) {
7184
7191
  "circle",
7185
7192
  {
7186
7193
  cx: M(N.x),
7187
- cy: S(N.y),
7194
+ cy: w(N.y),
7188
7195
  r: L,
7189
7196
  fill: C,
7190
7197
  fillOpacity: 0.3,
@@ -7192,14 +7199,14 @@ const Ho = R(function({ sets: n, size: l = 240, className: c, ...s }, a) {
7192
7199
  strokeWidth: 1.5,
7193
7200
  className: "select-pack__circle",
7194
7201
  onMouseEnter: () => {
7195
- i(N.i), d.show({ x: M(N.x), y: S(N.y) - L, place: S(N.y) - L < 40 ? "bottom" : "top", title: N.d.label, rows: [{ label: "Valor", value: c(N.d.value), color: C }] });
7202
+ i(N.i), d.show({ x: M(N.x), y: w(N.y) - L, place: w(N.y) - L < 40 ? "bottom" : "top", title: N.d.label, rows: [{ label: "Valor", value: c(N.d.value), color: C }] });
7196
7203
  },
7197
7204
  onMouseLeave: () => {
7198
7205
  i(null), d.hide();
7199
7206
  }
7200
7207
  }
7201
7208
  ),
7202
- L > 18 && /* @__PURE__ */ e("text", { x: M(N.x), y: S(N.y), className: "select-chart__xlabel", textAnchor: "middle", dominantBaseline: "middle", style: { fontWeight: 600 }, children: N.d.label })
7209
+ L > 18 && /* @__PURE__ */ e("text", { x: M(N.x), y: w(N.y), className: "select-chart__xlabel", textAnchor: "middle", dominantBaseline: "middle", style: { fontWeight: 600 }, children: N.d.label })
7203
7210
  ] }, N.i);
7204
7211
  }) }) }),
7205
7212
  /* @__PURE__ */ e(K, { tip: d.tip })
@@ -7214,25 +7221,25 @@ function Vo({ nodes: t, links: n, height: l = 300, format: c = Y, className: s,
7214
7221
  x: v / 2 + Math.cos(M / x * 2 * Math.PI) * v * 0.3,
7215
7222
  y: y / 2 + Math.sin(M / x * 2 * Math.PI) * y * 0.3
7216
7223
  })), p = new Map(t.map((k, M) => [k.id, M])), b = Math.sqrt(v * y / x) * 0.55;
7217
- let w = v * 0.12;
7224
+ let S = v * 0.12;
7218
7225
  for (let k = 0; k < 320; k++) {
7219
7226
  const M = _.map(() => ({ x: 0, y: 0 }));
7220
- for (let S = 0; S < x; S++)
7221
- for (let N = S + 1; N < x; N++) {
7222
- const C = _[S].x - _[N].x, L = _[S].y - _[N].y, E = Math.hypot(C, L) || 0.01, A = b * b / E;
7223
- M[S].x += C / E * A, M[S].y += L / E * A, M[N].x -= C / E * A, M[N].y -= L / E * A;
7227
+ for (let w = 0; w < x; w++)
7228
+ for (let N = w + 1; N < x; N++) {
7229
+ const C = _[w].x - _[N].x, L = _[w].y - _[N].y, E = Math.hypot(C, L) || 0.01, A = b * b / E;
7230
+ M[w].x += C / E * A, M[w].y += L / E * A, M[N].x -= C / E * A, M[N].y -= L / E * A;
7224
7231
  }
7225
- for (const S of n) {
7226
- const N = p.get(S.source), C = p.get(S.target);
7232
+ for (const w of n) {
7233
+ const N = p.get(w.source), C = p.get(w.target);
7227
7234
  if (N == null || C == null) continue;
7228
7235
  const L = _[N].x - _[C].x, E = _[N].y - _[C].y, A = Math.hypot(L, E) || 0.01, F = A * A / b;
7229
7236
  M[N].x -= L / A * F, M[N].y -= E / A * F, M[C].x += L / A * F, M[C].y += E / A * F;
7230
7237
  }
7231
- for (let S = 0; S < x; S++) {
7232
- const N = M[S].x, C = M[S].y, L = Math.hypot(N, C) || 0.01, E = Math.min(L, w);
7233
- _[S].x = Math.max(18, Math.min(v - 18, _[S].x + N / L * E)), _[S].y = Math.max(18, Math.min(y - 18, _[S].y + C / L * E));
7238
+ for (let w = 0; w < x; w++) {
7239
+ const N = M[w].x, C = M[w].y, L = Math.hypot(N, C) || 0.01, E = Math.min(L, S);
7240
+ _[w].x = Math.max(18, Math.min(v - 18, _[w].x + N / L * E)), _[w].y = Math.max(18, Math.min(y - 18, _[w].y + C / L * E));
7234
7241
  }
7235
- w *= 0.97;
7242
+ S *= 0.97;
7236
7243
  }
7237
7244
  return _.forEach((k) => $.set(k.id, { x: k.x, y: k.y })), $;
7238
7245
  }, [t, n, d, l]), f = /* @__PURE__ */ new Map();
@@ -7295,13 +7302,13 @@ function Bs({ children: t }) {
7295
7302
  return /* @__PURE__ */ e("div", { className: "select-combobox__list", ref: n, children: t });
7296
7303
  }
7297
7304
  const Zo = R(function({ label: n, value: l, onChange: c, options: s, placeholder: a = "Selecionar…", searchPlaceholder: r = "Buscar…", labelAction: d, hint: o, error: i, emptyText: h = "Nenhum resultado", disabled: u, required: f, size: g = "md", searchable: v = !0, className: y, ...x }, $) {
7298
- const _ = te(), [p, b] = D(!1), [w, k] = D(""), M = s.find((E) => E.value === l), S = xe(() => {
7299
- const E = w.trim().toLowerCase();
7305
+ const _ = te(), [p, b] = D(!1), [S, k] = D(""), M = s.find((E) => E.value === l), w = xe(() => {
7306
+ const E = S.trim().toLowerCase();
7300
7307
  return !v || !E ? s : s.filter((A) => {
7301
7308
  var F;
7302
7309
  return A.label.toLowerCase().includes(E) || ((F = A.secondary) == null ? void 0 : F.toLowerCase().includes(E));
7303
7310
  });
7304
- }, [s, w, v]), N = () => {
7311
+ }, [s, S, v]), N = () => {
7305
7312
  b(!1), k("");
7306
7313
  }, C = (E) => {
7307
7314
  c(E), N();
@@ -7343,13 +7350,13 @@ const Zo = R(function({ label: n, value: l, onChange: c, options: s, placeholder
7343
7350
  {
7344
7351
  className: "select-combobox__searchinput",
7345
7352
  type: "text",
7346
- value: w,
7353
+ value: S,
7347
7354
  onChange: (E) => k(E.target.value),
7348
7355
  placeholder: r,
7349
7356
  autoFocus: !0
7350
7357
  }
7351
7358
  ) }),
7352
- /* @__PURE__ */ e(Bs, { children: S.length === 0 ? /* @__PURE__ */ e("div", { className: "select-combobox__empty", children: h }) : S.map((E) => {
7359
+ /* @__PURE__ */ e(Bs, { children: w.length === 0 ? /* @__PURE__ */ e("div", { className: "select-combobox__empty", children: h }) : w.map((E) => {
7353
7360
  const A = E.value === l;
7354
7361
  return /* @__PURE__ */ m(
7355
7362
  "button",
@@ -7696,12 +7703,12 @@ function Os(t) {
7696
7703
  return n = n % 12 || 12, `${n} : ${String(t.getMinutes()).padStart(2, "0")} ${l}`;
7697
7704
  }
7698
7705
  const Hs = R(function({ value: n, presets: l = Ds, onApply: c, onCancel: s, accentVar: a, locale: r = "en-US", showTime: d = !0, maxDate: o, embedded: i = !1, className: h, ...u }, f) {
7699
- const g = Rs[r], v = Re(/* @__PURE__ */ new Date()), y = o ? Re(o) : null, [x, $] = D(n ?? { from: v, to: v }), [_, p] = D(xt((n == null ? void 0 : n.from) ?? /* @__PURE__ */ new Date())), [b, w] = D(null), k = At(xt(_), -xt(_).getDay()), M = Array.from({ length: 42 }, (A, F) => At(k, F)), S = (A) => y ? Re(A) > y : !1, N = (A) => A ? g.formatDate(A) : /* @__PURE__ */ e("span", { className: "select-datepicker__placeholder", children: "— / — / ——" }), C = (A) => {
7700
- S(A) || (w(null), $((F) => !F.from || F.from && F.to ? { from: A, to: null } : A < Re(F.from) ? { from: A, to: null } : { from: F.from, to: A }));
7706
+ const g = Rs[r], v = Re(/* @__PURE__ */ new Date()), y = o ? Re(o) : null, [x, $] = D(n ?? { from: v, to: v }), [_, p] = D(xt((n == null ? void 0 : n.from) ?? /* @__PURE__ */ new Date())), [b, S] = D(null), k = At(xt(_), -xt(_).getDay()), M = Array.from({ length: 42 }, (A, F) => At(k, F)), w = (A) => y ? Re(A) > y : !1, N = (A) => A ? g.formatDate(A) : /* @__PURE__ */ e("span", { className: "select-datepicker__placeholder", children: "— / — / ——" }), C = (A) => {
7707
+ w(A) || (S(null), $((F) => !F.from || F.from && F.to ? { from: A, to: null } : A < Re(F.from) ? { from: A, to: null } : { from: F.from, to: A }));
7701
7708
  }, L = (A) => {
7702
7709
  if (A.disabled || !A.range) return;
7703
7710
  const F = A.range();
7704
- $(F), w(A.id), F.from && p(xt(F.from));
7711
+ $(F), S(A.id), F.from && p(xt(F.from));
7705
7712
  }, E = a ? { "--select-dp-accent": `var(${a})` } : void 0;
7706
7713
  return /* @__PURE__ */ e("div", { ref: f, ...u, className: `select select-datepicker${i ? " select-datepicker--bare" : ""}${h ? " " + h : ""}`, style: E, children: /* @__PURE__ */ m("div", { className: "select-datepicker__body", children: [
7707
7714
  /* @__PURE__ */ e("div", { className: "select-datepicker__presets", role: "listbox", "aria-label": "Intervalos", children: l.map((A) => {
@@ -7759,7 +7766,7 @@ const Hs = R(function({ value: n, presets: l = Ds, onApply: c, onCancel: s, acce
7759
7766
  /* @__PURE__ */ m("div", { className: "select-datepicker__grid", role: "grid", children: [
7760
7767
  g.weekdays.map((A, F) => /* @__PURE__ */ e("div", { className: "select-datepicker__weekday", children: A }, F)),
7761
7768
  M.map((A) => {
7762
- const F = A.getMonth() !== _.getMonth(), B = S(A), W = !!x.from && yt(A, x.from), P = !!x.to && yt(A, x.to), O = W || P, T = !!x.from && !!x.to && !yt(x.from, x.to), G = "select-datepicker__day" + (!!x.from && !!x.to && A > Re(x.from) && A < Re(x.to) ? " select-datepicker__day--in-range" : "") + (T && W ? " select-datepicker__day--range-start" : "") + (T && P ? " select-datepicker__day--range-end" : ""), J = "select-datepicker__daybtn" + (O ? " is-selected" : "") + (yt(A, v) && !O ? " is-today" : "") + (F ? " is-outside" : "");
7769
+ const F = A.getMonth() !== _.getMonth(), B = w(A), T = !!x.from && yt(A, x.from), I = !!x.to && yt(A, x.to), O = T || I, W = !!x.from && !!x.to && !yt(x.from, x.to), G = "select-datepicker__day" + (!!x.from && !!x.to && A > Re(x.from) && A < Re(x.to) ? " select-datepicker__day--in-range" : "") + (W && T ? " select-datepicker__day--range-start" : "") + (W && I ? " select-datepicker__day--range-end" : ""), J = "select-datepicker__daybtn" + (O ? " is-selected" : "") + (yt(A, v) && !O ? " is-today" : "") + (F ? " is-outside" : "");
7763
7770
  return /* @__PURE__ */ e("div", { className: G, children: /* @__PURE__ */ e("button", { type: "button", className: J, disabled: B, onClick: () => C(A), children: A.getDate() }) }, A.getTime());
7764
7771
  })
7765
7772
  ] }),
@@ -7856,11 +7863,11 @@ const cr = R(function({ value: n, max: l = 5, onChange: c, size: s = 20, label:
7856
7863
  ) : /* @__PURE__ */ e("span", { children: $ }, y);
7857
7864
  }) });
7858
7865
  }), sr = R(function({ label: n, value: l, onChange: c, min: s, max: a, step: r = 1, decimal: d = !1, disabled: o = !1, hint: i, error: h, onBlur: u, placeholder: f, size: g = "md", className: v, ...y }, x) {
7859
- const $ = te(), _ = (F) => Math.min(a ?? 1 / 0, Math.max(s ?? -1 / 0, F)), p = (F) => Math.round(F * 1e6) / 1e6, b = l ?? 0, w = s != null && b <= s, k = a != null && b >= a, [M, S] = D(!1), [N, C] = D(""), L = d && M ? N : l == null ? "" : String(l), E = (F) => {
7866
+ const $ = te(), _ = (F) => Math.min(a ?? 1 / 0, Math.max(s ?? -1 / 0, F)), p = (F) => Math.round(F * 1e6) / 1e6, b = l ?? 0, S = s != null && b <= s, k = a != null && b >= a, [M, w] = D(!1), [N, C] = D(""), L = d && M ? N : l == null ? "" : String(l), E = (F) => {
7860
7867
  const B = d ? F.replace(/[^\d.,-]/g, "").replace(",", ".") : F.replace(/[^\d-]/g, "");
7861
7868
  if (d && C(B), B === "" || B === "-" || B === ".") return c(null);
7862
- const W = Number(B);
7863
- Number.isFinite(W) && c(_(W));
7869
+ const T = Number(B);
7870
+ Number.isFinite(T) && c(_(T));
7864
7871
  }, A = (F) => {
7865
7872
  const B = _(p(b + F));
7866
7873
  d && C(String(B)), c(B);
@@ -7875,7 +7882,7 @@ const cr = R(function({ value: n, max: l = 5, onChange: c, size: s = 20, label:
7875
7882
  size: g,
7876
7883
  icon: /* @__PURE__ */ e("span", { "aria-hidden": "true", className: "select-numfield__minus", children: "−" }),
7877
7884
  label: "Diminuir",
7878
- disabled: o || w,
7885
+ disabled: o || S,
7879
7886
  onClick: () => A(-r)
7880
7887
  }
7881
7888
  ),
@@ -7892,10 +7899,10 @@ const cr = R(function({ value: n, max: l = 5, onChange: c, size: s = 20, label:
7892
7899
  value: L,
7893
7900
  onChange: (F) => E(F.target.value),
7894
7901
  onFocus: () => {
7895
- S(!0), C(l == null ? "" : String(l));
7902
+ w(!0), C(l == null ? "" : String(l));
7896
7903
  },
7897
7904
  onBlur: () => {
7898
- S(!1), u == null || u();
7905
+ w(!1), u == null || u();
7899
7906
  },
7900
7907
  "aria-invalid": h ? !0 : void 0
7901
7908
  }
@@ -7929,11 +7936,11 @@ function ar({
7929
7936
  emptyState: h,
7930
7937
  helpText: u
7931
7938
  }) {
7932
- const f = d == null || t.length < d, g = t.length > r, v = (_, p) => n(t.map((b, w) => w === _ ? p : b)), y = (_) => n(t.filter((p, b) => b !== _)), x = (_, p) => {
7939
+ const f = d == null || t.length < d, g = t.length > r, v = (_, p) => n(t.map((b, S) => S === _ ? p : b)), y = (_) => n(t.filter((p, b) => b !== _)), x = (_, p) => {
7933
7940
  const b = _ + p;
7934
7941
  if (b < 0 || b >= t.length) return;
7935
- const w = t.slice(), k = w[_];
7936
- w[_] = w[b], w[b] = k, n(w);
7942
+ const S = t.slice(), k = S[_];
7943
+ S[_] = S[b], S[b] = k, n(S);
7937
7944
  }, $ = (_, p) => ({
7938
7945
  index: p,
7939
7946
  isFirst: p === 0,