bonsaif-ui 0.1.71 → 0.1.72
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/bonsaif-ui.js
CHANGED
|
@@ -164,37 +164,37 @@ function br({
|
|
|
164
164
|
const p = se(null), A = se(null), w = se(null), y = se(!1), [v, N] = P(null), [M, g] = P("");
|
|
165
165
|
ie(() => {
|
|
166
166
|
const S = p.current;
|
|
167
|
-
S && (S.querySelectorAll("[title]").forEach((
|
|
168
|
-
const Z =
|
|
169
|
-
Z && (
|
|
170
|
-
}), S.querySelectorAll("svg title").forEach((
|
|
167
|
+
S && (S.querySelectorAll("[title]").forEach((F) => {
|
|
168
|
+
const Z = F.getAttribute("title");
|
|
169
|
+
Z && (F.getAttribute("aria-label") || F.setAttribute("aria-label", Z), F.removeAttribute("title"));
|
|
170
|
+
}), S.querySelectorAll("svg title").forEach((F) => F.remove()));
|
|
171
171
|
}), Yi(() => {
|
|
172
172
|
if (!v) return;
|
|
173
173
|
const S = A.current;
|
|
174
174
|
if (!S) return;
|
|
175
|
-
const
|
|
176
|
-
let
|
|
175
|
+
const F = 12, Z = 14, q = S.getBoundingClientRect(), re = window.innerWidth - q.width - F, V = window.innerHeight - q.height - F;
|
|
176
|
+
let C = v.mouseX + Z, K = v.mouseY + Z, ae, L;
|
|
177
177
|
if (!i && p.current) {
|
|
178
178
|
const O = p.current.getBoundingClientRect(), te = O.left + O.width / 2, Q = O.top + O.height / 2;
|
|
179
|
-
l === "top" ? (
|
|
179
|
+
l === "top" ? (C = te - q.width / 2, K = O.top - q.height - Z, L = q.height - 1) : l === "left" ? (C = O.left - q.width - Z, K = Q - q.height / 2, ae = q.width - 1) : l === "right" ? (C = O.right + Z, K = Q - q.height / 2, ae = -7) : (C = te - q.width / 2, K = O.bottom + Z, L = -7);
|
|
180
180
|
}
|
|
181
|
-
if (i && (
|
|
181
|
+
if (i && (C > re && (C = v.mouseX - q.width - Z), K > V && (K = v.mouseY - q.height - Z)), C = Math.min(Math.max(F, C), Math.max(F, re)), K = Math.min(Math.max(F, K), Math.max(F, V)), !i && p.current) {
|
|
182
182
|
const O = p.current.getBoundingClientRect(), te = O.left + O.width / 2, Q = O.top + O.height / 2;
|
|
183
|
-
l === "top" || l === "bottom" ? ae = Math.min(Math.max(14, te -
|
|
183
|
+
l === "top" || l === "bottom" ? ae = Math.min(Math.max(14, te - C), q.width - 14) : L = Math.min(Math.max(14, Q - K), q.height - 14);
|
|
184
184
|
}
|
|
185
|
-
(Math.abs(
|
|
185
|
+
(Math.abs(C - v.x) > 0.5 || Math.abs(K - v.y) > 0.5 || ae !== v.arrowX || L !== v.arrowY) && N(
|
|
186
186
|
(O) => O && {
|
|
187
187
|
...O,
|
|
188
|
-
x:
|
|
188
|
+
x: C,
|
|
189
189
|
y: K,
|
|
190
190
|
arrowX: ae,
|
|
191
191
|
arrowY: L
|
|
192
192
|
}
|
|
193
193
|
);
|
|
194
194
|
}, [i, l, v]);
|
|
195
|
-
const
|
|
195
|
+
const j = () => {
|
|
196
196
|
w.current && (window.clearTimeout(w.current), w.current = null);
|
|
197
|
-
},
|
|
197
|
+
}, $ = (S, F) => {
|
|
198
198
|
if (!Yl() || y.current) return;
|
|
199
199
|
const Z = p.current;
|
|
200
200
|
if (Z && !qr(Z)) {
|
|
@@ -203,23 +203,23 @@ function br({
|
|
|
203
203
|
if (!q) return;
|
|
204
204
|
g(q);
|
|
205
205
|
}
|
|
206
|
-
!n && !r || N({ mouseX: S, mouseY:
|
|
206
|
+
!n && !r || N({ mouseX: S, mouseY: F, x: S + 14, y: F + 14 });
|
|
207
207
|
}
|
|
208
208
|
}, k = () => {
|
|
209
209
|
const S = p.current;
|
|
210
210
|
if (!S) return;
|
|
211
|
-
const
|
|
212
|
-
|
|
213
|
-
},
|
|
214
|
-
|
|
211
|
+
const F = S.getBoundingClientRect();
|
|
212
|
+
$(F.left + F.width / 2, F.bottom);
|
|
213
|
+
}, _ = () => {
|
|
214
|
+
j(), N(null);
|
|
215
215
|
}, Y = () => {
|
|
216
216
|
if (!a) {
|
|
217
|
-
|
|
217
|
+
_();
|
|
218
218
|
return;
|
|
219
219
|
}
|
|
220
|
-
|
|
221
|
-
},
|
|
222
|
-
Wr(), y.current = !0,
|
|
220
|
+
j(), w.current = window.setTimeout(() => N(null), 120);
|
|
221
|
+
}, E = () => {
|
|
222
|
+
Wr(), y.current = !0, _();
|
|
223
223
|
}, W = () => {
|
|
224
224
|
y.current = !1;
|
|
225
225
|
};
|
|
@@ -229,10 +229,10 @@ function br({
|
|
|
229
229
|
N(null);
|
|
230
230
|
return;
|
|
231
231
|
}
|
|
232
|
-
const S = () => N(null),
|
|
232
|
+
const S = () => N(null), F = () => {
|
|
233
233
|
Wr(), y.current = !0, N(null);
|
|
234
234
|
};
|
|
235
|
-
document.addEventListener("pointerdown",
|
|
235
|
+
document.addEventListener("pointerdown", F, !0), document.addEventListener("click", F, !0), document.addEventListener("scroll", S, !0), window.addEventListener("blur", S), document.addEventListener("visibilitychange", S), document.addEventListener("keydown", S, !0);
|
|
236
236
|
const Z = new MutationObserver(() => {
|
|
237
237
|
qr(p.current) && N(null);
|
|
238
238
|
});
|
|
@@ -242,16 +242,16 @@ function br({
|
|
|
242
242
|
attributes: !0,
|
|
243
243
|
attributeFilter: ["role", "aria-modal", "aria-hidden", "class"]
|
|
244
244
|
}), () => {
|
|
245
|
-
document.removeEventListener("pointerdown",
|
|
245
|
+
document.removeEventListener("pointerdown", F, !0), document.removeEventListener("click", F, !0), document.removeEventListener("scroll", S, !0), window.removeEventListener("blur", S), document.removeEventListener("visibilitychange", S), document.removeEventListener("keydown", S, !0), Z.disconnect();
|
|
246
246
|
};
|
|
247
247
|
}, [v]), ie(() => {
|
|
248
|
-
const S = () => Wr(),
|
|
248
|
+
const S = () => Wr(), F = () => {
|
|
249
249
|
Wr(), y.current = !0, N(null);
|
|
250
250
|
};
|
|
251
|
-
return document.addEventListener("pointerdown", S, !0), document.addEventListener("click", S, !0), document.addEventListener("keydown", S, !0), window.addEventListener(Va,
|
|
251
|
+
return document.addEventListener("pointerdown", S, !0), document.addEventListener("click", S, !0), document.addEventListener("keydown", S, !0), window.addEventListener(Va, F), () => {
|
|
252
252
|
document.removeEventListener("pointerdown", S, !0), document.removeEventListener("click", S, !0), document.removeEventListener("keydown", S, !0), window.removeEventListener(
|
|
253
253
|
Va,
|
|
254
|
-
|
|
254
|
+
F
|
|
255
255
|
);
|
|
256
256
|
};
|
|
257
257
|
}, []);
|
|
@@ -266,18 +266,18 @@ function br({
|
|
|
266
266
|
className: c,
|
|
267
267
|
style: m,
|
|
268
268
|
onMouseEnter: (S) => {
|
|
269
|
-
|
|
269
|
+
j(), W(), i ? $(S.clientX, S.clientY) : k();
|
|
270
270
|
},
|
|
271
271
|
onMouseMove: (S) => {
|
|
272
|
-
v && i &&
|
|
272
|
+
v && i && $(S.clientX, S.clientY);
|
|
273
273
|
},
|
|
274
|
-
onMouseDown:
|
|
275
|
-
onClick:
|
|
274
|
+
onMouseDown: E,
|
|
275
|
+
onClick: E,
|
|
276
276
|
onMouseLeave: () => {
|
|
277
277
|
W(), Y();
|
|
278
278
|
},
|
|
279
279
|
onFocus: k,
|
|
280
|
-
onBlur:
|
|
280
|
+
onBlur: _,
|
|
281
281
|
children: e
|
|
282
282
|
}
|
|
283
283
|
),
|
|
@@ -288,7 +288,7 @@ function br({
|
|
|
288
288
|
ref: A,
|
|
289
289
|
role: "tooltip",
|
|
290
290
|
className: u,
|
|
291
|
-
onMouseEnter: a ?
|
|
291
|
+
onMouseEnter: a ? j : void 0,
|
|
292
292
|
onMouseLeave: a ? Y : void 0,
|
|
293
293
|
style: {
|
|
294
294
|
position: "fixed",
|
|
@@ -386,12 +386,12 @@ function _e({
|
|
|
386
386
|
style: b,
|
|
387
387
|
...p
|
|
388
388
|
}) {
|
|
389
|
-
const A = Xi(zo), w = l ?? A.iconOnly ?? e === "icon", y = A.compact ?? !1, v = A.headerAction ?? !1, N = v && r === "md" ? "sm" : y && !v && r === "md" ? "xs" : r, M = e === "icon" || w, g = v && M,
|
|
389
|
+
const A = Xi(zo), w = l ?? A.iconOnly ?? e === "icon", y = A.compact ?? !1, v = A.headerAction ?? !1, N = v && r === "md" ? "sm" : y && !v && r === "md" ? "xs" : r, M = e === "icon" || w, g = v && M, j = ta(u), $ = i ?? p.title ?? p["aria-label"] ?? (w ? j : void 0), k = $ ? void 0 : p.title, _ = p["aria-label"] ?? (typeof $ == "string" ? $ : j || void 0), Y = n ? null : a ?? (w ? ns(u) : null), E = /* @__PURE__ */ o(
|
|
390
390
|
"button",
|
|
391
391
|
{
|
|
392
392
|
...p,
|
|
393
393
|
title: k,
|
|
394
|
-
"aria-label":
|
|
394
|
+
"aria-label": _,
|
|
395
395
|
"data-variant": e,
|
|
396
396
|
"data-size": N,
|
|
397
397
|
"data-icon": M ? "true" : void 0,
|
|
@@ -421,15 +421,15 @@ function _e({
|
|
|
421
421
|
]
|
|
422
422
|
}
|
|
423
423
|
);
|
|
424
|
-
return
|
|
424
|
+
return $ ? /* @__PURE__ */ t(
|
|
425
425
|
br,
|
|
426
426
|
{
|
|
427
427
|
as: "span",
|
|
428
|
-
content:
|
|
428
|
+
content: $,
|
|
429
429
|
className: "inline-flex shrink-0",
|
|
430
|
-
children:
|
|
430
|
+
children: E
|
|
431
431
|
}
|
|
432
|
-
) :
|
|
432
|
+
) : E;
|
|
433
433
|
}
|
|
434
434
|
function as({
|
|
435
435
|
variant: e = "page",
|
|
@@ -580,16 +580,16 @@ function Gd({
|
|
|
580
580
|
errorState: N = cs,
|
|
581
581
|
renderTabLabel: M,
|
|
582
582
|
searchableTabs: g = "auto",
|
|
583
|
-
tabsSearchThreshold:
|
|
584
|
-
tabsSearchPlaceholder:
|
|
583
|
+
tabsSearchThreshold: j = 6,
|
|
584
|
+
tabsSearchPlaceholder: $ = "Buscar modulo...",
|
|
585
585
|
tabsSearchValue: k,
|
|
586
|
-
onTabsSearchChange:
|
|
586
|
+
onTabsSearchChange: _,
|
|
587
587
|
emptySearchState: Y,
|
|
588
|
-
showTabCount:
|
|
588
|
+
showTabCount: E = !0,
|
|
589
589
|
className: W = "",
|
|
590
590
|
parentClassName: le = "",
|
|
591
591
|
contentClassName: S = "",
|
|
592
|
-
tabsClassName:
|
|
592
|
+
tabsClassName: F = ""
|
|
593
593
|
}) {
|
|
594
594
|
var fe;
|
|
595
595
|
const Z = Ze(
|
|
@@ -601,7 +601,7 @@ function Gd({
|
|
|
601
601
|
(G) => !G.disabled
|
|
602
602
|
)) == null ? void 0 : fe.service, [re, V] = P(
|
|
603
603
|
m ?? q ?? ""
|
|
604
|
-
), [
|
|
604
|
+
), [C, K] = P({}), [ae, L] = P({}), [O, te] = P(""), [Q, oe] = P(!1), D = se(ae), me = se(0), X = k ?? O, B = Ya(X), T = g === !0 || g === "auto" && Z.length >= j, H = T && X.trim().length > 0, U = Ze(() => B ? Z.filter(
|
|
605
605
|
(G) => Ya(ls(G)).includes(B)
|
|
606
606
|
) : Z, [B, Z]), ce = u ?? re, de = Z.find((G) => G.service === ce) ?? Z.find((G) => !G.disabled);
|
|
607
607
|
ie(() => {
|
|
@@ -612,7 +612,7 @@ function Gd({
|
|
|
612
612
|
const ve = (G) => {
|
|
613
613
|
G.disabled || (u || V(G.service), f == null || f(G.service, G));
|
|
614
614
|
}, Be = (G) => {
|
|
615
|
-
k === void 0 && te(G),
|
|
615
|
+
k === void 0 && te(G), _ == null || _(G);
|
|
616
616
|
}, We = (G, Se) => {
|
|
617
617
|
const he = U.filter((xe) => !xe.disabled), Le = he.findIndex(
|
|
618
618
|
(xe) => xe.service === Se.service
|
|
@@ -655,7 +655,7 @@ function Gd({
|
|
|
655
655
|
});
|
|
656
656
|
}, [i, p, c, s, de]);
|
|
657
657
|
ie(we, [we]);
|
|
658
|
-
const Ee = de ?
|
|
658
|
+
const Ee = de ? C[de.service] ?? null : null, pe = de ? ae[de.service] : void 0, ct = pe == null ? void 0 : pe.component, dt = (G) => {
|
|
659
659
|
de && K((Se) => ({
|
|
660
660
|
...Se,
|
|
661
661
|
[de.service]: G
|
|
@@ -696,13 +696,13 @@ function Gd({
|
|
|
696
696
|
{
|
|
697
697
|
className: `relative min-w-0 overflow-visible rounded-lg border border-[var(--border)] bg-[var(--bg-card)] ${S}`,
|
|
698
698
|
children: [
|
|
699
|
-
(A || w || T ||
|
|
699
|
+
(A || w || T || E) && /* @__PURE__ */ t("div", { className: "relative border-b border-[var(--border)] px-4 py-3", children: /* @__PURE__ */ o("div", { className: "flex min-w-0 items-start justify-between gap-3", children: [
|
|
700
700
|
/* @__PURE__ */ o("div", { className: "min-w-0", children: [
|
|
701
701
|
A && /* @__PURE__ */ t("h2", { className: "truncate text-sm font-semibold text-[var(--text-main)]", children: A }),
|
|
702
702
|
w && /* @__PURE__ */ t("p", { className: "mt-1 line-clamp-2 text-xs text-[var(--text-muted)]", children: w })
|
|
703
703
|
] }),
|
|
704
|
-
(T ||
|
|
705
|
-
|
|
704
|
+
(T || E) && /* @__PURE__ */ o("div", { className: "flex min-w-0 flex-shrink-0 items-center justify-end gap-2", children: [
|
|
705
|
+
E && /* @__PURE__ */ o("span", { className: "hidden text-xs font-semibold text-[var(--text-muted)] transition-opacity duration-200 sm:inline", children: [
|
|
706
706
|
U.length,
|
|
707
707
|
" / ",
|
|
708
708
|
Z.length
|
|
@@ -718,7 +718,7 @@ function Gd({
|
|
|
718
718
|
{
|
|
719
719
|
value: X,
|
|
720
720
|
onChange: Be,
|
|
721
|
-
placeholder:
|
|
721
|
+
placeholder: $,
|
|
722
722
|
className: "w-full",
|
|
723
723
|
autoFocus: Q,
|
|
724
724
|
forceExpanded: !0,
|
|
@@ -738,8 +738,8 @@ function Gd({
|
|
|
738
738
|
onClick: () => {
|
|
739
739
|
Q && X && Be(""), oe((G) => !G);
|
|
740
740
|
},
|
|
741
|
-
className: `inline-flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-md border transition-all duration-200 hover:scale-[1.03] active:scale-95 ${Q ||
|
|
742
|
-
children: /* @__PURE__ */ t("span", { className: "grid h-4 w-4 place-items-center transition-transform duration-200", children: Q ||
|
|
741
|
+
className: `inline-flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-md border transition-all duration-200 hover:scale-[1.03] active:scale-95 ${Q || H ? "border-[var(--primary)] bg-[var(--bg-input)] text-[var(--text-main)] shadow-sm" : "border-[var(--border)] text-[var(--text-muted)] hover:bg-[var(--bg-input)] hover:text-[var(--text-main)]"}`,
|
|
742
|
+
children: /* @__PURE__ */ t("span", { className: "grid h-4 w-4 place-items-center transition-transform duration-200", children: Q || H ? /* @__PURE__ */ t(ze, { className: "h-4 w-4" }) : /* @__PURE__ */ t($t, { className: "h-4 w-4" }) })
|
|
743
743
|
}
|
|
744
744
|
)
|
|
745
745
|
] })
|
|
@@ -750,7 +750,7 @@ function Gd({
|
|
|
750
750
|
{
|
|
751
751
|
role: "tablist",
|
|
752
752
|
"aria-label": A ?? "Modulos relacionados",
|
|
753
|
-
className: `flex gap-1 overflow-x-auto border-b border-[var(--border)] bg-[var(--bg-input)] px-2 py-1.5 transition-colors duration-200 ${
|
|
753
|
+
className: `flex gap-1 overflow-x-auto border-b border-[var(--border)] bg-[var(--bg-input)] px-2 py-1.5 transition-colors duration-200 ${F}`,
|
|
754
754
|
children: U.length > 0 ? U.map((G) => {
|
|
755
755
|
const Se = G.service === (de == null ? void 0 : de.service);
|
|
756
756
|
return /* @__PURE__ */ t(
|
|
@@ -923,10 +923,10 @@ function Xd({
|
|
|
923
923
|
const i = fs(), s = qo(e || i), c = a === "popover", [u, m] = P(!1), f = se(null), [b, p] = P({
|
|
924
924
|
horizontal: "left",
|
|
925
925
|
vertical: "bottom"
|
|
926
|
-
}), [A, w] = P(s.year), [y, v] = P(s.month), [N, M] = P("days"), g = 16, [
|
|
926
|
+
}), [A, w] = P(s.year), [y, v] = P(s.month), [N, M] = P("days"), g = 16, [j, $] = P(0), k = A - 7 + j, _ = Array.from({ length: g }, (V, C) => k + C);
|
|
927
927
|
ie(() => {
|
|
928
928
|
if (!c || !u || !f.current) return;
|
|
929
|
-
const V = f.current.getBoundingClientRect(),
|
|
929
|
+
const V = f.current.getBoundingClientRect(), C = 8, K = 280, ae = 340, L = V.left + K > window.innerWidth - C, O = V.right - K >= C, te = V.bottom + 8 + ae > window.innerHeight - C, Q = V.top - 8 - ae >= C;
|
|
930
930
|
p({
|
|
931
931
|
horizontal: L && O ? "right" : "left",
|
|
932
932
|
vertical: te && Q ? "top" : "bottom"
|
|
@@ -936,28 +936,28 @@ function Xd({
|
|
|
936
936
|
function V(K) {
|
|
937
937
|
f.current && (f.current.contains(K.target) || m(!1));
|
|
938
938
|
}
|
|
939
|
-
function
|
|
939
|
+
function C(K) {
|
|
940
940
|
K.key === "Escape" && m(!1);
|
|
941
941
|
}
|
|
942
|
-
return document.addEventListener("mousedown", V), document.addEventListener("keydown",
|
|
943
|
-
document.removeEventListener("mousedown", V), document.removeEventListener("keydown",
|
|
942
|
+
return document.addEventListener("mousedown", V), document.addEventListener("keydown", C), () => {
|
|
943
|
+
document.removeEventListener("mousedown", V), document.removeEventListener("keydown", C);
|
|
944
944
|
};
|
|
945
945
|
}, [c, u]);
|
|
946
946
|
function Y() {
|
|
947
947
|
y === 1 ? (w((V) => V - 1), v(12)) : v((V) => V - 1);
|
|
948
948
|
}
|
|
949
|
-
function
|
|
949
|
+
function E() {
|
|
950
950
|
y === 12 ? (w((V) => V + 1), v(1)) : v((V) => V + 1);
|
|
951
951
|
}
|
|
952
952
|
const W = new Date(A, y - 1, 1).getDay(), le = new Date(A, y, 0).getDate(), S = [
|
|
953
953
|
...Array(W).fill(null),
|
|
954
|
-
...Array.from({ length: le }, (V,
|
|
954
|
+
...Array.from({ length: le }, (V, C) => C + 1)
|
|
955
955
|
];
|
|
956
956
|
for (; S.length < _n * 7; ) S.push(null);
|
|
957
|
-
const
|
|
957
|
+
const F = S.slice(0, _n * 7);
|
|
958
958
|
function Z(V) {
|
|
959
|
-
const
|
|
960
|
-
n &&
|
|
959
|
+
const C = ra(A, y, V);
|
|
960
|
+
n && C < n || (r(C), c && m(!1));
|
|
961
961
|
}
|
|
962
962
|
const q = {
|
|
963
963
|
background: "none",
|
|
@@ -1006,7 +1006,7 @@ function Xd({
|
|
|
1006
1006
|
{
|
|
1007
1007
|
type: "button",
|
|
1008
1008
|
onClick: () => {
|
|
1009
|
-
M("years"),
|
|
1009
|
+
M("years"), $(0);
|
|
1010
1010
|
},
|
|
1011
1011
|
style: {
|
|
1012
1012
|
background: "none",
|
|
@@ -1033,7 +1033,7 @@ function Xd({
|
|
|
1033
1033
|
"button",
|
|
1034
1034
|
{
|
|
1035
1035
|
type: "button",
|
|
1036
|
-
onClick:
|
|
1036
|
+
onClick: E,
|
|
1037
1037
|
style: q,
|
|
1038
1038
|
title: "Mes siguiente",
|
|
1039
1039
|
children: /* @__PURE__ */ t(Lt, { size: 16 })
|
|
@@ -1044,7 +1044,7 @@ function Xd({
|
|
|
1044
1044
|
"button",
|
|
1045
1045
|
{
|
|
1046
1046
|
type: "button",
|
|
1047
|
-
onClick: () =>
|
|
1047
|
+
onClick: () => $((V) => V - g),
|
|
1048
1048
|
style: q,
|
|
1049
1049
|
children: /* @__PURE__ */ t(qt, { size: 16 })
|
|
1050
1050
|
}
|
|
@@ -1065,9 +1065,9 @@ function Xd({
|
|
|
1065
1065
|
padding: "2px 6px"
|
|
1066
1066
|
},
|
|
1067
1067
|
children: [
|
|
1068
|
-
|
|
1068
|
+
_[0],
|
|
1069
1069
|
" – ",
|
|
1070
|
-
|
|
1070
|
+
_[_.length - 1]
|
|
1071
1071
|
]
|
|
1072
1072
|
}
|
|
1073
1073
|
),
|
|
@@ -1075,7 +1075,7 @@ function Xd({
|
|
|
1075
1075
|
"button",
|
|
1076
1076
|
{
|
|
1077
1077
|
type: "button",
|
|
1078
|
-
onClick: () =>
|
|
1078
|
+
onClick: () => $((V) => V + g),
|
|
1079
1079
|
style: q,
|
|
1080
1080
|
children: /* @__PURE__ */ t(Lt, { size: 16 })
|
|
1081
1081
|
}
|
|
@@ -1093,13 +1093,13 @@ function Xd({
|
|
|
1093
1093
|
gap: 3,
|
|
1094
1094
|
marginBottom: 8
|
|
1095
1095
|
},
|
|
1096
|
-
children: us.map((V,
|
|
1097
|
-
const K =
|
|
1096
|
+
children: us.map((V, C) => {
|
|
1097
|
+
const K = C + 1 === y;
|
|
1098
1098
|
return /* @__PURE__ */ t(
|
|
1099
1099
|
"button",
|
|
1100
1100
|
{
|
|
1101
1101
|
type: "button",
|
|
1102
|
-
onClick: () => v(
|
|
1102
|
+
onClick: () => v(C + 1),
|
|
1103
1103
|
style: {
|
|
1104
1104
|
border: "none",
|
|
1105
1105
|
cursor: "pointer",
|
|
@@ -1131,8 +1131,8 @@ function Xd({
|
|
|
1131
1131
|
gridTemplateColumns: "repeat(4,1fr)",
|
|
1132
1132
|
gap: 3
|
|
1133
1133
|
},
|
|
1134
|
-
children:
|
|
1135
|
-
const
|
|
1134
|
+
children: _.map((V) => {
|
|
1135
|
+
const C = V === A;
|
|
1136
1136
|
return /* @__PURE__ */ t(
|
|
1137
1137
|
"button",
|
|
1138
1138
|
{
|
|
@@ -1145,11 +1145,11 @@ function Xd({
|
|
|
1145
1145
|
cursor: "pointer",
|
|
1146
1146
|
borderRadius: 6,
|
|
1147
1147
|
fontSize: 12,
|
|
1148
|
-
fontWeight:
|
|
1148
|
+
fontWeight: C ? 700 : 400,
|
|
1149
1149
|
padding: "6px 0",
|
|
1150
|
-
background:
|
|
1151
|
-
color:
|
|
1152
|
-
outline: V === (/* @__PURE__ */ new Date()).getFullYear() && !
|
|
1150
|
+
background: C ? "var(--primary)" : "transparent",
|
|
1151
|
+
color: C ? "var(--primary-fg, #ffffff)" : "var(--text-main)",
|
|
1152
|
+
outline: V === (/* @__PURE__ */ new Date()).getFullYear() && !C ? "2px solid var(--primary)" : "none",
|
|
1153
1153
|
outlineOffset: "-2px"
|
|
1154
1154
|
},
|
|
1155
1155
|
children: V
|
|
@@ -1196,9 +1196,9 @@ function Xd({
|
|
|
1196
1196
|
padding: "4px 8px 10px",
|
|
1197
1197
|
gap: 2
|
|
1198
1198
|
},
|
|
1199
|
-
children:
|
|
1199
|
+
children: F.map((V, C) => {
|
|
1200
1200
|
if (V === null)
|
|
1201
|
-
return /* @__PURE__ */ t("div", { style: { aspectRatio: "1" } },
|
|
1201
|
+
return /* @__PURE__ */ t("div", { style: { aspectRatio: "1" } }, C);
|
|
1202
1202
|
const K = ra(A, y, V), ae = K === e, L = K === i, O = !!(n && K < n);
|
|
1203
1203
|
return /* @__PURE__ */ t(
|
|
1204
1204
|
"button",
|
|
@@ -1221,7 +1221,7 @@ function Xd({
|
|
|
1221
1221
|
},
|
|
1222
1222
|
children: V
|
|
1223
1223
|
},
|
|
1224
|
-
|
|
1224
|
+
C
|
|
1225
1225
|
);
|
|
1226
1226
|
})
|
|
1227
1227
|
}
|
|
@@ -1363,14 +1363,14 @@ function Ko({
|
|
|
1363
1363
|
ie(() => () => {
|
|
1364
1364
|
M.current && window.clearTimeout(M.current);
|
|
1365
1365
|
}, []);
|
|
1366
|
-
function g(
|
|
1367
|
-
N(!0), u == null || u(
|
|
1366
|
+
function g($) {
|
|
1367
|
+
N(!0), u == null || u($), M.current && window.clearTimeout(M.current), M.current = window.setTimeout(() => {
|
|
1368
1368
|
N(!1), M.current = null;
|
|
1369
1369
|
}, r);
|
|
1370
1370
|
}
|
|
1371
|
-
async function
|
|
1372
|
-
var
|
|
1373
|
-
if (c &&
|
|
1371
|
+
async function j($) {
|
|
1372
|
+
var _;
|
|
1373
|
+
if (c && $.stopPropagation(), A == null || A($), $.defaultPrevented) return;
|
|
1374
1374
|
const k = gs(e);
|
|
1375
1375
|
if (k)
|
|
1376
1376
|
try {
|
|
@@ -1378,11 +1378,11 @@ function Ko({
|
|
|
1378
1378
|
} catch (Y) {
|
|
1379
1379
|
try {
|
|
1380
1380
|
Uo(k), g(k);
|
|
1381
|
-
} catch (
|
|
1382
|
-
m == null || m(
|
|
1381
|
+
} catch (E) {
|
|
1382
|
+
m == null || m(E, k);
|
|
1383
1383
|
return;
|
|
1384
1384
|
}
|
|
1385
|
-
(
|
|
1385
|
+
(_ = navigator.clipboard) != null && _.writeText || m == null || m(Y, k);
|
|
1386
1386
|
}
|
|
1387
1387
|
}
|
|
1388
1388
|
return /* @__PURE__ */ o(
|
|
@@ -1390,7 +1390,7 @@ function Ko({
|
|
|
1390
1390
|
{
|
|
1391
1391
|
...y,
|
|
1392
1392
|
type: w,
|
|
1393
|
-
onClick:
|
|
1393
|
+
onClick: j,
|
|
1394
1394
|
title: v ? a : n,
|
|
1395
1395
|
"aria-label": y["aria-label"] ?? (v ? a : n),
|
|
1396
1396
|
"data-copied": v ? "true" : void 0,
|
|
@@ -1510,7 +1510,7 @@ function Vt({
|
|
|
1510
1510
|
searchable: y = !0,
|
|
1511
1511
|
minOptionsForSearch: v = 6
|
|
1512
1512
|
}) {
|
|
1513
|
-
const [N, M] = P(!1), [g,
|
|
1513
|
+
const [N, M] = P(!1), [g, j] = P(""), [$, k] = P(-1), [_, Y] = P(!1), [E, W] = P({}), le = se(null), S = se(null), F = se(null), Z = se(null), q = y && n.length >= v, re = n.find((X) => X.value === e) ?? null, V = l === "ghost", C = a === "error" ? "var(--danger)" : N ? "var(--primary)" : "var(--border)", K = q && g.trim() ? n.filter(
|
|
1514
1514
|
(X) => {
|
|
1515
1515
|
var B;
|
|
1516
1516
|
return X.label.toLowerCase().includes(g.toLowerCase()) || ((B = X.sublabel) == null ? void 0 : B.toLowerCase().includes(g.toLowerCase()));
|
|
@@ -1518,7 +1518,7 @@ function Vt({
|
|
|
1518
1518
|
) : n, ae = Ce(() => {
|
|
1519
1519
|
const X = le.current;
|
|
1520
1520
|
if (!X) return;
|
|
1521
|
-
const B = X.getBoundingClientRect(), T = q ? 272 : 212,
|
|
1521
|
+
const B = X.getBoundingClientRect(), T = q ? 272 : 212, H = window.innerHeight - B.bottom, U = H < T && B.top > H;
|
|
1522
1522
|
W({
|
|
1523
1523
|
position: "fixed",
|
|
1524
1524
|
left: B.left,
|
|
@@ -1532,15 +1532,15 @@ function Vt({
|
|
|
1532
1532
|
ie(() => Y(!0), []), ie(() => {
|
|
1533
1533
|
if (!N) return;
|
|
1534
1534
|
function X(B) {
|
|
1535
|
-
var
|
|
1535
|
+
var H, U;
|
|
1536
1536
|
const T = B.target;
|
|
1537
|
-
!((
|
|
1537
|
+
!((H = le.current) != null && H.contains(T)) && !((U = S.current) != null && U.contains(T)) && (M(!1), j(""));
|
|
1538
1538
|
}
|
|
1539
1539
|
return document.addEventListener("mousedown", X), () => document.removeEventListener("mousedown", X);
|
|
1540
1540
|
}, [N]), ie(() => {
|
|
1541
1541
|
N && (k(-1), ae(), q && setTimeout(() => {
|
|
1542
1542
|
var X;
|
|
1543
|
-
return (X =
|
|
1543
|
+
return (X = F.current) == null ? void 0 : X.focus();
|
|
1544
1544
|
}, 0));
|
|
1545
1545
|
}, [N, q, ae]), ie(() => {
|
|
1546
1546
|
if (N)
|
|
@@ -1548,29 +1548,29 @@ function Vt({
|
|
|
1548
1548
|
window.removeEventListener("resize", ae), window.removeEventListener("scroll", ae, !0);
|
|
1549
1549
|
};
|
|
1550
1550
|
}, [N, ae]), ie(() => {
|
|
1551
|
-
if (
|
|
1552
|
-
const X = Z.current.children[
|
|
1551
|
+
if ($ < 0 || !Z.current) return;
|
|
1552
|
+
const X = Z.current.children[$];
|
|
1553
1553
|
X == null || X.scrollIntoView({ block: "nearest" });
|
|
1554
|
-
}, [
|
|
1554
|
+
}, [$]);
|
|
1555
1555
|
const L = Ce(
|
|
1556
1556
|
(X) => {
|
|
1557
|
-
r(X), M(!1),
|
|
1557
|
+
r(X), M(!1), j("");
|
|
1558
1558
|
},
|
|
1559
1559
|
[r]
|
|
1560
1560
|
), O = se(N);
|
|
1561
1561
|
O.current = N;
|
|
1562
1562
|
const te = se(K);
|
|
1563
1563
|
te.current = K;
|
|
1564
|
-
const Q = se(
|
|
1565
|
-
Q.current =
|
|
1564
|
+
const Q = se($);
|
|
1565
|
+
Q.current = $;
|
|
1566
1566
|
const oe = se(u);
|
|
1567
1567
|
oe.current = u;
|
|
1568
1568
|
const D = se(L);
|
|
1569
1569
|
D.current = L, ie(() => {
|
|
1570
1570
|
function X(B) {
|
|
1571
1571
|
var ce, de;
|
|
1572
|
-
const T = document.activeElement,
|
|
1573
|
-
if (!(!
|
|
1572
|
+
const T = document.activeElement, H = ((ce = le.current) == null ? void 0 : ce.contains(T)) ?? !1, U = ((de = S.current) == null ? void 0 : de.contains(T)) ?? !1;
|
|
1573
|
+
if (!(!H && !U)) {
|
|
1574
1574
|
if (!O.current) {
|
|
1575
1575
|
(B.key === "Enter" || B.key === " " || B.key === "ArrowDown") && (B.preventDefault(), M(!0));
|
|
1576
1576
|
return;
|
|
@@ -1589,7 +1589,7 @@ function Vt({
|
|
|
1589
1589
|
break;
|
|
1590
1590
|
}
|
|
1591
1591
|
case "Escape":
|
|
1592
|
-
B.preventDefault(), B.stopPropagation(), M(!1),
|
|
1592
|
+
B.preventDefault(), B.stopPropagation(), M(!1), j("");
|
|
1593
1593
|
break;
|
|
1594
1594
|
}
|
|
1595
1595
|
}
|
|
@@ -1603,7 +1603,7 @@ function Vt({
|
|
|
1603
1603
|
"data-bonsaif-select-dropdown": "true",
|
|
1604
1604
|
className: "rounded-xl shadow-xl overflow-hidden",
|
|
1605
1605
|
style: {
|
|
1606
|
-
|
|
1606
|
+
...E,
|
|
1607
1607
|
background: "var(--bg-card)",
|
|
1608
1608
|
border: "1px solid var(--border)"
|
|
1609
1609
|
},
|
|
@@ -1624,10 +1624,10 @@ function Vt({
|
|
|
1624
1624
|
/* @__PURE__ */ t(
|
|
1625
1625
|
"input",
|
|
1626
1626
|
{
|
|
1627
|
-
ref:
|
|
1627
|
+
ref: F,
|
|
1628
1628
|
value: g,
|
|
1629
1629
|
onChange: (X) => {
|
|
1630
|
-
|
|
1630
|
+
j(X.target.value), k(-1);
|
|
1631
1631
|
},
|
|
1632
1632
|
placeholder: "Buscar…",
|
|
1633
1633
|
className: "min-w-0 flex-1 text-sm bg-transparent outline-none",
|
|
@@ -1639,7 +1639,7 @@ function Vt({
|
|
|
1639
1639
|
{
|
|
1640
1640
|
type: "button",
|
|
1641
1641
|
onMouseDown: (X) => {
|
|
1642
|
-
X.preventDefault(),
|
|
1642
|
+
X.preventDefault(), j("");
|
|
1643
1643
|
},
|
|
1644
1644
|
children: /* @__PURE__ */ t(
|
|
1645
1645
|
ze,
|
|
@@ -1677,7 +1677,7 @@ function Vt({
|
|
|
1677
1677
|
onMouseEnter: () => k(-1),
|
|
1678
1678
|
className: "flex items-center gap-2 px-3 py-2 cursor-pointer text-sm transition-colors",
|
|
1679
1679
|
style: {
|
|
1680
|
-
background:
|
|
1680
|
+
background: $ === -1 && !g.trim() ? "var(--bg-hover)" : "transparent",
|
|
1681
1681
|
color: "var(--text-muted)",
|
|
1682
1682
|
fontStyle: "italic"
|
|
1683
1683
|
},
|
|
@@ -1685,7 +1685,7 @@ function Vt({
|
|
|
1685
1685
|
}
|
|
1686
1686
|
),
|
|
1687
1687
|
K.map((X, B) => {
|
|
1688
|
-
const
|
|
1688
|
+
const H = B === $, U = X.value === e;
|
|
1689
1689
|
return /* @__PURE__ */ o(
|
|
1690
1690
|
"li",
|
|
1691
1691
|
{
|
|
@@ -1697,7 +1697,7 @@ function Vt({
|
|
|
1697
1697
|
onMouseEnter: () => !X.disabled && k(B),
|
|
1698
1698
|
className: "flex items-center gap-2 px-3 py-2 cursor-pointer text-sm transition-colors",
|
|
1699
1699
|
style: {
|
|
1700
|
-
background:
|
|
1700
|
+
background: H ? "var(--bg-hover)" : U ? "color-mix(in srgb, var(--primary) 6%, transparent)" : "transparent",
|
|
1701
1701
|
color: X.disabled ? "var(--text-muted)" : "var(--text-main)",
|
|
1702
1702
|
cursor: X.disabled ? "not-allowed" : "pointer",
|
|
1703
1703
|
boxShadow: U ? "inset 2px 0 0 var(--primary)" : void 0
|
|
@@ -1767,7 +1767,7 @@ function Vt({
|
|
|
1767
1767
|
padding: zn(w),
|
|
1768
1768
|
background: V ? "transparent" : "var(--bg-input)",
|
|
1769
1769
|
color: re ? "var(--text-main)" : "var(--text-muted)",
|
|
1770
|
-
border: V ? "1px solid transparent" : `1px solid ${
|
|
1770
|
+
border: V ? "1px solid transparent" : `1px solid ${C}`,
|
|
1771
1771
|
opacity: m ? 0.5 : 1,
|
|
1772
1772
|
cursor: m ? "not-allowed" : "pointer"
|
|
1773
1773
|
},
|
|
@@ -1818,7 +1818,7 @@ function Vt({
|
|
|
1818
1818
|
]
|
|
1819
1819
|
}
|
|
1820
1820
|
),
|
|
1821
|
-
N &&
|
|
1821
|
+
N && _ && it(me, document.body)
|
|
1822
1822
|
]
|
|
1823
1823
|
}
|
|
1824
1824
|
);
|
|
@@ -1927,12 +1927,12 @@ function Vo({
|
|
|
1927
1927
|
backdropClassName: N = ys,
|
|
1928
1928
|
contentClassName: M = "p-4",
|
|
1929
1929
|
ariaLabel: g,
|
|
1930
|
-
frameless:
|
|
1931
|
-
disabled:
|
|
1930
|
+
frameless: j = !1,
|
|
1931
|
+
disabled: $ = !1
|
|
1932
1932
|
}) {
|
|
1933
|
-
const [k,
|
|
1934
|
-
if (ie(() => (e ? (W.current && clearTimeout(W.current),
|
|
1935
|
-
() =>
|
|
1933
|
+
const [k, _] = P(!1), [Y, E] = P(!1), W = se(null);
|
|
1934
|
+
if (ie(() => (e ? (W.current && clearTimeout(W.current), _(!0), requestAnimationFrame(() => requestAnimationFrame(() => E(!0)))) : (E(!1), W.current = setTimeout(
|
|
1935
|
+
() => _(!1),
|
|
1936
1936
|
Ur + 40
|
|
1937
1937
|
)), () => {
|
|
1938
1938
|
W.current && clearTimeout(W.current);
|
|
@@ -1948,7 +1948,7 @@ function Vo({
|
|
|
1948
1948
|
};
|
|
1949
1949
|
return window.addEventListener("keydown", re), () => window.removeEventListener("keydown", re);
|
|
1950
1950
|
}, [p, r, e]), !k) return null;
|
|
1951
|
-
const le = n || a || i || l || A, S = m ?? xs[u],
|
|
1951
|
+
const le = n || a || i || l || A, S = m ?? xs[u], F = w === "bottom-mobile" ? "items-end sm:items-center justify-center p-0 sm:p-4" : "items-center justify-center", Z = w === "bottom-mobile" ? "rounded-t-2xl sm:rounded-2xl" : "rounded-2xl", q = Y ? "translateY(0) scale(1)" : w === "bottom-mobile" ? "translateY(16px) scale(0.98)" : "translateY(10px) scale(0.96)";
|
|
1952
1952
|
return it(
|
|
1953
1953
|
/* @__PURE__ */ o(
|
|
1954
1954
|
"div",
|
|
@@ -1957,7 +1957,7 @@ function Vo({
|
|
|
1957
1957
|
"aria-modal": "true",
|
|
1958
1958
|
"data-bonsaif-overlay": "true",
|
|
1959
1959
|
"aria-label": g ?? n,
|
|
1960
|
-
className: `fixed inset-0 flex ${
|
|
1960
|
+
className: `fixed inset-0 flex ${F} ${M}`,
|
|
1961
1961
|
style: { zIndex: f },
|
|
1962
1962
|
children: [
|
|
1963
1963
|
/* @__PURE__ */ t(
|
|
@@ -1974,18 +1974,18 @@ function Vo({
|
|
|
1974
1974
|
/* @__PURE__ */ o(
|
|
1975
1975
|
"div",
|
|
1976
1976
|
{
|
|
1977
|
-
className: `relative z-10 flex max-h-[92dvh] w-full flex-col overflow-hidden ${
|
|
1977
|
+
className: `relative z-10 flex max-h-[92dvh] w-full flex-col overflow-hidden ${j ? "shadow-none" : "shadow-2xl"} ${Z} ${v}`,
|
|
1978
1978
|
style: {
|
|
1979
1979
|
maxWidth: S,
|
|
1980
|
-
background:
|
|
1981
|
-
border:
|
|
1980
|
+
background: j ? "transparent" : "var(--bg-card)",
|
|
1981
|
+
border: j ? "none" : "1px solid var(--border)",
|
|
1982
1982
|
opacity: Y ? 1 : 0,
|
|
1983
1983
|
transform: q,
|
|
1984
1984
|
transition: `opacity ${Ur}ms ease, transform ${Ur}ms ease`
|
|
1985
1985
|
},
|
|
1986
1986
|
onClick: (re) => re.stopPropagation(),
|
|
1987
1987
|
children: [
|
|
1988
|
-
|
|
1988
|
+
$ && /* @__PURE__ */ t(
|
|
1989
1989
|
"div",
|
|
1990
1990
|
{
|
|
1991
1991
|
className: "absolute inset-0 z-[1002] cursor-not-allowed rounded-2xl",
|
|
@@ -2552,21 +2552,21 @@ function Hs({
|
|
|
2552
2552
|
onToggleAll: N,
|
|
2553
2553
|
highlightSelected: M = !0,
|
|
2554
2554
|
rowClassName: g,
|
|
2555
|
-
getRowCategory:
|
|
2556
|
-
stickyHeader:
|
|
2555
|
+
getRowCategory: j,
|
|
2556
|
+
stickyHeader: $ = !0,
|
|
2557
2557
|
pageSize: k = 25,
|
|
2558
|
-
pageSizeOptions:
|
|
2558
|
+
pageSizeOptions: _,
|
|
2559
2559
|
pageSizeSelectWidth: Y = 62,
|
|
2560
|
-
pageSizeSelectHeight:
|
|
2560
|
+
pageSizeSelectHeight: E = 30,
|
|
2561
2561
|
pageSizeSelectPadding: W = "0 7px",
|
|
2562
2562
|
totalRows: le,
|
|
2563
2563
|
page: S,
|
|
2564
|
-
onPageChange:
|
|
2564
|
+
onPageChange: F,
|
|
2565
2565
|
onPageSizeChange: Z,
|
|
2566
2566
|
storageKey: q,
|
|
2567
2567
|
stickyFirstColumn: re = !1,
|
|
2568
2568
|
bottomOffset: V = 0,
|
|
2569
|
-
compact:
|
|
2569
|
+
compact: C = !0,
|
|
2570
2570
|
restrictHeight: K = !0,
|
|
2571
2571
|
maxHeight: ae,
|
|
2572
2572
|
minTableWidth: L,
|
|
@@ -2579,7 +2579,7 @@ function Hs({
|
|
|
2579
2579
|
enableBql: X = !1,
|
|
2580
2580
|
bqlValue: B,
|
|
2581
2581
|
defaultBqlValue: T = "",
|
|
2582
|
-
onBqlChange:
|
|
2582
|
+
onBqlChange: H,
|
|
2583
2583
|
bqlDescription: U = "Filtra registros con Bonsaif Query Language",
|
|
2584
2584
|
bqlPlaceholder: ce = `status = activo
|
|
2585
2585
|
rol IN (admin, employee)`,
|
|
@@ -2682,7 +2682,7 @@ rol IN (admin, employee)`,
|
|
|
2682
2682
|
Te,
|
|
2683
2683
|
Is(ne == null ? void 0 : ne.settings) ? ne == null ? void 0 : ne.settings : null
|
|
2684
2684
|
), ke = rn(
|
|
2685
|
-
|
|
2685
|
+
_ ?? tn()
|
|
2686
2686
|
), ye = k === !1 ? 0 : k, Fe = ge.layout ? J == null ? void 0 : J.columnOrder : void 0, Ve = Array.isArray(Fe) ? Fe.filter((Ie) => I.includes(Ie)) : [], ir = I.filter((Ie) => !Ve.includes(Ie)), Fr = Ve.length > 0 ? [...Ve, ...ir] : I, Hr = Object.fromEntries(
|
|
2687
2687
|
d.map((Ie) => [
|
|
2688
2688
|
Ie.key,
|
|
@@ -2710,7 +2710,7 @@ rol IN (admin, employee)`,
|
|
|
2710
2710
|
}
|
|
2711
2711
|
if (ge.bql) {
|
|
2712
2712
|
const Ie = typeof (J == null ? void 0 : J.bql) == "string" ? J.bql : T;
|
|
2713
|
-
Jt ?
|
|
2713
|
+
Jt ? H == null || H(Ie) : xn(Ie);
|
|
2714
2714
|
}
|
|
2715
2715
|
ge.bql && er(
|
|
2716
2716
|
Array.isArray(J == null ? void 0 : J.bqlHistory) ? J.bqlHistory.filter(
|
|
@@ -2743,7 +2743,7 @@ rol IN (admin, employee)`,
|
|
|
2743
2743
|
}).catch(() => {
|
|
2744
2744
|
if (!ee) {
|
|
2745
2745
|
const ne = Fn(q), Te = rn(
|
|
2746
|
-
|
|
2746
|
+
_ ?? tn()
|
|
2747
2747
|
), J = k === !1 ? 0 : k, ke = ge.layout ? ne == null ? void 0 : ne.columnOrder : void 0, ye = Array.isArray(ke) ? ke.filter((Me) => I.includes(Me)) : [], Fe = I.filter((Me) => !ye.includes(Me)), Ve = ye.length > 0 ? [...ye, ...Fe] : I, ir = Object.fromEntries(
|
|
2748
2748
|
d.map((Me) => [
|
|
2749
2749
|
Me.key,
|
|
@@ -2775,7 +2775,7 @@ rol IN (admin, employee)`,
|
|
|
2775
2775
|
}
|
|
2776
2776
|
if (ge.bql) {
|
|
2777
2777
|
const Me = typeof (ne == null ? void 0 : ne.bql) == "string" ? ne.bql : T;
|
|
2778
|
-
Jt ?
|
|
2778
|
+
Jt ? H == null || H(Me) : xn(Me);
|
|
2779
2779
|
}
|
|
2780
2780
|
ge.bql && er(
|
|
2781
2781
|
Array.isArray(ne == null ? void 0 : ne.bqlHistory) ? ne.bqlHistory.filter(
|
|
@@ -2826,9 +2826,9 @@ rol IN (admin, employee)`,
|
|
|
2826
2826
|
ge.bql,
|
|
2827
2827
|
ge.pagination,
|
|
2828
2828
|
Jt,
|
|
2829
|
-
|
|
2829
|
+
H,
|
|
2830
2830
|
T,
|
|
2831
|
-
|
|
2831
|
+
_,
|
|
2832
2832
|
k
|
|
2833
2833
|
]), ie(() => {
|
|
2834
2834
|
if (!q || !he || !R || !Oe.current) return;
|
|
@@ -2919,7 +2919,7 @@ rol IN (admin, employee)`,
|
|
|
2919
2919
|
Zt({}), yr({});
|
|
2920
2920
|
}
|
|
2921
2921
|
function Ca(d) {
|
|
2922
|
-
Jt || xn(d),
|
|
2922
|
+
Jt || xn(d), H == null || H(d);
|
|
2923
2923
|
}
|
|
2924
2924
|
function Ar(d) {
|
|
2925
2925
|
const h = d.trim();
|
|
@@ -3120,11 +3120,11 @@ rol IN (admin, employee)`,
|
|
|
3120
3120
|
}, [r]), ie(() => {
|
|
3121
3121
|
Er(1);
|
|
3122
3122
|
}, [tt, Ke]);
|
|
3123
|
-
const xt = !!(
|
|
3123
|
+
const xt = !!(F && Z), yt = k !== !1, _i = je.useMemo(
|
|
3124
3124
|
() => rn(
|
|
3125
|
-
|
|
3125
|
+
_ ?? tn()
|
|
3126
3126
|
),
|
|
3127
|
-
[
|
|
3127
|
+
[_]
|
|
3128
3128
|
), He = xt ? S ?? 1 : ki, nt = xt || yt ? $r : r.length, at = !!y && !!v && !!N, Rt = !!m, Ta = je.useMemo(
|
|
3129
3129
|
() => new Set(
|
|
3130
3130
|
gn ? Array.from(b ?? []) : ma
|
|
@@ -3164,10 +3164,10 @@ rol IN (admin, employee)`,
|
|
|
3164
3164
|
function Bn(d) {
|
|
3165
3165
|
if (a) return;
|
|
3166
3166
|
const h = Math.max(1, Math.min(d, Dn));
|
|
3167
|
-
xt ?
|
|
3167
|
+
xt ? F(h) : Er(h);
|
|
3168
3168
|
}
|
|
3169
3169
|
function qi(d) {
|
|
3170
|
-
a || (Cn(d), xt ? (Z(d),
|
|
3170
|
+
a || (Cn(d), xt ? (Z(d), F(1)) : Er(1), Z && Z(d));
|
|
3171
3171
|
}
|
|
3172
3172
|
function Da(d) {
|
|
3173
3173
|
const h = new Set(Ta);
|
|
@@ -3220,7 +3220,7 @@ rol IN (admin, employee)`,
|
|
|
3220
3220
|
"div",
|
|
3221
3221
|
{
|
|
3222
3222
|
role: "columnheader",
|
|
3223
|
-
className: `${
|
|
3223
|
+
className: `${C ? "px-2 py-1.5" : "px-3 py-2.5"} w-10`,
|
|
3224
3224
|
style: {
|
|
3225
3225
|
borderBottom: `1px solid ${_t}`,
|
|
3226
3226
|
borderRight: `1px solid ${$e}`
|
|
@@ -3231,7 +3231,7 @@ rol IN (admin, employee)`,
|
|
|
3231
3231
|
"div",
|
|
3232
3232
|
{
|
|
3233
3233
|
role: "columnheader",
|
|
3234
|
-
className: `${
|
|
3234
|
+
className: `${C ? "px-2 py-1.5" : "px-3 py-2.5"} w-10`,
|
|
3235
3235
|
style: re ? {
|
|
3236
3236
|
position: "sticky",
|
|
3237
3237
|
left: 0,
|
|
@@ -3287,7 +3287,7 @@ rol IN (admin, employee)`,
|
|
|
3287
3287
|
transition: "color 0.15s",
|
|
3288
3288
|
borderLeft: be ? "2px solid var(--primary)" : "2px solid transparent",
|
|
3289
3289
|
cursor: "default",
|
|
3290
|
-
padding: ee ?
|
|
3290
|
+
padding: ee ? C ? "7px 6px" : "9px 8px" : C ? "8px 6px 10px" : "10px 8px 12px"
|
|
3291
3291
|
},
|
|
3292
3292
|
onDragOver: (J) => Ii(d.key, J),
|
|
3293
3293
|
onDrop: (J) => Oi(d.key, J),
|
|
@@ -3326,7 +3326,7 @@ rol IN (admin, employee)`,
|
|
|
3326
3326
|
"span",
|
|
3327
3327
|
{
|
|
3328
3328
|
"data-dt-autofit-content": !0,
|
|
3329
|
-
className: `inline-flex max-w-full items-center font-semibold uppercase tracking-wider ${
|
|
3329
|
+
className: `inline-flex max-w-full items-center font-semibold uppercase tracking-wider ${C ? "text-[11px]" : "text-xs"}`,
|
|
3330
3330
|
children: /* @__PURE__ */ t("span", { className: "min-w-0 truncate", children: d.header })
|
|
3331
3331
|
}
|
|
3332
3332
|
) }),
|
|
@@ -4228,7 +4228,7 @@ ${I}`, ee = new Blob(["\uFEFF" + x], {
|
|
|
4228
4228
|
"div",
|
|
4229
4229
|
{
|
|
4230
4230
|
"aria-busy": a,
|
|
4231
|
-
className: `grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-2 rounded-b-xl border-t text-xs select-none ${
|
|
4231
|
+
className: `grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-2 rounded-b-xl border-t text-xs select-none ${C ? "px-2 py-0.5" : "px-3 py-1"}`,
|
|
4232
4232
|
style: { borderColor: "var(--border)", background: "var(--bg-input)" },
|
|
4233
4233
|
children: [
|
|
4234
4234
|
/* @__PURE__ */ o("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
@@ -4247,7 +4247,7 @@ ${I}`, ee = new Blob(["\uFEFF" + x], {
|
|
|
4247
4247
|
placeholder: "Filas",
|
|
4248
4248
|
searchable: !1,
|
|
4249
4249
|
disabled: a,
|
|
4250
|
-
height:
|
|
4250
|
+
height: E,
|
|
4251
4251
|
padding: W,
|
|
4252
4252
|
className: "shrink-0 [&>button]:rounded-md [&>button]:text-xs [&_svg]:h-3.5 [&_svg]:w-3.5",
|
|
4253
4253
|
style: { width: Y }
|
|
@@ -4346,7 +4346,7 @@ ${I}`, ee = new Blob(["\uFEFF" + x], {
|
|
|
4346
4346
|
"div",
|
|
4347
4347
|
{
|
|
4348
4348
|
role: "rowgroup",
|
|
4349
|
-
style:
|
|
4349
|
+
style: $ ? {
|
|
4350
4350
|
position: "sticky",
|
|
4351
4351
|
top: 0,
|
|
4352
4352
|
zIndex: 10,
|
|
@@ -4371,7 +4371,7 @@ ${I}`, ee = new Blob(["\uFEFF" + x], {
|
|
|
4371
4371
|
"div",
|
|
4372
4372
|
{
|
|
4373
4373
|
role: "cell",
|
|
4374
|
-
className: `${
|
|
4374
|
+
className: `${C ? "px-2 py-1.5" : "px-3 py-2"} w-10`,
|
|
4375
4375
|
style: {
|
|
4376
4376
|
borderBottom: `1px solid ${$e}`,
|
|
4377
4377
|
borderRight: `1px solid ${$e}`
|
|
@@ -4383,7 +4383,7 @@ ${I}`, ee = new Blob(["\uFEFF" + x], {
|
|
|
4383
4383
|
"div",
|
|
4384
4384
|
{
|
|
4385
4385
|
role: "cell",
|
|
4386
|
-
className:
|
|
4386
|
+
className: C ? "px-2 py-1.5" : "px-3 py-2",
|
|
4387
4387
|
style: {
|
|
4388
4388
|
borderBottom: `1px solid ${$e}`,
|
|
4389
4389
|
borderRight: `1px solid ${$e}`
|
|
@@ -4446,7 +4446,7 @@ ${I}`, ee = new Blob(["\uFEFF" + x], {
|
|
|
4446
4446
|
"div",
|
|
4447
4447
|
{
|
|
4448
4448
|
role: "rowgroup",
|
|
4449
|
-
style:
|
|
4449
|
+
style: $ ? {
|
|
4450
4450
|
position: "sticky",
|
|
4451
4451
|
top: 0,
|
|
4452
4452
|
zIndex: 10,
|
|
@@ -4470,7 +4470,7 @@ ${I}`, ee = new Blob(["\uFEFF" + x], {
|
|
|
4470
4470
|
"div",
|
|
4471
4471
|
{
|
|
4472
4472
|
role: "cell",
|
|
4473
|
-
className: `${
|
|
4473
|
+
className: `${C ? "px-2 py-1.5" : "px-3 py-2"} w-10`,
|
|
4474
4474
|
style: {
|
|
4475
4475
|
borderBottom: `1px solid ${$e}`,
|
|
4476
4476
|
borderRight: `1px solid ${$e}`
|
|
@@ -4485,7 +4485,7 @@ ${I}`, ee = new Blob(["\uFEFF" + x], {
|
|
|
4485
4485
|
{
|
|
4486
4486
|
role: "cell",
|
|
4487
4487
|
"data-dt-column-key": I.key,
|
|
4488
|
-
className:
|
|
4488
|
+
className: C ? "px-2 py-1.5" : "px-3 py-2",
|
|
4489
4489
|
style: ee ? {
|
|
4490
4490
|
position: "sticky",
|
|
4491
4491
|
left: Mn,
|
|
@@ -4548,7 +4548,7 @@ ${I}`, ee = new Blob(["\uFEFF" + x], {
|
|
|
4548
4548
|
"div",
|
|
4549
4549
|
{
|
|
4550
4550
|
role: "rowgroup",
|
|
4551
|
-
style:
|
|
4551
|
+
style: $ ? {
|
|
4552
4552
|
position: "sticky",
|
|
4553
4553
|
top: 0,
|
|
4554
4554
|
zIndex: 10,
|
|
@@ -4628,7 +4628,7 @@ ${I}`, ee = new Blob(["\uFEFF" + x], {
|
|
|
4628
4628
|
"div",
|
|
4629
4629
|
{
|
|
4630
4630
|
role: "rowgroup",
|
|
4631
|
-
style:
|
|
4631
|
+
style: $ ? {
|
|
4632
4632
|
position: "sticky",
|
|
4633
4633
|
top: 0,
|
|
4634
4634
|
zIndex: 10,
|
|
@@ -4639,8 +4639,8 @@ ${I}`, ee = new Blob(["\uFEFF" + x], {
|
|
|
4639
4639
|
}
|
|
4640
4640
|
),
|
|
4641
4641
|
/* @__PURE__ */ t("div", { role: "rowgroup", children: Ma.map((d, h) => {
|
|
4642
|
-
const I = n(d), x = Ra(
|
|
4643
|
-
|
|
4642
|
+
const I = n(d), x = Ra(j == null ? void 0 : j(d)), ee = h > 0 ? Ra(
|
|
4643
|
+
j == null ? void 0 : j(Ma[h - 1])
|
|
4644
4644
|
) : null, ue = x && x.key !== (ee == null ? void 0 : ee.key), be = at && y.has(I), Ne = Rt ? (f == null ? void 0 : f(d)) ?? !0 : !1, ne = Ne && Ta.has(I), Te = !!u || w && Ne, J = be && M ? "color-mix(in srgb, var(--primary) 8%, var(--bg-card))" : h % 2 === 1 ? "color-mix(in srgb, var(--bg-input) 30%, var(--bg-card))" : "var(--bg-card)";
|
|
4645
4645
|
return /* @__PURE__ */ o(je.Fragment, { children: [
|
|
4646
4646
|
ue && /* @__PURE__ */ t(
|
|
@@ -4653,7 +4653,7 @@ ${I}`, ee = new Blob(["\uFEFF" + x], {
|
|
|
4653
4653
|
"div",
|
|
4654
4654
|
{
|
|
4655
4655
|
role: "cell",
|
|
4656
|
-
className:
|
|
4656
|
+
className: C ? "px-2 py-2" : "px-3 py-3",
|
|
4657
4657
|
style: {
|
|
4658
4658
|
gridColumn: "1 / -1",
|
|
4659
4659
|
background: "color-mix(in srgb, var(--primary) 8%, var(--bg-input))",
|
|
@@ -4712,7 +4712,7 @@ ${I}`, ee = new Blob(["\uFEFF" + x], {
|
|
|
4712
4712
|
"div",
|
|
4713
4713
|
{
|
|
4714
4714
|
role: "cell",
|
|
4715
|
-
className: `${
|
|
4715
|
+
className: `${C ? "px-2 py-1.5" : "px-3 py-2"} flex w-10 items-center justify-center`,
|
|
4716
4716
|
style: {
|
|
4717
4717
|
borderBottom: `1px solid ${$e}`,
|
|
4718
4718
|
borderRight: `1px solid ${$e}`
|
|
@@ -4737,7 +4737,7 @@ ${I}`, ee = new Blob(["\uFEFF" + x], {
|
|
|
4737
4737
|
"div",
|
|
4738
4738
|
{
|
|
4739
4739
|
role: "cell",
|
|
4740
|
-
className: `${
|
|
4740
|
+
className: `${C ? "px-2 py-1.5" : "px-3 py-2"} w-10`,
|
|
4741
4741
|
style: re ? {
|
|
4742
4742
|
position: "sticky",
|
|
4743
4743
|
left: 0,
|
|
@@ -4773,7 +4773,7 @@ ${I}`, ee = new Blob(["\uFEFF" + x], {
|
|
|
4773
4773
|
role: "cell",
|
|
4774
4774
|
"data-dt-column-key": ke.key,
|
|
4775
4775
|
"data-dt-disable-row-click": ke.disableRowClick || Ve ? "true" : void 0,
|
|
4776
|
-
className: `${Ve ? "px-2 py-1.5 text-center" : `${
|
|
4776
|
+
className: `${Ve ? "px-2 py-1.5 text-center" : `${C ? "px-2 py-1.5" : "px-3 py-2"} ${Ba(ke.align)}`} ${Ms} ${ke.className ?? ""}`,
|
|
4777
4777
|
style: {
|
|
4778
4778
|
overflow: "hidden",
|
|
4779
4779
|
whiteSpace: "nowrap",
|
|
@@ -4814,7 +4814,7 @@ ${I}`, ee = new Blob(["\uFEFF" + x], {
|
|
|
4814
4814
|
"div",
|
|
4815
4815
|
{
|
|
4816
4816
|
role: "cell",
|
|
4817
|
-
className:
|
|
4817
|
+
className: C ? "px-2 py-2" : "px-3 py-3",
|
|
4818
4818
|
style: {
|
|
4819
4819
|
gridColumn: "1 / -1",
|
|
4820
4820
|
background: "color-mix(in srgb, var(--bg-input) 60%, var(--bg-card))",
|
|
@@ -4967,15 +4967,15 @@ function iu({
|
|
|
4967
4967
|
A.current = b;
|
|
4968
4968
|
const [w, y] = P({}), [v, N] = P(null), M = se(null);
|
|
4969
4969
|
M.current = v;
|
|
4970
|
-
const [g,
|
|
4970
|
+
const [g, j] = P({}), [$, k] = P(
|
|
4971
4971
|
{}
|
|
4972
|
-
),
|
|
4972
|
+
), _ = se(/* @__PURE__ */ new Set()), Y = se(null);
|
|
4973
4973
|
ie(() => {
|
|
4974
4974
|
var O;
|
|
4975
4975
|
const L = document.activeElement;
|
|
4976
4976
|
(!L || L === document.body) && ((O = Y.current) == null || O.focus({ preventScroll: !0 }));
|
|
4977
4977
|
}, []);
|
|
4978
|
-
const
|
|
4978
|
+
const E = e.map((L) => {
|
|
4979
4979
|
var O, te, Q;
|
|
4980
4980
|
return `${L.key}:${((Q = (te = (O = L.editable) == null ? void 0 : O.select) == null ? void 0 : te.options) == null ? void 0 : Q.length) ?? -1}`;
|
|
4981
4981
|
}).join("|");
|
|
@@ -4985,13 +4985,13 @@ function iu({
|
|
|
4985
4985
|
const O = (oe = (Q = L.editable) == null ? void 0 : Q.select) == null ? void 0 : oe.options;
|
|
4986
4986
|
if (!O) return;
|
|
4987
4987
|
const te = g[L.key];
|
|
4988
|
-
(!
|
|
4988
|
+
(!_.current.has(L.key) || (te == null ? void 0 : te.length) === 0 && O.length > 0) && (_.current.add(L.key), j((D) => ({ ...D, [L.key]: O })));
|
|
4989
4989
|
});
|
|
4990
|
-
}, [
|
|
4990
|
+
}, [E]);
|
|
4991
4991
|
const W = Ce(
|
|
4992
4992
|
async (L, O) => {
|
|
4993
|
-
if (
|
|
4994
|
-
|
|
4993
|
+
if (_.current.has(L)) return;
|
|
4994
|
+
_.current.add(L);
|
|
4995
4995
|
const { url: te, fetchOptions: Q } = O.select ?? {};
|
|
4996
4996
|
if (!(!te && !Q)) {
|
|
4997
4997
|
k((oe) => ({ ...oe, [L]: !0 }));
|
|
@@ -5004,9 +5004,9 @@ function iu({
|
|
|
5004
5004
|
if (!D.ok) throw new Error("fetch failed");
|
|
5005
5005
|
oe = await D.json();
|
|
5006
5006
|
}
|
|
5007
|
-
|
|
5007
|
+
j((D) => ({ ...D, [L]: oe }));
|
|
5008
5008
|
} catch {
|
|
5009
|
-
|
|
5009
|
+
j((oe) => ({ ...oe, [L]: [] }));
|
|
5010
5010
|
} finally {
|
|
5011
5011
|
k((oe) => ({ ...oe, [L]: !1 }));
|
|
5012
5012
|
}
|
|
@@ -5017,8 +5017,8 @@ function iu({
|
|
|
5017
5017
|
le.current = s;
|
|
5018
5018
|
const S = se(a);
|
|
5019
5019
|
S.current = a;
|
|
5020
|
-
const
|
|
5021
|
-
|
|
5020
|
+
const F = se(n);
|
|
5021
|
+
F.current = n;
|
|
5022
5022
|
const Z = se(e);
|
|
5023
5023
|
Z.current = e;
|
|
5024
5024
|
const q = se(i);
|
|
@@ -5054,21 +5054,21 @@ function iu({
|
|
|
5054
5054
|
te.has(me) || (te.add(me), Q.push(me));
|
|
5055
5055
|
}), p((D) => {
|
|
5056
5056
|
if (!D) return D;
|
|
5057
|
-
const me = O.findIndex((
|
|
5057
|
+
const me = O.findIndex((H) => H.key === D.colKey), X = Q.indexOf(D.rowId);
|
|
5058
5058
|
let B = me, T = X;
|
|
5059
5059
|
if (L === "up") T = Math.max(0, X - 1);
|
|
5060
5060
|
else if (L === "down")
|
|
5061
5061
|
T = Math.min(Q.length - 1, X + 1);
|
|
5062
5062
|
else if (L === "left") {
|
|
5063
|
-
let
|
|
5064
|
-
for (;
|
|
5065
|
-
|
|
5066
|
-
|
|
5063
|
+
let H = me - 1;
|
|
5064
|
+
for (; H >= 0 && O[H].selectable === !1; )
|
|
5065
|
+
H--;
|
|
5066
|
+
H >= 0 && (B = H);
|
|
5067
5067
|
} else if (L === "right") {
|
|
5068
|
-
let
|
|
5069
|
-
for (;
|
|
5070
|
-
|
|
5071
|
-
|
|
5068
|
+
let H = me + 1;
|
|
5069
|
+
for (; H < O.length && O[H].selectable === !1; )
|
|
5070
|
+
H++;
|
|
5071
|
+
H < O.length && (B = H);
|
|
5072
5072
|
}
|
|
5073
5073
|
return B === me && T === X ? D : { rowId: Q[T], colKey: O[B].key };
|
|
5074
5074
|
});
|
|
@@ -5078,7 +5078,7 @@ function iu({
|
|
|
5078
5078
|
var te;
|
|
5079
5079
|
return (te = Y.current) == null ? void 0 : te.focus({ preventScroll: !0 });
|
|
5080
5080
|
}, 0);
|
|
5081
|
-
}, []),
|
|
5081
|
+
}, []), C = Ce(
|
|
5082
5082
|
async (L, O, te) => {
|
|
5083
5083
|
var We;
|
|
5084
5084
|
const Q = Z.current.find((we) => we.key === O);
|
|
@@ -5101,9 +5101,9 @@ function iu({
|
|
|
5101
5101
|
return;
|
|
5102
5102
|
}
|
|
5103
5103
|
}
|
|
5104
|
-
const T =
|
|
5105
|
-
if (!
|
|
5106
|
-
const U =
|
|
5104
|
+
const T = F.current, H = le.current.find((we) => T(we) === L);
|
|
5105
|
+
if (!H) return;
|
|
5106
|
+
const U = H[oe];
|
|
5107
5107
|
f(null), y((we) => {
|
|
5108
5108
|
const Ee = { ...we };
|
|
5109
5109
|
return delete Ee[`${L}:${O}`], Ee;
|
|
@@ -5114,13 +5114,13 @@ function iu({
|
|
|
5114
5114
|
const we = document.activeElement;
|
|
5115
5115
|
(!we || we === document.body || (Ee = Y.current) != null && Ee.contains(we)) && ((pe = Y.current) == null || pe.focus({ preventScroll: !0 }));
|
|
5116
5116
|
}, 0), String(U ?? "") === String(B ?? "")) return;
|
|
5117
|
-
const Be = { ...
|
|
5117
|
+
const Be = { ...H, [oe]: B };
|
|
5118
5118
|
c(
|
|
5119
5119
|
(we) => we.map((Ee) => T(Ee) === L ? Be : Ee)
|
|
5120
5120
|
), N({ rowId: L, colKey: O });
|
|
5121
5121
|
try {
|
|
5122
5122
|
await ((We = S.current) == null ? void 0 : We.call(S, {
|
|
5123
|
-
row:
|
|
5123
|
+
row: H,
|
|
5124
5124
|
rowId: L,
|
|
5125
5125
|
field: oe,
|
|
5126
5126
|
oldValue: U,
|
|
@@ -5128,7 +5128,7 @@ function iu({
|
|
|
5128
5128
|
}));
|
|
5129
5129
|
} catch {
|
|
5130
5130
|
c(
|
|
5131
|
-
(we) => we.map((Ee) => T(Ee) === L ?
|
|
5131
|
+
(we) => we.map((Ee) => T(Ee) === L ? H : Ee)
|
|
5132
5132
|
), y((we) => ({
|
|
5133
5133
|
...we,
|
|
5134
5134
|
[`${L}:${O}`]: "Error al guardar. Intenta de nuevo."
|
|
@@ -5173,7 +5173,7 @@ function iu({
|
|
|
5173
5173
|
break;
|
|
5174
5174
|
case "Enter": {
|
|
5175
5175
|
const Q = Z.current.find((oe) => oe.key === O.colKey);
|
|
5176
|
-
Q != null && Q.editable && !q.current ? (f(O), Q.editable.type === "select" && !
|
|
5176
|
+
Q != null && Q.editable && !q.current ? (f(O), Q.editable.type === "select" && !_.current.has(O.colKey) && W(O.colKey, Q.editable)) : re("down");
|
|
5177
5177
|
break;
|
|
5178
5178
|
}
|
|
5179
5179
|
}
|
|
@@ -5222,27 +5222,27 @@ function iu({
|
|
|
5222
5222
|
className: `relative ${L.className ?? ""}`.trim(),
|
|
5223
5223
|
disableRowClick: !0,
|
|
5224
5224
|
cell: (te) => {
|
|
5225
|
-
const Q = n(te), oe = L.key, D = (m == null ? void 0 : m.rowId) === Q && (m == null ? void 0 : m.colKey) === oe, me = (b == null ? void 0 : b.rowId) === Q && (b == null ? void 0 : b.colKey) === oe, X = w[`${Q}:${oe}`], B = (v == null ? void 0 : v.rowId) === Q && (v == null ? void 0 : v.colKey) === oe, T = te[O.field],
|
|
5225
|
+
const Q = n(te), oe = L.key, D = (m == null ? void 0 : m.rowId) === Q && (m == null ? void 0 : m.colKey) === oe, me = (b == null ? void 0 : b.rowId) === Q && (b == null ? void 0 : b.colKey) === oe, X = w[`${Q}:${oe}`], B = (v == null ? void 0 : v.rowId) === Q && (v == null ? void 0 : v.colKey) === oe, T = te[O.field], H = String(T ?? ""), U = () => {
|
|
5226
5226
|
var de;
|
|
5227
|
-
M.current || (p({ rowId: Q, colKey: oe }), f({ rowId: Q, colKey: oe }), (de = Y.current) == null || de.focus({ preventScroll: !0 }), O.type === "select" && !
|
|
5227
|
+
M.current || (p({ rowId: Q, colKey: oe }), f({ rowId: Q, colKey: oe }), (de = Y.current) == null || de.focus({ preventScroll: !0 }), O.type === "select" && !_.current.has(oe) && W(oe, O));
|
|
5228
5228
|
};
|
|
5229
5229
|
if (D) {
|
|
5230
5230
|
const de = O.type === "select" ? /* @__PURE__ */ t(
|
|
5231
5231
|
Ks,
|
|
5232
5232
|
{
|
|
5233
|
-
initialValue:
|
|
5233
|
+
initialValue: H,
|
|
5234
5234
|
options: g[oe] ?? [],
|
|
5235
|
-
loading:
|
|
5236
|
-
onCommit: (ve) =>
|
|
5235
|
+
loading: $[oe] ?? !1,
|
|
5236
|
+
onCommit: (ve) => C(Q, oe, ve),
|
|
5237
5237
|
onCancel: V
|
|
5238
5238
|
}
|
|
5239
5239
|
) : /* @__PURE__ */ t(
|
|
5240
5240
|
Us,
|
|
5241
5241
|
{
|
|
5242
|
-
initialValue:
|
|
5242
|
+
initialValue: H,
|
|
5243
5243
|
type: O.type ?? "text",
|
|
5244
5244
|
mask: O.mask,
|
|
5245
|
-
onCommit: (ve) =>
|
|
5245
|
+
onCommit: (ve) => C(Q, oe, ve),
|
|
5246
5246
|
onCancel: V
|
|
5247
5247
|
}
|
|
5248
5248
|
);
|
|
@@ -5306,9 +5306,9 @@ function iu({
|
|
|
5306
5306
|
v,
|
|
5307
5307
|
w,
|
|
5308
5308
|
g,
|
|
5309
|
-
|
|
5309
|
+
$,
|
|
5310
5310
|
n,
|
|
5311
|
-
|
|
5311
|
+
C,
|
|
5312
5312
|
V,
|
|
5313
5313
|
W
|
|
5314
5314
|
]);
|
|
@@ -5626,44 +5626,44 @@ function su({
|
|
|
5626
5626
|
onOpenChange: c
|
|
5627
5627
|
}) {
|
|
5628
5628
|
const [u, m] = P(!1), [f, b] = P(!1), [p, A] = P({}), w = se(null), y = se(null), v = Ce(
|
|
5629
|
-
(
|
|
5630
|
-
m(
|
|
5629
|
+
($) => {
|
|
5630
|
+
m($), c == null || c($);
|
|
5631
5631
|
},
|
|
5632
5632
|
[c]
|
|
5633
5633
|
), N = Ce(() => {
|
|
5634
|
-
const
|
|
5635
|
-
if (
|
|
5636
|
-
const k =
|
|
5634
|
+
const $ = w.current;
|
|
5635
|
+
if (!$) return;
|
|
5636
|
+
const k = $.getBoundingClientRect(), _ = typeof a == "number" ? a : k.width, Y = typeof a == "number" ? a : Math.max(k.width, 180), E = n === "end" ? Math.max(8, k.right - Y) : Math.min(k.left, window.innerWidth - Y - 8), W = window.innerHeight - k.bottom, le = W < 240 && k.top > W ? void 0 : k.bottom + 6, S = le === void 0 ? window.innerHeight - k.top + 6 : void 0;
|
|
5637
5637
|
A({
|
|
5638
5638
|
position: "fixed",
|
|
5639
5639
|
zIndex: 9999,
|
|
5640
|
-
left:
|
|
5640
|
+
left: E,
|
|
5641
5641
|
top: le,
|
|
5642
5642
|
bottom: S,
|
|
5643
|
-
width: Zs(typeof a == "number" ?
|
|
5643
|
+
width: Zs(typeof a == "number" ? _ : a)
|
|
5644
5644
|
});
|
|
5645
5645
|
}, [n, a]);
|
|
5646
5646
|
ie(() => b(!0), []), ie(() => {
|
|
5647
5647
|
if (!u) return;
|
|
5648
5648
|
N();
|
|
5649
|
-
const
|
|
5650
|
-
var
|
|
5651
|
-
const Y =
|
|
5652
|
-
!((
|
|
5653
|
-
}, k = (
|
|
5654
|
-
|
|
5649
|
+
const $ = (_) => {
|
|
5650
|
+
var E, W;
|
|
5651
|
+
const Y = _.target;
|
|
5652
|
+
!((E = w.current) != null && E.contains(Y)) && !((W = y.current) != null && W.contains(Y)) && v(!1);
|
|
5653
|
+
}, k = (_) => {
|
|
5654
|
+
_.key === "Escape" && v(!1);
|
|
5655
5655
|
};
|
|
5656
|
-
return document.addEventListener("mousedown",
|
|
5657
|
-
document.removeEventListener("mousedown",
|
|
5656
|
+
return document.addEventListener("mousedown", $), window.addEventListener("keydown", k), window.addEventListener("resize", N), window.addEventListener("scroll", N, !0), () => {
|
|
5657
|
+
document.removeEventListener("mousedown", $), window.removeEventListener("keydown", k), window.removeEventListener("resize", N), window.removeEventListener("scroll", N, !0);
|
|
5658
5658
|
};
|
|
5659
5659
|
}, [u, v, N]);
|
|
5660
|
-
const M = (
|
|
5661
|
-
i || (
|
|
5660
|
+
const M = ($) => {
|
|
5661
|
+
i || ($.key === "Enter" || $.key === " ") && ($.preventDefault(), v(!u));
|
|
5662
5662
|
}, g = oa(e) ? Ji(e, {
|
|
5663
5663
|
onClick: () => {
|
|
5664
5664
|
i || (to(), v(!u));
|
|
5665
5665
|
}
|
|
5666
|
-
}) : e,
|
|
5666
|
+
}) : e, j = u ? /* @__PURE__ */ t(
|
|
5667
5667
|
"div",
|
|
5668
5668
|
{
|
|
5669
5669
|
ref: y,
|
|
@@ -5671,32 +5671,32 @@ function su({
|
|
|
5671
5671
|
"data-bonsaif-overlay": "true",
|
|
5672
5672
|
className: `overflow-hidden rounded-lg border border-[var(--border)] bg-[var(--bg-card)] p-1 shadow-xl ${s}`,
|
|
5673
5673
|
style: p,
|
|
5674
|
-
children: r.map((
|
|
5675
|
-
|
|
5674
|
+
children: r.map(($) => /* @__PURE__ */ o("div", { children: [
|
|
5675
|
+
$.separatorBefore && /* @__PURE__ */ t("div", { className: "my-1 border-t border-[var(--border)]" }),
|
|
5676
5676
|
/* @__PURE__ */ o(
|
|
5677
5677
|
"button",
|
|
5678
5678
|
{
|
|
5679
5679
|
type: "button",
|
|
5680
5680
|
role: "menuitem",
|
|
5681
|
-
disabled:
|
|
5681
|
+
disabled: $.disabled,
|
|
5682
5682
|
onClick: () => {
|
|
5683
5683
|
var k;
|
|
5684
|
-
|
|
5684
|
+
$.disabled || (to(), (k = $.onSelect) == null || k.call($), v(!1));
|
|
5685
5685
|
},
|
|
5686
5686
|
className: "flex w-full min-w-0 items-start gap-2 rounded-md px-2.5 py-1.5 text-left transition-colors hover:bg-[var(--bg-input)] disabled:cursor-not-allowed disabled:opacity-50",
|
|
5687
5687
|
style: {
|
|
5688
|
-
color:
|
|
5688
|
+
color: $.danger ? "var(--danger)" : "var(--text-main)"
|
|
5689
5689
|
},
|
|
5690
5690
|
children: [
|
|
5691
|
-
|
|
5691
|
+
$.icon && /* @__PURE__ */ t("span", { className: "mt-0.5 shrink-0", children: $.icon }),
|
|
5692
5692
|
/* @__PURE__ */ o("span", { className: "min-w-0 flex-1", children: [
|
|
5693
|
-
/* @__PURE__ */ t("span", { className: "block truncate text-sm font-medium", children:
|
|
5694
|
-
|
|
5693
|
+
/* @__PURE__ */ t("span", { className: "block truncate text-sm font-medium", children: $.label }),
|
|
5694
|
+
$.description && /* @__PURE__ */ t("span", { className: "block truncate text-xs text-[var(--text-muted)]", children: $.description })
|
|
5695
5695
|
] })
|
|
5696
5696
|
]
|
|
5697
5697
|
}
|
|
5698
5698
|
)
|
|
5699
|
-
] },
|
|
5699
|
+
] }, $.id))
|
|
5700
5700
|
}
|
|
5701
5701
|
) : null;
|
|
5702
5702
|
return /* @__PURE__ */ o(
|
|
@@ -5711,7 +5711,7 @@ function su({
|
|
|
5711
5711
|
className: `inline-flex ${i ? "pointer-events-none opacity-60" : ""} ${l}`,
|
|
5712
5712
|
children: [
|
|
5713
5713
|
g,
|
|
5714
|
-
f &&
|
|
5714
|
+
f && j ? it(j, document.body) : null
|
|
5715
5715
|
]
|
|
5716
5716
|
}
|
|
5717
5717
|
);
|
|
@@ -5739,13 +5739,13 @@ function cu({
|
|
|
5739
5739
|
disabled: M = !1,
|
|
5740
5740
|
children: g
|
|
5741
5741
|
}) {
|
|
5742
|
-
const [
|
|
5743
|
-
|
|
5744
|
-
requestAnimationFrame(() =>
|
|
5742
|
+
const [j, $] = P(!1), [k, _] = P(!1), [Y, E] = P(!1), W = Ce(() => {
|
|
5743
|
+
_(!0), requestAnimationFrame(() => {
|
|
5744
|
+
requestAnimationFrame(() => E(!0));
|
|
5745
5745
|
});
|
|
5746
5746
|
}, []), le = Ce(() => {
|
|
5747
|
-
|
|
5748
|
-
() =>
|
|
5747
|
+
E(!1), window.setTimeout(
|
|
5748
|
+
() => _(!1),
|
|
5749
5749
|
Js
|
|
5750
5750
|
);
|
|
5751
5751
|
}, []), S = Ce(() => {
|
|
@@ -5754,12 +5754,12 @@ function cu({
|
|
|
5754
5754
|
return;
|
|
5755
5755
|
}
|
|
5756
5756
|
r();
|
|
5757
|
-
}, [p, r, W]),
|
|
5758
|
-
|
|
5757
|
+
}, [p, r, W]), F = Ce(() => {
|
|
5758
|
+
E(!1), _(!1), N == null || N(), r();
|
|
5759
5759
|
}, [r, N]);
|
|
5760
5760
|
return ie(() => {
|
|
5761
|
-
|
|
5762
|
-
}, []), ie(() => (document.body.style.overflow = e ? "hidden" : "", e || (
|
|
5761
|
+
$(!0);
|
|
5762
|
+
}, []), ie(() => (document.body.style.overflow = e ? "hidden" : "", e || (E(!1), _(!1)), () => {
|
|
5763
5763
|
document.body.style.overflow = "";
|
|
5764
5764
|
}), [e]), ie(() => {
|
|
5765
5765
|
if (!e) return;
|
|
@@ -5773,7 +5773,7 @@ function cu({
|
|
|
5773
5773
|
}
|
|
5774
5774
|
};
|
|
5775
5775
|
return window.addEventListener("keydown", Z), () => window.removeEventListener("keydown", Z);
|
|
5776
|
-
}, [le, k, e, S]),
|
|
5776
|
+
}, [le, k, e, S]), j ? it(
|
|
5777
5777
|
/* @__PURE__ */ o(
|
|
5778
5778
|
"div",
|
|
5779
5779
|
{
|
|
@@ -5954,7 +5954,7 @@ function cu({
|
|
|
5954
5954
|
_e,
|
|
5955
5955
|
{
|
|
5956
5956
|
variant: "secondary",
|
|
5957
|
-
onClick:
|
|
5957
|
+
onClick: F,
|
|
5958
5958
|
className: "flex-1 border",
|
|
5959
5959
|
style: {
|
|
5960
5960
|
background: "var(--warning, #d97706)",
|
|
@@ -6185,7 +6185,7 @@ function ri({
|
|
|
6185
6185
|
required: b,
|
|
6186
6186
|
...p
|
|
6187
6187
|
}) {
|
|
6188
|
-
const [A, w] = P(() => !!p.autoFocus), [y, v] = P(!1), N = p.type === "password" && u, M = N && y ? "text" : p.type, g = !!a,
|
|
6188
|
+
const [A, w] = P(() => !!p.autoFocus), [y, v] = P(!1), N = p.type === "password" && u, M = N && y ? "text" : p.type, g = !!a, j = g && i !== "tooltip", $ = g && i !== "inline", k = m ? b : void 0, _ = g ? "border-[var(--danger)] focus:border-[var(--danger)]" : "", Y = $ ? N ? "pr-20" : "pr-10" : N ? "pr-10" : "", E = p.value !== void 0 ? String(p.value).length > 0 : p.defaultValue !== void 0 && String(p.defaultValue).length > 0, W = A || E, le = {
|
|
6189
6189
|
top: W ? 7 : 12,
|
|
6190
6190
|
color: A ? "var(--primary)" : "var(--text-muted)",
|
|
6191
6191
|
fontSize: W ? 10 : 13,
|
|
@@ -6194,7 +6194,7 @@ function ri({
|
|
|
6194
6194
|
}, S = (re) => {
|
|
6195
6195
|
var V;
|
|
6196
6196
|
w(!0), (V = p.onFocus) == null || V.call(p, re);
|
|
6197
|
-
},
|
|
6197
|
+
}, F = (re) => {
|
|
6198
6198
|
var V;
|
|
6199
6199
|
w(!1), (V = p.onBlur) == null || V.call(p, re);
|
|
6200
6200
|
}, Z = N ? /* @__PURE__ */ o(
|
|
@@ -6225,7 +6225,7 @@ function ri({
|
|
|
6225
6225
|
)
|
|
6226
6226
|
]
|
|
6227
6227
|
}
|
|
6228
|
-
) : null, q =
|
|
6228
|
+
) : null, q = $ ? /* @__PURE__ */ t(
|
|
6229
6229
|
br,
|
|
6230
6230
|
{
|
|
6231
6231
|
as: "span",
|
|
@@ -6253,10 +6253,10 @@ function ri({
|
|
|
6253
6253
|
required: k,
|
|
6254
6254
|
placeholder: " ",
|
|
6255
6255
|
"aria-invalid": g || p["aria-invalid"],
|
|
6256
|
-
"data-has-value":
|
|
6257
|
-
className: `h-11 w-full pt-5 ${Y} ${
|
|
6256
|
+
"data-has-value": E ? "true" : void 0,
|
|
6257
|
+
className: `h-11 w-full pt-5 ${Y} ${_} ${f}`,
|
|
6258
6258
|
onFocus: S,
|
|
6259
|
-
onBlur:
|
|
6259
|
+
onBlur: F
|
|
6260
6260
|
}
|
|
6261
6261
|
),
|
|
6262
6262
|
/* @__PURE__ */ o(
|
|
@@ -6281,7 +6281,7 @@ function ri({
|
|
|
6281
6281
|
q,
|
|
6282
6282
|
Z
|
|
6283
6283
|
] }),
|
|
6284
|
-
|
|
6284
|
+
j ? /* @__PURE__ */ t("span", { className: "text-xs font-medium normal-case text-[var(--danger)]", children: a }) : n ? /* @__PURE__ */ t("span", { className: "text-xs font-medium normal-case text-[var(--text-muted)]", children: n }) : null
|
|
6285
6285
|
] }) : /* @__PURE__ */ o("label", { className: `flex flex-col gap-2 ${r}`, children: [
|
|
6286
6286
|
/* @__PURE__ */ o("span", { className: "inline-flex items-center gap-1 text-xs font-semibold uppercase text-[var(--text-muted)]", children: [
|
|
6287
6287
|
/* @__PURE__ */ t("span", { children: e }),
|
|
@@ -6296,9 +6296,9 @@ function ri({
|
|
|
6296
6296
|
type: M,
|
|
6297
6297
|
required: k,
|
|
6298
6298
|
"aria-invalid": g || p["aria-invalid"],
|
|
6299
|
-
className: `w-full ${Y} ${
|
|
6299
|
+
className: `w-full ${Y} ${_} ${f}`,
|
|
6300
6300
|
onFocus: S,
|
|
6301
|
-
onBlur:
|
|
6301
|
+
onBlur: F
|
|
6302
6302
|
}
|
|
6303
6303
|
),
|
|
6304
6304
|
q,
|
|
@@ -6310,12 +6310,12 @@ function ri({
|
|
|
6310
6310
|
...p,
|
|
6311
6311
|
required: k,
|
|
6312
6312
|
"aria-invalid": g || p["aria-invalid"],
|
|
6313
|
-
className: `w-full ${Y} ${
|
|
6313
|
+
className: `w-full ${Y} ${_} ${f}`
|
|
6314
6314
|
}
|
|
6315
6315
|
),
|
|
6316
6316
|
q
|
|
6317
6317
|
] }),
|
|
6318
|
-
|
|
6318
|
+
j ? /* @__PURE__ */ t("span", { className: "text-xs font-medium normal-case text-[var(--danger)]", children: a }) : n ? /* @__PURE__ */ t("span", { className: "text-xs font-medium normal-case text-[var(--text-muted)]", children: n }) : null
|
|
6319
6319
|
] });
|
|
6320
6320
|
}
|
|
6321
6321
|
function oo(e) {
|
|
@@ -6428,17 +6428,17 @@ function wu({
|
|
|
6428
6428
|
selectedLabel: N = "Archivos seleccionados",
|
|
6429
6429
|
size: M = "md",
|
|
6430
6430
|
containerClassName: g = "",
|
|
6431
|
-
dropzoneClassName:
|
|
6432
|
-
fileListClassName:
|
|
6431
|
+
dropzoneClassName: j = "",
|
|
6432
|
+
fileListClassName: $ = "",
|
|
6433
6433
|
className: k = "",
|
|
6434
|
-
id:
|
|
6434
|
+
id: _,
|
|
6435
6435
|
accept: Y,
|
|
6436
|
-
disabled:
|
|
6436
|
+
disabled: E,
|
|
6437
6437
|
required: W,
|
|
6438
6438
|
...le
|
|
6439
6439
|
}) {
|
|
6440
|
-
const S = $o(),
|
|
6441
|
-
i === void 0 &&
|
|
6440
|
+
const S = $o(), F = _ ?? S, Z = se(null), [q, re] = P(!1), [V, C] = P(l), K = i ?? V, ae = !!n, L = p && K.length > 0 && !E, O = (U, ce) => {
|
|
6441
|
+
i === void 0 && C(U), s == null || s(U, ce);
|
|
6442
6442
|
}, te = (U, ce) => {
|
|
6443
6443
|
const de = U.filter(
|
|
6444
6444
|
(we) => io(we, Y)
|
|
@@ -6448,20 +6448,20 @@ function wu({
|
|
|
6448
6448
|
ve.length > 0 && (c == null || c(ve)), O(We, ce);
|
|
6449
6449
|
}, Q = () => {
|
|
6450
6450
|
var U;
|
|
6451
|
-
|
|
6451
|
+
E || (U = Z.current) == null || U.click();
|
|
6452
6452
|
}, oe = (U) => {
|
|
6453
6453
|
te(Array.from(U.target.files ?? []), U), U.target.value = "";
|
|
6454
6454
|
}, D = (U) => {
|
|
6455
|
-
U.preventDefault(),
|
|
6455
|
+
U.preventDefault(), E || re(!0);
|
|
6456
6456
|
}, me = (U) => {
|
|
6457
6457
|
U.currentTarget.contains(U.relatedTarget) || re(!1);
|
|
6458
6458
|
}, X = (U) => {
|
|
6459
|
-
U.preventDefault(), re(!1),
|
|
6459
|
+
U.preventDefault(), re(!1), !E && te(Array.from(U.dataTransfer.files), U);
|
|
6460
6460
|
}, B = (U) => {
|
|
6461
6461
|
U.key !== "Enter" && U.key !== " " || (U.preventDefault(), Q());
|
|
6462
6462
|
}, T = (U) => {
|
|
6463
6463
|
O(K.filter((ce, de) => de !== U));
|
|
6464
|
-
},
|
|
6464
|
+
}, H = () => {
|
|
6465
6465
|
O([]);
|
|
6466
6466
|
};
|
|
6467
6467
|
return /* @__PURE__ */ o("div", { className: `flex flex-col gap-2 ${g}`, children: [
|
|
@@ -6475,11 +6475,11 @@ function wu({
|
|
|
6475
6475
|
{
|
|
6476
6476
|
...le,
|
|
6477
6477
|
ref: Z,
|
|
6478
|
-
id:
|
|
6478
|
+
id: F,
|
|
6479
6479
|
type: "file",
|
|
6480
6480
|
accept: Y,
|
|
6481
6481
|
multiple: u,
|
|
6482
|
-
disabled:
|
|
6482
|
+
disabled: E,
|
|
6483
6483
|
required: W && K.length === 0,
|
|
6484
6484
|
"aria-invalid": ae || le["aria-invalid"],
|
|
6485
6485
|
className: "sr-only",
|
|
@@ -6490,11 +6490,11 @@ function wu({
|
|
|
6490
6490
|
"div",
|
|
6491
6491
|
{
|
|
6492
6492
|
role: "button",
|
|
6493
|
-
tabIndex:
|
|
6494
|
-
"aria-controls":
|
|
6495
|
-
"aria-disabled":
|
|
6493
|
+
tabIndex: E ? -1 : 0,
|
|
6494
|
+
"aria-controls": F,
|
|
6495
|
+
"aria-disabled": E || void 0,
|
|
6496
6496
|
"aria-invalid": ae || void 0,
|
|
6497
|
-
className: `flex cursor-pointer flex-col items-center justify-center gap-3 rounded-lg border border-dashed bg-[var(--bg-card)] text-center outline-none transition-colors focus:border-[var(--primary)] focus:bg-[var(--bg-input)] ${fc[M]} ${q ? "border-[var(--primary)] bg-[var(--bg-input)]" : ae ? "border-[var(--danger)]" : "border-[var(--border)]"} ${
|
|
6497
|
+
className: `flex cursor-pointer flex-col items-center justify-center gap-3 rounded-lg border border-dashed bg-[var(--bg-card)] text-center outline-none transition-colors focus:border-[var(--primary)] focus:bg-[var(--bg-input)] ${fc[M]} ${q ? "border-[var(--primary)] bg-[var(--bg-input)]" : ae ? "border-[var(--danger)]" : "border-[var(--border)]"} ${E ? "cursor-not-allowed opacity-60" : "hover:border-[var(--primary)] hover:bg-[var(--bg-input)]"} ${j} ${k}`,
|
|
6498
6498
|
onClick: Q,
|
|
6499
6499
|
onDragOver: D,
|
|
6500
6500
|
onDragLeave: me,
|
|
@@ -6513,7 +6513,7 @@ function wu({
|
|
|
6513
6513
|
b && K.length > 0 && /* @__PURE__ */ o(
|
|
6514
6514
|
"div",
|
|
6515
6515
|
{
|
|
6516
|
-
className: `rounded-lg border border-[var(--border)] bg-[var(--bg-card)] ${
|
|
6516
|
+
className: `rounded-lg border border-[var(--border)] bg-[var(--bg-card)] ${$}`,
|
|
6517
6517
|
children: [
|
|
6518
6518
|
/* @__PURE__ */ o("div", { className: "flex items-center justify-between gap-3 border-b border-[var(--border)] px-3 py-2", children: [
|
|
6519
6519
|
/* @__PURE__ */ t("span", { className: "text-xs font-semibold uppercase text-[var(--text-muted)]", children: N }),
|
|
@@ -6523,7 +6523,7 @@ function wu({
|
|
|
6523
6523
|
type: "button",
|
|
6524
6524
|
className: "inline-flex h-7 w-7 items-center justify-center rounded-md text-[var(--text-muted)] transition-colors hover:bg-[var(--bg-input)] hover:text-[var(--danger)] focus:outline-none",
|
|
6525
6525
|
"aria-label": "Quitar todos los archivos",
|
|
6526
|
-
onClick:
|
|
6526
|
+
onClick: H,
|
|
6527
6527
|
children: /* @__PURE__ */ t(Do, { className: "h-4 w-4" })
|
|
6528
6528
|
}
|
|
6529
6529
|
)
|
|
@@ -6538,7 +6538,7 @@ function wu({
|
|
|
6538
6538
|
/* @__PURE__ */ t("span", { className: "block truncate text-sm font-medium text-[var(--text-main)]", children: U.name }),
|
|
6539
6539
|
/* @__PURE__ */ t("span", { className: "block text-xs text-[var(--text-muted)]", children: bc(U.size) })
|
|
6540
6540
|
] }),
|
|
6541
|
-
|
|
6541
|
+
!E && /* @__PURE__ */ t(
|
|
6542
6542
|
"button",
|
|
6543
6543
|
{
|
|
6544
6544
|
type: "button",
|
|
@@ -6585,9 +6585,9 @@ function Nu({
|
|
|
6585
6585
|
const [f, b] = P(
|
|
6586
6586
|
() => e.map((g) => ({ key: !1, type: "", ...g }))
|
|
6587
6587
|
), [p, A] = P(""), [w, y] = P(""), v = Ce(
|
|
6588
|
-
(g,
|
|
6589
|
-
b((
|
|
6590
|
-
const k =
|
|
6588
|
+
(g, j) => {
|
|
6589
|
+
b(($) => {
|
|
6590
|
+
const k = $.map((_, Y) => Y === g ? { ..._, ...j } : _);
|
|
6591
6591
|
return m == null || m(k), k;
|
|
6592
6592
|
});
|
|
6593
6593
|
},
|
|
@@ -6602,18 +6602,18 @@ function Nu({
|
|
|
6602
6602
|
return;
|
|
6603
6603
|
}
|
|
6604
6604
|
if (f.some(
|
|
6605
|
-
(
|
|
6605
|
+
(_) => _.name.toLowerCase() === g.toLowerCase()
|
|
6606
6606
|
)) {
|
|
6607
6607
|
y("Ese campo ya existe en el arreglo.");
|
|
6608
6608
|
return;
|
|
6609
6609
|
}
|
|
6610
|
-
const
|
|
6610
|
+
const $ = {
|
|
6611
6611
|
name: g,
|
|
6612
6612
|
key: !1,
|
|
6613
6613
|
type: ((k = n[0]) == null ? void 0 : k.value) ?? ""
|
|
6614
6614
|
};
|
|
6615
|
-
b((
|
|
6616
|
-
const Y = [...
|
|
6615
|
+
b((_) => {
|
|
6616
|
+
const Y = [..._, $];
|
|
6617
6617
|
return m == null || m(Y), Y;
|
|
6618
6618
|
}), A(""), y("");
|
|
6619
6619
|
}, [n, f, p, m]);
|
|
@@ -6655,7 +6655,7 @@ function Nu({
|
|
|
6655
6655
|
}
|
|
6656
6656
|
),
|
|
6657
6657
|
/* @__PURE__ */ o("div", { className: "max-h-[420px] overflow-y-auto", children: [
|
|
6658
|
-
f.map((g,
|
|
6658
|
+
f.map((g, j) => /* @__PURE__ */ o(
|
|
6659
6659
|
"div",
|
|
6660
6660
|
{
|
|
6661
6661
|
className: "grid grid-cols-[1fr_80px_1fr] items-center gap-4 border-b px-6 py-3 last:border-0 hover:bg-[var(--bg-input)] transition-colors",
|
|
@@ -6674,7 +6674,7 @@ function Nu({
|
|
|
6674
6674
|
{
|
|
6675
6675
|
size: "sm",
|
|
6676
6676
|
checked: g.key ?? !1,
|
|
6677
|
-
onChange: (
|
|
6677
|
+
onChange: ($) => v(j, { key: $.target.checked }),
|
|
6678
6678
|
"aria-label": `${g.name} es clave`
|
|
6679
6679
|
}
|
|
6680
6680
|
) }),
|
|
@@ -6682,7 +6682,7 @@ function Nu({
|
|
|
6682
6682
|
Vt,
|
|
6683
6683
|
{
|
|
6684
6684
|
value: g.type ?? "",
|
|
6685
|
-
onChange: (
|
|
6685
|
+
onChange: ($) => v(j, { type: $ }),
|
|
6686
6686
|
options: n,
|
|
6687
6687
|
placeholder: "—",
|
|
6688
6688
|
emptyLabel: "—",
|
|
@@ -6807,21 +6807,21 @@ function ku({
|
|
|
6807
6807
|
emptyText: A = "Sin resultados",
|
|
6808
6808
|
clearLabel: w = "Limpiar seleccion"
|
|
6809
6809
|
}) {
|
|
6810
|
-
const [y, v] = P(!1), [N, M] = P(""), [g,
|
|
6810
|
+
const [y, v] = P(!1), [N, M] = P(""), [g, j] = P(0), [$, k] = P(!1), [_, Y] = P({}), E = se(null), W = se(null), le = se(null), S = se(null), F = m && n.length >= f, Z = Ze(() => new Set(e), [e]), q = Ze(
|
|
6811
6811
|
() => n.filter((D) => Z.has(D.value)),
|
|
6812
6812
|
[n, Z]
|
|
6813
|
-
), re = b === "all" ? q.length : b, V = q.slice(0, re),
|
|
6813
|
+
), re = b === "all" ? q.length : b, V = q.slice(0, re), C = Math.max(
|
|
6814
6814
|
0,
|
|
6815
6815
|
q.length - V.length
|
|
6816
|
-
), K =
|
|
6816
|
+
), K = F && N.trim() ? n.filter(
|
|
6817
6817
|
(D) => {
|
|
6818
6818
|
var me;
|
|
6819
6819
|
return D.label.toLowerCase().includes(N.toLowerCase()) || ((me = D.sublabel) == null ? void 0 : me.toLowerCase().includes(N.toLowerCase()));
|
|
6820
6820
|
}
|
|
6821
6821
|
) : n, ae = Ce(() => {
|
|
6822
|
-
const D =
|
|
6822
|
+
const D = E.current;
|
|
6823
6823
|
if (!D) return;
|
|
6824
|
-
const me = D.getBoundingClientRect(), X =
|
|
6824
|
+
const me = D.getBoundingClientRect(), X = F ? 304 : 244, B = window.innerHeight - me.bottom, T = B < X && me.top > B;
|
|
6825
6825
|
Y({
|
|
6826
6826
|
position: "fixed",
|
|
6827
6827
|
left: me.left,
|
|
@@ -6830,7 +6830,7 @@ function ku({
|
|
|
6830
6830
|
width: me.width,
|
|
6831
6831
|
zIndex: 9999
|
|
6832
6832
|
});
|
|
6833
|
-
}, [
|
|
6833
|
+
}, [F]), L = Ce(
|
|
6834
6834
|
(D) => {
|
|
6835
6835
|
gc(e, D) || r(D);
|
|
6836
6836
|
},
|
|
@@ -6849,15 +6849,15 @@ function ku({
|
|
|
6849
6849
|
function D(me) {
|
|
6850
6850
|
var B, T;
|
|
6851
6851
|
const X = me.target;
|
|
6852
|
-
!((B =
|
|
6852
|
+
!((B = E.current) != null && B.contains(X)) && !((T = W.current) != null && T.contains(X)) && (v(!1), M(""));
|
|
6853
6853
|
}
|
|
6854
6854
|
return document.addEventListener("mousedown", D), () => document.removeEventListener("mousedown", D);
|
|
6855
6855
|
}, [y]), ie(() => {
|
|
6856
|
-
y && (
|
|
6856
|
+
y && (j(0), ae(), F && setTimeout(() => {
|
|
6857
6857
|
var D;
|
|
6858
6858
|
return (D = le.current) == null ? void 0 : D.focus();
|
|
6859
6859
|
}, 0));
|
|
6860
|
-
}, [y,
|
|
6860
|
+
}, [y, F, ae]), ie(() => {
|
|
6861
6861
|
if (y)
|
|
6862
6862
|
return window.addEventListener("resize", ae), window.addEventListener("scroll", ae, !0), () => {
|
|
6863
6863
|
window.removeEventListener("resize", ae), window.removeEventListener("scroll", ae, !0);
|
|
@@ -6872,7 +6872,7 @@ function ku({
|
|
|
6872
6872
|
(D.key === "Enter" || D.key === " " || D.key === "ArrowDown") && (D.preventDefault(), v(!0));
|
|
6873
6873
|
return;
|
|
6874
6874
|
}
|
|
6875
|
-
D.key === "Escape" && (D.preventDefault(), v(!1), M("")), D.key === "ArrowDown" && (D.preventDefault(),
|
|
6875
|
+
D.key === "Escape" && (D.preventDefault(), v(!1), M("")), D.key === "ArrowDown" && (D.preventDefault(), j((me) => Math.min(me + 1, K.length - 1))), D.key === "ArrowUp" && (D.preventDefault(), j((me) => Math.max(me - 1, 0))), D.key === "Enter" && K[g] && (D.preventDefault(), O(K[g].value)), D.key === "Backspace" && !N && e.length && (D.preventDefault(), L(e.slice(0, -1)));
|
|
6876
6876
|
}
|
|
6877
6877
|
const oe = /* @__PURE__ */ o(
|
|
6878
6878
|
"div",
|
|
@@ -6880,12 +6880,12 @@ function ku({
|
|
|
6880
6880
|
ref: W,
|
|
6881
6881
|
className: "overflow-hidden rounded-xl shadow-xl",
|
|
6882
6882
|
style: {
|
|
6883
|
-
...
|
|
6883
|
+
..._,
|
|
6884
6884
|
background: "var(--bg-card)",
|
|
6885
6885
|
border: "1px solid var(--border)"
|
|
6886
6886
|
},
|
|
6887
6887
|
children: [
|
|
6888
|
-
|
|
6888
|
+
F && /* @__PURE__ */ o(
|
|
6889
6889
|
"div",
|
|
6890
6890
|
{
|
|
6891
6891
|
className: "flex items-center gap-2 px-3 py-2",
|
|
@@ -6904,7 +6904,7 @@ function ku({
|
|
|
6904
6904
|
ref: le,
|
|
6905
6905
|
value: N,
|
|
6906
6906
|
onChange: (D) => {
|
|
6907
|
-
M(D.target.value),
|
|
6907
|
+
M(D.target.value), j(0);
|
|
6908
6908
|
},
|
|
6909
6909
|
placeholder: "Buscar…",
|
|
6910
6910
|
className: "min-w-0 flex-1 bg-transparent text-sm outline-none",
|
|
@@ -6965,7 +6965,7 @@ function ku({
|
|
|
6965
6965
|
"aria-multiselectable": "true",
|
|
6966
6966
|
className: "overflow-y-auto",
|
|
6967
6967
|
style: {
|
|
6968
|
-
maxHeight:
|
|
6968
|
+
maxHeight: F ? 220 : 200,
|
|
6969
6969
|
scrollbarWidth: "thin",
|
|
6970
6970
|
scrollbarColor: "var(--border) transparent",
|
|
6971
6971
|
overscrollBehavior: "contain"
|
|
@@ -6981,7 +6981,7 @@ function ku({
|
|
|
6981
6981
|
onMouseDown: (T) => {
|
|
6982
6982
|
T.preventDefault(), O(D.value);
|
|
6983
6983
|
},
|
|
6984
|
-
onMouseEnter: () => !D.disabled &&
|
|
6984
|
+
onMouseEnter: () => !D.disabled && j(me),
|
|
6985
6985
|
className: "flex cursor-pointer items-center gap-2 px-3 py-2 text-sm transition-colors",
|
|
6986
6986
|
style: {
|
|
6987
6987
|
background: X ? "var(--bg-hover)" : B ? "color-mix(in srgb, var(--primary) 6%, transparent)" : "transparent",
|
|
@@ -7050,7 +7050,7 @@ function ku({
|
|
|
7050
7050
|
return /* @__PURE__ */ o(
|
|
7051
7051
|
"div",
|
|
7052
7052
|
{
|
|
7053
|
-
ref:
|
|
7053
|
+
ref: E,
|
|
7054
7054
|
className: `relative ${l || "w-full"}`,
|
|
7055
7055
|
style: s,
|
|
7056
7056
|
onKeyDown: Q,
|
|
@@ -7103,7 +7103,7 @@ function ku({
|
|
|
7103
7103
|
},
|
|
7104
7104
|
D.value
|
|
7105
7105
|
)),
|
|
7106
|
-
|
|
7106
|
+
C > 0 && /* @__PURE__ */ o(
|
|
7107
7107
|
"span",
|
|
7108
7108
|
{
|
|
7109
7109
|
className: "inline-flex items-center rounded-md px-1.5 py-0.5 text-xs font-semibold",
|
|
@@ -7113,7 +7113,7 @@ function ku({
|
|
|
7113
7113
|
},
|
|
7114
7114
|
children: [
|
|
7115
7115
|
"+",
|
|
7116
|
-
|
|
7116
|
+
C
|
|
7117
7117
|
]
|
|
7118
7118
|
}
|
|
7119
7119
|
)
|
|
@@ -7144,7 +7144,7 @@ function ku({
|
|
|
7144
7144
|
]
|
|
7145
7145
|
}
|
|
7146
7146
|
),
|
|
7147
|
-
y &&
|
|
7147
|
+
y && $ && it(oe, document.body)
|
|
7148
7148
|
]
|
|
7149
7149
|
}
|
|
7150
7150
|
);
|
|
@@ -7465,26 +7465,26 @@ function Eu({
|
|
|
7465
7465
|
onPhoneValueChange: N,
|
|
7466
7466
|
label: M,
|
|
7467
7467
|
containerClassName: g = "",
|
|
7468
|
-
helperText:
|
|
7469
|
-
labelAction:
|
|
7468
|
+
helperText: j,
|
|
7469
|
+
labelAction: $,
|
|
7470
7470
|
className: k = "",
|
|
7471
|
-
required:
|
|
7471
|
+
required: _,
|
|
7472
7472
|
disabled: Y,
|
|
7473
|
-
floatingLabel:
|
|
7473
|
+
floatingLabel: E,
|
|
7474
7474
|
showPasswordToggle: W,
|
|
7475
7475
|
nativeValidation: le,
|
|
7476
7476
|
errorTooltipLabel: S = "Error de validacion",
|
|
7477
|
-
...
|
|
7477
|
+
...F
|
|
7478
7478
|
}) {
|
|
7479
7479
|
var U;
|
|
7480
7480
|
const [Z, q] = P(
|
|
7481
7481
|
() => so(c)
|
|
7482
7482
|
), [re, V] = P(
|
|
7483
7483
|
() => Zr(f)
|
|
7484
|
-
),
|
|
7484
|
+
), C = Ze(() => {
|
|
7485
7485
|
const ce = A ?? yc, de = p == null ? void 0 : p.map(Zr);
|
|
7486
7486
|
return de != null && de.length ? ce.filter((ve) => de.includes(ve.value)) : ce;
|
|
7487
|
-
}, [p, A]), K = ((U =
|
|
7487
|
+
}, [p, A]), K = ((U = C[0]) == null ? void 0 : U.value) ?? "+1", ae = C.some(
|
|
7488
7488
|
(ce) => ce.value === Zr(m ?? re)
|
|
7489
7489
|
) ? Zr(m ?? re) : K, L = s !== void 0 ? so(s) : Z, O = `${ae} ${L}`.trim(), te = n && L.length > 0 && !Jo(O) ? a : void 0, Q = l ?? te, oe = !!Q, D = oe && i !== "tooltip", me = oe && i !== "inline", X = oe ? "border-[var(--danger)] focus-within:border-[var(--danger)]" : "border-[var(--border)] focus-within:border-[var(--primary)]", B = (ce) => {
|
|
7490
7490
|
const de = ce.currentTarget.value;
|
|
@@ -7499,7 +7499,7 @@ function Eu({
|
|
|
7499
7499
|
nationalNumber: L,
|
|
7500
7500
|
fullNumber: `${ce} ${L}`.trim()
|
|
7501
7501
|
});
|
|
7502
|
-
},
|
|
7502
|
+
}, H = me ? /* @__PURE__ */ t(
|
|
7503
7503
|
br,
|
|
7504
7504
|
{
|
|
7505
7505
|
as: "span",
|
|
@@ -7520,8 +7520,8 @@ function Eu({
|
|
|
7520
7520
|
return /* @__PURE__ */ o("div", { className: `flex flex-col gap-2 ${g}`, children: [
|
|
7521
7521
|
/* @__PURE__ */ o("span", { className: "inline-flex items-center gap-1 text-xs font-semibold uppercase text-[var(--text-muted)]", children: [
|
|
7522
7522
|
/* @__PURE__ */ t("span", { children: M }),
|
|
7523
|
-
|
|
7524
|
-
|
|
7523
|
+
_ && /* @__PURE__ */ t("span", { className: "text-[var(--danger)]", children: "*" }),
|
|
7524
|
+
$ && /* @__PURE__ */ t("span", { className: "ml-auto normal-case", children: $ })
|
|
7525
7525
|
] }),
|
|
7526
7526
|
/* @__PURE__ */ o(
|
|
7527
7527
|
"span",
|
|
@@ -7533,7 +7533,7 @@ function Eu({
|
|
|
7533
7533
|
{
|
|
7534
7534
|
value: ae,
|
|
7535
7535
|
onChange: T,
|
|
7536
|
-
options:
|
|
7536
|
+
options: C,
|
|
7537
7537
|
placeholder: w,
|
|
7538
7538
|
disabled: Y,
|
|
7539
7539
|
ariaLabel: "Codigo telefonico",
|
|
@@ -7553,7 +7553,7 @@ function Eu({
|
|
|
7553
7553
|
/* @__PURE__ */ t(
|
|
7554
7554
|
"input",
|
|
7555
7555
|
{
|
|
7556
|
-
...
|
|
7556
|
+
...F,
|
|
7557
7557
|
value: s,
|
|
7558
7558
|
defaultValue: c,
|
|
7559
7559
|
type: "tel",
|
|
@@ -7561,18 +7561,18 @@ function Eu({
|
|
|
7561
7561
|
autoComplete: e,
|
|
7562
7562
|
disabled: Y,
|
|
7563
7563
|
required: void 0,
|
|
7564
|
-
"aria-label":
|
|
7565
|
-
"aria-invalid": oe ||
|
|
7564
|
+
"aria-label": F["aria-label"] ?? (typeof M == "string" ? M : void 0),
|
|
7565
|
+
"aria-invalid": oe || F["aria-invalid"],
|
|
7566
7566
|
className: `h-full w-full min-w-0 bg-transparent px-2 py-1.5 text-sm text-[var(--text-main)] outline-none placeholder:text-[var(--text-muted)] disabled:cursor-not-allowed disabled:opacity-60 ${me ? "pr-10" : ""} ${k}`,
|
|
7567
7567
|
onChange: B
|
|
7568
7568
|
}
|
|
7569
7569
|
),
|
|
7570
|
-
|
|
7570
|
+
H
|
|
7571
7571
|
] })
|
|
7572
7572
|
]
|
|
7573
7573
|
}
|
|
7574
7574
|
),
|
|
7575
|
-
D ? /* @__PURE__ */ t("span", { className: "text-xs font-medium normal-case text-[var(--danger)]", children: Q }) :
|
|
7575
|
+
D ? /* @__PURE__ */ t("span", { className: "text-xs font-medium normal-case text-[var(--danger)]", children: Q }) : j ? /* @__PURE__ */ t("span", { className: "text-xs font-medium normal-case text-[var(--text-muted)]", children: j }) : null
|
|
7576
7576
|
] });
|
|
7577
7577
|
}
|
|
7578
7578
|
function $u({
|
|
@@ -7865,7 +7865,7 @@ function Lu({
|
|
|
7865
7865
|
const i = Ce(
|
|
7866
7866
|
() => document,
|
|
7867
7867
|
[]
|
|
7868
|
-
), l = se(null), s = se(null), c = se(/* @__PURE__ */ new Map()), u = se(null), m = se(!1), f = se(e ?? ""), b = se(r), p = se(!1), [A, w] = P(() => !e || e.trim() === ""), [y, v] = P(/* @__PURE__ */ new Set()), [N, M] = P(null), [g,
|
|
7868
|
+
), l = se(null), s = se(null), c = se(/* @__PURE__ */ new Map()), u = se(null), m = se(!1), f = se(e ?? ""), b = se(r), p = se(!1), [A, w] = P(() => !e || e.trim() === ""), [y, v] = P(/* @__PURE__ */ new Set()), [N, M] = P(null), [g, j] = P(""), [$, k] = P(""), [_, Y] = P(""), [E, W] = P(""), [le, S] = P(!1), F = Ce(
|
|
7869
7869
|
() => m.current ? s.current : l.current,
|
|
7870
7870
|
[]
|
|
7871
7871
|
);
|
|
@@ -7873,12 +7873,12 @@ function Lu({
|
|
|
7873
7873
|
b.current = r;
|
|
7874
7874
|
}, [r]);
|
|
7875
7875
|
const Z = Ce(() => {
|
|
7876
|
-
const R = window.getSelection(), z =
|
|
7876
|
+
const R = window.getSelection(), z = F();
|
|
7877
7877
|
if (!R || !z || R.rangeCount === 0 || R.isCollapsed)
|
|
7878
7878
|
return "";
|
|
7879
7879
|
const fe = R.getRangeAt(0);
|
|
7880
7880
|
return !z.contains(fe.startContainer) || !z.contains(fe.endContainer) ? "" : R.toString();
|
|
7881
|
-
}, [
|
|
7881
|
+
}, [F]);
|
|
7882
7882
|
ie(() => {
|
|
7883
7883
|
const R = e ?? "";
|
|
7884
7884
|
if (p.current && R === f.current) {
|
|
@@ -7950,7 +7950,7 @@ function Lu({
|
|
|
7950
7950
|
qn(fe, "uppercase") && z.add("__upper"), qn(fe, "lowercase") && z.add("__lower"), qn(fe, "capitalize") && z.add("__cap"), v(z);
|
|
7951
7951
|
}, [Z, i]), re = () => {
|
|
7952
7952
|
var z;
|
|
7953
|
-
const R =
|
|
7953
|
+
const R = F();
|
|
7954
7954
|
R && (f.current = R.innerHTML, p.current = !0, b.current(f.current), w(((z = R.textContent) == null ? void 0 : z.trim()) === ""));
|
|
7955
7955
|
}, V = (R) => {
|
|
7956
7956
|
if (!R) {
|
|
@@ -7958,14 +7958,14 @@ function Lu({
|
|
|
7958
7958
|
z && (f.current = z.innerHTML);
|
|
7959
7959
|
}
|
|
7960
7960
|
S(!R);
|
|
7961
|
-
},
|
|
7961
|
+
}, C = (R, z) => {
|
|
7962
7962
|
var fe;
|
|
7963
|
-
(fe =
|
|
7963
|
+
(fe = F()) == null || fe.focus(), i().execCommand(R, !1, z), re(), q();
|
|
7964
7964
|
}, K = (R) => {
|
|
7965
|
-
|
|
7965
|
+
C("formatBlock", R);
|
|
7966
7966
|
}, ae = () => {
|
|
7967
7967
|
var R;
|
|
7968
|
-
(R =
|
|
7968
|
+
(R = F()) == null || R.focus(), i().execCommand("insertHTML", !1, "<hr><p><br></p>"), re(), q();
|
|
7969
7969
|
}, L = () => {
|
|
7970
7970
|
const R = window.getSelection();
|
|
7971
7971
|
R && R.rangeCount > 0 && (u.current = R.getRangeAt(0).cloneRange());
|
|
@@ -7977,14 +7977,14 @@ function Lu({
|
|
|
7977
7977
|
const z = window.getSelection();
|
|
7978
7978
|
k(
|
|
7979
7979
|
z && !z.isCollapsed ? z.toString() : ""
|
|
7980
|
-
),
|
|
7980
|
+
), j("");
|
|
7981
7981
|
}
|
|
7982
7982
|
R === "image" && (Y(""), W("")), M(R);
|
|
7983
7983
|
}, Q = () => {
|
|
7984
7984
|
var G;
|
|
7985
7985
|
if (!g.trim()) return;
|
|
7986
|
-
O(), (G =
|
|
7987
|
-
const R = window.getSelection(), fe = (R && !R.isCollapsed ? R.toString() : "") ||
|
|
7986
|
+
O(), (G = F()) == null || G.focus();
|
|
7987
|
+
const R = window.getSelection(), fe = (R && !R.isCollapsed ? R.toString() : "") || $.trim() || g.trim();
|
|
7988
7988
|
i().execCommand(
|
|
7989
7989
|
"insertHTML",
|
|
7990
7990
|
!1,
|
|
@@ -7992,10 +7992,10 @@ function Lu({
|
|
|
7992
7992
|
), re(), M(null);
|
|
7993
7993
|
}, oe = (R, z = "") => `<span class="rich-img-wrap" contenteditable="false"><img src="${cr(R)}" alt="${cr(z)}" class="rich-img" />${ni()}</span>`, D = () => {
|
|
7994
7994
|
var R;
|
|
7995
|
-
|
|
7995
|
+
_.trim() && (O(), (R = F()) == null || R.focus(), i().execCommand(
|
|
7996
7996
|
"insertHTML",
|
|
7997
7997
|
!1,
|
|
7998
|
-
oe(
|
|
7998
|
+
oe(_.trim(), E.trim())
|
|
7999
7999
|
), re(), M(null));
|
|
8000
8000
|
}, me = (R, z = 1200, fe = 1200, G = 0.72) => new Promise((Se, he) => {
|
|
8001
8001
|
const Le = new FileReader();
|
|
@@ -8028,15 +8028,15 @@ function Lu({
|
|
|
8028
8028
|
}, B = se(() => {
|
|
8029
8029
|
});
|
|
8030
8030
|
B.current = (R) => {
|
|
8031
|
-
const z =
|
|
8031
|
+
const z = F();
|
|
8032
8032
|
z && (X(z), i().execCommand("insertHTML", !1, R), z.querySelectorAll("p").forEach((fe) => {
|
|
8033
8033
|
!(fe.textContent ?? "").replace(/[\u00a0\s]+/g, "") && !fe.querySelector("img, hr") && fe.remove();
|
|
8034
8034
|
}), re(), q());
|
|
8035
8035
|
};
|
|
8036
8036
|
const T = se(me);
|
|
8037
8037
|
T.current = me;
|
|
8038
|
-
const
|
|
8039
|
-
|
|
8038
|
+
const H = se(oe);
|
|
8039
|
+
H.current = oe;
|
|
8040
8040
|
const U = Ce((R) => {
|
|
8041
8041
|
if (!R || c.current.has(R)) return;
|
|
8042
8042
|
const z = (fe) => {
|
|
@@ -8062,7 +8062,7 @@ function Lu({
|
|
|
8062
8062
|
fe.preventDefault(), fe.stopPropagation();
|
|
8063
8063
|
const Oe = xe.getAsFile();
|
|
8064
8064
|
Oe && T.current(Oe).then((Ae) => {
|
|
8065
|
-
B.current(
|
|
8065
|
+
B.current(H.current(Ae, "imagen"));
|
|
8066
8066
|
});
|
|
8067
8067
|
};
|
|
8068
8068
|
R.addEventListener("paste", z, !0), c.current.set(R, () => {
|
|
@@ -8090,7 +8090,7 @@ function Lu({
|
|
|
8090
8090
|
};
|
|
8091
8091
|
}, []);
|
|
8092
8092
|
const ve = (R) => {
|
|
8093
|
-
const z = window.getSelection(), fe =
|
|
8093
|
+
const z = window.getSelection(), fe = F();
|
|
8094
8094
|
if (!z || !fe || z.rangeCount === 0 || z.isCollapsed)
|
|
8095
8095
|
return;
|
|
8096
8096
|
const G = z.getRangeAt(0);
|
|
@@ -8111,7 +8111,7 @@ function Lu({
|
|
|
8111
8111
|
}, we = (R) => {
|
|
8112
8112
|
var z;
|
|
8113
8113
|
if (R.key === "Tab") {
|
|
8114
|
-
R.preventDefault(), (z =
|
|
8114
|
+
R.preventDefault(), (z = F()) == null || z.focus(), i().execCommand("insertText", !1, " "), re(), q();
|
|
8115
8115
|
return;
|
|
8116
8116
|
}
|
|
8117
8117
|
if (R.key === "Escape") {
|
|
@@ -8124,7 +8124,7 @@ function Lu({
|
|
|
8124
8124
|
return;
|
|
8125
8125
|
}
|
|
8126
8126
|
}
|
|
8127
|
-
N || (R.ctrlKey || R.metaKey) && (R.key === "b" && (R.preventDefault(),
|
|
8127
|
+
N || (R.ctrlKey || R.metaKey) && (R.key === "b" && (R.preventDefault(), C("bold")), R.key === "i" && (R.preventDefault(), C("italic")), R.key === "u" && (R.preventDefault(), C("underline")), R.key === "k" && (R.preventDefault(), te("link")));
|
|
8128
8128
|
}, Ee = () => /* @__PURE__ */ t(
|
|
8129
8129
|
"div",
|
|
8130
8130
|
{
|
|
@@ -8140,7 +8140,7 @@ function Lu({
|
|
|
8140
8140
|
title: z,
|
|
8141
8141
|
tabIndex: -1,
|
|
8142
8142
|
onMouseDown: (Le) => {
|
|
8143
|
-
Le.preventDefault(), G ? G() :
|
|
8143
|
+
Le.preventDefault(), G ? G() : C(fe);
|
|
8144
8144
|
},
|
|
8145
8145
|
className: "flex h-7 w-7 items-center justify-center rounded text-xs font-bold transition-colors",
|
|
8146
8146
|
style: {
|
|
@@ -8171,7 +8171,7 @@ function Lu({
|
|
|
8171
8171
|
autoFocus: !0,
|
|
8172
8172
|
type: "url",
|
|
8173
8173
|
value: g,
|
|
8174
|
-
onChange: (z) =>
|
|
8174
|
+
onChange: (z) => j(z.target.value),
|
|
8175
8175
|
onKeyDown: (z) => {
|
|
8176
8176
|
z.key === "Enter" && (z.preventDefault(), Q()), z.key === "Escape" && M(null);
|
|
8177
8177
|
},
|
|
@@ -8188,7 +8188,7 @@ function Lu({
|
|
|
8188
8188
|
"input",
|
|
8189
8189
|
{
|
|
8190
8190
|
type: "text",
|
|
8191
|
-
value:
|
|
8191
|
+
value: $,
|
|
8192
8192
|
onChange: (z) => k(z.target.value),
|
|
8193
8193
|
onKeyDown: (z) => {
|
|
8194
8194
|
z.key === "Enter" && (z.preventDefault(), Q()), z.key === "Escape" && M(null);
|
|
@@ -8236,7 +8236,7 @@ function Lu({
|
|
|
8236
8236
|
{
|
|
8237
8237
|
autoFocus: !0,
|
|
8238
8238
|
type: "url",
|
|
8239
|
-
value:
|
|
8239
|
+
value: _,
|
|
8240
8240
|
onChange: (z) => Y(z.target.value),
|
|
8241
8241
|
onKeyDown: (z) => {
|
|
8242
8242
|
z.key === "Enter" && (z.preventDefault(), D()), z.key === "Escape" && M(null);
|
|
@@ -8254,7 +8254,7 @@ function Lu({
|
|
|
8254
8254
|
"input",
|
|
8255
8255
|
{
|
|
8256
8256
|
type: "text",
|
|
8257
|
-
value:
|
|
8257
|
+
value: E,
|
|
8258
8258
|
onChange: (z) => W(z.target.value),
|
|
8259
8259
|
onKeyDown: (z) => {
|
|
8260
8260
|
z.key === "Enter" && (z.preventDefault(), D()), z.key === "Escape" && M(null);
|
|
@@ -8691,21 +8691,21 @@ function Mu({
|
|
|
8691
8691
|
optionClassName: p,
|
|
8692
8692
|
spinnerClassName: A
|
|
8693
8693
|
}) {
|
|
8694
|
-
const [w, y] = P(!1), [v, N] = P(!1), [M, g] = P(-1), [
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
}, le = i || l || r.length === 0, S = (
|
|
8698
|
-
s &&
|
|
8699
|
-
},
|
|
8694
|
+
const [w, y] = P(!1), [v, N] = P(!1), [M, g] = P(-1), [j, $] = P({}), k = se(null), _ = se(null), Y = se(null), E = r.find((C) => C.value === e) ?? r[0], W = {
|
|
8695
|
+
...E != null && E.tone ? mo[E.tone] : void 0,
|
|
8696
|
+
...E == null ? void 0 : E.style
|
|
8697
|
+
}, le = i || l || r.length === 0, S = (C) => {
|
|
8698
|
+
s && C.stopPropagation();
|
|
8699
|
+
}, F = Ce(() => {
|
|
8700
8700
|
y(!1), g(-1);
|
|
8701
8701
|
}, []), Z = Ce(() => {
|
|
8702
|
-
const
|
|
8703
|
-
if (!
|
|
8704
|
-
const K =
|
|
8702
|
+
const C = k.current;
|
|
8703
|
+
if (!C) return;
|
|
8704
|
+
const K = C.getBoundingClientRect(), ae = Math.max(K.width, Hc[a]), L = Math.min(Math.max(r.length, 1) * 38 + 12, 260), O = window.innerHeight - K.bottom, te = O < L && K.top > O, Q = Math.min(
|
|
8705
8705
|
Math.max(8, K.left + K.width / 2 - ae / 2),
|
|
8706
8706
|
window.innerWidth - ae - 8
|
|
8707
8707
|
);
|
|
8708
|
-
|
|
8708
|
+
$({
|
|
8709
8709
|
position: "fixed",
|
|
8710
8710
|
left: Q,
|
|
8711
8711
|
top: te ? void 0 : K.bottom + 6,
|
|
@@ -8714,54 +8714,54 @@ function Mu({
|
|
|
8714
8714
|
zIndex: 9999
|
|
8715
8715
|
});
|
|
8716
8716
|
}, [r.length, a]), q = Ce(
|
|
8717
|
-
(
|
|
8718
|
-
|
|
8717
|
+
(C) => {
|
|
8718
|
+
C.disabled || (n(C.value), F());
|
|
8719
8719
|
},
|
|
8720
|
-
[
|
|
8720
|
+
[F, n]
|
|
8721
8721
|
);
|
|
8722
8722
|
ie(() => N(!0), []), ie(() => {
|
|
8723
8723
|
if (!w) return;
|
|
8724
8724
|
Z();
|
|
8725
|
-
const
|
|
8726
|
-
g(
|
|
8725
|
+
const C = r.findIndex((K) => K.value === e);
|
|
8726
|
+
g(C >= 0 ? C : 0);
|
|
8727
8727
|
}, [w, r, Z, e]), ie(() => {
|
|
8728
8728
|
if (!w) return;
|
|
8729
|
-
function
|
|
8729
|
+
function C(K) {
|
|
8730
8730
|
var L, O;
|
|
8731
8731
|
const ae = K.target;
|
|
8732
|
-
!((L = k.current) != null && L.contains(ae)) && !((O =
|
|
8732
|
+
!((L = k.current) != null && L.contains(ae)) && !((O = _.current) != null && O.contains(ae)) && F();
|
|
8733
8733
|
}
|
|
8734
|
-
return document.addEventListener("mousedown",
|
|
8735
|
-
}, [
|
|
8734
|
+
return document.addEventListener("mousedown", C), () => document.removeEventListener("mousedown", C);
|
|
8735
|
+
}, [F, w]), ie(() => {
|
|
8736
8736
|
if (w)
|
|
8737
8737
|
return window.addEventListener("resize", Z), window.addEventListener("scroll", Z, !0), () => {
|
|
8738
8738
|
window.removeEventListener("resize", Z), window.removeEventListener("scroll", Z, !0);
|
|
8739
8739
|
};
|
|
8740
8740
|
}, [w, Z]), ie(() => {
|
|
8741
8741
|
if (M < 0 || !Y.current) return;
|
|
8742
|
-
const
|
|
8743
|
-
|
|
8742
|
+
const C = Y.current.children[M];
|
|
8743
|
+
C == null || C.scrollIntoView({ block: "nearest" });
|
|
8744
8744
|
}, [M]);
|
|
8745
|
-
function re(
|
|
8745
|
+
function re(C) {
|
|
8746
8746
|
if (!le) {
|
|
8747
8747
|
if (!w) {
|
|
8748
|
-
["Enter", " ", "ArrowDown", "ArrowUp"].includes(
|
|
8748
|
+
["Enter", " ", "ArrowDown", "ArrowUp"].includes(C.key) && (C.preventDefault(), y(!0));
|
|
8749
8749
|
return;
|
|
8750
8750
|
}
|
|
8751
|
-
if (
|
|
8752
|
-
|
|
8751
|
+
if (C.key === "Escape") {
|
|
8752
|
+
C.preventDefault(), F();
|
|
8753
8753
|
return;
|
|
8754
8754
|
}
|
|
8755
|
-
if (
|
|
8756
|
-
|
|
8755
|
+
if (C.key === "ArrowDown") {
|
|
8756
|
+
C.preventDefault(), g((K) => Math.min(K + 1, r.length - 1));
|
|
8757
8757
|
return;
|
|
8758
8758
|
}
|
|
8759
|
-
if (
|
|
8760
|
-
|
|
8759
|
+
if (C.key === "ArrowUp") {
|
|
8760
|
+
C.preventDefault(), g((K) => Math.max(K - 1, 0));
|
|
8761
8761
|
return;
|
|
8762
8762
|
}
|
|
8763
|
-
if (
|
|
8764
|
-
|
|
8763
|
+
if (C.key === "Enter" || C.key === " ") {
|
|
8764
|
+
C.preventDefault();
|
|
8765
8765
|
const K = r[M];
|
|
8766
8766
|
K && q(K);
|
|
8767
8767
|
}
|
|
@@ -8770,7 +8770,7 @@ function Mu({
|
|
|
8770
8770
|
const V = /* @__PURE__ */ t(
|
|
8771
8771
|
"div",
|
|
8772
8772
|
{
|
|
8773
|
-
ref:
|
|
8773
|
+
ref: _,
|
|
8774
8774
|
role: "listbox",
|
|
8775
8775
|
"aria-label": c,
|
|
8776
8776
|
className: St(
|
|
@@ -8778,7 +8778,7 @@ function Mu({
|
|
|
8778
8778
|
b
|
|
8779
8779
|
),
|
|
8780
8780
|
style: {
|
|
8781
|
-
...
|
|
8781
|
+
...j,
|
|
8782
8782
|
background: "color-mix(in srgb, var(--bg-card) 92%, transparent)",
|
|
8783
8783
|
borderColor: "var(--border)",
|
|
8784
8784
|
color: "var(--text-main)"
|
|
@@ -8796,10 +8796,10 @@ function Mu({
|
|
|
8796
8796
|
scrollbarColor: "var(--border) transparent",
|
|
8797
8797
|
overscrollBehavior: "contain"
|
|
8798
8798
|
},
|
|
8799
|
-
children: r.map((
|
|
8800
|
-
const ae =
|
|
8801
|
-
...
|
|
8802
|
-
...
|
|
8799
|
+
children: r.map((C, K) => {
|
|
8800
|
+
const ae = C.value === e, L = K === M, O = {
|
|
8801
|
+
...C.tone ? mo[C.tone] : void 0,
|
|
8802
|
+
...C.style
|
|
8803
8803
|
};
|
|
8804
8804
|
return /* @__PURE__ */ o(
|
|
8805
8805
|
"button",
|
|
@@ -8807,15 +8807,15 @@ function Mu({
|
|
|
8807
8807
|
type: "button",
|
|
8808
8808
|
role: "option",
|
|
8809
8809
|
"aria-selected": ae,
|
|
8810
|
-
disabled:
|
|
8811
|
-
onMouseEnter: () => !
|
|
8810
|
+
disabled: C.disabled,
|
|
8811
|
+
onMouseEnter: () => !C.disabled && g(K),
|
|
8812
8812
|
onMouseDown: (te) => {
|
|
8813
|
-
te.preventDefault(), q(
|
|
8813
|
+
te.preventDefault(), q(C);
|
|
8814
8814
|
},
|
|
8815
8815
|
className: St(
|
|
8816
8816
|
"flex w-full items-center gap-2 rounded-lg font-medium text-left transition-colors disabled:cursor-not-allowed disabled:opacity-45",
|
|
8817
8817
|
jc[a],
|
|
8818
|
-
ae ?
|
|
8818
|
+
ae ? C.className : void 0,
|
|
8819
8819
|
p
|
|
8820
8820
|
),
|
|
8821
8821
|
style: {
|
|
@@ -8825,10 +8825,10 @@ function Mu({
|
|
|
8825
8825
|
},
|
|
8826
8826
|
children: [
|
|
8827
8827
|
/* @__PURE__ */ t("span", { className: "flex h-4 w-4 shrink-0 items-center justify-center", children: ae ? /* @__PURE__ */ t(Ye, { className: "h-4 w-4" }) : null }),
|
|
8828
|
-
/* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate", children:
|
|
8828
|
+
/* @__PURE__ */ t("span", { className: "min-w-0 flex-1 truncate", children: C.label })
|
|
8829
8829
|
]
|
|
8830
8830
|
},
|
|
8831
|
-
|
|
8831
|
+
C.value
|
|
8832
8832
|
);
|
|
8833
8833
|
})
|
|
8834
8834
|
}
|
|
@@ -8853,15 +8853,15 @@ function Mu({
|
|
|
8853
8853
|
"aria-haspopup": "listbox",
|
|
8854
8854
|
"aria-expanded": w,
|
|
8855
8855
|
title: u,
|
|
8856
|
-
onClick: () => !le && y((
|
|
8856
|
+
onClick: () => !le && y((C) => !C),
|
|
8857
8857
|
className: St(
|
|
8858
8858
|
"inline-flex items-center rounded-full border border-transparent font-medium leading-none outline-none transition-colors hover:border-current focus:border-current disabled:cursor-wait disabled:opacity-70",
|
|
8859
8859
|
zc[a],
|
|
8860
|
-
|
|
8860
|
+
E == null ? void 0 : E.className,
|
|
8861
8861
|
f
|
|
8862
8862
|
),
|
|
8863
8863
|
style: W,
|
|
8864
|
-
children: /* @__PURE__ */ t("span", { className: "min-w-0 truncate", children: (
|
|
8864
|
+
children: /* @__PURE__ */ t("span", { className: "min-w-0 truncate", children: (E == null ? void 0 : E.label) ?? e })
|
|
8865
8865
|
}
|
|
8866
8866
|
),
|
|
8867
8867
|
/* @__PURE__ */ t(
|
|
@@ -8988,59 +8988,59 @@ function Bu({
|
|
|
8988
8988
|
var X;
|
|
8989
8989
|
const N = ((X = e[0]) == null ? void 0 : X.id) ?? "", [M, g] = P(
|
|
8990
8990
|
n ?? N
|
|
8991
|
-
), [
|
|
8991
|
+
), [j, $] = P(
|
|
8992
8992
|
i
|
|
8993
|
-
), k = r ?? M,
|
|
8994
|
-
() => new Set(
|
|
8995
|
-
[
|
|
8996
|
-
),
|
|
8993
|
+
), k = r ?? M, _ = a ?? j, Y = Ze(
|
|
8994
|
+
() => new Set(_),
|
|
8995
|
+
[_]
|
|
8996
|
+
), E = Math.max(
|
|
8997
8997
|
0,
|
|
8998
8998
|
e.findIndex((B) => B.id === k)
|
|
8999
|
-
), W = e[
|
|
9000
|
-
a ||
|
|
9001
|
-
},
|
|
9002
|
-
const T = e.find((
|
|
8999
|
+
), W = e[E] ?? e[0], le = e.length <= 1 ? 100 : E / (e.length - 1) * 100, S = (B) => {
|
|
9000
|
+
a || $(B), s == null || s(B);
|
|
9001
|
+
}, F = (B) => {
|
|
9002
|
+
const T = e.find((H) => H.id === B);
|
|
9003
9003
|
T && (r || g(B), l == null || l(B, T));
|
|
9004
9004
|
}, Z = (B) => Y.has(B), q = (B) => e.slice(0, B).find((T) => !T.optional && !Y.has(T.id)), re = (B) => {
|
|
9005
9005
|
const T = e[B];
|
|
9006
|
-
return !T || T.disabled ? !1 : B ===
|
|
9006
|
+
return !T || T.disabled ? !1 : B === E || u && B < E ? !0 : !q(B);
|
|
9007
9007
|
}, V = (B) => {
|
|
9008
|
-
const T = e.findIndex((
|
|
9008
|
+
const T = e.findIndex((H) => H.id === B);
|
|
9009
9009
|
return T >= 0 && re(T);
|
|
9010
|
-
},
|
|
9011
|
-
const T = e.findIndex((
|
|
9010
|
+
}, C = (B) => {
|
|
9011
|
+
const T = e.findIndex((H) => H.id === B);
|
|
9012
9012
|
if (T < 0) return !1;
|
|
9013
9013
|
if (!re(T)) {
|
|
9014
|
-
const
|
|
9015
|
-
return
|
|
9014
|
+
const H = q(T);
|
|
9015
|
+
return H && (c == null || c(e[T], H)), !1;
|
|
9016
9016
|
}
|
|
9017
|
-
return
|
|
9017
|
+
return F(B), !0;
|
|
9018
9018
|
}, K = (B = W == null ? void 0 : W.id) => {
|
|
9019
|
-
!B || Y.has(B) || S([...
|
|
9019
|
+
!B || Y.has(B) || S([..._, B]);
|
|
9020
9020
|
}, ae = (B = W == null ? void 0 : W.id) => {
|
|
9021
9021
|
if (!B) return;
|
|
9022
|
-
const T = e.findIndex((U) => U.id === B),
|
|
9022
|
+
const T = e.findIndex((U) => U.id === B), H = _.filter((U) => {
|
|
9023
9023
|
const ce = e.findIndex((de) => de.id === U);
|
|
9024
9024
|
return ce >= 0 && ce < T;
|
|
9025
9025
|
});
|
|
9026
|
-
S(
|
|
9027
|
-
}, L = () =>
|
|
9028
|
-
const B = e[
|
|
9029
|
-
return B ?
|
|
9026
|
+
S(H), T >= 0 && E > T && F(B);
|
|
9027
|
+
}, L = () => E <= 0 ? !1 : C(e[E - 1].id), O = () => {
|
|
9028
|
+
const B = e[E + 1];
|
|
9029
|
+
return B ? C(B.id) : !1;
|
|
9030
9030
|
}, te = {
|
|
9031
9031
|
activeStep: W,
|
|
9032
|
-
activeIndex:
|
|
9033
|
-
completedStepIds:
|
|
9032
|
+
activeIndex: E,
|
|
9033
|
+
completedStepIds: _,
|
|
9034
9034
|
isCompleted: Z,
|
|
9035
9035
|
isUnlocked: V,
|
|
9036
9036
|
completeStep: K,
|
|
9037
9037
|
uncompleteStep: ae,
|
|
9038
|
-
goToStep:
|
|
9038
|
+
goToStep: C,
|
|
9039
9039
|
goNext: O,
|
|
9040
9040
|
goPrevious: L
|
|
9041
9041
|
};
|
|
9042
9042
|
if (!W) return null;
|
|
9043
|
-
const Q = e[
|
|
9043
|
+
const Q = e[E + 1], oe = E > 0, D = Q ? V(Q.id) : !1, me = typeof W.content == "function" ? W.content(te) : W.content;
|
|
9044
9044
|
return /* @__PURE__ */ o(
|
|
9045
9045
|
"section",
|
|
9046
9046
|
{
|
|
@@ -9072,21 +9072,21 @@ function Bu({
|
|
|
9072
9072
|
gridTemplateColumns: `repeat(${e.length}, minmax(0, 1fr))`
|
|
9073
9073
|
},
|
|
9074
9074
|
children: e.map((B, T) => {
|
|
9075
|
-
const
|
|
9075
|
+
const H = B.id === W.id, U = Z(B.id), ce = re(T), de = q(T);
|
|
9076
9076
|
return /* @__PURE__ */ o(
|
|
9077
9077
|
"button",
|
|
9078
9078
|
{
|
|
9079
9079
|
type: "button",
|
|
9080
9080
|
disabled: !ce,
|
|
9081
|
-
"aria-current":
|
|
9081
|
+
"aria-current": H ? "step" : void 0,
|
|
9082
9082
|
"aria-disabled": !ce,
|
|
9083
9083
|
title: !ce && de ? `Completa ${de.title}` : B.title,
|
|
9084
|
-
onClick: () =>
|
|
9084
|
+
onClick: () => C(B.id),
|
|
9085
9085
|
className: ht(
|
|
9086
9086
|
"group relative min-h-16 min-w-0 overflow-hidden rounded-md border p-3 text-left transition-all duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--primary)]/35 disabled:cursor-not-allowed",
|
|
9087
|
-
|
|
9088
|
-
U && !
|
|
9089
|
-
!
|
|
9087
|
+
H && "border-[var(--primary)] bg-[var(--bg-card)] shadow-sm",
|
|
9088
|
+
U && !H && "border-[var(--primary)]/35 bg-[var(--bg-card)]",
|
|
9089
|
+
!H && !U && ce && "border-transparent bg-[var(--bg-card)]/45 hover:border-[var(--border)] hover:bg-[var(--bg-card)]",
|
|
9090
9090
|
!ce && "border-transparent bg-[var(--bg-card)]/35 opacity-60"
|
|
9091
9091
|
),
|
|
9092
9092
|
children: [
|
|
@@ -9095,7 +9095,7 @@ function Bu({
|
|
|
9095
9095
|
{
|
|
9096
9096
|
className: ht(
|
|
9097
9097
|
"absolute inset-x-0 top-0 h-0.5 origin-left scale-x-0 bg-[var(--primary)] transition-transform duration-300",
|
|
9098
|
-
|
|
9098
|
+
H && "scale-x-100"
|
|
9099
9099
|
)
|
|
9100
9100
|
}
|
|
9101
9101
|
),
|
|
@@ -9105,9 +9105,9 @@ function Bu({
|
|
|
9105
9105
|
{
|
|
9106
9106
|
className: ht(
|
|
9107
9107
|
"grid h-7 w-7 shrink-0 place-items-center rounded-full border text-xs font-bold transition-all duration-200",
|
|
9108
|
-
|
|
9109
|
-
U && !
|
|
9110
|
-
!U && !
|
|
9108
|
+
H && "border-[var(--primary)] bg-[var(--primary)] text-[var(--primary-fg)]",
|
|
9109
|
+
U && !H && "border-[var(--primary)] bg-[var(--primary)]/12 text-[var(--primary)]",
|
|
9110
|
+
!U && !H && ce && "border-[var(--border)] text-[var(--text-muted)]",
|
|
9111
9111
|
!ce && "border-[var(--border)] text-[var(--text-muted)]"
|
|
9112
9112
|
),
|
|
9113
9113
|
children: U ? /* @__PURE__ */ t(Ye, { className: "h-4 w-4" }) : ce ? T + 1 : /* @__PURE__ */ t(El, { className: "h-3.5 w-3.5" })
|
|
@@ -9119,7 +9119,7 @@ function Bu({
|
|
|
9119
9119
|
{
|
|
9120
9120
|
className: ht(
|
|
9121
9121
|
"block truncate text-xs font-semibold transition-colors duration-200",
|
|
9122
|
-
|
|
9122
|
+
H ? "text-[var(--text-main)]" : "text-[var(--text-secondary)]"
|
|
9123
9123
|
),
|
|
9124
9124
|
children: [
|
|
9125
9125
|
T + 1,
|
|
@@ -9176,13 +9176,13 @@ function Bu({
|
|
|
9176
9176
|
/* @__PURE__ */ o("div", { className: "flex items-center gap-3 text-xs text-[var(--text-muted)]", children: [
|
|
9177
9177
|
/* @__PURE__ */ o("span", { children: [
|
|
9178
9178
|
"Paso ",
|
|
9179
|
-
|
|
9179
|
+
E + 1,
|
|
9180
9180
|
" de ",
|
|
9181
9181
|
e.length
|
|
9182
9182
|
] }),
|
|
9183
9183
|
/* @__PURE__ */ t("span", { className: "h-1 w-1 rounded-full bg-[var(--border)]" }),
|
|
9184
9184
|
/* @__PURE__ */ o("span", { children: [
|
|
9185
|
-
|
|
9185
|
+
_.length,
|
|
9186
9186
|
" completados"
|
|
9187
9187
|
] })
|
|
9188
9188
|
] }),
|
|
@@ -9247,12 +9247,12 @@ const Vc = Eo(
|
|
|
9247
9247
|
onInput: N,
|
|
9248
9248
|
...M
|
|
9249
9249
|
}, g) {
|
|
9250
|
-
const
|
|
9250
|
+
const j = se(null), $ = Kc(w, y), k = m ?? v, _ = !!(b || p || u), Y = f === "error" ? "var(--danger)" : f === "success" ? "#16a34a" : "var(--border)", E = {
|
|
9251
9251
|
...A ?? {},
|
|
9252
9252
|
...s ? { minHeight: `${s * 24 + 18}px` } : null,
|
|
9253
9253
|
...c ? { maxHeight: `${c * 24 + 18}px` } : null
|
|
9254
9254
|
}, W = () => {
|
|
9255
|
-
const S =
|
|
9255
|
+
const S = j.current;
|
|
9256
9256
|
!S || !l || (S.style.height = "auto", S.style.height = `${S.scrollHeight}px`);
|
|
9257
9257
|
};
|
|
9258
9258
|
ie(W, [l, w]);
|
|
@@ -9261,7 +9261,7 @@ const Vc = Eo(
|
|
|
9261
9261
|
{
|
|
9262
9262
|
...M,
|
|
9263
9263
|
ref: (S) => {
|
|
9264
|
-
|
|
9264
|
+
j.current = S, Uc(g, S);
|
|
9265
9265
|
},
|
|
9266
9266
|
value: w,
|
|
9267
9267
|
defaultValue: y,
|
|
@@ -9270,16 +9270,16 @@ const Vc = Eo(
|
|
|
9270
9270
|
onInput: (S) => {
|
|
9271
9271
|
W(), N == null || N(S);
|
|
9272
9272
|
},
|
|
9273
|
-
style: {
|
|
9273
|
+
style: { ...E, borderColor: Y },
|
|
9274
9274
|
className: `w-full rounded-lg border bg-[var(--bg-input)] text-[var(--text-main)] outline-none placeholder:text-[var(--text-muted)] transition-colors focus:border-[var(--primary)] disabled:cursor-not-allowed disabled:opacity-60 ${Wc[a]} ${qc[l ? "none" : i]} ${b ? "pl-8" : ""} ${p ? "pr-10" : ""} ${r}`
|
|
9275
9275
|
}
|
|
9276
9276
|
);
|
|
9277
|
-
return
|
|
9277
|
+
return _ ? /* @__PURE__ */ o("span", { className: `relative block ${n}`, children: [
|
|
9278
9278
|
b && /* @__PURE__ */ t("span", { className: "pointer-events-none absolute left-2.5 top-2.5 flex h-4 w-4 items-center justify-center text-[var(--text-muted)]", children: b }),
|
|
9279
9279
|
le,
|
|
9280
9280
|
p && /* @__PURE__ */ t("span", { className: "absolute right-2 top-2 flex items-center justify-center", children: p }),
|
|
9281
9281
|
u && /* @__PURE__ */ o("span", { className: "absolute bottom-1.5 right-2 rounded bg-[var(--bg-input)] px-1.5 text-[10px] font-semibold text-[var(--text-muted)]", children: [
|
|
9282
|
-
|
|
9282
|
+
$,
|
|
9283
9283
|
k ? `/${k}` : ""
|
|
9284
9284
|
] })
|
|
9285
9285
|
] }) : le;
|
|
@@ -9375,35 +9375,35 @@ function Ou({
|
|
|
9375
9375
|
required: A = !1
|
|
9376
9376
|
}) {
|
|
9377
9377
|
const w = e !== void 0, [y, v] = P(
|
|
9378
|
-
() => (r ?? []).map((T,
|
|
9378
|
+
() => (r ?? []).map((T, H) => ({
|
|
9379
9379
|
id: Un(),
|
|
9380
9380
|
value: T.trim(),
|
|
9381
|
-
colorIndex:
|
|
9381
|
+
colorIndex: H
|
|
9382
9382
|
}))
|
|
9383
9383
|
);
|
|
9384
9384
|
ie(() => {
|
|
9385
9385
|
w && v((T) => {
|
|
9386
|
-
const
|
|
9387
|
-
return
|
|
9386
|
+
const H = e ?? [], U = new Map(T.map((ce) => [ce.value, ce]));
|
|
9387
|
+
return H.map((ce, de) => U.get(ce) ?? { id: Un(), value: ce, colorIndex: de });
|
|
9388
9388
|
});
|
|
9389
9389
|
}, [w, e]);
|
|
9390
|
-
const N = y, [M, g] = P(""), [
|
|
9390
|
+
const N = y, [M, g] = P(""), [j, $] = P(null), [k, _] = P(""), [Y, E] = P(!1), [W, le] = P(!1), S = se(null), F = se(null), Z = se(null), q = !!p;
|
|
9391
9391
|
function re() {
|
|
9392
9392
|
le(!0), setTimeout(() => le(!1), 400);
|
|
9393
9393
|
}
|
|
9394
9394
|
function V(T) {
|
|
9395
|
-
v(T), n == null || n(T.map((
|
|
9395
|
+
v(T), n == null || n(T.map((H) => H.value));
|
|
9396
9396
|
}
|
|
9397
|
-
function
|
|
9398
|
-
let
|
|
9397
|
+
function C(T) {
|
|
9398
|
+
let H = N, U = !1, ce = !1;
|
|
9399
9399
|
for (const de of T) {
|
|
9400
9400
|
const ve = de.trim();
|
|
9401
9401
|
if (ve) {
|
|
9402
|
-
if (c !== void 0 &&
|
|
9402
|
+
if (c !== void 0 && H.length >= c) {
|
|
9403
9403
|
ce = !0;
|
|
9404
9404
|
break;
|
|
9405
9405
|
}
|
|
9406
|
-
if (!u &&
|
|
9406
|
+
if (!u && H.some((Be) => Be.value.toLowerCase() === ve.toLowerCase())) {
|
|
9407
9407
|
ce = !0;
|
|
9408
9408
|
continue;
|
|
9409
9409
|
}
|
|
@@ -9411,24 +9411,24 @@ function Ou({
|
|
|
9411
9411
|
ce = !0;
|
|
9412
9412
|
continue;
|
|
9413
9413
|
}
|
|
9414
|
-
|
|
9415
|
-
...
|
|
9416
|
-
{ id: Un(), value: ve, colorIndex:
|
|
9414
|
+
H = [
|
|
9415
|
+
...H,
|
|
9416
|
+
{ id: Un(), value: ve, colorIndex: H.length }
|
|
9417
9417
|
], U = !0;
|
|
9418
9418
|
}
|
|
9419
9419
|
}
|
|
9420
|
-
return U && V(
|
|
9420
|
+
return U && V(H), ce && re(), U;
|
|
9421
9421
|
}
|
|
9422
9422
|
function K(T) {
|
|
9423
|
-
return
|
|
9423
|
+
return C([T]);
|
|
9424
9424
|
}
|
|
9425
9425
|
function ae(T) {
|
|
9426
|
-
const
|
|
9427
|
-
V(
|
|
9426
|
+
const H = N.filter((U) => U.id !== T);
|
|
9427
|
+
V(H.map((U, ce) => ({ ...U, colorIndex: ce })));
|
|
9428
9428
|
}
|
|
9429
|
-
function L(T,
|
|
9430
|
-
const U =
|
|
9431
|
-
if (
|
|
9429
|
+
function L(T, H) {
|
|
9430
|
+
const U = H.trim();
|
|
9431
|
+
if ($(null), _(""), !U) {
|
|
9432
9432
|
ae(T);
|
|
9433
9433
|
return;
|
|
9434
9434
|
}
|
|
@@ -9443,9 +9443,9 @@ function Ou({
|
|
|
9443
9443
|
}
|
|
9444
9444
|
}
|
|
9445
9445
|
function O(T) {
|
|
9446
|
-
i || (
|
|
9447
|
-
var
|
|
9448
|
-
return (
|
|
9446
|
+
i || ($(T.id), _(T.value), setTimeout(() => {
|
|
9447
|
+
var H;
|
|
9448
|
+
return (H = F.current) == null ? void 0 : H.select();
|
|
9449
9449
|
}, 0));
|
|
9450
9450
|
}
|
|
9451
9451
|
function te(T) {
|
|
@@ -9455,19 +9455,19 @@ function Ou({
|
|
|
9455
9455
|
}
|
|
9456
9456
|
if (T.key === "Backspace" && M === "" && N.length > 0) {
|
|
9457
9457
|
T.preventDefault();
|
|
9458
|
-
const
|
|
9459
|
-
ae(
|
|
9458
|
+
const H = N[N.length - 1];
|
|
9459
|
+
ae(H.id);
|
|
9460
9460
|
}
|
|
9461
9461
|
}
|
|
9462
|
-
function Q(T,
|
|
9462
|
+
function Q(T, H) {
|
|
9463
9463
|
if (T.key === "Enter") {
|
|
9464
|
-
T.preventDefault(), L(
|
|
9464
|
+
T.preventDefault(), L(H, k), setTimeout(() => {
|
|
9465
9465
|
var U;
|
|
9466
9466
|
return (U = S.current) == null ? void 0 : U.focus();
|
|
9467
9467
|
}, 0);
|
|
9468
9468
|
return;
|
|
9469
9469
|
}
|
|
9470
|
-
T.key === "Escape" && (T.preventDefault(),
|
|
9470
|
+
T.key === "Escape" && (T.preventDefault(), $(null), _(""), setTimeout(() => {
|
|
9471
9471
|
var U;
|
|
9472
9472
|
return (U = S.current) == null ? void 0 : U.focus();
|
|
9473
9473
|
}, 0));
|
|
@@ -9478,12 +9478,12 @@ function Ou({
|
|
|
9478
9478
|
}
|
|
9479
9479
|
function D(T) {
|
|
9480
9480
|
if (i) return;
|
|
9481
|
-
const
|
|
9482
|
-
if (!
|
|
9481
|
+
const H = T.clipboardData.getData("text");
|
|
9482
|
+
if (!H || !(s.some((ve) => ve && H.includes(ve)) || H.includes(`
|
|
9483
9483
|
`))) return;
|
|
9484
9484
|
T.preventDefault();
|
|
9485
|
-
const ce = Zc(
|
|
9486
|
-
|
|
9485
|
+
const ce = Zc(H, s);
|
|
9486
|
+
C(ce) && g("");
|
|
9487
9487
|
}
|
|
9488
9488
|
function me() {
|
|
9489
9489
|
const T = M.trim();
|
|
@@ -9500,10 +9500,10 @@ function Ou({
|
|
|
9500
9500
|
{
|
|
9501
9501
|
ref: Z,
|
|
9502
9502
|
onClick: oe,
|
|
9503
|
-
onFocus: () =>
|
|
9503
|
+
onFocus: () => E(!0),
|
|
9504
9504
|
onBlur: (T) => {
|
|
9505
|
-
var
|
|
9506
|
-
(
|
|
9505
|
+
var H;
|
|
9506
|
+
(H = Z.current) != null && H.contains(T.relatedTarget) || (E(!1), j !== null && L(j, k), j === null && me());
|
|
9507
9507
|
},
|
|
9508
9508
|
style: { borderColor: X },
|
|
9509
9509
|
className: `
|
|
@@ -9523,16 +9523,16 @@ function Ou({
|
|
|
9523
9523
|
}
|
|
9524
9524
|
` }),
|
|
9525
9525
|
N.map((T) => {
|
|
9526
|
-
const
|
|
9527
|
-
return
|
|
9526
|
+
const H = Gc(T.colorIndex);
|
|
9527
|
+
return j === T.id ? (
|
|
9528
9528
|
/* ── Inline edit ── */
|
|
9529
9529
|
/* @__PURE__ */ t(
|
|
9530
9530
|
"input",
|
|
9531
9531
|
{
|
|
9532
|
-
ref:
|
|
9532
|
+
ref: F,
|
|
9533
9533
|
value: k,
|
|
9534
9534
|
disabled: i,
|
|
9535
|
-
onChange: (U) =>
|
|
9535
|
+
onChange: (U) => _(U.target.value),
|
|
9536
9536
|
onKeyDown: (U) => Q(U, T.id),
|
|
9537
9537
|
onBlur: () => L(T.id, k),
|
|
9538
9538
|
className: "min-w-[4rem] rounded border border-[var(--primary)] bg-transparent px-1 py-0.5 text-sm text-[var(--text-main)] outline-none",
|
|
@@ -9547,9 +9547,9 @@ function Ou({
|
|
|
9547
9547
|
{
|
|
9548
9548
|
className: "inline-flex max-w-[240px] items-center gap-1 rounded-md px-2 py-0.5 text-xs font-medium",
|
|
9549
9549
|
style: {
|
|
9550
|
-
backgroundColor:
|
|
9551
|
-
color:
|
|
9552
|
-
border: `1px solid ${
|
|
9550
|
+
backgroundColor: H.bg,
|
|
9551
|
+
color: H.text,
|
|
9552
|
+
border: `1px solid ${H.border}`
|
|
9553
9553
|
},
|
|
9554
9554
|
children: [
|
|
9555
9555
|
/* @__PURE__ */ t("span", { className: "truncate", children: T.value }),
|
|
@@ -9847,19 +9847,19 @@ function md({
|
|
|
9847
9847
|
ie(() => {
|
|
9848
9848
|
y(!1);
|
|
9849
9849
|
}, [v, b]);
|
|
9850
|
-
const { wh: N, text: M } = td[a], g = go(n) || go(r) || c,
|
|
9850
|
+
const { wh: N, text: M } = td[a], g = go(n) || go(r) || c, j = sd(g), $ = ld(), k = dd(r, n), _ = ud($, "/favicon.svg"), Y = {
|
|
9851
9851
|
xs: 20,
|
|
9852
9852
|
sm: 28,
|
|
9853
9853
|
md: 36,
|
|
9854
9854
|
lg: 48,
|
|
9855
9855
|
xl: 64
|
|
9856
|
-
},
|
|
9856
|
+
}, E = Ze(() => {
|
|
9857
9857
|
if (!v) return "";
|
|
9858
9858
|
const Z = new URLSearchParams();
|
|
9859
9859
|
Z.set("size", String(Y[a])), b && Z.set("v", String(b));
|
|
9860
9860
|
const q = Z.toString();
|
|
9861
|
-
return `${
|
|
9862
|
-
}, [b,
|
|
9861
|
+
return `${$}/api/user/avatar/${encodeURIComponent(v)}${q ? `?${q}` : ""}`;
|
|
9862
|
+
}, [b, $, v, a]), W = Y[a], le = k ? /* @__PURE__ */ t(
|
|
9863
9863
|
"span",
|
|
9864
9864
|
{
|
|
9865
9865
|
className: `${N} ${od[a]} rounded-full flex items-center justify-center bg-[#071f1a] ring-1 ring-emerald-400/35 shadow-[0_0_0_1px_rgba(255,255,255,0.06)] flex-shrink-0 ${p}`,
|
|
@@ -9867,7 +9867,7 @@ function md({
|
|
|
9867
9867
|
children: /* @__PURE__ */ t(
|
|
9868
9868
|
"img",
|
|
9869
9869
|
{
|
|
9870
|
-
src:
|
|
9870
|
+
src: _,
|
|
9871
9871
|
alt: g,
|
|
9872
9872
|
width: W,
|
|
9873
9873
|
height: W,
|
|
@@ -9875,10 +9875,10 @@ function md({
|
|
|
9875
9875
|
}
|
|
9876
9876
|
)
|
|
9877
9877
|
}
|
|
9878
|
-
) :
|
|
9878
|
+
) : E && !w ? /* @__PURE__ */ t(
|
|
9879
9879
|
"img",
|
|
9880
9880
|
{
|
|
9881
|
-
src:
|
|
9881
|
+
src: E,
|
|
9882
9882
|
alt: g,
|
|
9883
9883
|
width: W,
|
|
9884
9884
|
height: W,
|
|
@@ -9895,7 +9895,7 @@ function md({
|
|
|
9895
9895
|
className: `${N} ${cd(g)} ${M} rounded-full flex items-center justify-center font-black text-white uppercase flex-shrink-0 ${p}`,
|
|
9896
9896
|
style: A,
|
|
9897
9897
|
title: g,
|
|
9898
|
-
children:
|
|
9898
|
+
children: j
|
|
9899
9899
|
}
|
|
9900
9900
|
);
|
|
9901
9901
|
if (i)
|
|
@@ -9916,12 +9916,12 @@ function md({
|
|
|
9916
9916
|
]
|
|
9917
9917
|
}
|
|
9918
9918
|
);
|
|
9919
|
-
const S = l ?? !0,
|
|
9920
|
-
return S &&
|
|
9919
|
+
const S = l ?? !0, F = s ?? g;
|
|
9920
|
+
return S && F ? /* @__PURE__ */ t(
|
|
9921
9921
|
br,
|
|
9922
9922
|
{
|
|
9923
9923
|
as: "span",
|
|
9924
|
-
content:
|
|
9924
|
+
content: F,
|
|
9925
9925
|
className: `inline-flex flex-shrink-0 ${u}`,
|
|
9926
9926
|
children: le
|
|
9927
9927
|
}
|
|
@@ -10156,7 +10156,7 @@ function Pu({
|
|
|
10156
10156
|
showBreadcrumbs: m = !0,
|
|
10157
10157
|
contained: f = !1
|
|
10158
10158
|
}) {
|
|
10159
|
-
const b = se(null), [p, A] = P(!1), [w, y] = P(u ?? "/"), [v, N] = P(() => yo()), [M, g] = P(null),
|
|
10159
|
+
const b = se(null), [p, A] = P(!1), [w, y] = P(u ?? "/"), [v, N] = P(() => yo()), [M, g] = P(null), j = u ?? w, $ = c ?? xd(j), k = i ?? yd(j), _ = m && !v && $.length > 1, Y = !_;
|
|
10160
10160
|
ie(() => {
|
|
10161
10161
|
u || y(window.location.pathname);
|
|
10162
10162
|
}, [u]), ie(() => {
|
|
@@ -10167,7 +10167,7 @@ function Pu({
|
|
|
10167
10167
|
return;
|
|
10168
10168
|
}
|
|
10169
10169
|
let W = null, le = 0, S = 0;
|
|
10170
|
-
const
|
|
10170
|
+
const F = () => {
|
|
10171
10171
|
const re = b.current, V = document.querySelector(
|
|
10172
10172
|
"[data-app-scroll='true']"
|
|
10173
10173
|
);
|
|
@@ -10178,7 +10178,7 @@ function Pu({
|
|
|
10178
10178
|
const re = W && W !== window ? W.scrollTop : window.scrollY;
|
|
10179
10179
|
A((V) => V ? re > 24 : re > 72);
|
|
10180
10180
|
}, q = () => {
|
|
10181
|
-
W == null || W.removeEventListener("scroll", Z), W =
|
|
10181
|
+
W == null || W.removeEventListener("scroll", Z), W = F(), W.addEventListener("scroll", Z, { passive: !0 }), Z();
|
|
10182
10182
|
};
|
|
10183
10183
|
return q(), le = window.requestAnimationFrame(q), S = window.setTimeout(q, 120), () => {
|
|
10184
10184
|
window.cancelAnimationFrame(le), window.clearTimeout(S), W == null || W.removeEventListener("scroll", Z);
|
|
@@ -10204,20 +10204,20 @@ function Pu({
|
|
|
10204
10204
|
g(
|
|
10205
10205
|
(B) => B && B.marginLeft === X.marginLeft && B.width === X.width ? B : X
|
|
10206
10206
|
);
|
|
10207
|
-
},
|
|
10207
|
+
}, F = () => {
|
|
10208
10208
|
window.cancelAnimationFrame(W), W = window.requestAnimationFrame(S);
|
|
10209
10209
|
};
|
|
10210
|
-
|
|
10211
|
-
const Z = new ResizeObserver(
|
|
10210
|
+
F(), window.addEventListener("resize", F);
|
|
10211
|
+
const Z = new ResizeObserver(F), q = b.current, re = q == null ? void 0 : q.parentElement, V = document.querySelector(
|
|
10212
10212
|
"[data-app-scroll='true']"
|
|
10213
|
-
),
|
|
10214
|
-
return [re, V,
|
|
10213
|
+
), C = Yn(V) ?? V;
|
|
10214
|
+
return [re, V, C].forEach((K) => {
|
|
10215
10215
|
K && Z.observe(K);
|
|
10216
|
-
}), le.push(window.setTimeout(
|
|
10217
|
-
window.cancelAnimationFrame(W), window.removeEventListener("resize",
|
|
10216
|
+
}), le.push(window.setTimeout(F, 120)), le.push(window.setTimeout(F, 280)), () => {
|
|
10217
|
+
window.cancelAnimationFrame(W), window.removeEventListener("resize", F), Z.disconnect(), le.forEach((K) => window.clearTimeout(K));
|
|
10218
10218
|
};
|
|
10219
10219
|
}, [f]);
|
|
10220
|
-
const
|
|
10220
|
+
const E = {
|
|
10221
10221
|
...M ? { marginLeft: M.marginLeft, width: M.width } : null,
|
|
10222
10222
|
"--page-header-control-height": p ? "34px" : "40px",
|
|
10223
10223
|
"--page-header-control-padding-x": p ? "10px" : "14px",
|
|
@@ -10235,7 +10235,7 @@ function Pu({
|
|
|
10235
10235
|
"data-page-header": "true",
|
|
10236
10236
|
"data-compact": p ? "true" : "false",
|
|
10237
10237
|
className: `sticky top-0 z-30 overflow-visible py-0 transition-[background-color,box-shadow,border-color] duration-300 ease-out ${f ? "mb-0 flex-shrink-0" : "mb-4 sm:mb-0"} ${l}`,
|
|
10238
|
-
style:
|
|
10238
|
+
style: E,
|
|
10239
10239
|
children: /* @__PURE__ */ o(
|
|
10240
10240
|
"div",
|
|
10241
10241
|
{
|
|
@@ -10255,7 +10255,7 @@ function Pu({
|
|
|
10255
10255
|
{
|
|
10256
10256
|
className: `flex-shrink-0 transition-[color,transform,opacity] duration-300 ease-out ${p ? "scale-75 opacity-80" : "scale-90 opacity-100"}`,
|
|
10257
10257
|
style: {
|
|
10258
|
-
color:
|
|
10258
|
+
color: _ ? "var(--text-secondary)" : "var(--text-muted)"
|
|
10259
10259
|
},
|
|
10260
10260
|
children: k
|
|
10261
10261
|
}
|
|
@@ -10834,15 +10834,15 @@ function Wu({
|
|
|
10834
10834
|
wrapperStyle: vn()
|
|
10835
10835
|
}
|
|
10836
10836
|
) : null,
|
|
10837
|
-
N.map((g,
|
|
10837
|
+
N.map((g, j) => /* @__PURE__ */ t(
|
|
10838
10838
|
Ro,
|
|
10839
10839
|
{
|
|
10840
10840
|
type: w ? "monotone" : "linear",
|
|
10841
10841
|
dataKey: g.key,
|
|
10842
10842
|
name: g.label,
|
|
10843
10843
|
stroke: g.color,
|
|
10844
|
-
strokeWidth:
|
|
10845
|
-
strokeOpacity:
|
|
10844
|
+
strokeWidth: j === 0 ? y + 0.35 : y,
|
|
10845
|
+
strokeOpacity: j === 0 ? 1 : 0.88,
|
|
10846
10846
|
isAnimationActive: !0,
|
|
10847
10847
|
animationDuration: At,
|
|
10848
10848
|
animationEasing: Tt,
|
|
@@ -11015,10 +11015,11 @@ function qu({
|
|
|
11015
11015
|
ariaLabel: A = "Gráfico de barras",
|
|
11016
11016
|
layout: w = "vertical",
|
|
11017
11017
|
mode: y = "grouped",
|
|
11018
|
-
barRadius: v = 6
|
|
11018
|
+
barRadius: v = 6,
|
|
11019
|
+
categoryAxisWidth: N = 64
|
|
11019
11020
|
}) {
|
|
11020
|
-
const
|
|
11021
|
-
return l ? /* @__PURE__ */ t(Je, { height: a }) :
|
|
11021
|
+
const M = hn(e, n), g = mr(n), j = hr(f), $ = w === "horizontal";
|
|
11022
|
+
return l ? /* @__PURE__ */ t(Je, { height: a }) : M ? /* @__PURE__ */ t(Qe, { height: a, text: s }) : /* @__PURE__ */ t(
|
|
11022
11023
|
"div",
|
|
11023
11024
|
{
|
|
11024
11025
|
className: `bonsaif-chart bonsaif-bar-chart w-full ${i}`,
|
|
@@ -11029,8 +11030,8 @@ function qu({
|
|
|
11029
11030
|
Po,
|
|
11030
11031
|
{
|
|
11031
11032
|
data: e,
|
|
11032
|
-
margin:
|
|
11033
|
-
layout:
|
|
11033
|
+
margin: j,
|
|
11034
|
+
layout: $ ? "vertical" : "horizontal",
|
|
11034
11035
|
barCategoryGap: "34%",
|
|
11035
11036
|
barGap: 3,
|
|
11036
11037
|
children: [
|
|
@@ -11039,11 +11040,11 @@ function qu({
|
|
|
11039
11040
|
{
|
|
11040
11041
|
strokeDasharray: "2 8",
|
|
11041
11042
|
stroke: vr(),
|
|
11042
|
-
horizontal:
|
|
11043
|
-
vertical:
|
|
11043
|
+
horizontal: !$,
|
|
11044
|
+
vertical: $
|
|
11044
11045
|
}
|
|
11045
11046
|
) : null,
|
|
11046
|
-
|
|
11047
|
+
$ ? /* @__PURE__ */ o(Re, { children: [
|
|
11047
11048
|
/* @__PURE__ */ t(
|
|
11048
11049
|
Ut,
|
|
11049
11050
|
{
|
|
@@ -11051,7 +11052,7 @@ function qu({
|
|
|
11051
11052
|
tick: Ge(),
|
|
11052
11053
|
tickLine: !1,
|
|
11053
11054
|
axisLine: !1,
|
|
11054
|
-
tickFormatter: (
|
|
11055
|
+
tickFormatter: (k) => b(Number(k)),
|
|
11055
11056
|
domain: p ?? ["auto", "auto"]
|
|
11056
11057
|
}
|
|
11057
11058
|
),
|
|
@@ -11063,7 +11064,7 @@ function qu({
|
|
|
11063
11064
|
tick: Ge(),
|
|
11064
11065
|
tickLine: !1,
|
|
11065
11066
|
axisLine: !1,
|
|
11066
|
-
width:
|
|
11067
|
+
width: N
|
|
11067
11068
|
}
|
|
11068
11069
|
)
|
|
11069
11070
|
] }) : /* @__PURE__ */ o(Re, { children: [
|
|
@@ -11087,7 +11088,7 @@ function qu({
|
|
|
11087
11088
|
axisLine: !1,
|
|
11088
11089
|
width: 44,
|
|
11089
11090
|
domain: p ?? ["auto", "auto"],
|
|
11090
|
-
tickFormatter: (
|
|
11091
|
+
tickFormatter: (k) => b(Number(k)),
|
|
11091
11092
|
dx: -2
|
|
11092
11093
|
}
|
|
11093
11094
|
)
|
|
@@ -11111,21 +11112,21 @@ function qu({
|
|
|
11111
11112
|
wrapperStyle: vn()
|
|
11112
11113
|
}
|
|
11113
11114
|
) : null,
|
|
11114
|
-
|
|
11115
|
+
g.map((k, _) => /* @__PURE__ */ t(
|
|
11115
11116
|
ln,
|
|
11116
11117
|
{
|
|
11117
|
-
dataKey:
|
|
11118
|
-
name:
|
|
11119
|
-
fill:
|
|
11120
|
-
fillOpacity:
|
|
11121
|
-
radius:
|
|
11118
|
+
dataKey: k.key,
|
|
11119
|
+
name: k.label,
|
|
11120
|
+
fill: k.color,
|
|
11121
|
+
fillOpacity: _ === 0 ? 1 : 0.82,
|
|
11122
|
+
radius: $ ? [0, v, v, 0] : [v, v, 2, 2],
|
|
11122
11123
|
maxBarSize: 20,
|
|
11123
11124
|
stackId: y === "stacked" ? "stack" : void 0,
|
|
11124
11125
|
isAnimationActive: !0,
|
|
11125
11126
|
animationDuration: At,
|
|
11126
11127
|
animationEasing: Tt
|
|
11127
11128
|
},
|
|
11128
|
-
|
|
11129
|
+
k.key
|
|
11129
11130
|
))
|
|
11130
11131
|
]
|
|
11131
11132
|
}
|
|
@@ -11170,21 +11171,21 @@ function li({
|
|
|
11170
11171
|
cornerRadius: y,
|
|
11171
11172
|
variant: v
|
|
11172
11173
|
}) {
|
|
11173
|
-
const N = e.map((S,
|
|
11174
|
+
const N = e.map((S, F) => ({
|
|
11174
11175
|
name: String(S[r] ?? ""),
|
|
11175
11176
|
value: pr(S[n]) ?? 0,
|
|
11176
|
-
fill: A[
|
|
11177
|
+
fill: A[F % A.length],
|
|
11177
11178
|
row: S
|
|
11178
|
-
})).filter((S) => S.value > 0), M = !N.length, g = v === "donut",
|
|
11179
|
+
})).filter((S) => S.value > 0), M = !N.length, g = v === "donut", j = N.length, $ = So(b, g ? 62 : 12), k = So(p, 78), _ = Math.min(
|
|
11179
11180
|
w ?? (g ? 2 : 3),
|
|
11180
|
-
Math.max(0.5, 10 / Math.max(1,
|
|
11181
|
+
Math.max(0.5, 10 / Math.max(1, j))
|
|
11181
11182
|
), Y = Math.min(
|
|
11182
11183
|
y ?? (g ? 10 : 8),
|
|
11183
|
-
Math.max(2, 36 / Math.max(1,
|
|
11184
|
+
Math.max(2, 36 / Math.max(1, j))
|
|
11184
11185
|
);
|
|
11185
11186
|
if (l) return /* @__PURE__ */ t(Je, { height: a });
|
|
11186
11187
|
if (M) return /* @__PURE__ */ t(Qe, { height: a, text: s });
|
|
11187
|
-
const
|
|
11188
|
+
const E = N.reduce((S, F) => S + F.value, 0), W = c ? Math.min(96, 28 + Math.ceil(j / 3) * 22) : 0, le = Math.max(140, a - W);
|
|
11188
11189
|
return /* @__PURE__ */ t(
|
|
11189
11190
|
"div",
|
|
11190
11191
|
{
|
|
@@ -11203,13 +11204,13 @@ function li({
|
|
|
11203
11204
|
nameKey: "name",
|
|
11204
11205
|
cx: "50%",
|
|
11205
11206
|
cy: "50%",
|
|
11206
|
-
innerRadius: `${
|
|
11207
|
+
innerRadius: `${$}%`,
|
|
11207
11208
|
outerRadius: `${k}%`,
|
|
11208
11209
|
startAngle: 90,
|
|
11209
11210
|
endAngle: -270,
|
|
11210
|
-
paddingAngle:
|
|
11211
|
+
paddingAngle: _,
|
|
11211
11212
|
cornerRadius: Y,
|
|
11212
|
-
minAngle:
|
|
11213
|
+
minAngle: j > 6 ? 3 : 2,
|
|
11213
11214
|
stroke: "var(--bg-card)",
|
|
11214
11215
|
strokeWidth: 2,
|
|
11215
11216
|
isAnimationActive: !0,
|
|
@@ -11231,7 +11232,7 @@ function li({
|
|
|
11231
11232
|
fontSize: 18,
|
|
11232
11233
|
fontWeight: 700,
|
|
11233
11234
|
letterSpacing: "-0.02em",
|
|
11234
|
-
children: m(
|
|
11235
|
+
children: m(E)
|
|
11235
11236
|
}
|
|
11236
11237
|
) : null
|
|
11237
11238
|
] }) }) }),
|
|
@@ -11284,10 +11285,10 @@ function Vu({
|
|
|
11284
11285
|
"aria-label": u
|
|
11285
11286
|
}
|
|
11286
11287
|
);
|
|
11287
|
-
const b = 120, p = 36, A = 3, w = 1, y = Math.min(...f), N = Math.max(...f) - y || 1, M = f.map((k,
|
|
11288
|
-
const Y = w +
|
|
11289
|
-
return { x: Y, y:
|
|
11290
|
-
}), g = M.map((k,
|
|
11288
|
+
const b = 120, p = 36, A = 3, w = 1, y = Math.min(...f), N = Math.max(...f) - y || 1, M = f.map((k, _) => {
|
|
11289
|
+
const Y = w + _ / (f.length - 1) * (b - w * 2), E = p - A - (k - y) / N * (p - A * 2);
|
|
11290
|
+
return { x: Y, y: E };
|
|
11291
|
+
}), g = M.map((k, _) => `${_ === 0 ? "M" : "L"}${k.x.toFixed(2)} ${k.y.toFixed(2)}`).join(" "), j = `${g} L${M[M.length - 1].x.toFixed(2)} ${p} L${M[0].x.toFixed(2)} ${p} Z`, $ = `bonsaif-spark-${r.replace(/[^a-zA-Z0-9_-]/g, "")}-${i}`;
|
|
11291
11292
|
return /* @__PURE__ */ t(
|
|
11292
11293
|
"div",
|
|
11293
11294
|
{
|
|
@@ -11304,11 +11305,11 @@ function Vu({
|
|
|
11304
11305
|
preserveAspectRatio: "none",
|
|
11305
11306
|
focusable: "false",
|
|
11306
11307
|
children: [
|
|
11307
|
-
s ? /* @__PURE__ */ t("defs", { children: /* @__PURE__ */ o("linearGradient", { id:
|
|
11308
|
+
s ? /* @__PURE__ */ t("defs", { children: /* @__PURE__ */ o("linearGradient", { id: $, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
11308
11309
|
/* @__PURE__ */ t("stop", { offset: "0%", stopColor: m, stopOpacity: 0.38 }),
|
|
11309
11310
|
/* @__PURE__ */ t("stop", { offset: "100%", stopColor: m, stopOpacity: 0 })
|
|
11310
11311
|
] }) }) : null,
|
|
11311
|
-
s ? /* @__PURE__ */ t("path", { d:
|
|
11312
|
+
s ? /* @__PURE__ */ t("path", { d: j, fill: `url(#${$})` }) : null,
|
|
11312
11313
|
/* @__PURE__ */ t(
|
|
11313
11314
|
"path",
|
|
11314
11315
|
{
|
|
@@ -11348,17 +11349,17 @@ function Gu({
|
|
|
11348
11349
|
}) {
|
|
11349
11350
|
const N = a ?? n.slice(0, Math.max(1, n.length - 1)), M = i ?? (n.length > 1 ? n.slice(-1) : n.length ? [n[0]] : []), g = [
|
|
11350
11351
|
...N,
|
|
11351
|
-
...M.filter((
|
|
11352
|
-
],
|
|
11352
|
+
...M.filter((E) => !N.some((W) => W.key === E.key))
|
|
11353
|
+
], j = hn(e, g), $ = mr(N), k = mr(g), _ = M.map((E) => {
|
|
11353
11354
|
var le;
|
|
11354
|
-
const W = k.find((S) => S.key ===
|
|
11355
|
+
const W = k.find((S) => S.key === E.key);
|
|
11355
11356
|
return {
|
|
11356
|
-
|
|
11357
|
-
label:
|
|
11358
|
-
color:
|
|
11357
|
+
...E,
|
|
11358
|
+
label: E.label ?? E.key,
|
|
11359
|
+
color: E.color ?? (W == null ? void 0 : W.color) ?? ((le = k[0]) == null ? void 0 : le.color)
|
|
11359
11360
|
};
|
|
11360
11361
|
}), Y = hr(p);
|
|
11361
|
-
return c ? /* @__PURE__ */ t(Je, { height: l }) :
|
|
11362
|
+
return c ? /* @__PURE__ */ t(Je, { height: l }) : j ? /* @__PURE__ */ t(Qe, { height: l, text: u }) : /* @__PURE__ */ t(
|
|
11362
11363
|
"div",
|
|
11363
11364
|
{
|
|
11364
11365
|
className: `bonsaif-chart bonsaif-combo-chart w-full ${s}`,
|
|
@@ -11394,7 +11395,7 @@ function Gu({
|
|
|
11394
11395
|
axisLine: !1,
|
|
11395
11396
|
width: 44,
|
|
11396
11397
|
domain: w ?? ["auto", "auto"],
|
|
11397
|
-
tickFormatter: (
|
|
11398
|
+
tickFormatter: (E) => A(Number(E)),
|
|
11398
11399
|
dx: -2
|
|
11399
11400
|
}
|
|
11400
11401
|
),
|
|
@@ -11417,12 +11418,12 @@ function Gu({
|
|
|
11417
11418
|
wrapperStyle: vn()
|
|
11418
11419
|
}
|
|
11419
11420
|
) : null,
|
|
11420
|
-
|
|
11421
|
+
$.map((E) => /* @__PURE__ */ t(
|
|
11421
11422
|
ln,
|
|
11422
11423
|
{
|
|
11423
|
-
dataKey:
|
|
11424
|
-
name:
|
|
11425
|
-
fill:
|
|
11424
|
+
dataKey: E.key,
|
|
11425
|
+
name: E.label,
|
|
11426
|
+
fill: E.color,
|
|
11426
11427
|
fillOpacity: 0.88,
|
|
11427
11428
|
radius: [v, v, 2, 2],
|
|
11428
11429
|
maxBarSize: 18,
|
|
@@ -11430,15 +11431,15 @@ function Gu({
|
|
|
11430
11431
|
animationDuration: At,
|
|
11431
11432
|
animationEasing: Tt
|
|
11432
11433
|
},
|
|
11433
|
-
|
|
11434
|
+
E.key
|
|
11434
11435
|
)),
|
|
11435
|
-
|
|
11436
|
+
_.map((E) => /* @__PURE__ */ t(
|
|
11436
11437
|
Ro,
|
|
11437
11438
|
{
|
|
11438
11439
|
type: "monotone",
|
|
11439
|
-
dataKey:
|
|
11440
|
-
name:
|
|
11441
|
-
stroke:
|
|
11440
|
+
dataKey: E.key,
|
|
11441
|
+
name: E.label,
|
|
11442
|
+
stroke: E.color,
|
|
11442
11443
|
strokeWidth: 2.5,
|
|
11443
11444
|
isAnimationActive: !0,
|
|
11444
11445
|
animationDuration: At,
|
|
@@ -11448,10 +11449,10 @@ function Gu({
|
|
|
11448
11449
|
r: 5,
|
|
11449
11450
|
strokeWidth: 2,
|
|
11450
11451
|
stroke: "var(--bg-card)",
|
|
11451
|
-
fill:
|
|
11452
|
+
fill: E.color
|
|
11452
11453
|
}
|
|
11453
11454
|
},
|
|
11454
|
-
|
|
11455
|
+
E.key
|
|
11455
11456
|
))
|
|
11456
11457
|
] }) })
|
|
11457
11458
|
}
|
|
@@ -11597,29 +11598,29 @@ function Xu({
|
|
|
11597
11598
|
thickness: y = 9,
|
|
11598
11599
|
showScale: v = !1
|
|
11599
11600
|
}) {
|
|
11600
|
-
const N = $o().replace(/:/g, ""), M = n - r || 1, g = Math.min(1, Math.max(0, (e - r) / M)), [
|
|
11601
|
+
const N = $o().replace(/:/g, ""), M = n - r || 1, g = Math.min(1, Math.max(0, (e - r) / M)), [j, $] = P(
|
|
11601
11602
|
w > 0 ? 0 : g
|
|
11602
11603
|
);
|
|
11603
11604
|
if (ie(() => {
|
|
11604
11605
|
if (l || s) return;
|
|
11605
11606
|
if (w <= 0) {
|
|
11606
|
-
|
|
11607
|
+
$(g);
|
|
11607
11608
|
return;
|
|
11608
11609
|
}
|
|
11609
11610
|
if (typeof window < "u" && window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
|
|
11610
|
-
|
|
11611
|
+
$(g);
|
|
11611
11612
|
return;
|
|
11612
11613
|
}
|
|
11613
|
-
let V = 0,
|
|
11614
|
-
|
|
11614
|
+
let V = 0, C = 0;
|
|
11615
|
+
$((L) => (C = L, L));
|
|
11615
11616
|
const K = performance.now(), ae = (L) => {
|
|
11616
11617
|
const O = Math.min(1, (L - K) / w), te = 1 - (1 - O) ** 3;
|
|
11617
|
-
C
|
|
11618
|
+
$(C + (g - C) * te), O < 1 && (V = requestAnimationFrame(ae));
|
|
11618
11619
|
};
|
|
11619
11620
|
return V = requestAnimationFrame(ae), () => cancelAnimationFrame(V);
|
|
11620
11621
|
}, [g, w, l, s]), l) return /* @__PURE__ */ t(Je, { height: a });
|
|
11621
11622
|
if (s) return /* @__PURE__ */ t(Qe, { height: a, text: c });
|
|
11622
|
-
const k = 100,
|
|
11623
|
+
const k = 100, _ = 108, Y = 72, E = b ?? Bd(e, n, f, p), W = r + j * M, le = Co(k, _, Y, Ht, Ht + Zn), S = Ht + Math.max(1e-3, j) * Zn, F = Co(k, _, Y, Ht, S), Z = mn(k, _, Y, Ht), q = mn(k, _, Y, Ht + Zn);
|
|
11623
11624
|
return /* @__PURE__ */ t(
|
|
11624
11625
|
"div",
|
|
11625
11626
|
{
|
|
@@ -11644,8 +11645,8 @@ function Xu({
|
|
|
11644
11645
|
x2: "1",
|
|
11645
11646
|
y2: "0",
|
|
11646
11647
|
children: [
|
|
11647
|
-
/* @__PURE__ */ t("stop", { offset: "0%", stopColor:
|
|
11648
|
-
/* @__PURE__ */ t("stop", { offset: "100%", stopColor:
|
|
11648
|
+
/* @__PURE__ */ t("stop", { offset: "0%", stopColor: E, stopOpacity: 0.82 }),
|
|
11649
|
+
/* @__PURE__ */ t("stop", { offset: "100%", stopColor: E, stopOpacity: 1 })
|
|
11649
11650
|
]
|
|
11650
11651
|
}
|
|
11651
11652
|
) }),
|
|
@@ -11662,7 +11663,7 @@ function Xu({
|
|
|
11662
11663
|
/* @__PURE__ */ t(
|
|
11663
11664
|
"path",
|
|
11664
11665
|
{
|
|
11665
|
-
d:
|
|
11666
|
+
d: F,
|
|
11666
11667
|
fill: "none",
|
|
11667
11668
|
stroke: `url(#bonsaif-gauge-${N})`,
|
|
11668
11669
|
strokeWidth: y,
|
|
@@ -11674,7 +11675,7 @@ function Xu({
|
|
|
11674
11675
|
"text",
|
|
11675
11676
|
{
|
|
11676
11677
|
x: k,
|
|
11677
|
-
y:
|
|
11678
|
+
y: _ - (u ? 4 : 0),
|
|
11678
11679
|
textAnchor: "middle",
|
|
11679
11680
|
dominantBaseline: "middle",
|
|
11680
11681
|
fill: "var(--text-main)",
|
|
@@ -11689,7 +11690,7 @@ function Xu({
|
|
|
11689
11690
|
"text",
|
|
11690
11691
|
{
|
|
11691
11692
|
x: k,
|
|
11692
|
-
y:
|
|
11693
|
+
y: _ + 18,
|
|
11693
11694
|
textAnchor: "middle",
|
|
11694
11695
|
fill: "var(--text-muted)",
|
|
11695
11696
|
fontSize: 11,
|
|
@@ -11773,7 +11774,7 @@ function Zu({
|
|
|
11773
11774
|
const v = n ?? Math.max(
|
|
11774
11775
|
e,
|
|
11775
11776
|
r,
|
|
11776
|
-
...(a == null ? void 0 : a.map((
|
|
11777
|
+
...(a == null ? void 0 : a.map((E) => E.value)) ?? [],
|
|
11777
11778
|
1
|
|
11778
11779
|
) * 1.05, M = [...a ?? [
|
|
11779
11780
|
{
|
|
@@ -11788,7 +11789,7 @@ function Zu({
|
|
|
11788
11789
|
value: v,
|
|
11789
11790
|
color: "color-mix(in srgb, var(--border) 28%, transparent)"
|
|
11790
11791
|
}
|
|
11791
|
-
]].sort((
|
|
11792
|
+
]].sort((E, W) => E.value - W.value), g = bt(p), j = Math.min(100, Math.max(0, e / v * 100)), $ = Math.min(100, Math.max(0, r / v * 100)), k = e >= r, _ = [0, 0.25, 0.5, 0.75, 1].map((E) => E * v), Y = /* @__PURE__ */ o("div", { className: "bonsaif-bullet-plot min-w-0 flex-1", children: [
|
|
11792
11793
|
/* @__PURE__ */ o(
|
|
11793
11794
|
"div",
|
|
11794
11795
|
{
|
|
@@ -11797,14 +11798,14 @@ function Zu({
|
|
|
11797
11798
|
role: "img",
|
|
11798
11799
|
"aria-label": y,
|
|
11799
11800
|
children: [
|
|
11800
|
-
/* @__PURE__ */ t("div", { className: "bonsaif-bullet-ranges absolute inset-0 flex overflow-hidden", children: M.map((
|
|
11801
|
-
const le = W === 0 ? 0 : M[W - 1].value, S = Math.max(0, (
|
|
11801
|
+
/* @__PURE__ */ t("div", { className: "bonsaif-bullet-ranges absolute inset-0 flex overflow-hidden", children: M.map((E, W) => {
|
|
11802
|
+
const le = W === 0 ? 0 : M[W - 1].value, S = Math.max(0, (E.value - le) / v * 100);
|
|
11802
11803
|
return /* @__PURE__ */ t(
|
|
11803
11804
|
"div",
|
|
11804
11805
|
{
|
|
11805
11806
|
style: {
|
|
11806
11807
|
width: `${S}%`,
|
|
11807
|
-
background:
|
|
11808
|
+
background: E.color ?? `color-mix(in srgb, var(--border) ${70 - W * 18}%, transparent)`
|
|
11808
11809
|
}
|
|
11809
11810
|
},
|
|
11810
11811
|
W
|
|
@@ -11820,7 +11821,7 @@ function Zu({
|
|
|
11820
11821
|
{
|
|
11821
11822
|
className: "bonsaif-bullet-value h-full",
|
|
11822
11823
|
style: {
|
|
11823
|
-
width: `${
|
|
11824
|
+
width: `${j}%`,
|
|
11824
11825
|
background: g,
|
|
11825
11826
|
borderRadius: "0 999px 999px 0",
|
|
11826
11827
|
boxShadow: `0 0 12px color-mix(in srgb, ${g} 35%, transparent)`
|
|
@@ -11834,7 +11835,7 @@ function Zu({
|
|
|
11834
11835
|
{
|
|
11835
11836
|
className: "bonsaif-bullet-target absolute top-1/2 z-[1]",
|
|
11836
11837
|
style: {
|
|
11837
|
-
left: `${
|
|
11838
|
+
left: `${$}%`,
|
|
11838
11839
|
height: "72%",
|
|
11839
11840
|
width: 3,
|
|
11840
11841
|
transform: "translate(-50%, -50%)",
|
|
@@ -11848,15 +11849,15 @@ function Zu({
|
|
|
11848
11849
|
]
|
|
11849
11850
|
}
|
|
11850
11851
|
),
|
|
11851
|
-
A ? /* @__PURE__ */ t("div", { className: "bonsaif-bullet-scale relative mt-1.5 h-4 w-full", children:
|
|
11852
|
-
const le =
|
|
11852
|
+
A ? /* @__PURE__ */ t("div", { className: "bonsaif-bullet-scale relative mt-1.5 h-4 w-full", children: _.map((E, W) => {
|
|
11853
|
+
const le = E / v * 100, S = W === 0, F = W === _.length - 1;
|
|
11853
11854
|
return /* @__PURE__ */ o(
|
|
11854
11855
|
"div",
|
|
11855
11856
|
{
|
|
11856
11857
|
className: "absolute top-0",
|
|
11857
11858
|
style: {
|
|
11858
11859
|
left: `${le}%`,
|
|
11859
|
-
transform: S ? "none" :
|
|
11860
|
+
transform: S ? "none" : F ? "translateX(-100%)" : "translateX(-50%)"
|
|
11860
11861
|
},
|
|
11861
11862
|
children: [
|
|
11862
11863
|
/* @__PURE__ */ t(
|
|
@@ -11865,8 +11866,8 @@ function Zu({
|
|
|
11865
11866
|
className: "mx-auto h-1.5 w-px",
|
|
11866
11867
|
style: {
|
|
11867
11868
|
background: "color-mix(in srgb, var(--text-muted) 55%, transparent)",
|
|
11868
|
-
marginLeft: S ? 0 :
|
|
11869
|
-
marginRight:
|
|
11869
|
+
marginLeft: S ? 0 : F ? "auto" : void 0,
|
|
11870
|
+
marginRight: F ? 0 : void 0
|
|
11870
11871
|
}
|
|
11871
11872
|
}
|
|
11872
11873
|
),
|
|
@@ -11876,14 +11877,14 @@ function Zu({
|
|
|
11876
11877
|
className: "bonsaif-bullet-scale-label mt-0.5 tabular-nums",
|
|
11877
11878
|
style: {
|
|
11878
11879
|
color: "var(--text-muted)",
|
|
11879
|
-
textAlign: S ? "left" :
|
|
11880
|
+
textAlign: S ? "left" : F ? "right" : "center"
|
|
11880
11881
|
},
|
|
11881
|
-
children: b(
|
|
11882
|
+
children: b(E)
|
|
11882
11883
|
}
|
|
11883
11884
|
)
|
|
11884
11885
|
]
|
|
11885
11886
|
},
|
|
11886
|
-
|
|
11887
|
+
E
|
|
11887
11888
|
);
|
|
11888
11889
|
}) }) : null
|
|
11889
11890
|
] });
|
|
@@ -11949,7 +11950,7 @@ function Ju({
|
|
|
11949
11950
|
label: A = "CPU",
|
|
11950
11951
|
ariaLabel: w = "Uso de CPU"
|
|
11951
11952
|
}) {
|
|
11952
|
-
var
|
|
11953
|
+
var $;
|
|
11953
11954
|
const y = i ?? [
|
|
11954
11955
|
{
|
|
11955
11956
|
key: a,
|
|
@@ -11959,10 +11960,10 @@ function Ju({
|
|
|
11959
11960
|
p
|
|
11960
11961
|
)
|
|
11961
11962
|
}
|
|
11962
|
-
], v = r ?? Wt(e, a) ?? Wt(e, ((
|
|
11963
|
+
], v = r ?? Wt(e, a) ?? Wt(e, (($ = y[0]) == null ? void 0 : $.key) ?? a), N = !u && (!e.length || v === null);
|
|
11963
11964
|
if (u) return /* @__PURE__ */ t(Je, { height: s });
|
|
11964
11965
|
if (N) return /* @__PURE__ */ t(Qe, { height: s, text: m });
|
|
11965
|
-
const M = Math.min(100, Math.max(0, v ?? 0)), g = sa(M, p),
|
|
11966
|
+
const M = Math.min(100, Math.max(0, v ?? 0)), g = sa(M, p), j = un(M, p);
|
|
11966
11967
|
return /* @__PURE__ */ o(
|
|
11967
11968
|
"div",
|
|
11968
11969
|
{
|
|
@@ -11981,15 +11982,15 @@ function Ju({
|
|
|
11981
11982
|
l === 1 ? "core" : "cores"
|
|
11982
11983
|
] }) : null
|
|
11983
11984
|
] }),
|
|
11984
|
-
/* @__PURE__ */ t("div", { className: "bonsaif-metric-value", style: { color:
|
|
11985
|
+
/* @__PURE__ */ t("div", { className: "bonsaif-metric-value", style: { color: j }, children: ur(M, M < 10 ? 1 : 0) })
|
|
11985
11986
|
] }),
|
|
11986
11987
|
/* @__PURE__ */ t(
|
|
11987
11988
|
"div",
|
|
11988
11989
|
{
|
|
11989
11990
|
className: "bonsaif-metric-badge",
|
|
11990
11991
|
style: {
|
|
11991
|
-
color:
|
|
11992
|
-
background: `color-mix(in srgb, ${
|
|
11992
|
+
color: j,
|
|
11993
|
+
background: `color-mix(in srgb, ${j} 14%, transparent)`
|
|
11993
11994
|
},
|
|
11994
11995
|
children: g === "danger" ? "Crítico" : g === "warning" ? "Alto" : "Normal"
|
|
11995
11996
|
}
|
|
@@ -12002,7 +12003,7 @@ function Ju({
|
|
|
12002
12003
|
xKey: n,
|
|
12003
12004
|
series: y.map((k) => ({
|
|
12004
12005
|
...k,
|
|
12005
|
-
color: k.color ??
|
|
12006
|
+
color: k.color ?? j
|
|
12006
12007
|
})),
|
|
12007
12008
|
height: Math.max(120, s - 56),
|
|
12008
12009
|
yDomain: [0, 100],
|
|
@@ -12038,7 +12039,7 @@ function Qu({
|
|
|
12038
12039
|
const y = r > 0 ? r : 1, v = Math.min(100, Math.max(0, e / y * 100)), N = !u && !(Number.isFinite(e) && Number.isFinite(r) && r > 0);
|
|
12039
12040
|
if (u) return /* @__PURE__ */ t(Je, { height: s });
|
|
12040
12041
|
if (N) return /* @__PURE__ */ t(Qe, { height: s, text: m });
|
|
12041
|
-
const M = sa(v, p), g = un(v, p),
|
|
12042
|
+
const M = sa(v, p), g = un(v, p), j = Math.max(0, r - e), $ = a.length > 0 ? Wt(a, l) ?? v : v, k = un($, p), _ = f && a.length > 1 ? Math.max(100, s - 110) : 0;
|
|
12042
12043
|
return /* @__PURE__ */ o(
|
|
12043
12044
|
"div",
|
|
12044
12045
|
{
|
|
@@ -12121,7 +12122,7 @@ function Qu({
|
|
|
12121
12122
|
/* @__PURE__ */ o("span", { children: [
|
|
12122
12123
|
/* @__PURE__ */ t("span", { className: "font-medium", style: { color: "var(--text-main)" }, children: "Libre" }),
|
|
12123
12124
|
" ",
|
|
12124
|
-
sr(
|
|
12125
|
+
sr(j)
|
|
12125
12126
|
] })
|
|
12126
12127
|
]
|
|
12127
12128
|
}
|
|
@@ -12139,7 +12140,7 @@ function Qu({
|
|
|
12139
12140
|
color: k
|
|
12140
12141
|
}
|
|
12141
12142
|
],
|
|
12142
|
-
height:
|
|
12143
|
+
height: _,
|
|
12143
12144
|
yDomain: [0, 100],
|
|
12144
12145
|
showLegend: !1,
|
|
12145
12146
|
showTooltip: b,
|
|
@@ -12175,10 +12176,10 @@ function em({
|
|
|
12175
12176
|
label: N = "Network",
|
|
12176
12177
|
ariaLabel: M = "Tráfico de red"
|
|
12177
12178
|
}) {
|
|
12178
|
-
const g = i ?? Wt(e, n) ?? 0,
|
|
12179
|
+
const g = i ?? Wt(e, n) ?? 0, j = l ?? Wt(e, a) ?? 0, $ = !A && e.length === 0;
|
|
12179
12180
|
if (A) return /* @__PURE__ */ t(Je, { height: b });
|
|
12180
|
-
if (
|
|
12181
|
-
const k = (
|
|
12181
|
+
if ($) return /* @__PURE__ */ t(Qe, { height: b, text: w });
|
|
12182
|
+
const k = (E) => $d(E, s), Y = Math.max(140, b - 76);
|
|
12182
12183
|
return /* @__PURE__ */ o(
|
|
12183
12184
|
"div",
|
|
12184
12185
|
{
|
|
@@ -12247,8 +12248,8 @@ function em({
|
|
|
12247
12248
|
{
|
|
12248
12249
|
className: "mt-1 truncate text-lg font-semibold tabular-nums leading-tight tracking-tight opacity-95",
|
|
12249
12250
|
style: { color: f },
|
|
12250
|
-
title: k(
|
|
12251
|
-
children: k(
|
|
12251
|
+
title: k(j),
|
|
12252
|
+
children: k(j)
|
|
12252
12253
|
}
|
|
12253
12254
|
)
|
|
12254
12255
|
] })
|