bonsaif-ui 0.1.6 → 0.1.7
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/CHANGELOG.md +5 -0
- package/dist/bonsaif-ui.js +953 -934
- package/dist/bonsaif-ui.umd.cjs +1 -1
- package/dist/components/layout/PageHeader.d.ts.map +1 -1
- package/dist/components/ui/Button.d.ts +4 -2
- package/dist/components/ui/Button.d.ts.map +1 -1
- package/dist/components/ui/ButtonChromeContext.d.ts +6 -0
- package/dist/components/ui/ButtonChromeContext.d.ts.map +1 -0
- package/dist/components/ui/DataTable.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/bonsaif-ui.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as t, jsxs as i, Fragment as we } from "react/jsx-runtime";
|
|
3
|
-
import ge, { useRef as re, useState as
|
|
4
|
-
import { HiMagnifyingGlass as
|
|
5
|
-
import { OverlayScrollbars as vt } from "overlayscrollbars";
|
|
3
|
+
import ge, { useRef as re, useState as D, useEffect as _, createContext as Qt, useLayoutEffect as er, useContext as tr, isValidElement as It, Children as rr, useMemo as ze, useCallback as st, useSyncExternalStore as nr } from "react";
|
|
4
|
+
import { HiMagnifyingGlass as Je, HiXMark as Ee, HiChevronLeft as je, HiChevronDown as _e, HiChevronRight as Te, HiCalendarDays as lt, HiExclamationTriangle as ar, HiClipboardDocument as ir, HiCheck as Pt, HiLink as or, HiChevronUp as sr, HiChevronUpDown as lr, HiLockClosed as cr, HiBars3 as dr, HiHome as Xe, HiArrowRightOnRectangle as ur, HiShieldCheck as rt, HiInbox as mr, HiListBullet as xt, HiBriefcase as fr, HiCog6Tooth as vt, HiUsers as gt, HiDocumentText as pr, HiBell as hr, HiUser as br, HiClipboardDocumentList as xr, HiBuildingOffice2 as vr, HiRectangleGroup as gr, HiTicket as yr, HiChartBar as wr } from "react-icons/hi2";
|
|
6
5
|
import { createPortal as Ke } from "react-dom";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { OverlayScrollbars as yt } from "overlayscrollbars";
|
|
7
|
+
import { MdDragIndicator as Nr } from "react-icons/md";
|
|
8
|
+
import { OverlayScrollbarsComponent as wt } from "overlayscrollbars-react";
|
|
9
|
+
import { DayPicker as kr, useDayPicker as Sr } from "react-day-picker";
|
|
10
10
|
import "react-day-picker/dist/style.css";
|
|
11
|
-
import { FiSave as
|
|
12
|
-
import { Toaster as
|
|
13
|
-
function
|
|
11
|
+
import { FiSave as Cr } from "react-icons/fi";
|
|
12
|
+
import { Toaster as $r } from "sonner";
|
|
13
|
+
function Er(...e) {
|
|
14
14
|
return e.filter(Boolean).join(" ");
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function Xn({
|
|
17
17
|
variant: e = "primary",
|
|
18
18
|
className: r,
|
|
19
19
|
type: n = "button",
|
|
@@ -23,14 +23,14 @@ function Rn({
|
|
|
23
23
|
return /* @__PURE__ */ t(
|
|
24
24
|
"button",
|
|
25
25
|
{
|
|
26
|
-
className:
|
|
26
|
+
className: Er("bonsaif-ui-button", `bonsaif-ui-button--${e}`, r),
|
|
27
27
|
type: n,
|
|
28
28
|
...s,
|
|
29
29
|
children: a
|
|
30
30
|
}
|
|
31
31
|
);
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function Mr({
|
|
34
34
|
value: e,
|
|
35
35
|
onChange: r,
|
|
36
36
|
placeholder: n,
|
|
@@ -41,25 +41,25 @@ function Nr({
|
|
|
41
41
|
size: p = "default",
|
|
42
42
|
inputTabIndex: d
|
|
43
43
|
}) {
|
|
44
|
-
const h = re(null), [N,
|
|
44
|
+
const h = re(null), [N, S] = D(!1), b = u || N || e.trim().length > 0, m = p === "sm" ? "h-9 rounded-md" : "h-11 rounded-lg";
|
|
45
45
|
_(() => {
|
|
46
46
|
var c;
|
|
47
|
-
s && (
|
|
47
|
+
s && (S(!0), (c = h.current) == null || c.focus());
|
|
48
48
|
}, [s]);
|
|
49
|
-
const
|
|
49
|
+
const v = () => {
|
|
50
50
|
var c;
|
|
51
|
-
|
|
51
|
+
S(!0), (c = h.current) == null || c.focus();
|
|
52
52
|
};
|
|
53
53
|
return /* @__PURE__ */ i(
|
|
54
54
|
"div",
|
|
55
55
|
{
|
|
56
|
-
className: `relative flex-shrink-0 overflow-visible transition-[width] duration-200 ease-out ${
|
|
56
|
+
className: `relative flex-shrink-0 overflow-visible transition-[width] duration-200 ease-out ${b ? a || "w-full" : "w-28"}`,
|
|
57
57
|
onMouseDown: (c) => {
|
|
58
|
-
|
|
58
|
+
b || (c.preventDefault(), v());
|
|
59
59
|
},
|
|
60
60
|
children: [
|
|
61
61
|
/* @__PURE__ */ t(
|
|
62
|
-
|
|
62
|
+
Je,
|
|
63
63
|
{
|
|
64
64
|
className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 pointer-events-none transition-colors duration-200",
|
|
65
65
|
style: { color: "var(--text-muted)" }
|
|
@@ -77,18 +77,18 @@ function Nr({
|
|
|
77
77
|
onKeyDown: (c) => {
|
|
78
78
|
c.key === "Escape" && (f == null || f());
|
|
79
79
|
},
|
|
80
|
-
placeholder:
|
|
81
|
-
className: `${m} w-full py-0 text-sm placeholder:text-[var(--text-muted)] focus:outline-none transition-all duration-200 ${
|
|
80
|
+
placeholder: b ? n : "Buscar",
|
|
81
|
+
className: `${m} w-full py-0 text-sm placeholder:text-[var(--text-muted)] focus:outline-none transition-all duration-200 ${b ? "pl-9 pr-9" : "cursor-pointer pl-9 pr-3"}`,
|
|
82
82
|
style: {
|
|
83
83
|
background: "var(--bg-card)",
|
|
84
84
|
border: "1px solid var(--border)",
|
|
85
85
|
color: "var(--text-main)"
|
|
86
86
|
},
|
|
87
87
|
onFocus: (c) => {
|
|
88
|
-
|
|
88
|
+
S(!0), c.currentTarget.style.borderColor = "var(--primary)", c.currentTarget.style.boxShadow = "0 0 0 3px rgba(59,130,246,0.12)";
|
|
89
89
|
},
|
|
90
90
|
onBlur: (c) => {
|
|
91
|
-
|
|
91
|
+
S(!1), c.currentTarget.style.borderColor = "var(--border)", c.currentTarget.style.boxShadow = "none";
|
|
92
92
|
}
|
|
93
93
|
}
|
|
94
94
|
),
|
|
@@ -107,70 +107,187 @@ function Nr({
|
|
|
107
107
|
}
|
|
108
108
|
);
|
|
109
109
|
}
|
|
110
|
-
|
|
110
|
+
const zt = Qt({});
|
|
111
|
+
function Or(e) {
|
|
112
|
+
var a;
|
|
113
|
+
const r = Array.from(
|
|
114
|
+
e.querySelectorAll("*")
|
|
115
|
+
).filter(
|
|
116
|
+
(s) => {
|
|
117
|
+
var u;
|
|
118
|
+
return s.scrollWidth > s.clientWidth && !!((u = s.textContent) != null && u.trim()) && s.tagName.toLowerCase() !== "svg" && !s.closest("svg");
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
return (e.scrollWidth > e.clientWidth || r.length > 0) && (((a = r[0]) == null ? void 0 : a.textContent) ?? e.textContent ?? "").trim() || null;
|
|
122
|
+
}
|
|
123
|
+
function ut({
|
|
124
|
+
children: e,
|
|
125
|
+
content: r,
|
|
126
|
+
onlyWhenOverflow: n = !1,
|
|
127
|
+
className: a = "",
|
|
128
|
+
style: s,
|
|
129
|
+
as: u = "div"
|
|
130
|
+
}) {
|
|
131
|
+
const f = re(null), p = re(null), [d, h] = D(null), [N, S] = D("");
|
|
132
|
+
_(() => {
|
|
133
|
+
const v = f.current;
|
|
134
|
+
v && (v.querySelectorAll("[title]").forEach((c) => {
|
|
135
|
+
const y = c.getAttribute("title");
|
|
136
|
+
y && (c.getAttribute("aria-label") || c.setAttribute("aria-label", y), c.removeAttribute("title"));
|
|
137
|
+
}), v.querySelectorAll("svg title").forEach((c) => c.remove()));
|
|
138
|
+
}), er(() => {
|
|
139
|
+
if (!d) return;
|
|
140
|
+
const v = p.current;
|
|
141
|
+
if (!v) return;
|
|
142
|
+
const c = 12, y = 14, B = v.getBoundingClientRect(), R = window.innerWidth - B.width - c, A = window.innerHeight - B.height - c;
|
|
143
|
+
let C = d.mouseX + y, L = d.mouseY + y;
|
|
144
|
+
C > R && (C = d.mouseX - B.width - y), L > A && (L = d.mouseY - B.height - y), C = Math.min(Math.max(c, C), Math.max(c, R)), L = Math.min(Math.max(c, L), Math.max(c, A)), (Math.abs(C - d.x) > 0.5 || Math.abs(L - d.y) > 0.5) && h(
|
|
145
|
+
(M) => M && {
|
|
146
|
+
...M,
|
|
147
|
+
x: C,
|
|
148
|
+
y: L
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
}, [d]);
|
|
152
|
+
const b = (v, c) => {
|
|
153
|
+
const y = f.current;
|
|
154
|
+
if (y) {
|
|
155
|
+
if (n) {
|
|
156
|
+
const B = Or(y);
|
|
157
|
+
if (!B) return;
|
|
158
|
+
S(B);
|
|
159
|
+
}
|
|
160
|
+
!n && !r || h({ mouseX: v, mouseY: c, x: v + 14, y: c + 14 });
|
|
161
|
+
}
|
|
162
|
+
}, m = n ? N : r;
|
|
163
|
+
return /* @__PURE__ */ i(we, { children: [
|
|
164
|
+
/* @__PURE__ */ t(
|
|
165
|
+
u,
|
|
166
|
+
{
|
|
167
|
+
ref: (v) => {
|
|
168
|
+
f.current = v;
|
|
169
|
+
},
|
|
170
|
+
className: a,
|
|
171
|
+
style: s,
|
|
172
|
+
onMouseEnter: (v) => b(v.clientX, v.clientY),
|
|
173
|
+
onMouseMove: (v) => {
|
|
174
|
+
d && b(v.clientX, v.clientY);
|
|
175
|
+
},
|
|
176
|
+
onMouseLeave: () => h(null),
|
|
177
|
+
children: e
|
|
178
|
+
}
|
|
179
|
+
),
|
|
180
|
+
d && m ? Ke(
|
|
181
|
+
/* @__PURE__ */ t(
|
|
182
|
+
"div",
|
|
183
|
+
{
|
|
184
|
+
ref: p,
|
|
185
|
+
role: "tooltip",
|
|
186
|
+
style: {
|
|
187
|
+
position: "fixed",
|
|
188
|
+
top: d.y,
|
|
189
|
+
left: d.x,
|
|
190
|
+
zIndex: 9999,
|
|
191
|
+
background: "var(--bg-card)",
|
|
192
|
+
border: "1px solid var(--border)",
|
|
193
|
+
borderRadius: 6,
|
|
194
|
+
padding: "5px 10px",
|
|
195
|
+
fontSize: 12,
|
|
196
|
+
color: "var(--text-main)",
|
|
197
|
+
boxShadow: "0 4px 16px rgba(0,0,0,0.35)",
|
|
198
|
+
pointerEvents: "none",
|
|
199
|
+
maxWidth: "min(420px, calc(100vw - 24px))",
|
|
200
|
+
whiteSpace: "normal",
|
|
201
|
+
lineHeight: 1.6,
|
|
202
|
+
overflowWrap: "anywhere"
|
|
203
|
+
},
|
|
204
|
+
children: m
|
|
205
|
+
}
|
|
206
|
+
),
|
|
207
|
+
document.body
|
|
208
|
+
) : null
|
|
209
|
+
] });
|
|
210
|
+
}
|
|
211
|
+
function Nt(e) {
|
|
111
212
|
if (e !== void 0)
|
|
112
213
|
return typeof e == "number" ? `${e}px` : e;
|
|
113
214
|
}
|
|
114
|
-
const
|
|
215
|
+
const Br = "inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap leading-none font-medium transition-all duration-150 focus:outline-none disabled:opacity-50 rounded-lg", Tr = {
|
|
115
216
|
primary: "border border-[var(--border)] text-[var(--text-main)] hover:border-[var(--border)] hover:bg-[var(--bg-input)] active:scale-[0.98] transition-colors",
|
|
116
217
|
secondary: "border border-[var(--border)] text-[var(--text-main)] hover:border-[var(--border)] hover:bg-[var(--bg-input)] active:scale-[0.98] transition-colors",
|
|
117
218
|
danger: "border border-[var(--border)] text-[var(--danger)] hover:border-[var(--danger)] hover:bg-[var(--danger-bg)] active:scale-[0.98] transition-colors",
|
|
118
219
|
ghost: "text-[var(--text-secondary)] hover:opacity-70",
|
|
119
|
-
icon: "
|
|
120
|
-
},
|
|
220
|
+
icon: "text-[var(--text-muted)] hover:text-[var(--primary)] hover:bg-primary/5"
|
|
221
|
+
}, Lr = {
|
|
222
|
+
xs: "h-8 px-2.5 text-xs",
|
|
121
223
|
sm: "h-9 px-3.5 text-xs",
|
|
122
224
|
md: "h-11 px-4 text-sm",
|
|
123
225
|
lg: "h-12 px-5 text-sm font-semibold"
|
|
124
|
-
},
|
|
226
|
+
}, Dr = {
|
|
227
|
+
xs: "h-8 w-8",
|
|
228
|
+
sm: "h-9 w-9",
|
|
229
|
+
md: "h-10 w-10",
|
|
230
|
+
lg: "h-11 w-11"
|
|
231
|
+
}, Ar = {
|
|
125
232
|
primary: { background: "var(--bg-card)" },
|
|
126
233
|
secondary: { background: "var(--bg-card)" },
|
|
127
234
|
danger: { background: "var(--bg-card)" },
|
|
128
235
|
ghost: {},
|
|
129
236
|
icon: {}
|
|
130
237
|
};
|
|
238
|
+
function ct(e) {
|
|
239
|
+
return typeof e == "string" || typeof e == "number" ? String(e) : Array.isArray(e) ? e.map(ct).join(" ").trim() : It(e) ? ct(e.props.children) : "";
|
|
240
|
+
}
|
|
241
|
+
function Ir(e) {
|
|
242
|
+
return rr.toArray(e).find(It) ?? null;
|
|
243
|
+
}
|
|
131
244
|
function xe({
|
|
132
245
|
variant: e = "primary",
|
|
133
246
|
size: r = "md",
|
|
134
247
|
loading: n = !1,
|
|
135
248
|
icon: a,
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
249
|
+
tooltip: s,
|
|
250
|
+
iconOnly: u,
|
|
251
|
+
height: f,
|
|
252
|
+
padding: p,
|
|
253
|
+
children: d,
|
|
254
|
+
className: h = "",
|
|
255
|
+
disabled: N,
|
|
256
|
+
style: S,
|
|
257
|
+
...b
|
|
143
258
|
}) {
|
|
144
|
-
const
|
|
145
|
-
return /* @__PURE__ */ i(
|
|
259
|
+
const m = tr(zt), v = u ?? m.iconOnly ?? e === "icon", c = m.compact ?? !1, y = c && r === "md" ? "xs" : r, B = e === "icon" || v, R = ct(d), A = s ?? b.title ?? b["aria-label"] ?? (v ? R : void 0), C = A ? void 0 : b.title, L = b["aria-label"] ?? (typeof A == "string" ? A : R || void 0), M = n ? null : a ?? (v ? Ir(d) : null), $ = /* @__PURE__ */ i(
|
|
146
260
|
"button",
|
|
147
261
|
{
|
|
148
|
-
...
|
|
262
|
+
...b,
|
|
263
|
+
title: C,
|
|
264
|
+
"aria-label": L,
|
|
149
265
|
"data-variant": e,
|
|
150
|
-
"data-size":
|
|
151
|
-
"data-icon":
|
|
152
|
-
disabled:
|
|
153
|
-
className: `${
|
|
266
|
+
"data-size": y,
|
|
267
|
+
"data-icon": B ? "true" : void 0,
|
|
268
|
+
disabled: N || n,
|
|
269
|
+
className: `${Br} ${Tr[e]} ${B ? Dr[y] : Lr[y]} ${c && !B ? "px-2.5" : ""} ${h}`,
|
|
154
270
|
style: {
|
|
155
|
-
|
|
156
|
-
height:
|
|
157
|
-
padding:
|
|
158
|
-
...
|
|
271
|
+
...Ar[e],
|
|
272
|
+
height: Nt(f),
|
|
273
|
+
padding: Nt(p),
|
|
274
|
+
...S
|
|
159
275
|
},
|
|
160
276
|
children: [
|
|
161
|
-
n ? /* @__PURE__ */ t("span", { className: "h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent" }) :
|
|
162
|
-
|
|
277
|
+
n ? /* @__PURE__ */ t("span", { className: "h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent" }) : M,
|
|
278
|
+
!v && d
|
|
163
279
|
]
|
|
164
280
|
}
|
|
165
281
|
);
|
|
282
|
+
return A ? /* @__PURE__ */ t(ut, { as: "span", content: A, className: "inline-flex shrink-0", children: $ }) : $;
|
|
166
283
|
}
|
|
167
|
-
function
|
|
284
|
+
function Pr({
|
|
168
285
|
variant: e = "page",
|
|
169
286
|
title: r = "Cargando...",
|
|
170
287
|
rows: n = 6,
|
|
171
288
|
children: a
|
|
172
289
|
}) {
|
|
173
|
-
return e === "table" ? /* @__PURE__ */ t(
|
|
290
|
+
return e === "table" ? /* @__PURE__ */ t(jt, { rows: n }) : e === "sections" ? /* @__PURE__ */ t(zr, { rows: n }) : e === "cards" ? /* @__PURE__ */ t(jr, { rows: n }) : /* @__PURE__ */ t("div", { className: "flex min-h-[240px] items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-card)] p-6", children: /* @__PURE__ */ i("div", { className: "flex flex-col items-center gap-3 text-center", children: [
|
|
174
291
|
/* @__PURE__ */ t("div", { className: "h-9 w-9 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--primary)]" }),
|
|
175
292
|
/* @__PURE__ */ i("div", { children: [
|
|
176
293
|
/* @__PURE__ */ t("p", { className: "text-sm font-semibold text-[var(--text-main)]", children: r }),
|
|
@@ -178,7 +295,7 @@ function Er({
|
|
|
178
295
|
] })
|
|
179
296
|
] }) });
|
|
180
297
|
}
|
|
181
|
-
function
|
|
298
|
+
function zr({ rows: e }) {
|
|
182
299
|
return /* @__PURE__ */ t("div", { className: "space-y-4", children: Array.from({ length: Math.max(2, Math.min(e, 4)) }).map(
|
|
183
300
|
(r, n) => /* @__PURE__ */ i(
|
|
184
301
|
"section",
|
|
@@ -197,7 +314,7 @@ function Mr({ rows: e }) {
|
|
|
197
314
|
] })
|
|
198
315
|
] }),
|
|
199
316
|
/* @__PURE__ */ t(
|
|
200
|
-
|
|
317
|
+
jt,
|
|
201
318
|
{
|
|
202
319
|
rows: n === 0 ? e : Math.max(3, e - 2),
|
|
203
320
|
compact: !0
|
|
@@ -209,7 +326,7 @@ function Mr({ rows: e }) {
|
|
|
209
326
|
)
|
|
210
327
|
) });
|
|
211
328
|
}
|
|
212
|
-
function
|
|
329
|
+
function jr({ rows: e }) {
|
|
213
330
|
return /* @__PURE__ */ t("div", { className: "grid gap-3 md:grid-cols-2 xl:grid-cols-3", children: Array.from({ length: e }).map((r, n) => /* @__PURE__ */ i(
|
|
214
331
|
"div",
|
|
215
332
|
{
|
|
@@ -223,7 +340,7 @@ function Br({ rows: e }) {
|
|
|
223
340
|
n
|
|
224
341
|
)) });
|
|
225
342
|
}
|
|
226
|
-
function
|
|
343
|
+
function jt({
|
|
227
344
|
rows: e,
|
|
228
345
|
compact: r = !1
|
|
229
346
|
}) {
|
|
@@ -256,32 +373,32 @@ function At({
|
|
|
256
373
|
))
|
|
257
374
|
] });
|
|
258
375
|
}
|
|
259
|
-
function
|
|
376
|
+
function _t(e) {
|
|
260
377
|
const r = e.split("/").filter(Boolean);
|
|
261
378
|
return (r[r.length - 1] ?? e).replace(/^lv_/, "").split(/[-_]/).filter(Boolean).map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join(" ");
|
|
262
379
|
}
|
|
263
|
-
function
|
|
380
|
+
function kt(e) {
|
|
264
381
|
return e.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim();
|
|
265
382
|
}
|
|
266
|
-
function
|
|
383
|
+
function _r(e) {
|
|
267
384
|
return [
|
|
268
385
|
e.label,
|
|
269
|
-
|
|
386
|
+
_t(e.service),
|
|
270
387
|
e.description,
|
|
271
388
|
e.service
|
|
272
389
|
].filter(Boolean).join(" ");
|
|
273
390
|
}
|
|
274
|
-
function
|
|
391
|
+
function Rr(e) {
|
|
275
392
|
return typeof e == "function" ? e : e.default;
|
|
276
393
|
}
|
|
277
|
-
function
|
|
394
|
+
function Hr(e, r) {
|
|
278
395
|
return /* @__PURE__ */ t("div", { className: "flex min-h-[220px] items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-card)] p-6 text-center", children: /* @__PURE__ */ i("div", { className: "max-w-md", children: [
|
|
279
396
|
/* @__PURE__ */ t("p", { className: "text-sm font-semibold text-[var(--text-main)]", children: "No se pudo cargar este modulo" }),
|
|
280
397
|
/* @__PURE__ */ t("p", { className: "mt-1 text-xs text-[var(--text-muted)]", children: e.message }),
|
|
281
398
|
/* @__PURE__ */ t(xe, { className: "mt-4", height: 36, padding: "0 14px", onClick: r, children: "Reintentar" })
|
|
282
399
|
] }) });
|
|
283
400
|
}
|
|
284
|
-
function
|
|
401
|
+
function Vn({
|
|
285
402
|
parentPanel: e,
|
|
286
403
|
parentPanelComponent: r,
|
|
287
404
|
renderParentPanel: n,
|
|
@@ -293,66 +410,66 @@ function Hn({
|
|
|
293
410
|
activeService: d,
|
|
294
411
|
initialService: h,
|
|
295
412
|
onActiveServiceChange: N,
|
|
296
|
-
canAccess:
|
|
297
|
-
keepAlive:
|
|
413
|
+
canAccess: S,
|
|
414
|
+
keepAlive: b = !0,
|
|
298
415
|
title: m,
|
|
299
|
-
subtitle:
|
|
416
|
+
subtitle: v,
|
|
300
417
|
emptyState: c,
|
|
301
418
|
loadingState: y,
|
|
302
|
-
errorState:
|
|
303
|
-
renderTabLabel:
|
|
304
|
-
searchableTabs:
|
|
305
|
-
tabsSearchThreshold:
|
|
306
|
-
tabsSearchPlaceholder:
|
|
307
|
-
tabsSearchValue:
|
|
308
|
-
onTabsSearchChange:
|
|
309
|
-
emptySearchState:
|
|
310
|
-
showTabCount:
|
|
311
|
-
className:
|
|
419
|
+
errorState: B = Hr,
|
|
420
|
+
renderTabLabel: R,
|
|
421
|
+
searchableTabs: A = "auto",
|
|
422
|
+
tabsSearchThreshold: C = 6,
|
|
423
|
+
tabsSearchPlaceholder: L = "Buscar modulo...",
|
|
424
|
+
tabsSearchValue: M,
|
|
425
|
+
onTabsSearchChange: $,
|
|
426
|
+
emptySearchState: H,
|
|
427
|
+
showTabCount: O = !0,
|
|
428
|
+
className: T = "",
|
|
312
429
|
parentClassName: P = "",
|
|
313
|
-
contentClassName:
|
|
314
|
-
tabsClassName:
|
|
430
|
+
contentClassName: J = "",
|
|
431
|
+
tabsClassName: W = ""
|
|
315
432
|
}) {
|
|
316
433
|
var ve;
|
|
317
434
|
const F = ze(
|
|
318
435
|
() => u.filter(
|
|
319
|
-
(
|
|
436
|
+
(x) => !x.hidden && ((S == null ? void 0 : S(x, s)) ?? !0)
|
|
320
437
|
),
|
|
321
|
-
[
|
|
438
|
+
[S, s, u]
|
|
322
439
|
), V = (ve = F.find(
|
|
323
|
-
(
|
|
324
|
-
)) == null ? void 0 : ve.service, [Q, o] =
|
|
440
|
+
(x) => !x.disabled
|
|
441
|
+
)) == null ? void 0 : ve.service, [Q, o] = D(
|
|
325
442
|
h ?? V ?? ""
|
|
326
|
-
), [w, U] =
|
|
327
|
-
(
|
|
328
|
-
) : F, [
|
|
443
|
+
), [w, U] = D({}), [Y, X] = D({}), [te, ce] = D(""), [ne, Ne] = D(!1), pe = re(Y), he = re(0), de = M ?? te, k = kt(de), j = A === !0 || A === "auto" && F.length >= C, q = j && de.trim().length > 0, ae = ze(() => k ? F.filter(
|
|
444
|
+
(x) => kt(_r(x)).includes(k)
|
|
445
|
+
) : F, [k, F]), oe = d ?? Q, z = F.find((x) => x.service === oe) ?? F.find((x) => !x.disabled);
|
|
329
446
|
_(() => {
|
|
330
|
-
!
|
|
331
|
-
}, [V,
|
|
447
|
+
!z && V && o(V);
|
|
448
|
+
}, [V, z]), _(() => {
|
|
332
449
|
pe.current = Y;
|
|
333
450
|
}, [Y]);
|
|
334
|
-
const ke = (
|
|
335
|
-
|
|
336
|
-
}, Re = (
|
|
337
|
-
|
|
338
|
-
}, Qe = (
|
|
339
|
-
const
|
|
451
|
+
const ke = (x) => {
|
|
452
|
+
x.disabled || (d || o(x.service), N == null || N(x.service, x));
|
|
453
|
+
}, Re = (x) => {
|
|
454
|
+
M === void 0 && ce(x), $ == null || $(x);
|
|
455
|
+
}, Qe = (x, ee) => {
|
|
456
|
+
const Z = ae.filter((le) => !le.disabled), ye = Z.findIndex(
|
|
340
457
|
(le) => le.service === ee.service
|
|
341
458
|
);
|
|
342
|
-
ye < 0 || ((
|
|
343
|
-
|
|
344
|
-
)),
|
|
459
|
+
ye < 0 || ((x.key === "ArrowRight" || x.key === "ArrowDown") && (x.preventDefault(), ke(Z[(ye + 1) % Z.length])), (x.key === "ArrowLeft" || x.key === "ArrowUp") && (x.preventDefault(), ke(
|
|
460
|
+
Z[(ye - 1 + Z.length) % Z.length]
|
|
461
|
+
)), x.key === "Home" && (x.preventDefault(), ke(Z[0])), x.key === "End" && (x.preventDefault(), ke(Z[Z.length - 1])));
|
|
345
462
|
}, me = st(() => {
|
|
346
|
-
if (!
|
|
347
|
-
const
|
|
348
|
-
if (ee != null && ee.loading || ee != null && ee.component &&
|
|
349
|
-
const
|
|
350
|
-
if (!
|
|
463
|
+
if (!z) return;
|
|
464
|
+
const x = z.service, ee = pe.current[x];
|
|
465
|
+
if (ee != null && ee.loading || ee != null && ee.component && b) return;
|
|
466
|
+
const Z = (f == null ? void 0 : f[x]) ?? p;
|
|
467
|
+
if (!Z) {
|
|
351
468
|
X((le) => ({
|
|
352
469
|
...le,
|
|
353
|
-
[
|
|
470
|
+
[x]: {
|
|
354
471
|
loading: !1,
|
|
355
|
-
error: new Error(`No module loader found for service "${
|
|
472
|
+
error: new Error(`No module loader found for service "${x}".`)
|
|
356
473
|
}
|
|
357
474
|
}));
|
|
358
475
|
return;
|
|
@@ -360,32 +477,32 @@ function Hn({
|
|
|
360
477
|
const ye = ++he.current;
|
|
361
478
|
X((le) => ({
|
|
362
479
|
...le,
|
|
363
|
-
[
|
|
364
|
-
})),
|
|
365
|
-
if (ye !== he.current && !
|
|
366
|
-
const De =
|
|
480
|
+
[x]: { ...le[x], loading: !0, error: void 0 }
|
|
481
|
+
})), Z(z, s).then((le) => {
|
|
482
|
+
if (ye !== he.current && !b) return;
|
|
483
|
+
const De = Rr(le);
|
|
367
484
|
X((Ce) => ({
|
|
368
485
|
...Ce,
|
|
369
|
-
[
|
|
486
|
+
[x]: { component: De, loading: !1 }
|
|
370
487
|
}));
|
|
371
488
|
}).catch((le) => {
|
|
372
489
|
const De = le instanceof Error ? le : new Error(String(le));
|
|
373
490
|
X((Ce) => ({
|
|
374
491
|
...Ce,
|
|
375
|
-
[
|
|
492
|
+
[x]: { ...Ce[x], loading: !1, error: De }
|
|
376
493
|
}));
|
|
377
494
|
});
|
|
378
|
-
}, [s,
|
|
495
|
+
}, [s, b, p, f, z]);
|
|
379
496
|
_(me, [me]);
|
|
380
|
-
const He =
|
|
381
|
-
|
|
497
|
+
const He = z ? w[z.service] ?? null : null, ie = z ? Y[z.service] : void 0, We = ie == null ? void 0 : ie.component, Be = (x) => {
|
|
498
|
+
z && U((ee) => ({
|
|
382
499
|
...ee,
|
|
383
|
-
[
|
|
500
|
+
[z.service]: x
|
|
384
501
|
}));
|
|
385
502
|
}, Le = () => {
|
|
386
|
-
|
|
387
|
-
...
|
|
388
|
-
[
|
|
503
|
+
z && U((x) => ({
|
|
504
|
+
...x,
|
|
505
|
+
[z.service]: null
|
|
389
506
|
}));
|
|
390
507
|
}, Fe = {
|
|
391
508
|
context: s,
|
|
@@ -393,18 +510,18 @@ function Hn({
|
|
|
393
510
|
links: u,
|
|
394
511
|
visibleLinks: F,
|
|
395
512
|
filteredLinks: ae,
|
|
396
|
-
selectedLink:
|
|
397
|
-
selectedService:
|
|
513
|
+
selectedLink: z,
|
|
514
|
+
selectedService: z == null ? void 0 : z.service,
|
|
398
515
|
activeItemId: He,
|
|
399
516
|
tabsSearch: de,
|
|
400
517
|
onSelectService: ke,
|
|
401
|
-
onOpenDetail:
|
|
518
|
+
onOpenDetail: Be,
|
|
402
519
|
onBackToList: Le
|
|
403
520
|
}, Se = n ? n(Fe) : r ? /* @__PURE__ */ t(r, { ...Fe }) : e;
|
|
404
521
|
return /* @__PURE__ */ i(
|
|
405
522
|
"section",
|
|
406
523
|
{
|
|
407
|
-
className: `grid min-h-[520px] gap-4 lg:grid-cols-[minmax(260px,360px)_minmax(0,1fr)] ${
|
|
524
|
+
className: `grid min-h-[520px] gap-4 lg:grid-cols-[minmax(260px,360px)_minmax(0,1fr)] ${T}`,
|
|
408
525
|
children: [
|
|
409
526
|
/* @__PURE__ */ t(
|
|
410
527
|
"aside",
|
|
@@ -416,15 +533,15 @@ function Hn({
|
|
|
416
533
|
/* @__PURE__ */ i(
|
|
417
534
|
"div",
|
|
418
535
|
{
|
|
419
|
-
className: `relative min-w-0 overflow-visible rounded-lg border border-[var(--border)] bg-[var(--bg-card)] ${
|
|
536
|
+
className: `relative min-w-0 overflow-visible rounded-lg border border-[var(--border)] bg-[var(--bg-card)] ${J}`,
|
|
420
537
|
children: [
|
|
421
|
-
(m ||
|
|
538
|
+
(m || v || j || O) && /* @__PURE__ */ t("div", { className: "relative border-b border-[var(--border)] px-4 py-3", children: /* @__PURE__ */ i("div", { className: "flex min-w-0 items-start justify-between gap-3", children: [
|
|
422
539
|
/* @__PURE__ */ i("div", { className: "min-w-0", children: [
|
|
423
540
|
m && /* @__PURE__ */ t("h2", { className: "truncate text-sm font-semibold text-[var(--text-main)]", children: m }),
|
|
424
|
-
|
|
541
|
+
v && /* @__PURE__ */ t("p", { className: "mt-1 line-clamp-2 text-xs text-[var(--text-muted)]", children: v })
|
|
425
542
|
] }),
|
|
426
|
-
(j ||
|
|
427
|
-
|
|
543
|
+
(j || O) && /* @__PURE__ */ i("div", { className: "flex min-w-0 flex-shrink-0 items-center justify-end gap-2", children: [
|
|
544
|
+
O && /* @__PURE__ */ i("span", { className: "hidden text-xs font-semibold text-[var(--text-muted)] transition-opacity duration-200 sm:inline", children: [
|
|
428
545
|
ae.length,
|
|
429
546
|
" / ",
|
|
430
547
|
F.length
|
|
@@ -436,11 +553,11 @@ function Hn({
|
|
|
436
553
|
className: `origin-right overflow-hidden transition-[width,opacity,transform] duration-200 ease-out ${ne ? "w-[min(20rem,44vw)] translate-x-0 opacity-100" : "w-0 translate-x-2 opacity-0"}`,
|
|
437
554
|
"aria-hidden": !ne,
|
|
438
555
|
children: /* @__PURE__ */ t(
|
|
439
|
-
|
|
556
|
+
Mr,
|
|
440
557
|
{
|
|
441
558
|
value: de,
|
|
442
559
|
onChange: Re,
|
|
443
|
-
placeholder:
|
|
560
|
+
placeholder: L,
|
|
444
561
|
className: "w-full",
|
|
445
562
|
autoFocus: ne,
|
|
446
563
|
forceExpanded: !0,
|
|
@@ -458,10 +575,10 @@ function Hn({
|
|
|
458
575
|
"aria-label": ne ? "Cerrar busqueda" : "Buscar tabs",
|
|
459
576
|
"aria-expanded": ne,
|
|
460
577
|
onClick: () => {
|
|
461
|
-
ne && de && Re(""), Ne((
|
|
578
|
+
ne && de && Re(""), Ne((x) => !x);
|
|
462
579
|
},
|
|
463
580
|
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 ${ne || q ? "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)]"}`,
|
|
464
|
-
children: /* @__PURE__ */ t("span", { className: "grid h-4 w-4 place-items-center transition-transform duration-200", children: ne || q ? /* @__PURE__ */ t(Ee, { className: "h-4 w-4" }) : /* @__PURE__ */ t(
|
|
581
|
+
children: /* @__PURE__ */ t("span", { className: "grid h-4 w-4 place-items-center transition-transform duration-200", children: ne || q ? /* @__PURE__ */ t(Ee, { className: "h-4 w-4" }) : /* @__PURE__ */ t(Je, { className: "h-4 w-4" }) })
|
|
465
582
|
}
|
|
466
583
|
)
|
|
467
584
|
] })
|
|
@@ -472,43 +589,43 @@ function Hn({
|
|
|
472
589
|
{
|
|
473
590
|
role: "tablist",
|
|
474
591
|
"aria-label": m ?? "Modulos relacionados",
|
|
475
|
-
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 ${
|
|
476
|
-
children: ae.length > 0 ? ae.map((
|
|
477
|
-
const ee =
|
|
592
|
+
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 ${W}`,
|
|
593
|
+
children: ae.length > 0 ? ae.map((x) => {
|
|
594
|
+
const ee = x.service === (z == null ? void 0 : z.service);
|
|
478
595
|
return /* @__PURE__ */ t(
|
|
479
596
|
"button",
|
|
480
597
|
{
|
|
481
598
|
type: "button",
|
|
482
599
|
role: "tab",
|
|
483
600
|
"aria-selected": ee,
|
|
484
|
-
disabled:
|
|
485
|
-
onClick: () => ke(
|
|
486
|
-
onKeyDown: (
|
|
601
|
+
disabled: x.disabled,
|
|
602
|
+
onClick: () => ke(x),
|
|
603
|
+
onKeyDown: (Z) => Qe(Z, x),
|
|
487
604
|
className: `inline-flex h-9 min-w-max items-center gap-2 rounded-md border px-3 text-xs font-semibold transition-all duration-200 disabled:cursor-not-allowed disabled:opacity-50 ${ee ? "border-[var(--primary)] bg-[var(--bg-card)] text-[var(--text-main)] shadow-sm" : "border-transparent text-[var(--text-muted)] hover:bg-[var(--bg-card)] hover:text-[var(--text-main)]"}`,
|
|
488
|
-
children:
|
|
489
|
-
|
|
490
|
-
/* @__PURE__ */ t("span", { children:
|
|
491
|
-
|
|
605
|
+
children: R ? R(x, ee) : /* @__PURE__ */ i(we, { children: [
|
|
606
|
+
x.icon,
|
|
607
|
+
/* @__PURE__ */ t("span", { children: x.label ?? _t(x.service) }),
|
|
608
|
+
x.badge && /* @__PURE__ */ t("span", { className: "rounded-full bg-[var(--bg-input)] px-1.5 py-0.5 text-[10px] text-[var(--text-muted)]", children: x.badge })
|
|
492
609
|
] })
|
|
493
610
|
},
|
|
494
|
-
|
|
611
|
+
x.service
|
|
495
612
|
);
|
|
496
|
-
}) : /* @__PURE__ */ t("div", { className: "flex min-h-9 flex-1 items-center rounded-md border border-dashed border-[var(--border)] px-3 text-xs text-[var(--text-muted)]", children:
|
|
613
|
+
}) : /* @__PURE__ */ t("div", { className: "flex min-h-9 flex-1 items-center rounded-md border border-dashed border-[var(--border)] px-3 text-xs text-[var(--text-muted)]", children: H ?? "No hay modulos que coincidan con la busqueda." })
|
|
497
614
|
}
|
|
498
615
|
),
|
|
499
|
-
(
|
|
616
|
+
(z == null ? void 0 : z.description) && /* @__PURE__ */ t("div", { className: "border-b border-[var(--border)] px-4 py-2 text-xs text-[var(--text-muted)]", children: z.description }),
|
|
500
617
|
/* @__PURE__ */ i("div", { className: "min-h-[420px] p-4", children: [
|
|
501
|
-
!
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
618
|
+
!z && (c ?? /* @__PURE__ */ t("div", { className: "flex min-h-[220px] items-center justify-center rounded-lg border border-dashed border-[var(--border)] text-sm text-[var(--text-muted)]", children: "No hay modulos disponibles." })),
|
|
619
|
+
z && (ie == null ? void 0 : ie.loading) && (y ?? /* @__PURE__ */ t(Pr, { title: "Cargando modulo..." })),
|
|
620
|
+
z && (ie == null ? void 0 : ie.error) && B(ie.error, me),
|
|
621
|
+
z && We && !(ie != null && ie.loading) && !(ie != null && ie.error) && /* @__PURE__ */ t(
|
|
505
622
|
We,
|
|
506
623
|
{
|
|
507
624
|
context: s,
|
|
508
625
|
parent: a,
|
|
509
|
-
link:
|
|
626
|
+
link: z,
|
|
510
627
|
activeItemId: He,
|
|
511
|
-
onOpenDetail:
|
|
628
|
+
onOpenDetail: Be,
|
|
512
629
|
onBackToList: Le
|
|
513
630
|
}
|
|
514
631
|
)
|
|
@@ -520,7 +637,7 @@ function Hn({
|
|
|
520
637
|
}
|
|
521
638
|
);
|
|
522
639
|
}
|
|
523
|
-
const
|
|
640
|
+
const Rt = [
|
|
524
641
|
"Enero",
|
|
525
642
|
"Febrero",
|
|
526
643
|
"Marzo",
|
|
@@ -533,7 +650,7 @@ const It = [
|
|
|
533
650
|
"Octubre",
|
|
534
651
|
"Noviembre",
|
|
535
652
|
"Diciembre"
|
|
536
|
-
],
|
|
653
|
+
], Wr = [
|
|
537
654
|
"Ene",
|
|
538
655
|
"Feb",
|
|
539
656
|
"Mar",
|
|
@@ -546,37 +663,37 @@ const It = [
|
|
|
546
663
|
"Oct",
|
|
547
664
|
"Nov",
|
|
548
665
|
"Dic"
|
|
549
|
-
],
|
|
550
|
-
function
|
|
666
|
+
], Fr = ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sá"], nt = 6;
|
|
667
|
+
function dt(e, r, n) {
|
|
551
668
|
return `${e}-${String(r).padStart(2, "0")}-${String(n).padStart(2, "0")}`;
|
|
552
669
|
}
|
|
553
|
-
function
|
|
670
|
+
function Ur() {
|
|
554
671
|
const e = /* @__PURE__ */ new Date();
|
|
555
|
-
return
|
|
672
|
+
return dt(e.getFullYear(), e.getMonth() + 1, e.getDate());
|
|
556
673
|
}
|
|
557
|
-
function
|
|
674
|
+
function Ht(e) {
|
|
558
675
|
const [r, n, a] = e.split("-").map(Number);
|
|
559
676
|
return { year: r, month: n, day: a };
|
|
560
677
|
}
|
|
561
|
-
function
|
|
678
|
+
function Yr(e) {
|
|
562
679
|
if (!e) return "Seleccionar fecha";
|
|
563
|
-
const { year: r, month: n, day: a } =
|
|
564
|
-
return !r || !n || !a ? "Seleccionar fecha" : `${String(a).padStart(2, "0")} ${
|
|
680
|
+
const { year: r, month: n, day: a } = Ht(e);
|
|
681
|
+
return !r || !n || !a ? "Seleccionar fecha" : `${String(a).padStart(2, "0")} ${Rt[n - 1]} ${r}`;
|
|
565
682
|
}
|
|
566
|
-
function
|
|
683
|
+
function Zn({
|
|
567
684
|
value: e,
|
|
568
685
|
onChange: r,
|
|
569
686
|
minDate: n,
|
|
570
687
|
displayMode: a = "inline"
|
|
571
688
|
}) {
|
|
572
|
-
const s =
|
|
689
|
+
const s = Ur(), f = Ht(e || s), p = a === "popover", [d, h] = D(!1), N = re(null), [S, b] = D({
|
|
573
690
|
horizontal: "left",
|
|
574
691
|
vertical: "bottom"
|
|
575
|
-
}), [m,
|
|
692
|
+
}), [m, v] = D(f.year), [c, y] = D(f.month), [B, R] = D("days"), A = 16, [C, L] = D(0), M = m - 7 + C, $ = Array.from({ length: A }, (o, w) => M + w);
|
|
576
693
|
_(() => {
|
|
577
694
|
if (!p || !d || !N.current) return;
|
|
578
695
|
const o = N.current.getBoundingClientRect(), w = 8, U = 280, Y = 340, X = o.left + U > window.innerWidth - w, te = o.right - U >= w, ce = o.bottom + 8 + Y > window.innerHeight - w, ne = o.top - 8 - Y >= w;
|
|
579
|
-
|
|
696
|
+
b({
|
|
580
697
|
horizontal: X && te ? "right" : "left",
|
|
581
698
|
vertical: ce && ne ? "top" : "bottom"
|
|
582
699
|
});
|
|
@@ -592,20 +709,20 @@ function Wn({
|
|
|
592
709
|
document.removeEventListener("mousedown", o), document.removeEventListener("keydown", w);
|
|
593
710
|
};
|
|
594
711
|
}, [p, d]);
|
|
595
|
-
function
|
|
596
|
-
c === 1 ? (
|
|
712
|
+
function H() {
|
|
713
|
+
c === 1 ? (v((o) => o - 1), y(12)) : y((o) => o - 1);
|
|
597
714
|
}
|
|
598
|
-
function
|
|
599
|
-
c === 12 ? (
|
|
715
|
+
function O() {
|
|
716
|
+
c === 12 ? (v((o) => o + 1), y(1)) : y((o) => o + 1);
|
|
600
717
|
}
|
|
601
|
-
const
|
|
602
|
-
...Array(
|
|
718
|
+
const T = new Date(m, c - 1, 1).getDay(), P = new Date(m, c, 0).getDate(), J = [
|
|
719
|
+
...Array(T).fill(null),
|
|
603
720
|
...Array.from({ length: P }, (o, w) => w + 1)
|
|
604
721
|
];
|
|
605
|
-
for (;
|
|
606
|
-
const
|
|
722
|
+
for (; J.length < nt * 7; ) J.push(null);
|
|
723
|
+
const W = J.slice(0, nt * 7);
|
|
607
724
|
function F(o) {
|
|
608
|
-
const w =
|
|
725
|
+
const w = dt(m, c, o);
|
|
609
726
|
n && w < n || (r(w), p && h(!1));
|
|
610
727
|
}
|
|
611
728
|
const V = {
|
|
@@ -639,12 +756,12 @@ function Wn({
|
|
|
639
756
|
padding: "10px 12px",
|
|
640
757
|
borderBottom: "1px solid var(--border)"
|
|
641
758
|
},
|
|
642
|
-
children:
|
|
759
|
+
children: B === "days" ? /* @__PURE__ */ i(we, { children: [
|
|
643
760
|
/* @__PURE__ */ t(
|
|
644
761
|
"button",
|
|
645
762
|
{
|
|
646
763
|
type: "button",
|
|
647
|
-
onClick:
|
|
764
|
+
onClick: H,
|
|
648
765
|
style: V,
|
|
649
766
|
title: "Mes anterior",
|
|
650
767
|
children: /* @__PURE__ */ t(je, { size: 16 })
|
|
@@ -655,7 +772,7 @@ function Wn({
|
|
|
655
772
|
{
|
|
656
773
|
type: "button",
|
|
657
774
|
onClick: () => {
|
|
658
|
-
|
|
775
|
+
R("years"), L(0);
|
|
659
776
|
},
|
|
660
777
|
style: {
|
|
661
778
|
background: "none",
|
|
@@ -671,7 +788,7 @@ function Wn({
|
|
|
671
788
|
padding: "2px 6px"
|
|
672
789
|
},
|
|
673
790
|
children: [
|
|
674
|
-
|
|
791
|
+
Rt[c - 1],
|
|
675
792
|
" ",
|
|
676
793
|
m,
|
|
677
794
|
/* @__PURE__ */ t(_e, { size: 13, style: { color: "var(--text-muted)" } })
|
|
@@ -682,7 +799,7 @@ function Wn({
|
|
|
682
799
|
"button",
|
|
683
800
|
{
|
|
684
801
|
type: "button",
|
|
685
|
-
onClick:
|
|
802
|
+
onClick: O,
|
|
686
803
|
style: V,
|
|
687
804
|
title: "Mes siguiente",
|
|
688
805
|
children: /* @__PURE__ */ t(Te, { size: 16 })
|
|
@@ -693,7 +810,7 @@ function Wn({
|
|
|
693
810
|
"button",
|
|
694
811
|
{
|
|
695
812
|
type: "button",
|
|
696
|
-
onClick: () =>
|
|
813
|
+
onClick: () => L((o) => o - A),
|
|
697
814
|
style: V,
|
|
698
815
|
children: /* @__PURE__ */ t(je, { size: 16 })
|
|
699
816
|
}
|
|
@@ -702,7 +819,7 @@ function Wn({
|
|
|
702
819
|
"button",
|
|
703
820
|
{
|
|
704
821
|
type: "button",
|
|
705
|
-
onClick: () =>
|
|
822
|
+
onClick: () => R("days"),
|
|
706
823
|
style: {
|
|
707
824
|
background: "none",
|
|
708
825
|
border: "none",
|
|
@@ -714,9 +831,9 @@ function Wn({
|
|
|
714
831
|
padding: "2px 6px"
|
|
715
832
|
},
|
|
716
833
|
children: [
|
|
717
|
-
|
|
834
|
+
$[0],
|
|
718
835
|
" – ",
|
|
719
|
-
|
|
836
|
+
$[$.length - 1]
|
|
720
837
|
]
|
|
721
838
|
}
|
|
722
839
|
),
|
|
@@ -724,7 +841,7 @@ function Wn({
|
|
|
724
841
|
"button",
|
|
725
842
|
{
|
|
726
843
|
type: "button",
|
|
727
|
-
onClick: () =>
|
|
844
|
+
onClick: () => L((o) => o + A),
|
|
728
845
|
style: V,
|
|
729
846
|
children: /* @__PURE__ */ t(Te, { size: 16 })
|
|
730
847
|
}
|
|
@@ -732,7 +849,7 @@ function Wn({
|
|
|
732
849
|
] })
|
|
733
850
|
}
|
|
734
851
|
),
|
|
735
|
-
|
|
852
|
+
B === "years" && /* @__PURE__ */ i("div", { style: { padding: "8px 10px 10px" }, children: [
|
|
736
853
|
/* @__PURE__ */ t(
|
|
737
854
|
"div",
|
|
738
855
|
{
|
|
@@ -742,7 +859,7 @@ function Wn({
|
|
|
742
859
|
gap: 3,
|
|
743
860
|
marginBottom: 8
|
|
744
861
|
},
|
|
745
|
-
children:
|
|
862
|
+
children: Wr.map((o, w) => {
|
|
746
863
|
const U = w + 1 === c;
|
|
747
864
|
return /* @__PURE__ */ t(
|
|
748
865
|
"button",
|
|
@@ -780,14 +897,14 @@ function Wn({
|
|
|
780
897
|
gridTemplateColumns: "repeat(4,1fr)",
|
|
781
898
|
gap: 3
|
|
782
899
|
},
|
|
783
|
-
children:
|
|
900
|
+
children: $.map((o) => {
|
|
784
901
|
const w = o === m;
|
|
785
902
|
return /* @__PURE__ */ t(
|
|
786
903
|
"button",
|
|
787
904
|
{
|
|
788
905
|
type: "button",
|
|
789
906
|
onClick: () => {
|
|
790
|
-
|
|
907
|
+
v(o), R("days");
|
|
791
908
|
},
|
|
792
909
|
style: {
|
|
793
910
|
border: "none",
|
|
@@ -809,7 +926,7 @@ function Wn({
|
|
|
809
926
|
}
|
|
810
927
|
)
|
|
811
928
|
] }),
|
|
812
|
-
|
|
929
|
+
B === "days" && /* @__PURE__ */ i(we, { children: [
|
|
813
930
|
/* @__PURE__ */ t(
|
|
814
931
|
"div",
|
|
815
932
|
{
|
|
@@ -818,7 +935,7 @@ function Wn({
|
|
|
818
935
|
gridTemplateColumns: "repeat(7,1fr)",
|
|
819
936
|
padding: "6px 8px 0"
|
|
820
937
|
},
|
|
821
|
-
children:
|
|
938
|
+
children: Fr.map((o) => /* @__PURE__ */ t(
|
|
822
939
|
"div",
|
|
823
940
|
{
|
|
824
941
|
style: {
|
|
@@ -845,10 +962,10 @@ function Wn({
|
|
|
845
962
|
padding: "4px 8px 10px",
|
|
846
963
|
gap: 2
|
|
847
964
|
},
|
|
848
|
-
children:
|
|
965
|
+
children: W.map((o, w) => {
|
|
849
966
|
if (o === null)
|
|
850
967
|
return /* @__PURE__ */ t("div", { style: { aspectRatio: "1" } }, w);
|
|
851
|
-
const U =
|
|
968
|
+
const U = dt(m, c, o), Y = U === e, X = U === s, te = !!(n && U < n);
|
|
852
969
|
return /* @__PURE__ */ t(
|
|
853
970
|
"button",
|
|
854
971
|
{
|
|
@@ -895,7 +1012,7 @@ function Wn({
|
|
|
895
1012
|
children: [
|
|
896
1013
|
/* @__PURE__ */ i("span", { className: "inline-flex items-center gap-2 min-w-0", children: [
|
|
897
1014
|
/* @__PURE__ */ t(lt, { className: "w-4 h-4 text-[var(--text-muted)]" }),
|
|
898
|
-
/* @__PURE__ */ t("span", { className: "truncate", children:
|
|
1015
|
+
/* @__PURE__ */ t("span", { className: "truncate", children: Yr(e) })
|
|
899
1016
|
] }),
|
|
900
1017
|
/* @__PURE__ */ t(
|
|
901
1018
|
_e,
|
|
@@ -911,19 +1028,19 @@ function Wn({
|
|
|
911
1028
|
{
|
|
912
1029
|
className: "absolute z-50",
|
|
913
1030
|
style: {
|
|
914
|
-
...
|
|
915
|
-
...
|
|
1031
|
+
...S.horizontal === "left" ? { left: 0 } : { right: 0 },
|
|
1032
|
+
...S.vertical === "bottom" ? { top: "calc(100% + 8px)" } : { bottom: "calc(100% + 8px)" }
|
|
916
1033
|
},
|
|
917
1034
|
children: Q
|
|
918
1035
|
}
|
|
919
1036
|
)
|
|
920
1037
|
] }) : Q;
|
|
921
1038
|
}
|
|
922
|
-
function
|
|
1039
|
+
function St(e) {
|
|
923
1040
|
if (e !== void 0)
|
|
924
1041
|
return typeof e == "number" ? `${e}px` : e;
|
|
925
1042
|
}
|
|
926
|
-
function
|
|
1043
|
+
function Wt({
|
|
927
1044
|
value: e,
|
|
928
1045
|
onChange: r,
|
|
929
1046
|
options: n,
|
|
@@ -935,18 +1052,18 @@ function jt({
|
|
|
935
1052
|
height: d = 44,
|
|
936
1053
|
padding: h = "0 12px",
|
|
937
1054
|
searchable: N = !0,
|
|
938
|
-
minOptionsForSearch:
|
|
1055
|
+
minOptionsForSearch: S = 6
|
|
939
1056
|
}) {
|
|
940
|
-
const [
|
|
1057
|
+
const [b, m] = D(!1), [v, c] = D(""), [y, B] = D(-1), [R, A] = D(!1), [C, L] = D({}), M = re(null), $ = re(null), H = re(null), O = re(null), T = N && n.length >= S, P = n.find((o) => o.value === e) ?? null, J = T && v.trim() ? n.filter(
|
|
941
1058
|
(o) => {
|
|
942
1059
|
var w;
|
|
943
|
-
return o.label.toLowerCase().includes(
|
|
1060
|
+
return o.label.toLowerCase().includes(v.toLowerCase()) || ((w = o.sublabel) == null ? void 0 : w.toLowerCase().includes(v.toLowerCase()));
|
|
944
1061
|
}
|
|
945
|
-
) : n,
|
|
946
|
-
const o =
|
|
1062
|
+
) : n, W = st(() => {
|
|
1063
|
+
const o = M.current;
|
|
947
1064
|
if (!o) return;
|
|
948
|
-
const w = o.getBoundingClientRect(), U =
|
|
949
|
-
|
|
1065
|
+
const w = o.getBoundingClientRect(), U = T ? 272 : 212, Y = window.innerHeight - w.bottom, X = Y < U && w.top > Y;
|
|
1066
|
+
L({
|
|
950
1067
|
position: "fixed",
|
|
951
1068
|
left: w.left,
|
|
952
1069
|
top: X ? void 0 : w.bottom + 4,
|
|
@@ -954,28 +1071,28 @@ function jt({
|
|
|
954
1071
|
width: w.width,
|
|
955
1072
|
zIndex: 9999
|
|
956
1073
|
});
|
|
957
|
-
}, [
|
|
958
|
-
_(() =>
|
|
959
|
-
if (!
|
|
1074
|
+
}, [T]);
|
|
1075
|
+
_(() => A(!0), []), _(() => {
|
|
1076
|
+
if (!b) return;
|
|
960
1077
|
function o(w) {
|
|
961
1078
|
var Y, X;
|
|
962
1079
|
const U = w.target;
|
|
963
|
-
!((Y =
|
|
1080
|
+
!((Y = M.current) != null && Y.contains(U)) && !((X = $.current) != null && X.contains(U)) && (m(!1), c(""));
|
|
964
1081
|
}
|
|
965
1082
|
return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
|
|
966
|
-
}, [
|
|
967
|
-
|
|
1083
|
+
}, [b]), _(() => {
|
|
1084
|
+
b && (B(-1), W(), T && setTimeout(() => {
|
|
968
1085
|
var o;
|
|
969
|
-
return (o =
|
|
1086
|
+
return (o = H.current) == null ? void 0 : o.focus();
|
|
970
1087
|
}, 0));
|
|
971
|
-
}, [
|
|
972
|
-
if (
|
|
973
|
-
return window.addEventListener("resize",
|
|
974
|
-
window.removeEventListener("resize",
|
|
1088
|
+
}, [b, T, W]), _(() => {
|
|
1089
|
+
if (b)
|
|
1090
|
+
return window.addEventListener("resize", W), window.addEventListener("scroll", W, !0), () => {
|
|
1091
|
+
window.removeEventListener("resize", W), window.removeEventListener("scroll", W, !0);
|
|
975
1092
|
};
|
|
976
|
-
}, [
|
|
977
|
-
if (y < 0 || !
|
|
978
|
-
const o =
|
|
1093
|
+
}, [b, W]), _(() => {
|
|
1094
|
+
if (y < 0 || !O.current) return;
|
|
1095
|
+
const o = O.current.children[y];
|
|
979
1096
|
o == null || o.scrollIntoView({ block: "nearest" });
|
|
980
1097
|
}, [y]);
|
|
981
1098
|
const F = st(
|
|
@@ -985,31 +1102,31 @@ function jt({
|
|
|
985
1102
|
[r]
|
|
986
1103
|
);
|
|
987
1104
|
function V(o) {
|
|
988
|
-
if (!
|
|
1105
|
+
if (!b) {
|
|
989
1106
|
(o.key === "Enter" || o.key === " " || o.key === "ArrowDown") && (o.preventDefault(), m(!0));
|
|
990
1107
|
return;
|
|
991
1108
|
}
|
|
992
|
-
o.key === "Escape" ? (o.preventDefault(), m(!1), c("")) : o.key === "ArrowDown" ? (o.preventDefault(),
|
|
1109
|
+
o.key === "Escape" ? (o.preventDefault(), m(!1), c("")) : o.key === "ArrowDown" ? (o.preventDefault(), B((w) => Math.min(w + 1, J.length - 1))) : o.key === "ArrowUp" ? (o.preventDefault(), B((w) => Math.max(w - 1, s ? -1 : 0))) : o.key === "Enter" && (o.preventDefault(), y === -1 && s ? F("") : J[y] && F(J[y].value));
|
|
993
1110
|
}
|
|
994
1111
|
const Q = /* @__PURE__ */ i(
|
|
995
1112
|
"div",
|
|
996
1113
|
{
|
|
997
|
-
ref:
|
|
1114
|
+
ref: $,
|
|
998
1115
|
className: "rounded-xl shadow-xl overflow-hidden",
|
|
999
1116
|
style: {
|
|
1000
|
-
|
|
1117
|
+
...C,
|
|
1001
1118
|
background: "var(--bg-card)",
|
|
1002
1119
|
border: "1px solid var(--border)"
|
|
1003
1120
|
},
|
|
1004
1121
|
children: [
|
|
1005
|
-
|
|
1122
|
+
T && /* @__PURE__ */ i(
|
|
1006
1123
|
"div",
|
|
1007
1124
|
{
|
|
1008
1125
|
className: "flex items-center gap-2 px-3 py-2",
|
|
1009
1126
|
style: { borderBottom: "1px solid var(--border)" },
|
|
1010
1127
|
children: [
|
|
1011
1128
|
/* @__PURE__ */ t(
|
|
1012
|
-
|
|
1129
|
+
Je,
|
|
1013
1130
|
{
|
|
1014
1131
|
className: "w-3.5 h-3.5 flex-shrink-0",
|
|
1015
1132
|
style: { color: "var(--text-muted)" }
|
|
@@ -1018,17 +1135,17 @@ function jt({
|
|
|
1018
1135
|
/* @__PURE__ */ t(
|
|
1019
1136
|
"input",
|
|
1020
1137
|
{
|
|
1021
|
-
ref:
|
|
1022
|
-
value:
|
|
1138
|
+
ref: H,
|
|
1139
|
+
value: v,
|
|
1023
1140
|
onChange: (o) => {
|
|
1024
|
-
c(o.target.value),
|
|
1141
|
+
c(o.target.value), B(-1);
|
|
1025
1142
|
},
|
|
1026
1143
|
placeholder: "Buscar…",
|
|
1027
1144
|
className: "min-w-0 flex-1 text-sm bg-transparent outline-none",
|
|
1028
1145
|
style: { color: "var(--text-main)" }
|
|
1029
1146
|
}
|
|
1030
1147
|
),
|
|
1031
|
-
|
|
1148
|
+
v && /* @__PURE__ */ t(
|
|
1032
1149
|
"button",
|
|
1033
1150
|
{
|
|
1034
1151
|
type: "button",
|
|
@@ -1050,11 +1167,11 @@ function jt({
|
|
|
1050
1167
|
/* @__PURE__ */ i(
|
|
1051
1168
|
"ul",
|
|
1052
1169
|
{
|
|
1053
|
-
ref:
|
|
1170
|
+
ref: O,
|
|
1054
1171
|
role: "listbox",
|
|
1055
1172
|
className: "overflow-y-auto",
|
|
1056
1173
|
style: {
|
|
1057
|
-
maxHeight:
|
|
1174
|
+
maxHeight: T ? 220 : 180,
|
|
1058
1175
|
scrollbarWidth: "thin",
|
|
1059
1176
|
scrollbarColor: "var(--border) transparent",
|
|
1060
1177
|
overscrollBehavior: "contain"
|
|
@@ -1068,7 +1185,7 @@ function jt({
|
|
|
1068
1185
|
onMouseDown: (o) => {
|
|
1069
1186
|
o.preventDefault(), F("");
|
|
1070
1187
|
},
|
|
1071
|
-
onMouseEnter: () =>
|
|
1188
|
+
onMouseEnter: () => B(-1),
|
|
1072
1189
|
className: "flex items-center gap-2 px-3 py-2 cursor-pointer text-sm transition-colors",
|
|
1073
1190
|
style: {
|
|
1074
1191
|
background: y === -1 ? "var(--bg-hover)" : "transparent",
|
|
@@ -1078,7 +1195,7 @@ function jt({
|
|
|
1078
1195
|
children: s
|
|
1079
1196
|
}
|
|
1080
1197
|
),
|
|
1081
|
-
|
|
1198
|
+
J.map((o, w) => {
|
|
1082
1199
|
const Y = w === y, X = o.value === e;
|
|
1083
1200
|
return /* @__PURE__ */ i(
|
|
1084
1201
|
"li",
|
|
@@ -1088,7 +1205,7 @@ function jt({
|
|
|
1088
1205
|
onMouseDown: (te) => {
|
|
1089
1206
|
te.preventDefault(), o.disabled || F(o.value);
|
|
1090
1207
|
},
|
|
1091
|
-
onMouseEnter: () => !o.disabled &&
|
|
1208
|
+
onMouseEnter: () => !o.disabled && B(w),
|
|
1092
1209
|
className: "flex items-center gap-2 px-3 py-2 cursor-pointer text-sm transition-colors",
|
|
1093
1210
|
style: {
|
|
1094
1211
|
background: Y ? "var(--bg-hover)" : X ? "color-mix(in srgb, var(--primary) 6%, transparent)" : "transparent",
|
|
@@ -1128,7 +1245,7 @@ function jt({
|
|
|
1128
1245
|
o.value
|
|
1129
1246
|
);
|
|
1130
1247
|
}),
|
|
1131
|
-
|
|
1248
|
+
J.length === 0 && /* @__PURE__ */ t(
|
|
1132
1249
|
"li",
|
|
1133
1250
|
{
|
|
1134
1251
|
className: "px-3 py-4 text-sm text-center",
|
|
@@ -1145,7 +1262,7 @@ function jt({
|
|
|
1145
1262
|
return /* @__PURE__ */ i(
|
|
1146
1263
|
"div",
|
|
1147
1264
|
{
|
|
1148
|
-
ref:
|
|
1265
|
+
ref: M,
|
|
1149
1266
|
className: `relative ${f || "w-full"}`,
|
|
1150
1267
|
style: p,
|
|
1151
1268
|
onKeyDown: V,
|
|
@@ -1158,16 +1275,16 @@ function jt({
|
|
|
1158
1275
|
onClick: () => !u && m((o) => !o),
|
|
1159
1276
|
className: "flex w-full items-center gap-2 rounded-lg text-left text-sm transition-colors focus:outline-none",
|
|
1160
1277
|
style: {
|
|
1161
|
-
height:
|
|
1162
|
-
padding:
|
|
1278
|
+
height: St(d),
|
|
1279
|
+
padding: St(h),
|
|
1163
1280
|
background: "var(--bg-input)",
|
|
1164
1281
|
color: P ? "var(--text-main)" : "var(--text-muted)",
|
|
1165
|
-
border:
|
|
1282
|
+
border: b ? "1px solid var(--primary)" : "1px solid var(--border)",
|
|
1166
1283
|
opacity: u ? 0.5 : 1,
|
|
1167
1284
|
cursor: u ? "not-allowed" : "pointer"
|
|
1168
1285
|
},
|
|
1169
1286
|
"aria-haspopup": "listbox",
|
|
1170
|
-
"aria-expanded":
|
|
1287
|
+
"aria-expanded": b,
|
|
1171
1288
|
children: [
|
|
1172
1289
|
(P == null ? void 0 : P.color) && /* @__PURE__ */ t(
|
|
1173
1290
|
"span",
|
|
@@ -1205,14 +1322,14 @@ function jt({
|
|
|
1205
1322
|
className: "flex-shrink-0 w-4 h-4 transition-transform",
|
|
1206
1323
|
style: {
|
|
1207
1324
|
color: "var(--text-muted)",
|
|
1208
|
-
transform:
|
|
1325
|
+
transform: b ? "rotate(180deg)" : "rotate(0deg)"
|
|
1209
1326
|
}
|
|
1210
1327
|
}
|
|
1211
1328
|
)
|
|
1212
1329
|
]
|
|
1213
1330
|
}
|
|
1214
1331
|
),
|
|
1215
|
-
|
|
1332
|
+
b && R && Ke(Q, document.body)
|
|
1216
1333
|
]
|
|
1217
1334
|
}
|
|
1218
1335
|
);
|
|
@@ -1221,7 +1338,7 @@ function Ge(e) {
|
|
|
1221
1338
|
if (e !== void 0)
|
|
1222
1339
|
return typeof e == "number" ? `${e}px` : e;
|
|
1223
1340
|
}
|
|
1224
|
-
function
|
|
1341
|
+
function Jn({
|
|
1225
1342
|
value: e,
|
|
1226
1343
|
onChange: r,
|
|
1227
1344
|
placeholder: n = "Buscar...",
|
|
@@ -1232,7 +1349,7 @@ function Fn({
|
|
|
1232
1349
|
}) {
|
|
1233
1350
|
return /* @__PURE__ */ i("div", { className: `relative ${a}`, children: [
|
|
1234
1351
|
/* @__PURE__ */ t(
|
|
1235
|
-
|
|
1352
|
+
Je,
|
|
1236
1353
|
{
|
|
1237
1354
|
className: "absolute top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-[var(--text-muted)] pointer-events-none",
|
|
1238
1355
|
style: { left: Ge(f) }
|
|
@@ -1251,7 +1368,7 @@ function Fn({
|
|
|
1251
1368
|
)
|
|
1252
1369
|
] });
|
|
1253
1370
|
}
|
|
1254
|
-
function
|
|
1371
|
+
function Kn({
|
|
1255
1372
|
value: e,
|
|
1256
1373
|
onChange: r,
|
|
1257
1374
|
options: n,
|
|
@@ -1264,7 +1381,7 @@ function Un({
|
|
|
1264
1381
|
searchable: h = !0
|
|
1265
1382
|
}) {
|
|
1266
1383
|
const N = s ? n.map(
|
|
1267
|
-
(
|
|
1384
|
+
(S, b) => b === 0 && !S.color ? { ...S, sublabel: S.sublabel ?? void 0 } : S
|
|
1268
1385
|
) : n;
|
|
1269
1386
|
return /* @__PURE__ */ i("div", { className: `relative ${u}`, children: [
|
|
1270
1387
|
s && /* @__PURE__ */ t(
|
|
@@ -1276,7 +1393,7 @@ function Un({
|
|
|
1276
1393
|
}
|
|
1277
1394
|
),
|
|
1278
1395
|
/* @__PURE__ */ t(
|
|
1279
|
-
|
|
1396
|
+
Wt,
|
|
1280
1397
|
{
|
|
1281
1398
|
value: e,
|
|
1282
1399
|
onChange: r,
|
|
@@ -1291,7 +1408,7 @@ function Un({
|
|
|
1291
1408
|
)
|
|
1292
1409
|
] });
|
|
1293
1410
|
}
|
|
1294
|
-
const
|
|
1411
|
+
const qr = {
|
|
1295
1412
|
sm: "24rem",
|
|
1296
1413
|
md: "28rem",
|
|
1297
1414
|
lg: "32rem",
|
|
@@ -1300,7 +1417,7 @@ const zr = {
|
|
|
1300
1417
|
"4xl": "56rem",
|
|
1301
1418
|
"5xl": "64rem"
|
|
1302
1419
|
}, qe = 180;
|
|
1303
|
-
function
|
|
1420
|
+
function Gr({
|
|
1304
1421
|
open: e,
|
|
1305
1422
|
onClose: r,
|
|
1306
1423
|
title: n,
|
|
@@ -1312,53 +1429,53 @@ function jr({
|
|
|
1312
1429
|
size: d = "md",
|
|
1313
1430
|
maxWidth: h,
|
|
1314
1431
|
zIndex: N = 1e3,
|
|
1315
|
-
closeOnBackdrop:
|
|
1316
|
-
closeOnEscape:
|
|
1432
|
+
closeOnBackdrop: S = !0,
|
|
1433
|
+
closeOnEscape: b = !0,
|
|
1317
1434
|
showCloseButton: m = !0,
|
|
1318
|
-
placement:
|
|
1435
|
+
placement: v = "center",
|
|
1319
1436
|
bodyClassName: c = "px-6 py-5",
|
|
1320
1437
|
panelClassName: y = "",
|
|
1321
|
-
backdropClassName:
|
|
1322
|
-
contentClassName:
|
|
1323
|
-
ariaLabel:
|
|
1324
|
-
frameless:
|
|
1438
|
+
backdropClassName: B = "bg-black/50 backdrop-blur-sm",
|
|
1439
|
+
contentClassName: R = "p-4",
|
|
1440
|
+
ariaLabel: A,
|
|
1441
|
+
frameless: C = !1
|
|
1325
1442
|
}) {
|
|
1326
|
-
const [
|
|
1327
|
-
if (_(() => (e ? (
|
|
1328
|
-
() =>
|
|
1443
|
+
const [L, M] = D(!1), [$, H] = D(!1), O = re(null);
|
|
1444
|
+
if (_(() => (e ? (O.current && clearTimeout(O.current), M(!0), requestAnimationFrame(() => requestAnimationFrame(() => H(!0)))) : (H(!1), O.current = setTimeout(
|
|
1445
|
+
() => M(!1),
|
|
1329
1446
|
qe + 40
|
|
1330
1447
|
)), () => {
|
|
1331
|
-
|
|
1448
|
+
O.current && clearTimeout(O.current);
|
|
1332
1449
|
}), [e]), _(() => {
|
|
1333
1450
|
if (e)
|
|
1334
1451
|
return document.body.style.overflow = "hidden", () => {
|
|
1335
1452
|
document.body.style.overflow = "";
|
|
1336
1453
|
};
|
|
1337
1454
|
}, [e]), _(() => {
|
|
1338
|
-
if (!e || !
|
|
1455
|
+
if (!e || !b) return;
|
|
1339
1456
|
const V = (Q) => {
|
|
1340
1457
|
Q.key === "Escape" && r();
|
|
1341
1458
|
};
|
|
1342
1459
|
return window.addEventListener("keydown", V), () => window.removeEventListener("keydown", V);
|
|
1343
|
-
}, [
|
|
1344
|
-
const
|
|
1460
|
+
}, [b, r, e]), !L) return null;
|
|
1461
|
+
const T = n || a || s || u || m, P = h ?? qr[d], J = v === "bottom-mobile" ? "items-end sm:items-center justify-center p-0 sm:p-4" : "items-center justify-center", W = v === "bottom-mobile" ? "rounded-t-2xl sm:rounded-2xl" : "rounded-2xl", F = $ ? "translateY(0) scale(1)" : v === "bottom-mobile" ? "translateY(16px) scale(0.98)" : "translateY(10px) scale(0.96)";
|
|
1345
1462
|
return Ke(
|
|
1346
1463
|
/* @__PURE__ */ i(
|
|
1347
1464
|
"div",
|
|
1348
1465
|
{
|
|
1349
1466
|
role: "dialog",
|
|
1350
1467
|
"aria-modal": "true",
|
|
1351
|
-
"aria-label":
|
|
1352
|
-
className: `fixed inset-0 flex ${
|
|
1468
|
+
"aria-label": A ?? n,
|
|
1469
|
+
className: `fixed inset-0 flex ${J} ${R}`,
|
|
1353
1470
|
style: { zIndex: N },
|
|
1354
1471
|
children: [
|
|
1355
1472
|
/* @__PURE__ */ t(
|
|
1356
1473
|
"div",
|
|
1357
1474
|
{
|
|
1358
|
-
className: `absolute inset-0 ${
|
|
1359
|
-
onClick:
|
|
1475
|
+
className: `absolute inset-0 ${B}`,
|
|
1476
|
+
onClick: S ? r : void 0,
|
|
1360
1477
|
style: {
|
|
1361
|
-
opacity:
|
|
1478
|
+
opacity: $ ? 1 : 0,
|
|
1362
1479
|
transition: `opacity ${qe}ms ease`
|
|
1363
1480
|
}
|
|
1364
1481
|
}
|
|
@@ -1366,18 +1483,18 @@ function jr({
|
|
|
1366
1483
|
/* @__PURE__ */ i(
|
|
1367
1484
|
"div",
|
|
1368
1485
|
{
|
|
1369
|
-
className: `relative z-10 flex max-h-[92dvh] w-full flex-col overflow-hidden ${
|
|
1486
|
+
className: `relative z-10 flex max-h-[92dvh] w-full flex-col overflow-hidden ${C ? "shadow-none" : "shadow-2xl"} ${W} ${y}`,
|
|
1370
1487
|
style: {
|
|
1371
1488
|
maxWidth: P,
|
|
1372
|
-
background:
|
|
1373
|
-
border:
|
|
1374
|
-
opacity:
|
|
1489
|
+
background: C ? "transparent" : "var(--bg-card)",
|
|
1490
|
+
border: C ? "none" : "1px solid var(--border)",
|
|
1491
|
+
opacity: $ ? 1 : 0,
|
|
1375
1492
|
transform: F,
|
|
1376
1493
|
transition: `opacity ${qe}ms ease, transform ${qe}ms ease`
|
|
1377
1494
|
},
|
|
1378
1495
|
onClick: (V) => V.stopPropagation(),
|
|
1379
1496
|
children: [
|
|
1380
|
-
|
|
1497
|
+
T && /* @__PURE__ */ i(
|
|
1381
1498
|
"div",
|
|
1382
1499
|
{
|
|
1383
1500
|
className: "flex flex-shrink-0 items-center justify-between gap-3 px-6 py-4",
|
|
@@ -1429,7 +1546,7 @@ function jr({
|
|
|
1429
1546
|
document.body
|
|
1430
1547
|
);
|
|
1431
1548
|
}
|
|
1432
|
-
const
|
|
1549
|
+
const Xr = {
|
|
1433
1550
|
danger: {
|
|
1434
1551
|
iconBg: "rgba(239,68,68,0.12)",
|
|
1435
1552
|
iconColor: "var(--danger)",
|
|
@@ -1449,7 +1566,7 @@ const _r = {
|
|
|
1449
1566
|
btnColor: "#fff"
|
|
1450
1567
|
}
|
|
1451
1568
|
};
|
|
1452
|
-
function
|
|
1569
|
+
function Qn({
|
|
1453
1570
|
open: e,
|
|
1454
1571
|
title: r,
|
|
1455
1572
|
description: n,
|
|
@@ -1459,9 +1576,9 @@ function Yn({
|
|
|
1459
1576
|
onConfirm: f,
|
|
1460
1577
|
onCancel: p
|
|
1461
1578
|
}) {
|
|
1462
|
-
const d =
|
|
1579
|
+
const d = Xr[u];
|
|
1463
1580
|
return /* @__PURE__ */ i(
|
|
1464
|
-
|
|
1581
|
+
Gr,
|
|
1465
1582
|
{
|
|
1466
1583
|
open: e,
|
|
1467
1584
|
onClose: p,
|
|
@@ -1491,7 +1608,7 @@ function Yn({
|
|
|
1491
1608
|
background: d.iconBg
|
|
1492
1609
|
},
|
|
1493
1610
|
children: /* @__PURE__ */ t(
|
|
1494
|
-
|
|
1611
|
+
ar,
|
|
1495
1612
|
{
|
|
1496
1613
|
className: "h-5 w-5",
|
|
1497
1614
|
style: { color: d.iconColor }
|
|
@@ -1538,82 +1655,82 @@ function Yn({
|
|
|
1538
1655
|
}
|
|
1539
1656
|
);
|
|
1540
1657
|
}
|
|
1541
|
-
function
|
|
1658
|
+
function Ft(e) {
|
|
1542
1659
|
const r = document.createElement("textarea");
|
|
1543
1660
|
r.value = e, r.style.position = "fixed", r.style.opacity = "0", r.style.pointerEvents = "none", document.body.appendChild(r), r.select(), document.execCommand("copy"), document.body.removeChild(r);
|
|
1544
1661
|
}
|
|
1545
|
-
async function
|
|
1662
|
+
async function Vr(e) {
|
|
1546
1663
|
var r;
|
|
1547
1664
|
if ((r = navigator.clipboard) != null && r.writeText) {
|
|
1548
1665
|
await navigator.clipboard.writeText(e);
|
|
1549
1666
|
return;
|
|
1550
1667
|
}
|
|
1551
|
-
|
|
1668
|
+
Ft(e);
|
|
1552
1669
|
}
|
|
1553
|
-
function
|
|
1670
|
+
function Zr(e) {
|
|
1554
1671
|
return typeof e == "function" ? e() : e;
|
|
1555
1672
|
}
|
|
1556
|
-
function
|
|
1673
|
+
function Jr({
|
|
1557
1674
|
value: e,
|
|
1558
1675
|
resetDelay: r = 2e3,
|
|
1559
1676
|
title: n,
|
|
1560
1677
|
copiedTitle: a = "Copiado",
|
|
1561
1678
|
copiedLabel: s,
|
|
1562
|
-
icon: u = /* @__PURE__ */ t(
|
|
1563
|
-
copiedIcon: f = /* @__PURE__ */ t(
|
|
1679
|
+
icon: u = /* @__PURE__ */ t(ir, { className: "h-3.5 w-3.5" }),
|
|
1680
|
+
copiedIcon: f = /* @__PURE__ */ t(Pt, { className: "h-3.5 w-3.5" }),
|
|
1564
1681
|
stopPropagation: p = !0,
|
|
1565
1682
|
onCopied: d,
|
|
1566
1683
|
onCopyError: h,
|
|
1567
1684
|
className: N = "",
|
|
1568
|
-
style:
|
|
1569
|
-
children:
|
|
1685
|
+
style: S,
|
|
1686
|
+
children: b,
|
|
1570
1687
|
onClick: m,
|
|
1571
|
-
type:
|
|
1688
|
+
type: v = "button",
|
|
1572
1689
|
...c
|
|
1573
1690
|
}) {
|
|
1574
|
-
const [y,
|
|
1691
|
+
const [y, B] = D(!1), R = re(null);
|
|
1575
1692
|
_(() => () => {
|
|
1576
|
-
|
|
1693
|
+
R.current && window.clearTimeout(R.current);
|
|
1577
1694
|
}, []);
|
|
1578
|
-
function
|
|
1579
|
-
|
|
1580
|
-
|
|
1695
|
+
function A(L) {
|
|
1696
|
+
B(!0), d == null || d(L), R.current && window.clearTimeout(R.current), R.current = window.setTimeout(() => {
|
|
1697
|
+
B(!1), R.current = null;
|
|
1581
1698
|
}, r);
|
|
1582
1699
|
}
|
|
1583
|
-
async function
|
|
1584
|
-
var
|
|
1585
|
-
if (p &&
|
|
1586
|
-
const
|
|
1587
|
-
if (
|
|
1700
|
+
async function C(L) {
|
|
1701
|
+
var $;
|
|
1702
|
+
if (p && L.stopPropagation(), m == null || m(L), L.defaultPrevented) return;
|
|
1703
|
+
const M = Zr(e);
|
|
1704
|
+
if (M)
|
|
1588
1705
|
try {
|
|
1589
|
-
await
|
|
1590
|
-
} catch (
|
|
1706
|
+
await Vr(M), A(M);
|
|
1707
|
+
} catch (H) {
|
|
1591
1708
|
try {
|
|
1592
|
-
|
|
1593
|
-
} catch (
|
|
1594
|
-
h == null || h(
|
|
1709
|
+
Ft(M), A(M);
|
|
1710
|
+
} catch (O) {
|
|
1711
|
+
h == null || h(O, M);
|
|
1595
1712
|
return;
|
|
1596
1713
|
}
|
|
1597
|
-
(
|
|
1714
|
+
($ = navigator.clipboard) != null && $.writeText || h == null || h(H, M);
|
|
1598
1715
|
}
|
|
1599
1716
|
}
|
|
1600
1717
|
return /* @__PURE__ */ i(
|
|
1601
1718
|
"button",
|
|
1602
1719
|
{
|
|
1603
1720
|
...c,
|
|
1604
|
-
type:
|
|
1605
|
-
onClick:
|
|
1721
|
+
type: v,
|
|
1722
|
+
onClick: C,
|
|
1606
1723
|
title: y ? a : n,
|
|
1607
1724
|
"aria-label": c["aria-label"] ?? (y ? a : n),
|
|
1608
1725
|
"data-copied": y ? "true" : void 0,
|
|
1609
|
-
className: `relative inline-flex h-7 shrink-0 items-center justify-center rounded-md transition-all duration-200 ${
|
|
1726
|
+
className: `relative inline-flex h-7 shrink-0 items-center justify-center rounded-md transition-all duration-200 ${b ? "min-w-7 px-2" : "w-7"} ${N}`,
|
|
1610
1727
|
style: {
|
|
1611
1728
|
cursor: "pointer",
|
|
1612
1729
|
background: y ? "rgba(22,163,74,0.15)" : "transparent",
|
|
1613
1730
|
border: y ? "1px solid rgba(22,163,74,0.4)" : "1px solid transparent",
|
|
1614
1731
|
color: y ? "#16a34a" : "var(--text-muted)",
|
|
1615
1732
|
boxShadow: y ? "0 0 0 3px rgba(22,163,74,0.12)" : "none",
|
|
1616
|
-
...
|
|
1733
|
+
...S
|
|
1617
1734
|
},
|
|
1618
1735
|
children: [
|
|
1619
1736
|
/* @__PURE__ */ t(
|
|
@@ -1624,145 +1741,45 @@ function Wr({
|
|
|
1624
1741
|
children: y ? f : u
|
|
1625
1742
|
}
|
|
1626
1743
|
),
|
|
1627
|
-
|
|
1744
|
+
b && /* @__PURE__ */ t("span", { className: "ml-2 text-xs font-medium", children: y ? s ?? b : b })
|
|
1628
1745
|
]
|
|
1629
1746
|
}
|
|
1630
1747
|
);
|
|
1631
1748
|
}
|
|
1632
|
-
function
|
|
1749
|
+
function Kr(e, r) {
|
|
1633
1750
|
const n = typeof e == "function" ? e() : e;
|
|
1634
1751
|
return r ? r(n) : n;
|
|
1635
1752
|
}
|
|
1636
|
-
function
|
|
1753
|
+
function ea({
|
|
1637
1754
|
url: e,
|
|
1638
1755
|
resolveUrl: r,
|
|
1639
1756
|
title: n = "Copiar link",
|
|
1640
1757
|
copiedTitle: a = "Link copiado",
|
|
1641
|
-
icon: s = /* @__PURE__ */ t(
|
|
1758
|
+
icon: s = /* @__PURE__ */ t(or, { className: "h-3.5 w-3.5" }),
|
|
1642
1759
|
...u
|
|
1643
1760
|
}) {
|
|
1644
1761
|
return /* @__PURE__ */ t(
|
|
1645
|
-
|
|
1762
|
+
Jr,
|
|
1646
1763
|
{
|
|
1647
1764
|
...u,
|
|
1648
|
-
value: () =>
|
|
1765
|
+
value: () => Kr(e, r),
|
|
1649
1766
|
title: n,
|
|
1650
1767
|
copiedTitle: a,
|
|
1651
1768
|
icon: s
|
|
1652
1769
|
}
|
|
1653
1770
|
);
|
|
1654
1771
|
}
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
const r = Array.from(
|
|
1658
|
-
e.querySelectorAll("*")
|
|
1659
|
-
).filter(
|
|
1660
|
-
(s) => {
|
|
1661
|
-
var u;
|
|
1662
|
-
return s.scrollWidth > s.clientWidth && !!((u = s.textContent) != null && u.trim()) && s.tagName.toLowerCase() !== "svg" && !s.closest("svg");
|
|
1663
|
-
}
|
|
1664
|
-
);
|
|
1665
|
-
return (e.scrollWidth > e.clientWidth || r.length > 0) && (((a = r[0]) == null ? void 0 : a.textContent) ?? e.textContent ?? "").trim() || null;
|
|
1666
|
-
}
|
|
1667
|
-
function Rt({
|
|
1668
|
-
children: e,
|
|
1669
|
-
content: r,
|
|
1670
|
-
onlyWhenOverflow: n = !1,
|
|
1671
|
-
className: a = "",
|
|
1672
|
-
style: s,
|
|
1673
|
-
as: u = "div"
|
|
1674
|
-
}) {
|
|
1675
|
-
const f = re(null), p = re(null), [d, h] = T(null), [N, k] = T("");
|
|
1676
|
-
_(() => {
|
|
1677
|
-
const g = f.current;
|
|
1678
|
-
g && (g.querySelectorAll("[title]").forEach((c) => {
|
|
1679
|
-
const y = c.getAttribute("title");
|
|
1680
|
-
y && (c.getAttribute("aria-label") || c.setAttribute("aria-label", y), c.removeAttribute("title"));
|
|
1681
|
-
}), g.querySelectorAll("svg title").forEach((c) => c.remove()));
|
|
1682
|
-
}), Jt(() => {
|
|
1683
|
-
if (!d) return;
|
|
1684
|
-
const g = p.current;
|
|
1685
|
-
if (!g) return;
|
|
1686
|
-
const c = 12, y = 14, L = g.getBoundingClientRect(), W = window.innerWidth - L.width - c, z = window.innerHeight - L.height - c;
|
|
1687
|
-
let $ = d.mouseX + y, D = d.mouseY + y;
|
|
1688
|
-
$ > W && ($ = d.mouseX - L.width - y), D > z && (D = d.mouseY - L.height - y), $ = Math.min(Math.max(c, $), Math.max(c, W)), D = Math.min(Math.max(c, D), Math.max(c, z)), (Math.abs($ - d.x) > 0.5 || Math.abs(D - d.y) > 0.5) && h(
|
|
1689
|
-
(B) => B && {
|
|
1690
|
-
...B,
|
|
1691
|
-
x: $,
|
|
1692
|
-
y: D
|
|
1693
|
-
}
|
|
1694
|
-
);
|
|
1695
|
-
}, [d]);
|
|
1696
|
-
const v = (g, c) => {
|
|
1697
|
-
const y = f.current;
|
|
1698
|
-
if (y) {
|
|
1699
|
-
if (n) {
|
|
1700
|
-
const L = Ur(y);
|
|
1701
|
-
if (!L) return;
|
|
1702
|
-
k(L);
|
|
1703
|
-
}
|
|
1704
|
-
!n && !r || h({ mouseX: g, mouseY: c, x: g + 14, y: c + 14 });
|
|
1705
|
-
}
|
|
1706
|
-
}, m = n ? N : r;
|
|
1707
|
-
return /* @__PURE__ */ i(we, { children: [
|
|
1708
|
-
/* @__PURE__ */ t(
|
|
1709
|
-
u,
|
|
1710
|
-
{
|
|
1711
|
-
ref: (g) => {
|
|
1712
|
-
f.current = g;
|
|
1713
|
-
},
|
|
1714
|
-
className: a,
|
|
1715
|
-
style: s,
|
|
1716
|
-
onMouseEnter: (g) => v(g.clientX, g.clientY),
|
|
1717
|
-
onMouseMove: (g) => {
|
|
1718
|
-
d && v(g.clientX, g.clientY);
|
|
1719
|
-
},
|
|
1720
|
-
onMouseLeave: () => h(null),
|
|
1721
|
-
children: e
|
|
1722
|
-
}
|
|
1723
|
-
),
|
|
1724
|
-
d && m ? Ke(
|
|
1725
|
-
/* @__PURE__ */ t(
|
|
1726
|
-
"div",
|
|
1727
|
-
{
|
|
1728
|
-
ref: p,
|
|
1729
|
-
role: "tooltip",
|
|
1730
|
-
style: {
|
|
1731
|
-
position: "fixed",
|
|
1732
|
-
top: d.y,
|
|
1733
|
-
left: d.x,
|
|
1734
|
-
zIndex: 9999,
|
|
1735
|
-
background: "var(--bg-card)",
|
|
1736
|
-
border: "1px solid var(--border)",
|
|
1737
|
-
borderRadius: 6,
|
|
1738
|
-
padding: "5px 10px",
|
|
1739
|
-
fontSize: 12,
|
|
1740
|
-
color: "var(--text-main)",
|
|
1741
|
-
boxShadow: "0 4px 16px rgba(0,0,0,0.35)",
|
|
1742
|
-
pointerEvents: "none",
|
|
1743
|
-
maxWidth: "min(420px, calc(100vw - 24px))",
|
|
1744
|
-
whiteSpace: "normal",
|
|
1745
|
-
lineHeight: 1.6,
|
|
1746
|
-
overflowWrap: "anywhere"
|
|
1747
|
-
},
|
|
1748
|
-
children: m
|
|
1749
|
-
}
|
|
1750
|
-
),
|
|
1751
|
-
document.body
|
|
1752
|
-
) : null
|
|
1753
|
-
] });
|
|
1754
|
-
}
|
|
1755
|
-
const Yr = "[&_button]:h-7 [&_button]:min-h-0 [&_button]:gap-1 [&_button]:px-2 [&_button]:text-xs [&_button_svg]:h-3.5 [&_button_svg]:w-3.5 [&_button[data-icon=true]]:w-7 [&_button[data-icon=true]]:px-0";
|
|
1756
|
-
function Pe(e) {
|
|
1772
|
+
const Qr = "[&_button]:h-7 [&_button]:min-h-0 [&_button]:gap-1 [&_button]:px-2 [&_button]:text-xs [&_button_svg]:h-3.5 [&_button_svg]:w-3.5 [&_button[data-icon=true]]:w-7 [&_button[data-icon=true]]:px-0";
|
|
1773
|
+
function Ie(e) {
|
|
1757
1774
|
if (!e) return 150;
|
|
1758
1775
|
const r = parseInt(e, 10);
|
|
1759
1776
|
return isNaN(r) || r <= 0 ? 150 : r;
|
|
1760
1777
|
}
|
|
1761
|
-
function
|
|
1778
|
+
function Oe(e, r) {
|
|
1762
1779
|
const n = e.minWidth ?? 80, a = e.maxWidth ?? 1 / 0;
|
|
1763
1780
|
return Math.min(a, Math.max(n, r));
|
|
1764
1781
|
}
|
|
1765
|
-
function
|
|
1782
|
+
function en(e, r) {
|
|
1766
1783
|
if (r <= 7) return Array.from({ length: r }, (a, s) => s + 1);
|
|
1767
1784
|
const n = [1];
|
|
1768
1785
|
e > 3 && n.push("...");
|
|
@@ -1770,13 +1787,13 @@ function qr(e, r) {
|
|
|
1770
1787
|
n.push(a);
|
|
1771
1788
|
return e < r - 2 && n.push("..."), n.push(r), n;
|
|
1772
1789
|
}
|
|
1773
|
-
function
|
|
1790
|
+
function Ct({
|
|
1774
1791
|
children: e,
|
|
1775
1792
|
className: r = "",
|
|
1776
1793
|
style: n
|
|
1777
1794
|
}) {
|
|
1778
1795
|
return /* @__PURE__ */ t(
|
|
1779
|
-
|
|
1796
|
+
ut,
|
|
1780
1797
|
{
|
|
1781
1798
|
onlyWhenOverflow: !0,
|
|
1782
1799
|
className: r,
|
|
@@ -1791,7 +1808,7 @@ function kt({
|
|
|
1791
1808
|
}
|
|
1792
1809
|
);
|
|
1793
1810
|
}
|
|
1794
|
-
function
|
|
1811
|
+
function ta({
|
|
1795
1812
|
columns: e,
|
|
1796
1813
|
data: r,
|
|
1797
1814
|
getRowId: n,
|
|
@@ -1803,69 +1820,69 @@ function Gn({
|
|
|
1803
1820
|
selected: d,
|
|
1804
1821
|
onToggleOne: h,
|
|
1805
1822
|
onToggleAll: N,
|
|
1806
|
-
highlightSelected:
|
|
1807
|
-
rowClassName:
|
|
1823
|
+
highlightSelected: S = !0,
|
|
1824
|
+
rowClassName: b,
|
|
1808
1825
|
getRowCategory: m,
|
|
1809
|
-
stickyHeader:
|
|
1826
|
+
stickyHeader: v = !0,
|
|
1810
1827
|
pageSize: c = 25,
|
|
1811
1828
|
pageSizeOptions: y = [25, 50, 100],
|
|
1812
|
-
pageSizeSelectWidth:
|
|
1813
|
-
pageSizeSelectHeight:
|
|
1814
|
-
pageSizeSelectPadding:
|
|
1815
|
-
totalRows:
|
|
1816
|
-
page:
|
|
1817
|
-
onPageChange:
|
|
1818
|
-
onPageSizeChange:
|
|
1819
|
-
storageKey:
|
|
1820
|
-
stickyFirstColumn:
|
|
1821
|
-
bottomOffset:
|
|
1829
|
+
pageSizeSelectWidth: B = 62,
|
|
1830
|
+
pageSizeSelectHeight: R = 30,
|
|
1831
|
+
pageSizeSelectPadding: A = "0 7px",
|
|
1832
|
+
totalRows: C,
|
|
1833
|
+
page: L,
|
|
1834
|
+
onPageChange: M,
|
|
1835
|
+
onPageSizeChange: $,
|
|
1836
|
+
storageKey: H,
|
|
1837
|
+
stickyFirstColumn: O = !1,
|
|
1838
|
+
bottomOffset: T = 0,
|
|
1822
1839
|
compact: P = !0,
|
|
1823
|
-
restrictHeight:
|
|
1824
|
-
minTableWidth:
|
|
1840
|
+
restrictHeight: J = !0,
|
|
1841
|
+
minTableWidth: W
|
|
1825
1842
|
}) {
|
|
1826
|
-
const F = e.map((l) => l.key).join(","), [V, Q] =
|
|
1843
|
+
const F = e.map((l) => l.key).join(","), [V, Q] = D(!H), o = re(null), w = re(!H), U = (l, g) => 50 + (l * 17 + g * 13 + 7) % 40, Y = re(null), [X, te] = D(
|
|
1827
1844
|
void 0
|
|
1828
|
-
), [ce, ne] =
|
|
1845
|
+
), [ce, ne] = D(!1);
|
|
1829
1846
|
_(() => {
|
|
1830
|
-
const
|
|
1831
|
-
function
|
|
1847
|
+
const g = c !== !1 ? 32 : 0, E = 12;
|
|
1848
|
+
function I() {
|
|
1832
1849
|
if (ne(window.innerWidth < 640), !Y.current) return;
|
|
1833
1850
|
const G = Y.current.getBoundingClientRect().top;
|
|
1834
1851
|
te(
|
|
1835
1852
|
Math.max(
|
|
1836
1853
|
120,
|
|
1837
|
-
window.innerHeight - G -
|
|
1854
|
+
window.innerHeight - G - g - E - T
|
|
1838
1855
|
)
|
|
1839
1856
|
);
|
|
1840
1857
|
}
|
|
1841
|
-
return
|
|
1842
|
-
}, [a, c,
|
|
1843
|
-
const [Ne, pe] =
|
|
1858
|
+
return I(), window.addEventListener("resize", I), () => window.removeEventListener("resize", I);
|
|
1859
|
+
}, [a, c, T]);
|
|
1860
|
+
const [Ne, pe] = D(
|
|
1844
1861
|
() => e.map((l) => l.key)
|
|
1845
|
-
), [he, de] =
|
|
1862
|
+
), [he, de] = D(
|
|
1846
1863
|
() => Object.fromEntries(
|
|
1847
|
-
e.map((l) => [l.key,
|
|
1864
|
+
e.map((l) => [l.key, Oe(l, Ie(l.width))])
|
|
1848
1865
|
)
|
|
1849
1866
|
);
|
|
1850
1867
|
_(() => {
|
|
1851
|
-
const l = e.map((
|
|
1852
|
-
if (!
|
|
1868
|
+
const l = e.map((E) => E.key);
|
|
1869
|
+
if (!H) {
|
|
1853
1870
|
pe(l), w.current = !1, Q(!0);
|
|
1854
1871
|
return;
|
|
1855
1872
|
}
|
|
1856
|
-
let
|
|
1873
|
+
let g = !1;
|
|
1857
1874
|
return w.current = !1, Q(!1), fetch(
|
|
1858
|
-
`/api/user/preferences/datatables?key=${encodeURIComponent(
|
|
1875
|
+
`/api/user/preferences/datatables?key=${encodeURIComponent(H)}`,
|
|
1859
1876
|
{ cache: "no-store" }
|
|
1860
|
-
).then((
|
|
1877
|
+
).then((E) => E.ok ? E.json() : null).then((E) => {
|
|
1861
1878
|
var Ue, Ye;
|
|
1862
|
-
if (
|
|
1863
|
-
const
|
|
1864
|
-
e.map((fe) => [fe.key,
|
|
1865
|
-
), K = ((Ye =
|
|
1879
|
+
if (g) return;
|
|
1880
|
+
const I = (Ue = E == null ? void 0 : E.settings) == null ? void 0 : Ue.columnOrder, G = Array.isArray(I) ? I.filter((fe) => l.includes(fe)) : [], ue = l.filter((fe) => !G.includes(fe)), be = G.length > 0 ? [...G, ...ue] : l, Me = Object.fromEntries(
|
|
1881
|
+
e.map((fe) => [fe.key, Oe(fe, Ie(fe.width))])
|
|
1882
|
+
), K = ((Ye = E == null ? void 0 : E.settings) == null ? void 0 : Ye.columnWidths) ?? {}, se = Object.fromEntries(
|
|
1866
1883
|
e.map((fe) => [
|
|
1867
1884
|
fe.key,
|
|
1868
|
-
|
|
1885
|
+
Oe(fe, K[fe.key] ?? Me[fe.key])
|
|
1869
1886
|
])
|
|
1870
1887
|
);
|
|
1871
1888
|
pe(be), de(se), o.current = JSON.stringify({
|
|
@@ -1873,145 +1890,145 @@ function Gn({
|
|
|
1873
1890
|
columnWidths: se
|
|
1874
1891
|
}), w.current = !0;
|
|
1875
1892
|
}).catch(() => {
|
|
1876
|
-
if (!
|
|
1893
|
+
if (!g) {
|
|
1877
1894
|
pe(l);
|
|
1878
|
-
const
|
|
1879
|
-
e.map((
|
|
1880
|
-
|
|
1881
|
-
|
|
1895
|
+
const E = Object.fromEntries(
|
|
1896
|
+
e.map((I) => [
|
|
1897
|
+
I.key,
|
|
1898
|
+
Oe(I, Ie(I.width))
|
|
1882
1899
|
])
|
|
1883
1900
|
);
|
|
1884
|
-
de(
|
|
1901
|
+
de(E), o.current = JSON.stringify({
|
|
1885
1902
|
columnOrder: l,
|
|
1886
|
-
columnWidths:
|
|
1903
|
+
columnWidths: E
|
|
1887
1904
|
}), w.current = !0;
|
|
1888
1905
|
}
|
|
1889
1906
|
}).finally(() => {
|
|
1890
|
-
|
|
1907
|
+
g || Q(!0);
|
|
1891
1908
|
}), () => {
|
|
1892
|
-
|
|
1909
|
+
g = !0;
|
|
1893
1910
|
};
|
|
1894
|
-
}, [
|
|
1895
|
-
if (!
|
|
1911
|
+
}, [H, F, e]), _(() => {
|
|
1912
|
+
if (!H || !V || !w.current) return;
|
|
1896
1913
|
const l = {
|
|
1897
1914
|
columnOrder: Ne,
|
|
1898
1915
|
columnWidths: he
|
|
1899
|
-
},
|
|
1900
|
-
if (
|
|
1901
|
-
const
|
|
1916
|
+
}, g = JSON.stringify(l);
|
|
1917
|
+
if (g === o.current) return;
|
|
1918
|
+
const E = window.setTimeout(() => {
|
|
1902
1919
|
fetch("/api/user/preferences/datatables", {
|
|
1903
1920
|
method: "PATCH",
|
|
1904
1921
|
headers: { "Content-Type": "application/json" },
|
|
1905
|
-
body: JSON.stringify({ key:
|
|
1906
|
-
}).then((
|
|
1907
|
-
|
|
1922
|
+
body: JSON.stringify({ key: H, settings: l })
|
|
1923
|
+
}).then((I) => {
|
|
1924
|
+
I.ok && (o.current = g);
|
|
1908
1925
|
}).catch(() => {
|
|
1909
1926
|
});
|
|
1910
1927
|
}, 300);
|
|
1911
|
-
return () => window.clearTimeout(
|
|
1912
|
-
}, [Ne, he,
|
|
1928
|
+
return () => window.clearTimeout(E);
|
|
1929
|
+
}, [Ne, he, H, V]), _(() => {
|
|
1913
1930
|
pe((l) => {
|
|
1914
|
-
const
|
|
1915
|
-
return [...
|
|
1931
|
+
const g = e.map((G) => G.key), E = l.filter((G) => g.includes(G)), I = g.filter((G) => !E.includes(G));
|
|
1932
|
+
return [...E, ...I];
|
|
1916
1933
|
});
|
|
1917
1934
|
}, [F, e]);
|
|
1918
|
-
const
|
|
1935
|
+
const k = Ne.map((l) => e.find((g) => g.key === l)).filter((l) => !!l);
|
|
1919
1936
|
_(() => {
|
|
1920
1937
|
de((l) => {
|
|
1921
|
-
const
|
|
1922
|
-
e.map((
|
|
1938
|
+
const g = Object.fromEntries(
|
|
1939
|
+
e.map((E) => [E.key, Oe(E, Ie(E.width))])
|
|
1923
1940
|
);
|
|
1924
1941
|
return Object.fromEntries(
|
|
1925
|
-
e.map((
|
|
1926
|
-
|
|
1927
|
-
|
|
1942
|
+
e.map((E) => [
|
|
1943
|
+
E.key,
|
|
1944
|
+
Oe(E, l[E.key] ?? g[E.key])
|
|
1928
1945
|
])
|
|
1929
1946
|
);
|
|
1930
1947
|
});
|
|
1931
1948
|
}, [F, e]);
|
|
1932
1949
|
const j = re(null);
|
|
1933
1950
|
_(() => {
|
|
1934
|
-
function l(
|
|
1935
|
-
const
|
|
1936
|
-
if (!
|
|
1937
|
-
const G =
|
|
1951
|
+
function l(E) {
|
|
1952
|
+
const I = j.current;
|
|
1953
|
+
if (!I) return;
|
|
1954
|
+
const G = E.clientX - I.startX, ue = e.find((be) => be.key === I.colKey);
|
|
1938
1955
|
ue && de((be) => ({
|
|
1939
1956
|
...be,
|
|
1940
|
-
[
|
|
1957
|
+
[I.colKey]: Oe(ue, I.startWidth + G)
|
|
1941
1958
|
}));
|
|
1942
1959
|
}
|
|
1943
|
-
function
|
|
1960
|
+
function g() {
|
|
1944
1961
|
j.current && (j.current = null, document.body.style.cursor = "", document.body.style.userSelect = "");
|
|
1945
1962
|
}
|
|
1946
|
-
return document.addEventListener("pointermove", l), document.addEventListener("pointerup",
|
|
1947
|
-
document.removeEventListener("pointermove", l), document.removeEventListener("pointerup",
|
|
1963
|
+
return document.addEventListener("pointermove", l), document.addEventListener("pointerup", g), () => {
|
|
1964
|
+
document.removeEventListener("pointermove", l), document.removeEventListener("pointerup", g);
|
|
1948
1965
|
};
|
|
1949
1966
|
}, [e]);
|
|
1950
|
-
const q = re(null), [ae, oe] =
|
|
1951
|
-
function
|
|
1952
|
-
q.current = l,
|
|
1967
|
+
const q = re(null), [ae, oe] = D(null);
|
|
1968
|
+
function z(l, g) {
|
|
1969
|
+
q.current = l, g.dataTransfer.effectAllowed = "move";
|
|
1953
1970
|
}
|
|
1954
|
-
function ke(l,
|
|
1955
|
-
|
|
1971
|
+
function ke(l, g) {
|
|
1972
|
+
g.preventDefault(), g.dataTransfer.dropEffect = "move", ae !== l && oe(l);
|
|
1956
1973
|
}
|
|
1957
|
-
function Re(l,
|
|
1958
|
-
|
|
1959
|
-
const
|
|
1960
|
-
|
|
1961
|
-
const G = [...
|
|
1974
|
+
function Re(l, g) {
|
|
1975
|
+
g.preventDefault();
|
|
1976
|
+
const E = q.current;
|
|
1977
|
+
E !== null && E !== l && pe((I) => {
|
|
1978
|
+
const G = [...I], [ue] = G.splice(E, 1);
|
|
1962
1979
|
return G.splice(l, 0, ue), G;
|
|
1963
1980
|
}), q.current = null, oe(null);
|
|
1964
1981
|
}
|
|
1965
1982
|
function Qe() {
|
|
1966
1983
|
q.current = null, oe(null);
|
|
1967
1984
|
}
|
|
1968
|
-
const [me, He] =
|
|
1985
|
+
const [me, He] = D(null);
|
|
1969
1986
|
function ie(l) {
|
|
1970
1987
|
l.sortKey && He(
|
|
1971
|
-
(
|
|
1988
|
+
(g) => (g == null ? void 0 : g.key) === l.key ? { key: l.key, dir: g.dir === "asc" ? "desc" : "asc" } : { key: l.key, dir: "asc" }
|
|
1972
1989
|
);
|
|
1973
1990
|
}
|
|
1974
|
-
const [We,
|
|
1991
|
+
const [We, Be] = D(1), [Le, Fe] = D(
|
|
1975
1992
|
c === !1 ? 0 : c
|
|
1976
1993
|
);
|
|
1977
1994
|
_(() => {
|
|
1978
|
-
|
|
1995
|
+
Be(1);
|
|
1979
1996
|
}, [r]);
|
|
1980
|
-
const Se = !!(
|
|
1997
|
+
const Se = !!(M && $), ve = c !== !1, x = Se ? L ?? 1 : We, ee = Se || ve ? Le : r.length, Z = !!d && !!h && !!N, ye = Z ? 40 : 0, le = Z && r.length > 0 && d.size === r.length, De = Z && d.size > 0 && d.size < r.length, Ce = ge.useMemo(() => {
|
|
1981
1998
|
if (!me) return r;
|
|
1982
|
-
const l = e.find((
|
|
1983
|
-
return l != null && l.sortKey ? [...r].sort((
|
|
1984
|
-
const
|
|
1999
|
+
const l = e.find((g) => g.key === me.key && g.sortKey);
|
|
2000
|
+
return l != null && l.sortKey ? [...r].sort((g, E) => {
|
|
2001
|
+
const I = g[l.sortKey], G = E[l.sortKey], ue = I === G ? 0 : I == null ? 1 : G == null || I < G ? -1 : 1;
|
|
1985
2002
|
return me.dir === "asc" ? ue : -ue;
|
|
1986
2003
|
}) : r;
|
|
1987
|
-
}, [r, me, e]),
|
|
2004
|
+
}, [r, me, e]), mt = ge.useMemo(() => {
|
|
1988
2005
|
if (Se || !ve) return Ce;
|
|
1989
|
-
const l = (
|
|
2006
|
+
const l = (x - 1) * ee;
|
|
1990
2007
|
return Ce.slice(l, l + ee);
|
|
1991
|
-
}, [Ce, Se, ve,
|
|
2008
|
+
}, [Ce, Se, ve, x, ee]), Ae = C ?? r.length, et = ve ? Math.max(1, Math.ceil(Ae / ee)) : 1, Xt = ve ? (x - 1) * ee + 1 : 1, Vt = ve ? Math.min(x * ee, Ae) : Ae;
|
|
1992
2009
|
function tt(l) {
|
|
1993
|
-
const
|
|
1994
|
-
Se ?
|
|
2010
|
+
const g = Math.max(1, Math.min(l, et));
|
|
2011
|
+
Se ? M(g) : Be(g);
|
|
1995
2012
|
}
|
|
1996
|
-
function
|
|
1997
|
-
Fe(l), Se ? (
|
|
2013
|
+
function Zt(l) {
|
|
2014
|
+
Fe(l), Se ? ($(l), M(1)) : Be(1), $ && $(l);
|
|
1998
2015
|
}
|
|
1999
|
-
const
|
|
2000
|
-
function
|
|
2016
|
+
const ft = (l) => l === "center" ? "text-center" : l === "right" ? "text-right" : "text-left", Jt = "color-mix(in srgb, var(--primary) 6%, var(--bg-card))", Kt = k.length + (Z ? 1 : 0);
|
|
2017
|
+
function pt(l) {
|
|
2001
2018
|
return l ? typeof l == "string" ? { key: l, label: l } : l : null;
|
|
2002
2019
|
}
|
|
2003
|
-
const
|
|
2020
|
+
const ht = () => /* @__PURE__ */ i(
|
|
2004
2021
|
"tr",
|
|
2005
2022
|
{
|
|
2006
2023
|
style: {
|
|
2007
2024
|
background: "color-mix(in srgb, var(--bg-input) 72%, transparent)"
|
|
2008
2025
|
},
|
|
2009
2026
|
children: [
|
|
2010
|
-
|
|
2027
|
+
Z && /* @__PURE__ */ t(
|
|
2011
2028
|
"th",
|
|
2012
2029
|
{
|
|
2013
2030
|
className: `${P ? "px-2 py-1.5" : "px-3 py-2.5"} w-10`,
|
|
2014
|
-
style:
|
|
2031
|
+
style: O ? {
|
|
2015
2032
|
position: "sticky",
|
|
2016
2033
|
left: 0,
|
|
2017
2034
|
zIndex: 12,
|
|
@@ -2038,12 +2055,12 @@ function Gn({
|
|
|
2038
2055
|
)
|
|
2039
2056
|
}
|
|
2040
2057
|
),
|
|
2041
|
-
|
|
2042
|
-
const
|
|
2058
|
+
k.map((l, g) => {
|
|
2059
|
+
const E = (me == null ? void 0 : me.key) === l.key, I = !!l.sortKey, G = O && !ce && g === 0, ue = ae === g, Me = (he[l.key] ?? Ie(l.width)) < 120;
|
|
2043
2060
|
return /* @__PURE__ */ i(
|
|
2044
2061
|
"th",
|
|
2045
2062
|
{
|
|
2046
|
-
className: `group select-none ${Me ? "text-left" :
|
|
2063
|
+
className: `group select-none ${Me ? "text-left" : ft(l.align)}`,
|
|
2047
2064
|
style: {
|
|
2048
2065
|
...G ? {
|
|
2049
2066
|
position: "sticky",
|
|
@@ -2059,24 +2076,24 @@ function Gn({
|
|
|
2059
2076
|
borderBottom: "2px solid var(--border)",
|
|
2060
2077
|
borderRight: "1px solid var(--border)"
|
|
2061
2078
|
},
|
|
2062
|
-
color:
|
|
2079
|
+
color: E ? "var(--primary)" : "var(--text-muted)",
|
|
2063
2080
|
whiteSpace: "nowrap",
|
|
2064
2081
|
transition: "color 0.15s",
|
|
2065
2082
|
borderLeft: ue ? "2px solid var(--primary)" : "2px solid transparent",
|
|
2066
|
-
cursor:
|
|
2083
|
+
cursor: I ? "pointer" : "default",
|
|
2067
2084
|
// Padding: room for grip icon left, resize handle right
|
|
2068
2085
|
padding: P ? "5px 24px 5px 6px" : "7px 28px 7px 6px"
|
|
2069
2086
|
},
|
|
2070
|
-
onDragOver: (K) => ke(
|
|
2071
|
-
onDrop: (K) => Re(
|
|
2072
|
-
onClick:
|
|
2087
|
+
onDragOver: (K) => ke(g, K),
|
|
2088
|
+
onDrop: (K) => Re(g, K),
|
|
2089
|
+
onClick: I ? () => ie(l) : void 0,
|
|
2073
2090
|
children: [
|
|
2074
2091
|
/* @__PURE__ */ t(
|
|
2075
2092
|
"span",
|
|
2076
2093
|
{
|
|
2077
2094
|
draggable: !0,
|
|
2078
2095
|
onDragStart: (K) => {
|
|
2079
|
-
K.stopPropagation(),
|
|
2096
|
+
K.stopPropagation(), z(g, K);
|
|
2080
2097
|
},
|
|
2081
2098
|
onDragEnd: (K) => {
|
|
2082
2099
|
K.stopPropagation(), Qe();
|
|
@@ -2089,11 +2106,11 @@ function Gn({
|
|
|
2089
2106
|
color: "var(--text-muted)",
|
|
2090
2107
|
verticalAlign: "middle"
|
|
2091
2108
|
},
|
|
2092
|
-
children: /* @__PURE__ */ t(
|
|
2109
|
+
children: /* @__PURE__ */ t(Nr, { size: 15 })
|
|
2093
2110
|
}
|
|
2094
2111
|
),
|
|
2095
2112
|
/* @__PURE__ */ t(
|
|
2096
|
-
|
|
2113
|
+
Ct,
|
|
2097
2114
|
{
|
|
2098
2115
|
className: "inline-block max-w-full align-middle",
|
|
2099
2116
|
style: {
|
|
@@ -2106,7 +2123,7 @@ function Gn({
|
|
|
2106
2123
|
className: `inline-flex max-w-full items-center gap-1 font-semibold uppercase tracking-wider ${P ? "text-[11px]" : "text-xs"}`,
|
|
2107
2124
|
children: [
|
|
2108
2125
|
/* @__PURE__ */ t("span", { className: "min-w-0 truncate", children: l.header }),
|
|
2109
|
-
|
|
2126
|
+
I && /* @__PURE__ */ t("span", { className: "flex-shrink-0 opacity-60", children: E ? me.dir === "asc" ? /* @__PURE__ */ t(sr, { className: "w-3 h-3" }) : /* @__PURE__ */ t(_e, { className: "w-3 h-3" }) : /* @__PURE__ */ t(lr, { className: "w-3 h-3 opacity-40" }) })
|
|
2110
2127
|
]
|
|
2111
2128
|
}
|
|
2112
2129
|
)
|
|
@@ -2149,9 +2166,9 @@ function Gn({
|
|
|
2149
2166
|
})
|
|
2150
2167
|
]
|
|
2151
2168
|
}
|
|
2152
|
-
),
|
|
2169
|
+
), bt = () => {
|
|
2153
2170
|
if (!ve || a) return null;
|
|
2154
|
-
const l =
|
|
2171
|
+
const l = en(x, et);
|
|
2155
2172
|
return /* @__PURE__ */ i(
|
|
2156
2173
|
"div",
|
|
2157
2174
|
{
|
|
@@ -2159,24 +2176,24 @@ function Gn({
|
|
|
2159
2176
|
style: { borderColor: "var(--border)", background: "var(--bg-input)" },
|
|
2160
2177
|
children: [
|
|
2161
2178
|
/* @__PURE__ */ i("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2162
|
-
/* @__PURE__ */ t("span", { style: { color: "var(--text-muted)" }, children: Ae === 0 ? "0 filas" : `${
|
|
2179
|
+
/* @__PURE__ */ t("span", { style: { color: "var(--text-muted)" }, children: Ae === 0 ? "0 filas" : `${Xt}–${Vt} de ${Ae}` }),
|
|
2163
2180
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-1", children: [
|
|
2164
2181
|
/* @__PURE__ */ t("span", { style: { color: "var(--text-muted)" }, children: "Filas:" }),
|
|
2165
2182
|
/* @__PURE__ */ t(
|
|
2166
|
-
|
|
2183
|
+
Wt,
|
|
2167
2184
|
{
|
|
2168
2185
|
value: String(ee),
|
|
2169
|
-
onChange: (
|
|
2170
|
-
options: y.map((
|
|
2171
|
-
value: String(
|
|
2172
|
-
label: String(
|
|
2186
|
+
onChange: (g) => Zt(Number(g)),
|
|
2187
|
+
options: y.map((g) => ({
|
|
2188
|
+
value: String(g),
|
|
2189
|
+
label: String(g)
|
|
2173
2190
|
})),
|
|
2174
2191
|
placeholder: "Filas",
|
|
2175
2192
|
searchable: !1,
|
|
2176
|
-
height:
|
|
2177
|
-
padding:
|
|
2193
|
+
height: R,
|
|
2194
|
+
padding: A,
|
|
2178
2195
|
className: "shrink-0 [&>button]:rounded-md [&>button]:text-xs [&_svg]:h-3.5 [&_svg]:w-3.5",
|
|
2179
|
-
style: { width:
|
|
2196
|
+
style: { width: B }
|
|
2180
2197
|
}
|
|
2181
2198
|
)
|
|
2182
2199
|
] })
|
|
@@ -2185,41 +2202,41 @@ function Gn({
|
|
|
2185
2202
|
/* @__PURE__ */ t(
|
|
2186
2203
|
"button",
|
|
2187
2204
|
{
|
|
2188
|
-
disabled:
|
|
2189
|
-
onClick: () => tt(
|
|
2205
|
+
disabled: x <= 1,
|
|
2206
|
+
onClick: () => tt(x - 1),
|
|
2190
2207
|
className: "rounded p-0.5 transition-colors disabled:opacity-30",
|
|
2191
2208
|
style: { color: "var(--text-muted)", background: "transparent" },
|
|
2192
2209
|
children: /* @__PURE__ */ t(je, { className: "h-3.5 w-3.5" })
|
|
2193
2210
|
}
|
|
2194
2211
|
),
|
|
2195
2212
|
l.map(
|
|
2196
|
-
(
|
|
2213
|
+
(g, E) => g === "..." ? /* @__PURE__ */ t(
|
|
2197
2214
|
"span",
|
|
2198
2215
|
{
|
|
2199
2216
|
className: "px-1",
|
|
2200
2217
|
style: { color: "var(--text-muted)" },
|
|
2201
2218
|
children: "…"
|
|
2202
2219
|
},
|
|
2203
|
-
`e${
|
|
2220
|
+
`e${E}`
|
|
2204
2221
|
) : /* @__PURE__ */ t(
|
|
2205
2222
|
"button",
|
|
2206
2223
|
{
|
|
2207
|
-
onClick: () => tt(
|
|
2224
|
+
onClick: () => tt(g),
|
|
2208
2225
|
className: "h-5 w-5 rounded text-[11px] font-medium transition-colors",
|
|
2209
2226
|
style: {
|
|
2210
|
-
background:
|
|
2211
|
-
color:
|
|
2227
|
+
background: g === x ? "var(--primary)" : "transparent",
|
|
2228
|
+
color: g === x ? "var(--primary-fg)" : "var(--text-muted)"
|
|
2212
2229
|
},
|
|
2213
|
-
children:
|
|
2230
|
+
children: g
|
|
2214
2231
|
},
|
|
2215
|
-
|
|
2232
|
+
g
|
|
2216
2233
|
)
|
|
2217
2234
|
),
|
|
2218
2235
|
/* @__PURE__ */ t(
|
|
2219
2236
|
"button",
|
|
2220
2237
|
{
|
|
2221
|
-
disabled:
|
|
2222
|
-
onClick: () => tt(
|
|
2238
|
+
disabled: x >= et,
|
|
2239
|
+
onClick: () => tt(x + 1),
|
|
2223
2240
|
className: "rounded p-0.5 transition-colors disabled:opacity-30",
|
|
2224
2241
|
style: { color: "var(--text-muted)", background: "transparent" },
|
|
2225
2242
|
children: /* @__PURE__ */ t(Te, { className: "h-3.5 w-3.5" })
|
|
@@ -2243,12 +2260,12 @@ function Gn({
|
|
|
2243
2260
|
ref: Y,
|
|
2244
2261
|
className: "min-w-0 max-w-full overflow-hidden rounded-t-xl",
|
|
2245
2262
|
children: /* @__PURE__ */ t(
|
|
2246
|
-
|
|
2263
|
+
wt,
|
|
2247
2264
|
{
|
|
2248
2265
|
options: { scrollbars: { autoHide: "leave", autoHideDelay: 200 } },
|
|
2249
2266
|
className: "w-full",
|
|
2250
2267
|
style: {
|
|
2251
|
-
maxHeight:
|
|
2268
|
+
maxHeight: J ? X : void 0,
|
|
2252
2269
|
maxWidth: "100%"
|
|
2253
2270
|
},
|
|
2254
2271
|
defer: !0,
|
|
@@ -2259,14 +2276,14 @@ function Gn({
|
|
|
2259
2276
|
style: {
|
|
2260
2277
|
tableLayout: "fixed",
|
|
2261
2278
|
width: "100%",
|
|
2262
|
-
minWidth:
|
|
2279
|
+
minWidth: W ?? "max-content",
|
|
2263
2280
|
borderCollapse: "separate",
|
|
2264
2281
|
borderSpacing: 0
|
|
2265
2282
|
},
|
|
2266
2283
|
children: [
|
|
2267
2284
|
/* @__PURE__ */ i("colgroup", { children: [
|
|
2268
|
-
|
|
2269
|
-
|
|
2285
|
+
Z && /* @__PURE__ */ t("col", { style: { width: 40 } }),
|
|
2286
|
+
k.map((l) => /* @__PURE__ */ t(
|
|
2270
2287
|
"col",
|
|
2271
2288
|
{
|
|
2272
2289
|
style: { width: he[l.key] ?? 150 }
|
|
@@ -2277,18 +2294,18 @@ function Gn({
|
|
|
2277
2294
|
/* @__PURE__ */ t(
|
|
2278
2295
|
"thead",
|
|
2279
2296
|
{
|
|
2280
|
-
style:
|
|
2297
|
+
style: v ? {
|
|
2281
2298
|
position: "sticky",
|
|
2282
2299
|
top: 0,
|
|
2283
2300
|
zIndex: 10,
|
|
2284
2301
|
backdropFilter: "blur(14px)",
|
|
2285
2302
|
WebkitBackdropFilter: "blur(14px)"
|
|
2286
2303
|
} : void 0,
|
|
2287
|
-
children:
|
|
2304
|
+
children: ht()
|
|
2288
2305
|
}
|
|
2289
2306
|
),
|
|
2290
|
-
/* @__PURE__ */ t("tbody", { children: Array.from({ length: s }).map((l,
|
|
2291
|
-
|
|
2307
|
+
/* @__PURE__ */ t("tbody", { children: Array.from({ length: s }).map((l, g) => /* @__PURE__ */ i("tr", { children: [
|
|
2308
|
+
Z && /* @__PURE__ */ t(
|
|
2292
2309
|
"td",
|
|
2293
2310
|
{
|
|
2294
2311
|
className: `${P ? "px-2 py-1.5" : "px-3 py-2"} w-10`,
|
|
@@ -2298,11 +2315,11 @@ function Gn({
|
|
|
2298
2315
|
}
|
|
2299
2316
|
}
|
|
2300
2317
|
),
|
|
2301
|
-
|
|
2318
|
+
k.map((E, I) => /* @__PURE__ */ t(
|
|
2302
2319
|
"td",
|
|
2303
2320
|
{
|
|
2304
2321
|
className: P ? "px-2 py-1.5" : "px-3 py-2",
|
|
2305
|
-
style:
|
|
2322
|
+
style: O && !ce && I === 0 ? {
|
|
2306
2323
|
position: "sticky",
|
|
2307
2324
|
left: ye,
|
|
2308
2325
|
zIndex: 1,
|
|
@@ -2321,15 +2338,15 @@ function Gn({
|
|
|
2321
2338
|
className: "h-3.5 rounded-full animate-pulse",
|
|
2322
2339
|
style: {
|
|
2323
2340
|
background: "var(--border)",
|
|
2324
|
-
width: `${U(
|
|
2341
|
+
width: `${U(g, I)}%`,
|
|
2325
2342
|
minWidth: 32
|
|
2326
2343
|
}
|
|
2327
2344
|
}
|
|
2328
2345
|
)
|
|
2329
2346
|
},
|
|
2330
|
-
|
|
2347
|
+
E.key
|
|
2331
2348
|
))
|
|
2332
|
-
] },
|
|
2349
|
+
] }, g)) })
|
|
2333
2350
|
]
|
|
2334
2351
|
}
|
|
2335
2352
|
)
|
|
@@ -2337,7 +2354,7 @@ function Gn({
|
|
|
2337
2354
|
)
|
|
2338
2355
|
}
|
|
2339
2356
|
),
|
|
2340
|
-
|
|
2357
|
+
bt()
|
|
2341
2358
|
]
|
|
2342
2359
|
}
|
|
2343
2360
|
) : !a && r.length === 0 ? /* @__PURE__ */ i("div", { className: "py-20 flex flex-col items-center gap-3", children: [
|
|
@@ -2355,12 +2372,12 @@ function Gn({
|
|
|
2355
2372
|
ref: Y,
|
|
2356
2373
|
className: "min-w-0 max-w-full overflow-hidden rounded-t-xl",
|
|
2357
2374
|
children: /* @__PURE__ */ t(
|
|
2358
|
-
|
|
2375
|
+
wt,
|
|
2359
2376
|
{
|
|
2360
2377
|
options: { scrollbars: { autoHide: "leave", autoHideDelay: 200 } },
|
|
2361
2378
|
className: "w-full",
|
|
2362
2379
|
style: {
|
|
2363
|
-
maxHeight:
|
|
2380
|
+
maxHeight: J ? X : void 0,
|
|
2364
2381
|
maxWidth: "100%"
|
|
2365
2382
|
},
|
|
2366
2383
|
defer: !0,
|
|
@@ -2371,14 +2388,14 @@ function Gn({
|
|
|
2371
2388
|
style: {
|
|
2372
2389
|
tableLayout: "fixed",
|
|
2373
2390
|
width: "100%",
|
|
2374
|
-
minWidth:
|
|
2391
|
+
minWidth: W ?? "max-content",
|
|
2375
2392
|
borderCollapse: "separate",
|
|
2376
2393
|
borderSpacing: 0
|
|
2377
2394
|
},
|
|
2378
2395
|
children: [
|
|
2379
2396
|
/* @__PURE__ */ i("colgroup", { children: [
|
|
2380
|
-
|
|
2381
|
-
|
|
2397
|
+
Z && /* @__PURE__ */ t("col", { style: { width: 40 } }),
|
|
2398
|
+
k.map((l) => /* @__PURE__ */ t(
|
|
2382
2399
|
"col",
|
|
2383
2400
|
{
|
|
2384
2401
|
style: { width: he[l.key] ?? 150 }
|
|
@@ -2389,23 +2406,25 @@ function Gn({
|
|
|
2389
2406
|
/* @__PURE__ */ t(
|
|
2390
2407
|
"thead",
|
|
2391
2408
|
{
|
|
2392
|
-
style:
|
|
2409
|
+
style: v ? {
|
|
2393
2410
|
position: "sticky",
|
|
2394
2411
|
top: 0,
|
|
2395
2412
|
zIndex: 10,
|
|
2396
2413
|
backdropFilter: "blur(14px)",
|
|
2397
2414
|
WebkitBackdropFilter: "blur(14px)"
|
|
2398
2415
|
} : void 0,
|
|
2399
|
-
children:
|
|
2416
|
+
children: ht()
|
|
2400
2417
|
}
|
|
2401
2418
|
),
|
|
2402
|
-
/* @__PURE__ */ t("tbody", { children:
|
|
2403
|
-
const
|
|
2419
|
+
/* @__PURE__ */ t("tbody", { children: mt.map((l, g) => {
|
|
2420
|
+
const E = n(l), I = pt(m == null ? void 0 : m(l)), G = g > 0 ? pt(
|
|
2421
|
+
m == null ? void 0 : m(mt[g - 1])
|
|
2422
|
+
) : null, ue = I && I.key !== (G == null ? void 0 : G.key), be = Z && d.has(E), Me = !!p, K = be && S ? "color-mix(in srgb, var(--primary) 8%, var(--bg-card))" : g % 2 === 1 ? "color-mix(in srgb, var(--bg-input) 50%, var(--bg-card))" : "var(--bg-card)";
|
|
2404
2423
|
return /* @__PURE__ */ i(ge.Fragment, { children: [
|
|
2405
|
-
ue && /* @__PURE__ */ t("tr", { className:
|
|
2424
|
+
ue && /* @__PURE__ */ t("tr", { className: I.className ?? "", children: /* @__PURE__ */ t(
|
|
2406
2425
|
"td",
|
|
2407
2426
|
{
|
|
2408
|
-
colSpan:
|
|
2427
|
+
colSpan: Kt,
|
|
2409
2428
|
className: P ? "px-2 py-2" : "px-3 py-3",
|
|
2410
2429
|
style: {
|
|
2411
2430
|
background: "color-mix(in srgb, var(--primary) 8%, var(--bg-input))",
|
|
@@ -2413,8 +2432,8 @@ function Gn({
|
|
|
2413
2432
|
borderRight: "1px solid var(--border)"
|
|
2414
2433
|
},
|
|
2415
2434
|
children: /* @__PURE__ */ t("div", { className: "flex min-w-0 items-center justify-between gap-3", children: /* @__PURE__ */ i("div", { className: "min-w-0", children: [
|
|
2416
|
-
/* @__PURE__ */ t("div", { className: "truncate text-xs font-semibold uppercase tracking-wider text-[var(--text-main)]", children:
|
|
2417
|
-
|
|
2435
|
+
/* @__PURE__ */ t("div", { className: "truncate text-xs font-semibold uppercase tracking-wider text-[var(--text-main)]", children: I.label }),
|
|
2436
|
+
I.description && /* @__PURE__ */ t("div", { className: "mt-0.5 truncate text-xs text-[var(--text-muted)]", children: I.description })
|
|
2418
2437
|
] }) })
|
|
2419
2438
|
}
|
|
2420
2439
|
) }),
|
|
@@ -2422,7 +2441,7 @@ function Gn({
|
|
|
2422
2441
|
"tr",
|
|
2423
2442
|
{
|
|
2424
2443
|
onClick: Me ? () => p(l) : void 0,
|
|
2425
|
-
className: `transition-colors ${Me ? "cursor-pointer" : ""} ${
|
|
2444
|
+
className: `transition-colors ${Me ? "cursor-pointer" : ""} ${b ? b(l) : ""}`,
|
|
2426
2445
|
style: {
|
|
2427
2446
|
"--dt-row-bg": K,
|
|
2428
2447
|
"--dt-sticky-bg": K,
|
|
@@ -2434,7 +2453,7 @@ function Gn({
|
|
|
2434
2453
|
"var(--bg-hover)"
|
|
2435
2454
|
), se.currentTarget.style.setProperty(
|
|
2436
2455
|
"--dt-sticky-bg",
|
|
2437
|
-
|
|
2456
|
+
Jt
|
|
2438
2457
|
));
|
|
2439
2458
|
},
|
|
2440
2459
|
onMouseLeave: (se) => {
|
|
@@ -2444,11 +2463,11 @@ function Gn({
|
|
|
2444
2463
|
);
|
|
2445
2464
|
},
|
|
2446
2465
|
children: [
|
|
2447
|
-
|
|
2466
|
+
Z && /* @__PURE__ */ t(
|
|
2448
2467
|
"td",
|
|
2449
2468
|
{
|
|
2450
2469
|
className: `${P ? "px-2 py-1.5" : "px-3 py-2"} w-10`,
|
|
2451
|
-
style:
|
|
2470
|
+
style: O ? {
|
|
2452
2471
|
position: "sticky",
|
|
2453
2472
|
left: 0,
|
|
2454
2473
|
zIndex: 3,
|
|
@@ -2459,7 +2478,7 @@ function Gn({
|
|
|
2459
2478
|
borderRight: "1px solid var(--border)"
|
|
2460
2479
|
},
|
|
2461
2480
|
onClick: (se) => {
|
|
2462
|
-
se.stopPropagation(), h(
|
|
2481
|
+
se.stopPropagation(), h(E);
|
|
2463
2482
|
},
|
|
2464
2483
|
children: /* @__PURE__ */ t(
|
|
2465
2484
|
"input",
|
|
@@ -2467,18 +2486,18 @@ function Gn({
|
|
|
2467
2486
|
type: "checkbox",
|
|
2468
2487
|
checked: be,
|
|
2469
2488
|
onClick: (se) => se.stopPropagation(),
|
|
2470
|
-
onChange: () => h(
|
|
2489
|
+
onChange: () => h(E),
|
|
2471
2490
|
className: "rounded cursor-pointer accent-[var(--primary)]"
|
|
2472
2491
|
}
|
|
2473
2492
|
)
|
|
2474
2493
|
}
|
|
2475
2494
|
),
|
|
2476
|
-
|
|
2477
|
-
const Ye =
|
|
2495
|
+
k.map((se, Ue) => {
|
|
2496
|
+
const Ye = O && !ce && Ue === 0;
|
|
2478
2497
|
return /* @__PURE__ */ t(
|
|
2479
2498
|
"td",
|
|
2480
2499
|
{
|
|
2481
|
-
className: `${P ? "px-2 py-1.5" : "px-3 py-2"} ${
|
|
2500
|
+
className: `${P ? "px-2 py-1.5" : "px-3 py-2"} ${Qr} ${ft(se.align)} ${se.className ?? ""}`,
|
|
2482
2501
|
style: {
|
|
2483
2502
|
overflow: "hidden",
|
|
2484
2503
|
whiteSpace: "nowrap",
|
|
@@ -2494,7 +2513,7 @@ function Gn({
|
|
|
2494
2513
|
borderRight: "1px solid var(--border)"
|
|
2495
2514
|
}
|
|
2496
2515
|
},
|
|
2497
|
-
children: /* @__PURE__ */ t(
|
|
2516
|
+
children: /* @__PURE__ */ t(Ct, { children: se.cell(l) })
|
|
2498
2517
|
},
|
|
2499
2518
|
se.key
|
|
2500
2519
|
);
|
|
@@ -2502,7 +2521,7 @@ function Gn({
|
|
|
2502
2521
|
]
|
|
2503
2522
|
}
|
|
2504
2523
|
)
|
|
2505
|
-
] },
|
|
2524
|
+
] }, E);
|
|
2506
2525
|
}) })
|
|
2507
2526
|
]
|
|
2508
2527
|
}
|
|
@@ -2511,22 +2530,22 @@ function Gn({
|
|
|
2511
2530
|
)
|
|
2512
2531
|
}
|
|
2513
2532
|
),
|
|
2514
|
-
|
|
2533
|
+
bt()
|
|
2515
2534
|
]
|
|
2516
2535
|
}
|
|
2517
2536
|
);
|
|
2518
2537
|
}
|
|
2519
|
-
function
|
|
2538
|
+
function Pe(e) {
|
|
2520
2539
|
return e ? /* @__PURE__ */ new Date(`${e}T12:00:00`) : void 0;
|
|
2521
2540
|
}
|
|
2522
|
-
function
|
|
2541
|
+
function $t(e) {
|
|
2523
2542
|
return e.toISOString().slice(0, 10);
|
|
2524
2543
|
}
|
|
2525
|
-
function
|
|
2544
|
+
function tn({
|
|
2526
2545
|
calendarMonth: e,
|
|
2527
2546
|
displayIndex: r
|
|
2528
2547
|
}) {
|
|
2529
|
-
const { previousMonth: n, nextMonth: a, goToMonth: s, months: u, labels: f, formatters: p } =
|
|
2548
|
+
const { previousMonth: n, nextMonth: a, goToMonth: s, months: u, labels: f, formatters: p } = Sr(), d = !!n && r === 0, h = !!a && r === u.length - 1;
|
|
2530
2549
|
return /* @__PURE__ */ i(
|
|
2531
2550
|
"div",
|
|
2532
2551
|
{
|
|
@@ -2591,10 +2610,10 @@ function Gr({
|
|
|
2591
2610
|
}
|
|
2592
2611
|
);
|
|
2593
2612
|
}
|
|
2594
|
-
function
|
|
2613
|
+
function rn(e) {
|
|
2595
2614
|
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
2596
2615
|
}
|
|
2597
|
-
function
|
|
2616
|
+
function ra({
|
|
2598
2617
|
startDate: e,
|
|
2599
2618
|
endDate: r,
|
|
2600
2619
|
onChange: n,
|
|
@@ -2606,13 +2625,13 @@ function Xn({
|
|
|
2606
2625
|
endLabel: d = "Regreso"
|
|
2607
2626
|
}) {
|
|
2608
2627
|
const h = {
|
|
2609
|
-
from:
|
|
2610
|
-
to:
|
|
2611
|
-
}, N =
|
|
2612
|
-
|
|
2628
|
+
from: Pe(e),
|
|
2629
|
+
to: Pe(r)
|
|
2630
|
+
}, N = Pe(a), [S, b] = D(
|
|
2631
|
+
Pe(s || e)
|
|
2613
2632
|
);
|
|
2614
2633
|
return _(() => {
|
|
2615
|
-
|
|
2634
|
+
b(Pe(s || e));
|
|
2616
2635
|
}, [s, e]), /* @__PURE__ */ i("div", { children: [
|
|
2617
2636
|
/* @__PURE__ */ t(
|
|
2618
2637
|
"div",
|
|
@@ -2627,22 +2646,22 @@ function Xn({
|
|
|
2627
2646
|
padding: "10px 8px"
|
|
2628
2647
|
},
|
|
2629
2648
|
children: /* @__PURE__ */ t(
|
|
2630
|
-
|
|
2649
|
+
kr,
|
|
2631
2650
|
{
|
|
2632
2651
|
mode: "range",
|
|
2633
2652
|
selected: h,
|
|
2634
|
-
month:
|
|
2635
|
-
onMonthChange:
|
|
2653
|
+
month: S,
|
|
2654
|
+
onMonthChange: b,
|
|
2636
2655
|
onSelect: (m) => {
|
|
2637
|
-
const
|
|
2638
|
-
n({ startDate:
|
|
2656
|
+
const v = m != null && m.from ? $t(m.from) : e, c = m != null && m.to ? $t(m.to) : "";
|
|
2657
|
+
n({ startDate: v, endDate: c });
|
|
2639
2658
|
},
|
|
2640
2659
|
numberOfMonths: u,
|
|
2641
2660
|
hideNavigation: !0,
|
|
2642
2661
|
disabled: N ? { before: N } : void 0,
|
|
2643
2662
|
showOutsideDays: !1,
|
|
2644
2663
|
components: {
|
|
2645
|
-
MonthCaption:
|
|
2664
|
+
MonthCaption: tn
|
|
2646
2665
|
},
|
|
2647
2666
|
className: "text-sm",
|
|
2648
2667
|
classNames: {
|
|
@@ -2734,7 +2753,7 @@ function Xn({
|
|
|
2734
2753
|
}
|
|
2735
2754
|
},
|
|
2736
2755
|
formatters: {
|
|
2737
|
-
formatCaption: (m) =>
|
|
2756
|
+
formatCaption: (m) => rn(
|
|
2738
2757
|
new Intl.DateTimeFormat("es-MX", {
|
|
2739
2758
|
month: "long",
|
|
2740
2759
|
year: "numeric"
|
|
@@ -2781,7 +2800,7 @@ function Xn({
|
|
|
2781
2800
|
)
|
|
2782
2801
|
] });
|
|
2783
2802
|
}
|
|
2784
|
-
function
|
|
2803
|
+
function na({
|
|
2785
2804
|
open: e,
|
|
2786
2805
|
onClose: r,
|
|
2787
2806
|
title: n,
|
|
@@ -2793,12 +2812,12 @@ function Vn({
|
|
|
2793
2812
|
confirmDisabled: d = !1,
|
|
2794
2813
|
headerActions: h,
|
|
2795
2814
|
bodyClassName: N = "flex-1 overflow-y-auto px-6 py-5",
|
|
2796
|
-
width:
|
|
2797
|
-
children:
|
|
2815
|
+
width: S = 440,
|
|
2816
|
+
children: b
|
|
2798
2817
|
}) {
|
|
2799
|
-
const [m,
|
|
2818
|
+
const [m, v] = D(!1);
|
|
2800
2819
|
return _(() => {
|
|
2801
|
-
|
|
2820
|
+
v(!0);
|
|
2802
2821
|
}, []), _(() => (document.body.style.overflow = e ? "hidden" : "", () => {
|
|
2803
2822
|
document.body.style.overflow = "";
|
|
2804
2823
|
}), [e]), _(() => {
|
|
@@ -2826,7 +2845,7 @@ function Vn({
|
|
|
2826
2845
|
{
|
|
2827
2846
|
className: `absolute inset-y-0 right-0 flex flex-col shadow-2xl transition-transform duration-300 ${e ? "translate-x-0" : "translate-x-full"}`,
|
|
2828
2847
|
style: {
|
|
2829
|
-
width: `min(100vw, ${
|
|
2848
|
+
width: `min(100vw, ${S}px)`,
|
|
2830
2849
|
background: "var(--bg-card)",
|
|
2831
2850
|
borderLeft: "1px solid var(--border)"
|
|
2832
2851
|
},
|
|
@@ -2877,7 +2896,7 @@ function Vn({
|
|
|
2877
2896
|
{
|
|
2878
2897
|
variant: "primary",
|
|
2879
2898
|
size: "sm",
|
|
2880
|
-
icon: /* @__PURE__ */ t(
|
|
2899
|
+
icon: /* @__PURE__ */ t(Cr, { className: "w-4 h-4" }),
|
|
2881
2900
|
onClick: f,
|
|
2882
2901
|
loading: p,
|
|
2883
2902
|
disabled: d,
|
|
@@ -2889,7 +2908,7 @@ function Vn({
|
|
|
2889
2908
|
]
|
|
2890
2909
|
}
|
|
2891
2910
|
),
|
|
2892
|
-
/* @__PURE__ */ t("div", { "data-drawer-scroll": "true", className: N, children:
|
|
2911
|
+
/* @__PURE__ */ t("div", { "data-drawer-scroll": "true", className: N, children: b })
|
|
2893
2912
|
]
|
|
2894
2913
|
}
|
|
2895
2914
|
)
|
|
@@ -2899,23 +2918,23 @@ function Vn({
|
|
|
2899
2918
|
document.body
|
|
2900
2919
|
) : null;
|
|
2901
2920
|
}
|
|
2902
|
-
var
|
|
2921
|
+
var Ut = {
|
|
2903
2922
|
color: void 0,
|
|
2904
2923
|
size: void 0,
|
|
2905
2924
|
className: void 0,
|
|
2906
2925
|
style: void 0,
|
|
2907
2926
|
attr: void 0
|
|
2908
|
-
},
|
|
2909
|
-
function
|
|
2927
|
+
}, Et = ge.createContext && /* @__PURE__ */ ge.createContext(Ut), nn = ["attr", "size", "title"];
|
|
2928
|
+
function an(e, r) {
|
|
2910
2929
|
if (e == null) return {};
|
|
2911
|
-
var n, a, s =
|
|
2930
|
+
var n, a, s = on(e, r);
|
|
2912
2931
|
if (Object.getOwnPropertySymbols) {
|
|
2913
2932
|
var u = Object.getOwnPropertySymbols(e);
|
|
2914
2933
|
for (a = 0; a < u.length; a++) n = u[a], r.indexOf(n) === -1 && {}.propertyIsEnumerable.call(e, n) && (s[n] = e[n]);
|
|
2915
2934
|
}
|
|
2916
2935
|
return s;
|
|
2917
2936
|
}
|
|
2918
|
-
function
|
|
2937
|
+
function on(e, r) {
|
|
2919
2938
|
if (e == null) return {};
|
|
2920
2939
|
var n = {};
|
|
2921
2940
|
for (var a in e) if ({}.hasOwnProperty.call(e, a)) {
|
|
@@ -2933,7 +2952,7 @@ function Ve() {
|
|
|
2933
2952
|
return e;
|
|
2934
2953
|
}, Ve.apply(null, arguments);
|
|
2935
2954
|
}
|
|
2936
|
-
function
|
|
2955
|
+
function Mt(e, r) {
|
|
2937
2956
|
var n = Object.keys(e);
|
|
2938
2957
|
if (Object.getOwnPropertySymbols) {
|
|
2939
2958
|
var a = Object.getOwnPropertySymbols(e);
|
|
@@ -2943,25 +2962,25 @@ function $t(e, r) {
|
|
|
2943
2962
|
}
|
|
2944
2963
|
return n;
|
|
2945
2964
|
}
|
|
2946
|
-
function
|
|
2965
|
+
function Ze(e) {
|
|
2947
2966
|
for (var r = 1; r < arguments.length; r++) {
|
|
2948
2967
|
var n = arguments[r] != null ? arguments[r] : {};
|
|
2949
|
-
r % 2 ?
|
|
2950
|
-
|
|
2951
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) :
|
|
2968
|
+
r % 2 ? Mt(Object(n), !0).forEach(function(a) {
|
|
2969
|
+
sn(e, a, n[a]);
|
|
2970
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Mt(Object(n)).forEach(function(a) {
|
|
2952
2971
|
Object.defineProperty(e, a, Object.getOwnPropertyDescriptor(n, a));
|
|
2953
2972
|
});
|
|
2954
2973
|
}
|
|
2955
2974
|
return e;
|
|
2956
2975
|
}
|
|
2957
|
-
function
|
|
2958
|
-
return (r =
|
|
2976
|
+
function sn(e, r, n) {
|
|
2977
|
+
return (r = ln(r)) in e ? Object.defineProperty(e, r, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = n, e;
|
|
2959
2978
|
}
|
|
2960
|
-
function
|
|
2961
|
-
var r =
|
|
2979
|
+
function ln(e) {
|
|
2980
|
+
var r = cn(e, "string");
|
|
2962
2981
|
return typeof r == "symbol" ? r : r + "";
|
|
2963
2982
|
}
|
|
2964
|
-
function
|
|
2983
|
+
function cn(e, r) {
|
|
2965
2984
|
if (typeof e != "object" || !e) return e;
|
|
2966
2985
|
var n = e[Symbol.toPrimitive];
|
|
2967
2986
|
if (n !== void 0) {
|
|
@@ -2971,30 +2990,30 @@ function en(e, r) {
|
|
|
2971
2990
|
}
|
|
2972
2991
|
return (r === "string" ? String : Number)(e);
|
|
2973
2992
|
}
|
|
2974
|
-
function
|
|
2975
|
-
return e && e.map((r, n) => /* @__PURE__ */ ge.createElement(r.tag,
|
|
2993
|
+
function Yt(e) {
|
|
2994
|
+
return e && e.map((r, n) => /* @__PURE__ */ ge.createElement(r.tag, Ze({
|
|
2976
2995
|
key: n
|
|
2977
|
-
}, r.attr),
|
|
2996
|
+
}, r.attr), Yt(r.child)));
|
|
2978
2997
|
}
|
|
2979
|
-
function
|
|
2980
|
-
return (r) => /* @__PURE__ */ ge.createElement(
|
|
2981
|
-
attr:
|
|
2982
|
-
}, r),
|
|
2998
|
+
function qt(e) {
|
|
2999
|
+
return (r) => /* @__PURE__ */ ge.createElement(dn, Ve({
|
|
3000
|
+
attr: Ze({}, e.attr)
|
|
3001
|
+
}, r), Yt(e.child));
|
|
2983
3002
|
}
|
|
2984
|
-
function
|
|
3003
|
+
function dn(e) {
|
|
2985
3004
|
var r = (n) => {
|
|
2986
3005
|
var {
|
|
2987
3006
|
attr: a,
|
|
2988
3007
|
size: s,
|
|
2989
3008
|
title: u
|
|
2990
|
-
} = e, f =
|
|
3009
|
+
} = e, f = an(e, nn), p = s || n.size || "1em", d;
|
|
2991
3010
|
return n.className && (d = n.className), e.className && (d = (d ? d + " " : "") + e.className), /* @__PURE__ */ ge.createElement("svg", Ve({
|
|
2992
3011
|
stroke: "currentColor",
|
|
2993
3012
|
fill: "currentColor",
|
|
2994
3013
|
strokeWidth: "0"
|
|
2995
3014
|
}, n.attr, a, f, {
|
|
2996
3015
|
className: d,
|
|
2997
|
-
style:
|
|
3016
|
+
style: Ze(Ze({
|
|
2998
3017
|
color: e.color || n.color
|
|
2999
3018
|
}, n.style), e.style),
|
|
3000
3019
|
height: p,
|
|
@@ -3002,13 +3021,13 @@ function tn(e) {
|
|
|
3002
3021
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3003
3022
|
}), u && /* @__PURE__ */ ge.createElement("title", null, u), e.children);
|
|
3004
3023
|
};
|
|
3005
|
-
return
|
|
3024
|
+
return Et !== void 0 ? /* @__PURE__ */ ge.createElement(Et.Consumer, null, (n) => r(n)) : r(Ut);
|
|
3006
3025
|
}
|
|
3007
|
-
function
|
|
3008
|
-
return
|
|
3026
|
+
function un(e) {
|
|
3027
|
+
return qt({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M247.31,124.76c-.35-.79-8.82-19.58-27.65-38.41C194.57,61.26,162.88,48,128,48S61.43,61.26,36.34,86.35C17.51,105.18,9,124,8.69,124.76a8,8,0,0,0,0,6.5c.35.79,8.82,19.57,27.65,38.4C61.43,194.74,93.12,208,128,208s66.57-13.26,91.66-38.34c18.83-18.83,27.3-37.61,27.65-38.4A8,8,0,0,0,247.31,124.76ZM128,192c-30.78,0-57.67-11.19-79.93-33.25A133.47,133.47,0,0,1,25,128,133.33,133.33,0,0,1,48.07,97.25C70.33,75.19,97.22,64,128,64s57.67,11.19,79.93,33.25A133.46,133.46,0,0,1,231.05,128C223.84,141.46,192.43,192,128,192Zm0-112a48,48,0,1,0,48,48A48.05,48.05,0,0,0,128,80Zm0,80a32,32,0,1,1,32-32A32,32,0,0,1,128,160Z" }, child: [] }] })(e);
|
|
3009
3028
|
}
|
|
3010
|
-
function
|
|
3011
|
-
return
|
|
3029
|
+
function mn(e) {
|
|
3030
|
+
return qt({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M228,175a8,8,0,0,1-10.92-3l-19-33.2A123.23,123.23,0,0,1,162,155.46l5.87,35.22a8,8,0,0,1-6.58,9.21A8.4,8.4,0,0,1,160,200a8,8,0,0,1-7.88-6.69l-5.77-34.58a133.06,133.06,0,0,1-36.68,0l-5.77,34.58A8,8,0,0,1,96,200a8.4,8.4,0,0,1-1.32-.11,8,8,0,0,1-6.58-9.21L94,155.46a123.23,123.23,0,0,1-36.06-16.69L39,172A8,8,0,1,1,25.06,164l20-35a153.47,153.47,0,0,1-19.3-20A8,8,0,1,1,38.22,99c16.6,20.54,45.64,45,89.78,45s73.18-24.49,89.78-45A8,8,0,1,1,230.22,109a153.47,153.47,0,0,1-19.3,20l20,35A8,8,0,0,1,228,175Z" }, child: [] }] })(e);
|
|
3012
3031
|
}
|
|
3013
3032
|
function at({
|
|
3014
3033
|
className: e = "",
|
|
@@ -3022,7 +3041,7 @@ function at({
|
|
|
3022
3041
|
}
|
|
3023
3042
|
);
|
|
3024
3043
|
}
|
|
3025
|
-
function
|
|
3044
|
+
function aa({
|
|
3026
3045
|
label: e,
|
|
3027
3046
|
containerClassName: r = "",
|
|
3028
3047
|
helperText: n,
|
|
@@ -3034,42 +3053,42 @@ function Jn({
|
|
|
3034
3053
|
required: d,
|
|
3035
3054
|
...h
|
|
3036
3055
|
}) {
|
|
3037
|
-
const [N,
|
|
3038
|
-
top:
|
|
3056
|
+
const [N, S] = D(() => !!h.autoFocus), [b, m] = D(!1), v = h.type === "password" && f, c = v && b ? "text" : h.type, y = h.value !== void 0 ? String(h.value).length > 0 : h.defaultValue !== void 0 && String(h.defaultValue).length > 0, B = N || y, R = {
|
|
3057
|
+
top: B ? 8 : 15,
|
|
3039
3058
|
color: N ? "var(--primary)" : "var(--text-muted)",
|
|
3040
|
-
fontSize:
|
|
3041
|
-
fontWeight:
|
|
3042
|
-
textTransform:
|
|
3043
|
-
},
|
|
3044
|
-
var
|
|
3045
|
-
|
|
3046
|
-
},
|
|
3047
|
-
var
|
|
3048
|
-
|
|
3049
|
-
},
|
|
3059
|
+
fontSize: B ? 11 : 14,
|
|
3060
|
+
fontWeight: B ? 600 : 400,
|
|
3061
|
+
textTransform: B ? "uppercase" : "none"
|
|
3062
|
+
}, A = (M) => {
|
|
3063
|
+
var $;
|
|
3064
|
+
S(!0), ($ = h.onFocus) == null || $.call(h, M);
|
|
3065
|
+
}, C = (M) => {
|
|
3066
|
+
var $;
|
|
3067
|
+
S(!1), ($ = h.onBlur) == null || $.call(h, M);
|
|
3068
|
+
}, L = v ? /* @__PURE__ */ i(
|
|
3050
3069
|
"button",
|
|
3051
3070
|
{
|
|
3052
3071
|
type: "button",
|
|
3053
|
-
"aria-label":
|
|
3054
|
-
"aria-pressed":
|
|
3072
|
+
"aria-label": b ? "Ocultar contraseña" : "Mostrar contraseña",
|
|
3073
|
+
"aria-pressed": b,
|
|
3055
3074
|
className: "absolute right-2.5 top-1/2 flex h-7 w-7 -translate-y-1/2 items-center justify-center rounded-md text-[var(--text-muted)] transition-colors duration-200 hover:text-[var(--primary)] focus:outline-none",
|
|
3056
3075
|
tabIndex: -1,
|
|
3057
|
-
onClick: () => m((
|
|
3076
|
+
onClick: () => m((M) => !M),
|
|
3058
3077
|
children: [
|
|
3059
3078
|
/* @__PURE__ */ t(
|
|
3060
3079
|
"span",
|
|
3061
3080
|
{
|
|
3062
3081
|
"aria-hidden": "true",
|
|
3063
|
-
className: `absolute inset-0 flex items-center justify-center transition-[opacity,transform] duration-200 ease-out ${
|
|
3064
|
-
children: /* @__PURE__ */ t(
|
|
3082
|
+
className: `absolute inset-0 flex items-center justify-center transition-[opacity,transform] duration-200 ease-out ${b ? "scale-y-0 rotate-[-8deg] opacity-0" : "scale-y-100 rotate-0 opacity-100"}`,
|
|
3083
|
+
children: /* @__PURE__ */ t(un, { className: "h-[18px] w-[18px]" })
|
|
3065
3084
|
}
|
|
3066
3085
|
),
|
|
3067
3086
|
/* @__PURE__ */ t(
|
|
3068
3087
|
"span",
|
|
3069
3088
|
{
|
|
3070
3089
|
"aria-hidden": "true",
|
|
3071
|
-
className: `absolute inset-0 flex items-center justify-center transition-[opacity,transform] duration-200 ease-out ${
|
|
3072
|
-
children: /* @__PURE__ */ t(
|
|
3090
|
+
className: `absolute inset-0 flex items-center justify-center transition-[opacity,transform] duration-200 ease-out ${b ? "scale-y-100 rotate-0 opacity-100" : "scale-y-0 rotate-[8deg] opacity-0"}`,
|
|
3091
|
+
children: /* @__PURE__ */ t(mn, { className: "h-[18px] w-[18px]" })
|
|
3073
3092
|
}
|
|
3074
3093
|
)
|
|
3075
3094
|
]
|
|
@@ -3086,16 +3105,16 @@ function Jn({
|
|
|
3086
3105
|
placeholder: " ",
|
|
3087
3106
|
"aria-invalid": !!a || h["aria-invalid"],
|
|
3088
3107
|
"data-has-value": y ? "true" : void 0,
|
|
3089
|
-
className: `h-12 w-full pt-5 ${
|
|
3090
|
-
onFocus:
|
|
3091
|
-
onBlur:
|
|
3108
|
+
className: `h-12 w-full pt-5 ${v ? "pr-10" : ""} ${p}`,
|
|
3109
|
+
onFocus: A,
|
|
3110
|
+
onBlur: C
|
|
3092
3111
|
}
|
|
3093
3112
|
),
|
|
3094
3113
|
/* @__PURE__ */ i(
|
|
3095
3114
|
"span",
|
|
3096
3115
|
{
|
|
3097
3116
|
className: "pointer-events-none absolute left-3 transition-all duration-150",
|
|
3098
|
-
style:
|
|
3117
|
+
style: R,
|
|
3099
3118
|
children: [
|
|
3100
3119
|
e,
|
|
3101
3120
|
d && /* @__PURE__ */ t("span", { className: "ml-1 text-[var(--danger)]", children: "*" })
|
|
@@ -3106,11 +3125,11 @@ function Jn({
|
|
|
3106
3125
|
"span",
|
|
3107
3126
|
{
|
|
3108
3127
|
className: "absolute right-2 transition-all duration-150",
|
|
3109
|
-
style: { top:
|
|
3128
|
+
style: { top: B ? 8 : 15 },
|
|
3110
3129
|
children: s
|
|
3111
3130
|
}
|
|
3112
3131
|
),
|
|
3113
|
-
|
|
3132
|
+
L
|
|
3114
3133
|
] }),
|
|
3115
3134
|
a ? /* @__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
|
|
3116
3135
|
] }) : /* @__PURE__ */ i("label", { className: `flex flex-col gap-2 ${r}`, children: [
|
|
@@ -3119,7 +3138,7 @@ function Jn({
|
|
|
3119
3138
|
d && /* @__PURE__ */ t("span", { className: "text-[var(--danger)]", children: "*" }),
|
|
3120
3139
|
s && /* @__PURE__ */ t("span", { className: "ml-auto normal-case", children: s })
|
|
3121
3140
|
] }),
|
|
3122
|
-
|
|
3141
|
+
v ? /* @__PURE__ */ i("span", { className: "relative block", children: [
|
|
3123
3142
|
/* @__PURE__ */ t(
|
|
3124
3143
|
at,
|
|
3125
3144
|
{
|
|
@@ -3128,11 +3147,11 @@ function Jn({
|
|
|
3128
3147
|
required: d,
|
|
3129
3148
|
"aria-invalid": !!a || h["aria-invalid"],
|
|
3130
3149
|
className: `w-full pr-10 ${p}`,
|
|
3131
|
-
onFocus:
|
|
3132
|
-
onBlur:
|
|
3150
|
+
onFocus: A,
|
|
3151
|
+
onBlur: C
|
|
3133
3152
|
}
|
|
3134
3153
|
),
|
|
3135
|
-
|
|
3154
|
+
L
|
|
3136
3155
|
] }) : /* @__PURE__ */ t(
|
|
3137
3156
|
at,
|
|
3138
3157
|
{
|
|
@@ -3148,7 +3167,7 @@ function Jn({
|
|
|
3148
3167
|
function $e(...e) {
|
|
3149
3168
|
return e.filter(Boolean).join(" ");
|
|
3150
3169
|
}
|
|
3151
|
-
function
|
|
3170
|
+
function ia({
|
|
3152
3171
|
steps: e,
|
|
3153
3172
|
activeStepId: r,
|
|
3154
3173
|
initialStepId: n,
|
|
@@ -3160,59 +3179,59 @@ function Zn({
|
|
|
3160
3179
|
allowBackNavigation: d = !0,
|
|
3161
3180
|
showFooter: h = !0,
|
|
3162
3181
|
previousLabel: N = "Anterior",
|
|
3163
|
-
nextLabel:
|
|
3164
|
-
blockedNextLabel:
|
|
3182
|
+
nextLabel: S = "Siguiente",
|
|
3183
|
+
blockedNextLabel: b = "Completa este paso",
|
|
3165
3184
|
className: m = "",
|
|
3166
|
-
headerClassName:
|
|
3185
|
+
headerClassName: v = "",
|
|
3167
3186
|
contentClassName: c = "",
|
|
3168
3187
|
footerClassName: y = ""
|
|
3169
3188
|
}) {
|
|
3170
3189
|
var de;
|
|
3171
|
-
const
|
|
3172
|
-
n ??
|
|
3173
|
-
), [
|
|
3190
|
+
const B = ((de = e[0]) == null ? void 0 : de.id) ?? "", [R, A] = D(
|
|
3191
|
+
n ?? B
|
|
3192
|
+
), [C, L] = D(
|
|
3174
3193
|
s
|
|
3175
|
-
),
|
|
3176
|
-
() => new Set(
|
|
3177
|
-
[
|
|
3178
|
-
),
|
|
3194
|
+
), M = r ?? R, $ = a ?? C, H = ze(
|
|
3195
|
+
() => new Set($),
|
|
3196
|
+
[$]
|
|
3197
|
+
), O = Math.max(
|
|
3179
3198
|
0,
|
|
3180
|
-
e.findIndex((
|
|
3181
|
-
),
|
|
3182
|
-
a ||
|
|
3183
|
-
},
|
|
3184
|
-
const j = e.find((q) => q.id ===
|
|
3185
|
-
j && (r ||
|
|
3186
|
-
}, F = (
|
|
3187
|
-
const j = e[
|
|
3188
|
-
return !j || j.disabled ? !1 :
|
|
3189
|
-
}, o = (
|
|
3190
|
-
const j = e.findIndex((q) => q.id ===
|
|
3199
|
+
e.findIndex((k) => k.id === M)
|
|
3200
|
+
), T = e[O] ?? e[0], P = e.length <= 1 ? 100 : O / (e.length - 1) * 100, J = (k) => {
|
|
3201
|
+
a || L(k), f == null || f(k);
|
|
3202
|
+
}, W = (k) => {
|
|
3203
|
+
const j = e.find((q) => q.id === k);
|
|
3204
|
+
j && (r || A(k), u == null || u(k, j));
|
|
3205
|
+
}, F = (k) => H.has(k), V = (k) => e.slice(0, k).find((j) => !j.optional && !H.has(j.id)), Q = (k) => {
|
|
3206
|
+
const j = e[k];
|
|
3207
|
+
return !j || j.disabled ? !1 : k === O || d && k < O ? !0 : !V(k);
|
|
3208
|
+
}, o = (k) => {
|
|
3209
|
+
const j = e.findIndex((q) => q.id === k);
|
|
3191
3210
|
return j >= 0 && Q(j);
|
|
3192
|
-
}, w = (
|
|
3193
|
-
const j = e.findIndex((q) => q.id ===
|
|
3211
|
+
}, w = (k) => {
|
|
3212
|
+
const j = e.findIndex((q) => q.id === k);
|
|
3194
3213
|
if (j < 0) return !1;
|
|
3195
3214
|
if (!Q(j)) {
|
|
3196
3215
|
const q = V(j);
|
|
3197
3216
|
return q && (p == null || p(e[j], q)), !1;
|
|
3198
3217
|
}
|
|
3199
|
-
return
|
|
3200
|
-
}, U = (
|
|
3201
|
-
!
|
|
3202
|
-
}, Y = (
|
|
3203
|
-
if (!
|
|
3204
|
-
const j = e.findIndex((ae) => ae.id ===
|
|
3205
|
-
const oe = e.findIndex((
|
|
3218
|
+
return W(k), !0;
|
|
3219
|
+
}, U = (k = T == null ? void 0 : T.id) => {
|
|
3220
|
+
!k || H.has(k) || J([...$, k]);
|
|
3221
|
+
}, Y = (k = T == null ? void 0 : T.id) => {
|
|
3222
|
+
if (!k) return;
|
|
3223
|
+
const j = e.findIndex((ae) => ae.id === k), q = $.filter((ae) => {
|
|
3224
|
+
const oe = e.findIndex((z) => z.id === ae);
|
|
3206
3225
|
return oe >= 0 && oe < j;
|
|
3207
3226
|
});
|
|
3208
|
-
|
|
3209
|
-
}, X = () =>
|
|
3210
|
-
const
|
|
3211
|
-
return
|
|
3227
|
+
J(q), j >= 0 && O > j && W(k);
|
|
3228
|
+
}, X = () => O <= 0 ? !1 : w(e[O - 1].id), te = () => {
|
|
3229
|
+
const k = e[O + 1];
|
|
3230
|
+
return k ? w(k.id) : !1;
|
|
3212
3231
|
}, ce = {
|
|
3213
|
-
activeStep:
|
|
3214
|
-
activeIndex:
|
|
3215
|
-
completedStepIds:
|
|
3232
|
+
activeStep: T,
|
|
3233
|
+
activeIndex: O,
|
|
3234
|
+
completedStepIds: $,
|
|
3216
3235
|
isCompleted: F,
|
|
3217
3236
|
isUnlocked: o,
|
|
3218
3237
|
completeStep: U,
|
|
@@ -3221,8 +3240,8 @@ function Zn({
|
|
|
3221
3240
|
goNext: te,
|
|
3222
3241
|
goPrevious: X
|
|
3223
3242
|
};
|
|
3224
|
-
if (!
|
|
3225
|
-
const ne = e[
|
|
3243
|
+
if (!T) return null;
|
|
3244
|
+
const ne = e[O + 1], Ne = O > 0, pe = ne ? o(ne.id) : !1, he = typeof T.content == "function" ? T.content(ce) : T.content;
|
|
3226
3245
|
return /* @__PURE__ */ i(
|
|
3227
3246
|
"section",
|
|
3228
3247
|
{
|
|
@@ -3236,7 +3255,7 @@ function Zn({
|
|
|
3236
3255
|
{
|
|
3237
3256
|
className: $e(
|
|
3238
3257
|
"border-b border-[var(--border)] bg-[var(--bg-input)]",
|
|
3239
|
-
|
|
3258
|
+
v
|
|
3240
3259
|
),
|
|
3241
3260
|
children: [
|
|
3242
3261
|
/* @__PURE__ */ t("div", { className: "relative h-1 overflow-hidden bg-[var(--border)]/55", children: /* @__PURE__ */ t(
|
|
@@ -3253,8 +3272,8 @@ function Zn({
|
|
|
3253
3272
|
style: {
|
|
3254
3273
|
gridTemplateColumns: `repeat(${e.length}, minmax(0, 1fr))`
|
|
3255
3274
|
},
|
|
3256
|
-
children: e.map((
|
|
3257
|
-
const q =
|
|
3275
|
+
children: e.map((k, j) => {
|
|
3276
|
+
const q = k.id === T.id, ae = F(k.id), oe = Q(j), z = V(j);
|
|
3258
3277
|
return /* @__PURE__ */ i(
|
|
3259
3278
|
"button",
|
|
3260
3279
|
{
|
|
@@ -3262,8 +3281,8 @@ function Zn({
|
|
|
3262
3281
|
disabled: !oe,
|
|
3263
3282
|
"aria-current": q ? "step" : void 0,
|
|
3264
3283
|
"aria-disabled": !oe,
|
|
3265
|
-
title: !oe &&
|
|
3266
|
-
onClick: () => w(
|
|
3284
|
+
title: !oe && z ? `Completa ${z.title}` : k.title,
|
|
3285
|
+
onClick: () => w(k.id),
|
|
3267
3286
|
className: $e(
|
|
3268
3287
|
"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",
|
|
3269
3288
|
q && "border-[var(--primary)] bg-[var(--bg-card)] shadow-sm",
|
|
@@ -3292,7 +3311,7 @@ function Zn({
|
|
|
3292
3311
|
!ae && !q && oe && "border-[var(--border)] text-[var(--text-muted)]",
|
|
3293
3312
|
!oe && "border-[var(--border)] text-[var(--text-muted)]"
|
|
3294
3313
|
),
|
|
3295
|
-
children: ae ? /* @__PURE__ */ t(
|
|
3314
|
+
children: ae ? /* @__PURE__ */ t(Pt, { className: "h-4 w-4" }) : oe ? j + 1 : /* @__PURE__ */ t(cr, { className: "h-3.5 w-3.5" })
|
|
3296
3315
|
}
|
|
3297
3316
|
),
|
|
3298
3317
|
/* @__PURE__ */ i("span", { className: "min-w-0 flex-1", children: [
|
|
@@ -3306,17 +3325,17 @@ function Zn({
|
|
|
3306
3325
|
children: [
|
|
3307
3326
|
j + 1,
|
|
3308
3327
|
". ",
|
|
3309
|
-
|
|
3328
|
+
k.title
|
|
3310
3329
|
]
|
|
3311
3330
|
}
|
|
3312
3331
|
),
|
|
3313
|
-
|
|
3332
|
+
k.description && /* @__PURE__ */ t("span", { className: "mt-1 block truncate text-[11px] text-[var(--text-muted)]", children: k.description })
|
|
3314
3333
|
] }),
|
|
3315
|
-
|
|
3334
|
+
k.badge && /* @__PURE__ */ t("span", { className: "shrink-0", children: k.badge })
|
|
3316
3335
|
] })
|
|
3317
3336
|
]
|
|
3318
3337
|
},
|
|
3319
|
-
|
|
3338
|
+
k.id
|
|
3320
3339
|
);
|
|
3321
3340
|
})
|
|
3322
3341
|
}
|
|
@@ -3333,7 +3352,7 @@ function Zn({
|
|
|
3333
3352
|
),
|
|
3334
3353
|
children: he
|
|
3335
3354
|
},
|
|
3336
|
-
|
|
3355
|
+
T.id
|
|
3337
3356
|
),
|
|
3338
3357
|
h && /* @__PURE__ */ i(
|
|
3339
3358
|
"div",
|
|
@@ -3358,13 +3377,13 @@ function Zn({
|
|
|
3358
3377
|
/* @__PURE__ */ i("div", { className: "flex items-center gap-3 text-xs text-[var(--text-muted)]", children: [
|
|
3359
3378
|
/* @__PURE__ */ i("span", { children: [
|
|
3360
3379
|
"Paso ",
|
|
3361
|
-
|
|
3380
|
+
O + 1,
|
|
3362
3381
|
" de ",
|
|
3363
3382
|
e.length
|
|
3364
3383
|
] }),
|
|
3365
3384
|
/* @__PURE__ */ t("span", { className: "h-1 w-1 rounded-full bg-[var(--border)]" }),
|
|
3366
3385
|
/* @__PURE__ */ i("span", { children: [
|
|
3367
|
-
|
|
3386
|
+
$.length,
|
|
3368
3387
|
" completados"
|
|
3369
3388
|
] })
|
|
3370
3389
|
] }),
|
|
@@ -3376,7 +3395,7 @@ function Zn({
|
|
|
3376
3395
|
icon: /* @__PURE__ */ t(Te, {}),
|
|
3377
3396
|
disabled: !ne || !pe,
|
|
3378
3397
|
onClick: te,
|
|
3379
|
-
children: ne && !pe ?
|
|
3398
|
+
children: ne && !pe ? b : S
|
|
3380
3399
|
}
|
|
3381
3400
|
)
|
|
3382
3401
|
]
|
|
@@ -3386,7 +3405,7 @@ function Zn({
|
|
|
3386
3405
|
}
|
|
3387
3406
|
);
|
|
3388
3407
|
}
|
|
3389
|
-
const
|
|
3408
|
+
const fn = {
|
|
3390
3409
|
xs: {
|
|
3391
3410
|
width: 28,
|
|
3392
3411
|
height: 16,
|
|
@@ -3400,7 +3419,7 @@ const an = {
|
|
|
3400
3419
|
padding: 2
|
|
3401
3420
|
}
|
|
3402
3421
|
};
|
|
3403
|
-
function
|
|
3422
|
+
function oa({
|
|
3404
3423
|
checked: e,
|
|
3405
3424
|
disabled: r,
|
|
3406
3425
|
onCheckedChange: n,
|
|
@@ -3408,7 +3427,7 @@ function Kn({
|
|
|
3408
3427
|
className: s = "",
|
|
3409
3428
|
...u
|
|
3410
3429
|
}) {
|
|
3411
|
-
const f =
|
|
3430
|
+
const f = fn[a], p = e ? f.width - f.thumb - f.padding * 2 : 0;
|
|
3412
3431
|
return /* @__PURE__ */ t(
|
|
3413
3432
|
"button",
|
|
3414
3433
|
{
|
|
@@ -3442,11 +3461,11 @@ function Kn({
|
|
|
3442
3461
|
}
|
|
3443
3462
|
);
|
|
3444
3463
|
}
|
|
3445
|
-
const
|
|
3464
|
+
const Ot = [
|
|
3446
3465
|
".sidebar-scroll",
|
|
3447
3466
|
"[data-overlay-scroll='true']"
|
|
3448
3467
|
].join(",");
|
|
3449
|
-
function
|
|
3468
|
+
function pn(e) {
|
|
3450
3469
|
if (!(e instanceof HTMLElement) || e.dataset.overlayScroll === "false" || e.closest("[data-overlayscrollbars]") || e.matches("textarea,input,select,[contenteditable='true']"))
|
|
3451
3470
|
return !1;
|
|
3452
3471
|
const r = window.getComputedStyle(e);
|
|
@@ -3456,33 +3475,33 @@ function on(e) {
|
|
|
3456
3475
|
r.overflowY
|
|
3457
3476
|
].join(" ").match(/auto|scroll/) || e.clientWidth === 0 && e.clientHeight === 0);
|
|
3458
3477
|
}
|
|
3459
|
-
function
|
|
3478
|
+
function Gt(e) {
|
|
3460
3479
|
return e.classList.contains("sidebar-scroll");
|
|
3461
3480
|
}
|
|
3462
|
-
function
|
|
3463
|
-
|
|
3481
|
+
function Bt(e) {
|
|
3482
|
+
Gt(e) && e.querySelectorAll(".os-scrollbar-horizontal").forEach((r) => {
|
|
3464
3483
|
r.style.display = "none", r.style.height = "0", r.style.pointerEvents = "none";
|
|
3465
3484
|
});
|
|
3466
3485
|
}
|
|
3467
|
-
function
|
|
3486
|
+
function hn() {
|
|
3468
3487
|
return _(() => {
|
|
3469
3488
|
const e = /* @__PURE__ */ new WeakMap();
|
|
3470
3489
|
let r = 0;
|
|
3471
3490
|
const n = () => {
|
|
3472
|
-
r = 0, document.querySelectorAll(
|
|
3473
|
-
if (!
|
|
3474
|
-
if (
|
|
3475
|
-
|
|
3491
|
+
r = 0, document.querySelectorAll(Ot).forEach((u) => {
|
|
3492
|
+
if (!pn(u)) return;
|
|
3493
|
+
if (yt(u)) {
|
|
3494
|
+
Bt(u);
|
|
3476
3495
|
return;
|
|
3477
3496
|
}
|
|
3478
|
-
const p =
|
|
3479
|
-
overflow:
|
|
3497
|
+
const p = yt(u, {
|
|
3498
|
+
overflow: Gt(u) ? { x: "hidden", y: "scroll" } : void 0,
|
|
3480
3499
|
scrollbars: {
|
|
3481
3500
|
autoHide: "leave",
|
|
3482
3501
|
autoHideDelay: 180
|
|
3483
3502
|
}
|
|
3484
3503
|
});
|
|
3485
|
-
|
|
3504
|
+
Bt(u), e.set(u, p);
|
|
3486
3505
|
});
|
|
3487
3506
|
}, a = () => {
|
|
3488
3507
|
r || (r = window.requestAnimationFrame(n));
|
|
@@ -3495,20 +3514,20 @@ function sn() {
|
|
|
3495
3514
|
attributes: !0,
|
|
3496
3515
|
attributeFilter: ["class", "data-overlay-scroll"]
|
|
3497
3516
|
}), window.addEventListener("resize", a), () => {
|
|
3498
|
-
r && window.cancelAnimationFrame(r), s.disconnect(), window.removeEventListener("resize", a), document.querySelectorAll(
|
|
3517
|
+
r && window.cancelAnimationFrame(r), s.disconnect(), window.removeEventListener("resize", a), document.querySelectorAll(Ot).forEach((u) => {
|
|
3499
3518
|
var f;
|
|
3500
3519
|
u instanceof HTMLElement && ((f = e.get(u)) == null || f.destroy());
|
|
3501
3520
|
});
|
|
3502
3521
|
};
|
|
3503
3522
|
}, []), null;
|
|
3504
3523
|
}
|
|
3505
|
-
const
|
|
3524
|
+
const bn = {
|
|
3506
3525
|
xs: { wh: "w-5 h-5", text: "text-[8px]" },
|
|
3507
3526
|
sm: { wh: "w-7 h-7", text: "text-[11px]" },
|
|
3508
3527
|
md: { wh: "w-9 h-9", text: "text-sm" },
|
|
3509
3528
|
lg: { wh: "w-12 h-12", text: "text-base" },
|
|
3510
3529
|
xl: { wh: "w-16 h-16", text: "text-xl" }
|
|
3511
|
-
},
|
|
3530
|
+
}, Tt = [
|
|
3512
3531
|
"bg-indigo-500",
|
|
3513
3532
|
"bg-blue-500",
|
|
3514
3533
|
"bg-emerald-500",
|
|
@@ -3517,30 +3536,30 @@ const ln = {
|
|
|
3517
3536
|
"bg-teal-500",
|
|
3518
3537
|
"bg-rose-500",
|
|
3519
3538
|
"bg-cyan-500"
|
|
3520
|
-
],
|
|
3539
|
+
], xn = {
|
|
3521
3540
|
xs: "text-xs",
|
|
3522
3541
|
sm: "text-sm",
|
|
3523
3542
|
md: "text-base",
|
|
3524
3543
|
lg: "text-lg"
|
|
3525
|
-
},
|
|
3544
|
+
}, vn = "bonsaif.bot", gn = "Bonsaif Bot", yn = {
|
|
3526
3545
|
xs: "p-0.5",
|
|
3527
3546
|
sm: "p-1",
|
|
3528
3547
|
md: "p-1.5",
|
|
3529
3548
|
lg: "p-2",
|
|
3530
3549
|
xl: "p-2.5"
|
|
3531
3550
|
};
|
|
3532
|
-
function
|
|
3551
|
+
function Lt(e) {
|
|
3533
3552
|
return typeof e == "string" ? e.trim() : "";
|
|
3534
3553
|
}
|
|
3535
|
-
function
|
|
3554
|
+
function wn(e) {
|
|
3536
3555
|
let r = 0;
|
|
3537
3556
|
for (const n of e) r = r * 31 + n.charCodeAt(0) & 65535;
|
|
3538
|
-
return
|
|
3557
|
+
return Tt[r % Tt.length];
|
|
3539
3558
|
}
|
|
3540
|
-
function
|
|
3541
|
-
return e ===
|
|
3559
|
+
function Nn(e, r) {
|
|
3560
|
+
return e === vn || r === gn;
|
|
3542
3561
|
}
|
|
3543
|
-
function
|
|
3562
|
+
function kn({
|
|
3544
3563
|
userId: e,
|
|
3545
3564
|
username: r,
|
|
3546
3565
|
name: n,
|
|
@@ -3552,56 +3571,56 @@ function hn({
|
|
|
3552
3571
|
wrapperClassName: d = "",
|
|
3553
3572
|
labelClassName: h = "",
|
|
3554
3573
|
labelSize: N = "xs",
|
|
3555
|
-
avatarVersion:
|
|
3556
|
-
className:
|
|
3574
|
+
avatarVersion: S = 0,
|
|
3575
|
+
className: b = "",
|
|
3557
3576
|
style: m
|
|
3558
3577
|
}) {
|
|
3559
|
-
var
|
|
3560
|
-
const [
|
|
3578
|
+
var W;
|
|
3579
|
+
const [v, c] = D(!1), y = typeof e == "string" && e.trim() && e !== "undefined" && e !== "null" ? e.trim() : "";
|
|
3561
3580
|
_(() => {
|
|
3562
3581
|
c(!1);
|
|
3563
|
-
}, [y,
|
|
3564
|
-
const { wh:
|
|
3582
|
+
}, [y, S]);
|
|
3583
|
+
const { wh: B, text: R } = bn[a], A = Lt(n) || Lt(r) || p, C = A.trim()[0] || "?", L = typeof process < "u" && ((W = process.env) == null ? void 0 : W.NEXT_PUBLIC_BASE_PATH) || "", M = Nn(r, n), $ = y ? `${L}/api/user/avatar/${y}${S ? `?v=${S}` : ""}` : "", O = {
|
|
3565
3584
|
xs: 20,
|
|
3566
3585
|
sm: 28,
|
|
3567
3586
|
md: 36,
|
|
3568
3587
|
lg: 48,
|
|
3569
3588
|
xl: 64
|
|
3570
|
-
}[a],
|
|
3589
|
+
}[a], T = M ? /* @__PURE__ */ t(
|
|
3571
3590
|
"span",
|
|
3572
3591
|
{
|
|
3573
|
-
className: `${
|
|
3592
|
+
className: `${B} ${yn[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 ${b}`,
|
|
3574
3593
|
style: m,
|
|
3575
3594
|
children: /* @__PURE__ */ t(
|
|
3576
3595
|
"img",
|
|
3577
3596
|
{
|
|
3578
|
-
src: `${
|
|
3579
|
-
alt:
|
|
3580
|
-
width:
|
|
3581
|
-
height:
|
|
3597
|
+
src: `${L}/favicon.svg`,
|
|
3598
|
+
alt: A,
|
|
3599
|
+
width: O,
|
|
3600
|
+
height: O,
|
|
3582
3601
|
className: "h-full w-full object-contain"
|
|
3583
3602
|
}
|
|
3584
3603
|
)
|
|
3585
3604
|
}
|
|
3586
|
-
) :
|
|
3605
|
+
) : $ && !v ? /* @__PURE__ */ t(
|
|
3587
3606
|
"img",
|
|
3588
3607
|
{
|
|
3589
|
-
src:
|
|
3590
|
-
alt:
|
|
3591
|
-
width:
|
|
3592
|
-
height:
|
|
3593
|
-
className: `${
|
|
3608
|
+
src: $,
|
|
3609
|
+
alt: A,
|
|
3610
|
+
width: O,
|
|
3611
|
+
height: O,
|
|
3612
|
+
className: `${B} rounded-full object-cover flex-shrink-0 ${b}`,
|
|
3594
3613
|
style: m,
|
|
3595
3614
|
onError: () => c(!0)
|
|
3596
3615
|
},
|
|
3597
|
-
`${y}-${
|
|
3616
|
+
`${y}-${S}`
|
|
3598
3617
|
) : /* @__PURE__ */ t(
|
|
3599
3618
|
"span",
|
|
3600
3619
|
{
|
|
3601
|
-
className: `${
|
|
3620
|
+
className: `${B} ${wn(A)} ${R} rounded-full flex items-center justify-center font-black text-white uppercase flex-shrink-0 ${b}`,
|
|
3602
3621
|
style: m,
|
|
3603
|
-
title:
|
|
3604
|
-
children:
|
|
3622
|
+
title: A,
|
|
3623
|
+
children: C
|
|
3605
3624
|
}
|
|
3606
3625
|
);
|
|
3607
3626
|
if (s)
|
|
@@ -3610,39 +3629,39 @@ function hn({
|
|
|
3610
3629
|
{
|
|
3611
3630
|
className: `inline-flex min-w-0 items-center gap-2 ${d}`,
|
|
3612
3631
|
children: [
|
|
3613
|
-
|
|
3632
|
+
T,
|
|
3614
3633
|
/* @__PURE__ */ t(
|
|
3615
3634
|
"span",
|
|
3616
3635
|
{
|
|
3617
|
-
className: `min-w-0 truncate ${
|
|
3618
|
-
title:
|
|
3619
|
-
children:
|
|
3636
|
+
className: `min-w-0 truncate ${xn[N]} font-medium text-[var(--text-main)] ${h}`,
|
|
3637
|
+
title: A,
|
|
3638
|
+
children: A
|
|
3620
3639
|
}
|
|
3621
3640
|
)
|
|
3622
3641
|
]
|
|
3623
3642
|
}
|
|
3624
3643
|
);
|
|
3625
|
-
const P = u ?? !0,
|
|
3626
|
-
return P &&
|
|
3627
|
-
|
|
3644
|
+
const P = u ?? !0, J = f ?? A;
|
|
3645
|
+
return P && J ? /* @__PURE__ */ t(
|
|
3646
|
+
ut,
|
|
3628
3647
|
{
|
|
3629
3648
|
as: "span",
|
|
3630
|
-
content:
|
|
3649
|
+
content: J,
|
|
3631
3650
|
className: `inline-flex flex-shrink-0 ${d}`,
|
|
3632
|
-
children:
|
|
3651
|
+
children: T
|
|
3633
3652
|
}
|
|
3634
|
-
) :
|
|
3653
|
+
) : T;
|
|
3635
3654
|
}
|
|
3636
|
-
function
|
|
3655
|
+
function Sn({ href: e, className: r, children: n }) {
|
|
3637
3656
|
return /* @__PURE__ */ t("a", { href: e, className: r, children: n });
|
|
3638
3657
|
}
|
|
3639
|
-
function
|
|
3658
|
+
function Cn(e) {
|
|
3640
3659
|
return e.reduce((r, n) => {
|
|
3641
3660
|
const a = n.section ?? "Principal";
|
|
3642
3661
|
return r[a] = [...r[a] ?? [], n], r;
|
|
3643
3662
|
}, {});
|
|
3644
3663
|
}
|
|
3645
|
-
function
|
|
3664
|
+
function $n({
|
|
3646
3665
|
children: e,
|
|
3647
3666
|
navItems: r = [],
|
|
3648
3667
|
currentPath: n = typeof window > "u" ? "/" : window.location.pathname,
|
|
@@ -3652,19 +3671,19 @@ function vn({
|
|
|
3652
3671
|
header: f,
|
|
3653
3672
|
footer: p,
|
|
3654
3673
|
onLogout: d,
|
|
3655
|
-
LinkComponent: h =
|
|
3674
|
+
LinkComponent: h = Sn
|
|
3656
3675
|
}) {
|
|
3657
|
-
const [N,
|
|
3676
|
+
const [N, S] = D(!1), b = Cn(r);
|
|
3658
3677
|
return /* @__PURE__ */ i("div", { className: "min-h-screen bg-[var(--bg-main)] text-[var(--text-main)]", children: [
|
|
3659
|
-
/* @__PURE__ */ t(
|
|
3678
|
+
/* @__PURE__ */ t(hn, {}),
|
|
3660
3679
|
/* @__PURE__ */ t(
|
|
3661
3680
|
"button",
|
|
3662
3681
|
{
|
|
3663
3682
|
type: "button",
|
|
3664
3683
|
"aria-label": "Abrir navegación",
|
|
3665
3684
|
className: "fixed left-3 top-3 z-50 inline-flex h-9 w-9 items-center justify-center rounded-md border border-white/10 bg-black/70 text-white lg:hidden",
|
|
3666
|
-
onClick: () =>
|
|
3667
|
-
children: /* @__PURE__ */ t(
|
|
3685
|
+
onClick: () => S(!0),
|
|
3686
|
+
children: /* @__PURE__ */ t(dr, { className: "h-5 w-5" })
|
|
3668
3687
|
}
|
|
3669
3688
|
),
|
|
3670
3689
|
N && /* @__PURE__ */ t(
|
|
@@ -3673,7 +3692,7 @@ function vn({
|
|
|
3673
3692
|
type: "button",
|
|
3674
3693
|
"aria-label": "Cerrar navegación",
|
|
3675
3694
|
className: "fixed inset-0 z-40 bg-black/45 lg:hidden",
|
|
3676
|
-
onClick: () =>
|
|
3695
|
+
onClick: () => S(!1)
|
|
3677
3696
|
}
|
|
3678
3697
|
),
|
|
3679
3698
|
/* @__PURE__ */ i(
|
|
@@ -3690,7 +3709,7 @@ function vn({
|
|
|
3690
3709
|
type: "button",
|
|
3691
3710
|
"aria-label": "Cerrar navegación",
|
|
3692
3711
|
className: "inline-flex h-8 w-8 items-center justify-center rounded-md text-white/70 hover:bg-white/10 lg:hidden",
|
|
3693
|
-
onClick: () =>
|
|
3712
|
+
onClick: () => S(!1),
|
|
3694
3713
|
children: /* @__PURE__ */ t(Ee, { className: "h-5 w-5" })
|
|
3695
3714
|
}
|
|
3696
3715
|
)
|
|
@@ -3700,12 +3719,12 @@ function vn({
|
|
|
3700
3719
|
{
|
|
3701
3720
|
className: "sidebar-scroll min-h-0 flex-1 overflow-y-auto px-3 py-4",
|
|
3702
3721
|
"data-overlay-scroll": "true",
|
|
3703
|
-
children: Object.entries(
|
|
3722
|
+
children: Object.entries(b).map(([m, v]) => /* @__PURE__ */ i("div", { className: "mb-5", children: [
|
|
3704
3723
|
/* @__PURE__ */ i("div", { className: "mb-2 flex items-center gap-2 px-2 text-[11px] font-semibold uppercase tracking-wide text-white/35", children: [
|
|
3705
3724
|
/* @__PURE__ */ t(_e, { className: "h-3.5 w-3.5" }),
|
|
3706
3725
|
m
|
|
3707
3726
|
] }),
|
|
3708
|
-
/* @__PURE__ */ t("div", { className: "space-y-1", children:
|
|
3727
|
+
/* @__PURE__ */ t("div", { className: "space-y-1", children: v.map((c) => {
|
|
3709
3728
|
const y = n === c.href || n.startsWith(`${c.href}/`);
|
|
3710
3729
|
return /* @__PURE__ */ i(
|
|
3711
3730
|
h,
|
|
@@ -3726,7 +3745,7 @@ function vn({
|
|
|
3726
3745
|
/* @__PURE__ */ i("div", { className: "border-t border-white/10 p-3", children: [
|
|
3727
3746
|
a && /* @__PURE__ */ i("div", { className: "mb-3 flex min-w-0 items-center gap-3 rounded-lg bg-white/[0.04] p-2", children: [
|
|
3728
3747
|
/* @__PURE__ */ t(
|
|
3729
|
-
|
|
3748
|
+
kn,
|
|
3730
3749
|
{
|
|
3731
3750
|
name: a.initials ?? a.name ?? a.email ?? "Usuario",
|
|
3732
3751
|
size: "md"
|
|
@@ -3744,7 +3763,7 @@ function vn({
|
|
|
3744
3763
|
className: "w-full justify-start text-white hover:bg-white/10",
|
|
3745
3764
|
onClick: d,
|
|
3746
3765
|
children: [
|
|
3747
|
-
/* @__PURE__ */ t(
|
|
3766
|
+
/* @__PURE__ */ t(ur, { className: "h-4 w-4" }),
|
|
3748
3767
|
" Salir"
|
|
3749
3768
|
]
|
|
3750
3769
|
}
|
|
@@ -3760,7 +3779,7 @@ function vn({
|
|
|
3760
3779
|
] })
|
|
3761
3780
|
] });
|
|
3762
3781
|
}
|
|
3763
|
-
const
|
|
3782
|
+
const En = {
|
|
3764
3783
|
dashboard: "Dashboard",
|
|
3765
3784
|
tickets: "Tickets",
|
|
3766
3785
|
teams: "Equipos",
|
|
@@ -3784,29 +3803,29 @@ const gn = {
|
|
|
3784
3803
|
"security-incidents": "Incidentes",
|
|
3785
3804
|
"guard-schedule": "Guardias"
|
|
3786
3805
|
}, it = {
|
|
3787
|
-
dashboard: /* @__PURE__ */ t(
|
|
3788
|
-
tickets: /* @__PURE__ */ t(
|
|
3789
|
-
teams: /* @__PURE__ */ t(
|
|
3790
|
-
projects: /* @__PURE__ */ t(
|
|
3791
|
-
clients: /* @__PURE__ */ t(
|
|
3792
|
-
surveys: /* @__PURE__ */ t(
|
|
3793
|
-
profile: /* @__PURE__ */ t(
|
|
3794
|
-
settings: /* @__PURE__ */ t(
|
|
3795
|
-
notifications: /* @__PURE__ */ t(
|
|
3796
|
-
changelog: /* @__PURE__ */ t(
|
|
3806
|
+
dashboard: /* @__PURE__ */ t(wr, { className: "h-5 w-5" }),
|
|
3807
|
+
tickets: /* @__PURE__ */ t(yr, { className: "h-5 w-5" }),
|
|
3808
|
+
teams: /* @__PURE__ */ t(gt, { className: "h-5 w-5" }),
|
|
3809
|
+
projects: /* @__PURE__ */ t(gr, { className: "h-5 w-5" }),
|
|
3810
|
+
clients: /* @__PURE__ */ t(vr, { className: "h-5 w-5" }),
|
|
3811
|
+
surveys: /* @__PURE__ */ t(xr, { className: "h-5 w-5" }),
|
|
3812
|
+
profile: /* @__PURE__ */ t(br, { className: "h-5 w-5" }),
|
|
3813
|
+
settings: /* @__PURE__ */ t(vt, { className: "h-5 w-5" }),
|
|
3814
|
+
notifications: /* @__PURE__ */ t(hr, { className: "h-5 w-5" }),
|
|
3815
|
+
changelog: /* @__PURE__ */ t(pr, { className: "h-5 w-5" }),
|
|
3797
3816
|
admin: /* @__PURE__ */ t(rt, { className: "h-5 w-5" }),
|
|
3798
|
-
users: /* @__PURE__ */ t(
|
|
3817
|
+
users: /* @__PURE__ */ t(gt, { className: "h-5 w-5" }),
|
|
3799
3818
|
roles: /* @__PURE__ */ t(rt, { className: "h-5 w-5" }),
|
|
3800
|
-
menus: /* @__PURE__ */ t(
|
|
3819
|
+
menus: /* @__PURE__ */ t(vt, { className: "h-5 w-5" }),
|
|
3801
3820
|
guards: /* @__PURE__ */ t(lt, { className: "h-5 w-5" }),
|
|
3802
3821
|
vacations: /* @__PURE__ */ t(lt, { className: "h-5 w-5" }),
|
|
3803
|
-
audit: /* @__PURE__ */ t(
|
|
3804
|
-
positions: /* @__PURE__ */ t(
|
|
3805
|
-
ranks: /* @__PURE__ */ t(
|
|
3806
|
-
"email-inbox": /* @__PURE__ */ t(
|
|
3822
|
+
audit: /* @__PURE__ */ t(xt, { className: "h-5 w-5" }),
|
|
3823
|
+
positions: /* @__PURE__ */ t(fr, { className: "h-5 w-5" }),
|
|
3824
|
+
ranks: /* @__PURE__ */ t(xt, { className: "h-5 w-5" }),
|
|
3825
|
+
"email-inbox": /* @__PURE__ */ t(mr, { className: "h-5 w-5" }),
|
|
3807
3826
|
"security-incidents": /* @__PURE__ */ t(rt, { className: "h-5 w-5" })
|
|
3808
3827
|
};
|
|
3809
|
-
function
|
|
3828
|
+
function Mn({
|
|
3810
3829
|
href: e,
|
|
3811
3830
|
className: r,
|
|
3812
3831
|
style: n,
|
|
@@ -3814,17 +3833,17 @@ function yn({
|
|
|
3814
3833
|
}) {
|
|
3815
3834
|
return /* @__PURE__ */ t("a", { href: e, className: r, style: n, children: a });
|
|
3816
3835
|
}
|
|
3817
|
-
function
|
|
3836
|
+
function On(e) {
|
|
3818
3837
|
return e.split("-").map((r) => r.charAt(0).toUpperCase() + r.slice(1)).join(" ");
|
|
3819
3838
|
}
|
|
3820
|
-
function
|
|
3839
|
+
function Bn(e) {
|
|
3821
3840
|
return /^\d+$/.test(e) || /^[a-f0-9]{8,}$/i.test(e);
|
|
3822
3841
|
}
|
|
3823
|
-
function
|
|
3842
|
+
function Tn(e) {
|
|
3824
3843
|
const r = e.split("/").filter(Boolean);
|
|
3825
3844
|
if (r.length === 0 || r.length === 1 && r[0] === "dashboard")
|
|
3826
3845
|
return [];
|
|
3827
|
-
const n = decodeURIComponent(r[r.length - 1]), a = r.length > 1 ? decodeURIComponent(r[r.length - 2]) : void 0, s =
|
|
3846
|
+
const n = decodeURIComponent(r[r.length - 1]), a = r.length > 1 ? decodeURIComponent(r[r.length - 2]) : void 0, s = Bn(n) && a ? a : n, u = En[s] ?? On(s);
|
|
3828
3847
|
return [{ label: "Inicio", href: "/" }, { label: u }];
|
|
3829
3848
|
}
|
|
3830
3849
|
function ot(e) {
|
|
@@ -3832,14 +3851,14 @@ function ot(e) {
|
|
|
3832
3851
|
":scope > [data-overlayscrollbars-viewport]"
|
|
3833
3852
|
));
|
|
3834
3853
|
}
|
|
3835
|
-
function
|
|
3854
|
+
function Ln(e) {
|
|
3836
3855
|
const r = e.split("/").filter(Boolean), n = r[r.length - 1];
|
|
3837
3856
|
if (!n) return /* @__PURE__ */ t(Xe, { className: "h-5 w-5" });
|
|
3838
3857
|
if (it[n]) return it[n];
|
|
3839
3858
|
const a = r.length > 1 ? r[r.length - 2] : "";
|
|
3840
3859
|
return it[a] ?? /* @__PURE__ */ t(Xe, { className: "h-5 w-5" });
|
|
3841
3860
|
}
|
|
3842
|
-
function
|
|
3861
|
+
function sa({
|
|
3843
3862
|
title: e,
|
|
3844
3863
|
subtitle: r,
|
|
3845
3864
|
action: n,
|
|
@@ -3851,42 +3870,42 @@ function Qn({
|
|
|
3851
3870
|
currentPath: d = typeof window > "u" ? "/" : window.location.pathname,
|
|
3852
3871
|
showBreadcrumbs: h = !0,
|
|
3853
3872
|
contained: N = !1,
|
|
3854
|
-
LinkComponent:
|
|
3873
|
+
LinkComponent: S = Mn
|
|
3855
3874
|
}) {
|
|
3856
|
-
const
|
|
3875
|
+
const b = re(null), [m, v] = D(!1), [c, y] = D(null), B = p ?? Tn(d), R = s ?? Ln(d), A = h && B.length > 1;
|
|
3857
3876
|
return _(() => {
|
|
3858
3877
|
if (N) {
|
|
3859
|
-
|
|
3878
|
+
v(!1);
|
|
3860
3879
|
return;
|
|
3861
3880
|
}
|
|
3862
|
-
let
|
|
3863
|
-
const
|
|
3864
|
-
const
|
|
3881
|
+
let C = null, L = 0, M = 0;
|
|
3882
|
+
const $ = () => {
|
|
3883
|
+
const T = b.current, P = document.querySelector(
|
|
3865
3884
|
"[data-app-scroll='true']"
|
|
3866
3885
|
);
|
|
3867
|
-
return (
|
|
3886
|
+
return (T == null ? void 0 : T.closest(".os-viewport")) ?? (T == null ? void 0 : T.closest(
|
|
3868
3887
|
"[data-overlayscrollbars-viewport]"
|
|
3869
3888
|
)) ?? ot(P) ?? P ?? window;
|
|
3870
|
-
},
|
|
3871
|
-
const
|
|
3872
|
-
|
|
3873
|
-
},
|
|
3874
|
-
|
|
3889
|
+
}, H = () => {
|
|
3890
|
+
const T = C && C !== window ? C.scrollTop : window.scrollY;
|
|
3891
|
+
v((P) => P ? T > 24 : T > 72);
|
|
3892
|
+
}, O = () => {
|
|
3893
|
+
C == null || C.removeEventListener("scroll", H), C = $(), C.addEventListener("scroll", H, { passive: !0 }), H();
|
|
3875
3894
|
};
|
|
3876
|
-
return
|
|
3877
|
-
window.cancelAnimationFrame(
|
|
3895
|
+
return O(), L = window.requestAnimationFrame(O), M = window.setTimeout(O, 120), () => {
|
|
3896
|
+
window.cancelAnimationFrame(L), window.clearTimeout(M), C == null || C.removeEventListener("scroll", H);
|
|
3878
3897
|
};
|
|
3879
3898
|
}, [N]), _(() => {
|
|
3880
3899
|
if (N) {
|
|
3881
3900
|
y(null);
|
|
3882
3901
|
return;
|
|
3883
3902
|
}
|
|
3884
|
-
let
|
|
3885
|
-
const
|
|
3886
|
-
const
|
|
3903
|
+
let C = 0;
|
|
3904
|
+
const L = [], M = () => {
|
|
3905
|
+
const W = b.current, F = W == null ? void 0 : W.parentElement, V = document.querySelector(
|
|
3887
3906
|
"[data-app-scroll='true']"
|
|
3888
3907
|
), Q = ot(V) ?? V;
|
|
3889
|
-
if (!
|
|
3908
|
+
if (!W || !F || !Q) {
|
|
3890
3909
|
y(null);
|
|
3891
3910
|
return;
|
|
3892
3911
|
}
|
|
@@ -3897,25 +3916,25 @@ function Qn({
|
|
|
3897
3916
|
y(
|
|
3898
3917
|
(ce) => ce && ce.marginLeft === te.marginLeft && ce.width === te.width ? ce : te
|
|
3899
3918
|
);
|
|
3900
|
-
},
|
|
3901
|
-
window.cancelAnimationFrame(
|
|
3919
|
+
}, $ = () => {
|
|
3920
|
+
window.cancelAnimationFrame(C), C = window.requestAnimationFrame(M);
|
|
3902
3921
|
};
|
|
3903
|
-
|
|
3904
|
-
const
|
|
3922
|
+
$(), window.addEventListener("resize", $);
|
|
3923
|
+
const H = new ResizeObserver($), O = b.current, T = O == null ? void 0 : O.parentElement, P = document.querySelector(
|
|
3905
3924
|
"[data-app-scroll='true']"
|
|
3906
|
-
),
|
|
3907
|
-
return [
|
|
3908
|
-
|
|
3909
|
-
}),
|
|
3910
|
-
window.cancelAnimationFrame(
|
|
3925
|
+
), J = ot(P) ?? P;
|
|
3926
|
+
return [T, P, J].forEach((W) => {
|
|
3927
|
+
W && H.observe(W);
|
|
3928
|
+
}), L.push(window.setTimeout($, 120)), L.push(window.setTimeout($, 280)), () => {
|
|
3929
|
+
window.cancelAnimationFrame(C), window.removeEventListener("resize", $), H.disconnect(), L.forEach((W) => window.clearTimeout(W));
|
|
3911
3930
|
};
|
|
3912
3931
|
}, [N]), /* @__PURE__ */ t(
|
|
3913
3932
|
"div",
|
|
3914
3933
|
{
|
|
3915
|
-
ref:
|
|
3934
|
+
ref: b,
|
|
3916
3935
|
"data-page-header": "true",
|
|
3917
3936
|
"data-compact": m ? "true" : "false",
|
|
3918
|
-
className: `sticky top-0 z-30 overflow-visible py-0 transition-[background-color,box-shadow,border-color] duration-300 ease-out ${N ? "mb-0 flex-shrink-0" : "mb-
|
|
3937
|
+
className: `sticky top-0 z-30 overflow-visible py-0 transition-[background-color,box-shadow,border-color] duration-300 ease-out ${N ? "mb-0 flex-shrink-0" : "mb-4 sm:mb-0"} ${u}`,
|
|
3919
3938
|
style: {
|
|
3920
3939
|
...c ? { marginLeft: c.marginLeft, width: c.width } : null,
|
|
3921
3940
|
background: N ? "var(--bg-card)" : m ? "var(--bg-main)" : "color-mix(in srgb, var(--bg-main) 44%, transparent)",
|
|
@@ -3927,14 +3946,14 @@ function Qn({
|
|
|
3927
3946
|
children: /* @__PURE__ */ i(
|
|
3928
3947
|
"div",
|
|
3929
3948
|
{
|
|
3930
|
-
className: `flex flex-wrap items-center justify-between px-4 pt-0.5 transition-[gap,min-height,padding] duration-300 ease-out ${m ? "min-h-
|
|
3949
|
+
className: `flex flex-wrap items-center justify-between px-4 pt-0.5 transition-[gap,min-height,padding] duration-300 ease-out ${m ? "min-h-9 gap-2 sm:min-h-10 sm:gap-2.5" : "min-h-10 gap-2.5 sm:min-h-11 sm:gap-3"} ${f}`,
|
|
3931
3950
|
children: [
|
|
3932
3951
|
/* @__PURE__ */ i(
|
|
3933
3952
|
"div",
|
|
3934
3953
|
{
|
|
3935
3954
|
className: `min-w-0 flex flex-1 flex-col justify-center transition-[gap,transform] duration-300 ease-out ${m ? "gap-1" : "gap-1.5 sm:gap-2"}`,
|
|
3936
3955
|
children: [
|
|
3937
|
-
|
|
3956
|
+
A && /* @__PURE__ */ t(
|
|
3938
3957
|
"nav",
|
|
3939
3958
|
{
|
|
3940
3959
|
"aria-label": "Breadcrumb",
|
|
@@ -3942,43 +3961,43 @@ function Qn({
|
|
|
3942
3961
|
children: /* @__PURE__ */ t(
|
|
3943
3962
|
"ol",
|
|
3944
3963
|
{
|
|
3945
|
-
className: `flex flex-wrap items-center gap-1.5 leading-none transition-[font-size,line-height] duration-300 ease-out ${m ? "text-[10px]
|
|
3946
|
-
children:
|
|
3947
|
-
const
|
|
3964
|
+
className: `flex flex-wrap items-center gap-1.5 leading-none transition-[font-size,line-height] duration-300 ease-out ${m ? "text-[10px]" : "text-[10px] sm:text-[11px]"}`,
|
|
3965
|
+
children: B.map((C, L) => {
|
|
3966
|
+
const M = L === B.length - 1;
|
|
3948
3967
|
return /* @__PURE__ */ i(
|
|
3949
3968
|
"li",
|
|
3950
3969
|
{
|
|
3951
3970
|
className: "flex min-w-0 items-center gap-1.5",
|
|
3952
3971
|
children: [
|
|
3953
|
-
|
|
3972
|
+
L > 0 && /* @__PURE__ */ t(
|
|
3954
3973
|
Te,
|
|
3955
3974
|
{
|
|
3956
3975
|
className: "h-3.5 w-3.5 transition-[color,transform] duration-300 ease-out",
|
|
3957
3976
|
style: { color: "var(--text-muted)" }
|
|
3958
3977
|
}
|
|
3959
3978
|
),
|
|
3960
|
-
|
|
3961
|
-
|
|
3979
|
+
C.href && !M ? /* @__PURE__ */ t(
|
|
3980
|
+
S,
|
|
3962
3981
|
{
|
|
3963
|
-
href:
|
|
3982
|
+
href: C.href,
|
|
3964
3983
|
className: "truncate transition-colors duration-300 hover:underline",
|
|
3965
3984
|
style: { color: "var(--text-muted)" },
|
|
3966
|
-
children:
|
|
3985
|
+
children: C.label
|
|
3967
3986
|
}
|
|
3968
3987
|
) : /* @__PURE__ */ t(
|
|
3969
3988
|
"span",
|
|
3970
3989
|
{
|
|
3971
|
-
"aria-current":
|
|
3972
|
-
className:
|
|
3990
|
+
"aria-current": M ? "page" : void 0,
|
|
3991
|
+
className: M ? "truncate font-semibold" : "truncate",
|
|
3973
3992
|
style: {
|
|
3974
|
-
color:
|
|
3993
|
+
color: M ? "var(--text-main)" : "var(--text-muted)"
|
|
3975
3994
|
},
|
|
3976
|
-
children:
|
|
3995
|
+
children: C.label
|
|
3977
3996
|
}
|
|
3978
3997
|
)
|
|
3979
3998
|
]
|
|
3980
3999
|
},
|
|
3981
|
-
`${
|
|
4000
|
+
`${C.label}-${L}`
|
|
3982
4001
|
);
|
|
3983
4002
|
})
|
|
3984
4003
|
}
|
|
@@ -3993,11 +4012,11 @@ function Qn({
|
|
|
3993
4012
|
/* @__PURE__ */ t(
|
|
3994
4013
|
"span",
|
|
3995
4014
|
{
|
|
3996
|
-
className: `flex-shrink-0 transition-[color,transform,opacity] duration-300 ease-out ${m ? "scale-
|
|
4015
|
+
className: `flex-shrink-0 transition-[color,transform,opacity] duration-300 ease-out ${m ? "scale-75 opacity-80" : "scale-90 opacity-100"}`,
|
|
3997
4016
|
style: {
|
|
3998
|
-
color:
|
|
4017
|
+
color: A ? "var(--text-secondary)" : "var(--text-muted)"
|
|
3999
4018
|
},
|
|
4000
|
-
children:
|
|
4019
|
+
children: R
|
|
4001
4020
|
}
|
|
4002
4021
|
),
|
|
4003
4022
|
/* @__PURE__ */ i(
|
|
@@ -4009,7 +4028,7 @@ function Qn({
|
|
|
4009
4028
|
/* @__PURE__ */ t(
|
|
4010
4029
|
"h1",
|
|
4011
4030
|
{
|
|
4012
|
-
className: `truncate font-bold tracking-tight transition-[font-size,line-height,color] duration-300 ease-out ${m ? "text-
|
|
4031
|
+
className: `truncate font-bold tracking-tight transition-[font-size,line-height,color] duration-300 ease-out ${m ? "text-base sm:text-lg" : "text-lg sm:text-xl"}`,
|
|
4013
4032
|
style: { color: "var(--text-main)" },
|
|
4014
4033
|
children: e
|
|
4015
4034
|
}
|
|
@@ -4018,7 +4037,7 @@ function Qn({
|
|
|
4018
4037
|
"p",
|
|
4019
4038
|
{
|
|
4020
4039
|
"aria-hidden": m,
|
|
4021
|
-
className: `overflow-hidden text-
|
|
4040
|
+
className: `overflow-hidden text-xs transition-[max-height,opacity,transform,margin] duration-300 ease-out ${m ? "mt-0 max-h-0 -translate-y-1 opacity-0" : "mt-0.5 max-h-5 translate-y-0 opacity-100"}`,
|
|
4022
4041
|
style: { color: "var(--text-muted)" },
|
|
4023
4042
|
children: r
|
|
4024
4043
|
}
|
|
@@ -4043,8 +4062,8 @@ function Qn({
|
|
|
4043
4062
|
n && /* @__PURE__ */ t(
|
|
4044
4063
|
"div",
|
|
4045
4064
|
{
|
|
4046
|
-
className: `page-header-actions flex flex-shrink-0 items-center self-center overflow-visible transition-[gap,min-height,opacity,transform] duration-300 ease-out ${m ? "min-h-
|
|
4047
|
-
children: n
|
|
4065
|
+
className: `page-header-actions flex flex-shrink-0 items-center self-center overflow-visible transition-[gap,min-height,opacity,transform] duration-300 ease-out ${m ? "min-h-8 gap-1 opacity-95" : "min-h-9 gap-1.5 opacity-100"}`,
|
|
4066
|
+
children: /* @__PURE__ */ t(zt.Provider, { value: { compact: !0, iconOnly: !0 }, children: n })
|
|
4048
4067
|
}
|
|
4049
4068
|
)
|
|
4050
4069
|
]
|
|
@@ -4053,20 +4072,20 @@ function Qn({
|
|
|
4053
4072
|
}
|
|
4054
4073
|
);
|
|
4055
4074
|
}
|
|
4056
|
-
function
|
|
4075
|
+
function la({
|
|
4057
4076
|
children: e,
|
|
4058
4077
|
currentPath: r = typeof window > "u" ? "/" : window.location.pathname,
|
|
4059
4078
|
publicRoutes: n = ["/", "/login", "/reset-password"],
|
|
4060
4079
|
...a
|
|
4061
4080
|
}) {
|
|
4062
|
-
return n.includes(r) ? /* @__PURE__ */ t(we, { children: e }) : /* @__PURE__ */ t(
|
|
4081
|
+
return n.includes(r) ? /* @__PURE__ */ t(we, { children: e }) : /* @__PURE__ */ t($n, { currentPath: r, ...a, children: e });
|
|
4063
4082
|
}
|
|
4064
|
-
function
|
|
4083
|
+
function Dt() {
|
|
4065
4084
|
if (typeof window > "u") return "system";
|
|
4066
4085
|
const e = localStorage.getItem("theme");
|
|
4067
4086
|
return e === "light" || e === "dark" ? e : e === "system" ? "system" : document.documentElement.classList.contains("dark") ? "dark" : "light";
|
|
4068
4087
|
}
|
|
4069
|
-
function
|
|
4088
|
+
function Dn(e, r, n) {
|
|
4070
4089
|
try {
|
|
4071
4090
|
const a = new URL(e), s = a.searchParams.get("callbackUrl");
|
|
4072
4091
|
if (s) {
|
|
@@ -4081,17 +4100,17 @@ function Cn(e, r, n) {
|
|
|
4081
4100
|
return e;
|
|
4082
4101
|
}
|
|
4083
4102
|
}
|
|
4084
|
-
function
|
|
4103
|
+
function ca({
|
|
4085
4104
|
name: e,
|
|
4086
4105
|
src: r,
|
|
4087
4106
|
projectKey: n
|
|
4088
4107
|
}) {
|
|
4089
|
-
const [a, s] =
|
|
4090
|
-
() =>
|
|
4108
|
+
const [a, s] = D(
|
|
4109
|
+
() => Dt()
|
|
4091
4110
|
), u = re(null);
|
|
4092
4111
|
_(() => {
|
|
4093
4112
|
const d = new MutationObserver(
|
|
4094
|
-
() => s(
|
|
4113
|
+
() => s(Dt())
|
|
4095
4114
|
);
|
|
4096
4115
|
return d.observe(document.documentElement, {
|
|
4097
4116
|
attributes: !0,
|
|
@@ -4099,7 +4118,7 @@ function ta({
|
|
|
4099
4118
|
}), () => d.disconnect();
|
|
4100
4119
|
}, []);
|
|
4101
4120
|
const f = ze(
|
|
4102
|
-
() =>
|
|
4121
|
+
() => Dn(r, a, n),
|
|
4103
4122
|
[n, r, a]
|
|
4104
4123
|
), p = ze(() => {
|
|
4105
4124
|
try {
|
|
@@ -4112,9 +4131,9 @@ function ta({
|
|
|
4112
4131
|
if (!n) return;
|
|
4113
4132
|
const d = n;
|
|
4114
4133
|
function h(N) {
|
|
4115
|
-
var m,
|
|
4134
|
+
var m, v, c;
|
|
4116
4135
|
if (N.source !== ((m = u.current) == null ? void 0 : m.contentWindow) || p && N.origin !== p) return;
|
|
4117
|
-
if (((
|
|
4136
|
+
if (((v = N.data) == null ? void 0 : v.type) === "prime-microservice:overlay") {
|
|
4118
4137
|
window.dispatchEvent(
|
|
4119
4138
|
new CustomEvent("prime-auth:microservice-overlay", {
|
|
4120
4139
|
detail: { active: !!N.data.active }
|
|
@@ -4123,10 +4142,10 @@ function ta({
|
|
|
4123
4142
|
return;
|
|
4124
4143
|
}
|
|
4125
4144
|
if (((c = N.data) == null ? void 0 : c.type) !== "prime-microservice:navigation") return;
|
|
4126
|
-
const
|
|
4127
|
-
if (!
|
|
4128
|
-
const
|
|
4129
|
-
`${window.location.pathname}${window.location.search}${window.location.hash}` !==
|
|
4145
|
+
const S = N.data.path;
|
|
4146
|
+
if (!S || !S.startsWith("/") || S.startsWith("//")) return;
|
|
4147
|
+
const b = `/apps/${encodeURIComponent(d)}${S}`;
|
|
4148
|
+
`${window.location.pathname}${window.location.search}${window.location.hash}` !== b && (window.history.replaceState(window.history.state, "", b), window.dispatchEvent(
|
|
4130
4149
|
new CustomEvent("prime-auth:microservice-navigation")
|
|
4131
4150
|
));
|
|
4132
4151
|
}
|
|
@@ -4150,8 +4169,8 @@ function ta({
|
|
|
4150
4169
|
}
|
|
4151
4170
|
) });
|
|
4152
4171
|
}
|
|
4153
|
-
function
|
|
4154
|
-
const [e, r] =
|
|
4172
|
+
function da() {
|
|
4173
|
+
const [e, r] = D(""), [n, a] = D(!1), [s, u] = D({ width: 96, height: 96 });
|
|
4155
4174
|
return _(() => {
|
|
4156
4175
|
let f = !1;
|
|
4157
4176
|
return fetch("/api/microservices/prime-suite/chat-url", { cache: "no-store" }).then((p) => p.ok ? p.json() : null).then((p) => {
|
|
@@ -4166,8 +4185,8 @@ function ra() {
|
|
|
4166
4185
|
if (((h = p.data) == null ? void 0 : h.type) !== "prime-suite-chat:state") return;
|
|
4167
4186
|
const d = !!p.data.active;
|
|
4168
4187
|
a(d), u({
|
|
4169
|
-
width:
|
|
4170
|
-
height:
|
|
4188
|
+
width: At(p.data.width, 96, 720),
|
|
4189
|
+
height: At(p.data.height, 96, 560)
|
|
4171
4190
|
});
|
|
4172
4191
|
};
|
|
4173
4192
|
return window.addEventListener("message", f), () => window.removeEventListener("message", f);
|
|
@@ -4188,11 +4207,11 @@ function ra() {
|
|
|
4188
4207
|
}
|
|
4189
4208
|
) : null;
|
|
4190
4209
|
}
|
|
4191
|
-
function
|
|
4210
|
+
function At(e, r, n) {
|
|
4192
4211
|
const a = typeof e == "number" && Number.isFinite(e) ? e : r;
|
|
4193
4212
|
return Math.max(r, Math.min(n, Math.ceil(a)));
|
|
4194
4213
|
}
|
|
4195
|
-
function
|
|
4214
|
+
function An(e) {
|
|
4196
4215
|
const r = document.documentElement, n = new MutationObserver(e);
|
|
4197
4216
|
n.observe(r, { attributes: !0, attributeFilter: ["class"] });
|
|
4198
4217
|
const a = window.matchMedia("(prefers-color-scheme: dark)");
|
|
@@ -4200,50 +4219,50 @@ function $n(e) {
|
|
|
4200
4219
|
n.disconnect(), a.removeEventListener("change", e);
|
|
4201
4220
|
};
|
|
4202
4221
|
}
|
|
4203
|
-
function
|
|
4222
|
+
function In() {
|
|
4204
4223
|
const e = localStorage.getItem("theme") || "system", r = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
4205
4224
|
return document.documentElement.classList.contains("dark") || e === "dark" || e === "system" && r ? "dark" : "light";
|
|
4206
4225
|
}
|
|
4207
|
-
function
|
|
4226
|
+
function Pn() {
|
|
4208
4227
|
return "light";
|
|
4209
4228
|
}
|
|
4210
|
-
function
|
|
4211
|
-
const e =
|
|
4212
|
-
|
|
4213
|
-
|
|
4214
|
-
|
|
4229
|
+
function ua() {
|
|
4230
|
+
const e = nr(
|
|
4231
|
+
An,
|
|
4232
|
+
In,
|
|
4233
|
+
Pn
|
|
4215
4234
|
);
|
|
4216
|
-
return /* @__PURE__ */ t(
|
|
4235
|
+
return /* @__PURE__ */ t($r, { position: "bottom-center", theme: e, richColors: !0, closeButton: !0 });
|
|
4217
4236
|
}
|
|
4218
4237
|
export {
|
|
4219
|
-
|
|
4220
|
-
|
|
4238
|
+
$n as AuthShell,
|
|
4239
|
+
Xn as BonsaifButton,
|
|
4221
4240
|
xe as Button,
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
|
|
4240
|
-
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
|
|
4244
|
-
|
|
4241
|
+
Zn as CalendarPicker,
|
|
4242
|
+
Kn as CompactFilterSelect,
|
|
4243
|
+
Jn as CompactSearchInput,
|
|
4244
|
+
Qn as ConfirmDialog,
|
|
4245
|
+
Jr as CopyButton,
|
|
4246
|
+
ea as CopyLinkButton,
|
|
4247
|
+
ta as DataTable,
|
|
4248
|
+
ra as DateRangePicker,
|
|
4249
|
+
na as Drawer,
|
|
4250
|
+
Vn as DynamicDetailTabs,
|
|
4251
|
+
hn as GlobalScrollbars,
|
|
4252
|
+
aa as InputField,
|
|
4253
|
+
Pr as LoadingState,
|
|
4254
|
+
ca as MicroserviceFrame,
|
|
4255
|
+
Gr as Modal,
|
|
4256
|
+
ut as MouseTooltip,
|
|
4257
|
+
sa as PageHeader,
|
|
4258
|
+
Mr as PageSearchInput,
|
|
4259
|
+
la as PrimeAuthRouteShell,
|
|
4260
|
+
ua as PrimeAuthToaster,
|
|
4261
|
+
da as PrimeSuiteChatFrame,
|
|
4262
|
+
Wt as SearchableSelect,
|
|
4263
|
+
ia as StepWizard,
|
|
4245
4264
|
at as TextInput,
|
|
4246
|
-
|
|
4247
|
-
|
|
4248
|
-
|
|
4265
|
+
oa as Toggle,
|
|
4266
|
+
kn as UserAvatar,
|
|
4267
|
+
Er as cn
|
|
4249
4268
|
};
|