@mateosuarezdev/react-ui 1.0.50 → 1.0.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +12 -4
- package/dist/index.d.ts +45 -0
- package/dist/index.js +1202 -991
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9,19 +9,19 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import { jsx as d, jsxs as g, Fragment as gt } from "react/jsx-runtime";
|
|
12
|
-
import Le, { useRef as T, useEffect as
|
|
13
|
-
import { createPortal as
|
|
14
|
-
import { clsx as
|
|
15
|
-
import { twMerge as
|
|
16
|
-
import { atom as
|
|
17
|
-
import { ChevronLeft as Sr, ChevronRight as
|
|
18
|
-
import { AnimatePresence as
|
|
19
|
-
import { useSearchParams as
|
|
20
|
-
import { appendErrors as
|
|
21
|
-
import { validateFieldsNatively as
|
|
22
|
-
import { createGesture as
|
|
23
|
-
const N = (...e) =>
|
|
24
|
-
function
|
|
12
|
+
import Le, { useRef as T, useEffect as H, useState as z, useSyncExternalStore as $n, useLayoutEffect as Er, useCallback as L, useId as Tr, forwardRef as Ue, useContext as vt, useMemo as te, memo as En, createContext as Ht } from "react";
|
|
13
|
+
import { createPortal as Cr } from "react-dom";
|
|
14
|
+
import { clsx as Tn } from "clsx";
|
|
15
|
+
import { twMerge as Cn } from "tailwind-merge";
|
|
16
|
+
import { atom as Sn } from "@mateosuarezdev/atoms";
|
|
17
|
+
import { ChevronLeft as Sr, ChevronRight as Mr, CalendarDays as Dr, Clock as Pr, Check as Or, Minus as Mn, DollarSign as Dn, CheckIcon as Be, EyeOffIcon as Pn, Eye as On, XIcon as Ln, ChevronDownIcon as Fn, Search as An, X as wt, ChevronDown as Wn, Plus as Lr, XCircle as _n, TriangleAlert as Yn, CheckCircle as Rn, Info as In, ArrowRight as jn } from "lucide-react";
|
|
18
|
+
import { AnimatePresence as Ye, motion as re, useTransform as rr, cancelFrame as ne, frame as it, animate as Lt } from "framer-motion";
|
|
19
|
+
import { useSearchParams as zn, navigate as ke, useInitialChangeEvent as Hn } from "@mateosuarezdev/react-router";
|
|
20
|
+
import { appendErrors as Fr, FormProvider as Bn, useForm as Vn, useFormContext as Qe, Controller as Ge } from "react-hook-form";
|
|
21
|
+
import { validateFieldsNatively as nr, toNestErrors as or } from "@hookform/resolvers";
|
|
22
|
+
import { createGesture as Ar } from "@mateosuarezdev/gestures";
|
|
23
|
+
const N = (...e) => Cn(Tn(e));
|
|
24
|
+
function Je(e, t = 100) {
|
|
25
25
|
let r = null, n = null;
|
|
26
26
|
return function(...o) {
|
|
27
27
|
const a = Date.now();
|
|
@@ -30,7 +30,7 @@ function Ge(e, t = 100) {
|
|
|
30
30
|
}, t - (a - r)));
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function Fi(e, t = 500) {
|
|
34
34
|
let r = null;
|
|
35
35
|
return function(...n) {
|
|
36
36
|
r && clearTimeout(r), r = setTimeout(() => {
|
|
@@ -38,20 +38,20 @@ function ki(e, t = 500) {
|
|
|
38
38
|
}, t);
|
|
39
39
|
};
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function Xn(e) {
|
|
42
42
|
if (!e) return "";
|
|
43
43
|
const r = e.trim().replace(/\s+/g, " ").split(" ");
|
|
44
44
|
return r.length === 0 || r[0] === "" ? "" : r.length === 1 ? r[0].charAt(0).toUpperCase() : (r[0].charAt(0) + r[1].charAt(0)).toUpperCase();
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function qn(e) {
|
|
47
47
|
e.focus();
|
|
48
48
|
const t = e.value.length;
|
|
49
49
|
e.setSelectionRange(t, t);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function Kn(e) {
|
|
52
52
|
return e.replace(/\s/g, "");
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function Ai(e) {
|
|
55
55
|
return e.toLowerCase().split(" ").map((o) => {
|
|
56
56
|
if (o.length === 0) return o;
|
|
57
57
|
const a = [...o][0], s = o.slice(a.length);
|
|
@@ -61,10 +61,10 @@ function $i(e) {
|
|
|
61
61
|
function Wr(e) {
|
|
62
62
|
return e === null ? "" : e;
|
|
63
63
|
}
|
|
64
|
-
function
|
|
65
|
-
return
|
|
64
|
+
function Ft(e) {
|
|
65
|
+
return Kn(e) === "" ? null : e;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function Wi(e, t, r = {}) {
|
|
68
68
|
const n = { ...r };
|
|
69
69
|
return Object.keys(t).forEach((o) => {
|
|
70
70
|
if (t[o] === !0 && o in e) {
|
|
@@ -73,7 +73,7 @@ function Ei(e, t, r = {}) {
|
|
|
73
73
|
}
|
|
74
74
|
}), n;
|
|
75
75
|
}
|
|
76
|
-
class
|
|
76
|
+
class _i {
|
|
77
77
|
constructor() {
|
|
78
78
|
this.container = null, this.previouslyFocusedElement = null;
|
|
79
79
|
}
|
|
@@ -118,7 +118,7 @@ const lt = (e) => {
|
|
|
118
118
|
scrollPercentageX: t && n > 0 ? e.scrollLeft / n * 100 : 0,
|
|
119
119
|
scrollPercentageY: r && o > 0 ? e.scrollTop / o * 100 : 0
|
|
120
120
|
};
|
|
121
|
-
},
|
|
121
|
+
}, Un = ({
|
|
122
122
|
onOverflow: e,
|
|
123
123
|
trackScroll: t = !1,
|
|
124
124
|
// New option to enable scroll tracking
|
|
@@ -127,10 +127,10 @@ const lt = (e) => {
|
|
|
127
127
|
deps: o = []
|
|
128
128
|
} = {}) => {
|
|
129
129
|
const a = T(null);
|
|
130
|
-
return
|
|
130
|
+
return H(() => {
|
|
131
131
|
if (!a.current || !n) return;
|
|
132
132
|
let s = !1;
|
|
133
|
-
const c =
|
|
133
|
+
const c = Je(() => {
|
|
134
134
|
if (a.current) {
|
|
135
135
|
const m = lt(a.current);
|
|
136
136
|
e?.(m);
|
|
@@ -144,17 +144,17 @@ const lt = (e) => {
|
|
|
144
144
|
window.removeEventListener("resize", c), u && u.disconnect(), f && s && f.removeEventListener("scroll", c);
|
|
145
145
|
};
|
|
146
146
|
}, [n, ...o]), { ref: a };
|
|
147
|
-
},
|
|
147
|
+
}, Yi = ({
|
|
148
148
|
trackScroll: e = !1,
|
|
149
149
|
withObserver: t = !1,
|
|
150
150
|
enabled: r = !0,
|
|
151
151
|
deps: n = []
|
|
152
152
|
} = {}) => {
|
|
153
153
|
const o = T(null), [a, s] = z(null);
|
|
154
|
-
return
|
|
154
|
+
return H(() => {
|
|
155
155
|
if (!o.current || !r) return;
|
|
156
156
|
let i = !1;
|
|
157
|
-
const l =
|
|
157
|
+
const l = Je(() => {
|
|
158
158
|
if (o.current) {
|
|
159
159
|
const b = lt(o.current);
|
|
160
160
|
s(b);
|
|
@@ -168,13 +168,13 @@ const lt = (e) => {
|
|
|
168
168
|
window.removeEventListener("resize", l), f && f.disconnect(), m && i && m.removeEventListener("scroll", l);
|
|
169
169
|
};
|
|
170
170
|
}, [r, ...n]), { ref: o, overflowInfo: a };
|
|
171
|
-
},
|
|
171
|
+
}, Ct = {
|
|
172
172
|
xs: "w-8 h-8",
|
|
173
173
|
sm: "w-10 h-10 text-lg",
|
|
174
174
|
md: "w-14 h-14 text-xl",
|
|
175
175
|
lg: "h-20 w-20 text-2xl",
|
|
176
176
|
xl: "h-24 w-24 text-2xl"
|
|
177
|
-
},
|
|
177
|
+
}, Ri = ({
|
|
178
178
|
src: e,
|
|
179
179
|
name: t,
|
|
180
180
|
size: r = "md",
|
|
@@ -184,17 +184,17 @@ const lt = (e) => {
|
|
|
184
184
|
{
|
|
185
185
|
alt: "avatar",
|
|
186
186
|
src: e,
|
|
187
|
-
className: N("rounded-full bg-base-3",
|
|
187
|
+
className: N("rounded-full bg-base-3", Ct[r])
|
|
188
188
|
}
|
|
189
189
|
) : t ? /* @__PURE__ */ d(
|
|
190
190
|
"p",
|
|
191
191
|
{
|
|
192
192
|
className: N(
|
|
193
193
|
"rounded-full font-medium dark-theme:bg-base-3 border border-base-6 dark-theme:border-base-4 flex items-center justify-center",
|
|
194
|
-
|
|
194
|
+
Ct[r],
|
|
195
195
|
n
|
|
196
196
|
),
|
|
197
|
-
children:
|
|
197
|
+
children: Xn(t)
|
|
198
198
|
}
|
|
199
199
|
) : /* @__PURE__ */ d(
|
|
200
200
|
"div",
|
|
@@ -203,11 +203,11 @@ const lt = (e) => {
|
|
|
203
203
|
"rounded-full text-2xl font-medium flex items-center justify-center",
|
|
204
204
|
"bg-base-2 dark-theme:bg-base-3 border border-base-4",
|
|
205
205
|
"lg:hover:bg-base-3 max-lg:active:bg-base-4 transition-colors",
|
|
206
|
-
|
|
206
|
+
Ct[r],
|
|
207
207
|
n
|
|
208
208
|
),
|
|
209
209
|
children: /* @__PURE__ */ g(
|
|
210
|
-
|
|
210
|
+
Ys,
|
|
211
211
|
{
|
|
212
212
|
size: r === "xs" ? 16 : r === "sm" ? 20 : 24,
|
|
213
213
|
fill: "none",
|
|
@@ -223,7 +223,7 @@ const lt = (e) => {
|
|
|
223
223
|
)
|
|
224
224
|
}
|
|
225
225
|
);
|
|
226
|
-
function
|
|
226
|
+
function Ii({
|
|
227
227
|
className: e,
|
|
228
228
|
children: t,
|
|
229
229
|
animate: r = !1,
|
|
@@ -238,33 +238,33 @@ function Mi({
|
|
|
238
238
|
}
|
|
239
239
|
);
|
|
240
240
|
}
|
|
241
|
-
function
|
|
242
|
-
return
|
|
241
|
+
function Qn(e) {
|
|
242
|
+
return $n(
|
|
243
243
|
(t) => e.subscribe(t),
|
|
244
244
|
() => e.get(),
|
|
245
245
|
() => e.get()
|
|
246
246
|
);
|
|
247
247
|
}
|
|
248
|
-
const
|
|
248
|
+
const At = Sn(
|
|
249
249
|
typeof window < "u" ? window.innerWidth > 1024 : !0
|
|
250
250
|
);
|
|
251
|
-
let
|
|
252
|
-
const
|
|
253
|
-
|
|
251
|
+
let St = !1;
|
|
252
|
+
const ar = Je(() => {
|
|
253
|
+
At.set(window.innerWidth > 1024);
|
|
254
254
|
});
|
|
255
|
-
typeof window < "u" && (
|
|
256
|
-
const yt = () => (
|
|
257
|
-
|
|
258
|
-
}, []),
|
|
259
|
-
function
|
|
255
|
+
typeof window < "u" && (St && (window.removeEventListener("resize", ar), St = !1), window.addEventListener("resize", ar), St = !0);
|
|
256
|
+
const yt = () => (Er(() => {
|
|
257
|
+
At.set(window.innerWidth > 1024);
|
|
258
|
+
}, []), Qn(At));
|
|
259
|
+
function _r(...e) {
|
|
260
260
|
return (t) => {
|
|
261
261
|
e.forEach((r) => {
|
|
262
262
|
typeof r == "function" ? r(t) : r != null && (r.current = t);
|
|
263
263
|
});
|
|
264
264
|
};
|
|
265
265
|
}
|
|
266
|
-
const
|
|
267
|
-
const r = yt(), n = T(null), o =
|
|
266
|
+
const Gn = (e = !0, t) => {
|
|
267
|
+
const r = yt(), n = T(null), o = L(
|
|
268
268
|
(a) => {
|
|
269
269
|
if (!e || r) return;
|
|
270
270
|
const s = n.current;
|
|
@@ -290,7 +290,7 @@ const Hn = (e = !0, t) => {
|
|
|
290
290
|
position: "relative"
|
|
291
291
|
}
|
|
292
292
|
};
|
|
293
|
-
},
|
|
293
|
+
}, Bt = ({
|
|
294
294
|
// routerMode = "outlet",
|
|
295
295
|
scrollerId: e,
|
|
296
296
|
// useScrollerSuffix,
|
|
@@ -316,14 +316,14 @@ const Hn = (e = !0, t) => {
|
|
|
316
316
|
y: 0,
|
|
317
317
|
width: 0,
|
|
318
318
|
height: 0
|
|
319
|
-
}), w = T(null), E =
|
|
319
|
+
}), w = T(null), E = Tr(), C = L(
|
|
320
320
|
(x) => {
|
|
321
321
|
const k = x ?? v.current;
|
|
322
322
|
if (!k) return { x: 0, top: 0, bottom: void 0 };
|
|
323
|
-
const
|
|
324
|
-
return
|
|
323
|
+
const F = f.width, Y = f.height;
|
|
324
|
+
return Jn({
|
|
325
325
|
triggerRect: k,
|
|
326
|
-
popoverWidth:
|
|
326
|
+
popoverWidth: F,
|
|
327
327
|
popoverHeight: Y,
|
|
328
328
|
align: t,
|
|
329
329
|
side: r,
|
|
@@ -334,7 +334,7 @@ const Hn = (e = !0, t) => {
|
|
|
334
334
|
},
|
|
335
335
|
[v.current, f, t, r]
|
|
336
336
|
);
|
|
337
|
-
|
|
337
|
+
H(() => {
|
|
338
338
|
if (!l || !e || (w.current = document.getElementById(e), !w.current)) return;
|
|
339
339
|
l && _();
|
|
340
340
|
const x = () => {
|
|
@@ -351,7 +351,7 @@ const Hn = (e = !0, t) => {
|
|
|
351
351
|
width: h.current.offsetWidth,
|
|
352
352
|
height: h.current.offsetHeight
|
|
353
353
|
});
|
|
354
|
-
}, D =
|
|
354
|
+
}, D = L(() => {
|
|
355
355
|
if (!b.current) return;
|
|
356
356
|
const x = b.current.getBoundingClientRect();
|
|
357
357
|
v.current = {
|
|
@@ -364,7 +364,7 @@ const Hn = (e = !0, t) => {
|
|
|
364
364
|
width: x.width,
|
|
365
365
|
height: x.height
|
|
366
366
|
}, u((k) => (k ? c?.() : i?.(), !k));
|
|
367
|
-
}, []), P =
|
|
367
|
+
}, []), P = L(() => {
|
|
368
368
|
u(!1), c?.();
|
|
369
369
|
}, []);
|
|
370
370
|
return {
|
|
@@ -379,12 +379,12 @@ const Hn = (e = !0, t) => {
|
|
|
379
379
|
/**
|
|
380
380
|
* Call this sync before rendering the popover
|
|
381
381
|
*/
|
|
382
|
-
getPopoverPosition:
|
|
382
|
+
getPopoverPosition: C,
|
|
383
383
|
open: l,
|
|
384
384
|
toggle: D,
|
|
385
385
|
close: P
|
|
386
386
|
};
|
|
387
|
-
},
|
|
387
|
+
}, Jn = ({
|
|
388
388
|
triggerRect: e,
|
|
389
389
|
popoverWidth: t,
|
|
390
390
|
popoverHeight: r,
|
|
@@ -449,9 +449,9 @@ const Hn = (e = !0, t) => {
|
|
|
449
449
|
let f, m;
|
|
450
450
|
return u + r <= e.top ? m = window.innerHeight - (u + r) : f = u, { x: l, top: f, bottom: m };
|
|
451
451
|
};
|
|
452
|
-
function
|
|
452
|
+
function ji(e) {
|
|
453
453
|
const t = T(null);
|
|
454
|
-
return
|
|
454
|
+
return H(() => {
|
|
455
455
|
const r = (n) => {
|
|
456
456
|
t.current && !t.current.contains(n.target) && e();
|
|
457
457
|
};
|
|
@@ -460,13 +460,13 @@ function Di(e) {
|
|
|
460
460
|
};
|
|
461
461
|
}, [e]), t;
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function zi(e, t = {}) {
|
|
464
464
|
const {
|
|
465
465
|
enabled: r = !0,
|
|
466
466
|
events: n = ["mousedown", "touchstart"],
|
|
467
467
|
excludeRefs: o = []
|
|
468
468
|
} = t, a = T(null);
|
|
469
|
-
return
|
|
469
|
+
return H(() => {
|
|
470
470
|
if (!r) return;
|
|
471
471
|
const s = (i) => {
|
|
472
472
|
const c = i.target;
|
|
@@ -483,8 +483,8 @@ function Pi(e, t = {}) {
|
|
|
483
483
|
};
|
|
484
484
|
}, [e, r, n, o]), a;
|
|
485
485
|
}
|
|
486
|
-
function
|
|
487
|
-
|
|
486
|
+
function Vt(e, t, r = !0) {
|
|
487
|
+
H(() => {
|
|
488
488
|
if (!r) return;
|
|
489
489
|
const n = (o) => {
|
|
490
490
|
e.current && !e.current.contains(o.target) && t(o);
|
|
@@ -494,11 +494,11 @@ function Bt(e, t, r = !0) {
|
|
|
494
494
|
};
|
|
495
495
|
}, [e, t, r]);
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function Zn(e, { target: t = window, event: r = "keydown", enabled: n } = {}) {
|
|
498
498
|
const o = T(e);
|
|
499
|
-
|
|
499
|
+
H(() => {
|
|
500
500
|
o.current = e;
|
|
501
|
-
}, [e]),
|
|
501
|
+
}, [e]), H(() => {
|
|
502
502
|
if (!n) return;
|
|
503
503
|
const a = (s) => {
|
|
504
504
|
const i = s.key, c = o.current[i];
|
|
@@ -509,7 +509,7 @@ function Vn(e, { target: t = window, event: r = "keydown", enabled: n } = {}) {
|
|
|
509
509
|
};
|
|
510
510
|
}, [t, r, n]);
|
|
511
511
|
}
|
|
512
|
-
const
|
|
512
|
+
const eo = "relative shrink-0 select-none transition outline-none duration-200 ease-out focus-visible:ring-border-brand-light flex items-center justify-center cursor-pointer", to = {
|
|
513
513
|
xs: "text-xs px-1 gap-x-1 py-1",
|
|
514
514
|
sm: "text-sm px-2.5 gap-x-1 py-1.5",
|
|
515
515
|
mdsm: "text-sm px-3 gap-x-1.5 py-2.5",
|
|
@@ -520,18 +520,18 @@ const qn = "relative shrink-0 select-none transition outline-none duration-200 e
|
|
|
520
520
|
iconSm: "text-sm p-2",
|
|
521
521
|
iconMd: "text-base p-3",
|
|
522
522
|
iconLg: "text-base p-4"
|
|
523
|
-
},
|
|
523
|
+
}, ro = {
|
|
524
524
|
all: "focus-visible:ring-1",
|
|
525
525
|
desktop: "lg:focus-visible:ring-1",
|
|
526
526
|
mobile: "focus-visible:ring-1 lg:focus-ring-0",
|
|
527
527
|
none: ""
|
|
528
|
-
},
|
|
528
|
+
}, no = {
|
|
529
529
|
light: "font-light",
|
|
530
530
|
normal: "font-normal",
|
|
531
531
|
medium: "font-medium",
|
|
532
532
|
semibold: "font-semibold",
|
|
533
533
|
bold: "font-bold"
|
|
534
|
-
},
|
|
534
|
+
}, oo = {
|
|
535
535
|
none: "rounded-none",
|
|
536
536
|
1: "rounded-1",
|
|
537
537
|
2: "rounded-2",
|
|
@@ -546,7 +546,7 @@ const qn = "relative shrink-0 select-none transition outline-none duration-200 e
|
|
|
546
546
|
11: "rounded-11",
|
|
547
547
|
12: "rounded-12",
|
|
548
548
|
full: "rounded-full"
|
|
549
|
-
},
|
|
549
|
+
}, ao = {
|
|
550
550
|
transparent: "text-base-12 lg:hover:bg-base-4 focus-visible:ring-base-6",
|
|
551
551
|
transparentinactive: "text-base-11 lg:hover:bg-base-4",
|
|
552
552
|
brand: "bg-brand text-brand-text lg:hover:bg-brand-hover focus-visible:ring-base-6 border border-transparent",
|
|
@@ -561,11 +561,11 @@ const qn = "relative shrink-0 select-none transition outline-none duration-200 e
|
|
|
561
561
|
danger: "bg-red-4 text-red-9 lg:hover:bg-red-5 focus-visible:ring-red-9 border border-transparent",
|
|
562
562
|
dangersolid: "bg-red-9 text-base-1 dark-theme:text-base-12 lg:hover:bg-red-8 focus-visible:ring-base-6 border border-transparent",
|
|
563
563
|
disabled: "bg-base-3 text-base-11 border border-transparent"
|
|
564
|
-
},
|
|
564
|
+
}, so = {
|
|
565
565
|
enabled: "",
|
|
566
566
|
disabled: "opacity-75",
|
|
567
567
|
loading: ""
|
|
568
|
-
}, U =
|
|
568
|
+
}, U = Ue(
|
|
569
569
|
({
|
|
570
570
|
color: e = "transparent",
|
|
571
571
|
size: t = "mdsm",
|
|
@@ -584,10 +584,10 @@ const qn = "relative shrink-0 select-none transition outline-none duration-200 e
|
|
|
584
584
|
}, h) => {
|
|
585
585
|
const [v, w] = z(!1), E = (P) => {
|
|
586
586
|
o === "enabled" && (f ? (w(!0), a && a(P), setTimeout(() => w(!1), 1e3)) : a && a(P));
|
|
587
|
-
}, { ref:
|
|
587
|
+
}, { ref: C, ripple: _ } = Gn(
|
|
588
588
|
c,
|
|
589
589
|
e === "contrast" || l
|
|
590
|
-
), D =
|
|
590
|
+
), D = _r(C, h);
|
|
591
591
|
return /* @__PURE__ */ d(
|
|
592
592
|
"button",
|
|
593
593
|
{
|
|
@@ -597,13 +597,13 @@ const qn = "relative shrink-0 select-none transition outline-none duration-200 e
|
|
|
597
597
|
onMouseDown: _,
|
|
598
598
|
onClick: (P) => v ? null : E(P),
|
|
599
599
|
className: N(
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
600
|
+
eo,
|
|
601
|
+
to[t],
|
|
602
|
+
no[r],
|
|
603
|
+
oo[n],
|
|
604
|
+
ro[u],
|
|
605
|
+
ao[e],
|
|
606
|
+
so[o],
|
|
607
607
|
b.disabled && "opacity-50",
|
|
608
608
|
s
|
|
609
609
|
),
|
|
@@ -614,9 +614,9 @@ const qn = "relative shrink-0 select-none transition outline-none duration-200 e
|
|
|
614
614
|
}
|
|
615
615
|
);
|
|
616
616
|
U.displayName = "Button";
|
|
617
|
-
const
|
|
617
|
+
const Yr = 6048e5, io = 864e5, sr = Symbol.for("constructDateFrom");
|
|
618
618
|
function le(e, t) {
|
|
619
|
-
return typeof e == "function" ? e(t) : e && typeof e == "object" &&
|
|
619
|
+
return typeof e == "function" ? e(t) : e && typeof e == "object" && sr in e ? e[sr](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
620
620
|
}
|
|
621
621
|
function ee(e, t) {
|
|
622
622
|
return le(t || e, e);
|
|
@@ -635,18 +635,18 @@ function st(e, t, r) {
|
|
|
635
635
|
o
|
|
636
636
|
), n);
|
|
637
637
|
}
|
|
638
|
-
let
|
|
638
|
+
let lo = {};
|
|
639
639
|
function xt() {
|
|
640
|
-
return
|
|
640
|
+
return lo;
|
|
641
641
|
}
|
|
642
|
-
function
|
|
642
|
+
function Ve(e, t) {
|
|
643
643
|
const r = xt(), n = t?.weekStartsOn ?? t?.locale?.options?.weekStartsOn ?? r.weekStartsOn ?? r.locale?.options?.weekStartsOn ?? 0, o = ee(e, t?.in), a = o.getDay(), s = (a < n ? 7 : 0) + a - n;
|
|
644
644
|
return o.setDate(o.getDate() - s), o.setHours(0, 0, 0, 0), o;
|
|
645
645
|
}
|
|
646
646
|
function ct(e, t) {
|
|
647
|
-
return
|
|
647
|
+
return Ve(e, { ...t, weekStartsOn: 1 });
|
|
648
648
|
}
|
|
649
|
-
function
|
|
649
|
+
function Rr(e, t) {
|
|
650
650
|
const r = ee(e, t?.in), n = r.getFullYear(), o = le(r, 0);
|
|
651
651
|
o.setFullYear(n + 1, 0, 4), o.setHours(0, 0, 0, 0);
|
|
652
652
|
const a = ct(o), s = le(r, 0);
|
|
@@ -654,7 +654,7 @@ function Yr(e, t) {
|
|
|
654
654
|
const i = ct(s);
|
|
655
655
|
return r.getTime() >= a.getTime() ? n + 1 : r.getTime() >= i.getTime() ? n : n - 1;
|
|
656
656
|
}
|
|
657
|
-
function
|
|
657
|
+
function ir(e) {
|
|
658
658
|
const t = ee(e), r = new Date(
|
|
659
659
|
Date.UTC(
|
|
660
660
|
t.getFullYear(),
|
|
@@ -679,16 +679,16 @@ function ut(e, t) {
|
|
|
679
679
|
const r = ee(e, t?.in);
|
|
680
680
|
return r.setHours(0, 0, 0, 0), r;
|
|
681
681
|
}
|
|
682
|
-
function
|
|
682
|
+
function co(e, t, r) {
|
|
683
683
|
const [n, o] = Nt(
|
|
684
684
|
r?.in,
|
|
685
685
|
e,
|
|
686
686
|
t
|
|
687
|
-
), a = ut(n), s = ut(o), i = +a -
|
|
688
|
-
return Math.round((i - c) /
|
|
687
|
+
), a = ut(n), s = ut(o), i = +a - ir(a), c = +s - ir(s);
|
|
688
|
+
return Math.round((i - c) / io);
|
|
689
689
|
}
|
|
690
|
-
function
|
|
691
|
-
const r =
|
|
690
|
+
function uo(e, t) {
|
|
691
|
+
const r = Rr(e, t), n = le(e, 0);
|
|
692
692
|
return n.setFullYear(r, 0, 4), n.setHours(0, 0, 0, 0), ct(n);
|
|
693
693
|
}
|
|
694
694
|
function Mt(e, t, r) {
|
|
@@ -699,22 +699,22 @@ function Mt(e, t, r) {
|
|
|
699
699
|
);
|
|
700
700
|
return +ut(n) == +ut(o);
|
|
701
701
|
}
|
|
702
|
-
function
|
|
702
|
+
function fo(e) {
|
|
703
703
|
return e instanceof Date || typeof e == "object" && Object.prototype.toString.call(e) === "[object Date]";
|
|
704
704
|
}
|
|
705
|
-
function
|
|
706
|
-
return !(!
|
|
705
|
+
function mo(e) {
|
|
706
|
+
return !(!fo(e) && typeof e != "number" || isNaN(+ee(e)));
|
|
707
707
|
}
|
|
708
|
-
function
|
|
708
|
+
function ho(e, t) {
|
|
709
709
|
const r = ee(e, t?.in), n = r.getMonth();
|
|
710
710
|
return r.setFullYear(r.getFullYear(), n + 1, 0), r.setHours(23, 59, 59, 999), r;
|
|
711
711
|
}
|
|
712
|
-
function
|
|
712
|
+
function bo(e, t) {
|
|
713
713
|
const [r, n] = Nt(e, t.start, t.end);
|
|
714
714
|
return { start: r, end: n };
|
|
715
715
|
}
|
|
716
|
-
function
|
|
717
|
-
const { start: r, end: n } =
|
|
716
|
+
function po(e, t) {
|
|
717
|
+
const { start: r, end: n } = bo(t?.in, e);
|
|
718
718
|
let o = +r > +n;
|
|
719
719
|
const a = o ? +r : +n, s = o ? n : r;
|
|
720
720
|
s.setHours(0, 0, 0, 0);
|
|
@@ -724,15 +724,15 @@ function io(e, t) {
|
|
|
724
724
|
c.push(le(r, s)), s.setDate(s.getDate() + i), s.setHours(0, 0, 0, 0);
|
|
725
725
|
return o ? c.reverse() : c;
|
|
726
726
|
}
|
|
727
|
-
function
|
|
727
|
+
function go(e, t) {
|
|
728
728
|
const r = ee(e, t?.in);
|
|
729
729
|
return r.setDate(1), r.setHours(0, 0, 0, 0), r;
|
|
730
730
|
}
|
|
731
|
-
function
|
|
731
|
+
function vo(e, t) {
|
|
732
732
|
const r = ee(e, t?.in);
|
|
733
733
|
return r.setFullYear(r.getFullYear(), 0, 1), r.setHours(0, 0, 0, 0), r;
|
|
734
734
|
}
|
|
735
|
-
const
|
|
735
|
+
const wo = {
|
|
736
736
|
lessThanXSeconds: {
|
|
737
737
|
one: "less than a second",
|
|
738
738
|
other: "less than {{count}} seconds"
|
|
@@ -794,9 +794,9 @@ const uo = {
|
|
|
794
794
|
one: "almost 1 year",
|
|
795
795
|
other: "almost {{count}} years"
|
|
796
796
|
}
|
|
797
|
-
},
|
|
797
|
+
}, yo = (e, t, r) => {
|
|
798
798
|
let n;
|
|
799
|
-
const o =
|
|
799
|
+
const o = wo[e];
|
|
800
800
|
return typeof o == "string" ? n = o : t === 1 ? n = o.one : n = o.other.replace("{{count}}", t.toString()), r?.addSuffix ? r.comparison && r.comparison > 0 ? "in " + n : n + " ago" : n;
|
|
801
801
|
};
|
|
802
802
|
function Fe(e) {
|
|
@@ -805,42 +805,42 @@ function Fe(e) {
|
|
|
805
805
|
return e.formats[r] || e.formats[e.defaultWidth];
|
|
806
806
|
};
|
|
807
807
|
}
|
|
808
|
-
const
|
|
808
|
+
const xo = {
|
|
809
809
|
full: "EEEE, MMMM do, y",
|
|
810
810
|
long: "MMMM do, y",
|
|
811
811
|
medium: "MMM d, y",
|
|
812
812
|
short: "MM/dd/yyyy"
|
|
813
|
-
},
|
|
813
|
+
}, No = {
|
|
814
814
|
full: "h:mm:ss a zzzz",
|
|
815
815
|
long: "h:mm:ss a z",
|
|
816
816
|
medium: "h:mm:ss a",
|
|
817
817
|
short: "h:mm a"
|
|
818
|
-
},
|
|
818
|
+
}, ko = {
|
|
819
819
|
full: "{{date}} 'at' {{time}}",
|
|
820
820
|
long: "{{date}} 'at' {{time}}",
|
|
821
821
|
medium: "{{date}}, {{time}}",
|
|
822
822
|
short: "{{date}}, {{time}}"
|
|
823
|
-
},
|
|
823
|
+
}, $o = {
|
|
824
824
|
date: Fe({
|
|
825
|
-
formats:
|
|
825
|
+
formats: xo,
|
|
826
826
|
defaultWidth: "full"
|
|
827
827
|
}),
|
|
828
828
|
time: Fe({
|
|
829
|
-
formats:
|
|
829
|
+
formats: No,
|
|
830
830
|
defaultWidth: "full"
|
|
831
831
|
}),
|
|
832
832
|
dateTime: Fe({
|
|
833
|
-
formats:
|
|
833
|
+
formats: ko,
|
|
834
834
|
defaultWidth: "full"
|
|
835
835
|
})
|
|
836
|
-
},
|
|
836
|
+
}, Eo = {
|
|
837
837
|
lastWeek: "'last' eeee 'at' p",
|
|
838
838
|
yesterday: "'yesterday at' p",
|
|
839
839
|
today: "'today at' p",
|
|
840
840
|
tomorrow: "'tomorrow at' p",
|
|
841
841
|
nextWeek: "eeee 'at' p",
|
|
842
842
|
other: "P"
|
|
843
|
-
},
|
|
843
|
+
}, To = (e, t, r, n) => Eo[e];
|
|
844
844
|
function de(e) {
|
|
845
845
|
return (t, r) => {
|
|
846
846
|
const n = r?.context ? String(r.context) : "standalone";
|
|
@@ -856,15 +856,15 @@ function de(e) {
|
|
|
856
856
|
return o[a];
|
|
857
857
|
};
|
|
858
858
|
}
|
|
859
|
-
const
|
|
859
|
+
const Co = {
|
|
860
860
|
narrow: ["B", "A"],
|
|
861
861
|
abbreviated: ["BC", "AD"],
|
|
862
862
|
wide: ["Before Christ", "Anno Domini"]
|
|
863
|
-
},
|
|
863
|
+
}, So = {
|
|
864
864
|
narrow: ["1", "2", "3", "4"],
|
|
865
865
|
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
866
866
|
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
867
|
-
},
|
|
867
|
+
}, Mo = {
|
|
868
868
|
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
869
869
|
abbreviated: [
|
|
870
870
|
"Jan",
|
|
@@ -894,7 +894,7 @@ const wo = {
|
|
|
894
894
|
"November",
|
|
895
895
|
"December"
|
|
896
896
|
]
|
|
897
|
-
},
|
|
897
|
+
}, Do = {
|
|
898
898
|
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
899
899
|
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
900
900
|
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
@@ -907,7 +907,7 @@ const wo = {
|
|
|
907
907
|
"Friday",
|
|
908
908
|
"Saturday"
|
|
909
909
|
]
|
|
910
|
-
},
|
|
910
|
+
}, Po = {
|
|
911
911
|
narrow: {
|
|
912
912
|
am: "a",
|
|
913
913
|
pm: "p",
|
|
@@ -938,7 +938,7 @@ const wo = {
|
|
|
938
938
|
evening: "evening",
|
|
939
939
|
night: "night"
|
|
940
940
|
}
|
|
941
|
-
},
|
|
941
|
+
}, Oo = {
|
|
942
942
|
narrow: {
|
|
943
943
|
am: "a",
|
|
944
944
|
pm: "p",
|
|
@@ -969,7 +969,7 @@ const wo = {
|
|
|
969
969
|
evening: "in the evening",
|
|
970
970
|
night: "at night"
|
|
971
971
|
}
|
|
972
|
-
},
|
|
972
|
+
}, Lo = (e, t) => {
|
|
973
973
|
const r = Number(e), n = r % 100;
|
|
974
974
|
if (n > 20 || n < 10)
|
|
975
975
|
switch (n % 10) {
|
|
@@ -981,29 +981,29 @@ const wo = {
|
|
|
981
981
|
return r + "rd";
|
|
982
982
|
}
|
|
983
983
|
return r + "th";
|
|
984
|
-
},
|
|
985
|
-
ordinalNumber:
|
|
984
|
+
}, Fo = {
|
|
985
|
+
ordinalNumber: Lo,
|
|
986
986
|
era: de({
|
|
987
|
-
values:
|
|
987
|
+
values: Co,
|
|
988
988
|
defaultWidth: "wide"
|
|
989
989
|
}),
|
|
990
990
|
quarter: de({
|
|
991
|
-
values:
|
|
991
|
+
values: So,
|
|
992
992
|
defaultWidth: "wide",
|
|
993
993
|
argumentCallback: (e) => e - 1
|
|
994
994
|
}),
|
|
995
995
|
month: de({
|
|
996
|
-
values:
|
|
996
|
+
values: Mo,
|
|
997
997
|
defaultWidth: "wide"
|
|
998
998
|
}),
|
|
999
999
|
day: de({
|
|
1000
|
-
values:
|
|
1000
|
+
values: Do,
|
|
1001
1001
|
defaultWidth: "wide"
|
|
1002
1002
|
}),
|
|
1003
1003
|
dayPeriod: de({
|
|
1004
|
-
values:
|
|
1004
|
+
values: Po,
|
|
1005
1005
|
defaultWidth: "wide",
|
|
1006
|
-
formattingValues:
|
|
1006
|
+
formattingValues: Oo,
|
|
1007
1007
|
defaultFormattingWidth: "wide"
|
|
1008
1008
|
})
|
|
1009
1009
|
};
|
|
@@ -1012,9 +1012,9 @@ function fe(e) {
|
|
|
1012
1012
|
const n = r.width, o = n && e.matchPatterns[n] || e.matchPatterns[e.defaultMatchWidth], a = t.match(o);
|
|
1013
1013
|
if (!a)
|
|
1014
1014
|
return null;
|
|
1015
|
-
const s = a[0], i = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(i) ?
|
|
1015
|
+
const s = a[0], i = n && e.parsePatterns[n] || e.parsePatterns[e.defaultParseWidth], c = Array.isArray(i) ? Wo(i, (f) => f.test(s)) : (
|
|
1016
1016
|
// [TODO] -- I challenge you to fix the type
|
|
1017
|
-
|
|
1017
|
+
Ao(i, (f) => f.test(s))
|
|
1018
1018
|
);
|
|
1019
1019
|
let l;
|
|
1020
1020
|
l = e.valueCallback ? e.valueCallback(c) : c, l = r.valueCallback ? (
|
|
@@ -1025,17 +1025,17 @@ function fe(e) {
|
|
|
1025
1025
|
return { value: l, rest: u };
|
|
1026
1026
|
};
|
|
1027
1027
|
}
|
|
1028
|
-
function
|
|
1028
|
+
function Ao(e, t) {
|
|
1029
1029
|
for (const r in e)
|
|
1030
1030
|
if (Object.prototype.hasOwnProperty.call(e, r) && t(e[r]))
|
|
1031
1031
|
return r;
|
|
1032
1032
|
}
|
|
1033
|
-
function
|
|
1033
|
+
function Wo(e, t) {
|
|
1034
1034
|
for (let r = 0; r < e.length; r++)
|
|
1035
1035
|
if (t(e[r]))
|
|
1036
1036
|
return r;
|
|
1037
1037
|
}
|
|
1038
|
-
function
|
|
1038
|
+
function Ir(e) {
|
|
1039
1039
|
return (t, r = {}) => {
|
|
1040
1040
|
const n = t.match(e.matchPattern);
|
|
1041
1041
|
if (!n) return null;
|
|
@@ -1047,23 +1047,23 @@ function Rr(e) {
|
|
|
1047
1047
|
return { value: s, rest: i };
|
|
1048
1048
|
};
|
|
1049
1049
|
}
|
|
1050
|
-
const
|
|
1050
|
+
const _o = /^(\d+)(th|st|nd|rd)?/i, Yo = /\d+/i, Ro = {
|
|
1051
1051
|
narrow: /^(b|a)/i,
|
|
1052
1052
|
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
1053
1053
|
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
1054
|
-
},
|
|
1054
|
+
}, Io = {
|
|
1055
1055
|
any: [/^b/i, /^(a|c)/i]
|
|
1056
|
-
},
|
|
1056
|
+
}, jo = {
|
|
1057
1057
|
narrow: /^[1234]/i,
|
|
1058
1058
|
abbreviated: /^q[1234]/i,
|
|
1059
1059
|
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
1060
|
-
},
|
|
1060
|
+
}, zo = {
|
|
1061
1061
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
1062
|
-
},
|
|
1062
|
+
}, Ho = {
|
|
1063
1063
|
narrow: /^[jfmasond]/i,
|
|
1064
1064
|
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
1065
1065
|
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
1066
|
-
},
|
|
1066
|
+
}, Bo = {
|
|
1067
1067
|
narrow: [
|
|
1068
1068
|
/^j/i,
|
|
1069
1069
|
/^f/i,
|
|
@@ -1092,18 +1092,18 @@ const Mo = /^(\d+)(th|st|nd|rd)?/i, Do = /\d+/i, Po = {
|
|
|
1092
1092
|
/^n/i,
|
|
1093
1093
|
/^d/i
|
|
1094
1094
|
]
|
|
1095
|
-
},
|
|
1095
|
+
}, Vo = {
|
|
1096
1096
|
narrow: /^[smtwf]/i,
|
|
1097
1097
|
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
1098
1098
|
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
1099
1099
|
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
1100
|
-
},
|
|
1100
|
+
}, Xo = {
|
|
1101
1101
|
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
1102
1102
|
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
1103
|
-
},
|
|
1103
|
+
}, qo = {
|
|
1104
1104
|
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
1105
1105
|
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
1106
|
-
},
|
|
1106
|
+
}, Ko = {
|
|
1107
1107
|
any: {
|
|
1108
1108
|
am: /^a/i,
|
|
1109
1109
|
pm: /^p/i,
|
|
@@ -1114,78 +1114,78 @@ const Mo = /^(\d+)(th|st|nd|rd)?/i, Do = /\d+/i, Po = {
|
|
|
1114
1114
|
evening: /evening/i,
|
|
1115
1115
|
night: /night/i
|
|
1116
1116
|
}
|
|
1117
|
-
},
|
|
1118
|
-
ordinalNumber:
|
|
1119
|
-
matchPattern:
|
|
1120
|
-
parsePattern:
|
|
1117
|
+
}, Uo = {
|
|
1118
|
+
ordinalNumber: Ir({
|
|
1119
|
+
matchPattern: _o,
|
|
1120
|
+
parsePattern: Yo,
|
|
1121
1121
|
valueCallback: (e) => parseInt(e, 10)
|
|
1122
1122
|
}),
|
|
1123
1123
|
era: fe({
|
|
1124
|
-
matchPatterns:
|
|
1124
|
+
matchPatterns: Ro,
|
|
1125
1125
|
defaultMatchWidth: "wide",
|
|
1126
|
-
parsePatterns:
|
|
1126
|
+
parsePatterns: Io,
|
|
1127
1127
|
defaultParseWidth: "any"
|
|
1128
1128
|
}),
|
|
1129
1129
|
quarter: fe({
|
|
1130
|
-
matchPatterns:
|
|
1130
|
+
matchPatterns: jo,
|
|
1131
1131
|
defaultMatchWidth: "wide",
|
|
1132
|
-
parsePatterns:
|
|
1132
|
+
parsePatterns: zo,
|
|
1133
1133
|
defaultParseWidth: "any",
|
|
1134
1134
|
valueCallback: (e) => e + 1
|
|
1135
1135
|
}),
|
|
1136
1136
|
month: fe({
|
|
1137
|
-
matchPatterns:
|
|
1137
|
+
matchPatterns: Ho,
|
|
1138
1138
|
defaultMatchWidth: "wide",
|
|
1139
|
-
parsePatterns:
|
|
1139
|
+
parsePatterns: Bo,
|
|
1140
1140
|
defaultParseWidth: "any"
|
|
1141
1141
|
}),
|
|
1142
1142
|
day: fe({
|
|
1143
|
-
matchPatterns:
|
|
1143
|
+
matchPatterns: Vo,
|
|
1144
1144
|
defaultMatchWidth: "wide",
|
|
1145
|
-
parsePatterns:
|
|
1145
|
+
parsePatterns: Xo,
|
|
1146
1146
|
defaultParseWidth: "any"
|
|
1147
1147
|
}),
|
|
1148
1148
|
dayPeriod: fe({
|
|
1149
|
-
matchPatterns:
|
|
1149
|
+
matchPatterns: qo,
|
|
1150
1150
|
defaultMatchWidth: "any",
|
|
1151
|
-
parsePatterns:
|
|
1151
|
+
parsePatterns: Ko,
|
|
1152
1152
|
defaultParseWidth: "any"
|
|
1153
1153
|
})
|
|
1154
|
-
},
|
|
1154
|
+
}, jr = {
|
|
1155
1155
|
code: "en-US",
|
|
1156
|
-
formatDistance:
|
|
1157
|
-
formatLong:
|
|
1158
|
-
formatRelative:
|
|
1159
|
-
localize:
|
|
1160
|
-
match:
|
|
1156
|
+
formatDistance: yo,
|
|
1157
|
+
formatLong: $o,
|
|
1158
|
+
formatRelative: To,
|
|
1159
|
+
localize: Fo,
|
|
1160
|
+
match: Uo,
|
|
1161
1161
|
options: {
|
|
1162
1162
|
weekStartsOn: 0,
|
|
1163
1163
|
firstWeekContainsDate: 1
|
|
1164
1164
|
}
|
|
1165
1165
|
};
|
|
1166
|
-
function
|
|
1166
|
+
function Qo(e, t) {
|
|
1167
1167
|
const r = ee(e, t?.in);
|
|
1168
|
-
return
|
|
1168
|
+
return co(r, vo(r)) + 1;
|
|
1169
1169
|
}
|
|
1170
|
-
function
|
|
1171
|
-
const r = ee(e, t?.in), n = +ct(r) - +
|
|
1172
|
-
return Math.round(n /
|
|
1170
|
+
function Go(e, t) {
|
|
1171
|
+
const r = ee(e, t?.in), n = +ct(r) - +uo(r);
|
|
1172
|
+
return Math.round(n / Yr) + 1;
|
|
1173
1173
|
}
|
|
1174
|
-
function
|
|
1174
|
+
function zr(e, t) {
|
|
1175
1175
|
const r = ee(e, t?.in), n = r.getFullYear(), o = xt(), a = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? o.firstWeekContainsDate ?? o.locale?.options?.firstWeekContainsDate ?? 1, s = le(t?.in || e, 0);
|
|
1176
1176
|
s.setFullYear(n + 1, 0, a), s.setHours(0, 0, 0, 0);
|
|
1177
|
-
const i =
|
|
1177
|
+
const i = Ve(s, t), c = le(t?.in || e, 0);
|
|
1178
1178
|
c.setFullYear(n, 0, a), c.setHours(0, 0, 0, 0);
|
|
1179
|
-
const l =
|
|
1179
|
+
const l = Ve(c, t);
|
|
1180
1180
|
return +r >= +i ? n + 1 : +r >= +l ? n : n - 1;
|
|
1181
1181
|
}
|
|
1182
|
-
function
|
|
1183
|
-
const r = xt(), n = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, o =
|
|
1184
|
-
return a.setFullYear(o, 0, n), a.setHours(0, 0, 0, 0),
|
|
1182
|
+
function Jo(e, t) {
|
|
1183
|
+
const r = xt(), n = t?.firstWeekContainsDate ?? t?.locale?.options?.firstWeekContainsDate ?? r.firstWeekContainsDate ?? r.locale?.options?.firstWeekContainsDate ?? 1, o = zr(e, t), a = le(t?.in || e, 0);
|
|
1184
|
+
return a.setFullYear(o, 0, n), a.setHours(0, 0, 0, 0), Ve(a, t);
|
|
1185
1185
|
}
|
|
1186
|
-
function
|
|
1187
|
-
const r = ee(e, t?.in), n = +
|
|
1188
|
-
return Math.round(n /
|
|
1186
|
+
function Zo(e, t) {
|
|
1187
|
+
const r = ee(e, t?.in), n = +Ve(r, t) - +Jo(r, t);
|
|
1188
|
+
return Math.round(n / Yr) + 1;
|
|
1189
1189
|
}
|
|
1190
1190
|
function j(e, t) {
|
|
1191
1191
|
const r = e < 0 ? "-" : "", n = Math.abs(e).toString().padStart(t, "0");
|
|
@@ -1252,7 +1252,7 @@ const ge = {
|
|
|
1252
1252
|
afternoon: "afternoon",
|
|
1253
1253
|
evening: "evening",
|
|
1254
1254
|
night: "night"
|
|
1255
|
-
},
|
|
1255
|
+
}, lr = {
|
|
1256
1256
|
// Era
|
|
1257
1257
|
G: function(e, t, r) {
|
|
1258
1258
|
const n = e.getFullYear() > 0 ? 1 : 0;
|
|
@@ -1281,7 +1281,7 @@ const ge = {
|
|
|
1281
1281
|
},
|
|
1282
1282
|
// Local week-numbering year
|
|
1283
1283
|
Y: function(e, t, r, n) {
|
|
1284
|
-
const o =
|
|
1284
|
+
const o = zr(e, n), a = o > 0 ? o : 1 - o;
|
|
1285
1285
|
if (t === "YY") {
|
|
1286
1286
|
const s = a % 100;
|
|
1287
1287
|
return j(s, 2);
|
|
@@ -1290,7 +1290,7 @@ const ge = {
|
|
|
1290
1290
|
},
|
|
1291
1291
|
// ISO week-numbering year
|
|
1292
1292
|
R: function(e, t) {
|
|
1293
|
-
const r =
|
|
1293
|
+
const r = Rr(e);
|
|
1294
1294
|
return j(r, t.length);
|
|
1295
1295
|
},
|
|
1296
1296
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
@@ -1435,12 +1435,12 @@ const ge = {
|
|
|
1435
1435
|
},
|
|
1436
1436
|
// Local week of year
|
|
1437
1437
|
w: function(e, t, r, n) {
|
|
1438
|
-
const o =
|
|
1438
|
+
const o = Zo(e, n);
|
|
1439
1439
|
return t === "wo" ? r.ordinalNumber(o, { unit: "week" }) : j(o, t.length);
|
|
1440
1440
|
},
|
|
1441
1441
|
// ISO week of year
|
|
1442
1442
|
I: function(e, t, r) {
|
|
1443
|
-
const n =
|
|
1443
|
+
const n = Go(e);
|
|
1444
1444
|
return t === "Io" ? r.ordinalNumber(n, { unit: "week" }) : j(n, t.length);
|
|
1445
1445
|
},
|
|
1446
1446
|
// Day of the month
|
|
@@ -1449,7 +1449,7 @@ const ge = {
|
|
|
1449
1449
|
},
|
|
1450
1450
|
// Day of year
|
|
1451
1451
|
D: function(e, t, r) {
|
|
1452
|
-
const n =
|
|
1452
|
+
const n = Qo(e);
|
|
1453
1453
|
return t === "Do" ? r.ordinalNumber(n, { unit: "dayOfYear" }) : j(n, t.length);
|
|
1454
1454
|
},
|
|
1455
1455
|
// Day of week
|
|
@@ -1727,7 +1727,7 @@ const ge = {
|
|
|
1727
1727
|
switch (t) {
|
|
1728
1728
|
// Hours and optional minutes
|
|
1729
1729
|
case "X":
|
|
1730
|
-
return
|
|
1730
|
+
return ur(n);
|
|
1731
1731
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
1732
1732
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1733
1733
|
// so this token always has the same output as `XX`
|
|
@@ -1750,7 +1750,7 @@ const ge = {
|
|
|
1750
1750
|
switch (t) {
|
|
1751
1751
|
// Hours and optional minutes
|
|
1752
1752
|
case "x":
|
|
1753
|
-
return
|
|
1753
|
+
return ur(n);
|
|
1754
1754
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
1755
1755
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1756
1756
|
// so this token always has the same output as `xx`
|
|
@@ -1775,7 +1775,7 @@ const ge = {
|
|
|
1775
1775
|
case "O":
|
|
1776
1776
|
case "OO":
|
|
1777
1777
|
case "OOO":
|
|
1778
|
-
return "GMT" +
|
|
1778
|
+
return "GMT" + cr(n, ":");
|
|
1779
1779
|
// Long
|
|
1780
1780
|
case "OOOO":
|
|
1781
1781
|
default:
|
|
@@ -1790,7 +1790,7 @@ const ge = {
|
|
|
1790
1790
|
case "z":
|
|
1791
1791
|
case "zz":
|
|
1792
1792
|
case "zzz":
|
|
1793
|
-
return "GMT" +
|
|
1793
|
+
return "GMT" + cr(n, ":");
|
|
1794
1794
|
// Long
|
|
1795
1795
|
case "zzzz":
|
|
1796
1796
|
default:
|
|
@@ -1807,18 +1807,18 @@ const ge = {
|
|
|
1807
1807
|
return j(+e, t.length);
|
|
1808
1808
|
}
|
|
1809
1809
|
};
|
|
1810
|
-
function
|
|
1810
|
+
function cr(e, t = "") {
|
|
1811
1811
|
const r = e > 0 ? "-" : "+", n = Math.abs(e), o = Math.trunc(n / 60), a = n % 60;
|
|
1812
1812
|
return a === 0 ? r + String(o) : r + String(o) + t + j(a, 2);
|
|
1813
1813
|
}
|
|
1814
|
-
function
|
|
1814
|
+
function ur(e, t) {
|
|
1815
1815
|
return e % 60 === 0 ? (e > 0 ? "-" : "+") + j(Math.abs(e) / 60, 2) : Ne(e, t);
|
|
1816
1816
|
}
|
|
1817
1817
|
function Ne(e, t = "") {
|
|
1818
1818
|
const r = e > 0 ? "-" : "+", n = Math.abs(e), o = j(Math.trunc(n / 60), 2), a = j(n % 60, 2);
|
|
1819
1819
|
return r + o + t + a;
|
|
1820
1820
|
}
|
|
1821
|
-
const
|
|
1821
|
+
const dr = (e, t) => {
|
|
1822
1822
|
switch (e) {
|
|
1823
1823
|
case "P":
|
|
1824
1824
|
return t.date({ width: "short" });
|
|
@@ -1830,7 +1830,7 @@ const ur = (e, t) => {
|
|
|
1830
1830
|
default:
|
|
1831
1831
|
return t.date({ width: "full" });
|
|
1832
1832
|
}
|
|
1833
|
-
},
|
|
1833
|
+
}, Hr = (e, t) => {
|
|
1834
1834
|
switch (e) {
|
|
1835
1835
|
case "p":
|
|
1836
1836
|
return t.time({ width: "short" });
|
|
@@ -1842,10 +1842,10 @@ const ur = (e, t) => {
|
|
|
1842
1842
|
default:
|
|
1843
1843
|
return t.time({ width: "full" });
|
|
1844
1844
|
}
|
|
1845
|
-
},
|
|
1845
|
+
}, ea = (e, t) => {
|
|
1846
1846
|
const r = e.match(/(P+)(p+)?/) || [], n = r[1], o = r[2];
|
|
1847
1847
|
if (!o)
|
|
1848
|
-
return
|
|
1848
|
+
return dr(e, t);
|
|
1849
1849
|
let a;
|
|
1850
1850
|
switch (n) {
|
|
1851
1851
|
case "P":
|
|
@@ -1862,46 +1862,46 @@ const ur = (e, t) => {
|
|
|
1862
1862
|
a = t.dateTime({ width: "full" });
|
|
1863
1863
|
break;
|
|
1864
1864
|
}
|
|
1865
|
-
return a.replace("{{date}}",
|
|
1866
|
-
},
|
|
1867
|
-
p:
|
|
1868
|
-
P:
|
|
1869
|
-
},
|
|
1870
|
-
function
|
|
1871
|
-
return
|
|
1865
|
+
return a.replace("{{date}}", dr(n, t)).replace("{{time}}", Hr(o, t));
|
|
1866
|
+
}, ta = {
|
|
1867
|
+
p: Hr,
|
|
1868
|
+
P: ea
|
|
1869
|
+
}, ra = /^D+$/, na = /^Y+$/, oa = ["D", "DD", "YY", "YYYY"];
|
|
1870
|
+
function aa(e) {
|
|
1871
|
+
return ra.test(e);
|
|
1872
1872
|
}
|
|
1873
|
-
function
|
|
1874
|
-
return
|
|
1873
|
+
function sa(e) {
|
|
1874
|
+
return na.test(e);
|
|
1875
1875
|
}
|
|
1876
|
-
function
|
|
1877
|
-
const n =
|
|
1878
|
-
if (console.warn(n),
|
|
1876
|
+
function ia(e, t, r) {
|
|
1877
|
+
const n = la(e, t, r);
|
|
1878
|
+
if (console.warn(n), oa.includes(e)) throw new RangeError(n);
|
|
1879
1879
|
}
|
|
1880
|
-
function
|
|
1880
|
+
function la(e, t, r) {
|
|
1881
1881
|
const n = e[0] === "Y" ? "years" : "days of the month";
|
|
1882
1882
|
return `Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${n} to the input \`${r}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
1883
1883
|
}
|
|
1884
|
-
const
|
|
1884
|
+
const ca = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g, ua = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g, da = /^'([^]*?)'?$/, fa = /''/g, ma = /[a-zA-Z]/;
|
|
1885
1885
|
function Te(e, t, r) {
|
|
1886
|
-
const n = xt(), o = r?.locale ?? n.locale ??
|
|
1887
|
-
if (!
|
|
1886
|
+
const n = xt(), o = r?.locale ?? n.locale ?? jr, a = r?.firstWeekContainsDate ?? r?.locale?.options?.firstWeekContainsDate ?? n.firstWeekContainsDate ?? n.locale?.options?.firstWeekContainsDate ?? 1, s = r?.weekStartsOn ?? r?.locale?.options?.weekStartsOn ?? n.weekStartsOn ?? n.locale?.options?.weekStartsOn ?? 0, i = ee(e, r?.in);
|
|
1887
|
+
if (!mo(i))
|
|
1888
1888
|
throw new RangeError("Invalid time value");
|
|
1889
|
-
let c = t.match(
|
|
1889
|
+
let c = t.match(ua).map((u) => {
|
|
1890
1890
|
const f = u[0];
|
|
1891
1891
|
if (f === "p" || f === "P") {
|
|
1892
|
-
const m =
|
|
1892
|
+
const m = ta[f];
|
|
1893
1893
|
return m(u, o.formatLong);
|
|
1894
1894
|
}
|
|
1895
1895
|
return u;
|
|
1896
|
-
}).join("").match(
|
|
1896
|
+
}).join("").match(ca).map((u) => {
|
|
1897
1897
|
if (u === "''")
|
|
1898
1898
|
return { isToken: !1, value: "'" };
|
|
1899
1899
|
const f = u[0];
|
|
1900
1900
|
if (f === "'")
|
|
1901
|
-
return { isToken: !1, value:
|
|
1902
|
-
if (
|
|
1901
|
+
return { isToken: !1, value: ha(u) };
|
|
1902
|
+
if (lr[f])
|
|
1903
1903
|
return { isToken: !0, value: u };
|
|
1904
|
-
if (f.match(
|
|
1904
|
+
if (f.match(ma))
|
|
1905
1905
|
throw new RangeError(
|
|
1906
1906
|
"Format string contains an unescaped latin alphabet character `" + f + "`"
|
|
1907
1907
|
);
|
|
@@ -1916,16 +1916,16 @@ function Te(e, t, r) {
|
|
|
1916
1916
|
return c.map((u) => {
|
|
1917
1917
|
if (!u.isToken) return u.value;
|
|
1918
1918
|
const f = u.value;
|
|
1919
|
-
(!r?.useAdditionalWeekYearTokens &&
|
|
1920
|
-
const m =
|
|
1919
|
+
(!r?.useAdditionalWeekYearTokens && sa(f) || !r?.useAdditionalDayOfYearTokens && aa(f)) && ia(f, t, String(e));
|
|
1920
|
+
const m = lr[f[0]];
|
|
1921
1921
|
return m(i, f, o.localize, l);
|
|
1922
1922
|
}).join("");
|
|
1923
1923
|
}
|
|
1924
|
-
function
|
|
1925
|
-
const t = e.match(
|
|
1926
|
-
return t ? t[1].replace(
|
|
1924
|
+
function ha(e) {
|
|
1925
|
+
const t = e.match(da);
|
|
1926
|
+
return t ? t[1].replace(fa, "'") : e;
|
|
1927
1927
|
}
|
|
1928
|
-
function
|
|
1928
|
+
function fr(e, t, r) {
|
|
1929
1929
|
const [n, o] = Nt(
|
|
1930
1930
|
r?.in,
|
|
1931
1931
|
e,
|
|
@@ -1936,7 +1936,7 @@ function dr(e, t, r) {
|
|
|
1936
1936
|
function Dt(e, t, r) {
|
|
1937
1937
|
return st(e, -t, r);
|
|
1938
1938
|
}
|
|
1939
|
-
const
|
|
1939
|
+
const ba = {
|
|
1940
1940
|
lessThanXSeconds: {
|
|
1941
1941
|
one: "menos de un segundo",
|
|
1942
1942
|
other: "menos de {{count}} segundos"
|
|
@@ -1998,61 +1998,61 @@ const ia = {
|
|
|
1998
1998
|
one: "casi 1 año",
|
|
1999
1999
|
other: "casi {{count}} años"
|
|
2000
2000
|
}
|
|
2001
|
-
},
|
|
2001
|
+
}, pa = (e, t, r) => {
|
|
2002
2002
|
let n;
|
|
2003
|
-
const o =
|
|
2003
|
+
const o = ba[e];
|
|
2004
2004
|
return typeof o == "string" ? n = o : t === 1 ? n = o.one : n = o.other.replace("{{count}}", t.toString()), r?.addSuffix ? r.comparison && r.comparison > 0 ? "en " + n : "hace " + n : n;
|
|
2005
|
-
},
|
|
2005
|
+
}, ga = {
|
|
2006
2006
|
full: "EEEE, d 'de' MMMM 'de' y",
|
|
2007
2007
|
long: "d 'de' MMMM 'de' y",
|
|
2008
2008
|
medium: "d MMM y",
|
|
2009
2009
|
short: "dd/MM/y"
|
|
2010
|
-
},
|
|
2010
|
+
}, va = {
|
|
2011
2011
|
full: "HH:mm:ss zzzz",
|
|
2012
2012
|
long: "HH:mm:ss z",
|
|
2013
2013
|
medium: "HH:mm:ss",
|
|
2014
2014
|
short: "HH:mm"
|
|
2015
|
-
},
|
|
2015
|
+
}, wa = {
|
|
2016
2016
|
full: "{{date}} 'a las' {{time}}",
|
|
2017
2017
|
long: "{{date}} 'a las' {{time}}",
|
|
2018
2018
|
medium: "{{date}}, {{time}}",
|
|
2019
2019
|
short: "{{date}}, {{time}}"
|
|
2020
|
-
},
|
|
2020
|
+
}, ya = {
|
|
2021
2021
|
date: Fe({
|
|
2022
|
-
formats:
|
|
2022
|
+
formats: ga,
|
|
2023
2023
|
defaultWidth: "full"
|
|
2024
2024
|
}),
|
|
2025
2025
|
time: Fe({
|
|
2026
|
-
formats:
|
|
2026
|
+
formats: va,
|
|
2027
2027
|
defaultWidth: "full"
|
|
2028
2028
|
}),
|
|
2029
2029
|
dateTime: Fe({
|
|
2030
|
-
formats:
|
|
2030
|
+
formats: wa,
|
|
2031
2031
|
defaultWidth: "full"
|
|
2032
2032
|
})
|
|
2033
|
-
},
|
|
2033
|
+
}, xa = {
|
|
2034
2034
|
lastWeek: "'el' eeee 'pasado a la' p",
|
|
2035
2035
|
yesterday: "'ayer a la' p",
|
|
2036
2036
|
today: "'hoy a la' p",
|
|
2037
2037
|
tomorrow: "'mañana a la' p",
|
|
2038
2038
|
nextWeek: "eeee 'a la' p",
|
|
2039
2039
|
other: "P"
|
|
2040
|
-
},
|
|
2040
|
+
}, Na = {
|
|
2041
2041
|
lastWeek: "'el' eeee 'pasado a las' p",
|
|
2042
2042
|
yesterday: "'ayer a las' p",
|
|
2043
2043
|
today: "'hoy a las' p",
|
|
2044
2044
|
tomorrow: "'mañana a las' p",
|
|
2045
2045
|
nextWeek: "eeee 'a las' p",
|
|
2046
2046
|
other: "P"
|
|
2047
|
-
},
|
|
2047
|
+
}, ka = (e, t, r, n) => t.getHours() !== 1 ? Na[e] : xa[e], $a = {
|
|
2048
2048
|
narrow: ["AC", "DC"],
|
|
2049
2049
|
abbreviated: ["AC", "DC"],
|
|
2050
2050
|
wide: ["antes de cristo", "después de cristo"]
|
|
2051
|
-
},
|
|
2051
|
+
}, Ea = {
|
|
2052
2052
|
narrow: ["1", "2", "3", "4"],
|
|
2053
2053
|
abbreviated: ["T1", "T2", "T3", "T4"],
|
|
2054
2054
|
wide: ["1º trimestre", "2º trimestre", "3º trimestre", "4º trimestre"]
|
|
2055
|
-
},
|
|
2055
|
+
}, Ta = {
|
|
2056
2056
|
narrow: ["e", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
|
|
2057
2057
|
abbreviated: [
|
|
2058
2058
|
"ene",
|
|
@@ -2082,7 +2082,7 @@ const ia = {
|
|
|
2082
2082
|
"noviembre",
|
|
2083
2083
|
"diciembre"
|
|
2084
2084
|
]
|
|
2085
|
-
},
|
|
2085
|
+
}, Ca = {
|
|
2086
2086
|
narrow: ["d", "l", "m", "m", "j", "v", "s"],
|
|
2087
2087
|
short: ["do", "lu", "ma", "mi", "ju", "vi", "sá"],
|
|
2088
2088
|
abbreviated: ["dom", "lun", "mar", "mié", "jue", "vie", "sáb"],
|
|
@@ -2095,7 +2095,7 @@ const ia = {
|
|
|
2095
2095
|
"viernes",
|
|
2096
2096
|
"sábado"
|
|
2097
2097
|
]
|
|
2098
|
-
},
|
|
2098
|
+
}, Sa = {
|
|
2099
2099
|
narrow: {
|
|
2100
2100
|
am: "a",
|
|
2101
2101
|
pm: "p",
|
|
@@ -2126,7 +2126,7 @@ const ia = {
|
|
|
2126
2126
|
evening: "tarde",
|
|
2127
2127
|
night: "noche"
|
|
2128
2128
|
}
|
|
2129
|
-
},
|
|
2129
|
+
}, Ma = {
|
|
2130
2130
|
narrow: {
|
|
2131
2131
|
am: "a",
|
|
2132
2132
|
pm: "p",
|
|
@@ -2157,52 +2157,52 @@ const ia = {
|
|
|
2157
2157
|
evening: "de la tarde",
|
|
2158
2158
|
night: "de la noche"
|
|
2159
2159
|
}
|
|
2160
|
-
},
|
|
2161
|
-
ordinalNumber:
|
|
2160
|
+
}, Da = (e, t) => Number(e) + "º", Pa = {
|
|
2161
|
+
ordinalNumber: Da,
|
|
2162
2162
|
era: de({
|
|
2163
|
-
values:
|
|
2163
|
+
values: $a,
|
|
2164
2164
|
defaultWidth: "wide"
|
|
2165
2165
|
}),
|
|
2166
2166
|
quarter: de({
|
|
2167
|
-
values:
|
|
2167
|
+
values: Ea,
|
|
2168
2168
|
defaultWidth: "wide",
|
|
2169
2169
|
argumentCallback: (e) => Number(e) - 1
|
|
2170
2170
|
}),
|
|
2171
2171
|
month: de({
|
|
2172
|
-
values:
|
|
2172
|
+
values: Ta,
|
|
2173
2173
|
defaultWidth: "wide"
|
|
2174
2174
|
}),
|
|
2175
2175
|
day: de({
|
|
2176
|
-
values:
|
|
2176
|
+
values: Ca,
|
|
2177
2177
|
defaultWidth: "wide"
|
|
2178
2178
|
}),
|
|
2179
2179
|
dayPeriod: de({
|
|
2180
|
-
values:
|
|
2180
|
+
values: Sa,
|
|
2181
2181
|
defaultWidth: "wide",
|
|
2182
|
-
formattingValues:
|
|
2182
|
+
formattingValues: Ma,
|
|
2183
2183
|
defaultFormattingWidth: "wide"
|
|
2184
2184
|
})
|
|
2185
|
-
},
|
|
2185
|
+
}, Oa = /^(\d+)(º)?/i, La = /\d+/i, Fa = {
|
|
2186
2186
|
narrow: /^(ac|dc|a|d)/i,
|
|
2187
2187
|
abbreviated: /^(a\.?\s?c\.?|a\.?\s?e\.?\s?c\.?|d\.?\s?c\.?|e\.?\s?c\.?)/i,
|
|
2188
2188
|
wide: /^(antes de cristo|antes de la era com[uú]n|despu[eé]s de cristo|era com[uú]n)/i
|
|
2189
|
-
},
|
|
2189
|
+
}, Aa = {
|
|
2190
2190
|
any: [/^ac/i, /^dc/i],
|
|
2191
2191
|
wide: [
|
|
2192
2192
|
/^(antes de cristo|antes de la era com[uú]n)/i,
|
|
2193
2193
|
/^(despu[eé]s de cristo|era com[uú]n)/i
|
|
2194
2194
|
]
|
|
2195
|
-
},
|
|
2195
|
+
}, Wa = {
|
|
2196
2196
|
narrow: /^[1234]/i,
|
|
2197
2197
|
abbreviated: /^T[1234]/i,
|
|
2198
2198
|
wide: /^[1234](º)? trimestre/i
|
|
2199
|
-
},
|
|
2199
|
+
}, _a = {
|
|
2200
2200
|
any: [/1/i, /2/i, /3/i, /4/i]
|
|
2201
|
-
},
|
|
2201
|
+
}, Ya = {
|
|
2202
2202
|
narrow: /^[efmajsond]/i,
|
|
2203
2203
|
abbreviated: /^(ene|feb|mar|abr|may|jun|jul|ago|sep|oct|nov|dic)/i,
|
|
2204
2204
|
wide: /^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i
|
|
2205
|
-
},
|
|
2205
|
+
}, Ra = {
|
|
2206
2206
|
narrow: [
|
|
2207
2207
|
/^e/i,
|
|
2208
2208
|
/^f/i,
|
|
@@ -2231,18 +2231,18 @@ const ia = {
|
|
|
2231
2231
|
/^nov/i,
|
|
2232
2232
|
/^dic/i
|
|
2233
2233
|
]
|
|
2234
|
-
},
|
|
2234
|
+
}, Ia = {
|
|
2235
2235
|
narrow: /^[dlmjvs]/i,
|
|
2236
2236
|
short: /^(do|lu|ma|mi|ju|vi|s[áa])/i,
|
|
2237
2237
|
abbreviated: /^(dom|lun|mar|mi[ée]|jue|vie|s[áa]b)/i,
|
|
2238
2238
|
wide: /^(domingo|lunes|martes|mi[ée]rcoles|jueves|viernes|s[áa]bado)/i
|
|
2239
|
-
},
|
|
2239
|
+
}, ja = {
|
|
2240
2240
|
narrow: [/^d/i, /^l/i, /^m/i, /^m/i, /^j/i, /^v/i, /^s/i],
|
|
2241
2241
|
any: [/^do/i, /^lu/i, /^ma/i, /^mi/i, /^ju/i, /^vi/i, /^sa/i]
|
|
2242
|
-
},
|
|
2242
|
+
}, za = {
|
|
2243
2243
|
narrow: /^(a|p|mn|md|(de la|a las) (mañana|tarde|noche))/i,
|
|
2244
2244
|
any: /^([ap]\.?\s?m\.?|medianoche|mediodia|(de la|a las) (mañana|tarde|noche))/i
|
|
2245
|
-
},
|
|
2245
|
+
}, Ha = {
|
|
2246
2246
|
any: {
|
|
2247
2247
|
am: /^a/i,
|
|
2248
2248
|
pm: /^p/i,
|
|
@@ -2253,52 +2253,52 @@ const ia = {
|
|
|
2253
2253
|
evening: /tarde/i,
|
|
2254
2254
|
night: /noche/i
|
|
2255
2255
|
}
|
|
2256
|
-
},
|
|
2257
|
-
ordinalNumber:
|
|
2258
|
-
matchPattern:
|
|
2259
|
-
parsePattern:
|
|
2256
|
+
}, Ba = {
|
|
2257
|
+
ordinalNumber: Ir({
|
|
2258
|
+
matchPattern: Oa,
|
|
2259
|
+
parsePattern: La,
|
|
2260
2260
|
valueCallback: function(e) {
|
|
2261
2261
|
return parseInt(e, 10);
|
|
2262
2262
|
}
|
|
2263
2263
|
}),
|
|
2264
2264
|
era: fe({
|
|
2265
|
-
matchPatterns:
|
|
2265
|
+
matchPatterns: Fa,
|
|
2266
2266
|
defaultMatchWidth: "wide",
|
|
2267
|
-
parsePatterns:
|
|
2267
|
+
parsePatterns: Aa,
|
|
2268
2268
|
defaultParseWidth: "any"
|
|
2269
2269
|
}),
|
|
2270
2270
|
quarter: fe({
|
|
2271
|
-
matchPatterns:
|
|
2271
|
+
matchPatterns: Wa,
|
|
2272
2272
|
defaultMatchWidth: "wide",
|
|
2273
|
-
parsePatterns:
|
|
2273
|
+
parsePatterns: _a,
|
|
2274
2274
|
defaultParseWidth: "any",
|
|
2275
2275
|
valueCallback: (e) => e + 1
|
|
2276
2276
|
}),
|
|
2277
2277
|
month: fe({
|
|
2278
|
-
matchPatterns:
|
|
2278
|
+
matchPatterns: Ya,
|
|
2279
2279
|
defaultMatchWidth: "wide",
|
|
2280
|
-
parsePatterns:
|
|
2280
|
+
parsePatterns: Ra,
|
|
2281
2281
|
defaultParseWidth: "any"
|
|
2282
2282
|
}),
|
|
2283
2283
|
day: fe({
|
|
2284
|
-
matchPatterns:
|
|
2284
|
+
matchPatterns: Ia,
|
|
2285
2285
|
defaultMatchWidth: "wide",
|
|
2286
|
-
parsePatterns:
|
|
2286
|
+
parsePatterns: ja,
|
|
2287
2287
|
defaultParseWidth: "any"
|
|
2288
2288
|
}),
|
|
2289
2289
|
dayPeriod: fe({
|
|
2290
|
-
matchPatterns:
|
|
2290
|
+
matchPatterns: za,
|
|
2291
2291
|
defaultMatchWidth: "any",
|
|
2292
|
-
parsePatterns:
|
|
2292
|
+
parsePatterns: Ha,
|
|
2293
2293
|
defaultParseWidth: "any"
|
|
2294
2294
|
})
|
|
2295
|
-
},
|
|
2295
|
+
}, Xe = {
|
|
2296
2296
|
code: "es",
|
|
2297
|
-
formatDistance:
|
|
2298
|
-
formatLong:
|
|
2299
|
-
formatRelative:
|
|
2300
|
-
localize:
|
|
2301
|
-
match:
|
|
2297
|
+
formatDistance: pa,
|
|
2298
|
+
formatLong: ya,
|
|
2299
|
+
formatRelative: ka,
|
|
2300
|
+
localize: Pa,
|
|
2301
|
+
match: Ba,
|
|
2302
2302
|
options: {
|
|
2303
2303
|
weekStartsOn: 1,
|
|
2304
2304
|
firstWeekContainsDate: 1
|
|
@@ -2308,27 +2308,27 @@ const ia = {
|
|
|
2308
2308
|
var t;
|
|
2309
2309
|
return (t = e?.ownerDocument) !== null && t !== void 0 ? t : document;
|
|
2310
2310
|
}, dt = (e) => e && "window" in e && e.window === e ? e : Q(e).defaultView || window;
|
|
2311
|
-
function
|
|
2311
|
+
function Va(e) {
|
|
2312
2312
|
return e !== null && typeof e == "object" && "nodeType" in e && typeof e.nodeType == "number";
|
|
2313
2313
|
}
|
|
2314
|
-
function
|
|
2315
|
-
return
|
|
2314
|
+
function Xa(e) {
|
|
2315
|
+
return Va(e) && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE && "host" in e;
|
|
2316
2316
|
}
|
|
2317
|
-
let
|
|
2317
|
+
let qa = !1;
|
|
2318
2318
|
function kt() {
|
|
2319
|
-
return
|
|
2319
|
+
return qa;
|
|
2320
2320
|
}
|
|
2321
|
-
function
|
|
2321
|
+
function mr(e, t) {
|
|
2322
2322
|
if (!kt()) return t && e ? e.contains(t) : !1;
|
|
2323
2323
|
if (!e || !t) return !1;
|
|
2324
2324
|
let r = t;
|
|
2325
2325
|
for (; r !== null; ) {
|
|
2326
2326
|
if (r === e) return !0;
|
|
2327
|
-
r.tagName === "SLOT" && r.assignedSlot ? r = r.assignedSlot.parentNode :
|
|
2327
|
+
r.tagName === "SLOT" && r.assignedSlot ? r = r.assignedSlot.parentNode : Xa(r) ? r = r.host : r = r.parentNode;
|
|
2328
2328
|
}
|
|
2329
2329
|
return !1;
|
|
2330
2330
|
}
|
|
2331
|
-
const
|
|
2331
|
+
const ie = (e = document) => {
|
|
2332
2332
|
var t;
|
|
2333
2333
|
if (!kt()) return e.activeElement;
|
|
2334
2334
|
let r = e.activeElement;
|
|
@@ -2338,12 +2338,12 @@ const se = (e = document) => {
|
|
|
2338
2338
|
function Oe(e) {
|
|
2339
2339
|
return kt() && e.target.shadowRoot && e.composedPath ? e.composedPath()[0] : e.target;
|
|
2340
2340
|
}
|
|
2341
|
-
class
|
|
2341
|
+
class Ka {
|
|
2342
2342
|
get currentNode() {
|
|
2343
2343
|
return this._currentNode;
|
|
2344
2344
|
}
|
|
2345
2345
|
set currentNode(t) {
|
|
2346
|
-
if (!
|
|
2346
|
+
if (!mr(this.root, t)) throw new Error("Cannot set currentNode to a node that is not contained by the root node.");
|
|
2347
2347
|
const r = [];
|
|
2348
2348
|
let n = t, o = t;
|
|
2349
2349
|
for (this._currentNode = t; n && n !== this.root; ) if (n.nodeType === Node.DOCUMENT_FRAGMENT_NODE) {
|
|
@@ -2362,7 +2362,7 @@ class Ia {
|
|
|
2362
2362
|
}
|
|
2363
2363
|
firstChild() {
|
|
2364
2364
|
let t = this.currentNode, r = this.nextNode();
|
|
2365
|
-
return
|
|
2365
|
+
return mr(t, r) ? (r && (this.currentNode = r), r) : (this.currentNode = t, null);
|
|
2366
2366
|
}
|
|
2367
2367
|
lastChild() {
|
|
2368
2368
|
let r = this._walkerStack[0].lastChild();
|
|
@@ -2459,20 +2459,20 @@ class Ia {
|
|
|
2459
2459
|
}
|
|
2460
2460
|
}
|
|
2461
2461
|
}
|
|
2462
|
-
function
|
|
2463
|
-
return kt() ? new
|
|
2462
|
+
function Ua(e, t, r, n) {
|
|
2463
|
+
return kt() ? new Ka(e, t, r, n) : e.createTreeWalker(t, r, n);
|
|
2464
2464
|
}
|
|
2465
|
-
function
|
|
2466
|
-
if (
|
|
2465
|
+
function hr(e) {
|
|
2466
|
+
if (Qa()) e.focus({
|
|
2467
2467
|
preventScroll: !0
|
|
2468
2468
|
});
|
|
2469
2469
|
else {
|
|
2470
|
-
let t =
|
|
2471
|
-
e.focus(),
|
|
2470
|
+
let t = Ga(e);
|
|
2471
|
+
e.focus(), Ja(t);
|
|
2472
2472
|
}
|
|
2473
2473
|
}
|
|
2474
2474
|
let nt = null;
|
|
2475
|
-
function
|
|
2475
|
+
function Qa() {
|
|
2476
2476
|
if (nt == null) {
|
|
2477
2477
|
nt = !1;
|
|
2478
2478
|
try {
|
|
@@ -2486,7 +2486,7 @@ function za() {
|
|
|
2486
2486
|
}
|
|
2487
2487
|
return nt;
|
|
2488
2488
|
}
|
|
2489
|
-
function
|
|
2489
|
+
function Ga(e) {
|
|
2490
2490
|
let t = e.parentNode, r = [], n = document.scrollingElement || document.documentElement;
|
|
2491
2491
|
for (; t instanceof HTMLElement && t !== n; )
|
|
2492
2492
|
(t.offsetHeight < t.scrollHeight || t.offsetWidth < t.scrollWidth) && r.push({
|
|
@@ -2500,7 +2500,7 @@ function Ha(e) {
|
|
|
2500
2500
|
scrollLeft: n.scrollLeft
|
|
2501
2501
|
}), r;
|
|
2502
2502
|
}
|
|
2503
|
-
function
|
|
2503
|
+
function Ja(e) {
|
|
2504
2504
|
for (let { element: t, scrollTop: r, scrollLeft: n } of e)
|
|
2505
2505
|
t.scrollTop = r, t.scrollLeft = n;
|
|
2506
2506
|
}
|
|
@@ -2510,7 +2510,7 @@ function $t(e) {
|
|
|
2510
2510
|
let r = (t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.brands;
|
|
2511
2511
|
return Array.isArray(r) && r.some((n) => e.test(n.brand)) || e.test(window.navigator.userAgent);
|
|
2512
2512
|
}
|
|
2513
|
-
function
|
|
2513
|
+
function Xt(e) {
|
|
2514
2514
|
var t;
|
|
2515
2515
|
return typeof window < "u" && window.navigator != null ? e.test(((t = window.navigator.userAgentData) === null || t === void 0 ? void 0 : t.platform) || window.navigator.platform) : !1;
|
|
2516
2516
|
}
|
|
@@ -2520,31 +2520,31 @@ function pe(e) {
|
|
|
2520
2520
|
return () => (t == null && (t = e()), t);
|
|
2521
2521
|
}
|
|
2522
2522
|
const qt = pe(function() {
|
|
2523
|
-
return
|
|
2524
|
-
}),
|
|
2525
|
-
return
|
|
2526
|
-
}),
|
|
2527
|
-
return
|
|
2523
|
+
return Xt(/^Mac/i);
|
|
2524
|
+
}), Za = pe(function() {
|
|
2525
|
+
return Xt(/^iPhone/i);
|
|
2526
|
+
}), es = pe(function() {
|
|
2527
|
+
return Xt(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.
|
|
2528
2528
|
qt() && navigator.maxTouchPoints > 1;
|
|
2529
|
-
}),
|
|
2530
|
-
return
|
|
2529
|
+
}), ts = pe(function() {
|
|
2530
|
+
return Za() || es();
|
|
2531
2531
|
});
|
|
2532
2532
|
pe(function() {
|
|
2533
|
-
return qt() ||
|
|
2533
|
+
return qt() || ts();
|
|
2534
2534
|
});
|
|
2535
2535
|
pe(function() {
|
|
2536
|
-
return $t(/AppleWebKit/i) && !
|
|
2536
|
+
return $t(/AppleWebKit/i) && !Br();
|
|
2537
2537
|
});
|
|
2538
|
-
const
|
|
2538
|
+
const Br = pe(function() {
|
|
2539
2539
|
return $t(/Chrome/i);
|
|
2540
|
-
}),
|
|
2540
|
+
}), Vr = pe(function() {
|
|
2541
2541
|
return $t(/Android/i);
|
|
2542
2542
|
});
|
|
2543
2543
|
pe(function() {
|
|
2544
2544
|
return $t(/Firefox/i);
|
|
2545
2545
|
});
|
|
2546
2546
|
let we = /* @__PURE__ */ new Map(), Wt = /* @__PURE__ */ new Set();
|
|
2547
|
-
function
|
|
2547
|
+
function br() {
|
|
2548
2548
|
if (typeof window > "u") return;
|
|
2549
2549
|
function e(n) {
|
|
2550
2550
|
return "propertyName" in n;
|
|
@@ -2565,21 +2565,21 @@ function hr() {
|
|
|
2565
2565
|
};
|
|
2566
2566
|
document.body.addEventListener("transitionrun", t), document.body.addEventListener("transitionend", r);
|
|
2567
2567
|
}
|
|
2568
|
-
typeof document < "u" && (document.readyState !== "loading" ?
|
|
2569
|
-
function
|
|
2568
|
+
typeof document < "u" && (document.readyState !== "loading" ? br() : document.addEventListener("DOMContentLoaded", br));
|
|
2569
|
+
function rs() {
|
|
2570
2570
|
for (const [e] of we)
|
|
2571
2571
|
"isConnected" in e && !e.isConnected && we.delete(e);
|
|
2572
2572
|
}
|
|
2573
|
-
function
|
|
2573
|
+
function ns(e) {
|
|
2574
2574
|
requestAnimationFrame(() => {
|
|
2575
|
-
|
|
2575
|
+
rs(), we.size === 0 ? e() : Wt.add(e);
|
|
2576
2576
|
});
|
|
2577
2577
|
}
|
|
2578
|
-
function
|
|
2579
|
-
return e.pointerType === "" && e.isTrusted ? !0 :
|
|
2578
|
+
function os(e) {
|
|
2579
|
+
return e.pointerType === "" && e.isTrusted ? !0 : Vr() && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
|
|
2580
2580
|
}
|
|
2581
|
-
const
|
|
2582
|
-
function
|
|
2581
|
+
const as = typeof Element < "u" && "checkVisibility" in Element.prototype;
|
|
2582
|
+
function ss(e) {
|
|
2583
2583
|
const t = dt(e);
|
|
2584
2584
|
if (!(e instanceof t.HTMLElement) && !(e instanceof t.SVGElement)) return !1;
|
|
2585
2585
|
let { display: r, visibility: n } = e.style, o = r !== "none" && n !== "hidden" && n !== "collapse";
|
|
@@ -2590,16 +2590,16 @@ function Ja(e) {
|
|
|
2590
2590
|
}
|
|
2591
2591
|
return o;
|
|
2592
2592
|
}
|
|
2593
|
-
function
|
|
2593
|
+
function is(e, t) {
|
|
2594
2594
|
return !e.hasAttribute("hidden") && // Ignore HiddenSelect when tree walking.
|
|
2595
2595
|
!e.hasAttribute("data-react-aria-prevent-focus") && (e.nodeName === "DETAILS" && t && t.nodeName !== "SUMMARY" ? e.hasAttribute("open") : !0);
|
|
2596
2596
|
}
|
|
2597
|
-
function
|
|
2598
|
-
return
|
|
2597
|
+
function Kt(e, t) {
|
|
2598
|
+
return as ? e.checkVisibility({
|
|
2599
2599
|
visibilityProperty: !0
|
|
2600
|
-
}) && !e.closest("[data-react-aria-prevent-focus]") : e.nodeName !== "#comment" &&
|
|
2600
|
+
}) && !e.closest("[data-react-aria-prevent-focus]") : e.nodeName !== "#comment" && ss(e) && is(e, t) && (!e.parentElement || Kt(e.parentElement, e));
|
|
2601
2601
|
}
|
|
2602
|
-
const
|
|
2602
|
+
const Ut = [
|
|
2603
2603
|
"input:not([disabled]):not([type=hidden])",
|
|
2604
2604
|
"select:not([disabled])",
|
|
2605
2605
|
"textarea:not([disabled])",
|
|
@@ -2614,16 +2614,16 @@ const Kt = [
|
|
|
2614
2614
|
"video[controls]",
|
|
2615
2615
|
'[contenteditable]:not([contenteditable^="false"])',
|
|
2616
2616
|
"permission"
|
|
2617
|
-
],
|
|
2618
|
-
|
|
2619
|
-
const
|
|
2620
|
-
function
|
|
2621
|
-
return e.matches(
|
|
2617
|
+
], ls = Ut.join(":not([hidden]),") + ",[tabindex]:not([disabled]):not([hidden])";
|
|
2618
|
+
Ut.push('[tabindex]:not([tabindex="-1"]):not([disabled])');
|
|
2619
|
+
const cs = Ut.join(':not([hidden]):not([tabindex="-1"]),');
|
|
2620
|
+
function us(e) {
|
|
2621
|
+
return e.matches(ls) && Kt(e) && !Xr(e);
|
|
2622
2622
|
}
|
|
2623
|
-
function
|
|
2624
|
-
return e.matches(
|
|
2623
|
+
function ds(e) {
|
|
2624
|
+
return e.matches(cs) && Kt(e) && !Xr(e);
|
|
2625
2625
|
}
|
|
2626
|
-
function
|
|
2626
|
+
function Xr(e) {
|
|
2627
2627
|
let t = e;
|
|
2628
2628
|
for (; t != null; ) {
|
|
2629
2629
|
if (t instanceof t.ownerDocument.defaultView.HTMLElement && t.inert) return !0;
|
|
@@ -2631,86 +2631,86 @@ function Vr(e) {
|
|
|
2631
2631
|
}
|
|
2632
2632
|
return !1;
|
|
2633
2633
|
}
|
|
2634
|
-
let
|
|
2635
|
-
function
|
|
2636
|
-
for (let r of
|
|
2634
|
+
let fs = !1, Ze = null, ms = /* @__PURE__ */ new Set(), He = /* @__PURE__ */ new Map(), Ce = !1, _t = !1;
|
|
2635
|
+
function Qt(e, t) {
|
|
2636
|
+
for (let r of ms) r(e, t);
|
|
2637
2637
|
}
|
|
2638
|
-
function
|
|
2638
|
+
function hs(e) {
|
|
2639
2639
|
return !(e.metaKey || !qt() && e.altKey || e.ctrlKey || e.key === "Control" || e.key === "Shift" || e.key === "Meta");
|
|
2640
2640
|
}
|
|
2641
2641
|
function ft(e) {
|
|
2642
|
-
|
|
2642
|
+
Ce = !0, hs(e) && (Ze = "keyboard", Qt("keyboard", e));
|
|
2643
2643
|
}
|
|
2644
|
-
function
|
|
2645
|
-
|
|
2644
|
+
function oe(e) {
|
|
2645
|
+
Ze = "pointer", (e.type === "mousedown" || e.type === "pointerdown") && (Ce = !0, Qt("pointer", e));
|
|
2646
2646
|
}
|
|
2647
2647
|
function qr(e) {
|
|
2648
|
-
|
|
2648
|
+
os(e) && (Ce = !0, Ze = "virtual");
|
|
2649
2649
|
}
|
|
2650
|
-
function
|
|
2651
|
-
e.target === window || e.target === document ||
|
|
2650
|
+
function Kr(e) {
|
|
2651
|
+
e.target === window || e.target === document || fs || !e.isTrusted || (!Ce && !_t && (Ze = "virtual", Qt("virtual", e)), Ce = !1, _t = !1);
|
|
2652
2652
|
}
|
|
2653
|
-
function
|
|
2654
|
-
|
|
2653
|
+
function Ur() {
|
|
2654
|
+
Ce = !1, _t = !0;
|
|
2655
2655
|
}
|
|
2656
|
-
function
|
|
2657
|
-
if (typeof window > "u" || typeof document > "u" ||
|
|
2656
|
+
function pr(e) {
|
|
2657
|
+
if (typeof window > "u" || typeof document > "u" || He.get(dt(e))) return;
|
|
2658
2658
|
const t = dt(e), r = Q(e);
|
|
2659
2659
|
let n = t.HTMLElement.prototype.focus;
|
|
2660
2660
|
t.HTMLElement.prototype.focus = function() {
|
|
2661
|
-
|
|
2662
|
-
}, r.addEventListener("keydown", ft, !0), r.addEventListener("keyup", ft, !0), r.addEventListener("click", qr, !0), t.addEventListener("focus",
|
|
2663
|
-
|
|
2661
|
+
Ce = !0, n.apply(this, arguments);
|
|
2662
|
+
}, r.addEventListener("keydown", ft, !0), r.addEventListener("keyup", ft, !0), r.addEventListener("click", qr, !0), t.addEventListener("focus", Kr, !0), t.addEventListener("blur", Ur, !1), typeof PointerEvent < "u" ? (r.addEventListener("pointerdown", oe, !0), r.addEventListener("pointermove", oe, !0), r.addEventListener("pointerup", oe, !0)) : process.env.NODE_ENV === "test" && (r.addEventListener("mousedown", oe, !0), r.addEventListener("mousemove", oe, !0), r.addEventListener("mouseup", oe, !0)), t.addEventListener("beforeunload", () => {
|
|
2663
|
+
Qr(e);
|
|
2664
2664
|
}, {
|
|
2665
2665
|
once: !0
|
|
2666
|
-
}),
|
|
2666
|
+
}), He.set(t, {
|
|
2667
2667
|
focus: n
|
|
2668
2668
|
});
|
|
2669
2669
|
}
|
|
2670
|
-
const
|
|
2670
|
+
const Qr = (e, t) => {
|
|
2671
2671
|
const r = dt(e), n = Q(e);
|
|
2672
|
-
t && n.removeEventListener("DOMContentLoaded", t),
|
|
2672
|
+
t && n.removeEventListener("DOMContentLoaded", t), He.has(r) && (r.HTMLElement.prototype.focus = He.get(r).focus, n.removeEventListener("keydown", ft, !0), n.removeEventListener("keyup", ft, !0), n.removeEventListener("click", qr, !0), r.removeEventListener("focus", Kr, !0), r.removeEventListener("blur", Ur, !1), typeof PointerEvent < "u" ? (n.removeEventListener("pointerdown", oe, !0), n.removeEventListener("pointermove", oe, !0), n.removeEventListener("pointerup", oe, !0)) : process.env.NODE_ENV === "test" && (n.removeEventListener("mousedown", oe, !0), n.removeEventListener("mousemove", oe, !0), n.removeEventListener("mouseup", oe, !0)), He.delete(r));
|
|
2673
2673
|
};
|
|
2674
|
-
function
|
|
2674
|
+
function bs(e) {
|
|
2675
2675
|
const t = Q(e);
|
|
2676
2676
|
let r;
|
|
2677
|
-
return t.readyState !== "loading" ?
|
|
2678
|
-
|
|
2679
|
-
}, t.addEventListener("DOMContentLoaded", r)), () =>
|
|
2677
|
+
return t.readyState !== "loading" ? pr(e) : (r = () => {
|
|
2678
|
+
pr(e);
|
|
2679
|
+
}, t.addEventListener("DOMContentLoaded", r)), () => Qr(e, r);
|
|
2680
2680
|
}
|
|
2681
|
-
typeof document < "u" &&
|
|
2682
|
-
function
|
|
2683
|
-
return
|
|
2681
|
+
typeof document < "u" && bs();
|
|
2682
|
+
function Gr() {
|
|
2683
|
+
return Ze;
|
|
2684
2684
|
}
|
|
2685
|
-
function
|
|
2686
|
-
const t = Q(e), r =
|
|
2687
|
-
if (
|
|
2685
|
+
function ps(e) {
|
|
2686
|
+
const t = Q(e), r = ie(t);
|
|
2687
|
+
if (Gr() === "virtual") {
|
|
2688
2688
|
let n = r;
|
|
2689
|
-
|
|
2690
|
-
|
|
2689
|
+
ns(() => {
|
|
2690
|
+
ie(t) === n && e.isConnected && hr(e);
|
|
2691
2691
|
});
|
|
2692
|
-
} else
|
|
2692
|
+
} else hr(e);
|
|
2693
2693
|
}
|
|
2694
|
-
const
|
|
2695
|
-
let
|
|
2696
|
-
function
|
|
2697
|
-
let { children: t, contain: r, restoreFocus: n, autoFocus: o } = e, a = T(null), s = T(null), i = T([]), { parentNode: c } = vt(
|
|
2694
|
+
const gr = /* @__PURE__ */ Le.createContext(null), Yt = "react-aria-focus-scope-restore";
|
|
2695
|
+
let B = null;
|
|
2696
|
+
function gs(e) {
|
|
2697
|
+
let { children: t, contain: r, restoreFocus: n, autoFocus: o } = e, a = T(null), s = T(null), i = T([]), { parentNode: c } = vt(gr) || {}, l = te(() => new It({
|
|
2698
2698
|
scopeRef: i
|
|
2699
2699
|
}), [
|
|
2700
2700
|
i
|
|
2701
2701
|
]);
|
|
2702
2702
|
me(() => {
|
|
2703
|
-
let m = c ||
|
|
2704
|
-
if (
|
|
2705
|
-
let b =
|
|
2703
|
+
let m = c || X.root;
|
|
2704
|
+
if (X.getTreeNode(m.scopeRef) && B && !mt(B, m.scopeRef)) {
|
|
2705
|
+
let b = X.getTreeNode(B);
|
|
2706
2706
|
b && (m = b);
|
|
2707
2707
|
}
|
|
2708
|
-
m.addChild(l),
|
|
2708
|
+
m.addChild(l), X.addNode(l);
|
|
2709
2709
|
}, [
|
|
2710
2710
|
l,
|
|
2711
2711
|
c
|
|
2712
2712
|
]), me(() => {
|
|
2713
|
-
let m =
|
|
2713
|
+
let m = X.getTreeNode(i);
|
|
2714
2714
|
m && (m.contain = !!r);
|
|
2715
2715
|
}, [
|
|
2716
2716
|
r
|
|
@@ -2718,36 +2718,36 @@ function cs(e) {
|
|
|
2718
2718
|
var m;
|
|
2719
2719
|
let b = (m = a.current) === null || m === void 0 ? void 0 : m.nextSibling, h = [], v = (w) => w.stopPropagation();
|
|
2720
2720
|
for (; b && b !== s.current; )
|
|
2721
|
-
h.push(b), b.addEventListener(
|
|
2721
|
+
h.push(b), b.addEventListener(Yt, v), b = b.nextSibling;
|
|
2722
2722
|
return i.current = h, () => {
|
|
2723
|
-
for (let w of h) w.removeEventListener(
|
|
2723
|
+
for (let w of h) w.removeEventListener(Yt, v);
|
|
2724
2724
|
};
|
|
2725
2725
|
}, [
|
|
2726
2726
|
t
|
|
2727
|
-
]),
|
|
2728
|
-
const m =
|
|
2727
|
+
]), Ns(i, n, r), ys(i, r), ks(i, n, r), xs(i, o), H(() => {
|
|
2728
|
+
const m = ie(Q(i.current ? i.current[0] : void 0));
|
|
2729
2729
|
let b = null;
|
|
2730
|
-
if (
|
|
2731
|
-
for (let h of
|
|
2732
|
-
b ===
|
|
2730
|
+
if (ae(m, i.current)) {
|
|
2731
|
+
for (let h of X.traverse()) h.scopeRef && ae(m, h.scopeRef.current) && (b = h);
|
|
2732
|
+
b === X.getTreeNode(i) && (B = b.scopeRef);
|
|
2733
2733
|
}
|
|
2734
2734
|
}, [
|
|
2735
2735
|
i
|
|
2736
2736
|
]), me(() => () => {
|
|
2737
2737
|
var m, b, h;
|
|
2738
|
-
let v = (h = (b =
|
|
2739
|
-
(i ===
|
|
2738
|
+
let v = (h = (b = X.getTreeNode(i)) === null || b === void 0 || (m = b.parent) === null || m === void 0 ? void 0 : m.scopeRef) !== null && h !== void 0 ? h : null;
|
|
2739
|
+
(i === B || mt(i, B)) && (!v || X.getTreeNode(v)) && (B = v), X.removeTreeNode(i);
|
|
2740
2740
|
}, [
|
|
2741
2741
|
i
|
|
2742
2742
|
]);
|
|
2743
|
-
let u =
|
|
2743
|
+
let u = te(() => vs(i), []), f = te(() => ({
|
|
2744
2744
|
focusManager: u,
|
|
2745
2745
|
parentNode: l
|
|
2746
2746
|
}), [
|
|
2747
2747
|
l,
|
|
2748
2748
|
u
|
|
2749
2749
|
]);
|
|
2750
|
-
return /* @__PURE__ */ Le.createElement(
|
|
2750
|
+
return /* @__PURE__ */ Le.createElement(gr.Provider, {
|
|
2751
2751
|
value: f
|
|
2752
2752
|
}, /* @__PURE__ */ Le.createElement("span", {
|
|
2753
2753
|
"data-focus-scope-start": !0,
|
|
@@ -2759,27 +2759,27 @@ function cs(e) {
|
|
|
2759
2759
|
ref: s
|
|
2760
2760
|
}));
|
|
2761
2761
|
}
|
|
2762
|
-
function
|
|
2762
|
+
function vs(e) {
|
|
2763
2763
|
return {
|
|
2764
2764
|
focusNext(t = {}) {
|
|
2765
2765
|
let r = e.current, { from: n, tabbable: o, wrap: a, accept: s } = t;
|
|
2766
2766
|
var i;
|
|
2767
|
-
let c = n ||
|
|
2767
|
+
let c = n || ie(Q((i = r[0]) !== null && i !== void 0 ? i : void 0)), l = r[0].previousElementSibling, u = $e(r), f = ye(u, {
|
|
2768
2768
|
tabbable: o,
|
|
2769
2769
|
accept: s
|
|
2770
2770
|
}, r);
|
|
2771
|
-
f.currentNode =
|
|
2771
|
+
f.currentNode = ae(c, r) ? c : l;
|
|
2772
2772
|
let m = f.nextNode();
|
|
2773
2773
|
return !m && a && (f.currentNode = l, m = f.nextNode()), m && he(m, !0), m;
|
|
2774
2774
|
},
|
|
2775
2775
|
focusPrevious(t = {}) {
|
|
2776
2776
|
let r = e.current, { from: n, tabbable: o, wrap: a, accept: s } = t;
|
|
2777
2777
|
var i;
|
|
2778
|
-
let c = n ||
|
|
2778
|
+
let c = n || ie(Q((i = r[0]) !== null && i !== void 0 ? i : void 0)), l = r[r.length - 1].nextElementSibling, u = $e(r), f = ye(u, {
|
|
2779
2779
|
tabbable: o,
|
|
2780
2780
|
accept: s
|
|
2781
2781
|
}, r);
|
|
2782
|
-
f.currentNode =
|
|
2782
|
+
f.currentNode = ae(c, r) ? c : l;
|
|
2783
2783
|
let m = f.previousNode();
|
|
2784
2784
|
return !m && a && (f.currentNode = l, m = f.previousNode()), m && he(m, !0), m;
|
|
2785
2785
|
},
|
|
@@ -2806,15 +2806,15 @@ function us(e) {
|
|
|
2806
2806
|
function $e(e) {
|
|
2807
2807
|
return e[0].parentElement;
|
|
2808
2808
|
}
|
|
2809
|
-
function
|
|
2810
|
-
let t =
|
|
2809
|
+
function je(e) {
|
|
2810
|
+
let t = X.getTreeNode(B);
|
|
2811
2811
|
for (; t && t.scopeRef !== e; ) {
|
|
2812
2812
|
if (t.contain) return !1;
|
|
2813
2813
|
t = t.parent;
|
|
2814
2814
|
}
|
|
2815
2815
|
return !0;
|
|
2816
2816
|
}
|
|
2817
|
-
function
|
|
2817
|
+
function ws(e) {
|
|
2818
2818
|
if (e.checked) return !0;
|
|
2819
2819
|
let t = [];
|
|
2820
2820
|
if (!e.form) t = [
|
|
@@ -2829,7 +2829,7 @@ function ds(e) {
|
|
|
2829
2829
|
}
|
|
2830
2830
|
return t ? !t.some((a) => a.checked) : !1;
|
|
2831
2831
|
}
|
|
2832
|
-
function
|
|
2832
|
+
function ys(e, t) {
|
|
2833
2833
|
let r = T(void 0), n = T(void 0);
|
|
2834
2834
|
me(() => {
|
|
2835
2835
|
let o = e.current;
|
|
@@ -2839,9 +2839,9 @@ function fs(e, t) {
|
|
|
2839
2839
|
}
|
|
2840
2840
|
const a = Q(o ? o[0] : void 0);
|
|
2841
2841
|
let s = (l) => {
|
|
2842
|
-
if (l.key !== "Tab" || l.altKey || l.ctrlKey || l.metaKey || !
|
|
2843
|
-
let u =
|
|
2844
|
-
if (!f || !
|
|
2842
|
+
if (l.key !== "Tab" || l.altKey || l.ctrlKey || l.metaKey || !je(e) || l.isComposing) return;
|
|
2843
|
+
let u = ie(a), f = e.current;
|
|
2844
|
+
if (!f || !ae(u, f)) return;
|
|
2845
2845
|
let m = $e(f), b = ye(m, {
|
|
2846
2846
|
tabbable: !0
|
|
2847
2847
|
}, f);
|
|
@@ -2850,17 +2850,17 @@ function fs(e, t) {
|
|
|
2850
2850
|
let h = l.shiftKey ? b.previousNode() : b.nextNode();
|
|
2851
2851
|
h || (b.currentNode = l.shiftKey ? f[f.length - 1].nextElementSibling : f[0].previousElementSibling, h = l.shiftKey ? b.previousNode() : b.nextNode()), l.preventDefault(), h && he(h, !0);
|
|
2852
2852
|
}, i = (l) => {
|
|
2853
|
-
(!
|
|
2853
|
+
(!B || mt(B, e)) && ae(Oe(l), e.current) ? (B = e, r.current = Oe(l)) : je(e) && !Ee(Oe(l), e) ? r.current ? r.current.focus() : B && B.current && Rt(B.current) : je(e) && (r.current = Oe(l));
|
|
2854
2854
|
}, c = (l) => {
|
|
2855
2855
|
n.current && cancelAnimationFrame(n.current), n.current = requestAnimationFrame(() => {
|
|
2856
|
-
let u =
|
|
2857
|
-
if (!f && m &&
|
|
2858
|
-
|
|
2856
|
+
let u = Gr(), f = (u === "virtual" || u === null) && Vr() && Br(), m = ie(a);
|
|
2857
|
+
if (!f && m && je(e) && !Ee(m, e)) {
|
|
2858
|
+
B = e;
|
|
2859
2859
|
let h = Oe(l);
|
|
2860
2860
|
if (h && h.isConnected) {
|
|
2861
2861
|
var b;
|
|
2862
2862
|
r.current = h, (b = r.current) === null || b === void 0 || b.focus();
|
|
2863
|
-
} else
|
|
2863
|
+
} else B.current && Rt(B.current);
|
|
2864
2864
|
}
|
|
2865
2865
|
});
|
|
2866
2866
|
};
|
|
@@ -2876,21 +2876,21 @@ function fs(e, t) {
|
|
|
2876
2876
|
n
|
|
2877
2877
|
]);
|
|
2878
2878
|
}
|
|
2879
|
-
function
|
|
2879
|
+
function Jr(e) {
|
|
2880
2880
|
return Ee(e);
|
|
2881
2881
|
}
|
|
2882
|
-
function
|
|
2882
|
+
function ae(e, t) {
|
|
2883
2883
|
return !e || !t ? !1 : t.some((r) => r.contains(e));
|
|
2884
2884
|
}
|
|
2885
2885
|
function Ee(e, t = null) {
|
|
2886
2886
|
if (e instanceof Element && e.closest("[data-react-aria-top-layer]")) return !0;
|
|
2887
|
-
for (let { scopeRef: r } of
|
|
2888
|
-
if (r &&
|
|
2887
|
+
for (let { scopeRef: r } of X.traverse(X.getTreeNode(t)))
|
|
2888
|
+
if (r && ae(e, r.current)) return !0;
|
|
2889
2889
|
return !1;
|
|
2890
2890
|
}
|
|
2891
2891
|
function mt(e, t) {
|
|
2892
2892
|
var r;
|
|
2893
|
-
let n = (r =
|
|
2893
|
+
let n = (r = X.getTreeNode(t)) === null || r === void 0 ? void 0 : r.parent;
|
|
2894
2894
|
for (; n; ) {
|
|
2895
2895
|
if (n.scopeRef === e) return !0;
|
|
2896
2896
|
n = n.parent;
|
|
@@ -2899,7 +2899,7 @@ function mt(e, t) {
|
|
|
2899
2899
|
}
|
|
2900
2900
|
function he(e, t = !1) {
|
|
2901
2901
|
if (e != null && !t) try {
|
|
2902
|
-
|
|
2902
|
+
ps(e);
|
|
2903
2903
|
} catch {
|
|
2904
2904
|
}
|
|
2905
2905
|
else if (e != null) try {
|
|
@@ -2907,7 +2907,7 @@ function he(e, t = !1) {
|
|
|
2907
2907
|
} catch {
|
|
2908
2908
|
}
|
|
2909
2909
|
}
|
|
2910
|
-
function
|
|
2910
|
+
function Zr(e, t = !0) {
|
|
2911
2911
|
let r = e[0].previousElementSibling, n = $e(e), o = ye(n, {
|
|
2912
2912
|
tabbable: t
|
|
2913
2913
|
}, e);
|
|
@@ -2917,30 +2917,30 @@ function Jr(e, t = !0) {
|
|
|
2917
2917
|
tabbable: !1
|
|
2918
2918
|
}, e), o.currentNode = r, a = o.nextNode()), a;
|
|
2919
2919
|
}
|
|
2920
|
-
function
|
|
2921
|
-
he(
|
|
2920
|
+
function Rt(e, t = !0) {
|
|
2921
|
+
he(Zr(e, t));
|
|
2922
2922
|
}
|
|
2923
|
-
function
|
|
2923
|
+
function xs(e, t) {
|
|
2924
2924
|
const r = Le.useRef(t);
|
|
2925
|
-
|
|
2925
|
+
H(() => {
|
|
2926
2926
|
if (r.current) {
|
|
2927
|
-
|
|
2927
|
+
B = e;
|
|
2928
2928
|
const n = Q(e.current ? e.current[0] : void 0);
|
|
2929
|
-
!
|
|
2929
|
+
!ae(ie(n), B.current) && e.current && Rt(e.current);
|
|
2930
2930
|
}
|
|
2931
2931
|
r.current = !1;
|
|
2932
2932
|
}, [
|
|
2933
2933
|
e
|
|
2934
2934
|
]);
|
|
2935
2935
|
}
|
|
2936
|
-
function
|
|
2936
|
+
function Ns(e, t, r) {
|
|
2937
2937
|
me(() => {
|
|
2938
2938
|
if (t || r) return;
|
|
2939
2939
|
let n = e.current;
|
|
2940
2940
|
const o = Q(n ? n[0] : void 0);
|
|
2941
2941
|
let a = (s) => {
|
|
2942
2942
|
let i = Oe(s);
|
|
2943
|
-
|
|
2943
|
+
ae(i, e.current) ? B = e : Jr(i) || (B = null);
|
|
2944
2944
|
};
|
|
2945
2945
|
return o.addEventListener("focusin", a, !1), n?.forEach((s) => s.addEventListener("focusin", a, !1)), () => {
|
|
2946
2946
|
o.removeEventListener("focusin", a, !1), n?.forEach((s) => s.removeEventListener("focusin", a, !1));
|
|
@@ -2951,22 +2951,22 @@ function hs(e, t, r) {
|
|
|
2951
2951
|
r
|
|
2952
2952
|
]);
|
|
2953
2953
|
}
|
|
2954
|
-
function
|
|
2955
|
-
let t =
|
|
2954
|
+
function vr(e) {
|
|
2955
|
+
let t = X.getTreeNode(B);
|
|
2956
2956
|
for (; t && t.scopeRef !== e; ) {
|
|
2957
2957
|
if (t.nodeToRestore) return !1;
|
|
2958
2958
|
t = t.parent;
|
|
2959
2959
|
}
|
|
2960
2960
|
return t?.scopeRef === e;
|
|
2961
2961
|
}
|
|
2962
|
-
function
|
|
2963
|
-
const n = T(typeof document < "u" ?
|
|
2962
|
+
function ks(e, t, r) {
|
|
2963
|
+
const n = T(typeof document < "u" ? ie(Q(e.current ? e.current[0] : void 0)) : null);
|
|
2964
2964
|
me(() => {
|
|
2965
2965
|
let o = e.current;
|
|
2966
2966
|
const a = Q(o ? o[0] : void 0);
|
|
2967
2967
|
if (!t || r) return;
|
|
2968
2968
|
let s = () => {
|
|
2969
|
-
(!
|
|
2969
|
+
(!B || mt(B, e)) && ae(ie(a), e.current) && (B = e);
|
|
2970
2970
|
};
|
|
2971
2971
|
return a.addEventListener("focusin", s, !1), o?.forEach((i) => i.addEventListener("focusin", s, !1)), () => {
|
|
2972
2972
|
a.removeEventListener("focusin", s, !1), o?.forEach((i) => i.removeEventListener("focusin", s, !1));
|
|
@@ -2978,10 +2978,10 @@ function bs(e, t, r) {
|
|
|
2978
2978
|
const o = Q(e.current ? e.current[0] : void 0);
|
|
2979
2979
|
if (!t) return;
|
|
2980
2980
|
let a = (s) => {
|
|
2981
|
-
if (s.key !== "Tab" || s.altKey || s.ctrlKey || s.metaKey || !
|
|
2981
|
+
if (s.key !== "Tab" || s.altKey || s.ctrlKey || s.metaKey || !je(e) || s.isComposing) return;
|
|
2982
2982
|
let i = o.activeElement;
|
|
2983
|
-
if (!Ee(i, e) || !
|
|
2984
|
-
let c =
|
|
2983
|
+
if (!Ee(i, e) || !vr(e)) return;
|
|
2984
|
+
let c = X.getTreeNode(e);
|
|
2985
2985
|
if (!c) return;
|
|
2986
2986
|
let l = c.nodeToRestore, u = ye(o.body, {
|
|
2987
2987
|
tabbable: !0
|
|
@@ -2993,7 +2993,7 @@ function bs(e, t, r) {
|
|
|
2993
2993
|
do
|
|
2994
2994
|
f = s.shiftKey ? u.previousNode() : u.nextNode();
|
|
2995
2995
|
while (Ee(f, e));
|
|
2996
|
-
s.preventDefault(), s.stopPropagation(), f ? he(f, !0) :
|
|
2996
|
+
s.preventDefault(), s.stopPropagation(), f ? he(f, !0) : Jr(l) ? he(l, !0) : i.blur();
|
|
2997
2997
|
}
|
|
2998
2998
|
};
|
|
2999
2999
|
return r || o.addEventListener("keydown", a, !0), () => {
|
|
@@ -3006,29 +3006,29 @@ function bs(e, t, r) {
|
|
|
3006
3006
|
]), me(() => {
|
|
3007
3007
|
const o = Q(e.current ? e.current[0] : void 0);
|
|
3008
3008
|
if (!t) return;
|
|
3009
|
-
let a =
|
|
3009
|
+
let a = X.getTreeNode(e);
|
|
3010
3010
|
if (a) {
|
|
3011
3011
|
var s;
|
|
3012
3012
|
return a.nodeToRestore = (s = n.current) !== null && s !== void 0 ? s : void 0, () => {
|
|
3013
|
-
let i =
|
|
3013
|
+
let i = X.getTreeNode(e);
|
|
3014
3014
|
if (!i) return;
|
|
3015
|
-
let c = i.nodeToRestore, l =
|
|
3016
|
-
if (t && c && (l && Ee(l, e) || l === o.body &&
|
|
3017
|
-
let u =
|
|
3015
|
+
let c = i.nodeToRestore, l = ie(o);
|
|
3016
|
+
if (t && c && (l && Ee(l, e) || l === o.body && vr(e))) {
|
|
3017
|
+
let u = X.clone();
|
|
3018
3018
|
requestAnimationFrame(() => {
|
|
3019
3019
|
if (o.activeElement === o.body) {
|
|
3020
3020
|
let f = u.getTreeNode(e);
|
|
3021
3021
|
for (; f; ) {
|
|
3022
3022
|
if (f.nodeToRestore && f.nodeToRestore.isConnected) {
|
|
3023
|
-
|
|
3023
|
+
wr(f.nodeToRestore);
|
|
3024
3024
|
return;
|
|
3025
3025
|
}
|
|
3026
3026
|
f = f.parent;
|
|
3027
3027
|
}
|
|
3028
3028
|
for (f = u.getTreeNode(e); f; ) {
|
|
3029
|
-
if (f.scopeRef && f.scopeRef.current &&
|
|
3030
|
-
let m =
|
|
3031
|
-
|
|
3029
|
+
if (f.scopeRef && f.scopeRef.current && X.getTreeNode(f.scopeRef)) {
|
|
3030
|
+
let m = Zr(f.scopeRef.current, !0);
|
|
3031
|
+
wr(m);
|
|
3032
3032
|
return;
|
|
3033
3033
|
}
|
|
3034
3034
|
f = f.parent;
|
|
@@ -3043,22 +3043,22 @@ function bs(e, t, r) {
|
|
|
3043
3043
|
t
|
|
3044
3044
|
]);
|
|
3045
3045
|
}
|
|
3046
|
-
function
|
|
3047
|
-
e.dispatchEvent(new CustomEvent(
|
|
3046
|
+
function wr(e) {
|
|
3047
|
+
e.dispatchEvent(new CustomEvent(Yt, {
|
|
3048
3048
|
bubbles: !0,
|
|
3049
3049
|
cancelable: !0
|
|
3050
3050
|
})) && he(e);
|
|
3051
3051
|
}
|
|
3052
3052
|
function ye(e, t, r) {
|
|
3053
|
-
let n = t?.tabbable ?
|
|
3053
|
+
let n = t?.tabbable ? ds : us, o = e?.nodeType === Node.ELEMENT_NODE ? e : null, a = Q(o), s = Ua(a, e || a, NodeFilter.SHOW_ELEMENT, {
|
|
3054
3054
|
acceptNode(i) {
|
|
3055
3055
|
var c;
|
|
3056
|
-
return !(t == null || (c = t.from) === null || c === void 0) && c.contains(i) || t?.tabbable && i.tagName === "INPUT" && i.getAttribute("type") === "radio" && (!
|
|
3056
|
+
return !(t == null || (c = t.from) === null || c === void 0) && c.contains(i) || t?.tabbable && i.tagName === "INPUT" && i.getAttribute("type") === "radio" && (!ws(i) || s.currentNode.tagName === "INPUT" && s.currentNode.type === "radio" && s.currentNode.name === i.name) ? NodeFilter.FILTER_REJECT : n(i) && (!r || ae(i, r)) && (!t?.accept || t.accept(i)) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
3057
3057
|
}
|
|
3058
3058
|
});
|
|
3059
3059
|
return t?.from && (s.currentNode = t.from), s;
|
|
3060
3060
|
}
|
|
3061
|
-
class
|
|
3061
|
+
class Gt {
|
|
3062
3062
|
get size() {
|
|
3063
3063
|
return this.fastMap.size;
|
|
3064
3064
|
}
|
|
@@ -3068,7 +3068,7 @@ class Qt {
|
|
|
3068
3068
|
addTreeNode(t, r, n) {
|
|
3069
3069
|
let o = this.fastMap.get(r ?? null);
|
|
3070
3070
|
if (!o) return;
|
|
3071
|
-
let a = new
|
|
3071
|
+
let a = new It({
|
|
3072
3072
|
scopeRef: t
|
|
3073
3073
|
});
|
|
3074
3074
|
o.addChild(a), a.parent = o, this.fastMap.set(t, a), n && (a.nodeToRestore = n);
|
|
@@ -3081,7 +3081,7 @@ class Qt {
|
|
|
3081
3081
|
let r = this.fastMap.get(t);
|
|
3082
3082
|
if (!r) return;
|
|
3083
3083
|
let n = r.parent;
|
|
3084
|
-
for (let a of this.traverse()) a !== r && r.nodeToRestore && a.nodeToRestore && r.scopeRef && r.scopeRef.current &&
|
|
3084
|
+
for (let a of this.traverse()) a !== r && r.nodeToRestore && a.nodeToRestore && r.scopeRef && r.scopeRef.current && ae(a.nodeToRestore, r.scopeRef.current) && (a.nodeToRestore = r.nodeToRestore);
|
|
3085
3085
|
let o = r.children;
|
|
3086
3086
|
n && (n.removeChild(r), o.size > 0 && o.forEach((a) => n && n.addChild(a))), this.fastMap.delete(r.scopeRef);
|
|
3087
3087
|
}
|
|
@@ -3091,18 +3091,18 @@ class Qt {
|
|
|
3091
3091
|
}
|
|
3092
3092
|
clone() {
|
|
3093
3093
|
var t;
|
|
3094
|
-
let r = new
|
|
3094
|
+
let r = new Gt();
|
|
3095
3095
|
var n;
|
|
3096
3096
|
for (let o of this.traverse()) r.addTreeNode(o.scopeRef, (n = (t = o.parent) === null || t === void 0 ? void 0 : t.scopeRef) !== null && n !== void 0 ? n : null, o.nodeToRestore);
|
|
3097
3097
|
return r;
|
|
3098
3098
|
}
|
|
3099
3099
|
constructor() {
|
|
3100
|
-
this.fastMap = /* @__PURE__ */ new Map(), this.root = new
|
|
3100
|
+
this.fastMap = /* @__PURE__ */ new Map(), this.root = new It({
|
|
3101
3101
|
scopeRef: null
|
|
3102
3102
|
}), this.fastMap.set(null, this.root);
|
|
3103
3103
|
}
|
|
3104
3104
|
}
|
|
3105
|
-
class
|
|
3105
|
+
class It {
|
|
3106
3106
|
addChild(t) {
|
|
3107
3107
|
this.children.add(t), t.parent = this;
|
|
3108
3108
|
}
|
|
@@ -3113,8 +3113,8 @@ class Rt {
|
|
|
3113
3113
|
this.children = /* @__PURE__ */ new Set(), this.contain = !1, this.scopeRef = t.scopeRef;
|
|
3114
3114
|
}
|
|
3115
3115
|
}
|
|
3116
|
-
let
|
|
3117
|
-
const
|
|
3116
|
+
let X = new Gt();
|
|
3117
|
+
const Re = ({ children: e, node: t }) => Cr(e, t ?? document.body), $s = ({
|
|
3118
3118
|
children: e,
|
|
3119
3119
|
customTrigger: t,
|
|
3120
3120
|
triggerContent: r,
|
|
@@ -3135,12 +3135,12 @@ const Ze = ({ children: e, node: t }) => Tr(e, t ?? document.body), ps = ({
|
|
|
3135
3135
|
const {
|
|
3136
3136
|
triggerRef: w,
|
|
3137
3137
|
triggerProps: E,
|
|
3138
|
-
popoverRef:
|
|
3138
|
+
popoverRef: C,
|
|
3139
3139
|
getPopoverPosition: _,
|
|
3140
3140
|
open: D,
|
|
3141
3141
|
toggle: P,
|
|
3142
3142
|
close: x
|
|
3143
|
-
} =
|
|
3143
|
+
} = Bt({
|
|
3144
3144
|
align: n,
|
|
3145
3145
|
side: o,
|
|
3146
3146
|
offset: a,
|
|
@@ -3152,15 +3152,15 @@ const Ze = ({ children: e, node: t }) => Tr(e, t ?? document.body), ps = ({
|
|
|
3152
3152
|
m?.();
|
|
3153
3153
|
}
|
|
3154
3154
|
});
|
|
3155
|
-
|
|
3155
|
+
Zn(
|
|
3156
3156
|
{
|
|
3157
|
-
Escape: (
|
|
3158
|
-
c && (
|
|
3157
|
+
Escape: (F) => {
|
|
3158
|
+
c && (F.preventDefault(), x(), w.current?.focus());
|
|
3159
3159
|
}
|
|
3160
3160
|
},
|
|
3161
3161
|
{ enabled: D }
|
|
3162
|
-
),
|
|
3163
|
-
!l || !w.current || !D || !
|
|
3162
|
+
), Vt(C, (F) => {
|
|
3163
|
+
!l || !w.current || !D || !F.target || w.current.contains(F.target) || x();
|
|
3164
3164
|
});
|
|
3165
3165
|
const k = _();
|
|
3166
3166
|
return /* @__PURE__ */ g(gt, { children: [
|
|
@@ -3184,8 +3184,8 @@ const Ze = ({ children: e, node: t }) => Tr(e, t ?? document.body), ps = ({
|
|
|
3184
3184
|
children: r
|
|
3185
3185
|
}
|
|
3186
3186
|
),
|
|
3187
|
-
/* @__PURE__ */ d(
|
|
3188
|
-
|
|
3187
|
+
/* @__PURE__ */ d(Ye, { children: D && /* @__PURE__ */ d(Re, { children: /* @__PURE__ */ d(gs, { contain: !0, restoreFocus: !0, autoFocus: !0, children: /* @__PURE__ */ d(
|
|
3188
|
+
re.div,
|
|
3189
3189
|
{
|
|
3190
3190
|
initial: {
|
|
3191
3191
|
opacity: 0,
|
|
@@ -3203,7 +3203,7 @@ const Ze = ({ children: e, node: t }) => Tr(e, t ?? document.body), ps = ({
|
|
|
3203
3203
|
duration: 0.2,
|
|
3204
3204
|
bounce: 0.1
|
|
3205
3205
|
},
|
|
3206
|
-
ref:
|
|
3206
|
+
ref: C,
|
|
3207
3207
|
style: {
|
|
3208
3208
|
position: "fixed",
|
|
3209
3209
|
left: k.x,
|
|
@@ -3224,7 +3224,7 @@ const Ze = ({ children: e, node: t }) => Tr(e, t ?? document.body), ps = ({
|
|
|
3224
3224
|
}
|
|
3225
3225
|
) }) }) })
|
|
3226
3226
|
] });
|
|
3227
|
-
},
|
|
3227
|
+
}, Hi = ({
|
|
3228
3228
|
title: e,
|
|
3229
3229
|
subtitle: t,
|
|
3230
3230
|
onClose: r,
|
|
@@ -3242,24 +3242,24 @@ const Ze = ({ children: e, node: t }) => Tr(e, t ?? document.body), ps = ({
|
|
|
3242
3242
|
children: "×"
|
|
3243
3243
|
}
|
|
3244
3244
|
)
|
|
3245
|
-
] }) }),
|
|
3245
|
+
] }) }), Bi = ({
|
|
3246
3246
|
children: e,
|
|
3247
3247
|
className: t
|
|
3248
|
-
}) => /* @__PURE__ */ d("div", { className: N("p-4", t), children: e }),
|
|
3248
|
+
}) => /* @__PURE__ */ d("div", { className: N("p-4", t), children: e }), Vi = ({
|
|
3249
3249
|
children: e,
|
|
3250
3250
|
className: t
|
|
3251
|
-
}) => /* @__PURE__ */ d("div", { className: N("p-4 border-t border-base-4", t), children: e }),
|
|
3251
|
+
}) => /* @__PURE__ */ d("div", { className: N("p-4 border-t border-base-4", t), children: e }), Es = (e, t) => {
|
|
3252
3252
|
const r = new Date(2023, 0, 1), n = [];
|
|
3253
3253
|
for (let o = 0; o < 7; o++) {
|
|
3254
3254
|
const a = new Date(r);
|
|
3255
3255
|
a.setDate(r.getDate() + o), n.push(
|
|
3256
3256
|
Te(a, "EEE", {
|
|
3257
|
-
locale: e ??
|
|
3257
|
+
locale: e ?? jr
|
|
3258
3258
|
})
|
|
3259
3259
|
);
|
|
3260
3260
|
}
|
|
3261
3261
|
return t ? [...n.slice(1), n[0]] : n;
|
|
3262
|
-
},
|
|
3262
|
+
}, en = ({
|
|
3263
3263
|
selectedDate: e,
|
|
3264
3264
|
onDateSelect: t,
|
|
3265
3265
|
disabledDates: r,
|
|
@@ -3272,29 +3272,29 @@ const Ze = ({ children: e, node: t }) => Tr(e, t ?? document.body), ps = ({
|
|
|
3272
3272
|
}) => {
|
|
3273
3273
|
const [l, u] = z(e || /* @__PURE__ */ new Date()), [f, m] = z(
|
|
3274
3274
|
e || /* @__PURE__ */ new Date()
|
|
3275
|
-
), b = T(null), h =
|
|
3275
|
+
), b = T(null), h = te(() => r ? new Set(
|
|
3276
3276
|
r.map((x) => new Date(x).toDateString())
|
|
3277
|
-
) : /* @__PURE__ */ new Set(), [r]), v =
|
|
3278
|
-
const x =
|
|
3277
|
+
) : /* @__PURE__ */ new Set(), [r]), v = te(() => new Set(n || []), [n]), w = te(() => {
|
|
3278
|
+
const x = go(l), k = ho(l), F = new Date(x), Y = new Date(k);
|
|
3279
3279
|
if (i) {
|
|
3280
3280
|
const $ = x.getDay(), p = $ === 0 ? 6 : $ - 1;
|
|
3281
|
-
|
|
3282
|
-
const M = k.getDay(),
|
|
3283
|
-
Y.setDate(k.getDate() +
|
|
3281
|
+
F.setDate(x.getDate() - p);
|
|
3282
|
+
const M = k.getDay(), S = M === 0 ? 0 : 7 - M;
|
|
3283
|
+
Y.setDate(k.getDate() + S);
|
|
3284
3284
|
} else
|
|
3285
|
-
|
|
3286
|
-
return
|
|
3287
|
-
}, [l, i]), E =
|
|
3288
|
-
() =>
|
|
3285
|
+
F.setDate(x.getDate() - x.getDay()), Y.setDate(k.getDate() + (6 - k.getDay()));
|
|
3286
|
+
return po({ start: F, end: Y });
|
|
3287
|
+
}, [l, i]), E = te(
|
|
3288
|
+
() => Es(s ?? Xe, i),
|
|
3289
3289
|
[s, i]
|
|
3290
|
-
),
|
|
3291
|
-
const k = x.toDateString(),
|
|
3292
|
-
return !(h.has(k) || v.has(
|
|
3290
|
+
), C = (x) => {
|
|
3291
|
+
const k = x.toDateString(), F = x.getDay();
|
|
3292
|
+
return !(h.has(k) || v.has(F) || o && x < o || a && x > a);
|
|
3293
3293
|
}, _ = (x) => {
|
|
3294
|
-
|
|
3294
|
+
C(x) && t && t(x), m(x);
|
|
3295
3295
|
}, D = (x) => {
|
|
3296
3296
|
if (!f) return;
|
|
3297
|
-
let k = new Date(f),
|
|
3297
|
+
let k = new Date(f), F = !0, Y, $;
|
|
3298
3298
|
switch (x.key) {
|
|
3299
3299
|
case "ArrowUp":
|
|
3300
3300
|
k.setDate(k.getDate() - 7);
|
|
@@ -3322,12 +3322,12 @@ const Ze = ({ children: e, node: t }) => Tr(e, t ?? document.body), ps = ({
|
|
|
3322
3322
|
break;
|
|
3323
3323
|
case "Enter":
|
|
3324
3324
|
case " ":
|
|
3325
|
-
|
|
3325
|
+
C(f) && t && t(f);
|
|
3326
3326
|
break;
|
|
3327
3327
|
default:
|
|
3328
|
-
|
|
3328
|
+
F = !1;
|
|
3329
3329
|
}
|
|
3330
|
-
|
|
3330
|
+
F && (x.preventDefault(), k.getTime() !== f.getTime() && (m(k), fr(k, l) || u(k)));
|
|
3331
3331
|
}, P = (x) => {
|
|
3332
3332
|
u(
|
|
3333
3333
|
(k) => x === "prev" ? Dt(k, 1) : st(k, 1)
|
|
@@ -3363,7 +3363,7 @@ const Ze = ({ children: e, node: t }) => Tr(e, t ?? document.body), ps = ({
|
|
|
3363
3363
|
onClick: () => P("next"),
|
|
3364
3364
|
size: "iconSm",
|
|
3365
3365
|
"aria-label": "Next month",
|
|
3366
|
-
children: /* @__PURE__ */ d(
|
|
3366
|
+
children: /* @__PURE__ */ d(Mr, { size: 16 })
|
|
3367
3367
|
}
|
|
3368
3368
|
)
|
|
3369
3369
|
] }),
|
|
@@ -3377,7 +3377,7 @@ const Ze = ({ children: e, node: t }) => Tr(e, t ?? document.body), ps = ({
|
|
|
3377
3377
|
x
|
|
3378
3378
|
)) }),
|
|
3379
3379
|
/* @__PURE__ */ d("div", { className: "grid grid-cols-7 gap-1 mt-4", role: "grid", children: w.map((x, k) => {
|
|
3380
|
-
const
|
|
3380
|
+
const F = fr(x, l), Y = e ? Mt(x, e) : !1, $ = f && Mt(x, f), p = C(x), M = Mt(x, /* @__PURE__ */ new Date());
|
|
3381
3381
|
return /* @__PURE__ */ d(
|
|
3382
3382
|
"button",
|
|
3383
3383
|
{
|
|
@@ -3395,9 +3395,9 @@ const Ze = ({ children: e, node: t }) => Tr(e, t ?? document.body), ps = ({
|
|
|
3395
3395
|
"aria-disabled": !p,
|
|
3396
3396
|
className: N(
|
|
3397
3397
|
"h-8 w-8 flex items-center outline-none justify-center rounded-6 hover:bg-base-4 text-sm relative",
|
|
3398
|
-
|
|
3398
|
+
F ? Y ? "bg-brand text-brand-text hover:bg-brand" : M ? "text-base-12 ring-1 ring-base-8" : "text-base-12" : "text-base-9",
|
|
3399
3399
|
$ && "ring-1 ring-base-6",
|
|
3400
|
-
(!p || !
|
|
3400
|
+
(!p || !F) && "pointer-events-none text-base-9"
|
|
3401
3401
|
),
|
|
3402
3402
|
children: Te(x, "d")
|
|
3403
3403
|
},
|
|
@@ -3407,14 +3407,14 @@ const Ze = ({ children: e, node: t }) => Tr(e, t ?? document.body), ps = ({
|
|
|
3407
3407
|
]
|
|
3408
3408
|
}
|
|
3409
3409
|
);
|
|
3410
|
-
},
|
|
3410
|
+
}, Xi = () => {
|
|
3411
3411
|
const [e, t] = z(
|
|
3412
3412
|
new Date(2025, 8, 21)
|
|
3413
3413
|
);
|
|
3414
3414
|
return /* @__PURE__ */ d("div", { className: "p-8 bg-gray-100 min-h-screen", children: /* @__PURE__ */ g("div", { className: "max-w-md mx-auto", children: [
|
|
3415
3415
|
/* @__PURE__ */ d("h1", { className: "text-2xl font-bold mb-6 text-gray-800", children: "Calendar Date Picker Demo" }),
|
|
3416
3416
|
/* @__PURE__ */ d("div", { className: "mb-6", children: /* @__PURE__ */ d(
|
|
3417
|
-
|
|
3417
|
+
en,
|
|
3418
3418
|
{
|
|
3419
3419
|
selectedDate: e,
|
|
3420
3420
|
onDateSelect: t,
|
|
@@ -3480,13 +3480,13 @@ const Ze = ({ children: e, node: t }) => Tr(e, t ?? document.body), ps = ({
|
|
|
3480
3480
|
] })
|
|
3481
3481
|
] }) });
|
|
3482
3482
|
};
|
|
3483
|
-
function
|
|
3483
|
+
function qi({
|
|
3484
3484
|
customTrigger: e,
|
|
3485
3485
|
scrollerId: t
|
|
3486
3486
|
}) {
|
|
3487
3487
|
const [r, n] = z(/* @__PURE__ */ new Date());
|
|
3488
3488
|
return /* @__PURE__ */ d(
|
|
3489
|
-
|
|
3489
|
+
$s,
|
|
3490
3490
|
{
|
|
3491
3491
|
className: "p-0",
|
|
3492
3492
|
scrollerId: t,
|
|
@@ -3498,14 +3498,14 @@ function Ai({
|
|
|
3498
3498
|
color: "solid",
|
|
3499
3499
|
className: "px-3 mt-1 w-full justify-start",
|
|
3500
3500
|
children: [
|
|
3501
|
-
Te(/* @__PURE__ */ new Date(), "PP", { locale:
|
|
3501
|
+
Te(/* @__PURE__ */ new Date(), "PP", { locale: Xe }),
|
|
3502
3502
|
/* @__PURE__ */ d("span", { className: "grow" }),
|
|
3503
|
-
/* @__PURE__ */ d(
|
|
3503
|
+
/* @__PURE__ */ d(Dr, { size: 18, className: "text-base-11" })
|
|
3504
3504
|
]
|
|
3505
3505
|
}
|
|
3506
3506
|
),
|
|
3507
3507
|
children: (o) => /* @__PURE__ */ d(
|
|
3508
|
-
|
|
3508
|
+
en,
|
|
3509
3509
|
{
|
|
3510
3510
|
selectedDate: r,
|
|
3511
3511
|
onDateSelect: (a) => {
|
|
@@ -3518,28 +3518,28 @@ function Ai({
|
|
|
3518
3518
|
}
|
|
3519
3519
|
);
|
|
3520
3520
|
}
|
|
3521
|
-
const
|
|
3521
|
+
const Ki = () => /* @__PURE__ */ g("div", { children: [
|
|
3522
3522
|
/* @__PURE__ */ d("p", { className: "text-xs font-medium ml-0.5", children: "Start Time" }),
|
|
3523
3523
|
/* @__PURE__ */ g(U, { color: "solid", className: "px-3 mt-1", children: [
|
|
3524
|
-
Te(/* @__PURE__ */ new Date(), "p", { locale:
|
|
3524
|
+
Te(/* @__PURE__ */ new Date(), "p", { locale: Xe }),
|
|
3525
3525
|
/* @__PURE__ */ d("span", { className: "grow" }),
|
|
3526
|
-
/* @__PURE__ */ d(
|
|
3526
|
+
/* @__PURE__ */ d(Pr, { size: 18, className: "text-base-11" })
|
|
3527
3527
|
] })
|
|
3528
|
-
] }),
|
|
3528
|
+
] }), Ui = () => /* @__PURE__ */ g("div", { className: "flex items-center gap-x-4", children: [
|
|
3529
3529
|
/* @__PURE__ */ g("div", { className: "grow", children: [
|
|
3530
3530
|
/* @__PURE__ */ d("p", { className: "text-xs font-medium ml-0.5", children: "Start Date" }),
|
|
3531
3531
|
/* @__PURE__ */ g(U, { color: "solid", className: "px-3 mt-1 w-full justify-start", children: [
|
|
3532
|
-
Te(/* @__PURE__ */ new Date(), "PP", { locale:
|
|
3532
|
+
Te(/* @__PURE__ */ new Date(), "PP", { locale: Xe }),
|
|
3533
3533
|
/* @__PURE__ */ d("span", { className: "grow" }),
|
|
3534
|
-
/* @__PURE__ */ d(
|
|
3534
|
+
/* @__PURE__ */ d(Dr, { size: 18, className: "text-base-11" })
|
|
3535
3535
|
] })
|
|
3536
3536
|
] }),
|
|
3537
3537
|
/* @__PURE__ */ g("div", { children: [
|
|
3538
3538
|
/* @__PURE__ */ d("p", { className: "text-xs font-medium ml-0.5", children: "Start Time" }),
|
|
3539
3539
|
/* @__PURE__ */ g(U, { color: "solid", className: "px-3 mt-1", children: [
|
|
3540
|
-
Te(/* @__PURE__ */ new Date(), "p", { locale:
|
|
3540
|
+
Te(/* @__PURE__ */ new Date(), "p", { locale: Xe }),
|
|
3541
3541
|
/* @__PURE__ */ d("span", { className: "grow" }),
|
|
3542
|
-
/* @__PURE__ */ d(
|
|
3542
|
+
/* @__PURE__ */ d(Pr, { size: 18, className: "text-base-11" })
|
|
3543
3543
|
] })
|
|
3544
3544
|
] })
|
|
3545
3545
|
] }), ot = {
|
|
@@ -3547,7 +3547,7 @@ const _i = () => /* @__PURE__ */ g("div", { children: [
|
|
|
3547
3547
|
checked: "bg-brand lg:hover:bg-brand-hover text-brand-text",
|
|
3548
3548
|
uncheckedDisabled: "bg-base-3 border-base-4",
|
|
3549
3549
|
checkedDisabled: "bg-base-3 border-base-4 text-base-10"
|
|
3550
|
-
},
|
|
3550
|
+
}, Ts = Ue(
|
|
3551
3551
|
({
|
|
3552
3552
|
checked: e = !1,
|
|
3553
3553
|
onCheckedChange: t,
|
|
@@ -3604,14 +3604,14 @@ const _i = () => /* @__PURE__ */ g("div", { children: [
|
|
|
3604
3604
|
...l,
|
|
3605
3605
|
children: [
|
|
3606
3606
|
e === !0 && /* @__PURE__ */ d(
|
|
3607
|
-
|
|
3607
|
+
Or,
|
|
3608
3608
|
{
|
|
3609
3609
|
size: h[c],
|
|
3610
3610
|
className: "stroke-current"
|
|
3611
3611
|
}
|
|
3612
3612
|
),
|
|
3613
3613
|
e === "indeterminate" && /* @__PURE__ */ d(
|
|
3614
|
-
|
|
3614
|
+
Mn,
|
|
3615
3615
|
{
|
|
3616
3616
|
size: h[c],
|
|
3617
3617
|
className: "stroke-current"
|
|
@@ -3639,8 +3639,8 @@ const _i = () => /* @__PURE__ */ g("div", { children: [
|
|
|
3639
3639
|
] });
|
|
3640
3640
|
}
|
|
3641
3641
|
);
|
|
3642
|
-
|
|
3643
|
-
const
|
|
3642
|
+
Ts.displayName = "Checkbox";
|
|
3643
|
+
const Qi = ({
|
|
3644
3644
|
title: e,
|
|
3645
3645
|
message: t,
|
|
3646
3646
|
searchParam: r,
|
|
@@ -3651,13 +3651,13 @@ const Ri = ({
|
|
|
3651
3651
|
confirmAction: i,
|
|
3652
3652
|
trigger: c
|
|
3653
3653
|
}) => {
|
|
3654
|
-
const { searchParams: l } =
|
|
3654
|
+
const { searchParams: l } = zn(), u = te(() => !!l[r], [l]), f = L(() => {
|
|
3655
3655
|
ke.to(`${window.location.pathname}?${r}=open`);
|
|
3656
3656
|
}, [r]);
|
|
3657
3657
|
return /* @__PURE__ */ g(gt, { children: [
|
|
3658
|
-
/* @__PURE__ */ d(
|
|
3658
|
+
/* @__PURE__ */ d(Ye, { initial: !1, children: u && n ? /* @__PURE__ */ g(Re, { node: document && document.getElementById("modals"), children: [
|
|
3659
3659
|
/* @__PURE__ */ d(
|
|
3660
|
-
|
|
3660
|
+
re.div,
|
|
3661
3661
|
{
|
|
3662
3662
|
initial: { opacity: 0 },
|
|
3663
3663
|
animate: { opacity: 1 },
|
|
@@ -3666,7 +3666,7 @@ const Ri = ({
|
|
|
3666
3666
|
}
|
|
3667
3667
|
),
|
|
3668
3668
|
/* @__PURE__ */ g(
|
|
3669
|
-
|
|
3669
|
+
re.div,
|
|
3670
3670
|
{
|
|
3671
3671
|
initial: { opacity: 0 },
|
|
3672
3672
|
animate: { opacity: 1 },
|
|
@@ -3703,16 +3703,16 @@ const Ri = ({
|
|
|
3703
3703
|
] }) : null }),
|
|
3704
3704
|
c ? c(f) : null
|
|
3705
3705
|
] });
|
|
3706
|
-
},
|
|
3706
|
+
}, Gi = ({
|
|
3707
3707
|
scrollY: e,
|
|
3708
3708
|
height: t = 300,
|
|
3709
3709
|
className: r,
|
|
3710
3710
|
children: n
|
|
3711
3711
|
}) => {
|
|
3712
|
-
const o =
|
|
3713
|
-
return /* @__PURE__ */ d(
|
|
3712
|
+
const o = rr(e, (s) => s < 0 ? 1 + Math.abs(s) / t : 1), a = rr(e, (s) => s < 0 ? -Math.abs(s) / 2 : 0);
|
|
3713
|
+
return /* @__PURE__ */ d(re.div, { style: { scale: o, y: a, height: t }, className: r, children: n });
|
|
3714
3714
|
};
|
|
3715
|
-
function
|
|
3715
|
+
function tn(e, t, r) {
|
|
3716
3716
|
function n(i, c) {
|
|
3717
3717
|
var l;
|
|
3718
3718
|
Object.defineProperty(i, "_zod", {
|
|
@@ -3739,24 +3739,24 @@ function en(e, t, r) {
|
|
|
3739
3739
|
value: (i) => r?.Parent && i instanceof r.Parent ? !0 : i?._zod?.traits?.has(e)
|
|
3740
3740
|
}), Object.defineProperty(s, "name", { value: e }), s;
|
|
3741
3741
|
}
|
|
3742
|
-
class
|
|
3742
|
+
class Cs extends Error {
|
|
3743
3743
|
constructor() {
|
|
3744
3744
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
3745
3745
|
}
|
|
3746
3746
|
}
|
|
3747
|
-
const
|
|
3748
|
-
function
|
|
3749
|
-
return
|
|
3747
|
+
const Ss = {};
|
|
3748
|
+
function rn(e) {
|
|
3749
|
+
return Ss;
|
|
3750
3750
|
}
|
|
3751
|
-
function
|
|
3751
|
+
function Ms(e, t) {
|
|
3752
3752
|
return typeof t == "bigint" ? t.toString() : t;
|
|
3753
3753
|
}
|
|
3754
|
-
const
|
|
3754
|
+
const nn = Error.captureStackTrace ? Error.captureStackTrace : (...e) => {
|
|
3755
3755
|
};
|
|
3756
3756
|
function at(e) {
|
|
3757
3757
|
return typeof e == "string" ? e : e?.message;
|
|
3758
3758
|
}
|
|
3759
|
-
function
|
|
3759
|
+
function on(e, t, r) {
|
|
3760
3760
|
const n = { ...e, path: e.path ?? [] };
|
|
3761
3761
|
if (!e.message) {
|
|
3762
3762
|
const o = at(e.inst?._zod.def?.error?.(e)) ?? at(t?.error?.(e)) ?? at(r.customError?.(e)) ?? at(r.localeError?.(e)) ?? "Invalid input";
|
|
@@ -3764,7 +3764,7 @@ function nn(e, t, r) {
|
|
|
3764
3764
|
}
|
|
3765
3765
|
return delete n.inst, delete n.continue, t?.reportInput || delete n.input, n;
|
|
3766
3766
|
}
|
|
3767
|
-
const
|
|
3767
|
+
const an = (e, t) => {
|
|
3768
3768
|
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
3769
3769
|
value: e._zod,
|
|
3770
3770
|
enumerable: !1
|
|
@@ -3773,7 +3773,7 @@ const on = (e, t) => {
|
|
|
3773
3773
|
enumerable: !1
|
|
3774
3774
|
}), Object.defineProperty(e, "message", {
|
|
3775
3775
|
get() {
|
|
3776
|
-
return JSON.stringify(t,
|
|
3776
|
+
return JSON.stringify(t, Ms, 2);
|
|
3777
3777
|
},
|
|
3778
3778
|
enumerable: !0
|
|
3779
3779
|
// configurable: false,
|
|
@@ -3781,25 +3781,25 @@ const on = (e, t) => {
|
|
|
3781
3781
|
value: () => e.message,
|
|
3782
3782
|
enumerable: !1
|
|
3783
3783
|
});
|
|
3784
|
-
},
|
|
3784
|
+
}, Ds = tn("$ZodError", an), sn = tn("$ZodError", an, { Parent: Error }), Ps = (e) => (t, r, n, o) => {
|
|
3785
3785
|
const a = n ? Object.assign(n, { async: !1 }) : { async: !1 }, s = t._zod.run({ value: r, issues: [] }, a);
|
|
3786
3786
|
if (s instanceof Promise)
|
|
3787
|
-
throw new
|
|
3787
|
+
throw new Cs();
|
|
3788
3788
|
if (s.issues.length) {
|
|
3789
|
-
const i = new (o?.Err ?? e)(s.issues.map((c) =>
|
|
3790
|
-
throw
|
|
3789
|
+
const i = new (o?.Err ?? e)(s.issues.map((c) => on(c, a, rn())));
|
|
3790
|
+
throw nn(i, o?.callee), i;
|
|
3791
3791
|
}
|
|
3792
3792
|
return s.value;
|
|
3793
|
-
},
|
|
3793
|
+
}, Os = /* @__PURE__ */ Ps(sn), Ls = (e) => async (t, r, n, o) => {
|
|
3794
3794
|
const a = n ? Object.assign(n, { async: !0 }) : { async: !0 };
|
|
3795
3795
|
let s = t._zod.run({ value: r, issues: [] }, a);
|
|
3796
3796
|
if (s instanceof Promise && (s = await s), s.issues.length) {
|
|
3797
|
-
const i = new (o?.Err ?? e)(s.issues.map((c) =>
|
|
3798
|
-
throw
|
|
3797
|
+
const i = new (o?.Err ?? e)(s.issues.map((c) => on(c, a, rn())));
|
|
3798
|
+
throw nn(i, o?.callee), i;
|
|
3799
3799
|
}
|
|
3800
3800
|
return s.value;
|
|
3801
|
-
},
|
|
3802
|
-
function
|
|
3801
|
+
}, Fs = /* @__PURE__ */ Ls(sn);
|
|
3802
|
+
function yr(e, t) {
|
|
3803
3803
|
try {
|
|
3804
3804
|
var r = e();
|
|
3805
3805
|
} catch (n) {
|
|
@@ -3807,7 +3807,7 @@ function wr(e, t) {
|
|
|
3807
3807
|
}
|
|
3808
3808
|
return r && r.then ? r.then(void 0, t) : r;
|
|
3809
3809
|
}
|
|
3810
|
-
function
|
|
3810
|
+
function As(e, t) {
|
|
3811
3811
|
for (var r = {}; e.length; ) {
|
|
3812
3812
|
var n = e[0], o = n.code, a = n.message, s = n.path.join(".");
|
|
3813
3813
|
if (!r[s]) if ("unionErrors" in n) {
|
|
@@ -3820,13 +3820,13 @@ function Ss(e, t) {
|
|
|
3820
3820
|
});
|
|
3821
3821
|
}), t) {
|
|
3822
3822
|
var c = r[s].types, l = c && c[n.code];
|
|
3823
|
-
r[s] =
|
|
3823
|
+
r[s] = Fr(s, t, r, o, l ? [].concat(l, n.message) : n.message);
|
|
3824
3824
|
}
|
|
3825
3825
|
e.shift();
|
|
3826
3826
|
}
|
|
3827
3827
|
return r;
|
|
3828
3828
|
}
|
|
3829
|
-
function
|
|
3829
|
+
function Ws(e, t) {
|
|
3830
3830
|
for (var r = {}; e.length; ) {
|
|
3831
3831
|
var n = e[0], o = n.code, a = n.message, s = n.path.join(".");
|
|
3832
3832
|
if (!r[s]) if (n.code === "invalid_union" && n.errors.length > 0) {
|
|
@@ -3839,25 +3839,25 @@ function Cs(e, t) {
|
|
|
3839
3839
|
});
|
|
3840
3840
|
}), t) {
|
|
3841
3841
|
var c = r[s].types, l = c && c[n.code];
|
|
3842
|
-
r[s] =
|
|
3842
|
+
r[s] = Fr(s, t, r, o, l ? [].concat(l, n.message) : n.message);
|
|
3843
3843
|
}
|
|
3844
3844
|
e.shift();
|
|
3845
3845
|
}
|
|
3846
3846
|
return r;
|
|
3847
3847
|
}
|
|
3848
|
-
function
|
|
3848
|
+
function _s(e, t, r) {
|
|
3849
3849
|
if (r === void 0 && (r = {}), (function(n) {
|
|
3850
3850
|
return "_def" in n && typeof n._def == "object" && "typeName" in n._def;
|
|
3851
3851
|
})(e)) return function(n, o, a) {
|
|
3852
3852
|
try {
|
|
3853
|
-
return Promise.resolve(
|
|
3853
|
+
return Promise.resolve(yr(function() {
|
|
3854
3854
|
return Promise.resolve(e[r.mode === "sync" ? "parse" : "parseAsync"](n, t)).then(function(s) {
|
|
3855
|
-
return a.shouldUseNativeValidation &&
|
|
3855
|
+
return a.shouldUseNativeValidation && nr({}, a), { errors: {}, values: r.raw ? Object.assign({}, n) : s };
|
|
3856
3856
|
});
|
|
3857
3857
|
}, function(s) {
|
|
3858
3858
|
if ((function(i) {
|
|
3859
3859
|
return Array.isArray(i?.issues);
|
|
3860
|
-
})(s)) return { values: {}, errors:
|
|
3860
|
+
})(s)) return { values: {}, errors: or(As(s.errors, !a.shouldUseNativeValidation && a.criteriaMode === "all"), a) };
|
|
3861
3861
|
throw s;
|
|
3862
3862
|
}));
|
|
3863
3863
|
} catch (s) {
|
|
@@ -3868,14 +3868,14 @@ function Ms(e, t, r) {
|
|
|
3868
3868
|
return "_zod" in n && typeof n._zod == "object";
|
|
3869
3869
|
})(e)) return function(n, o, a) {
|
|
3870
3870
|
try {
|
|
3871
|
-
return Promise.resolve(
|
|
3872
|
-
return Promise.resolve((r.mode === "sync" ?
|
|
3873
|
-
return a.shouldUseNativeValidation &&
|
|
3871
|
+
return Promise.resolve(yr(function() {
|
|
3872
|
+
return Promise.resolve((r.mode === "sync" ? Os : Fs)(e, n, t)).then(function(s) {
|
|
3873
|
+
return a.shouldUseNativeValidation && nr({}, a), { errors: {}, values: r.raw ? Object.assign({}, n) : s };
|
|
3874
3874
|
});
|
|
3875
3875
|
}, function(s) {
|
|
3876
3876
|
if ((function(i) {
|
|
3877
|
-
return i instanceof
|
|
3878
|
-
})(s)) return { values: {}, errors:
|
|
3877
|
+
return i instanceof Ds;
|
|
3878
|
+
})(s)) return { values: {}, errors: or(Ws(s.issues, !a.shouldUseNativeValidation && a.criteriaMode === "all"), a) };
|
|
3879
3879
|
throw s;
|
|
3880
3880
|
}));
|
|
3881
3881
|
} catch (s) {
|
|
@@ -3884,7 +3884,7 @@ function Ms(e, t, r) {
|
|
|
3884
3884
|
};
|
|
3885
3885
|
throw new Error("Invalid input: not a Zod schema");
|
|
3886
3886
|
}
|
|
3887
|
-
function
|
|
3887
|
+
function Ji({
|
|
3888
3888
|
methods: e,
|
|
3889
3889
|
onSubmit: t,
|
|
3890
3890
|
onError: r,
|
|
@@ -3892,7 +3892,7 @@ function ji({
|
|
|
3892
3892
|
logErrors: o,
|
|
3893
3893
|
className: a
|
|
3894
3894
|
}) {
|
|
3895
|
-
return /* @__PURE__ */ d(
|
|
3895
|
+
return /* @__PURE__ */ d(Bn, { ...e, children: /* @__PURE__ */ d(
|
|
3896
3896
|
"form",
|
|
3897
3897
|
{
|
|
3898
3898
|
className: N(
|
|
@@ -3909,13 +3909,13 @@ function ji({
|
|
|
3909
3909
|
}
|
|
3910
3910
|
) });
|
|
3911
3911
|
}
|
|
3912
|
-
function
|
|
3913
|
-
return
|
|
3914
|
-
resolver:
|
|
3912
|
+
function Zi(e, t) {
|
|
3913
|
+
return Vn({
|
|
3914
|
+
resolver: _s(e),
|
|
3915
3915
|
defaultValues: t
|
|
3916
3916
|
});
|
|
3917
3917
|
}
|
|
3918
|
-
const
|
|
3918
|
+
const Ys = ({
|
|
3919
3919
|
children: e,
|
|
3920
3920
|
size: t = 24,
|
|
3921
3921
|
strokeWidth: r = 2,
|
|
@@ -3933,13 +3933,13 @@ const Ds = ({
|
|
|
3933
3933
|
...a,
|
|
3934
3934
|
children: e
|
|
3935
3935
|
}
|
|
3936
|
-
),
|
|
3936
|
+
), Rs = {
|
|
3937
3937
|
solid: "bg-base-3 border border-base-4 drop-shadow-sm dark-theme:drop-shadow-none",
|
|
3938
3938
|
outline: "border border-base-6"
|
|
3939
|
-
},
|
|
3939
|
+
}, Is = {
|
|
3940
3940
|
brand: "ring-1 ring-brand",
|
|
3941
3941
|
solid: "ring-1 ring-base-6"
|
|
3942
|
-
},
|
|
3942
|
+
}, ln = Ue(
|
|
3943
3943
|
({
|
|
3944
3944
|
label: e,
|
|
3945
3945
|
description: t,
|
|
@@ -3959,14 +3959,14 @@ const Ds = ({
|
|
|
3959
3959
|
value: v,
|
|
3960
3960
|
...w
|
|
3961
3961
|
}, E) => {
|
|
3962
|
-
const
|
|
3963
|
-
return
|
|
3962
|
+
const C = T(null), _ = T(!1), [D, P] = z(!1), [x, k] = z(!1), F = h === "password", Y = F && D ? "text" : l ? "number" : h, $ = v !== "" && v !== null && v !== void 0;
|
|
3963
|
+
return H(() => {
|
|
3964
3964
|
if (!_.current) {
|
|
3965
3965
|
_.current = !0;
|
|
3966
3966
|
return;
|
|
3967
3967
|
}
|
|
3968
|
-
|
|
3969
|
-
}, [D,
|
|
3968
|
+
C.current && qn(C.current);
|
|
3969
|
+
}, [D, C]), /* @__PURE__ */ g("div", { className: N("relative", f), children: [
|
|
3970
3970
|
e && r === "default" && /* @__PURE__ */ d(
|
|
3971
3971
|
"label",
|
|
3972
3972
|
{
|
|
@@ -3979,10 +3979,10 @@ const Ds = ({
|
|
|
3979
3979
|
{
|
|
3980
3980
|
className: N(
|
|
3981
3981
|
"rounded-6 transition cursor-text relative",
|
|
3982
|
-
|
|
3982
|
+
Rs[n],
|
|
3983
3983
|
{
|
|
3984
3984
|
"pt-[22px] pb-1.5": r === "floating",
|
|
3985
|
-
[
|
|
3985
|
+
[Is[o]]: !i && x,
|
|
3986
3986
|
"bg-red-4 text-red-9": !!i,
|
|
3987
3987
|
"ring-1 ring-red-9": !!i && x
|
|
3988
3988
|
},
|
|
@@ -4004,7 +4004,7 @@ const Ds = ({
|
|
|
4004
4004
|
}
|
|
4005
4005
|
),
|
|
4006
4006
|
l && /* @__PURE__ */ d(
|
|
4007
|
-
|
|
4007
|
+
Dn,
|
|
4008
4008
|
{
|
|
4009
4009
|
size: 16,
|
|
4010
4010
|
className: N(
|
|
@@ -4018,7 +4018,7 @@ const Ds = ({
|
|
|
4018
4018
|
"input",
|
|
4019
4019
|
{
|
|
4020
4020
|
ref: (p) => {
|
|
4021
|
-
E && (typeof E == "function" ? E(p) : E.current = p),
|
|
4021
|
+
E && (typeof E == "function" ? E(p) : E.current = p), C.current = p;
|
|
4022
4022
|
},
|
|
4023
4023
|
type: Y,
|
|
4024
4024
|
className: N(
|
|
@@ -4044,13 +4044,13 @@ const Ds = ({
|
|
|
4044
4044
|
}
|
|
4045
4045
|
),
|
|
4046
4046
|
s ? /* @__PURE__ */ d(
|
|
4047
|
-
|
|
4047
|
+
Be,
|
|
4048
4048
|
{
|
|
4049
4049
|
size: 20,
|
|
4050
|
-
className: `absolute top-1/2 -translate-y-1/2 text-green-500 ${
|
|
4050
|
+
className: `absolute top-1/2 -translate-y-1/2 text-green-500 ${F ? "right-10" : "right-3"}`
|
|
4051
4051
|
}
|
|
4052
4052
|
) : null,
|
|
4053
|
-
|
|
4053
|
+
F && /* @__PURE__ */ d(
|
|
4054
4054
|
"button",
|
|
4055
4055
|
{
|
|
4056
4056
|
type: "button",
|
|
@@ -4061,13 +4061,13 @@ const Ds = ({
|
|
|
4061
4061
|
P(!D);
|
|
4062
4062
|
},
|
|
4063
4063
|
children: D ? /* @__PURE__ */ d(
|
|
4064
|
-
|
|
4064
|
+
Pn,
|
|
4065
4065
|
{
|
|
4066
4066
|
size: 20,
|
|
4067
4067
|
className: N(i ? "text-red-9" : "text-base-11")
|
|
4068
4068
|
}
|
|
4069
4069
|
) : /* @__PURE__ */ d(
|
|
4070
|
-
|
|
4070
|
+
On,
|
|
4071
4071
|
{
|
|
4072
4072
|
size: 20,
|
|
4073
4073
|
className: N(i ? "text-red-9" : "text-base-11")
|
|
@@ -4079,28 +4079,28 @@ const Ds = ({
|
|
|
4079
4079
|
] });
|
|
4080
4080
|
}
|
|
4081
4081
|
);
|
|
4082
|
-
|
|
4083
|
-
const
|
|
4082
|
+
ln.displayName = "Input";
|
|
4083
|
+
const el = ({
|
|
4084
4084
|
name: e,
|
|
4085
4085
|
customRead: t,
|
|
4086
4086
|
customSet: r,
|
|
4087
4087
|
withNullSet: n = !0,
|
|
4088
4088
|
...o
|
|
4089
4089
|
}) => {
|
|
4090
|
-
const { control: a } =
|
|
4090
|
+
const { control: a } = Qe(), s = L(
|
|
4091
4091
|
(c) => t ? t(c) : c === null ? Wr(c) : c,
|
|
4092
4092
|
[t]
|
|
4093
|
-
), i =
|
|
4094
|
-
(c) => r ? n && c === null ?
|
|
4093
|
+
), i = L(
|
|
4094
|
+
(c) => r ? n && c === null ? Ft(c) : r(c) : c === null ? Ft(c) : c,
|
|
4095
4095
|
[r]
|
|
4096
4096
|
);
|
|
4097
4097
|
return a ? /* @__PURE__ */ d(
|
|
4098
|
-
|
|
4098
|
+
Ge,
|
|
4099
4099
|
{
|
|
4100
4100
|
name: e,
|
|
4101
4101
|
control: a,
|
|
4102
4102
|
render: ({ field: c, fieldState: l }) => /* @__PURE__ */ d(
|
|
4103
|
-
|
|
4103
|
+
ln,
|
|
4104
4104
|
{
|
|
4105
4105
|
value: s(c.value),
|
|
4106
4106
|
onChange: (u) => c.onChange(i(u.target.value)),
|
|
@@ -4115,22 +4115,22 @@ const Hi = ({
|
|
|
4115
4115
|
"Form control missing for field: ",
|
|
4116
4116
|
e
|
|
4117
4117
|
] }));
|
|
4118
|
-
},
|
|
4118
|
+
}, cn = Ht(null), js = ({
|
|
4119
4119
|
children: e,
|
|
4120
4120
|
value: t
|
|
4121
|
-
}) => /* @__PURE__ */ d(
|
|
4122
|
-
const e = vt(
|
|
4121
|
+
}) => /* @__PURE__ */ d(cn.Provider, { value: t, children: e }), zs = () => {
|
|
4122
|
+
const e = vt(cn);
|
|
4123
4123
|
if (!e)
|
|
4124
4124
|
throw new Error("useAliveScope must be wrapped within AliveScopeProvider");
|
|
4125
4125
|
return e;
|
|
4126
|
-
},
|
|
4126
|
+
}, tl = ({ children: e }) => {
|
|
4127
4127
|
const [t, r] = z({}), n = T(
|
|
4128
4128
|
{}
|
|
4129
4129
|
), o = T(
|
|
4130
4130
|
{}
|
|
4131
4131
|
);
|
|
4132
4132
|
return /* @__PURE__ */ g(
|
|
4133
|
-
|
|
4133
|
+
js,
|
|
4134
4134
|
{
|
|
4135
4135
|
value: {
|
|
4136
4136
|
getPortalElement: (i, c, l) => {
|
|
@@ -4153,7 +4153,7 @@ const Hi = ({
|
|
|
4153
4153
|
children: [
|
|
4154
4154
|
e,
|
|
4155
4155
|
Object.entries(t).map(([i, { children: c, element: l }]) => /* @__PURE__ */ d(
|
|
4156
|
-
|
|
4156
|
+
Bs,
|
|
4157
4157
|
{
|
|
4158
4158
|
id: i,
|
|
4159
4159
|
onMountCallbacks: n,
|
|
@@ -4166,16 +4166,16 @@ const Hi = ({
|
|
|
4166
4166
|
]
|
|
4167
4167
|
}
|
|
4168
4168
|
);
|
|
4169
|
-
},
|
|
4169
|
+
}, un = Ht(
|
|
4170
4170
|
null
|
|
4171
|
-
),
|
|
4171
|
+
), Hs = ({
|
|
4172
4172
|
children: e,
|
|
4173
4173
|
value: t
|
|
4174
|
-
}) => /* @__PURE__ */ d(
|
|
4175
|
-
|
|
4174
|
+
}) => /* @__PURE__ */ d(un.Provider, { value: t, children: e }), Bs = En(({ id: e, onMountCallbacks: t, onDropCallbacks: r, children: n, element: o }) => /* @__PURE__ */ d(
|
|
4175
|
+
Hs,
|
|
4176
4176
|
{
|
|
4177
4177
|
value: { keepAliveId: e, onKeepAliveMount: (i, c = { runOnFirstMount: !1 }) => {
|
|
4178
|
-
|
|
4178
|
+
H(() => {
|
|
4179
4179
|
const l = () => {
|
|
4180
4180
|
if (document.getElementById(e))
|
|
4181
4181
|
i(e);
|
|
@@ -4196,32 +4196,32 @@ const Hi = ({
|
|
|
4196
4196
|
};
|
|
4197
4197
|
}, []);
|
|
4198
4198
|
}, onKeepAliveDrop: (i) => {
|
|
4199
|
-
|
|
4199
|
+
H(() => (r.current[e].push(i), () => {
|
|
4200
4200
|
r.current[e] = r.current[e].filter(
|
|
4201
4201
|
(c) => c !== i
|
|
4202
4202
|
);
|
|
4203
4203
|
}), []);
|
|
4204
4204
|
} },
|
|
4205
|
-
children:
|
|
4205
|
+
children: Cr(n, o, e)
|
|
4206
4206
|
}
|
|
4207
|
-
)),
|
|
4208
|
-
const e = vt(
|
|
4207
|
+
)), rl = () => {
|
|
4208
|
+
const e = vt(un);
|
|
4209
4209
|
if (!e)
|
|
4210
4210
|
throw new Error("useKeepAlive must be used within KeepAliveProvider");
|
|
4211
4211
|
return e;
|
|
4212
|
-
},
|
|
4212
|
+
}, nl = ({
|
|
4213
4213
|
aliveKey: e,
|
|
4214
4214
|
children: t,
|
|
4215
4215
|
enabled: r = !0,
|
|
4216
4216
|
...n
|
|
4217
4217
|
}) => {
|
|
4218
|
-
const o = T(null), { getPortalElement: a } =
|
|
4219
|
-
return
|
|
4218
|
+
const o = T(null), { getPortalElement: a } = zs();
|
|
4219
|
+
return H(() => {
|
|
4220
4220
|
const s = a(e, t, n.className);
|
|
4221
4221
|
return r && o.current && o.current.replaceWith(s), () => {
|
|
4222
4222
|
};
|
|
4223
4223
|
}, [e, t, r, n]), /* @__PURE__ */ d("div", { ...n, ref: o, children: t });
|
|
4224
|
-
},
|
|
4224
|
+
}, ol = ({
|
|
4225
4225
|
lightSolid: e = !0,
|
|
4226
4226
|
className: t,
|
|
4227
4227
|
children: r,
|
|
@@ -4237,7 +4237,7 @@ const Hi = ({
|
|
|
4237
4237
|
...n,
|
|
4238
4238
|
children: r
|
|
4239
4239
|
}
|
|
4240
|
-
),
|
|
4240
|
+
), al = ({
|
|
4241
4241
|
onClick: e,
|
|
4242
4242
|
lightSolid: t = !0,
|
|
4243
4243
|
className: r,
|
|
@@ -4255,7 +4255,7 @@ const Hi = ({
|
|
|
4255
4255
|
),
|
|
4256
4256
|
children: n
|
|
4257
4257
|
}
|
|
4258
|
-
),
|
|
4258
|
+
), Vs = ({
|
|
4259
4259
|
label: e,
|
|
4260
4260
|
labelPosition: t = "default",
|
|
4261
4261
|
options: r,
|
|
@@ -4272,27 +4272,27 @@ const Hi = ({
|
|
|
4272
4272
|
disabled: b = !1,
|
|
4273
4273
|
className: h
|
|
4274
4274
|
}) => {
|
|
4275
|
-
const [v, w] = z(""), [E,
|
|
4276
|
-
triggerRef:
|
|
4275
|
+
const [v, w] = z(""), [E, C] = z(!1), [_, D] = z(-1), P = T(null), x = T(null), k = T([]), {
|
|
4276
|
+
triggerRef: F,
|
|
4277
4277
|
triggerProps: Y,
|
|
4278
4278
|
popoverRef: $,
|
|
4279
4279
|
getPopoverPosition: p,
|
|
4280
4280
|
open: M,
|
|
4281
|
-
toggle:
|
|
4282
|
-
close:
|
|
4283
|
-
} =
|
|
4281
|
+
toggle: S,
|
|
4282
|
+
close: A
|
|
4283
|
+
} = Bt({
|
|
4284
4284
|
align: "start",
|
|
4285
4285
|
side: "top",
|
|
4286
4286
|
avoidCollisions: !1,
|
|
4287
4287
|
onOpen: () => {
|
|
4288
|
-
|
|
4288
|
+
C(!0), m && P.current && setTimeout(() => P.current?.focus(), 10);
|
|
4289
4289
|
},
|
|
4290
4290
|
onClose: () => {
|
|
4291
|
-
|
|
4291
|
+
C(!1), w(""), D(-1);
|
|
4292
4292
|
}
|
|
4293
4293
|
}), I = T(
|
|
4294
4294
|
`multiselect-${Math.random().toString(36).substr(2, 9)}`
|
|
4295
|
-
).current,
|
|
4295
|
+
).current, q = T(
|
|
4296
4296
|
`label-${Math.random().toString(36).substr(2, 9)}`
|
|
4297
4297
|
).current, W = T(
|
|
4298
4298
|
`error-${Math.random().toString(36).substr(2, 9)}`
|
|
@@ -4303,16 +4303,16 @@ const Hi = ({
|
|
|
4303
4303
|
)).filter(Boolean) : n, ce = K.length > 0, G = m ? r.filter(
|
|
4304
4304
|
(O) => s(O).toLowerCase().includes(v.toLowerCase())
|
|
4305
4305
|
) : r;
|
|
4306
|
-
|
|
4306
|
+
H(() => {
|
|
4307
4307
|
k.current = k.current.slice(0, G.length);
|
|
4308
4308
|
}, [G.length]);
|
|
4309
|
-
const
|
|
4309
|
+
const se = (O) => i ? n.some(
|
|
4310
4310
|
(R) => R === a(O) || a(R) === a(O)
|
|
4311
4311
|
) : n.some(
|
|
4312
4312
|
(R) => a(R) === a(O)
|
|
4313
|
-
),
|
|
4313
|
+
), Ie = (O) => {
|
|
4314
4314
|
if (!b)
|
|
4315
|
-
if (
|
|
4315
|
+
if (se(O)) {
|
|
4316
4316
|
let R;
|
|
4317
4317
|
if (i) {
|
|
4318
4318
|
const J = a(O);
|
|
@@ -4349,14 +4349,14 @@ const Hi = ({
|
|
|
4349
4349
|
if (!b)
|
|
4350
4350
|
switch (O.key) {
|
|
4351
4351
|
case "Enter":
|
|
4352
|
-
O.preventDefault(), M ? _ >= 0 &&
|
|
4352
|
+
O.preventDefault(), M ? _ >= 0 && Ie(G[_]) : S();
|
|
4353
4353
|
break;
|
|
4354
4354
|
case "Escape":
|
|
4355
|
-
O.preventDefault(),
|
|
4355
|
+
O.preventDefault(), A();
|
|
4356
4356
|
break;
|
|
4357
4357
|
case "ArrowDown":
|
|
4358
4358
|
if (O.preventDefault(), !M)
|
|
4359
|
-
|
|
4359
|
+
S();
|
|
4360
4360
|
else {
|
|
4361
4361
|
const R = _ >= G.length - 1 ? 0 : _ + 1;
|
|
4362
4362
|
D(R), k.current[R]?.scrollIntoView({ block: "nearest" });
|
|
@@ -4375,15 +4375,15 @@ const Hi = ({
|
|
|
4375
4375
|
}
|
|
4376
4376
|
break;
|
|
4377
4377
|
}
|
|
4378
|
-
},
|
|
4378
|
+
}, xn = (O) => {
|
|
4379
4379
|
w(O.target.value), D(-1);
|
|
4380
|
-
},
|
|
4381
|
-
b || (m && P.current && P.current.focus(),
|
|
4380
|
+
}, Nn = () => {
|
|
4381
|
+
b || (m && P.current && P.current.focus(), S());
|
|
4382
4382
|
}, rt = (O) => {
|
|
4383
4383
|
console.log(`Accessibility announcement: ${O}`);
|
|
4384
4384
|
};
|
|
4385
|
-
|
|
4386
|
-
!
|
|
4385
|
+
Vt($, (O) => {
|
|
4386
|
+
!F.current || !M || !O.target || F.current.contains(O.target) || A();
|
|
4387
4387
|
});
|
|
4388
4388
|
const Tt = p();
|
|
4389
4389
|
return /* @__PURE__ */ g("div", { className: N("relative", h), children: [
|
|
@@ -4401,7 +4401,7 @@ const Hi = ({
|
|
|
4401
4401
|
/* @__PURE__ */ g(
|
|
4402
4402
|
"div",
|
|
4403
4403
|
{
|
|
4404
|
-
ref:
|
|
4404
|
+
ref: F,
|
|
4405
4405
|
...Y,
|
|
4406
4406
|
className: N(
|
|
4407
4407
|
"relative rounded-6 px-2 transition cursor-pointer pr-10 min-h-[48px]",
|
|
@@ -4415,12 +4415,12 @@ const Hi = ({
|
|
|
4415
4415
|
"opacity-60 cursor-not-allowed": b
|
|
4416
4416
|
}
|
|
4417
4417
|
),
|
|
4418
|
-
onClick:
|
|
4418
|
+
onClick: Nn,
|
|
4419
4419
|
role: "combobox",
|
|
4420
4420
|
"aria-expanded": M,
|
|
4421
4421
|
"aria-haspopup": "listbox",
|
|
4422
4422
|
"aria-owns": y,
|
|
4423
|
-
"aria-labelledby":
|
|
4423
|
+
"aria-labelledby": q,
|
|
4424
4424
|
"aria-describedby": l ? W : void 0,
|
|
4425
4425
|
onKeyDown: tt,
|
|
4426
4426
|
tabIndex: b ? -1 : 0,
|
|
@@ -4428,7 +4428,7 @@ const Hi = ({
|
|
|
4428
4428
|
t === "floating" && /* @__PURE__ */ g(
|
|
4429
4429
|
"label",
|
|
4430
4430
|
{
|
|
4431
|
-
id:
|
|
4431
|
+
id: q,
|
|
4432
4432
|
htmlFor: I,
|
|
4433
4433
|
className: N(
|
|
4434
4434
|
"absolute transition-all duration-200 pointer-events-none",
|
|
@@ -4472,7 +4472,7 @@ const Hi = ({
|
|
|
4472
4472
|
R.stopPropagation(), et(O);
|
|
4473
4473
|
},
|
|
4474
4474
|
"aria-label": `Remove ${s(O)}`,
|
|
4475
|
-
children: /* @__PURE__ */ d(
|
|
4475
|
+
children: /* @__PURE__ */ d(Ln, { size: 12 })
|
|
4476
4476
|
}
|
|
4477
4477
|
)
|
|
4478
4478
|
]
|
|
@@ -4487,7 +4487,7 @@ const Hi = ({
|
|
|
4487
4487
|
type: "text",
|
|
4488
4488
|
className: "flex-grow min-w-[60px] bg-transparent outline-none placeholder:text-sm",
|
|
4489
4489
|
value: v,
|
|
4490
|
-
onChange:
|
|
4490
|
+
onChange: xn,
|
|
4491
4491
|
onKeyDown: tt,
|
|
4492
4492
|
placeholder: ce ? "" : u,
|
|
4493
4493
|
disabled: b,
|
|
@@ -4501,9 +4501,9 @@ const Hi = ({
|
|
|
4501
4501
|
}
|
|
4502
4502
|
),
|
|
4503
4503
|
/* @__PURE__ */ g("div", { className: "absolute right-3 top-1/2 -translate-y-1/2 flex items-center gap-2", children: [
|
|
4504
|
-
c && /* @__PURE__ */ d(
|
|
4504
|
+
c && /* @__PURE__ */ d(Be, { size: 16, className: "text-green-600" }),
|
|
4505
4505
|
/* @__PURE__ */ d(
|
|
4506
|
-
|
|
4506
|
+
Fn,
|
|
4507
4507
|
{
|
|
4508
4508
|
size: 16,
|
|
4509
4509
|
className: N("transition-transform text-base-11", {
|
|
@@ -4516,8 +4516,8 @@ const Hi = ({
|
|
|
4516
4516
|
}
|
|
4517
4517
|
)
|
|
4518
4518
|
] }),
|
|
4519
|
-
/* @__PURE__ */ d(
|
|
4520
|
-
|
|
4519
|
+
/* @__PURE__ */ d(Ye, { children: M && /* @__PURE__ */ d(Re, { children: /* @__PURE__ */ d(
|
|
4520
|
+
re.div,
|
|
4521
4521
|
{
|
|
4522
4522
|
initial: { opacity: 0, y: -10 },
|
|
4523
4523
|
animate: { opacity: 1, y: 0 },
|
|
@@ -4538,14 +4538,14 @@ const Hi = ({
|
|
|
4538
4538
|
),
|
|
4539
4539
|
role: "listbox",
|
|
4540
4540
|
id: y,
|
|
4541
|
-
"aria-labelledby":
|
|
4541
|
+
"aria-labelledby": q,
|
|
4542
4542
|
children: G.length === 0 ? /* @__PURE__ */ d("div", { className: "px-3 py-2 text-sm text-secondarytext", children: v ? "No results found" : "No options available" }) : G.map((O, R) => {
|
|
4543
|
-
const J =
|
|
4543
|
+
const J = se(O);
|
|
4544
4544
|
return /* @__PURE__ */ g(
|
|
4545
4545
|
"div",
|
|
4546
4546
|
{
|
|
4547
|
-
ref: (
|
|
4548
|
-
k.current[R] =
|
|
4547
|
+
ref: (kn) => {
|
|
4548
|
+
k.current[R] = kn;
|
|
4549
4549
|
},
|
|
4550
4550
|
className: N(
|
|
4551
4551
|
"px-3 py-2 text-sm cursor-pointer flex items-center justify-between",
|
|
@@ -4557,13 +4557,13 @@ const Hi = ({
|
|
|
4557
4557
|
"bg-brandfadedbg text-brand": J
|
|
4558
4558
|
}
|
|
4559
4559
|
),
|
|
4560
|
-
onClick: () =>
|
|
4560
|
+
onClick: () => Ie(O),
|
|
4561
4561
|
role: "option",
|
|
4562
4562
|
"aria-selected": J,
|
|
4563
4563
|
onMouseEnter: () => D(R),
|
|
4564
4564
|
children: [
|
|
4565
4565
|
/* @__PURE__ */ d("span", { children: s(O) }),
|
|
4566
|
-
J && /* @__PURE__ */ d(
|
|
4566
|
+
J && /* @__PURE__ */ d(Be, { size: 16 })
|
|
4567
4567
|
]
|
|
4568
4568
|
},
|
|
4569
4569
|
a(O)
|
|
@@ -4582,18 +4582,18 @@ const Hi = ({
|
|
|
4582
4582
|
),
|
|
4583
4583
|
/* @__PURE__ */ d("div", { className: "sr-only", "aria-live": "polite", "aria-atomic": "true", children: K.length > 0 ? `Selected: ${K.map(s).join(", ")}` : "No selections" })
|
|
4584
4584
|
] });
|
|
4585
|
-
},
|
|
4585
|
+
}, sl = ({
|
|
4586
4586
|
name: e,
|
|
4587
4587
|
...t
|
|
4588
4588
|
}) => {
|
|
4589
|
-
const { control: r } =
|
|
4589
|
+
const { control: r } = Qe();
|
|
4590
4590
|
return r ? /* @__PURE__ */ d(
|
|
4591
|
-
|
|
4591
|
+
Ge,
|
|
4592
4592
|
{
|
|
4593
4593
|
name: e,
|
|
4594
4594
|
control: r,
|
|
4595
4595
|
render: ({ field: n, fieldState: o }) => /* @__PURE__ */ d(
|
|
4596
|
-
|
|
4596
|
+
Vs,
|
|
4597
4597
|
{
|
|
4598
4598
|
selectedValues: n.value || [],
|
|
4599
4599
|
onChange: (a) => n.onChange(a),
|
|
@@ -4606,7 +4606,7 @@ const Hi = ({
|
|
|
4606
4606
|
"Form control missing for field: ",
|
|
4607
4607
|
e
|
|
4608
4608
|
] }));
|
|
4609
|
-
},
|
|
4609
|
+
}, il = ({
|
|
4610
4610
|
id: e,
|
|
4611
4611
|
tabPage: t,
|
|
4612
4612
|
absolute: r = !0,
|
|
@@ -4620,7 +4620,7 @@ const Hi = ({
|
|
|
4620
4620
|
showScrollbar: u = !0,
|
|
4621
4621
|
onScroll: f
|
|
4622
4622
|
}) => {
|
|
4623
|
-
const m = T(null), b = T(null), h = T(null), v = T(null), w = T(null), [E,
|
|
4623
|
+
const m = T(null), b = T(null), h = T(null), v = T(null), w = T(null), [E, C] = z(!1), _ = T(null), D = T({
|
|
4624
4624
|
startY: 0,
|
|
4625
4625
|
// Track where the scroll position was when gesture started
|
|
4626
4626
|
currentY: 0,
|
|
@@ -4631,27 +4631,27 @@ const Hi = ({
|
|
|
4631
4631
|
pullDistance: 0,
|
|
4632
4632
|
refreshThreshold: 50,
|
|
4633
4633
|
isPullingToRefresh: !1
|
|
4634
|
-
}), P = yt(), x =
|
|
4635
|
-
|
|
4634
|
+
}), P = yt(), x = L(
|
|
4635
|
+
Je(() => {
|
|
4636
4636
|
m.current && b.current && (D.current.maxScroll = Math.max(
|
|
4637
4637
|
0,
|
|
4638
4638
|
b.current.offsetHeight - m.current.offsetHeight
|
|
4639
4639
|
));
|
|
4640
4640
|
}),
|
|
4641
4641
|
[]
|
|
4642
|
-
), k =
|
|
4642
|
+
), k = L((W) => {
|
|
4643
4643
|
const { maxScroll: y } = D.current;
|
|
4644
4644
|
return W > 0 ? Math.pow(W, 0.8) : W < -y ? -y - Math.pow(-(W + y), 0.8) : W;
|
|
4645
|
-
}, []),
|
|
4645
|
+
}, []), F = L(() => {
|
|
4646
4646
|
if (!u || !m.current || !v.current)
|
|
4647
4647
|
return;
|
|
4648
4648
|
const { currentY: W, maxScroll: y } = D.current, V = m.current.offsetHeight, K = Math.max(
|
|
4649
4649
|
30,
|
|
4650
4650
|
V / (V + y) * V
|
|
4651
4651
|
), ce = V - K;
|
|
4652
|
-
let G = -W / y * ce,
|
|
4653
|
-
W > 0 ? (G = 0,
|
|
4654
|
-
}, [u]), Y =
|
|
4652
|
+
let G = -W / y * ce, se = 1;
|
|
4653
|
+
W > 0 ? (G = 0, se = 1 - W / V, v.current.style.transformOrigin = "top") : W < -y ? (G = ce, se = 1 - Math.abs(W + y) / V, v.current.style.transformOrigin = "bottom") : v.current.style.transformOrigin = "top", v.current.style.transform = `translate3d(0, ${G}px, 0) scaleY(${se})`, v.current.style.height = `${K}px`;
|
|
4654
|
+
}, [u]), Y = L(
|
|
4655
4655
|
(W) => {
|
|
4656
4656
|
if (D.current.currentY = W, b.current && (b.current.style.transform = `translate3d(0, ${W}px, 0)`), h.current) {
|
|
4657
4657
|
const y = Math.max(
|
|
@@ -4660,37 +4660,37 @@ const Hi = ({
|
|
|
4660
4660
|
);
|
|
4661
4661
|
h.current.style.transform = `translate3d(0, ${y}px, 0)`;
|
|
4662
4662
|
}
|
|
4663
|
-
f && f(W),
|
|
4663
|
+
f && f(W), F();
|
|
4664
4664
|
},
|
|
4665
|
-
[
|
|
4666
|
-
), $ =
|
|
4665
|
+
[F]
|
|
4666
|
+
), $ = L(
|
|
4667
4667
|
(W) => {
|
|
4668
4668
|
const y = D.current;
|
|
4669
|
-
y.frameCallback && (
|
|
4669
|
+
y.frameCallback && (ne(y.frameCallback), y.frameCallback = null);
|
|
4670
4670
|
const V = performance.now(), K = y.currentY, ce = W - K, G = () => {
|
|
4671
|
-
const
|
|
4672
|
-
Y(tt),
|
|
4671
|
+
const se = performance.now() - V, Ie = Math.min(se / l, 1), et = 1 - Math.pow(1 - Ie, 3), tt = K + ce * et;
|
|
4672
|
+
Y(tt), Ie >= 1 && (y.frameCallback && (ne(y.frameCallback), y.frameCallback = null), Y(W), W === 0 && h.current && (h.current.textContent = "Pull to refresh"));
|
|
4673
4673
|
};
|
|
4674
4674
|
y.frameCallback = it.render(G, !0);
|
|
4675
4675
|
},
|
|
4676
4676
|
[Y, l]
|
|
4677
|
-
), p =
|
|
4677
|
+
), p = L(
|
|
4678
4678
|
(W) => {
|
|
4679
4679
|
const y = D.current;
|
|
4680
|
-
y.frameCallback && (
|
|
4680
|
+
y.frameCallback && (ne(y.frameCallback), y.frameCallback = null);
|
|
4681
4681
|
let V = W, K = Date.now();
|
|
4682
4682
|
const ce = () => {
|
|
4683
|
-
const G = Date.now(),
|
|
4684
|
-
if (K = G, V *= Math.pow(0.95,
|
|
4685
|
-
y.frameCallback && (
|
|
4683
|
+
const G = Date.now(), se = G - K;
|
|
4684
|
+
if (K = G, V *= Math.pow(0.95, se / 16), y.currentY += V * se, y.currentY > 0 || y.currentY < -y.maxScroll) {
|
|
4685
|
+
y.frameCallback && (ne(y.frameCallback), y.frameCallback = null), $(y.currentY > 0 ? 0 : -y.maxScroll);
|
|
4686
4686
|
return;
|
|
4687
4687
|
}
|
|
4688
|
-
Y(y.currentY), Math.abs(V) < 0.01 && y.frameCallback && (
|
|
4688
|
+
Y(y.currentY), Math.abs(V) < 0.01 && y.frameCallback && (ne(y.frameCallback), y.frameCallback = null);
|
|
4689
4689
|
};
|
|
4690
4690
|
y.frameCallback = it.render(ce, !0);
|
|
4691
4691
|
},
|
|
4692
4692
|
[Y, $]
|
|
4693
|
-
), M =
|
|
4693
|
+
), M = L(() => {
|
|
4694
4694
|
if (!u || !v.current) return;
|
|
4695
4695
|
w.current !== null && clearTimeout(w.current), requestAnimationFrame(() => {
|
|
4696
4696
|
v.current && (v.current.style.opacity = "1");
|
|
@@ -4701,16 +4701,16 @@ const Hi = ({
|
|
|
4701
4701
|
v.current && (v.current.style.opacity = "0"), w.current = null;
|
|
4702
4702
|
});
|
|
4703
4703
|
}, 1e3);
|
|
4704
|
-
}, [u]),
|
|
4704
|
+
}, [u]), S = L(
|
|
4705
4705
|
(W) => {
|
|
4706
4706
|
if (_.current !== null && Date.now() - _.current < 50)
|
|
4707
4707
|
return;
|
|
4708
4708
|
_.current = Date.now();
|
|
4709
4709
|
const y = D.current;
|
|
4710
|
-
y.isScrolling = !0, y.startY = y.currentY, y.lastTimestamp = Date.now(), y.isPullingToRefresh = y.currentY === 0, y.pullDistance = 0, y.frameCallback && (
|
|
4710
|
+
y.isScrolling = !0, y.startY = y.currentY, y.lastTimestamp = Date.now(), y.isPullingToRefresh = y.currentY === 0, y.pullDistance = 0, y.frameCallback && (ne(y.frameCallback), y.frameCallback = null), M();
|
|
4711
4711
|
},
|
|
4712
4712
|
[M]
|
|
4713
|
-
),
|
|
4713
|
+
), A = L(
|
|
4714
4714
|
(W) => {
|
|
4715
4715
|
const y = D.current;
|
|
4716
4716
|
if (!y.isScrolling) return;
|
|
@@ -4724,20 +4724,20 @@ const Hi = ({
|
|
|
4724
4724
|
M,
|
|
4725
4725
|
k
|
|
4726
4726
|
]
|
|
4727
|
-
), I =
|
|
4727
|
+
), I = L(
|
|
4728
4728
|
(W) => {
|
|
4729
4729
|
const y = D.current;
|
|
4730
|
-
y.isScrolling && (y.isScrolling = !1, a && y.isPullingToRefresh && !E && y.pullDistance > y.refreshThreshold ?
|
|
4730
|
+
y.isScrolling && (y.isScrolling = !1, a && y.isPullingToRefresh && !E && y.pullDistance > y.refreshThreshold ? q() : y.currentY > 0 || y.currentY < -y.maxScroll ? $(y.currentY > 0 ? 0 : -y.maxScroll) : p(W.velocityY), y.isPullingToRefresh = !1);
|
|
4731
4731
|
},
|
|
4732
4732
|
[a, p, $, E]
|
|
4733
|
-
),
|
|
4734
|
-
|
|
4735
|
-
|
|
4733
|
+
), q = L(() => {
|
|
4734
|
+
C(!0), $(D.current.refreshThreshold), h.current && (h.current.textContent = "Refreshing..."), a && a().then(() => {
|
|
4735
|
+
C(!1), $(0);
|
|
4736
4736
|
});
|
|
4737
4737
|
}, [a, $]);
|
|
4738
|
-
return
|
|
4738
|
+
return H(() => {
|
|
4739
4739
|
if (!m.current) return;
|
|
4740
|
-
const W =
|
|
4740
|
+
const W = Ar(m.current, {
|
|
4741
4741
|
name: "page-scroller-gesture",
|
|
4742
4742
|
// threshold: 0, due to small miss touches
|
|
4743
4743
|
// maybe if implementing proper stop propagation
|
|
@@ -4746,18 +4746,18 @@ const Hi = ({
|
|
|
4746
4746
|
priority: 10,
|
|
4747
4747
|
passive: !0,
|
|
4748
4748
|
direction: "y",
|
|
4749
|
-
onStart:
|
|
4750
|
-
onMove:
|
|
4749
|
+
onStart: S,
|
|
4750
|
+
onMove: A,
|
|
4751
4751
|
onEnd: I
|
|
4752
4752
|
});
|
|
4753
4753
|
return W.init(), () => W.destroy();
|
|
4754
|
-
}, [
|
|
4754
|
+
}, [S, A, I]), H(() => {
|
|
4755
4755
|
if (m.current)
|
|
4756
|
-
return x(),
|
|
4756
|
+
return x(), F(), window.addEventListener("resize", x), () => {
|
|
4757
4757
|
window.removeEventListener("resize", x), w.current !== null && clearTimeout(w.current);
|
|
4758
4758
|
};
|
|
4759
|
-
}, [x,
|
|
4760
|
-
|
|
4759
|
+
}, [x, F]), /* @__PURE__ */ g(
|
|
4760
|
+
re.div,
|
|
4761
4761
|
{
|
|
4762
4762
|
id: e,
|
|
4763
4763
|
ref: m,
|
|
@@ -4851,7 +4851,7 @@ const Hi = ({
|
|
|
4851
4851
|
`scroller${e}`
|
|
4852
4852
|
);
|
|
4853
4853
|
};
|
|
4854
|
-
function
|
|
4854
|
+
function ll({
|
|
4855
4855
|
id: e,
|
|
4856
4856
|
showScrollbar: t = !0,
|
|
4857
4857
|
onRefresh: r,
|
|
@@ -4869,27 +4869,27 @@ function Gi({
|
|
|
4869
4869
|
pullDistance: 0,
|
|
4870
4870
|
refreshThreshold: 50,
|
|
4871
4871
|
isPullingToRefresh: !1
|
|
4872
|
-
}), v =
|
|
4873
|
-
|
|
4872
|
+
}), v = L(
|
|
4873
|
+
Je(() => {
|
|
4874
4874
|
s.current && i.current && (h.current.maxScroll = Math.max(
|
|
4875
4875
|
0,
|
|
4876
4876
|
i.current.offsetHeight - s.current.offsetHeight
|
|
4877
4877
|
));
|
|
4878
4878
|
}),
|
|
4879
4879
|
[]
|
|
4880
|
-
), w =
|
|
4880
|
+
), w = L(($) => {
|
|
4881
4881
|
const { maxScroll: p } = h.current;
|
|
4882
4882
|
return $ > 0 ? Math.pow($, 0.8) : $ < -p ? -p - Math.pow(-($ + p), 0.8) : $;
|
|
4883
|
-
}, []), E =
|
|
4883
|
+
}, []), E = L(() => {
|
|
4884
4884
|
if (!t || !s.current || !l.current)
|
|
4885
4885
|
return;
|
|
4886
|
-
const { currentY: $, maxScroll: p } = h.current, M = s.current.offsetHeight,
|
|
4886
|
+
const { currentY: $, maxScroll: p } = h.current, M = s.current.offsetHeight, S = Math.max(
|
|
4887
4887
|
30,
|
|
4888
4888
|
M / (M + p) * M
|
|
4889
|
-
),
|
|
4890
|
-
let I = -$ / p *
|
|
4891
|
-
$ > 0 ? (I = 0,
|
|
4892
|
-
}, [t]),
|
|
4889
|
+
), A = M - S;
|
|
4890
|
+
let I = -$ / p * A, q = 1;
|
|
4891
|
+
$ > 0 ? (I = 0, q = 1 - $ / M, l.current.style.transformOrigin = "top") : $ < -p ? (I = A, q = 1 - Math.abs($ + p) / M, l.current.style.transformOrigin = "bottom") : l.current.style.transformOrigin = "top", l.current.style.transform = `translate3d(0, ${I}px, 0) scaleY(${q})`, l.current.style.height = `${S}px`;
|
|
4892
|
+
}, [t]), C = L(
|
|
4893
4893
|
($) => {
|
|
4894
4894
|
if (h.current.currentY = $, i.current && (i.current.style.transform = `translate3d(0, ${$}px, 0)`), c.current) {
|
|
4895
4895
|
const p = Math.max(
|
|
@@ -4901,34 +4901,34 @@ function Gi({
|
|
|
4901
4901
|
a && a($), E();
|
|
4902
4902
|
},
|
|
4903
4903
|
[E]
|
|
4904
|
-
), _ =
|
|
4904
|
+
), _ = L(
|
|
4905
4905
|
($) => {
|
|
4906
4906
|
const p = h.current;
|
|
4907
|
-
p.frameCallback && (
|
|
4908
|
-
const M = performance.now(),
|
|
4909
|
-
const
|
|
4910
|
-
|
|
4907
|
+
p.frameCallback && (ne(p.frameCallback), p.frameCallback = null);
|
|
4908
|
+
const M = performance.now(), S = p.currentY, A = $ - S, I = () => {
|
|
4909
|
+
const q = performance.now() - M, W = Math.min(q / n, 1), y = 1 - Math.pow(1 - W, 3), V = S + A * y;
|
|
4910
|
+
C(V), W >= 1 && (p.frameCallback && (ne(p.frameCallback), p.frameCallback = null), C($));
|
|
4911
4911
|
};
|
|
4912
4912
|
p.frameCallback = it.render(I, !0);
|
|
4913
4913
|
},
|
|
4914
|
-
[
|
|
4915
|
-
), D =
|
|
4914
|
+
[C, n]
|
|
4915
|
+
), D = L(
|
|
4916
4916
|
($) => {
|
|
4917
4917
|
const p = h.current;
|
|
4918
|
-
p.frameCallback && (
|
|
4919
|
-
let M = $,
|
|
4920
|
-
const
|
|
4921
|
-
const I = Date.now(),
|
|
4922
|
-
if (
|
|
4923
|
-
p.frameCallback && (
|
|
4918
|
+
p.frameCallback && (ne(p.frameCallback), p.frameCallback = null);
|
|
4919
|
+
let M = $, S = Date.now();
|
|
4920
|
+
const A = () => {
|
|
4921
|
+
const I = Date.now(), q = I - S;
|
|
4922
|
+
if (S = I, M *= Math.pow(0.95, q / 16), p.currentY += M * q, p.currentY > 0 || p.currentY < -p.maxScroll) {
|
|
4923
|
+
p.frameCallback && (ne(p.frameCallback), p.frameCallback = null), _(p.currentY > 0 ? 0 : -p.maxScroll);
|
|
4924
4924
|
return;
|
|
4925
4925
|
}
|
|
4926
|
-
|
|
4926
|
+
C(p.currentY), Math.abs(M) < 0.01 && p.frameCallback && (ne(p.frameCallback), p.frameCallback = null);
|
|
4927
4927
|
};
|
|
4928
|
-
p.frameCallback = it.render(
|
|
4928
|
+
p.frameCallback = it.render(A, !0);
|
|
4929
4929
|
},
|
|
4930
|
-
[
|
|
4931
|
-
), P =
|
|
4930
|
+
[C, _]
|
|
4931
|
+
), P = L(() => {
|
|
4932
4932
|
if (!t || !l.current) return;
|
|
4933
4933
|
u.current !== null && clearTimeout(u.current), requestAnimationFrame(() => {
|
|
4934
4934
|
l.current && (l.current.style.opacity = "1");
|
|
@@ -4939,43 +4939,43 @@ function Gi({
|
|
|
4939
4939
|
l.current && (l.current.style.opacity = "0"), u.current = null;
|
|
4940
4940
|
});
|
|
4941
4941
|
}, 1e3);
|
|
4942
|
-
}, [t]), x =
|
|
4942
|
+
}, [t]), x = L(
|
|
4943
4943
|
($) => {
|
|
4944
4944
|
if (b.current !== null && Date.now() - b.current < 50)
|
|
4945
4945
|
return;
|
|
4946
4946
|
b.current = Date.now();
|
|
4947
4947
|
const p = h.current;
|
|
4948
|
-
p.isScrolling = !0, p.startY = p.currentY, p.lastTimestamp = Date.now(), p.isPullingToRefresh = p.currentY === 0, p.pullDistance = 0, p.frameCallback && (
|
|
4948
|
+
p.isScrolling = !0, p.startY = p.currentY, p.lastTimestamp = Date.now(), p.isPullingToRefresh = p.currentY === 0, p.pullDistance = 0, p.frameCallback && (ne(p.frameCallback), p.frameCallback = null), P();
|
|
4949
4949
|
},
|
|
4950
4950
|
[P]
|
|
4951
|
-
), k =
|
|
4951
|
+
), k = L(
|
|
4952
4952
|
($) => {
|
|
4953
4953
|
const p = h.current;
|
|
4954
4954
|
if (!p.isScrolling) return;
|
|
4955
4955
|
const M = w(p.startY + $.deltaY);
|
|
4956
|
-
p.isPullingToRefresh && M < p.startY && (p.isPullingToRefresh = !1),
|
|
4956
|
+
p.isPullingToRefresh && M < p.startY && (p.isPullingToRefresh = !1), C(M), r && p.isPullingToRefresh && !f && M > 0 && (p.pullDistance = M), P();
|
|
4957
4957
|
},
|
|
4958
4958
|
[
|
|
4959
4959
|
r,
|
|
4960
|
-
|
|
4960
|
+
C,
|
|
4961
4961
|
f,
|
|
4962
4962
|
P,
|
|
4963
4963
|
w
|
|
4964
4964
|
]
|
|
4965
|
-
),
|
|
4965
|
+
), F = L(() => {
|
|
4966
4966
|
m(!0), _(h.current.refreshThreshold), r && r().then(() => {
|
|
4967
4967
|
m(!1), _(0);
|
|
4968
4968
|
});
|
|
4969
|
-
}, [r, _]), Y =
|
|
4969
|
+
}, [r, _]), Y = L(
|
|
4970
4970
|
($) => {
|
|
4971
4971
|
const p = h.current;
|
|
4972
|
-
p.isScrolling && (p.isScrolling = !1, r && p.isPullingToRefresh && !f && p.pullDistance > p.refreshThreshold ?
|
|
4972
|
+
p.isScrolling && (p.isScrolling = !1, r && p.isPullingToRefresh && !f && p.pullDistance > p.refreshThreshold ? F() : p.currentY > 0 || p.currentY < -p.maxScroll ? _(p.currentY > 0 ? 0 : -p.maxScroll) : D($.velocityY), p.isPullingToRefresh = !1);
|
|
4973
4973
|
},
|
|
4974
|
-
[r, D, _, f,
|
|
4974
|
+
[r, D, _, f, F]
|
|
4975
4975
|
);
|
|
4976
|
-
return
|
|
4976
|
+
return H(() => {
|
|
4977
4977
|
if (!s.current) return;
|
|
4978
|
-
const $ =
|
|
4978
|
+
const $ = Ar(s.current, {
|
|
4979
4979
|
name: "page-scroller-gesture",
|
|
4980
4980
|
priority: 10,
|
|
4981
4981
|
passive: !0,
|
|
@@ -4985,7 +4985,7 @@ function Gi({
|
|
|
4985
4985
|
onEnd: Y
|
|
4986
4986
|
});
|
|
4987
4987
|
return $.init(), () => $.destroy();
|
|
4988
|
-
}, [x, k, Y]),
|
|
4988
|
+
}, [x, k, Y]), H(() => {
|
|
4989
4989
|
if (s.current)
|
|
4990
4990
|
return v(), E(), window.addEventListener("resize", v), () => {
|
|
4991
4991
|
window.removeEventListener("resize", v), u.current !== null && clearTimeout(u.current);
|
|
@@ -5035,24 +5035,24 @@ function Gi({
|
|
|
5035
5035
|
updateMaxScroll: v,
|
|
5036
5036
|
rubberBandEffect: w,
|
|
5037
5037
|
updateScrollbarPosition: E,
|
|
5038
|
-
setPosition:
|
|
5038
|
+
setPosition: C
|
|
5039
5039
|
};
|
|
5040
5040
|
}
|
|
5041
|
-
const
|
|
5041
|
+
const Xs = {
|
|
5042
5042
|
2: "text-2xl",
|
|
5043
5043
|
4: "text-4xl",
|
|
5044
5044
|
5: "text-5xl",
|
|
5045
5045
|
6: "text-6xl"
|
|
5046
|
-
},
|
|
5046
|
+
}, cl = ({
|
|
5047
5047
|
title: e,
|
|
5048
5048
|
description: t,
|
|
5049
5049
|
size: r = "6",
|
|
5050
5050
|
descriptionClassName: n,
|
|
5051
5051
|
className: o
|
|
5052
5052
|
}) => /* @__PURE__ */ g("div", { className: N("text-center", o), children: [
|
|
5053
|
-
/* @__PURE__ */ d("p", { className: `${
|
|
5053
|
+
/* @__PURE__ */ d("p", { className: `${Xs[r]} font-medium`, children: e }),
|
|
5054
5054
|
t ? /* @__PURE__ */ d("p", { className: N("mt-6 text-base-11", n), children: t }) : null
|
|
5055
|
-
] }),
|
|
5055
|
+
] }), ul = Ue(
|
|
5056
5056
|
({
|
|
5057
5057
|
placeholder: e = "Buscar",
|
|
5058
5058
|
value: t,
|
|
@@ -5064,8 +5064,8 @@ const Ys = {
|
|
|
5064
5064
|
onMount: i,
|
|
5065
5065
|
error: c
|
|
5066
5066
|
}, l) => {
|
|
5067
|
-
const u = T(null), f = yt(), m =
|
|
5068
|
-
return
|
|
5067
|
+
const u = T(null), f = yt(), m = _r(u, l), b = L(() => r && r(u), []);
|
|
5068
|
+
return H(() => {
|
|
5069
5069
|
const h = async () => {
|
|
5070
5070
|
i && await i(u, f);
|
|
5071
5071
|
};
|
|
@@ -5100,7 +5100,7 @@ const Ys = {
|
|
|
5100
5100
|
}
|
|
5101
5101
|
),
|
|
5102
5102
|
/* @__PURE__ */ d(
|
|
5103
|
-
|
|
5103
|
+
An,
|
|
5104
5104
|
{
|
|
5105
5105
|
size: 20,
|
|
5106
5106
|
className: N("absolute left-3 text-base-11 pointer-events-none", {
|
|
@@ -5125,7 +5125,7 @@ const Ys = {
|
|
|
5125
5125
|
}
|
|
5126
5126
|
);
|
|
5127
5127
|
}
|
|
5128
|
-
),
|
|
5128
|
+
), xr = ({
|
|
5129
5129
|
el: e,
|
|
5130
5130
|
direction: t,
|
|
5131
5131
|
amount: r = 200,
|
|
@@ -5138,7 +5138,7 @@ const Ys = {
|
|
|
5138
5138
|
r === "max" ? c = i : c = r ?? (a ? e.clientHeight : e.clientWidth) * n;
|
|
5139
5139
|
let l;
|
|
5140
5140
|
if (t === "right" || t === "down" ? l = Math.min(s + c, i) : l = Math.max(s - c, 0), l === s) return;
|
|
5141
|
-
|
|
5141
|
+
Lt(0, 1, {
|
|
5142
5142
|
duration: {
|
|
5143
5143
|
fast: 0.15,
|
|
5144
5144
|
normal: 0.4,
|
|
@@ -5151,14 +5151,14 @@ const Ys = {
|
|
|
5151
5151
|
a ? e.scrollTop = m : e.scrollLeft = m;
|
|
5152
5152
|
}
|
|
5153
5153
|
});
|
|
5154
|
-
},
|
|
5154
|
+
}, qs = {
|
|
5155
5155
|
default: [0.32, 0.72, 0, 1]
|
|
5156
|
-
},
|
|
5156
|
+
}, Nr = {
|
|
5157
5157
|
initial: { opacity: 0 },
|
|
5158
5158
|
animate: {
|
|
5159
5159
|
opacity: 1,
|
|
5160
5160
|
transition: {
|
|
5161
|
-
ease:
|
|
5161
|
+
ease: qs.default,
|
|
5162
5162
|
duration: 0.3
|
|
5163
5163
|
}
|
|
5164
5164
|
},
|
|
@@ -5169,18 +5169,18 @@ const Ys = {
|
|
|
5169
5169
|
duration: 0.3
|
|
5170
5170
|
}
|
|
5171
5171
|
}
|
|
5172
|
-
},
|
|
5173
|
-
let xe,
|
|
5174
|
-
const be = "__aa_tgt",
|
|
5175
|
-
const t =
|
|
5176
|
-
t && t.forEach((r) =>
|
|
5177
|
-
},
|
|
5172
|
+
}, dn = /* @__PURE__ */ new Set(), Z = /* @__PURE__ */ new WeakMap(), Ae = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(), jt = /* @__PURE__ */ new WeakMap(), Ks = /* @__PURE__ */ new WeakMap(), We = /* @__PURE__ */ new WeakMap(), ht = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakSet();
|
|
5173
|
+
let xe, Jt = 0, Zt = 0;
|
|
5174
|
+
const be = "__aa_tgt", qe = "__aa_del", bt = "__aa_new", Us = (e) => {
|
|
5175
|
+
const t = ti(e);
|
|
5176
|
+
t && t.forEach((r) => ri(r));
|
|
5177
|
+
}, Qs = (e) => {
|
|
5178
5178
|
e.forEach((t) => {
|
|
5179
|
-
t.target === xe &&
|
|
5179
|
+
t.target === xe && Js(), Z.has(t.target) && Me(t.target);
|
|
5180
5180
|
});
|
|
5181
5181
|
};
|
|
5182
|
-
function
|
|
5183
|
-
|
|
5182
|
+
function Gs(e) {
|
|
5183
|
+
jt.get(e)?.disconnect();
|
|
5184
5184
|
let r = Z.get(e), n = 0;
|
|
5185
5185
|
const o = 5;
|
|
5186
5186
|
r || (r = _e(e), Z.set(e, r));
|
|
@@ -5199,49 +5199,49 @@ function Hs(e) {
|
|
|
5199
5199
|
rootMargin: c
|
|
5200
5200
|
}
|
|
5201
5201
|
);
|
|
5202
|
-
l.observe(e),
|
|
5202
|
+
l.observe(e), jt.set(e, l);
|
|
5203
5203
|
}
|
|
5204
5204
|
function Me(e) {
|
|
5205
5205
|
clearTimeout(ht.get(e));
|
|
5206
|
-
const t = Et(e), r =
|
|
5206
|
+
const t = Et(e), r = Ke(t) ? 500 : t.duration;
|
|
5207
5207
|
ht.set(
|
|
5208
5208
|
e,
|
|
5209
5209
|
setTimeout(async () => {
|
|
5210
|
-
const n =
|
|
5210
|
+
const n = Se.get(e);
|
|
5211
5211
|
try {
|
|
5212
|
-
await n?.finished, Z.set(e, _e(e)),
|
|
5212
|
+
await n?.finished, Z.set(e, _e(e)), Gs(e);
|
|
5213
5213
|
} catch {
|
|
5214
5214
|
}
|
|
5215
5215
|
}, r)
|
|
5216
5216
|
);
|
|
5217
5217
|
}
|
|
5218
|
-
function
|
|
5218
|
+
function Js() {
|
|
5219
5219
|
clearTimeout(ht.get(xe)), ht.set(
|
|
5220
5220
|
xe,
|
|
5221
5221
|
setTimeout(() => {
|
|
5222
|
-
|
|
5223
|
-
(e) =>
|
|
5222
|
+
dn.forEach(
|
|
5223
|
+
(e) => bn(e, (t) => fn(() => Me(t)))
|
|
5224
5224
|
);
|
|
5225
5225
|
}, 100)
|
|
5226
5226
|
);
|
|
5227
5227
|
}
|
|
5228
|
-
function
|
|
5228
|
+
function Zs(e) {
|
|
5229
5229
|
setTimeout(() => {
|
|
5230
|
-
|
|
5230
|
+
Ks.set(
|
|
5231
5231
|
e,
|
|
5232
|
-
setInterval(() =>
|
|
5232
|
+
setInterval(() => fn(Me.bind(null, e)), 2e3)
|
|
5233
5233
|
);
|
|
5234
5234
|
}, Math.round(2e3 * Math.random()));
|
|
5235
5235
|
}
|
|
5236
|
-
function
|
|
5236
|
+
function fn(e) {
|
|
5237
5237
|
typeof requestIdleCallback == "function" ? requestIdleCallback(() => e()) : requestAnimationFrame(() => e());
|
|
5238
5238
|
}
|
|
5239
|
-
let
|
|
5240
|
-
const
|
|
5241
|
-
|
|
5242
|
-
|
|
5239
|
+
let zt, pt;
|
|
5240
|
+
const ei = typeof window < "u" && "ResizeObserver" in window;
|
|
5241
|
+
ei && (xe = document.documentElement, zt = new MutationObserver(Us), pt = new ResizeObserver(Qs), window.addEventListener("scroll", () => {
|
|
5242
|
+
Zt = window.scrollY, Jt = window.scrollX;
|
|
5243
5243
|
}), pt.observe(xe));
|
|
5244
|
-
function
|
|
5244
|
+
function ti(e) {
|
|
5245
5245
|
return e.reduce((n, o) => [
|
|
5246
5246
|
...n,
|
|
5247
5247
|
...Array.from(o.addedNodes),
|
|
@@ -5256,7 +5256,7 @@ function Xs(e) {
|
|
|
5256
5256
|
for (let a = 0; a < o.target.children.length; a++) {
|
|
5257
5257
|
const s = o.target.children.item(a);
|
|
5258
5258
|
if (s) {
|
|
5259
|
-
if (
|
|
5259
|
+
if (qe in s)
|
|
5260
5260
|
return !1;
|
|
5261
5261
|
Pt(o.target, s), n.add(s);
|
|
5262
5262
|
}
|
|
@@ -5265,9 +5265,9 @@ function Xs(e) {
|
|
|
5265
5265
|
if (o.removedNodes.length)
|
|
5266
5266
|
for (let a = 0; a < o.removedNodes.length; a++) {
|
|
5267
5267
|
const s = o.removedNodes[a];
|
|
5268
|
-
if (
|
|
5268
|
+
if (qe in s)
|
|
5269
5269
|
return !1;
|
|
5270
|
-
s instanceof Element && (n.add(s), Pt(o.target, s),
|
|
5270
|
+
s instanceof Element && (n.add(s), Pt(o.target, s), Ae.set(s, [
|
|
5271
5271
|
o.previousSibling,
|
|
5272
5272
|
o.nextSibling
|
|
5273
5273
|
]));
|
|
@@ -5279,14 +5279,14 @@ function Xs(e) {
|
|
|
5279
5279
|
function Pt(e, t) {
|
|
5280
5280
|
!t && !(be in e) ? Object.defineProperty(e, be, { value: e }) : t && !(be in t) && Object.defineProperty(t, be, { value: e });
|
|
5281
5281
|
}
|
|
5282
|
-
function
|
|
5282
|
+
function ri(e) {
|
|
5283
5283
|
const t = e.isConnected, r = Z.has(e);
|
|
5284
|
-
t &&
|
|
5284
|
+
t && Ae.has(e) && Ae.delete(e), Se.has(e) && Se.get(e)?.cancel(), bt in e ? kr(e) : r && t ? oi(e) : r && !t ? ai(e) : kr(e);
|
|
5285
5285
|
}
|
|
5286
5286
|
function ue(e) {
|
|
5287
5287
|
return Number(e.replace(/[^0-9.\-]/g, ""));
|
|
5288
5288
|
}
|
|
5289
|
-
function
|
|
5289
|
+
function ni(e) {
|
|
5290
5290
|
let t = e.parentElement;
|
|
5291
5291
|
for (; t; ) {
|
|
5292
5292
|
if (t.scrollLeft || t.scrollTop)
|
|
@@ -5296,7 +5296,7 @@ function Us(e) {
|
|
|
5296
5296
|
return { x: 0, y: 0 };
|
|
5297
5297
|
}
|
|
5298
5298
|
function _e(e) {
|
|
5299
|
-
const t = e.getBoundingClientRect(), { x: r, y: n } =
|
|
5299
|
+
const t = e.getBoundingClientRect(), { x: r, y: n } = ni(e);
|
|
5300
5300
|
return {
|
|
5301
5301
|
top: t.top + n,
|
|
5302
5302
|
left: t.left + r,
|
|
@@ -5304,7 +5304,7 @@ function _e(e) {
|
|
|
5304
5304
|
height: t.height
|
|
5305
5305
|
};
|
|
5306
5306
|
}
|
|
5307
|
-
function
|
|
5307
|
+
function mn(e, t, r) {
|
|
5308
5308
|
let n = t.width, o = t.height, a = r.width, s = r.height;
|
|
5309
5309
|
const i = getComputedStyle(e);
|
|
5310
5310
|
if (i.getPropertyValue("box-sizing") === "content-box") {
|
|
@@ -5314,36 +5314,36 @@ function fn(e, t, r) {
|
|
|
5314
5314
|
return [n, a, o, s].map(Math.round);
|
|
5315
5315
|
}
|
|
5316
5316
|
function Et(e) {
|
|
5317
|
-
return be in e &&
|
|
5317
|
+
return be in e && We.has(e[be]) ? We.get(e[be]) : { duration: 250, easing: "ease-in-out" };
|
|
5318
5318
|
}
|
|
5319
|
-
function
|
|
5319
|
+
function hn(e) {
|
|
5320
5320
|
if (be in e) return e[be];
|
|
5321
5321
|
}
|
|
5322
|
-
function
|
|
5323
|
-
const t =
|
|
5324
|
-
return t ?
|
|
5322
|
+
function er(e) {
|
|
5323
|
+
const t = hn(e);
|
|
5324
|
+
return t ? ze.has(t) : !1;
|
|
5325
5325
|
}
|
|
5326
|
-
function
|
|
5327
|
-
t.forEach((r) => r(e,
|
|
5326
|
+
function bn(e, ...t) {
|
|
5327
|
+
t.forEach((r) => r(e, We.has(e)));
|
|
5328
5328
|
for (let r = 0; r < e.children.length; r++) {
|
|
5329
5329
|
const n = e.children.item(r);
|
|
5330
|
-
n && t.forEach((o) => o(n,
|
|
5330
|
+
n && t.forEach((o) => o(n, We.has(n)));
|
|
5331
5331
|
}
|
|
5332
5332
|
}
|
|
5333
|
-
function
|
|
5333
|
+
function tr(e) {
|
|
5334
5334
|
return Array.isArray(e) ? e : [e];
|
|
5335
5335
|
}
|
|
5336
|
-
function
|
|
5336
|
+
function Ke(e) {
|
|
5337
5337
|
return typeof e == "function";
|
|
5338
5338
|
}
|
|
5339
|
-
function
|
|
5339
|
+
function oi(e) {
|
|
5340
5340
|
const t = Z.get(e), r = _e(e);
|
|
5341
|
-
if (!
|
|
5341
|
+
if (!er(e)) return Z.set(e, r);
|
|
5342
5342
|
let n;
|
|
5343
5343
|
if (!t) return;
|
|
5344
5344
|
const o = Et(e);
|
|
5345
5345
|
if (typeof o != "function") {
|
|
5346
|
-
const a = t.left - r.left, s = t.top - r.top, [i, c, l, u] =
|
|
5346
|
+
const a = t.left - r.left, s = t.top - r.top, [i, c, l, u] = mn(
|
|
5347
5347
|
e,
|
|
5348
5348
|
t,
|
|
5349
5349
|
r
|
|
@@ -5357,19 +5357,19 @@ function Qs(e) {
|
|
|
5357
5357
|
easing: o.easing
|
|
5358
5358
|
});
|
|
5359
5359
|
} else {
|
|
5360
|
-
const [a] =
|
|
5360
|
+
const [a] = tr(
|
|
5361
5361
|
o(e, "remain", t, r)
|
|
5362
5362
|
);
|
|
5363
5363
|
n = new Animation(a), n.play();
|
|
5364
5364
|
}
|
|
5365
|
-
|
|
5365
|
+
Se.set(e, n), Z.set(e, r), n.addEventListener("finish", Me.bind(null, e));
|
|
5366
5366
|
}
|
|
5367
|
-
function
|
|
5367
|
+
function kr(e) {
|
|
5368
5368
|
bt in e && delete e[bt];
|
|
5369
5369
|
const t = _e(e);
|
|
5370
5370
|
Z.set(e, t);
|
|
5371
5371
|
const r = Et(e);
|
|
5372
|
-
if (!
|
|
5372
|
+
if (!er(e)) return;
|
|
5373
5373
|
let n;
|
|
5374
5374
|
if (typeof r != "function")
|
|
5375
5375
|
n = e.animate(
|
|
@@ -5384,26 +5384,26 @@ function Nr(e) {
|
|
|
5384
5384
|
}
|
|
5385
5385
|
);
|
|
5386
5386
|
else {
|
|
5387
|
-
const [o] =
|
|
5387
|
+
const [o] = tr(r(e, "add", t));
|
|
5388
5388
|
n = new Animation(o), n.play();
|
|
5389
5389
|
}
|
|
5390
|
-
|
|
5390
|
+
Se.set(e, n), n.addEventListener("finish", Me.bind(null, e));
|
|
5391
5391
|
}
|
|
5392
|
-
function
|
|
5393
|
-
e.remove(), Z.delete(e),
|
|
5394
|
-
if (
|
|
5392
|
+
function $r(e, t) {
|
|
5393
|
+
e.remove(), Z.delete(e), Ae.delete(e), Se.delete(e), jt.get(e)?.disconnect(), setTimeout(() => {
|
|
5394
|
+
if (qe in e && delete e[qe], Object.defineProperty(e, bt, { value: !0, configurable: !0 }), t && e instanceof HTMLElement)
|
|
5395
5395
|
for (const r in t)
|
|
5396
5396
|
e.style[r] = "";
|
|
5397
5397
|
}, 0);
|
|
5398
5398
|
}
|
|
5399
|
-
function
|
|
5400
|
-
if (!
|
|
5401
|
-
const [t, r] =
|
|
5402
|
-
Object.defineProperty(e,
|
|
5399
|
+
function ai(e) {
|
|
5400
|
+
if (!Ae.has(e) || !Z.has(e)) return;
|
|
5401
|
+
const [t, r] = Ae.get(e);
|
|
5402
|
+
Object.defineProperty(e, qe, { value: !0, configurable: !0 });
|
|
5403
5403
|
const n = window.scrollX, o = window.scrollY;
|
|
5404
|
-
if (r && r.parentNode && r.parentNode instanceof Element ? r.parentNode.insertBefore(e, r) : t && t.parentNode ? t.parentNode.appendChild(e) :
|
|
5405
|
-
const [a, s, i, c] =
|
|
5406
|
-
(n !==
|
|
5404
|
+
if (r && r.parentNode && r.parentNode instanceof Element ? r.parentNode.insertBefore(e, r) : t && t.parentNode ? t.parentNode.appendChild(e) : hn(e)?.appendChild(e), !er(e)) return $r(e);
|
|
5405
|
+
const [a, s, i, c] = ii(e), l = Et(e), u = Z.get(e);
|
|
5406
|
+
(n !== Jt || o !== Zt) && si(e, n, o, l);
|
|
5407
5407
|
let f, m = {
|
|
5408
5408
|
position: "absolute",
|
|
5409
5409
|
top: `${a}px`,
|
|
@@ -5415,7 +5415,7 @@ function Gs(e) {
|
|
|
5415
5415
|
transformOrigin: "center",
|
|
5416
5416
|
zIndex: "100"
|
|
5417
5417
|
};
|
|
5418
|
-
if (!
|
|
5418
|
+
if (!Ke(l))
|
|
5419
5419
|
Object.assign(e.style, m), f = e.animate(
|
|
5420
5420
|
[
|
|
5421
5421
|
{
|
|
@@ -5430,22 +5430,22 @@ function Gs(e) {
|
|
|
5430
5430
|
{ duration: l.duration, easing: "ease-out" }
|
|
5431
5431
|
);
|
|
5432
5432
|
else {
|
|
5433
|
-
const [b, h] =
|
|
5433
|
+
const [b, h] = tr(
|
|
5434
5434
|
l(e, "remove", u)
|
|
5435
5435
|
);
|
|
5436
5436
|
h?.styleReset !== !1 && (m = h?.styleReset || m, Object.assign(e.style, m)), f = new Animation(b), f.play();
|
|
5437
5437
|
}
|
|
5438
|
-
|
|
5438
|
+
Se.set(e, f), f.addEventListener("finish", $r.bind(null, e, m));
|
|
5439
5439
|
}
|
|
5440
|
-
function
|
|
5441
|
-
const o =
|
|
5440
|
+
function si(e, t, r, n) {
|
|
5441
|
+
const o = Jt - t, a = Zt - r, s = document.documentElement.style.scrollBehavior;
|
|
5442
5442
|
if (getComputedStyle(xe).scrollBehavior === "smooth" && (document.documentElement.style.scrollBehavior = "auto"), window.scrollTo(window.scrollX + o, window.scrollY + a), !e.parentElement) return;
|
|
5443
5443
|
const c = e.parentElement;
|
|
5444
5444
|
let l = c.clientHeight, u = c.clientWidth;
|
|
5445
5445
|
const f = performance.now();
|
|
5446
5446
|
function m() {
|
|
5447
5447
|
requestAnimationFrame(() => {
|
|
5448
|
-
if (!
|
|
5448
|
+
if (!Ke(n)) {
|
|
5449
5449
|
const b = l - c.clientHeight, h = u - c.clientWidth;
|
|
5450
5450
|
f + n.duration > performance.now() ? (window.scrollTo({
|
|
5451
5451
|
left: window.scrollX - h,
|
|
@@ -5456,8 +5456,8 @@ function Js(e, t, r, n) {
|
|
|
5456
5456
|
}
|
|
5457
5457
|
m();
|
|
5458
5458
|
}
|
|
5459
|
-
function
|
|
5460
|
-
const t = Z.get(e), [r, , n] =
|
|
5459
|
+
function ii(e) {
|
|
5460
|
+
const t = Z.get(e), [r, , n] = mn(e, t, _e(e));
|
|
5461
5461
|
let o = e.parentElement;
|
|
5462
5462
|
for (; o && (getComputedStyle(o).position === "static" || o instanceof HTMLBodyElement); )
|
|
5463
5463
|
o = o.parentElement;
|
|
@@ -5465,16 +5465,16 @@ function Zs(e) {
|
|
|
5465
5465
|
const a = getComputedStyle(o), s = Z.get(o) || _e(o), i = Math.round(t.top - s.top) - ue(a.borderTopWidth), c = Math.round(t.left - s.left) - ue(a.borderLeftWidth);
|
|
5466
5466
|
return [i, c, r, n];
|
|
5467
5467
|
}
|
|
5468
|
-
function
|
|
5469
|
-
return
|
|
5468
|
+
function pn(e, t = {}) {
|
|
5469
|
+
return zt && pt && (window.matchMedia("(prefers-reduced-motion: reduce)").matches && !Ke(t) && !t.disrespectUserMotionPreference || (ze.add(e), getComputedStyle(e).position === "static" && Object.assign(e.style, { position: "relative" }), bn(e, Me, Zs, (o) => pt?.observe(o)), Ke(t) ? We.set(e, t) : We.set(e, { duration: 250, easing: "ease-in-out", ...t }), zt.observe(e, { childList: !0 }), dn.add(e))), Object.freeze({
|
|
5470
5470
|
parent: e,
|
|
5471
5471
|
enable: () => {
|
|
5472
|
-
|
|
5472
|
+
ze.add(e);
|
|
5473
5473
|
},
|
|
5474
5474
|
disable: () => {
|
|
5475
|
-
|
|
5475
|
+
ze.delete(e);
|
|
5476
5476
|
},
|
|
5477
|
-
isEnabled: () =>
|
|
5477
|
+
isEnabled: () => ze.has(e)
|
|
5478
5478
|
});
|
|
5479
5479
|
}
|
|
5480
5480
|
const ve = {
|
|
@@ -5507,7 +5507,7 @@ const ve = {
|
|
|
5507
5507
|
item: "grow"
|
|
5508
5508
|
}
|
|
5509
5509
|
}
|
|
5510
|
-
},
|
|
5510
|
+
}, dl = ({
|
|
5511
5511
|
options: e,
|
|
5512
5512
|
selected: t,
|
|
5513
5513
|
onChange: r,
|
|
@@ -5524,7 +5524,7 @@ const ve = {
|
|
|
5524
5524
|
// from,
|
|
5525
5525
|
className: b
|
|
5526
5526
|
}) => {
|
|
5527
|
-
const [h, v] = z({ left: !1, right: !1 }), { ref: w } =
|
|
5527
|
+
const [h, v] = z({ left: !1, right: !1 }), { ref: w } = Un({
|
|
5528
5528
|
onOverflow: (E) => {
|
|
5529
5529
|
v({ left: E.canScrollLeft, right: E.canScrollRight });
|
|
5530
5530
|
},
|
|
@@ -5551,7 +5551,7 @@ const ve = {
|
|
|
5551
5551
|
ve.border[u]
|
|
5552
5552
|
),
|
|
5553
5553
|
children: e.map((E) => {
|
|
5554
|
-
const
|
|
5554
|
+
const C = n(t) === n(E);
|
|
5555
5555
|
return /* @__PURE__ */ d(
|
|
5556
5556
|
"button",
|
|
5557
5557
|
{
|
|
@@ -5559,8 +5559,8 @@ const ve = {
|
|
|
5559
5559
|
className: N(
|
|
5560
5560
|
"border-r px-3 py-1 last:border-none text-nowrap shrink-0",
|
|
5561
5561
|
ve.widths[l].item,
|
|
5562
|
-
!
|
|
5563
|
-
a ? a(
|
|
5562
|
+
!C && "lg:hover:bg-overlay-3",
|
|
5563
|
+
a ? a(C) : C ? ve.colors[i] : ve.unselectedColors[c],
|
|
5564
5564
|
ve.border[u],
|
|
5565
5565
|
s
|
|
5566
5566
|
),
|
|
@@ -5571,16 +5571,16 @@ const ve = {
|
|
|
5571
5571
|
})
|
|
5572
5572
|
}
|
|
5573
5573
|
),
|
|
5574
|
-
/* @__PURE__ */ g(
|
|
5574
|
+
/* @__PURE__ */ g(Ye, { children: [
|
|
5575
5575
|
h.left ? /* @__PURE__ */ d(
|
|
5576
|
-
|
|
5576
|
+
re.button,
|
|
5577
5577
|
{
|
|
5578
|
-
variants:
|
|
5578
|
+
variants: Nr,
|
|
5579
5579
|
initial: "initial",
|
|
5580
5580
|
animate: "animate",
|
|
5581
5581
|
exit: "exit",
|
|
5582
5582
|
onClick: () => {
|
|
5583
|
-
w.current &&
|
|
5583
|
+
w.current && xr({ el: w.current, direction: "left" });
|
|
5584
5584
|
},
|
|
5585
5585
|
className: "absolute shrink-0 left-0 px-1 h-full bg-gradient-to-r from-base-2 top-0",
|
|
5586
5586
|
children: /* @__PURE__ */ d(Sr, { className: "text-base-13" })
|
|
@@ -5588,17 +5588,17 @@ const ve = {
|
|
|
5588
5588
|
"leftarrow"
|
|
5589
5589
|
) : null,
|
|
5590
5590
|
h.right ? /* @__PURE__ */ d(
|
|
5591
|
-
|
|
5591
|
+
re.button,
|
|
5592
5592
|
{
|
|
5593
|
-
variants:
|
|
5593
|
+
variants: Nr,
|
|
5594
5594
|
initial: "initial",
|
|
5595
5595
|
animate: "animate",
|
|
5596
5596
|
exit: "exit",
|
|
5597
5597
|
onClick: () => {
|
|
5598
|
-
w.current &&
|
|
5598
|
+
w.current && xr({ el: w.current, direction: "right" });
|
|
5599
5599
|
},
|
|
5600
5600
|
className: "absolute shrink-0 right-0 px-1 h-full bg-gradient-to-l from-base-2 top-0",
|
|
5601
|
-
children: /* @__PURE__ */ d(
|
|
5601
|
+
children: /* @__PURE__ */ d(Mr, { className: "text-base-13" })
|
|
5602
5602
|
},
|
|
5603
5603
|
"rightarrow"
|
|
5604
5604
|
) : null
|
|
@@ -5607,7 +5607,7 @@ const ve = {
|
|
|
5607
5607
|
}
|
|
5608
5608
|
);
|
|
5609
5609
|
};
|
|
5610
|
-
function
|
|
5610
|
+
function li({
|
|
5611
5611
|
label: e,
|
|
5612
5612
|
labelPosition: t = "default",
|
|
5613
5613
|
options: r,
|
|
@@ -5625,14 +5625,14 @@ function ei({
|
|
|
5625
5625
|
className: h
|
|
5626
5626
|
}) {
|
|
5627
5627
|
const [v, w] = z(-1), E = T(null), {
|
|
5628
|
-
triggerRef:
|
|
5628
|
+
triggerRef: C,
|
|
5629
5629
|
triggerProps: _,
|
|
5630
5630
|
popoverRef: D,
|
|
5631
5631
|
getPopoverPosition: P,
|
|
5632
5632
|
open: x,
|
|
5633
5633
|
toggle: k,
|
|
5634
|
-
close:
|
|
5635
|
-
} =
|
|
5634
|
+
close: F
|
|
5635
|
+
} = Bt({
|
|
5636
5636
|
align: "start",
|
|
5637
5637
|
side: "bottom",
|
|
5638
5638
|
avoidCollisions: !0,
|
|
@@ -5643,8 +5643,8 @@ function ei({
|
|
|
5643
5643
|
w(-1);
|
|
5644
5644
|
}
|
|
5645
5645
|
});
|
|
5646
|
-
|
|
5647
|
-
!
|
|
5646
|
+
Vt(D, (p) => {
|
|
5647
|
+
!C.current || !x || !p.target || C.current.contains(p.target) || F();
|
|
5648
5648
|
});
|
|
5649
5649
|
const Y = P(), $ = l && n ? l(n, r) : n;
|
|
5650
5650
|
return /* @__PURE__ */ g("div", { className: N("relative", h), children: [
|
|
@@ -5661,7 +5661,7 @@ function ei({
|
|
|
5661
5661
|
/* @__PURE__ */ g(
|
|
5662
5662
|
U,
|
|
5663
5663
|
{
|
|
5664
|
-
ref:
|
|
5664
|
+
ref: C,
|
|
5665
5665
|
color: "solidhybrid",
|
|
5666
5666
|
className: "w-full justify-between",
|
|
5667
5667
|
onClick: k,
|
|
@@ -5669,7 +5669,7 @@ function ei({
|
|
|
5669
5669
|
children: [
|
|
5670
5670
|
$ ? s($) : m,
|
|
5671
5671
|
/* @__PURE__ */ d(
|
|
5672
|
-
|
|
5672
|
+
Wn,
|
|
5673
5673
|
{
|
|
5674
5674
|
size: 18,
|
|
5675
5675
|
className: N("transition", x && "rotate-180")
|
|
@@ -5678,8 +5678,8 @@ function ei({
|
|
|
5678
5678
|
]
|
|
5679
5679
|
}
|
|
5680
5680
|
),
|
|
5681
|
-
/* @__PURE__ */ d(
|
|
5682
|
-
|
|
5681
|
+
/* @__PURE__ */ d(Ye, { children: x && /* @__PURE__ */ d(Re, { children: /* @__PURE__ */ d(
|
|
5682
|
+
re.div,
|
|
5683
5683
|
{
|
|
5684
5684
|
initial: { opacity: 0, y: -10 },
|
|
5685
5685
|
animate: { opacity: 1, y: 0 },
|
|
@@ -5691,7 +5691,7 @@ function ei({
|
|
|
5691
5691
|
left: Y.x,
|
|
5692
5692
|
top: Y.top,
|
|
5693
5693
|
bottom: Y.bottom,
|
|
5694
|
-
width:
|
|
5694
|
+
width: C.current?.offsetWidth ?? 200
|
|
5695
5695
|
},
|
|
5696
5696
|
className: N(
|
|
5697
5697
|
"bg-base-1 dark-theme:bg-base-3 border border-base-4",
|
|
@@ -5700,7 +5700,7 @@ function ei({
|
|
|
5700
5700
|
),
|
|
5701
5701
|
role: "listbox",
|
|
5702
5702
|
children: r.map((p, M) => {
|
|
5703
|
-
const
|
|
5703
|
+
const S = !!($ && a(p) === a($)), A = M === v, I = i?.(p);
|
|
5704
5704
|
return /* @__PURE__ */ g(
|
|
5705
5705
|
"div",
|
|
5706
5706
|
{
|
|
@@ -5709,12 +5709,12 @@ function ei({
|
|
|
5709
5709
|
// gap-x-2
|
|
5710
5710
|
"first:rounded-t-6 last:rounded-b-6 relative",
|
|
5711
5711
|
// !selected && "pl-9",
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
c && c(
|
|
5712
|
+
A && "bg-base-3 dark-theme:bg-base-4",
|
|
5713
|
+
S && "bg-brandfadedbg text-brand",
|
|
5714
|
+
c && c(S)
|
|
5715
5715
|
),
|
|
5716
5716
|
onClick: () => {
|
|
5717
|
-
o(u ? u(p) : p),
|
|
5717
|
+
o(u ? u(p) : p), F();
|
|
5718
5718
|
},
|
|
5719
5719
|
role: "option",
|
|
5720
5720
|
onMouseEnter: () => w(M),
|
|
@@ -5726,7 +5726,7 @@ function ei({
|
|
|
5726
5726
|
] }),
|
|
5727
5727
|
I && /* @__PURE__ */ d("p", { className: "text-xs text-base-11 mt-0.5 line-clamp-2", children: I })
|
|
5728
5728
|
] }),
|
|
5729
|
-
|
|
5729
|
+
S && /* @__PURE__ */ d(Be, { size: 16, className: "shrink-0" })
|
|
5730
5730
|
]
|
|
5731
5731
|
},
|
|
5732
5732
|
a(p)
|
|
@@ -5736,15 +5736,15 @@ function ei({
|
|
|
5736
5736
|
) }) })
|
|
5737
5737
|
] });
|
|
5738
5738
|
}
|
|
5739
|
-
const
|
|
5740
|
-
const { control: r } =
|
|
5739
|
+
const fl = ({ name: e, ...t }) => {
|
|
5740
|
+
const { control: r } = Qe();
|
|
5741
5741
|
return r ? /* @__PURE__ */ d(
|
|
5742
|
-
|
|
5742
|
+
Ge,
|
|
5743
5743
|
{
|
|
5744
5744
|
name: e,
|
|
5745
5745
|
control: r,
|
|
5746
5746
|
render: ({ field: n, fieldState: o }) => /* @__PURE__ */ d(
|
|
5747
|
-
|
|
5747
|
+
li,
|
|
5748
5748
|
{
|
|
5749
5749
|
selected: n.value ?? null,
|
|
5750
5750
|
onChange: (a) => n.onChange(a),
|
|
@@ -5757,14 +5757,14 @@ const tl = ({ name: e, ...t }) => {
|
|
|
5757
5757
|
"Form control missing for field: ",
|
|
5758
5758
|
e
|
|
5759
5759
|
] }));
|
|
5760
|
-
},
|
|
5760
|
+
}, ml = ({ className: e }) => /* @__PURE__ */ d("div", { className: N("w-full h-px bg-base-4", e) }), hl = ({
|
|
5761
5761
|
text: e,
|
|
5762
5762
|
length: t = 120,
|
|
5763
5763
|
size: r = "sm",
|
|
5764
5764
|
className: n,
|
|
5765
5765
|
buttonClassName: o
|
|
5766
5766
|
}) => {
|
|
5767
|
-
const [a, s] = z(!1), i =
|
|
5767
|
+
const [a, s] = z(!1), i = te(() => e.length > t, [e]), c = te(() => i ? a ? e : e.slice(0, t).trim() + "..." : e, [e, a, i]);
|
|
5768
5768
|
return /* @__PURE__ */ g("div", { children: [
|
|
5769
5769
|
/* @__PURE__ */ d("p", { className: N("text-base-12", r === "sm" && "text-sm", n), children: c }),
|
|
5770
5770
|
i ? /* @__PURE__ */ d(
|
|
@@ -5776,7 +5776,7 @@ const tl = ({ name: e, ...t }) => {
|
|
|
5776
5776
|
}
|
|
5777
5777
|
) : null
|
|
5778
5778
|
] });
|
|
5779
|
-
},
|
|
5779
|
+
}, gn = ({
|
|
5780
5780
|
loading: e = !0,
|
|
5781
5781
|
wrapperClassName: t,
|
|
5782
5782
|
spinnerClassName: r
|
|
@@ -5796,7 +5796,7 @@ const tl = ({ name: e, ...t }) => {
|
|
|
5796
5796
|
}
|
|
5797
5797
|
)
|
|
5798
5798
|
}
|
|
5799
|
-
) }),
|
|
5799
|
+
) }), bl = ({
|
|
5800
5800
|
isEditable: e,
|
|
5801
5801
|
isDeletable: t = !0,
|
|
5802
5802
|
createUpdateLoading: r,
|
|
@@ -5832,32 +5832,32 @@ const tl = ({ name: e, ...t }) => {
|
|
|
5832
5832
|
state: r ? "loading" : n ? "disabled" : "enabled",
|
|
5833
5833
|
type: "submit",
|
|
5834
5834
|
children: [
|
|
5835
|
-
r ? /* @__PURE__ */ d(
|
|
5835
|
+
r ? /* @__PURE__ */ d(gn, {}) : e ? /* @__PURE__ */ d(Or, { size: 18 }) : /* @__PURE__ */ d(Lr, { size: 18 }),
|
|
5836
5836
|
e ? i : s
|
|
5837
5837
|
]
|
|
5838
5838
|
}
|
|
5839
5839
|
)
|
|
5840
5840
|
] });
|
|
5841
|
-
},
|
|
5841
|
+
}, vn = Ht(void 0), pl = ({
|
|
5842
5842
|
children: e,
|
|
5843
5843
|
debug: t = !1
|
|
5844
5844
|
}) => {
|
|
5845
|
-
const r = T([]), n =
|
|
5845
|
+
const r = T([]), n = L(
|
|
5846
5846
|
(u) => {
|
|
5847
5847
|
r.current.push(u), t && console.log("Modal", u, "added", r.current);
|
|
5848
5848
|
},
|
|
5849
5849
|
[t]
|
|
5850
|
-
), o =
|
|
5850
|
+
), o = L(
|
|
5851
5851
|
(u) => {
|
|
5852
5852
|
r.current = r.current.filter((f) => f !== u), t && console.log("Modal", u, "removed", r.current);
|
|
5853
5853
|
},
|
|
5854
5854
|
[t]
|
|
5855
|
-
), a =
|
|
5855
|
+
), a = L(() => {
|
|
5856
5856
|
const u = r.current[r.current.length - 2];
|
|
5857
5857
|
return t && console.log("prev modal id", u), u;
|
|
5858
|
-
}, [t]), s =
|
|
5858
|
+
}, [t]), s = L(
|
|
5859
5859
|
(u, f = "modal", m) => {
|
|
5860
|
-
|
|
5860
|
+
Lt(
|
|
5861
5861
|
u,
|
|
5862
5862
|
{
|
|
5863
5863
|
y: f === "modal" ? -30 : -50,
|
|
@@ -5871,8 +5871,8 @@ const tl = ({ name: e, ...t }) => {
|
|
|
5871
5871
|
);
|
|
5872
5872
|
},
|
|
5873
5873
|
[]
|
|
5874
|
-
), i =
|
|
5875
|
-
|
|
5874
|
+
), i = L((u) => {
|
|
5875
|
+
Lt(
|
|
5876
5876
|
u,
|
|
5877
5877
|
{
|
|
5878
5878
|
y: 0,
|
|
@@ -5883,7 +5883,7 @@ const tl = ({ name: e, ...t }) => {
|
|
|
5883
5883
|
duration: 0.2
|
|
5884
5884
|
}
|
|
5885
5885
|
);
|
|
5886
|
-
}, []), c =
|
|
5886
|
+
}, []), c = L(() => r.current, []), l = {
|
|
5887
5887
|
add: n,
|
|
5888
5888
|
remove: o,
|
|
5889
5889
|
getPrevId: a,
|
|
@@ -5891,16 +5891,16 @@ const tl = ({ name: e, ...t }) => {
|
|
|
5891
5891
|
restoreParentModal: i,
|
|
5892
5892
|
getModals: c
|
|
5893
5893
|
};
|
|
5894
|
-
return /* @__PURE__ */ d(
|
|
5895
|
-
},
|
|
5896
|
-
const e = vt(
|
|
5894
|
+
return /* @__PURE__ */ d(vn.Provider, { value: l, children: e });
|
|
5895
|
+
}, ci = () => {
|
|
5896
|
+
const e = vt(vn);
|
|
5897
5897
|
if (e === void 0)
|
|
5898
5898
|
throw new Error("useModals must be used within a ModalsProvider");
|
|
5899
5899
|
return e;
|
|
5900
|
-
},
|
|
5900
|
+
}, ui = ({
|
|
5901
5901
|
withPortal: e,
|
|
5902
5902
|
children: t
|
|
5903
|
-
}) => e ? /* @__PURE__ */ d(
|
|
5903
|
+
}) => e ? /* @__PURE__ */ d(Re, { children: t }) : /* @__PURE__ */ d(gt, { children: t }), gl = ({
|
|
5904
5904
|
id: e,
|
|
5905
5905
|
prevPath: t,
|
|
5906
5906
|
withDelay: r,
|
|
@@ -5915,8 +5915,8 @@ const tl = ({ name: e, ...t }) => {
|
|
|
5915
5915
|
children: f
|
|
5916
5916
|
// ...others
|
|
5917
5917
|
}) => {
|
|
5918
|
-
const m =
|
|
5919
|
-
return
|
|
5918
|
+
const m = Hn(), b = yt(), h = T(null), v = ci(), w = te(() => i === "modal" || b, [i, b]);
|
|
5919
|
+
return H(() => {
|
|
5920
5920
|
v.add(e);
|
|
5921
5921
|
const E = v.getPrevId();
|
|
5922
5922
|
if (!E || (h.current = document.getElementById(E), !h.current)) return;
|
|
@@ -5930,9 +5930,9 @@ const tl = ({ name: e, ...t }) => {
|
|
|
5930
5930
|
console.log("IS THIS CLEANUP RUNNING?");
|
|
5931
5931
|
};
|
|
5932
5932
|
//! NOT RUNNING...
|
|
5933
|
-
}, [b]),
|
|
5933
|
+
}, [b]), Er(() => () => v.remove(e), []), /* @__PURE__ */ g(ui, { withPortal: n, children: [
|
|
5934
5934
|
/* @__PURE__ */ d(
|
|
5935
|
-
|
|
5935
|
+
re.div,
|
|
5936
5936
|
{
|
|
5937
5937
|
initial: { opacity: 0 },
|
|
5938
5938
|
animate: {
|
|
@@ -5960,7 +5960,7 @@ const tl = ({ name: e, ...t }) => {
|
|
|
5960
5960
|
}
|
|
5961
5961
|
),
|
|
5962
5962
|
/* @__PURE__ */ g(
|
|
5963
|
-
|
|
5963
|
+
re.div,
|
|
5964
5964
|
{
|
|
5965
5965
|
id: e,
|
|
5966
5966
|
initial: {
|
|
@@ -6033,7 +6033,7 @@ const tl = ({ name: e, ...t }) => {
|
|
|
6033
6033
|
)
|
|
6034
6034
|
] });
|
|
6035
6035
|
};
|
|
6036
|
-
function
|
|
6036
|
+
function di({
|
|
6037
6037
|
checked: e,
|
|
6038
6038
|
onCheckedChange: t,
|
|
6039
6039
|
disabled: r = !1,
|
|
@@ -6041,7 +6041,7 @@ function oi({
|
|
|
6041
6041
|
required: o,
|
|
6042
6042
|
className: a = ""
|
|
6043
6043
|
}) {
|
|
6044
|
-
const s =
|
|
6044
|
+
const s = Tr();
|
|
6045
6045
|
return /* @__PURE__ */ g(
|
|
6046
6046
|
"button",
|
|
6047
6047
|
{
|
|
@@ -6095,7 +6095,7 @@ function oi({
|
|
|
6095
6095
|
}
|
|
6096
6096
|
);
|
|
6097
6097
|
}
|
|
6098
|
-
const
|
|
6098
|
+
const fi = ({
|
|
6099
6099
|
label: e,
|
|
6100
6100
|
variant: t = "default",
|
|
6101
6101
|
color: r = "solid",
|
|
@@ -6107,30 +6107,30 @@ const ai = ({
|
|
|
6107
6107
|
maxTags: c,
|
|
6108
6108
|
validateTag: l
|
|
6109
6109
|
}) => {
|
|
6110
|
-
const [u, f] = z(""), [m, b] = z(!1), [h, v] = z(null), w = T(null), E = T(null),
|
|
6110
|
+
const [u, f] = z(""), [m, b] = z(!1), [h, v] = z(null), w = T(null), E = T(null), C = T([]), _ = n.length > 0, D = T(
|
|
6111
6111
|
`taginput-${Math.random().toString(36).substr(2, 9)}`
|
|
6112
6112
|
).current, P = T(
|
|
6113
6113
|
`label-${Math.random().toString(36).substr(2, 9)}`
|
|
6114
6114
|
).current, x = T(
|
|
6115
6115
|
`error-${Math.random().toString(36).substr(2, 9)}`
|
|
6116
6116
|
).current;
|
|
6117
|
-
|
|
6118
|
-
|
|
6117
|
+
H(() => {
|
|
6118
|
+
C.current = C.current.slice(0, n.length);
|
|
6119
6119
|
}, [n.length]);
|
|
6120
|
-
const k = (
|
|
6121
|
-
if (
|
|
6122
|
-
|
|
6123
|
-
const
|
|
6120
|
+
const k = (S) => {
|
|
6121
|
+
if (S.key === "Enter" && u.trim()) {
|
|
6122
|
+
S.preventDefault();
|
|
6123
|
+
const A = u.trim();
|
|
6124
6124
|
if (c && n.length >= c) {
|
|
6125
6125
|
v(`Maximum of ${c} tags allowed`);
|
|
6126
6126
|
return;
|
|
6127
6127
|
}
|
|
6128
|
-
if (n.includes(
|
|
6128
|
+
if (n.includes(A)) {
|
|
6129
6129
|
v("Tag already exists");
|
|
6130
6130
|
return;
|
|
6131
6131
|
}
|
|
6132
6132
|
if (l) {
|
|
6133
|
-
const I = l(
|
|
6133
|
+
const I = l(A);
|
|
6134
6134
|
if (typeof I == "string") {
|
|
6135
6135
|
v(I);
|
|
6136
6136
|
return;
|
|
@@ -6139,29 +6139,29 @@ const ai = ({
|
|
|
6139
6139
|
return;
|
|
6140
6140
|
}
|
|
6141
6141
|
}
|
|
6142
|
-
o([...n,
|
|
6143
|
-
} else if (
|
|
6144
|
-
const
|
|
6145
|
-
o(n.slice(0, -1)), M(`Removed tag ${
|
|
6146
|
-
} else
|
|
6147
|
-
},
|
|
6148
|
-
if (
|
|
6149
|
-
|
|
6150
|
-
const I = n[
|
|
6151
|
-
|
|
6142
|
+
o([...n, A]), f(""), v(null), M(`Added tag ${A}`);
|
|
6143
|
+
} else if (S.key === "Backspace" && !u && n.length > 0) {
|
|
6144
|
+
const A = n[n.length - 1];
|
|
6145
|
+
o(n.slice(0, -1)), M(`Removed tag ${A}`);
|
|
6146
|
+
} else S.key === "ArrowLeft" && u === "" && n.length > 0 && C.current[n.length - 1] && C.current[n.length - 1]?.focus();
|
|
6147
|
+
}, F = (S, A) => {
|
|
6148
|
+
if (S.key === "Backspace" || S.key === "Delete") {
|
|
6149
|
+
S.preventDefault();
|
|
6150
|
+
const I = n[A], q = [...n];
|
|
6151
|
+
q.splice(A, 1), o(q), setTimeout(() => {
|
|
6152
6152
|
w.current && w.current.focus();
|
|
6153
6153
|
}, 0), M(`Removed tag ${I}`);
|
|
6154
|
-
} else
|
|
6155
|
-
}, Y = (
|
|
6156
|
-
o(n.filter((I) => I !==
|
|
6157
|
-
|
|
6158
|
-
}, 0), M(`Removed tag ${
|
|
6159
|
-
}, $ = (
|
|
6160
|
-
f(
|
|
6154
|
+
} else S.key === "ArrowRight" ? (S.preventDefault(), A < n.length - 1 ? C.current[A + 1]?.focus() : w.current?.focus()) : S.key === "ArrowLeft" && (S.preventDefault(), A > 0 && C.current[A - 1]?.focus());
|
|
6155
|
+
}, Y = (S, A) => {
|
|
6156
|
+
o(n.filter((I) => I !== S)), setTimeout(() => {
|
|
6157
|
+
A < n.length - 1 ? C.current[A]?.focus() : A > 0 ? C.current[A - 1]?.focus() : w.current?.focus();
|
|
6158
|
+
}, 0), M(`Removed tag ${S}`);
|
|
6159
|
+
}, $ = (S) => {
|
|
6160
|
+
f(S.target.value), v(null);
|
|
6161
6161
|
}, p = () => {
|
|
6162
6162
|
w.current && w.current.focus();
|
|
6163
|
-
}, M = (
|
|
6164
|
-
console.log(`Accessibility announcement: ${
|
|
6163
|
+
}, M = (S) => {
|
|
6164
|
+
console.log(`Accessibility announcement: ${S}`);
|
|
6165
6165
|
};
|
|
6166
6166
|
return /* @__PURE__ */ g("div", { children: [
|
|
6167
6167
|
/* @__PURE__ */ g("div", { className: "relative", ref: E, children: [
|
|
@@ -6225,11 +6225,11 @@ const ai = ({
|
|
|
6225
6225
|
"mt-2.5": t === "floating"
|
|
6226
6226
|
}),
|
|
6227
6227
|
children: [
|
|
6228
|
-
n.map((
|
|
6228
|
+
n.map((S, A) => /* @__PURE__ */ g(
|
|
6229
6229
|
"div",
|
|
6230
6230
|
{
|
|
6231
6231
|
ref: (I) => {
|
|
6232
|
-
|
|
6232
|
+
C.current[A] = I;
|
|
6233
6233
|
},
|
|
6234
6234
|
className: N(
|
|
6235
6235
|
"line-clamp-1 text-brand rounded-full px-2 text-sm flex items-center",
|
|
@@ -6240,23 +6240,23 @@ const ai = ({
|
|
|
6240
6240
|
),
|
|
6241
6241
|
tabIndex: 0,
|
|
6242
6242
|
role: "button",
|
|
6243
|
-
"aria-label": `${
|
|
6244
|
-
onKeyDown: (I) =>
|
|
6243
|
+
"aria-label": `${S}, press delete or backspace to remove`,
|
|
6244
|
+
onKeyDown: (I) => F(I, A),
|
|
6245
6245
|
children: [
|
|
6246
|
-
|
|
6246
|
+
S,
|
|
6247
6247
|
/* @__PURE__ */ d(
|
|
6248
6248
|
"button",
|
|
6249
6249
|
{
|
|
6250
6250
|
type: "button",
|
|
6251
6251
|
className: "ml-1 text-brand hover:text-brandhover shrink-0",
|
|
6252
|
-
onClick: () => Y(
|
|
6253
|
-
"aria-label": `Remove ${
|
|
6252
|
+
onClick: () => Y(S, A),
|
|
6253
|
+
"aria-label": `Remove ${S} tag`,
|
|
6254
6254
|
children: "x"
|
|
6255
6255
|
}
|
|
6256
6256
|
)
|
|
6257
6257
|
]
|
|
6258
6258
|
},
|
|
6259
|
-
`${
|
|
6259
|
+
`${S}-${A}`
|
|
6260
6260
|
)),
|
|
6261
6261
|
/* @__PURE__ */ d(
|
|
6262
6262
|
"input",
|
|
@@ -6284,7 +6284,7 @@ const ai = ({
|
|
|
6284
6284
|
]
|
|
6285
6285
|
}
|
|
6286
6286
|
),
|
|
6287
|
-
a && /* @__PURE__ */ d("span", { className: "absolute right-3 top-1/2 transform -translate-y-1/2", children: /* @__PURE__ */ d(
|
|
6287
|
+
a && /* @__PURE__ */ d("span", { className: "absolute right-3 top-1/2 transform -translate-y-1/2", children: /* @__PURE__ */ d(Be, {}) })
|
|
6288
6288
|
] }),
|
|
6289
6289
|
(s || h) && /* @__PURE__ */ d(
|
|
6290
6290
|
"p",
|
|
@@ -6297,15 +6297,15 @@ const ai = ({
|
|
|
6297
6297
|
),
|
|
6298
6298
|
/* @__PURE__ */ d("div", { className: "sr-only", "aria-live": "polite", "aria-atomic": "true", children: n.length > 0 ? `Current tags: ${n.join(", ")}` : "No tags added yet" })
|
|
6299
6299
|
] });
|
|
6300
|
-
},
|
|
6301
|
-
const { control: r } =
|
|
6300
|
+
}, vl = ({ name: e, ...t }) => {
|
|
6301
|
+
const { control: r } = Qe();
|
|
6302
6302
|
return r ? /* @__PURE__ */ d(
|
|
6303
|
-
|
|
6303
|
+
Ge,
|
|
6304
6304
|
{
|
|
6305
6305
|
name: e,
|
|
6306
6306
|
control: r,
|
|
6307
6307
|
render: ({ field: n, fieldState: o }) => /* @__PURE__ */ d(
|
|
6308
|
-
|
|
6308
|
+
fi,
|
|
6309
6309
|
{
|
|
6310
6310
|
tags: n.value,
|
|
6311
6311
|
onChange: (a) => n.onChange(a),
|
|
@@ -6318,10 +6318,10 @@ const ai = ({
|
|
|
6318
6318
|
"Form control missing for field: ",
|
|
6319
6319
|
e
|
|
6320
6320
|
] }));
|
|
6321
|
-
},
|
|
6321
|
+
}, mi = {
|
|
6322
6322
|
brand: "ring-1 ring-brand",
|
|
6323
6323
|
solid: "ring-1 ring-base-6"
|
|
6324
|
-
},
|
|
6324
|
+
}, wn = Ue(
|
|
6325
6325
|
({
|
|
6326
6326
|
label: e,
|
|
6327
6327
|
labelPosition: t = "default",
|
|
@@ -6371,7 +6371,7 @@ const ai = ({
|
|
|
6371
6371
|
{
|
|
6372
6372
|
ref: l,
|
|
6373
6373
|
className: N(
|
|
6374
|
-
!n && u &&
|
|
6374
|
+
!n && u && mi[o],
|
|
6375
6375
|
"bg-base-3 border border-base-4 light-theme:drop-shadow-sm rounded-6 w-full focus-visible:outline-none customscrollbarnohide",
|
|
6376
6376
|
"placeholder:text-base-11 text-sm",
|
|
6377
6377
|
"resize-none",
|
|
@@ -6397,28 +6397,28 @@ const ai = ({
|
|
|
6397
6397
|
] });
|
|
6398
6398
|
}
|
|
6399
6399
|
);
|
|
6400
|
-
|
|
6401
|
-
const
|
|
6400
|
+
wn.displayName = "TextArea";
|
|
6401
|
+
const wl = ({
|
|
6402
6402
|
name: e,
|
|
6403
6403
|
customRead: t,
|
|
6404
6404
|
customSet: r,
|
|
6405
6405
|
...n
|
|
6406
6406
|
}) => {
|
|
6407
|
-
const { control: o } =
|
|
6407
|
+
const { control: o } = Qe(), a = L(
|
|
6408
6408
|
(i) => t ? t(i) : i === null ? Wr(i) : i,
|
|
6409
6409
|
[t]
|
|
6410
|
-
), s =
|
|
6411
|
-
(i) => r ? r(i) : i === null ?
|
|
6410
|
+
), s = L(
|
|
6411
|
+
(i) => r ? r(i) : i === null ? Ft(i) : i,
|
|
6412
6412
|
[r]
|
|
6413
6413
|
);
|
|
6414
6414
|
return o ? /* @__PURE__ */ d(
|
|
6415
|
-
|
|
6415
|
+
Ge,
|
|
6416
6416
|
{
|
|
6417
6417
|
name: e,
|
|
6418
6418
|
control: o,
|
|
6419
6419
|
render: ({ field: i, fieldState: c }) => /* @__PURE__ */ g("div", { children: [
|
|
6420
6420
|
/* @__PURE__ */ d(
|
|
6421
|
-
|
|
6421
|
+
wn,
|
|
6422
6422
|
{
|
|
6423
6423
|
value: a(i.value),
|
|
6424
6424
|
onChange: (l) => i.onChange(s(l.target.value)),
|
|
@@ -6434,7 +6434,7 @@ const ll = ({
|
|
|
6434
6434
|
"Form control missing for field: ",
|
|
6435
6435
|
e
|
|
6436
6436
|
] }));
|
|
6437
|
-
},
|
|
6437
|
+
}, hi = [
|
|
6438
6438
|
"Lunes",
|
|
6439
6439
|
"Martes",
|
|
6440
6440
|
"Miercoles",
|
|
@@ -6442,10 +6442,10 @@ const ll = ({
|
|
|
6442
6442
|
"Viernes",
|
|
6443
6443
|
"Sábado",
|
|
6444
6444
|
"Domingo"
|
|
6445
|
-
],
|
|
6445
|
+
], yl = () => /* @__PURE__ */ d(bi, {}), bi = () => /* @__PURE__ */ d("div", { children: hi.map((e) => /* @__PURE__ */ d(pi, { day: e }, e)) }), pi = ({ day: e }) => {
|
|
6446
6446
|
const [t, r] = z(!1), n = T(null);
|
|
6447
|
-
return
|
|
6448
|
-
n.current &&
|
|
6447
|
+
return H(() => {
|
|
6448
|
+
n.current && pn(n.current);
|
|
6449
6449
|
}, []), /* @__PURE__ */ g(
|
|
6450
6450
|
"div",
|
|
6451
6451
|
{
|
|
@@ -6458,7 +6458,7 @@ const ll = ({
|
|
|
6458
6458
|
/* @__PURE__ */ g("div", { className: "flex items-center justify-between", children: [
|
|
6459
6459
|
/* @__PURE__ */ d("p", { children: e }),
|
|
6460
6460
|
/* @__PURE__ */ d(
|
|
6461
|
-
|
|
6461
|
+
di,
|
|
6462
6462
|
{
|
|
6463
6463
|
className: "mt-0",
|
|
6464
6464
|
checked: t,
|
|
@@ -6466,18 +6466,18 @@ const ll = ({
|
|
|
6466
6466
|
}
|
|
6467
6467
|
)
|
|
6468
6468
|
] }),
|
|
6469
|
-
t ? /* @__PURE__ */ d(
|
|
6469
|
+
t ? /* @__PURE__ */ d(gi, {}) : null
|
|
6470
6470
|
]
|
|
6471
6471
|
},
|
|
6472
6472
|
e
|
|
6473
6473
|
);
|
|
6474
|
-
},
|
|
6474
|
+
}, gi = () => {
|
|
6475
6475
|
const [e, t] = z([
|
|
6476
6476
|
{ from: "08:00", to: "12:00" },
|
|
6477
6477
|
{ from: "14:00", to: "18:00" }
|
|
6478
6478
|
]), r = T(null);
|
|
6479
|
-
return
|
|
6480
|
-
r.current &&
|
|
6479
|
+
return H(() => {
|
|
6480
|
+
r.current && pn(r.current);
|
|
6481
6481
|
}, []), /* @__PURE__ */ g("div", { ref: r, children: [
|
|
6482
6482
|
e.map((n, o) => /* @__PURE__ */ g(
|
|
6483
6483
|
"div",
|
|
@@ -6500,83 +6500,294 @@ const ll = ({
|
|
|
6500
6500
|
className: "w-full mt-4",
|
|
6501
6501
|
color: "contrast",
|
|
6502
6502
|
children: [
|
|
6503
|
-
/* @__PURE__ */ d(
|
|
6503
|
+
/* @__PURE__ */ d(Lr, { className: "stroke-1" }),
|
|
6504
6504
|
"Añadir hora"
|
|
6505
6505
|
]
|
|
6506
6506
|
}
|
|
6507
6507
|
)
|
|
6508
6508
|
] });
|
|
6509
6509
|
};
|
|
6510
|
+
/**
|
|
6511
|
+
* @license
|
|
6512
|
+
* Attempt
|
|
6513
|
+
* Copyright (c) 2025 Mateo Suarez. All rights reserved.
|
|
6514
|
+
*
|
|
6515
|
+
* Free to use in your own personal or commercial applications and projects.
|
|
6516
|
+
* Unauthorized copying, modification, or distribution is strictly prohibited.
|
|
6517
|
+
* See LICENSE file for full terms.
|
|
6518
|
+
*/
|
|
6519
|
+
class vi {
|
|
6520
|
+
listeners = /* @__PURE__ */ new Map();
|
|
6521
|
+
emit(t, r) {
|
|
6522
|
+
let n = this.listeners.get(t);
|
|
6523
|
+
n && n.forEach((o) => o(r));
|
|
6524
|
+
}
|
|
6525
|
+
listen(t, r) {
|
|
6526
|
+
return this.listeners.has(t) || this.listeners.set(t, /* @__PURE__ */ new Set()), this.listeners.get(t).add(r), () => {
|
|
6527
|
+
let n = this.listeners.get(t);
|
|
6528
|
+
n && (n.delete(r), n.size === 0 && this.listeners.delete(t));
|
|
6529
|
+
};
|
|
6530
|
+
}
|
|
6531
|
+
}
|
|
6532
|
+
class xl {
|
|
6533
|
+
constructor() {
|
|
6534
|
+
this.listeners = /* @__PURE__ */ new Map();
|
|
6535
|
+
}
|
|
6536
|
+
emit(t, r) {
|
|
6537
|
+
const n = this.listeners.get(t);
|
|
6538
|
+
n && n.forEach((o) => o(r));
|
|
6539
|
+
}
|
|
6540
|
+
listen(t, r) {
|
|
6541
|
+
return this.listeners.has(t) || this.listeners.set(t, /* @__PURE__ */ new Set()), this.listeners.get(t).add(r), () => {
|
|
6542
|
+
const n = this.listeners.get(t);
|
|
6543
|
+
n && (n.delete(r), n.size === 0 && this.listeners.delete(t));
|
|
6544
|
+
};
|
|
6545
|
+
}
|
|
6546
|
+
}
|
|
6547
|
+
function Ot(e, t, r = !0) {
|
|
6548
|
+
const n = T(void 0);
|
|
6549
|
+
H(() => (r || n.current && n.current(), n.current = wi.listen(e, t), () => n.current && n.current()), [e, t, r]);
|
|
6550
|
+
}
|
|
6551
|
+
const wi = new vi();
|
|
6552
|
+
function yn(e = 8) {
|
|
6553
|
+
const t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
|
|
6554
|
+
let r = "";
|
|
6555
|
+
for (let n = 0; n < e; n++)
|
|
6556
|
+
r += t.charAt(Math.floor(Math.random() * t.length));
|
|
6557
|
+
return r;
|
|
6558
|
+
}
|
|
6559
|
+
const Nl = ({ colors: e }) => {
|
|
6560
|
+
const [t, r] = z([]), n = L(
|
|
6561
|
+
(s) => {
|
|
6562
|
+
r((i) => [
|
|
6563
|
+
...i,
|
|
6564
|
+
{ ...s, id: s.id ?? yn() }
|
|
6565
|
+
]);
|
|
6566
|
+
},
|
|
6567
|
+
[]
|
|
6568
|
+
), o = L(
|
|
6569
|
+
(s) => r((i) => i.filter((c) => c.id !== s)),
|
|
6570
|
+
[]
|
|
6571
|
+
), a = L(
|
|
6572
|
+
(s, i) => {
|
|
6573
|
+
r((c) => {
|
|
6574
|
+
const l = c.findIndex((m) => m.id === s);
|
|
6575
|
+
if (l === -1) return c;
|
|
6576
|
+
const u = c[l];
|
|
6577
|
+
return [
|
|
6578
|
+
...c.slice(0, l),
|
|
6579
|
+
{ ...u, ...i },
|
|
6580
|
+
...c.slice(l + 1)
|
|
6581
|
+
];
|
|
6582
|
+
});
|
|
6583
|
+
},
|
|
6584
|
+
[]
|
|
6585
|
+
);
|
|
6586
|
+
return Ot("create-toast", (s) => {
|
|
6587
|
+
n(s);
|
|
6588
|
+
}), Ot(
|
|
6589
|
+
"update-toast",
|
|
6590
|
+
(s) => {
|
|
6591
|
+
a(s.id, s.toast);
|
|
6592
|
+
}
|
|
6593
|
+
), Ot("remove-toast", (s) => {
|
|
6594
|
+
o(s.id);
|
|
6595
|
+
}), /* @__PURE__ */ d(Re, { children: /* @__PURE__ */ d(
|
|
6596
|
+
re.div,
|
|
6597
|
+
{
|
|
6598
|
+
id: "toaster",
|
|
6599
|
+
className: "fixed z-9999 top-[calc(var(--safe-area-top)+0px)] pointer-events-none left-0 mt-4 mb-4 px-4 w-full flex flex-col gap-y-2 items-center justify-center",
|
|
6600
|
+
children: /* @__PURE__ */ d(Ye, { mode: "popLayout", children: t.map((s) => /* @__PURE__ */ d(
|
|
6601
|
+
xi,
|
|
6602
|
+
{
|
|
6603
|
+
toast: s,
|
|
6604
|
+
remove: o,
|
|
6605
|
+
colors: e
|
|
6606
|
+
},
|
|
6607
|
+
s.id
|
|
6608
|
+
)) })
|
|
6609
|
+
}
|
|
6610
|
+
) });
|
|
6611
|
+
}, yi = {
|
|
6612
|
+
simple: {
|
|
6613
|
+
icon: jn,
|
|
6614
|
+
color: "text-base-12"
|
|
6615
|
+
},
|
|
6616
|
+
info: {
|
|
6617
|
+
icon: In,
|
|
6618
|
+
color: "text-blue-9"
|
|
6619
|
+
},
|
|
6620
|
+
success: {
|
|
6621
|
+
icon: Rn,
|
|
6622
|
+
color: "text-brand"
|
|
6623
|
+
},
|
|
6624
|
+
warning: {
|
|
6625
|
+
icon: Yn,
|
|
6626
|
+
color: "text-yellow-9"
|
|
6627
|
+
},
|
|
6628
|
+
error: {
|
|
6629
|
+
icon: _n,
|
|
6630
|
+
color: "text-red-9"
|
|
6631
|
+
}
|
|
6632
|
+
}, xi = ({
|
|
6633
|
+
toast: e,
|
|
6634
|
+
remove: t,
|
|
6635
|
+
colors: r
|
|
6636
|
+
}) => {
|
|
6637
|
+
H(() => {
|
|
6638
|
+
let a;
|
|
6639
|
+
return e.type === "loading" ? a = setTimeout(() => {
|
|
6640
|
+
t(e.id);
|
|
6641
|
+
}, e?.timeout ?? 1e4) : a = setTimeout(() => {
|
|
6642
|
+
t(e.id);
|
|
6643
|
+
}, e?.duration ?? 3e3), () => clearTimeout(a);
|
|
6644
|
+
}, [e.type, e.id, e.duration, e.timeout, t]);
|
|
6645
|
+
const n = te(() => r ? r[e.type] ?? null : null, [r]), o = te(
|
|
6646
|
+
() => yi[e.type] ?? null,
|
|
6647
|
+
[e.type]
|
|
6648
|
+
);
|
|
6649
|
+
return /* @__PURE__ */ g(
|
|
6650
|
+
re.div,
|
|
6651
|
+
{
|
|
6652
|
+
layout: !0,
|
|
6653
|
+
initial: { y: -40, opacity: 0 },
|
|
6654
|
+
animate: { y: 0, opacity: 1 },
|
|
6655
|
+
exit: { y: -40, opacity: 0 },
|
|
6656
|
+
className: N(
|
|
6657
|
+
"p-2 max-w-96 origin-center rounded-6 flex items-center gap-x-1.5 bg-base-1"
|
|
6658
|
+
),
|
|
6659
|
+
children: [
|
|
6660
|
+
e.type === "loading" ? /* @__PURE__ */ d(gn, { wrapperClassName: "shrink-0", spinnerClassName: "h-5 w-5" }) : e.type !== "simple" && o ? /* @__PURE__ */ d(
|
|
6661
|
+
o.icon,
|
|
6662
|
+
{
|
|
6663
|
+
size: 20,
|
|
6664
|
+
className: N("shrink-0", n ?? o.color)
|
|
6665
|
+
}
|
|
6666
|
+
) : null,
|
|
6667
|
+
/* @__PURE__ */ d("p", { className: "text-sm", children: e.message })
|
|
6668
|
+
]
|
|
6669
|
+
}
|
|
6670
|
+
);
|
|
6671
|
+
}, kl = (e) => ({
|
|
6672
|
+
simple: (t, r) => e.emit("create-toast", {
|
|
6673
|
+
type: "simple",
|
|
6674
|
+
message: t,
|
|
6675
|
+
...r
|
|
6676
|
+
}),
|
|
6677
|
+
info: (t, r) => e.emit("create-toast", {
|
|
6678
|
+
type: "info",
|
|
6679
|
+
message: t,
|
|
6680
|
+
...r
|
|
6681
|
+
}),
|
|
6682
|
+
success: (t, r) => e.emit("create-toast", {
|
|
6683
|
+
type: "success",
|
|
6684
|
+
message: t,
|
|
6685
|
+
...r
|
|
6686
|
+
}),
|
|
6687
|
+
warning: (t, r) => e.emit("create-toast", {
|
|
6688
|
+
type: "warning",
|
|
6689
|
+
message: t,
|
|
6690
|
+
...r
|
|
6691
|
+
}),
|
|
6692
|
+
error: (t, r) => e.emit("create-toast", {
|
|
6693
|
+
type: "error",
|
|
6694
|
+
message: t,
|
|
6695
|
+
...r
|
|
6696
|
+
}),
|
|
6697
|
+
loading: (t, r) => {
|
|
6698
|
+
const n = yn();
|
|
6699
|
+
return e.emit("create-toast", {
|
|
6700
|
+
id: n,
|
|
6701
|
+
type: "loading",
|
|
6702
|
+
message: t,
|
|
6703
|
+
...r
|
|
6704
|
+
}), n;
|
|
6705
|
+
},
|
|
6706
|
+
update: (t, r) => {
|
|
6707
|
+
e.emit("update-toast", {
|
|
6708
|
+
id: t,
|
|
6709
|
+
toast: r
|
|
6710
|
+
});
|
|
6711
|
+
},
|
|
6712
|
+
dismiss: (t) => {
|
|
6713
|
+
e.emit("remove-toast", { id: t });
|
|
6714
|
+
}
|
|
6715
|
+
});
|
|
6510
6716
|
export {
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
|
|
6717
|
+
tl as AliveScope,
|
|
6718
|
+
Ri as Avatar,
|
|
6719
|
+
Ii as AvatarsGroup,
|
|
6514
6720
|
U as Button,
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
|
|
6518
|
-
|
|
6519
|
-
|
|
6520
|
-
|
|
6521
|
-
|
|
6522
|
-
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
|
|
6530
|
-
|
|
6531
|
-
|
|
6532
|
-
|
|
6533
|
-
|
|
6534
|
-
|
|
6535
|
-
|
|
6536
|
-
al as
|
|
6537
|
-
|
|
6538
|
-
|
|
6539
|
-
|
|
6540
|
-
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
|
|
6545
|
-
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
|
|
6721
|
+
en as Calendar,
|
|
6722
|
+
Ts as Checkbox,
|
|
6723
|
+
Qi as ConfirmationDialog,
|
|
6724
|
+
Xi as DatePickerDemo,
|
|
6725
|
+
qi as DatePickerPopover,
|
|
6726
|
+
Ui as DateTimePicker,
|
|
6727
|
+
Gi as ElasticHeader,
|
|
6728
|
+
xl as EventEmitter,
|
|
6729
|
+
_i as FocusTrap,
|
|
6730
|
+
Ji as Form,
|
|
6731
|
+
el as FormInput,
|
|
6732
|
+
sl as FormMultiSelect,
|
|
6733
|
+
fl as FormSelect,
|
|
6734
|
+
bl as FormSubmit,
|
|
6735
|
+
vl as FormTags,
|
|
6736
|
+
wl as FormTextArea,
|
|
6737
|
+
yl as FormWorkingHours,
|
|
6738
|
+
Ys as Icon,
|
|
6739
|
+
ln as Input,
|
|
6740
|
+
nl as KeepAlive,
|
|
6741
|
+
ol as List,
|
|
6742
|
+
al as ListItem,
|
|
6743
|
+
pl as ModalsProvider,
|
|
6744
|
+
Vs as MultiSelect,
|
|
6745
|
+
il as PageScroller,
|
|
6746
|
+
cl as PageTitle,
|
|
6747
|
+
$s as PopoverCard,
|
|
6748
|
+
Bi as PopoverCardContent,
|
|
6749
|
+
Vi as PopoverCardFooter,
|
|
6750
|
+
Hi as PopoverCardHeader,
|
|
6751
|
+
Re as Portal,
|
|
6752
|
+
ul as SearchInput,
|
|
6753
|
+
dl as SegmentedControl,
|
|
6754
|
+
li as Select,
|
|
6755
|
+
ml as Separator,
|
|
6756
|
+
hl as ShowMoreText,
|
|
6757
|
+
gn as Spinner,
|
|
6758
|
+
gl as SuperModal,
|
|
6759
|
+
di as Switch,
|
|
6760
|
+
fi as Tags,
|
|
6761
|
+
wn as TextArea,
|
|
6762
|
+
Ki as TimePicker,
|
|
6763
|
+
Nl as Toaster,
|
|
6764
|
+
Jn as calculatePopoverPosition,
|
|
6557
6765
|
lt as checkOverflow,
|
|
6558
6766
|
N as cn,
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6767
|
+
kl as createToastManager,
|
|
6768
|
+
Fi as debounce,
|
|
6769
|
+
wi as eventEmitter,
|
|
6770
|
+
Wi as extractDirtyData,
|
|
6771
|
+
Xn as generateInitials,
|
|
6562
6772
|
Wr as nullRead,
|
|
6563
|
-
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6773
|
+
Ft as nullSet,
|
|
6774
|
+
Kn as removeWhitespaces,
|
|
6775
|
+
qn as setFocusEnd,
|
|
6776
|
+
Je as throttle,
|
|
6777
|
+
Ai as toTitleCase,
|
|
6778
|
+
ji as useClickAway,
|
|
6779
|
+
zi as useClickAwayAdvanced,
|
|
6780
|
+
Vt as useClickAwayWithRef,
|
|
6781
|
+
Ot as useEventListener,
|
|
6782
|
+
rl as useKeepAlive,
|
|
6783
|
+
Zn as useKeyListener,
|
|
6573
6784
|
yt as useLargeScreen,
|
|
6574
|
-
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
|
|
6581
|
-
|
|
6785
|
+
_r as useMergedRef,
|
|
6786
|
+
Zi as useMethods,
|
|
6787
|
+
ci as useModals,
|
|
6788
|
+
Un as useOverflow,
|
|
6789
|
+
Yi as useOverflowState,
|
|
6790
|
+
Bt as usePopover,
|
|
6791
|
+
Gn as useRipple,
|
|
6792
|
+
ll as useScroller
|
|
6582
6793
|
};
|