bonsaif-ui 0.1.0 → 0.1.1
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/README.md +271 -1
- package/dist/bonsaif-ui.js +1967 -1330
- package/dist/bonsaif-ui.umd.cjs +1 -1
- package/dist/components/composition/DynamicDetailTabs.d.ts +74 -0
- package/dist/components/composition/DynamicDetailTabs.d.ts.map +1 -0
- package/dist/components/composition/index.d.ts +3 -0
- package/dist/components/composition/index.d.ts.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/layout/PageSearchInput.d.ts +6 -1
- package/dist/components/layout/PageSearchInput.d.ts.map +1 -1
- package/dist/components/ui/DataTable.d.ts +3 -1
- package/dist/components/ui/DataTable.d.ts.map +1 -1
- package/dist/components/ui/StepWizard.d.ts +43 -0
- package/dist/components/ui/StepWizard.d.ts.map +1 -0
- package/dist/components/ui/index.d.ts +2 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/users/UserAvatar.d.ts +11 -4
- package/dist/components/users/UserAvatar.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/bonsaif-ui.js
CHANGED
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as e, jsxs as i, Fragment as we } from "react/jsx-runtime";
|
|
3
|
+
import ct, { useRef as ie, useState as B, useEffect as O, useMemo as Oe, useCallback as et, useLayoutEffect as _t, useSyncExternalStore as Ht } from "react";
|
|
4
|
+
import { HiMagnifyingGlass as Ye, HiXMark as Se, HiChevronLeft as _e, HiChevronDown as He, HiChevronRight as Te, HiCalendarDays as tt, HiExclamationTriangle as Pt, HiChevronUp as Wt, HiChevronUpDown as jt, HiEyeSlash as Ft, HiEye as Ut, HiCheck as qt, HiLockClosed as Yt, HiBars3 as Gt, HiHome as qe, HiArrowRightOnRectangle as Xt, HiShieldCheck as Ve, HiInbox as Jt, HiListBullet as dt, HiBriefcase as Vt, HiCog6Tooth as ut, HiUsers as mt, HiDocumentText as Kt, HiBell as Zt, HiUser as Qt, HiClipboardDocumentList as er, HiBuildingOffice2 as tr, HiRectangleGroup as rr, HiTicket as nr, HiChartBar as ar } from "react-icons/hi2";
|
|
5
|
+
import { OverlayScrollbars as ft } from "overlayscrollbars";
|
|
6
|
+
import { createPortal as Ge } from "react-dom";
|
|
7
|
+
import { MdDragIndicator as or } from "react-icons/md";
|
|
8
|
+
import { OverlayScrollbarsComponent as pt } from "overlayscrollbars-react";
|
|
9
|
+
import { DayPicker as ir, useDayPicker as sr } from "react-day-picker";
|
|
9
10
|
import "react-day-picker/dist/style.css";
|
|
10
|
-
import { FiSave as
|
|
11
|
-
import { Toaster as
|
|
12
|
-
function
|
|
11
|
+
import { FiSave as lr } from "react-icons/fi";
|
|
12
|
+
import { Toaster as cr } from "sonner";
|
|
13
|
+
function dr(...t) {
|
|
13
14
|
return t.filter(Boolean).join(" ");
|
|
14
15
|
}
|
|
15
|
-
function
|
|
16
|
+
function bn({
|
|
16
17
|
variant: t = "primary",
|
|
17
18
|
className: r,
|
|
18
19
|
type: n = "button",
|
|
@@ -22,71 +23,504 @@ function Qr({
|
|
|
22
23
|
return /* @__PURE__ */ e(
|
|
23
24
|
"button",
|
|
24
25
|
{
|
|
25
|
-
className:
|
|
26
|
+
className: dr("bonsaif-ui-button", `bonsaif-ui-button--${t}`, r),
|
|
26
27
|
type: n,
|
|
27
28
|
...l,
|
|
28
29
|
children: a
|
|
29
30
|
}
|
|
30
31
|
);
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
+
function ur({
|
|
34
|
+
value: t,
|
|
35
|
+
onChange: r,
|
|
36
|
+
placeholder: n,
|
|
37
|
+
className: a = "",
|
|
38
|
+
autoFocus: l = !1,
|
|
39
|
+
forceExpanded: u = !1,
|
|
40
|
+
onEscape: d,
|
|
41
|
+
size: p = "default",
|
|
42
|
+
inputTabIndex: m
|
|
43
|
+
}) {
|
|
44
|
+
const h = ie(null), [w, N] = B(!1), g = u || w || t.trim().length > 0, f = p === "sm" ? "h-9 rounded-md" : "h-11 rounded-lg";
|
|
45
|
+
O(() => {
|
|
46
|
+
var c;
|
|
47
|
+
l && (N(!0), (c = h.current) == null || c.focus());
|
|
48
|
+
}, [l]);
|
|
49
|
+
const v = () => {
|
|
50
|
+
var c;
|
|
51
|
+
N(!0), (c = h.current) == null || c.focus();
|
|
52
|
+
};
|
|
53
|
+
return /* @__PURE__ */ i(
|
|
54
|
+
"div",
|
|
55
|
+
{
|
|
56
|
+
className: `relative flex-shrink-0 overflow-visible transition-[width] duration-200 ease-out ${g ? a || "w-full" : "w-28"}`,
|
|
57
|
+
onMouseDown: (c) => {
|
|
58
|
+
g || (c.preventDefault(), v());
|
|
59
|
+
},
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ e(
|
|
62
|
+
Ye,
|
|
63
|
+
{
|
|
64
|
+
className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 pointer-events-none transition-colors duration-200",
|
|
65
|
+
style: { color: "var(--text-muted)" }
|
|
66
|
+
}
|
|
67
|
+
),
|
|
68
|
+
/* @__PURE__ */ e(
|
|
69
|
+
"input",
|
|
70
|
+
{
|
|
71
|
+
ref: h,
|
|
72
|
+
type: "text",
|
|
73
|
+
tabIndex: m,
|
|
74
|
+
"aria-label": n,
|
|
75
|
+
value: t,
|
|
76
|
+
onChange: (c) => r(c.target.value),
|
|
77
|
+
onKeyDown: (c) => {
|
|
78
|
+
c.key === "Escape" && (d == null || d());
|
|
79
|
+
},
|
|
80
|
+
placeholder: g ? n : "Buscar",
|
|
81
|
+
className: `${f} w-full py-0 text-sm placeholder:text-[var(--text-muted)] focus:outline-none transition-all duration-200 ${g ? "pl-9 pr-9" : "cursor-pointer pl-9 pr-3"}`,
|
|
82
|
+
style: {
|
|
83
|
+
background: "var(--bg-card)",
|
|
84
|
+
border: "1px solid var(--border)",
|
|
85
|
+
color: "var(--text-main)"
|
|
86
|
+
},
|
|
87
|
+
onFocus: (c) => {
|
|
88
|
+
N(!0), c.currentTarget.style.borderColor = "var(--primary)", c.currentTarget.style.boxShadow = "0 0 0 3px rgba(59,130,246,0.12)";
|
|
89
|
+
},
|
|
90
|
+
onBlur: (c) => {
|
|
91
|
+
N(!1), c.currentTarget.style.borderColor = "var(--border)", c.currentTarget.style.boxShadow = "none";
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
),
|
|
95
|
+
t && /* @__PURE__ */ e(
|
|
96
|
+
"button",
|
|
97
|
+
{
|
|
98
|
+
type: "button",
|
|
99
|
+
onClick: () => r(""),
|
|
100
|
+
className: "absolute right-2 top-1/2 flex !h-6 !w-6 -translate-y-1/2 items-center justify-center rounded-full !p-0 leading-none transition-colors hover:bg-black/5",
|
|
101
|
+
style: { color: "var(--text-muted)" },
|
|
102
|
+
"aria-label": "Limpiar búsqueda",
|
|
103
|
+
children: /* @__PURE__ */ e(Se, { className: "h-3.5 w-3.5 flex-shrink-0" })
|
|
104
|
+
}
|
|
105
|
+
)
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
function ht(t) {
|
|
33
111
|
if (t !== void 0)
|
|
34
112
|
return typeof t == "number" ? `${t}px` : t;
|
|
35
113
|
}
|
|
36
|
-
const
|
|
114
|
+
const mr = "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", fr = {
|
|
37
115
|
primary: "border border-[var(--border)] text-[var(--text-main)] hover:border-[var(--border)] hover:bg-[var(--bg-input)] active:scale-[0.98] transition-colors",
|
|
38
116
|
secondary: "border border-[var(--border)] text-[var(--text-main)] hover:border-[var(--border)] hover:bg-[var(--bg-input)] active:scale-[0.98] transition-colors",
|
|
39
117
|
danger: "border border-[var(--border)] text-[var(--danger)] hover:border-[var(--danger)] hover:bg-[var(--danger-bg)] active:scale-[0.98] transition-colors",
|
|
40
118
|
ghost: "text-[var(--text-secondary)] hover:opacity-70",
|
|
41
119
|
icon: "h-9 w-9 text-[var(--text-muted)] hover:text-[var(--primary)] hover:bg-primary/5"
|
|
42
|
-
},
|
|
120
|
+
}, pr = {
|
|
43
121
|
sm: "h-9 px-3.5 text-xs",
|
|
44
122
|
md: "h-11 px-4 text-sm",
|
|
45
123
|
lg: "h-12 px-5 text-sm font-semibold"
|
|
46
|
-
},
|
|
124
|
+
}, hr = {
|
|
47
125
|
primary: { background: "var(--bg-card)" },
|
|
48
126
|
secondary: { background: "var(--bg-card)" },
|
|
49
127
|
danger: { background: "var(--bg-card)" },
|
|
50
128
|
ghost: {},
|
|
51
129
|
icon: {}
|
|
52
130
|
};
|
|
53
|
-
function
|
|
131
|
+
function he({
|
|
54
132
|
variant: t = "primary",
|
|
55
133
|
size: r = "md",
|
|
56
134
|
loading: n = !1,
|
|
57
135
|
icon: a,
|
|
58
136
|
height: l,
|
|
59
137
|
padding: u,
|
|
60
|
-
children:
|
|
138
|
+
children: d,
|
|
61
139
|
className: p = "",
|
|
62
|
-
disabled:
|
|
63
|
-
style:
|
|
64
|
-
...
|
|
140
|
+
disabled: m,
|
|
141
|
+
style: h,
|
|
142
|
+
...w
|
|
65
143
|
}) {
|
|
66
|
-
const
|
|
67
|
-
return /* @__PURE__ */
|
|
144
|
+
const N = t === "icon";
|
|
145
|
+
return /* @__PURE__ */ i(
|
|
68
146
|
"button",
|
|
69
147
|
{
|
|
70
|
-
...
|
|
148
|
+
...w,
|
|
71
149
|
"data-variant": t,
|
|
72
150
|
"data-size": r,
|
|
73
|
-
"data-icon":
|
|
74
|
-
disabled:
|
|
75
|
-
className: `${
|
|
151
|
+
"data-icon": N ? "true" : void 0,
|
|
152
|
+
disabled: m || n,
|
|
153
|
+
className: `${mr} ${fr[t]} ${N ? "" : pr[r]} ${p}`,
|
|
76
154
|
style: {
|
|
77
|
-
...
|
|
78
|
-
height:
|
|
79
|
-
padding:
|
|
80
|
-
...
|
|
155
|
+
...hr[t],
|
|
156
|
+
height: ht(l),
|
|
157
|
+
padding: ht(u),
|
|
158
|
+
...h
|
|
81
159
|
},
|
|
82
160
|
children: [
|
|
83
161
|
n ? /* @__PURE__ */ e("span", { className: "h-3.5 w-3.5 animate-spin rounded-full border-2 border-current border-t-transparent" }) : a,
|
|
84
|
-
|
|
162
|
+
d
|
|
85
163
|
]
|
|
86
164
|
}
|
|
87
165
|
);
|
|
88
166
|
}
|
|
89
|
-
|
|
167
|
+
function br({
|
|
168
|
+
variant: t = "page",
|
|
169
|
+
title: r = "Cargando...",
|
|
170
|
+
rows: n = 6,
|
|
171
|
+
children: a
|
|
172
|
+
}) {
|
|
173
|
+
return t === "table" ? /* @__PURE__ */ e(Et, { rows: n }) : t === "sections" ? /* @__PURE__ */ e(xr, { rows: n }) : t === "cards" ? /* @__PURE__ */ e(vr, { rows: n }) : /* @__PURE__ */ e("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
|
+
/* @__PURE__ */ e("div", { className: "h-9 w-9 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--primary)]" }),
|
|
175
|
+
/* @__PURE__ */ i("div", { children: [
|
|
176
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-[var(--text-main)]", children: r }),
|
|
177
|
+
a && /* @__PURE__ */ e("div", { className: "mt-1 text-xs text-[var(--text-muted)]", children: a })
|
|
178
|
+
] })
|
|
179
|
+
] }) });
|
|
180
|
+
}
|
|
181
|
+
function xr({ rows: t }) {
|
|
182
|
+
return /* @__PURE__ */ e("div", { className: "space-y-4", children: Array.from({ length: Math.max(2, Math.min(t, 4)) }).map(
|
|
183
|
+
(r, n) => /* @__PURE__ */ i(
|
|
184
|
+
"section",
|
|
185
|
+
{
|
|
186
|
+
className: "overflow-hidden rounded-lg border border-[var(--border)] bg-[var(--bg-card)]",
|
|
187
|
+
children: [
|
|
188
|
+
/* @__PURE__ */ i("div", { className: "flex items-center justify-between gap-3 border-b border-[var(--border)] px-3 py-3", children: [
|
|
189
|
+
/* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
|
|
190
|
+
/* @__PURE__ */ e("div", { className: "h-4 w-4 animate-pulse rounded bg-[var(--bg-input)]" }),
|
|
191
|
+
/* @__PURE__ */ e("div", { className: "h-4 w-32 animate-pulse rounded bg-[var(--bg-input)]" }),
|
|
192
|
+
/* @__PURE__ */ e("div", { className: "h-5 w-20 animate-pulse rounded-full bg-[var(--bg-input)]" })
|
|
193
|
+
] }),
|
|
194
|
+
/* @__PURE__ */ i("div", { className: "flex gap-1", children: [
|
|
195
|
+
/* @__PURE__ */ e("div", { className: "h-8 w-8 animate-pulse rounded-md bg-[var(--bg-input)]" }),
|
|
196
|
+
/* @__PURE__ */ e("div", { className: "h-8 w-8 animate-pulse rounded-md bg-[var(--bg-input)]" })
|
|
197
|
+
] })
|
|
198
|
+
] }),
|
|
199
|
+
/* @__PURE__ */ e(
|
|
200
|
+
Et,
|
|
201
|
+
{
|
|
202
|
+
rows: n === 0 ? t : Math.max(3, t - 2),
|
|
203
|
+
compact: !0
|
|
204
|
+
}
|
|
205
|
+
)
|
|
206
|
+
]
|
|
207
|
+
},
|
|
208
|
+
n
|
|
209
|
+
)
|
|
210
|
+
) });
|
|
211
|
+
}
|
|
212
|
+
function vr({ rows: t }) {
|
|
213
|
+
return /* @__PURE__ */ e("div", { className: "grid gap-3 md:grid-cols-2 xl:grid-cols-3", children: Array.from({ length: t }).map((r, n) => /* @__PURE__ */ i(
|
|
214
|
+
"div",
|
|
215
|
+
{
|
|
216
|
+
className: "rounded-lg border border-[var(--border)] bg-[var(--bg-card)] p-4",
|
|
217
|
+
children: [
|
|
218
|
+
/* @__PURE__ */ e("div", { className: "h-4 w-2/3 animate-pulse rounded bg-[var(--bg-input)]" }),
|
|
219
|
+
/* @__PURE__ */ e("div", { className: "mt-3 h-3 w-full animate-pulse rounded bg-[var(--bg-input)]" }),
|
|
220
|
+
/* @__PURE__ */ e("div", { className: "mt-2 h-3 w-4/5 animate-pulse rounded bg-[var(--bg-input)]" })
|
|
221
|
+
]
|
|
222
|
+
},
|
|
223
|
+
n
|
|
224
|
+
)) });
|
|
225
|
+
}
|
|
226
|
+
function Et({
|
|
227
|
+
rows: t,
|
|
228
|
+
compact: r = !1
|
|
229
|
+
}) {
|
|
230
|
+
const n = r ? 5 : 6;
|
|
231
|
+
return /* @__PURE__ */ i("div", { className: "overflow-hidden rounded-lg border border-[var(--border)] bg-[var(--bg-card)]", children: [
|
|
232
|
+
/* @__PURE__ */ e(
|
|
233
|
+
"div",
|
|
234
|
+
{
|
|
235
|
+
className: "grid border-b border-[var(--border)]",
|
|
236
|
+
style: { gridTemplateColumns: `repeat(${n}, minmax(0, 1fr))` },
|
|
237
|
+
children: Array.from({ length: n }).map((a, l) => /* @__PURE__ */ e("div", { className: "px-3 py-3", children: /* @__PURE__ */ e("div", { className: "h-3 w-2/3 animate-pulse rounded bg-[var(--bg-input)]" }) }, l))
|
|
238
|
+
}
|
|
239
|
+
),
|
|
240
|
+
Array.from({ length: t }).map((a, l) => /* @__PURE__ */ e(
|
|
241
|
+
"div",
|
|
242
|
+
{
|
|
243
|
+
className: "grid border-b border-[var(--border)] last:border-b-0",
|
|
244
|
+
style: { gridTemplateColumns: `repeat(${n}, minmax(0, 1fr))` },
|
|
245
|
+
children: Array.from({ length: n }).map((u, d) => /* @__PURE__ */ e("div", { className: "px-3 py-3", children: /* @__PURE__ */ e(
|
|
246
|
+
"div",
|
|
247
|
+
{
|
|
248
|
+
className: "h-3.5 animate-pulse rounded-full bg-[var(--bg-input)]",
|
|
249
|
+
style: {
|
|
250
|
+
width: `${52 + (l * 13 + d * 11) % 36}%`
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
) }, d))
|
|
254
|
+
},
|
|
255
|
+
l
|
|
256
|
+
))
|
|
257
|
+
] });
|
|
258
|
+
}
|
|
259
|
+
function Mt(t) {
|
|
260
|
+
const r = t.split("/").filter(Boolean);
|
|
261
|
+
return (r[r.length - 1] ?? t).replace(/^lv_/, "").split(/[-_]/).filter(Boolean).map((a) => a.charAt(0).toUpperCase() + a.slice(1)).join(" ");
|
|
262
|
+
}
|
|
263
|
+
function bt(t) {
|
|
264
|
+
return t.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim();
|
|
265
|
+
}
|
|
266
|
+
function gr(t) {
|
|
267
|
+
return [
|
|
268
|
+
t.label,
|
|
269
|
+
Mt(t.service),
|
|
270
|
+
t.description,
|
|
271
|
+
t.service
|
|
272
|
+
].filter(Boolean).join(" ");
|
|
273
|
+
}
|
|
274
|
+
function yr(t) {
|
|
275
|
+
return typeof t == "function" ? t : t.default;
|
|
276
|
+
}
|
|
277
|
+
function wr(t, r) {
|
|
278
|
+
return /* @__PURE__ */ e("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
|
+
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-[var(--text-main)]", children: "No se pudo cargar este modulo" }),
|
|
280
|
+
/* @__PURE__ */ e("p", { className: "mt-1 text-xs text-[var(--text-muted)]", children: t.message }),
|
|
281
|
+
/* @__PURE__ */ e(he, { className: "mt-4", height: 36, padding: "0 14px", onClick: r, children: "Reintentar" })
|
|
282
|
+
] }) });
|
|
283
|
+
}
|
|
284
|
+
function xn({
|
|
285
|
+
parentPanel: t,
|
|
286
|
+
parentPanelComponent: r,
|
|
287
|
+
renderParentPanel: n,
|
|
288
|
+
parent: a,
|
|
289
|
+
context: l,
|
|
290
|
+
links: u,
|
|
291
|
+
moduleRegistry: d,
|
|
292
|
+
loadModule: p,
|
|
293
|
+
activeService: m,
|
|
294
|
+
initialService: h,
|
|
295
|
+
onActiveServiceChange: w,
|
|
296
|
+
canAccess: N,
|
|
297
|
+
keepAlive: g = !0,
|
|
298
|
+
title: f,
|
|
299
|
+
subtitle: v,
|
|
300
|
+
emptyState: c,
|
|
301
|
+
loadingState: $,
|
|
302
|
+
errorState: D = wr,
|
|
303
|
+
renderTabLabel: K,
|
|
304
|
+
searchableTabs: W = "auto",
|
|
305
|
+
tabsSearchThreshold: E = 6,
|
|
306
|
+
tabsSearchPlaceholder: T = "Buscar modulo...",
|
|
307
|
+
tabsSearchValue: I,
|
|
308
|
+
onTabsSearchChange: L,
|
|
309
|
+
emptySearchState: F,
|
|
310
|
+
showTabCount: M = !0,
|
|
311
|
+
className: S = "",
|
|
312
|
+
parentClassName: P = "",
|
|
313
|
+
contentClassName: J = "",
|
|
314
|
+
tabsClassName: _ = ""
|
|
315
|
+
}) {
|
|
316
|
+
var ue;
|
|
317
|
+
const j = Oe(
|
|
318
|
+
() => u.filter(
|
|
319
|
+
(b) => !b.hidden && ((N == null ? void 0 : N(b, l)) ?? !0)
|
|
320
|
+
),
|
|
321
|
+
[N, l, u]
|
|
322
|
+
), U = (ue = j.find(
|
|
323
|
+
(b) => !b.disabled
|
|
324
|
+
)) == null ? void 0 : ue.service, [Z, o] = B(
|
|
325
|
+
h ?? U ?? ""
|
|
326
|
+
), [y, H] = B({}), [q, G] = B({}), [ee, me] = B(""), [te, be] = B(!1), fe = ie(q), ve = ie(0), de = I ?? ee, k = bt(de), A = W === !0 || W === "auto" && j.length >= E, X = A && de.trim().length > 0, ne = Oe(() => k ? j.filter(
|
|
327
|
+
(b) => bt(gr(b)).includes(k)
|
|
328
|
+
) : j, [k, j]), ce = m ?? Z, R = j.find((b) => b.service === ce) ?? j.find((b) => !b.disabled);
|
|
329
|
+
O(() => {
|
|
330
|
+
!R && U && o(U);
|
|
331
|
+
}, [U, R]), O(() => {
|
|
332
|
+
fe.current = q;
|
|
333
|
+
}, [q]);
|
|
334
|
+
const Ne = (b) => {
|
|
335
|
+
b.disabled || (m || o(b.service), w == null || w(b.service, b));
|
|
336
|
+
}, Pe = (b) => {
|
|
337
|
+
I === void 0 && me(b), L == null || L(b);
|
|
338
|
+
}, xe = (b, V) => {
|
|
339
|
+
const oe = ne.filter((se) => !se.disabled), Ce = oe.findIndex(
|
|
340
|
+
(se) => se.service === V.service
|
|
341
|
+
);
|
|
342
|
+
Ce < 0 || ((b.key === "ArrowRight" || b.key === "ArrowDown") && (b.preventDefault(), Ne(oe[(Ce + 1) % oe.length])), (b.key === "ArrowLeft" || b.key === "ArrowUp") && (b.preventDefault(), Ne(
|
|
343
|
+
oe[(Ce - 1 + oe.length) % oe.length]
|
|
344
|
+
)), b.key === "Home" && (b.preventDefault(), Ne(oe[0])), b.key === "End" && (b.preventDefault(), Ne(oe[oe.length - 1])));
|
|
345
|
+
}, De = et(() => {
|
|
346
|
+
if (!R) return;
|
|
347
|
+
const b = R.service, V = fe.current[b];
|
|
348
|
+
if (V != null && V.loading || V != null && V.component && g) return;
|
|
349
|
+
const oe = (d == null ? void 0 : d[b]) ?? p;
|
|
350
|
+
if (!oe) {
|
|
351
|
+
G((se) => ({
|
|
352
|
+
...se,
|
|
353
|
+
[b]: {
|
|
354
|
+
loading: !1,
|
|
355
|
+
error: new Error(`No module loader found for service "${b}".`)
|
|
356
|
+
}
|
|
357
|
+
}));
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
const Ce = ++ve.current;
|
|
361
|
+
G((se) => ({
|
|
362
|
+
...se,
|
|
363
|
+
[b]: { ...se[b], loading: !0, error: void 0 }
|
|
364
|
+
})), oe(R, l).then((se) => {
|
|
365
|
+
if (Ce !== ve.current && !g) return;
|
|
366
|
+
const $e = yr(se);
|
|
367
|
+
G((Be) => ({
|
|
368
|
+
...Be,
|
|
369
|
+
[b]: { component: $e, loading: !1 }
|
|
370
|
+
}));
|
|
371
|
+
}).catch((se) => {
|
|
372
|
+
const $e = se instanceof Error ? se : new Error(String(se));
|
|
373
|
+
G((Be) => ({
|
|
374
|
+
...Be,
|
|
375
|
+
[b]: { ...Be[b], loading: !1, error: $e }
|
|
376
|
+
}));
|
|
377
|
+
});
|
|
378
|
+
}, [l, g, p, d, R]);
|
|
379
|
+
O(De, [De]);
|
|
380
|
+
const We = R ? y[R.service] ?? null : null, ae = R ? q[R.service] : void 0, Me = ae == null ? void 0 : ae.component, Ie = (b) => {
|
|
381
|
+
R && H((V) => ({
|
|
382
|
+
...V,
|
|
383
|
+
[R.service]: b
|
|
384
|
+
}));
|
|
385
|
+
}, je = () => {
|
|
386
|
+
R && H((b) => ({
|
|
387
|
+
...b,
|
|
388
|
+
[R.service]: null
|
|
389
|
+
}));
|
|
390
|
+
}, ge = {
|
|
391
|
+
context: l,
|
|
392
|
+
parent: a,
|
|
393
|
+
links: u,
|
|
394
|
+
visibleLinks: j,
|
|
395
|
+
filteredLinks: ne,
|
|
396
|
+
selectedLink: R,
|
|
397
|
+
selectedService: R == null ? void 0 : R.service,
|
|
398
|
+
activeItemId: We,
|
|
399
|
+
tabsSearch: de,
|
|
400
|
+
onSelectService: Ne,
|
|
401
|
+
onOpenDetail: Ie,
|
|
402
|
+
onBackToList: je
|
|
403
|
+
}, ye = n ? n(ge) : r ? /* @__PURE__ */ e(r, { ...ge }) : t;
|
|
404
|
+
return /* @__PURE__ */ i(
|
|
405
|
+
"section",
|
|
406
|
+
{
|
|
407
|
+
className: `grid min-h-[520px] gap-4 lg:grid-cols-[minmax(260px,360px)_minmax(0,1fr)] ${S}`,
|
|
408
|
+
children: [
|
|
409
|
+
/* @__PURE__ */ e(
|
|
410
|
+
"aside",
|
|
411
|
+
{
|
|
412
|
+
className: `min-w-0 rounded-lg border border-[var(--border)] bg-[var(--bg-card)] p-4 ${P}`,
|
|
413
|
+
children: ye
|
|
414
|
+
}
|
|
415
|
+
),
|
|
416
|
+
/* @__PURE__ */ i(
|
|
417
|
+
"div",
|
|
418
|
+
{
|
|
419
|
+
className: `relative min-w-0 overflow-visible rounded-lg border border-[var(--border)] bg-[var(--bg-card)] ${J}`,
|
|
420
|
+
children: [
|
|
421
|
+
(f || v || A || M) && /* @__PURE__ */ e("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
|
+
/* @__PURE__ */ i("div", { className: "min-w-0", children: [
|
|
423
|
+
f && /* @__PURE__ */ e("h2", { className: "truncate text-sm font-semibold text-[var(--text-main)]", children: f }),
|
|
424
|
+
v && /* @__PURE__ */ e("p", { className: "mt-1 line-clamp-2 text-xs text-[var(--text-muted)]", children: v })
|
|
425
|
+
] }),
|
|
426
|
+
(A || M) && /* @__PURE__ */ i("div", { className: "flex min-w-0 flex-shrink-0 items-center justify-end gap-2", children: [
|
|
427
|
+
M && /* @__PURE__ */ i("span", { className: "hidden text-xs font-semibold text-[var(--text-muted)] transition-opacity duration-200 sm:inline", children: [
|
|
428
|
+
ne.length,
|
|
429
|
+
" / ",
|
|
430
|
+
j.length
|
|
431
|
+
] }),
|
|
432
|
+
A && /* @__PURE__ */ i(we, { children: [
|
|
433
|
+
/* @__PURE__ */ e(
|
|
434
|
+
"div",
|
|
435
|
+
{
|
|
436
|
+
className: `origin-right overflow-hidden transition-[width,opacity,transform] duration-200 ease-out ${te ? "w-[min(20rem,44vw)] translate-x-0 opacity-100" : "w-0 translate-x-2 opacity-0"}`,
|
|
437
|
+
"aria-hidden": !te,
|
|
438
|
+
children: /* @__PURE__ */ e(
|
|
439
|
+
ur,
|
|
440
|
+
{
|
|
441
|
+
value: de,
|
|
442
|
+
onChange: Pe,
|
|
443
|
+
placeholder: T,
|
|
444
|
+
className: "w-full",
|
|
445
|
+
autoFocus: te,
|
|
446
|
+
forceExpanded: !0,
|
|
447
|
+
onEscape: () => be(!1),
|
|
448
|
+
size: "sm",
|
|
449
|
+
inputTabIndex: te ? 0 : -1
|
|
450
|
+
}
|
|
451
|
+
)
|
|
452
|
+
}
|
|
453
|
+
),
|
|
454
|
+
/* @__PURE__ */ e(
|
|
455
|
+
"button",
|
|
456
|
+
{
|
|
457
|
+
type: "button",
|
|
458
|
+
"aria-label": te ? "Cerrar busqueda" : "Buscar tabs",
|
|
459
|
+
"aria-expanded": te,
|
|
460
|
+
onClick: () => {
|
|
461
|
+
te && de && Pe(""), be((b) => !b);
|
|
462
|
+
},
|
|
463
|
+
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 ${te || X ? "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__ */ e("span", { className: "grid h-4 w-4 place-items-center transition-transform duration-200", children: te || X ? /* @__PURE__ */ e(Se, { className: "h-4 w-4" }) : /* @__PURE__ */ e(Ye, { className: "h-4 w-4" }) })
|
|
465
|
+
}
|
|
466
|
+
)
|
|
467
|
+
] })
|
|
468
|
+
] })
|
|
469
|
+
] }) }),
|
|
470
|
+
/* @__PURE__ */ e(
|
|
471
|
+
"div",
|
|
472
|
+
{
|
|
473
|
+
role: "tablist",
|
|
474
|
+
"aria-label": f ?? "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: ne.length > 0 ? ne.map((b) => {
|
|
477
|
+
const V = b.service === (R == null ? void 0 : R.service);
|
|
478
|
+
return /* @__PURE__ */ e(
|
|
479
|
+
"button",
|
|
480
|
+
{
|
|
481
|
+
type: "button",
|
|
482
|
+
role: "tab",
|
|
483
|
+
"aria-selected": V,
|
|
484
|
+
disabled: b.disabled,
|
|
485
|
+
onClick: () => Ne(b),
|
|
486
|
+
onKeyDown: (oe) => xe(oe, b),
|
|
487
|
+
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 ${V ? "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: K ? K(b, V) : /* @__PURE__ */ i(we, { children: [
|
|
489
|
+
b.icon,
|
|
490
|
+
/* @__PURE__ */ e("span", { children: b.label ?? Mt(b.service) }),
|
|
491
|
+
b.badge && /* @__PURE__ */ e("span", { className: "rounded-full bg-[var(--bg-input)] px-1.5 py-0.5 text-[10px] text-[var(--text-muted)]", children: b.badge })
|
|
492
|
+
] })
|
|
493
|
+
},
|
|
494
|
+
b.service
|
|
495
|
+
);
|
|
496
|
+
}) : /* @__PURE__ */ e("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: F ?? "No hay modulos que coincidan con la busqueda." })
|
|
497
|
+
}
|
|
498
|
+
),
|
|
499
|
+
(R == null ? void 0 : R.description) && /* @__PURE__ */ e("div", { className: "border-b border-[var(--border)] px-4 py-2 text-xs text-[var(--text-muted)]", children: R.description }),
|
|
500
|
+
/* @__PURE__ */ i("div", { className: "min-h-[420px] p-4", children: [
|
|
501
|
+
!R && (c ?? /* @__PURE__ */ e("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." })),
|
|
502
|
+
R && (ae == null ? void 0 : ae.loading) && ($ ?? /* @__PURE__ */ e(br, { title: "Cargando modulo..." })),
|
|
503
|
+
R && (ae == null ? void 0 : ae.error) && D(ae.error, De),
|
|
504
|
+
R && Me && !(ae != null && ae.loading) && !(ae != null && ae.error) && /* @__PURE__ */ e(
|
|
505
|
+
Me,
|
|
506
|
+
{
|
|
507
|
+
context: l,
|
|
508
|
+
parent: a,
|
|
509
|
+
link: R,
|
|
510
|
+
activeItemId: We,
|
|
511
|
+
onOpenDetail: Ie,
|
|
512
|
+
onBackToList: je
|
|
513
|
+
}
|
|
514
|
+
)
|
|
515
|
+
] })
|
|
516
|
+
]
|
|
517
|
+
}
|
|
518
|
+
)
|
|
519
|
+
]
|
|
520
|
+
}
|
|
521
|
+
);
|
|
522
|
+
}
|
|
523
|
+
const Bt = [
|
|
90
524
|
"Enero",
|
|
91
525
|
"Febrero",
|
|
92
526
|
"Marzo",
|
|
@@ -99,7 +533,7 @@ const pt = [
|
|
|
99
533
|
"Octubre",
|
|
100
534
|
"Noviembre",
|
|
101
535
|
"Diciembre"
|
|
102
|
-
],
|
|
536
|
+
], Nr = [
|
|
103
537
|
"Ene",
|
|
104
538
|
"Feb",
|
|
105
539
|
"Mar",
|
|
@@ -112,69 +546,69 @@ const pt = [
|
|
|
112
546
|
"Oct",
|
|
113
547
|
"Nov",
|
|
114
548
|
"Dic"
|
|
115
|
-
],
|
|
116
|
-
function
|
|
549
|
+
], kr = ["Do", "Lu", "Ma", "Mi", "Ju", "Vi", "Sá"], Ke = 6;
|
|
550
|
+
function rt(t, r, n) {
|
|
117
551
|
return `${t}-${String(r).padStart(2, "0")}-${String(n).padStart(2, "0")}`;
|
|
118
552
|
}
|
|
119
|
-
function
|
|
553
|
+
function Sr() {
|
|
120
554
|
const t = /* @__PURE__ */ new Date();
|
|
121
|
-
return
|
|
555
|
+
return rt(t.getFullYear(), t.getMonth() + 1, t.getDate());
|
|
122
556
|
}
|
|
123
|
-
function
|
|
557
|
+
function Lt(t) {
|
|
124
558
|
const [r, n, a] = t.split("-").map(Number);
|
|
125
559
|
return { year: r, month: n, day: a };
|
|
126
560
|
}
|
|
127
|
-
function
|
|
561
|
+
function Cr(t) {
|
|
128
562
|
if (!t) return "Seleccionar fecha";
|
|
129
|
-
const { year: r, month: n, day: a } =
|
|
130
|
-
return !r || !n || !a ? "Seleccionar fecha" : `${String(a).padStart(2, "0")} ${
|
|
563
|
+
const { year: r, month: n, day: a } = Lt(t);
|
|
564
|
+
return !r || !n || !a ? "Seleccionar fecha" : `${String(a).padStart(2, "0")} ${Bt[n - 1]} ${r}`;
|
|
131
565
|
}
|
|
132
|
-
function
|
|
566
|
+
function vn({
|
|
133
567
|
value: t,
|
|
134
568
|
onChange: r,
|
|
135
569
|
minDate: n,
|
|
136
570
|
displayMode: a = "inline"
|
|
137
571
|
}) {
|
|
138
|
-
const l =
|
|
572
|
+
const l = Sr(), d = Lt(t || l), p = a === "popover", [m, h] = B(!1), w = ie(null), [N, g] = B({
|
|
139
573
|
horizontal: "left",
|
|
140
574
|
vertical: "bottom"
|
|
141
|
-
}), [f,
|
|
142
|
-
|
|
143
|
-
if (!p || !
|
|
144
|
-
const o =
|
|
145
|
-
|
|
146
|
-
horizontal:
|
|
147
|
-
vertical:
|
|
575
|
+
}), [f, v] = B(d.year), [c, $] = B(d.month), [D, K] = B("days"), W = 16, [E, T] = B(0), I = f - 7 + E, L = Array.from({ length: W }, (o, y) => I + y);
|
|
576
|
+
O(() => {
|
|
577
|
+
if (!p || !m || !w.current) return;
|
|
578
|
+
const o = w.current.getBoundingClientRect(), y = 8, H = 280, q = 340, G = o.left + H > window.innerWidth - y, ee = o.right - H >= y, me = o.bottom + 8 + q > window.innerHeight - y, te = o.top - 8 - q >= y;
|
|
579
|
+
g({
|
|
580
|
+
horizontal: G && ee ? "right" : "left",
|
|
581
|
+
vertical: me && te ? "top" : "bottom"
|
|
148
582
|
});
|
|
149
|
-
}, [p,
|
|
150
|
-
if (!p || !
|
|
151
|
-
function o(
|
|
152
|
-
|
|
583
|
+
}, [p, m]), O(() => {
|
|
584
|
+
if (!p || !m) return;
|
|
585
|
+
function o(H) {
|
|
586
|
+
w.current && (w.current.contains(H.target) || h(!1));
|
|
153
587
|
}
|
|
154
|
-
function
|
|
155
|
-
|
|
588
|
+
function y(H) {
|
|
589
|
+
H.key === "Escape" && h(!1);
|
|
156
590
|
}
|
|
157
|
-
return document.addEventListener("mousedown", o), document.addEventListener("keydown",
|
|
158
|
-
document.removeEventListener("mousedown", o), document.removeEventListener("keydown",
|
|
591
|
+
return document.addEventListener("mousedown", o), document.addEventListener("keydown", y), () => {
|
|
592
|
+
document.removeEventListener("mousedown", o), document.removeEventListener("keydown", y);
|
|
159
593
|
};
|
|
160
|
-
}, [p,
|
|
161
|
-
function
|
|
162
|
-
|
|
594
|
+
}, [p, m]);
|
|
595
|
+
function F() {
|
|
596
|
+
c === 1 ? (v((o) => o - 1), $(12)) : $((o) => o - 1);
|
|
163
597
|
}
|
|
164
|
-
function
|
|
165
|
-
|
|
598
|
+
function M() {
|
|
599
|
+
c === 12 ? (v((o) => o + 1), $(1)) : $((o) => o + 1);
|
|
166
600
|
}
|
|
167
|
-
const
|
|
168
|
-
...Array(
|
|
169
|
-
...Array.from({ length:
|
|
601
|
+
const S = new Date(f, c - 1, 1).getDay(), P = new Date(f, c, 0).getDate(), J = [
|
|
602
|
+
...Array(S).fill(null),
|
|
603
|
+
...Array.from({ length: P }, (o, y) => y + 1)
|
|
170
604
|
];
|
|
171
|
-
for (;
|
|
172
|
-
const
|
|
173
|
-
function
|
|
174
|
-
const
|
|
175
|
-
n &&
|
|
605
|
+
for (; J.length < Ke * 7; ) J.push(null);
|
|
606
|
+
const _ = J.slice(0, Ke * 7);
|
|
607
|
+
function j(o) {
|
|
608
|
+
const y = rt(f, c, o);
|
|
609
|
+
n && y < n || (r(y), p && h(!1));
|
|
176
610
|
}
|
|
177
|
-
const
|
|
611
|
+
const U = {
|
|
178
612
|
background: "none",
|
|
179
613
|
border: "none",
|
|
180
614
|
cursor: "pointer",
|
|
@@ -183,7 +617,7 @@ function en({
|
|
|
183
617
|
borderRadius: 6,
|
|
184
618
|
display: "flex",
|
|
185
619
|
alignItems: "center"
|
|
186
|
-
},
|
|
620
|
+
}, Z = /* @__PURE__ */ i(
|
|
187
621
|
"div",
|
|
188
622
|
{
|
|
189
623
|
style: {
|
|
@@ -205,23 +639,23 @@ function en({
|
|
|
205
639
|
padding: "10px 12px",
|
|
206
640
|
borderBottom: "1px solid var(--border)"
|
|
207
641
|
},
|
|
208
|
-
children:
|
|
642
|
+
children: D === "days" ? /* @__PURE__ */ i(we, { children: [
|
|
209
643
|
/* @__PURE__ */ e(
|
|
210
644
|
"button",
|
|
211
645
|
{
|
|
212
646
|
type: "button",
|
|
213
|
-
onClick:
|
|
214
|
-
style:
|
|
647
|
+
onClick: F,
|
|
648
|
+
style: U,
|
|
215
649
|
title: "Mes anterior",
|
|
216
|
-
children: /* @__PURE__ */ e(
|
|
650
|
+
children: /* @__PURE__ */ e(_e, { size: 16 })
|
|
217
651
|
}
|
|
218
652
|
),
|
|
219
|
-
/* @__PURE__ */
|
|
653
|
+
/* @__PURE__ */ i(
|
|
220
654
|
"button",
|
|
221
655
|
{
|
|
222
656
|
type: "button",
|
|
223
657
|
onClick: () => {
|
|
224
|
-
|
|
658
|
+
K("years"), T(0);
|
|
225
659
|
},
|
|
226
660
|
style: {
|
|
227
661
|
background: "none",
|
|
@@ -237,10 +671,10 @@ function en({
|
|
|
237
671
|
padding: "2px 6px"
|
|
238
672
|
},
|
|
239
673
|
children: [
|
|
240
|
-
|
|
674
|
+
Bt[c - 1],
|
|
241
675
|
" ",
|
|
242
676
|
f,
|
|
243
|
-
/* @__PURE__ */ e(
|
|
677
|
+
/* @__PURE__ */ e(He, { size: 13, style: { color: "var(--text-muted)" } })
|
|
244
678
|
]
|
|
245
679
|
}
|
|
246
680
|
),
|
|
@@ -248,27 +682,27 @@ function en({
|
|
|
248
682
|
"button",
|
|
249
683
|
{
|
|
250
684
|
type: "button",
|
|
251
|
-
onClick:
|
|
252
|
-
style:
|
|
685
|
+
onClick: M,
|
|
686
|
+
style: U,
|
|
253
687
|
title: "Mes siguiente",
|
|
254
|
-
children: /* @__PURE__ */ e(
|
|
688
|
+
children: /* @__PURE__ */ e(Te, { size: 16 })
|
|
255
689
|
}
|
|
256
690
|
)
|
|
257
|
-
] }) : /* @__PURE__ */
|
|
691
|
+
] }) : /* @__PURE__ */ i(we, { children: [
|
|
258
692
|
/* @__PURE__ */ e(
|
|
259
693
|
"button",
|
|
260
694
|
{
|
|
261
695
|
type: "button",
|
|
262
|
-
onClick: () =>
|
|
263
|
-
style:
|
|
264
|
-
children: /* @__PURE__ */ e(
|
|
696
|
+
onClick: () => T((o) => o - W),
|
|
697
|
+
style: U,
|
|
698
|
+
children: /* @__PURE__ */ e(_e, { size: 16 })
|
|
265
699
|
}
|
|
266
700
|
),
|
|
267
|
-
/* @__PURE__ */
|
|
701
|
+
/* @__PURE__ */ i(
|
|
268
702
|
"button",
|
|
269
703
|
{
|
|
270
704
|
type: "button",
|
|
271
|
-
onClick: () =>
|
|
705
|
+
onClick: () => K("days"),
|
|
272
706
|
style: {
|
|
273
707
|
background: "none",
|
|
274
708
|
border: "none",
|
|
@@ -280,9 +714,9 @@ function en({
|
|
|
280
714
|
padding: "2px 6px"
|
|
281
715
|
},
|
|
282
716
|
children: [
|
|
283
|
-
|
|
717
|
+
L[0],
|
|
284
718
|
" – ",
|
|
285
|
-
|
|
719
|
+
L[L.length - 1]
|
|
286
720
|
]
|
|
287
721
|
}
|
|
288
722
|
),
|
|
@@ -290,15 +724,15 @@ function en({
|
|
|
290
724
|
"button",
|
|
291
725
|
{
|
|
292
726
|
type: "button",
|
|
293
|
-
onClick: () =>
|
|
294
|
-
style:
|
|
295
|
-
children: /* @__PURE__ */ e(
|
|
727
|
+
onClick: () => T((o) => o + W),
|
|
728
|
+
style: U,
|
|
729
|
+
children: /* @__PURE__ */ e(Te, { size: 16 })
|
|
296
730
|
}
|
|
297
731
|
)
|
|
298
732
|
] })
|
|
299
733
|
}
|
|
300
734
|
),
|
|
301
|
-
|
|
735
|
+
D === "years" && /* @__PURE__ */ i("div", { style: { padding: "8px 10px 10px" }, children: [
|
|
302
736
|
/* @__PURE__ */ e(
|
|
303
737
|
"div",
|
|
304
738
|
{
|
|
@@ -308,22 +742,22 @@ function en({
|
|
|
308
742
|
gap: 3,
|
|
309
743
|
marginBottom: 8
|
|
310
744
|
},
|
|
311
|
-
children:
|
|
312
|
-
const
|
|
745
|
+
children: Nr.map((o, y) => {
|
|
746
|
+
const H = y + 1 === c;
|
|
313
747
|
return /* @__PURE__ */ e(
|
|
314
748
|
"button",
|
|
315
749
|
{
|
|
316
750
|
type: "button",
|
|
317
|
-
onClick: () =>
|
|
751
|
+
onClick: () => $(y + 1),
|
|
318
752
|
style: {
|
|
319
753
|
border: "none",
|
|
320
754
|
cursor: "pointer",
|
|
321
755
|
borderRadius: 6,
|
|
322
756
|
fontSize: 11,
|
|
323
|
-
fontWeight:
|
|
757
|
+
fontWeight: H ? 700 : 400,
|
|
324
758
|
padding: "4px 0",
|
|
325
|
-
background:
|
|
326
|
-
color:
|
|
759
|
+
background: H ? "var(--primary)" : "transparent",
|
|
760
|
+
color: H ? "var(--primary-fg, #ffffff)" : "var(--text-secondary)"
|
|
327
761
|
},
|
|
328
762
|
children: o
|
|
329
763
|
},
|
|
@@ -346,25 +780,25 @@ function en({
|
|
|
346
780
|
gridTemplateColumns: "repeat(4,1fr)",
|
|
347
781
|
gap: 3
|
|
348
782
|
},
|
|
349
|
-
children:
|
|
350
|
-
const
|
|
783
|
+
children: L.map((o) => {
|
|
784
|
+
const y = o === f;
|
|
351
785
|
return /* @__PURE__ */ e(
|
|
352
786
|
"button",
|
|
353
787
|
{
|
|
354
788
|
type: "button",
|
|
355
789
|
onClick: () => {
|
|
356
|
-
|
|
790
|
+
v(o), K("days");
|
|
357
791
|
},
|
|
358
792
|
style: {
|
|
359
793
|
border: "none",
|
|
360
794
|
cursor: "pointer",
|
|
361
795
|
borderRadius: 6,
|
|
362
796
|
fontSize: 12,
|
|
363
|
-
fontWeight:
|
|
797
|
+
fontWeight: y ? 700 : 400,
|
|
364
798
|
padding: "6px 0",
|
|
365
|
-
background:
|
|
366
|
-
color:
|
|
367
|
-
outline: o === (/* @__PURE__ */ new Date()).getFullYear() && !
|
|
799
|
+
background: y ? "var(--primary)" : "transparent",
|
|
800
|
+
color: y ? "var(--primary-fg, #ffffff)" : "var(--text-main)",
|
|
801
|
+
outline: o === (/* @__PURE__ */ new Date()).getFullYear() && !y ? "2px solid var(--primary)" : "none",
|
|
368
802
|
outlineOffset: "-2px"
|
|
369
803
|
},
|
|
370
804
|
children: o
|
|
@@ -375,7 +809,7 @@ function en({
|
|
|
375
809
|
}
|
|
376
810
|
)
|
|
377
811
|
] }),
|
|
378
|
-
|
|
812
|
+
D === "days" && /* @__PURE__ */ i(we, { children: [
|
|
379
813
|
/* @__PURE__ */ e(
|
|
380
814
|
"div",
|
|
381
815
|
{
|
|
@@ -384,7 +818,7 @@ function en({
|
|
|
384
818
|
gridTemplateColumns: "repeat(7,1fr)",
|
|
385
819
|
padding: "6px 8px 0"
|
|
386
820
|
},
|
|
387
|
-
children:
|
|
821
|
+
children: kr.map((o) => /* @__PURE__ */ e(
|
|
388
822
|
"div",
|
|
389
823
|
{
|
|
390
824
|
style: {
|
|
@@ -407,36 +841,36 @@ function en({
|
|
|
407
841
|
style: {
|
|
408
842
|
display: "grid",
|
|
409
843
|
gridTemplateColumns: "repeat(7,1fr)",
|
|
410
|
-
gridTemplateRows: `repeat(${
|
|
844
|
+
gridTemplateRows: `repeat(${Ke},1fr)`,
|
|
411
845
|
padding: "4px 8px 10px",
|
|
412
846
|
gap: 2
|
|
413
847
|
},
|
|
414
|
-
children:
|
|
848
|
+
children: _.map((o, y) => {
|
|
415
849
|
if (o === null)
|
|
416
|
-
return /* @__PURE__ */ e("div", { style: { aspectRatio: "1" } },
|
|
417
|
-
const
|
|
850
|
+
return /* @__PURE__ */ e("div", { style: { aspectRatio: "1" } }, y);
|
|
851
|
+
const H = rt(f, c, o), q = H === t, G = H === l, ee = !!(n && H < n);
|
|
418
852
|
return /* @__PURE__ */ e(
|
|
419
853
|
"button",
|
|
420
854
|
{
|
|
421
855
|
type: "button",
|
|
422
|
-
onClick: () => !
|
|
856
|
+
onClick: () => !ee && j(o),
|
|
423
857
|
style: {
|
|
424
858
|
width: "100%",
|
|
425
859
|
aspectRatio: "1",
|
|
426
860
|
borderRadius: 6,
|
|
427
861
|
border: "none",
|
|
428
|
-
cursor:
|
|
862
|
+
cursor: ee ? "not-allowed" : "pointer",
|
|
429
863
|
fontSize: 12,
|
|
430
|
-
fontWeight:
|
|
431
|
-
background:
|
|
432
|
-
color:
|
|
433
|
-
opacity:
|
|
434
|
-
outline:
|
|
864
|
+
fontWeight: q || G ? 700 : 400,
|
|
865
|
+
background: q ? "var(--primary)" : "transparent",
|
|
866
|
+
color: q ? "var(--primary-fg, #ffffff)" : ee ? "var(--text-muted)" : "var(--text-main)",
|
|
867
|
+
opacity: ee ? 0.4 : 1,
|
|
868
|
+
outline: G && !q ? "2px solid var(--primary)" : "none",
|
|
435
869
|
outlineOffset: "-2px"
|
|
436
870
|
},
|
|
437
871
|
children: o
|
|
438
872
|
},
|
|
439
|
-
|
|
873
|
+
y
|
|
440
874
|
);
|
|
441
875
|
})
|
|
442
876
|
}
|
|
@@ -445,137 +879,137 @@ function en({
|
|
|
445
879
|
]
|
|
446
880
|
}
|
|
447
881
|
);
|
|
448
|
-
return p ? /* @__PURE__ */
|
|
449
|
-
/* @__PURE__ */
|
|
882
|
+
return p ? /* @__PURE__ */ i("div", { ref: w, className: "relative w-full", children: [
|
|
883
|
+
/* @__PURE__ */ i(
|
|
450
884
|
"button",
|
|
451
885
|
{
|
|
452
886
|
type: "button",
|
|
453
|
-
onClick: () =>
|
|
887
|
+
onClick: () => h((o) => !o),
|
|
454
888
|
className: "flex h-11 w-full items-center justify-between gap-2 rounded-lg px-3 py-0 text-sm transition-all duration-150 focus:outline-none",
|
|
455
889
|
style: {
|
|
456
890
|
background: "var(--bg-input)",
|
|
457
|
-
border: `1px solid ${
|
|
891
|
+
border: `1px solid ${m ? "var(--primary)" : "var(--border)"}`,
|
|
458
892
|
color: "var(--text-main)",
|
|
459
|
-
boxShadow:
|
|
893
|
+
boxShadow: m ? "0 0 0 3px rgba(59,130,246,0.12)" : "none"
|
|
460
894
|
},
|
|
461
895
|
children: [
|
|
462
|
-
/* @__PURE__ */
|
|
463
|
-
/* @__PURE__ */ e(
|
|
464
|
-
/* @__PURE__ */ e("span", { className: "truncate", children:
|
|
896
|
+
/* @__PURE__ */ i("span", { className: "inline-flex items-center gap-2 min-w-0", children: [
|
|
897
|
+
/* @__PURE__ */ e(tt, { className: "w-4 h-4 text-[var(--text-muted)]" }),
|
|
898
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: Cr(t) })
|
|
465
899
|
] }),
|
|
466
900
|
/* @__PURE__ */ e(
|
|
467
|
-
|
|
901
|
+
He,
|
|
468
902
|
{
|
|
469
|
-
className: `w-4 h-4 text-[var(--text-muted)] transition-transform ${
|
|
903
|
+
className: `w-4 h-4 text-[var(--text-muted)] transition-transform ${m ? "rotate-180" : ""}`
|
|
470
904
|
}
|
|
471
905
|
)
|
|
472
906
|
]
|
|
473
907
|
}
|
|
474
908
|
),
|
|
475
|
-
|
|
909
|
+
m && /* @__PURE__ */ e(
|
|
476
910
|
"div",
|
|
477
911
|
{
|
|
478
912
|
className: "absolute z-50",
|
|
479
913
|
style: {
|
|
480
|
-
...
|
|
481
|
-
...
|
|
914
|
+
...N.horizontal === "left" ? { left: 0 } : { right: 0 },
|
|
915
|
+
...N.vertical === "bottom" ? { top: "calc(100% + 8px)" } : { bottom: "calc(100% + 8px)" }
|
|
482
916
|
},
|
|
483
|
-
children:
|
|
917
|
+
children: Z
|
|
484
918
|
}
|
|
485
919
|
)
|
|
486
|
-
] }) :
|
|
920
|
+
] }) : Z;
|
|
487
921
|
}
|
|
488
|
-
function
|
|
922
|
+
function xt(t) {
|
|
489
923
|
if (t !== void 0)
|
|
490
924
|
return typeof t == "number" ? `${t}px` : t;
|
|
491
925
|
}
|
|
492
|
-
function
|
|
926
|
+
function Tt({
|
|
493
927
|
value: t,
|
|
494
928
|
onChange: r,
|
|
495
929
|
options: n,
|
|
496
930
|
placeholder: a = "Seleccionar…",
|
|
497
931
|
emptyLabel: l,
|
|
498
932
|
disabled: u = !1,
|
|
499
|
-
className:
|
|
933
|
+
className: d = "",
|
|
500
934
|
style: p,
|
|
501
|
-
height:
|
|
502
|
-
padding:
|
|
503
|
-
searchable:
|
|
504
|
-
minOptionsForSearch:
|
|
935
|
+
height: m = 44,
|
|
936
|
+
padding: h = "0 12px",
|
|
937
|
+
searchable: w = !0,
|
|
938
|
+
minOptionsForSearch: N = 6
|
|
505
939
|
}) {
|
|
506
|
-
const [
|
|
940
|
+
const [g, f] = B(!1), [v, c] = B(""), [$, D] = B(-1), [K, W] = B(!1), [E, T] = B({}), I = ie(null), L = ie(null), F = ie(null), M = ie(null), S = w && n.length >= N, P = n.find((o) => o.value === t) ?? null, J = S && v.trim() ? n.filter(
|
|
507
941
|
(o) => {
|
|
508
|
-
var
|
|
509
|
-
return o.label.toLowerCase().includes(
|
|
942
|
+
var y;
|
|
943
|
+
return o.label.toLowerCase().includes(v.toLowerCase()) || ((y = o.sublabel) == null ? void 0 : y.toLowerCase().includes(v.toLowerCase()));
|
|
510
944
|
}
|
|
511
|
-
) : n,
|
|
512
|
-
const o =
|
|
945
|
+
) : n, _ = et(() => {
|
|
946
|
+
const o = I.current;
|
|
513
947
|
if (!o) return;
|
|
514
|
-
const
|
|
515
|
-
|
|
948
|
+
const y = o.getBoundingClientRect(), H = S ? 272 : 212, q = window.innerHeight - y.bottom, G = q < H && y.top > q;
|
|
949
|
+
T({
|
|
516
950
|
position: "fixed",
|
|
517
|
-
left:
|
|
518
|
-
top:
|
|
519
|
-
bottom:
|
|
520
|
-
width:
|
|
951
|
+
left: y.left,
|
|
952
|
+
top: G ? void 0 : y.bottom + 4,
|
|
953
|
+
bottom: G ? window.innerHeight - y.top + 4 : void 0,
|
|
954
|
+
width: y.width,
|
|
521
955
|
zIndex: 9999
|
|
522
956
|
});
|
|
523
|
-
}, [
|
|
524
|
-
|
|
525
|
-
if (!
|
|
526
|
-
function o(
|
|
527
|
-
var
|
|
528
|
-
const
|
|
529
|
-
!((
|
|
957
|
+
}, [S]);
|
|
958
|
+
O(() => W(!0), []), O(() => {
|
|
959
|
+
if (!g) return;
|
|
960
|
+
function o(y) {
|
|
961
|
+
var q, G;
|
|
962
|
+
const H = y.target;
|
|
963
|
+
!((q = I.current) != null && q.contains(H)) && !((G = L.current) != null && G.contains(H)) && (f(!1), c(""));
|
|
530
964
|
}
|
|
531
965
|
return document.addEventListener("mousedown", o), () => document.removeEventListener("mousedown", o);
|
|
532
|
-
}, [
|
|
533
|
-
|
|
966
|
+
}, [g]), O(() => {
|
|
967
|
+
g && (D(-1), _(), S && setTimeout(() => {
|
|
534
968
|
var o;
|
|
535
|
-
return (o =
|
|
969
|
+
return (o = F.current) == null ? void 0 : o.focus();
|
|
536
970
|
}, 0));
|
|
537
|
-
}, [
|
|
538
|
-
if (
|
|
539
|
-
return window.addEventListener("resize",
|
|
540
|
-
window.removeEventListener("resize",
|
|
971
|
+
}, [g, S, _]), O(() => {
|
|
972
|
+
if (g)
|
|
973
|
+
return window.addEventListener("resize", _), window.addEventListener("scroll", _, !0), () => {
|
|
974
|
+
window.removeEventListener("resize", _), window.removeEventListener("scroll", _, !0);
|
|
541
975
|
};
|
|
542
|
-
}, [
|
|
543
|
-
if (
|
|
544
|
-
const o =
|
|
976
|
+
}, [g, _]), O(() => {
|
|
977
|
+
if ($ < 0 || !M.current) return;
|
|
978
|
+
const o = M.current.children[$];
|
|
545
979
|
o == null || o.scrollIntoView({ block: "nearest" });
|
|
546
|
-
}, [
|
|
547
|
-
const
|
|
980
|
+
}, [$]);
|
|
981
|
+
const j = et(
|
|
548
982
|
(o) => {
|
|
549
|
-
r(o), f(!1),
|
|
983
|
+
r(o), f(!1), c("");
|
|
550
984
|
},
|
|
551
985
|
[r]
|
|
552
986
|
);
|
|
553
|
-
function
|
|
554
|
-
if (!
|
|
987
|
+
function U(o) {
|
|
988
|
+
if (!g) {
|
|
555
989
|
(o.key === "Enter" || o.key === " " || o.key === "ArrowDown") && (o.preventDefault(), f(!0));
|
|
556
990
|
return;
|
|
557
991
|
}
|
|
558
|
-
o.key === "Escape" ? (o.preventDefault(), f(!1),
|
|
992
|
+
o.key === "Escape" ? (o.preventDefault(), f(!1), c("")) : o.key === "ArrowDown" ? (o.preventDefault(), D((y) => Math.min(y + 1, J.length - 1))) : o.key === "ArrowUp" ? (o.preventDefault(), D((y) => Math.max(y - 1, l ? -1 : 0))) : o.key === "Enter" && (o.preventDefault(), $ === -1 && l ? j("") : J[$] && j(J[$].value));
|
|
559
993
|
}
|
|
560
|
-
const
|
|
994
|
+
const Z = /* @__PURE__ */ i(
|
|
561
995
|
"div",
|
|
562
996
|
{
|
|
563
|
-
ref:
|
|
997
|
+
ref: L,
|
|
564
998
|
className: "rounded-xl shadow-xl overflow-hidden",
|
|
565
999
|
style: {
|
|
566
|
-
...
|
|
1000
|
+
...E,
|
|
567
1001
|
background: "var(--bg-card)",
|
|
568
1002
|
border: "1px solid var(--border)"
|
|
569
1003
|
},
|
|
570
1004
|
children: [
|
|
571
|
-
|
|
1005
|
+
S && /* @__PURE__ */ i(
|
|
572
1006
|
"div",
|
|
573
1007
|
{
|
|
574
1008
|
className: "flex items-center gap-2 px-3 py-2",
|
|
575
1009
|
style: { borderBottom: "1px solid var(--border)" },
|
|
576
1010
|
children: [
|
|
577
1011
|
/* @__PURE__ */ e(
|
|
578
|
-
|
|
1012
|
+
Ye,
|
|
579
1013
|
{
|
|
580
1014
|
className: "w-3.5 h-3.5 flex-shrink-0",
|
|
581
1015
|
style: { color: "var(--text-muted)" }
|
|
@@ -584,25 +1018,25 @@ function ft({
|
|
|
584
1018
|
/* @__PURE__ */ e(
|
|
585
1019
|
"input",
|
|
586
1020
|
{
|
|
587
|
-
ref:
|
|
588
|
-
value:
|
|
1021
|
+
ref: F,
|
|
1022
|
+
value: v,
|
|
589
1023
|
onChange: (o) => {
|
|
590
|
-
|
|
1024
|
+
c(o.target.value), D(-1);
|
|
591
1025
|
},
|
|
592
1026
|
placeholder: "Buscar…",
|
|
593
1027
|
className: "min-w-0 flex-1 text-sm bg-transparent outline-none",
|
|
594
1028
|
style: { color: "var(--text-main)" }
|
|
595
1029
|
}
|
|
596
1030
|
),
|
|
597
|
-
|
|
1031
|
+
v && /* @__PURE__ */ e(
|
|
598
1032
|
"button",
|
|
599
1033
|
{
|
|
600
1034
|
type: "button",
|
|
601
1035
|
onMouseDown: (o) => {
|
|
602
|
-
o.preventDefault(),
|
|
1036
|
+
o.preventDefault(), c("");
|
|
603
1037
|
},
|
|
604
1038
|
children: /* @__PURE__ */ e(
|
|
605
|
-
|
|
1039
|
+
Se,
|
|
606
1040
|
{
|
|
607
1041
|
className: "w-3.5 h-3.5",
|
|
608
1042
|
style: { color: "var(--text-muted)" }
|
|
@@ -613,14 +1047,14 @@ function ft({
|
|
|
613
1047
|
]
|
|
614
1048
|
}
|
|
615
1049
|
),
|
|
616
|
-
/* @__PURE__ */
|
|
1050
|
+
/* @__PURE__ */ i(
|
|
617
1051
|
"ul",
|
|
618
1052
|
{
|
|
619
|
-
ref:
|
|
1053
|
+
ref: M,
|
|
620
1054
|
role: "listbox",
|
|
621
1055
|
className: "overflow-y-auto",
|
|
622
1056
|
style: {
|
|
623
|
-
maxHeight:
|
|
1057
|
+
maxHeight: S ? 220 : 180,
|
|
624
1058
|
scrollbarWidth: "thin",
|
|
625
1059
|
scrollbarColor: "var(--border) transparent",
|
|
626
1060
|
overscrollBehavior: "contain"
|
|
@@ -632,35 +1066,35 @@ function ft({
|
|
|
632
1066
|
role: "option",
|
|
633
1067
|
"aria-selected": t === "",
|
|
634
1068
|
onMouseDown: (o) => {
|
|
635
|
-
o.preventDefault(),
|
|
1069
|
+
o.preventDefault(), j("");
|
|
636
1070
|
},
|
|
637
|
-
onMouseEnter: () =>
|
|
1071
|
+
onMouseEnter: () => D(-1),
|
|
638
1072
|
className: "flex items-center gap-2 px-3 py-2 cursor-pointer text-sm transition-colors",
|
|
639
1073
|
style: {
|
|
640
|
-
background:
|
|
1074
|
+
background: $ === -1 ? "var(--bg-hover)" : "transparent",
|
|
641
1075
|
color: "var(--text-muted)",
|
|
642
1076
|
fontStyle: "italic"
|
|
643
1077
|
},
|
|
644
1078
|
children: l
|
|
645
1079
|
}
|
|
646
1080
|
),
|
|
647
|
-
|
|
648
|
-
const
|
|
649
|
-
return /* @__PURE__ */
|
|
1081
|
+
J.map((o, y) => {
|
|
1082
|
+
const q = y === $, G = o.value === t;
|
|
1083
|
+
return /* @__PURE__ */ i(
|
|
650
1084
|
"li",
|
|
651
1085
|
{
|
|
652
1086
|
role: "option",
|
|
653
|
-
"aria-selected":
|
|
654
|
-
onMouseDown: (
|
|
655
|
-
|
|
1087
|
+
"aria-selected": G,
|
|
1088
|
+
onMouseDown: (ee) => {
|
|
1089
|
+
ee.preventDefault(), o.disabled || j(o.value);
|
|
656
1090
|
},
|
|
657
|
-
onMouseEnter: () => !o.disabled &&
|
|
1091
|
+
onMouseEnter: () => !o.disabled && D(y),
|
|
658
1092
|
className: "flex items-center gap-2 px-3 py-2 cursor-pointer text-sm transition-colors",
|
|
659
1093
|
style: {
|
|
660
|
-
background:
|
|
1094
|
+
background: q ? "var(--bg-hover)" : G ? "color-mix(in srgb, var(--primary) 6%, transparent)" : "transparent",
|
|
661
1095
|
color: o.disabled ? "var(--text-muted)" : "var(--text-main)",
|
|
662
1096
|
cursor: o.disabled ? "not-allowed" : "pointer",
|
|
663
|
-
boxShadow:
|
|
1097
|
+
boxShadow: G ? "inset 2px 0 0 var(--primary)" : void 0
|
|
664
1098
|
},
|
|
665
1099
|
children: [
|
|
666
1100
|
o.color && /* @__PURE__ */ e(
|
|
@@ -670,7 +1104,7 @@ function ft({
|
|
|
670
1104
|
style: { background: o.color }
|
|
671
1105
|
}
|
|
672
1106
|
),
|
|
673
|
-
/* @__PURE__ */
|
|
1107
|
+
/* @__PURE__ */ i("span", { className: "min-w-0 flex flex-1 items-baseline gap-1 overflow-hidden", children: [
|
|
674
1108
|
/* @__PURE__ */ e("span", { className: "truncate", children: o.label }),
|
|
675
1109
|
o.sublabel && /* @__PURE__ */ e(
|
|
676
1110
|
"span",
|
|
@@ -694,7 +1128,7 @@ function ft({
|
|
|
694
1128
|
o.value
|
|
695
1129
|
);
|
|
696
1130
|
}),
|
|
697
|
-
|
|
1131
|
+
J.length === 0 && /* @__PURE__ */ e(
|
|
698
1132
|
"li",
|
|
699
1133
|
{
|
|
700
1134
|
className: "px-3 py-4 text-sm text-center",
|
|
@@ -708,15 +1142,15 @@ function ft({
|
|
|
708
1142
|
]
|
|
709
1143
|
}
|
|
710
1144
|
);
|
|
711
|
-
return /* @__PURE__ */
|
|
1145
|
+
return /* @__PURE__ */ i(
|
|
712
1146
|
"div",
|
|
713
1147
|
{
|
|
714
|
-
ref:
|
|
715
|
-
className: `relative ${
|
|
1148
|
+
ref: I,
|
|
1149
|
+
className: `relative ${d || "w-full"}`,
|
|
716
1150
|
style: p,
|
|
717
|
-
onKeyDown:
|
|
1151
|
+
onKeyDown: U,
|
|
718
1152
|
children: [
|
|
719
|
-
/* @__PURE__ */
|
|
1153
|
+
/* @__PURE__ */ i(
|
|
720
1154
|
"button",
|
|
721
1155
|
{
|
|
722
1156
|
type: "button",
|
|
@@ -724,84 +1158,84 @@ function ft({
|
|
|
724
1158
|
onClick: () => !u && f((o) => !o),
|
|
725
1159
|
className: "flex w-full items-center gap-2 rounded-lg text-left text-sm transition-colors focus:outline-none",
|
|
726
1160
|
style: {
|
|
727
|
-
height:
|
|
728
|
-
padding:
|
|
1161
|
+
height: xt(m),
|
|
1162
|
+
padding: xt(h),
|
|
729
1163
|
background: "var(--bg-input)",
|
|
730
|
-
color:
|
|
731
|
-
border:
|
|
1164
|
+
color: P ? "var(--text-main)" : "var(--text-muted)",
|
|
1165
|
+
border: g ? "1px solid var(--primary)" : "1px solid var(--border)",
|
|
732
1166
|
opacity: u ? 0.5 : 1,
|
|
733
1167
|
cursor: u ? "not-allowed" : "pointer"
|
|
734
1168
|
},
|
|
735
1169
|
"aria-haspopup": "listbox",
|
|
736
|
-
"aria-expanded":
|
|
1170
|
+
"aria-expanded": g,
|
|
737
1171
|
children: [
|
|
738
|
-
(
|
|
1172
|
+
(P == null ? void 0 : P.color) && /* @__PURE__ */ e(
|
|
739
1173
|
"span",
|
|
740
1174
|
{
|
|
741
1175
|
className: "flex-shrink-0 w-2.5 h-2.5 rounded-full",
|
|
742
|
-
style: { background:
|
|
1176
|
+
style: { background: P.color }
|
|
743
1177
|
}
|
|
744
1178
|
),
|
|
745
|
-
/* @__PURE__ */ e("span", { className: "min-w-0 flex flex-1 items-baseline gap-1 overflow-hidden", children:
|
|
746
|
-
/* @__PURE__ */ e("span", { className: "truncate", children:
|
|
747
|
-
|
|
1179
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 flex flex-1 items-baseline gap-1 overflow-hidden", children: P ? /* @__PURE__ */ i(we, { children: [
|
|
1180
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: P.label }),
|
|
1181
|
+
P.sublabel && /* @__PURE__ */ e(
|
|
748
1182
|
"span",
|
|
749
1183
|
{
|
|
750
1184
|
className: "min-w-0 flex-shrink truncate",
|
|
751
1185
|
style: { color: "var(--text-muted)", fontSize: 12 },
|
|
752
|
-
children:
|
|
1186
|
+
children: P.sublabel
|
|
753
1187
|
}
|
|
754
1188
|
)
|
|
755
1189
|
] }) : /* @__PURE__ */ e("span", { className: "truncate", children: a }) }),
|
|
756
|
-
|
|
1190
|
+
P && l ? /* @__PURE__ */ e(
|
|
757
1191
|
"span",
|
|
758
1192
|
{
|
|
759
1193
|
role: "button",
|
|
760
1194
|
tabIndex: -1,
|
|
761
1195
|
onMouseDown: (o) => {
|
|
762
|
-
o.preventDefault(), o.stopPropagation(),
|
|
1196
|
+
o.preventDefault(), o.stopPropagation(), j("");
|
|
763
1197
|
},
|
|
764
1198
|
className: "flex-shrink-0 rounded-full p-0.5 transition-colors hover:bg-black/10",
|
|
765
1199
|
style: { color: "var(--text-muted)" },
|
|
766
|
-
children: /* @__PURE__ */ e(
|
|
1200
|
+
children: /* @__PURE__ */ e(Se, { className: "w-3 h-3" })
|
|
767
1201
|
}
|
|
768
1202
|
) : /* @__PURE__ */ e(
|
|
769
|
-
|
|
1203
|
+
He,
|
|
770
1204
|
{
|
|
771
1205
|
className: "flex-shrink-0 w-4 h-4 transition-transform",
|
|
772
1206
|
style: {
|
|
773
1207
|
color: "var(--text-muted)",
|
|
774
|
-
transform:
|
|
1208
|
+
transform: g ? "rotate(180deg)" : "rotate(0deg)"
|
|
775
1209
|
}
|
|
776
1210
|
}
|
|
777
1211
|
)
|
|
778
1212
|
]
|
|
779
1213
|
}
|
|
780
1214
|
),
|
|
781
|
-
|
|
1215
|
+
g && K && Ge(Z, document.body)
|
|
782
1216
|
]
|
|
783
1217
|
}
|
|
784
1218
|
);
|
|
785
1219
|
}
|
|
786
|
-
function
|
|
1220
|
+
function Ue(t) {
|
|
787
1221
|
if (t !== void 0)
|
|
788
1222
|
return typeof t == "number" ? `${t}px` : t;
|
|
789
1223
|
}
|
|
790
|
-
function
|
|
1224
|
+
function gn({
|
|
791
1225
|
value: t,
|
|
792
1226
|
onChange: r,
|
|
793
1227
|
placeholder: n = "Buscar...",
|
|
794
1228
|
className: a = "",
|
|
795
1229
|
height: l = 44,
|
|
796
1230
|
padding: u = "0 12px 0 34px",
|
|
797
|
-
iconLeft:
|
|
1231
|
+
iconLeft: d = 12
|
|
798
1232
|
}) {
|
|
799
|
-
return /* @__PURE__ */
|
|
1233
|
+
return /* @__PURE__ */ i("div", { className: `relative ${a}`, children: [
|
|
800
1234
|
/* @__PURE__ */ e(
|
|
801
|
-
|
|
1235
|
+
Ye,
|
|
802
1236
|
{
|
|
803
1237
|
className: "absolute top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-[var(--text-muted)] pointer-events-none",
|
|
804
|
-
style: { left:
|
|
1238
|
+
style: { left: Ue(d) }
|
|
805
1239
|
}
|
|
806
1240
|
),
|
|
807
1241
|
/* @__PURE__ */ e(
|
|
@@ -812,52 +1246,52 @@ function tn({
|
|
|
812
1246
|
onChange: (p) => r(p.target.value),
|
|
813
1247
|
placeholder: n,
|
|
814
1248
|
className: "w-full rounded-lg border border-[var(--border)] [background:var(--bg-card)] text-sm text-[var(--text-main)] placeholder:text-[var(--text-muted)] outline-none transition-[border-color,box-shadow] focus:border-primary focus:ring-2 focus:ring-primary/20",
|
|
815
|
-
style: { height:
|
|
1249
|
+
style: { height: Ue(l), padding: Ue(u) }
|
|
816
1250
|
}
|
|
817
1251
|
)
|
|
818
1252
|
] });
|
|
819
1253
|
}
|
|
820
|
-
function
|
|
1254
|
+
function yn({
|
|
821
1255
|
value: t,
|
|
822
1256
|
onChange: r,
|
|
823
1257
|
options: n,
|
|
824
1258
|
placeholder: a,
|
|
825
1259
|
icon: l,
|
|
826
1260
|
className: u = "",
|
|
827
|
-
height:
|
|
1261
|
+
height: d = 44,
|
|
828
1262
|
padding: p,
|
|
829
|
-
iconLeft:
|
|
830
|
-
searchable:
|
|
1263
|
+
iconLeft: m = 12,
|
|
1264
|
+
searchable: h = !0
|
|
831
1265
|
}) {
|
|
832
|
-
const
|
|
833
|
-
(
|
|
1266
|
+
const w = l ? n.map(
|
|
1267
|
+
(N, g) => g === 0 && !N.color ? { ...N, sublabel: N.sublabel ?? void 0 } : N
|
|
834
1268
|
) : n;
|
|
835
|
-
return /* @__PURE__ */
|
|
1269
|
+
return /* @__PURE__ */ i("div", { className: `relative ${u}`, children: [
|
|
836
1270
|
l && /* @__PURE__ */ e(
|
|
837
1271
|
"span",
|
|
838
1272
|
{
|
|
839
1273
|
className: "pointer-events-none absolute top-1/2 z-10 -translate-y-1/2 text-[var(--text-muted)]",
|
|
840
|
-
style: { left:
|
|
1274
|
+
style: { left: Ue(m) },
|
|
841
1275
|
children: l
|
|
842
1276
|
}
|
|
843
1277
|
),
|
|
844
1278
|
/* @__PURE__ */ e(
|
|
845
|
-
|
|
1279
|
+
Tt,
|
|
846
1280
|
{
|
|
847
1281
|
value: t,
|
|
848
1282
|
onChange: r,
|
|
849
|
-
options:
|
|
1283
|
+
options: w,
|
|
850
1284
|
placeholder: a,
|
|
851
|
-
searchable:
|
|
1285
|
+
searchable: h,
|
|
852
1286
|
minOptionsForSearch: 5,
|
|
853
|
-
height:
|
|
1287
|
+
height: d,
|
|
854
1288
|
padding: p ?? (l ? "0 12px 0 34px" : "0 12px"),
|
|
855
1289
|
className: "[&>button]:text-sm [&>button]:[background:var(--bg-card)]"
|
|
856
1290
|
}
|
|
857
1291
|
)
|
|
858
1292
|
] });
|
|
859
1293
|
}
|
|
860
|
-
const
|
|
1294
|
+
const $r = {
|
|
861
1295
|
sm: "24rem",
|
|
862
1296
|
md: "28rem",
|
|
863
1297
|
lg: "32rem",
|
|
@@ -865,93 +1299,93 @@ const mr = {
|
|
|
865
1299
|
"2xl": "48rem",
|
|
866
1300
|
"4xl": "56rem",
|
|
867
1301
|
"5xl": "64rem"
|
|
868
|
-
},
|
|
869
|
-
function
|
|
1302
|
+
}, Fe = 180;
|
|
1303
|
+
function Er({
|
|
870
1304
|
open: t,
|
|
871
1305
|
onClose: r,
|
|
872
1306
|
title: n,
|
|
873
1307
|
subtitle: a,
|
|
874
1308
|
leadingIcon: l,
|
|
875
1309
|
headerActions: u,
|
|
876
|
-
footer:
|
|
1310
|
+
footer: d,
|
|
877
1311
|
children: p,
|
|
878
|
-
size:
|
|
879
|
-
maxWidth:
|
|
880
|
-
zIndex:
|
|
881
|
-
closeOnBackdrop:
|
|
882
|
-
closeOnEscape:
|
|
1312
|
+
size: m = "md",
|
|
1313
|
+
maxWidth: h,
|
|
1314
|
+
zIndex: w = 1e3,
|
|
1315
|
+
closeOnBackdrop: N = !0,
|
|
1316
|
+
closeOnEscape: g = !0,
|
|
883
1317
|
showCloseButton: f = !0,
|
|
884
|
-
placement:
|
|
885
|
-
bodyClassName:
|
|
886
|
-
panelClassName:
|
|
887
|
-
backdropClassName:
|
|
888
|
-
contentClassName:
|
|
889
|
-
ariaLabel:
|
|
890
|
-
frameless:
|
|
1318
|
+
placement: v = "center",
|
|
1319
|
+
bodyClassName: c = "px-6 py-5",
|
|
1320
|
+
panelClassName: $ = "",
|
|
1321
|
+
backdropClassName: D = "bg-black/50 backdrop-blur-sm",
|
|
1322
|
+
contentClassName: K = "p-4",
|
|
1323
|
+
ariaLabel: W,
|
|
1324
|
+
frameless: E = !1
|
|
891
1325
|
}) {
|
|
892
|
-
const [
|
|
893
|
-
if (
|
|
894
|
-
() =>
|
|
895
|
-
|
|
1326
|
+
const [T, I] = B(!1), [L, F] = B(!1), M = ie(null);
|
|
1327
|
+
if (O(() => (t ? (M.current && clearTimeout(M.current), I(!0), requestAnimationFrame(() => requestAnimationFrame(() => F(!0)))) : (F(!1), M.current = setTimeout(
|
|
1328
|
+
() => I(!1),
|
|
1329
|
+
Fe + 40
|
|
896
1330
|
)), () => {
|
|
897
|
-
|
|
898
|
-
}), [t]),
|
|
1331
|
+
M.current && clearTimeout(M.current);
|
|
1332
|
+
}), [t]), O(() => {
|
|
899
1333
|
if (t)
|
|
900
1334
|
return document.body.style.overflow = "hidden", () => {
|
|
901
1335
|
document.body.style.overflow = "";
|
|
902
1336
|
};
|
|
903
|
-
}, [t]),
|
|
904
|
-
if (!t || !
|
|
905
|
-
const
|
|
906
|
-
|
|
1337
|
+
}, [t]), O(() => {
|
|
1338
|
+
if (!t || !g) return;
|
|
1339
|
+
const U = (Z) => {
|
|
1340
|
+
Z.key === "Escape" && r();
|
|
907
1341
|
};
|
|
908
|
-
return window.addEventListener("keydown",
|
|
909
|
-
}, [
|
|
910
|
-
const
|
|
911
|
-
return
|
|
912
|
-
/* @__PURE__ */
|
|
1342
|
+
return window.addEventListener("keydown", U), () => window.removeEventListener("keydown", U);
|
|
1343
|
+
}, [g, r, t]), !T) return null;
|
|
1344
|
+
const S = n || a || l || u || f, P = h ?? $r[m], J = v === "bottom-mobile" ? "items-end sm:items-center justify-center p-0 sm:p-4" : "items-center justify-center", _ = v === "bottom-mobile" ? "rounded-t-2xl sm:rounded-2xl" : "rounded-2xl", j = L ? "translateY(0) scale(1)" : v === "bottom-mobile" ? "translateY(16px) scale(0.98)" : "translateY(10px) scale(0.96)";
|
|
1345
|
+
return Ge(
|
|
1346
|
+
/* @__PURE__ */ i(
|
|
913
1347
|
"div",
|
|
914
1348
|
{
|
|
915
1349
|
role: "dialog",
|
|
916
1350
|
"aria-modal": "true",
|
|
917
|
-
"aria-label":
|
|
918
|
-
className: `fixed inset-0 flex ${
|
|
919
|
-
style: { zIndex:
|
|
1351
|
+
"aria-label": W ?? n,
|
|
1352
|
+
className: `fixed inset-0 flex ${J} ${K}`,
|
|
1353
|
+
style: { zIndex: w },
|
|
920
1354
|
children: [
|
|
921
1355
|
/* @__PURE__ */ e(
|
|
922
1356
|
"div",
|
|
923
1357
|
{
|
|
924
|
-
className: `absolute inset-0 ${
|
|
925
|
-
onClick:
|
|
1358
|
+
className: `absolute inset-0 ${D}`,
|
|
1359
|
+
onClick: N ? r : void 0,
|
|
926
1360
|
style: {
|
|
927
|
-
opacity:
|
|
928
|
-
transition: `opacity ${
|
|
1361
|
+
opacity: L ? 1 : 0,
|
|
1362
|
+
transition: `opacity ${Fe}ms ease`
|
|
929
1363
|
}
|
|
930
1364
|
}
|
|
931
1365
|
),
|
|
932
|
-
/* @__PURE__ */
|
|
1366
|
+
/* @__PURE__ */ i(
|
|
933
1367
|
"div",
|
|
934
1368
|
{
|
|
935
|
-
className: `relative z-10 flex max-h-[92dvh] w-full flex-col overflow-hidden ${
|
|
1369
|
+
className: `relative z-10 flex max-h-[92dvh] w-full flex-col overflow-hidden ${E ? "shadow-none" : "shadow-2xl"} ${_} ${$}`,
|
|
936
1370
|
style: {
|
|
937
|
-
maxWidth:
|
|
938
|
-
background:
|
|
939
|
-
border:
|
|
940
|
-
opacity:
|
|
941
|
-
transform:
|
|
942
|
-
transition: `opacity ${
|
|
1371
|
+
maxWidth: P,
|
|
1372
|
+
background: E ? "transparent" : "var(--bg-card)",
|
|
1373
|
+
border: E ? "none" : "1px solid var(--border)",
|
|
1374
|
+
opacity: L ? 1 : 0,
|
|
1375
|
+
transform: j,
|
|
1376
|
+
transition: `opacity ${Fe}ms ease, transform ${Fe}ms ease`
|
|
943
1377
|
},
|
|
944
|
-
onClick: (
|
|
1378
|
+
onClick: (U) => U.stopPropagation(),
|
|
945
1379
|
children: [
|
|
946
|
-
|
|
1380
|
+
S && /* @__PURE__ */ i(
|
|
947
1381
|
"div",
|
|
948
1382
|
{
|
|
949
1383
|
className: "flex flex-shrink-0 items-center justify-between gap-3 px-6 py-4",
|
|
950
1384
|
style: { borderBottom: "1px solid var(--border)" },
|
|
951
1385
|
children: [
|
|
952
|
-
/* @__PURE__ */
|
|
1386
|
+
/* @__PURE__ */ i("div", { className: "flex min-w-0 items-center gap-3", children: [
|
|
953
1387
|
l && /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: l }),
|
|
954
|
-
(n || a) && /* @__PURE__ */
|
|
1388
|
+
(n || a) && /* @__PURE__ */ i("div", { className: "min-w-0", children: [
|
|
955
1389
|
n && /* @__PURE__ */ e(
|
|
956
1390
|
"h2",
|
|
957
1391
|
{
|
|
@@ -970,20 +1404,20 @@ function pr({
|
|
|
970
1404
|
)
|
|
971
1405
|
] })
|
|
972
1406
|
] }),
|
|
973
|
-
/* @__PURE__ */
|
|
1407
|
+
/* @__PURE__ */ i("div", { className: "flex flex-shrink-0 items-center gap-2", children: [
|
|
974
1408
|
u,
|
|
975
|
-
f && /* @__PURE__ */ e(
|
|
1409
|
+
f && /* @__PURE__ */ e(he, { variant: "icon", onClick: r, title: "Cerrar", children: /* @__PURE__ */ e(Se, { className: "h-5 w-5" }) })
|
|
976
1410
|
] })
|
|
977
1411
|
]
|
|
978
1412
|
}
|
|
979
1413
|
),
|
|
980
|
-
/* @__PURE__ */ e("div", { className: `min-h-0 flex-1 overflow-y-auto ${
|
|
981
|
-
|
|
1414
|
+
/* @__PURE__ */ e("div", { className: `min-h-0 flex-1 overflow-y-auto ${c}`, children: p }),
|
|
1415
|
+
d && /* @__PURE__ */ e(
|
|
982
1416
|
"div",
|
|
983
1417
|
{
|
|
984
1418
|
className: "flex flex-shrink-0 justify-end gap-2 px-6 py-4",
|
|
985
1419
|
style: { borderTop: "1px solid var(--border)" },
|
|
986
|
-
children:
|
|
1420
|
+
children: d
|
|
987
1421
|
}
|
|
988
1422
|
)
|
|
989
1423
|
]
|
|
@@ -995,7 +1429,7 @@ function pr({
|
|
|
995
1429
|
document.body
|
|
996
1430
|
);
|
|
997
1431
|
}
|
|
998
|
-
const
|
|
1432
|
+
const Mr = {
|
|
999
1433
|
danger: {
|
|
1000
1434
|
iconBg: "rgba(239,68,68,0.12)",
|
|
1001
1435
|
iconColor: "var(--danger)",
|
|
@@ -1015,19 +1449,19 @@ const hr = {
|
|
|
1015
1449
|
btnColor: "#fff"
|
|
1016
1450
|
}
|
|
1017
1451
|
};
|
|
1018
|
-
function
|
|
1452
|
+
function wn({
|
|
1019
1453
|
open: t,
|
|
1020
1454
|
title: r,
|
|
1021
1455
|
description: n,
|
|
1022
1456
|
confirmLabel: a = "Confirmar",
|
|
1023
1457
|
cancelLabel: l = "Cancelar",
|
|
1024
1458
|
variant: u = "danger",
|
|
1025
|
-
onConfirm:
|
|
1459
|
+
onConfirm: d,
|
|
1026
1460
|
onCancel: p
|
|
1027
1461
|
}) {
|
|
1028
|
-
const
|
|
1029
|
-
return /* @__PURE__ */
|
|
1030
|
-
|
|
1462
|
+
const m = Mr[u];
|
|
1463
|
+
return /* @__PURE__ */ i(
|
|
1464
|
+
Er,
|
|
1031
1465
|
{
|
|
1032
1466
|
open: t,
|
|
1033
1467
|
onClose: p,
|
|
@@ -1039,14 +1473,14 @@ function nn({
|
|
|
1039
1473
|
ariaLabel: r,
|
|
1040
1474
|
children: [
|
|
1041
1475
|
/* @__PURE__ */ e(
|
|
1042
|
-
|
|
1476
|
+
he,
|
|
1043
1477
|
{
|
|
1044
1478
|
variant: "icon",
|
|
1045
1479
|
onClick: p,
|
|
1046
1480
|
className: "absolute right-3 top-3 h-7 w-7 hover:opacity-70",
|
|
1047
1481
|
style: { color: "var(--text-muted)" },
|
|
1048
1482
|
"aria-label": "Cancelar",
|
|
1049
|
-
children: /* @__PURE__ */ e(
|
|
1483
|
+
children: /* @__PURE__ */ e(Se, { className: "h-4 w-4" })
|
|
1050
1484
|
}
|
|
1051
1485
|
),
|
|
1052
1486
|
/* @__PURE__ */ e(
|
|
@@ -1054,13 +1488,13 @@ function nn({
|
|
|
1054
1488
|
{
|
|
1055
1489
|
className: "mb-4 flex h-11 w-11 items-center justify-center rounded-xl",
|
|
1056
1490
|
style: {
|
|
1057
|
-
background:
|
|
1491
|
+
background: m.iconBg
|
|
1058
1492
|
},
|
|
1059
1493
|
children: /* @__PURE__ */ e(
|
|
1060
|
-
|
|
1494
|
+
Pt,
|
|
1061
1495
|
{
|
|
1062
1496
|
className: "h-5 w-5",
|
|
1063
|
-
style: { color:
|
|
1497
|
+
style: { color: m.iconColor }
|
|
1064
1498
|
}
|
|
1065
1499
|
)
|
|
1066
1500
|
}
|
|
@@ -1074,9 +1508,9 @@ function nn({
|
|
|
1074
1508
|
}
|
|
1075
1509
|
),
|
|
1076
1510
|
n && /* @__PURE__ */ e("p", { className: "text-sm", style: { color: "var(--text-muted)" }, children: n }),
|
|
1077
|
-
/* @__PURE__ */
|
|
1511
|
+
/* @__PURE__ */ i("div", { className: "mt-6 flex gap-2", children: [
|
|
1078
1512
|
/* @__PURE__ */ e(
|
|
1079
|
-
|
|
1513
|
+
he,
|
|
1080
1514
|
{
|
|
1081
1515
|
variant: "secondary",
|
|
1082
1516
|
onClick: p,
|
|
@@ -1086,14 +1520,14 @@ function nn({
|
|
|
1086
1520
|
}
|
|
1087
1521
|
),
|
|
1088
1522
|
/* @__PURE__ */ e(
|
|
1089
|
-
|
|
1523
|
+
he,
|
|
1090
1524
|
{
|
|
1091
1525
|
variant: "danger",
|
|
1092
|
-
onClick:
|
|
1526
|
+
onClick: d,
|
|
1093
1527
|
className: "flex-1",
|
|
1094
1528
|
style: {
|
|
1095
|
-
background:
|
|
1096
|
-
color:
|
|
1529
|
+
background: m.btnBg,
|
|
1530
|
+
color: m.btnColor,
|
|
1097
1531
|
borderColor: "transparent"
|
|
1098
1532
|
},
|
|
1099
1533
|
children: a
|
|
@@ -1104,7 +1538,7 @@ function nn({
|
|
|
1104
1538
|
}
|
|
1105
1539
|
);
|
|
1106
1540
|
}
|
|
1107
|
-
function
|
|
1541
|
+
function Br(t) {
|
|
1108
1542
|
var a;
|
|
1109
1543
|
const r = Array.from(
|
|
1110
1544
|
t.querySelectorAll("*")
|
|
@@ -1116,7 +1550,7 @@ function fr(t) {
|
|
|
1116
1550
|
);
|
|
1117
1551
|
return (t.scrollWidth > t.clientWidth || r.length > 0) && (((a = r[0]) == null ? void 0 : a.textContent) ?? t.textContent ?? "").trim() || null;
|
|
1118
1552
|
}
|
|
1119
|
-
function
|
|
1553
|
+
function Dt({
|
|
1120
1554
|
children: t,
|
|
1121
1555
|
content: r,
|
|
1122
1556
|
onlyWhenOverflow: n = !1,
|
|
@@ -1124,56 +1558,56 @@ function br({
|
|
|
1124
1558
|
style: l,
|
|
1125
1559
|
as: u = "div"
|
|
1126
1560
|
}) {
|
|
1127
|
-
const
|
|
1128
|
-
|
|
1129
|
-
const
|
|
1130
|
-
|
|
1131
|
-
const
|
|
1132
|
-
|
|
1133
|
-
}),
|
|
1134
|
-
}),
|
|
1135
|
-
if (!
|
|
1136
|
-
const
|
|
1137
|
-
if (!
|
|
1138
|
-
const
|
|
1139
|
-
let
|
|
1140
|
-
|
|
1141
|
-
(
|
|
1142
|
-
|
|
1143
|
-
x:
|
|
1144
|
-
y:
|
|
1561
|
+
const d = ie(null), p = ie(null), [m, h] = B(null), [w, N] = B("");
|
|
1562
|
+
O(() => {
|
|
1563
|
+
const v = d.current;
|
|
1564
|
+
v && (v.querySelectorAll("[title]").forEach((c) => {
|
|
1565
|
+
const $ = c.getAttribute("title");
|
|
1566
|
+
$ && (c.getAttribute("aria-label") || c.setAttribute("aria-label", $), c.removeAttribute("title"));
|
|
1567
|
+
}), v.querySelectorAll("svg title").forEach((c) => c.remove()));
|
|
1568
|
+
}), _t(() => {
|
|
1569
|
+
if (!m) return;
|
|
1570
|
+
const v = p.current;
|
|
1571
|
+
if (!v) return;
|
|
1572
|
+
const c = 12, $ = 14, D = v.getBoundingClientRect(), K = window.innerWidth - D.width - c, W = window.innerHeight - D.height - c;
|
|
1573
|
+
let E = m.mouseX + $, T = m.mouseY + $;
|
|
1574
|
+
E > K && (E = m.mouseX - D.width - $), T > W && (T = m.mouseY - D.height - $), E = Math.min(Math.max(c, E), Math.max(c, K)), T = Math.min(Math.max(c, T), Math.max(c, W)), (Math.abs(E - m.x) > 0.5 || Math.abs(T - m.y) > 0.5) && h(
|
|
1575
|
+
(I) => I && {
|
|
1576
|
+
...I,
|
|
1577
|
+
x: E,
|
|
1578
|
+
y: T
|
|
1145
1579
|
}
|
|
1146
1580
|
);
|
|
1147
|
-
}, [
|
|
1148
|
-
const
|
|
1149
|
-
const
|
|
1150
|
-
if (
|
|
1581
|
+
}, [m]);
|
|
1582
|
+
const g = (v, c) => {
|
|
1583
|
+
const $ = d.current;
|
|
1584
|
+
if ($) {
|
|
1151
1585
|
if (n) {
|
|
1152
|
-
const
|
|
1153
|
-
if (!
|
|
1154
|
-
|
|
1586
|
+
const D = Br($);
|
|
1587
|
+
if (!D) return;
|
|
1588
|
+
N(D);
|
|
1155
1589
|
}
|
|
1156
|
-
!n && !r ||
|
|
1590
|
+
!n && !r || h({ mouseX: v, mouseY: c, x: v + 14, y: c + 14 });
|
|
1157
1591
|
}
|
|
1158
|
-
}, f = n ?
|
|
1159
|
-
return /* @__PURE__ */
|
|
1592
|
+
}, f = n ? w : r;
|
|
1593
|
+
return /* @__PURE__ */ i(we, { children: [
|
|
1160
1594
|
/* @__PURE__ */ e(
|
|
1161
1595
|
u,
|
|
1162
1596
|
{
|
|
1163
|
-
ref: (
|
|
1164
|
-
|
|
1597
|
+
ref: (v) => {
|
|
1598
|
+
d.current = v;
|
|
1165
1599
|
},
|
|
1166
1600
|
className: a,
|
|
1167
1601
|
style: l,
|
|
1168
|
-
onMouseEnter: (
|
|
1169
|
-
onMouseMove: (
|
|
1170
|
-
|
|
1602
|
+
onMouseEnter: (v) => g(v.clientX, v.clientY),
|
|
1603
|
+
onMouseMove: (v) => {
|
|
1604
|
+
m && g(v.clientX, v.clientY);
|
|
1171
1605
|
},
|
|
1172
|
-
onMouseLeave: () =>
|
|
1606
|
+
onMouseLeave: () => h(null),
|
|
1173
1607
|
children: t
|
|
1174
1608
|
}
|
|
1175
1609
|
),
|
|
1176
|
-
|
|
1610
|
+
m && f ? Ge(
|
|
1177
1611
|
/* @__PURE__ */ e(
|
|
1178
1612
|
"div",
|
|
1179
1613
|
{
|
|
@@ -1181,8 +1615,8 @@ function br({
|
|
|
1181
1615
|
role: "tooltip",
|
|
1182
1616
|
style: {
|
|
1183
1617
|
position: "fixed",
|
|
1184
|
-
top:
|
|
1185
|
-
left:
|
|
1618
|
+
top: m.y,
|
|
1619
|
+
left: m.x,
|
|
1186
1620
|
zIndex: 9999,
|
|
1187
1621
|
background: "var(--bg-card)",
|
|
1188
1622
|
border: "1px solid var(--border)",
|
|
@@ -1204,17 +1638,17 @@ function br({
|
|
|
1204
1638
|
) : null
|
|
1205
1639
|
] });
|
|
1206
1640
|
}
|
|
1207
|
-
const
|
|
1208
|
-
function
|
|
1641
|
+
const Lr = "[&_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";
|
|
1642
|
+
function ze(t) {
|
|
1209
1643
|
if (!t) return 150;
|
|
1210
1644
|
const r = parseInt(t, 10);
|
|
1211
1645
|
return isNaN(r) || r <= 0 ? 150 : r;
|
|
1212
1646
|
}
|
|
1213
|
-
function
|
|
1647
|
+
function Ee(t, r) {
|
|
1214
1648
|
const n = t.minWidth ?? 80, a = t.maxWidth ?? 1 / 0;
|
|
1215
1649
|
return Math.min(a, Math.max(n, r));
|
|
1216
1650
|
}
|
|
1217
|
-
function
|
|
1651
|
+
function Tr(t, r) {
|
|
1218
1652
|
if (r <= 7) return Array.from({ length: r }, (a, l) => l + 1);
|
|
1219
1653
|
const n = [1];
|
|
1220
1654
|
t > 3 && n.push("...");
|
|
@@ -1222,13 +1656,13 @@ function xr(t, r) {
|
|
|
1222
1656
|
n.push(a);
|
|
1223
1657
|
return t < r - 2 && n.push("..."), n.push(r), n;
|
|
1224
1658
|
}
|
|
1225
|
-
function
|
|
1659
|
+
function vt({
|
|
1226
1660
|
children: t,
|
|
1227
1661
|
className: r = "",
|
|
1228
1662
|
style: n
|
|
1229
1663
|
}) {
|
|
1230
1664
|
return /* @__PURE__ */ e(
|
|
1231
|
-
|
|
1665
|
+
Dt,
|
|
1232
1666
|
{
|
|
1233
1667
|
onlyWhenOverflow: !0,
|
|
1234
1668
|
className: r,
|
|
@@ -1243,221 +1677,222 @@ function at({
|
|
|
1243
1677
|
}
|
|
1244
1678
|
);
|
|
1245
1679
|
}
|
|
1246
|
-
function
|
|
1680
|
+
function Nn({
|
|
1247
1681
|
columns: t,
|
|
1248
1682
|
data: r,
|
|
1249
1683
|
getRowId: n,
|
|
1250
1684
|
loading: a = !1,
|
|
1251
1685
|
skeletonRows: l = 8,
|
|
1252
1686
|
emptyIcon: u,
|
|
1253
|
-
emptyText:
|
|
1687
|
+
emptyText: d = "Sin resultados",
|
|
1254
1688
|
onRowClick: p,
|
|
1255
|
-
selected:
|
|
1256
|
-
onToggleOne:
|
|
1257
|
-
onToggleAll:
|
|
1258
|
-
highlightSelected:
|
|
1259
|
-
rowClassName:
|
|
1689
|
+
selected: m,
|
|
1690
|
+
onToggleOne: h,
|
|
1691
|
+
onToggleAll: w,
|
|
1692
|
+
highlightSelected: N = !0,
|
|
1693
|
+
rowClassName: g,
|
|
1260
1694
|
stickyHeader: f = !0,
|
|
1261
|
-
pageSize:
|
|
1262
|
-
pageSizeOptions:
|
|
1263
|
-
pageSizeSelectWidth:
|
|
1264
|
-
pageSizeSelectHeight:
|
|
1265
|
-
pageSizeSelectPadding:
|
|
1266
|
-
totalRows:
|
|
1267
|
-
page:
|
|
1268
|
-
onPageChange:
|
|
1269
|
-
onPageSizeChange:
|
|
1270
|
-
storageKey:
|
|
1271
|
-
stickyFirstColumn:
|
|
1272
|
-
bottomOffset:
|
|
1273
|
-
compact:
|
|
1274
|
-
restrictHeight:
|
|
1695
|
+
pageSize: v = 25,
|
|
1696
|
+
pageSizeOptions: c = [25, 50, 100],
|
|
1697
|
+
pageSizeSelectWidth: $ = 62,
|
|
1698
|
+
pageSizeSelectHeight: D = 30,
|
|
1699
|
+
pageSizeSelectPadding: K = "0 7px",
|
|
1700
|
+
totalRows: W,
|
|
1701
|
+
page: E,
|
|
1702
|
+
onPageChange: T,
|
|
1703
|
+
onPageSizeChange: I,
|
|
1704
|
+
storageKey: L,
|
|
1705
|
+
stickyFirstColumn: F = !1,
|
|
1706
|
+
bottomOffset: M = 0,
|
|
1707
|
+
compact: S = !0,
|
|
1708
|
+
restrictHeight: P = !0,
|
|
1709
|
+
minTableWidth: J
|
|
1275
1710
|
}) {
|
|
1276
|
-
const
|
|
1711
|
+
const _ = t.map((s) => s.key).join(","), [j, U] = B(!L), Z = ie(null), o = ie(!L), y = (s, x) => 50 + (s * 17 + x * 13 + 7) % 40, H = ie(null), [q, G] = B(
|
|
1277
1712
|
void 0
|
|
1278
|
-
), [
|
|
1279
|
-
|
|
1280
|
-
const
|
|
1281
|
-
function
|
|
1282
|
-
if (
|
|
1283
|
-
const
|
|
1284
|
-
|
|
1713
|
+
), [ee, me] = B(!1);
|
|
1714
|
+
O(() => {
|
|
1715
|
+
const x = v !== !1 ? 32 : 0, C = 12;
|
|
1716
|
+
function z() {
|
|
1717
|
+
if (me(window.innerWidth < 640), !H.current) return;
|
|
1718
|
+
const Y = H.current.getBoundingClientRect().top;
|
|
1719
|
+
G(
|
|
1285
1720
|
Math.max(
|
|
1286
1721
|
120,
|
|
1287
|
-
window.innerHeight -
|
|
1722
|
+
window.innerHeight - Y - x - C - M
|
|
1288
1723
|
)
|
|
1289
1724
|
);
|
|
1290
1725
|
}
|
|
1291
|
-
return
|
|
1292
|
-
}, [a,
|
|
1293
|
-
const [
|
|
1294
|
-
() => t.map((
|
|
1295
|
-
), [
|
|
1726
|
+
return z(), window.addEventListener("resize", z), () => window.removeEventListener("resize", z);
|
|
1727
|
+
}, [a, v, M]);
|
|
1728
|
+
const [te, be] = B(
|
|
1729
|
+
() => t.map((s) => s.key)
|
|
1730
|
+
), [fe, ve] = B(
|
|
1296
1731
|
() => Object.fromEntries(
|
|
1297
|
-
t.map((
|
|
1732
|
+
t.map((s) => [s.key, Ee(s, ze(s.width))])
|
|
1298
1733
|
)
|
|
1299
1734
|
);
|
|
1300
|
-
|
|
1301
|
-
const
|
|
1302
|
-
if (!
|
|
1303
|
-
|
|
1735
|
+
O(() => {
|
|
1736
|
+
const s = t.map((C) => C.key);
|
|
1737
|
+
if (!L) {
|
|
1738
|
+
be(s), o.current = !1, U(!0);
|
|
1304
1739
|
return;
|
|
1305
1740
|
}
|
|
1306
|
-
let
|
|
1307
|
-
return
|
|
1308
|
-
`/api/user/preferences/datatables?key=${encodeURIComponent(
|
|
1741
|
+
let x = !1;
|
|
1742
|
+
return o.current = !1, U(!1), fetch(
|
|
1743
|
+
`/api/user/preferences/datatables?key=${encodeURIComponent(L)}`,
|
|
1309
1744
|
{ cache: "no-store" }
|
|
1310
|
-
).then((
|
|
1311
|
-
var
|
|
1312
|
-
if (
|
|
1313
|
-
const
|
|
1314
|
-
t.map((
|
|
1315
|
-
),
|
|
1316
|
-
t.map((
|
|
1317
|
-
|
|
1318
|
-
|
|
1745
|
+
).then((C) => C.ok ? C.json() : null).then((C) => {
|
|
1746
|
+
var st, lt;
|
|
1747
|
+
if (x) return;
|
|
1748
|
+
const z = (st = C == null ? void 0 : C.settings) == null ? void 0 : st.columnOrder, Y = Array.isArray(z) ? z.filter((pe) => s.includes(pe)) : [], le = s.filter((pe) => !Y.includes(pe)), Q = Y.length > 0 ? [...Y, ...le] : s, Le = Object.fromEntries(
|
|
1749
|
+
t.map((pe) => [pe.key, Ee(pe, ze(pe.width))])
|
|
1750
|
+
), re = ((lt = C == null ? void 0 : C.settings) == null ? void 0 : lt.columnWidths) ?? {}, it = Object.fromEntries(
|
|
1751
|
+
t.map((pe) => [
|
|
1752
|
+
pe.key,
|
|
1753
|
+
Ee(pe, re[pe.key] ?? Le[pe.key])
|
|
1319
1754
|
])
|
|
1320
1755
|
);
|
|
1321
|
-
|
|
1322
|
-
columnOrder:
|
|
1323
|
-
columnWidths:
|
|
1324
|
-
}),
|
|
1756
|
+
be(Q), ve(it), Z.current = JSON.stringify({
|
|
1757
|
+
columnOrder: Q,
|
|
1758
|
+
columnWidths: it
|
|
1759
|
+
}), o.current = !0;
|
|
1325
1760
|
}).catch(() => {
|
|
1326
|
-
if (!
|
|
1327
|
-
|
|
1328
|
-
const
|
|
1329
|
-
t.map((
|
|
1330
|
-
|
|
1331
|
-
|
|
1761
|
+
if (!x) {
|
|
1762
|
+
be(s);
|
|
1763
|
+
const C = Object.fromEntries(
|
|
1764
|
+
t.map((z) => [
|
|
1765
|
+
z.key,
|
|
1766
|
+
Ee(z, ze(z.width))
|
|
1332
1767
|
])
|
|
1333
1768
|
);
|
|
1334
|
-
ve(
|
|
1335
|
-
columnOrder:
|
|
1336
|
-
columnWidths:
|
|
1337
|
-
}),
|
|
1769
|
+
ve(C), Z.current = JSON.stringify({
|
|
1770
|
+
columnOrder: s,
|
|
1771
|
+
columnWidths: C
|
|
1772
|
+
}), o.current = !0;
|
|
1338
1773
|
}
|
|
1339
1774
|
}).finally(() => {
|
|
1340
|
-
|
|
1775
|
+
x || U(!0);
|
|
1341
1776
|
}), () => {
|
|
1342
|
-
|
|
1777
|
+
x = !0;
|
|
1343
1778
|
};
|
|
1344
|
-
}, [
|
|
1345
|
-
if (!
|
|
1346
|
-
const
|
|
1347
|
-
columnOrder:
|
|
1348
|
-
columnWidths:
|
|
1349
|
-
},
|
|
1350
|
-
if (
|
|
1351
|
-
const
|
|
1779
|
+
}, [L, _, t]), O(() => {
|
|
1780
|
+
if (!L || !j || !o.current) return;
|
|
1781
|
+
const s = {
|
|
1782
|
+
columnOrder: te,
|
|
1783
|
+
columnWidths: fe
|
|
1784
|
+
}, x = JSON.stringify(s);
|
|
1785
|
+
if (x === Z.current) return;
|
|
1786
|
+
const C = window.setTimeout(() => {
|
|
1352
1787
|
fetch("/api/user/preferences/datatables", {
|
|
1353
1788
|
method: "PATCH",
|
|
1354
1789
|
headers: { "Content-Type": "application/json" },
|
|
1355
|
-
body: JSON.stringify({ key:
|
|
1356
|
-
}).then((
|
|
1357
|
-
|
|
1790
|
+
body: JSON.stringify({ key: L, settings: s })
|
|
1791
|
+
}).then((z) => {
|
|
1792
|
+
z.ok && (Z.current = x);
|
|
1358
1793
|
}).catch(() => {
|
|
1359
1794
|
});
|
|
1360
1795
|
}, 300);
|
|
1361
|
-
return () => window.clearTimeout(
|
|
1362
|
-
}, [
|
|
1363
|
-
|
|
1364
|
-
const
|
|
1365
|
-
return [...
|
|
1796
|
+
return () => window.clearTimeout(C);
|
|
1797
|
+
}, [te, fe, L, j]), O(() => {
|
|
1798
|
+
be((s) => {
|
|
1799
|
+
const x = t.map((Y) => Y.key), C = s.filter((Y) => x.includes(Y)), z = x.filter((Y) => !C.includes(Y));
|
|
1800
|
+
return [...C, ...z];
|
|
1366
1801
|
});
|
|
1367
|
-
}, [
|
|
1368
|
-
const
|
|
1369
|
-
|
|
1370
|
-
ve((
|
|
1371
|
-
const
|
|
1372
|
-
t.map((
|
|
1802
|
+
}, [_, t]);
|
|
1803
|
+
const de = te.map((s) => t.find((x) => x.key === s)).filter((s) => !!s);
|
|
1804
|
+
O(() => {
|
|
1805
|
+
ve((s) => {
|
|
1806
|
+
const x = Object.fromEntries(
|
|
1807
|
+
t.map((C) => [C.key, Ee(C, ze(C.width))])
|
|
1373
1808
|
);
|
|
1374
1809
|
return Object.fromEntries(
|
|
1375
|
-
t.map((
|
|
1376
|
-
|
|
1377
|
-
|
|
1810
|
+
t.map((C) => [
|
|
1811
|
+
C.key,
|
|
1812
|
+
Ee(C, s[C.key] ?? x[C.key])
|
|
1378
1813
|
])
|
|
1379
1814
|
);
|
|
1380
1815
|
});
|
|
1381
|
-
}, [
|
|
1382
|
-
const
|
|
1383
|
-
|
|
1384
|
-
function
|
|
1385
|
-
const
|
|
1386
|
-
if (!
|
|
1387
|
-
const
|
|
1388
|
-
|
|
1389
|
-
...
|
|
1390
|
-
[
|
|
1816
|
+
}, [_, t]);
|
|
1817
|
+
const k = ie(null);
|
|
1818
|
+
O(() => {
|
|
1819
|
+
function s(C) {
|
|
1820
|
+
const z = k.current;
|
|
1821
|
+
if (!z) return;
|
|
1822
|
+
const Y = C.clientX - z.startX, le = t.find((Q) => Q.key === z.colKey);
|
|
1823
|
+
le && ve((Q) => ({
|
|
1824
|
+
...Q,
|
|
1825
|
+
[z.colKey]: Ee(le, z.startWidth + Y)
|
|
1391
1826
|
}));
|
|
1392
1827
|
}
|
|
1393
|
-
function
|
|
1394
|
-
|
|
1828
|
+
function x() {
|
|
1829
|
+
k.current && (k.current = null, document.body.style.cursor = "", document.body.style.userSelect = "");
|
|
1395
1830
|
}
|
|
1396
|
-
return document.addEventListener("pointermove",
|
|
1397
|
-
document.removeEventListener("pointermove",
|
|
1831
|
+
return document.addEventListener("pointermove", s), document.addEventListener("pointerup", x), () => {
|
|
1832
|
+
document.removeEventListener("pointermove", s), document.removeEventListener("pointerup", x);
|
|
1398
1833
|
};
|
|
1399
1834
|
}, [t]);
|
|
1400
|
-
const
|
|
1401
|
-
function
|
|
1402
|
-
|
|
1835
|
+
const A = ie(null), [X, ne] = B(null);
|
|
1836
|
+
function ce(s, x) {
|
|
1837
|
+
A.current = s, x.dataTransfer.effectAllowed = "move";
|
|
1403
1838
|
}
|
|
1404
|
-
function
|
|
1405
|
-
|
|
1839
|
+
function R(s, x) {
|
|
1840
|
+
x.preventDefault(), x.dataTransfer.dropEffect = "move", X !== s && ne(s);
|
|
1406
1841
|
}
|
|
1407
|
-
function
|
|
1408
|
-
|
|
1409
|
-
const
|
|
1410
|
-
|
|
1411
|
-
const
|
|
1412
|
-
return
|
|
1413
|
-
}),
|
|
1842
|
+
function Ne(s, x) {
|
|
1843
|
+
x.preventDefault();
|
|
1844
|
+
const C = A.current;
|
|
1845
|
+
C !== null && C !== s && be((z) => {
|
|
1846
|
+
const Y = [...z], [le] = Y.splice(C, 1);
|
|
1847
|
+
return Y.splice(s, 0, le), Y;
|
|
1848
|
+
}), A.current = null, ne(null);
|
|
1414
1849
|
}
|
|
1415
|
-
function
|
|
1416
|
-
|
|
1850
|
+
function Pe() {
|
|
1851
|
+
A.current = null, ne(null);
|
|
1417
1852
|
}
|
|
1418
|
-
const [
|
|
1419
|
-
function
|
|
1420
|
-
|
|
1421
|
-
(
|
|
1853
|
+
const [xe, De] = B(null);
|
|
1854
|
+
function We(s) {
|
|
1855
|
+
s.sortKey && De(
|
|
1856
|
+
(x) => (x == null ? void 0 : x.key) === s.key ? { key: s.key, dir: x.dir === "asc" ? "desc" : "asc" } : { key: s.key, dir: "asc" }
|
|
1422
1857
|
);
|
|
1423
1858
|
}
|
|
1424
|
-
const [
|
|
1425
|
-
|
|
1859
|
+
const [ae, Me] = B(1), [Ie, je] = B(
|
|
1860
|
+
v === !1 ? 0 : v
|
|
1426
1861
|
);
|
|
1427
|
-
|
|
1428
|
-
|
|
1862
|
+
O(() => {
|
|
1863
|
+
Me(1);
|
|
1429
1864
|
}, [r]);
|
|
1430
|
-
const
|
|
1431
|
-
if (!
|
|
1432
|
-
const
|
|
1433
|
-
return
|
|
1434
|
-
const
|
|
1435
|
-
return
|
|
1865
|
+
const ge = !!(T && I), ye = v !== !1, ue = ge ? E ?? 1 : ae, b = ge || ye ? Ie : r.length, V = !!m && !!h && !!w, oe = V ? 40 : 0, Ce = V && r.length > 0 && m.size === r.length, se = V && m.size > 0 && m.size < r.length, $e = ct.useMemo(() => {
|
|
1866
|
+
if (!xe) return r;
|
|
1867
|
+
const s = t.find((x) => x.key === xe.key && x.sortKey);
|
|
1868
|
+
return s != null && s.sortKey ? [...r].sort((x, C) => {
|
|
1869
|
+
const z = x[s.sortKey], Y = C[s.sortKey], le = z === Y ? 0 : z == null ? 1 : Y == null || z < Y ? -1 : 1;
|
|
1870
|
+
return xe.dir === "asc" ? le : -le;
|
|
1436
1871
|
}) : r;
|
|
1437
|
-
}, [r,
|
|
1438
|
-
if (
|
|
1439
|
-
const
|
|
1440
|
-
return
|
|
1441
|
-
}, [
|
|
1442
|
-
function
|
|
1443
|
-
const
|
|
1444
|
-
|
|
1872
|
+
}, [r, xe, t]), Be = ct.useMemo(() => {
|
|
1873
|
+
if (ge || !ye) return $e;
|
|
1874
|
+
const s = (ue - 1) * b;
|
|
1875
|
+
return $e.slice(s, s + b);
|
|
1876
|
+
}, [$e, ge, ye, ue, b]), Re = W ?? r.length, Xe = ye ? Math.max(1, Math.ceil(Re / b)) : 1, Rt = ye ? (ue - 1) * b + 1 : 1, zt = ye ? Math.min(ue * b, Re) : Re;
|
|
1877
|
+
function Je(s) {
|
|
1878
|
+
const x = Math.max(1, Math.min(s, Xe));
|
|
1879
|
+
ge ? T(x) : Me(x);
|
|
1445
1880
|
}
|
|
1446
|
-
function
|
|
1447
|
-
|
|
1881
|
+
function At(s) {
|
|
1882
|
+
je(s), ge ? (I(s), T(1)) : Me(1), I && I(s);
|
|
1448
1883
|
}
|
|
1449
|
-
const
|
|
1884
|
+
const nt = (s) => s === "center" ? "text-center" : s === "right" ? "text-right" : "text-left", Ot = "color-mix(in srgb, var(--primary) 6%, var(--bg-card))", at = () => /* @__PURE__ */ i(
|
|
1450
1885
|
"tr",
|
|
1451
1886
|
{
|
|
1452
1887
|
style: {
|
|
1453
1888
|
background: "color-mix(in srgb, var(--bg-input) 72%, transparent)"
|
|
1454
1889
|
},
|
|
1455
1890
|
children: [
|
|
1456
|
-
|
|
1891
|
+
V && /* @__PURE__ */ e(
|
|
1457
1892
|
"th",
|
|
1458
1893
|
{
|
|
1459
|
-
className: `${
|
|
1460
|
-
style:
|
|
1894
|
+
className: `${S ? "px-2 py-1.5" : "px-3 py-2.5"} w-10`,
|
|
1895
|
+
style: F ? {
|
|
1461
1896
|
position: "sticky",
|
|
1462
1897
|
left: 0,
|
|
1463
1898
|
zIndex: 12,
|
|
@@ -1474,26 +1909,26 @@ function an({
|
|
|
1474
1909
|
"input",
|
|
1475
1910
|
{
|
|
1476
1911
|
type: "checkbox",
|
|
1477
|
-
checked:
|
|
1478
|
-
ref: (
|
|
1479
|
-
|
|
1912
|
+
checked: Ce,
|
|
1913
|
+
ref: (s) => {
|
|
1914
|
+
s && (s.indeterminate = se);
|
|
1480
1915
|
},
|
|
1481
|
-
onChange:
|
|
1916
|
+
onChange: w,
|
|
1482
1917
|
className: "rounded cursor-pointer accent-[var(--primary)]"
|
|
1483
1918
|
}
|
|
1484
1919
|
)
|
|
1485
1920
|
}
|
|
1486
1921
|
),
|
|
1487
|
-
|
|
1488
|
-
const
|
|
1489
|
-
return /* @__PURE__ */
|
|
1922
|
+
de.map((s, x) => {
|
|
1923
|
+
const C = (xe == null ? void 0 : xe.key) === s.key, z = !!s.sortKey, Y = F && !ee && x === 0, le = X === x, Le = (fe[s.key] ?? ze(s.width)) < 120;
|
|
1924
|
+
return /* @__PURE__ */ i(
|
|
1490
1925
|
"th",
|
|
1491
1926
|
{
|
|
1492
|
-
className: `group select-none ${
|
|
1927
|
+
className: `group select-none ${Le ? "text-left" : nt(s.align)}`,
|
|
1493
1928
|
style: {
|
|
1494
|
-
...
|
|
1929
|
+
...Y ? {
|
|
1495
1930
|
position: "sticky",
|
|
1496
|
-
left:
|
|
1931
|
+
left: oe,
|
|
1497
1932
|
zIndex: 12,
|
|
1498
1933
|
background: "color-mix(in srgb, var(--bg-input) 72%, transparent)",
|
|
1499
1934
|
backdropFilter: "blur(14px)",
|
|
@@ -1505,29 +1940,29 @@ function an({
|
|
|
1505
1940
|
borderBottom: "2px solid var(--border)",
|
|
1506
1941
|
borderRight: "1px solid var(--border)"
|
|
1507
1942
|
},
|
|
1508
|
-
color:
|
|
1943
|
+
color: C ? "var(--primary)" : "var(--text-muted)",
|
|
1509
1944
|
whiteSpace: "nowrap",
|
|
1510
1945
|
transition: "color 0.15s",
|
|
1511
|
-
borderLeft:
|
|
1512
|
-
cursor:
|
|
1946
|
+
borderLeft: le ? "2px solid var(--primary)" : "2px solid transparent",
|
|
1947
|
+
cursor: z ? "pointer" : "default",
|
|
1513
1948
|
// Padding: room for grip icon left, resize handle right
|
|
1514
|
-
padding:
|
|
1949
|
+
padding: S ? "5px 24px 5px 6px" : "7px 28px 7px 6px"
|
|
1515
1950
|
},
|
|
1516
|
-
onDragOver: (
|
|
1517
|
-
onDrop: (
|
|
1518
|
-
onClick:
|
|
1951
|
+
onDragOver: (re) => R(x, re),
|
|
1952
|
+
onDrop: (re) => Ne(x, re),
|
|
1953
|
+
onClick: z ? () => We(s) : void 0,
|
|
1519
1954
|
children: [
|
|
1520
1955
|
/* @__PURE__ */ e(
|
|
1521
1956
|
"span",
|
|
1522
1957
|
{
|
|
1523
1958
|
draggable: !0,
|
|
1524
|
-
onDragStart: (
|
|
1525
|
-
|
|
1959
|
+
onDragStart: (re) => {
|
|
1960
|
+
re.stopPropagation(), ce(x, re);
|
|
1526
1961
|
},
|
|
1527
|
-
onDragEnd: (
|
|
1528
|
-
|
|
1962
|
+
onDragEnd: (re) => {
|
|
1963
|
+
re.stopPropagation(), Pe();
|
|
1529
1964
|
},
|
|
1530
|
-
onClick: (
|
|
1965
|
+
onClick: (re) => re.stopPropagation(),
|
|
1531
1966
|
title: "Arrastrar para reordenar",
|
|
1532
1967
|
className: "inline-flex items-center mr-1 opacity-0 group-hover:opacity-40 transition-opacity",
|
|
1533
1968
|
style: {
|
|
@@ -1535,24 +1970,24 @@ function an({
|
|
|
1535
1970
|
color: "var(--text-muted)",
|
|
1536
1971
|
verticalAlign: "middle"
|
|
1537
1972
|
},
|
|
1538
|
-
children: /* @__PURE__ */ e(
|
|
1973
|
+
children: /* @__PURE__ */ e(or, { size: 15 })
|
|
1539
1974
|
}
|
|
1540
1975
|
),
|
|
1541
1976
|
/* @__PURE__ */ e(
|
|
1542
|
-
|
|
1977
|
+
vt,
|
|
1543
1978
|
{
|
|
1544
1979
|
className: "inline-block max-w-full align-middle",
|
|
1545
1980
|
style: {
|
|
1546
1981
|
width: "calc(100% - 22px)",
|
|
1547
|
-
textAlign:
|
|
1982
|
+
textAlign: Le ? "left" : s.align === "center" ? "center" : s.align === "right" ? "right" : "left"
|
|
1548
1983
|
},
|
|
1549
|
-
children: /* @__PURE__ */
|
|
1984
|
+
children: /* @__PURE__ */ i(
|
|
1550
1985
|
"span",
|
|
1551
1986
|
{
|
|
1552
|
-
className: `inline-flex max-w-full items-center gap-1 font-semibold uppercase tracking-wider ${
|
|
1987
|
+
className: `inline-flex max-w-full items-center gap-1 font-semibold uppercase tracking-wider ${S ? "text-[11px]" : "text-xs"}`,
|
|
1553
1988
|
children: [
|
|
1554
|
-
/* @__PURE__ */ e("span", { className: "min-w-0 truncate", children:
|
|
1555
|
-
|
|
1989
|
+
/* @__PURE__ */ e("span", { className: "min-w-0 truncate", children: s.header }),
|
|
1990
|
+
z && /* @__PURE__ */ e("span", { className: "flex-shrink-0 opacity-60", children: C ? xe.dir === "asc" ? /* @__PURE__ */ e(Wt, { className: "w-3 h-3" }) : /* @__PURE__ */ e(He, { className: "w-3 h-3" }) : /* @__PURE__ */ e(jt, { className: "w-3 h-3 opacity-40" }) })
|
|
1556
1991
|
]
|
|
1557
1992
|
}
|
|
1558
1993
|
)
|
|
@@ -1564,14 +1999,14 @@ function an({
|
|
|
1564
1999
|
role: "separator",
|
|
1565
2000
|
"aria-orientation": "vertical",
|
|
1566
2001
|
title: "Arrastrar para redimensionar",
|
|
1567
|
-
onPointerDown: (
|
|
1568
|
-
|
|
1569
|
-
colKey:
|
|
1570
|
-
startX:
|
|
1571
|
-
startWidth:
|
|
2002
|
+
onPointerDown: (re) => {
|
|
2003
|
+
re.preventDefault(), re.stopPropagation(), k.current = {
|
|
2004
|
+
colKey: s.key,
|
|
2005
|
+
startX: re.clientX,
|
|
2006
|
+
startWidth: fe[s.key] ?? 150
|
|
1572
2007
|
}, document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
1573
2008
|
},
|
|
1574
|
-
onClick: (
|
|
2009
|
+
onClick: (re) => re.stopPropagation(),
|
|
1575
2010
|
className: "absolute right-0 top-0 h-full flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",
|
|
1576
2011
|
style: { width: 12, cursor: "col-resize", zIndex: 3 },
|
|
1577
2012
|
children: /* @__PURE__ */ e(
|
|
@@ -1590,85 +2025,85 @@ function an({
|
|
|
1590
2025
|
)
|
|
1591
2026
|
]
|
|
1592
2027
|
},
|
|
1593
|
-
|
|
2028
|
+
s.key
|
|
1594
2029
|
);
|
|
1595
2030
|
})
|
|
1596
2031
|
]
|
|
1597
2032
|
}
|
|
1598
|
-
),
|
|
1599
|
-
if (!
|
|
1600
|
-
const
|
|
1601
|
-
return /* @__PURE__ */
|
|
2033
|
+
), ot = () => {
|
|
2034
|
+
if (!ye || a) return null;
|
|
2035
|
+
const s = Tr(ue, Xe);
|
|
2036
|
+
return /* @__PURE__ */ i(
|
|
1602
2037
|
"div",
|
|
1603
2038
|
{
|
|
1604
|
-
className: `flex items-center justify-between gap-2 rounded-b-xl border-t text-xs select-none ${
|
|
2039
|
+
className: `flex items-center justify-between gap-2 rounded-b-xl border-t text-xs select-none ${S ? "px-2 py-0.5" : "px-3 py-1"}`,
|
|
1605
2040
|
style: { borderColor: "var(--border)", background: "var(--bg-input)" },
|
|
1606
2041
|
children: [
|
|
1607
|
-
/* @__PURE__ */
|
|
1608
|
-
/* @__PURE__ */ e("span", { style: { color: "var(--text-muted)" }, children:
|
|
1609
|
-
/* @__PURE__ */
|
|
2042
|
+
/* @__PURE__ */ i("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
2043
|
+
/* @__PURE__ */ e("span", { style: { color: "var(--text-muted)" }, children: Re === 0 ? "0 filas" : `${Rt}–${zt} de ${Re}` }),
|
|
2044
|
+
/* @__PURE__ */ i("div", { className: "flex items-center gap-1", children: [
|
|
1610
2045
|
/* @__PURE__ */ e("span", { style: { color: "var(--text-muted)" }, children: "Filas:" }),
|
|
1611
2046
|
/* @__PURE__ */ e(
|
|
1612
|
-
|
|
2047
|
+
Tt,
|
|
1613
2048
|
{
|
|
1614
|
-
value: String(
|
|
1615
|
-
onChange: (
|
|
1616
|
-
options:
|
|
1617
|
-
value: String(
|
|
1618
|
-
label: String(
|
|
2049
|
+
value: String(b),
|
|
2050
|
+
onChange: (x) => At(Number(x)),
|
|
2051
|
+
options: c.map((x) => ({
|
|
2052
|
+
value: String(x),
|
|
2053
|
+
label: String(x)
|
|
1619
2054
|
})),
|
|
1620
2055
|
placeholder: "Filas",
|
|
1621
2056
|
searchable: !1,
|
|
1622
|
-
height:
|
|
1623
|
-
padding:
|
|
2057
|
+
height: D,
|
|
2058
|
+
padding: K,
|
|
1624
2059
|
className: "shrink-0 [&>button]:rounded-md [&>button]:text-xs [&_svg]:h-3.5 [&_svg]:w-3.5",
|
|
1625
|
-
style: { width:
|
|
2060
|
+
style: { width: $ }
|
|
1626
2061
|
}
|
|
1627
2062
|
)
|
|
1628
2063
|
] })
|
|
1629
2064
|
] }),
|
|
1630
|
-
/* @__PURE__ */
|
|
2065
|
+
/* @__PURE__ */ i("div", { className: "flex items-center gap-0.5", children: [
|
|
1631
2066
|
/* @__PURE__ */ e(
|
|
1632
2067
|
"button",
|
|
1633
2068
|
{
|
|
1634
|
-
disabled:
|
|
1635
|
-
onClick: () =>
|
|
2069
|
+
disabled: ue <= 1,
|
|
2070
|
+
onClick: () => Je(ue - 1),
|
|
1636
2071
|
className: "rounded p-0.5 transition-colors disabled:opacity-30",
|
|
1637
2072
|
style: { color: "var(--text-muted)", background: "transparent" },
|
|
1638
|
-
children: /* @__PURE__ */ e(
|
|
2073
|
+
children: /* @__PURE__ */ e(_e, { className: "h-3.5 w-3.5" })
|
|
1639
2074
|
}
|
|
1640
2075
|
),
|
|
1641
|
-
|
|
1642
|
-
(
|
|
2076
|
+
s.map(
|
|
2077
|
+
(x, C) => x === "..." ? /* @__PURE__ */ e(
|
|
1643
2078
|
"span",
|
|
1644
2079
|
{
|
|
1645
2080
|
className: "px-1",
|
|
1646
2081
|
style: { color: "var(--text-muted)" },
|
|
1647
2082
|
children: "…"
|
|
1648
2083
|
},
|
|
1649
|
-
`e${
|
|
2084
|
+
`e${C}`
|
|
1650
2085
|
) : /* @__PURE__ */ e(
|
|
1651
2086
|
"button",
|
|
1652
2087
|
{
|
|
1653
|
-
onClick: () =>
|
|
2088
|
+
onClick: () => Je(x),
|
|
1654
2089
|
className: "h-5 w-5 rounded text-[11px] font-medium transition-colors",
|
|
1655
2090
|
style: {
|
|
1656
|
-
background:
|
|
1657
|
-
color:
|
|
2091
|
+
background: x === ue ? "var(--primary)" : "transparent",
|
|
2092
|
+
color: x === ue ? "var(--primary-fg)" : "var(--text-muted)"
|
|
1658
2093
|
},
|
|
1659
|
-
children:
|
|
2094
|
+
children: x
|
|
1660
2095
|
},
|
|
1661
|
-
|
|
2096
|
+
x
|
|
1662
2097
|
)
|
|
1663
2098
|
),
|
|
1664
2099
|
/* @__PURE__ */ e(
|
|
1665
2100
|
"button",
|
|
1666
2101
|
{
|
|
1667
|
-
disabled:
|
|
1668
|
-
onClick: () =>
|
|
2102
|
+
disabled: ue >= Xe,
|
|
2103
|
+
onClick: () => Je(ue + 1),
|
|
1669
2104
|
className: "rounded p-0.5 transition-colors disabled:opacity-30",
|
|
1670
2105
|
style: { color: "var(--text-muted)", background: "transparent" },
|
|
1671
|
-
children: /* @__PURE__ */ e(
|
|
2106
|
+
children: /* @__PURE__ */ e(Te, { className: "h-3.5 w-3.5" })
|
|
1672
2107
|
}
|
|
1673
2108
|
)
|
|
1674
2109
|
] })
|
|
@@ -1676,266 +2111,286 @@ function an({
|
|
|
1676
2111
|
}
|
|
1677
2112
|
);
|
|
1678
2113
|
};
|
|
1679
|
-
return a && r.length === 0 ? /* @__PURE__ */
|
|
2114
|
+
return a && r.length === 0 ? /* @__PURE__ */ i(
|
|
1680
2115
|
"div",
|
|
1681
2116
|
{
|
|
1682
|
-
className: "w-full flex flex-col rounded-xl overflow-visible",
|
|
2117
|
+
className: "w-full min-w-0 max-w-full flex flex-col rounded-xl overflow-visible",
|
|
1683
2118
|
style: { border: "1px solid var(--border)" },
|
|
1684
2119
|
children: [
|
|
1685
|
-
/* @__PURE__ */ e(
|
|
1686
|
-
|
|
2120
|
+
/* @__PURE__ */ e(
|
|
2121
|
+
"div",
|
|
1687
2122
|
{
|
|
1688
|
-
|
|
1689
|
-
className: "w-full",
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
children: /* @__PURE__ */ s(
|
|
1693
|
-
"table",
|
|
2123
|
+
ref: H,
|
|
2124
|
+
className: "min-w-0 max-w-full overflow-hidden rounded-t-xl",
|
|
2125
|
+
children: /* @__PURE__ */ e(
|
|
2126
|
+
pt,
|
|
1694
2127
|
{
|
|
1695
|
-
|
|
2128
|
+
options: { scrollbars: { autoHide: "leave", autoHideDelay: 200 } },
|
|
2129
|
+
className: "w-full",
|
|
1696
2130
|
style: {
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
minWidth: "max-content",
|
|
1700
|
-
borderCollapse: "separate",
|
|
1701
|
-
borderSpacing: 0
|
|
2131
|
+
maxHeight: P ? q : void 0,
|
|
2132
|
+
maxWidth: "100%"
|
|
1702
2133
|
},
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
2134
|
+
defer: !0,
|
|
2135
|
+
children: /* @__PURE__ */ i(
|
|
2136
|
+
"table",
|
|
2137
|
+
{
|
|
2138
|
+
className: "text-sm",
|
|
2139
|
+
style: {
|
|
2140
|
+
tableLayout: "fixed",
|
|
2141
|
+
width: "100%",
|
|
2142
|
+
minWidth: J ?? "max-content",
|
|
2143
|
+
borderCollapse: "separate",
|
|
2144
|
+
borderSpacing: 0
|
|
2145
|
+
},
|
|
2146
|
+
children: [
|
|
2147
|
+
/* @__PURE__ */ i("colgroup", { children: [
|
|
2148
|
+
V && /* @__PURE__ */ e("col", { style: { width: 40 } }),
|
|
2149
|
+
de.map((s) => /* @__PURE__ */ e(
|
|
2150
|
+
"col",
|
|
2151
|
+
{
|
|
2152
|
+
style: { width: fe[s.key] ?? 150 }
|
|
2153
|
+
},
|
|
2154
|
+
s.key
|
|
2155
|
+
))
|
|
2156
|
+
] }),
|
|
2157
|
+
/* @__PURE__ */ e(
|
|
2158
|
+
"thead",
|
|
2159
|
+
{
|
|
2160
|
+
style: f ? {
|
|
2161
|
+
position: "sticky",
|
|
2162
|
+
top: 0,
|
|
2163
|
+
zIndex: 10,
|
|
2164
|
+
backdropFilter: "blur(14px)",
|
|
2165
|
+
WebkitBackdropFilter: "blur(14px)"
|
|
2166
|
+
} : void 0,
|
|
2167
|
+
children: at()
|
|
1735
2168
|
}
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
{
|
|
1741
|
-
className: T ? "px-2 py-1.5" : "px-3 py-2",
|
|
1742
|
-
style: W && !P && S === 0 ? {
|
|
1743
|
-
position: "sticky",
|
|
1744
|
-
left: Le,
|
|
1745
|
-
zIndex: 1,
|
|
1746
|
-
background: "color-mix(in srgb, var(--bg-card) 72%, transparent)",
|
|
1747
|
-
backdropFilter: "blur(10px)",
|
|
1748
|
-
WebkitBackdropFilter: "blur(10px)",
|
|
1749
|
-
boxShadow: "3px 0 6px -2px rgba(0,0,0,0.12), inset 0 -1px 0 var(--border)",
|
|
1750
|
-
borderRight: "1px solid var(--border)"
|
|
1751
|
-
} : {
|
|
1752
|
-
borderBottom: "1px solid var(--border)",
|
|
1753
|
-
borderRight: "1px solid var(--border)"
|
|
1754
|
-
},
|
|
1755
|
-
children: /* @__PURE__ */ e(
|
|
1756
|
-
"div",
|
|
2169
|
+
),
|
|
2170
|
+
/* @__PURE__ */ e("tbody", { children: Array.from({ length: l }).map((s, x) => /* @__PURE__ */ i("tr", { children: [
|
|
2171
|
+
V && /* @__PURE__ */ e(
|
|
2172
|
+
"td",
|
|
1757
2173
|
{
|
|
1758
|
-
className: "
|
|
2174
|
+
className: `${S ? "px-2 py-1.5" : "px-3 py-2"} w-10`,
|
|
1759
2175
|
style: {
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
minWidth: 32
|
|
2176
|
+
borderBottom: "1px solid var(--border)",
|
|
2177
|
+
borderRight: "1px solid var(--border)"
|
|
1763
2178
|
}
|
|
1764
2179
|
}
|
|
1765
|
-
)
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
2180
|
+
),
|
|
2181
|
+
de.map((C, z) => /* @__PURE__ */ e(
|
|
2182
|
+
"td",
|
|
2183
|
+
{
|
|
2184
|
+
className: S ? "px-2 py-1.5" : "px-3 py-2",
|
|
2185
|
+
style: F && !ee && z === 0 ? {
|
|
2186
|
+
position: "sticky",
|
|
2187
|
+
left: oe,
|
|
2188
|
+
zIndex: 1,
|
|
2189
|
+
background: "color-mix(in srgb, var(--bg-card) 72%, transparent)",
|
|
2190
|
+
backdropFilter: "blur(10px)",
|
|
2191
|
+
WebkitBackdropFilter: "blur(10px)",
|
|
2192
|
+
boxShadow: "3px 0 6px -2px rgba(0,0,0,0.12), inset 0 -1px 0 var(--border)",
|
|
2193
|
+
borderRight: "1px solid var(--border)"
|
|
2194
|
+
} : {
|
|
2195
|
+
borderBottom: "1px solid var(--border)",
|
|
2196
|
+
borderRight: "1px solid var(--border)"
|
|
2197
|
+
},
|
|
2198
|
+
children: /* @__PURE__ */ e(
|
|
2199
|
+
"div",
|
|
2200
|
+
{
|
|
2201
|
+
className: "h-3.5 rounded-full animate-pulse",
|
|
2202
|
+
style: {
|
|
2203
|
+
background: "var(--border)",
|
|
2204
|
+
width: `${y(x, z)}%`,
|
|
2205
|
+
minWidth: 32
|
|
2206
|
+
}
|
|
2207
|
+
}
|
|
2208
|
+
)
|
|
2209
|
+
},
|
|
2210
|
+
C.key
|
|
2211
|
+
))
|
|
2212
|
+
] }, x)) })
|
|
2213
|
+
]
|
|
2214
|
+
}
|
|
2215
|
+
)
|
|
1771
2216
|
}
|
|
1772
2217
|
)
|
|
1773
2218
|
}
|
|
1774
|
-
)
|
|
1775
|
-
|
|
2219
|
+
),
|
|
2220
|
+
ot()
|
|
1776
2221
|
]
|
|
1777
2222
|
}
|
|
1778
|
-
) : !a && r.length === 0 ? /* @__PURE__ */
|
|
2223
|
+
) : !a && r.length === 0 ? /* @__PURE__ */ i("div", { className: "py-20 flex flex-col items-center gap-3", children: [
|
|
1779
2224
|
u && /* @__PURE__ */ e("div", { style: { color: "var(--text-muted)", opacity: 0.5 }, children: u }),
|
|
1780
|
-
/* @__PURE__ */ e("p", { className: "text-sm", style: { color: "var(--text-muted)" }, children:
|
|
1781
|
-
] }) : /* @__PURE__ */
|
|
2225
|
+
/* @__PURE__ */ e("p", { className: "text-sm", style: { color: "var(--text-muted)" }, children: d })
|
|
2226
|
+
] }) : /* @__PURE__ */ i(
|
|
1782
2227
|
"div",
|
|
1783
2228
|
{
|
|
1784
|
-
className: "w-full flex flex-col rounded-xl overflow-visible",
|
|
2229
|
+
className: "w-full min-w-0 max-w-full flex flex-col rounded-xl overflow-visible",
|
|
1785
2230
|
style: { border: "1px solid var(--border)" },
|
|
1786
2231
|
children: [
|
|
1787
|
-
/* @__PURE__ */ e(
|
|
1788
|
-
|
|
2232
|
+
/* @__PURE__ */ e(
|
|
2233
|
+
"div",
|
|
1789
2234
|
{
|
|
1790
|
-
|
|
1791
|
-
className: "w-full",
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
children: /* @__PURE__ */ s(
|
|
1795
|
-
"table",
|
|
2235
|
+
ref: H,
|
|
2236
|
+
className: "min-w-0 max-w-full overflow-hidden rounded-t-xl",
|
|
2237
|
+
children: /* @__PURE__ */ e(
|
|
2238
|
+
pt,
|
|
1796
2239
|
{
|
|
1797
|
-
|
|
2240
|
+
options: { scrollbars: { autoHide: "leave", autoHideDelay: 200 } },
|
|
2241
|
+
className: "w-full",
|
|
1798
2242
|
style: {
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
minWidth: "max-content",
|
|
1802
|
-
borderCollapse: "separate",
|
|
1803
|
-
borderSpacing: 0
|
|
2243
|
+
maxHeight: P ? q : void 0,
|
|
2244
|
+
maxWidth: "100%"
|
|
1804
2245
|
},
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
onClick: (H) => {
|
|
1872
|
-
H.stopPropagation(), d(v);
|
|
1873
|
-
},
|
|
1874
|
-
children: /* @__PURE__ */ e(
|
|
1875
|
-
"input",
|
|
2246
|
+
defer: !0,
|
|
2247
|
+
children: /* @__PURE__ */ i(
|
|
2248
|
+
"table",
|
|
2249
|
+
{
|
|
2250
|
+
className: "text-sm",
|
|
2251
|
+
style: {
|
|
2252
|
+
tableLayout: "fixed",
|
|
2253
|
+
width: "100%",
|
|
2254
|
+
minWidth: J ?? "max-content",
|
|
2255
|
+
borderCollapse: "separate",
|
|
2256
|
+
borderSpacing: 0
|
|
2257
|
+
},
|
|
2258
|
+
children: [
|
|
2259
|
+
/* @__PURE__ */ i("colgroup", { children: [
|
|
2260
|
+
V && /* @__PURE__ */ e("col", { style: { width: 40 } }),
|
|
2261
|
+
de.map((s) => /* @__PURE__ */ e(
|
|
2262
|
+
"col",
|
|
2263
|
+
{
|
|
2264
|
+
style: { width: fe[s.key] ?? 150 }
|
|
2265
|
+
},
|
|
2266
|
+
s.key
|
|
2267
|
+
))
|
|
2268
|
+
] }),
|
|
2269
|
+
/* @__PURE__ */ e(
|
|
2270
|
+
"thead",
|
|
2271
|
+
{
|
|
2272
|
+
style: f ? {
|
|
2273
|
+
position: "sticky",
|
|
2274
|
+
top: 0,
|
|
2275
|
+
zIndex: 10,
|
|
2276
|
+
backdropFilter: "blur(14px)",
|
|
2277
|
+
WebkitBackdropFilter: "blur(14px)"
|
|
2278
|
+
} : void 0,
|
|
2279
|
+
children: at()
|
|
2280
|
+
}
|
|
2281
|
+
),
|
|
2282
|
+
/* @__PURE__ */ e("tbody", { children: Be.map((s, x) => {
|
|
2283
|
+
const C = n(s), z = V && m.has(C), Y = !!p, le = z && N ? "color-mix(in srgb, var(--primary) 8%, var(--bg-card))" : x % 2 === 1 ? "color-mix(in srgb, var(--bg-input) 50%, var(--bg-card))" : "var(--bg-card)";
|
|
2284
|
+
return /* @__PURE__ */ i(
|
|
2285
|
+
"tr",
|
|
2286
|
+
{
|
|
2287
|
+
onClick: Y ? () => p(s) : void 0,
|
|
2288
|
+
className: `transition-colors ${Y ? "cursor-pointer" : ""} ${g ? g(s) : ""}`,
|
|
2289
|
+
style: {
|
|
2290
|
+
"--dt-row-bg": le,
|
|
2291
|
+
"--dt-sticky-bg": le,
|
|
2292
|
+
background: "var(--dt-row-bg)"
|
|
2293
|
+
},
|
|
2294
|
+
onMouseEnter: (Q) => {
|
|
2295
|
+
z || (Q.currentTarget.style.setProperty(
|
|
2296
|
+
"--dt-row-bg",
|
|
2297
|
+
"var(--bg-hover)"
|
|
2298
|
+
), Q.currentTarget.style.setProperty(
|
|
2299
|
+
"--dt-sticky-bg",
|
|
2300
|
+
Ot
|
|
2301
|
+
));
|
|
2302
|
+
},
|
|
2303
|
+
onMouseLeave: (Q) => {
|
|
2304
|
+
Q.currentTarget.style.setProperty("--dt-row-bg", le), Q.currentTarget.style.setProperty(
|
|
2305
|
+
"--dt-sticky-bg",
|
|
2306
|
+
le
|
|
2307
|
+
);
|
|
2308
|
+
},
|
|
2309
|
+
children: [
|
|
2310
|
+
V && /* @__PURE__ */ e(
|
|
2311
|
+
"td",
|
|
1876
2312
|
{
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
onClick: (H) => H.stopPropagation(),
|
|
1880
|
-
onChange: () => d(v),
|
|
1881
|
-
className: "rounded cursor-pointer accent-[var(--primary)]"
|
|
1882
|
-
}
|
|
1883
|
-
)
|
|
1884
|
-
}
|
|
1885
|
-
),
|
|
1886
|
-
pe.map((H, me) => {
|
|
1887
|
-
const _ = W && !P && me === 0;
|
|
1888
|
-
return /* @__PURE__ */ e(
|
|
1889
|
-
"td",
|
|
1890
|
-
{
|
|
1891
|
-
className: `${T ? "px-2 py-1.5" : "px-3 py-2"} ${gr} ${Fe(H.align)} ${H.className ?? ""}`,
|
|
1892
|
-
style: {
|
|
1893
|
-
overflow: "hidden",
|
|
1894
|
-
whiteSpace: "nowrap",
|
|
1895
|
-
..._ ? {
|
|
2313
|
+
className: `${S ? "px-2 py-1.5" : "px-3 py-2"} w-10`,
|
|
2314
|
+
style: F ? {
|
|
1896
2315
|
position: "sticky",
|
|
1897
|
-
left:
|
|
2316
|
+
left: 0,
|
|
1898
2317
|
zIndex: 3,
|
|
1899
2318
|
background: "var(--dt-sticky-bg)",
|
|
1900
|
-
boxShadow: "
|
|
1901
|
-
borderRight: "1px solid var(--border)"
|
|
2319
|
+
boxShadow: "inset 0 -1px 0 var(--border)"
|
|
1902
2320
|
} : {
|
|
1903
2321
|
borderBottom: "1px solid var(--border)",
|
|
1904
2322
|
borderRight: "1px solid var(--border)"
|
|
1905
|
-
}
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
2323
|
+
},
|
|
2324
|
+
onClick: (Q) => {
|
|
2325
|
+
Q.stopPropagation(), h(C);
|
|
2326
|
+
},
|
|
2327
|
+
children: /* @__PURE__ */ e(
|
|
2328
|
+
"input",
|
|
2329
|
+
{
|
|
2330
|
+
type: "checkbox",
|
|
2331
|
+
checked: z,
|
|
2332
|
+
onClick: (Q) => Q.stopPropagation(),
|
|
2333
|
+
onChange: () => h(C),
|
|
2334
|
+
className: "rounded cursor-pointer accent-[var(--primary)]"
|
|
2335
|
+
}
|
|
2336
|
+
)
|
|
2337
|
+
}
|
|
2338
|
+
),
|
|
2339
|
+
de.map((Q, Le) => {
|
|
2340
|
+
const re = F && !ee && Le === 0;
|
|
2341
|
+
return /* @__PURE__ */ e(
|
|
2342
|
+
"td",
|
|
2343
|
+
{
|
|
2344
|
+
className: `${S ? "px-2 py-1.5" : "px-3 py-2"} ${Lr} ${nt(Q.align)} ${Q.className ?? ""}`,
|
|
2345
|
+
style: {
|
|
2346
|
+
overflow: "hidden",
|
|
2347
|
+
whiteSpace: "nowrap",
|
|
2348
|
+
...re ? {
|
|
2349
|
+
position: "sticky",
|
|
2350
|
+
left: oe,
|
|
2351
|
+
zIndex: 3,
|
|
2352
|
+
background: "var(--dt-sticky-bg)",
|
|
2353
|
+
boxShadow: "3px 0 6px -2px rgba(0,0,0,0.12), inset 0 -1px 0 var(--border)",
|
|
2354
|
+
borderRight: "1px solid var(--border)"
|
|
2355
|
+
} : {
|
|
2356
|
+
borderBottom: "1px solid var(--border)",
|
|
2357
|
+
borderRight: "1px solid var(--border)"
|
|
2358
|
+
}
|
|
2359
|
+
},
|
|
2360
|
+
children: /* @__PURE__ */ e(vt, { children: Q.cell(s) })
|
|
2361
|
+
},
|
|
2362
|
+
Q.key
|
|
2363
|
+
);
|
|
2364
|
+
})
|
|
2365
|
+
]
|
|
2366
|
+
},
|
|
2367
|
+
C
|
|
2368
|
+
);
|
|
2369
|
+
}) })
|
|
2370
|
+
]
|
|
2371
|
+
}
|
|
2372
|
+
)
|
|
1918
2373
|
}
|
|
1919
2374
|
)
|
|
1920
2375
|
}
|
|
1921
|
-
)
|
|
1922
|
-
|
|
2376
|
+
),
|
|
2377
|
+
ot()
|
|
1923
2378
|
]
|
|
1924
2379
|
}
|
|
1925
2380
|
);
|
|
1926
2381
|
}
|
|
1927
|
-
function
|
|
2382
|
+
function Ae(t) {
|
|
1928
2383
|
return t ? /* @__PURE__ */ new Date(`${t}T12:00:00`) : void 0;
|
|
1929
2384
|
}
|
|
1930
|
-
function
|
|
2385
|
+
function gt(t) {
|
|
1931
2386
|
return t.toISOString().slice(0, 10);
|
|
1932
2387
|
}
|
|
1933
|
-
function
|
|
2388
|
+
function Dr({
|
|
1934
2389
|
calendarMonth: t,
|
|
1935
2390
|
displayIndex: r
|
|
1936
2391
|
}) {
|
|
1937
|
-
const { previousMonth: n, nextMonth: a, goToMonth: l, months: u, labels:
|
|
1938
|
-
return /* @__PURE__ */
|
|
2392
|
+
const { previousMonth: n, nextMonth: a, goToMonth: l, months: u, labels: d, formatters: p } = sr(), m = !!n && r === 0, h = !!a && r === u.length - 1;
|
|
2393
|
+
return /* @__PURE__ */ i(
|
|
1939
2394
|
"div",
|
|
1940
2395
|
{
|
|
1941
2396
|
style: {
|
|
@@ -1953,9 +2408,9 @@ function vr({
|
|
|
1953
2408
|
"button",
|
|
1954
2409
|
{
|
|
1955
2410
|
type: "button",
|
|
1956
|
-
"aria-label":
|
|
2411
|
+
"aria-label": d.labelPrevious(n),
|
|
1957
2412
|
onClick: () => n && l(n),
|
|
1958
|
-
disabled: !
|
|
2413
|
+
disabled: !m,
|
|
1959
2414
|
style: {
|
|
1960
2415
|
height: 28,
|
|
1961
2416
|
width: 28,
|
|
@@ -1966,19 +2421,19 @@ function vr({
|
|
|
1966
2421
|
alignItems: "center",
|
|
1967
2422
|
justifyContent: "center",
|
|
1968
2423
|
color: "var(--text-main)",
|
|
1969
|
-
opacity:
|
|
1970
|
-
cursor:
|
|
2424
|
+
opacity: m ? 1 : 0.45,
|
|
2425
|
+
cursor: m ? "pointer" : "not-allowed"
|
|
1971
2426
|
},
|
|
1972
|
-
children: /* @__PURE__ */ e(
|
|
2427
|
+
children: /* @__PURE__ */ e(_e, { size: 16 })
|
|
1973
2428
|
}
|
|
1974
2429
|
),
|
|
1975
2430
|
/* @__PURE__ */ e(
|
|
1976
2431
|
"button",
|
|
1977
2432
|
{
|
|
1978
2433
|
type: "button",
|
|
1979
|
-
"aria-label":
|
|
2434
|
+
"aria-label": d.labelNext(a),
|
|
1980
2435
|
onClick: () => a && l(a),
|
|
1981
|
-
disabled: !
|
|
2436
|
+
disabled: !h,
|
|
1982
2437
|
style: {
|
|
1983
2438
|
height: 28,
|
|
1984
2439
|
width: 28,
|
|
@@ -1989,39 +2444,39 @@ function vr({
|
|
|
1989
2444
|
alignItems: "center",
|
|
1990
2445
|
justifyContent: "center",
|
|
1991
2446
|
color: "var(--text-main)",
|
|
1992
|
-
opacity:
|
|
1993
|
-
cursor:
|
|
2447
|
+
opacity: h ? 1 : 0.45,
|
|
2448
|
+
cursor: h ? "pointer" : "not-allowed"
|
|
1994
2449
|
},
|
|
1995
|
-
children: /* @__PURE__ */ e(
|
|
2450
|
+
children: /* @__PURE__ */ e(Te, { size: 16 })
|
|
1996
2451
|
}
|
|
1997
2452
|
)
|
|
1998
2453
|
]
|
|
1999
2454
|
}
|
|
2000
2455
|
);
|
|
2001
2456
|
}
|
|
2002
|
-
function
|
|
2457
|
+
function Ir(t) {
|
|
2003
2458
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
2004
2459
|
}
|
|
2005
|
-
function
|
|
2460
|
+
function kn({
|
|
2006
2461
|
startDate: t,
|
|
2007
2462
|
endDate: r,
|
|
2008
2463
|
onChange: n,
|
|
2009
2464
|
minDate: a,
|
|
2010
2465
|
viewMonth: l,
|
|
2011
2466
|
numberOfMonths: u = 1,
|
|
2012
|
-
showSummary:
|
|
2467
|
+
showSummary: d = !0,
|
|
2013
2468
|
startLabel: p = "Inicio",
|
|
2014
|
-
endLabel:
|
|
2469
|
+
endLabel: m = "Regreso"
|
|
2015
2470
|
}) {
|
|
2016
|
-
const
|
|
2017
|
-
from:
|
|
2018
|
-
to:
|
|
2019
|
-
},
|
|
2020
|
-
|
|
2471
|
+
const h = {
|
|
2472
|
+
from: Ae(t),
|
|
2473
|
+
to: Ae(r)
|
|
2474
|
+
}, w = Ae(a), [N, g] = B(
|
|
2475
|
+
Ae(l || t)
|
|
2021
2476
|
);
|
|
2022
|
-
return
|
|
2023
|
-
|
|
2024
|
-
}, [l, t]), /* @__PURE__ */
|
|
2477
|
+
return O(() => {
|
|
2478
|
+
g(Ae(l || t));
|
|
2479
|
+
}, [l, t]), /* @__PURE__ */ i("div", { children: [
|
|
2025
2480
|
/* @__PURE__ */ e(
|
|
2026
2481
|
"div",
|
|
2027
2482
|
{
|
|
@@ -2035,22 +2490,22 @@ function on({
|
|
|
2035
2490
|
padding: "10px 8px"
|
|
2036
2491
|
},
|
|
2037
2492
|
children: /* @__PURE__ */ e(
|
|
2038
|
-
|
|
2493
|
+
ir,
|
|
2039
2494
|
{
|
|
2040
2495
|
mode: "range",
|
|
2041
|
-
selected:
|
|
2042
|
-
month:
|
|
2043
|
-
onMonthChange:
|
|
2496
|
+
selected: h,
|
|
2497
|
+
month: N,
|
|
2498
|
+
onMonthChange: g,
|
|
2044
2499
|
onSelect: (f) => {
|
|
2045
|
-
const
|
|
2046
|
-
n({ startDate:
|
|
2500
|
+
const v = f != null && f.from ? gt(f.from) : t, c = f != null && f.to ? gt(f.to) : "";
|
|
2501
|
+
n({ startDate: v, endDate: c });
|
|
2047
2502
|
},
|
|
2048
2503
|
numberOfMonths: u,
|
|
2049
2504
|
hideNavigation: !0,
|
|
2050
|
-
disabled:
|
|
2505
|
+
disabled: w ? { before: w } : void 0,
|
|
2051
2506
|
showOutsideDays: !1,
|
|
2052
2507
|
components: {
|
|
2053
|
-
MonthCaption:
|
|
2508
|
+
MonthCaption: Dr
|
|
2054
2509
|
},
|
|
2055
2510
|
className: "text-sm",
|
|
2056
2511
|
classNames: {
|
|
@@ -2142,7 +2597,7 @@ function on({
|
|
|
2142
2597
|
}
|
|
2143
2598
|
},
|
|
2144
2599
|
formatters: {
|
|
2145
|
-
formatCaption: (f) =>
|
|
2600
|
+
formatCaption: (f) => Ir(
|
|
2146
2601
|
new Intl.DateTimeFormat("es-MX", {
|
|
2147
2602
|
month: "long",
|
|
2148
2603
|
year: "numeric"
|
|
@@ -2160,7 +2615,7 @@ function on({
|
|
|
2160
2615
|
)
|
|
2161
2616
|
}
|
|
2162
2617
|
),
|
|
2163
|
-
|
|
2618
|
+
d && t && /* @__PURE__ */ i(
|
|
2164
2619
|
"div",
|
|
2165
2620
|
{
|
|
2166
2621
|
style: {
|
|
@@ -2172,14 +2627,14 @@ function on({
|
|
|
2172
2627
|
flexWrap: "wrap"
|
|
2173
2628
|
},
|
|
2174
2629
|
children: [
|
|
2175
|
-
/* @__PURE__ */
|
|
2630
|
+
/* @__PURE__ */ i("span", { children: [
|
|
2176
2631
|
p,
|
|
2177
2632
|
":",
|
|
2178
2633
|
" ",
|
|
2179
2634
|
/* @__PURE__ */ e("strong", { style: { color: "var(--text-main)" }, children: t })
|
|
2180
2635
|
] }),
|
|
2181
|
-
r && /* @__PURE__ */
|
|
2182
|
-
|
|
2636
|
+
r && /* @__PURE__ */ i("span", { children: [
|
|
2637
|
+
m,
|
|
2183
2638
|
":",
|
|
2184
2639
|
" ",
|
|
2185
2640
|
/* @__PURE__ */ e("strong", { style: { color: "var(--text-main)" }, children: r })
|
|
@@ -2189,34 +2644,34 @@ function on({
|
|
|
2189
2644
|
)
|
|
2190
2645
|
] });
|
|
2191
2646
|
}
|
|
2192
|
-
function
|
|
2647
|
+
function Sn({
|
|
2193
2648
|
open: t,
|
|
2194
2649
|
onClose: r,
|
|
2195
2650
|
title: n,
|
|
2196
2651
|
subtitle: a,
|
|
2197
2652
|
leadingIcon: l,
|
|
2198
2653
|
confirmLabel: u = "Guardar",
|
|
2199
|
-
onConfirm:
|
|
2654
|
+
onConfirm: d,
|
|
2200
2655
|
loading: p = !1,
|
|
2201
|
-
confirmDisabled:
|
|
2202
|
-
headerActions:
|
|
2203
|
-
bodyClassName:
|
|
2204
|
-
width:
|
|
2205
|
-
children:
|
|
2656
|
+
confirmDisabled: m = !1,
|
|
2657
|
+
headerActions: h,
|
|
2658
|
+
bodyClassName: w = "flex-1 overflow-y-auto px-6 py-5",
|
|
2659
|
+
width: N = 440,
|
|
2660
|
+
children: g
|
|
2206
2661
|
}) {
|
|
2207
|
-
const [f,
|
|
2208
|
-
return
|
|
2209
|
-
|
|
2210
|
-
}, []),
|
|
2662
|
+
const [f, v] = B(!1);
|
|
2663
|
+
return O(() => {
|
|
2664
|
+
v(!0);
|
|
2665
|
+
}, []), O(() => (document.body.style.overflow = t ? "hidden" : "", () => {
|
|
2211
2666
|
document.body.style.overflow = "";
|
|
2212
|
-
}), [t]),
|
|
2667
|
+
}), [t]), O(() => {
|
|
2213
2668
|
if (!t) return;
|
|
2214
|
-
const
|
|
2215
|
-
|
|
2669
|
+
const c = ($) => {
|
|
2670
|
+
$.key === "Escape" && r();
|
|
2216
2671
|
};
|
|
2217
|
-
return window.addEventListener("keydown",
|
|
2218
|
-
}, [t, r]), f ?
|
|
2219
|
-
/* @__PURE__ */
|
|
2672
|
+
return window.addEventListener("keydown", c), () => window.removeEventListener("keydown", c);
|
|
2673
|
+
}, [t, r]), f ? Ge(
|
|
2674
|
+
/* @__PURE__ */ i(
|
|
2220
2675
|
"div",
|
|
2221
2676
|
{
|
|
2222
2677
|
"aria-hidden": !t,
|
|
@@ -2229,26 +2684,26 @@ function sn({
|
|
|
2229
2684
|
onClick: r
|
|
2230
2685
|
}
|
|
2231
2686
|
),
|
|
2232
|
-
/* @__PURE__ */
|
|
2687
|
+
/* @__PURE__ */ i(
|
|
2233
2688
|
"div",
|
|
2234
2689
|
{
|
|
2235
2690
|
className: `absolute inset-y-0 right-0 flex flex-col shadow-2xl transition-transform duration-300 ${t ? "translate-x-0" : "translate-x-full"}`,
|
|
2236
2691
|
style: {
|
|
2237
|
-
width: `min(100vw, ${
|
|
2692
|
+
width: `min(100vw, ${N}px)`,
|
|
2238
2693
|
background: "var(--bg-card)",
|
|
2239
2694
|
borderLeft: "1px solid var(--border)"
|
|
2240
2695
|
},
|
|
2241
2696
|
children: [
|
|
2242
|
-
/* @__PURE__ */
|
|
2697
|
+
/* @__PURE__ */ i(
|
|
2243
2698
|
"div",
|
|
2244
2699
|
{
|
|
2245
2700
|
className: "flex items-center justify-between px-6 py-4 flex-shrink-0",
|
|
2246
2701
|
style: { borderBottom: "1px solid var(--border)" },
|
|
2247
2702
|
children: [
|
|
2248
|
-
/* @__PURE__ */
|
|
2249
|
-
/* @__PURE__ */ e(
|
|
2703
|
+
/* @__PURE__ */ i("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
2704
|
+
/* @__PURE__ */ e(he, { variant: "icon", onClick: r, title: "Cerrar", children: /* @__PURE__ */ e(Se, { className: "w-5 h-5" }) }),
|
|
2250
2705
|
l && /* @__PURE__ */ e("div", { className: "flex-shrink-0", children: l }),
|
|
2251
|
-
/* @__PURE__ */
|
|
2706
|
+
/* @__PURE__ */ i("div", { className: "min-w-0", children: [
|
|
2252
2707
|
/* @__PURE__ */ e(
|
|
2253
2708
|
"h3",
|
|
2254
2709
|
{
|
|
@@ -2267,11 +2722,11 @@ function sn({
|
|
|
2267
2722
|
)
|
|
2268
2723
|
] })
|
|
2269
2724
|
] }),
|
|
2270
|
-
(
|
|
2271
|
-
|
|
2272
|
-
|
|
2725
|
+
(h || d) && /* @__PURE__ */ i("div", { className: "flex items-center gap-2 flex-shrink-0", children: [
|
|
2726
|
+
h,
|
|
2727
|
+
d && /* @__PURE__ */ i(we, { children: [
|
|
2273
2728
|
/* @__PURE__ */ e(
|
|
2274
|
-
|
|
2729
|
+
he,
|
|
2275
2730
|
{
|
|
2276
2731
|
variant: "secondary",
|
|
2277
2732
|
size: "sm",
|
|
@@ -2281,14 +2736,14 @@ function sn({
|
|
|
2281
2736
|
}
|
|
2282
2737
|
),
|
|
2283
2738
|
/* @__PURE__ */ e(
|
|
2284
|
-
|
|
2739
|
+
he,
|
|
2285
2740
|
{
|
|
2286
2741
|
variant: "primary",
|
|
2287
2742
|
size: "sm",
|
|
2288
|
-
icon: /* @__PURE__ */ e(
|
|
2289
|
-
onClick:
|
|
2743
|
+
icon: /* @__PURE__ */ e(lr, { className: "w-4 h-4" }),
|
|
2744
|
+
onClick: d,
|
|
2290
2745
|
loading: p,
|
|
2291
|
-
disabled:
|
|
2746
|
+
disabled: m,
|
|
2292
2747
|
title: u
|
|
2293
2748
|
}
|
|
2294
2749
|
)
|
|
@@ -2297,7 +2752,7 @@ function sn({
|
|
|
2297
2752
|
]
|
|
2298
2753
|
}
|
|
2299
2754
|
),
|
|
2300
|
-
/* @__PURE__ */ e("div", { "data-drawer-scroll": "true", className:
|
|
2755
|
+
/* @__PURE__ */ e("div", { "data-drawer-scroll": "true", className: w, children: g })
|
|
2301
2756
|
]
|
|
2302
2757
|
}
|
|
2303
2758
|
)
|
|
@@ -2307,7 +2762,7 @@ function sn({
|
|
|
2307
2762
|
document.body
|
|
2308
2763
|
) : null;
|
|
2309
2764
|
}
|
|
2310
|
-
function
|
|
2765
|
+
function yt({
|
|
2311
2766
|
className: t = "",
|
|
2312
2767
|
...r
|
|
2313
2768
|
}) {
|
|
@@ -2319,55 +2774,55 @@ function it({
|
|
|
2319
2774
|
}
|
|
2320
2775
|
);
|
|
2321
2776
|
}
|
|
2322
|
-
function
|
|
2777
|
+
function Cn({
|
|
2323
2778
|
label: t,
|
|
2324
2779
|
containerClassName: r = "",
|
|
2325
2780
|
helperText: n,
|
|
2326
2781
|
error: a,
|
|
2327
2782
|
labelAction: l,
|
|
2328
2783
|
floatingLabel: u = !1,
|
|
2329
|
-
showPasswordToggle:
|
|
2784
|
+
showPasswordToggle: d = !0,
|
|
2330
2785
|
className: p = "",
|
|
2331
|
-
required:
|
|
2332
|
-
...
|
|
2786
|
+
required: m,
|
|
2787
|
+
...h
|
|
2333
2788
|
}) {
|
|
2334
|
-
const [
|
|
2335
|
-
top:
|
|
2336
|
-
color:
|
|
2337
|
-
fontSize:
|
|
2338
|
-
fontWeight:
|
|
2339
|
-
textTransform:
|
|
2340
|
-
},
|
|
2341
|
-
var
|
|
2342
|
-
|
|
2343
|
-
},
|
|
2344
|
-
var
|
|
2345
|
-
|
|
2789
|
+
const [w, N] = B(() => !!h.autoFocus), [g, f] = B(!1), v = h.type === "password" && d, c = v && g ? "text" : h.type, $ = h.value !== void 0 ? String(h.value).length > 0 : h.defaultValue !== void 0 && String(h.defaultValue).length > 0, D = w || $, K = {
|
|
2790
|
+
top: D ? 8 : 15,
|
|
2791
|
+
color: w ? "var(--primary)" : "var(--text-muted)",
|
|
2792
|
+
fontSize: D ? 11 : 14,
|
|
2793
|
+
fontWeight: D ? 600 : 400,
|
|
2794
|
+
textTransform: D ? "uppercase" : "none"
|
|
2795
|
+
}, W = (T) => {
|
|
2796
|
+
var I;
|
|
2797
|
+
N(!0), (I = h.onFocus) == null || I.call(h, T);
|
|
2798
|
+
}, E = (T) => {
|
|
2799
|
+
var I;
|
|
2800
|
+
N(!1), (I = h.onBlur) == null || I.call(h, T);
|
|
2346
2801
|
};
|
|
2347
|
-
return u ? /* @__PURE__ */
|
|
2348
|
-
/* @__PURE__ */
|
|
2802
|
+
return u ? /* @__PURE__ */ i("label", { className: `flex flex-col gap-2 ${r}`, children: [
|
|
2803
|
+
/* @__PURE__ */ i("span", { className: "relative block", children: [
|
|
2349
2804
|
/* @__PURE__ */ e(
|
|
2350
|
-
|
|
2805
|
+
yt,
|
|
2351
2806
|
{
|
|
2352
|
-
...
|
|
2353
|
-
type:
|
|
2354
|
-
required:
|
|
2807
|
+
...h,
|
|
2808
|
+
type: c,
|
|
2809
|
+
required: m,
|
|
2355
2810
|
placeholder: " ",
|
|
2356
|
-
"aria-invalid": !!a ||
|
|
2357
|
-
"data-has-value":
|
|
2358
|
-
className: `h-12 w-full pt-5 ${
|
|
2359
|
-
onFocus:
|
|
2360
|
-
onBlur:
|
|
2811
|
+
"aria-invalid": !!a || h["aria-invalid"],
|
|
2812
|
+
"data-has-value": $ ? "true" : void 0,
|
|
2813
|
+
className: `h-12 w-full pt-5 ${v ? "pr-10" : ""} ${p}`,
|
|
2814
|
+
onFocus: W,
|
|
2815
|
+
onBlur: E
|
|
2361
2816
|
}
|
|
2362
2817
|
),
|
|
2363
|
-
/* @__PURE__ */
|
|
2818
|
+
/* @__PURE__ */ i(
|
|
2364
2819
|
"span",
|
|
2365
2820
|
{
|
|
2366
2821
|
className: "pointer-events-none absolute left-3 transition-all duration-150",
|
|
2367
|
-
style:
|
|
2822
|
+
style: K,
|
|
2368
2823
|
children: [
|
|
2369
2824
|
t,
|
|
2370
|
-
|
|
2825
|
+
m && /* @__PURE__ */ e("span", { className: "ml-1 text-[var(--danger)]", children: "*" })
|
|
2371
2826
|
]
|
|
2372
2827
|
}
|
|
2373
2828
|
),
|
|
@@ -2375,135 +2830,284 @@ function ln({
|
|
|
2375
2830
|
"span",
|
|
2376
2831
|
{
|
|
2377
2832
|
className: "absolute right-2 transition-all duration-150",
|
|
2378
|
-
style: { top:
|
|
2833
|
+
style: { top: D ? 8 : 15 },
|
|
2379
2834
|
children: l
|
|
2380
2835
|
}
|
|
2381
2836
|
),
|
|
2382
|
-
|
|
2837
|
+
v && /* @__PURE__ */ e(
|
|
2383
2838
|
"button",
|
|
2384
2839
|
{
|
|
2385
2840
|
type: "button",
|
|
2386
|
-
"aria-label":
|
|
2841
|
+
"aria-label": g ? "Ocultar contraseña" : "Mostrar contraseña",
|
|
2387
2842
|
className: "absolute right-3 top-1/2 -translate-y-1/2 transition-colors",
|
|
2388
2843
|
style: { color: "var(--text-muted)" },
|
|
2389
2844
|
tabIndex: -1,
|
|
2390
|
-
onClick: () => f((
|
|
2391
|
-
children:
|
|
2845
|
+
onClick: () => f((T) => !T),
|
|
2846
|
+
children: g ? /* @__PURE__ */ e(Ft, { className: "h-[18px] w-[18px]" }) : /* @__PURE__ */ e(Ut, { className: "h-[18px] w-[18px]" })
|
|
2392
2847
|
}
|
|
2393
2848
|
)
|
|
2394
2849
|
] }),
|
|
2395
2850
|
a ? /* @__PURE__ */ e("span", { className: "text-xs font-medium normal-case text-[var(--danger)]", children: a }) : n ? /* @__PURE__ */ e("span", { className: "text-xs font-medium normal-case text-[var(--text-muted)]", children: n }) : null
|
|
2396
|
-
] }) : /* @__PURE__ */
|
|
2397
|
-
/* @__PURE__ */
|
|
2851
|
+
] }) : /* @__PURE__ */ i("label", { className: `flex flex-col gap-2 ${r}`, children: [
|
|
2852
|
+
/* @__PURE__ */ i("span", { className: "inline-flex items-center gap-1 text-xs font-semibold uppercase text-[var(--text-muted)]", children: [
|
|
2398
2853
|
/* @__PURE__ */ e("span", { children: t }),
|
|
2399
|
-
|
|
2854
|
+
m && /* @__PURE__ */ e("span", { className: "text-[var(--danger)]", children: "*" }),
|
|
2400
2855
|
l && /* @__PURE__ */ e("span", { className: "ml-auto normal-case", children: l })
|
|
2401
2856
|
] }),
|
|
2402
2857
|
/* @__PURE__ */ e(
|
|
2403
|
-
|
|
2858
|
+
yt,
|
|
2404
2859
|
{
|
|
2405
|
-
...
|
|
2406
|
-
required:
|
|
2407
|
-
"aria-invalid": !!a ||
|
|
2860
|
+
...h,
|
|
2861
|
+
required: m,
|
|
2862
|
+
"aria-invalid": !!a || h["aria-invalid"],
|
|
2408
2863
|
className: p
|
|
2409
2864
|
}
|
|
2410
2865
|
),
|
|
2411
2866
|
a ? /* @__PURE__ */ e("span", { className: "text-xs font-medium normal-case text-[var(--danger)]", children: a }) : n ? /* @__PURE__ */ e("span", { className: "text-xs font-medium normal-case text-[var(--text-muted)]", children: n }) : null
|
|
2412
2867
|
] });
|
|
2413
2868
|
}
|
|
2414
|
-
function
|
|
2415
|
-
|
|
2416
|
-
title: r = "Cargando...",
|
|
2417
|
-
rows: n = 6,
|
|
2418
|
-
children: a
|
|
2419
|
-
}) {
|
|
2420
|
-
return t === "table" ? /* @__PURE__ */ e(bt, { rows: n }) : t === "sections" ? /* @__PURE__ */ e(wr, { rows: n }) : t === "cards" ? /* @__PURE__ */ e(Nr, { rows: n }) : /* @__PURE__ */ e("div", { className: "flex min-h-[240px] items-center justify-center rounded-lg border border-[var(--border)] bg-[var(--bg-card)] p-6", children: /* @__PURE__ */ s("div", { className: "flex flex-col items-center gap-3 text-center", children: [
|
|
2421
|
-
/* @__PURE__ */ e("div", { className: "h-9 w-9 animate-spin rounded-full border-2 border-[var(--border)] border-t-[var(--primary)]" }),
|
|
2422
|
-
/* @__PURE__ */ s("div", { children: [
|
|
2423
|
-
/* @__PURE__ */ e("p", { className: "text-sm font-semibold text-[var(--text-main)]", children: r }),
|
|
2424
|
-
a && /* @__PURE__ */ e("div", { className: "mt-1 text-xs text-[var(--text-muted)]", children: a })
|
|
2425
|
-
] })
|
|
2426
|
-
] }) });
|
|
2427
|
-
}
|
|
2428
|
-
function wr({ rows: t }) {
|
|
2429
|
-
return /* @__PURE__ */ e("div", { className: "space-y-4", children: Array.from({ length: Math.max(2, Math.min(t, 4)) }).map(
|
|
2430
|
-
(r, n) => /* @__PURE__ */ s(
|
|
2431
|
-
"section",
|
|
2432
|
-
{
|
|
2433
|
-
className: "overflow-hidden rounded-lg border border-[var(--border)] bg-[var(--bg-card)]",
|
|
2434
|
-
children: [
|
|
2435
|
-
/* @__PURE__ */ s("div", { className: "flex items-center justify-between gap-3 border-b border-[var(--border)] px-3 py-3", children: [
|
|
2436
|
-
/* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
|
|
2437
|
-
/* @__PURE__ */ e("div", { className: "h-4 w-4 animate-pulse rounded bg-[var(--bg-input)]" }),
|
|
2438
|
-
/* @__PURE__ */ e("div", { className: "h-4 w-32 animate-pulse rounded bg-[var(--bg-input)]" }),
|
|
2439
|
-
/* @__PURE__ */ e("div", { className: "h-5 w-20 animate-pulse rounded-full bg-[var(--bg-input)]" })
|
|
2440
|
-
] }),
|
|
2441
|
-
/* @__PURE__ */ s("div", { className: "flex gap-1", children: [
|
|
2442
|
-
/* @__PURE__ */ e("div", { className: "h-8 w-8 animate-pulse rounded-md bg-[var(--bg-input)]" }),
|
|
2443
|
-
/* @__PURE__ */ e("div", { className: "h-8 w-8 animate-pulse rounded-md bg-[var(--bg-input)]" })
|
|
2444
|
-
] })
|
|
2445
|
-
] }),
|
|
2446
|
-
/* @__PURE__ */ e(
|
|
2447
|
-
bt,
|
|
2448
|
-
{
|
|
2449
|
-
rows: n === 0 ? t : Math.max(3, t - 2),
|
|
2450
|
-
compact: !0
|
|
2451
|
-
}
|
|
2452
|
-
)
|
|
2453
|
-
]
|
|
2454
|
-
},
|
|
2455
|
-
n
|
|
2456
|
-
)
|
|
2457
|
-
) });
|
|
2869
|
+
function ke(...t) {
|
|
2870
|
+
return t.filter(Boolean).join(" ");
|
|
2458
2871
|
}
|
|
2459
|
-
function
|
|
2460
|
-
|
|
2461
|
-
|
|
2872
|
+
function $n({
|
|
2873
|
+
steps: t,
|
|
2874
|
+
activeStepId: r,
|
|
2875
|
+
initialStepId: n,
|
|
2876
|
+
completedStepIds: a,
|
|
2877
|
+
defaultCompletedStepIds: l = [],
|
|
2878
|
+
onActiveStepChange: u,
|
|
2879
|
+
onCompletedStepIdsChange: d,
|
|
2880
|
+
onBlockedStep: p,
|
|
2881
|
+
allowBackNavigation: m = !0,
|
|
2882
|
+
showFooter: h = !0,
|
|
2883
|
+
previousLabel: w = "Anterior",
|
|
2884
|
+
nextLabel: N = "Siguiente",
|
|
2885
|
+
blockedNextLabel: g = "Completa este paso",
|
|
2886
|
+
className: f = "",
|
|
2887
|
+
headerClassName: v = "",
|
|
2888
|
+
contentClassName: c = "",
|
|
2889
|
+
footerClassName: $ = ""
|
|
2890
|
+
}) {
|
|
2891
|
+
var de;
|
|
2892
|
+
const D = ((de = t[0]) == null ? void 0 : de.id) ?? "", [K, W] = B(
|
|
2893
|
+
n ?? D
|
|
2894
|
+
), [E, T] = B(
|
|
2895
|
+
l
|
|
2896
|
+
), I = r ?? K, L = a ?? E, F = Oe(
|
|
2897
|
+
() => new Set(L),
|
|
2898
|
+
[L]
|
|
2899
|
+
), M = Math.max(
|
|
2900
|
+
0,
|
|
2901
|
+
t.findIndex((k) => k.id === I)
|
|
2902
|
+
), S = t[M] ?? t[0], P = t.length <= 1 ? 100 : M / (t.length - 1) * 100, J = (k) => {
|
|
2903
|
+
a || T(k), d == null || d(k);
|
|
2904
|
+
}, _ = (k) => {
|
|
2905
|
+
const A = t.find((X) => X.id === k);
|
|
2906
|
+
A && (r || W(k), u == null || u(k, A));
|
|
2907
|
+
}, j = (k) => F.has(k), U = (k) => t.slice(0, k).find((A) => !A.optional && !F.has(A.id)), Z = (k) => {
|
|
2908
|
+
const A = t[k];
|
|
2909
|
+
return !A || A.disabled ? !1 : k === M || m && k < M ? !0 : !U(k);
|
|
2910
|
+
}, o = (k) => {
|
|
2911
|
+
const A = t.findIndex((X) => X.id === k);
|
|
2912
|
+
return A >= 0 && Z(A);
|
|
2913
|
+
}, y = (k) => {
|
|
2914
|
+
const A = t.findIndex((X) => X.id === k);
|
|
2915
|
+
if (A < 0) return !1;
|
|
2916
|
+
if (!Z(A)) {
|
|
2917
|
+
const X = U(A);
|
|
2918
|
+
return X && (p == null || p(t[A], X)), !1;
|
|
2919
|
+
}
|
|
2920
|
+
return _(k), !0;
|
|
2921
|
+
}, H = (k = S == null ? void 0 : S.id) => {
|
|
2922
|
+
!k || F.has(k) || J([...L, k]);
|
|
2923
|
+
}, q = (k = S == null ? void 0 : S.id) => {
|
|
2924
|
+
if (!k) return;
|
|
2925
|
+
const A = t.findIndex((ne) => ne.id === k), X = L.filter((ne) => {
|
|
2926
|
+
const ce = t.findIndex((R) => R.id === ne);
|
|
2927
|
+
return ce >= 0 && ce < A;
|
|
2928
|
+
});
|
|
2929
|
+
J(X), A >= 0 && M > A && _(k);
|
|
2930
|
+
}, G = () => M <= 0 ? !1 : y(t[M - 1].id), ee = () => {
|
|
2931
|
+
const k = t[M + 1];
|
|
2932
|
+
return k ? y(k.id) : !1;
|
|
2933
|
+
}, me = {
|
|
2934
|
+
activeStep: S,
|
|
2935
|
+
activeIndex: M,
|
|
2936
|
+
completedStepIds: L,
|
|
2937
|
+
isCompleted: j,
|
|
2938
|
+
isUnlocked: o,
|
|
2939
|
+
completeStep: H,
|
|
2940
|
+
uncompleteStep: q,
|
|
2941
|
+
goToStep: y,
|
|
2942
|
+
goNext: ee,
|
|
2943
|
+
goPrevious: G
|
|
2944
|
+
};
|
|
2945
|
+
if (!S) return null;
|
|
2946
|
+
const te = t[M + 1], be = M > 0, fe = te ? o(te.id) : !1, ve = typeof S.content == "function" ? S.content(me) : S.content;
|
|
2947
|
+
return /* @__PURE__ */ i(
|
|
2948
|
+
"section",
|
|
2462
2949
|
{
|
|
2463
|
-
className:
|
|
2950
|
+
className: ke(
|
|
2951
|
+
"overflow-hidden rounded-lg border border-[var(--border)] bg-[var(--bg-card)]",
|
|
2952
|
+
f
|
|
2953
|
+
),
|
|
2464
2954
|
children: [
|
|
2465
|
-
/* @__PURE__ */
|
|
2466
|
-
/* @__PURE__ */ e("div", { className: "mt-3 h-3 w-full animate-pulse rounded bg-[var(--bg-input)]" }),
|
|
2467
|
-
/* @__PURE__ */ e("div", { className: "mt-2 h-3 w-4/5 animate-pulse rounded bg-[var(--bg-input)]" })
|
|
2468
|
-
]
|
|
2469
|
-
},
|
|
2470
|
-
n
|
|
2471
|
-
)) });
|
|
2472
|
-
}
|
|
2473
|
-
function bt({
|
|
2474
|
-
rows: t,
|
|
2475
|
-
compact: r = !1
|
|
2476
|
-
}) {
|
|
2477
|
-
const n = r ? 5 : 6;
|
|
2478
|
-
return /* @__PURE__ */ s("div", { className: "overflow-hidden rounded-lg border border-[var(--border)] bg-[var(--bg-card)]", children: [
|
|
2479
|
-
/* @__PURE__ */ e(
|
|
2480
|
-
"div",
|
|
2481
|
-
{
|
|
2482
|
-
className: "grid border-b border-[var(--border)]",
|
|
2483
|
-
style: { gridTemplateColumns: `repeat(${n}, minmax(0, 1fr))` },
|
|
2484
|
-
children: Array.from({ length: n }).map((a, l) => /* @__PURE__ */ e("div", { className: "px-3 py-3", children: /* @__PURE__ */ e("div", { className: "h-3 w-2/3 animate-pulse rounded bg-[var(--bg-input)]" }) }, l))
|
|
2485
|
-
}
|
|
2486
|
-
),
|
|
2487
|
-
Array.from({ length: t }).map((a, l) => /* @__PURE__ */ e(
|
|
2488
|
-
"div",
|
|
2489
|
-
{
|
|
2490
|
-
className: "grid border-b border-[var(--border)] last:border-b-0",
|
|
2491
|
-
style: { gridTemplateColumns: `repeat(${n}, minmax(0, 1fr))` },
|
|
2492
|
-
children: Array.from({ length: n }).map((u, m) => /* @__PURE__ */ e("div", { className: "px-3 py-3", children: /* @__PURE__ */ e(
|
|
2955
|
+
/* @__PURE__ */ i(
|
|
2493
2956
|
"div",
|
|
2494
2957
|
{
|
|
2495
|
-
className:
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2958
|
+
className: ke(
|
|
2959
|
+
"border-b border-[var(--border)] bg-[var(--bg-input)]",
|
|
2960
|
+
v
|
|
2961
|
+
),
|
|
2962
|
+
children: [
|
|
2963
|
+
/* @__PURE__ */ e("div", { className: "relative h-1 overflow-hidden bg-[var(--border)]/55", children: /* @__PURE__ */ e(
|
|
2964
|
+
"div",
|
|
2965
|
+
{
|
|
2966
|
+
className: "h-full rounded-r-full bg-[var(--primary)] transition-[width] duration-500 ease-out",
|
|
2967
|
+
style: { width: `${P}%` }
|
|
2968
|
+
}
|
|
2969
|
+
) }),
|
|
2970
|
+
/* @__PURE__ */ e(
|
|
2971
|
+
"div",
|
|
2972
|
+
{
|
|
2973
|
+
className: "grid gap-2 p-2",
|
|
2974
|
+
style: {
|
|
2975
|
+
gridTemplateColumns: `repeat(${t.length}, minmax(0, 1fr))`
|
|
2976
|
+
},
|
|
2977
|
+
children: t.map((k, A) => {
|
|
2978
|
+
const X = k.id === S.id, ne = j(k.id), ce = Z(A), R = U(A);
|
|
2979
|
+
return /* @__PURE__ */ i(
|
|
2980
|
+
"button",
|
|
2981
|
+
{
|
|
2982
|
+
type: "button",
|
|
2983
|
+
disabled: !ce,
|
|
2984
|
+
"aria-current": X ? "step" : void 0,
|
|
2985
|
+
"aria-disabled": !ce,
|
|
2986
|
+
title: !ce && R ? `Completa ${R.title}` : k.title,
|
|
2987
|
+
onClick: () => y(k.id),
|
|
2988
|
+
className: ke(
|
|
2989
|
+
"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",
|
|
2990
|
+
X && "border-[var(--primary)] bg-[var(--bg-card)] shadow-sm",
|
|
2991
|
+
ne && !X && "border-[var(--primary)]/35 bg-[var(--bg-card)]",
|
|
2992
|
+
!X && !ne && ce && "border-transparent bg-[var(--bg-card)]/45 hover:border-[var(--border)] hover:bg-[var(--bg-card)]",
|
|
2993
|
+
!ce && "border-transparent bg-[var(--bg-card)]/35 opacity-60"
|
|
2994
|
+
),
|
|
2995
|
+
children: [
|
|
2996
|
+
/* @__PURE__ */ e(
|
|
2997
|
+
"span",
|
|
2998
|
+
{
|
|
2999
|
+
className: ke(
|
|
3000
|
+
"absolute inset-x-0 top-0 h-0.5 origin-left scale-x-0 bg-[var(--primary)] transition-transform duration-300",
|
|
3001
|
+
X && "scale-x-100"
|
|
3002
|
+
)
|
|
3003
|
+
}
|
|
3004
|
+
),
|
|
3005
|
+
/* @__PURE__ */ i("span", { className: "flex min-w-0 items-center gap-2", children: [
|
|
3006
|
+
/* @__PURE__ */ e(
|
|
3007
|
+
"span",
|
|
3008
|
+
{
|
|
3009
|
+
className: ke(
|
|
3010
|
+
"grid h-7 w-7 shrink-0 place-items-center rounded-full border text-xs font-bold transition-all duration-200",
|
|
3011
|
+
X && "border-[var(--primary)] bg-[var(--primary)] text-[var(--primary-fg)]",
|
|
3012
|
+
ne && !X && "border-[var(--primary)] bg-[var(--primary)]/12 text-[var(--primary)]",
|
|
3013
|
+
!ne && !X && ce && "border-[var(--border)] text-[var(--text-muted)]",
|
|
3014
|
+
!ce && "border-[var(--border)] text-[var(--text-muted)]"
|
|
3015
|
+
),
|
|
3016
|
+
children: ne ? /* @__PURE__ */ e(qt, { className: "h-4 w-4" }) : ce ? A + 1 : /* @__PURE__ */ e(Yt, { className: "h-3.5 w-3.5" })
|
|
3017
|
+
}
|
|
3018
|
+
),
|
|
3019
|
+
/* @__PURE__ */ i("span", { className: "min-w-0 flex-1", children: [
|
|
3020
|
+
/* @__PURE__ */ i(
|
|
3021
|
+
"span",
|
|
3022
|
+
{
|
|
3023
|
+
className: ke(
|
|
3024
|
+
"block truncate text-xs font-semibold transition-colors duration-200",
|
|
3025
|
+
X ? "text-[var(--text-main)]" : "text-[var(--text-secondary)]"
|
|
3026
|
+
),
|
|
3027
|
+
children: [
|
|
3028
|
+
A + 1,
|
|
3029
|
+
". ",
|
|
3030
|
+
k.title
|
|
3031
|
+
]
|
|
3032
|
+
}
|
|
3033
|
+
),
|
|
3034
|
+
k.description && /* @__PURE__ */ e("span", { className: "mt-1 block truncate text-[11px] text-[var(--text-muted)]", children: k.description })
|
|
3035
|
+
] }),
|
|
3036
|
+
k.badge && /* @__PURE__ */ e("span", { className: "shrink-0", children: k.badge })
|
|
3037
|
+
] })
|
|
3038
|
+
]
|
|
3039
|
+
},
|
|
3040
|
+
k.id
|
|
3041
|
+
);
|
|
3042
|
+
})
|
|
3043
|
+
}
|
|
3044
|
+
)
|
|
3045
|
+
]
|
|
2499
3046
|
}
|
|
2500
|
-
)
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
3047
|
+
),
|
|
3048
|
+
/* @__PURE__ */ e(
|
|
3049
|
+
"div",
|
|
3050
|
+
{
|
|
3051
|
+
className: ke(
|
|
3052
|
+
"min-h-72 animate-[stepWizardIn_220ms_ease-out] p-5",
|
|
3053
|
+
c
|
|
3054
|
+
),
|
|
3055
|
+
children: ve
|
|
3056
|
+
},
|
|
3057
|
+
S.id
|
|
3058
|
+
),
|
|
3059
|
+
h && /* @__PURE__ */ i(
|
|
3060
|
+
"div",
|
|
3061
|
+
{
|
|
3062
|
+
className: ke(
|
|
3063
|
+
"flex flex-wrap items-center justify-between gap-3 border-t border-[var(--border)] bg-[var(--bg-input)] px-4 py-3",
|
|
3064
|
+
$
|
|
3065
|
+
),
|
|
3066
|
+
children: [
|
|
3067
|
+
/* @__PURE__ */ e(
|
|
3068
|
+
he,
|
|
3069
|
+
{
|
|
3070
|
+
variant: "secondary",
|
|
3071
|
+
height: 38,
|
|
3072
|
+
padding: "0 14px",
|
|
3073
|
+
icon: /* @__PURE__ */ e(_e, {}),
|
|
3074
|
+
disabled: !be,
|
|
3075
|
+
onClick: G,
|
|
3076
|
+
children: w
|
|
3077
|
+
}
|
|
3078
|
+
),
|
|
3079
|
+
/* @__PURE__ */ i("div", { className: "flex items-center gap-3 text-xs text-[var(--text-muted)]", children: [
|
|
3080
|
+
/* @__PURE__ */ i("span", { children: [
|
|
3081
|
+
"Paso ",
|
|
3082
|
+
M + 1,
|
|
3083
|
+
" de ",
|
|
3084
|
+
t.length
|
|
3085
|
+
] }),
|
|
3086
|
+
/* @__PURE__ */ e("span", { className: "h-1 w-1 rounded-full bg-[var(--border)]" }),
|
|
3087
|
+
/* @__PURE__ */ i("span", { children: [
|
|
3088
|
+
L.length,
|
|
3089
|
+
" completados"
|
|
3090
|
+
] })
|
|
3091
|
+
] }),
|
|
3092
|
+
/* @__PURE__ */ e(
|
|
3093
|
+
he,
|
|
3094
|
+
{
|
|
3095
|
+
height: 38,
|
|
3096
|
+
padding: "0 14px",
|
|
3097
|
+
icon: /* @__PURE__ */ e(Te, {}),
|
|
3098
|
+
disabled: !te || !fe,
|
|
3099
|
+
onClick: ee,
|
|
3100
|
+
children: te && !fe ? g : N
|
|
3101
|
+
}
|
|
3102
|
+
)
|
|
3103
|
+
]
|
|
3104
|
+
}
|
|
3105
|
+
)
|
|
3106
|
+
]
|
|
3107
|
+
}
|
|
3108
|
+
);
|
|
2505
3109
|
}
|
|
2506
|
-
const
|
|
3110
|
+
const Rr = {
|
|
2507
3111
|
xs: {
|
|
2508
3112
|
width: 28,
|
|
2509
3113
|
height: 16,
|
|
@@ -2517,7 +3121,7 @@ const kr = {
|
|
|
2517
3121
|
padding: 2
|
|
2518
3122
|
}
|
|
2519
3123
|
};
|
|
2520
|
-
function
|
|
3124
|
+
function En({
|
|
2521
3125
|
checked: t,
|
|
2522
3126
|
disabled: r,
|
|
2523
3127
|
onCheckedChange: n,
|
|
@@ -2525,7 +3129,7 @@ function dn({
|
|
|
2525
3129
|
className: l = "",
|
|
2526
3130
|
...u
|
|
2527
3131
|
}) {
|
|
2528
|
-
const
|
|
3132
|
+
const d = Rr[a], p = t ? d.width - d.thumb - d.padding * 2 : 0;
|
|
2529
3133
|
return /* @__PURE__ */ e(
|
|
2530
3134
|
"button",
|
|
2531
3135
|
{
|
|
@@ -2537,8 +3141,8 @@ function dn({
|
|
|
2537
3141
|
onClick: () => !r && n(!t),
|
|
2538
3142
|
className: `relative inline-flex shrink-0 items-center rounded-full transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--primary)]/50 disabled:cursor-not-allowed disabled:opacity-50 ${l}`,
|
|
2539
3143
|
style: {
|
|
2540
|
-
width:
|
|
2541
|
-
height:
|
|
3144
|
+
width: d.width,
|
|
3145
|
+
height: d.height,
|
|
2542
3146
|
background: t ? "color-mix(in srgb, var(--primary) 85%, transparent)" : "var(--bg-input)",
|
|
2543
3147
|
border: t ? "1px solid color-mix(in srgb, var(--primary) 55%, transparent)" : "1px solid var(--border)"
|
|
2544
3148
|
},
|
|
@@ -2547,9 +3151,9 @@ function dn({
|
|
|
2547
3151
|
{
|
|
2548
3152
|
className: "absolute inline-block rounded-full transition-transform",
|
|
2549
3153
|
style: {
|
|
2550
|
-
width:
|
|
2551
|
-
height:
|
|
2552
|
-
left:
|
|
3154
|
+
width: d.thumb,
|
|
3155
|
+
height: d.thumb,
|
|
3156
|
+
left: d.padding,
|
|
2553
3157
|
top: "50%",
|
|
2554
3158
|
transform: `translate(${p}px, -50%)`,
|
|
2555
3159
|
background: t ? "var(--primary-fg)" : "var(--text-muted)"
|
|
@@ -2559,11 +3163,11 @@ function dn({
|
|
|
2559
3163
|
}
|
|
2560
3164
|
);
|
|
2561
3165
|
}
|
|
2562
|
-
const
|
|
3166
|
+
const wt = [
|
|
2563
3167
|
".sidebar-scroll",
|
|
2564
3168
|
"[data-overlay-scroll='true']"
|
|
2565
3169
|
].join(",");
|
|
2566
|
-
function
|
|
3170
|
+
function zr(t) {
|
|
2567
3171
|
if (!(t instanceof HTMLElement) || t.dataset.overlayScroll === "false" || t.closest("[data-overlayscrollbars]") || t.matches("textarea,input,select,[contenteditable='true']"))
|
|
2568
3172
|
return !1;
|
|
2569
3173
|
const r = window.getComputedStyle(t);
|
|
@@ -2573,33 +3177,33 @@ function Sr(t) {
|
|
|
2573
3177
|
r.overflowY
|
|
2574
3178
|
].join(" ").match(/auto|scroll/) || t.clientWidth === 0 && t.clientHeight === 0);
|
|
2575
3179
|
}
|
|
2576
|
-
function
|
|
3180
|
+
function It(t) {
|
|
2577
3181
|
return t.classList.contains("sidebar-scroll");
|
|
2578
3182
|
}
|
|
2579
|
-
function
|
|
2580
|
-
|
|
3183
|
+
function Nt(t) {
|
|
3184
|
+
It(t) && t.querySelectorAll(".os-scrollbar-horizontal").forEach((r) => {
|
|
2581
3185
|
r.style.display = "none", r.style.height = "0", r.style.pointerEvents = "none";
|
|
2582
3186
|
});
|
|
2583
3187
|
}
|
|
2584
|
-
function
|
|
2585
|
-
return
|
|
3188
|
+
function Ar() {
|
|
3189
|
+
return O(() => {
|
|
2586
3190
|
const t = /* @__PURE__ */ new WeakMap();
|
|
2587
3191
|
let r = 0;
|
|
2588
3192
|
const n = () => {
|
|
2589
|
-
r = 0, document.querySelectorAll(
|
|
2590
|
-
if (!
|
|
2591
|
-
if (
|
|
2592
|
-
|
|
3193
|
+
r = 0, document.querySelectorAll(wt).forEach((u) => {
|
|
3194
|
+
if (!zr(u)) return;
|
|
3195
|
+
if (ft(u)) {
|
|
3196
|
+
Nt(u);
|
|
2593
3197
|
return;
|
|
2594
3198
|
}
|
|
2595
|
-
const p =
|
|
2596
|
-
overflow:
|
|
3199
|
+
const p = ft(u, {
|
|
3200
|
+
overflow: It(u) ? { x: "hidden", y: "scroll" } : void 0,
|
|
2597
3201
|
scrollbars: {
|
|
2598
3202
|
autoHide: "leave",
|
|
2599
3203
|
autoHideDelay: 180
|
|
2600
3204
|
}
|
|
2601
3205
|
});
|
|
2602
|
-
|
|
3206
|
+
Nt(u), t.set(u, p);
|
|
2603
3207
|
});
|
|
2604
3208
|
}, a = () => {
|
|
2605
3209
|
r || (r = window.requestAnimationFrame(n));
|
|
@@ -2612,100 +3216,194 @@ function Cr() {
|
|
|
2612
3216
|
attributes: !0,
|
|
2613
3217
|
attributeFilter: ["class", "data-overlay-scroll"]
|
|
2614
3218
|
}), window.addEventListener("resize", a), () => {
|
|
2615
|
-
r && window.cancelAnimationFrame(r), l.disconnect(), window.removeEventListener("resize", a), document.querySelectorAll(
|
|
2616
|
-
var
|
|
2617
|
-
u instanceof HTMLElement && ((
|
|
3219
|
+
r && window.cancelAnimationFrame(r), l.disconnect(), window.removeEventListener("resize", a), document.querySelectorAll(wt).forEach((u) => {
|
|
3220
|
+
var d;
|
|
3221
|
+
u instanceof HTMLElement && ((d = t.get(u)) == null || d.destroy());
|
|
2618
3222
|
});
|
|
2619
3223
|
};
|
|
2620
3224
|
}, []), null;
|
|
2621
3225
|
}
|
|
2622
|
-
const
|
|
3226
|
+
const Or = {
|
|
2623
3227
|
xs: { wh: "w-5 h-5", text: "text-[8px]" },
|
|
2624
3228
|
sm: { wh: "w-7 h-7", text: "text-[11px]" },
|
|
2625
3229
|
md: { wh: "w-9 h-9", text: "text-sm" },
|
|
2626
3230
|
lg: { wh: "w-12 h-12", text: "text-base" },
|
|
2627
3231
|
xl: { wh: "w-16 h-16", text: "text-xl" }
|
|
2628
|
-
},
|
|
2629
|
-
"bg-
|
|
2630
|
-
"bg-
|
|
2631
|
-
"bg-
|
|
2632
|
-
"bg-
|
|
2633
|
-
"bg-
|
|
2634
|
-
|
|
2635
|
-
|
|
3232
|
+
}, kt = [
|
|
3233
|
+
"bg-indigo-500",
|
|
3234
|
+
"bg-blue-500",
|
|
3235
|
+
"bg-emerald-500",
|
|
3236
|
+
"bg-violet-500",
|
|
3237
|
+
"bg-amber-500",
|
|
3238
|
+
"bg-teal-500",
|
|
3239
|
+
"bg-rose-500",
|
|
3240
|
+
"bg-cyan-500"
|
|
3241
|
+
], _r = {
|
|
3242
|
+
xs: "text-xs",
|
|
3243
|
+
sm: "text-sm",
|
|
3244
|
+
md: "text-base",
|
|
3245
|
+
lg: "text-lg"
|
|
3246
|
+
}, Hr = "bonsaif.bot", Pr = "Bonsaif Bot", Wr = {
|
|
3247
|
+
xs: "p-0.5",
|
|
3248
|
+
sm: "p-1",
|
|
3249
|
+
md: "p-1.5",
|
|
3250
|
+
lg: "p-2",
|
|
3251
|
+
xl: "p-2.5"
|
|
3252
|
+
};
|
|
3253
|
+
function St(t) {
|
|
2636
3254
|
return typeof t == "string" ? t.trim() : "";
|
|
2637
3255
|
}
|
|
2638
|
-
function
|
|
2639
|
-
|
|
3256
|
+
function jr(t) {
|
|
3257
|
+
let r = 0;
|
|
3258
|
+
for (const n of t) r = r * 31 + n.charCodeAt(0) & 65535;
|
|
3259
|
+
return kt[r % kt.length];
|
|
2640
3260
|
}
|
|
2641
|
-
function
|
|
3261
|
+
function Fr(t, r) {
|
|
3262
|
+
return t === Hr || r === Pr;
|
|
3263
|
+
}
|
|
3264
|
+
function Ur({
|
|
2642
3265
|
userId: t,
|
|
2643
3266
|
username: r,
|
|
2644
3267
|
name: n,
|
|
2645
3268
|
size: a = "md",
|
|
2646
|
-
|
|
2647
|
-
|
|
3269
|
+
showName: l = !1,
|
|
3270
|
+
showTooltip: u,
|
|
3271
|
+
tooltipContent: d,
|
|
3272
|
+
fallbackLabel: p = "Usuario",
|
|
3273
|
+
wrapperClassName: m = "",
|
|
3274
|
+
labelClassName: h = "",
|
|
3275
|
+
labelSize: w = "xs",
|
|
3276
|
+
avatarVersion: N = 0,
|
|
3277
|
+
className: g = "",
|
|
3278
|
+
style: f
|
|
2648
3279
|
}) {
|
|
2649
|
-
|
|
2650
|
-
|
|
3280
|
+
var _;
|
|
3281
|
+
const [v, c] = B(!1), $ = typeof t == "string" && t.trim() && t !== "undefined" && t !== "null" ? t.trim() : "";
|
|
3282
|
+
O(() => {
|
|
3283
|
+
c(!1);
|
|
3284
|
+
}, [$, N]);
|
|
3285
|
+
const { wh: D, text: K } = Or[a], W = St(n) || St(r) || p, E = W.trim()[0] || "?", T = typeof process < "u" && ((_ = process.env) == null ? void 0 : _.NEXT_PUBLIC_BASE_PATH) || "", I = Fr(r, n), L = $ ? `${T}/api/user/avatar/${$}${N ? `?v=${N}` : ""}` : "", M = {
|
|
3286
|
+
xs: 20,
|
|
3287
|
+
sm: 28,
|
|
3288
|
+
md: 36,
|
|
3289
|
+
lg: 48,
|
|
3290
|
+
xl: 64
|
|
3291
|
+
}[a], S = I ? /* @__PURE__ */ e(
|
|
2651
3292
|
"span",
|
|
2652
3293
|
{
|
|
2653
|
-
className: `${
|
|
2654
|
-
style:
|
|
2655
|
-
children:
|
|
3294
|
+
className: `${D} ${Wr[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 ${g}`,
|
|
3295
|
+
style: f,
|
|
3296
|
+
children: /* @__PURE__ */ e(
|
|
3297
|
+
"img",
|
|
3298
|
+
{
|
|
3299
|
+
src: `${T}/favicon.svg`,
|
|
3300
|
+
alt: W,
|
|
3301
|
+
width: M,
|
|
3302
|
+
height: M,
|
|
3303
|
+
className: "h-full w-full object-contain"
|
|
3304
|
+
}
|
|
3305
|
+
)
|
|
3306
|
+
}
|
|
3307
|
+
) : L && !v ? /* @__PURE__ */ e(
|
|
3308
|
+
"img",
|
|
3309
|
+
{
|
|
3310
|
+
src: L,
|
|
3311
|
+
alt: W,
|
|
3312
|
+
width: M,
|
|
3313
|
+
height: M,
|
|
3314
|
+
className: `${D} rounded-full object-cover flex-shrink-0 ${g}`,
|
|
3315
|
+
style: f,
|
|
3316
|
+
onError: () => c(!0)
|
|
3317
|
+
},
|
|
3318
|
+
`${$}-${N}`
|
|
3319
|
+
) : /* @__PURE__ */ e(
|
|
3320
|
+
"span",
|
|
3321
|
+
{
|
|
3322
|
+
className: `${D} ${jr(W)} ${K} rounded-full flex items-center justify-center font-black text-white uppercase flex-shrink-0 ${g}`,
|
|
3323
|
+
style: f,
|
|
3324
|
+
title: W,
|
|
3325
|
+
children: E
|
|
2656
3326
|
}
|
|
2657
3327
|
);
|
|
3328
|
+
if (l)
|
|
3329
|
+
return /* @__PURE__ */ i(
|
|
3330
|
+
"span",
|
|
3331
|
+
{
|
|
3332
|
+
className: `inline-flex min-w-0 items-center gap-2 ${m}`,
|
|
3333
|
+
children: [
|
|
3334
|
+
S,
|
|
3335
|
+
/* @__PURE__ */ e(
|
|
3336
|
+
"span",
|
|
3337
|
+
{
|
|
3338
|
+
className: `min-w-0 truncate ${_r[w]} font-medium text-[var(--text-main)] ${h}`,
|
|
3339
|
+
title: W,
|
|
3340
|
+
children: W
|
|
3341
|
+
}
|
|
3342
|
+
)
|
|
3343
|
+
]
|
|
3344
|
+
}
|
|
3345
|
+
);
|
|
3346
|
+
const P = u ?? !0, J = d ?? W;
|
|
3347
|
+
return P && J ? /* @__PURE__ */ e(
|
|
3348
|
+
Dt,
|
|
3349
|
+
{
|
|
3350
|
+
as: "span",
|
|
3351
|
+
content: J,
|
|
3352
|
+
className: `inline-flex flex-shrink-0 ${m}`,
|
|
3353
|
+
children: S
|
|
3354
|
+
}
|
|
3355
|
+
) : S;
|
|
2658
3356
|
}
|
|
2659
|
-
function
|
|
3357
|
+
function qr({ href: t, className: r, children: n }) {
|
|
2660
3358
|
return /* @__PURE__ */ e("a", { href: t, className: r, children: n });
|
|
2661
3359
|
}
|
|
2662
|
-
function
|
|
3360
|
+
function Yr(t) {
|
|
2663
3361
|
return t.reduce((r, n) => {
|
|
2664
3362
|
const a = n.section ?? "Principal";
|
|
2665
3363
|
return r[a] = [...r[a] ?? [], n], r;
|
|
2666
3364
|
}, {});
|
|
2667
3365
|
}
|
|
2668
|
-
function
|
|
3366
|
+
function Gr({
|
|
2669
3367
|
children: t,
|
|
2670
3368
|
navItems: r = [],
|
|
2671
3369
|
currentPath: n = typeof window > "u" ? "/" : window.location.pathname,
|
|
2672
3370
|
user: a,
|
|
2673
3371
|
appName: l = "Bonsaif",
|
|
2674
3372
|
appLogo: u,
|
|
2675
|
-
header:
|
|
3373
|
+
header: d,
|
|
2676
3374
|
footer: p,
|
|
2677
|
-
onLogout:
|
|
2678
|
-
LinkComponent:
|
|
3375
|
+
onLogout: m,
|
|
3376
|
+
LinkComponent: h = qr
|
|
2679
3377
|
}) {
|
|
2680
|
-
const [
|
|
2681
|
-
return /* @__PURE__ */
|
|
2682
|
-
/* @__PURE__ */ e(
|
|
3378
|
+
const [w, N] = B(!1), g = Yr(r);
|
|
3379
|
+
return /* @__PURE__ */ i("div", { className: "min-h-screen bg-[var(--bg-main)] text-[var(--text-main)]", children: [
|
|
3380
|
+
/* @__PURE__ */ e(Ar, {}),
|
|
2683
3381
|
/* @__PURE__ */ e(
|
|
2684
3382
|
"button",
|
|
2685
3383
|
{
|
|
2686
3384
|
type: "button",
|
|
2687
3385
|
"aria-label": "Abrir navegación",
|
|
2688
3386
|
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",
|
|
2689
|
-
onClick: () =>
|
|
2690
|
-
children: /* @__PURE__ */ e(
|
|
3387
|
+
onClick: () => N(!0),
|
|
3388
|
+
children: /* @__PURE__ */ e(Gt, { className: "h-5 w-5" })
|
|
2691
3389
|
}
|
|
2692
3390
|
),
|
|
2693
|
-
|
|
3391
|
+
w && /* @__PURE__ */ e(
|
|
2694
3392
|
"button",
|
|
2695
3393
|
{
|
|
2696
3394
|
type: "button",
|
|
2697
3395
|
"aria-label": "Cerrar navegación",
|
|
2698
3396
|
className: "fixed inset-0 z-40 bg-black/45 lg:hidden",
|
|
2699
|
-
onClick: () =>
|
|
3397
|
+
onClick: () => N(!1)
|
|
2700
3398
|
}
|
|
2701
3399
|
),
|
|
2702
|
-
/* @__PURE__ */
|
|
3400
|
+
/* @__PURE__ */ i(
|
|
2703
3401
|
"aside",
|
|
2704
3402
|
{
|
|
2705
|
-
className: `fixed inset-y-0 left-0 z-50 flex w-72 flex-col bg-[#071716] text-white shadow-2xl transition-transform duration-200 lg:translate-x-0 ${
|
|
3403
|
+
className: `fixed inset-y-0 left-0 z-50 flex w-72 flex-col bg-[#071716] text-white shadow-2xl transition-transform duration-200 lg:translate-x-0 ${w ? "translate-x-0" : "-translate-x-full"}`,
|
|
2706
3404
|
children: [
|
|
2707
|
-
/* @__PURE__ */
|
|
2708
|
-
/* @__PURE__ */ e("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-white/10 text-white", children: u ?? /* @__PURE__ */ e(
|
|
3405
|
+
/* @__PURE__ */ i("div", { className: "flex h-16 items-center gap-3 border-b border-white/10 px-4", children: [
|
|
3406
|
+
/* @__PURE__ */ e("div", { className: "flex h-9 w-9 items-center justify-center rounded-lg bg-white/10 text-white", children: u ?? /* @__PURE__ */ e(qe, { className: "h-5 w-5" }) }),
|
|
2709
3407
|
/* @__PURE__ */ e("div", { className: "min-w-0 flex-1 truncate text-sm font-semibold", children: l }),
|
|
2710
3408
|
/* @__PURE__ */ e(
|
|
2711
3409
|
"button",
|
|
@@ -2713,8 +3411,8 @@ function Br({
|
|
|
2713
3411
|
type: "button",
|
|
2714
3412
|
"aria-label": "Cerrar navegación",
|
|
2715
3413
|
className: "inline-flex h-8 w-8 items-center justify-center rounded-md text-white/70 hover:bg-white/10 lg:hidden",
|
|
2716
|
-
onClick: () =>
|
|
2717
|
-
children: /* @__PURE__ */ e(
|
|
3414
|
+
onClick: () => N(!1),
|
|
3415
|
+
children: /* @__PURE__ */ e(Se, { className: "h-5 w-5" })
|
|
2718
3416
|
}
|
|
2719
3417
|
)
|
|
2720
3418
|
] }),
|
|
@@ -2723,51 +3421,51 @@ function Br({
|
|
|
2723
3421
|
{
|
|
2724
3422
|
className: "sidebar-scroll min-h-0 flex-1 overflow-y-auto px-3 py-4",
|
|
2725
3423
|
"data-overlay-scroll": "true",
|
|
2726
|
-
children: Object.entries(
|
|
2727
|
-
/* @__PURE__ */
|
|
2728
|
-
/* @__PURE__ */ e(
|
|
3424
|
+
children: Object.entries(g).map(([f, v]) => /* @__PURE__ */ i("div", { className: "mb-5", children: [
|
|
3425
|
+
/* @__PURE__ */ i("div", { className: "mb-2 flex items-center gap-2 px-2 text-[11px] font-semibold uppercase tracking-wide text-white/35", children: [
|
|
3426
|
+
/* @__PURE__ */ e(He, { className: "h-3.5 w-3.5" }),
|
|
2729
3427
|
f
|
|
2730
3428
|
] }),
|
|
2731
|
-
/* @__PURE__ */ e("div", { className: "space-y-1", children:
|
|
2732
|
-
const
|
|
2733
|
-
return /* @__PURE__ */
|
|
2734
|
-
|
|
3429
|
+
/* @__PURE__ */ e("div", { className: "space-y-1", children: v.map((c) => {
|
|
3430
|
+
const $ = n === c.href || n.startsWith(`${c.href}/`);
|
|
3431
|
+
return /* @__PURE__ */ i(
|
|
3432
|
+
h,
|
|
2735
3433
|
{
|
|
2736
|
-
href:
|
|
2737
|
-
className: `flex min-w-0 items-center gap-2 rounded-md px-2 py-2 text-sm transition-colors ${
|
|
3434
|
+
href: c.href,
|
|
3435
|
+
className: `flex min-w-0 items-center gap-2 rounded-md px-2 py-2 text-sm transition-colors ${$ ? "bg-white/10 text-white" : "text-white/55 hover:bg-white/[0.06] hover:text-white/85"}`,
|
|
2738
3436
|
children: [
|
|
2739
|
-
/* @__PURE__ */ e("span", { className: "flex h-5 w-5 flex-shrink-0 items-center justify-center", children:
|
|
2740
|
-
/* @__PURE__ */ e("span", { className: "truncate", children:
|
|
3437
|
+
/* @__PURE__ */ e("span", { className: "flex h-5 w-5 flex-shrink-0 items-center justify-center", children: c.icon ?? /* @__PURE__ */ e(qe, { className: "h-4 w-4" }) }),
|
|
3438
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: c.label })
|
|
2741
3439
|
]
|
|
2742
3440
|
},
|
|
2743
|
-
|
|
3441
|
+
c.href
|
|
2744
3442
|
);
|
|
2745
3443
|
}) })
|
|
2746
3444
|
] }, f))
|
|
2747
3445
|
}
|
|
2748
3446
|
),
|
|
2749
|
-
/* @__PURE__ */
|
|
2750
|
-
a && /* @__PURE__ */
|
|
3447
|
+
/* @__PURE__ */ i("div", { className: "border-t border-white/10 p-3", children: [
|
|
3448
|
+
a && /* @__PURE__ */ i("div", { className: "mb-3 flex min-w-0 items-center gap-3 rounded-lg bg-white/[0.04] p-2", children: [
|
|
2751
3449
|
/* @__PURE__ */ e(
|
|
2752
|
-
|
|
3450
|
+
Ur,
|
|
2753
3451
|
{
|
|
2754
3452
|
name: a.initials ?? a.name ?? a.email ?? "Usuario",
|
|
2755
3453
|
size: "md"
|
|
2756
3454
|
}
|
|
2757
3455
|
),
|
|
2758
|
-
/* @__PURE__ */
|
|
3456
|
+
/* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
|
|
2759
3457
|
/* @__PURE__ */ e("div", { className: "truncate text-sm font-medium text-white", children: a.name ?? "Usuario" }),
|
|
2760
3458
|
a.email && /* @__PURE__ */ e("div", { className: "truncate text-xs text-white/45", children: a.email })
|
|
2761
3459
|
] })
|
|
2762
3460
|
] }),
|
|
2763
|
-
|
|
2764
|
-
|
|
3461
|
+
m && /* @__PURE__ */ i(
|
|
3462
|
+
he,
|
|
2765
3463
|
{
|
|
2766
3464
|
variant: "ghost",
|
|
2767
3465
|
className: "w-full justify-start text-white hover:bg-white/10",
|
|
2768
|
-
onClick:
|
|
3466
|
+
onClick: m,
|
|
2769
3467
|
children: [
|
|
2770
|
-
/* @__PURE__ */ e(
|
|
3468
|
+
/* @__PURE__ */ e(Xt, { className: "h-4 w-4" }),
|
|
2771
3469
|
" Salir"
|
|
2772
3470
|
]
|
|
2773
3471
|
}
|
|
@@ -2777,13 +3475,13 @@ function Br({
|
|
|
2777
3475
|
]
|
|
2778
3476
|
}
|
|
2779
3477
|
),
|
|
2780
|
-
/* @__PURE__ */
|
|
2781
|
-
|
|
3478
|
+
/* @__PURE__ */ i("div", { className: "min-h-screen lg:pl-72", children: [
|
|
3479
|
+
d,
|
|
2782
3480
|
/* @__PURE__ */ e("main", { className: "min-h-screen", children: t })
|
|
2783
3481
|
] })
|
|
2784
3482
|
] });
|
|
2785
3483
|
}
|
|
2786
|
-
const
|
|
3484
|
+
const Xr = {
|
|
2787
3485
|
dashboard: "Dashboard",
|
|
2788
3486
|
tickets: "Tickets",
|
|
2789
3487
|
teams: "Equipos",
|
|
@@ -2806,30 +3504,30 @@ const Rr = {
|
|
|
2806
3504
|
"email-inbox": "Buzones",
|
|
2807
3505
|
"security-incidents": "Incidentes",
|
|
2808
3506
|
"guard-schedule": "Guardias"
|
|
2809
|
-
},
|
|
2810
|
-
dashboard: /* @__PURE__ */ e(
|
|
2811
|
-
tickets: /* @__PURE__ */ e(
|
|
2812
|
-
teams: /* @__PURE__ */ e(
|
|
2813
|
-
projects: /* @__PURE__ */ e(
|
|
2814
|
-
clients: /* @__PURE__ */ e(
|
|
2815
|
-
surveys: /* @__PURE__ */ e(
|
|
2816
|
-
profile: /* @__PURE__ */ e(
|
|
2817
|
-
settings: /* @__PURE__ */ e(
|
|
2818
|
-
notifications: /* @__PURE__ */ e(
|
|
2819
|
-
changelog: /* @__PURE__ */ e(
|
|
2820
|
-
admin: /* @__PURE__ */ e(
|
|
2821
|
-
users: /* @__PURE__ */ e(
|
|
2822
|
-
roles: /* @__PURE__ */ e(
|
|
2823
|
-
menus: /* @__PURE__ */ e(
|
|
2824
|
-
guards: /* @__PURE__ */ e(
|
|
2825
|
-
vacations: /* @__PURE__ */ e(
|
|
2826
|
-
audit: /* @__PURE__ */ e(
|
|
2827
|
-
positions: /* @__PURE__ */ e(
|
|
2828
|
-
ranks: /* @__PURE__ */ e(
|
|
2829
|
-
"email-inbox": /* @__PURE__ */ e(
|
|
2830
|
-
"security-incidents": /* @__PURE__ */ e(
|
|
3507
|
+
}, Ze = {
|
|
3508
|
+
dashboard: /* @__PURE__ */ e(ar, { className: "h-5 w-5" }),
|
|
3509
|
+
tickets: /* @__PURE__ */ e(nr, { className: "h-5 w-5" }),
|
|
3510
|
+
teams: /* @__PURE__ */ e(mt, { className: "h-5 w-5" }),
|
|
3511
|
+
projects: /* @__PURE__ */ e(rr, { className: "h-5 w-5" }),
|
|
3512
|
+
clients: /* @__PURE__ */ e(tr, { className: "h-5 w-5" }),
|
|
3513
|
+
surveys: /* @__PURE__ */ e(er, { className: "h-5 w-5" }),
|
|
3514
|
+
profile: /* @__PURE__ */ e(Qt, { className: "h-5 w-5" }),
|
|
3515
|
+
settings: /* @__PURE__ */ e(ut, { className: "h-5 w-5" }),
|
|
3516
|
+
notifications: /* @__PURE__ */ e(Zt, { className: "h-5 w-5" }),
|
|
3517
|
+
changelog: /* @__PURE__ */ e(Kt, { className: "h-5 w-5" }),
|
|
3518
|
+
admin: /* @__PURE__ */ e(Ve, { className: "h-5 w-5" }),
|
|
3519
|
+
users: /* @__PURE__ */ e(mt, { className: "h-5 w-5" }),
|
|
3520
|
+
roles: /* @__PURE__ */ e(Ve, { className: "h-5 w-5" }),
|
|
3521
|
+
menus: /* @__PURE__ */ e(ut, { className: "h-5 w-5" }),
|
|
3522
|
+
guards: /* @__PURE__ */ e(tt, { className: "h-5 w-5" }),
|
|
3523
|
+
vacations: /* @__PURE__ */ e(tt, { className: "h-5 w-5" }),
|
|
3524
|
+
audit: /* @__PURE__ */ e(dt, { className: "h-5 w-5" }),
|
|
3525
|
+
positions: /* @__PURE__ */ e(Vt, { className: "h-5 w-5" }),
|
|
3526
|
+
ranks: /* @__PURE__ */ e(dt, { className: "h-5 w-5" }),
|
|
3527
|
+
"email-inbox": /* @__PURE__ */ e(Jt, { className: "h-5 w-5" }),
|
|
3528
|
+
"security-incidents": /* @__PURE__ */ e(Ve, { className: "h-5 w-5" })
|
|
2831
3529
|
};
|
|
2832
|
-
function
|
|
3530
|
+
function Jr({
|
|
2833
3531
|
href: t,
|
|
2834
3532
|
className: r,
|
|
2835
3533
|
style: n,
|
|
@@ -2837,127 +3535,127 @@ function Dr({
|
|
|
2837
3535
|
}) {
|
|
2838
3536
|
return /* @__PURE__ */ e("a", { href: t, className: r, style: n, children: a });
|
|
2839
3537
|
}
|
|
2840
|
-
function
|
|
3538
|
+
function Vr(t) {
|
|
2841
3539
|
return t.split("-").map((r) => r.charAt(0).toUpperCase() + r.slice(1)).join(" ");
|
|
2842
3540
|
}
|
|
2843
|
-
function
|
|
3541
|
+
function Kr(t) {
|
|
2844
3542
|
return /^\d+$/.test(t) || /^[a-f0-9]{8,}$/i.test(t);
|
|
2845
3543
|
}
|
|
2846
|
-
function
|
|
3544
|
+
function Zr(t) {
|
|
2847
3545
|
const r = t.split("/").filter(Boolean);
|
|
2848
3546
|
if (r.length === 0 || r.length === 1 && r[0] === "dashboard")
|
|
2849
3547
|
return [];
|
|
2850
|
-
const n = decodeURIComponent(r[r.length - 1]), a = r.length > 1 ? decodeURIComponent(r[r.length - 2]) : void 0, l =
|
|
3548
|
+
const n = decodeURIComponent(r[r.length - 1]), a = r.length > 1 ? decodeURIComponent(r[r.length - 2]) : void 0, l = Kr(n) && a ? a : n, u = Xr[l] ?? Vr(l);
|
|
2851
3549
|
return [{ label: "Inicio", href: "/" }, { label: u }];
|
|
2852
3550
|
}
|
|
2853
|
-
function
|
|
3551
|
+
function Qe(t) {
|
|
2854
3552
|
return (t == null ? void 0 : t.querySelector(":scope > .os-viewport")) ?? (t == null ? void 0 : t.querySelector(
|
|
2855
3553
|
":scope > [data-overlayscrollbars-viewport]"
|
|
2856
3554
|
));
|
|
2857
3555
|
}
|
|
2858
|
-
function
|
|
3556
|
+
function Qr(t) {
|
|
2859
3557
|
const r = t.split("/").filter(Boolean), n = r[r.length - 1];
|
|
2860
|
-
if (!n) return /* @__PURE__ */ e(
|
|
2861
|
-
if (
|
|
3558
|
+
if (!n) return /* @__PURE__ */ e(qe, { className: "h-5 w-5" });
|
|
3559
|
+
if (Ze[n]) return Ze[n];
|
|
2862
3560
|
const a = r.length > 1 ? r[r.length - 2] : "";
|
|
2863
|
-
return
|
|
3561
|
+
return Ze[a] ?? /* @__PURE__ */ e(qe, { className: "h-5 w-5" });
|
|
2864
3562
|
}
|
|
2865
|
-
function
|
|
3563
|
+
function Mn({
|
|
2866
3564
|
title: t,
|
|
2867
3565
|
subtitle: r,
|
|
2868
3566
|
action: n,
|
|
2869
3567
|
meta: a,
|
|
2870
3568
|
icon: l,
|
|
2871
3569
|
className: u = "",
|
|
2872
|
-
contentClassName:
|
|
3570
|
+
contentClassName: d = "",
|
|
2873
3571
|
breadcrumbs: p,
|
|
2874
|
-
currentPath:
|
|
2875
|
-
showBreadcrumbs:
|
|
2876
|
-
contained:
|
|
2877
|
-
LinkComponent:
|
|
3572
|
+
currentPath: m = typeof window > "u" ? "/" : window.location.pathname,
|
|
3573
|
+
showBreadcrumbs: h = !0,
|
|
3574
|
+
contained: w = !1,
|
|
3575
|
+
LinkComponent: N = Jr
|
|
2878
3576
|
}) {
|
|
2879
|
-
const
|
|
2880
|
-
return
|
|
2881
|
-
if (
|
|
2882
|
-
|
|
3577
|
+
const g = ie(null), [f, v] = B(!1), [c, $] = B(null), D = p ?? Zr(m), K = l ?? Qr(m), W = h && D.length > 1;
|
|
3578
|
+
return O(() => {
|
|
3579
|
+
if (w) {
|
|
3580
|
+
v(!1);
|
|
2883
3581
|
return;
|
|
2884
3582
|
}
|
|
2885
|
-
let
|
|
2886
|
-
const
|
|
2887
|
-
const
|
|
3583
|
+
let E = null, T = 0, I = 0;
|
|
3584
|
+
const L = () => {
|
|
3585
|
+
const S = g.current, P = document.querySelector(
|
|
2888
3586
|
"[data-app-scroll='true']"
|
|
2889
3587
|
);
|
|
2890
|
-
return (
|
|
3588
|
+
return (S == null ? void 0 : S.closest(".os-viewport")) ?? (S == null ? void 0 : S.closest(
|
|
2891
3589
|
"[data-overlayscrollbars-viewport]"
|
|
2892
|
-
)) ??
|
|
2893
|
-
},
|
|
2894
|
-
const
|
|
2895
|
-
|
|
2896
|
-
},
|
|
2897
|
-
|
|
3590
|
+
)) ?? Qe(P) ?? P ?? window;
|
|
3591
|
+
}, F = () => {
|
|
3592
|
+
const S = E && E !== window ? E.scrollTop : window.scrollY;
|
|
3593
|
+
v((P) => P ? S > 24 : S > 72);
|
|
3594
|
+
}, M = () => {
|
|
3595
|
+
E == null || E.removeEventListener("scroll", F), E = L(), E.addEventListener("scroll", F, { passive: !0 }), F();
|
|
2898
3596
|
};
|
|
2899
|
-
return
|
|
2900
|
-
window.cancelAnimationFrame(
|
|
3597
|
+
return M(), T = window.requestAnimationFrame(M), I = window.setTimeout(M, 120), () => {
|
|
3598
|
+
window.cancelAnimationFrame(T), window.clearTimeout(I), E == null || E.removeEventListener("scroll", F);
|
|
2901
3599
|
};
|
|
2902
|
-
}, [
|
|
2903
|
-
if (
|
|
2904
|
-
|
|
3600
|
+
}, [w]), O(() => {
|
|
3601
|
+
if (w) {
|
|
3602
|
+
$(null);
|
|
2905
3603
|
return;
|
|
2906
3604
|
}
|
|
2907
|
-
let
|
|
2908
|
-
const
|
|
2909
|
-
const
|
|
3605
|
+
let E = 0;
|
|
3606
|
+
const T = [], I = () => {
|
|
3607
|
+
const _ = g.current, j = _ == null ? void 0 : _.parentElement, U = document.querySelector(
|
|
2910
3608
|
"[data-app-scroll='true']"
|
|
2911
|
-
),
|
|
2912
|
-
if (!
|
|
2913
|
-
|
|
3609
|
+
), Z = Qe(U) ?? U;
|
|
3610
|
+
if (!_ || !j || !Z) {
|
|
3611
|
+
$(null);
|
|
2914
3612
|
return;
|
|
2915
3613
|
}
|
|
2916
|
-
const o =
|
|
2917
|
-
marginLeft: Math.round(
|
|
2918
|
-
width: Math.round(
|
|
3614
|
+
const o = j.getBoundingClientRect(), y = window.getComputedStyle(j), H = Z.getBoundingClientRect(), q = Z instanceof HTMLElement && Z.clientWidth > 0 ? Z.clientWidth : H.width, G = o.left + parseFloat(y.paddingLeft || "0"), ee = {
|
|
3615
|
+
marginLeft: Math.round(H.left - G),
|
|
3616
|
+
width: Math.round(q)
|
|
2919
3617
|
};
|
|
2920
|
-
|
|
2921
|
-
(
|
|
3618
|
+
$(
|
|
3619
|
+
(me) => me && me.marginLeft === ee.marginLeft && me.width === ee.width ? me : ee
|
|
2922
3620
|
);
|
|
2923
|
-
},
|
|
2924
|
-
window.cancelAnimationFrame(
|
|
3621
|
+
}, L = () => {
|
|
3622
|
+
window.cancelAnimationFrame(E), E = window.requestAnimationFrame(I);
|
|
2925
3623
|
};
|
|
2926
|
-
|
|
2927
|
-
const
|
|
3624
|
+
L(), window.addEventListener("resize", L);
|
|
3625
|
+
const F = new ResizeObserver(L), M = g.current, S = M == null ? void 0 : M.parentElement, P = document.querySelector(
|
|
2928
3626
|
"[data-app-scroll='true']"
|
|
2929
|
-
),
|
|
2930
|
-
return [
|
|
2931
|
-
|
|
2932
|
-
}),
|
|
2933
|
-
window.cancelAnimationFrame(
|
|
3627
|
+
), J = Qe(P) ?? P;
|
|
3628
|
+
return [S, P, J].forEach((_) => {
|
|
3629
|
+
_ && F.observe(_);
|
|
3630
|
+
}), T.push(window.setTimeout(L, 120)), T.push(window.setTimeout(L, 280)), () => {
|
|
3631
|
+
window.cancelAnimationFrame(E), window.removeEventListener("resize", L), F.disconnect(), T.forEach((_) => window.clearTimeout(_));
|
|
2934
3632
|
};
|
|
2935
|
-
}, [
|
|
3633
|
+
}, [w]), /* @__PURE__ */ e(
|
|
2936
3634
|
"div",
|
|
2937
3635
|
{
|
|
2938
|
-
ref:
|
|
3636
|
+
ref: g,
|
|
2939
3637
|
"data-page-header": "true",
|
|
2940
3638
|
"data-compact": f ? "true" : "false",
|
|
2941
|
-
className: `sticky top-0 z-30 overflow-visible py-0 transition-[background-color,box-shadow,border-color] duration-300 ease-out ${
|
|
3639
|
+
className: `sticky top-0 z-30 overflow-visible py-0 transition-[background-color,box-shadow,border-color] duration-300 ease-out ${w ? "mb-0 flex-shrink-0" : "mb-6 sm:mb-1"} ${u}`,
|
|
2942
3640
|
style: {
|
|
2943
|
-
...
|
|
2944
|
-
background:
|
|
3641
|
+
...c ? { marginLeft: c.marginLeft, width: c.width } : null,
|
|
3642
|
+
background: w ? "var(--bg-card)" : f ? "var(--bg-main)" : "color-mix(in srgb, var(--bg-main) 44%, transparent)",
|
|
2945
3643
|
backdropFilter: "saturate(1.2) blur(14px)",
|
|
2946
3644
|
WebkitBackdropFilter: "saturate(1.2) blur(14px)",
|
|
2947
|
-
borderBottom:
|
|
3645
|
+
borderBottom: w || f ? "1px solid var(--border)" : "1px solid transparent",
|
|
2948
3646
|
boxShadow: f ? "0 10px 28px rgba(12, 54, 53, 0.12)" : "none"
|
|
2949
3647
|
},
|
|
2950
|
-
children: /* @__PURE__ */
|
|
3648
|
+
children: /* @__PURE__ */ i(
|
|
2951
3649
|
"div",
|
|
2952
3650
|
{
|
|
2953
|
-
className: `flex flex-wrap items-center justify-between px-4 pt-0.5 transition-[gap,min-height,padding] duration-300 ease-out ${f ? "min-h-10 gap-2 sm:min-h-11 sm:gap-3" : "min-h-11 gap-3 sm:min-h-12 sm:gap-4"} ${
|
|
3651
|
+
className: `flex flex-wrap items-center justify-between px-4 pt-0.5 transition-[gap,min-height,padding] duration-300 ease-out ${f ? "min-h-10 gap-2 sm:min-h-11 sm:gap-3" : "min-h-11 gap-3 sm:min-h-12 sm:gap-4"} ${d}`,
|
|
2954
3652
|
children: [
|
|
2955
|
-
/* @__PURE__ */
|
|
3653
|
+
/* @__PURE__ */ i(
|
|
2956
3654
|
"div",
|
|
2957
3655
|
{
|
|
2958
3656
|
className: `min-w-0 flex flex-1 flex-col justify-center transition-[gap,transform] duration-300 ease-out ${f ? "gap-1" : "gap-1.5 sm:gap-2"}`,
|
|
2959
3657
|
children: [
|
|
2960
|
-
|
|
3658
|
+
W && /* @__PURE__ */ e(
|
|
2961
3659
|
"nav",
|
|
2962
3660
|
{
|
|
2963
3661
|
"aria-label": "Breadcrumb",
|
|
@@ -2966,49 +3664,49 @@ function un({
|
|
|
2966
3664
|
"ol",
|
|
2967
3665
|
{
|
|
2968
3666
|
className: `flex flex-wrap items-center gap-1.5 leading-none transition-[font-size,line-height] duration-300 ease-out ${f ? "text-[10px] sm:text-[11px]" : "text-[11px] sm:text-xs"}`,
|
|
2969
|
-
children:
|
|
2970
|
-
const
|
|
2971
|
-
return /* @__PURE__ */
|
|
3667
|
+
children: D.map((E, T) => {
|
|
3668
|
+
const I = T === D.length - 1;
|
|
3669
|
+
return /* @__PURE__ */ i(
|
|
2972
3670
|
"li",
|
|
2973
3671
|
{
|
|
2974
3672
|
className: "flex min-w-0 items-center gap-1.5",
|
|
2975
3673
|
children: [
|
|
2976
|
-
|
|
2977
|
-
|
|
3674
|
+
T > 0 && /* @__PURE__ */ e(
|
|
3675
|
+
Te,
|
|
2978
3676
|
{
|
|
2979
3677
|
className: "h-3.5 w-3.5 transition-[color,transform] duration-300 ease-out",
|
|
2980
3678
|
style: { color: "var(--text-muted)" }
|
|
2981
3679
|
}
|
|
2982
3680
|
),
|
|
2983
|
-
|
|
2984
|
-
|
|
3681
|
+
E.href && !I ? /* @__PURE__ */ e(
|
|
3682
|
+
N,
|
|
2985
3683
|
{
|
|
2986
|
-
href:
|
|
3684
|
+
href: E.href,
|
|
2987
3685
|
className: "truncate transition-colors duration-300 hover:underline",
|
|
2988
3686
|
style: { color: "var(--text-muted)" },
|
|
2989
|
-
children:
|
|
3687
|
+
children: E.label
|
|
2990
3688
|
}
|
|
2991
3689
|
) : /* @__PURE__ */ e(
|
|
2992
3690
|
"span",
|
|
2993
3691
|
{
|
|
2994
|
-
"aria-current":
|
|
2995
|
-
className:
|
|
3692
|
+
"aria-current": I ? "page" : void 0,
|
|
3693
|
+
className: I ? "truncate font-semibold" : "truncate",
|
|
2996
3694
|
style: {
|
|
2997
|
-
color:
|
|
3695
|
+
color: I ? "var(--text-main)" : "var(--text-muted)"
|
|
2998
3696
|
},
|
|
2999
|
-
children:
|
|
3697
|
+
children: E.label
|
|
3000
3698
|
}
|
|
3001
3699
|
)
|
|
3002
3700
|
]
|
|
3003
3701
|
},
|
|
3004
|
-
`${
|
|
3702
|
+
`${E.label}-${T}`
|
|
3005
3703
|
);
|
|
3006
3704
|
})
|
|
3007
3705
|
}
|
|
3008
3706
|
)
|
|
3009
3707
|
}
|
|
3010
3708
|
),
|
|
3011
|
-
/* @__PURE__ */
|
|
3709
|
+
/* @__PURE__ */ i(
|
|
3012
3710
|
"div",
|
|
3013
3711
|
{
|
|
3014
3712
|
className: `flex min-w-0 items-center transition-[gap,transform] duration-300 ease-out ${f ? "gap-2" : "gap-2.5 sm:gap-3"}`,
|
|
@@ -3018,17 +3716,17 @@ function un({
|
|
|
3018
3716
|
{
|
|
3019
3717
|
className: `flex-shrink-0 transition-[color,transform,opacity] duration-300 ease-out ${f ? "scale-90 opacity-80" : "scale-100 opacity-100"}`,
|
|
3020
3718
|
style: {
|
|
3021
|
-
color:
|
|
3719
|
+
color: W ? "var(--text-secondary)" : "var(--text-muted)"
|
|
3022
3720
|
},
|
|
3023
|
-
children:
|
|
3721
|
+
children: K
|
|
3024
3722
|
}
|
|
3025
3723
|
),
|
|
3026
|
-
/* @__PURE__ */
|
|
3724
|
+
/* @__PURE__ */ i(
|
|
3027
3725
|
"div",
|
|
3028
3726
|
{
|
|
3029
3727
|
className: `flex min-w-0 flex-1 flex-wrap items-center transition-[gap] duration-300 ease-out ${f ? "gap-x-2 gap-y-1" : "gap-x-3 gap-y-2"}`,
|
|
3030
3728
|
children: [
|
|
3031
|
-
/* @__PURE__ */
|
|
3729
|
+
/* @__PURE__ */ i("div", { className: "min-w-0 flex-shrink transition-[transform] duration-300 ease-out", children: [
|
|
3032
3730
|
/* @__PURE__ */ e(
|
|
3033
3731
|
"h1",
|
|
3034
3732
|
{
|
|
@@ -3076,83 +3774,20 @@ function un({
|
|
|
3076
3774
|
}
|
|
3077
3775
|
);
|
|
3078
3776
|
}
|
|
3079
|
-
function
|
|
3080
|
-
value: t,
|
|
3081
|
-
onChange: r,
|
|
3082
|
-
placeholder: n,
|
|
3083
|
-
className: a = ""
|
|
3084
|
-
}) {
|
|
3085
|
-
const l = J(null), [u, m] = E(!1), p = u || t.trim().length > 0, c = () => {
|
|
3086
|
-
var d;
|
|
3087
|
-
m(!0), (d = l.current) == null || d.focus();
|
|
3088
|
-
};
|
|
3089
|
-
return /* @__PURE__ */ s(
|
|
3090
|
-
"div",
|
|
3091
|
-
{
|
|
3092
|
-
className: `relative flex-shrink-0 overflow-visible transition-[width] duration-200 ease-out ${p ? a || "w-full" : "w-28"}`,
|
|
3093
|
-
onMouseDown: (d) => {
|
|
3094
|
-
p || (d.preventDefault(), c());
|
|
3095
|
-
},
|
|
3096
|
-
children: [
|
|
3097
|
-
/* @__PURE__ */ e(
|
|
3098
|
-
We,
|
|
3099
|
-
{
|
|
3100
|
-
className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 pointer-events-none transition-colors duration-200",
|
|
3101
|
-
style: { color: "var(--text-muted)" }
|
|
3102
|
-
}
|
|
3103
|
-
),
|
|
3104
|
-
/* @__PURE__ */ e(
|
|
3105
|
-
"input",
|
|
3106
|
-
{
|
|
3107
|
-
ref: l,
|
|
3108
|
-
type: "text",
|
|
3109
|
-
"aria-label": n,
|
|
3110
|
-
value: t,
|
|
3111
|
-
onChange: (d) => r(d.target.value),
|
|
3112
|
-
placeholder: p ? n : "Buscar",
|
|
3113
|
-
className: `h-11 w-full rounded-lg py-0 text-sm placeholder:text-[var(--text-muted)] focus:outline-none transition-all duration-150 ${p ? "pl-9 pr-9" : "cursor-pointer pl-9 pr-3"}`,
|
|
3114
|
-
style: {
|
|
3115
|
-
background: "var(--bg-card)",
|
|
3116
|
-
border: "1px solid var(--border)",
|
|
3117
|
-
color: "var(--text-main)"
|
|
3118
|
-
},
|
|
3119
|
-
onFocus: (d) => {
|
|
3120
|
-
m(!0), d.currentTarget.style.borderColor = "var(--primary)", d.currentTarget.style.boxShadow = "0 0 0 3px rgba(59,130,246,0.12)";
|
|
3121
|
-
},
|
|
3122
|
-
onBlur: (d) => {
|
|
3123
|
-
m(!1), d.currentTarget.style.borderColor = "var(--border)", d.currentTarget.style.boxShadow = "none";
|
|
3124
|
-
}
|
|
3125
|
-
}
|
|
3126
|
-
),
|
|
3127
|
-
t && /* @__PURE__ */ e(
|
|
3128
|
-
"button",
|
|
3129
|
-
{
|
|
3130
|
-
type: "button",
|
|
3131
|
-
onClick: () => r(""),
|
|
3132
|
-
className: "absolute right-2 top-1/2 flex !h-6 !w-6 -translate-y-1/2 items-center justify-center rounded-full !p-0 leading-none transition-colors hover:bg-black/5",
|
|
3133
|
-
style: { color: "var(--text-muted)" },
|
|
3134
|
-
"aria-label": "Limpiar búsqueda",
|
|
3135
|
-
children: /* @__PURE__ */ e(ce, { className: "h-3.5 w-3.5 flex-shrink-0" })
|
|
3136
|
-
}
|
|
3137
|
-
)
|
|
3138
|
-
]
|
|
3139
|
-
}
|
|
3140
|
-
);
|
|
3141
|
-
}
|
|
3142
|
-
function pn({
|
|
3777
|
+
function Bn({
|
|
3143
3778
|
children: t,
|
|
3144
3779
|
currentPath: r = typeof window > "u" ? "/" : window.location.pathname,
|
|
3145
3780
|
publicRoutes: n = ["/", "/login", "/reset-password"],
|
|
3146
3781
|
...a
|
|
3147
3782
|
}) {
|
|
3148
|
-
return n.includes(r) ? /* @__PURE__ */ e(
|
|
3783
|
+
return n.includes(r) ? /* @__PURE__ */ e(we, { children: t }) : /* @__PURE__ */ e(Gr, { currentPath: r, ...a, children: t });
|
|
3149
3784
|
}
|
|
3150
|
-
function
|
|
3785
|
+
function Ct() {
|
|
3151
3786
|
if (typeof window > "u") return "system";
|
|
3152
3787
|
const t = localStorage.getItem("theme");
|
|
3153
3788
|
return t === "light" || t === "dark" ? t : t === "system" ? "system" : document.documentElement.classList.contains("dark") ? "dark" : "light";
|
|
3154
3789
|
}
|
|
3155
|
-
function
|
|
3790
|
+
function en(t, r, n) {
|
|
3156
3791
|
try {
|
|
3157
3792
|
const a = new URL(t), l = a.searchParams.get("callbackUrl");
|
|
3158
3793
|
if (l) {
|
|
@@ -3167,57 +3802,57 @@ function Hr(t, r, n) {
|
|
|
3167
3802
|
return t;
|
|
3168
3803
|
}
|
|
3169
3804
|
}
|
|
3170
|
-
function
|
|
3805
|
+
function Ln({
|
|
3171
3806
|
name: t,
|
|
3172
3807
|
src: r,
|
|
3173
3808
|
projectKey: n
|
|
3174
3809
|
}) {
|
|
3175
|
-
const [a, l] =
|
|
3176
|
-
() =>
|
|
3177
|
-
), u =
|
|
3178
|
-
|
|
3179
|
-
const
|
|
3180
|
-
() => l(
|
|
3810
|
+
const [a, l] = B(
|
|
3811
|
+
() => Ct()
|
|
3812
|
+
), u = ie(null);
|
|
3813
|
+
O(() => {
|
|
3814
|
+
const m = new MutationObserver(
|
|
3815
|
+
() => l(Ct())
|
|
3181
3816
|
);
|
|
3182
|
-
return
|
|
3817
|
+
return m.observe(document.documentElement, {
|
|
3183
3818
|
attributes: !0,
|
|
3184
3819
|
attributeFilter: ["class"]
|
|
3185
|
-
}), () =>
|
|
3820
|
+
}), () => m.disconnect();
|
|
3186
3821
|
}, []);
|
|
3187
|
-
const
|
|
3188
|
-
() =>
|
|
3822
|
+
const d = Oe(
|
|
3823
|
+
() => en(r, a, n),
|
|
3189
3824
|
[n, r, a]
|
|
3190
|
-
), p =
|
|
3825
|
+
), p = Oe(() => {
|
|
3191
3826
|
try {
|
|
3192
|
-
return new URL(
|
|
3827
|
+
return new URL(d).origin;
|
|
3193
3828
|
} catch {
|
|
3194
3829
|
return "";
|
|
3195
3830
|
}
|
|
3196
|
-
}, [
|
|
3197
|
-
return
|
|
3831
|
+
}, [d]);
|
|
3832
|
+
return O(() => {
|
|
3198
3833
|
if (!n) return;
|
|
3199
|
-
const
|
|
3200
|
-
function
|
|
3201
|
-
var f,
|
|
3202
|
-
if (
|
|
3203
|
-
if (((
|
|
3834
|
+
const m = n;
|
|
3835
|
+
function h(w) {
|
|
3836
|
+
var f, v, c;
|
|
3837
|
+
if (w.source !== ((f = u.current) == null ? void 0 : f.contentWindow) || p && w.origin !== p) return;
|
|
3838
|
+
if (((v = w.data) == null ? void 0 : v.type) === "prime-microservice:overlay") {
|
|
3204
3839
|
window.dispatchEvent(
|
|
3205
3840
|
new CustomEvent("prime-auth:microservice-overlay", {
|
|
3206
|
-
detail: { active: !!
|
|
3841
|
+
detail: { active: !!w.data.active }
|
|
3207
3842
|
})
|
|
3208
3843
|
);
|
|
3209
3844
|
return;
|
|
3210
3845
|
}
|
|
3211
|
-
if (((
|
|
3212
|
-
const
|
|
3213
|
-
if (!
|
|
3214
|
-
const
|
|
3215
|
-
`${window.location.pathname}${window.location.search}${window.location.hash}` !==
|
|
3846
|
+
if (((c = w.data) == null ? void 0 : c.type) !== "prime-microservice:navigation") return;
|
|
3847
|
+
const N = w.data.path;
|
|
3848
|
+
if (!N || !N.startsWith("/") || N.startsWith("//")) return;
|
|
3849
|
+
const g = `/apps/${encodeURIComponent(m)}${N}`;
|
|
3850
|
+
`${window.location.pathname}${window.location.search}${window.location.hash}` !== g && (window.history.replaceState(window.history.state, "", g), window.dispatchEvent(
|
|
3216
3851
|
new CustomEvent("prime-auth:microservice-navigation")
|
|
3217
3852
|
));
|
|
3218
3853
|
}
|
|
3219
|
-
return window.addEventListener("message",
|
|
3220
|
-
window.removeEventListener("message",
|
|
3854
|
+
return window.addEventListener("message", h), () => {
|
|
3855
|
+
window.removeEventListener("message", h), window.dispatchEvent(
|
|
3221
3856
|
new CustomEvent("prime-auth:microservice-overlay", {
|
|
3222
3857
|
detail: { active: !1 }
|
|
3223
3858
|
})
|
|
@@ -3227,7 +3862,7 @@ function hn({
|
|
|
3227
3862
|
"iframe",
|
|
3228
3863
|
{
|
|
3229
3864
|
ref: u,
|
|
3230
|
-
src:
|
|
3865
|
+
src: d,
|
|
3231
3866
|
title: t,
|
|
3232
3867
|
className: "min-h-0 flex-1 border-0 bg-[var(--bg-main)]",
|
|
3233
3868
|
allow: "clipboard-write",
|
|
@@ -3236,27 +3871,27 @@ function hn({
|
|
|
3236
3871
|
}
|
|
3237
3872
|
) });
|
|
3238
3873
|
}
|
|
3239
|
-
function
|
|
3240
|
-
const [t, r] =
|
|
3241
|
-
return
|
|
3242
|
-
let
|
|
3874
|
+
function Tn() {
|
|
3875
|
+
const [t, r] = B(""), [n, a] = B(!1), [l, u] = B({ width: 96, height: 96 });
|
|
3876
|
+
return O(() => {
|
|
3877
|
+
let d = !1;
|
|
3243
3878
|
return fetch("/api/microservices/prime-suite/chat-url", { cache: "no-store" }).then((p) => p.ok ? p.json() : null).then((p) => {
|
|
3244
|
-
!
|
|
3879
|
+
!d && (p != null && p.src) && r(p.src);
|
|
3245
3880
|
}).catch(() => {
|
|
3246
3881
|
}), () => {
|
|
3247
|
-
|
|
3882
|
+
d = !0;
|
|
3248
3883
|
};
|
|
3249
|
-
}, []),
|
|
3250
|
-
const
|
|
3251
|
-
var
|
|
3252
|
-
if (((
|
|
3253
|
-
const
|
|
3254
|
-
a(
|
|
3255
|
-
width:
|
|
3256
|
-
height:
|
|
3884
|
+
}, []), O(() => {
|
|
3885
|
+
const d = (p) => {
|
|
3886
|
+
var h;
|
|
3887
|
+
if (((h = p.data) == null ? void 0 : h.type) !== "prime-suite-chat:state") return;
|
|
3888
|
+
const m = !!p.data.active;
|
|
3889
|
+
a(m), u({
|
|
3890
|
+
width: $t(p.data.width, 96, 720),
|
|
3891
|
+
height: $t(p.data.height, 96, 560)
|
|
3257
3892
|
});
|
|
3258
3893
|
};
|
|
3259
|
-
return window.addEventListener("message",
|
|
3894
|
+
return window.addEventListener("message", d), () => window.removeEventListener("message", d);
|
|
3260
3895
|
}, []), t ? /* @__PURE__ */ e(
|
|
3261
3896
|
"iframe",
|
|
3262
3897
|
{
|
|
@@ -3274,11 +3909,11 @@ function fn() {
|
|
|
3274
3909
|
}
|
|
3275
3910
|
) : null;
|
|
3276
3911
|
}
|
|
3277
|
-
function
|
|
3912
|
+
function $t(t, r, n) {
|
|
3278
3913
|
const a = typeof t == "number" && Number.isFinite(t) ? t : r;
|
|
3279
3914
|
return Math.max(r, Math.min(n, Math.ceil(a)));
|
|
3280
3915
|
}
|
|
3281
|
-
function
|
|
3916
|
+
function tn(t) {
|
|
3282
3917
|
const r = document.documentElement, n = new MutationObserver(t);
|
|
3283
3918
|
n.observe(r, { attributes: !0, attributeFilter: ["class"] });
|
|
3284
3919
|
const a = window.matchMedia("(prefers-color-scheme: dark)");
|
|
@@ -3286,46 +3921,48 @@ function Wr(t) {
|
|
|
3286
3921
|
n.disconnect(), a.removeEventListener("change", t);
|
|
3287
3922
|
};
|
|
3288
3923
|
}
|
|
3289
|
-
function
|
|
3924
|
+
function rn() {
|
|
3290
3925
|
const t = localStorage.getItem("theme") || "system", r = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
3291
3926
|
return document.documentElement.classList.contains("dark") || t === "dark" || t === "system" && r ? "dark" : "light";
|
|
3292
3927
|
}
|
|
3293
|
-
function
|
|
3928
|
+
function nn() {
|
|
3294
3929
|
return "light";
|
|
3295
3930
|
}
|
|
3296
|
-
function
|
|
3297
|
-
const t =
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3931
|
+
function Dn() {
|
|
3932
|
+
const t = Ht(
|
|
3933
|
+
tn,
|
|
3934
|
+
rn,
|
|
3935
|
+
nn
|
|
3301
3936
|
);
|
|
3302
|
-
return /* @__PURE__ */ e(
|
|
3937
|
+
return /* @__PURE__ */ e(cr, { position: "bottom-center", theme: t, richColors: !0, closeButton: !0 });
|
|
3303
3938
|
}
|
|
3304
3939
|
export {
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3940
|
+
Gr as AuthShell,
|
|
3941
|
+
bn as BonsaifButton,
|
|
3942
|
+
he as Button,
|
|
3943
|
+
vn as CalendarPicker,
|
|
3944
|
+
yn as CompactFilterSelect,
|
|
3945
|
+
gn as CompactSearchInput,
|
|
3946
|
+
wn as ConfirmDialog,
|
|
3947
|
+
Nn as DataTable,
|
|
3948
|
+
kn as DateRangePicker,
|
|
3949
|
+
Sn as Drawer,
|
|
3950
|
+
xn as DynamicDetailTabs,
|
|
3951
|
+
Ar as GlobalScrollbars,
|
|
3952
|
+
Cn as InputField,
|
|
3953
|
+
br as LoadingState,
|
|
3954
|
+
Ln as MicroserviceFrame,
|
|
3955
|
+
Er as Modal,
|
|
3956
|
+
Dt as MouseTooltip,
|
|
3957
|
+
Mn as PageHeader,
|
|
3958
|
+
ur as PageSearchInput,
|
|
3959
|
+
Bn as PrimeAuthRouteShell,
|
|
3960
|
+
Dn as PrimeAuthToaster,
|
|
3961
|
+
Tn as PrimeSuiteChatFrame,
|
|
3962
|
+
Tt as SearchableSelect,
|
|
3963
|
+
$n as StepWizard,
|
|
3964
|
+
yt as TextInput,
|
|
3965
|
+
En as Toggle,
|
|
3966
|
+
Ur as UserAvatar,
|
|
3967
|
+
dr as cn
|
|
3331
3968
|
};
|