@selectwin/kit 0.1.13 → 0.1.15
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/SelectChartCard.d.ts +3 -0
- package/dist/SelectKpiCard.d.ts +3 -0
- package/dist/index.js +561 -561
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -28,48 +28,48 @@ 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, u = 160, h = 8, f = 2.9, g = 0.32, v = 1.4,
|
|
32
|
-
let w = 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, u = 160, h = 8, f = 2.9, g = 0.32, v = 1.4, y = 18, N = 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, x = 0, C = [], L = 0, B = 0, A = null, E = 0;
|
|
33
33
|
const F = { x: 0, y: 0 };
|
|
34
34
|
let T = 0, R = 0, O = -10;
|
|
35
35
|
const W = Ne.quickTo(F, "x", { duration: 0.5, ease: "power3.out" }), Z = Ne.quickTo(F, "y", { duration: 0.5, ease: "power3.out" });
|
|
36
36
|
function G() {
|
|
37
37
|
const z = s.getBoundingClientRect();
|
|
38
|
-
L = z.left, B = z.top, w = z.width,
|
|
38
|
+
L = z.left, B = z.top, w = z.width, x = z.height;
|
|
39
39
|
const de = Math.min(window.devicePixelRatio || 1, 2);
|
|
40
|
-
s.width = Math.round(w * de), s.height = Math.round(
|
|
40
|
+
s.width = Math.round(w * de), s.height = Math.round(x * de), a.setTransform(de, 0, 0, de, 0, 0);
|
|
41
41
|
const ie = s.closest(".select-auth") ?? document;
|
|
42
42
|
A = l ? ie.querySelector(l) : null, C = [];
|
|
43
|
-
const ge = Math.ceil(w / o) + 1, he = Math.ceil(
|
|
43
|
+
const ge = Math.ceil(w / o) + 1, he = Math.ceil(x / o) + 1, ae = (w - (ge - 1) * o) / 2, Me = (x - (he - 1) * o) / 2;
|
|
44
44
|
for (let Se = 0; Se < he; Se++)
|
|
45
45
|
for (let Ce = 0; Ce < ge; Ce++) {
|
|
46
|
-
const
|
|
47
|
-
C.push({ x:
|
|
46
|
+
const xe = ae + Ce * o, Fe = Me + Se * o;
|
|
47
|
+
C.push({ x: xe, y: Fe, phase: (xe + Fe) * 0.013 });
|
|
48
48
|
}
|
|
49
|
-
F.x === 0 && F.y === 0 && (F.x = T = w / 2, F.y = R =
|
|
49
|
+
F.x === 0 && F.y === 0 && (F.x = T = w / 2, F.y = R = x / 2);
|
|
50
50
|
}
|
|
51
51
|
function J(z, de, ie, ge, he) {
|
|
52
52
|
if (!A) return;
|
|
53
|
-
const ae = A.getBoundingClientRect(), Me = ae.left - L + ae.width / 2, Se = ae.top - B + ae.height / 2, Ce = ae.width / 2,
|
|
53
|
+
const ae = A.getBoundingClientRect(), Me = ae.left - L + ae.width / 2, Se = ae.top - B + ae.height / 2, Ce = ae.width / 2, xe = ae.height / 2, Fe = (z - Me) / (Ce + y), $e = (de - Se) / (xe + y), Ve = Math.sqrt(Fe * Fe + $e * $e), Oe = Ve < 1 ? 1 - Ve : 0, Ae = Oe * Oe * (3 - 2 * Oe);
|
|
54
54
|
if (Ae > 1e-3 || E > 1e-3) {
|
|
55
|
-
const I = an((z - Me) / Math.max(Ce, 1), -1, 1) * 10 * Ae, V = an((de - Se) / Math.max(
|
|
55
|
+
const I = an((z - Me) / Math.max(Ce, 1), -1, 1) * 10 * Ae, V = an((de - Se) / Math.max(xe, 1), -1, 1) * 10 * Ae;
|
|
56
56
|
A.style.setProperty("--select-card-glow", Ae.toFixed(3)), A.style.setProperty("--select-card-glow-rgb", `${ie}, ${ge}, ${he}`), A.style.setProperty("--select-card-glow-x", `${I.toFixed(1)}px`), A.style.setProperty("--select-card-glow-y", `${V.toFixed(1)}px`);
|
|
57
57
|
}
|
|
58
58
|
E = Ae;
|
|
59
59
|
}
|
|
60
60
|
function re() {
|
|
61
|
-
a.clearRect(0, 0, w,
|
|
61
|
+
a.clearRect(0, 0, w, x), 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, N), a.fill();
|
|
64
64
|
A == null || A.style.setProperty("--select-card-glow", "0");
|
|
65
65
|
}
|
|
66
66
|
function pe(z) {
|
|
67
67
|
let de, ie;
|
|
68
|
-
z - O < v ? (de = T, ie = R) : (de = w * 0.5 + Math.cos(z * 0.45) * w * 0.3, ie =
|
|
68
|
+
z - O < v ? (de = T, ie = R) : (de = w * 0.5 + Math.cos(z * 0.45) * w * 0.3, ie = x * 0.5 + Math.sin(z * 0.6) * x * 0.28), W(de), Z(ie);
|
|
69
69
|
const ge = F.x, he = F.y;
|
|
70
|
-
a.clearRect(0, 0, w,
|
|
70
|
+
a.clearRect(0, 0, w, x);
|
|
71
71
|
for (let ae = 0; ae < C.length; ae++) {
|
|
72
|
-
const Me = C[ae], Se = Me.x - ge, Ce = Me.y - he,
|
|
72
|
+
const Me = C[ae], Se = Me.x - ge, Ce = Me.y - he, xe = Math.sqrt(Se * Se + Ce * Ce), Fe = xe < u ? 1 - xe / u : 0, $e = Fe * Fe, Ve = Math.sin(z * 1.4 + Me.phase) * 0.5 + 0.5, Oe = $e * h, Ae = xe > 1e-4 ? 1 / xe : 0, I = Me.x - Se * Ae * Oe, V = Me.y - Ce * Ae * Oe, U = 1 + $e * (f - 1) + Ve * 0.14, oe = Math.min(1, g + Ve * 0.08 + $e * (1 - g)), le = _ + (S - _) * $e | 0, te = p + (k - p) * $e | 0, ue = b + (M - b) * $e | 0;
|
|
73
73
|
$e > 0.12 ? (a.shadowColor = `rgba(${S},${k},${M},${0.6 * $e})`, a.shadowBlur = 12 * $e) : a.shadowBlur = 0, a.beginPath(), a.arc(I, V, i * U, 0, N), a.fillStyle = `rgba(${le},${te},${ue},${oe})`, a.fill();
|
|
74
74
|
}
|
|
75
75
|
a.shadowBlur = 0, J(ge, he, S, k, M);
|
|
@@ -90,7 +90,7 @@ function Ks({ className: t, theme: n, glowTarget: l }) {
|
|
|
90
90
|
});
|
|
91
91
|
}, [n, l]), /* @__PURE__ */ e("canvas", { ref: c, className: t, "aria-hidden": "true" });
|
|
92
92
|
}
|
|
93
|
-
const Js = ["dots", "plexus", "grid", "flow", "circuit"], Je = Math.PI * 2, Ge = (t, n, l) => t < n ? n : t > l ? l : t,
|
|
93
|
+
const Js = ["dots", "plexus", "grid", "flow", "circuit"], Je = Math.PI * 2, Ge = (t, n, l) => t < n ? n : t > l ? l : t, xt = (t, n, l) => t + (n - t) * l;
|
|
94
94
|
function Al(t, n, l) {
|
|
95
95
|
const c = t.getPropertyValue(n).match(/(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/);
|
|
96
96
|
return c ? [Number(c[1]), Number(c[2]), Number(c[3])] : l;
|
|
@@ -112,19 +112,19 @@ const Bl = (t) => {
|
|
|
112
112
|
function i() {
|
|
113
113
|
const h = t.w(), f = t.h();
|
|
114
114
|
d = [];
|
|
115
|
-
const g = Math.ceil(h / 30) + 1, v = Math.ceil(f / 30) + 1,
|
|
115
|
+
const g = Math.ceil(h / 30) + 1, v = Math.ceil(f / 30) + 1, y = (h - (g - 1) * 30) / 2, N = (f - (v - 1) * 30) / 2;
|
|
116
116
|
for (let $ = 0; $ < v; $++)
|
|
117
117
|
for (let _ = 0; _ < g; _++) {
|
|
118
|
-
const p =
|
|
118
|
+
const p = y + _ * 30, b = N + $ * 30;
|
|
119
119
|
d.push({ x: p, y: b, phase: (p + b) * 0.013 });
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
function u(h, f) {
|
|
123
|
-
const { ctx: g, pointer: v } = t, [
|
|
123
|
+
const { ctx: g, pointer: v } = t, [y, N, $] = t.ink, [_, p, b] = t.accent, S = t.w(), k = t.h();
|
|
124
124
|
g.clearRect(0, 0, S, k);
|
|
125
125
|
const M = v.x, w = v.y;
|
|
126
|
-
for (const
|
|
127
|
-
const C =
|
|
126
|
+
for (const x of d) {
|
|
127
|
+
const C = x.x - M, L = x.y - w, B = Math.hypot(C, L), A = f > 0 && B < 150 ? 1 - B / 150 : 0, E = A * A * f, F = Math.sin(h * 1.1 + x.phase) * 0.5 + 0.5, T = E * 6, R = B > 1e-3 ? 1 / B : 0, O = x.x - C * R * T, W = x.y - L * R * T, Z = 1 + E * (2.4 - 1) + F * 0.1, G = Math.min(1, 0.3 + F * 0.06 + E * (1 - 0.3)), J = y + (_ - y) * E | 0, re = N + (p - N) * E | 0, pe = $ + (b - $) * E | 0;
|
|
128
128
|
t.dark && E > 0.14 ? (g.shadowColor = `rgba(${_},${p},${b},${0.5 * E})`, g.shadowBlur = 10 * E) : g.shadowBlur = 0, g.beginPath(), g.arc(O, W, 1.2 * Z, 0, Je), g.fillStyle = `rgba(${J},${re},${pe},${G})`, g.fill();
|
|
129
129
|
}
|
|
130
130
|
g.shadowBlur = 0;
|
|
@@ -132,7 +132,7 @@ const Bl = (t) => {
|
|
|
132
132
|
return {
|
|
133
133
|
build: i,
|
|
134
134
|
frame(h) {
|
|
135
|
-
o =
|
|
135
|
+
o = xt(o, t.pointer.active ? 1 : 0, 0.06), u(h, o), o > 0.02 ? t.cardGlow(t.pointer.x, t.pointer.y) : t.clearGlow();
|
|
136
136
|
},
|
|
137
137
|
paintStatic() {
|
|
138
138
|
u(0, 0), t.clearGlow();
|
|
@@ -148,7 +148,7 @@ const Bl = (t) => {
|
|
|
148
148
|
a.push({ x: Math.random() * c, y: Math.random() * s, vx: (Math.random() - 0.5) * 0.22, vy: (Math.random() - 0.5) * 0.22 });
|
|
149
149
|
}
|
|
150
150
|
function d(o) {
|
|
151
|
-
const { ctx: i, pointer: u } = t, [h, f, g] = t.ink, [v,
|
|
151
|
+
const { ctx: i, pointer: u } = t, [h, f, g] = t.ink, [v, y, N] = t.accent;
|
|
152
152
|
i.clearRect(0, 0, c, s);
|
|
153
153
|
for (const p of a)
|
|
154
154
|
p.x += p.vx, p.y += p.vy, p.x < -12 ? p.x = c + 12 : p.x > c + 12 && (p.x = -12), p.y < -12 ? p.y = s + 12 : p.y > s + 12 && (p.y = -12);
|
|
@@ -156,9 +156,9 @@ const Bl = (t) => {
|
|
|
156
156
|
for (let p = 0; p < a.length; p++) {
|
|
157
157
|
const b = a[p];
|
|
158
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,
|
|
160
|
-
if (
|
|
161
|
-
const C = 1 - Math.sqrt(
|
|
159
|
+
const k = a[S], M = b.x - k.x, w = b.y - k.y, x = M * M + w * w;
|
|
160
|
+
if (x < 132 * 132) {
|
|
161
|
+
const C = 1 - Math.sqrt(x) / 132;
|
|
162
162
|
i.strokeStyle = `rgba(${h},${f},${g},${(C * C * 0.5).toFixed(3)})`, i.beginPath(), i.moveTo(b.x, b.y), i.lineTo(k.x, k.y), i.stroke();
|
|
163
163
|
}
|
|
164
164
|
}
|
|
@@ -168,10 +168,10 @@ const Bl = (t) => {
|
|
|
168
168
|
let b = 0;
|
|
169
169
|
if (o) {
|
|
170
170
|
const w = Math.hypot(p.x - $, p.y - _);
|
|
171
|
-
w < 175 && (b = 1 - w / 175, i.strokeStyle = `rgba(${v},${
|
|
171
|
+
w < 175 && (b = 1 - w / 175, i.strokeStyle = `rgba(${v},${y},${N},${(b * b * 0.5).toFixed(3)})`, i.beginPath(), i.moveTo($, _), i.lineTo(p.x, p.y), i.stroke());
|
|
172
172
|
}
|
|
173
|
-
const S = h + (v - h) * b | 0, k = f + (
|
|
174
|
-
t.dark && b > 0.2 ? (i.shadowColor = `rgba(${v},${
|
|
173
|
+
const S = h + (v - h) * b | 0, k = f + (y - f) * b | 0, M = g + (N - g) * b | 0;
|
|
174
|
+
t.dark && b > 0.2 ? (i.shadowColor = `rgba(${v},${y},${N},${0.6 * b})`, i.shadowBlur = 10 * b) : i.shadowBlur = 0, i.beginPath(), i.arc(p.x, p.y, 1.4 + b * 2.2, 0, Je), i.fillStyle = `rgba(${S},${k},${M},${0.5 + b * 0.5})`, i.fill();
|
|
175
175
|
}
|
|
176
176
|
i.shadowBlur = 0;
|
|
177
177
|
}
|
|
@@ -191,22 +191,22 @@ const Bl = (t) => {
|
|
|
191
191
|
c = t.w(), s = t.h(), a = Math.ceil(c / 44) + 1, r = Math.ceil(s / 44) + 1, d = (c - (a - 1) * 44) / 2, o = (s - (r - 1) * 44) / 2;
|
|
192
192
|
}
|
|
193
193
|
function u(h, f) {
|
|
194
|
-
const { ctx: g, pointer: v } = t, [
|
|
195
|
-
g.clearRect(0, 0, c, s), g.lineWidth = 1, g.strokeStyle = `rgba(${
|
|
196
|
-
for (let
|
|
197
|
-
const C = d +
|
|
194
|
+
const { ctx: g, pointer: v } = t, [y, N, $] = t.ink, [_, p, b] = t.accent;
|
|
195
|
+
g.clearRect(0, 0, c, s), g.lineWidth = 1, g.strokeStyle = `rgba(${y},${N},${$},0.1)`, g.beginPath();
|
|
196
|
+
for (let x = 0; x < a; x++) {
|
|
197
|
+
const C = d + x * 44;
|
|
198
198
|
g.moveTo(C, 0), g.lineTo(C, s);
|
|
199
199
|
}
|
|
200
|
-
for (let
|
|
201
|
-
const C = o +
|
|
200
|
+
for (let x = 0; x < r; x++) {
|
|
201
|
+
const C = o + x * 44;
|
|
202
202
|
g.moveTo(0, C), g.lineTo(c, C);
|
|
203
203
|
}
|
|
204
204
|
g.stroke();
|
|
205
205
|
const S = (h * 0.12 % 1 + 1) % 1 * s, k = g.createLinearGradient(0, S - 90, 0, S + 90);
|
|
206
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
207
|
const M = v.x, w = v.y;
|
|
208
|
-
for (let
|
|
209
|
-
const C = o +
|
|
208
|
+
for (let x = 0; x < r; x++) {
|
|
209
|
+
const C = o + x * 44, L = 1 - Math.min(1, Math.abs(C - S) / 90), B = L * L * 0.8;
|
|
210
210
|
for (let A = 0; A < a; A++) {
|
|
211
211
|
const E = d + A * 44;
|
|
212
212
|
let F = B;
|
|
@@ -215,7 +215,7 @@ const Bl = (t) => {
|
|
|
215
215
|
W < 120 && (F = Math.max(F, (1 - W / 120) ** 2));
|
|
216
216
|
}
|
|
217
217
|
if (F < 0.02) continue;
|
|
218
|
-
const T =
|
|
218
|
+
const T = y + (_ - y) * F | 0, R = N + (p - N) * F | 0, O = $ + (b - $) * F | 0;
|
|
219
219
|
g.beginPath(), g.arc(E, C, 1 + F * 2.2, 0, Je), g.fillStyle = `rgba(${T},${R},${O},${0.3 + F * 0.6})`, g.fill();
|
|
220
220
|
}
|
|
221
221
|
}
|
|
@@ -247,22 +247,22 @@ const Bl = (t) => {
|
|
|
247
247
|
}
|
|
248
248
|
}
|
|
249
249
|
function o(i, u) {
|
|
250
|
-
const { ctx: h, pointer: f } = t, [g, v,
|
|
250
|
+
const { ctx: h, pointer: f } = t, [g, v, y] = t.ink, [N, $, _] = t.accent;
|
|
251
251
|
h.clearRect(0, 0, l, c), h.lineCap = "round";
|
|
252
252
|
const p = f.x, b = f.y;
|
|
253
253
|
for (const S of s) {
|
|
254
254
|
let k = a(S.x, S.y, i), M = 0;
|
|
255
255
|
if (u) {
|
|
256
256
|
const B = S.x - p, A = S.y - b, E = Math.hypot(B, A);
|
|
257
|
-
E < 160 && (M = 1 - E / 160, k =
|
|
257
|
+
E < 160 && (M = 1 - E / 160, k = xt(k, Math.atan2(A, B) + Math.PI / 2, M * 0.7));
|
|
258
258
|
}
|
|
259
259
|
const w = 0.9 + M * 0.6;
|
|
260
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
261
|
r(S);
|
|
262
262
|
continue;
|
|
263
263
|
}
|
|
264
|
-
const
|
|
265
|
-
h.strokeStyle = `rgba(${
|
|
264
|
+
const x = g + (N - g) * M | 0, C = v + ($ - v) * M | 0, L = y + (_ - y) * M | 0;
|
|
265
|
+
h.strokeStyle = `rgba(${x},${C},${L},${0.16 + M * 0.5})`, h.lineWidth = 1 + M * 0.8, h.beginPath();
|
|
266
266
|
for (let B = 0; B < S.hist.length; B += 2) {
|
|
267
267
|
const A = S.hist[B], E = S.hist[B + 1];
|
|
268
268
|
B === 0 ? h.moveTo(A, E) : h.lineTo(A, E);
|
|
@@ -280,8 +280,8 @@ const Bl = (t) => {
|
|
|
280
280
|
i.clearRect(0, 0, l, c), i.strokeStyle = `rgba(${u},${h},${f},0.16)`, i.lineWidth = 1, i.lineCap = "round";
|
|
281
281
|
for (let g = 0; g < c; g += 34)
|
|
282
282
|
for (let v = 0; v < l; v += 34) {
|
|
283
|
-
const
|
|
284
|
-
i.beginPath(), i.moveTo(v, g), i.lineTo(v + Math.cos(
|
|
283
|
+
const y = a(v, g, 0);
|
|
284
|
+
i.beginPath(), i.moveTo(v, g), i.lineTo(v + Math.cos(y) * 10, g + Math.sin(y) * 10), i.stroke();
|
|
285
285
|
}
|
|
286
286
|
t.clearGlow();
|
|
287
287
|
}
|
|
@@ -290,7 +290,7 @@ const Bl = (t) => {
|
|
|
290
290
|
let l = 0, c = 0, s = [];
|
|
291
291
|
function a() {
|
|
292
292
|
l = t.w(), c = t.h(), s = [];
|
|
293
|
-
const i = Math.max(2, Math.floor(l / 26)), u = Math.max(2, Math.floor(c / 26)), h = (l - i * 26) / 2, f = (c - u * 26) / 2, g = Ge(Math.round(l * c / 26e3), 10, 34), v = [1, 0, -1, 0],
|
|
293
|
+
const i = Math.max(2, Math.floor(l / 26)), u = Math.max(2, Math.floor(c / 26)), h = (l - i * 26) / 2, f = (c - u * 26) / 2, g = Ge(Math.round(l * c / 26e3), 10, 34), v = [1, 0, -1, 0], y = [0, 1, 0, -1];
|
|
294
294
|
for (let N = 0; N < g; N++) {
|
|
295
295
|
let $ = Math.floor(Math.random() * i), _ = Math.floor(Math.random() * u);
|
|
296
296
|
const p = [h + $ * 26, f + _ * 26], b = 3 + Math.floor(Math.random() * 5);
|
|
@@ -298,7 +298,7 @@ const Bl = (t) => {
|
|
|
298
298
|
for (let C = 0; C < b; C++) {
|
|
299
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
|
-
$ = Ge($ + v[S] * L, 0, i), _ = Ge(_ +
|
|
301
|
+
$ = Ge($ + v[S] * L, 0, i), _ = Ge(_ + y[S] * L, 0, u), p.push(h + $ * 26, f + _ * 26);
|
|
302
302
|
}
|
|
303
303
|
const k = [];
|
|
304
304
|
let M = 0;
|
|
@@ -307,8 +307,8 @@ const Bl = (t) => {
|
|
|
307
307
|
k.push(L), M += L;
|
|
308
308
|
}
|
|
309
309
|
if (M < 26) continue;
|
|
310
|
-
const w = [],
|
|
311
|
-
for (let C = 0; C <
|
|
310
|
+
const w = [], x = 1 + (Math.random() < 0.4 ? 1 : 0);
|
|
311
|
+
for (let C = 0; C < x; C++) w.push({ p: Math.random(), sp: 0.1 + Math.random() * 0.16 });
|
|
312
312
|
s.push({ pts: p, len: M, seg: k, pulses: w });
|
|
313
313
|
}
|
|
314
314
|
}
|
|
@@ -318,18 +318,18 @@ const Bl = (t) => {
|
|
|
318
318
|
const g = i.seg[f];
|
|
319
319
|
if (h <= g || f === i.seg.length - 1) {
|
|
320
320
|
const v = g > 0 ? h / g : 0;
|
|
321
|
-
return [
|
|
321
|
+
return [xt(i.pts[f * 2], i.pts[f * 2 + 2], v), xt(i.pts[f * 2 + 1], i.pts[f * 2 + 3], v)];
|
|
322
322
|
}
|
|
323
323
|
h -= g;
|
|
324
324
|
}
|
|
325
325
|
return [i.pts[0], i.pts[1]];
|
|
326
326
|
}
|
|
327
327
|
function d(i, u, h, f, g, v) {
|
|
328
|
-
const { ctx:
|
|
329
|
-
|
|
328
|
+
const { ctx: y } = t;
|
|
329
|
+
y.lineWidth = 1.2, y.strokeStyle = `rgba(${h},${f},${g},${0.45 + v * 0.4})`, y.beginPath(), y.arc(i, u, 2.4, 0, Je), y.stroke(), y.beginPath(), y.arc(i, u, 0.9, 0, Je), y.fillStyle = `rgba(${h},${f},${g},${0.6 + v * 0.4})`, y.fill();
|
|
330
330
|
}
|
|
331
331
|
function o(i, u) {
|
|
332
|
-
const { ctx: h, pointer: f } = t, [g, v,
|
|
332
|
+
const { ctx: h, pointer: f } = t, [g, v, y] = t.ink, [N, $, _] = t.accent;
|
|
333
333
|
h.clearRect(0, 0, l, c), h.lineJoin = "round", h.lineCap = "round";
|
|
334
334
|
const p = f.x, b = f.y;
|
|
335
335
|
for (const S of s) {
|
|
@@ -338,13 +338,13 @@ const Bl = (t) => {
|
|
|
338
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
|
-
h.strokeStyle = `rgba(${g},${v},${
|
|
341
|
+
h.strokeStyle = `rgba(${g},${v},${y},${0.12 + k * 0.18})`, h.lineWidth = 1.2, h.beginPath(), h.moveTo(S.pts[0], S.pts[1]);
|
|
342
342
|
for (let M = 2; M < S.pts.length; M += 2) h.lineTo(S.pts[M], S.pts[M + 1]);
|
|
343
|
-
h.stroke(), d(S.pts[0], S.pts[1], g, v,
|
|
343
|
+
h.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
344
|
for (const M of S.pulses) {
|
|
345
345
|
M.p += M.sp * i, M.p > 1 && (M.p -= 1);
|
|
346
|
-
const [w,
|
|
347
|
-
t.dark && (h.shadowColor = `rgba(${N},${$},${_},0.85)`, h.shadowBlur = 10), h.beginPath(), h.arc(w,
|
|
346
|
+
const [w, x] = r(S, M.p);
|
|
347
|
+
t.dark && (h.shadowColor = `rgba(${N},${$},${_},0.85)`, h.shadowBlur = 10), h.beginPath(), h.arc(w, x, 2.1, 0, Je), h.fillStyle = `rgba(${N},${$},${_},0.95)`, h.fill(), h.shadowBlur = 0;
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
}
|
|
@@ -378,13 +378,13 @@ function Qs({
|
|
|
378
378
|
const r = a.getContext("2d");
|
|
379
379
|
if (!r) return;
|
|
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), u = Al(i, "--select-dot", o ? [235, 238, 255] : [64, 68, 92]), h = El(i.getPropertyValue("--select-primary"), o ? [255, 255, 255] : [33, 37, 41]);
|
|
381
|
-
let f = 0, g = 0, v = 0,
|
|
381
|
+
let f = 0, g = 0, v = 0, y = 0, N = null, $ = 0;
|
|
382
382
|
const _ = 1.2, p = { x: 0, y: 0 }, b = { x: 0, y: 0, active: !1 };
|
|
383
383
|
let S = 0, k = 0, M = -10;
|
|
384
|
-
const w = Ne.quickTo(p, "x", { duration: 0.5, ease: "power3.out" }),
|
|
384
|
+
const w = Ne.quickTo(p, "x", { duration: 0.5, ease: "power3.out" }), x = Ne.quickTo(p, "y", { duration: 0.5, ease: "power3.out" });
|
|
385
385
|
function C(G, J) {
|
|
386
386
|
if (!N) return;
|
|
387
|
-
const re = N.getBoundingClientRect(), pe = re.left - v + re.width / 2, we = re.top -
|
|
387
|
+
const re = N.getBoundingClientRect(), pe = re.left - v + re.width / 2, we = re.top - y + re.height / 2, se = re.width / 2, H = re.height / 2, Q = 18, z = (G - pe) / (se + Q), de = (J - we) / (H + Q), ie = Math.sqrt(z * z + de * de), ge = ie < 1 ? 1 - ie : 0, he = ge * ge * (3 - 2 * ge);
|
|
388
388
|
if (he > 1e-3 || $ > 1e-3) {
|
|
389
389
|
const ae = Ge((G - pe) / Math.max(se, 1), -1, 1) * 10 * he, Me = Ge((J - we) / Math.max(H, 1), -1, 1) * 10 * he;
|
|
390
390
|
N.style.setProperty("--select-card-glow", he.toFixed(3)), N.style.setProperty("--select-card-glow-rgb", `${h[0]}, ${h[1]}, ${h[2]}`), N.style.setProperty("--select-card-glow-x", `${ae.toFixed(1)}px`), N.style.setProperty("--select-card-glow-y", `${Me.toFixed(1)}px`);
|
|
@@ -397,7 +397,7 @@ function Qs({
|
|
|
397
397
|
const B = { ctx: r, w: () => f, h: () => g, ink: u, accent: h, dark: o, pointer: b, cardGlow: C, clearGlow: L }, A = Dl[c](B);
|
|
398
398
|
function E() {
|
|
399
399
|
const G = a.getBoundingClientRect();
|
|
400
|
-
v = G.left,
|
|
400
|
+
v = G.left, y = G.top, f = G.width, g = G.height;
|
|
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;
|
|
@@ -406,14 +406,14 @@ function Qs({
|
|
|
406
406
|
let F = -1;
|
|
407
407
|
function T(G) {
|
|
408
408
|
const J = F < 0 ? 0 : Math.min(G - F, 0.05);
|
|
409
|
-
F = G, b.active = G - M < _, w(b.active ? S : f / 2),
|
|
409
|
+
F = G, b.active = G - M < _, w(b.active ? S : f / 2), x(b.active ? k : g / 2), b.x = p.x, b.y = p.y, A.frame(G, J);
|
|
410
410
|
}
|
|
411
411
|
function R(G) {
|
|
412
|
-
S = G.clientX - v, k = G.clientY -
|
|
412
|
+
S = G.clientX - v, k = G.clientY - y, M = Ne.ticker.time;
|
|
413
413
|
}
|
|
414
414
|
function O() {
|
|
415
415
|
const G = a.getBoundingClientRect();
|
|
416
|
-
v = G.left,
|
|
416
|
+
v = G.left, y = G.top;
|
|
417
417
|
}
|
|
418
418
|
E();
|
|
419
419
|
const W = new ResizeObserver(() => {
|
|
@@ -450,10 +450,10 @@ const ea = P(function({ title: n, subtitle: l, logo: c, mark: s, children: a, fo
|
|
|
450
450
|
children: u,
|
|
451
451
|
...h
|
|
452
452
|
}, f) {
|
|
453
|
-
const [g, v] = D([]),
|
|
453
|
+
const [g, v] = D([]), y = Y(0), N = (_) => {
|
|
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, S =
|
|
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
|
{
|
|
@@ -738,13 +738,13 @@ function Yl() {
|
|
|
738
738
|
/* @__PURE__ */ e("path", { d: "m7.75 12 2.83 2.83 5.67-5.66" })
|
|
739
739
|
] });
|
|
740
740
|
}
|
|
741
|
-
function
|
|
741
|
+
function ya() {
|
|
742
742
|
return /* @__PURE__ */ m("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: [
|
|
743
743
|
/* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "4" }),
|
|
744
744
|
/* @__PURE__ */ e("path", { d: "M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-3.9 7.9" })
|
|
745
745
|
] });
|
|
746
746
|
}
|
|
747
|
-
function
|
|
747
|
+
function xa() {
|
|
748
748
|
return /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ e("path", { d: "M16.29 2.15H7.7C6 2.15 5.25 3 4.79 4.04L2.23 9.8c-.46 1.04-.21 2.59.56 3.43l6.86 7.54c1.3 1.42 3.42 1.42 4.71 0l6.85-7.55c.77-.85 1.02-2.39.55-3.43L19.2 4.03c-.46-1.03-1.21-1.88-2.91-1.88ZM3.5 8h17" }) });
|
|
749
749
|
}
|
|
750
750
|
function Na() {
|
|
@@ -866,7 +866,7 @@ const et = P(function({ htmlFor: n, label: l, info: c, action: s, className: a,
|
|
|
866
866
|
] }),
|
|
867
867
|
s
|
|
868
868
|
] });
|
|
869
|
-
}), De = P(function({ label: n, value: l, onChange: c, type: s = "text", labelAction: a, info: r, description: d, hint: o, error: i, prefix: u, suffix: h, mono: f, autoComplete: g, placeholder: v, required:
|
|
869
|
+
}), De = P(function({ label: n, value: l, onChange: c, type: s = "text", labelAction: a, info: r, description: d, hint: o, error: i, prefix: u, suffix: h, mono: f, autoComplete: g, placeholder: v, required: y, disabled: N, readOnly: $, name: _, id: p, minLength: b, maxLength: S, min: k, max: M, step: w, inputMode: x, autoFocus: C, onBlur: L, onKeyDown: B, size: A = "md", className: E, ...F }, T) {
|
|
870
870
|
const R = ee(), O = p ?? R, [W, Z] = D(!1), G = s === "password", J = G && W ? "text" : s, re = i ? `${O}-err` : o ? `${O}-hint` : void 0, pe = u != null || h != null, we = s === "number" && !pe && !$, se = l === "" ? null : Number(l), H = (ie) => {
|
|
871
871
|
const ge = Number(w ?? 1) || 1;
|
|
872
872
|
let ae = (se != null && Number.isFinite(se) ? se : 0) + ie * ge;
|
|
@@ -883,7 +883,7 @@ const et = P(function({ htmlFor: n, label: l, info: c, action: s, className: a,
|
|
|
883
883
|
onKeyDown: B,
|
|
884
884
|
autoComplete: g,
|
|
885
885
|
placeholder: v,
|
|
886
|
-
required:
|
|
886
|
+
required: y,
|
|
887
887
|
disabled: N,
|
|
888
888
|
readOnly: $,
|
|
889
889
|
name: _,
|
|
@@ -892,7 +892,7 @@ const et = P(function({ htmlFor: n, label: l, info: c, action: s, className: a,
|
|
|
892
892
|
min: k,
|
|
893
893
|
max: M,
|
|
894
894
|
step: w,
|
|
895
|
-
inputMode:
|
|
895
|
+
inputMode: x,
|
|
896
896
|
autoFocus: C,
|
|
897
897
|
"aria-invalid": i ? !0 : void 0,
|
|
898
898
|
"aria-describedby": re
|
|
@@ -962,7 +962,7 @@ const et = P(function({ htmlFor: n, label: l, info: c, action: s, className: a,
|
|
|
962
962
|
] }),
|
|
963
963
|
a && /* @__PURE__ */ e("span", { className: "select-checkbox__hint", children: a })
|
|
964
964
|
] });
|
|
965
|
-
}), Wa = P(function({ label: n, value: l, onChange: c, labelAction: s, info: a, description: r, hint: d, error: o, placeholder: i, rows: u = 4, mono: h, name: f, required: g, disabled: v, maxLength:
|
|
965
|
+
}), Wa = P(function({ label: n, value: l, onChange: c, labelAction: s, info: a, description: r, hint: d, error: o, placeholder: i, rows: u = 4, mono: h, name: f, required: g, disabled: v, maxLength: y, onBlur: N, size: $ = "md", className: _, ...p }, b) {
|
|
966
966
|
const S = ee(), 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
968
|
(n || a || s) && /* @__PURE__ */ e(et, { htmlFor: S, label: n, info: a, action: s }),
|
|
@@ -980,7 +980,7 @@ const et = P(function({ htmlFor: n, label: l, info: c, action: s, className: a,
|
|
|
980
980
|
name: f,
|
|
981
981
|
required: g,
|
|
982
982
|
disabled: v,
|
|
983
|
-
maxLength:
|
|
983
|
+
maxLength: y,
|
|
984
984
|
"aria-invalid": o ? !0 : void 0,
|
|
985
985
|
"aria-describedby": k
|
|
986
986
|
}
|
|
@@ -988,14 +988,14 @@ const et = P(function({ htmlFor: n, label: l, info: c, action: s, className: a,
|
|
|
988
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 = P(function({ label: n, value: l, onChange: c, unit: s, info: a, hint: r, error: d, placeholder: o = "0", disabled: i = !1, min: u, max: h, className: f, ...g }, v) {
|
|
991
|
-
const
|
|
991
|
+
const y = ee();
|
|
992
992
|
return /* @__PURE__ */ m("div", { ref: v, ...g, className: `select-field${f ? " " + f : ""}`, children: [
|
|
993
|
-
n && /* @__PURE__ */ e(et, { htmlFor:
|
|
993
|
+
n && /* @__PURE__ */ e(et, { htmlFor: y, label: n, info: a }),
|
|
994
994
|
/* @__PURE__ */ m("div", { className: `select-unit${d ? " select-unit--error" : ""}${i ? " select-unit--disabled" : ""}`, children: [
|
|
995
995
|
/* @__PURE__ */ e(
|
|
996
996
|
"input",
|
|
997
997
|
{
|
|
998
|
-
id:
|
|
998
|
+
id: y,
|
|
999
999
|
className: "select-unit__input",
|
|
1000
1000
|
type: "number",
|
|
1001
1001
|
inputMode: "numeric",
|
|
@@ -1015,9 +1015,9 @@ const et = P(function({ htmlFor: n, label: l, info: c, action: s, className: a,
|
|
|
1015
1015
|
minimumFractionDigits: 2,
|
|
1016
1016
|
maximumFractionDigits: 2
|
|
1017
1017
|
}), Ha = P(function({ label: n, value: l, onChange: c, info: s, hint: a, error: r, onBlur: d, placeholder: o = "0,00", name: i, disabled: u = !1, size: h = "md", className: f, ...g }, v) {
|
|
1018
|
-
const
|
|
1018
|
+
const y = ee();
|
|
1019
1019
|
return /* @__PURE__ */ m("div", { ref: v, ...g, className: `select-field${h === "sm" ? " select-field--sm" : ""}${f ? " " + f : ""}`, children: [
|
|
1020
|
-
n && /* @__PURE__ */ e(et, { htmlFor:
|
|
1020
|
+
n && /* @__PURE__ */ e(et, { htmlFor: y, label: n, info: s }),
|
|
1021
1021
|
/* @__PURE__ */ m(
|
|
1022
1022
|
"div",
|
|
1023
1023
|
{
|
|
@@ -1027,7 +1027,7 @@ const et = P(function({ htmlFor: n, label: l, info: c, action: s, className: a,
|
|
|
1027
1027
|
/* @__PURE__ */ e(
|
|
1028
1028
|
"input",
|
|
1029
1029
|
{
|
|
1030
|
-
id:
|
|
1030
|
+
id: y,
|
|
1031
1031
|
className: "select-unit__input select-unit__input--right",
|
|
1032
1032
|
type: "text",
|
|
1033
1033
|
inputMode: "numeric",
|
|
@@ -1152,7 +1152,7 @@ function Qn(t) {
|
|
|
1152
1152
|
}
|
|
1153
1153
|
}
|
|
1154
1154
|
const Va = P(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, allowMultiple: a = !0, maxFiles: r, hint: d, className: o, ...i }, u) {
|
|
1155
|
-
const h = Y(null), [f, g] = D(!1), [v,
|
|
1155
|
+
const h = Y(null), [f, g] = D(!1), [v, y] = D(0), N = s * 1024 * 1024, $ = be(() => n.map((C) => Xn(C) ? URL.createObjectURL(C) : null), [n]);
|
|
1156
1156
|
ce(
|
|
1157
1157
|
() => () => {
|
|
1158
1158
|
$.forEach((C) => {
|
|
@@ -1164,7 +1164,7 @@ const Va = P(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1164
1164
|
const _ = Pe(
|
|
1165
1165
|
(C) => {
|
|
1166
1166
|
const L = C.filter((B) => B.size <= N && zn(B, c));
|
|
1167
|
-
if (
|
|
1167
|
+
if (y(C.length - L.length), L.length) {
|
|
1168
1168
|
const B = a ? [...n, ...L] : L.slice(0, 1);
|
|
1169
1169
|
l(r != null ? B.slice(0, r) : B);
|
|
1170
1170
|
}
|
|
@@ -1181,9 +1181,9 @@ const Va = P(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1181
1181
|
}, S = () => {
|
|
1182
1182
|
var C;
|
|
1183
1183
|
return (C = h.current) == null ? void 0 : C.click();
|
|
1184
|
-
}, k = (C) => l(n.filter((L, B) => B !== C)), M = r != null && n.length >= r, w = (a || n.length === 0) && !M,
|
|
1184
|
+
}, k = (C) => l(n.filter((L, B) => B !== C)), M = r != null && n.length >= r, w = (a || n.length === 0) && !M, x = n.length > 0;
|
|
1185
1185
|
return /* @__PURE__ */ m("div", { ref: u, ...i, className: `select-dropzone-wrap${o ? " " + o : ""}`, children: [
|
|
1186
|
-
|
|
1186
|
+
x && /* @__PURE__ */ m("div", { className: "select-filetile-grid", children: [
|
|
1187
1187
|
n.map((C, L) => /* @__PURE__ */ e(
|
|
1188
1188
|
Mt,
|
|
1189
1189
|
{
|
|
@@ -1209,7 +1209,7 @@ const Va = P(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1209
1209
|
}
|
|
1210
1210
|
)
|
|
1211
1211
|
] }),
|
|
1212
|
-
!
|
|
1212
|
+
!x && w && /* @__PURE__ */ m(
|
|
1213
1213
|
"button",
|
|
1214
1214
|
{
|
|
1215
1215
|
type: "button",
|
|
@@ -1248,7 +1248,7 @@ const Va = P(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1248
1248
|
n
|
|
1249
1249
|
] });
|
|
1250
1250
|
}), Za = P(function({ label: n, urls: l, onChange: c, maxUrls: s, placeholder: a, helpText: r, className: d, ...o }, i) {
|
|
1251
|
-
const [u, h] = D(""), [f, g] = D(null), v = s != null && l.length >= s,
|
|
1251
|
+
const [u, h] = D(""), [f, g] = D(null), v = s != null && l.length >= s, y = () => {
|
|
1252
1252
|
const _ = u.trim();
|
|
1253
1253
|
if (_) {
|
|
1254
1254
|
if (!Jn.test(_)) {
|
|
@@ -1262,7 +1262,7 @@ const Va = P(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1262
1262
|
c(s != null ? [...l, _].slice(0, s) : [...l, _]), h(""), g(null);
|
|
1263
1263
|
}
|
|
1264
1264
|
}, N = (_) => {
|
|
1265
|
-
_.key === "Enter" && (_.preventDefault(),
|
|
1265
|
+
_.key === "Enter" && (_.preventDefault(), y());
|
|
1266
1266
|
}, $ = (_) => c(l.filter((p, b) => b !== _));
|
|
1267
1267
|
return /* @__PURE__ */ m("div", { ref: i, ...o, className: `select-field${d ? " " + d : ""}`, children: [
|
|
1268
1268
|
n && /* @__PURE__ */ e("span", { className: "select-field__label", children: n }),
|
|
@@ -1284,12 +1284,12 @@ const Va = P(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1284
1284
|
autoComplete: "off"
|
|
1285
1285
|
}
|
|
1286
1286
|
),
|
|
1287
|
-
/* @__PURE__ */ e(ec, { onClick:
|
|
1287
|
+
/* @__PURE__ */ e(ec, { onClick: y, children: "Adicionar URL" })
|
|
1288
1288
|
] }),
|
|
1289
1289
|
r != null && !f && /* @__PURE__ */ e("p", { className: "select-field__hint", children: r })
|
|
1290
1290
|
] });
|
|
1291
|
-
}), tc = P(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: u, uploadHint: h, urlPlaceholder: f, helpText: g, className: v, ...
|
|
1292
|
-
const $ = l === "single", _ = Y(null), [p, b] = D(!1), [S, k] = D(0), [M, w] = D(""), [
|
|
1291
|
+
}), tc = P(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: u, uploadHint: h, urlPlaceholder: f, helpText: g, className: v, ...y }, N) {
|
|
1292
|
+
const $ = l === "single", _ = Y(null), [p, b] = D(!1), [S, k] = D(0), [M, w] = D(""), [x, C] = D(null), L = $ ? 1 : Math.max(1, i), B = $ ? 1 : u ?? L, A = c.length + a.length, E = $ ? A === 0 : A < L && c.length < B, F = $ ? A === 0 : A < L, T = A > 0, R = o * 1024 * 1024, O = be(() => c.map((H) => Xn(H) ? URL.createObjectURL(H) : null), [c]);
|
|
1293
1293
|
ce(
|
|
1294
1294
|
() => () => {
|
|
1295
1295
|
O.forEach((H) => {
|
|
@@ -1334,7 +1334,7 @@ const Va = P(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1334
1334
|
H.preventDefault(), b(!1), W(Array.from(H.dataTransfer.files));
|
|
1335
1335
|
}
|
|
1336
1336
|
};
|
|
1337
|
-
return /* @__PURE__ */ m("div", { ref: N, ...
|
|
1337
|
+
return /* @__PURE__ */ m("div", { ref: N, ...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" : ""}`, ...se, children: [
|
|
1340
1340
|
T ? /* @__PURE__ */ m("div", { className: "select-filetile-grid", children: [
|
|
@@ -1366,13 +1366,13 @@ const Va = P(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1366
1366
|
size: "sm",
|
|
1367
1367
|
value: M,
|
|
1368
1368
|
onChange: (H) => {
|
|
1369
|
-
w(H),
|
|
1369
|
+
w(H), x && C(null);
|
|
1370
1370
|
},
|
|
1371
1371
|
onKeyDown: G,
|
|
1372
1372
|
type: "url",
|
|
1373
1373
|
inputMode: "url",
|
|
1374
1374
|
placeholder: f ?? "ou cole uma URL (https://…)",
|
|
1375
|
-
error:
|
|
1375
|
+
error: x ?? void 0,
|
|
1376
1376
|
autoComplete: "off"
|
|
1377
1377
|
}
|
|
1378
1378
|
) }),
|
|
@@ -1400,9 +1400,9 @@ const Va = P(function({ files: n, onChange: l, accept: c, maxSizeMB: s = 10, all
|
|
|
1400
1400
|
] }),
|
|
1401
1401
|
g != null && /* @__PURE__ */ e("p", { className: "select-field__hint", children: g })
|
|
1402
1402
|
] });
|
|
1403
|
-
}), jt = P(function({ label: n, value: l, onChange: c, options: s, labelAction: a, info: r, description: d, hint: o, error: i, placeholder: u, name: h, required: f, disabled: g, size: v = "md", className:
|
|
1403
|
+
}), jt = P(function({ label: n, value: l, onChange: c, options: s, labelAction: a, info: r, description: d, hint: o, error: i, placeholder: u, name: h, required: f, disabled: g, size: v = "md", className: y, ...N }, $) {
|
|
1404
1404
|
const _ = ee(), p = i ? `${_}-err` : o ? `${_}-hint` : void 0;
|
|
1405
|
-
return /* @__PURE__ */ m("div", { ref: $, ...N, className: `select-field${v === "sm" ? " select-field--sm" : ""}${
|
|
1405
|
+
return /* @__PURE__ */ m("div", { ref: $, ...N, className: `select-field${v === "sm" ? " select-field--sm" : ""}${y ? " " + y : ""}`, children: [
|
|
1406
1406
|
(n || r || a) && /* @__PURE__ */ m("div", { className: "select-field__labelrow", children: [
|
|
1407
1407
|
/* @__PURE__ */ m("span", { className: "select-field__labelwrap", children: [
|
|
1408
1408
|
n && /* @__PURE__ */ e("label", { className: "select-field__label", htmlFor: _, children: n }),
|
|
@@ -1558,7 +1558,7 @@ function dc(t) {
|
|
|
1558
1558
|
return ((n = Vt.find((l) => l.iso === t)) == null ? void 0 : n.dial) ?? "";
|
|
1559
1559
|
}
|
|
1560
1560
|
const za = P(function({ label: n, value: l, onChange: c, labelAction: s, hint: a, error: r, onBlur: d, placeholder: o, className: i, ...u }, h) {
|
|
1561
|
-
var
|
|
1561
|
+
var y;
|
|
1562
1562
|
const f = ee(), g = dc(l.country), v = r ? `${f}-err` : a ? `${f}-hint` : void 0;
|
|
1563
1563
|
return /* @__PURE__ */ m("div", { ref: h, ...u, className: `select-field${i ? " " + i : ""}`, children: [
|
|
1564
1564
|
/* @__PURE__ */ m("div", { className: "select-field__labelrow", children: [
|
|
@@ -1568,7 +1568,7 @@ const za = P(function({ label: n, value: l, onChange: c, labelAction: s, hint: a
|
|
|
1568
1568
|
/* @__PURE__ */ m("div", { className: `select-phone${r ? " select-phone--error" : ""}`, children: [
|
|
1569
1569
|
/* @__PURE__ */ m("div", { className: "select-phone__country", children: [
|
|
1570
1570
|
/* @__PURE__ */ m("span", { className: "select-phone__dial", children: [
|
|
1571
|
-
(
|
|
1571
|
+
(y = Vt.find((N) => N.iso === l.country)) == null ? void 0 : y.flag,
|
|
1572
1572
|
" ",
|
|
1573
1573
|
g
|
|
1574
1574
|
] }),
|
|
@@ -1651,13 +1651,13 @@ const za = P(function({ label: n, value: l, onChange: c, labelAction: s, hint: a
|
|
|
1651
1651
|
const g = h ? { left: h.left, width: h.width, opacity: 1 } : { opacity: 0 };
|
|
1652
1652
|
return /* @__PURE__ */ m("div", { ref: o, ...d, className: `select-segmented${a ? " select-segmented--full" : ""}${r ? " " + r : ""}`, role: "tablist", "aria-label": s, children: [
|
|
1653
1653
|
/* @__PURE__ */ e("span", { className: "select-segmented__pill", "aria-hidden": "true", style: g }),
|
|
1654
|
-
c.map((v,
|
|
1654
|
+
c.map((v, y) => {
|
|
1655
1655
|
const N = v.value === n;
|
|
1656
1656
|
return /* @__PURE__ */ e(
|
|
1657
1657
|
"button",
|
|
1658
1658
|
{
|
|
1659
1659
|
ref: ($) => {
|
|
1660
|
-
u.current[
|
|
1660
|
+
u.current[y] = $;
|
|
1661
1661
|
},
|
|
1662
1662
|
type: "button",
|
|
1663
1663
|
role: "tab",
|
|
@@ -1762,7 +1762,7 @@ function Te({
|
|
|
1762
1762
|
matchWidth: o = !1,
|
|
1763
1763
|
theme: i
|
|
1764
1764
|
}) {
|
|
1765
|
-
const u = Y(null), h = Y(null), f = Y(null), [g, v] = D(null), [
|
|
1765
|
+
const u = Y(null), h = Y(null), f = Y(null), [g, v] = D(null), [y, N] = D("light"), $ = Pe(() => {
|
|
1766
1766
|
var k;
|
|
1767
1767
|
const _ = ((k = u.current) == null ? void 0 : k.firstElementChild) ?? u.current, p = h.current;
|
|
1768
1768
|
if (!_ || !p) return;
|
|
@@ -1815,7 +1815,7 @@ function Te({
|
|
|
1815
1815
|
{
|
|
1816
1816
|
ref: h,
|
|
1817
1817
|
className: "select select-pop__panel",
|
|
1818
|
-
"data-theme": i ??
|
|
1818
|
+
"data-theme": i ?? y,
|
|
1819
1819
|
role: r,
|
|
1820
1820
|
tabIndex: -1,
|
|
1821
1821
|
style: g ? { position: "fixed", top: g.top, left: g.left, minWidth: g.minWidth } : { position: "fixed", top: 0, left: 0, visibility: "hidden" },
|
|
@@ -1970,7 +1970,7 @@ const mc = {
|
|
|
1970
1970
|
full: "999px"
|
|
1971
1971
|
};
|
|
1972
1972
|
function _c({ children: t, padding: n, paddingInline: l, paddingBlock: c, background: s, borderRadius: a, border: r = !1, shadow: d = !1, width: o, minHeight: i, as: u = "div", className: h, style: f, ...g }) {
|
|
1973
|
-
const v = u,
|
|
1973
|
+
const v = u, y = {
|
|
1974
1974
|
padding: n ? Ue[n] : void 0,
|
|
1975
1975
|
paddingInline: l ? Ue[l] : void 0,
|
|
1976
1976
|
paddingBlock: c ? Ue[c] : void 0,
|
|
@@ -1982,7 +1982,7 @@ function _c({ children: t, padding: n, paddingInline: l, paddingBlock: c, backgr
|
|
|
1982
1982
|
minHeight: i,
|
|
1983
1983
|
...f
|
|
1984
1984
|
};
|
|
1985
|
-
return /* @__PURE__ */ e(v, { ...g, className: Lt("select-box", h), style:
|
|
1985
|
+
return /* @__PURE__ */ e(v, { ...g, className: Lt("select-box", h), style: y, children: t });
|
|
1986
1986
|
}
|
|
1987
1987
|
function Ye({ children: t, as: n = "p", variant: l = "bodyMd", tone: c, fontWeight: s, alignment: a, truncate: r = !1, numeric: d = !1, className: o, ...i }) {
|
|
1988
1988
|
const u = n, h = [
|
|
@@ -2147,7 +2147,7 @@ function un(t) {
|
|
|
2147
2147
|
for (let c = 1; c < n.length; c++) l.push(n.slice(0, c).join(Gt));
|
|
2148
2148
|
return l;
|
|
2149
2149
|
}
|
|
2150
|
-
const
|
|
2150
|
+
const yc = (t) => t instanceof Date || t instanceof RegExp || t instanceof Map || t instanceof Set;
|
|
2151
2151
|
function sl(t) {
|
|
2152
2152
|
if (t == null) return "null";
|
|
2153
2153
|
if (Array.isArray(t)) return "array";
|
|
@@ -2160,7 +2160,7 @@ function sl(t) {
|
|
|
2160
2160
|
case "boolean":
|
|
2161
2161
|
return "boolean";
|
|
2162
2162
|
case "object":
|
|
2163
|
-
return
|
|
2163
|
+
return yc(t) ? "other" : "object";
|
|
2164
2164
|
default:
|
|
2165
2165
|
return "other";
|
|
2166
2166
|
}
|
|
@@ -2182,7 +2182,7 @@ function pn(t) {
|
|
|
2182
2182
|
const n = dt(t), l = Array.isArray(t);
|
|
2183
2183
|
return n === 0 ? l ? "[]" : "{}" : l ? `[${n} ${n === 1 ? "item" : "itens"}]` : `{${n} ${n === 1 ? "chave" : "chaves"}}`;
|
|
2184
2184
|
}
|
|
2185
|
-
function
|
|
2185
|
+
function xc(t) {
|
|
2186
2186
|
if (typeof t != "string") return t;
|
|
2187
2187
|
const n = t.trim();
|
|
2188
2188
|
if (!n.startsWith("{") && !n.startsWith("[")) return t;
|
|
@@ -2334,7 +2334,7 @@ function il({
|
|
|
2334
2334
|
return /* @__PURE__ */ e(me, { children: al(t).map(([d, o]) => {
|
|
2335
2335
|
const i = cl(n, d);
|
|
2336
2336
|
if (a && !s.result.visible.has(i)) return null;
|
|
2337
|
-
const u = Mc(o, c), h = We(o) && !u, f = h && dt(o) > 0, g = a ? !0 : s.expanded.has(i), v = s.result.matched.has(i),
|
|
2337
|
+
const u = Mc(o, c), h = We(o) && !u, f = h && dt(o) > 0, g = a ? !0 : s.expanded.has(i), v = s.result.matched.has(i), y = `row:${i}`;
|
|
2338
2338
|
return /* @__PURE__ */ m(Yt, { children: [
|
|
2339
2339
|
/* @__PURE__ */ m(
|
|
2340
2340
|
"div",
|
|
@@ -2368,9 +2368,9 @@ function il({
|
|
|
2368
2368
|
type: "button",
|
|
2369
2369
|
className: "select-json__copy",
|
|
2370
2370
|
"aria-label": `Copiar ${d}`,
|
|
2371
|
-
title: s.copied ===
|
|
2372
|
-
onClick: () => s.copy(
|
|
2373
|
-
children: s.copied ===
|
|
2371
|
+
title: s.copied === y ? "Copiado!" : "Copiar valor",
|
|
2372
|
+
onClick: () => s.copy(y, h ? ol(o) : ln(o)),
|
|
2373
|
+
children: s.copied === y ? /* @__PURE__ */ e(Le, {}) : /* @__PURE__ */ e(Jt, {})
|
|
2374
2374
|
}
|
|
2375
2375
|
)
|
|
2376
2376
|
]
|
|
@@ -2385,25 +2385,25 @@ 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($t, { text: c.text, term: n }) }, s)) }) : /* @__PURE__ */ e("pre", { className: "select-json__pre", children: /* @__PURE__ */ e($t, { text: t, term: n }) });
|
|
2386
2386
|
}
|
|
2387
2387
|
const n1 = P(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 }, u) {
|
|
2388
|
-
const [h, f] = D(s), [g, v] = D("tree"), [
|
|
2388
|
+
const [h, f] = D(s), [g, v] = D("tree"), [y, N] = D(""), [$, _] = D(/* @__PURE__ */ new Set()), [p, b] = Fc(), S = Y(null), k = be(() => xc(n), [n]), M = Nc(k), w = be(
|
|
2389
2389
|
() => typeof n == "string" && k === n ? n : ol(k),
|
|
2390
2390
|
[n, k]
|
|
2391
|
-
),
|
|
2392
|
-
}).truncated, [k]), C = g === "tree" && !
|
|
2391
|
+
), x = be(() => st(k, () => {
|
|
2392
|
+
}).truncated, [k]), C = g === "tree" && !x, L = be(() => x ? [] : kc(k), [k, x]);
|
|
2393
2393
|
ce(() => {
|
|
2394
|
-
_(
|
|
2395
|
-
}, [k, a,
|
|
2396
|
-
const B = be(() => Sc(k, C ?
|
|
2394
|
+
_(x ? /* @__PURE__ */ new Set() : $c(k, a)), N("");
|
|
2395
|
+
}, [k, a, x]);
|
|
2396
|
+
const B = be(() => Sc(k, C ? y : ""), [k, y, C]), A = y.trim().length > 0, E = C ? B.count : Ac(w, y);
|
|
2397
2397
|
ce(() => {
|
|
2398
2398
|
var Z, G;
|
|
2399
2399
|
!h || !A || (G = (Z = S.current) == null ? void 0 : Z.querySelector(".select-json__hit")) == null || G.scrollIntoView({ block: "nearest" });
|
|
2400
|
-
}, [h, A,
|
|
2400
|
+
}, [h, A, y, g]);
|
|
2401
2401
|
const F = Pe((Z) => {
|
|
2402
2402
|
_((G) => {
|
|
2403
2403
|
const J = new Set(G);
|
|
2404
2404
|
return J.delete(Z) || J.add(Z), J;
|
|
2405
2405
|
});
|
|
2406
|
-
}, []), T = L.length > 0 && L.every((Z) => $.has(Z)), R = () => _(T ? /* @__PURE__ */ new Set() : new Set(L)), O = { expanded: $, toggle: F, search:
|
|
2406
|
+
}, []), T = L.length > 0 && L.every((Z) => $.has(Z)), R = () => _(T ? /* @__PURE__ */ new Set() : new Set(L)), O = { expanded: $, toggle: F, search: y, result: B, copied: p, copy: b }, W = h && !M;
|
|
2407
2407
|
return /* @__PURE__ */ m("div", { ref: u, ...i, className: `select-json${o ? " " + o : ""}`, children: [
|
|
2408
2408
|
/* @__PURE__ */ m("div", { className: "select-json__head", children: [
|
|
2409
2409
|
/* @__PURE__ */ e(Ye, { as: "h2", variant: "headingSm", children: l }),
|
|
@@ -2418,7 +2418,7 @@ const n1 = P(function({ value: n, title: l = "Metadados", maxHeight: c = 360, de
|
|
|
2418
2418
|
{
|
|
2419
2419
|
className: "select-json__searchinput",
|
|
2420
2420
|
type: "search",
|
|
2421
|
-
value:
|
|
2421
|
+
value: y,
|
|
2422
2422
|
onChange: (Z) => N(Z.target.value),
|
|
2423
2423
|
placeholder: "Buscar chave ou valor…",
|
|
2424
2424
|
"aria-label": "Buscar no JSON"
|
|
@@ -2440,10 +2440,10 @@ const n1 = P(function({ value: n, title: l = "Metadados", maxHeight: c = 360, de
|
|
|
2440
2440
|
_e,
|
|
2441
2441
|
{
|
|
2442
2442
|
icon: /* @__PURE__ */ e(Hl, {}),
|
|
2443
|
-
label:
|
|
2443
|
+
label: x ? "Árvore indisponível: JSON muito grande" : g === "raw" ? "Ver árvore" : "Ver JSON bruto",
|
|
2444
2444
|
size: "sm",
|
|
2445
|
-
active: g === "raw" ||
|
|
2446
|
-
disabled:
|
|
2445
|
+
active: g === "raw" || x,
|
|
2446
|
+
disabled: x,
|
|
2447
2447
|
onClick: () => v((Z) => Z === "raw" ? "tree" : "raw")
|
|
2448
2448
|
}
|
|
2449
2449
|
),
|
|
@@ -2460,12 +2460,12 @@ const n1 = P(function({ value: n, title: l = "Metadados", maxHeight: c = 360, de
|
|
|
2460
2460
|
] }),
|
|
2461
2461
|
/* @__PURE__ */ e("div", { ref: S, className: "select-json__scroll", style: { maxHeight: c }, children: C ? A && B.count === 0 ? /* @__PURE__ */ e("div", { className: "select-json__empty", children: /* @__PURE__ */ m(Ye, { 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: We(k) ? /* @__PURE__ */ e(il, { 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
|
-
/* @__PURE__ */ e("span", { className: "select-json__label", children: /* @__PURE__ */ e(rl, { value: k, term:
|
|
2468
|
-
] }) }) : /* @__PURE__ */ e(Ic, { text: w, term:
|
|
2467
|
+
/* @__PURE__ */ e("span", { className: "select-json__label", children: /* @__PURE__ */ e(rl, { value: k, term: y, forceFull: !0 }) })
|
|
2468
|
+
] }) }) : /* @__PURE__ */ e(Ic, { text: w, term: y }) })
|
|
2469
2469
|
] })
|
|
2470
2470
|
] });
|
|
2471
2471
|
}), Rc = {
|
|
@@ -2520,10 +2520,10 @@ function At(t = {}) {
|
|
|
2520
2520
|
enabled: g = !0
|
|
2521
2521
|
} = l.current;
|
|
2522
2522
|
if (!g || dl()) return;
|
|
2523
|
-
const v = s ? Array.from(c.querySelectorAll(s)) : [],
|
|
2523
|
+
const v = s ? Array.from(c.querySelectorAll(s)) : [], y = v.length ? v : [c], N = { opacity: 0, y: a, ...r !== 1 ? { scale: r } : {} };
|
|
2524
2524
|
let $;
|
|
2525
2525
|
const _ = () => {
|
|
2526
|
-
$ = Ne.fromTo(
|
|
2526
|
+
$ = Ne.fromTo(y, N, {
|
|
2527
2527
|
opacity: 1,
|
|
2528
2528
|
y: 0,
|
|
2529
2529
|
scale: 1,
|
|
@@ -2536,7 +2536,7 @@ function At(t = {}) {
|
|
|
2536
2536
|
};
|
|
2537
2537
|
if (!h || !hl())
|
|
2538
2538
|
return _(), () => $ == null ? void 0 : $.kill();
|
|
2539
|
-
Ne.set(
|
|
2539
|
+
Ne.set(y, N);
|
|
2540
2540
|
const p = new IntersectionObserver(
|
|
2541
2541
|
(b) => {
|
|
2542
2542
|
for (const S of b)
|
|
@@ -2584,15 +2584,15 @@ function Tc(t) {
|
|
|
2584
2584
|
if (!i || !hl())
|
|
2585
2585
|
return v(), () => g == null ? void 0 : g.kill();
|
|
2586
2586
|
c.textContent = o(a);
|
|
2587
|
-
const
|
|
2587
|
+
const y = new IntersectionObserver(
|
|
2588
2588
|
(N) => {
|
|
2589
2589
|
for (const $ of N)
|
|
2590
|
-
$.isIntersecting && (v(), u &&
|
|
2590
|
+
$.isIntersecting && (v(), u && y.unobserve($.target));
|
|
2591
2591
|
},
|
|
2592
2592
|
{ threshold: 0 }
|
|
2593
2593
|
);
|
|
2594
|
-
return
|
|
2595
|
-
|
|
2594
|
+
return y.observe(c), () => {
|
|
2595
|
+
y.disconnect(), g == null || g.kill();
|
|
2596
2596
|
};
|
|
2597
2597
|
}, [t.value]), n;
|
|
2598
2598
|
}
|
|
@@ -2646,8 +2646,8 @@ const o1 = P(function({ email: n, onSignOut: l, signOutLabel: c = "Sair", prefix
|
|
|
2646
2646
|
const S = g(_, b);
|
|
2647
2647
|
_ < c - 1 && f(_ + 1), S.length === c && (s == null || s(S));
|
|
2648
2648
|
} else
|
|
2649
|
-
|
|
2650
|
-
},
|
|
2649
|
+
y(b, _);
|
|
2650
|
+
}, y = (_, p) => {
|
|
2651
2651
|
const b = h.slice();
|
|
2652
2652
|
for (let M = 0; M < _.length && p + M < c; M++)
|
|
2653
2653
|
b[p + M] = _[M] ?? "";
|
|
@@ -2660,7 +2660,7 @@ const o1 = P(function({ email: n, onSignOut: l, signOutLabel: c = "Sair", prefix
|
|
|
2660
2660
|
}, $ = (_, p) => {
|
|
2661
2661
|
p.preventDefault();
|
|
2662
2662
|
const b = p.clipboardData.getData("text").replace(/\D/g, "");
|
|
2663
|
-
b &&
|
|
2663
|
+
b && y(b, _);
|
|
2664
2664
|
};
|
|
2665
2665
|
return /* @__PURE__ */ e("div", { ref: i, ...o, className: `select-otp${d ? " " + d : ""}`, children: h.map((_, p) => /* @__PURE__ */ e(
|
|
2666
2666
|
"input",
|
|
@@ -2870,7 +2870,7 @@ const f1 = P(function({ children: n, tone: l = "neutral", hideIcon: c = !1, clas
|
|
|
2870
2870
|
/* @__PURE__ */ e("div", { className: "select-section__body", children: r })
|
|
2871
2871
|
] });
|
|
2872
2872
|
});
|
|
2873
|
-
function
|
|
2873
|
+
function y1({ tabs: t, value: n, onChange: l, end: c, className: s, ...a }) {
|
|
2874
2874
|
const r = Y(null), [d, o] = D({ left: 0, width: 0 });
|
|
2875
2875
|
Ee(() => {
|
|
2876
2876
|
const u = r.current;
|
|
@@ -2881,8 +2881,8 @@ function x1({ tabs: t, value: n, onChange: l, end: c, className: s, ...a }) {
|
|
|
2881
2881
|
o((N) => N.width === 0 ? N : { left: N.left, width: 0 });
|
|
2882
2882
|
return;
|
|
2883
2883
|
}
|
|
2884
|
-
const v = g.offsetLeft,
|
|
2885
|
-
o((N) => N.left === v && N.width ===
|
|
2884
|
+
const v = g.offsetLeft, y = g.offsetWidth;
|
|
2885
|
+
o((N) => N.left === v && N.width === y ? N : { left: v, width: y });
|
|
2886
2886
|
};
|
|
2887
2887
|
h();
|
|
2888
2888
|
const f = typeof ResizeObserver < "u" ? new ResizeObserver(h) : null;
|
|
@@ -2970,7 +2970,7 @@ function Yc({
|
|
|
2970
2970
|
] }) })
|
|
2971
2971
|
] });
|
|
2972
2972
|
}
|
|
2973
|
-
const
|
|
2973
|
+
const x1 = P(function({ sections: n, active: l, onSelect: c, header: s, className: a, ...r }, d) {
|
|
2974
2974
|
return /* @__PURE__ */ m("nav", { ref: d, ...r, className: `select-sidenav${a ? " " + a : ""}`, children: [
|
|
2975
2975
|
s && /* @__PURE__ */ e("div", { className: "select-sidenav__header", children: s }),
|
|
2976
2976
|
n.map((o, i) => /* @__PURE__ */ m("div", { className: "select-sidenav__section", children: [
|
|
@@ -3008,7 +3008,7 @@ const y1 = P(function({ sections: n, active: l, onSelect: c, header: s, classNam
|
|
|
3008
3008
|
s && /* @__PURE__ */ e("kbd", { className: "select-search__kbd", children: s })
|
|
3009
3009
|
] });
|
|
3010
3010
|
}), qc = P(function({ columns: n, children: l, empty: c, footer: s, title: a, action: r, filters: d, className: o, ...i }, u) {
|
|
3011
|
-
const h = kl.count(l) === 0, f = h && !!c, g = a != null || r != null || d != null, v = f && !g,
|
|
3011
|
+
const h = kl.count(l) === 0, f = h && !!c, g = a != null || r != null || d != null, v = f && !g, y = At({ selector: ".select-table__row", y: 8, duration: 0.45, stagger: 0.05, scroll: !0 }), N = n.length ? n.map(($) => $.width ?? "minmax(var(--select-table-col-min, 6.5rem), 1fr)").join(" ") : "1fr";
|
|
3012
3012
|
return /* @__PURE__ */ m("div", { ref: u, ...i, className: `select-table${v ? " select-table--empty" : ""}${o ? " " + o : ""}`, style: { "--select-table-cols": N }, children: [
|
|
3013
3013
|
g && /* @__PURE__ */ m("div", { className: "select-table__title", children: [
|
|
3014
3014
|
a != null && /* @__PURE__ */ e("h3", { className: "select-table__titletext", children: a }),
|
|
@@ -3037,7 +3037,7 @@ const y1 = P(function({ sections: n, active: l, onSelect: c, header: s, classNam
|
|
|
3037
3037
|
},
|
|
3038
3038
|
_
|
|
3039
3039
|
)) }),
|
|
3040
|
-
/* @__PURE__ */ e("div", { className: "select-table__body", children: /* @__PURE__ */ e("div", { className: "select-table__rows", ref:
|
|
3040
|
+
/* @__PURE__ */ e("div", { className: "select-table__body", children: /* @__PURE__ */ e("div", { className: "select-table__rows", ref: y, children: h && c ? /* @__PURE__ */ e("div", { className: "select-table__empty", children: c }) : l }) })
|
|
3041
3041
|
] }) }),
|
|
3042
3042
|
s && /* @__PURE__ */ e("div", { className: "select-table__footer", children: s })
|
|
3043
3043
|
] });
|
|
@@ -3190,14 +3190,14 @@ function Et({
|
|
|
3190
3190
|
dividedHeader: u = !1,
|
|
3191
3191
|
theme: h = "light"
|
|
3192
3192
|
}) {
|
|
3193
|
-
const [f, g] = D(t), [v,
|
|
3193
|
+
const [f, g] = D(t), [v, y] = D(!1);
|
|
3194
3194
|
if (ce(() => {
|
|
3195
3195
|
if (t)
|
|
3196
|
-
g(!0),
|
|
3196
|
+
g(!0), y(!1);
|
|
3197
3197
|
else if (f) {
|
|
3198
|
-
|
|
3198
|
+
y(!0);
|
|
3199
3199
|
const _ = setTimeout(() => {
|
|
3200
|
-
g(!1),
|
|
3200
|
+
g(!1), y(!1);
|
|
3201
3201
|
}, Qc);
|
|
3202
3202
|
return () => clearTimeout(_);
|
|
3203
3203
|
}
|
|
@@ -3275,19 +3275,19 @@ function B1({
|
|
|
3275
3275
|
u(null);
|
|
3276
3276
|
return;
|
|
3277
3277
|
}
|
|
3278
|
-
const v = (($ = r.current) == null ? void 0 : $.firstElementChild) ?? r.current,
|
|
3279
|
-
if (!v || !
|
|
3278
|
+
const v = (($ = r.current) == null ? void 0 : $.firstElementChild) ?? r.current, y = d.current;
|
|
3279
|
+
if (!v || !y) return;
|
|
3280
3280
|
const N = nl(
|
|
3281
3281
|
v.getBoundingClientRect(),
|
|
3282
|
-
{ width:
|
|
3282
|
+
{ width: y.offsetWidth, height: y.offsetHeight },
|
|
3283
3283
|
l,
|
|
3284
3284
|
6
|
|
3285
3285
|
);
|
|
3286
3286
|
u({ top: N.top, left: N.left });
|
|
3287
3287
|
}, [s, l]), ce(() => {
|
|
3288
3288
|
if (!s) return;
|
|
3289
|
-
const v = (
|
|
3290
|
-
|
|
3289
|
+
const v = (y) => {
|
|
3290
|
+
y.key === "Escape" && a(!1);
|
|
3291
3291
|
};
|
|
3292
3292
|
return document.addEventListener("keydown", v), () => document.removeEventListener("keydown", v);
|
|
3293
3293
|
}, [s]), /* @__PURE__ */ m(me, { children: [
|
|
@@ -3456,7 +3456,7 @@ function ts(t, n, l, c, s, a) {
|
|
|
3456
3456
|
return a && c != null && c > 0 && r.push(`Página ${l} de ${c}`), r.length > 0 ? r.join(" · ") : null;
|
|
3457
3457
|
}
|
|
3458
3458
|
const ns = P(function({ page: n, pageCount: l, total: c, pageSize: s, hasPrevious: a, hasNext: r, onPrevious: d, onNext: o, onPage: i, noun: u = "resultados", className: h, ...f }, g) {
|
|
3459
|
-
const v = a ?? n > 1,
|
|
3459
|
+
const v = a ?? n > 1, y = r ?? (l != null ? n < l : !0), N = d ?? (i ? () => i(n - 1) : void 0), $ = o ?? (i ? () => i(n + 1) : void 0), _ = l != null && l > 1 && i != null, p = _ ? es(n, l) : [], b = ts(c, s, n, l, u, _);
|
|
3460
3460
|
return /* @__PURE__ */ m("nav", { ref: g, ...f, className: `select-pagination${h ? " " + h : ""}`, "aria-label": "Paginação", children: [
|
|
3461
3461
|
/* @__PURE__ */ m("div", { className: "select-pagination__controls", children: [
|
|
3462
3462
|
/* @__PURE__ */ e(
|
|
@@ -3489,7 +3489,7 @@ const ns = P(function({ page: n, pageCount: l, total: c, pageSize: s, hasPreviou
|
|
|
3489
3489
|
type: "button",
|
|
3490
3490
|
className: "select-pagination__nav",
|
|
3491
3491
|
onClick: $,
|
|
3492
|
-
disabled: !
|
|
3492
|
+
disabled: !y || !$,
|
|
3493
3493
|
"aria-label": "Próxima página",
|
|
3494
3494
|
children: /* @__PURE__ */ e(ot, {})
|
|
3495
3495
|
}
|
|
@@ -3512,14 +3512,14 @@ function cs(t, n) {
|
|
|
3512
3512
|
} catch {
|
|
3513
3513
|
}
|
|
3514
3514
|
}
|
|
3515
|
-
function
|
|
3515
|
+
function yn(t) {
|
|
3516
3516
|
return t.hideable ?? !!t.title;
|
|
3517
3517
|
}
|
|
3518
|
-
const
|
|
3518
|
+
const xn = "select-datatable:page-size:";
|
|
3519
3519
|
function D1(t, n, l) {
|
|
3520
3520
|
const [c, s] = D(() => {
|
|
3521
3521
|
try {
|
|
3522
|
-
const r = Number(localStorage.getItem(
|
|
3522
|
+
const r = Number(localStorage.getItem(xn + t));
|
|
3523
3523
|
return Number.isInteger(r) && r > 0 && (!l || l.includes(r)) ? r : n;
|
|
3524
3524
|
} catch {
|
|
3525
3525
|
return n;
|
|
@@ -3528,7 +3528,7 @@ function D1(t, n, l) {
|
|
|
3528
3528
|
return [c, (r) => {
|
|
3529
3529
|
s(r);
|
|
3530
3530
|
try {
|
|
3531
|
-
localStorage.setItem(
|
|
3531
|
+
localStorage.setItem(xn + t, String(r));
|
|
3532
3532
|
} catch {
|
|
3533
3533
|
}
|
|
3534
3534
|
}];
|
|
@@ -3550,7 +3550,7 @@ function T1({
|
|
|
3550
3550
|
filters: i,
|
|
3551
3551
|
columnsKey: u
|
|
3552
3552
|
}) {
|
|
3553
|
-
const [h, f] = D(() => u ? ls(u) : []), [g, v] = D(!1), [
|
|
3553
|
+
const [h, f] = D(() => u ? ls(u) : []), [g, v] = D(!1), [y, N] = D(!1), $ = be(() => new Set(h), [h]), _ = t.filter(yn), p = _.length > 0 && _.every((R) => $.has(R.key)), b = (R) => !p && $.has(R.key) && yn(R), S = t.filter((R) => !b(R)), k = _.filter((R) => !b(R)), [M, w] = D(null), x = (R) => {
|
|
3554
3554
|
f((O) => {
|
|
3555
3555
|
const W = !O.includes(R.key), Z = W ? [...O, R.key] : O.filter((G) => G !== R.key);
|
|
3556
3556
|
return u && cs(u, Z), W && w((G) => G && G.key === R.key ? null : G), Z;
|
|
@@ -3600,7 +3600,7 @@ function T1({
|
|
|
3600
3600
|
"aria-checked": O,
|
|
3601
3601
|
disabled: W,
|
|
3602
3602
|
className: `select-facet__opt${O ? " is-selected" : ""}`,
|
|
3603
|
-
onClick: () =>
|
|
3603
|
+
onClick: () => x(R),
|
|
3604
3604
|
children: [
|
|
3605
3605
|
/* @__PURE__ */ e("span", { children: R.title }),
|
|
3606
3606
|
O && /* @__PURE__ */ e("span", { className: "select-facet__check", "aria-hidden": "true", children: /* @__PURE__ */ e(Le, {}) })
|
|
@@ -3620,7 +3620,7 @@ function T1({
|
|
|
3620
3620
|
a.pageSizeOptions && a.pageSizeOptions.length > 1 && a.onPageSizeChange && /* @__PURE__ */ e("div", { className: "select-datatable__pagesize", children: /* @__PURE__ */ e(
|
|
3621
3621
|
Te,
|
|
3622
3622
|
{
|
|
3623
|
-
active:
|
|
3623
|
+
active: y,
|
|
3624
3624
|
onClose: () => N(!1),
|
|
3625
3625
|
placement: "top-start",
|
|
3626
3626
|
role: "listbox",
|
|
@@ -3628,16 +3628,16 @@ function T1({
|
|
|
3628
3628
|
"button",
|
|
3629
3629
|
{
|
|
3630
3630
|
type: "button",
|
|
3631
|
-
className: `select-facet${
|
|
3631
|
+
className: `select-facet${y ? " is-active" : ""}`,
|
|
3632
3632
|
onClick: () => N((R) => !R),
|
|
3633
|
-
"aria-expanded":
|
|
3633
|
+
"aria-expanded": y,
|
|
3634
3634
|
"aria-haspopup": "listbox",
|
|
3635
3635
|
children: [
|
|
3636
3636
|
/* @__PURE__ */ m("span", { className: "select-facet__label", children: [
|
|
3637
3637
|
a.pageSize ?? "—",
|
|
3638
3638
|
" por página"
|
|
3639
3639
|
] }),
|
|
3640
|
-
/* @__PURE__ */ e("span", { className: `select-facet__caret${
|
|
3640
|
+
/* @__PURE__ */ e("span", { className: `select-facet__caret${y ? " is-open" : ""}`, "aria-hidden": "true", children: /* @__PURE__ */ e(ve, {}) })
|
|
3641
3641
|
]
|
|
3642
3642
|
}
|
|
3643
3643
|
),
|
|
@@ -3711,8 +3711,8 @@ function is(t, n) {
|
|
|
3711
3711
|
const l = `${Re(t.getDate())}/${Re(t.getMonth() + 1)}/${t.getFullYear()}`;
|
|
3712
3712
|
return n ? `${l} ${Re(t.getHours())}:${Re(t.getMinutes())}` : l;
|
|
3713
3713
|
}
|
|
3714
|
-
const ds = P(function({ label: n, value: l, onChange: c, showTime: s = !1, placeholder: a, required: r, disabled: d, error: o, hint: i, minDate: u, maxDate: h, clearable: f = !0, id: g, className: v, ...
|
|
3715
|
-
const $ = ee(), _ = g ?? $, [p, b] = D(!1), S = rs(l), [k, M] = D(() => mt(S ?? /* @__PURE__ */ new Date())), w = u ? tt(u) : null,
|
|
3714
|
+
const ds = P(function({ label: n, value: l, onChange: c, showTime: s = !1, placeholder: a, required: r, disabled: d, error: o, hint: i, minDate: u, maxDate: h, clearable: f = !0, id: g, className: v, ...y }, N) {
|
|
3715
|
+
const $ = ee(), _ = g ?? $, [p, b] = D(!1), S = rs(l), [k, M] = D(() => mt(S ?? /* @__PURE__ */ new Date())), w = u ? tt(u) : null, x = h ? tt(h) : null, C = (W) => !!w && tt(W) < w || !!x && tt(W) > x, L = Nn(mt(k), -mt(k).getDay()), B = Array.from({ length: 42 }, (W, Z) => Nn(L, Z)), A = tt(/* @__PURE__ */ new Date()), E = () => {
|
|
3716
3716
|
d || (M(mt(S ?? /* @__PURE__ */ new Date())), b((W) => !W));
|
|
3717
3717
|
}, F = (W) => {
|
|
3718
3718
|
if (C(W)) return;
|
|
@@ -3740,7 +3740,7 @@ const ds = P(function({ label: n, value: l, onChange: c, showTime: s = !1, place
|
|
|
3740
3740
|
),
|
|
3741
3741
|
/* @__PURE__ */ e("span", { className: "select-datefield__icon", "aria-hidden": "true", children: /* @__PURE__ */ e(Un, {}) })
|
|
3742
3742
|
] });
|
|
3743
|
-
return /* @__PURE__ */ m("div", { ref: N, ...
|
|
3743
|
+
return /* @__PURE__ */ m("div", { ref: N, ...y, className: `select-field${v ? " " + v : ""}`, children: [
|
|
3744
3744
|
n && /* @__PURE__ */ e(et, { htmlFor: _, label: r ? `${n} *` : n }),
|
|
3745
3745
|
/* @__PURE__ */ e("div", { className: "select-datefield", children: /* @__PURE__ */ e(Te, { 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: [
|
|
@@ -3825,20 +3825,20 @@ function hs({
|
|
|
3825
3825
|
t.type === "select" ? /* @__PURE__ */ m("div", { className: "select-facet__panel", children: [
|
|
3826
3826
|
f && /* @__PURE__ */ e("div", { className: "select-facet__search", children: /* @__PURE__ */ e(pl, { value: d, onChange: o, placeholder: "Buscar opção…" }) }),
|
|
3827
3827
|
/* @__PURE__ */ e("div", { className: "select-facet__options", role: "listbox", children: g.length === 0 ? /* @__PURE__ */ e("div", { className: "select-facet__empty", children: "Nada encontrado" }) : g.map((v) => {
|
|
3828
|
-
const
|
|
3828
|
+
const y = n === v.value;
|
|
3829
3829
|
return /* @__PURE__ */ m(
|
|
3830
3830
|
"button",
|
|
3831
3831
|
{
|
|
3832
3832
|
type: "button",
|
|
3833
3833
|
role: "option",
|
|
3834
|
-
"aria-selected":
|
|
3835
|
-
className: `select-facet__opt${
|
|
3834
|
+
"aria-selected": y,
|
|
3835
|
+
className: `select-facet__opt${y ? " is-selected" : ""}`,
|
|
3836
3836
|
onClick: () => {
|
|
3837
|
-
l(
|
|
3837
|
+
l(y ? "" : v.value), a();
|
|
3838
3838
|
},
|
|
3839
3839
|
children: [
|
|
3840
3840
|
/* @__PURE__ */ e("span", { children: v.label }),
|
|
3841
|
-
|
|
3841
|
+
y && /* @__PURE__ */ e("span", { className: "select-facet__check", "aria-hidden": "true", children: /* @__PURE__ */ e(Le, {}) })
|
|
3842
3842
|
]
|
|
3843
3843
|
},
|
|
3844
3844
|
v.value
|
|
@@ -3870,10 +3870,10 @@ function hs({
|
|
|
3870
3870
|
);
|
|
3871
3871
|
}
|
|
3872
3872
|
const W1 = P(function({ filters: n, values: l, onChange: c, onClearAll: s, search: a, disabled: r, className: d, ...o }, i) {
|
|
3873
|
-
const [u, h] = D([]), [f, g] = D(null), [v,
|
|
3873
|
+
const [u, h] = D([]), [f, g] = D(null), [v, y] = D(!1), N = (M) => (l[M.key] ?? "").trim() !== "", $ = (M) => !!M.pinned || N(M) || u.includes(M.key), _ = n.filter($), p = n.filter((M) => !$(M)), b = n.filter(N), S = () => {
|
|
3874
3874
|
h([]), g(null), s();
|
|
3875
3875
|
}, k = (M) => {
|
|
3876
|
-
h((w) => w.includes(M) ? w : [...w, M]),
|
|
3876
|
+
h((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: [
|
|
@@ -3918,14 +3918,14 @@ const W1 = P(function({ filters: n, values: l, onChange: c, onClearAll: s, searc
|
|
|
3918
3918
|
Te,
|
|
3919
3919
|
{
|
|
3920
3920
|
active: v,
|
|
3921
|
-
onClose: () =>
|
|
3921
|
+
onClose: () => y(!1),
|
|
3922
3922
|
placement: "bottom-start",
|
|
3923
3923
|
activator: /* @__PURE__ */ m(
|
|
3924
3924
|
"button",
|
|
3925
3925
|
{
|
|
3926
3926
|
type: "button",
|
|
3927
3927
|
className: "select-facet select-facet--more",
|
|
3928
|
-
onClick: () =>
|
|
3928
|
+
onClick: () => y((M) => !M),
|
|
3929
3929
|
disabled: r,
|
|
3930
3930
|
"aria-expanded": v,
|
|
3931
3931
|
children: [
|
|
@@ -3968,7 +3968,7 @@ const W1 = P(function({ filters: n, values: l, onChange: c, onClearAll: s, searc
|
|
|
3968
3968
|
] })
|
|
3969
3969
|
] });
|
|
3970
3970
|
}), O1 = P(function({ label: n, options: l, selected: c, onChange: s, placeholder: a = "Selecionar…", hint: r, error: d, onBlur: o, size: i = "md", className: u, ...h }, f) {
|
|
3971
|
-
const [g, v] = D(!1), [
|
|
3971
|
+
const [g, v] = D(!1), [y, N] = 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, ...h, className: `select-field${i === "sm" ? " select-field--sm" : ""}${u ? " " + u : ""}`, 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(
|
|
@@ -4015,7 +4015,7 @@ const W1 = P(function({ filters: n, values: l, onChange: c, onClearAll: s, searc
|
|
|
4015
4015
|
}
|
|
4016
4016
|
),
|
|
4017
4017
|
children: /* @__PURE__ */ m("div", { className: "select-tagselect__menu", children: [
|
|
4018
|
-
/* @__PURE__ */ e("div", { className: "select-tagselect__search", children: /* @__PURE__ */ e(pl, { value:
|
|
4018
|
+
/* @__PURE__ */ e("div", { className: "select-tagselect__search", children: /* @__PURE__ */ e(pl, { value: y, onChange: N, 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
4020
|
const S = c.includes(b.value);
|
|
4021
4021
|
return /* @__PURE__ */ m(
|
|
@@ -4111,8 +4111,8 @@ function V1() {
|
|
|
4111
4111
|
return t;
|
|
4112
4112
|
}
|
|
4113
4113
|
const vs = { desktop: "100%", mobile: 390 }, Z1 = P(function({ src: n, title: l = "Pré-visualização", height: c = 560, initialDevice: s = "desktop", showDeviceToggle: a = !0, emptyLabel: r = "Salve para gerar a pré-visualização.", className: d, ...o }, i) {
|
|
4114
|
-
const [u, h] = D(s), [f, g] = D(0), [v,
|
|
4115
|
-
|
|
4114
|
+
const [u, h] = D(s), [f, g] = D(0), [v, y] = D(!0), N = n ? `${n}${n.includes("?") ? "&" : "?"}_pv=${f}` : "", $ = () => {
|
|
4115
|
+
y(!0), g((_) => _ + 1);
|
|
4116
4116
|
};
|
|
4117
4117
|
return /* @__PURE__ */ m("div", { ref: i, ...o, className: `select-preview${d ? " " + d : ""}`, children: [
|
|
4118
4118
|
/* @__PURE__ */ m("div", { className: "select-preview__bar", children: [
|
|
@@ -4162,7 +4162,7 @@ const vs = { desktop: "100%", mobile: 390 }, Z1 = P(function({ src: n, title: l
|
|
|
4162
4162
|
{
|
|
4163
4163
|
title: l,
|
|
4164
4164
|
src: N,
|
|
4165
|
-
onLoad: () =>
|
|
4165
|
+
onLoad: () => y(!1),
|
|
4166
4166
|
className: "select-preview__iframe"
|
|
4167
4167
|
},
|
|
4168
4168
|
f
|
|
@@ -4174,10 +4174,10 @@ function bs(t) {
|
|
|
4174
4174
|
const n = typeof t == "string" ? Number(t) : t;
|
|
4175
4175
|
return typeof n == "number" && Number.isFinite(n) ? n : 0;
|
|
4176
4176
|
}
|
|
4177
|
-
function
|
|
4177
|
+
function ys(t) {
|
|
4178
4178
|
return gs.format(bs(t) / 100);
|
|
4179
4179
|
}
|
|
4180
|
-
const _l = "sw:hide-money",
|
|
4180
|
+
const _l = "sw:hide-money", xs = { hidden: !1, toggle: () => {
|
|
4181
4181
|
}, setHidden: () => {
|
|
4182
4182
|
} }, vl = zt(null);
|
|
4183
4183
|
function Ns() {
|
|
@@ -4205,7 +4205,7 @@ function G1({ children: t }) {
|
|
|
4205
4205
|
return /* @__PURE__ */ e(vl.Provider, { value: a, children: t });
|
|
4206
4206
|
}
|
|
4207
4207
|
function gl() {
|
|
4208
|
-
return qt(vl) ??
|
|
4208
|
+
return qt(vl) ?? xs;
|
|
4209
4209
|
}
|
|
4210
4210
|
const Ms = P(function({ children: n, label: l = "valor oculto", className: c, ...s }, a) {
|
|
4211
4211
|
const { hidden: r } = gl();
|
|
@@ -4215,7 +4215,7 @@ function lt({
|
|
|
4215
4215
|
cents: t,
|
|
4216
4216
|
sensitive: n = !0
|
|
4217
4217
|
}) {
|
|
4218
|
-
const l =
|
|
4218
|
+
const l = ys(t);
|
|
4219
4219
|
return n ? /* @__PURE__ */ e(Ms, { children: l }) : /* @__PURE__ */ e(me, { children: l });
|
|
4220
4220
|
}
|
|
4221
4221
|
const $s = new Intl.NumberFormat("pt-BR", {
|
|
@@ -4301,16 +4301,16 @@ const Y1 = P(function({ availableCents: n, availableLabel: l = "Saldo disponíve
|
|
|
4301
4301
|
/* @__PURE__ */ e("span", { className: "select-fees__netvalue", children: /* @__PURE__ */ e(lt, { cents: i }) })
|
|
4302
4302
|
] })
|
|
4303
4303
|
] });
|
|
4304
|
-
}), z1 = P(function({ label: n, value: l, caption: c, chart: s, tone: a,
|
|
4305
|
-
return /* @__PURE__ */ m("div", { ref:
|
|
4304
|
+
}), z1 = P(function({ label: n, value: l, caption: c, chart: s, tone: a, bare: r = !1, className: d, ...o }, i) {
|
|
4305
|
+
return /* @__PURE__ */ m("div", { ref: i, ...o, className: `select-kpi${r ? " select-kpi--bare" : ""}${d ? " " + d : ""}`, children: [
|
|
4306
4306
|
/* @__PURE__ */ e("span", { className: "select-kpi__label", children: n }),
|
|
4307
4307
|
/* @__PURE__ */ e("span", { className: `select-kpi__value${a ? ` select-kpi__value--${a}` : ""}`, children: l }),
|
|
4308
4308
|
s != null && /* @__PURE__ */ e("div", { className: "select-kpi__chart", children: s }),
|
|
4309
4309
|
c != null && /* @__PURE__ */ e("span", { className: "select-kpi__caption", children: c })
|
|
4310
4310
|
] });
|
|
4311
|
-
}), X1 = P(function({ title: n, caption: l, action: c, loading: s = !1, hideValues: a = !1, height: r = 260,
|
|
4312
|
-
const
|
|
4313
|
-
return /* @__PURE__ */ m("div", { ref:
|
|
4311
|
+
}), X1 = P(function({ title: n, caption: l, action: c, loading: s = !1, hideValues: a = !1, height: r = 260, flush: d = !1, children: o, className: i, ...u }, h) {
|
|
4312
|
+
const f = r === "auto" ? void 0 : `${r / 16}rem`, g = r === "auto" ? "10rem" : `${r / 16}rem`;
|
|
4313
|
+
return /* @__PURE__ */ m("div", { ref: h, ...u, className: `select-chartcard${i ? " " + i : ""}`, children: [
|
|
4314
4314
|
(n || c || l) && /* @__PURE__ */ m("div", { className: "select-chartcard__head", children: [
|
|
4315
4315
|
/* @__PURE__ */ m("div", { className: "select-chartcard__heading", children: [
|
|
4316
4316
|
n && /* @__PURE__ */ e("h3", { className: "select-chartcard__title", children: n }),
|
|
@@ -4321,9 +4321,9 @@ const Y1 = P(function({ availableCents: n, availableLabel: l = "Saldo disponíve
|
|
|
4321
4321
|
/* @__PURE__ */ e(
|
|
4322
4322
|
"div",
|
|
4323
4323
|
{
|
|
4324
|
-
className: `select-chartcard__body${a ? " is-blurred" : ""}`,
|
|
4325
|
-
style: { minHeight:
|
|
4326
|
-
children: s ? /* @__PURE__ */ e("div", { className: "select-skeleton select-chartcard__skeleton", style: { height:
|
|
4324
|
+
className: `select-chartcard__body${d ? " select-chartcard__body--flush" : ""}${a ? " is-blurred" : ""}`,
|
|
4325
|
+
style: { minHeight: f },
|
|
4326
|
+
children: s ? /* @__PURE__ */ e("div", { className: "select-skeleton select-chartcard__skeleton", style: { height: g } }) : o
|
|
4327
4327
|
}
|
|
4328
4328
|
)
|
|
4329
4329
|
] });
|
|
@@ -4366,7 +4366,7 @@ function kt(t, n) {
|
|
|
4366
4366
|
return r.observe(s), () => r.disconnect();
|
|
4367
4367
|
}, [t]), l;
|
|
4368
4368
|
}
|
|
4369
|
-
function
|
|
4369
|
+
function ye(t) {
|
|
4370
4370
|
if (t <= 0) return 1;
|
|
4371
4371
|
const n = Math.floor(Math.log10(t)), l = Math.pow(10, n), c = t / l;
|
|
4372
4372
|
return (c <= 1 ? 1 : c <= 2 ? 2 : c <= 5 ? 5 : 10) * l;
|
|
@@ -4414,7 +4414,7 @@ function bl(t, n) {
|
|
|
4414
4414
|
const l = t[0], c = t[t.length - 1];
|
|
4415
4415
|
return `${je(t)} L${c[0].toFixed(2)},${n.toFixed(2)} L${l[0].toFixed(2)},${n.toFixed(2)} Z`;
|
|
4416
4416
|
}
|
|
4417
|
-
function
|
|
4417
|
+
function yl(t, n) {
|
|
4418
4418
|
if (t.length === 0 || n.length === 0) return "";
|
|
4419
4419
|
const l = je(t), c = je([...n].reverse()).replace(/^M/, "L");
|
|
4420
4420
|
return `${l} ${c} Z`;
|
|
@@ -4449,7 +4449,7 @@ function K1({ data: t, color: n, height: l = 40, className: c, ...s }) {
|
|
|
4449
4449
|
const h = Math.max(...t), f = Math.min(...t), g = h - f || 1, v = t.map((N, $) => [
|
|
4450
4450
|
i + $ / (t.length - 1) * (r - i * 2),
|
|
4451
4451
|
l - i - (N - f) / g * (l - i * 2)
|
|
4452
|
-
]),
|
|
4452
|
+
]), y = v[v.length - 1];
|
|
4453
4453
|
u = /* @__PURE__ */ m("svg", { width: r, height: l, className: "select-chart", "aria-hidden": "true", children: [
|
|
4454
4454
|
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ m("linearGradient", { id: `${o}-sa`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
4455
4455
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: d, stopOpacity: 0.26 }),
|
|
@@ -4469,7 +4469,7 @@ function K1({ data: t, color: n, height: l = 40, className: c, ...s }) {
|
|
|
4469
4469
|
className: "select-chart__line"
|
|
4470
4470
|
}
|
|
4471
4471
|
),
|
|
4472
|
-
/* @__PURE__ */ e("circle", { cx:
|
|
4472
|
+
/* @__PURE__ */ e("circle", { cx: y[0], cy: y[1], r: 2.75, fill: d, className: "select-chart__dot" })
|
|
4473
4473
|
] });
|
|
4474
4474
|
}
|
|
4475
4475
|
return /* @__PURE__ */ e("div", { ...s, className: `select-spark${c ? " " + c : ""}`, ref: a, children: u });
|
|
@@ -4503,7 +4503,7 @@ function K({ tip: t, className: n, ...l }) {
|
|
|
4503
4503
|
] });
|
|
4504
4504
|
}
|
|
4505
4505
|
function J1({ data: t, height: n = 240, color: l, format: c = q, className: s, ...a }) {
|
|
4506
|
-
const { ref: r, width: d } = ne(n), o = X(), i = ee(), u = l ?? j(0), h =
|
|
4506
|
+
const { ref: r, width: d } = ne(n), o = X(), i = ee(), u = l ?? j(0), h = ye(Math.max(0, ...t.map((p) => p.value))), f = Be, g = Math.max(0, d - f.left - f.right), v = n - f.top - f.bottom, y = t.length > 0 ? g / t.length : 0, N = Math.min(y * 0.62, 44), $ = f.top + v, _ = (p) => $ - p / h * v;
|
|
4507
4507
|
return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
|
|
4508
4508
|
d > 0 && /* @__PURE__ */ m("svg", { width: d, height: n, className: "select-chart", children: [
|
|
4509
4509
|
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ m("linearGradient", { id: `${i}-bar`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
@@ -4524,7 +4524,7 @@ function J1({ data: t, height: n = 240, color: l, format: c = q, className: s, .
|
|
|
4524
4524
|
/* @__PURE__ */ e("text", { x: f.left - 8, y: _(p), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: c(p) })
|
|
4525
4525
|
] }, b)),
|
|
4526
4526
|
t.map((p, b) => {
|
|
4527
|
-
const S = f.left +
|
|
4527
|
+
const S = f.left + y * b + y / 2, k = p.value / h * v, M = $ - k;
|
|
4528
4528
|
return /* @__PURE__ */ m("g", { children: [
|
|
4529
4529
|
/* @__PURE__ */ e(
|
|
4530
4530
|
"rect",
|
|
@@ -4554,34 +4554,34 @@ function J1({ data: t, height: n = 240, color: l, format: c = q, className: s, .
|
|
|
4554
4554
|
] });
|
|
4555
4555
|
}
|
|
4556
4556
|
function Q1({ series: t, labels: n, height: l = 240, format: c = q, area: s = !1, className: a, ...r }) {
|
|
4557
|
-
const { ref: d, width: o } = ne(l), i = X(), u = ee(), [h, f] = D(null), { max: g, values: v } = Ss(Math.max(0, ...t.flatMap((w) => w.data))),
|
|
4557
|
+
const { ref: d, width: o } = ne(l), i = X(), u = ee(), [h, f] = D(null), { max: g, values: v } = Ss(Math.max(0, ...t.flatMap((w) => w.data))), y = Be, N = Math.max(0, o - y.left - y.right), $ = l - y.top - y.bottom, _ = n.length, p = (w) => y.left + (_ <= 1 ? N / 2 : w / (_ - 1) * N), b = (w) => y.top + $ - w / g * $, S = _ > 1 ? N / (_ - 1) : N, k = Math.max(1, Math.ceil(_ / 7)), M = y.top + $;
|
|
4558
4558
|
return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: d, children: [
|
|
4559
4559
|
o > 0 && /* @__PURE__ */ m("svg", { width: o, height: l, className: "select-chart", children: [
|
|
4560
|
-
/* @__PURE__ */ e("defs", { children: t.map((w,
|
|
4561
|
-
const C = w.color ?? j(
|
|
4562
|
-
return /* @__PURE__ */ m("linearGradient", { id: `${u}-a${
|
|
4560
|
+
/* @__PURE__ */ e("defs", { children: t.map((w, x) => {
|
|
4561
|
+
const C = w.color ?? j(x);
|
|
4562
|
+
return /* @__PURE__ */ m("linearGradient", { id: `${u}-a${x}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
4563
4563
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: C, stopOpacity: 0.32 }),
|
|
4564
4564
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: C, stopOpacity: 0 })
|
|
4565
|
-
] },
|
|
4565
|
+
] }, x);
|
|
4566
4566
|
}) }),
|
|
4567
|
-
v.map((w,
|
|
4567
|
+
v.map((w, x) => /* @__PURE__ */ m("g", { children: [
|
|
4568
4568
|
/* @__PURE__ */ e(
|
|
4569
4569
|
"line",
|
|
4570
4570
|
{
|
|
4571
|
-
x1:
|
|
4572
|
-
x2: o -
|
|
4571
|
+
x1: y.left,
|
|
4572
|
+
x2: o - y.right,
|
|
4573
4573
|
y1: b(w),
|
|
4574
4574
|
y2: b(w),
|
|
4575
4575
|
className: w === 0 ? "select-chart__axis" : "select-chart__grid"
|
|
4576
4576
|
}
|
|
4577
4577
|
),
|
|
4578
|
-
/* @__PURE__ */ e("text", { x:
|
|
4579
|
-
] },
|
|
4580
|
-
h != null && /* @__PURE__ */ e("line", { x1: p(h), x2: p(h), y1:
|
|
4581
|
-
t.map((w,
|
|
4582
|
-
const C = w.color ?? j(
|
|
4578
|
+
/* @__PURE__ */ e("text", { x: y.left - 8, y: b(w), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: c(w) })
|
|
4579
|
+
] }, x)),
|
|
4580
|
+
h != null && /* @__PURE__ */ e("line", { x1: p(h), x2: p(h), y1: y.top, y2: M, className: "select-chart__crosshair" }),
|
|
4581
|
+
t.map((w, x) => {
|
|
4582
|
+
const C = w.color ?? j(x), L = w.data.map((B, A) => [p(A), b(B)]);
|
|
4583
4583
|
return /* @__PURE__ */ m("g", { children: [
|
|
4584
|
-
s && /* @__PURE__ */ e("path", { d: bl(L, M), fill: `url(#${u}-a${
|
|
4584
|
+
s && /* @__PURE__ */ e("path", { d: bl(L, M), fill: `url(#${u}-a${x})`, className: "select-chart__area" }),
|
|
4585
4585
|
/* @__PURE__ */ e(
|
|
4586
4586
|
"path",
|
|
4587
4587
|
{
|
|
@@ -4595,46 +4595,46 @@ function Q1({ series: t, labels: n, height: l = 240, format: c = q, area: s = !1
|
|
|
4595
4595
|
className: "select-chart__line"
|
|
4596
4596
|
}
|
|
4597
4597
|
)
|
|
4598
|
-
] },
|
|
4598
|
+
] }, x);
|
|
4599
4599
|
}),
|
|
4600
|
-
h != null && t.map((w,
|
|
4600
|
+
h != null && t.map((w, x) => /* @__PURE__ */ e(
|
|
4601
4601
|
"circle",
|
|
4602
4602
|
{
|
|
4603
4603
|
cx: p(h),
|
|
4604
4604
|
cy: b(w.data[h] ?? 0),
|
|
4605
4605
|
r: 3.5,
|
|
4606
|
-
fill: w.color ?? j(
|
|
4606
|
+
fill: w.color ?? j(x),
|
|
4607
4607
|
className: "select-chart__dot select-chart__dot--active"
|
|
4608
4608
|
},
|
|
4609
|
-
|
|
4609
|
+
x
|
|
4610
4610
|
)),
|
|
4611
4611
|
n.map(
|
|
4612
|
-
(w,
|
|
4612
|
+
(w, x) => x % k === 0 || x === _ - 1 ? /* @__PURE__ */ e("text", { x: p(x), y: l - y.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: w }, x) : null
|
|
4613
4613
|
),
|
|
4614
|
-
n.map((w,
|
|
4614
|
+
n.map((w, x) => /* @__PURE__ */ e(
|
|
4615
4615
|
"rect",
|
|
4616
4616
|
{
|
|
4617
|
-
x: p(
|
|
4618
|
-
y:
|
|
4617
|
+
x: p(x) - S / 2,
|
|
4618
|
+
y: y.top,
|
|
4619
4619
|
width: S,
|
|
4620
4620
|
height: $,
|
|
4621
4621
|
fill: "transparent",
|
|
4622
4622
|
onMouseEnter: () => {
|
|
4623
|
-
f(
|
|
4624
|
-
const C = Math.min(...t.map((L) => b(L.data[
|
|
4623
|
+
f(x);
|
|
4624
|
+
const C = Math.min(...t.map((L) => b(L.data[x] ?? 0)));
|
|
4625
4625
|
i.show({
|
|
4626
|
-
x: p(
|
|
4626
|
+
x: p(x),
|
|
4627
4627
|
y: C,
|
|
4628
|
-
place: C <
|
|
4628
|
+
place: C < y.top + 52 ? "bottom" : "top",
|
|
4629
4629
|
title: w,
|
|
4630
|
-
rows: t.map((L, B) => ({ label: L.name, value: c(L.data[
|
|
4630
|
+
rows: t.map((L, B) => ({ label: L.name, value: c(L.data[x] ?? 0), color: L.color ?? j(B) }))
|
|
4631
4631
|
});
|
|
4632
4632
|
},
|
|
4633
4633
|
onMouseLeave: () => {
|
|
4634
4634
|
f(null), i.hide();
|
|
4635
4635
|
}
|
|
4636
4636
|
},
|
|
4637
|
-
`h${
|
|
4637
|
+
`h${x}`
|
|
4638
4638
|
))
|
|
4639
4639
|
] }),
|
|
4640
4640
|
/* @__PURE__ */ e(K, { tip: i.tip })
|
|
@@ -4642,42 +4642,42 @@ function Q1({ series: t, labels: n, height: l = 240, format: c = q, area: s = !1
|
|
|
4642
4642
|
}
|
|
4643
4643
|
function eo({ series: t, labels: n, height: l = 240, format: c = q, className: s, ...a }) {
|
|
4644
4644
|
const { ref: r, width: d } = ne(l), o = X(), i = ee(), [u, h] = D(null), f = n.length, g = new Array(f).fill(0), v = t.map(
|
|
4645
|
-
(
|
|
4646
|
-
),
|
|
4645
|
+
(x) => x.data.map((C, L) => (g[L] = (g[L] ?? 0) + (C ?? 0), g[L]))
|
|
4646
|
+
), y = ye(Math.max(0, ...g)), N = Be, $ = Math.max(0, d - N.left - N.right), _ = l - N.top - N.bottom, p = (x) => N.left + (f <= 1 ? $ / 2 : x / (f - 1) * $), b = (x) => N.top + _ - x / y * _, S = f > 1 ? $ / (f - 1) : $, k = Math.max(1, Math.ceil(f / 7)), M = N.top + _, w = v[v.length - 1];
|
|
4647
4647
|
return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
|
|
4648
4648
|
d > 0 && /* @__PURE__ */ m("svg", { width: d, height: l, className: "select-chart", children: [
|
|
4649
|
-
/* @__PURE__ */ e("defs", { children: t.map((
|
|
4650
|
-
const L =
|
|
4649
|
+
/* @__PURE__ */ e("defs", { children: t.map((x, C) => {
|
|
4650
|
+
const L = x.color ?? j(C);
|
|
4651
4651
|
return /* @__PURE__ */ m("linearGradient", { id: `${i}-b${C}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
4652
4652
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: L, stopOpacity: 0.95 }),
|
|
4653
4653
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: L, stopOpacity: 0.4 })
|
|
4654
4654
|
] }, C);
|
|
4655
4655
|
}) }),
|
|
4656
|
-
ke(
|
|
4656
|
+
ke(y).map((x, C) => /* @__PURE__ */ m("g", { children: [
|
|
4657
4657
|
/* @__PURE__ */ e(
|
|
4658
4658
|
"line",
|
|
4659
4659
|
{
|
|
4660
4660
|
x1: N.left,
|
|
4661
4661
|
x2: d - N.right,
|
|
4662
|
-
y1: b(
|
|
4663
|
-
y2: b(
|
|
4662
|
+
y1: b(x),
|
|
4663
|
+
y2: b(x),
|
|
4664
4664
|
className: C === 0 ? "select-chart__axis" : "select-chart__grid"
|
|
4665
4665
|
}
|
|
4666
4666
|
),
|
|
4667
|
-
/* @__PURE__ */ e("text", { x: N.left - 8, y: b(
|
|
4667
|
+
/* @__PURE__ */ e("text", { x: N.left - 8, y: b(x), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: c(x) })
|
|
4668
4668
|
] }, C)),
|
|
4669
|
-
t.map((
|
|
4670
|
-
const L =
|
|
4669
|
+
t.map((x, C) => {
|
|
4670
|
+
const L = x.color ?? j(C), B = v[C].map((E, F) => [p(F), b(E)]), A = C === 0 ? n.map((E, F) => [p(F), M]) : v[C - 1].map((E, F) => [p(F), b(E)]);
|
|
4671
4671
|
return /* @__PURE__ */ m("g", { className: "select-chart__area", children: [
|
|
4672
|
-
/* @__PURE__ */ e("path", { d:
|
|
4672
|
+
/* @__PURE__ */ e("path", { d: yl(B, A), fill: `url(#${i}-b${C})` }),
|
|
4673
4673
|
/* @__PURE__ */ e("path", { d: je(B), fill: "none", stroke: L, strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })
|
|
4674
4674
|
] }, C);
|
|
4675
4675
|
}),
|
|
4676
4676
|
u != null && /* @__PURE__ */ e("line", { x1: p(u), x2: p(u), y1: N.top, y2: M, className: "select-chart__crosshair" }),
|
|
4677
4677
|
n.map(
|
|
4678
|
-
(
|
|
4678
|
+
(x, C) => C % k === 0 || C === f - 1 ? /* @__PURE__ */ e("text", { x: p(C), y: l - N.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: x }, C) : null
|
|
4679
4679
|
),
|
|
4680
|
-
n.map((
|
|
4680
|
+
n.map((x, C) => /* @__PURE__ */ e(
|
|
4681
4681
|
"rect",
|
|
4682
4682
|
{
|
|
4683
4683
|
x: p(C) - S / 2,
|
|
@@ -4692,7 +4692,7 @@ function eo({ series: t, labels: n, height: l = 240, format: c = q, className: s
|
|
|
4692
4692
|
x: p(C),
|
|
4693
4693
|
y: L,
|
|
4694
4694
|
place: L < N.top + 52 ? "bottom" : "top",
|
|
4695
|
-
title:
|
|
4695
|
+
title: x,
|
|
4696
4696
|
rows: t.map((B, A) => ({ label: B.name, value: c(B.data[C] ?? 0), color: B.color ?? j(A) }))
|
|
4697
4697
|
});
|
|
4698
4698
|
},
|
|
@@ -4707,7 +4707,7 @@ function eo({ series: t, labels: n, height: l = 240, format: c = q, className: s
|
|
|
4707
4707
|
] });
|
|
4708
4708
|
}
|
|
4709
4709
|
function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = q, formatLine: a = (o) => `${Math.round(o)}%`, className: r, ...d }) {
|
|
4710
|
-
const { ref: o, width: i } = ne(c), u = X(), h = ee(), [f, g] = D(null), v = { ...Be, right: 58 },
|
|
4710
|
+
const { ref: o, width: i } = ne(c), u = X(), h = ee(), [f, g] = D(null), v = { ...Be, right: 58 }, y = Math.max(0, i - v.left - v.right), N = 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), x = v.top + N, C = (E) => x - E / _ * N, L = (E) => x - E / p * N, B = (E) => v.left + b * E + b / 2, A = l.data.map((E, F) => [B(F), L(E)]);
|
|
4711
4711
|
return /* @__PURE__ */ m("div", { ...d, className: `select-chart-wrap${r ? " " + r : ""}`, ref: o, children: [
|
|
4712
4712
|
i > 0 && /* @__PURE__ */ m("svg", { width: i, height: c, className: "select-chart", children: [
|
|
4713
4713
|
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ m("linearGradient", { id: `${h}-bar`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
@@ -4734,7 +4734,7 @@ function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = q, fo
|
|
|
4734
4734
|
"rect",
|
|
4735
4735
|
{
|
|
4736
4736
|
x: B(F) - S / 2,
|
|
4737
|
-
y:
|
|
4737
|
+
y: x - T,
|
|
4738
4738
|
width: S,
|
|
4739
4739
|
height: Math.max(0, T),
|
|
4740
4740
|
rx: 5,
|
|
@@ -4745,7 +4745,7 @@ function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = q, fo
|
|
|
4745
4745
|
F
|
|
4746
4746
|
);
|
|
4747
4747
|
}),
|
|
4748
|
-
f != null && /* @__PURE__ */ e("line", { x1: B(f), x2: B(f), y1: v.top, y2:
|
|
4748
|
+
f != null && /* @__PURE__ */ e("line", { x1: B(f), x2: B(f), y1: v.top, y2: x, className: "select-chart__crosshair" }),
|
|
4749
4749
|
/* @__PURE__ */ e(
|
|
4750
4750
|
"path",
|
|
4751
4751
|
{
|
|
@@ -4805,14 +4805,14 @@ function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = q, fo
|
|
|
4805
4805
|
] });
|
|
4806
4806
|
}
|
|
4807
4807
|
const no = P(function({ segments: n, size: l = 200, thickness: c = 26, format: s = q, centerLabel: a, legend: r = !0, gap: d = 2, pie: o = !1, className: i, ...u }, h) {
|
|
4808
|
-
const f = X(), g = ee(), v = Y(null),
|
|
4808
|
+
const f = X(), g = ee(), v = Y(null), y = kt(v, l), N = n.reduce((k, M) => k + M.value, 0) || 1, $ = y / 2, _ = y / 2, p = y / 2 - 2, b = o ? 0 : p - c;
|
|
4809
4809
|
let S = 0;
|
|
4810
4810
|
return /* @__PURE__ */ m("div", { ref: h, ...u, className: `select-donut-wrap${i ? " " + i : ""}`, children: [
|
|
4811
4811
|
/* @__PURE__ */ m("div", { ref: v, className: "select-donut-ring", style: { width: `${l / 16}rem`, aspectRatio: "1" }, children: [
|
|
4812
|
-
/* @__PURE__ */ m("svg", { width:
|
|
4812
|
+
/* @__PURE__ */ m("svg", { width: y, height: y, viewBox: `0 0 ${y} ${y}`, className: "select-chart select-donut", "aria-hidden": "true", children: [
|
|
4813
4813
|
/* @__PURE__ */ e("defs", { children: n.map((k, M) => {
|
|
4814
4814
|
const w = k.color ?? j(M);
|
|
4815
|
-
return /* @__PURE__ */ m("linearGradient", { id: `${g}-s${M}`, gradientUnits: "userSpaceOnUse", x1: "0", y1: "0", x2: "0", y2:
|
|
4815
|
+
return /* @__PURE__ */ m("linearGradient", { id: `${g}-s${M}`, gradientUnits: "userSpaceOnUse", x1: "0", y1: "0", x2: "0", y2: y, children: [
|
|
4816
4816
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: w, stopOpacity: 1 }),
|
|
4817
4817
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: w, stopOpacity: 0.6 })
|
|
4818
4818
|
] }, M);
|
|
@@ -4820,7 +4820,7 @@ const no = P(function({ segments: n, size: l = 200, thickness: c = 26, format: s
|
|
|
4820
4820
|
n.map((k, M) => {
|
|
4821
4821
|
const w = S / N * 360;
|
|
4822
4822
|
S += k.value;
|
|
4823
|
-
const
|
|
4823
|
+
const x = S / N * 360, C = k.color ?? j(M), B = x - w > d * 1.5 ? d / 2 : 0, A = w + B, E = Math.max(A + 0.01, x - B);
|
|
4824
4824
|
return /* @__PURE__ */ e(
|
|
4825
4825
|
"path",
|
|
4826
4826
|
{
|
|
@@ -4828,7 +4828,7 @@ const no = P(function({ segments: n, size: l = 200, thickness: c = 26, format: s
|
|
|
4828
4828
|
fill: `url(#${g}-s${M})`,
|
|
4829
4829
|
className: "select-chart__seg",
|
|
4830
4830
|
onMouseEnter: () => {
|
|
4831
|
-
const F = ((w +
|
|
4831
|
+
const F = ((w + x) / 2 - 90) * Math.PI / 180, T = $ + (p + 6) * Math.cos(F), R = _ + (p + 6) * Math.sin(F);
|
|
4832
4832
|
f.show({
|
|
4833
4833
|
x: T,
|
|
4834
4834
|
y: R,
|
|
@@ -4854,31 +4854,31 @@ const no = P(function({ segments: n, size: l = 200, thickness: c = 26, format: s
|
|
|
4854
4854
|
] });
|
|
4855
4855
|
});
|
|
4856
4856
|
function lo({ series: t, labels: n, height: l = 240, format: c = q, stacked: s = !1, className: a, ...r }) {
|
|
4857
|
-
const { ref: d, width: o } = ne(l), i = X(), u = ee(), h = n.length, f = t.length || 1, g = n.map((M, w) => t.reduce((
|
|
4857
|
+
const { ref: d, width: o } = ne(l), i = X(), u = ee(), h = n.length, f = t.length || 1, g = n.map((M, w) => t.reduce((x, C) => x + (C.data[w] ?? 0), 0)), v = ye(s ? Math.max(0, ...g) : Math.max(0, ...t.flatMap((M) => M.data))), y = Be, N = Math.max(0, o - y.left - y.right), $ = l - y.top - y.bottom, _ = y.top + $, p = h ? N / h : 0, b = (M) => _ - M / v * $, S = Math.min(p * 0.72, f * 40), k = s ? Math.min(p * 0.5, 44) : S / f;
|
|
4858
4858
|
return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: d, children: [
|
|
4859
4859
|
o > 0 && /* @__PURE__ */ m("svg", { width: o, height: l, className: "select-chart", children: [
|
|
4860
4860
|
/* @__PURE__ */ e("defs", { children: t.map((M, w) => {
|
|
4861
|
-
const
|
|
4861
|
+
const x = M.color ?? j(w);
|
|
4862
4862
|
return /* @__PURE__ */ m("linearGradient", { id: `${u}-c${w}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
4863
|
-
/* @__PURE__ */ e("stop", { offset: "0%", stopColor:
|
|
4864
|
-
/* @__PURE__ */ e("stop", { offset: "100%", stopColor:
|
|
4863
|
+
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: x, stopOpacity: 1 }),
|
|
4864
|
+
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: x, stopOpacity: 0.62 })
|
|
4865
4865
|
] }, w);
|
|
4866
4866
|
}) }),
|
|
4867
4867
|
ke(v).map((M, w) => /* @__PURE__ */ m("g", { children: [
|
|
4868
4868
|
/* @__PURE__ */ e(
|
|
4869
4869
|
"line",
|
|
4870
4870
|
{
|
|
4871
|
-
x1:
|
|
4872
|
-
x2: o -
|
|
4871
|
+
x1: y.left,
|
|
4872
|
+
x2: o - y.right,
|
|
4873
4873
|
y1: b(M),
|
|
4874
4874
|
y2: b(M),
|
|
4875
4875
|
className: w === 0 ? "select-chart__axis" : "select-chart__grid"
|
|
4876
4876
|
}
|
|
4877
4877
|
),
|
|
4878
|
-
/* @__PURE__ */ e("text", { x:
|
|
4878
|
+
/* @__PURE__ */ e("text", { x: y.left - 8, y: b(M), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: c(M) })
|
|
4879
4879
|
] }, w)),
|
|
4880
4880
|
n.map((M, w) => {
|
|
4881
|
-
const
|
|
4881
|
+
const x = y.left + p * w;
|
|
4882
4882
|
if (s) {
|
|
4883
4883
|
let L = 0;
|
|
4884
4884
|
return /* @__PURE__ */ e("g", { children: t.map((B, A) => {
|
|
@@ -4886,7 +4886,7 @@ function lo({ series: t, labels: n, height: l = 240, format: c = q, stacked: s =
|
|
|
4886
4886
|
return L += E, /* @__PURE__ */ e(
|
|
4887
4887
|
"rect",
|
|
4888
4888
|
{
|
|
4889
|
-
x:
|
|
4889
|
+
x: x + p / 2 - k / 2,
|
|
4890
4890
|
y: F,
|
|
4891
4891
|
width: k,
|
|
4892
4892
|
height: Math.max(0, E),
|
|
@@ -4899,7 +4899,7 @@ function lo({ series: t, labels: n, height: l = 240, format: c = q, stacked: s =
|
|
|
4899
4899
|
);
|
|
4900
4900
|
}) }, w);
|
|
4901
4901
|
}
|
|
4902
|
-
const C =
|
|
4902
|
+
const C = x + (p - S) / 2;
|
|
4903
4903
|
return /* @__PURE__ */ e("g", { children: t.map((L, B) => {
|
|
4904
4904
|
const A = (L.data[w] ?? 0) / v * $;
|
|
4905
4905
|
return /* @__PURE__ */ e(
|
|
@@ -4918,21 +4918,21 @@ function lo({ series: t, labels: n, height: l = 240, format: c = q, stacked: s =
|
|
|
4918
4918
|
);
|
|
4919
4919
|
}) }, w);
|
|
4920
4920
|
}),
|
|
4921
|
-
n.map((M, w) => /* @__PURE__ */ e("text", { x:
|
|
4921
|
+
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)),
|
|
4922
4922
|
n.map((M, w) => {
|
|
4923
|
-
const
|
|
4923
|
+
const x = s ? b(g[w] ?? 0) : Math.min(...t.map((C) => b(C.data[w] ?? 0)));
|
|
4924
4924
|
return /* @__PURE__ */ e(
|
|
4925
4925
|
"rect",
|
|
4926
4926
|
{
|
|
4927
|
-
x:
|
|
4928
|
-
y:
|
|
4927
|
+
x: y.left + p * w,
|
|
4928
|
+
y: y.top,
|
|
4929
4929
|
width: p,
|
|
4930
4930
|
height: $,
|
|
4931
4931
|
fill: "transparent",
|
|
4932
4932
|
onMouseEnter: () => i.show({
|
|
4933
|
-
x:
|
|
4934
|
-
y,
|
|
4935
|
-
place:
|
|
4933
|
+
x: y.left + p * w + p / 2,
|
|
4934
|
+
y: x,
|
|
4935
|
+
place: x < y.top + 52 ? "bottom" : "top",
|
|
4936
4936
|
title: M,
|
|
4937
4937
|
rows: t.map((C, L) => ({ label: C.name, value: c(C.data[w] ?? 0), color: C.color ?? j(L) }))
|
|
4938
4938
|
}),
|
|
@@ -4983,7 +4983,7 @@ function An(t, n, l, c, s) {
|
|
|
4983
4983
|
return `M ${a.toFixed(2)} ${r.toFixed(2)} A ${l} ${l} 0 0 1 ${d.toFixed(2)} ${o.toFixed(2)}`;
|
|
4984
4984
|
}
|
|
4985
4985
|
const Ls = (t) => `${t.toLocaleString("pt-BR", { maximumFractionDigits: t < 10 ? 1 : 0 })}%`, so = P(function({ value: n, label: l, caption: c, size: s = 220, thickness: a, color: r, format: d = Ls, className: o, ...i }, u) {
|
|
4986
|
-
const h = Cs(n), f = ee(), g = a ?? Math.max(8, Math.round(s * 0.075)), v = g / 2 + 2,
|
|
4986
|
+
const h = Cs(n), f = ee(), g = a ?? Math.max(8, Math.round(s * 0.075)), v = g / 2 + 2, y = s / 2 - v, N = s / 2, $ = s / 2, _ = $ + v, p = Tc({ value: h, format: d });
|
|
4987
4987
|
return /* @__PURE__ */ m("div", { ref: u, ...i, className: `select-gauge${o ? " " + o : ""}`, style: { width: `${s / 16}rem` }, children: [
|
|
4988
4988
|
/* @__PURE__ */ m("div", { className: "select-gauge__ring", style: { width: "100%", aspectRatio: `${s} / ${_}` }, children: [
|
|
4989
4989
|
/* @__PURE__ */ m("svg", { width: "100%", height: "100%", viewBox: `0 0 ${s} ${_}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
@@ -4995,7 +4995,7 @@ const Ls = (t) => `${t.toLocaleString("pt-BR", { maximumFractionDigits: t < 10 ?
|
|
|
4995
4995
|
"path",
|
|
4996
4996
|
{
|
|
4997
4997
|
className: "select-gauge__track",
|
|
4998
|
-
d: An(N, $,
|
|
4998
|
+
d: An(N, $, y, 0, 1),
|
|
4999
4999
|
fill: "none",
|
|
5000
5000
|
strokeWidth: g,
|
|
5001
5001
|
strokeLinecap: "round"
|
|
@@ -5005,7 +5005,7 @@ const Ls = (t) => `${t.toLocaleString("pt-BR", { maximumFractionDigits: t < 10 ?
|
|
|
5005
5005
|
"path",
|
|
5006
5006
|
{
|
|
5007
5007
|
className: "select-gauge__arc",
|
|
5008
|
-
d: An(N, $,
|
|
5008
|
+
d: An(N, $, y, 0, h / 100),
|
|
5009
5009
|
fill: "none",
|
|
5010
5010
|
stroke: r ?? `url(#${f})`,
|
|
5011
5011
|
strokeWidth: g,
|
|
@@ -5022,7 +5022,7 @@ const Ls = (t) => `${t.toLocaleString("pt-BR", { maximumFractionDigits: t < 10 ?
|
|
|
5022
5022
|
c != null && /* @__PURE__ */ e("div", { className: "select-gauge__caption", children: c })
|
|
5023
5023
|
] });
|
|
5024
5024
|
}), ao = P(function({ columns: n, rows: l, format: c = q, formatValue: s, color: a = "var(--select-chart-1)", showValues: r = !0, min: d, max: o, cellSize: i = 40, className: u, ...h }, f) {
|
|
5025
|
-
const g = X(), v = l.flatMap((b) => b.values).filter((b) => b != null && Number.isFinite(b)),
|
|
5025
|
+
const g = X(), v = l.flatMap((b) => b.values).filter((b) => b != null && Number.isFinite(b)), y = d ?? (v.length ? Math.min(...v) : 0), $ = (o ?? (v.length ? Math.max(...v) : 1)) - y || 1, _ = { "--heat-color": a }, p = {
|
|
5026
5026
|
gridTemplateColumns: `minmax(56px, max-content) repeat(${n.length}, minmax(${i}px, 1fr))`
|
|
5027
5027
|
};
|
|
5028
5028
|
return /* @__PURE__ */ m("div", { ref: f, ...h, className: `select-chart-wrap select-heatmap${u ? " " + u : ""}`, style: _, children: [
|
|
@@ -5035,13 +5035,13 @@ const Ls = (t) => `${t.toLocaleString("pt-BR", { maximumFractionDigits: t < 10 ?
|
|
|
5035
5035
|
const M = `${b.label}-${n[k] ?? k}`;
|
|
5036
5036
|
if (S == null || !Number.isFinite(S))
|
|
5037
5037
|
return /* @__PURE__ */ e("div", { className: "select-heatmap__cell select-heatmap__cell--empty" }, M);
|
|
5038
|
-
const w = Math.max(0, Math.min(1, (S -
|
|
5038
|
+
const w = Math.max(0, Math.min(1, (S - y) / $)), x = Math.round((0.14 + w * 0.86) * 100), C = Math.max(6, x - 16);
|
|
5039
5039
|
return /* @__PURE__ */ e(
|
|
5040
5040
|
"div",
|
|
5041
5041
|
{
|
|
5042
5042
|
className: "select-heatmap__cell",
|
|
5043
5043
|
style: {
|
|
5044
|
-
background: `linear-gradient(150deg, color-mix(in srgb, ${a} ${C}%, transparent), color-mix(in srgb, ${a} ${
|
|
5044
|
+
background: `linear-gradient(150deg, color-mix(in srgb, ${a} ${C}%, transparent), color-mix(in srgb, ${a} ${x}%, transparent))`,
|
|
5045
5045
|
color: w > 0.55 ? "#fff" : "var(--select-text)"
|
|
5046
5046
|
},
|
|
5047
5047
|
onMouseEnter: (L) => {
|
|
@@ -5104,15 +5104,15 @@ const Pt = (t) => Number.isFinite(t) ? Math.max(0, Math.min(100, t)) : 0, ro = P
|
|
|
5104
5104
|
return /* @__PURE__ */ m("div", { ref: u, ...i, className: `select-donut-wrap${o ? " " + o : ""}`, children: [
|
|
5105
5105
|
/* @__PURE__ */ m("div", { className: "select-radial", style: { width: l, aspectRatio: "1" }, children: [
|
|
5106
5106
|
/* @__PURE__ */ m("svg", { width: l, height: l, viewBox: `0 0 ${l} ${l}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
5107
|
-
/* @__PURE__ */ e("defs", { children: n.map((v,
|
|
5108
|
-
const N = v.color ?? j(
|
|
5109
|
-
return /* @__PURE__ */ m("linearGradient", { id: `${h}-r${
|
|
5107
|
+
/* @__PURE__ */ e("defs", { children: n.map((v, y) => {
|
|
5108
|
+
const N = v.color ?? j(y);
|
|
5109
|
+
return /* @__PURE__ */ m("linearGradient", { id: `${h}-r${y}`, gradientUnits: "userSpaceOnUse", x1: "0", y1: "0", x2: "0", y2: l, children: [
|
|
5110
5110
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: N, stopOpacity: 1 }),
|
|
5111
5111
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: N, stopOpacity: 0.5 })
|
|
5112
|
-
] },
|
|
5112
|
+
] }, y);
|
|
5113
5113
|
}) }),
|
|
5114
|
-
n.map((v,
|
|
5115
|
-
const N = l / 2 - 2 - c / 2 -
|
|
5114
|
+
n.map((v, y) => {
|
|
5115
|
+
const N = l / 2 - 2 - c / 2 - y * (c + s);
|
|
5116
5116
|
if (N <= c / 2) return null;
|
|
5117
5117
|
const $ = Pt(v.value);
|
|
5118
5118
|
return /* @__PURE__ */ m("g", { transform: `rotate(-90 ${f} ${g})`, children: [
|
|
@@ -5124,7 +5124,7 @@ const Pt = (t) => Number.isFinite(t) ? Math.max(0, Math.min(100, t)) : 0, ro = P
|
|
|
5124
5124
|
cy: g,
|
|
5125
5125
|
r: N,
|
|
5126
5126
|
fill: "none",
|
|
5127
|
-
stroke: `url(#${h}-r${
|
|
5127
|
+
stroke: `url(#${h}-r${y})`,
|
|
5128
5128
|
strokeWidth: c,
|
|
5129
5129
|
strokeLinecap: "round",
|
|
5130
5130
|
pathLength: 100,
|
|
@@ -5133,25 +5133,25 @@ const Pt = (t) => Number.isFinite(t) ? Math.max(0, Math.min(100, t)) : 0, ro = P
|
|
|
5133
5133
|
className: "select-radial__arc"
|
|
5134
5134
|
}
|
|
5135
5135
|
)
|
|
5136
|
-
] },
|
|
5136
|
+
] }, y);
|
|
5137
5137
|
})
|
|
5138
5138
|
] }),
|
|
5139
5139
|
/* @__PURE__ */ e("div", { className: "select-radial__center", children: r ?? (n.length === 1 ? /* @__PURE__ */ e("strong", { className: "select-radial__value", children: a(Pt(n[0].value)) }) : null) })
|
|
5140
5140
|
] }),
|
|
5141
|
-
d && /* @__PURE__ */ e("ul", { className: "select-donut__legend", children: n.map((v,
|
|
5142
|
-
/* @__PURE__ */ e("span", { className: "select-donut__dot", style: { background: v.color ?? j(
|
|
5141
|
+
d && /* @__PURE__ */ e("ul", { className: "select-donut__legend", children: n.map((v, y) => /* @__PURE__ */ m("li", { className: "select-donut__legitem", children: [
|
|
5142
|
+
/* @__PURE__ */ e("span", { className: "select-donut__dot", style: { background: v.color ?? j(y) } }),
|
|
5143
5143
|
/* @__PURE__ */ e("span", { className: "select-donut__leglabel", children: v.label }),
|
|
5144
5144
|
/* @__PURE__ */ e("span", { className: "select-donut__legval", children: a(Pt(v.value)) })
|
|
5145
|
-
] },
|
|
5145
|
+
] }, y)) })
|
|
5146
5146
|
] });
|
|
5147
5147
|
}), En = 6.1, Dt = 12, Bn = 56, As = 0.4;
|
|
5148
5148
|
function io({ data: t, height: n, color: l, format: c = q, formatValue: s, distributed: a = !0, labelWidth: r, className: d, ...o }) {
|
|
5149
|
-
const g = n ?? t.length * 36 + 6 + 26, { ref: v, width:
|
|
5149
|
+
const g = n ?? t.length * 36 + 6 + 26, { ref: v, width: y } = ne(g), N = X(), $ = ee(), _ = ye(Math.max(0, ...t.map((E) => E.value))), p = t.reduce((E, F) => Math.max(E, F.label.length), 0), b = Math.min(
|
|
5150
5150
|
Math.max(Bn, p * En + Dt),
|
|
5151
|
-
Math.max(Bn,
|
|
5152
|
-
), S = r ?? b, k = Math.max(3, Math.floor((S - Dt) / En)), M = (E) => E.length <= k ? E : `${E.slice(0, k - 1).trimEnd()}…`, w = Math.max(0,
|
|
5151
|
+
Math.max(Bn, y * As)
|
|
5152
|
+
), S = r ?? b, k = Math.max(3, Math.floor((S - Dt) / En)), M = (E) => E.length <= k ? E : `${E.slice(0, k - 1).trimEnd()}…`, w = Math.max(0, y - S - 28), x = g - 6 - 26, C = t.length ? x / t.length : 0, L = Math.min(C * 0.62, 22), B = (E) => S + E / _ * w, A = (E, F) => E.color ?? (a ? j(F) : l ?? j(0));
|
|
5153
5153
|
return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${d ? " " + d : ""}`, ref: v, children: [
|
|
5154
|
-
|
|
5154
|
+
y > 0 && /* @__PURE__ */ m("svg", { width: y, height: g, className: "select-chart", children: [
|
|
5155
5155
|
/* @__PURE__ */ e("defs", { children: t.map((E, F) => {
|
|
5156
5156
|
const T = A(E, F);
|
|
5157
5157
|
return /* @__PURE__ */ m("linearGradient", { id: `${$}-h${F}`, x1: "0", y1: "0", x2: "1", y2: "0", children: [
|
|
@@ -5166,7 +5166,7 @@ function io({ data: t, height: n, color: l, format: c = q, formatValue: s, distr
|
|
|
5166
5166
|
x1: B(E),
|
|
5167
5167
|
x2: B(E),
|
|
5168
5168
|
y1: 6,
|
|
5169
|
-
y2: 6 +
|
|
5169
|
+
y2: 6 + x,
|
|
5170
5170
|
className: F === 0 ? "select-chart__axis" : "select-chart__grid"
|
|
5171
5171
|
}
|
|
5172
5172
|
),
|
|
@@ -5224,7 +5224,7 @@ function ho({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
5224
5224
|
return i = k.value, { ...k, start: 0, end: k.value };
|
|
5225
5225
|
const M = i;
|
|
5226
5226
|
return i += k.value, { ...k, start: M, end: i };
|
|
5227
|
-
}), h =
|
|
5227
|
+
}), h = ye(Math.max(0, ...u.map((k) => Math.max(k.start, k.end)))), f = Be, g = Math.max(0, r - f.left - f.right), v = n - f.top - f.bottom, y = f.top + v, N = t.length, $ = N ? g / N : 0, _ = Math.min($ * 0.6, 46), p = (k) => y - k / h * v, b = {
|
|
5228
5228
|
total: "var(--select-chart-1)",
|
|
5229
5229
|
inc: "var(--select-chart-4)",
|
|
5230
5230
|
dec: "var(--select-chart-3)"
|
|
@@ -5249,17 +5249,17 @@ function ho({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
5249
5249
|
/* @__PURE__ */ e("text", { x: f.left - 8, y: p(k), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(k) })
|
|
5250
5250
|
] }, M)),
|
|
5251
5251
|
u.slice(0, -1).map((k, M) => {
|
|
5252
|
-
const w = f.left + $ * M + $ / 2 + _ / 2,
|
|
5253
|
-
return /* @__PURE__ */ e("line", { x1: w, x2:
|
|
5252
|
+
const w = f.left + $ * M + $ / 2 + _ / 2, x = f.left + $ * (M + 1) + $ / 2 - _ / 2;
|
|
5253
|
+
return /* @__PURE__ */ e("line", { x1: w, x2: x, y1: p(k.end), y2: p(k.end), className: "select-chart__crosshair" }, `c${M}`);
|
|
5254
5254
|
}),
|
|
5255
5255
|
u.map((k, M) => {
|
|
5256
|
-
const w = f.left + $ * M + $ / 2,
|
|
5256
|
+
const w = f.left + $ * M + $ / 2, x = p(Math.max(k.start, k.end)), C = Math.abs(p(k.start) - p(k.end)), L = S(k);
|
|
5257
5257
|
return /* @__PURE__ */ m("g", { children: [
|
|
5258
5258
|
/* @__PURE__ */ e(
|
|
5259
5259
|
"rect",
|
|
5260
5260
|
{
|
|
5261
5261
|
x: w - _ / 2,
|
|
5262
|
-
y,
|
|
5262
|
+
y: x,
|
|
5263
5263
|
width: _,
|
|
5264
5264
|
height: Math.max(2, C),
|
|
5265
5265
|
rx: 4,
|
|
@@ -5268,8 +5268,8 @@ function ho({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
5268
5268
|
style: { animationDelay: `${M * 40}ms` },
|
|
5269
5269
|
onMouseEnter: () => d.show({
|
|
5270
5270
|
x: w,
|
|
5271
|
-
y,
|
|
5272
|
-
place:
|
|
5271
|
+
y: x,
|
|
5272
|
+
place: x < f.top + 52 ? "bottom" : "top",
|
|
5273
5273
|
title: k.label,
|
|
5274
5274
|
rows: k.total ? [{ label: "Total", value: l(k.end), color: b.total }] : [
|
|
5275
5275
|
{ label: "Variação", value: `${k.value >= 0 ? "+" : ""}${l(k.value)}`, color: b[L] },
|
|
@@ -5333,28 +5333,28 @@ function Es(t, n, l) {
|
|
|
5333
5333
|
return;
|
|
5334
5334
|
}
|
|
5335
5335
|
const h = r.reduce((p, b) => p + t[b], 0) || 1, f = i * u, g = r.map((p) => t[p] / h * f), v = Math.min(i, u);
|
|
5336
|
-
let
|
|
5337
|
-
for (;
|
|
5338
|
-
const p = [...N, g[
|
|
5336
|
+
let y = 0, N = [];
|
|
5337
|
+
for (; y < g.length; ) {
|
|
5338
|
+
const p = [...N, g[y]];
|
|
5339
5339
|
if (N.length === 0 || s(p, v) <= s(N, v))
|
|
5340
|
-
N = p,
|
|
5340
|
+
N = p, y++;
|
|
5341
5341
|
else break;
|
|
5342
5342
|
}
|
|
5343
|
-
const $ = r.slice(0,
|
|
5343
|
+
const $ = r.slice(0, y), _ = N.reduce((p, b) => p + b, 0);
|
|
5344
5344
|
if (i >= u) {
|
|
5345
5345
|
const p = _ / u;
|
|
5346
5346
|
let b = o;
|
|
5347
5347
|
$.forEach((S, k) => {
|
|
5348
5348
|
const M = N[k] / p;
|
|
5349
5349
|
c.push({ x: d, y: b, w: p, h: M, idx: S }), b += M;
|
|
5350
|
-
}), a(r.slice(
|
|
5350
|
+
}), a(r.slice(y), d + p, o, i - p, u);
|
|
5351
5351
|
} else {
|
|
5352
5352
|
const p = _ / i;
|
|
5353
5353
|
let b = d;
|
|
5354
5354
|
$.forEach((S, k) => {
|
|
5355
5355
|
const M = N[k] / p;
|
|
5356
5356
|
c.push({ x: b, y: o, w: M, h: p, idx: S }), b += M;
|
|
5357
|
-
}), a(r.slice(
|
|
5357
|
+
}), a(r.slice(y), d, o + p, i, u - p);
|
|
5358
5358
|
}
|
|
5359
5359
|
};
|
|
5360
5360
|
return a(
|
|
@@ -5377,7 +5377,7 @@ function po({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
5377
5377
|
] }, f);
|
|
5378
5378
|
}) }),
|
|
5379
5379
|
u.map((h, f) => {
|
|
5380
|
-
const g = i[h.idx], v = t[g],
|
|
5380
|
+
const g = i[h.idx], v = t[g], y = h.w > 56 && h.h > 30;
|
|
5381
5381
|
return /* @__PURE__ */ m("g", { children: [
|
|
5382
5382
|
/* @__PURE__ */ e(
|
|
5383
5383
|
"rect",
|
|
@@ -5399,8 +5399,8 @@ function po({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
5399
5399
|
onMouseLeave: d.hide
|
|
5400
5400
|
}
|
|
5401
5401
|
),
|
|
5402
|
-
|
|
5403
|
-
|
|
5402
|
+
y && /* @__PURE__ */ e("text", { x: h.x + 12, y: h.y + 22, className: "select-treemap__label", children: v.label }),
|
|
5403
|
+
y && h.h > 46 && /* @__PURE__ */ e("text", { x: h.x + 12, y: h.y + 40, className: "select-treemap__value", children: l(v.value) })
|
|
5404
5404
|
] }, f);
|
|
5405
5405
|
})
|
|
5406
5406
|
] }),
|
|
@@ -5408,7 +5408,7 @@ function po({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
5408
5408
|
] });
|
|
5409
5409
|
}
|
|
5410
5410
|
function mo({ series: t, height: n = 240, xFormat: l = q, yFormat: c = q, xMax: s, yMax: a, maxRadius: r = 18, className: d, ...o }) {
|
|
5411
|
-
const { ref: i, width: u } = ne(n), h = X(), f = t.flatMap((M) => M.points), g =
|
|
5411
|
+
const { ref: i, width: u } = ne(n), h = 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)), N = Be, $ = Math.max(0, u - N.left - N.right), _ = n - N.top - N.bottom, p = N.top + _, b = (M) => N.left + M / g * $, S = (M) => p - M / v * _, k = (M) => M.r ? 4 + Math.sqrt(M.r) / Math.sqrt(y) * (r - 4) : 4.5;
|
|
5412
5412
|
return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${d ? " " + d : ""}`, ref: i, children: [
|
|
5413
5413
|
u > 0 && /* @__PURE__ */ m("svg", { width: u, height: n, className: "select-chart", children: [
|
|
5414
5414
|
ke(v).map((M, w) => /* @__PURE__ */ m("g", { children: [
|
|
@@ -5426,8 +5426,8 @@ function mo({ series: t, height: n = 240, xFormat: l = q, yFormat: c = q, xMax:
|
|
|
5426
5426
|
] }, `y${w}`)),
|
|
5427
5427
|
ke(g).map((M, w) => /* @__PURE__ */ e("text", { x: b(M), y: n - N.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: l(M) }, `x${w}`)),
|
|
5428
5428
|
t.map((M, w) => {
|
|
5429
|
-
const
|
|
5430
|
-
return /* @__PURE__ */ e("g", { fill:
|
|
5429
|
+
const x = M.color ?? j(w);
|
|
5430
|
+
return /* @__PURE__ */ e("g", { fill: x, children: M.points.map((C, L) => /* @__PURE__ */ e(
|
|
5431
5431
|
"circle",
|
|
5432
5432
|
{
|
|
5433
5433
|
cx: b(C.x),
|
|
@@ -5440,7 +5440,7 @@ function mo({ series: t, height: n = 240, xFormat: l = q, yFormat: c = q, xMax:
|
|
|
5440
5440
|
place: S(C.y) - k(C) < N.top + 52 ? "bottom" : "top",
|
|
5441
5441
|
title: C.label ?? M.name,
|
|
5442
5442
|
rows: [
|
|
5443
|
-
{ label: "X", value: l(C.x), color:
|
|
5443
|
+
{ label: "X", value: l(C.x), color: x },
|
|
5444
5444
|
{ label: "Y", value: c(C.y) },
|
|
5445
5445
|
...C.r != null ? [{ label: "Peso", value: String(C.r) }] : []
|
|
5446
5446
|
]
|
|
@@ -5455,7 +5455,7 @@ function mo({ series: t, height: n = 240, xFormat: l = q, yFormat: c = q, xMax:
|
|
|
5455
5455
|
] });
|
|
5456
5456
|
}
|
|
5457
5457
|
const fo = P(function({ axes: n, series: l, size: c = 240, max: s, format: a = q, levels: r = 4, legend: d = !0, className: o, ...i }, u) {
|
|
5458
|
-
const h = X(), f = ee(), g = n.length, v = c / 2,
|
|
5458
|
+
const h = X(), f = ee(), g = n.length, v = c / 2, y = c / 2, N = 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";
|
|
5459
5459
|
return /* @__PURE__ */ m("div", { ref: u, ...i, className: `select-donut-wrap${o ? " " + o : ""}`, children: [
|
|
5460
5460
|
/* @__PURE__ */ m("div", { className: "select-radar", style: { width: c, aspectRatio: "1" }, children: [
|
|
5461
5461
|
/* @__PURE__ */ m("svg", { width: c, height: c, viewBox: `0 0 ${c} ${c}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
@@ -5471,16 +5471,16 @@ const fo = P(function({ axes: n, series: l, size: c = 240, max: s, format: a = q
|
|
|
5471
5471
|
return /* @__PURE__ */ e("path", { d: b(n.map(() => M)), className: "select-chart__grid", fill: "none" }, k);
|
|
5472
5472
|
}),
|
|
5473
5473
|
n.map((S, k) => {
|
|
5474
|
-
const [M, w] = p(k, N), [
|
|
5474
|
+
const [M, w] = p(k, N), [x, C] = p(k, N + 14);
|
|
5475
5475
|
return /* @__PURE__ */ m("g", { children: [
|
|
5476
|
-
/* @__PURE__ */ e("line", { x1: v, y1:
|
|
5476
|
+
/* @__PURE__ */ e("line", { x1: v, y1: y, x2: M, y2: w, className: "select-chart__grid" }),
|
|
5477
5477
|
/* @__PURE__ */ e(
|
|
5478
5478
|
"text",
|
|
5479
5479
|
{
|
|
5480
|
-
x
|
|
5480
|
+
x,
|
|
5481
5481
|
y: C,
|
|
5482
5482
|
className: "select-chart__xlabel",
|
|
5483
|
-
textAnchor: Math.abs(
|
|
5483
|
+
textAnchor: Math.abs(x - v) < 4 ? "middle" : x > v ? "start" : "end",
|
|
5484
5484
|
dominantBaseline: "middle",
|
|
5485
5485
|
children: S
|
|
5486
5486
|
}
|
|
@@ -5488,11 +5488,11 @@ const fo = P(function({ axes: n, series: l, size: c = 240, max: s, format: a = q
|
|
|
5488
5488
|
] }, k);
|
|
5489
5489
|
}),
|
|
5490
5490
|
l.map((S, k) => {
|
|
5491
|
-
const M = S.color ?? j(k), w = S.values.map((
|
|
5491
|
+
const M = S.color ?? j(k), w = S.values.map((x) => Math.max(0, x) / $ * N);
|
|
5492
5492
|
return /* @__PURE__ */ m("g", { children: [
|
|
5493
5493
|
/* @__PURE__ */ e("path", { d: b(w), fill: `url(#${f}-rd${k})`, stroke: M, strokeWidth: 2, strokeLinejoin: "round", className: "select-chart__area" }),
|
|
5494
|
-
w.map((
|
|
5495
|
-
const [L, B] = p(C,
|
|
5494
|
+
w.map((x, C) => {
|
|
5495
|
+
const [L, B] = p(C, x);
|
|
5496
5496
|
return /* @__PURE__ */ e(
|
|
5497
5497
|
"circle",
|
|
5498
5498
|
{
|
|
@@ -5526,20 +5526,20 @@ const fo = P(function({ axes: n, series: l, size: c = 240, max: s, format: a = q
|
|
|
5526
5526
|
});
|
|
5527
5527
|
function _o({ links: t, height: n = 260, format: l = q, nodeWidth: c = 14, nodeGap: s = 14, className: a, ...r }) {
|
|
5528
5528
|
const { ref: d, width: o } = ne(n), i = X(), u = [], h = [];
|
|
5529
|
-
for (const
|
|
5530
|
-
u.includes(
|
|
5531
|
-
const f = t.reduce((
|
|
5529
|
+
for (const x of t)
|
|
5530
|
+
u.includes(x.source) || u.push(x.source), h.includes(x.target) || h.push(x.target);
|
|
5531
|
+
const f = t.reduce((x, C) => x + C.value, 0) || 1, g = (x, C) => t.filter((L) => L[C] === x).reduce((L, B) => L + B.value, 0), v = 6, y = n - v * 2, N = Math.max(u.length, h.length), $ = s * Math.max(0, N - 1), _ = (y - $) / f, p = (x, C, L) => {
|
|
5532
5532
|
const B = /* @__PURE__ */ new Map();
|
|
5533
5533
|
let A = v;
|
|
5534
|
-
return
|
|
5534
|
+
return x.forEach((E, F) => {
|
|
5535
5535
|
const T = g(E, C) * _;
|
|
5536
5536
|
B.set(E, { name: E, y: A, h: T, cursor: A, color: j(F + L) }), A += T + s;
|
|
5537
5537
|
}), B;
|
|
5538
5538
|
}, b = p(u, "source", 0), S = p(h, "target", u.length), k = c, M = o - c, w = (k + M) / 2;
|
|
5539
5539
|
return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: d, children: [
|
|
5540
5540
|
o > 0 && /* @__PURE__ */ m("svg", { width: o, height: n, className: "select-chart", children: [
|
|
5541
|
-
t.map((
|
|
5542
|
-
const L = b.get(
|
|
5541
|
+
t.map((x, C) => {
|
|
5542
|
+
const L = b.get(x.source), B = S.get(x.target), A = x.value * _, E = L.cursor, F = B.cursor;
|
|
5543
5543
|
L.cursor += A, B.cursor += A;
|
|
5544
5544
|
const T = `M${k},${E} C${w},${E} ${w},${F} ${M},${F} L${M},${F + A} C${w},${F + A} ${w},${E + A} ${k},${E + A} Z`;
|
|
5545
5545
|
return /* @__PURE__ */ e(
|
|
@@ -5552,31 +5552,31 @@ function _o({ links: t, height: n = 260, format: l = q, nodeWidth: c = 14, nodeG
|
|
|
5552
5552
|
x: w,
|
|
5553
5553
|
y: (E + F + A) / 2,
|
|
5554
5554
|
place: "top",
|
|
5555
|
-
title: `${
|
|
5556
|
-
rows: [{ label: "Fluxo", value: l(
|
|
5555
|
+
title: `${x.source} → ${x.target}`,
|
|
5556
|
+
rows: [{ label: "Fluxo", value: l(x.value), color: L.color }]
|
|
5557
5557
|
}),
|
|
5558
5558
|
onMouseLeave: i.hide
|
|
5559
5559
|
},
|
|
5560
5560
|
C
|
|
5561
5561
|
);
|
|
5562
5562
|
}),
|
|
5563
|
-
[...b.values()].map((
|
|
5564
|
-
/* @__PURE__ */ e("rect", { x: 0, y:
|
|
5565
|
-
/* @__PURE__ */ e("text", { x: c + 6, y:
|
|
5563
|
+
[...b.values()].map((x, C) => /* @__PURE__ */ m("g", { children: [
|
|
5564
|
+
/* @__PURE__ */ e("rect", { x: 0, y: x.y, width: c, height: Math.max(1, x.h), rx: 3, fill: x.color, className: "select-sankey__node" }),
|
|
5565
|
+
/* @__PURE__ */ e("text", { x: c + 6, y: x.y + x.h / 2, className: "select-sankey__label", dominantBaseline: "middle", textAnchor: "start", children: x.name })
|
|
5566
5566
|
] }, `s${C}`)),
|
|
5567
|
-
[...S.values()].map((
|
|
5568
|
-
/* @__PURE__ */ e("rect", { x: o - c, y:
|
|
5569
|
-
/* @__PURE__ */ e("text", { x: o - c - 6, y:
|
|
5567
|
+
[...S.values()].map((x, C) => /* @__PURE__ */ m("g", { children: [
|
|
5568
|
+
/* @__PURE__ */ e("rect", { x: o - c, y: x.y, width: c, height: Math.max(1, x.h), rx: 3, fill: x.color, className: "select-sankey__node" }),
|
|
5569
|
+
/* @__PURE__ */ e("text", { x: o - c - 6, y: x.y + x.h / 2, className: "select-sankey__label", dominantBaseline: "middle", textAnchor: "end", children: x.name })
|
|
5570
5570
|
] }, `t${C}`))
|
|
5571
5571
|
] }),
|
|
5572
5572
|
/* @__PURE__ */ e(K, { tip: i.tip })
|
|
5573
5573
|
] });
|
|
5574
5574
|
}
|
|
5575
5575
|
function vo({ data: t, height: n = 240, format: l = q, upColor: c = "var(--select-chart-4)", downColor: s = "var(--select-chart-3)", className: a, ...r }) {
|
|
5576
|
-
const { ref: d, width: o } = ne(n), i = X(), u = Be, h = Math.max(0, o - u.left - u.right), f = n - u.top - u.bottom, g = u.top + f, v = Math.max(1, ...t.map((w) => w.high)),
|
|
5576
|
+
const { ref: d, width: o } = ne(n), i = X(), u = Be, h = Math.max(0, o - u.left - u.right), f = n - u.top - u.bottom, g = u.top + f, v = Math.max(1, ...t.map((w) => w.high)), y = Math.min(v, ...t.map((w) => w.low)), N = (v - y) * 0.08 || 1, $ = y - N, _ = v + N, p = (w) => g - (w - $) / (_ - $) * f, b = t.length, S = b ? h / b : 0, k = Math.min(S * 0.5, 18), M = Array.from({ length: 5 }, (w, x) => $ + (_ - $) * x / 4);
|
|
5577
5577
|
return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: d, children: [
|
|
5578
5578
|
o > 0 && /* @__PURE__ */ m("svg", { width: o, height: n, className: "select-chart", children: [
|
|
5579
|
-
M.map((w,
|
|
5579
|
+
M.map((w, x) => /* @__PURE__ */ m("g", { children: [
|
|
5580
5580
|
/* @__PURE__ */ e(
|
|
5581
5581
|
"line",
|
|
5582
5582
|
{
|
|
@@ -5584,13 +5584,13 @@ function vo({ data: t, height: n = 240, format: l = q, upColor: c = "var(--selec
|
|
|
5584
5584
|
x2: o - u.right,
|
|
5585
5585
|
y1: p(w),
|
|
5586
5586
|
y2: p(w),
|
|
5587
|
-
className:
|
|
5587
|
+
className: x === 0 ? "select-chart__axis" : "select-chart__grid"
|
|
5588
5588
|
}
|
|
5589
5589
|
),
|
|
5590
5590
|
/* @__PURE__ */ e("text", { x: u.left - 8, y: p(w), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(w) })
|
|
5591
|
-
] },
|
|
5592
|
-
t.map((w,
|
|
5593
|
-
const C = u.left + S *
|
|
5591
|
+
] }, x)),
|
|
5592
|
+
t.map((w, x) => {
|
|
5593
|
+
const C = u.left + S * x + S / 2, L = w.close >= w.open, B = L ? c : s, A = p(Math.max(w.open, w.close)), E = Math.max(1, Math.abs(p(w.open) - p(w.close)));
|
|
5594
5594
|
return /* @__PURE__ */ m("g", { children: [
|
|
5595
5595
|
/* @__PURE__ */ e("line", { x1: C, x2: C, y1: p(w.high), y2: p(w.low), stroke: B, strokeWidth: 1.5 }),
|
|
5596
5596
|
/* @__PURE__ */ e("rect", { x: C - k / 2, y: A, width: k, height: E, rx: 2, fill: B, fillOpacity: L ? 0.9 : 0.78 }),
|
|
@@ -5598,7 +5598,7 @@ function vo({ data: t, height: n = 240, format: l = q, upColor: c = "var(--selec
|
|
|
5598
5598
|
/* @__PURE__ */ e(
|
|
5599
5599
|
"rect",
|
|
5600
5600
|
{
|
|
5601
|
-
x: u.left + S *
|
|
5601
|
+
x: u.left + S * x,
|
|
5602
5602
|
y: u.top,
|
|
5603
5603
|
width: S,
|
|
5604
5604
|
height: f,
|
|
@@ -5618,14 +5618,14 @@ function vo({ data: t, height: n = 240, format: l = q, upColor: c = "var(--selec
|
|
|
5618
5618
|
onMouseLeave: i.hide
|
|
5619
5619
|
}
|
|
5620
5620
|
)
|
|
5621
|
-
] },
|
|
5621
|
+
] }, x);
|
|
5622
5622
|
})
|
|
5623
5623
|
] }),
|
|
5624
5624
|
/* @__PURE__ */ e(K, { tip: i.tip })
|
|
5625
5625
|
] });
|
|
5626
5626
|
}
|
|
5627
5627
|
function go({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
5628
|
-
const { ref: a, width: r } = ne(n), d = X(), o = Be, i = Math.max(0, r - o.left - o.right), u = n - o.top - o.bottom, h = o.top + u, f =
|
|
5628
|
+
const { ref: a, width: r } = ne(n), d = X(), o = Be, i = Math.max(0, r - o.left - o.right), u = n - o.top - o.bottom, h = o.top + u, f = ye(Math.max(1, ...t.map(($) => $.max))), g = ($) => h - $ / f * u, v = t.length, y = v ? i / v : 0, N = Math.min(y * 0.5, 40);
|
|
5629
5629
|
return /* @__PURE__ */ m("div", { ...s, className: `select-chart-wrap${c ? " " + c : ""}`, ref: a, children: [
|
|
5630
5630
|
r > 0 && /* @__PURE__ */ m("svg", { width: r, height: n, className: "select-chart", children: [
|
|
5631
5631
|
ke(f).map(($, _) => /* @__PURE__ */ m("g", { children: [
|
|
@@ -5642,7 +5642,7 @@ function go({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
5642
5642
|
/* @__PURE__ */ e("text", { x: o.left - 8, y: g($), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l($) })
|
|
5643
5643
|
] }, _)),
|
|
5644
5644
|
t.map(($, _) => {
|
|
5645
|
-
const p = o.left +
|
|
5645
|
+
const p = o.left + y * _ + y / 2, b = $.color ?? j(_);
|
|
5646
5646
|
return /* @__PURE__ */ m("g", { children: [
|
|
5647
5647
|
/* @__PURE__ */ e("line", { x1: p, x2: p, y1: g($.max), y2: g($.min), stroke: b, strokeWidth: 1.5 }),
|
|
5648
5648
|
/* @__PURE__ */ e("line", { x1: p - N / 4, x2: p + N / 4, y1: g($.max), y2: g($.max), stroke: b, strokeWidth: 1.5 }),
|
|
@@ -5653,9 +5653,9 @@ function go({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
5653
5653
|
/* @__PURE__ */ e(
|
|
5654
5654
|
"rect",
|
|
5655
5655
|
{
|
|
5656
|
-
x: o.left +
|
|
5656
|
+
x: o.left + y * _,
|
|
5657
5657
|
y: o.top,
|
|
5658
|
-
width:
|
|
5658
|
+
width: y,
|
|
5659
5659
|
height: u,
|
|
5660
5660
|
fill: "transparent",
|
|
5661
5661
|
onMouseEnter: () => d.show({
|
|
@@ -5681,7 +5681,7 @@ function go({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
5681
5681
|
] });
|
|
5682
5682
|
}
|
|
5683
5683
|
function bo({ data: t, height: n, min: l, max: c, format: s = q, labelWidth: a = 96, className: r, ...d }) {
|
|
5684
|
-
const f = n ?? t.length * 36 + 6 + 26, { ref: g, width: v } = ne(f),
|
|
5684
|
+
const f = n ?? t.length * 36 + 6 + 26, { ref: g, width: v } = ne(f), y = X(), N = ee(), $ = 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), x = (L) => b + (L - $) / p * S, C = Array.from({ length: 5 }, (L, B) => $ + p * B / 4);
|
|
5685
5685
|
return /* @__PURE__ */ m("div", { ...d, className: `select-chart-wrap${r ? " " + r : ""}`, ref: g, children: [
|
|
5686
5686
|
v > 0 && /* @__PURE__ */ m("svg", { width: v, height: f, className: "select-chart", children: [
|
|
5687
5687
|
/* @__PURE__ */ e("defs", { children: t.map((L, B) => {
|
|
@@ -5695,17 +5695,17 @@ function bo({ data: t, height: n, min: l, max: c, format: s = q, labelWidth: a =
|
|
|
5695
5695
|
/* @__PURE__ */ e(
|
|
5696
5696
|
"line",
|
|
5697
5697
|
{
|
|
5698
|
-
x1:
|
|
5699
|
-
x2:
|
|
5698
|
+
x1: x(L),
|
|
5699
|
+
x2: x(L),
|
|
5700
5700
|
y1: 6,
|
|
5701
5701
|
y2: 6 + k,
|
|
5702
5702
|
className: B === 0 ? "select-chart__axis" : "select-chart__grid"
|
|
5703
5703
|
}
|
|
5704
5704
|
),
|
|
5705
|
-
/* @__PURE__ */ e("text", { x:
|
|
5705
|
+
/* @__PURE__ */ e("text", { x: x(L), y: f - 26 + 16, className: "select-chart__xlabel", textAnchor: "middle", children: s(L) })
|
|
5706
5706
|
] }, B)),
|
|
5707
5707
|
t.map((L, B) => {
|
|
5708
|
-
const A = 6 + M * B + M / 2, E =
|
|
5708
|
+
const A = 6 + M * B + M / 2, E = x(L.start), F = Math.max(2, x(L.end) - x(L.start)), T = L.color ?? j(B);
|
|
5709
5709
|
return /* @__PURE__ */ m("g", { children: [
|
|
5710
5710
|
/* @__PURE__ */ e(
|
|
5711
5711
|
"rect",
|
|
@@ -5718,41 +5718,41 @@ function bo({ data: t, height: n, min: l, max: c, format: s = q, labelWidth: a =
|
|
|
5718
5718
|
fill: `url(#${N}-rg${B})`,
|
|
5719
5719
|
className: "select-chart__hbar",
|
|
5720
5720
|
style: { animationDelay: `${B * 40}ms` },
|
|
5721
|
-
onMouseEnter: () =>
|
|
5721
|
+
onMouseEnter: () => y.show({
|
|
5722
5722
|
x: E + F / 2,
|
|
5723
5723
|
y: A - w / 2,
|
|
5724
5724
|
place: A - w / 2 < 50 ? "bottom" : "top",
|
|
5725
5725
|
title: L.label,
|
|
5726
5726
|
rows: [{ label: "Intervalo", value: `${s(L.start)} – ${s(L.end)}`, color: T }]
|
|
5727
5727
|
}),
|
|
5728
|
-
onMouseLeave:
|
|
5728
|
+
onMouseLeave: y.hide
|
|
5729
5729
|
}
|
|
5730
5730
|
),
|
|
5731
5731
|
/* @__PURE__ */ e("text", { x: b - 8, y: A, className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: L.label })
|
|
5732
5732
|
] }, B);
|
|
5733
5733
|
})
|
|
5734
5734
|
] }),
|
|
5735
|
-
/* @__PURE__ */ e(K, { tip:
|
|
5735
|
+
/* @__PURE__ */ e(K, { tip: y.tip })
|
|
5736
5736
|
] });
|
|
5737
5737
|
}
|
|
5738
|
-
const
|
|
5738
|
+
const yo = P(function({ weeks: n, color: l = "var(--select-chart-4)", dayLabels: c = ["Seg", "", "Qua", "", "Sex", "", "Dom"], columnLabels: s, format: a = q, cell: r = 14, gap: d = 3, min: o, max: i, className: u, ...h }, f) {
|
|
5739
5739
|
const g = X();
|
|
5740
5740
|
ee();
|
|
5741
|
-
const v = n.flat().filter((w) => w != null && Number.isFinite(w)),
|
|
5741
|
+
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 };
|
|
5742
5742
|
return /* @__PURE__ */ m("div", { ref: f, ...h, className: `select-chart-wrap select-calheat${u ? " " + u : ""}`, style: M, children: [
|
|
5743
5743
|
/* @__PURE__ */ m("svg", { width: S, height: k, className: "select-chart", children: [
|
|
5744
5744
|
c.map(
|
|
5745
|
-
(w,
|
|
5745
|
+
(w, x) => w ? /* @__PURE__ */ e("text", { x: _ - 6, y: p + x * b + r / 2, className: "select-chart__xlabel", dominantBaseline: "middle", textAnchor: "end", children: w }, x) : null
|
|
5746
5746
|
),
|
|
5747
5747
|
s == null ? void 0 : s.map(
|
|
5748
|
-
(w,
|
|
5748
|
+
(w, x) => w ? /* @__PURE__ */ e("text", { x: _ + x * b, y: p - 4, className: "select-chart__xlabel", textAnchor: "start", children: w }, x) : null
|
|
5749
5749
|
),
|
|
5750
5750
|
n.map(
|
|
5751
|
-
(w,
|
|
5752
|
-
const B = _ +
|
|
5751
|
+
(w, x) => w.map((C, L) => {
|
|
5752
|
+
const B = _ + x * b, A = p + L * b;
|
|
5753
5753
|
if (C == null || !Number.isFinite(C))
|
|
5754
|
-
return /* @__PURE__ */ e("rect", { x: B, y: A, width: r, height: r, rx: 3, className: "select-chart__calcell select-chart__calcell--empty" }, `${
|
|
5755
|
-
const E = Math.max(0, Math.min(1, (C -
|
|
5754
|
+
return /* @__PURE__ */ e("rect", { x: B, y: A, width: r, height: r, rx: 3, className: "select-chart__calcell select-chart__calcell--empty" }, `${x}-${L}`);
|
|
5755
|
+
const E = Math.max(0, Math.min(1, (C - y) / $)), F = Math.round((0.14 + E * 0.86) * 100);
|
|
5756
5756
|
return /* @__PURE__ */ e(
|
|
5757
5757
|
"rect",
|
|
5758
5758
|
{
|
|
@@ -5767,26 +5767,26 @@ const xo = P(function({ weeks: n, color: l = "var(--select-chart-4)", dayLabels:
|
|
|
5767
5767
|
x: B + r / 2,
|
|
5768
5768
|
y: A,
|
|
5769
5769
|
place: A < 44 ? "bottom" : "top",
|
|
5770
|
-
title: `${c[L] || `Dia ${L + 1}`}${s != null && s[
|
|
5770
|
+
title: `${c[L] || `Dia ${L + 1}`}${s != null && s[x] ? ` · ${s[x]}` : ` · sem ${x + 1}`}`,
|
|
5771
5771
|
rows: [{ label: "Valor", value: a(C), color: l }]
|
|
5772
5772
|
}),
|
|
5773
5773
|
onMouseLeave: g.hide
|
|
5774
5774
|
},
|
|
5775
|
-
`${
|
|
5775
|
+
`${x}-${L}`
|
|
5776
5776
|
);
|
|
5777
5777
|
})
|
|
5778
5778
|
)
|
|
5779
5779
|
] }),
|
|
5780
5780
|
/* @__PURE__ */ e(K, { tip: g.tip })
|
|
5781
5781
|
] });
|
|
5782
|
-
}),
|
|
5783
|
-
const i = X(), u = l / 2, h = l / 2, f = l / 2 - 2, g = n.length || 1, v =
|
|
5782
|
+
}), xo = P(function({ segments: n, size: l = 200, format: c = q, legend: s = !0, rose: a = !1, className: r, ...d }, o) {
|
|
5783
|
+
const i = X(), u = l / 2, h = l / 2, f = l / 2 - 2, g = n.length || 1, v = ye(Math.max(1, ...n.map(($) => $.value))), y = ($) => a ? Math.max(0, $) / v * f : Math.sqrt(Math.max(0, $) / v) * f, N = 360 / g;
|
|
5784
5784
|
return /* @__PURE__ */ m("div", { ref: o, ...d, className: `select-donut-wrap${r ? " " + r : ""}`, children: [
|
|
5785
5785
|
/* @__PURE__ */ m("div", { className: "select-radial", style: { width: l, aspectRatio: "1" }, children: [
|
|
5786
5786
|
/* @__PURE__ */ m("svg", { width: l, height: l, viewBox: `0 0 ${l} ${l}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
5787
5787
|
[0.34, 0.67, 1].map(($, _) => /* @__PURE__ */ e("circle", { cx: u, cy: h, r: f * $, className: "select-chart__grid", fill: "none" }, _)),
|
|
5788
5788
|
n.map(($, _) => {
|
|
5789
|
-
const p = _ * N, b = (_ + 1) * N - 1.5, S = $.color ?? j(_), k = Math.max(2,
|
|
5789
|
+
const p = _ * N, b = (_ + 1) * N - 1.5, S = $.color ?? j(_), k = Math.max(2, y($.value)), M = ((p + b) / 2 - 90) * (Math.PI / 180), w = u + k * Math.cos(M), x = h + k * Math.sin(M);
|
|
5790
5790
|
return /* @__PURE__ */ e(
|
|
5791
5791
|
"path",
|
|
5792
5792
|
{
|
|
@@ -5794,7 +5794,7 @@ const xo = P(function({ weeks: n, color: l = "var(--select-chart-4)", dayLabels:
|
|
|
5794
5794
|
fill: S,
|
|
5795
5795
|
fillOpacity: 0.8,
|
|
5796
5796
|
className: "select-chart__seg",
|
|
5797
|
-
onMouseEnter: () => i.show({ x: w, y, place:
|
|
5797
|
+
onMouseEnter: () => i.show({ x: w, y: x, place: x < h ? "top" : "bottom", title: $.label, rows: [{ label: "Valor", value: c($.value), color: S }] }),
|
|
5798
5798
|
onMouseLeave: i.hide
|
|
5799
5799
|
},
|
|
5800
5800
|
_
|
|
@@ -5811,19 +5811,19 @@ const xo = P(function({ weeks: n, color: l = "var(--select-chart-4)", dayLabels:
|
|
|
5811
5811
|
] });
|
|
5812
5812
|
});
|
|
5813
5813
|
function No({ data: t, leftLabel: n, rightLabel: l, height: c = 240, format: s = q, className: a, ...r }) {
|
|
5814
|
-
const { ref: d, width: o } = ne(c), i = X(), u = { top: 24, right: 64, bottom: 12, left: 132 }, h =
|
|
5814
|
+
const { ref: d, width: o } = ne(c), i = X(), u = { top: 24, right: 64, bottom: 12, left: 132 }, h = ye(Math.max(1, ...t.flatMap((N) => [N.left, N.right]))), f = c - u.top - u.bottom, g = (N) => u.top + f - N / h * f, v = u.left, y = o - u.right;
|
|
5815
5815
|
return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: d, children: [
|
|
5816
5816
|
o > 0 && /* @__PURE__ */ m("svg", { width: o, height: c, className: "select-chart", children: [
|
|
5817
5817
|
/* @__PURE__ */ e("line", { x1: v, x2: v, y1: u.top, y2: u.top + f, className: "select-chart__axis" }),
|
|
5818
|
-
/* @__PURE__ */ e("line", { x1:
|
|
5818
|
+
/* @__PURE__ */ e("line", { x1: y, x2: y, y1: u.top, y2: u.top + f, className: "select-chart__axis" }),
|
|
5819
5819
|
n && /* @__PURE__ */ e("text", { x: v, y: u.top - 10, className: "select-chart__xlabel", textAnchor: "middle", children: n }),
|
|
5820
|
-
l && /* @__PURE__ */ e("text", { x, y: u.top - 10, className: "select-chart__xlabel", textAnchor: "middle", children: l }),
|
|
5820
|
+
l && /* @__PURE__ */ e("text", { x: y, y: u.top - 10, className: "select-chart__xlabel", textAnchor: "middle", children: l }),
|
|
5821
5821
|
t.map((N, $) => {
|
|
5822
5822
|
const _ = N.color ?? j($), p = g(N.left), b = g(N.right);
|
|
5823
5823
|
return /* @__PURE__ */ m("g", { children: [
|
|
5824
|
-
/* @__PURE__ */ e("line", { x1: v, y1: p, x2:
|
|
5824
|
+
/* @__PURE__ */ e("line", { x1: v, y1: p, x2: y, y2: b, stroke: _, strokeWidth: 2, strokeLinecap: "round", className: "select-chart__line", pathLength: 1 }),
|
|
5825
5825
|
/* @__PURE__ */ e("circle", { cx: v, cy: p, r: 3.5, fill: _, className: "select-chart__dot" }),
|
|
5826
|
-
/* @__PURE__ */ e("circle", { cx:
|
|
5826
|
+
/* @__PURE__ */ e("circle", { cx: y, cy: b, r: 3.5, fill: _, className: "select-chart__dot" }),
|
|
5827
5827
|
/* @__PURE__ */ m("text", { x: v - 10, y: p, className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: [
|
|
5828
5828
|
N.label,
|
|
5829
5829
|
" · ",
|
|
@@ -5835,11 +5835,11 @@ function No({ data: t, leftLabel: n, rightLabel: l, height: c = 240, format: s =
|
|
|
5835
5835
|
{
|
|
5836
5836
|
x: v,
|
|
5837
5837
|
y: Math.min(p, b) - 6,
|
|
5838
|
-
width: Math.max(0,
|
|
5838
|
+
width: Math.max(0, y - v),
|
|
5839
5839
|
height: Math.abs(b - p) + 12,
|
|
5840
5840
|
fill: "transparent",
|
|
5841
5841
|
onMouseEnter: () => i.show({
|
|
5842
|
-
x: (v +
|
|
5842
|
+
x: (v + y) / 2,
|
|
5843
5843
|
y: (p + b) / 2,
|
|
5844
5844
|
place: "top",
|
|
5845
5845
|
title: N.label,
|
|
@@ -5858,10 +5858,10 @@ function No({ data: t, leftLabel: n, rightLabel: l, height: c = 240, format: s =
|
|
|
5858
5858
|
] });
|
|
5859
5859
|
}
|
|
5860
5860
|
function Mo({ data: t, height: n, format: l = q, fromLabel: c = "Antes", toLabel: s = "Depois", labelWidth: a = 96, className: r, ...d }) {
|
|
5861
|
-
const f = n ?? t.length * 34 + 6 + 26, { ref: g, width: v } = ne(f),
|
|
5861
|
+
const f = n ?? t.length * 34 + 6 + 26, { ref: g, width: v } = ne(f), y = X(), N = "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;
|
|
5862
5862
|
return /* @__PURE__ */ m("div", { ...d, className: `select-chart-wrap${r ? " " + r : ""}`, ref: g, children: [
|
|
5863
5863
|
v > 0 && /* @__PURE__ */ m("svg", { width: v, height: f, className: "select-chart", children: [
|
|
5864
|
-
ke(_).map((w,
|
|
5864
|
+
ke(_).map((w, x) => /* @__PURE__ */ m("g", { children: [
|
|
5865
5865
|
/* @__PURE__ */ e(
|
|
5866
5866
|
"line",
|
|
5867
5867
|
{
|
|
@@ -5869,13 +5869,13 @@ function Mo({ data: t, height: n, format: l = q, fromLabel: c = "Antes", toLabel
|
|
|
5869
5869
|
x2: M(w),
|
|
5870
5870
|
y1: 6,
|
|
5871
5871
|
y2: 6 + S,
|
|
5872
|
-
className:
|
|
5872
|
+
className: x === 0 ? "select-chart__axis" : "select-chart__grid"
|
|
5873
5873
|
}
|
|
5874
5874
|
),
|
|
5875
5875
|
/* @__PURE__ */ e("text", { x: M(w), y: f - 26 + 16, className: "select-chart__xlabel", textAnchor: "middle", children: l(w) })
|
|
5876
|
-
] },
|
|
5877
|
-
t.map((w,
|
|
5878
|
-
const C = 6 + k *
|
|
5876
|
+
] }, x)),
|
|
5877
|
+
t.map((w, x) => {
|
|
5878
|
+
const C = 6 + k * x + k / 2;
|
|
5879
5879
|
return /* @__PURE__ */ m("g", { children: [
|
|
5880
5880
|
/* @__PURE__ */ e("line", { x1: M(w.from), x2: M(w.to), y1: C, y2: C, stroke: "var(--select-chart-track)", strokeWidth: 4, strokeLinecap: "round" }),
|
|
5881
5881
|
/* @__PURE__ */ e("circle", { cx: M(w.from), cy: C, r: 5, fill: N, className: "select-chart__dot" }),
|
|
@@ -5889,7 +5889,7 @@ function Mo({ data: t, height: n, format: l = q, fromLabel: c = "Antes", toLabel
|
|
|
5889
5889
|
width: b,
|
|
5890
5890
|
height: k,
|
|
5891
5891
|
fill: "transparent",
|
|
5892
|
-
onMouseEnter: () =>
|
|
5892
|
+
onMouseEnter: () => y.show({
|
|
5893
5893
|
x: (M(w.from) + M(w.to)) / 2,
|
|
5894
5894
|
y: C - 8,
|
|
5895
5895
|
place: C - 8 < 50 ? "bottom" : "top",
|
|
@@ -5900,13 +5900,13 @@ function Mo({ data: t, height: n, format: l = q, fromLabel: c = "Antes", toLabel
|
|
|
5900
5900
|
{ label: "Δ", value: `${w.to - w.from >= 0 ? "+" : ""}${l(w.to - w.from)}` }
|
|
5901
5901
|
]
|
|
5902
5902
|
}),
|
|
5903
|
-
onMouseLeave:
|
|
5903
|
+
onMouseLeave: y.hide
|
|
5904
5904
|
}
|
|
5905
5905
|
)
|
|
5906
|
-
] },
|
|
5906
|
+
] }, x);
|
|
5907
5907
|
})
|
|
5908
5908
|
] }),
|
|
5909
|
-
/* @__PURE__ */ e(K, { tip:
|
|
5909
|
+
/* @__PURE__ */ e(K, { tip: y.tip })
|
|
5910
5910
|
] });
|
|
5911
5911
|
}
|
|
5912
5912
|
function $o({ columns: t, height: n = 240, format: l = q, gap: c = 3, className: s, ...a }) {
|
|
@@ -5914,7 +5914,7 @@ function $o({ columns: t, height: n = 240, format: l = q, gap: c = 3, className:
|
|
|
5914
5914
|
t.forEach((p) => p.segments.forEach((b) => {
|
|
5915
5915
|
v.includes(b.key) || v.push(b.key);
|
|
5916
5916
|
}));
|
|
5917
|
-
const
|
|
5917
|
+
const y = (p, b) => b ?? j(v.indexOf(p)), N = c * Math.max(0, t.length - 1), $ = Math.max(0, u - N);
|
|
5918
5918
|
let _ = i.left;
|
|
5919
5919
|
return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
|
|
5920
5920
|
d > 0 && /* @__PURE__ */ e("svg", { width: d, height: n, className: "select-chart", children: t.map((p, b) => {
|
|
@@ -5922,10 +5922,10 @@ function $o({ columns: t, height: n = 240, format: l = q, gap: c = 3, className:
|
|
|
5922
5922
|
_ += k + c;
|
|
5923
5923
|
let w = i.top;
|
|
5924
5924
|
return /* @__PURE__ */ m("g", { children: [
|
|
5925
|
-
p.segments.map((
|
|
5926
|
-
const L =
|
|
5925
|
+
p.segments.map((x, C) => {
|
|
5926
|
+
const L = x.value / S * h, B = w;
|
|
5927
5927
|
w += L;
|
|
5928
|
-
const A = x
|
|
5928
|
+
const A = y(x.key, x.color);
|
|
5929
5929
|
return /* @__PURE__ */ e(
|
|
5930
5930
|
"rect",
|
|
5931
5931
|
{
|
|
@@ -5940,10 +5940,10 @@ function $o({ columns: t, height: n = 240, format: l = q, gap: c = 3, className:
|
|
|
5940
5940
|
x: M + k / 2,
|
|
5941
5941
|
y: B,
|
|
5942
5942
|
place: B < i.top + 44 ? "bottom" : "top",
|
|
5943
|
-
title: `${p.label} · ${
|
|
5943
|
+
title: `${p.label} · ${x.key}`,
|
|
5944
5944
|
rows: [
|
|
5945
|
-
{ label: "Valor", value: l(
|
|
5946
|
-
{ label: "Share", value: `${Math.round(
|
|
5945
|
+
{ label: "Valor", value: l(x.value), color: A },
|
|
5946
|
+
{ label: "Share", value: `${Math.round(x.value / S * 100)}%` }
|
|
5947
5947
|
]
|
|
5948
5948
|
}),
|
|
5949
5949
|
onMouseLeave: o.hide
|
|
@@ -5962,9 +5962,9 @@ function $o({ columns: t, height: n = 240, format: l = q, gap: c = 3, className:
|
|
|
5962
5962
|
] });
|
|
5963
5963
|
}
|
|
5964
5964
|
const ko = P(function({ value: n, max: l = 100, bands: c, size: s = 220, thickness: a, label: r, format: d = (h) => `${Math.round(h)}`, className: o, ...i }, u) {
|
|
5965
|
-
const h = a ?? Math.max(10, Math.round(s * 0.08)), f = h / 2 + 2, g = s / 2 - f, v = s / 2,
|
|
5965
|
+
const h = a ?? Math.max(10, Math.round(s * 0.08)), f = h / 2 + 2, g = s / 2 - f, v = s / 2, y = s / 2, N = y + f, $ = (L) => Math.max(0, Math.min(l, L)), _ = (L) => {
|
|
5966
5966
|
const B = Math.PI + L * Math.PI;
|
|
5967
|
-
return [v + g * Math.cos(B),
|
|
5967
|
+
return [v + g * Math.cos(B), y + g * Math.sin(B)];
|
|
5968
5968
|
}, p = (L, B) => {
|
|
5969
5969
|
const [A, E] = _(L), [F, T] = _(B);
|
|
5970
5970
|
return `M ${A.toFixed(2)} ${E.toFixed(2)} A ${g} ${g} 0 0 1 ${F.toFixed(2)} ${T.toFixed(2)}`;
|
|
@@ -5973,12 +5973,12 @@ const ko = P(function({ value: n, max: l = 100, bands: c, size: s = 220, thickne
|
|
|
5973
5973
|
const S = c.map((L) => {
|
|
5974
5974
|
const B = $(b) / l, A = $(L.upTo) / l;
|
|
5975
5975
|
return b = L.upTo, { t0: B, t1: A, color: L.color };
|
|
5976
|
-
}), k = $(n) / l, M = Math.PI + k * Math.PI, w = g * 0.82,
|
|
5976
|
+
}), k = $(n) / l, M = Math.PI + k * Math.PI, w = g * 0.82, x = v + w * Math.cos(M), C = y + w * Math.sin(M);
|
|
5977
5977
|
return /* @__PURE__ */ e("div", { ref: u, ...i, className: `select-gauge${o ? " " + o : ""}`, style: { width: `${s / 16}rem` }, children: /* @__PURE__ */ m("div", { className: "select-gauge__ring", style: { width: "100%", aspectRatio: `${s} / ${N}` }, children: [
|
|
5978
5978
|
/* @__PURE__ */ m("svg", { width: "100%", height: "100%", viewBox: `0 0 ${s} ${N}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
5979
5979
|
S.map((L, B) => /* @__PURE__ */ e("path", { d: p(L.t0, L.t1), fill: "none", stroke: L.color, strokeWidth: h, strokeLinecap: "butt" }, B)),
|
|
5980
|
-
/* @__PURE__ */ e("line", { x1: v, y1:
|
|
5981
|
-
/* @__PURE__ */ e("circle", { cx: v, cy:
|
|
5980
|
+
/* @__PURE__ */ e("line", { x1: v, y1: y, x2: x, y2: C, stroke: "var(--select-text)", strokeWidth: 3, strokeLinecap: "round", className: "select-gaugeband__needle" }),
|
|
5981
|
+
/* @__PURE__ */ e("circle", { cx: v, cy: y, r: 5, fill: "var(--select-text)" })
|
|
5982
5982
|
] }),
|
|
5983
5983
|
/* @__PURE__ */ m("div", { className: "select-gauge__center", children: [
|
|
5984
5984
|
/* @__PURE__ */ e("span", { className: "select-gauge__value", children: d($(n)) }),
|
|
@@ -5987,12 +5987,12 @@ const ko = P(function({ value: n, max: l = 100, bands: c, size: s = 220, thickne
|
|
|
5987
5987
|
] }) });
|
|
5988
5988
|
});
|
|
5989
5989
|
function wo({ series: t, labels: n, height: l = 240, format: c = q, className: s, ...a }) {
|
|
5990
|
-
const { ref: r, width: d } = ne(l), o = X(), i = ee(), [u, h] = D(null), f = n.length, g = { top: 14, right: 14, bottom: 28, left: 14 }, v = Math.max(0, d - g.left - g.right),
|
|
5991
|
-
const w = [],
|
|
5990
|
+
const { ref: r, width: d } = ne(l), o = X(), i = ee(), [u, h] = 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, N = n.map((k, M) => t.reduce((w, x) => w + (x.data[M] ?? 0), 0)), $ = Math.max(1, ...N), _ = y / $, p = (k) => g.left + (f <= 1 ? v / 2 : k / (f - 1) * v), b = n.map(() => 0), S = t.map((k, M) => {
|
|
5991
|
+
const w = [], x = [];
|
|
5992
5992
|
return n.forEach((C, L) => {
|
|
5993
|
-
const A = g.top + (
|
|
5994
|
-
w.push([p(L), A]),
|
|
5995
|
-
}), { upper: w, lower:
|
|
5993
|
+
const A = g.top + (y - N[L] * _) / 2 + b[L] * _, E = A + (k.data[L] ?? 0) * _;
|
|
5994
|
+
w.push([p(L), A]), x.push([p(L), E]), b[L] = b[L] + (k.data[L] ?? 0);
|
|
5995
|
+
}), { upper: w, lower: x, color: k.color ?? j(M), name: k.name };
|
|
5996
5996
|
});
|
|
5997
5997
|
return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
|
|
5998
5998
|
d > 0 && /* @__PURE__ */ m("svg", { width: d, height: l, className: "select-chart", children: [
|
|
@@ -6000,8 +6000,8 @@ function wo({ series: t, labels: n, height: l = 240, format: c = q, className: s
|
|
|
6000
6000
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: k.color, stopOpacity: 0.95 }),
|
|
6001
6001
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: k.color, stopOpacity: 0.6 })
|
|
6002
6002
|
] }, M)) }),
|
|
6003
|
-
S.map((k, M) => /* @__PURE__ */ e("path", { d:
|
|
6004
|
-
u != null && /* @__PURE__ */ e("line", { x1: p(u), x2: p(u), y1: g.top, y2: g.top +
|
|
6003
|
+
S.map((k, M) => /* @__PURE__ */ e("path", { d: yl(k.upper, k.lower), fill: `url(#${i}-st${M})`, className: "select-chart__area" }, M)),
|
|
6004
|
+
u != null && /* @__PURE__ */ e("line", { x1: p(u), x2: p(u), y1: g.top, y2: g.top + y, className: "select-chart__crosshair" }),
|
|
6005
6005
|
n.map(
|
|
6006
6006
|
(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
|
|
6007
6007
|
),
|
|
@@ -6011,15 +6011,15 @@ function wo({ series: t, labels: n, height: l = 240, format: c = q, className: s
|
|
|
6011
6011
|
x: p(M) - v / Math.max(1, f) / 2,
|
|
6012
6012
|
y: g.top,
|
|
6013
6013
|
width: v / Math.max(1, f),
|
|
6014
|
-
height:
|
|
6014
|
+
height: y,
|
|
6015
6015
|
fill: "transparent",
|
|
6016
6016
|
onMouseEnter: () => {
|
|
6017
6017
|
h(M), o.show({
|
|
6018
6018
|
x: p(M),
|
|
6019
|
-
y: g.top +
|
|
6019
|
+
y: g.top + y / 2,
|
|
6020
6020
|
place: "top",
|
|
6021
6021
|
title: k,
|
|
6022
|
-
rows: t.map((w,
|
|
6022
|
+
rows: t.map((w, x) => ({ label: w.name, value: c(w.data[M] ?? 0), color: w.color ?? j(x) }))
|
|
6023
6023
|
});
|
|
6024
6024
|
},
|
|
6025
6025
|
onMouseLeave: () => {
|
|
@@ -6036,14 +6036,14 @@ const So = P(function({ data: n, size: l = 220, format: c = q, legend: s = !0, c
|
|
|
6036
6036
|
const o = X(), i = l / 2, u = l / 2, h = l / 2 - 2, f = h * 0.62, g = h * 0.32, v = n.map(($) => {
|
|
6037
6037
|
var _;
|
|
6038
6038
|
return (_ = $.children) != null && _.length ? $.children.reduce((p, b) => p + b.value, 0) : $.value ?? 0;
|
|
6039
|
-
}),
|
|
6039
|
+
}), y = v.reduce(($, _) => $ + _, 0) || 1;
|
|
6040
6040
|
let N = 0;
|
|
6041
6041
|
return /* @__PURE__ */ m("div", { ref: d, ...r, className: `select-donut-wrap${a ? " " + a : ""}`, children: [
|
|
6042
6042
|
/* @__PURE__ */ m("div", { className: "select-radial", style: { width: l, aspectRatio: "1" }, children: [
|
|
6043
6043
|
/* @__PURE__ */ e("svg", { width: l, height: l, viewBox: `0 0 ${l} ${l}`, className: "select-chart select-donut", "aria-hidden": "true", children: n.map(($, _) => {
|
|
6044
|
-
const p = v[_], b = N /
|
|
6044
|
+
const p = v[_], b = N / y * 360;
|
|
6045
6045
|
N += p;
|
|
6046
|
-
const S = N /
|
|
6046
|
+
const S = N / y * 360, k = $.color ?? j(_);
|
|
6047
6047
|
let M = b;
|
|
6048
6048
|
return /* @__PURE__ */ m("g", { children: [
|
|
6049
6049
|
/* @__PURE__ */ e(
|
|
@@ -6056,10 +6056,10 @@ const So = P(function({ data: n, size: l = 220, format: c = q, legend: s = !0, c
|
|
|
6056
6056
|
onMouseLeave: o.hide
|
|
6057
6057
|
}
|
|
6058
6058
|
),
|
|
6059
|
-
($.children ?? []).map((w,
|
|
6059
|
+
($.children ?? []).map((w, x) => {
|
|
6060
6060
|
const C = M;
|
|
6061
|
-
M += w.value /
|
|
6062
|
-
const L = M, B = w.color ?? k, A = 0.45 +
|
|
6061
|
+
M += w.value / y * 360;
|
|
6062
|
+
const L = M, B = w.color ?? k, A = 0.45 + x % 3 * 0.2, E = ((C + L) / 2 - 90) * (Math.PI / 180);
|
|
6063
6063
|
return /* @__PURE__ */ e(
|
|
6064
6064
|
"path",
|
|
6065
6065
|
{
|
|
@@ -6079,7 +6079,7 @@ const So = P(function({ data: n, size: l = 220, format: c = q, legend: s = !0, c
|
|
|
6079
6079
|
}),
|
|
6080
6080
|
onMouseLeave: o.hide
|
|
6081
6081
|
},
|
|
6082
|
-
|
|
6082
|
+
x
|
|
6083
6083
|
);
|
|
6084
6084
|
})
|
|
6085
6085
|
] }, _);
|
|
@@ -6094,7 +6094,7 @@ const So = P(function({ data: n, size: l = 220, format: c = q, legend: s = !0, c
|
|
|
6094
6094
|
] });
|
|
6095
6095
|
});
|
|
6096
6096
|
function Co({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
6097
|
-
const { ref: a, width: r } = ne(n), d = X(), o = Be, i = Math.max(0, r - o.left - o.right), u = n - o.top - o.bottom, h = o.top + u, f =
|
|
6097
|
+
const { ref: a, width: r } = ne(n), d = X(), o = Be, i = Math.max(0, r - o.left - o.right), u = n - o.top - o.bottom, h = o.top + u, f = ye(Math.max(1, ...t.map((_) => _.max))), g = (_) => h - _ / f * u, v = t.length, y = v ? i / v : 0, N = Math.min(y * 0.42, 46), $ = Math.max(1, ...t.flatMap((_) => _.bins));
|
|
6098
6098
|
return /* @__PURE__ */ m("div", { ...s, className: `select-chart-wrap${c ? " " + c : ""}`, ref: a, children: [
|
|
6099
6099
|
r > 0 && /* @__PURE__ */ m("svg", { width: r, height: n, className: "select-chart", children: [
|
|
6100
6100
|
ke(f).map((_, p) => /* @__PURE__ */ m("g", { children: [
|
|
@@ -6111,10 +6111,10 @@ function Co({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
6111
6111
|
/* @__PURE__ */ e("text", { x: o.left - 8, y: g(_), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(_) })
|
|
6112
6112
|
] }, p)),
|
|
6113
6113
|
t.map((_, p) => {
|
|
6114
|
-
const b = o.left +
|
|
6115
|
-
for (let A = k - 1; A >= 0; A--)
|
|
6114
|
+
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] / $ * N, x = [], C = [];
|
|
6115
|
+
for (let A = k - 1; A >= 0; A--) x.push([b + w(A), M(A)]);
|
|
6116
6116
|
for (let A = 0; A < k; A++) C.push([b - w(A), M(A)]);
|
|
6117
|
-
const L = `${Sn(
|
|
6117
|
+
const L = `${Sn(x)} ${Sn(C).replace(/^M/, "L")} Z`, B = _.median != null ? g(_.median) : null;
|
|
6118
6118
|
return /* @__PURE__ */ m("g", { children: [
|
|
6119
6119
|
/* @__PURE__ */ e("path", { d: L, fill: S, fillOpacity: 0.32, stroke: S, strokeWidth: 1.5, strokeLinejoin: "round" }),
|
|
6120
6120
|
B != null && /* @__PURE__ */ e("line", { x1: b - N * 0.6, x2: b + N * 0.6, y1: B, y2: B, stroke: S, strokeWidth: 2 }),
|
|
@@ -6122,9 +6122,9 @@ function Co({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
6122
6122
|
/* @__PURE__ */ e(
|
|
6123
6123
|
"rect",
|
|
6124
6124
|
{
|
|
6125
|
-
x: b -
|
|
6125
|
+
x: b - y / 2,
|
|
6126
6126
|
y: o.top,
|
|
6127
|
-
width:
|
|
6127
|
+
width: y,
|
|
6128
6128
|
height: u,
|
|
6129
6129
|
fill: "transparent",
|
|
6130
6130
|
onMouseEnter: () => d.show({
|
|
@@ -6148,53 +6148,53 @@ function Co({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
6148
6148
|
] });
|
|
6149
6149
|
}
|
|
6150
6150
|
const Lo = P(function({ matrix: n, labels: l, size: c = 240, format: s = q, padAngle: a = 0.05, className: r, ...d }, o) {
|
|
6151
|
-
const i = X(), u = l.length, h = c / 2, f = c / 2, g = c / 2 - 22, v = g - 9,
|
|
6151
|
+
const i = X(), u = l.length, h = c / 2, f = c / 2, g = c / 2 - 22, v = g - 9, y = n.map((x) => x.reduce((C, L) => C + L, 0)), N = y.reduce((x, C) => x + C, 0) || 1, $ = (2 * Math.PI - u * a) / N, _ = [];
|
|
6152
6152
|
let p = 0;
|
|
6153
|
-
for (let
|
|
6154
|
-
const C = p, L = p + x
|
|
6153
|
+
for (let x = 0; x < u; x++) {
|
|
6154
|
+
const C = p, L = p + y[x] * $;
|
|
6155
6155
|
_.push({ a0: C, a1: L }), p = L + a;
|
|
6156
6156
|
}
|
|
6157
6157
|
const b = n.map(() => []);
|
|
6158
|
-
for (let
|
|
6159
|
-
let C = _[
|
|
6158
|
+
for (let x = 0; x < u; x++) {
|
|
6159
|
+
let C = _[x].a0;
|
|
6160
6160
|
for (let L = 0; L < u; L++) {
|
|
6161
|
-
const B = n[
|
|
6162
|
-
b[
|
|
6161
|
+
const B = n[x][L] * $;
|
|
6162
|
+
b[x][L] = [C, C + B], C += B;
|
|
6163
6163
|
}
|
|
6164
6164
|
}
|
|
6165
|
-
const S = (
|
|
6166
|
-
const [A, E] = S(
|
|
6165
|
+
const S = (x, C) => [h + C * Math.cos(x - Math.PI / 2), f + C * Math.sin(x - Math.PI / 2)], k = (x, C, L, B) => {
|
|
6166
|
+
const [A, E] = S(x, v), [F, T] = S(C, v), [R, O] = S(L, v), [W, Z] = S(B, v);
|
|
6167
6167
|
return `M${A.toFixed(2)},${E.toFixed(2)} A${v},${v} 0 0 1 ${F.toFixed(2)},${T.toFixed(2)} Q${h},${f} ${R.toFixed(2)},${O.toFixed(2)} A${v},${v} 0 0 1 ${W.toFixed(2)},${Z.toFixed(2)} Q${h},${f} ${A.toFixed(2)},${E.toFixed(2)} Z`;
|
|
6168
|
-
}, M = (
|
|
6169
|
-
for (let
|
|
6170
|
-
for (let C =
|
|
6171
|
-
if (
|
|
6172
|
-
const [L, B] = b[
|
|
6173
|
-
w.push({ d: k(L, B, A, E), color: j(
|
|
6168
|
+
}, M = (x) => x * 180 / Math.PI, w = [];
|
|
6169
|
+
for (let x = 0; x < u; x++)
|
|
6170
|
+
for (let C = x; C < u; C++) {
|
|
6171
|
+
if (x === C || n[x][C] + n[C][x] <= 0) continue;
|
|
6172
|
+
const [L, B] = b[x][C], [A, E] = b[C][x];
|
|
6173
|
+
w.push({ d: k(L, B, A, E), color: j(x), i: x, j: C, value: n[x][C] + n[C][x] });
|
|
6174
6174
|
}
|
|
6175
6175
|
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: [
|
|
6176
6176
|
/* @__PURE__ */ m("svg", { width: c, height: c, viewBox: `0 0 ${c} ${c}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
6177
|
-
w.map((
|
|
6177
|
+
w.map((x, C) => /* @__PURE__ */ e(
|
|
6178
6178
|
"path",
|
|
6179
6179
|
{
|
|
6180
|
-
d:
|
|
6181
|
-
fill:
|
|
6180
|
+
d: x.d,
|
|
6181
|
+
fill: x.color,
|
|
6182
6182
|
className: "select-chord__ribbon",
|
|
6183
6183
|
onMouseEnter: () => i.show({
|
|
6184
6184
|
x: h,
|
|
6185
6185
|
y: f,
|
|
6186
6186
|
place: "top",
|
|
6187
|
-
title: `${l[
|
|
6188
|
-
rows: [{ label: "Fluxo", value: s(
|
|
6187
|
+
title: `${l[x.i]} ↔ ${l[x.j]}`,
|
|
6188
|
+
rows: [{ label: "Fluxo", value: s(x.value), color: x.color }]
|
|
6189
6189
|
}),
|
|
6190
6190
|
onMouseLeave: i.hide
|
|
6191
6191
|
},
|
|
6192
6192
|
C
|
|
6193
6193
|
)),
|
|
6194
|
-
_.map((
|
|
6195
|
-
const L = (
|
|
6194
|
+
_.map((x, C) => {
|
|
6195
|
+
const L = (x.a0 + x.a1) / 2, [B, A] = S(L, g + 12);
|
|
6196
6196
|
return /* @__PURE__ */ m("g", { children: [
|
|
6197
|
-
/* @__PURE__ */ e("path", { d: at(h, f, g, v, M(
|
|
6197
|
+
/* @__PURE__ */ e("path", { d: at(h, f, g, v, M(x.a0), M(x.a1)), fill: j(C), className: "select-chord__arc" }),
|
|
6198
6198
|
/* @__PURE__ */ e(
|
|
6199
6199
|
"text",
|
|
6200
6200
|
{
|
|
@@ -6213,7 +6213,7 @@ const Lo = P(function({ matrix: n, labels: l, size: c = 240, format: s = q, padA
|
|
|
6213
6213
|
] }) });
|
|
6214
6214
|
});
|
|
6215
6215
|
function Ao({ points: t, height: n = 240, radius: l = 16, color: c = "var(--select-chart-1)", xMax: s, yMax: a, format: r = q, className: d, ...o }) {
|
|
6216
|
-
const { ref: i, width: u } = ne(n), h = X(), f = 12, g = Math.max(0, u - f * 2), v = n - f * 2,
|
|
6216
|
+
const { ref: i, width: u } = ne(n), h = X(), f = 12, g = Math.max(0, u - f * 2), v = n - f * 2, y = s ?? Math.max(1, ...t.map((C) => C.x)), N = a ?? Math.max(1, ...t.map((C) => C.y)), $ = (C) => f + C / y * g, _ = (C) => f + v - C / N * v, p = l, b = Math.sqrt(3), S = (C, L) => {
|
|
6217
6217
|
let B = C, A = L, E = -B - A, F = Math.round(B), T = Math.round(E), R = Math.round(A);
|
|
6218
6218
|
const O = Math.abs(F - B), W = Math.abs(T - E), Z = Math.abs(R - A);
|
|
6219
6219
|
return O > W && O > Z ? F = -T - R : W > Z ? T = -F - R : R = -F - T, [F, R];
|
|
@@ -6229,10 +6229,10 @@ function Ao({ points: t, height: n = 240, radius: l = 16, color: c = "var(--sele
|
|
|
6229
6229
|
const L = $(C.x), B = _(C.y), A = (b / 3 * L - 1 / 3 * B) / p, E = 2 / 3 * B / p, [F, T] = S(A, E), R = `${F},${T}`;
|
|
6230
6230
|
w.set(R, (w.get(R) ?? 0) + 1);
|
|
6231
6231
|
}
|
|
6232
|
-
const
|
|
6232
|
+
const x = Math.max(1, ...w.values());
|
|
6233
6233
|
return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${d ? " " + d : ""}`, ref: i, children: [
|
|
6234
6234
|
u > 0 && /* @__PURE__ */ e("svg", { width: u, height: n, className: "select-chart", children: [...w].map(([C, L]) => {
|
|
6235
|
-
const [B, A] = C.split(",").map(Number), [E, F] = k(B, A), T = L /
|
|
6235
|
+
const [B, A] = C.split(",").map(Number), [E, F] = k(B, A), T = L / x, R = Math.round((0.16 + T * 0.84) * 100);
|
|
6236
6236
|
return /* @__PURE__ */ e(
|
|
6237
6237
|
"path",
|
|
6238
6238
|
{
|
|
@@ -6414,22 +6414,22 @@ function In(t, n, l) {
|
|
|
6414
6414
|
const a = Math.sin(s), r = Math.sin((1 - l) * s) / a, d = Math.sin(l * s) / a;
|
|
6415
6415
|
return [t[0] * r + n[0] * d, t[1] * r + n[1] * d, t[2] * r + n[2] * d];
|
|
6416
6416
|
}
|
|
6417
|
-
const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) < 1e-6, Bo = P(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 = q, legend: i = !0, map: u = !0, fluid: h = !1, onZoomChange: f, className: g, ...v },
|
|
6417
|
+
const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) < 1e-6, Bo = P(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 = q, legend: i = !0, map: u = !0, fluid: h = !1, onZoomChange: f, className: g, ...v }, y) {
|
|
6418
6418
|
var Ae;
|
|
6419
6419
|
const N = ee(), $ = X(), _ = Y(null), p = kt(_, c), b = n.length ? n.reduce((I, V) => I + V.lng, 0) / n.length : 0, S = Y(
|
|
6420
6420
|
typeof window < "u" && !!((Ae = window.matchMedia) != null && Ae.call(window, "(prefers-reduced-motion: reduce)").matches)
|
|
6421
|
-
), k = Y({ lng: -b, lat: s }), M = Y({ lng: 0, lat: 0 }), w = Y(1),
|
|
6421
|
+
), k = Y({ lng: -b, lat: s }), M = Y({ lng: 0, lat: 0 }), w = Y(1), x = Y(null), C = Y(null), L = Y(!1), B = Y(0), A = Y(0), E = Y(0), [, F] = D(0), [T, R] = D(!1), [O, W] = D(null), Z = () => {
|
|
6422
6422
|
A.current || (E.current = performance.now(), A.current = requestAnimationFrame(G));
|
|
6423
6423
|
};
|
|
6424
6424
|
function G(I) {
|
|
6425
6425
|
const V = Math.min(0.05, (I - E.current) / 1e3);
|
|
6426
6426
|
E.current = I, B.current += V;
|
|
6427
6427
|
const U = M.current, oe = Math.abs(U.lng) + Math.abs(U.lat) > 0.02;
|
|
6428
|
-
if (!C.current) if (
|
|
6428
|
+
if (!C.current) if (x.current) {
|
|
6429
6429
|
const te = Math.min(1, V * 6);
|
|
6430
|
-
k.current.lng += (
|
|
6430
|
+
k.current.lng += (x.current.lng - k.current.lng) * te, k.current.lat += (x.current.lat - k.current.lat) * te, Math.abs(x.current.lng - k.current.lng) < 0.2 && Math.abs(x.current.lat - k.current.lat) < 0.2 && (x.current = null);
|
|
6431
6431
|
} 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));
|
|
6432
|
-
F((te) => (te + 1) % 1e6), !S.current || !!C.current || !!
|
|
6432
|
+
F((te) => (te + 1) % 1e6), !S.current || !!C.current || !!x.current || Math.abs(U.lng) + Math.abs(U.lat) > 0.02 ? A.current = requestAnimationFrame(G) : A.current = 0;
|
|
6433
6433
|
}
|
|
6434
6434
|
ce(() => (S.current || Z(), () => {
|
|
6435
6435
|
A.current && cancelAnimationFrame(A.current), A.current = 0;
|
|
@@ -6448,7 +6448,7 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
|
|
|
6448
6448
|
}, []);
|
|
6449
6449
|
const re = (I) => {
|
|
6450
6450
|
var V, U;
|
|
6451
|
-
(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 },
|
|
6451
|
+
(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 }, x.current = null, R(!0), Z();
|
|
6452
6452
|
}, pe = (I) => {
|
|
6453
6453
|
if (!C.current) return;
|
|
6454
6454
|
const V = 0.34 / w.current, U = I.clientX - C.current.x, oe = I.clientY - C.current.y;
|
|
@@ -6524,17 +6524,17 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
|
|
|
6524
6524
|
r: 3 + Math.max(0, I.value ?? 0) / Se * 6,
|
|
6525
6525
|
col: I.color ?? d
|
|
6526
6526
|
};
|
|
6527
|
-
}),
|
|
6527
|
+
}), xe = O != null ? n[O] : null, Fe = 0.16, $e = l.map((I, V) => {
|
|
6528
6528
|
const U = Ke(I.from.lat, I.from.lng), oe = Ke(I.to.lat, I.to.lng);
|
|
6529
6529
|
let le = "", te = !1;
|
|
6530
6530
|
for (let Ft = 0; Ft <= 40; Ft++) {
|
|
6531
6531
|
const cn = Ft / 40, ut = In(U, oe, cn), It = 1 + 0.34 * Math.sin(Math.PI * cn), $l = _t(ut, k.current.lng, k.current.lat), sn = z([ut[0] * It, ut[1] * It, ut[2] * It]);
|
|
6532
6532
|
$l[2] > -0.05 ? (le += `${te ? "L" : "M"}${sn.x.toFixed(1)},${sn.y.toFixed(1)}`, te = !0) : te = !1;
|
|
6533
6533
|
}
|
|
6534
|
-
const ue = S.current ? 0.5 : (B.current * Fe + V * 0.27) % 1, He = In(U, oe, ue), ze = 1 + 0.34 * Math.sin(Math.PI * ue), Bt = _t(He, k.current.lng, k.current.lat), ht = z([He[0] * ze, He[1] * ze, He[2] * ze]), Ml =
|
|
6534
|
+
const ue = S.current ? 0.5 : (B.current * Fe + V * 0.27) % 1, He = In(U, oe, ue), ze = 1 + 0.34 * Math.sin(Math.PI * ue), Bt = _t(He, k.current.lng, k.current.lat), ht = z([He[0] * ze, He[1] * ze, He[2] * ze]), Ml = xe != null && (Rn(I.from, xe) || Rn(I.to, xe));
|
|
6535
6535
|
return { d: le, col: I.color ?? d, i: V, flow: { ...ht, vis: Bt[2] > 0 }, active: Ml };
|
|
6536
|
-
}), Ve =
|
|
6537
|
-
return /* @__PURE__ */ m("div", { ref:
|
|
6536
|
+
}), Ve = xe != null, Oe = i ? [...n].sort((I, V) => (V.value ?? 0) - (I.value ?? 0)).slice(0, 6) : [];
|
|
6537
|
+
return /* @__PURE__ */ m("div", { ref: y, ...v, className: `select-globe${g ? " " + g : ""}`, children: [
|
|
6538
6538
|
/* @__PURE__ */ m(
|
|
6539
6539
|
"div",
|
|
6540
6540
|
{
|
|
@@ -6666,7 +6666,7 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
|
|
|
6666
6666
|
W(null), $.hide();
|
|
6667
6667
|
},
|
|
6668
6668
|
onClick: () => {
|
|
6669
|
-
|
|
6669
|
+
x.current = { lng: -I.lng, lat: s }, Z();
|
|
6670
6670
|
}
|
|
6671
6671
|
}
|
|
6672
6672
|
)
|
|
@@ -6701,8 +6701,8 @@ function Fo({ children: t, speed: n = 28, className: l, ...c }) {
|
|
|
6701
6701
|
function Io({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
6702
6702
|
var A;
|
|
6703
6703
|
const { ref: a, width: r } = ne(n), d = X(), o = ee(), [i, u] = D(null), h = { ...Be, right: 44 }, f = [...t].sort((E, F) => F.value - E.value), g = f.length, v = f.reduce((E, F) => E + F.value, 0) || 1;
|
|
6704
|
-
let
|
|
6705
|
-
const N = f.map((E) => (
|
|
6704
|
+
let y = 0;
|
|
6705
|
+
const N = f.map((E) => (y += E.value, y / v * 100)), $ = Math.max(0, r - h.left - h.right), _ = n - h.top - h.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 = h.top + _, M = (E) => k - E / p * _, w = (E) => k - E / 100 * _, x = (E) => h.left + b * E + b / 2, C = N.map((E, F) => [x(F), w(E)]), L = j(0), B = j(1);
|
|
6706
6706
|
return /* @__PURE__ */ m("div", { ...s, className: `select-chart-wrap${c ? " " + c : ""}`, ref: a, children: [
|
|
6707
6707
|
r > 0 && /* @__PURE__ */ m("svg", { width: r, height: n, className: "select-chart", onMouseLeave: () => {
|
|
6708
6708
|
u(null), d.hide();
|
|
@@ -6725,7 +6725,7 @@ function Io({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
6725
6725
|
return /* @__PURE__ */ e(
|
|
6726
6726
|
"rect",
|
|
6727
6727
|
{
|
|
6728
|
-
x:
|
|
6728
|
+
x: x(F) - S / 2,
|
|
6729
6729
|
y: T,
|
|
6730
6730
|
width: S,
|
|
6731
6731
|
height: Math.max(0, k - T),
|
|
@@ -6733,7 +6733,7 @@ function Io({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
6733
6733
|
fill: `url(#${o}-b)`,
|
|
6734
6734
|
className: "select-chart__bar",
|
|
6735
6735
|
onMouseEnter: () => d.show({
|
|
6736
|
-
x:
|
|
6736
|
+
x: x(F),
|
|
6737
6737
|
y: T,
|
|
6738
6738
|
place: T < h.top + 40 ? "bottom" : "top",
|
|
6739
6739
|
title: E.label,
|
|
@@ -6760,37 +6760,37 @@ function Io({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
6760
6760
|
},
|
|
6761
6761
|
F
|
|
6762
6762
|
)),
|
|
6763
|
-
f.map((E, F) => /* @__PURE__ */ e("text", { x:
|
|
6763
|
+
f.map((E, F) => /* @__PURE__ */ e("text", { x: x(F), y: n - h.bottom + 16, className: "select-chart__xlabel", textAnchor: "middle", children: E.label }, F))
|
|
6764
6764
|
] }),
|
|
6765
6765
|
/* @__PURE__ */ e(K, { tip: d.tip })
|
|
6766
6766
|
] });
|
|
6767
6767
|
}
|
|
6768
6768
|
const Ro = P(function({ segments: n, cols: l = 10, rows: c = 10, format: s = q, className: a, ...r }, d) {
|
|
6769
|
-
const o = n.reduce((
|
|
6770
|
-
let f = h.reduce((
|
|
6771
|
-
const g = u.map((
|
|
6772
|
-
for (let
|
|
6769
|
+
const o = n.reduce((y, N) => y + N.value, 0) || 1, i = l * c, u = n.map((y) => y.value / o * i), h = u.map(Math.floor);
|
|
6770
|
+
let f = h.reduce((y, N) => y + N, 0);
|
|
6771
|
+
const g = u.map((y, N) => ({ i: N, frac: y - h[N] })).sort((y, N) => N.frac - y.frac);
|
|
6772
|
+
for (let y = 0; f < i && y < g.length; y++, f++) h[g[y].i]++;
|
|
6773
6773
|
const v = [];
|
|
6774
|
-
for (n.forEach((
|
|
6775
|
-
const $ =
|
|
6774
|
+
for (n.forEach((y, N) => {
|
|
6775
|
+
const $ = y.color ?? j(N);
|
|
6776
6776
|
for (let _ = 0; _ < h[N]; _++) v.push($);
|
|
6777
6777
|
}); v.length < i; ) v.push("var(--select-chart-track)");
|
|
6778
6778
|
return /* @__PURE__ */ m("div", { ref: d, ...r, className: `select-waffle-wrap${a ? " " + a : ""}`, children: [
|
|
6779
|
-
/* @__PURE__ */ e("div", { className: "select-waffle", style: { gridTemplateColumns: `repeat(${l}, 1fr)` }, children: v.slice(0, i).map((
|
|
6780
|
-
/* @__PURE__ */ e("ul", { className: "select-donut__legend", children: n.map((
|
|
6781
|
-
/* @__PURE__ */ e("span", { className: "select-donut__dot", style: { background:
|
|
6782
|
-
/* @__PURE__ */ e("span", { className: "select-donut__leglabel", children:
|
|
6783
|
-
/* @__PURE__ */ e("span", { className: "select-donut__legval", children: s(
|
|
6779
|
+
/* @__PURE__ */ e("div", { className: "select-waffle", style: { gridTemplateColumns: `repeat(${l}, 1fr)` }, children: v.slice(0, i).map((y, N) => /* @__PURE__ */ e("span", { className: "select-waffle__cell", style: { background: y, animationDelay: `${N % l * 12 + Math.floor(N / l) * 12}ms` } }, N)) }),
|
|
6780
|
+
/* @__PURE__ */ e("ul", { className: "select-donut__legend", children: n.map((y, N) => /* @__PURE__ */ m("li", { className: "select-donut__legitem", children: [
|
|
6781
|
+
/* @__PURE__ */ e("span", { className: "select-donut__dot", style: { background: y.color ?? j(N) } }),
|
|
6782
|
+
/* @__PURE__ */ e("span", { className: "select-donut__leglabel", children: y.label }),
|
|
6783
|
+
/* @__PURE__ */ e("span", { className: "select-donut__legval", children: s(y.value) })
|
|
6784
6784
|
] }, N)) })
|
|
6785
6785
|
] });
|
|
6786
6786
|
});
|
|
6787
6787
|
function Po({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", height: c, format: s = q, leftColor: a, rightColor: r, centerWidth: d = 84, className: o, ...i }) {
|
|
6788
|
-
const u = c ?? Math.max(180, t.length * 40 + 36), { ref: h, width: f } = ne(u), g = X(), [v,
|
|
6788
|
+
const u = c ?? Math.max(180, t.length * 40 + 36), { ref: h, width: f } = ne(u), g = X(), [v, y] = D(null), N = 8, $ = 26, _ = 8, p = Math.max(1, ...t.flatMap((L) => [L.left, L.right])), b = Math.max(0, (f - d - N * 2) / 2), S = t.length ? (u - $ - _) / t.length : 0, k = Math.min(S * 0.6, 26), M = N + b, w = N + b + d, x = a ?? j(1), C = r ?? j(0);
|
|
6789
6789
|
return /* @__PURE__ */ m("div", { ...i, className: `select-chart-wrap${o ? " " + o : ""}`, ref: h, children: [
|
|
6790
6790
|
f > 0 && /* @__PURE__ */ m("svg", { width: f, height: u, className: "select-chart", onMouseLeave: () => {
|
|
6791
|
-
|
|
6791
|
+
y(null), g.hide();
|
|
6792
6792
|
}, children: [
|
|
6793
|
-
/* @__PURE__ */ e("text", { x: N, y: 14, className: "select-chart__xlabel", textAnchor: "start", style: { fill:
|
|
6793
|
+
/* @__PURE__ */ e("text", { x: N, y: 14, className: "select-chart__xlabel", textAnchor: "start", style: { fill: x, fontWeight: 600 }, children: n }),
|
|
6794
6794
|
/* @__PURE__ */ e("text", { x: f - N, y: 14, className: "select-chart__xlabel", textAnchor: "end", style: { fill: C, fontWeight: 600 }, children: l }),
|
|
6795
6795
|
t.map((L, B) => {
|
|
6796
6796
|
const A = $ + S * B + S / 2, E = L.left / p * b, F = L.right / p * b, T = v === L.label;
|
|
@@ -6803,13 +6803,13 @@ function Po({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", hei
|
|
|
6803
6803
|
width: E,
|
|
6804
6804
|
height: k,
|
|
6805
6805
|
rx: 4,
|
|
6806
|
-
fill:
|
|
6806
|
+
fill: x,
|
|
6807
6807
|
className: "select-pyramid__bar select-pyramid__bar--l",
|
|
6808
6808
|
onMouseEnter: () => {
|
|
6809
|
-
|
|
6809
|
+
y(L.label), g.show({ x: M - E, y: A - k / 2, place: "top", title: L.label, rows: [{ label: n, value: s(L.left), color: x }] });
|
|
6810
6810
|
},
|
|
6811
6811
|
onMouseLeave: () => {
|
|
6812
|
-
|
|
6812
|
+
y(null), g.hide();
|
|
6813
6813
|
}
|
|
6814
6814
|
}
|
|
6815
6815
|
),
|
|
@@ -6824,10 +6824,10 @@ function Po({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", hei
|
|
|
6824
6824
|
fill: C,
|
|
6825
6825
|
className: "select-pyramid__bar select-pyramid__bar--r",
|
|
6826
6826
|
onMouseEnter: () => {
|
|
6827
|
-
|
|
6827
|
+
y(L.label), g.show({ x: w + F, y: A - k / 2, place: "top", title: L.label, rows: [{ label: l, value: s(L.right), color: C }] });
|
|
6828
6828
|
},
|
|
6829
6829
|
onMouseLeave: () => {
|
|
6830
|
-
|
|
6830
|
+
y(null), g.hide();
|
|
6831
6831
|
}
|
|
6832
6832
|
}
|
|
6833
6833
|
),
|
|
@@ -6839,12 +6839,12 @@ function Po({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", hei
|
|
|
6839
6839
|
] });
|
|
6840
6840
|
}
|
|
6841
6841
|
function Do({ series: t, labels: n, height: l = 240, format: c = q, className: s, ...a }) {
|
|
6842
|
-
const { ref: r, width: d } = ne(l), o = X(), [i, u] = D(null), h = { top: 16, right: 78, bottom: 28, left: 28 }, f = n.length, g = t.length, v = Math.max(0, d - h.left - h.right),
|
|
6842
|
+
const { ref: r, width: d } = ne(l), o = X(), [i, u] = D(null), h = { top: 16, right: 78, bottom: 28, left: 28 }, f = n.length, g = t.length, v = Math.max(0, d - h.left - h.right), y = l - h.top - h.bottom, N = t.map(() => new Array(f).fill(0));
|
|
6843
6843
|
for (let p = 0; p < f; p++)
|
|
6844
6844
|
t.map((S, k) => ({ si: k, v: S.data[p] ?? 0 })).sort((S, k) => k.v - S.v).forEach((S, k) => {
|
|
6845
6845
|
N[S.si][p] = k + 1;
|
|
6846
6846
|
});
|
|
6847
|
-
const $ = (p) => h.left + (f <= 1 ? v / 2 : v / (f - 1) * p), _ = (p) => h.top + (g <= 1 ?
|
|
6847
|
+
const $ = (p) => h.left + (f <= 1 ? v / 2 : v / (f - 1) * p), _ = (p) => h.top + (g <= 1 ? y / 2 : y / (g - 1) * (p - 1));
|
|
6848
6848
|
return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
|
|
6849
6849
|
d > 0 && /* @__PURE__ */ m("svg", { width: d, height: l, className: "select-chart", onMouseLeave: () => {
|
|
6850
6850
|
u(null), o.hide();
|
|
@@ -6887,7 +6887,7 @@ function Do({ series: t, labels: n, height: l = 240, format: c = q, className: s
|
|
|
6887
6887
|
] });
|
|
6888
6888
|
}
|
|
6889
6889
|
function To({ axes: t, data: n, height: l = 260, format: c = q, className: s, ...a }) {
|
|
6890
|
-
const { ref: r, width: d } = ne(l), o = X(), [i, u] = D(null), h = { top: 30, right: 28, bottom: 26, left: 28 }, f = Math.max(0, d - h.left - h.right), g = l - h.top - h.bottom, v = t.length,
|
|
6890
|
+
const { ref: r, width: d } = ne(l), o = X(), [i, u] = D(null), h = { top: 30, right: 28, bottom: 26, left: 28 }, f = Math.max(0, d - h.left - h.right), g = l - h.top - h.bottom, v = t.length, y = (_) => h.left + (v <= 1 ? f / 2 : f / (v - 1) * _), N = t.map((_) => {
|
|
6891
6891
|
const p = n.map((b) => b.values[_.key] ?? 0);
|
|
6892
6892
|
return { min: Math.min(...p), max: Math.max(...p) };
|
|
6893
6893
|
}), $ = (_, p) => {
|
|
@@ -6899,13 +6899,13 @@ function To({ axes: t, data: n, height: l = 260, format: c = q, className: s, ..
|
|
|
6899
6899
|
u(null), o.hide();
|
|
6900
6900
|
}, children: [
|
|
6901
6901
|
t.map((_, p) => /* @__PURE__ */ m("g", { children: [
|
|
6902
|
-
/* @__PURE__ */ e("line", { x1:
|
|
6903
|
-
/* @__PURE__ */ e("text", { x:
|
|
6904
|
-
/* @__PURE__ */ e("text", { x:
|
|
6905
|
-
/* @__PURE__ */ e("text", { x:
|
|
6902
|
+
/* @__PURE__ */ e("line", { x1: y(p), x2: y(p), y1: h.top, y2: h.top + g, className: "select-chart__axis" }),
|
|
6903
|
+
/* @__PURE__ */ e("text", { x: y(p), y: h.top - 12, className: "select-chart__xlabel", textAnchor: "middle", children: _.label }),
|
|
6904
|
+
/* @__PURE__ */ e("text", { x: y(p), y: h.top - 1, className: "select-chart__ylabel", textAnchor: "middle", style: { fontSize: 9 }, children: c(N[p].max) }),
|
|
6905
|
+
/* @__PURE__ */ e("text", { x: y(p), y: h.top + g + 14, className: "select-chart__ylabel", textAnchor: "middle", style: { fontSize: 9 }, children: c(N[p].min) })
|
|
6906
6906
|
] }, _.key)),
|
|
6907
6907
|
n.map((_, p) => {
|
|
6908
|
-
const b = _.color ?? j(p), S = t.map((k, M) => `${M ? "L" : "M"}${
|
|
6908
|
+
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("");
|
|
6909
6909
|
return /* @__PURE__ */ e(
|
|
6910
6910
|
"path",
|
|
6911
6911
|
{
|
|
@@ -6919,7 +6919,7 @@ function To({ axes: t, data: n, height: l = 260, format: c = q, className: s, ..
|
|
|
6919
6919
|
style: { cursor: "pointer" },
|
|
6920
6920
|
onMouseEnter: () => {
|
|
6921
6921
|
u(p), o.show({
|
|
6922
|
-
x:
|
|
6922
|
+
x: y(v - 1),
|
|
6923
6923
|
y: $(v - 1, _.values[t[v - 1].key] ?? 0),
|
|
6924
6924
|
place: "top",
|
|
6925
6925
|
title: _.label ?? `Série ${p + 1}`,
|
|
@@ -6937,19 +6937,19 @@ function To({ axes: t, data: n, height: l = 260, format: c = q, className: s, ..
|
|
|
6937
6937
|
/* @__PURE__ */ e(K, { tip: o.tip })
|
|
6938
6938
|
] });
|
|
6939
6939
|
}
|
|
6940
|
-
function
|
|
6941
|
-
return t.children && t.children.length ? t.children.reduce((n, l) => n +
|
|
6940
|
+
function yt(t) {
|
|
6941
|
+
return t.children && t.children.length ? t.children.reduce((n, l) => n + yt(l), 0) : t.value ?? 0;
|
|
6942
6942
|
}
|
|
6943
|
-
function
|
|
6944
|
-
return !t.children || !t.children.length ? n : Math.max(...t.children.map((l) =>
|
|
6943
|
+
function xl(t, n = 0) {
|
|
6944
|
+
return !t.children || !t.children.length ? n : Math.max(...t.children.map((l) => xl(l, n + 1)));
|
|
6945
6945
|
}
|
|
6946
6946
|
function Wo({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
6947
|
-
const { ref: a, width: r } = ne(n), d = X(), [o, i] = D(null), u =
|
|
6948
|
-
if (f.push({ node: v, x0:
|
|
6949
|
-
const p = v.children.reduce((S, k) => S +
|
|
6950
|
-
let b =
|
|
6947
|
+
const { ref: a, width: r } = ne(n), d = X(), [o, i] = D(null), u = xl(t), h = n / (u + 1), f = [], g = (v, y, N, $, _) => {
|
|
6948
|
+
if (f.push({ node: v, x0: y, x1: N, depth: $, color: v.color ?? j(_), value: yt(v) }), v.children && v.children.length) {
|
|
6949
|
+
const p = v.children.reduce((S, k) => S + yt(k), 0) || 1;
|
|
6950
|
+
let b = y;
|
|
6951
6951
|
v.children.forEach((S, k) => {
|
|
6952
|
-
const M = (N -
|
|
6952
|
+
const M = (N - y) * yt(S) / p;
|
|
6953
6953
|
g(S, b, b + M, $ + 1, $ === 0 ? k : _), b += M;
|
|
6954
6954
|
});
|
|
6955
6955
|
}
|
|
@@ -6958,14 +6958,14 @@ function Wo({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
6958
6958
|
r > 0 && /* @__PURE__ */ e("svg", { width: r, height: n, className: "select-chart", onMouseLeave: () => {
|
|
6959
6959
|
i(null), d.hide();
|
|
6960
6960
|
}, children: f.map((v) => {
|
|
6961
|
-
const
|
|
6961
|
+
const y = Math.max(0, v.x1 - v.x0 - 2), N = v.depth * h, $ = `${v.depth}-${v.x0.toFixed(1)}-${v.node.label}`;
|
|
6962
6962
|
return /* @__PURE__ */ m("g", { style: { opacity: o === null || o === $ ? 1 : 0.5 }, children: [
|
|
6963
6963
|
/* @__PURE__ */ e(
|
|
6964
6964
|
"rect",
|
|
6965
6965
|
{
|
|
6966
6966
|
x: v.x0 + 1,
|
|
6967
6967
|
y: N + 1,
|
|
6968
|
-
width:
|
|
6968
|
+
width: y,
|
|
6969
6969
|
height: Math.max(0, h - 2),
|
|
6970
6970
|
rx: 4,
|
|
6971
6971
|
fill: v.color,
|
|
@@ -6981,7 +6981,7 @@ function Wo({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
6981
6981
|
}
|
|
6982
6982
|
}
|
|
6983
6983
|
),
|
|
6984
|
-
|
|
6984
|
+
y > 42 && h > 16 && /* @__PURE__ */ e("text", { x: v.x0 + 8, y: N + h / 2, className: "select-treemap__label", dominantBaseline: "middle", children: v.node.label })
|
|
6985
6985
|
] }, $);
|
|
6986
6986
|
}) }),
|
|
6987
6987
|
/* @__PURE__ */ e(K, { tip: d.tip })
|
|
@@ -6997,14 +6997,14 @@ function Oo({ data: t, height: n = 260, className: l, ...c }) {
|
|
|
6997
6997
|
g = Math.max(g, b);
|
|
6998
6998
|
const M = { node: p, depth: b, yUnit: 0, ci: S, parent: k };
|
|
6999
6999
|
if (p.children && p.children.length) {
|
|
7000
|
-
const w = p.children.map((
|
|
7000
|
+
const w = p.children.map((x, C) => v(x, b + 1, b === 0 ? C : S, M));
|
|
7001
7001
|
M.yUnit = (w[0].yUnit + w[w.length - 1].yUnit) / 2;
|
|
7002
7002
|
} else
|
|
7003
7003
|
M.yUnit = f, f++;
|
|
7004
7004
|
return h.push(M), M;
|
|
7005
7005
|
};
|
|
7006
7006
|
v(t, 0, 0);
|
|
7007
|
-
const
|
|
7007
|
+
const y = a - i.left - i.right, N = n - i.top - i.bottom, $ = (p) => i.left + (g <= 0 ? 0 : y / g * p), _ = (p) => i.top + (f <= 1 ? N / 2 : N / (f - 1) * p);
|
|
7008
7008
|
u = /* @__PURE__ */ m("svg", { width: a, height: n, className: "select-chart", onMouseLeave: () => {
|
|
7009
7009
|
o(null), r.hide();
|
|
7010
7010
|
}, children: [
|
|
@@ -7069,16 +7069,16 @@ const Ho = P(function({ sets: n, size: l = 240, className: c, ...s }, a) {
|
|
|
7069
7069
|
return /* @__PURE__ */ m("div", { ref: a, ...s, className: `select-donut-wrap${c ? " " + c : ""}`, children: [
|
|
7070
7070
|
/* @__PURE__ */ e("div", { className: "select-radial", style: { width: l, aspectRatio: "1" }, children: /* @__PURE__ */ m("svg", { width: l, height: l, viewBox: `0 0 ${l} ${l}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
7071
7071
|
n.slice(0, r).map((g, v) => {
|
|
7072
|
-
const
|
|
7072
|
+
const y = g.color ?? j(v);
|
|
7073
7073
|
return /* @__PURE__ */ e(
|
|
7074
7074
|
"circle",
|
|
7075
7075
|
{
|
|
7076
7076
|
cx: f[v][0],
|
|
7077
7077
|
cy: f[v][1],
|
|
7078
7078
|
r: h(g),
|
|
7079
|
-
fill:
|
|
7079
|
+
fill: y,
|
|
7080
7080
|
fillOpacity: 0.32,
|
|
7081
|
-
stroke:
|
|
7081
|
+
stroke: y,
|
|
7082
7082
|
strokeWidth: 1.5,
|
|
7083
7083
|
className: "select-venn__circle"
|
|
7084
7084
|
},
|
|
@@ -7106,10 +7106,10 @@ const Ho = P(function({ sets: n, size: l = 240, className: c, ...s }, a) {
|
|
|
7106
7106
|
] }, v)) })
|
|
7107
7107
|
] });
|
|
7108
7108
|
}), jo = P(function({ data: n, size: l = 260, format: c = q, className: s, ...a }, r) {
|
|
7109
|
-
const d = X(), [o, i] = D(null), u = Math.max(1, ...n.map((
|
|
7110
|
-
for (const
|
|
7109
|
+
const d = X(), [o, i] = D(null), u = Math.max(1, ...n.map((x) => x.value)), h = n.map((x, C) => ({ d: x, i: C, r: 8 + Math.sqrt(x.value / u) * 40 })).sort((x, C) => C.r - x.r), f = [];
|
|
7110
|
+
for (const x of h) {
|
|
7111
7111
|
if (f.length === 0) {
|
|
7112
|
-
f.push({ d:
|
|
7112
|
+
f.push({ d: x.d, i: x.i, x: 0, y: 0, r: x.r });
|
|
7113
7113
|
continue;
|
|
7114
7114
|
}
|
|
7115
7115
|
let C = 0, L = 0, B = null;
|
|
@@ -7117,7 +7117,7 @@ const Ho = P(function({ sets: n, size: l = 240, className: c, ...s }, a) {
|
|
|
7117
7117
|
const E = Math.cos(C) * L, F = Math.sin(C) * L;
|
|
7118
7118
|
let T = !0;
|
|
7119
7119
|
for (const R of f)
|
|
7120
|
-
if (Math.hypot(E - R.x, F - R.y) < R.r +
|
|
7120
|
+
if (Math.hypot(E - R.x, F - R.y) < R.r + x.r + 2) {
|
|
7121
7121
|
T = !1;
|
|
7122
7122
|
break;
|
|
7123
7123
|
}
|
|
@@ -7127,20 +7127,20 @@ const Ho = P(function({ sets: n, size: l = 240, className: c, ...s }, a) {
|
|
|
7127
7127
|
}
|
|
7128
7128
|
C += 0.5, L += 0.7;
|
|
7129
7129
|
}
|
|
7130
|
-
B && f.push({ d:
|
|
7130
|
+
B && f.push({ d: x.d, i: x.i, x: B[0], y: B[1], r: x.r });
|
|
7131
7131
|
}
|
|
7132
|
-
const g = Math.min(...f.map((
|
|
7132
|
+
const g = Math.min(...f.map((x) => x.x - x.r)), v = Math.max(...f.map((x) => x.x + x.r)), y = Math.min(...f.map((x) => x.y - x.r)), N = Math.max(...f.map((x) => x.y + x.r)), $ = v - g || 1, _ = N - 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 = (x) => x * b + S, w = (x) => x * b + k;
|
|
7133
7133
|
return /* @__PURE__ */ m("div", { ref: r, ...a, className: `select-donut-wrap${s ? " " + s : ""}`, children: [
|
|
7134
7134
|
/* @__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: () => {
|
|
7135
7135
|
i(null), d.hide();
|
|
7136
|
-
}, children: f.map((
|
|
7137
|
-
const C =
|
|
7138
|
-
return /* @__PURE__ */ m("g", { style: { opacity: o === null || o ===
|
|
7136
|
+
}, children: f.map((x) => {
|
|
7137
|
+
const C = x.d.color ?? j(x.i), L = x.r * b;
|
|
7138
|
+
return /* @__PURE__ */ m("g", { style: { opacity: o === null || o === x.i ? 1 : 0.5 }, children: [
|
|
7139
7139
|
/* @__PURE__ */ e(
|
|
7140
7140
|
"circle",
|
|
7141
7141
|
{
|
|
7142
|
-
cx: M(
|
|
7143
|
-
cy: w(
|
|
7142
|
+
cx: M(x.x),
|
|
7143
|
+
cy: w(x.y),
|
|
7144
7144
|
r: L,
|
|
7145
7145
|
fill: C,
|
|
7146
7146
|
fillOpacity: 0.3,
|
|
@@ -7148,45 +7148,45 @@ const Ho = P(function({ sets: n, size: l = 240, className: c, ...s }, a) {
|
|
|
7148
7148
|
strokeWidth: 1.5,
|
|
7149
7149
|
className: "select-pack__circle",
|
|
7150
7150
|
onMouseEnter: () => {
|
|
7151
|
-
i(
|
|
7151
|
+
i(x.i), d.show({ x: M(x.x), y: w(x.y) - L, place: w(x.y) - L < 40 ? "bottom" : "top", title: x.d.label, rows: [{ label: "Valor", value: c(x.d.value), color: C }] });
|
|
7152
7152
|
},
|
|
7153
7153
|
onMouseLeave: () => {
|
|
7154
7154
|
i(null), d.hide();
|
|
7155
7155
|
}
|
|
7156
7156
|
}
|
|
7157
7157
|
),
|
|
7158
|
-
L > 18 && /* @__PURE__ */ e("text", { x: M(
|
|
7159
|
-
] },
|
|
7158
|
+
L > 18 && /* @__PURE__ */ e("text", { x: M(x.x), y: w(x.y), className: "select-chart__xlabel", textAnchor: "middle", dominantBaseline: "middle", style: { fontWeight: 600 }, children: x.d.label })
|
|
7159
|
+
] }, x.i);
|
|
7160
7160
|
}) }) }),
|
|
7161
7161
|
/* @__PURE__ */ e(K, { tip: d.tip })
|
|
7162
7162
|
] });
|
|
7163
7163
|
});
|
|
7164
7164
|
function Vo({ nodes: t, links: n, height: l = 300, format: c = q, className: s, ...a }) {
|
|
7165
7165
|
const { ref: r, width: d } = ne(l), o = X(), [i, u] = D(null), h = be(() => {
|
|
7166
|
-
const v = d || l,
|
|
7166
|
+
const v = d || l, y = l, N = t.length, $ = /* @__PURE__ */ new Map();
|
|
7167
7167
|
if (!N) return $;
|
|
7168
7168
|
const _ = t.map((k, M) => ({
|
|
7169
7169
|
id: k.id,
|
|
7170
7170
|
x: v / 2 + Math.cos(M / N * 2 * Math.PI) * v * 0.3,
|
|
7171
|
-
y:
|
|
7172
|
-
})), p = new Map(t.map((k, M) => [k.id, M])), b = Math.sqrt(v *
|
|
7171
|
+
y: y / 2 + Math.sin(M / N * 2 * Math.PI) * y * 0.3
|
|
7172
|
+
})), p = new Map(t.map((k, M) => [k.id, M])), b = Math.sqrt(v * y / N) * 0.55;
|
|
7173
7173
|
let S = v * 0.12;
|
|
7174
7174
|
for (let k = 0; k < 320; k++) {
|
|
7175
7175
|
const M = _.map(() => ({ x: 0, y: 0 }));
|
|
7176
7176
|
for (let w = 0; w < N; w++)
|
|
7177
|
-
for (let
|
|
7178
|
-
const C = _[w].x - _[
|
|
7179
|
-
M[w].x += C / B * A, M[w].y += L / B * A, M[
|
|
7177
|
+
for (let x = w + 1; x < N; x++) {
|
|
7178
|
+
const C = _[w].x - _[x].x, L = _[w].y - _[x].y, B = Math.hypot(C, L) || 0.01, A = b * b / B;
|
|
7179
|
+
M[w].x += C / B * A, M[w].y += L / B * A, M[x].x -= C / B * A, M[x].y -= L / B * A;
|
|
7180
7180
|
}
|
|
7181
7181
|
for (const w of n) {
|
|
7182
|
-
const
|
|
7183
|
-
if (
|
|
7184
|
-
const L = _[
|
|
7185
|
-
M[
|
|
7182
|
+
const x = p.get(w.source), C = p.get(w.target);
|
|
7183
|
+
if (x == null || C == null) continue;
|
|
7184
|
+
const L = _[x].x - _[C].x, B = _[x].y - _[C].y, A = Math.hypot(L, B) || 0.01, E = A * A / b;
|
|
7185
|
+
M[x].x -= L / A * E, M[x].y -= B / A * E, M[C].x += L / A * E, M[C].y += B / A * E;
|
|
7186
7186
|
}
|
|
7187
7187
|
for (let w = 0; w < N; w++) {
|
|
7188
|
-
const
|
|
7189
|
-
_[w].x = Math.max(18, Math.min(v - 18, _[w].x +
|
|
7188
|
+
const x = M[w].x, C = M[w].y, L = Math.hypot(x, C) || 0.01, B = Math.min(L, S);
|
|
7189
|
+
_[w].x = Math.max(18, Math.min(v - 18, _[w].x + x / L * B)), _[w].y = Math.max(18, Math.min(y - 18, _[w].y + C / L * B));
|
|
7190
7190
|
}
|
|
7191
7191
|
S *= 0.97;
|
|
7192
7192
|
}
|
|
@@ -7200,7 +7200,7 @@ function Vo({ nodes: t, links: n, height: l = 300, format: c = q, className: s,
|
|
|
7200
7200
|
d > 0 && /* @__PURE__ */ m("svg", { width: d, height: l, className: "select-chart", onMouseLeave: () => {
|
|
7201
7201
|
u(null), o.hide();
|
|
7202
7202
|
}, children: [
|
|
7203
|
-
n.map((v,
|
|
7203
|
+
n.map((v, y) => {
|
|
7204
7204
|
const N = h.get(v.source), $ = h.get(v.target);
|
|
7205
7205
|
if (!N || !$) return null;
|
|
7206
7206
|
const _ = !i || v.source === i || v.target === i;
|
|
@@ -7215,13 +7215,13 @@ function Vo({ nodes: t, links: n, height: l = 300, format: c = q, className: s,
|
|
|
7215
7215
|
strokeWidth: Math.max(1, Math.min(4, v.value ?? 1)),
|
|
7216
7216
|
style: { opacity: _ ? 0.6 : 0.12 }
|
|
7217
7217
|
},
|
|
7218
|
-
|
|
7218
|
+
y
|
|
7219
7219
|
);
|
|
7220
7220
|
}),
|
|
7221
|
-
t.map((v,
|
|
7221
|
+
t.map((v, y) => {
|
|
7222
7222
|
const N = h.get(v.id);
|
|
7223
7223
|
if (!N) return null;
|
|
7224
|
-
const $ = v.color ?? j(v.group ??
|
|
7224
|
+
const $ = v.color ?? j(v.group ?? y), _ = 5 + Math.min(12, (v.value ?? f.get(v.id) ?? 1) * 1.2), p = !g || g.has(v.id);
|
|
7225
7225
|
return /* @__PURE__ */ m("g", { style: { opacity: p ? 1 : 0.3 }, children: [
|
|
7226
7226
|
/* @__PURE__ */ e(
|
|
7227
7227
|
"circle",
|
|
@@ -7250,19 +7250,19 @@ function Fs({ children: t }) {
|
|
|
7250
7250
|
const n = At({ selector: ".select-combobox__option", y: 6, duration: 0.3, stagger: 0.03 });
|
|
7251
7251
|
return /* @__PURE__ */ e("div", { className: "select-combobox__list", ref: n, children: t });
|
|
7252
7252
|
}
|
|
7253
|
-
const Zo = P(function({ label: n, value: l, onChange: c, options: s, placeholder: a = "Selecionar…", searchPlaceholder: r = "Buscar…", labelAction: d, hint: o, error: i, emptyText: u = "Nenhum resultado", disabled: h, required: f, size: g = "md", searchable: v = !0, className:
|
|
7253
|
+
const Zo = P(function({ label: n, value: l, onChange: c, options: s, placeholder: a = "Selecionar…", searchPlaceholder: r = "Buscar…", labelAction: d, hint: o, error: i, emptyText: u = "Nenhum resultado", disabled: h, required: f, size: g = "md", searchable: v = !0, className: y, ...N }, $) {
|
|
7254
7254
|
const _ = ee(), [p, b] = D(!1), [S, k] = D(""), M = s.find((B) => B.value === l), w = be(() => {
|
|
7255
7255
|
const B = S.trim().toLowerCase();
|
|
7256
7256
|
return !v || !B ? s : s.filter((A) => {
|
|
7257
7257
|
var E;
|
|
7258
7258
|
return A.label.toLowerCase().includes(B) || ((E = A.secondary) == null ? void 0 : E.toLowerCase().includes(B));
|
|
7259
7259
|
});
|
|
7260
|
-
}, [s, S, v]),
|
|
7260
|
+
}, [s, S, v]), x = () => {
|
|
7261
7261
|
b(!1), k("");
|
|
7262
7262
|
}, C = (B) => {
|
|
7263
|
-
c(B),
|
|
7263
|
+
c(B), x();
|
|
7264
7264
|
}, L = i ? `${_}-err` : o ? `${_}-hint` : void 0;
|
|
7265
|
-
return /* @__PURE__ */ m("div", { ref: $, ...N, className: `select-field${g === "sm" ? " select-field--sm" : ""}${
|
|
7265
|
+
return /* @__PURE__ */ m("div", { ref: $, ...N, className: `select-field${g === "sm" ? " select-field--sm" : ""}${y ? " " + y : ""}`, children: [
|
|
7266
7266
|
n && /* @__PURE__ */ m("div", { className: "select-field__labelrow", children: [
|
|
7267
7267
|
/* @__PURE__ */ e("label", { className: "select-field__label", htmlFor: _, children: n }),
|
|
7268
7268
|
d
|
|
@@ -7271,7 +7271,7 @@ const Zo = P(function({ label: n, value: l, onChange: c, options: s, placeholder
|
|
|
7271
7271
|
Te,
|
|
7272
7272
|
{
|
|
7273
7273
|
active: p,
|
|
7274
|
-
onClose:
|
|
7274
|
+
onClose: x,
|
|
7275
7275
|
placement: "bottom-start",
|
|
7276
7276
|
role: "listbox",
|
|
7277
7277
|
matchWidth: !0,
|
|
@@ -7281,7 +7281,7 @@ const Zo = P(function({ label: n, value: l, onChange: c, options: s, placeholder
|
|
|
7281
7281
|
id: _,
|
|
7282
7282
|
type: "button",
|
|
7283
7283
|
className: `select-combobox__trigger${i ? " select-input--error" : ""}${p ? " is-open" : ""}`,
|
|
7284
|
-
onClick: () => p ?
|
|
7284
|
+
onClick: () => p ? x() : b(!0),
|
|
7285
7285
|
disabled: h,
|
|
7286
7286
|
"aria-haspopup": "listbox",
|
|
7287
7287
|
"aria-expanded": p,
|
|
@@ -7534,7 +7534,7 @@ function Rs(t) {
|
|
|
7534
7534
|
})) : [];
|
|
7535
7535
|
}
|
|
7536
7536
|
const nr = P(function({ pairs: n, onChange: l, keyPlaceholder: c = "Chave", valuePlaceholder: s = "Valor", keyOptions: a, addLabel: r = "Adicionar", max: d, helpText: o = "Linhas vazias serão ignoradas.", className: i, ...u }, h) {
|
|
7537
|
-
const f = Rs(n), g = ($, _) => l(f.map((p, b) => b === $ ? { ...p, ..._ } : p)), v = ($) => l(f.filter((_, p) => p !== $)),
|
|
7537
|
+
const f = Rs(n), g = ($, _) => l(f.map((p, b) => b === $ ? { ...p, ..._ } : p)), v = ($) => l(f.filter((_, p) => p !== $)), y = () => l([...f, { name: "", value: "" }]), N = d == null || f.length < d;
|
|
7538
7538
|
return /* @__PURE__ */ m("div", { ref: h, ...u, className: `select-kv${i ? " " + i : ""}`, children: [
|
|
7539
7539
|
f.map(($, _) => /* @__PURE__ */ m("div", { className: "select-kv__row", children: [
|
|
7540
7540
|
/* @__PURE__ */ e("div", { className: "select-kv__field", children: a ? /* @__PURE__ */ e(
|
|
@@ -7567,7 +7567,7 @@ const nr = P(function({ pairs: n, onChange: l, keyPlaceholder: c = "Chave", valu
|
|
|
7567
7567
|
) }),
|
|
7568
7568
|
/* @__PURE__ */ e("div", { className: "select-kv__remove", children: /* @__PURE__ */ e(_e, { size: "sm", icon: /* @__PURE__ */ e(Gn, {}), label: "Remover", onClick: () => v(_) }) })
|
|
7569
7569
|
] }, _)),
|
|
7570
|
-
N && /* @__PURE__ */ e("div", { children: /* @__PURE__ */ m(Pc, { onClick:
|
|
7570
|
+
N && /* @__PURE__ */ e("div", { children: /* @__PURE__ */ m(Pc, { onClick: y, children: [
|
|
7571
7571
|
"+ ",
|
|
7572
7572
|
r
|
|
7573
7573
|
] }) }),
|
|
@@ -7652,7 +7652,7 @@ function Os(t) {
|
|
|
7652
7652
|
return n = n % 12 || 12, `${n} : ${String(t.getMinutes()).padStart(2, "0")} ${l}`;
|
|
7653
7653
|
}
|
|
7654
7654
|
const Hs = P(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: u, ...h }, f) {
|
|
7655
|
-
const g = Ps[r], v = Ie(/* @__PURE__ */ new Date()),
|
|
7655
|
+
const g = Ps[r], v = Ie(/* @__PURE__ */ new Date()), y = o ? Ie(o) : null, [N, $] = D(n ?? { from: v, to: v }), [_, p] = D(vt((n == null ? void 0 : n.from) ?? /* @__PURE__ */ new Date())), [b, S] = D(null), k = St(vt(_), -vt(_).getDay()), M = Array.from({ length: 42 }, (A, E) => St(k, E)), w = (A) => y ? Ie(A) > y : !1, x = (A) => A ? g.formatDate(A) : /* @__PURE__ */ e("span", { className: "select-datepicker__placeholder", children: "— / — / ——" }), C = (A) => {
|
|
7656
7656
|
w(A) || (S(null), $((E) => !E.from || E.from && E.to ? { from: A, to: null } : A < Ie(E.from) ? { from: A, to: null } : { from: E.from, to: A }));
|
|
7657
7657
|
}, L = (A) => {
|
|
7658
7658
|
if (A.disabled || !A.range) return;
|
|
@@ -7682,7 +7682,7 @@ const Hs = P(function({ value: n, presets: l = Ds, onApply: c, onCancel: s, acce
|
|
|
7682
7682
|
/* @__PURE__ */ m("div", { className: "select-datepicker__main", children: [
|
|
7683
7683
|
/* @__PURE__ */ e("div", { className: "select-datepicker__fields", children: ["from", "to"].map((A) => /* @__PURE__ */ m("div", { className: "select-datepicker__fieldrow", children: [
|
|
7684
7684
|
/* @__PURE__ */ e("span", { className: "select-datepicker__fieldlabel", children: A === "from" ? g.from : g.to }),
|
|
7685
|
-
/* @__PURE__ */ e("span", { className: "select-datepicker__pill select-datepicker__pill--date", children:
|
|
7685
|
+
/* @__PURE__ */ e("span", { className: "select-datepicker__pill select-datepicker__pill--date", children: x(N[A]) }),
|
|
7686
7686
|
d && /* @__PURE__ */ e("span", { className: "select-datepicker__pill select-datepicker__pill--time", children: Os(N[A]) })
|
|
7687
7687
|
] }, A)) }),
|
|
7688
7688
|
/* @__PURE__ */ m("div", { className: "select-datepicker__calhead", children: [
|
|
@@ -7794,25 +7794,25 @@ function Vs({ size: t }) {
|
|
|
7794
7794
|
}
|
|
7795
7795
|
const cr = P(function({ value: n, max: l = 5, onChange: c, size: s = 20, label: a, disabled: r = !1, className: d, ...o }, i) {
|
|
7796
7796
|
const u = !!c && !r, [h, f] = D(null), g = h ?? n;
|
|
7797
|
-
return /* @__PURE__ */ e("div", { ref: i, ...o, className: `select-rating${u ? " select-rating--interactive" : ""}${d ? " " + d : ""}`, role: u ? "slider" : "img", "aria-label": a ?? `Avaliação ${n} de ${l}`, "aria-valuenow": u ? n : void 0, "aria-valuemin": u ? 0 : void 0, "aria-valuemax": u ? l : void 0, onMouseLeave: () => u && f(null), children: Array.from({ length: l }, (v,
|
|
7798
|
-
const N =
|
|
7797
|
+
return /* @__PURE__ */ e("div", { ref: i, ...o, className: `select-rating${u ? " select-rating--interactive" : ""}${d ? " " + d : ""}`, role: u ? "slider" : "img", "aria-label": a ?? `Avaliação ${n} de ${l}`, "aria-valuenow": u ? n : void 0, "aria-valuemin": u ? 0 : void 0, "aria-valuemax": u ? l : void 0, onMouseLeave: () => u && f(null), children: Array.from({ length: l }, (v, y) => {
|
|
7798
|
+
const N = y < g, $ = /* @__PURE__ */ e("span", { className: `select-rating__star${N ? " is-filled" : ""}`, children: /* @__PURE__ */ e(Vs, { size: s }) });
|
|
7799
7799
|
return u ? /* @__PURE__ */ e(
|
|
7800
7800
|
"button",
|
|
7801
7801
|
{
|
|
7802
7802
|
type: "button",
|
|
7803
7803
|
className: "select-rating__btn",
|
|
7804
|
-
"aria-label": `${
|
|
7805
|
-
onMouseEnter: () => f(
|
|
7806
|
-
onFocus: () => f(
|
|
7804
|
+
"aria-label": `${y + 1} ${y + 1 === 1 ? "estrela" : "estrelas"}`,
|
|
7805
|
+
onMouseEnter: () => f(y + 1),
|
|
7806
|
+
onFocus: () => f(y + 1),
|
|
7807
7807
|
onBlur: () => f(null),
|
|
7808
|
-
onClick: () => c == null ? void 0 : c(
|
|
7808
|
+
onClick: () => c == null ? void 0 : c(y + 1),
|
|
7809
7809
|
children: $
|
|
7810
7810
|
},
|
|
7811
|
-
|
|
7812
|
-
) : /* @__PURE__ */ e("span", { children: $ },
|
|
7811
|
+
y
|
|
7812
|
+
) : /* @__PURE__ */ e("span", { children: $ }, y);
|
|
7813
7813
|
}) });
|
|
7814
|
-
}), sr = P(function({ label: n, value: l, onChange: c, min: s, max: a, step: r = 1, decimal: d = !1, disabled: o = !1, hint: i, error: u, onBlur: h, placeholder: f, size: g = "md", className: v, ...
|
|
7815
|
-
const $ = ee(), _ = (E) => Math.min(a ?? 1 / 0, Math.max(s ?? -1 / 0, E)), p = (E) => Math.round(E * 1e6) / 1e6, b = l ?? 0, S = s != null && b <= s, k = a != null && b >= a, [M, w] = D(!1), [
|
|
7814
|
+
}), sr = P(function({ label: n, value: l, onChange: c, min: s, max: a, step: r = 1, decimal: d = !1, disabled: o = !1, hint: i, error: u, onBlur: h, placeholder: f, size: g = "md", className: v, ...y }, N) {
|
|
7815
|
+
const $ = ee(), _ = (E) => Math.min(a ?? 1 / 0, Math.max(s ?? -1 / 0, E)), p = (E) => Math.round(E * 1e6) / 1e6, b = l ?? 0, S = s != null && b <= s, k = a != null && b >= a, [M, w] = D(!1), [x, C] = D(""), L = d && M ? x : l == null ? "" : String(l), B = (E) => {
|
|
7816
7816
|
const F = d ? E.replace(/[^\d.,-]/g, "").replace(",", ".") : E.replace(/[^\d-]/g, "");
|
|
7817
7817
|
if (d && C(F), F === "" || F === "-" || F === ".") return c(null);
|
|
7818
7818
|
const T = Number(F);
|
|
@@ -7821,7 +7821,7 @@ const cr = P(function({ value: n, max: l = 5, onChange: c, size: s = 20, label:
|
|
|
7821
7821
|
const F = _(p(b + E));
|
|
7822
7822
|
d && C(String(F)), c(F);
|
|
7823
7823
|
};
|
|
7824
|
-
return /* @__PURE__ */ m("div", { ref: N, ...
|
|
7824
|
+
return /* @__PURE__ */ m("div", { ref: N, ...y, className: `select-field${g === "sm" ? " select-field--sm" : ""}${v ? " " + v : ""}`, children: [
|
|
7825
7825
|
n && /* @__PURE__ */ e(et, { htmlFor: $, label: n }),
|
|
7826
7826
|
/* @__PURE__ */ m("div", { className: "select-numfield", children: [
|
|
7827
7827
|
/* @__PURE__ */ e(
|
|
@@ -7885,7 +7885,7 @@ function ar({
|
|
|
7885
7885
|
emptyState: u,
|
|
7886
7886
|
helpText: h
|
|
7887
7887
|
}) {
|
|
7888
|
-
const f = d == null || t.length < d, g = t.length > r, v = (_, p) => n(t.map((b, S) => S === _ ? p : b)),
|
|
7888
|
+
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 !== _)), N = (_, p) => {
|
|
7889
7889
|
const b = _ + p;
|
|
7890
7890
|
if (b < 0 || b >= t.length) return;
|
|
7891
7891
|
const S = t.slice(), k = S[_];
|
|
@@ -7897,7 +7897,7 @@ function ar({
|
|
|
7897
7897
|
canRemove: g,
|
|
7898
7898
|
update: (b) => v(p, { ..._, ...b }),
|
|
7899
7899
|
set: (b) => v(p, b),
|
|
7900
|
-
remove: () =>
|
|
7900
|
+
remove: () => y(p),
|
|
7901
7901
|
moveUp: () => N(p, -1),
|
|
7902
7902
|
moveDown: () => N(p, 1)
|
|
7903
7903
|
});
|
|
@@ -8013,13 +8013,13 @@ function Gs(t) {
|
|
|
8013
8013
|
});
|
|
8014
8014
|
}
|
|
8015
8015
|
const dr = P(function({ label: n, value: l, onChange: c, accept: s = "image/*", maxSizeMB: a = 3, urlPlaceholder: r, hint: d, uploadFile: o, className: i, ...u }, h) {
|
|
8016
|
-
const [f, g] = D([]), [v,
|
|
8016
|
+
const [f, g] = D([]), [v, y] = D(null), N = l ? [l] : [], $ = async (_) => {
|
|
8017
8017
|
const p = _[0];
|
|
8018
8018
|
if (!p) {
|
|
8019
8019
|
g([]);
|
|
8020
8020
|
return;
|
|
8021
8021
|
}
|
|
8022
|
-
if (
|
|
8022
|
+
if (y(null), !o) {
|
|
8023
8023
|
c(await Gs(p)), g([]);
|
|
8024
8024
|
return;
|
|
8025
8025
|
}
|
|
@@ -8027,7 +8027,7 @@ const dr = P(function({ label: n, value: l, onChange: c, accept: s = "image/*",
|
|
|
8027
8027
|
try {
|
|
8028
8028
|
c(await o(p));
|
|
8029
8029
|
} catch (b) {
|
|
8030
|
-
|
|
8030
|
+
y(b instanceof Error ? b.message : "Não foi possível enviar a imagem.");
|
|
8031
8031
|
} finally {
|
|
8032
8032
|
g([]);
|
|
8033
8033
|
}
|
|
@@ -8092,7 +8092,7 @@ export {
|
|
|
8092
8092
|
Ia as AppsIcon,
|
|
8093
8093
|
Wn as ArrowLeftIcon,
|
|
8094
8094
|
ga as ArrowRightIcon,
|
|
8095
|
-
|
|
8095
|
+
ya as AtIcon,
|
|
8096
8096
|
pa as AuthAppIcon,
|
|
8097
8097
|
da as BellIcon,
|
|
8098
8098
|
aa as BookmarkIcon,
|
|
@@ -8166,7 +8166,7 @@ export {
|
|
|
8166
8166
|
uo as SelectBullet,
|
|
8167
8167
|
Do as SelectBump,
|
|
8168
8168
|
fe as SelectButton,
|
|
8169
|
-
|
|
8169
|
+
yo as SelectCalendarHeatmap,
|
|
8170
8170
|
vo as SelectCandlestick,
|
|
8171
8171
|
ea as SelectCard,
|
|
8172
8172
|
X1 as SelectChartCard,
|
|
@@ -8256,7 +8256,7 @@ export {
|
|
|
8256
8256
|
t1 as SelectPaymentBrand,
|
|
8257
8257
|
za as SelectPhoneField,
|
|
8258
8258
|
Xo as SelectPlanCard,
|
|
8259
|
-
|
|
8259
|
+
xo as SelectPolarArea,
|
|
8260
8260
|
Te as SelectPopover,
|
|
8261
8261
|
Z1 as SelectPreviewFrame,
|
|
8262
8262
|
oo as SelectProgressList,
|
|
@@ -8278,7 +8278,7 @@ export {
|
|
|
8278
8278
|
Ms as SelectSensitiveValue,
|
|
8279
8279
|
_1 as SelectSettingList,
|
|
8280
8280
|
v1 as SelectSettingRow,
|
|
8281
|
-
|
|
8281
|
+
x1 as SelectSideNav,
|
|
8282
8282
|
p1 as SelectSkeleton,
|
|
8283
8283
|
No as SelectSlope,
|
|
8284
8284
|
K1 as SelectSparkline,
|
|
@@ -8295,7 +8295,7 @@ export {
|
|
|
8295
8295
|
bn as SelectTableCell,
|
|
8296
8296
|
zc as SelectTableEmpty,
|
|
8297
8297
|
gn as SelectTableRow,
|
|
8298
|
-
|
|
8298
|
+
y1 as SelectTabs,
|
|
8299
8299
|
O1 as SelectTagSelect,
|
|
8300
8300
|
Ye as SelectText,
|
|
8301
8301
|
Wa as SelectTextarea,
|
|
@@ -8336,7 +8336,7 @@ export {
|
|
|
8336
8336
|
ia as UserIcon,
|
|
8337
8337
|
ka as WalletIcon,
|
|
8338
8338
|
Ol as WarningIcon,
|
|
8339
|
-
|
|
8339
|
+
xa as Web3Icon,
|
|
8340
8340
|
it as detectSelectTheme,
|
|
8341
8341
|
dc as dialCodeOf,
|
|
8342
8342
|
Wc as passwordScore,
|