@selectwin/kit 0.1.12 → 0.1.14
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/SelectTabs.d.ts +4 -1
- package/dist/index.js +593 -590
- 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,46 +2870,49 @@ 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
|
|
2874
|
-
const
|
|
2873
|
+
function y1({ tabs: t, value: n, onChange: l, end: c, className: s, ...a }) {
|
|
2874
|
+
const r = Y(null), [d, o] = D({ left: 0, width: 0 });
|
|
2875
2875
|
Ee(() => {
|
|
2876
|
-
const
|
|
2877
|
-
if (!
|
|
2878
|
-
const
|
|
2879
|
-
const
|
|
2880
|
-
if (!
|
|
2881
|
-
|
|
2876
|
+
const u = r.current;
|
|
2877
|
+
if (!u) return;
|
|
2878
|
+
const h = () => {
|
|
2879
|
+
const g = u.querySelector(".select-tab--active");
|
|
2880
|
+
if (!g) {
|
|
2881
|
+
o((N) => N.width === 0 ? N : { left: N.left, width: 0 });
|
|
2882
2882
|
return;
|
|
2883
2883
|
}
|
|
2884
|
-
const
|
|
2885
|
-
|
|
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
|
-
|
|
2888
|
-
const
|
|
2889
|
-
return
|
|
2887
|
+
h();
|
|
2888
|
+
const f = typeof ResizeObserver < "u" ? new ResizeObserver(h) : null;
|
|
2889
|
+
return f == null || f.observe(u), () => f == null ? void 0 : f.disconnect();
|
|
2890
2890
|
}, [n, t.length]);
|
|
2891
|
-
const
|
|
2892
|
-
"--tab-ind-left": `${
|
|
2893
|
-
"--tab-ind-width": `${
|
|
2891
|
+
const i = {
|
|
2892
|
+
"--tab-ind-left": `${d.left}px`,
|
|
2893
|
+
"--tab-ind-width": `${d.width}px`
|
|
2894
2894
|
};
|
|
2895
|
-
return /* @__PURE__ */
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2895
|
+
return /* @__PURE__ */ m("div", { ...a, className: `select-tabs${s ? " " + s : ""}`, role: "tablist", ref: r, style: i, children: [
|
|
2896
|
+
t.map((u) => {
|
|
2897
|
+
const h = u.id === n;
|
|
2898
|
+
return /* @__PURE__ */ m(
|
|
2899
|
+
"button",
|
|
2900
|
+
{
|
|
2901
|
+
type: "button",
|
|
2902
|
+
role: "tab",
|
|
2903
|
+
"aria-selected": h,
|
|
2904
|
+
className: `select-tab${h ? " select-tab--active" : ""}`,
|
|
2905
|
+
onClick: () => l(u.id),
|
|
2906
|
+
children: [
|
|
2907
|
+
u.dot && /* @__PURE__ */ e("span", { className: `select-tab__dot select-tab__dot--${u.dot}`, "aria-hidden": "true" }),
|
|
2908
|
+
u.label
|
|
2909
|
+
]
|
|
2910
|
+
},
|
|
2911
|
+
u.id
|
|
2912
|
+
);
|
|
2913
|
+
}),
|
|
2914
|
+
c != null && /* @__PURE__ */ e("div", { className: "select-tabs__end", children: c })
|
|
2915
|
+
] });
|
|
2913
2916
|
}
|
|
2914
2917
|
function ul(t, n) {
|
|
2915
2918
|
var l;
|
|
@@ -2967,7 +2970,7 @@ function Yc({
|
|
|
2967
2970
|
] }) })
|
|
2968
2971
|
] });
|
|
2969
2972
|
}
|
|
2970
|
-
const
|
|
2973
|
+
const x1 = P(function({ sections: n, active: l, onSelect: c, header: s, className: a, ...r }, d) {
|
|
2971
2974
|
return /* @__PURE__ */ m("nav", { ref: d, ...r, className: `select-sidenav${a ? " " + a : ""}`, children: [
|
|
2972
2975
|
s && /* @__PURE__ */ e("div", { className: "select-sidenav__header", children: s }),
|
|
2973
2976
|
n.map((o, i) => /* @__PURE__ */ m("div", { className: "select-sidenav__section", children: [
|
|
@@ -3005,7 +3008,7 @@ const y1 = P(function({ sections: n, active: l, onSelect: c, header: s, classNam
|
|
|
3005
3008
|
s && /* @__PURE__ */ e("kbd", { className: "select-search__kbd", children: s })
|
|
3006
3009
|
] });
|
|
3007
3010
|
}), qc = P(function({ columns: n, children: l, empty: c, footer: s, title: a, action: r, filters: d, className: o, ...i }, u) {
|
|
3008
|
-
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";
|
|
3009
3012
|
return /* @__PURE__ */ m("div", { ref: u, ...i, className: `select-table${v ? " select-table--empty" : ""}${o ? " " + o : ""}`, style: { "--select-table-cols": N }, children: [
|
|
3010
3013
|
g && /* @__PURE__ */ m("div", { className: "select-table__title", children: [
|
|
3011
3014
|
a != null && /* @__PURE__ */ e("h3", { className: "select-table__titletext", children: a }),
|
|
@@ -3034,7 +3037,7 @@ const y1 = P(function({ sections: n, active: l, onSelect: c, header: s, classNam
|
|
|
3034
3037
|
},
|
|
3035
3038
|
_
|
|
3036
3039
|
)) }),
|
|
3037
|
-
/* @__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 }) })
|
|
3038
3041
|
] }) }),
|
|
3039
3042
|
s && /* @__PURE__ */ e("div", { className: "select-table__footer", children: s })
|
|
3040
3043
|
] });
|
|
@@ -3187,14 +3190,14 @@ function Et({
|
|
|
3187
3190
|
dividedHeader: u = !1,
|
|
3188
3191
|
theme: h = "light"
|
|
3189
3192
|
}) {
|
|
3190
|
-
const [f, g] = D(t), [v,
|
|
3193
|
+
const [f, g] = D(t), [v, y] = D(!1);
|
|
3191
3194
|
if (ce(() => {
|
|
3192
3195
|
if (t)
|
|
3193
|
-
g(!0),
|
|
3196
|
+
g(!0), y(!1);
|
|
3194
3197
|
else if (f) {
|
|
3195
|
-
|
|
3198
|
+
y(!0);
|
|
3196
3199
|
const _ = setTimeout(() => {
|
|
3197
|
-
g(!1),
|
|
3200
|
+
g(!1), y(!1);
|
|
3198
3201
|
}, Qc);
|
|
3199
3202
|
return () => clearTimeout(_);
|
|
3200
3203
|
}
|
|
@@ -3272,19 +3275,19 @@ function B1({
|
|
|
3272
3275
|
u(null);
|
|
3273
3276
|
return;
|
|
3274
3277
|
}
|
|
3275
|
-
const v = (($ = r.current) == null ? void 0 : $.firstElementChild) ?? r.current,
|
|
3276
|
-
if (!v || !
|
|
3278
|
+
const v = (($ = r.current) == null ? void 0 : $.firstElementChild) ?? r.current, y = d.current;
|
|
3279
|
+
if (!v || !y) return;
|
|
3277
3280
|
const N = nl(
|
|
3278
3281
|
v.getBoundingClientRect(),
|
|
3279
|
-
{ width:
|
|
3282
|
+
{ width: y.offsetWidth, height: y.offsetHeight },
|
|
3280
3283
|
l,
|
|
3281
3284
|
6
|
|
3282
3285
|
);
|
|
3283
3286
|
u({ top: N.top, left: N.left });
|
|
3284
3287
|
}, [s, l]), ce(() => {
|
|
3285
3288
|
if (!s) return;
|
|
3286
|
-
const v = (
|
|
3287
|
-
|
|
3289
|
+
const v = (y) => {
|
|
3290
|
+
y.key === "Escape" && a(!1);
|
|
3288
3291
|
};
|
|
3289
3292
|
return document.addEventListener("keydown", v), () => document.removeEventListener("keydown", v);
|
|
3290
3293
|
}, [s]), /* @__PURE__ */ m(me, { children: [
|
|
@@ -3453,7 +3456,7 @@ function ts(t, n, l, c, s, a) {
|
|
|
3453
3456
|
return a && c != null && c > 0 && r.push(`Página ${l} de ${c}`), r.length > 0 ? r.join(" · ") : null;
|
|
3454
3457
|
}
|
|
3455
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) {
|
|
3456
|
-
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, _);
|
|
3457
3460
|
return /* @__PURE__ */ m("nav", { ref: g, ...f, className: `select-pagination${h ? " " + h : ""}`, "aria-label": "Paginação", children: [
|
|
3458
3461
|
/* @__PURE__ */ m("div", { className: "select-pagination__controls", children: [
|
|
3459
3462
|
/* @__PURE__ */ e(
|
|
@@ -3486,7 +3489,7 @@ const ns = P(function({ page: n, pageCount: l, total: c, pageSize: s, hasPreviou
|
|
|
3486
3489
|
type: "button",
|
|
3487
3490
|
className: "select-pagination__nav",
|
|
3488
3491
|
onClick: $,
|
|
3489
|
-
disabled: !
|
|
3492
|
+
disabled: !y || !$,
|
|
3490
3493
|
"aria-label": "Próxima página",
|
|
3491
3494
|
children: /* @__PURE__ */ e(ot, {})
|
|
3492
3495
|
}
|
|
@@ -3509,14 +3512,14 @@ function cs(t, n) {
|
|
|
3509
3512
|
} catch {
|
|
3510
3513
|
}
|
|
3511
3514
|
}
|
|
3512
|
-
function
|
|
3515
|
+
function yn(t) {
|
|
3513
3516
|
return t.hideable ?? !!t.title;
|
|
3514
3517
|
}
|
|
3515
|
-
const
|
|
3518
|
+
const xn = "select-datatable:page-size:";
|
|
3516
3519
|
function D1(t, n, l) {
|
|
3517
3520
|
const [c, s] = D(() => {
|
|
3518
3521
|
try {
|
|
3519
|
-
const r = Number(localStorage.getItem(
|
|
3522
|
+
const r = Number(localStorage.getItem(xn + t));
|
|
3520
3523
|
return Number.isInteger(r) && r > 0 && (!l || l.includes(r)) ? r : n;
|
|
3521
3524
|
} catch {
|
|
3522
3525
|
return n;
|
|
@@ -3525,7 +3528,7 @@ function D1(t, n, l) {
|
|
|
3525
3528
|
return [c, (r) => {
|
|
3526
3529
|
s(r);
|
|
3527
3530
|
try {
|
|
3528
|
-
localStorage.setItem(
|
|
3531
|
+
localStorage.setItem(xn + t, String(r));
|
|
3529
3532
|
} catch {
|
|
3530
3533
|
}
|
|
3531
3534
|
}];
|
|
@@ -3547,7 +3550,7 @@ function T1({
|
|
|
3547
3550
|
filters: i,
|
|
3548
3551
|
columnsKey: u
|
|
3549
3552
|
}) {
|
|
3550
|
-
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) => {
|
|
3551
3554
|
f((O) => {
|
|
3552
3555
|
const W = !O.includes(R.key), Z = W ? [...O, R.key] : O.filter((G) => G !== R.key);
|
|
3553
3556
|
return u && cs(u, Z), W && w((G) => G && G.key === R.key ? null : G), Z;
|
|
@@ -3597,7 +3600,7 @@ function T1({
|
|
|
3597
3600
|
"aria-checked": O,
|
|
3598
3601
|
disabled: W,
|
|
3599
3602
|
className: `select-facet__opt${O ? " is-selected" : ""}`,
|
|
3600
|
-
onClick: () =>
|
|
3603
|
+
onClick: () => x(R),
|
|
3601
3604
|
children: [
|
|
3602
3605
|
/* @__PURE__ */ e("span", { children: R.title }),
|
|
3603
3606
|
O && /* @__PURE__ */ e("span", { className: "select-facet__check", "aria-hidden": "true", children: /* @__PURE__ */ e(Le, {}) })
|
|
@@ -3617,7 +3620,7 @@ function T1({
|
|
|
3617
3620
|
a.pageSizeOptions && a.pageSizeOptions.length > 1 && a.onPageSizeChange && /* @__PURE__ */ e("div", { className: "select-datatable__pagesize", children: /* @__PURE__ */ e(
|
|
3618
3621
|
Te,
|
|
3619
3622
|
{
|
|
3620
|
-
active:
|
|
3623
|
+
active: y,
|
|
3621
3624
|
onClose: () => N(!1),
|
|
3622
3625
|
placement: "top-start",
|
|
3623
3626
|
role: "listbox",
|
|
@@ -3625,16 +3628,16 @@ function T1({
|
|
|
3625
3628
|
"button",
|
|
3626
3629
|
{
|
|
3627
3630
|
type: "button",
|
|
3628
|
-
className: `select-facet${
|
|
3631
|
+
className: `select-facet${y ? " is-active" : ""}`,
|
|
3629
3632
|
onClick: () => N((R) => !R),
|
|
3630
|
-
"aria-expanded":
|
|
3633
|
+
"aria-expanded": y,
|
|
3631
3634
|
"aria-haspopup": "listbox",
|
|
3632
3635
|
children: [
|
|
3633
3636
|
/* @__PURE__ */ m("span", { className: "select-facet__label", children: [
|
|
3634
3637
|
a.pageSize ?? "—",
|
|
3635
3638
|
" por página"
|
|
3636
3639
|
] }),
|
|
3637
|
-
/* @__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, {}) })
|
|
3638
3641
|
]
|
|
3639
3642
|
}
|
|
3640
3643
|
),
|
|
@@ -3708,8 +3711,8 @@ function is(t, n) {
|
|
|
3708
3711
|
const l = `${Re(t.getDate())}/${Re(t.getMonth() + 1)}/${t.getFullYear()}`;
|
|
3709
3712
|
return n ? `${l} ${Re(t.getHours())}:${Re(t.getMinutes())}` : l;
|
|
3710
3713
|
}
|
|
3711
|
-
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, ...
|
|
3712
|
-
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 = () => {
|
|
3713
3716
|
d || (M(mt(S ?? /* @__PURE__ */ new Date())), b((W) => !W));
|
|
3714
3717
|
}, F = (W) => {
|
|
3715
3718
|
if (C(W)) return;
|
|
@@ -3737,7 +3740,7 @@ const ds = P(function({ label: n, value: l, onChange: c, showTime: s = !1, place
|
|
|
3737
3740
|
),
|
|
3738
3741
|
/* @__PURE__ */ e("span", { className: "select-datefield__icon", "aria-hidden": "true", children: /* @__PURE__ */ e(Un, {}) })
|
|
3739
3742
|
] });
|
|
3740
|
-
return /* @__PURE__ */ m("div", { ref: N, ...
|
|
3743
|
+
return /* @__PURE__ */ m("div", { ref: N, ...y, className: `select-field${v ? " " + v : ""}`, children: [
|
|
3741
3744
|
n && /* @__PURE__ */ e(et, { htmlFor: _, label: r ? `${n} *` : n }),
|
|
3742
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: [
|
|
3743
3746
|
/* @__PURE__ */ m("div", { className: "select-datepicker__calhead", children: [
|
|
@@ -3822,20 +3825,20 @@ function hs({
|
|
|
3822
3825
|
t.type === "select" ? /* @__PURE__ */ m("div", { className: "select-facet__panel", children: [
|
|
3823
3826
|
f && /* @__PURE__ */ e("div", { className: "select-facet__search", children: /* @__PURE__ */ e(pl, { value: d, onChange: o, placeholder: "Buscar opção…" }) }),
|
|
3824
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) => {
|
|
3825
|
-
const
|
|
3828
|
+
const y = n === v.value;
|
|
3826
3829
|
return /* @__PURE__ */ m(
|
|
3827
3830
|
"button",
|
|
3828
3831
|
{
|
|
3829
3832
|
type: "button",
|
|
3830
3833
|
role: "option",
|
|
3831
|
-
"aria-selected":
|
|
3832
|
-
className: `select-facet__opt${
|
|
3834
|
+
"aria-selected": y,
|
|
3835
|
+
className: `select-facet__opt${y ? " is-selected" : ""}`,
|
|
3833
3836
|
onClick: () => {
|
|
3834
|
-
l(
|
|
3837
|
+
l(y ? "" : v.value), a();
|
|
3835
3838
|
},
|
|
3836
3839
|
children: [
|
|
3837
3840
|
/* @__PURE__ */ e("span", { children: v.label }),
|
|
3838
|
-
|
|
3841
|
+
y && /* @__PURE__ */ e("span", { className: "select-facet__check", "aria-hidden": "true", children: /* @__PURE__ */ e(Le, {}) })
|
|
3839
3842
|
]
|
|
3840
3843
|
},
|
|
3841
3844
|
v.value
|
|
@@ -3867,10 +3870,10 @@ function hs({
|
|
|
3867
3870
|
);
|
|
3868
3871
|
}
|
|
3869
3872
|
const W1 = P(function({ filters: n, values: l, onChange: c, onClearAll: s, search: a, disabled: r, className: d, ...o }, i) {
|
|
3870
|
-
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 = () => {
|
|
3871
3874
|
h([]), g(null), s();
|
|
3872
3875
|
}, k = (M) => {
|
|
3873
|
-
h((w) => w.includes(M) ? w : [...w, M]),
|
|
3876
|
+
h((w) => w.includes(M) ? w : [...w, M]), y(!1), g(M);
|
|
3874
3877
|
};
|
|
3875
3878
|
return /* @__PURE__ */ m("div", { ref: i, ...o, className: `select-filterbar${d ? " " + d : ""}`, children: [
|
|
3876
3879
|
/* @__PURE__ */ m("div", { className: "select-filterbar__row", children: [
|
|
@@ -3915,14 +3918,14 @@ const W1 = P(function({ filters: n, values: l, onChange: c, onClearAll: s, searc
|
|
|
3915
3918
|
Te,
|
|
3916
3919
|
{
|
|
3917
3920
|
active: v,
|
|
3918
|
-
onClose: () =>
|
|
3921
|
+
onClose: () => y(!1),
|
|
3919
3922
|
placement: "bottom-start",
|
|
3920
3923
|
activator: /* @__PURE__ */ m(
|
|
3921
3924
|
"button",
|
|
3922
3925
|
{
|
|
3923
3926
|
type: "button",
|
|
3924
3927
|
className: "select-facet select-facet--more",
|
|
3925
|
-
onClick: () =>
|
|
3928
|
+
onClick: () => y((M) => !M),
|
|
3926
3929
|
disabled: r,
|
|
3927
3930
|
"aria-expanded": v,
|
|
3928
3931
|
children: [
|
|
@@ -3965,7 +3968,7 @@ const W1 = P(function({ filters: n, values: l, onChange: c, onClearAll: s, searc
|
|
|
3965
3968
|
] })
|
|
3966
3969
|
] });
|
|
3967
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) {
|
|
3968
|
-
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);
|
|
3969
3972
|
return /* @__PURE__ */ m("div", { ref: f, ...h, className: `select-field${i === "sm" ? " select-field--sm" : ""}${u ? " " + u : ""}`, children: [
|
|
3970
3973
|
n && /* @__PURE__ */ e("div", { className: "select-field__labelrow", children: /* @__PURE__ */ e("span", { className: "select-field__label", children: n }) }),
|
|
3971
3974
|
/* @__PURE__ */ e(
|
|
@@ -4012,7 +4015,7 @@ const W1 = P(function({ filters: n, values: l, onChange: c, onClearAll: s, searc
|
|
|
4012
4015
|
}
|
|
4013
4016
|
),
|
|
4014
4017
|
children: /* @__PURE__ */ m("div", { className: "select-tagselect__menu", children: [
|
|
4015
|
-
/* @__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…" }) }),
|
|
4016
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) => {
|
|
4017
4020
|
const S = c.includes(b.value);
|
|
4018
4021
|
return /* @__PURE__ */ m(
|
|
@@ -4108,8 +4111,8 @@ function V1() {
|
|
|
4108
4111
|
return t;
|
|
4109
4112
|
}
|
|
4110
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) {
|
|
4111
|
-
const [u, h] = D(s), [f, g] = D(0), [v,
|
|
4112
|
-
|
|
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);
|
|
4113
4116
|
};
|
|
4114
4117
|
return /* @__PURE__ */ m("div", { ref: i, ...o, className: `select-preview${d ? " " + d : ""}`, children: [
|
|
4115
4118
|
/* @__PURE__ */ m("div", { className: "select-preview__bar", children: [
|
|
@@ -4159,7 +4162,7 @@ const vs = { desktop: "100%", mobile: 390 }, Z1 = P(function({ src: n, title: l
|
|
|
4159
4162
|
{
|
|
4160
4163
|
title: l,
|
|
4161
4164
|
src: N,
|
|
4162
|
-
onLoad: () =>
|
|
4165
|
+
onLoad: () => y(!1),
|
|
4163
4166
|
className: "select-preview__iframe"
|
|
4164
4167
|
},
|
|
4165
4168
|
f
|
|
@@ -4171,10 +4174,10 @@ function bs(t) {
|
|
|
4171
4174
|
const n = typeof t == "string" ? Number(t) : t;
|
|
4172
4175
|
return typeof n == "number" && Number.isFinite(n) ? n : 0;
|
|
4173
4176
|
}
|
|
4174
|
-
function
|
|
4177
|
+
function ys(t) {
|
|
4175
4178
|
return gs.format(bs(t) / 100);
|
|
4176
4179
|
}
|
|
4177
|
-
const _l = "sw:hide-money",
|
|
4180
|
+
const _l = "sw:hide-money", xs = { hidden: !1, toggle: () => {
|
|
4178
4181
|
}, setHidden: () => {
|
|
4179
4182
|
} }, vl = zt(null);
|
|
4180
4183
|
function Ns() {
|
|
@@ -4202,7 +4205,7 @@ function G1({ children: t }) {
|
|
|
4202
4205
|
return /* @__PURE__ */ e(vl.Provider, { value: a, children: t });
|
|
4203
4206
|
}
|
|
4204
4207
|
function gl() {
|
|
4205
|
-
return qt(vl) ??
|
|
4208
|
+
return qt(vl) ?? xs;
|
|
4206
4209
|
}
|
|
4207
4210
|
const Ms = P(function({ children: n, label: l = "valor oculto", className: c, ...s }, a) {
|
|
4208
4211
|
const { hidden: r } = gl();
|
|
@@ -4212,7 +4215,7 @@ function lt({
|
|
|
4212
4215
|
cents: t,
|
|
4213
4216
|
sensitive: n = !0
|
|
4214
4217
|
}) {
|
|
4215
|
-
const l =
|
|
4218
|
+
const l = ys(t);
|
|
4216
4219
|
return n ? /* @__PURE__ */ e(Ms, { children: l }) : /* @__PURE__ */ e(me, { children: l });
|
|
4217
4220
|
}
|
|
4218
4221
|
const $s = new Intl.NumberFormat("pt-BR", {
|
|
@@ -4305,9 +4308,9 @@ const Y1 = P(function({ availableCents: n, availableLabel: l = "Saldo disponíve
|
|
|
4305
4308
|
s != null && /* @__PURE__ */ e("div", { className: "select-kpi__chart", children: s }),
|
|
4306
4309
|
c != null && /* @__PURE__ */ e("span", { className: "select-kpi__caption", children: c })
|
|
4307
4310
|
] });
|
|
4308
|
-
}), X1 = P(function({ title: n, caption: l, action: c, loading: s = !1, hideValues: a = !1, height: r = 260,
|
|
4309
|
-
const
|
|
4310
|
-
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: [
|
|
4311
4314
|
(n || c || l) && /* @__PURE__ */ m("div", { className: "select-chartcard__head", children: [
|
|
4312
4315
|
/* @__PURE__ */ m("div", { className: "select-chartcard__heading", children: [
|
|
4313
4316
|
n && /* @__PURE__ */ e("h3", { className: "select-chartcard__title", children: n }),
|
|
@@ -4318,9 +4321,9 @@ const Y1 = P(function({ availableCents: n, availableLabel: l = "Saldo disponíve
|
|
|
4318
4321
|
/* @__PURE__ */ e(
|
|
4319
4322
|
"div",
|
|
4320
4323
|
{
|
|
4321
|
-
className: `select-chartcard__body${a ? " is-blurred" : ""}`,
|
|
4322
|
-
style: { minHeight:
|
|
4323
|
-
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
|
|
4324
4327
|
}
|
|
4325
4328
|
)
|
|
4326
4329
|
] });
|
|
@@ -4363,7 +4366,7 @@ function kt(t, n) {
|
|
|
4363
4366
|
return r.observe(s), () => r.disconnect();
|
|
4364
4367
|
}, [t]), l;
|
|
4365
4368
|
}
|
|
4366
|
-
function
|
|
4369
|
+
function ye(t) {
|
|
4367
4370
|
if (t <= 0) return 1;
|
|
4368
4371
|
const n = Math.floor(Math.log10(t)), l = Math.pow(10, n), c = t / l;
|
|
4369
4372
|
return (c <= 1 ? 1 : c <= 2 ? 2 : c <= 5 ? 5 : 10) * l;
|
|
@@ -4411,7 +4414,7 @@ function bl(t, n) {
|
|
|
4411
4414
|
const l = t[0], c = t[t.length - 1];
|
|
4412
4415
|
return `${je(t)} L${c[0].toFixed(2)},${n.toFixed(2)} L${l[0].toFixed(2)},${n.toFixed(2)} Z`;
|
|
4413
4416
|
}
|
|
4414
|
-
function
|
|
4417
|
+
function yl(t, n) {
|
|
4415
4418
|
if (t.length === 0 || n.length === 0) return "";
|
|
4416
4419
|
const l = je(t), c = je([...n].reverse()).replace(/^M/, "L");
|
|
4417
4420
|
return `${l} ${c} Z`;
|
|
@@ -4446,7 +4449,7 @@ function K1({ data: t, color: n, height: l = 40, className: c, ...s }) {
|
|
|
4446
4449
|
const h = Math.max(...t), f = Math.min(...t), g = h - f || 1, v = t.map((N, $) => [
|
|
4447
4450
|
i + $ / (t.length - 1) * (r - i * 2),
|
|
4448
4451
|
l - i - (N - f) / g * (l - i * 2)
|
|
4449
|
-
]),
|
|
4452
|
+
]), y = v[v.length - 1];
|
|
4450
4453
|
u = /* @__PURE__ */ m("svg", { width: r, height: l, className: "select-chart", "aria-hidden": "true", children: [
|
|
4451
4454
|
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ m("linearGradient", { id: `${o}-sa`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
4452
4455
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: d, stopOpacity: 0.26 }),
|
|
@@ -4466,7 +4469,7 @@ function K1({ data: t, color: n, height: l = 40, className: c, ...s }) {
|
|
|
4466
4469
|
className: "select-chart__line"
|
|
4467
4470
|
}
|
|
4468
4471
|
),
|
|
4469
|
-
/* @__PURE__ */ e("circle", { cx:
|
|
4472
|
+
/* @__PURE__ */ e("circle", { cx: y[0], cy: y[1], r: 2.75, fill: d, className: "select-chart__dot" })
|
|
4470
4473
|
] });
|
|
4471
4474
|
}
|
|
4472
4475
|
return /* @__PURE__ */ e("div", { ...s, className: `select-spark${c ? " " + c : ""}`, ref: a, children: u });
|
|
@@ -4500,7 +4503,7 @@ function K({ tip: t, className: n, ...l }) {
|
|
|
4500
4503
|
] });
|
|
4501
4504
|
}
|
|
4502
4505
|
function J1({ data: t, height: n = 240, color: l, format: c = q, className: s, ...a }) {
|
|
4503
|
-
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;
|
|
4504
4507
|
return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
|
|
4505
4508
|
d > 0 && /* @__PURE__ */ m("svg", { width: d, height: n, className: "select-chart", children: [
|
|
4506
4509
|
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ m("linearGradient", { id: `${i}-bar`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
@@ -4521,7 +4524,7 @@ function J1({ data: t, height: n = 240, color: l, format: c = q, className: s, .
|
|
|
4521
4524
|
/* @__PURE__ */ e("text", { x: f.left - 8, y: _(p), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: c(p) })
|
|
4522
4525
|
] }, b)),
|
|
4523
4526
|
t.map((p, b) => {
|
|
4524
|
-
const S = f.left +
|
|
4527
|
+
const S = f.left + y * b + y / 2, k = p.value / h * v, M = $ - k;
|
|
4525
4528
|
return /* @__PURE__ */ m("g", { children: [
|
|
4526
4529
|
/* @__PURE__ */ e(
|
|
4527
4530
|
"rect",
|
|
@@ -4551,34 +4554,34 @@ function J1({ data: t, height: n = 240, color: l, format: c = q, className: s, .
|
|
|
4551
4554
|
] });
|
|
4552
4555
|
}
|
|
4553
4556
|
function Q1({ series: t, labels: n, height: l = 240, format: c = q, area: s = !1, className: a, ...r }) {
|
|
4554
|
-
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 + $;
|
|
4555
4558
|
return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: d, children: [
|
|
4556
4559
|
o > 0 && /* @__PURE__ */ m("svg", { width: o, height: l, className: "select-chart", children: [
|
|
4557
|
-
/* @__PURE__ */ e("defs", { children: t.map((w,
|
|
4558
|
-
const C = w.color ?? j(
|
|
4559
|
-
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: [
|
|
4560
4563
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: C, stopOpacity: 0.32 }),
|
|
4561
4564
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: C, stopOpacity: 0 })
|
|
4562
|
-
] },
|
|
4565
|
+
] }, x);
|
|
4563
4566
|
}) }),
|
|
4564
|
-
v.map((w,
|
|
4567
|
+
v.map((w, x) => /* @__PURE__ */ m("g", { children: [
|
|
4565
4568
|
/* @__PURE__ */ e(
|
|
4566
4569
|
"line",
|
|
4567
4570
|
{
|
|
4568
|
-
x1:
|
|
4569
|
-
x2: o -
|
|
4571
|
+
x1: y.left,
|
|
4572
|
+
x2: o - y.right,
|
|
4570
4573
|
y1: b(w),
|
|
4571
4574
|
y2: b(w),
|
|
4572
4575
|
className: w === 0 ? "select-chart__axis" : "select-chart__grid"
|
|
4573
4576
|
}
|
|
4574
4577
|
),
|
|
4575
|
-
/* @__PURE__ */ e("text", { x:
|
|
4576
|
-
] },
|
|
4577
|
-
h != null && /* @__PURE__ */ e("line", { x1: p(h), x2: p(h), y1:
|
|
4578
|
-
t.map((w,
|
|
4579
|
-
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)]);
|
|
4580
4583
|
return /* @__PURE__ */ m("g", { children: [
|
|
4581
|
-
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" }),
|
|
4582
4585
|
/* @__PURE__ */ e(
|
|
4583
4586
|
"path",
|
|
4584
4587
|
{
|
|
@@ -4592,46 +4595,46 @@ function Q1({ series: t, labels: n, height: l = 240, format: c = q, area: s = !1
|
|
|
4592
4595
|
className: "select-chart__line"
|
|
4593
4596
|
}
|
|
4594
4597
|
)
|
|
4595
|
-
] },
|
|
4598
|
+
] }, x);
|
|
4596
4599
|
}),
|
|
4597
|
-
h != null && t.map((w,
|
|
4600
|
+
h != null && t.map((w, x) => /* @__PURE__ */ e(
|
|
4598
4601
|
"circle",
|
|
4599
4602
|
{
|
|
4600
4603
|
cx: p(h),
|
|
4601
4604
|
cy: b(w.data[h] ?? 0),
|
|
4602
4605
|
r: 3.5,
|
|
4603
|
-
fill: w.color ?? j(
|
|
4606
|
+
fill: w.color ?? j(x),
|
|
4604
4607
|
className: "select-chart__dot select-chart__dot--active"
|
|
4605
4608
|
},
|
|
4606
|
-
|
|
4609
|
+
x
|
|
4607
4610
|
)),
|
|
4608
4611
|
n.map(
|
|
4609
|
-
(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
|
|
4610
4613
|
),
|
|
4611
|
-
n.map((w,
|
|
4614
|
+
n.map((w, x) => /* @__PURE__ */ e(
|
|
4612
4615
|
"rect",
|
|
4613
4616
|
{
|
|
4614
|
-
x: p(
|
|
4615
|
-
y:
|
|
4617
|
+
x: p(x) - S / 2,
|
|
4618
|
+
y: y.top,
|
|
4616
4619
|
width: S,
|
|
4617
4620
|
height: $,
|
|
4618
4621
|
fill: "transparent",
|
|
4619
4622
|
onMouseEnter: () => {
|
|
4620
|
-
f(
|
|
4621
|
-
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)));
|
|
4622
4625
|
i.show({
|
|
4623
|
-
x: p(
|
|
4626
|
+
x: p(x),
|
|
4624
4627
|
y: C,
|
|
4625
|
-
place: C <
|
|
4628
|
+
place: C < y.top + 52 ? "bottom" : "top",
|
|
4626
4629
|
title: w,
|
|
4627
|
-
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) }))
|
|
4628
4631
|
});
|
|
4629
4632
|
},
|
|
4630
4633
|
onMouseLeave: () => {
|
|
4631
4634
|
f(null), i.hide();
|
|
4632
4635
|
}
|
|
4633
4636
|
},
|
|
4634
|
-
`h${
|
|
4637
|
+
`h${x}`
|
|
4635
4638
|
))
|
|
4636
4639
|
] }),
|
|
4637
4640
|
/* @__PURE__ */ e(K, { tip: i.tip })
|
|
@@ -4639,42 +4642,42 @@ function Q1({ series: t, labels: n, height: l = 240, format: c = q, area: s = !1
|
|
|
4639
4642
|
}
|
|
4640
4643
|
function eo({ series: t, labels: n, height: l = 240, format: c = q, className: s, ...a }) {
|
|
4641
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(
|
|
4642
|
-
(
|
|
4643
|
-
),
|
|
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];
|
|
4644
4647
|
return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
|
|
4645
4648
|
d > 0 && /* @__PURE__ */ m("svg", { width: d, height: l, className: "select-chart", children: [
|
|
4646
|
-
/* @__PURE__ */ e("defs", { children: t.map((
|
|
4647
|
-
const L =
|
|
4649
|
+
/* @__PURE__ */ e("defs", { children: t.map((x, C) => {
|
|
4650
|
+
const L = x.color ?? j(C);
|
|
4648
4651
|
return /* @__PURE__ */ m("linearGradient", { id: `${i}-b${C}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
4649
4652
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: L, stopOpacity: 0.95 }),
|
|
4650
4653
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: L, stopOpacity: 0.4 })
|
|
4651
4654
|
] }, C);
|
|
4652
4655
|
}) }),
|
|
4653
|
-
ke(
|
|
4656
|
+
ke(y).map((x, C) => /* @__PURE__ */ m("g", { children: [
|
|
4654
4657
|
/* @__PURE__ */ e(
|
|
4655
4658
|
"line",
|
|
4656
4659
|
{
|
|
4657
4660
|
x1: N.left,
|
|
4658
4661
|
x2: d - N.right,
|
|
4659
|
-
y1: b(
|
|
4660
|
-
y2: b(
|
|
4662
|
+
y1: b(x),
|
|
4663
|
+
y2: b(x),
|
|
4661
4664
|
className: C === 0 ? "select-chart__axis" : "select-chart__grid"
|
|
4662
4665
|
}
|
|
4663
4666
|
),
|
|
4664
|
-
/* @__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) })
|
|
4665
4668
|
] }, C)),
|
|
4666
|
-
t.map((
|
|
4667
|
-
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)]);
|
|
4668
4671
|
return /* @__PURE__ */ m("g", { className: "select-chart__area", children: [
|
|
4669
|
-
/* @__PURE__ */ e("path", { d:
|
|
4672
|
+
/* @__PURE__ */ e("path", { d: yl(B, A), fill: `url(#${i}-b${C})` }),
|
|
4670
4673
|
/* @__PURE__ */ e("path", { d: je(B), fill: "none", stroke: L, strokeWidth: 1.5, strokeLinecap: "round", strokeLinejoin: "round" })
|
|
4671
4674
|
] }, C);
|
|
4672
4675
|
}),
|
|
4673
4676
|
u != null && /* @__PURE__ */ e("line", { x1: p(u), x2: p(u), y1: N.top, y2: M, className: "select-chart__crosshair" }),
|
|
4674
4677
|
n.map(
|
|
4675
|
-
(
|
|
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
|
|
4676
4679
|
),
|
|
4677
|
-
n.map((
|
|
4680
|
+
n.map((x, C) => /* @__PURE__ */ e(
|
|
4678
4681
|
"rect",
|
|
4679
4682
|
{
|
|
4680
4683
|
x: p(C) - S / 2,
|
|
@@ -4689,7 +4692,7 @@ function eo({ series: t, labels: n, height: l = 240, format: c = q, className: s
|
|
|
4689
4692
|
x: p(C),
|
|
4690
4693
|
y: L,
|
|
4691
4694
|
place: L < N.top + 52 ? "bottom" : "top",
|
|
4692
|
-
title:
|
|
4695
|
+
title: x,
|
|
4693
4696
|
rows: t.map((B, A) => ({ label: B.name, value: c(B.data[C] ?? 0), color: B.color ?? j(A) }))
|
|
4694
4697
|
});
|
|
4695
4698
|
},
|
|
@@ -4704,7 +4707,7 @@ function eo({ series: t, labels: n, height: l = 240, format: c = q, className: s
|
|
|
4704
4707
|
] });
|
|
4705
4708
|
}
|
|
4706
4709
|
function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = q, formatLine: a = (o) => `${Math.round(o)}%`, className: r, ...d }) {
|
|
4707
|
-
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)]);
|
|
4708
4711
|
return /* @__PURE__ */ m("div", { ...d, className: `select-chart-wrap${r ? " " + r : ""}`, ref: o, children: [
|
|
4709
4712
|
i > 0 && /* @__PURE__ */ m("svg", { width: i, height: c, className: "select-chart", children: [
|
|
4710
4713
|
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ m("linearGradient", { id: `${h}-bar`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
@@ -4731,7 +4734,7 @@ function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = q, fo
|
|
|
4731
4734
|
"rect",
|
|
4732
4735
|
{
|
|
4733
4736
|
x: B(F) - S / 2,
|
|
4734
|
-
y:
|
|
4737
|
+
y: x - T,
|
|
4735
4738
|
width: S,
|
|
4736
4739
|
height: Math.max(0, T),
|
|
4737
4740
|
rx: 5,
|
|
@@ -4742,7 +4745,7 @@ function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = q, fo
|
|
|
4742
4745
|
F
|
|
4743
4746
|
);
|
|
4744
4747
|
}),
|
|
4745
|
-
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" }),
|
|
4746
4749
|
/* @__PURE__ */ e(
|
|
4747
4750
|
"path",
|
|
4748
4751
|
{
|
|
@@ -4802,14 +4805,14 @@ function to({ labels: t, bars: n, line: l, height: c = 240, formatBar: s = q, fo
|
|
|
4802
4805
|
] });
|
|
4803
4806
|
}
|
|
4804
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) {
|
|
4805
|
-
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;
|
|
4806
4809
|
let S = 0;
|
|
4807
4810
|
return /* @__PURE__ */ m("div", { ref: h, ...u, className: `select-donut-wrap${i ? " " + i : ""}`, children: [
|
|
4808
4811
|
/* @__PURE__ */ m("div", { ref: v, className: "select-donut-ring", style: { width: `${l / 16}rem`, aspectRatio: "1" }, children: [
|
|
4809
|
-
/* @__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: [
|
|
4810
4813
|
/* @__PURE__ */ e("defs", { children: n.map((k, M) => {
|
|
4811
4814
|
const w = k.color ?? j(M);
|
|
4812
|
-
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: [
|
|
4813
4816
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: w, stopOpacity: 1 }),
|
|
4814
4817
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: w, stopOpacity: 0.6 })
|
|
4815
4818
|
] }, M);
|
|
@@ -4817,7 +4820,7 @@ const no = P(function({ segments: n, size: l = 200, thickness: c = 26, format: s
|
|
|
4817
4820
|
n.map((k, M) => {
|
|
4818
4821
|
const w = S / N * 360;
|
|
4819
4822
|
S += k.value;
|
|
4820
|
-
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);
|
|
4821
4824
|
return /* @__PURE__ */ e(
|
|
4822
4825
|
"path",
|
|
4823
4826
|
{
|
|
@@ -4825,7 +4828,7 @@ const no = P(function({ segments: n, size: l = 200, thickness: c = 26, format: s
|
|
|
4825
4828
|
fill: `url(#${g}-s${M})`,
|
|
4826
4829
|
className: "select-chart__seg",
|
|
4827
4830
|
onMouseEnter: () => {
|
|
4828
|
-
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);
|
|
4829
4832
|
f.show({
|
|
4830
4833
|
x: T,
|
|
4831
4834
|
y: R,
|
|
@@ -4851,31 +4854,31 @@ const no = P(function({ segments: n, size: l = 200, thickness: c = 26, format: s
|
|
|
4851
4854
|
] });
|
|
4852
4855
|
});
|
|
4853
4856
|
function lo({ series: t, labels: n, height: l = 240, format: c = q, stacked: s = !1, className: a, ...r }) {
|
|
4854
|
-
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;
|
|
4855
4858
|
return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: d, children: [
|
|
4856
4859
|
o > 0 && /* @__PURE__ */ m("svg", { width: o, height: l, className: "select-chart", children: [
|
|
4857
4860
|
/* @__PURE__ */ e("defs", { children: t.map((M, w) => {
|
|
4858
|
-
const
|
|
4861
|
+
const x = M.color ?? j(w);
|
|
4859
4862
|
return /* @__PURE__ */ m("linearGradient", { id: `${u}-c${w}`, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
4860
|
-
/* @__PURE__ */ e("stop", { offset: "0%", stopColor:
|
|
4861
|
-
/* @__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 })
|
|
4862
4865
|
] }, w);
|
|
4863
4866
|
}) }),
|
|
4864
4867
|
ke(v).map((M, w) => /* @__PURE__ */ m("g", { children: [
|
|
4865
4868
|
/* @__PURE__ */ e(
|
|
4866
4869
|
"line",
|
|
4867
4870
|
{
|
|
4868
|
-
x1:
|
|
4869
|
-
x2: o -
|
|
4871
|
+
x1: y.left,
|
|
4872
|
+
x2: o - y.right,
|
|
4870
4873
|
y1: b(M),
|
|
4871
4874
|
y2: b(M),
|
|
4872
4875
|
className: w === 0 ? "select-chart__axis" : "select-chart__grid"
|
|
4873
4876
|
}
|
|
4874
4877
|
),
|
|
4875
|
-
/* @__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) })
|
|
4876
4879
|
] }, w)),
|
|
4877
4880
|
n.map((M, w) => {
|
|
4878
|
-
const
|
|
4881
|
+
const x = y.left + p * w;
|
|
4879
4882
|
if (s) {
|
|
4880
4883
|
let L = 0;
|
|
4881
4884
|
return /* @__PURE__ */ e("g", { children: t.map((B, A) => {
|
|
@@ -4883,7 +4886,7 @@ function lo({ series: t, labels: n, height: l = 240, format: c = q, stacked: s =
|
|
|
4883
4886
|
return L += E, /* @__PURE__ */ e(
|
|
4884
4887
|
"rect",
|
|
4885
4888
|
{
|
|
4886
|
-
x:
|
|
4889
|
+
x: x + p / 2 - k / 2,
|
|
4887
4890
|
y: F,
|
|
4888
4891
|
width: k,
|
|
4889
4892
|
height: Math.max(0, E),
|
|
@@ -4896,7 +4899,7 @@ function lo({ series: t, labels: n, height: l = 240, format: c = q, stacked: s =
|
|
|
4896
4899
|
);
|
|
4897
4900
|
}) }, w);
|
|
4898
4901
|
}
|
|
4899
|
-
const C =
|
|
4902
|
+
const C = x + (p - S) / 2;
|
|
4900
4903
|
return /* @__PURE__ */ e("g", { children: t.map((L, B) => {
|
|
4901
4904
|
const A = (L.data[w] ?? 0) / v * $;
|
|
4902
4905
|
return /* @__PURE__ */ e(
|
|
@@ -4915,21 +4918,21 @@ function lo({ series: t, labels: n, height: l = 240, format: c = q, stacked: s =
|
|
|
4915
4918
|
);
|
|
4916
4919
|
}) }, w);
|
|
4917
4920
|
}),
|
|
4918
|
-
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)),
|
|
4919
4922
|
n.map((M, w) => {
|
|
4920
|
-
const
|
|
4923
|
+
const x = s ? b(g[w] ?? 0) : Math.min(...t.map((C) => b(C.data[w] ?? 0)));
|
|
4921
4924
|
return /* @__PURE__ */ e(
|
|
4922
4925
|
"rect",
|
|
4923
4926
|
{
|
|
4924
|
-
x:
|
|
4925
|
-
y:
|
|
4927
|
+
x: y.left + p * w,
|
|
4928
|
+
y: y.top,
|
|
4926
4929
|
width: p,
|
|
4927
4930
|
height: $,
|
|
4928
4931
|
fill: "transparent",
|
|
4929
4932
|
onMouseEnter: () => i.show({
|
|
4930
|
-
x:
|
|
4931
|
-
y,
|
|
4932
|
-
place:
|
|
4933
|
+
x: y.left + p * w + p / 2,
|
|
4934
|
+
y: x,
|
|
4935
|
+
place: x < y.top + 52 ? "bottom" : "top",
|
|
4933
4936
|
title: M,
|
|
4934
4937
|
rows: t.map((C, L) => ({ label: C.name, value: c(C.data[w] ?? 0), color: C.color ?? j(L) }))
|
|
4935
4938
|
}),
|
|
@@ -4980,7 +4983,7 @@ function An(t, n, l, c, s) {
|
|
|
4980
4983
|
return `M ${a.toFixed(2)} ${r.toFixed(2)} A ${l} ${l} 0 0 1 ${d.toFixed(2)} ${o.toFixed(2)}`;
|
|
4981
4984
|
}
|
|
4982
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) {
|
|
4983
|
-
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 });
|
|
4984
4987
|
return /* @__PURE__ */ m("div", { ref: u, ...i, className: `select-gauge${o ? " " + o : ""}`, style: { width: `${s / 16}rem` }, children: [
|
|
4985
4988
|
/* @__PURE__ */ m("div", { className: "select-gauge__ring", style: { width: "100%", aspectRatio: `${s} / ${_}` }, children: [
|
|
4986
4989
|
/* @__PURE__ */ m("svg", { width: "100%", height: "100%", viewBox: `0 0 ${s} ${_}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
@@ -4992,7 +4995,7 @@ const Ls = (t) => `${t.toLocaleString("pt-BR", { maximumFractionDigits: t < 10 ?
|
|
|
4992
4995
|
"path",
|
|
4993
4996
|
{
|
|
4994
4997
|
className: "select-gauge__track",
|
|
4995
|
-
d: An(N, $,
|
|
4998
|
+
d: An(N, $, y, 0, 1),
|
|
4996
4999
|
fill: "none",
|
|
4997
5000
|
strokeWidth: g,
|
|
4998
5001
|
strokeLinecap: "round"
|
|
@@ -5002,7 +5005,7 @@ const Ls = (t) => `${t.toLocaleString("pt-BR", { maximumFractionDigits: t < 10 ?
|
|
|
5002
5005
|
"path",
|
|
5003
5006
|
{
|
|
5004
5007
|
className: "select-gauge__arc",
|
|
5005
|
-
d: An(N, $,
|
|
5008
|
+
d: An(N, $, y, 0, h / 100),
|
|
5006
5009
|
fill: "none",
|
|
5007
5010
|
stroke: r ?? `url(#${f})`,
|
|
5008
5011
|
strokeWidth: g,
|
|
@@ -5019,7 +5022,7 @@ const Ls = (t) => `${t.toLocaleString("pt-BR", { maximumFractionDigits: t < 10 ?
|
|
|
5019
5022
|
c != null && /* @__PURE__ */ e("div", { className: "select-gauge__caption", children: c })
|
|
5020
5023
|
] });
|
|
5021
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) {
|
|
5022
|
-
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 = {
|
|
5023
5026
|
gridTemplateColumns: `minmax(56px, max-content) repeat(${n.length}, minmax(${i}px, 1fr))`
|
|
5024
5027
|
};
|
|
5025
5028
|
return /* @__PURE__ */ m("div", { ref: f, ...h, className: `select-chart-wrap select-heatmap${u ? " " + u : ""}`, style: _, children: [
|
|
@@ -5032,13 +5035,13 @@ const Ls = (t) => `${t.toLocaleString("pt-BR", { maximumFractionDigits: t < 10 ?
|
|
|
5032
5035
|
const M = `${b.label}-${n[k] ?? k}`;
|
|
5033
5036
|
if (S == null || !Number.isFinite(S))
|
|
5034
5037
|
return /* @__PURE__ */ e("div", { className: "select-heatmap__cell select-heatmap__cell--empty" }, M);
|
|
5035
|
-
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);
|
|
5036
5039
|
return /* @__PURE__ */ e(
|
|
5037
5040
|
"div",
|
|
5038
5041
|
{
|
|
5039
5042
|
className: "select-heatmap__cell",
|
|
5040
5043
|
style: {
|
|
5041
|
-
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))`,
|
|
5042
5045
|
color: w > 0.55 ? "#fff" : "var(--select-text)"
|
|
5043
5046
|
},
|
|
5044
5047
|
onMouseEnter: (L) => {
|
|
@@ -5101,15 +5104,15 @@ const Pt = (t) => Number.isFinite(t) ? Math.max(0, Math.min(100, t)) : 0, ro = P
|
|
|
5101
5104
|
return /* @__PURE__ */ m("div", { ref: u, ...i, className: `select-donut-wrap${o ? " " + o : ""}`, children: [
|
|
5102
5105
|
/* @__PURE__ */ m("div", { className: "select-radial", style: { width: l, aspectRatio: "1" }, children: [
|
|
5103
5106
|
/* @__PURE__ */ m("svg", { width: l, height: l, viewBox: `0 0 ${l} ${l}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
5104
|
-
/* @__PURE__ */ e("defs", { children: n.map((v,
|
|
5105
|
-
const N = v.color ?? j(
|
|
5106
|
-
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: [
|
|
5107
5110
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: N, stopOpacity: 1 }),
|
|
5108
5111
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: N, stopOpacity: 0.5 })
|
|
5109
|
-
] },
|
|
5112
|
+
] }, y);
|
|
5110
5113
|
}) }),
|
|
5111
|
-
n.map((v,
|
|
5112
|
-
const N = l / 2 - 2 - c / 2 -
|
|
5114
|
+
n.map((v, y) => {
|
|
5115
|
+
const N = l / 2 - 2 - c / 2 - y * (c + s);
|
|
5113
5116
|
if (N <= c / 2) return null;
|
|
5114
5117
|
const $ = Pt(v.value);
|
|
5115
5118
|
return /* @__PURE__ */ m("g", { transform: `rotate(-90 ${f} ${g})`, children: [
|
|
@@ -5121,7 +5124,7 @@ const Pt = (t) => Number.isFinite(t) ? Math.max(0, Math.min(100, t)) : 0, ro = P
|
|
|
5121
5124
|
cy: g,
|
|
5122
5125
|
r: N,
|
|
5123
5126
|
fill: "none",
|
|
5124
|
-
stroke: `url(#${h}-r${
|
|
5127
|
+
stroke: `url(#${h}-r${y})`,
|
|
5125
5128
|
strokeWidth: c,
|
|
5126
5129
|
strokeLinecap: "round",
|
|
5127
5130
|
pathLength: 100,
|
|
@@ -5130,25 +5133,25 @@ const Pt = (t) => Number.isFinite(t) ? Math.max(0, Math.min(100, t)) : 0, ro = P
|
|
|
5130
5133
|
className: "select-radial__arc"
|
|
5131
5134
|
}
|
|
5132
5135
|
)
|
|
5133
|
-
] },
|
|
5136
|
+
] }, y);
|
|
5134
5137
|
})
|
|
5135
5138
|
] }),
|
|
5136
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) })
|
|
5137
5140
|
] }),
|
|
5138
|
-
d && /* @__PURE__ */ e("ul", { className: "select-donut__legend", children: n.map((v,
|
|
5139
|
-
/* @__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) } }),
|
|
5140
5143
|
/* @__PURE__ */ e("span", { className: "select-donut__leglabel", children: v.label }),
|
|
5141
5144
|
/* @__PURE__ */ e("span", { className: "select-donut__legval", children: a(Pt(v.value)) })
|
|
5142
|
-
] },
|
|
5145
|
+
] }, y)) })
|
|
5143
5146
|
] });
|
|
5144
5147
|
}), En = 6.1, Dt = 12, Bn = 56, As = 0.4;
|
|
5145
5148
|
function io({ data: t, height: n, color: l, format: c = q, formatValue: s, distributed: a = !0, labelWidth: r, className: d, ...o }) {
|
|
5146
|
-
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(
|
|
5147
5150
|
Math.max(Bn, p * En + Dt),
|
|
5148
|
-
Math.max(Bn,
|
|
5149
|
-
), 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));
|
|
5150
5153
|
return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${d ? " " + d : ""}`, ref: v, children: [
|
|
5151
|
-
|
|
5154
|
+
y > 0 && /* @__PURE__ */ m("svg", { width: y, height: g, className: "select-chart", children: [
|
|
5152
5155
|
/* @__PURE__ */ e("defs", { children: t.map((E, F) => {
|
|
5153
5156
|
const T = A(E, F);
|
|
5154
5157
|
return /* @__PURE__ */ m("linearGradient", { id: `${$}-h${F}`, x1: "0", y1: "0", x2: "1", y2: "0", children: [
|
|
@@ -5163,7 +5166,7 @@ function io({ data: t, height: n, color: l, format: c = q, formatValue: s, distr
|
|
|
5163
5166
|
x1: B(E),
|
|
5164
5167
|
x2: B(E),
|
|
5165
5168
|
y1: 6,
|
|
5166
|
-
y2: 6 +
|
|
5169
|
+
y2: 6 + x,
|
|
5167
5170
|
className: F === 0 ? "select-chart__axis" : "select-chart__grid"
|
|
5168
5171
|
}
|
|
5169
5172
|
),
|
|
@@ -5221,7 +5224,7 @@ function ho({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
5221
5224
|
return i = k.value, { ...k, start: 0, end: k.value };
|
|
5222
5225
|
const M = i;
|
|
5223
5226
|
return i += k.value, { ...k, start: M, end: i };
|
|
5224
|
-
}), 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 = {
|
|
5225
5228
|
total: "var(--select-chart-1)",
|
|
5226
5229
|
inc: "var(--select-chart-4)",
|
|
5227
5230
|
dec: "var(--select-chart-3)"
|
|
@@ -5246,17 +5249,17 @@ function ho({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
5246
5249
|
/* @__PURE__ */ e("text", { x: f.left - 8, y: p(k), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(k) })
|
|
5247
5250
|
] }, M)),
|
|
5248
5251
|
u.slice(0, -1).map((k, M) => {
|
|
5249
|
-
const w = f.left + $ * M + $ / 2 + _ / 2,
|
|
5250
|
-
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}`);
|
|
5251
5254
|
}),
|
|
5252
5255
|
u.map((k, M) => {
|
|
5253
|
-
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);
|
|
5254
5257
|
return /* @__PURE__ */ m("g", { children: [
|
|
5255
5258
|
/* @__PURE__ */ e(
|
|
5256
5259
|
"rect",
|
|
5257
5260
|
{
|
|
5258
5261
|
x: w - _ / 2,
|
|
5259
|
-
y,
|
|
5262
|
+
y: x,
|
|
5260
5263
|
width: _,
|
|
5261
5264
|
height: Math.max(2, C),
|
|
5262
5265
|
rx: 4,
|
|
@@ -5265,8 +5268,8 @@ function ho({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
5265
5268
|
style: { animationDelay: `${M * 40}ms` },
|
|
5266
5269
|
onMouseEnter: () => d.show({
|
|
5267
5270
|
x: w,
|
|
5268
|
-
y,
|
|
5269
|
-
place:
|
|
5271
|
+
y: x,
|
|
5272
|
+
place: x < f.top + 52 ? "bottom" : "top",
|
|
5270
5273
|
title: k.label,
|
|
5271
5274
|
rows: k.total ? [{ label: "Total", value: l(k.end), color: b.total }] : [
|
|
5272
5275
|
{ label: "Variação", value: `${k.value >= 0 ? "+" : ""}${l(k.value)}`, color: b[L] },
|
|
@@ -5330,28 +5333,28 @@ function Es(t, n, l) {
|
|
|
5330
5333
|
return;
|
|
5331
5334
|
}
|
|
5332
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);
|
|
5333
|
-
let
|
|
5334
|
-
for (;
|
|
5335
|
-
const p = [...N, g[
|
|
5336
|
+
let y = 0, N = [];
|
|
5337
|
+
for (; y < g.length; ) {
|
|
5338
|
+
const p = [...N, g[y]];
|
|
5336
5339
|
if (N.length === 0 || s(p, v) <= s(N, v))
|
|
5337
|
-
N = p,
|
|
5340
|
+
N = p, y++;
|
|
5338
5341
|
else break;
|
|
5339
5342
|
}
|
|
5340
|
-
const $ = r.slice(0,
|
|
5343
|
+
const $ = r.slice(0, y), _ = N.reduce((p, b) => p + b, 0);
|
|
5341
5344
|
if (i >= u) {
|
|
5342
5345
|
const p = _ / u;
|
|
5343
5346
|
let b = o;
|
|
5344
5347
|
$.forEach((S, k) => {
|
|
5345
5348
|
const M = N[k] / p;
|
|
5346
5349
|
c.push({ x: d, y: b, w: p, h: M, idx: S }), b += M;
|
|
5347
|
-
}), a(r.slice(
|
|
5350
|
+
}), a(r.slice(y), d + p, o, i - p, u);
|
|
5348
5351
|
} else {
|
|
5349
5352
|
const p = _ / i;
|
|
5350
5353
|
let b = d;
|
|
5351
5354
|
$.forEach((S, k) => {
|
|
5352
5355
|
const M = N[k] / p;
|
|
5353
5356
|
c.push({ x: b, y: o, w: M, h: p, idx: S }), b += M;
|
|
5354
|
-
}), a(r.slice(
|
|
5357
|
+
}), a(r.slice(y), d, o + p, i, u - p);
|
|
5355
5358
|
}
|
|
5356
5359
|
};
|
|
5357
5360
|
return a(
|
|
@@ -5374,7 +5377,7 @@ function po({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
5374
5377
|
] }, f);
|
|
5375
5378
|
}) }),
|
|
5376
5379
|
u.map((h, f) => {
|
|
5377
|
-
const g = i[h.idx], v = t[g],
|
|
5380
|
+
const g = i[h.idx], v = t[g], y = h.w > 56 && h.h > 30;
|
|
5378
5381
|
return /* @__PURE__ */ m("g", { children: [
|
|
5379
5382
|
/* @__PURE__ */ e(
|
|
5380
5383
|
"rect",
|
|
@@ -5396,8 +5399,8 @@ function po({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
5396
5399
|
onMouseLeave: d.hide
|
|
5397
5400
|
}
|
|
5398
5401
|
),
|
|
5399
|
-
|
|
5400
|
-
|
|
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) })
|
|
5401
5404
|
] }, f);
|
|
5402
5405
|
})
|
|
5403
5406
|
] }),
|
|
@@ -5405,7 +5408,7 @@ function po({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
5405
5408
|
] });
|
|
5406
5409
|
}
|
|
5407
5410
|
function mo({ series: t, height: n = 240, xFormat: l = q, yFormat: c = q, xMax: s, yMax: a, maxRadius: r = 18, className: d, ...o }) {
|
|
5408
|
-
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;
|
|
5409
5412
|
return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${d ? " " + d : ""}`, ref: i, children: [
|
|
5410
5413
|
u > 0 && /* @__PURE__ */ m("svg", { width: u, height: n, className: "select-chart", children: [
|
|
5411
5414
|
ke(v).map((M, w) => /* @__PURE__ */ m("g", { children: [
|
|
@@ -5423,8 +5426,8 @@ function mo({ series: t, height: n = 240, xFormat: l = q, yFormat: c = q, xMax:
|
|
|
5423
5426
|
] }, `y${w}`)),
|
|
5424
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}`)),
|
|
5425
5428
|
t.map((M, w) => {
|
|
5426
|
-
const
|
|
5427
|
-
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(
|
|
5428
5431
|
"circle",
|
|
5429
5432
|
{
|
|
5430
5433
|
cx: b(C.x),
|
|
@@ -5437,7 +5440,7 @@ function mo({ series: t, height: n = 240, xFormat: l = q, yFormat: c = q, xMax:
|
|
|
5437
5440
|
place: S(C.y) - k(C) < N.top + 52 ? "bottom" : "top",
|
|
5438
5441
|
title: C.label ?? M.name,
|
|
5439
5442
|
rows: [
|
|
5440
|
-
{ label: "X", value: l(C.x), color:
|
|
5443
|
+
{ label: "X", value: l(C.x), color: x },
|
|
5441
5444
|
{ label: "Y", value: c(C.y) },
|
|
5442
5445
|
...C.r != null ? [{ label: "Peso", value: String(C.r) }] : []
|
|
5443
5446
|
]
|
|
@@ -5452,7 +5455,7 @@ function mo({ series: t, height: n = 240, xFormat: l = q, yFormat: c = q, xMax:
|
|
|
5452
5455
|
] });
|
|
5453
5456
|
}
|
|
5454
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) {
|
|
5455
|
-
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";
|
|
5456
5459
|
return /* @__PURE__ */ m("div", { ref: u, ...i, className: `select-donut-wrap${o ? " " + o : ""}`, children: [
|
|
5457
5460
|
/* @__PURE__ */ m("div", { className: "select-radar", style: { width: c, aspectRatio: "1" }, children: [
|
|
5458
5461
|
/* @__PURE__ */ m("svg", { width: c, height: c, viewBox: `0 0 ${c} ${c}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
@@ -5468,16 +5471,16 @@ const fo = P(function({ axes: n, series: l, size: c = 240, max: s, format: a = q
|
|
|
5468
5471
|
return /* @__PURE__ */ e("path", { d: b(n.map(() => M)), className: "select-chart__grid", fill: "none" }, k);
|
|
5469
5472
|
}),
|
|
5470
5473
|
n.map((S, k) => {
|
|
5471
|
-
const [M, w] = p(k, N), [
|
|
5474
|
+
const [M, w] = p(k, N), [x, C] = p(k, N + 14);
|
|
5472
5475
|
return /* @__PURE__ */ m("g", { children: [
|
|
5473
|
-
/* @__PURE__ */ e("line", { x1: v, y1:
|
|
5476
|
+
/* @__PURE__ */ e("line", { x1: v, y1: y, x2: M, y2: w, className: "select-chart__grid" }),
|
|
5474
5477
|
/* @__PURE__ */ e(
|
|
5475
5478
|
"text",
|
|
5476
5479
|
{
|
|
5477
|
-
x
|
|
5480
|
+
x,
|
|
5478
5481
|
y: C,
|
|
5479
5482
|
className: "select-chart__xlabel",
|
|
5480
|
-
textAnchor: Math.abs(
|
|
5483
|
+
textAnchor: Math.abs(x - v) < 4 ? "middle" : x > v ? "start" : "end",
|
|
5481
5484
|
dominantBaseline: "middle",
|
|
5482
5485
|
children: S
|
|
5483
5486
|
}
|
|
@@ -5485,11 +5488,11 @@ const fo = P(function({ axes: n, series: l, size: c = 240, max: s, format: a = q
|
|
|
5485
5488
|
] }, k);
|
|
5486
5489
|
}),
|
|
5487
5490
|
l.map((S, k) => {
|
|
5488
|
-
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);
|
|
5489
5492
|
return /* @__PURE__ */ m("g", { children: [
|
|
5490
5493
|
/* @__PURE__ */ e("path", { d: b(w), fill: `url(#${f}-rd${k})`, stroke: M, strokeWidth: 2, strokeLinejoin: "round", className: "select-chart__area" }),
|
|
5491
|
-
w.map((
|
|
5492
|
-
const [L, B] = p(C,
|
|
5494
|
+
w.map((x, C) => {
|
|
5495
|
+
const [L, B] = p(C, x);
|
|
5493
5496
|
return /* @__PURE__ */ e(
|
|
5494
5497
|
"circle",
|
|
5495
5498
|
{
|
|
@@ -5523,20 +5526,20 @@ const fo = P(function({ axes: n, series: l, size: c = 240, max: s, format: a = q
|
|
|
5523
5526
|
});
|
|
5524
5527
|
function _o({ links: t, height: n = 260, format: l = q, nodeWidth: c = 14, nodeGap: s = 14, className: a, ...r }) {
|
|
5525
5528
|
const { ref: d, width: o } = ne(n), i = X(), u = [], h = [];
|
|
5526
|
-
for (const
|
|
5527
|
-
u.includes(
|
|
5528
|
-
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) => {
|
|
5529
5532
|
const B = /* @__PURE__ */ new Map();
|
|
5530
5533
|
let A = v;
|
|
5531
|
-
return
|
|
5534
|
+
return x.forEach((E, F) => {
|
|
5532
5535
|
const T = g(E, C) * _;
|
|
5533
5536
|
B.set(E, { name: E, y: A, h: T, cursor: A, color: j(F + L) }), A += T + s;
|
|
5534
5537
|
}), B;
|
|
5535
5538
|
}, b = p(u, "source", 0), S = p(h, "target", u.length), k = c, M = o - c, w = (k + M) / 2;
|
|
5536
5539
|
return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: d, children: [
|
|
5537
5540
|
o > 0 && /* @__PURE__ */ m("svg", { width: o, height: n, className: "select-chart", children: [
|
|
5538
|
-
t.map((
|
|
5539
|
-
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;
|
|
5540
5543
|
L.cursor += A, B.cursor += A;
|
|
5541
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`;
|
|
5542
5545
|
return /* @__PURE__ */ e(
|
|
@@ -5549,31 +5552,31 @@ function _o({ links: t, height: n = 260, format: l = q, nodeWidth: c = 14, nodeG
|
|
|
5549
5552
|
x: w,
|
|
5550
5553
|
y: (E + F + A) / 2,
|
|
5551
5554
|
place: "top",
|
|
5552
|
-
title: `${
|
|
5553
|
-
rows: [{ label: "Fluxo", value: l(
|
|
5555
|
+
title: `${x.source} → ${x.target}`,
|
|
5556
|
+
rows: [{ label: "Fluxo", value: l(x.value), color: L.color }]
|
|
5554
5557
|
}),
|
|
5555
5558
|
onMouseLeave: i.hide
|
|
5556
5559
|
},
|
|
5557
5560
|
C
|
|
5558
5561
|
);
|
|
5559
5562
|
}),
|
|
5560
|
-
[...b.values()].map((
|
|
5561
|
-
/* @__PURE__ */ e("rect", { x: 0, y:
|
|
5562
|
-
/* @__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 })
|
|
5563
5566
|
] }, `s${C}`)),
|
|
5564
|
-
[...S.values()].map((
|
|
5565
|
-
/* @__PURE__ */ e("rect", { x: o - c, y:
|
|
5566
|
-
/* @__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 })
|
|
5567
5570
|
] }, `t${C}`))
|
|
5568
5571
|
] }),
|
|
5569
5572
|
/* @__PURE__ */ e(K, { tip: i.tip })
|
|
5570
5573
|
] });
|
|
5571
5574
|
}
|
|
5572
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 }) {
|
|
5573
|
-
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);
|
|
5574
5577
|
return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: d, children: [
|
|
5575
5578
|
o > 0 && /* @__PURE__ */ m("svg", { width: o, height: n, className: "select-chart", children: [
|
|
5576
|
-
M.map((w,
|
|
5579
|
+
M.map((w, x) => /* @__PURE__ */ m("g", { children: [
|
|
5577
5580
|
/* @__PURE__ */ e(
|
|
5578
5581
|
"line",
|
|
5579
5582
|
{
|
|
@@ -5581,13 +5584,13 @@ function vo({ data: t, height: n = 240, format: l = q, upColor: c = "var(--selec
|
|
|
5581
5584
|
x2: o - u.right,
|
|
5582
5585
|
y1: p(w),
|
|
5583
5586
|
y2: p(w),
|
|
5584
|
-
className:
|
|
5587
|
+
className: x === 0 ? "select-chart__axis" : "select-chart__grid"
|
|
5585
5588
|
}
|
|
5586
5589
|
),
|
|
5587
5590
|
/* @__PURE__ */ e("text", { x: u.left - 8, y: p(w), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(w) })
|
|
5588
|
-
] },
|
|
5589
|
-
t.map((w,
|
|
5590
|
-
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)));
|
|
5591
5594
|
return /* @__PURE__ */ m("g", { children: [
|
|
5592
5595
|
/* @__PURE__ */ e("line", { x1: C, x2: C, y1: p(w.high), y2: p(w.low), stroke: B, strokeWidth: 1.5 }),
|
|
5593
5596
|
/* @__PURE__ */ e("rect", { x: C - k / 2, y: A, width: k, height: E, rx: 2, fill: B, fillOpacity: L ? 0.9 : 0.78 }),
|
|
@@ -5595,7 +5598,7 @@ function vo({ data: t, height: n = 240, format: l = q, upColor: c = "var(--selec
|
|
|
5595
5598
|
/* @__PURE__ */ e(
|
|
5596
5599
|
"rect",
|
|
5597
5600
|
{
|
|
5598
|
-
x: u.left + S *
|
|
5601
|
+
x: u.left + S * x,
|
|
5599
5602
|
y: u.top,
|
|
5600
5603
|
width: S,
|
|
5601
5604
|
height: f,
|
|
@@ -5615,14 +5618,14 @@ function vo({ data: t, height: n = 240, format: l = q, upColor: c = "var(--selec
|
|
|
5615
5618
|
onMouseLeave: i.hide
|
|
5616
5619
|
}
|
|
5617
5620
|
)
|
|
5618
|
-
] },
|
|
5621
|
+
] }, x);
|
|
5619
5622
|
})
|
|
5620
5623
|
] }),
|
|
5621
5624
|
/* @__PURE__ */ e(K, { tip: i.tip })
|
|
5622
5625
|
] });
|
|
5623
5626
|
}
|
|
5624
5627
|
function go({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
5625
|
-
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);
|
|
5626
5629
|
return /* @__PURE__ */ m("div", { ...s, className: `select-chart-wrap${c ? " " + c : ""}`, ref: a, children: [
|
|
5627
5630
|
r > 0 && /* @__PURE__ */ m("svg", { width: r, height: n, className: "select-chart", children: [
|
|
5628
5631
|
ke(f).map(($, _) => /* @__PURE__ */ m("g", { children: [
|
|
@@ -5639,7 +5642,7 @@ function go({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
5639
5642
|
/* @__PURE__ */ e("text", { x: o.left - 8, y: g($), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l($) })
|
|
5640
5643
|
] }, _)),
|
|
5641
5644
|
t.map(($, _) => {
|
|
5642
|
-
const p = o.left +
|
|
5645
|
+
const p = o.left + y * _ + y / 2, b = $.color ?? j(_);
|
|
5643
5646
|
return /* @__PURE__ */ m("g", { children: [
|
|
5644
5647
|
/* @__PURE__ */ e("line", { x1: p, x2: p, y1: g($.max), y2: g($.min), stroke: b, strokeWidth: 1.5 }),
|
|
5645
5648
|
/* @__PURE__ */ e("line", { x1: p - N / 4, x2: p + N / 4, y1: g($.max), y2: g($.max), stroke: b, strokeWidth: 1.5 }),
|
|
@@ -5650,9 +5653,9 @@ function go({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
5650
5653
|
/* @__PURE__ */ e(
|
|
5651
5654
|
"rect",
|
|
5652
5655
|
{
|
|
5653
|
-
x: o.left +
|
|
5656
|
+
x: o.left + y * _,
|
|
5654
5657
|
y: o.top,
|
|
5655
|
-
width:
|
|
5658
|
+
width: y,
|
|
5656
5659
|
height: u,
|
|
5657
5660
|
fill: "transparent",
|
|
5658
5661
|
onMouseEnter: () => d.show({
|
|
@@ -5678,7 +5681,7 @@ function go({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
5678
5681
|
] });
|
|
5679
5682
|
}
|
|
5680
5683
|
function bo({ data: t, height: n, min: l, max: c, format: s = q, labelWidth: a = 96, className: r, ...d }) {
|
|
5681
|
-
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);
|
|
5682
5685
|
return /* @__PURE__ */ m("div", { ...d, className: `select-chart-wrap${r ? " " + r : ""}`, ref: g, children: [
|
|
5683
5686
|
v > 0 && /* @__PURE__ */ m("svg", { width: v, height: f, className: "select-chart", children: [
|
|
5684
5687
|
/* @__PURE__ */ e("defs", { children: t.map((L, B) => {
|
|
@@ -5692,17 +5695,17 @@ function bo({ data: t, height: n, min: l, max: c, format: s = q, labelWidth: a =
|
|
|
5692
5695
|
/* @__PURE__ */ e(
|
|
5693
5696
|
"line",
|
|
5694
5697
|
{
|
|
5695
|
-
x1:
|
|
5696
|
-
x2:
|
|
5698
|
+
x1: x(L),
|
|
5699
|
+
x2: x(L),
|
|
5697
5700
|
y1: 6,
|
|
5698
5701
|
y2: 6 + k,
|
|
5699
5702
|
className: B === 0 ? "select-chart__axis" : "select-chart__grid"
|
|
5700
5703
|
}
|
|
5701
5704
|
),
|
|
5702
|
-
/* @__PURE__ */ e("text", { x:
|
|
5705
|
+
/* @__PURE__ */ e("text", { x: x(L), y: f - 26 + 16, className: "select-chart__xlabel", textAnchor: "middle", children: s(L) })
|
|
5703
5706
|
] }, B)),
|
|
5704
5707
|
t.map((L, B) => {
|
|
5705
|
-
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);
|
|
5706
5709
|
return /* @__PURE__ */ m("g", { children: [
|
|
5707
5710
|
/* @__PURE__ */ e(
|
|
5708
5711
|
"rect",
|
|
@@ -5715,41 +5718,41 @@ function bo({ data: t, height: n, min: l, max: c, format: s = q, labelWidth: a =
|
|
|
5715
5718
|
fill: `url(#${N}-rg${B})`,
|
|
5716
5719
|
className: "select-chart__hbar",
|
|
5717
5720
|
style: { animationDelay: `${B * 40}ms` },
|
|
5718
|
-
onMouseEnter: () =>
|
|
5721
|
+
onMouseEnter: () => y.show({
|
|
5719
5722
|
x: E + F / 2,
|
|
5720
5723
|
y: A - w / 2,
|
|
5721
5724
|
place: A - w / 2 < 50 ? "bottom" : "top",
|
|
5722
5725
|
title: L.label,
|
|
5723
5726
|
rows: [{ label: "Intervalo", value: `${s(L.start)} – ${s(L.end)}`, color: T }]
|
|
5724
5727
|
}),
|
|
5725
|
-
onMouseLeave:
|
|
5728
|
+
onMouseLeave: y.hide
|
|
5726
5729
|
}
|
|
5727
5730
|
),
|
|
5728
5731
|
/* @__PURE__ */ e("text", { x: b - 8, y: A, className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: L.label })
|
|
5729
5732
|
] }, B);
|
|
5730
5733
|
})
|
|
5731
5734
|
] }),
|
|
5732
|
-
/* @__PURE__ */ e(K, { tip:
|
|
5735
|
+
/* @__PURE__ */ e(K, { tip: y.tip })
|
|
5733
5736
|
] });
|
|
5734
5737
|
}
|
|
5735
|
-
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) {
|
|
5736
5739
|
const g = X();
|
|
5737
5740
|
ee();
|
|
5738
|
-
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 };
|
|
5739
5742
|
return /* @__PURE__ */ m("div", { ref: f, ...h, className: `select-chart-wrap select-calheat${u ? " " + u : ""}`, style: M, children: [
|
|
5740
5743
|
/* @__PURE__ */ m("svg", { width: S, height: k, className: "select-chart", children: [
|
|
5741
5744
|
c.map(
|
|
5742
|
-
(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
|
|
5743
5746
|
),
|
|
5744
5747
|
s == null ? void 0 : s.map(
|
|
5745
|
-
(w,
|
|
5748
|
+
(w, x) => w ? /* @__PURE__ */ e("text", { x: _ + x * b, y: p - 4, className: "select-chart__xlabel", textAnchor: "start", children: w }, x) : null
|
|
5746
5749
|
),
|
|
5747
5750
|
n.map(
|
|
5748
|
-
(w,
|
|
5749
|
-
const B = _ +
|
|
5751
|
+
(w, x) => w.map((C, L) => {
|
|
5752
|
+
const B = _ + x * b, A = p + L * b;
|
|
5750
5753
|
if (C == null || !Number.isFinite(C))
|
|
5751
|
-
return /* @__PURE__ */ e("rect", { x: B, y: A, width: r, height: r, rx: 3, className: "select-chart__calcell select-chart__calcell--empty" }, `${
|
|
5752
|
-
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);
|
|
5753
5756
|
return /* @__PURE__ */ e(
|
|
5754
5757
|
"rect",
|
|
5755
5758
|
{
|
|
@@ -5764,26 +5767,26 @@ const xo = P(function({ weeks: n, color: l = "var(--select-chart-4)", dayLabels:
|
|
|
5764
5767
|
x: B + r / 2,
|
|
5765
5768
|
y: A,
|
|
5766
5769
|
place: A < 44 ? "bottom" : "top",
|
|
5767
|
-
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}`}`,
|
|
5768
5771
|
rows: [{ label: "Valor", value: a(C), color: l }]
|
|
5769
5772
|
}),
|
|
5770
5773
|
onMouseLeave: g.hide
|
|
5771
5774
|
},
|
|
5772
|
-
`${
|
|
5775
|
+
`${x}-${L}`
|
|
5773
5776
|
);
|
|
5774
5777
|
})
|
|
5775
5778
|
)
|
|
5776
5779
|
] }),
|
|
5777
5780
|
/* @__PURE__ */ e(K, { tip: g.tip })
|
|
5778
5781
|
] });
|
|
5779
|
-
}),
|
|
5780
|
-
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;
|
|
5781
5784
|
return /* @__PURE__ */ m("div", { ref: o, ...d, className: `select-donut-wrap${r ? " " + r : ""}`, children: [
|
|
5782
5785
|
/* @__PURE__ */ m("div", { className: "select-radial", style: { width: l, aspectRatio: "1" }, children: [
|
|
5783
5786
|
/* @__PURE__ */ m("svg", { width: l, height: l, viewBox: `0 0 ${l} ${l}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
5784
5787
|
[0.34, 0.67, 1].map(($, _) => /* @__PURE__ */ e("circle", { cx: u, cy: h, r: f * $, className: "select-chart__grid", fill: "none" }, _)),
|
|
5785
5788
|
n.map(($, _) => {
|
|
5786
|
-
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);
|
|
5787
5790
|
return /* @__PURE__ */ e(
|
|
5788
5791
|
"path",
|
|
5789
5792
|
{
|
|
@@ -5791,7 +5794,7 @@ const xo = P(function({ weeks: n, color: l = "var(--select-chart-4)", dayLabels:
|
|
|
5791
5794
|
fill: S,
|
|
5792
5795
|
fillOpacity: 0.8,
|
|
5793
5796
|
className: "select-chart__seg",
|
|
5794
|
-
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 }] }),
|
|
5795
5798
|
onMouseLeave: i.hide
|
|
5796
5799
|
},
|
|
5797
5800
|
_
|
|
@@ -5808,19 +5811,19 @@ const xo = P(function({ weeks: n, color: l = "var(--select-chart-4)", dayLabels:
|
|
|
5808
5811
|
] });
|
|
5809
5812
|
});
|
|
5810
5813
|
function No({ data: t, leftLabel: n, rightLabel: l, height: c = 240, format: s = q, className: a, ...r }) {
|
|
5811
|
-
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;
|
|
5812
5815
|
return /* @__PURE__ */ m("div", { ...r, className: `select-chart-wrap${a ? " " + a : ""}`, ref: d, children: [
|
|
5813
5816
|
o > 0 && /* @__PURE__ */ m("svg", { width: o, height: c, className: "select-chart", children: [
|
|
5814
5817
|
/* @__PURE__ */ e("line", { x1: v, x2: v, y1: u.top, y2: u.top + f, className: "select-chart__axis" }),
|
|
5815
|
-
/* @__PURE__ */ e("line", { x1:
|
|
5818
|
+
/* @__PURE__ */ e("line", { x1: y, x2: y, y1: u.top, y2: u.top + f, className: "select-chart__axis" }),
|
|
5816
5819
|
n && /* @__PURE__ */ e("text", { x: v, y: u.top - 10, className: "select-chart__xlabel", textAnchor: "middle", children: n }),
|
|
5817
|
-
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 }),
|
|
5818
5821
|
t.map((N, $) => {
|
|
5819
5822
|
const _ = N.color ?? j($), p = g(N.left), b = g(N.right);
|
|
5820
5823
|
return /* @__PURE__ */ m("g", { children: [
|
|
5821
|
-
/* @__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 }),
|
|
5822
5825
|
/* @__PURE__ */ e("circle", { cx: v, cy: p, r: 3.5, fill: _, className: "select-chart__dot" }),
|
|
5823
|
-
/* @__PURE__ */ e("circle", { cx:
|
|
5826
|
+
/* @__PURE__ */ e("circle", { cx: y, cy: b, r: 3.5, fill: _, className: "select-chart__dot" }),
|
|
5824
5827
|
/* @__PURE__ */ m("text", { x: v - 10, y: p, className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: [
|
|
5825
5828
|
N.label,
|
|
5826
5829
|
" · ",
|
|
@@ -5832,11 +5835,11 @@ function No({ data: t, leftLabel: n, rightLabel: l, height: c = 240, format: s =
|
|
|
5832
5835
|
{
|
|
5833
5836
|
x: v,
|
|
5834
5837
|
y: Math.min(p, b) - 6,
|
|
5835
|
-
width: Math.max(0,
|
|
5838
|
+
width: Math.max(0, y - v),
|
|
5836
5839
|
height: Math.abs(b - p) + 12,
|
|
5837
5840
|
fill: "transparent",
|
|
5838
5841
|
onMouseEnter: () => i.show({
|
|
5839
|
-
x: (v +
|
|
5842
|
+
x: (v + y) / 2,
|
|
5840
5843
|
y: (p + b) / 2,
|
|
5841
5844
|
place: "top",
|
|
5842
5845
|
title: N.label,
|
|
@@ -5855,10 +5858,10 @@ function No({ data: t, leftLabel: n, rightLabel: l, height: c = 240, format: s =
|
|
|
5855
5858
|
] });
|
|
5856
5859
|
}
|
|
5857
5860
|
function Mo({ data: t, height: n, format: l = q, fromLabel: c = "Antes", toLabel: s = "Depois", labelWidth: a = 96, className: r, ...d }) {
|
|
5858
|
-
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;
|
|
5859
5862
|
return /* @__PURE__ */ m("div", { ...d, className: `select-chart-wrap${r ? " " + r : ""}`, ref: g, children: [
|
|
5860
5863
|
v > 0 && /* @__PURE__ */ m("svg", { width: v, height: f, className: "select-chart", children: [
|
|
5861
|
-
ke(_).map((w,
|
|
5864
|
+
ke(_).map((w, x) => /* @__PURE__ */ m("g", { children: [
|
|
5862
5865
|
/* @__PURE__ */ e(
|
|
5863
5866
|
"line",
|
|
5864
5867
|
{
|
|
@@ -5866,13 +5869,13 @@ function Mo({ data: t, height: n, format: l = q, fromLabel: c = "Antes", toLabel
|
|
|
5866
5869
|
x2: M(w),
|
|
5867
5870
|
y1: 6,
|
|
5868
5871
|
y2: 6 + S,
|
|
5869
|
-
className:
|
|
5872
|
+
className: x === 0 ? "select-chart__axis" : "select-chart__grid"
|
|
5870
5873
|
}
|
|
5871
5874
|
),
|
|
5872
5875
|
/* @__PURE__ */ e("text", { x: M(w), y: f - 26 + 16, className: "select-chart__xlabel", textAnchor: "middle", children: l(w) })
|
|
5873
|
-
] },
|
|
5874
|
-
t.map((w,
|
|
5875
|
-
const C = 6 + k *
|
|
5876
|
+
] }, x)),
|
|
5877
|
+
t.map((w, x) => {
|
|
5878
|
+
const C = 6 + k * x + k / 2;
|
|
5876
5879
|
return /* @__PURE__ */ m("g", { children: [
|
|
5877
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" }),
|
|
5878
5881
|
/* @__PURE__ */ e("circle", { cx: M(w.from), cy: C, r: 5, fill: N, className: "select-chart__dot" }),
|
|
@@ -5886,7 +5889,7 @@ function Mo({ data: t, height: n, format: l = q, fromLabel: c = "Antes", toLabel
|
|
|
5886
5889
|
width: b,
|
|
5887
5890
|
height: k,
|
|
5888
5891
|
fill: "transparent",
|
|
5889
|
-
onMouseEnter: () =>
|
|
5892
|
+
onMouseEnter: () => y.show({
|
|
5890
5893
|
x: (M(w.from) + M(w.to)) / 2,
|
|
5891
5894
|
y: C - 8,
|
|
5892
5895
|
place: C - 8 < 50 ? "bottom" : "top",
|
|
@@ -5897,13 +5900,13 @@ function Mo({ data: t, height: n, format: l = q, fromLabel: c = "Antes", toLabel
|
|
|
5897
5900
|
{ label: "Δ", value: `${w.to - w.from >= 0 ? "+" : ""}${l(w.to - w.from)}` }
|
|
5898
5901
|
]
|
|
5899
5902
|
}),
|
|
5900
|
-
onMouseLeave:
|
|
5903
|
+
onMouseLeave: y.hide
|
|
5901
5904
|
}
|
|
5902
5905
|
)
|
|
5903
|
-
] },
|
|
5906
|
+
] }, x);
|
|
5904
5907
|
})
|
|
5905
5908
|
] }),
|
|
5906
|
-
/* @__PURE__ */ e(K, { tip:
|
|
5909
|
+
/* @__PURE__ */ e(K, { tip: y.tip })
|
|
5907
5910
|
] });
|
|
5908
5911
|
}
|
|
5909
5912
|
function $o({ columns: t, height: n = 240, format: l = q, gap: c = 3, className: s, ...a }) {
|
|
@@ -5911,7 +5914,7 @@ function $o({ columns: t, height: n = 240, format: l = q, gap: c = 3, className:
|
|
|
5911
5914
|
t.forEach((p) => p.segments.forEach((b) => {
|
|
5912
5915
|
v.includes(b.key) || v.push(b.key);
|
|
5913
5916
|
}));
|
|
5914
|
-
const
|
|
5917
|
+
const y = (p, b) => b ?? j(v.indexOf(p)), N = c * Math.max(0, t.length - 1), $ = Math.max(0, u - N);
|
|
5915
5918
|
let _ = i.left;
|
|
5916
5919
|
return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
|
|
5917
5920
|
d > 0 && /* @__PURE__ */ e("svg", { width: d, height: n, className: "select-chart", children: t.map((p, b) => {
|
|
@@ -5919,10 +5922,10 @@ function $o({ columns: t, height: n = 240, format: l = q, gap: c = 3, className:
|
|
|
5919
5922
|
_ += k + c;
|
|
5920
5923
|
let w = i.top;
|
|
5921
5924
|
return /* @__PURE__ */ m("g", { children: [
|
|
5922
|
-
p.segments.map((
|
|
5923
|
-
const L =
|
|
5925
|
+
p.segments.map((x, C) => {
|
|
5926
|
+
const L = x.value / S * h, B = w;
|
|
5924
5927
|
w += L;
|
|
5925
|
-
const A = x
|
|
5928
|
+
const A = y(x.key, x.color);
|
|
5926
5929
|
return /* @__PURE__ */ e(
|
|
5927
5930
|
"rect",
|
|
5928
5931
|
{
|
|
@@ -5937,10 +5940,10 @@ function $o({ columns: t, height: n = 240, format: l = q, gap: c = 3, className:
|
|
|
5937
5940
|
x: M + k / 2,
|
|
5938
5941
|
y: B,
|
|
5939
5942
|
place: B < i.top + 44 ? "bottom" : "top",
|
|
5940
|
-
title: `${p.label} · ${
|
|
5943
|
+
title: `${p.label} · ${x.key}`,
|
|
5941
5944
|
rows: [
|
|
5942
|
-
{ label: "Valor", value: l(
|
|
5943
|
-
{ label: "Share", value: `${Math.round(
|
|
5945
|
+
{ label: "Valor", value: l(x.value), color: A },
|
|
5946
|
+
{ label: "Share", value: `${Math.round(x.value / S * 100)}%` }
|
|
5944
5947
|
]
|
|
5945
5948
|
}),
|
|
5946
5949
|
onMouseLeave: o.hide
|
|
@@ -5959,9 +5962,9 @@ function $o({ columns: t, height: n = 240, format: l = q, gap: c = 3, className:
|
|
|
5959
5962
|
] });
|
|
5960
5963
|
}
|
|
5961
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) {
|
|
5962
|
-
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) => {
|
|
5963
5966
|
const B = Math.PI + L * Math.PI;
|
|
5964
|
-
return [v + g * Math.cos(B),
|
|
5967
|
+
return [v + g * Math.cos(B), y + g * Math.sin(B)];
|
|
5965
5968
|
}, p = (L, B) => {
|
|
5966
5969
|
const [A, E] = _(L), [F, T] = _(B);
|
|
5967
5970
|
return `M ${A.toFixed(2)} ${E.toFixed(2)} A ${g} ${g} 0 0 1 ${F.toFixed(2)} ${T.toFixed(2)}`;
|
|
@@ -5970,12 +5973,12 @@ const ko = P(function({ value: n, max: l = 100, bands: c, size: s = 220, thickne
|
|
|
5970
5973
|
const S = c.map((L) => {
|
|
5971
5974
|
const B = $(b) / l, A = $(L.upTo) / l;
|
|
5972
5975
|
return b = L.upTo, { t0: B, t1: A, color: L.color };
|
|
5973
|
-
}), 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);
|
|
5974
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: [
|
|
5975
5978
|
/* @__PURE__ */ m("svg", { width: "100%", height: "100%", viewBox: `0 0 ${s} ${N}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
5976
5979
|
S.map((L, B) => /* @__PURE__ */ e("path", { d: p(L.t0, L.t1), fill: "none", stroke: L.color, strokeWidth: h, strokeLinecap: "butt" }, B)),
|
|
5977
|
-
/* @__PURE__ */ e("line", { x1: v, y1:
|
|
5978
|
-
/* @__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)" })
|
|
5979
5982
|
] }),
|
|
5980
5983
|
/* @__PURE__ */ m("div", { className: "select-gauge__center", children: [
|
|
5981
5984
|
/* @__PURE__ */ e("span", { className: "select-gauge__value", children: d($(n)) }),
|
|
@@ -5984,12 +5987,12 @@ const ko = P(function({ value: n, max: l = 100, bands: c, size: s = 220, thickne
|
|
|
5984
5987
|
] }) });
|
|
5985
5988
|
});
|
|
5986
5989
|
function wo({ series: t, labels: n, height: l = 240, format: c = q, className: s, ...a }) {
|
|
5987
|
-
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),
|
|
5988
|
-
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 = [];
|
|
5989
5992
|
return n.forEach((C, L) => {
|
|
5990
|
-
const A = g.top + (
|
|
5991
|
-
w.push([p(L), A]),
|
|
5992
|
-
}), { 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 };
|
|
5993
5996
|
});
|
|
5994
5997
|
return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
|
|
5995
5998
|
d > 0 && /* @__PURE__ */ m("svg", { width: d, height: l, className: "select-chart", children: [
|
|
@@ -5997,8 +6000,8 @@ function wo({ series: t, labels: n, height: l = 240, format: c = q, className: s
|
|
|
5997
6000
|
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: k.color, stopOpacity: 0.95 }),
|
|
5998
6001
|
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: k.color, stopOpacity: 0.6 })
|
|
5999
6002
|
] }, M)) }),
|
|
6000
|
-
S.map((k, M) => /* @__PURE__ */ e("path", { d:
|
|
6001
|
-
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" }),
|
|
6002
6005
|
n.map(
|
|
6003
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
|
|
6004
6007
|
),
|
|
@@ -6008,15 +6011,15 @@ function wo({ series: t, labels: n, height: l = 240, format: c = q, className: s
|
|
|
6008
6011
|
x: p(M) - v / Math.max(1, f) / 2,
|
|
6009
6012
|
y: g.top,
|
|
6010
6013
|
width: v / Math.max(1, f),
|
|
6011
|
-
height:
|
|
6014
|
+
height: y,
|
|
6012
6015
|
fill: "transparent",
|
|
6013
6016
|
onMouseEnter: () => {
|
|
6014
6017
|
h(M), o.show({
|
|
6015
6018
|
x: p(M),
|
|
6016
|
-
y: g.top +
|
|
6019
|
+
y: g.top + y / 2,
|
|
6017
6020
|
place: "top",
|
|
6018
6021
|
title: k,
|
|
6019
|
-
rows: t.map((w,
|
|
6022
|
+
rows: t.map((w, x) => ({ label: w.name, value: c(w.data[M] ?? 0), color: w.color ?? j(x) }))
|
|
6020
6023
|
});
|
|
6021
6024
|
},
|
|
6022
6025
|
onMouseLeave: () => {
|
|
@@ -6033,14 +6036,14 @@ const So = P(function({ data: n, size: l = 220, format: c = q, legend: s = !0, c
|
|
|
6033
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(($) => {
|
|
6034
6037
|
var _;
|
|
6035
6038
|
return (_ = $.children) != null && _.length ? $.children.reduce((p, b) => p + b.value, 0) : $.value ?? 0;
|
|
6036
|
-
}),
|
|
6039
|
+
}), y = v.reduce(($, _) => $ + _, 0) || 1;
|
|
6037
6040
|
let N = 0;
|
|
6038
6041
|
return /* @__PURE__ */ m("div", { ref: d, ...r, className: `select-donut-wrap${a ? " " + a : ""}`, children: [
|
|
6039
6042
|
/* @__PURE__ */ m("div", { className: "select-radial", style: { width: l, aspectRatio: "1" }, children: [
|
|
6040
6043
|
/* @__PURE__ */ e("svg", { width: l, height: l, viewBox: `0 0 ${l} ${l}`, className: "select-chart select-donut", "aria-hidden": "true", children: n.map(($, _) => {
|
|
6041
|
-
const p = v[_], b = N /
|
|
6044
|
+
const p = v[_], b = N / y * 360;
|
|
6042
6045
|
N += p;
|
|
6043
|
-
const S = N /
|
|
6046
|
+
const S = N / y * 360, k = $.color ?? j(_);
|
|
6044
6047
|
let M = b;
|
|
6045
6048
|
return /* @__PURE__ */ m("g", { children: [
|
|
6046
6049
|
/* @__PURE__ */ e(
|
|
@@ -6053,10 +6056,10 @@ const So = P(function({ data: n, size: l = 220, format: c = q, legend: s = !0, c
|
|
|
6053
6056
|
onMouseLeave: o.hide
|
|
6054
6057
|
}
|
|
6055
6058
|
),
|
|
6056
|
-
($.children ?? []).map((w,
|
|
6059
|
+
($.children ?? []).map((w, x) => {
|
|
6057
6060
|
const C = M;
|
|
6058
|
-
M += w.value /
|
|
6059
|
-
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);
|
|
6060
6063
|
return /* @__PURE__ */ e(
|
|
6061
6064
|
"path",
|
|
6062
6065
|
{
|
|
@@ -6076,7 +6079,7 @@ const So = P(function({ data: n, size: l = 220, format: c = q, legend: s = !0, c
|
|
|
6076
6079
|
}),
|
|
6077
6080
|
onMouseLeave: o.hide
|
|
6078
6081
|
},
|
|
6079
|
-
|
|
6082
|
+
x
|
|
6080
6083
|
);
|
|
6081
6084
|
})
|
|
6082
6085
|
] }, _);
|
|
@@ -6091,7 +6094,7 @@ const So = P(function({ data: n, size: l = 220, format: c = q, legend: s = !0, c
|
|
|
6091
6094
|
] });
|
|
6092
6095
|
});
|
|
6093
6096
|
function Co({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
6094
|
-
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));
|
|
6095
6098
|
return /* @__PURE__ */ m("div", { ...s, className: `select-chart-wrap${c ? " " + c : ""}`, ref: a, children: [
|
|
6096
6099
|
r > 0 && /* @__PURE__ */ m("svg", { width: r, height: n, className: "select-chart", children: [
|
|
6097
6100
|
ke(f).map((_, p) => /* @__PURE__ */ m("g", { children: [
|
|
@@ -6108,10 +6111,10 @@ function Co({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
6108
6111
|
/* @__PURE__ */ e("text", { x: o.left - 8, y: g(_), className: "select-chart__ylabel", dominantBaseline: "middle", textAnchor: "end", children: l(_) })
|
|
6109
6112
|
] }, p)),
|
|
6110
6113
|
t.map((_, p) => {
|
|
6111
|
-
const b = o.left +
|
|
6112
|
-
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)]);
|
|
6113
6116
|
for (let A = 0; A < k; A++) C.push([b - w(A), M(A)]);
|
|
6114
|
-
const L = `${Sn(
|
|
6117
|
+
const L = `${Sn(x)} ${Sn(C).replace(/^M/, "L")} Z`, B = _.median != null ? g(_.median) : null;
|
|
6115
6118
|
return /* @__PURE__ */ m("g", { children: [
|
|
6116
6119
|
/* @__PURE__ */ e("path", { d: L, fill: S, fillOpacity: 0.32, stroke: S, strokeWidth: 1.5, strokeLinejoin: "round" }),
|
|
6117
6120
|
B != null && /* @__PURE__ */ e("line", { x1: b - N * 0.6, x2: b + N * 0.6, y1: B, y2: B, stroke: S, strokeWidth: 2 }),
|
|
@@ -6119,9 +6122,9 @@ function Co({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
6119
6122
|
/* @__PURE__ */ e(
|
|
6120
6123
|
"rect",
|
|
6121
6124
|
{
|
|
6122
|
-
x: b -
|
|
6125
|
+
x: b - y / 2,
|
|
6123
6126
|
y: o.top,
|
|
6124
|
-
width:
|
|
6127
|
+
width: y,
|
|
6125
6128
|
height: u,
|
|
6126
6129
|
fill: "transparent",
|
|
6127
6130
|
onMouseEnter: () => d.show({
|
|
@@ -6145,53 +6148,53 @@ function Co({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
6145
6148
|
] });
|
|
6146
6149
|
}
|
|
6147
6150
|
const Lo = P(function({ matrix: n, labels: l, size: c = 240, format: s = q, padAngle: a = 0.05, className: r, ...d }, o) {
|
|
6148
|
-
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, _ = [];
|
|
6149
6152
|
let p = 0;
|
|
6150
|
-
for (let
|
|
6151
|
-
const C = p, L = p + x
|
|
6153
|
+
for (let x = 0; x < u; x++) {
|
|
6154
|
+
const C = p, L = p + y[x] * $;
|
|
6152
6155
|
_.push({ a0: C, a1: L }), p = L + a;
|
|
6153
6156
|
}
|
|
6154
6157
|
const b = n.map(() => []);
|
|
6155
|
-
for (let
|
|
6156
|
-
let C = _[
|
|
6158
|
+
for (let x = 0; x < u; x++) {
|
|
6159
|
+
let C = _[x].a0;
|
|
6157
6160
|
for (let L = 0; L < u; L++) {
|
|
6158
|
-
const B = n[
|
|
6159
|
-
b[
|
|
6161
|
+
const B = n[x][L] * $;
|
|
6162
|
+
b[x][L] = [C, C + B], C += B;
|
|
6160
6163
|
}
|
|
6161
6164
|
}
|
|
6162
|
-
const S = (
|
|
6163
|
-
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);
|
|
6164
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`;
|
|
6165
|
-
}, M = (
|
|
6166
|
-
for (let
|
|
6167
|
-
for (let C =
|
|
6168
|
-
if (
|
|
6169
|
-
const [L, B] = b[
|
|
6170
|
-
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] });
|
|
6171
6174
|
}
|
|
6172
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: [
|
|
6173
6176
|
/* @__PURE__ */ m("svg", { width: c, height: c, viewBox: `0 0 ${c} ${c}`, className: "select-chart", "aria-hidden": "true", children: [
|
|
6174
|
-
w.map((
|
|
6177
|
+
w.map((x, C) => /* @__PURE__ */ e(
|
|
6175
6178
|
"path",
|
|
6176
6179
|
{
|
|
6177
|
-
d:
|
|
6178
|
-
fill:
|
|
6180
|
+
d: x.d,
|
|
6181
|
+
fill: x.color,
|
|
6179
6182
|
className: "select-chord__ribbon",
|
|
6180
6183
|
onMouseEnter: () => i.show({
|
|
6181
6184
|
x: h,
|
|
6182
6185
|
y: f,
|
|
6183
6186
|
place: "top",
|
|
6184
|
-
title: `${l[
|
|
6185
|
-
rows: [{ label: "Fluxo", value: s(
|
|
6187
|
+
title: `${l[x.i]} ↔ ${l[x.j]}`,
|
|
6188
|
+
rows: [{ label: "Fluxo", value: s(x.value), color: x.color }]
|
|
6186
6189
|
}),
|
|
6187
6190
|
onMouseLeave: i.hide
|
|
6188
6191
|
},
|
|
6189
6192
|
C
|
|
6190
6193
|
)),
|
|
6191
|
-
_.map((
|
|
6192
|
-
const L = (
|
|
6194
|
+
_.map((x, C) => {
|
|
6195
|
+
const L = (x.a0 + x.a1) / 2, [B, A] = S(L, g + 12);
|
|
6193
6196
|
return /* @__PURE__ */ m("g", { children: [
|
|
6194
|
-
/* @__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" }),
|
|
6195
6198
|
/* @__PURE__ */ e(
|
|
6196
6199
|
"text",
|
|
6197
6200
|
{
|
|
@@ -6210,7 +6213,7 @@ const Lo = P(function({ matrix: n, labels: l, size: c = 240, format: s = q, padA
|
|
|
6210
6213
|
] }) });
|
|
6211
6214
|
});
|
|
6212
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 }) {
|
|
6213
|
-
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) => {
|
|
6214
6217
|
let B = C, A = L, E = -B - A, F = Math.round(B), T = Math.round(E), R = Math.round(A);
|
|
6215
6218
|
const O = Math.abs(F - B), W = Math.abs(T - E), Z = Math.abs(R - A);
|
|
6216
6219
|
return O > W && O > Z ? F = -T - R : W > Z ? T = -F - R : R = -F - T, [F, R];
|
|
@@ -6226,10 +6229,10 @@ function Ao({ points: t, height: n = 240, radius: l = 16, color: c = "var(--sele
|
|
|
6226
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}`;
|
|
6227
6230
|
w.set(R, (w.get(R) ?? 0) + 1);
|
|
6228
6231
|
}
|
|
6229
|
-
const
|
|
6232
|
+
const x = Math.max(1, ...w.values());
|
|
6230
6233
|
return /* @__PURE__ */ m("div", { ...o, className: `select-chart-wrap${d ? " " + d : ""}`, ref: i, children: [
|
|
6231
6234
|
u > 0 && /* @__PURE__ */ e("svg", { width: u, height: n, className: "select-chart", children: [...w].map(([C, L]) => {
|
|
6232
|
-
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);
|
|
6233
6236
|
return /* @__PURE__ */ e(
|
|
6234
6237
|
"path",
|
|
6235
6238
|
{
|
|
@@ -6411,22 +6414,22 @@ function In(t, n, l) {
|
|
|
6411
6414
|
const a = Math.sin(s), r = Math.sin((1 - l) * s) / a, d = Math.sin(l * s) / a;
|
|
6412
6415
|
return [t[0] * r + n[0] * d, t[1] * r + n[1] * d, t[2] * r + n[2] * d];
|
|
6413
6416
|
}
|
|
6414
|
-
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) {
|
|
6415
6418
|
var Ae;
|
|
6416
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(
|
|
6417
6420
|
typeof window < "u" && !!((Ae = window.matchMedia) != null && Ae.call(window, "(prefers-reduced-motion: reduce)").matches)
|
|
6418
|
-
), 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 = () => {
|
|
6419
6422
|
A.current || (E.current = performance.now(), A.current = requestAnimationFrame(G));
|
|
6420
6423
|
};
|
|
6421
6424
|
function G(I) {
|
|
6422
6425
|
const V = Math.min(0.05, (I - E.current) / 1e3);
|
|
6423
6426
|
E.current = I, B.current += V;
|
|
6424
6427
|
const U = M.current, oe = Math.abs(U.lng) + Math.abs(U.lat) > 0.02;
|
|
6425
|
-
if (!C.current) if (
|
|
6428
|
+
if (!C.current) if (x.current) {
|
|
6426
6429
|
const te = Math.min(1, V * 6);
|
|
6427
|
-
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);
|
|
6428
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));
|
|
6429
|
-
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;
|
|
6430
6433
|
}
|
|
6431
6434
|
ce(() => (S.current || Z(), () => {
|
|
6432
6435
|
A.current && cancelAnimationFrame(A.current), A.current = 0;
|
|
@@ -6445,7 +6448,7 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
|
|
|
6445
6448
|
}, []);
|
|
6446
6449
|
const re = (I) => {
|
|
6447
6450
|
var V, U;
|
|
6448
|
-
(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();
|
|
6449
6452
|
}, pe = (I) => {
|
|
6450
6453
|
if (!C.current) return;
|
|
6451
6454
|
const V = 0.34 / w.current, U = I.clientX - C.current.x, oe = I.clientY - C.current.y;
|
|
@@ -6521,17 +6524,17 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
|
|
|
6521
6524
|
r: 3 + Math.max(0, I.value ?? 0) / Se * 6,
|
|
6522
6525
|
col: I.color ?? d
|
|
6523
6526
|
};
|
|
6524
|
-
}),
|
|
6527
|
+
}), xe = O != null ? n[O] : null, Fe = 0.16, $e = l.map((I, V) => {
|
|
6525
6528
|
const U = Ke(I.from.lat, I.from.lng), oe = Ke(I.to.lat, I.to.lng);
|
|
6526
6529
|
let le = "", te = !1;
|
|
6527
6530
|
for (let Ft = 0; Ft <= 40; Ft++) {
|
|
6528
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]);
|
|
6529
6532
|
$l[2] > -0.05 ? (le += `${te ? "L" : "M"}${sn.x.toFixed(1)},${sn.y.toFixed(1)}`, te = !0) : te = !1;
|
|
6530
6533
|
}
|
|
6531
|
-
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));
|
|
6532
6535
|
return { d: le, col: I.color ?? d, i: V, flow: { ...ht, vis: Bt[2] > 0 }, active: Ml };
|
|
6533
|
-
}), Ve =
|
|
6534
|
-
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: [
|
|
6535
6538
|
/* @__PURE__ */ m(
|
|
6536
6539
|
"div",
|
|
6537
6540
|
{
|
|
@@ -6663,7 +6666,7 @@ const Rn = (t, n) => Math.abs(t.lat - n.lat) < 1e-6 && Math.abs(t.lng - n.lng) <
|
|
|
6663
6666
|
W(null), $.hide();
|
|
6664
6667
|
},
|
|
6665
6668
|
onClick: () => {
|
|
6666
|
-
|
|
6669
|
+
x.current = { lng: -I.lng, lat: s }, Z();
|
|
6667
6670
|
}
|
|
6668
6671
|
}
|
|
6669
6672
|
)
|
|
@@ -6698,8 +6701,8 @@ function Fo({ children: t, speed: n = 28, className: l, ...c }) {
|
|
|
6698
6701
|
function Io({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
6699
6702
|
var A;
|
|
6700
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;
|
|
6701
|
-
let
|
|
6702
|
-
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);
|
|
6703
6706
|
return /* @__PURE__ */ m("div", { ...s, className: `select-chart-wrap${c ? " " + c : ""}`, ref: a, children: [
|
|
6704
6707
|
r > 0 && /* @__PURE__ */ m("svg", { width: r, height: n, className: "select-chart", onMouseLeave: () => {
|
|
6705
6708
|
u(null), d.hide();
|
|
@@ -6722,7 +6725,7 @@ function Io({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
6722
6725
|
return /* @__PURE__ */ e(
|
|
6723
6726
|
"rect",
|
|
6724
6727
|
{
|
|
6725
|
-
x:
|
|
6728
|
+
x: x(F) - S / 2,
|
|
6726
6729
|
y: T,
|
|
6727
6730
|
width: S,
|
|
6728
6731
|
height: Math.max(0, k - T),
|
|
@@ -6730,7 +6733,7 @@ function Io({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
6730
6733
|
fill: `url(#${o}-b)`,
|
|
6731
6734
|
className: "select-chart__bar",
|
|
6732
6735
|
onMouseEnter: () => d.show({
|
|
6733
|
-
x:
|
|
6736
|
+
x: x(F),
|
|
6734
6737
|
y: T,
|
|
6735
6738
|
place: T < h.top + 40 ? "bottom" : "top",
|
|
6736
6739
|
title: E.label,
|
|
@@ -6757,37 +6760,37 @@ function Io({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
6757
6760
|
},
|
|
6758
6761
|
F
|
|
6759
6762
|
)),
|
|
6760
|
-
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))
|
|
6761
6764
|
] }),
|
|
6762
6765
|
/* @__PURE__ */ e(K, { tip: d.tip })
|
|
6763
6766
|
] });
|
|
6764
6767
|
}
|
|
6765
6768
|
const Ro = P(function({ segments: n, cols: l = 10, rows: c = 10, format: s = q, className: a, ...r }, d) {
|
|
6766
|
-
const o = n.reduce((
|
|
6767
|
-
let f = h.reduce((
|
|
6768
|
-
const g = u.map((
|
|
6769
|
-
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]++;
|
|
6770
6773
|
const v = [];
|
|
6771
|
-
for (n.forEach((
|
|
6772
|
-
const $ =
|
|
6774
|
+
for (n.forEach((y, N) => {
|
|
6775
|
+
const $ = y.color ?? j(N);
|
|
6773
6776
|
for (let _ = 0; _ < h[N]; _++) v.push($);
|
|
6774
6777
|
}); v.length < i; ) v.push("var(--select-chart-track)");
|
|
6775
6778
|
return /* @__PURE__ */ m("div", { ref: d, ...r, className: `select-waffle-wrap${a ? " " + a : ""}`, children: [
|
|
6776
|
-
/* @__PURE__ */ e("div", { className: "select-waffle", style: { gridTemplateColumns: `repeat(${l}, 1fr)` }, children: v.slice(0, i).map((
|
|
6777
|
-
/* @__PURE__ */ e("ul", { className: "select-donut__legend", children: n.map((
|
|
6778
|
-
/* @__PURE__ */ e("span", { className: "select-donut__dot", style: { background:
|
|
6779
|
-
/* @__PURE__ */ e("span", { className: "select-donut__leglabel", children:
|
|
6780
|
-
/* @__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) })
|
|
6781
6784
|
] }, N)) })
|
|
6782
6785
|
] });
|
|
6783
6786
|
});
|
|
6784
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 }) {
|
|
6785
|
-
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);
|
|
6786
6789
|
return /* @__PURE__ */ m("div", { ...i, className: `select-chart-wrap${o ? " " + o : ""}`, ref: h, children: [
|
|
6787
6790
|
f > 0 && /* @__PURE__ */ m("svg", { width: f, height: u, className: "select-chart", onMouseLeave: () => {
|
|
6788
|
-
|
|
6791
|
+
y(null), g.hide();
|
|
6789
6792
|
}, children: [
|
|
6790
|
-
/* @__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 }),
|
|
6791
6794
|
/* @__PURE__ */ e("text", { x: f - N, y: 14, className: "select-chart__xlabel", textAnchor: "end", style: { fill: C, fontWeight: 600 }, children: l }),
|
|
6792
6795
|
t.map((L, B) => {
|
|
6793
6796
|
const A = $ + S * B + S / 2, E = L.left / p * b, F = L.right / p * b, T = v === L.label;
|
|
@@ -6800,13 +6803,13 @@ function Po({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", hei
|
|
|
6800
6803
|
width: E,
|
|
6801
6804
|
height: k,
|
|
6802
6805
|
rx: 4,
|
|
6803
|
-
fill:
|
|
6806
|
+
fill: x,
|
|
6804
6807
|
className: "select-pyramid__bar select-pyramid__bar--l",
|
|
6805
6808
|
onMouseEnter: () => {
|
|
6806
|
-
|
|
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 }] });
|
|
6807
6810
|
},
|
|
6808
6811
|
onMouseLeave: () => {
|
|
6809
|
-
|
|
6812
|
+
y(null), g.hide();
|
|
6810
6813
|
}
|
|
6811
6814
|
}
|
|
6812
6815
|
),
|
|
@@ -6821,10 +6824,10 @@ function Po({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", hei
|
|
|
6821
6824
|
fill: C,
|
|
6822
6825
|
className: "select-pyramid__bar select-pyramid__bar--r",
|
|
6823
6826
|
onMouseEnter: () => {
|
|
6824
|
-
|
|
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 }] });
|
|
6825
6828
|
},
|
|
6826
6829
|
onMouseLeave: () => {
|
|
6827
|
-
|
|
6830
|
+
y(null), g.hide();
|
|
6828
6831
|
}
|
|
6829
6832
|
}
|
|
6830
6833
|
),
|
|
@@ -6836,12 +6839,12 @@ function Po({ data: t, leftLabel: n = "Esquerda", rightLabel: l = "Direita", hei
|
|
|
6836
6839
|
] });
|
|
6837
6840
|
}
|
|
6838
6841
|
function Do({ series: t, labels: n, height: l = 240, format: c = q, className: s, ...a }) {
|
|
6839
|
-
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));
|
|
6840
6843
|
for (let p = 0; p < f; p++)
|
|
6841
6844
|
t.map((S, k) => ({ si: k, v: S.data[p] ?? 0 })).sort((S, k) => k.v - S.v).forEach((S, k) => {
|
|
6842
6845
|
N[S.si][p] = k + 1;
|
|
6843
6846
|
});
|
|
6844
|
-
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));
|
|
6845
6848
|
return /* @__PURE__ */ m("div", { ...a, className: `select-chart-wrap${s ? " " + s : ""}`, ref: r, children: [
|
|
6846
6849
|
d > 0 && /* @__PURE__ */ m("svg", { width: d, height: l, className: "select-chart", onMouseLeave: () => {
|
|
6847
6850
|
u(null), o.hide();
|
|
@@ -6884,7 +6887,7 @@ function Do({ series: t, labels: n, height: l = 240, format: c = q, className: s
|
|
|
6884
6887
|
] });
|
|
6885
6888
|
}
|
|
6886
6889
|
function To({ axes: t, data: n, height: l = 260, format: c = q, className: s, ...a }) {
|
|
6887
|
-
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((_) => {
|
|
6888
6891
|
const p = n.map((b) => b.values[_.key] ?? 0);
|
|
6889
6892
|
return { min: Math.min(...p), max: Math.max(...p) };
|
|
6890
6893
|
}), $ = (_, p) => {
|
|
@@ -6896,13 +6899,13 @@ function To({ axes: t, data: n, height: l = 260, format: c = q, className: s, ..
|
|
|
6896
6899
|
u(null), o.hide();
|
|
6897
6900
|
}, children: [
|
|
6898
6901
|
t.map((_, p) => /* @__PURE__ */ m("g", { children: [
|
|
6899
|
-
/* @__PURE__ */ e("line", { x1:
|
|
6900
|
-
/* @__PURE__ */ e("text", { x:
|
|
6901
|
-
/* @__PURE__ */ e("text", { x:
|
|
6902
|
-
/* @__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) })
|
|
6903
6906
|
] }, _.key)),
|
|
6904
6907
|
n.map((_, p) => {
|
|
6905
|
-
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("");
|
|
6906
6909
|
return /* @__PURE__ */ e(
|
|
6907
6910
|
"path",
|
|
6908
6911
|
{
|
|
@@ -6916,7 +6919,7 @@ function To({ axes: t, data: n, height: l = 260, format: c = q, className: s, ..
|
|
|
6916
6919
|
style: { cursor: "pointer" },
|
|
6917
6920
|
onMouseEnter: () => {
|
|
6918
6921
|
u(p), o.show({
|
|
6919
|
-
x:
|
|
6922
|
+
x: y(v - 1),
|
|
6920
6923
|
y: $(v - 1, _.values[t[v - 1].key] ?? 0),
|
|
6921
6924
|
place: "top",
|
|
6922
6925
|
title: _.label ?? `Série ${p + 1}`,
|
|
@@ -6934,19 +6937,19 @@ function To({ axes: t, data: n, height: l = 260, format: c = q, className: s, ..
|
|
|
6934
6937
|
/* @__PURE__ */ e(K, { tip: o.tip })
|
|
6935
6938
|
] });
|
|
6936
6939
|
}
|
|
6937
|
-
function
|
|
6938
|
-
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;
|
|
6939
6942
|
}
|
|
6940
|
-
function
|
|
6941
|
-
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)));
|
|
6942
6945
|
}
|
|
6943
6946
|
function Wo({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
6944
|
-
const { ref: a, width: r } = ne(n), d = X(), [o, i] = D(null), u =
|
|
6945
|
-
if (f.push({ node: v, x0:
|
|
6946
|
-
const p = v.children.reduce((S, k) => S +
|
|
6947
|
-
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;
|
|
6948
6951
|
v.children.forEach((S, k) => {
|
|
6949
|
-
const M = (N -
|
|
6952
|
+
const M = (N - y) * yt(S) / p;
|
|
6950
6953
|
g(S, b, b + M, $ + 1, $ === 0 ? k : _), b += M;
|
|
6951
6954
|
});
|
|
6952
6955
|
}
|
|
@@ -6955,14 +6958,14 @@ function Wo({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
6955
6958
|
r > 0 && /* @__PURE__ */ e("svg", { width: r, height: n, className: "select-chart", onMouseLeave: () => {
|
|
6956
6959
|
i(null), d.hide();
|
|
6957
6960
|
}, children: f.map((v) => {
|
|
6958
|
-
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}`;
|
|
6959
6962
|
return /* @__PURE__ */ m("g", { style: { opacity: o === null || o === $ ? 1 : 0.5 }, children: [
|
|
6960
6963
|
/* @__PURE__ */ e(
|
|
6961
6964
|
"rect",
|
|
6962
6965
|
{
|
|
6963
6966
|
x: v.x0 + 1,
|
|
6964
6967
|
y: N + 1,
|
|
6965
|
-
width:
|
|
6968
|
+
width: y,
|
|
6966
6969
|
height: Math.max(0, h - 2),
|
|
6967
6970
|
rx: 4,
|
|
6968
6971
|
fill: v.color,
|
|
@@ -6978,7 +6981,7 @@ function Wo({ data: t, height: n = 240, format: l = q, className: c, ...s }) {
|
|
|
6978
6981
|
}
|
|
6979
6982
|
}
|
|
6980
6983
|
),
|
|
6981
|
-
|
|
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 })
|
|
6982
6985
|
] }, $);
|
|
6983
6986
|
}) }),
|
|
6984
6987
|
/* @__PURE__ */ e(K, { tip: d.tip })
|
|
@@ -6994,14 +6997,14 @@ function Oo({ data: t, height: n = 260, className: l, ...c }) {
|
|
|
6994
6997
|
g = Math.max(g, b);
|
|
6995
6998
|
const M = { node: p, depth: b, yUnit: 0, ci: S, parent: k };
|
|
6996
6999
|
if (p.children && p.children.length) {
|
|
6997
|
-
const w = p.children.map((
|
|
7000
|
+
const w = p.children.map((x, C) => v(x, b + 1, b === 0 ? C : S, M));
|
|
6998
7001
|
M.yUnit = (w[0].yUnit + w[w.length - 1].yUnit) / 2;
|
|
6999
7002
|
} else
|
|
7000
7003
|
M.yUnit = f, f++;
|
|
7001
7004
|
return h.push(M), M;
|
|
7002
7005
|
};
|
|
7003
7006
|
v(t, 0, 0);
|
|
7004
|
-
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);
|
|
7005
7008
|
u = /* @__PURE__ */ m("svg", { width: a, height: n, className: "select-chart", onMouseLeave: () => {
|
|
7006
7009
|
o(null), r.hide();
|
|
7007
7010
|
}, children: [
|
|
@@ -7066,16 +7069,16 @@ const Ho = P(function({ sets: n, size: l = 240, className: c, ...s }, a) {
|
|
|
7066
7069
|
return /* @__PURE__ */ m("div", { ref: a, ...s, className: `select-donut-wrap${c ? " " + c : ""}`, children: [
|
|
7067
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: [
|
|
7068
7071
|
n.slice(0, r).map((g, v) => {
|
|
7069
|
-
const
|
|
7072
|
+
const y = g.color ?? j(v);
|
|
7070
7073
|
return /* @__PURE__ */ e(
|
|
7071
7074
|
"circle",
|
|
7072
7075
|
{
|
|
7073
7076
|
cx: f[v][0],
|
|
7074
7077
|
cy: f[v][1],
|
|
7075
7078
|
r: h(g),
|
|
7076
|
-
fill:
|
|
7079
|
+
fill: y,
|
|
7077
7080
|
fillOpacity: 0.32,
|
|
7078
|
-
stroke:
|
|
7081
|
+
stroke: y,
|
|
7079
7082
|
strokeWidth: 1.5,
|
|
7080
7083
|
className: "select-venn__circle"
|
|
7081
7084
|
},
|
|
@@ -7103,10 +7106,10 @@ const Ho = P(function({ sets: n, size: l = 240, className: c, ...s }, a) {
|
|
|
7103
7106
|
] }, v)) })
|
|
7104
7107
|
] });
|
|
7105
7108
|
}), jo = P(function({ data: n, size: l = 260, format: c = q, className: s, ...a }, r) {
|
|
7106
|
-
const d = X(), [o, i] = D(null), u = Math.max(1, ...n.map((
|
|
7107
|
-
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) {
|
|
7108
7111
|
if (f.length === 0) {
|
|
7109
|
-
f.push({ d:
|
|
7112
|
+
f.push({ d: x.d, i: x.i, x: 0, y: 0, r: x.r });
|
|
7110
7113
|
continue;
|
|
7111
7114
|
}
|
|
7112
7115
|
let C = 0, L = 0, B = null;
|
|
@@ -7114,7 +7117,7 @@ const Ho = P(function({ sets: n, size: l = 240, className: c, ...s }, a) {
|
|
|
7114
7117
|
const E = Math.cos(C) * L, F = Math.sin(C) * L;
|
|
7115
7118
|
let T = !0;
|
|
7116
7119
|
for (const R of f)
|
|
7117
|
-
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) {
|
|
7118
7121
|
T = !1;
|
|
7119
7122
|
break;
|
|
7120
7123
|
}
|
|
@@ -7124,20 +7127,20 @@ const Ho = P(function({ sets: n, size: l = 240, className: c, ...s }, a) {
|
|
|
7124
7127
|
}
|
|
7125
7128
|
C += 0.5, L += 0.7;
|
|
7126
7129
|
}
|
|
7127
|
-
B && f.push({ d:
|
|
7130
|
+
B && f.push({ d: x.d, i: x.i, x: B[0], y: B[1], r: x.r });
|
|
7128
7131
|
}
|
|
7129
|
-
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;
|
|
7130
7133
|
return /* @__PURE__ */ m("div", { ref: r, ...a, className: `select-donut-wrap${s ? " " + s : ""}`, children: [
|
|
7131
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: () => {
|
|
7132
7135
|
i(null), d.hide();
|
|
7133
|
-
}, children: f.map((
|
|
7134
|
-
const C =
|
|
7135
|
-
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: [
|
|
7136
7139
|
/* @__PURE__ */ e(
|
|
7137
7140
|
"circle",
|
|
7138
7141
|
{
|
|
7139
|
-
cx: M(
|
|
7140
|
-
cy: w(
|
|
7142
|
+
cx: M(x.x),
|
|
7143
|
+
cy: w(x.y),
|
|
7141
7144
|
r: L,
|
|
7142
7145
|
fill: C,
|
|
7143
7146
|
fillOpacity: 0.3,
|
|
@@ -7145,45 +7148,45 @@ const Ho = P(function({ sets: n, size: l = 240, className: c, ...s }, a) {
|
|
|
7145
7148
|
strokeWidth: 1.5,
|
|
7146
7149
|
className: "select-pack__circle",
|
|
7147
7150
|
onMouseEnter: () => {
|
|
7148
|
-
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 }] });
|
|
7149
7152
|
},
|
|
7150
7153
|
onMouseLeave: () => {
|
|
7151
7154
|
i(null), d.hide();
|
|
7152
7155
|
}
|
|
7153
7156
|
}
|
|
7154
7157
|
),
|
|
7155
|
-
L > 18 && /* @__PURE__ */ e("text", { x: M(
|
|
7156
|
-
] },
|
|
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);
|
|
7157
7160
|
}) }) }),
|
|
7158
7161
|
/* @__PURE__ */ e(K, { tip: d.tip })
|
|
7159
7162
|
] });
|
|
7160
7163
|
});
|
|
7161
7164
|
function Vo({ nodes: t, links: n, height: l = 300, format: c = q, className: s, ...a }) {
|
|
7162
7165
|
const { ref: r, width: d } = ne(l), o = X(), [i, u] = D(null), h = be(() => {
|
|
7163
|
-
const v = d || l,
|
|
7166
|
+
const v = d || l, y = l, N = t.length, $ = /* @__PURE__ */ new Map();
|
|
7164
7167
|
if (!N) return $;
|
|
7165
7168
|
const _ = t.map((k, M) => ({
|
|
7166
7169
|
id: k.id,
|
|
7167
7170
|
x: v / 2 + Math.cos(M / N * 2 * Math.PI) * v * 0.3,
|
|
7168
|
-
y:
|
|
7169
|
-
})), 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;
|
|
7170
7173
|
let S = v * 0.12;
|
|
7171
7174
|
for (let k = 0; k < 320; k++) {
|
|
7172
7175
|
const M = _.map(() => ({ x: 0, y: 0 }));
|
|
7173
7176
|
for (let w = 0; w < N; w++)
|
|
7174
|
-
for (let
|
|
7175
|
-
const C = _[w].x - _[
|
|
7176
|
-
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;
|
|
7177
7180
|
}
|
|
7178
7181
|
for (const w of n) {
|
|
7179
|
-
const
|
|
7180
|
-
if (
|
|
7181
|
-
const L = _[
|
|
7182
|
-
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;
|
|
7183
7186
|
}
|
|
7184
7187
|
for (let w = 0; w < N; w++) {
|
|
7185
|
-
const
|
|
7186
|
-
_[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));
|
|
7187
7190
|
}
|
|
7188
7191
|
S *= 0.97;
|
|
7189
7192
|
}
|
|
@@ -7197,7 +7200,7 @@ function Vo({ nodes: t, links: n, height: l = 300, format: c = q, className: s,
|
|
|
7197
7200
|
d > 0 && /* @__PURE__ */ m("svg", { width: d, height: l, className: "select-chart", onMouseLeave: () => {
|
|
7198
7201
|
u(null), o.hide();
|
|
7199
7202
|
}, children: [
|
|
7200
|
-
n.map((v,
|
|
7203
|
+
n.map((v, y) => {
|
|
7201
7204
|
const N = h.get(v.source), $ = h.get(v.target);
|
|
7202
7205
|
if (!N || !$) return null;
|
|
7203
7206
|
const _ = !i || v.source === i || v.target === i;
|
|
@@ -7212,13 +7215,13 @@ function Vo({ nodes: t, links: n, height: l = 300, format: c = q, className: s,
|
|
|
7212
7215
|
strokeWidth: Math.max(1, Math.min(4, v.value ?? 1)),
|
|
7213
7216
|
style: { opacity: _ ? 0.6 : 0.12 }
|
|
7214
7217
|
},
|
|
7215
|
-
|
|
7218
|
+
y
|
|
7216
7219
|
);
|
|
7217
7220
|
}),
|
|
7218
|
-
t.map((v,
|
|
7221
|
+
t.map((v, y) => {
|
|
7219
7222
|
const N = h.get(v.id);
|
|
7220
7223
|
if (!N) return null;
|
|
7221
|
-
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);
|
|
7222
7225
|
return /* @__PURE__ */ m("g", { style: { opacity: p ? 1 : 0.3 }, children: [
|
|
7223
7226
|
/* @__PURE__ */ e(
|
|
7224
7227
|
"circle",
|
|
@@ -7247,19 +7250,19 @@ function Fs({ children: t }) {
|
|
|
7247
7250
|
const n = At({ selector: ".select-combobox__option", y: 6, duration: 0.3, stagger: 0.03 });
|
|
7248
7251
|
return /* @__PURE__ */ e("div", { className: "select-combobox__list", ref: n, children: t });
|
|
7249
7252
|
}
|
|
7250
|
-
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 }, $) {
|
|
7251
7254
|
const _ = ee(), [p, b] = D(!1), [S, k] = D(""), M = s.find((B) => B.value === l), w = be(() => {
|
|
7252
7255
|
const B = S.trim().toLowerCase();
|
|
7253
7256
|
return !v || !B ? s : s.filter((A) => {
|
|
7254
7257
|
var E;
|
|
7255
7258
|
return A.label.toLowerCase().includes(B) || ((E = A.secondary) == null ? void 0 : E.toLowerCase().includes(B));
|
|
7256
7259
|
});
|
|
7257
|
-
}, [s, S, v]),
|
|
7260
|
+
}, [s, S, v]), x = () => {
|
|
7258
7261
|
b(!1), k("");
|
|
7259
7262
|
}, C = (B) => {
|
|
7260
|
-
c(B),
|
|
7263
|
+
c(B), x();
|
|
7261
7264
|
}, L = i ? `${_}-err` : o ? `${_}-hint` : void 0;
|
|
7262
|
-
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: [
|
|
7263
7266
|
n && /* @__PURE__ */ m("div", { className: "select-field__labelrow", children: [
|
|
7264
7267
|
/* @__PURE__ */ e("label", { className: "select-field__label", htmlFor: _, children: n }),
|
|
7265
7268
|
d
|
|
@@ -7268,7 +7271,7 @@ const Zo = P(function({ label: n, value: l, onChange: c, options: s, placeholder
|
|
|
7268
7271
|
Te,
|
|
7269
7272
|
{
|
|
7270
7273
|
active: p,
|
|
7271
|
-
onClose:
|
|
7274
|
+
onClose: x,
|
|
7272
7275
|
placement: "bottom-start",
|
|
7273
7276
|
role: "listbox",
|
|
7274
7277
|
matchWidth: !0,
|
|
@@ -7278,7 +7281,7 @@ const Zo = P(function({ label: n, value: l, onChange: c, options: s, placeholder
|
|
|
7278
7281
|
id: _,
|
|
7279
7282
|
type: "button",
|
|
7280
7283
|
className: `select-combobox__trigger${i ? " select-input--error" : ""}${p ? " is-open" : ""}`,
|
|
7281
|
-
onClick: () => p ?
|
|
7284
|
+
onClick: () => p ? x() : b(!0),
|
|
7282
7285
|
disabled: h,
|
|
7283
7286
|
"aria-haspopup": "listbox",
|
|
7284
7287
|
"aria-expanded": p,
|
|
@@ -7531,7 +7534,7 @@ function Rs(t) {
|
|
|
7531
7534
|
})) : [];
|
|
7532
7535
|
}
|
|
7533
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) {
|
|
7534
|
-
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;
|
|
7535
7538
|
return /* @__PURE__ */ m("div", { ref: h, ...u, className: `select-kv${i ? " " + i : ""}`, children: [
|
|
7536
7539
|
f.map(($, _) => /* @__PURE__ */ m("div", { className: "select-kv__row", children: [
|
|
7537
7540
|
/* @__PURE__ */ e("div", { className: "select-kv__field", children: a ? /* @__PURE__ */ e(
|
|
@@ -7564,7 +7567,7 @@ const nr = P(function({ pairs: n, onChange: l, keyPlaceholder: c = "Chave", valu
|
|
|
7564
7567
|
) }),
|
|
7565
7568
|
/* @__PURE__ */ e("div", { className: "select-kv__remove", children: /* @__PURE__ */ e(_e, { size: "sm", icon: /* @__PURE__ */ e(Gn, {}), label: "Remover", onClick: () => v(_) }) })
|
|
7566
7569
|
] }, _)),
|
|
7567
|
-
N && /* @__PURE__ */ e("div", { children: /* @__PURE__ */ m(Pc, { onClick:
|
|
7570
|
+
N && /* @__PURE__ */ e("div", { children: /* @__PURE__ */ m(Pc, { onClick: y, children: [
|
|
7568
7571
|
"+ ",
|
|
7569
7572
|
r
|
|
7570
7573
|
] }) }),
|
|
@@ -7649,7 +7652,7 @@ function Os(t) {
|
|
|
7649
7652
|
return n = n % 12 || 12, `${n} : ${String(t.getMinutes()).padStart(2, "0")} ${l}`;
|
|
7650
7653
|
}
|
|
7651
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) {
|
|
7652
|
-
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) => {
|
|
7653
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 }));
|
|
7654
7657
|
}, L = (A) => {
|
|
7655
7658
|
if (A.disabled || !A.range) return;
|
|
@@ -7679,7 +7682,7 @@ const Hs = P(function({ value: n, presets: l = Ds, onApply: c, onCancel: s, acce
|
|
|
7679
7682
|
/* @__PURE__ */ m("div", { className: "select-datepicker__main", children: [
|
|
7680
7683
|
/* @__PURE__ */ e("div", { className: "select-datepicker__fields", children: ["from", "to"].map((A) => /* @__PURE__ */ m("div", { className: "select-datepicker__fieldrow", children: [
|
|
7681
7684
|
/* @__PURE__ */ e("span", { className: "select-datepicker__fieldlabel", children: A === "from" ? g.from : g.to }),
|
|
7682
|
-
/* @__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]) }),
|
|
7683
7686
|
d && /* @__PURE__ */ e("span", { className: "select-datepicker__pill select-datepicker__pill--time", children: Os(N[A]) })
|
|
7684
7687
|
] }, A)) }),
|
|
7685
7688
|
/* @__PURE__ */ m("div", { className: "select-datepicker__calhead", children: [
|
|
@@ -7791,25 +7794,25 @@ function Vs({ size: t }) {
|
|
|
7791
7794
|
}
|
|
7792
7795
|
const cr = P(function({ value: n, max: l = 5, onChange: c, size: s = 20, label: a, disabled: r = !1, className: d, ...o }, i) {
|
|
7793
7796
|
const u = !!c && !r, [h, f] = D(null), g = h ?? n;
|
|
7794
|
-
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,
|
|
7795
|
-
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 }) });
|
|
7796
7799
|
return u ? /* @__PURE__ */ e(
|
|
7797
7800
|
"button",
|
|
7798
7801
|
{
|
|
7799
7802
|
type: "button",
|
|
7800
7803
|
className: "select-rating__btn",
|
|
7801
|
-
"aria-label": `${
|
|
7802
|
-
onMouseEnter: () => f(
|
|
7803
|
-
onFocus: () => f(
|
|
7804
|
+
"aria-label": `${y + 1} ${y + 1 === 1 ? "estrela" : "estrelas"}`,
|
|
7805
|
+
onMouseEnter: () => f(y + 1),
|
|
7806
|
+
onFocus: () => f(y + 1),
|
|
7804
7807
|
onBlur: () => f(null),
|
|
7805
|
-
onClick: () => c == null ? void 0 : c(
|
|
7808
|
+
onClick: () => c == null ? void 0 : c(y + 1),
|
|
7806
7809
|
children: $
|
|
7807
7810
|
},
|
|
7808
|
-
|
|
7809
|
-
) : /* @__PURE__ */ e("span", { children: $ },
|
|
7811
|
+
y
|
|
7812
|
+
) : /* @__PURE__ */ e("span", { children: $ }, y);
|
|
7810
7813
|
}) });
|
|
7811
|
-
}), 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, ...
|
|
7812
|
-
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) => {
|
|
7813
7816
|
const F = d ? E.replace(/[^\d.,-]/g, "").replace(",", ".") : E.replace(/[^\d-]/g, "");
|
|
7814
7817
|
if (d && C(F), F === "" || F === "-" || F === ".") return c(null);
|
|
7815
7818
|
const T = Number(F);
|
|
@@ -7818,7 +7821,7 @@ const cr = P(function({ value: n, max: l = 5, onChange: c, size: s = 20, label:
|
|
|
7818
7821
|
const F = _(p(b + E));
|
|
7819
7822
|
d && C(String(F)), c(F);
|
|
7820
7823
|
};
|
|
7821
|
-
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: [
|
|
7822
7825
|
n && /* @__PURE__ */ e(et, { htmlFor: $, label: n }),
|
|
7823
7826
|
/* @__PURE__ */ m("div", { className: "select-numfield", children: [
|
|
7824
7827
|
/* @__PURE__ */ e(
|
|
@@ -7882,7 +7885,7 @@ function ar({
|
|
|
7882
7885
|
emptyState: u,
|
|
7883
7886
|
helpText: h
|
|
7884
7887
|
}) {
|
|
7885
|
-
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) => {
|
|
7886
7889
|
const b = _ + p;
|
|
7887
7890
|
if (b < 0 || b >= t.length) return;
|
|
7888
7891
|
const S = t.slice(), k = S[_];
|
|
@@ -7894,7 +7897,7 @@ function ar({
|
|
|
7894
7897
|
canRemove: g,
|
|
7895
7898
|
update: (b) => v(p, { ..._, ...b }),
|
|
7896
7899
|
set: (b) => v(p, b),
|
|
7897
|
-
remove: () =>
|
|
7900
|
+
remove: () => y(p),
|
|
7898
7901
|
moveUp: () => N(p, -1),
|
|
7899
7902
|
moveDown: () => N(p, 1)
|
|
7900
7903
|
});
|
|
@@ -8010,13 +8013,13 @@ function Gs(t) {
|
|
|
8010
8013
|
});
|
|
8011
8014
|
}
|
|
8012
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) {
|
|
8013
|
-
const [f, g] = D([]), [v,
|
|
8016
|
+
const [f, g] = D([]), [v, y] = D(null), N = l ? [l] : [], $ = async (_) => {
|
|
8014
8017
|
const p = _[0];
|
|
8015
8018
|
if (!p) {
|
|
8016
8019
|
g([]);
|
|
8017
8020
|
return;
|
|
8018
8021
|
}
|
|
8019
|
-
if (
|
|
8022
|
+
if (y(null), !o) {
|
|
8020
8023
|
c(await Gs(p)), g([]);
|
|
8021
8024
|
return;
|
|
8022
8025
|
}
|
|
@@ -8024,7 +8027,7 @@ const dr = P(function({ label: n, value: l, onChange: c, accept: s = "image/*",
|
|
|
8024
8027
|
try {
|
|
8025
8028
|
c(await o(p));
|
|
8026
8029
|
} catch (b) {
|
|
8027
|
-
|
|
8030
|
+
y(b instanceof Error ? b.message : "Não foi possível enviar a imagem.");
|
|
8028
8031
|
} finally {
|
|
8029
8032
|
g([]);
|
|
8030
8033
|
}
|
|
@@ -8089,7 +8092,7 @@ export {
|
|
|
8089
8092
|
Ia as AppsIcon,
|
|
8090
8093
|
Wn as ArrowLeftIcon,
|
|
8091
8094
|
ga as ArrowRightIcon,
|
|
8092
|
-
|
|
8095
|
+
ya as AtIcon,
|
|
8093
8096
|
pa as AuthAppIcon,
|
|
8094
8097
|
da as BellIcon,
|
|
8095
8098
|
aa as BookmarkIcon,
|
|
@@ -8163,7 +8166,7 @@ export {
|
|
|
8163
8166
|
uo as SelectBullet,
|
|
8164
8167
|
Do as SelectBump,
|
|
8165
8168
|
fe as SelectButton,
|
|
8166
|
-
|
|
8169
|
+
yo as SelectCalendarHeatmap,
|
|
8167
8170
|
vo as SelectCandlestick,
|
|
8168
8171
|
ea as SelectCard,
|
|
8169
8172
|
X1 as SelectChartCard,
|
|
@@ -8253,7 +8256,7 @@ export {
|
|
|
8253
8256
|
t1 as SelectPaymentBrand,
|
|
8254
8257
|
za as SelectPhoneField,
|
|
8255
8258
|
Xo as SelectPlanCard,
|
|
8256
|
-
|
|
8259
|
+
xo as SelectPolarArea,
|
|
8257
8260
|
Te as SelectPopover,
|
|
8258
8261
|
Z1 as SelectPreviewFrame,
|
|
8259
8262
|
oo as SelectProgressList,
|
|
@@ -8275,7 +8278,7 @@ export {
|
|
|
8275
8278
|
Ms as SelectSensitiveValue,
|
|
8276
8279
|
_1 as SelectSettingList,
|
|
8277
8280
|
v1 as SelectSettingRow,
|
|
8278
|
-
|
|
8281
|
+
x1 as SelectSideNav,
|
|
8279
8282
|
p1 as SelectSkeleton,
|
|
8280
8283
|
No as SelectSlope,
|
|
8281
8284
|
K1 as SelectSparkline,
|
|
@@ -8292,7 +8295,7 @@ export {
|
|
|
8292
8295
|
bn as SelectTableCell,
|
|
8293
8296
|
zc as SelectTableEmpty,
|
|
8294
8297
|
gn as SelectTableRow,
|
|
8295
|
-
|
|
8298
|
+
y1 as SelectTabs,
|
|
8296
8299
|
O1 as SelectTagSelect,
|
|
8297
8300
|
Ye as SelectText,
|
|
8298
8301
|
Wa as SelectTextarea,
|
|
@@ -8333,7 +8336,7 @@ export {
|
|
|
8333
8336
|
ia as UserIcon,
|
|
8334
8337
|
ka as WalletIcon,
|
|
8335
8338
|
Ol as WarningIcon,
|
|
8336
|
-
|
|
8339
|
+
xa as Web3Icon,
|
|
8337
8340
|
it as detectSelectTheme,
|
|
8338
8341
|
dc as dialCodeOf,
|
|
8339
8342
|
Wc as passwordScore,
|